Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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 : */
9 :
10 : #ifndef _PROPMERGE_INCLUDED
11 : #define _PROPMERGE_INCLUDED
12 :
13 : #include <rtl/string.hxx>
14 : #include <vector>
15 :
16 : /** Class for properties localization
17 :
18 : Parse *.properties files, extract translatable strings
19 : and merge translated strings.
20 : */
21 : class PropParser
22 : {
23 : private:
24 : std::vector<OString> m_vLines;
25 : OString m_sSource;
26 : OString m_sLang;
27 : bool m_bIsInitialized;
28 :
29 : public:
30 : PropParser(
31 : const OString& rInputFile, const OString& rLang,
32 : const bool bMergeMode );
33 : ~PropParser();
34 :
35 0 : bool isInitialized() const { return m_bIsInitialized; }
36 : void Extract(
37 : const OString& rSDFFile, const OString& rPrj, const OString& rRoot );
38 : void Merge( const OString &rMergeSrc, const OString &rDestinationFile );
39 : };
40 :
41 : #endif //_PROPMERGE_INCLUDED
42 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|