Avoid potential negative array index access to cached text.
[LibreOffice.git] / l10ntools / inc / treemerge.hxx
blob7f1a72fc7fe3861955c43d899819eee79c4ea36e
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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/.
8 */
10 #ifndef INCLUDED_L10NTOOLS_INC_TREEMERGE_HXX
11 #define INCLUDED_L10NTOOLS_INC_TREEMERGE_HXX
13 #include <libxml/tree.h>
14 #include <rtl/string.hxx>
16 /**
17 Class for localization of *.tree files
19 Parse *.tree files, extract translatable strings,
20 merge translated strings and update reference and title
21 of referred help files.
23 class TreeParser
25 private:
26 xmlDocPtr m_pSource;
27 OString m_sLang;
28 bool m_bIsInitialized;
30 public:
31 /// Parse tree file
32 TreeParser( const OString& rInputFile, OString sLang );
33 ~TreeParser();
35 bool isInitialized() const { return m_bIsInitialized; }
36 /// Export strings
37 void Extract( const OString& rPOFile );
38 /// Merge strings to tree file and update reference to help files(xhp)
39 void Merge(
40 const OString &rMergeSrc, const OString &rDestinationFile,
41 const OString &rXhpRoot );
44 #endif // INCLUDED_L10NTOOLS_INC_TREEMERGE_HXX
46 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */