summaryrefslogtreecommitdiffstats
path: root/l10ntools/inc
diff options
context:
space:
mode:
authorjan iversen <jani@documentfoundation.org>2016-03-19 20:04:54 +0100
committerjan iversen <jani@documentfoundation.org>2016-03-22 16:32:19 +0100
commit40a218baf8823d883c8d9d2839ff95780e7ff0ed (patch)
tree79066f1712aca611daedef46af3a5bcd7e42a158 /l10ntools/inc
parentupdate genlang, activated lex calls. (diff)
downloadcore-40a218baf8823d883c8d9d2839ff95780e7ff0ed.tar.gz
core-40a218baf8823d883c8d9d2839ff95780e7ff0ed.zip
genlang, moved save function to convPO from convGen.
.pot files can only be generated in convPO, therefore it is logical to have the functions at this level. Added a fix due to LO standard for saving .pot files (this fix might need to be updated, when moving on from .xrm) Ready to save .xrm input as .pot, and compare results. Change-Id: I1849e896258942f7895e5f6bd3b834391e7a7e95
Diffstat (limited to 'l10ntools/inc')
-rw-r--r--l10ntools/inc/gConv.hxx17
-rw-r--r--l10ntools/inc/gConvPo.hxx19
2 files changed, 13 insertions, 23 deletions
diff --git a/l10ntools/inc/gConv.hxx b/l10ntools/inc/gConv.hxx
index 710d0ff848cf..cda748346308 100644
--- a/l10ntools/inc/gConv.hxx
+++ b/l10ntools/inc/gConv.hxx
@@ -41,18 +41,6 @@ class convert_gen
// 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();
- static bool checkAccess(std::string& sFile);
- static bool createDir(std::string& sDir, std::string& sFile);
-
// utility functions for converters
void lexRead(char *sBuf, int *nResult, int nMax_size);
std::string& copySource(char const *yyText, bool bDoClear = true);
@@ -74,8 +62,9 @@ class convert_gen
// utility functions for converters
void writeSourceFile(const std::string& line);
-
- private:
+ static bool checkAccess(std::string& sFile);
+ static bool createDir(std::string& sDir, std::string& sFile);
+private:
std::ofstream mcOutputFile;
};
#endif
diff --git a/l10ntools/inc/gConvPo.hxx b/l10ntools/inc/gConvPo.hxx
index ab120d916b66..7ca45bff93a2 100644
--- a/l10ntools/inc/gConvPo.hxx
+++ b/l10ntools/inc/gConvPo.hxx
@@ -41,6 +41,16 @@ class convert_po : public convert_gen
void setMsgStr ();
void handleNL ();
+ // Used to save .pot files
+ void startSave(const std::string& sLanguage,
+ const std::string& sFile);
+ void save(const std::string& sFileName,
+ const std::string& sKey,
+ const std::string& sENUStext,
+ const std::string& sText,
+ bool bFuzzy);
+ void endSave();
+
private:
std::string msId;
std::string msStr;
@@ -49,14 +59,5 @@ class convert_po : public convert_gen
std::filebuf outBuffer;
void execute() override;
-
- void startSave(const std::string& sLanguage,
- const std::string& sFile) override;
- void save(const std::string& sFileName,
- const std::string& sKey,
- const std::string& sENUStext,
- const std::string& sText,
- bool bFuzzy) override;
- void endSave() override;
};
#endif