tdf#140726 Change func func(<?>) to func <?>(<?>) in Math
[LibreOffice.git] / l10ntools / inc / common.hxx
blob78bbbfdb83cc2d41fd88eb0e48fe13bc88d07637
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 // Methods used by all of executables
12 #ifndef INCLUDED_L10NTOOLS_INC_COMMON_HXX
13 #define INCLUDED_L10NTOOLS_INC_COMMON_HXX
15 #include <sal/config.h>
17 #include <iostream>
18 #include <string_view>
20 #include <rtl/string.hxx>
21 #include "po.hxx"
23 namespace common {
25 /// Result type of handleArguments()
26 struct HandledArgs
28 OString m_sInputFile;
29 OString m_sOutputFile;
30 OString m_sMergeSrc;
31 OString m_sLanguage;
32 bool m_bMergeMode;
33 bool m_bUTF8BOM;
34 HandledArgs()
35 : m_sInputFile( OString() )
36 , m_sOutputFile( OString() )
37 , m_sMergeSrc( OString() )
38 , m_sLanguage( OString() )
39 , m_bMergeMode( false )
40 , m_bUTF8BOM( false )
44 /// Handle command line parameters
45 bool handleArguments(int argc, char * argv[], HandledArgs& o_aHandledArgs);
47 /// Write out a help about usage
48 void writeUsage(const OString& rName, const OString& rFileType);
50 /// Write out a PoEntry with attention to exceptions
51 void writePoEntry(
52 const OString& rExecutable, PoOfstream& rPoStream, const OString& rSourceFile,
53 std::string_view rResType, const OString& rGroupId, const OString& rLocalId,
54 const OString& rHelpText, const OString& rText, const PoEntry::TYPE eType = PoEntry::TTEXT );
58 #endif
60 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */