l10ntools/inc/gConv.hxx | 2 +- l10ntools/inc/gConvPo.hxx | 3 +-- l10ntools/inc/gConvProp.hxx | 2 +- l10ntools/inc/gConvSrc.hxx | 2 +- l10ntools/inc/gConvTree.hxx | 4 +++- l10ntools/inc/gConvUi.hxx | 6 +++++- l10ntools/inc/gConvUlf.hxx | 5 ++++- l10ntools/inc/gConvXcs.hxx | 6 +++++- l10ntools/inc/gConvXcu.hxx | 9 ++++++++- l10ntools/inc/gConvXhp.hxx | 6 +++++- l10ntools/inc/gConvXrm.hxx | 6 +++++- l10ntools/source/gConv.cxx | 2 +- l10ntools/source/gConvPo.cxx | 12 +++++++----- l10ntools/source/gConvSrc.cxx | 7 ++++--- l10ntools/source/gConvTree.cxx | 1 - l10ntools/source/gConvUi.cxx | 5 +++-- l10ntools/source/gConvUlf.cxx | 1 - l10ntools/source/gConvXcs.cxx | 1 - l10ntools/source/gConvXcu.cxx | 1 - l10ntools/source/gConvXhp.cxx | 4 +++- l10ntools/source/gConvXrm.cxx | 1 - l10ntools/source/gL10nMem.cxx | 4 +++- l10ntools/source/gLang.cxx | 5 +++-- 23 files changed, 63 insertions(+), 32 deletions(-)
New commits: commit 11231f9179db9821effc884e8adade48fdf89938 Author: jan iversen <j...@documentfoundation.org> Date: Wed Mar 23 17:12:11 2016 +0100 genlang, removed clang problems The clang plugin does not not like for (<foo>;<foo>;<foo>) ; (most compilers do not complain, when using the ' ') Also a virtual destructor need "override" in the implementing class. Change-Id: Ib99702f11dbd24595935594ee97c136c8e604aff diff --git a/l10ntools/inc/gConv.hxx b/l10ntools/inc/gConv.hxx index d51f2bf..86d84a7 100644 --- a/l10ntools/inc/gConv.hxx +++ b/l10ntools/inc/gConv.hxx @@ -65,6 +65,6 @@ class convert_gen bool createDir(const string& sDir, const string& sFile); private: ofstream mcOutputFile; - bool checkAccess(string& sFile); + static bool checkAccess(string& sFile); }; #endif diff --git a/l10ntools/inc/gConvPo.hxx b/l10ntools/inc/gConvPo.hxx index 69c62d0..31c037d 100644 --- a/l10ntools/inc/gConvPo.hxx +++ b/l10ntools/inc/gConvPo.hxx @@ -16,7 +16,6 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #ifndef GCONPO_HXX #define GCONPO_HXX #include "gConv.hxx" @@ -31,7 +30,7 @@ class convert_po : public convert_gen convert_po(l10nMem& crMemory); - ~convert_po() {}; + ~convert_po() override {}; void startLook (); void setValue (char *syyText, int iLineCnt); diff --git a/l10ntools/inc/gConvProp.hxx b/l10ntools/inc/gConvProp.hxx index b9e5b7c..d65531e 100644 --- a/l10ntools/inc/gConvProp.hxx +++ b/l10ntools/inc/gConvProp.hxx @@ -26,7 +26,7 @@ class convert_prop : public convert_gen { public: convert_prop(l10nMem& crMemory) : convert_gen(crMemory) {}; - ~convert_prop() {}; + ~convert_prop() override {}; private: void doExecute() override; diff --git a/l10ntools/inc/gConvSrc.hxx b/l10ntools/inc/gConvSrc.hxx index dd41895..65bd5eb 100644 --- a/l10ntools/inc/gConvSrc.hxx +++ b/l10ntools/inc/gConvSrc.hxx @@ -28,7 +28,7 @@ class convert_src : public convert_gen bool mbExpectValue; convert_src(l10nMem& crMemory); - ~convert_src() {}; + ~convert_src() override {}; void setValue (char *syyText, char *sbuildValue); void setLang (char *syyText, bool bEnUs); diff --git a/l10ntools/inc/gConvTree.hxx b/l10ntools/inc/gConvTree.hxx index fff9248..bd9adb3 100644 --- a/l10ntools/inc/gConvTree.hxx +++ b/l10ntools/inc/gConvTree.hxx @@ -21,6 +21,8 @@ #include "gConv.hxx" +extern int treelex(void); + class convert_tree : public convert_gen { @@ -40,7 +42,7 @@ class convert_tree : public convert_gen } STATE_VAL; convert_tree(l10nMem& crMemory); - ~convert_tree(); + ~convert_tree() override; void setString(char *yytext); void setState(char *yytext, STATE_TAG eNewStateTag, STATE_VAL eNewStateVAL, char *sModule); diff --git a/l10ntools/inc/gConvUi.hxx b/l10ntools/inc/gConvUi.hxx index ffc9531..be4a443 100644 --- a/l10ntools/inc/gConvUi.hxx +++ b/l10ntools/inc/gConvUi.hxx @@ -22,11 +22,15 @@ +extern int uilex(void); + + + class convert_ui : public convert_gen { public: convert_ui(l10nMem& crMemory); - ~convert_ui() {}; + ~convert_ui() override {}; private: diff --git a/l10ntools/inc/gConvUlf.hxx b/l10ntools/inc/gConvUlf.hxx index 7053059..85902e4 100644 --- a/l10ntools/inc/gConvUlf.hxx +++ b/l10ntools/inc/gConvUlf.hxx @@ -22,11 +22,14 @@ +extern int ulflex(void); + + class convert_ulf : public convert_gen { public: convert_ulf(l10nMem& crMemory) : convert_gen(crMemory) {}; - ~convert_ulf() {}; + ~convert_ulf() override {}; void setKey(char *syyText); void setText(char *syyText, bool bIsEnUs); diff --git a/l10ntools/inc/gConvXcs.hxx b/l10ntools/inc/gConvXcs.hxx index c7beded..407ff61 100644 --- a/l10ntools/inc/gConvXcs.hxx +++ b/l10ntools/inc/gConvXcs.hxx @@ -22,11 +22,15 @@ +extern int xcslex(void); + + + class convert_xcs : public convert_gen { public: convert_xcs(l10nMem& crMemory); - ~convert_xcs() {}; + ~convert_xcs() override {}; void setKey(char *syyText); void unsetKey(char *syyText); diff --git a/l10ntools/inc/gConvXcu.hxx b/l10ntools/inc/gConvXcu.hxx index c222eac..1bdde9f 100644 --- a/l10ntools/inc/gConvXcu.hxx +++ b/l10ntools/inc/gConvXcu.hxx @@ -22,14 +22,21 @@ +extern int xculex(void); + + + class xcu_stack_entry; + + + class convert_xcu : public convert_gen { public: bool mbNoCollectingData; convert_xcu(l10nMem& crMemory); - ~convert_xcu() {}; + ~convert_xcu() override {}; void pushKey(char *syyText); void popKey(char *syyText); diff --git a/l10ntools/inc/gConvXhp.hxx b/l10ntools/inc/gConvXhp.hxx index ef39822..480280a 100644 --- a/l10ntools/inc/gConvXhp.hxx +++ b/l10ntools/inc/gConvXhp.hxx @@ -22,11 +22,15 @@ +extern int xhplex(void); + + + class convert_xhp : public convert_gen { public: convert_xhp(l10nMem& crMemory); - ~convert_xhp(); + ~convert_xhp() override; void setString(char *yytext); void openTag(char *yytext); diff --git a/l10ntools/inc/gConvXrm.hxx b/l10ntools/inc/gConvXrm.hxx index 60b063f..8aa8088 100644 --- a/l10ntools/inc/gConvXrm.hxx +++ b/l10ntools/inc/gConvXrm.hxx @@ -22,12 +22,16 @@ +extern int xrmlex(void); + + + class convert_xrm : public convert_gen { public: bool mbNoCollectingData; convert_xrm(l10nMem& crMemory); - ~convert_xrm() {}; + ~convert_xrm() override {}; void setId(char *yytext); void setLang(char *yytext); diff --git a/l10ntools/source/gConv.cxx b/l10ntools/source/gConv.cxx index 0b034b0..844deee 100644 --- a/l10ntools/source/gConv.cxx +++ b/l10ntools/source/gConv.cxx @@ -47,7 +47,7 @@ using namespace std; -convert_gen * convert_gen::mcImpl = NULL; +convert_gen * convert_gen::mcImpl; diff --git a/l10ntools/source/gConvPo.cxx b/l10ntools/source/gConvPo.cxx index e3adbbf..cbc8f24 100644 --- a/l10ntools/source/gConvPo.cxx +++ b/l10ntools/source/gConvPo.cxx @@ -95,12 +95,14 @@ void convert_po::setKey(char *syyText) startLook(); // skip "#:" and any blanks - for (syyText += 2; *syyText == ' ' || *syyText == '\t'; ++syyText) ; - msKey = syyText; + for (syyText += 2; *syyText == ' ' || *syyText == '\t'; ++syyText) + ; + msKey = syyText; // remove trailing blanks - for (i = msKey.size() -1; msKey[i] == '\r' || msKey[i] == ' ' || msKey[i] == '\t'; --i) ; - msKey.erase(i+1); + for (i = msKey.size() -1; msKey[i] == '\r' || msKey[i] == ' ' || msKey[i] == '\t'; --i) + ; + msKey.erase(i+1); } @@ -146,7 +148,7 @@ void convert_po::startSave(const string& sName, // create directories as needed createDir(string(""), sFilePath); - outBuffer.open(sFilePath.c_str(), ios::out + ios::binary); + outBuffer.open(sFilePath.c_str(), ios::out | ios::binary); if (!outBuffer.is_open()) throw l10nMem::showError("Cannot open " + sFilePath + " for writing"); diff --git a/l10ntools/source/gConvSrc.cxx b/l10ntools/source/gConvSrc.cxx index d73bd4d..04b32bc 100644 --- a/l10ntools/source/gConvSrc.cxx +++ b/l10ntools/source/gConvSrc.cxx @@ -269,9 +269,10 @@ void convert_src::trim(string& sText) while (sText[0] == ' ' || sText[0] == '\t') sText.erase(0,1); - for (nL = sText.size(); sText[nL-1] == ' ' || sText[nL-1] == '\t'; --nL); - if (nL != (int)sText.size()) - sText.erase(nL); + for (nL = sText.size(); sText[nL-1] == ' ' || sText[nL-1] == '\t'; --nL) + ; + if (nL != (int)sText.size()) + sText.erase(nL); } diff --git a/l10ntools/source/gConvTree.cxx b/l10ntools/source/gConvTree.cxx index 2d2075f..b15d4b0 100644 --- a/l10ntools/source/gConvTree.cxx +++ b/l10ntools/source/gConvTree.cxx @@ -49,7 +49,6 @@ convert_tree::~convert_tree() -extern int treelex(void); void convert_tree::doExecute() { string sLang; diff --git a/l10ntools/source/gConvUi.cxx b/l10ntools/source/gConvUi.cxx index 5b5b1bc..3a6bd68 100644 --- a/l10ntools/source/gConvUi.cxx +++ b/l10ntools/source/gConvUi.cxx @@ -20,11 +20,13 @@ #include <vector> using namespace std; -#include "gL10nMem.hxx" + +#include "gL10nMem.hxx" #include "gConvUi.hxx" + convert_ui::convert_ui(l10nMem& crMemory) : convert_gen(crMemory) { @@ -32,7 +34,6 @@ convert_ui::convert_ui(l10nMem& crMemory) -extern int uilex(void); void convert_ui::doExecute() { uilex(); diff --git a/l10ntools/source/gConvUlf.cxx b/l10ntools/source/gConvUlf.cxx index 556d0e4..3cd675a 100644 --- a/l10ntools/source/gConvUlf.cxx +++ b/l10ntools/source/gConvUlf.cxx @@ -25,7 +25,6 @@ using namespace std; -extern int ulflex(void); void convert_ulf::doExecute() { ulflex(); diff --git a/l10ntools/source/gConvXcs.cxx b/l10ntools/source/gConvXcs.cxx index dc8a4a6..c00f23f 100644 --- a/l10ntools/source/gConvXcs.cxx +++ b/l10ntools/source/gConvXcs.cxx @@ -33,7 +33,6 @@ convert_xcs::convert_xcs(l10nMem& crMemory) -extern int xcslex(void); void convert_xcs::doExecute() { if (mbMergeMode) diff --git a/l10ntools/source/gConvXcu.cxx b/l10ntools/source/gConvXcu.cxx index 87a9927..fe8e07f6 100644 --- a/l10ntools/source/gConvXcu.cxx +++ b/l10ntools/source/gConvXcu.cxx @@ -32,7 +32,6 @@ convert_xcu::convert_xcu(l10nMem& crMemory) -extern int xculex(void); void convert_xcu::doExecute() { xculex(); diff --git a/l10ntools/source/gConvXhp.cxx b/l10ntools/source/gConvXhp.cxx index db19ba1..9c07772 100644 --- a/l10ntools/source/gConvXhp.cxx +++ b/l10ntools/source/gConvXhp.cxx @@ -22,6 +22,9 @@ using namespace std; #include "gL10nMem.hxx" #include "gConvXhp.hxx" + + + convert_xhp::convert_xhp(l10nMem& crMemory) : convert_gen(crMemory), meExpectValue(VALUE_NOT_USED), @@ -48,7 +51,6 @@ convert_xhp::~convert_xhp() -extern int xhplex(void); void convert_xhp::doExecute() { string sLang; diff --git a/l10ntools/source/gConvXrm.cxx b/l10ntools/source/gConvXrm.cxx index 2a075fe..c1ff128 100644 --- a/l10ntools/source/gConvXrm.cxx +++ b/l10ntools/source/gConvXrm.cxx @@ -35,7 +35,6 @@ convert_xrm::convert_xrm(l10nMem& crMemory) -extern int xrmlex(void); void convert_xrm::doExecute() { xrmlex(); diff --git a/l10ntools/source/gL10nMem.cxx b/l10ntools/source/gL10nMem.cxx index fb50ac9..f5c5d41 100644 --- a/l10ntools/source/gL10nMem.cxx +++ b/l10ntools/source/gL10nMem.cxx @@ -24,7 +24,9 @@ using namespace std; #include "gL10nMem.hxx" -#include "gConvPO.hxx" +#include "gConvPo.hxx" + + l10nMem *myMem; diff --git a/l10ntools/source/gLang.cxx b/l10ntools/source/gLang.cxx index b1b38b5..ae45779 100644 --- a/l10ntools/source/gLang.cxx +++ b/l10ntools/source/gLang.cxx @@ -32,8 +32,8 @@ class handler handler() {}; ~handler() {}; - void showRunTimeError(string sErr); - void showUsage(string sErr); + static void showRunTimeError(string sErr); + static void showUsage(string sErr); void checkCommandLine(int argc, char *argv[]); void run(); @@ -300,6 +300,7 @@ void handler::runConvert() // convert + loadL10MEM(true); mcMemory.setConvert(true, false); // loop through all source files, and extract messages from each file _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits