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