1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef COMPILE_HXX 29 #define COMPILE_HXX 30 31 #include "sal/types.h" 32 33 #if defined(HELPLINKER_DLLIMPLEMENTATION) 34 #define HELPLINKER_DLLPUBLIC SAL_DLLPUBLIC_EXPORT 35 #else 36 #define HELPLINKER_DLLPUBLIC SAL_DLLPUBLIC_IMPORT 37 #endif 38 #define HELPLINKER_DLLPRIVATE SAL_DLLPRIVATE 39 40 41 //#include <helplinkerdllapi.h> 42 #include <rtl/ustring.hxx> 43 44 enum HelpProcessingErrorClass 45 { 46 HELPPROCESSING_NO_ERROR, 47 HELPPROCESSING_GENERAL_ERROR, // Missing files, options etc. 48 HELPPROCESSING_INTERNAL_ERROR, // Unexpected problems 49 HELPPROCESSING_XMLPARSING_ERROR // Errors thrown by libxml 50 }; 51 52 struct HelpProcessingErrorInfo 53 { 54 HelpProcessingErrorClass m_eErrorClass; 55 rtl::OUString m_aErrorMsg; 56 rtl::OUString m_aXMLParsingFile; 57 sal_Int32 m_nXMLParsingLine; 58 59 HelpProcessingErrorInfo( void ) 60 : m_eErrorClass( HELPPROCESSING_NO_ERROR ) 61 , m_nXMLParsingLine( -1 ) 62 {} 63 64 HelpProcessingErrorInfo& operator=( const struct HelpProcessingException& e ); 65 }; 66 67 68 // Returns true in case of success, false in case of error 69 HELPLINKER_DLLPUBLIC bool compileExtensionHelp 70 ( 71 const rtl::OUString& aOfficeHelpPath, 72 const rtl::OUString& aExtensionName, 73 const rtl::OUString& aExtensionLanguageRoot, 74 sal_Int32 nXhpFileCount, const rtl::OUString* pXhpFiles, 75 const rtl::OUString& aDestination, 76 HelpProcessingErrorInfo& o_rHelpProcessingErrorInfo 77 ); 78 79 #endif 80