LibreOffice Module l10ntools (master) 1
propex.cxx
Go to the documentation of this file.
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#include <sal/main.h>
11
12#include <common.hxx>
13#include <propmerge.hxx>
14
16{
18 if( !common::handleArguments(argc, argv, aArgs) )
19 {
20 common::writeUsage("propex","*.properties");
21 return 1;
22 }
23
24 PropParser aParser(
25 aArgs.m_sInputFile, aArgs.m_sLanguage, aArgs.m_bMergeMode );
26 if( !aParser.isInitialized() )
27 {
28 return 1;
29 }
30 if( aArgs.m_bMergeMode )
31 {
32 aParser.Merge( aArgs.m_sMergeSrc, aArgs.m_sOutputFile );
33 }
34 else
35 {
36 aParser.Extract( aArgs.m_sOutputFile );
37 }
38 return 0;
39}
40
41/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Class for localization of *.properties files.
Definition: propmerge.hxx:24
void Merge(const OString &rMergeSrc, const OString &rDestinationFile)
Definition: propmerge.cxx:160
bool isInitialized() const
Definition: propmerge.hxx:37
void Extract(const OString &rPOFile)
Definition: propmerge.cxx:129
void writeUsage(const OString &rName, const OString &rFileType)
Write out a help about usage.
Definition: common.cxx:97
bool handleArguments(int argc, char *argv[], HandledArgs &o_aHandledArgs)
Handle command line parameters.
Definition: common.cxx:25
SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
Definition: propex.cxx:15
Result type of handleArguments()
Definition: common.hxx:26
OString m_sMergeSrc
Definition: common.hxx:29
OString m_sOutputFile
Definition: common.hxx:28
OString m_sLanguage
Definition: common.hxx:30
OString m_sInputFile
Definition: common.hxx:27