/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ #ifndef INCLUDED_L10NTOOLS_INC_XRMMERGE_HXX #define INCLUDED_L10NTOOLS_INC_XRMMERGE_HXX #include "sal/config.h" #include /// Parser for *.xrm and description.xml files class XRMResParser { private: OString sGID; OString sLID; sal_Bool bError; sal_Bool bText; OString sCurrentOpenTag; OString sCurrentCloseTag; OString sCurrentText; protected: OString GetAttribute( const OString &rToken, const OString &rAttribute ); void Error( const OString &rError ); virtual void Output( const OString& rOutput )=0; virtual void WorkOnDesc( const OString &rOpenTag, OString &rText )=0; virtual void WorkOnText( const OString &rOpenTag, OString &rText )=0; virtual void EndOfText( const OString &rOpenTag, const OString &rCloseTag )=0; OString GetGID() { return sGID; } OString GetLID() { return sLID; } public: XRMResParser(); virtual ~XRMResParser(); int Execute( int nToken, char * pToken ); void SetError( sal_Bool bErr = sal_True ) { bError = bErr; } sal_Bool GetError() { return bError; } }; /// Export strings from *.xrm and description.xml files class XRMResExport : public XRMResParser { private: ResData *pResData; OString sPath; PoOfstream pOutputStream; protected: void WorkOnDesc( const OString &rOpenTag, OString &rText ); void WorkOnText( const OString &rOpenTag, OString &rText ); void EndOfText( const OString &rOpenTag, const OString &rCloseTag ); void Output( const OString& rOutput ); public: XRMResExport( const OString &rOutputFile, const OString &rFilePath ); virtual ~XRMResExport(); }; /// Merge strings to *.xrm and description.xml files class XRMResMerge : public XRMResParser { private: MergeDataFile *pMergeDataFile; OString sFilename; ResData *pResData; std::ofstream pOutputStream; std::vector aLanguages; protected: void WorkOnDesc( const OString &rOpenTag, OString &rText ); void WorkOnText( const OString &rOpenTag, OString &rText ); void EndOfText( const OString &rOpenTag, const OString &rCloseTag ); void Output( const OString& rOutput ); public: XRMResMerge( const OString &rMergeSource, const OString &rOutputFile, const OString &rFilename ); virtual ~XRMResMerge(); }; #endif // INCLUDED_L10NTOOLS_INC_XRMMERGE_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ llabora/cp-4.1'>distro/collabora/cp-4.1 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Expand)Author
2017-10-30loplugin:constmethod in vcl and stocNoel Grandin
2017-09-29convert GfxLink::IsEqual to operator==Noel Grandin
2016-08-30default dtors are fine hereCaolán McNamara
2016-06-24vcl: add graphic export-as-pdf filterMiklos Vajna
2016-06-08Simplify GfxLink using smart pointersMark Page
2016-05-31Convert GfxLinkType to scoped enumNoel Grandin
2016-05-24Revert "Simplify GfxLink using std::shared_ptr to clarify ownership"Stephan Bergmann
2016-05-23Simplify GfxLink using std::shared_ptr to clarify ownershipMark Page
2016-05-20loplugin:unusedmethods in vclNoel Grandin
2016-03-16loplugin:constantparams in vcl/Noel Grandin
2016-02-09Remove excess newlinesChris Sherlock
2016-02-09Formatting changes across all modulesChris Sherlock
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
2015-10-27Reduce scope of #include <tools/stream.hxx>Matteo Casalin
2015-07-08loplugin:unusedmethods vclNoel Grandin
2014-11-14vcl: remove more unnecessary headers from mapmod.hxxMichael Stahl
2014-06-17improve the inlinesimplememberfunctions clang pluginNoel Grandin
2014-06-09loplugin: inlinesimplememberfunctionsNoel Grandin
2014-03-01Remove visual noise from includeAlexander Wilms
2014-02-27Resolves: #i15508# Added support for BMP file typeArmin Le Grand
2014-02-27coverity#1187863 unused mnExtra2Caolán McNamara
2014-02-21vcl: sal_Bool -> boolStephan Bergmann
2014-02-04convert specialised SvStream::operator>> methods to ReadXXX methodsNoel Grandin
2014-01-16convert SvStream::operator<< overloads to more explicit methodsNoel Grandin
2013-12-13fdo#70338 : Fixed file corruption issue after save for docx.Sushil Shinde
2013-10-23fixincludeguards.sh: include/vclThomas Arnhold
2013-09-25Related: fdo#38838 remove UniString::EqualsIgnoreCaseAsciiCaolán McNamara
2013-07-19Cleanup String in connectivityNorbert Thiebaud
2013-06-30Clean String and sal_Bool in toolsNorbert Thiebaud
2013-04-23execute move of global headersBjoern Michaelsen