xref: /AOO41X/main/l10ntools/source/help/compilehelp.hxx (revision 983d4c8a2545ff349deb9b45349fc5e9e80c6c2f)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef COMPILE_HXX
25 #define COMPILE_HXX
26 
27 #include "sal/types.h"
28 
29 #if defined(HELPLINKER_DLLIMPLEMENTATION)
30 #define HELPLINKER_DLLPUBLIC  SAL_DLLPUBLIC_EXPORT
31 #else
32 #define HELPLINKER_DLLPUBLIC  SAL_DLLPUBLIC_IMPORT
33 #endif
34 #define HELPLINKER_DLLPRIVATE SAL_DLLPRIVATE
35 
36 
37 //#include <helplinkerdllapi.h>
38 #include <rtl/ustring.hxx>
39 
40 enum HelpProcessingErrorClass
41 {
42     HELPPROCESSING_NO_ERROR,
43     HELPPROCESSING_GENERAL_ERROR,       // Missing files, options etc.
44     HELPPROCESSING_INTERNAL_ERROR,      // Unexpected problems
45     HELPPROCESSING_XMLPARSING_ERROR     // Errors thrown by libxml
46 };
47 
48 struct HelpProcessingErrorInfo
49 {
50     HelpProcessingErrorClass        m_eErrorClass;
51     rtl::OUString                   m_aErrorMsg;
52     rtl::OUString                   m_aXMLParsingFile;
53     sal_Int32                       m_nXMLParsingLine;
54 
HelpProcessingErrorInfoHelpProcessingErrorInfo55     HelpProcessingErrorInfo( void )
56         : m_eErrorClass( HELPPROCESSING_NO_ERROR )
57         , m_nXMLParsingLine( -1 )
58     {}
59 
60     HelpProcessingErrorInfo& operator=( const struct HelpProcessingException& e );
61 };
62 
63 
64 // Returns true in case of success, false in case of error
65 HELPLINKER_DLLPUBLIC bool compileExtensionHelp
66 (
67     const rtl::OUString& aOfficeHelpPath,
68     const rtl::OUString& aExtensionName,
69     const rtl::OUString& aExtensionLanguageRoot,
70     sal_Int32 nXhpFileCount, const rtl::OUString* pXhpFiles,
71     const rtl::OUString& aDestination,
72     HelpProcessingErrorInfo& o_rHelpProcessingErrorInfo
73 );
74 
75 #endif
76