1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 #include "xmlparse.hxx"
22 #include <rtl/ustring.hxx>
23 #include <rtl/ustrbuf.hxx>
24 #include <rtl/strbuf.hxx>
25 #include <memory> /* auto_ptr */
27 #define MOVEFILE_REPLACE_EXISTING 0x01
29 /// This Class is responsible for extracting/merging OpenOffice XML Helpfiles
33 rtl::OString sHelpFile
;
35 #if OSL_DEBUG_LEVEL > 2
36 /// Debugmethod, prints the content of the map to stdout
37 static void Dump(LangHashMap
* rElem_in
, const rtl::OString
& sKey_in
);
39 /// Debugmethod, prints the content of the map to stdout
40 static void Dump(XMLHashMap
* rElem_in
);
44 HelpParser( const rtl::OString
&rHelpFile
);
47 /// Method creates/append a SDF file with the content of a parsed XML file
48 /// @PRECOND rHelpFile is valid
49 static bool CreateSDF( const rtl::OString
&rSDFFile_in
, const rtl::OString
&rPrj_in
, const rtl::OString
&rRoot_in
,
50 const rtl::OString
&sHelpFile
, XMLFile
*pXmlFile
, const rtl::OString
&rGsi1
);
52 /// Method merges the String from the SDFfile into XMLfile. Both Strings must
53 /// point to existing files.
54 bool Merge( const rtl::OString
&rSDFFile_in
, const rtl::OString
&rDestinationFile_in
,
55 const rtl::OString
& sLanguage
, MergeDataFile
& aMergeDataFile
);
58 bool MergeSingleFile( XMLFile
* file
, MergeDataFile
& aMergeDataFile
, const rtl::OString
& sLanguage
, rtl::OString
const & sPath
);
60 void ProcessHelp( LangHashMap
* aLangHM
, const rtl::OString
& sCur
, ResData
*pResData
, MergeDataFile
& aMergeDataFile
);
63 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */