diff options
31 files changed, 95 insertions, 264 deletions
diff --git a/l10ntools/inc/gConv.hxx b/l10ntools/inc/gConv.hxx index 604e5ed5671c..b9507ace74e2 100644 --- a/l10ntools/inc/gConv.hxx +++ b/l10ntools/inc/gConv.hxx @@ -25,65 +25,40 @@ class convert_gen { public: - convert_gen(l10nMem& cMemory, + static convert_gen *mcImpl; + + convert_gen(l10nMem& cMemory); + virtual ~convert_gen(); + + // Create instance + static convert_gen& createInstance(l10nMem& cMemory, const std::string& sSourceDir, const std::string& sTargetDir, const std::string& sSourceFile); - ~convert_gen(); // do extract/merge bool execute(const bool bMerge, const bool bKid); + // all converters MUST implement this function + virtual void execute() = 0; + // ONLY po should implement these functions - void startSave(const std::string& sLanguage, + virtual void startSave(const std::string& sLanguage, const std::string& sFile); - void save(const std::string& sFileName, + virtual void save(const std::string& sFileName, const std::string& sKey, const std::string& sENUStext, const std::string& sText, bool bFuzzy); - void endSave(); + virtual void endSave(); static bool checkAccess(std::string& sFile); static bool createDir(std::string& sDir, std::string& sFile); -}; - - -/***************************************************************************** - **************************** G C O N . H X X **************************** - ***************************************************************************** - * This is the class definition header for all converter classes, - * all classes and their interrelations is defined here - *****************************************************************************/ - - - -/******************* G L O B A L D E F I N I T I O N *******************/ - - - -/******************** C L A S S D E F I N I T I O N ********************/ -class convert_gen_impl -{ - public: - static convert_gen_impl *mcImpl; + // utility functions for converters + void lexRead(char *sBuf, int *nResult, int nMax_size); + std::string& copySource(char const *yyText, bool bDoClear = true); - convert_gen_impl(l10nMem& crMemory); - virtual ~convert_gen_impl(); - - // all converters MUST implement this function - virtual void execute() = 0; - - // ONLY po should implement these functions - virtual void startSave(const std::string& sLanguage, - const std::string& sFile); - virtual void save(const std::string& sFileName, - const std::string& sKey, - const std::string& sENUStext, - const std::string& sText, - bool bFuzzy); - virtual void endSave(); - +protected: // generic variables bool mbMergeMode; bool mbLoadMode; @@ -93,22 +68,14 @@ class convert_gen_impl l10nMem& mcMemory; std::string msCollector; int miLineNo; - - - // utility functions for converters - void lexRead (char *sBuf, int *nResult, int nMax_size); - void writeSourceFile(const std::string& line); - std::string& copySource (char const *yyText, bool bDoClear = true); - - protected: std::string msSourceBuffer, msCopyText; int miSourceReadIndex; bool prepareFile(); - private: + // utility functions for converters + void writeSourceFile(const std::string& line); +private: std::ofstream mcOutputFile; - - friend class convert_gen; }; #endif diff --git a/l10ntools/inc/gConvDB.hxx b/l10ntools/inc/gConvDB.hxx index 0cbb746b066c..51c837741739 100644 --- a/l10ntools/inc/gConvDB.hxx +++ b/l10ntools/inc/gConvDB.hxx @@ -32,7 +32,7 @@ /******************** C L A S S D E F I N I T I O N ********************/ -class convert_db : public convert_gen_impl +class convert_db : public convert_gen { public: convert_db(l10nMem& crMemory); diff --git a/l10ntools/inc/gConvPo.hxx b/l10ntools/inc/gConvPo.hxx index b46706440a9f..33fc4ef73d0d 100644 --- a/l10ntools/inc/gConvPo.hxx +++ b/l10ntools/inc/gConvPo.hxx @@ -32,7 +32,7 @@ /******************** C L A S S D E F I N I T I O N ********************/ -class convert_po : public convert_gen_impl +class convert_po : public convert_gen { public: bool mbExpectId; diff --git a/l10ntools/inc/gConvProp.hxx b/l10ntools/inc/gConvProp.hxx index 8b1c2816e940..b2b9bd1de696 100644 --- a/l10ntools/inc/gConvProp.hxx +++ b/l10ntools/inc/gConvProp.hxx @@ -32,7 +32,7 @@ /******************** C L A S S D E F I N I T I O N ********************/ -class convert_prop : public convert_gen_impl +class convert_prop : public convert_gen { public: convert_prop(l10nMem& crMemory); diff --git a/l10ntools/inc/gConvSrc.hxx b/l10ntools/inc/gConvSrc.hxx index e9a21399ca1e..669430f90f2a 100644 --- a/l10ntools/inc/gConvSrc.hxx +++ b/l10ntools/inc/gConvSrc.hxx @@ -31,7 +31,7 @@ /******************** C L A S S D E F I N I T I O N ********************/ -class convert_src : public convert_gen_impl +class convert_src : public convert_gen { public: bool mbExpectValue; diff --git a/l10ntools/inc/gConvTree.hxx b/l10ntools/inc/gConvTree.hxx index dda10ca89712..a0ecb20b0730 100644 --- a/l10ntools/inc/gConvTree.hxx +++ b/l10ntools/inc/gConvTree.hxx @@ -32,7 +32,7 @@ /******************** C L A S S D E F I N I T I O N ********************/ -class convert_tree : public convert_gen_impl +class convert_tree : public convert_gen { public: typedef enum diff --git a/l10ntools/inc/gConvUlf.hxx b/l10ntools/inc/gConvUlf.hxx index 2fdbea6ced03..dc7c75fd2788 100644 --- a/l10ntools/inc/gConvUlf.hxx +++ b/l10ntools/inc/gConvUlf.hxx @@ -32,7 +32,7 @@ /******************** C L A S S D E F I N I T I O N ********************/ -class convert_ulf : public convert_gen_impl +class convert_ulf : public convert_gen { public: convert_ulf(l10nMem& crMemory); diff --git a/l10ntools/inc/gConvXcs.hxx b/l10ntools/inc/gConvXcs.hxx index a72f7c022c12..40cb2ca06433 100644 --- a/l10ntools/inc/gConvXcs.hxx +++ b/l10ntools/inc/gConvXcs.hxx @@ -32,7 +32,7 @@ /******************** C L A S S D E F I N I T I O N ********************/ -class convert_xcs : public convert_gen_impl +class convert_xcs : public convert_gen { public: convert_xcs(l10nMem& crMemory); diff --git a/l10ntools/inc/gConvXcu.hxx b/l10ntools/inc/gConvXcu.hxx index e751e368f9ad..c19f9901fbea 100644 --- a/l10ntools/inc/gConvXcu.hxx +++ b/l10ntools/inc/gConvXcu.hxx @@ -33,7 +33,7 @@ /******************** C L A S S D E F I N I T I O N ********************/ class xcu_stack_entry; -class convert_xcu : public convert_gen_impl +class convert_xcu : public convert_gen { public: bool mbNoCollectingData; diff --git a/l10ntools/inc/gConvXhp.hxx b/l10ntools/inc/gConvXhp.hxx index 04de5aa87a83..d59a00b911a5 100644 --- a/l10ntools/inc/gConvXhp.hxx +++ b/l10ntools/inc/gConvXhp.hxx @@ -32,7 +32,7 @@ /******************** C L A S S D E F I N I T I O N ********************/ -class convert_xhp : public convert_gen_impl +class convert_xhp : public convert_gen { public: convert_xhp(l10nMem& crMemory); diff --git a/l10ntools/inc/gConvXrm.hxx b/l10ntools/inc/gConvXrm.hxx index b29b5362a604..4928bace8f6f 100644 --- a/l10ntools/inc/gConvXrm.hxx +++ b/l10ntools/inc/gConvXrm.hxx @@ -32,7 +32,7 @@ /******************** C L A S S D E F I N I T I O N ********************/ -class convert_xrm : public convert_gen_impl +class convert_xrm : public convert_gen { public: bool mbNoCollectingData; diff --git a/l10ntools/source/gConv.cxx b/l10ntools/source/gConv.cxx index eb8102485d61..d9bb973f73c6 100644 --- a/l10ntools/source/gConv.cxx +++ b/l10ntools/source/gConv.cxx @@ -45,31 +45,25 @@ #endif +convert_gen * convert_gen::mcImpl = NULL; -/***************************************************************************** - **************************** G C O N . C X X **************************** - ***************************************************************************** - * This is the generic conversion module, it handles all generic work of the - * conversion, and offer utility functions to the specific conversion classes - *****************************************************************************/ - - - -/******************* G L O B A L D E F I N I T I O N *******************/ -convert_gen_impl * convert_gen_impl::mcImpl = nullptr; +/********************** I M P L E M E N T A T I O N **********************/ +convert_gen::convert_gen(l10nMem& cMemory) + : mcMemory(cMemory) +{ + mcImpl = this; +} +convert_gen::~convert_gen() +{ +} -/********************** I M P L E M E N T A T I O N **********************/ -convert_gen::convert_gen(l10nMem& cMemory, +convert_gen& convert_gen::createInstance(l10nMem& cMemory, const std::string& sSourceDir, const std::string& sTargetDir, const std::string& sSourceFile) { - // do we have an old object - if (convert_gen_impl::mcImpl) - delete convert_gen_impl::mcImpl; - // did the user give a .xxx with the source file ? int nInx = sSourceFile.rfind("."); if (nInx == (int)std::string::npos) @@ -77,30 +71,24 @@ convert_gen::convert_gen(l10nMem& cMemory, // find correct conversion class and create correct object std::string sExtension = sSourceFile.substr(nInx+1); - if (sExtension == "hrc") convert_gen_impl::mcImpl = new convert_src(cMemory); - else if (sExtension == "src") convert_gen_impl::mcImpl = new convert_src(cMemory); - else if (sExtension == "po") convert_gen_impl::mcImpl = new convert_po(cMemory); - else if (sExtension == "pot") convert_gen_impl::mcImpl = new convert_po(cMemory); - else if (sExtension == "tree") convert_gen_impl::mcImpl = new convert_tree(cMemory); - else if (sExtension == "ulf") convert_gen_impl::mcImpl = new convert_ulf(cMemory); - else if (sExtension == "xcu") convert_gen_impl::mcImpl = new convert_xcu(cMemory); - else if (sExtension == "xhp") convert_gen_impl::mcImpl = new convert_xhp(cMemory); - else if (sExtension == "xrm") convert_gen_impl::mcImpl = new convert_xrm(cMemory); - else if (sExtension == "properties") convert_gen_impl::mcImpl = new convert_prop(cMemory); + convert_gen *x; + if (sExtension == "hrc") x = new convert_src(cMemory); + else if (sExtension == "src") x = new convert_src(cMemory); + else if (sExtension == "po") x = new convert_po(cMemory); + else if (sExtension == "pot") x = new convert_po(cMemory); + else if (sExtension == "tree") x = new convert_tree(cMemory); + else if (sExtension == "ulf") x = new convert_ulf(cMemory); + else if (sExtension == "xcu") x = new convert_xcu(cMemory); + else if (sExtension == "xhp") x = new convert_xhp(cMemory); + else if (sExtension == "xrm") x = new convert_xrm(cMemory); + else if (sExtension == "properties") x = new convert_prop(cMemory); else throw l10nMem::showError("unknown extension on source file: "+sSourceFile); // and set environment - convert_gen_impl::mcImpl->msSourceFile = sSourceFile; - convert_gen_impl::mcImpl->msTargetPath = sTargetDir; - convert_gen_impl::mcImpl->msSourcePath = sSourceDir + sSourceFile; -} - - - -/********************** I M P L E M E N T A T I O N **********************/ -convert_gen::~convert_gen() -{ - delete convert_gen_impl::mcImpl; + x->msSourceFile = sSourceFile; + x->msTargetPath = sTargetDir; + x->msSourcePath = sSourceDir + sSourceFile; + return *x; } @@ -108,17 +96,17 @@ convert_gen::~convert_gen() /********************** I M P L E M E N T A T I O N **********************/ bool convert_gen::execute(const bool bMerge, const bool bKid) { - convert_gen_impl::mcImpl->mbMergeMode = bMerge; + mbMergeMode = bMerge; if (bKid) throw l10nMem::showError("not implemented"); // and load file - if (!convert_gen_impl::mcImpl->prepareFile()) + if (!prepareFile()) return false; // and execute conversion - convert_gen_impl::mcImpl->execute(); + execute(); return true; } @@ -129,11 +117,6 @@ bool convert_gen::execute(const bool bMerge, const bool bKid) void convert_gen::startSave(const std::string& sLanguage, const std::string& sFile) { - convert_gen_impl::mcImpl->startSave(sLanguage, sFile); -} -void convert_gen_impl::startSave(const std::string& sLanguage, - const std::string& sFile) -{ std::string x; x = sLanguage; @@ -143,21 +126,12 @@ void convert_gen_impl::startSave(const std::string& sLanguage, -/********************** I M P L E M E N T A T I O N **********************/ void convert_gen::save(const std::string& sFileName, const std::string& sKey, const std::string& sENUStext, const std::string& sText, bool bFuzzy) { - convert_gen_impl::mcImpl->save(sFileName, sKey, sENUStext, sText, bFuzzy); -} -void convert_gen_impl::save(const std::string& sFileName, - const std::string& sKey, - const std::string& sENUStext, - const std::string& sText, - bool bFuzzy) -{ std::string x; if (bFuzzy) @@ -167,13 +141,8 @@ void convert_gen_impl::save(const std::string& sFileName, -/********************** I M P L E M E N T A T I O N **********************/ void convert_gen::endSave() { - convert_gen_impl::mcImpl->endSave(); -} -void convert_gen_impl::endSave() -{ throw l10nMem::showError("endSave called with non .po file"); } @@ -216,26 +185,7 @@ bool convert_gen::createDir(std::string& sDir, std::string& sFile) /********************** I M P L E M E N T A T I O N **********************/ -convert_gen_impl::convert_gen_impl(l10nMem& crMemory) - : mbMergeMode(false), - mbLoadMode(false), - mcMemory(crMemory), - miLineNo(1) -{ -} - - - -/********************** I M P L E M E N T A T I O N **********************/ -convert_gen_impl::~convert_gen_impl() -{ - mcImpl = nullptr; -} - - - -/********************** I M P L E M E N T A T I O N **********************/ -bool convert_gen_impl::prepareFile() +bool convert_gen::prepareFile() { std::ifstream inputFile(msSourcePath.c_str(), std::ios::binary); @@ -290,7 +240,7 @@ bool convert_gen_impl::prepareFile() /********************** I M P L E M E N T A T I O N **********************/ -void convert_gen_impl::lexRead(char *sBuf, int *nResult, int nMax_size) +void convert_gen::lexRead(char *sBuf, int *nResult, int nMax_size) { // did we hit eof if (miSourceReadIndex == -1) @@ -320,7 +270,7 @@ void convert_gen_impl::lexRead(char *sBuf, int *nResult, int nMax_size) /********************** I M P L E M E N T A T I O N **********************/ -void convert_gen_impl::writeSourceFile(const std::string& line) +void convert_gen::writeSourceFile(const std::string& line) { if (!line.size()) return; @@ -332,7 +282,7 @@ void convert_gen_impl::writeSourceFile(const std::string& line) /********************** I M P L E M E N T A T I O N **********************/ -std::string& convert_gen_impl::copySource(char const *yyText, bool bDoClear) +std::string& convert_gen::copySource(char const *yyText, bool bDoClear) { int nL; diff --git a/l10ntools/source/gConvDB.cxx b/l10ntools/source/gConvDB.cxx index 36689c8581b8..c0931eb87a89 100644 --- a/l10ntools/source/gConvDB.cxx +++ b/l10ntools/source/gConvDB.cxx @@ -24,16 +24,7 @@ -/***************************************************************************** - ************************** G C O N D B . C X X ************************** - ***************************************************************************** - * This includes the c code generated by flex - *****************************************************************************/ - - - -/************ I N T E R F A C E I M P L E M E N T A T I O N ************/ -convert_db::convert_db(l10nMem& crMemory) : convert_gen_impl(crMemory) {} +convert_db::convert_db(l10nMem& crMemory) : convert_gen(crMemory) {} convert_db::~convert_db() {} diff --git a/l10ntools/source/gConvPo.cxx b/l10ntools/source/gConvPo.cxx index 82dcf44a9493..e540d70f28f5 100644 --- a/l10ntools/source/gConvPo.cxx +++ b/l10ntools/source/gConvPo.cxx @@ -37,7 +37,7 @@ /************ I N T E R F A C E I M P L E M E N T A T I O N ************/ convert_po::convert_po(l10nMem& crMemory) - : convert_gen_impl(crMemory), + : convert_gen(crMemory), mbExpectId(false), mbExpectStr(false), mbFuzzy(false) diff --git a/l10ntools/source/gConvProp.cxx b/l10ntools/source/gConvProp.cxx index b9e5755feb0f..e75173778942 100644 --- a/l10ntools/source/gConvProp.cxx +++ b/l10ntools/source/gConvProp.cxx @@ -24,16 +24,7 @@ -/***************************************************************************** - ************************ G C O N P R O P . C X X ************************ - ***************************************************************************** - * This is the conversion for .properties files - *****************************************************************************/ - - - -/********************** I M P L E M E N T A T I O N **********************/ -convert_prop::convert_prop(l10nMem& crMemory) : convert_gen_impl(crMemory) +convert_prop::convert_prop(l10nMem& crMemory) : convert_gen(crMemory) { // throw l10nMem::showError(std::string("convert_prop not implemented")); } diff --git a/l10ntools/source/gConvSrc.cxx b/l10ntools/source/gConvSrc.cxx index 08b4aa1aeb7e..08fe48556e26 100644 --- a/l10ntools/source/gConvSrc.cxx +++ b/l10ntools/source/gConvSrc.cxx @@ -28,17 +28,8 @@ #include <sstream> -/***************************************************************************** - ********************* G C O N S R C W R A P . C X X ********************* - ***************************************************************************** - * This includes the c code generated by flex - *****************************************************************************/ - - - -/************ I N T E R F A C E I M P L E M E N T A T I O N ************/ convert_src::convert_src(l10nMem& crMemory) - : convert_gen_impl(crMemory), + : convert_gen(crMemory), mbExpectValue(false), mbEnUs(false), mbExpectName(false), diff --git a/l10ntools/source/gConvTree.cxx b/l10ntools/source/gConvTree.cxx index 45ff1bdb212b..cac25a44ecfc 100644 --- a/l10ntools/source/gConvTree.cxx +++ b/l10ntools/source/gConvTree.cxx @@ -23,18 +23,8 @@ #include "gConvTree.hxx" - -/***************************************************************************** - ******************** G C O N T R E E W R A P . C X X ******************** - ***************************************************************************** - * This includes the c code generated by flex - *****************************************************************************/ - - - -/********************** I M P L E M E N T A T I O N **********************/ convert_tree::convert_tree(l10nMem& crMemory) - : convert_gen_impl(crMemory), + : convert_gen(crMemory), mcOutputFiles(nullptr), meStateTag(STATE_TAG_NONE), meStateVal(STATE_VAL_NONE), diff --git a/l10ntools/source/gConvUlf.cxx b/l10ntools/source/gConvUlf.cxx index 361065ab228f..d8d5651011bc 100644 --- a/l10ntools/source/gConvUlf.cxx +++ b/l10ntools/source/gConvUlf.cxx @@ -24,16 +24,7 @@ -/***************************************************************************** - ********************* G C O N X C S W R A P . C X X ********************* - ***************************************************************************** - * This includes the c code generated by flex - *****************************************************************************/ - - - -/********************** I M P L E M E N T A T I O N **********************/ -convert_ulf::convert_ulf(l10nMem& crMemory) : convert_gen_impl(crMemory) {} +convert_ulf::convert_ulf(l10nMem& crMemory) : convert_gen(crMemory) {} convert_ulf::~convert_ulf() {} diff --git a/l10ntools/source/gConvXcs.cxx b/l10ntools/source/gConvXcs.cxx index 31cbaee774a2..45b41e287adc 100644 --- a/l10ntools/source/gConvXcs.cxx +++ b/l10ntools/source/gConvXcs.cxx @@ -24,17 +24,8 @@ -/***************************************************************************** - ********************* G C O N X C S W R A P . C X X ********************* - ***************************************************************************** - * This includes the c code generated by flex - *****************************************************************************/ - - - -/************ I N T E R F A C E I M P L E M E N T A T I O N ************/ convert_xcs::convert_xcs(l10nMem& crMemory) - : convert_gen_impl(crMemory), + : convert_gen(crMemory), mbCollectingData(false) { } diff --git a/l10ntools/source/gConvXcu.cxx b/l10ntools/source/gConvXcu.cxx index e8070bc73b27..ff7e7f62eaeb 100644 --- a/l10ntools/source/gConvXcu.cxx +++ b/l10ntools/source/gConvXcu.cxx @@ -21,19 +21,8 @@ #include "gL10nMem.hxx" #include "gConvXcu.hxx" - - -/***************************************************************************** - ********************* G C O N X C U W R A P . C X X ********************* - ***************************************************************************** - * This includes the c code generated by flex - *****************************************************************************/ - - - -/************ I N T E R F A C E I M P L E M E N T A T I O N ************/ convert_xcu::convert_xcu(l10nMem& crMemory) - : convert_gen_impl(crMemory), + : convert_gen(crMemory), mbNoCollectingData(true), miLevel(0), mbNoTranslate(false) diff --git a/l10ntools/source/gConvXhp.cxx b/l10ntools/source/gConvXhp.cxx index b2c58ac9de7e..b10b0381a176 100644 --- a/l10ntools/source/gConvXhp.cxx +++ b/l10ntools/source/gConvXhp.cxx @@ -21,20 +21,8 @@ #include "gL10nMem.hxx" #include "gConvXhp.hxx" - - - -/***************************************************************************** - ********************* G C O N X H P W R A P . C X X ********************* - ***************************************************************************** - * This includes the c code generated by flex - *****************************************************************************/ - - - -/************ I N T E R F A C E I M P L E M E N T A T I O N ************/ convert_xhp::convert_xhp(l10nMem& crMemory) - : convert_gen_impl(crMemory), + : convert_gen(crMemory), meExpectValue(VALUE_NOT_USED), msLangText(nullptr), mcOutputFiles(nullptr), diff --git a/l10ntools/source/gConvXrm.cxx b/l10ntools/source/gConvXrm.cxx index 0c2274487348..0e71bf272936 100644 --- a/l10ntools/source/gConvXrm.cxx +++ b/l10ntools/source/gConvXrm.cxx @@ -23,17 +23,9 @@ #include "gConvXrm.hxx" -/***************************************************************************** - ********************* G C O N X R M W R A P . C X X ********************* - ***************************************************************************** - * This includes the c code generated by flex - *****************************************************************************/ - - -/************ I N T E R F A C E I M P L E M E N T A T I O N ************/ convert_xrm::convert_xrm(l10nMem& crMemory) - : convert_gen_impl(crMemory), + : convert_gen(crMemory), mbNoCollectingData(true), mbIsTag(false), mbIsLang(false) diff --git a/l10ntools/source/gLang.cxx b/l10ntools/source/gLang.cxx index 757e9ebcddcb..d4bb18fa21af 100644 --- a/l10ntools/source/gLang.cxx +++ b/l10ntools/source/gLang.cxx @@ -330,7 +330,7 @@ void handler::loadL10MEM(bool onlyTemplates) // and load file mcMemory.setLanguage("", true); - convert_gen (mcMemory, sLoad, msTargetDir, "").execute(false, false); + convert_gen::createInstance(mcMemory, sLoad, msTargetDir, "").execute(false, false); if (onlyTemplates) return; @@ -346,7 +346,7 @@ void handler::loadL10MEM(bool onlyTemplates) // tell system l10nMem::showDebug("genLang loading text from language file " + sLoad); - convert_gen(mcMemory, sLoad, msTargetDir, "").execute(false, false); + convert_gen::createInstance(mcMemory, sLoad, msTargetDir, "").execute(false, false); } } @@ -368,7 +368,7 @@ void handler::runConvert() l10nMem::showDebug("genLang compare template " + *siSource); // get converter and extract files - convert_gen convertObj(mcMemory, "./", msTargetDir, *siSource); + convert_gen& convertObj = convert_gen::createInstance(mcMemory, "./", msTargetDir, *siSource); convertObj.execute(false, false); mcMemory.showNOconvert(); @@ -385,7 +385,7 @@ void handler::runConvert() sFilePath + *siSource + " language " + *siLang); // get converter and extract files - //convert_gen convertObj(mcMemory, sFilePath, msTargetDir, *siSource); + convert_gen& convertObj = convert_gen::createInstance(mcMemory, sFilePath, msTargetDir, *siSource); convertObj.execute(true, false); } } @@ -411,7 +411,7 @@ void handler::runExtract() l10nMem::showDebug("genLang extracting text from file " + *siSource); // get converter and extract file - convert_gen convertObj(mcMemory, "", msTargetDir, *siSource); + convert_gen& convertObj = convert_gen::createInstance(mcMemory, "", msTargetDir, *siSource); convertObj.execute(false, false); } @@ -435,7 +435,7 @@ void handler::runMerge(bool bKid) l10nMem::showDebug("genLang merging translated text to file " + *siSource); // get converter and extract file - convert_gen convertObj(mcMemory, "", msTargetDir, *siSource); + convert_gen& convertObj = convert_gen::createInstance(mcMemory, "", msTargetDir, *siSource); convertObj.execute(true, bKid); } } diff --git a/l10ntools/source/gLexPo.l b/l10ntools/source/gLexPo.l index 3d6bfc33e150..ae4db4f08acc 100644 --- a/l10ntools/source/gLexPo.l +++ b/l10ntools/source/gLexPo.l @@ -41,8 +41,8 @@ #include "gL10nMem.hxx" #include "gConvPo.hxx" -#define IMPLptr convert_gen_impl::mcImpl -#define LOCptr ((convert_po *)convert_gen_impl::mcImpl) +#define IMPLptr convert_gen::mcImpl +#define LOCptr ((convert_po *)convert_gen::mcImpl) /* enlarge token buffer to tokenize whole std::strings */ #undef YYLMAX diff --git a/l10ntools/source/gLexSrc.l b/l10ntools/source/gLexSrc.l index d298d0feb007..b9c0c3b9a84f 100644 --- a/l10ntools/source/gLexSrc.l +++ b/l10ntools/source/gLexSrc.l @@ -26,8 +26,8 @@ #include "gL10nMem.hxx" #include "gConvSrc.hxx" -#define IMPLptr convert_gen_impl::mcImpl -#define LOCptr ((convert_src *)convert_gen_impl::mcImpl) +#define IMPLptr convert_gen::mcImpl +#define LOCptr ((convert_src *)convert_gen::mcImpl) /* enlarge token buffer to tokenize whole std::strings */ #undef YYLMAX diff --git a/l10ntools/source/gLexTree.l b/l10ntools/source/gLexTree.l index 4b8aa2c93c69..095f681f9dcc 100644 --- a/l10ntools/source/gLexTree.l +++ b/l10ntools/source/gLexTree.l @@ -26,8 +26,8 @@ #include "gL10nMem.hxx" #include "gConvTree.hxx" -#define IMPLptr convert_gen_impl::mcImpl -#define LOCptr ((convert_tree *)convert_gen_impl::mcImpl) +#define IMPLptr convert_gen::mcImpl +#define LOCptr ((convert_tree *)convert_gen::mcImpl) /* enlarge token buffer to tokenize whole std::strings */ #undef YYLMAX diff --git a/l10ntools/source/gLexUlf.l b/l10ntools/source/gLexUlf.l index bb204f2154d8..45bc99cf49ca 100644 --- a/l10ntools/source/gLexUlf.l +++ b/l10ntools/source/gLexUlf.l @@ -26,8 +26,8 @@ #include "gL10nMem.hxx" #include "gConvUlf.hxx" -#define IMPLptr convert_gen_impl::mcImpl -#define LOCptr ((convert_ulf *)convert_gen_impl::mcImpl) +#define IMPLptr convert_gen::mcImpl +#define LOCptr ((convert_ulf *)convert_gen::mcImpl) /* enlarge token buffer to tokenize whole std::strings */ #undef YYLMAX diff --git a/l10ntools/source/gLexXcs.l b/l10ntools/source/gLexXcs.l index cfd11dafe62e..1b4a3b408a5e 100644 --- a/l10ntools/source/gLexXcs.l +++ b/l10ntools/source/gLexXcs.l @@ -26,8 +26,8 @@ #include "gL10nMem.hxx" #include "gConvXcs.hxx" -#define IMPLptr convert_gen_impl::mcImpl -#define LOCptr ((convert_xcs *)convert_gen_impl::mcImpl) +#define IMPLptr convert_gen::mcImpl +#define LOCptr ((convert_xcs *)convert_gen::mcImpl) /* enlarge token buffer to tokenize whole std::strings */ #undef YYLMAX diff --git a/l10ntools/source/gLexXcu.l b/l10ntools/source/gLexXcu.l index b3095efe9e32..9359e383871b 100644 --- a/l10ntools/source/gLexXcu.l +++ b/l10ntools/source/gLexXcu.l @@ -26,8 +26,8 @@ #include "gL10nMem.hxx" #include "gConvXcu.hxx" -#define IMPLptr convert_gen_impl::mcImpl -#define LOCptr ((convert_xcu *)convert_gen_impl::mcImpl) +#define IMPLptr convert_gen::mcImpl +#define LOCptr ((convert_xcu *)convert_gen::mcImpl) /* enlarge token buffer to tokenize whole std::strings */ #undef YYLMAX diff --git a/l10ntools/source/gLexXhp.l b/l10ntools/source/gLexXhp.l index a2c23fd18362..46b07643fb95 100644 --- a/l10ntools/source/gLexXhp.l +++ b/l10ntools/source/gLexXhp.l @@ -26,8 +26,8 @@ #include "gL10nMem.hxx" #include "gConvXhp.hxx" -#define IMPLptr convert_gen_impl::mcImpl -#define LOCptr ((convert_xhp *)convert_gen_impl::mcImpl) +#define IMPLptr convert_gen::mcImpl +#define LOCptr ((convert_xhp *)convert_gen::mcImpl) /* enlarge token buffer to tokenize whole std::strings */ #undef YYLMAX diff --git a/l10ntools/source/gLexXrm.l b/l10ntools/source/gLexXrm.l index aadab8ea9f28..e8bbf23c3e16 100644 --- a/l10ntools/source/gLexXrm.l +++ b/l10ntools/source/gLexXrm.l @@ -26,8 +26,8 @@ #include "gL10nMem.hxx" #include "gConvXrm.hxx" -#define IMPLptr convert_gen_impl::mcImpl -#define LOCptr ((convert_xrm *)convert_gen_impl::mcImpl) +#define IMPLptr convert_gen::mcImpl +#define LOCptr ((convert_xrm *)convert_gen::mcImpl) /* enlarge token buffer to tokenize whole std::strings */ #undef YYLMAX |