LibreOffice Module l10ntools (master) 1
common.hxx
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// Methods used by all of executables
11
12#ifndef INCLUDED_L10NTOOLS_INC_COMMON_HXX
13#define INCLUDED_L10NTOOLS_INC_COMMON_HXX
14
15#include <sal/config.h>
16
17#include <string_view>
18
19#include <rtl/string.hxx>
20#include "po.hxx"
21
22namespace common {
23
26{
27 OString m_sInputFile;
29 OString m_sMergeSrc;
30 OString m_sLanguage;
34 : m_sInputFile( OString() )
35 , m_sOutputFile( OString() )
36 , m_sMergeSrc( OString() )
37 , m_sLanguage( OString() )
38 , m_bMergeMode( false )
39 , m_bUTF8BOM( false )
40 {}
41};
42
44bool handleArguments(int argc, char * argv[], HandledArgs& o_aHandledArgs);
45
47void writeUsage(const OString& rName, const OString& rFileType);
48
50void writePoEntry(
51 const OString& rExecutable, PoOfstream& rPoStream, const OString& rSourceFile,
52 std::string_view rResType, const OString& rGroupId, const OString& rLocalId,
53 const OString& rHelpText, const OString& rText, const PoEntry::TYPE eType = PoEntry::TTEXT );
54
55}
56
57#endif
58
59/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
TYPE
Definition: po.hxx:45
@ TTEXT
Definition: po.hxx:45
Interface to write po entry to files as output streams.
Definition: po.hxx:101
void writeUsage(const OString &rName, const OString &rFileType)
Write out a help about usage.
Definition: common.cxx:97
void writePoEntry(const OString &rExecutable, PoOfstream &rPoStream, const OString &rSourceFile, std::string_view rResType, const OString &rGroupId, const OString &rLocalId, const OString &rHelpText, const OString &rText, const PoEntry::TYPE eType)
Write out a PoEntry with attention to exceptions.
Definition: common.cxx:110
bool handleArguments(int argc, char *argv[], HandledArgs &o_aHandledArgs)
Handle command line parameters.
Definition: common.cxx:25
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