You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ja...@apache.org on 2013/02/07 19:15:34 UTC
svn commit: r1443640 - /openoffice/branches/l10n/main/l10ntools/source/
Author: jani
Date: Thu Feb 7 18:15:33 2013
New Revision: 1443640
URL: http://svn.apache.org/r1443640
Log:
removed "using namespace 'std'" and use std:: instead, just for win7 buildbot
Modified:
openoffice/branches/l10n/main/l10ntools/source/gCon.cxx
openoffice/branches/l10n/main/l10ntools/source/gConHrc.cxx
openoffice/branches/l10n/main/l10ntools/source/gConHrc.hxx
openoffice/branches/l10n/main/l10ntools/source/gConHrcWrap.cxx
openoffice/branches/l10n/main/l10ntools/source/gConHrclex.l
openoffice/branches/l10n/main/l10ntools/source/gConPo.cxx
openoffice/branches/l10n/main/l10ntools/source/gConPo.hxx
openoffice/branches/l10n/main/l10ntools/source/gConPoWrap.cxx
openoffice/branches/l10n/main/l10ntools/source/gConPolex.l
openoffice/branches/l10n/main/l10ntools/source/gConProp.cxx
openoffice/branches/l10n/main/l10ntools/source/gConSrc.cxx
openoffice/branches/l10n/main/l10ntools/source/gConSrc.hxx
openoffice/branches/l10n/main/l10ntools/source/gConSrcWrap.cxx
openoffice/branches/l10n/main/l10ntools/source/gConSrclex.l
openoffice/branches/l10n/main/l10ntools/source/gConTree.cxx
openoffice/branches/l10n/main/l10ntools/source/gConUlf.cxx
openoffice/branches/l10n/main/l10ntools/source/gConXcs.cxx
openoffice/branches/l10n/main/l10ntools/source/gConXcs.hxx
openoffice/branches/l10n/main/l10ntools/source/gConXcsWrap.cxx
openoffice/branches/l10n/main/l10ntools/source/gConXcslex.l
openoffice/branches/l10n/main/l10ntools/source/gConXcu.cxx
openoffice/branches/l10n/main/l10ntools/source/gConXcu.hxx
openoffice/branches/l10n/main/l10ntools/source/gConXcuWrap.cxx
openoffice/branches/l10n/main/l10ntools/source/gConXculex.l
openoffice/branches/l10n/main/l10ntools/source/gConXhp.cxx
openoffice/branches/l10n/main/l10ntools/source/gConXhp.hxx
openoffice/branches/l10n/main/l10ntools/source/gConXhpWrap.cxx
openoffice/branches/l10n/main/l10ntools/source/gConXhplex.l
openoffice/branches/l10n/main/l10ntools/source/gConXrm.cxx
openoffice/branches/l10n/main/l10ntools/source/gConXrm.hxx
openoffice/branches/l10n/main/l10ntools/source/gConXrmWrap.cxx
openoffice/branches/l10n/main/l10ntools/source/gConXrmlex.l
openoffice/branches/l10n/main/l10ntools/source/gHandler.cxx
openoffice/branches/l10n/main/l10ntools/source/gL10nMem.cxx
openoffice/branches/l10n/main/l10ntools/source/gLang.cxx
openoffice/branches/l10n/main/l10ntools/source/gLang.hxx
Modified: openoffice/branches/l10n/main/l10ntools/source/gCon.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gCon.cxx?rev=1443640&r1=1443639&r2=1443640&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gCon.cxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gCon.cxx Thu Feb 7 18:15:33 2013
@@ -18,7 +18,6 @@
* under the License.
*
*************************************************************/
-using namespace std;
#include "gLang.hxx"
@@ -33,26 +32,26 @@ using namespace std;
/********************** I M P L E M E N T A T I O N **********************/
-convert_gen::convert_gen(const string& srSourceFile, l10nMem& crMemory)
+convert_gen::convert_gen(const std::string& srSourceFile, l10nMem& crMemory)
: msSourceFile(srSourceFile),
mcMemory(crMemory)
{
- ifstream inputFile(msSourceFile.c_str(), ios::binary);
+ std::ifstream inputFile(msSourceFile.c_str(), std::ios::binary);
if (!inputFile.is_open())
- throw string("Could not open ")+msSourceFile;
+ throw std::string("Could not open ")+msSourceFile;
// get length of file:
mnSourceReadIndex = 0;
- inputFile.seekg (0, ios::end);
+ inputFile.seekg (0, std::ios::end);
msSourceBuffer.resize((unsigned int)inputFile.tellg());
- inputFile.seekg (0, ios::beg);
+ inputFile.seekg (0, std::ios::beg);
- // get size, prepare string and read whole file
+ // get size, prepare std::string and read whole file
inputFile.read((char *)msSourceBuffer.c_str(), msSourceBuffer.size());
if ((unsigned int)inputFile.gcount() != msSourceBuffer.size())
- throw string("cannot read whole file: "+msSourceFile);
+ throw std::string("cannot read whole file: "+msSourceFile);
inputFile.close();
}
@@ -66,15 +65,15 @@ convert_gen::~convert_gen()
/********************** I M P L E M E N T A T I O N **********************/
-convert_gen& convert_gen::getConverter(const string& srSourceFile, l10nMem& crMemory)
+convert_gen& convert_gen::getConverter(const std::string& srSourceFile, l10nMem& crMemory)
{
// did the user give a .xxx with the source file ?
int nInx = srSourceFile.find_last_of(".");
if (nInx <= 0)
- throw string("source file: ")+srSourceFile+" missing extension";
+ throw std::string("source file: ")+srSourceFile+" missing extension";
// find correct conversion class
- string sExtension = srSourceFile.substr(nInx+1);
+ std::string sExtension = srSourceFile.substr(nInx+1);
// did the user give a .xxx with the source file ?
if (sExtension == "hrc") return *(new convert_hrc (srSourceFile, crMemory));
@@ -88,7 +87,7 @@ convert_gen& convert_gen::getConverter(c
if (sExtension == "xhp") return *(new convert_xhp (srSourceFile, crMemory));
if (sExtension == "properties") return *(new convert_properties(srSourceFile, crMemory));
- throw string("unknown extension on source file: ")+srSourceFile;
+ throw std::string("unknown extension on source file: ")+srSourceFile;
}
@@ -123,7 +122,7 @@ void convert_gen::lexRead(char *sBuf, in
/********************** I M P L E M E N T A T I O N **********************/
-void convert_gen::lineRead(bool *bEof, string& line)
+void convert_gen::lineRead(bool *bEof, std::string& line)
{
// did we hit eof
if (mnSourceReadIndex == -1 || mnSourceReadIndex >= (int)msSourceBuffer.size())
@@ -138,7 +137,7 @@ void convert_gen::lineRead(bool *bEof, s
if (nNextLF == (int)msSourceBuffer.npos)
nNextLF = msSourceBuffer.size()+1;
- // copy string
+ // copy std::string
line = msSourceBuffer.substr(mnSourceReadIndex, nNextLF - mnSourceReadIndex);
mnSourceReadIndex = nNextLF +1;
*bEof = false;
@@ -148,29 +147,29 @@ void convert_gen::lineRead(bool *bEof, s
/********************** I M P L E M E N T A T I O N **********************/
-void convert_gen::writeSourceFile(const string& line)
+void convert_gen::writeSourceFile(const std::string& line)
{
if (!line.size())
return;
- cout << line;
+ std::cout << line;
// JIX
}
/********************** I M P L E M E N T A T I O N **********************/
-void convert_gen::trim(string& sLine)
+void convert_gen::trim(std::string& sLine)
{
int nL;
// remove leading spaces
nL = sLine.find_first_not_of(" \t");
- if (nL != (int)string::npos)
+ if (nL != (int)std::string::npos)
sLine.erase(0, nL);
// remove trailing spaces
nL = sLine.find_last_not_of(" \t");
- if (nL != (int)string::npos)
+ if (nL != (int)std::string::npos)
sLine.erase(nL +1);
}
Modified: openoffice/branches/l10n/main/l10ntools/source/gConHrc.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConHrc.cxx?rev=1443640&r1=1443639&r2=1443640&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConHrc.cxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConHrc.cxx Thu Feb 7 18:15:33 2013
@@ -18,7 +18,6 @@
* under the License.
*
*************************************************************/
-using namespace std;
#include "gConHrc.hxx"
@@ -38,7 +37,7 @@ convert_hrc_impl * convert_hrc::mcpImpl;
/************ I N T E R F A C E I M P L E M E N T A T I O N ************/
-convert_hrc::convert_hrc(const string& srSourceFile, l10nMem& crMemory)
+convert_hrc::convert_hrc(const std::string& srSourceFile, l10nMem& crMemory)
: convert_gen(srSourceFile, crMemory)
{mcpImpl = new convert_hrc_impl(srSourceFile, crMemory);}
convert_hrc::~convert_hrc() {delete mcpImpl;}
@@ -48,7 +47,7 @@ void convert_hrc::insert() {mcpImpl->in
/********************** I M P L E M E N T A T I O N **********************/
-convert_hrc_impl::convert_hrc_impl(const string& srSourceFile, l10nMem& crMemory)
+convert_hrc_impl::convert_hrc_impl(const std::string& srSourceFile, l10nMem& crMemory)
: convert_gen(srSourceFile, crMemory)
{
}
Modified: openoffice/branches/l10n/main/l10ntools/source/gConHrc.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConHrc.hxx?rev=1443640&r1=1443639&r2=1443640&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConHrc.hxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConHrc.hxx Thu Feb 7 18:15:33 2013
@@ -36,17 +36,17 @@
class convert_hrc_impl : public convert_gen
{
public:
- convert_hrc_impl(const string& srSourceFile, l10nMem& crMemory);
+ convert_hrc_impl(const std::string& srSourceFile, l10nMem& crMemory);
~convert_hrc_impl();
- void setKey(string &sText);
- void saveData(string& sText);
- void copyData(string& sText);
+ void setKey(std::string &sText);
+ void saveData(std::string& sText);
+ void copyData(std::string& sText);
private:
- vector<string> mcStack;
- string msCollector;
- string msKey;
+ std::vector<std::string> mcStack;
+ std::string msCollector;
+ std::string msKey;
void extract();
Modified: openoffice/branches/l10n/main/l10ntools/source/gConHrcWrap.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConHrcWrap.cxx?rev=1443640&r1=1443639&r2=1443640&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConHrcWrap.cxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConHrcWrap.cxx Thu Feb 7 18:15:33 2013
@@ -18,7 +18,6 @@
* under the License.
*
*************************************************************/
-using namespace std;
#include "gConHrc.hxx"
@@ -51,7 +50,7 @@ void convert_hrc_impl::runLex()
/********************** I M P L E M E N T A T I O N **********************/
-void convert_hrc_impl::setKey(string &sText)
+void convert_hrc_impl::setKey(std::string &sText)
{
int nL, nE;
@@ -70,10 +69,10 @@ void convert_hrc_impl::setKey(string &sT
/********************** I M P L E M E N T A T I O N **********************/
-void convert_hrc_impl::saveData(string &sText)
+void convert_hrc_impl::saveData(std::string &sText)
{
int nL, nE;
- string sUseText;
+ std::string sUseText;
// write text for merge
if (mbMergeMode)
@@ -89,8 +88,8 @@ void convert_hrc_impl::saveData(string &
if (mbMergeMode)
{
// get all languages (includes en-US)
- vector<l10nMem_entry *>& cExtraLangauges = mcMemory.getLanguagesForKey(msKey);
- string sNewLine;
+ std::vector<l10nMem_entry *>& cExtraLangauges = mcMemory.getLanguagesForKey(msKey);
+ std::string sNewLine;
int nL = cExtraLangauges.size();
for (int i = 0; i < nL; ++i)
@@ -107,7 +106,7 @@ void convert_hrc_impl::saveData(string &
/********************** I M P L E M E N T A T I O N **********************/
-void convert_hrc_impl::copyData(string &sText)
+void convert_hrc_impl::copyData(std::string &sText)
{
msCollector += sText;
if (sText == "\n")
Modified: openoffice/branches/l10n/main/l10ntools/source/gConHrclex.l
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConHrclex.l?rev=1443640&r1=1443639&r2=1443640&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConHrclex.l (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConHrclex.l Thu Feb 7 18:15:33 2013
@@ -31,7 +31,7 @@
/*************** O V E R W R I T I N G F U N C T I O N S ***************/
%{
-/* enlarge token buffer to tokenize whole strings */
+/* enlarge token buffer to tokenize whole std::strings */
#undef YYLMAX
#define YYLMAX 64000
@@ -60,27 +60,27 @@
%%
[fF][iI][xX][eE][dD][lL][iI][nN][eE][^\{]* {
- string text(yytext);
+ std::string text(yytext);
convert_hrc::mcpImpl->setKey(text);
}
[rR][aA][dD][iI][oO][bB][uU][tT][tT][oO][nM][^\{]* {
- string text(yytext);
+ std::string text(yytext);
convert_hrc::mcpImpl->setKey(text);
}
[cC][hH][eE][cC][kK][bB][oO][xX][^\{]* {
- string text(yytext);
+ std::string text(yytext);
convert_hrc::mcpImpl->setKey(text);
}
[tT][eE][xX][tT][^\"]*"\""[^\"]*"\";" {
- string text(yytext);
+ std::string text(yytext);
convert_hrc::mcpImpl->saveData(text);
}
.|\n {
- string text(yytext);
+ std::string text(yytext);
convert_hrc::mcpImpl->copyData(text);
}
Modified: openoffice/branches/l10n/main/l10ntools/source/gConPo.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConPo.cxx?rev=1443640&r1=1443639&r2=1443640&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConPo.cxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConPo.cxx Thu Feb 7 18:15:33 2013
@@ -18,7 +18,6 @@
* under the License.
*
*************************************************************/
-using namespace std;
#include "gConPo.hxx"
@@ -37,7 +36,7 @@ convert_po_impl * convert_po::mcpImpl;
/************ 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(const string& srSourceFile, l10nMem& crMemory)
+convert_po::convert_po(const std::string& srSourceFile, l10nMem& crMemory)
: convert_gen(srSourceFile, crMemory)
{mcpImpl = new convert_po_impl(srSourceFile, crMemory);}
convert_po::~convert_po() {delete mcpImpl;}
@@ -47,7 +46,7 @@ void convert_po::insert() {mcpImpl->ins
/********************** I M P L E M E N T A T I O N **********************/
-po_stack_entry::po_stack_entry(TAG_TYPE sIsNode, string& sName)
+po_stack_entry::po_stack_entry(TAG_TYPE sIsNode, std::string& sName)
: mbIsNode (sIsNode),
msName (sName)
{
@@ -63,7 +62,7 @@ po_stack_entry::~po_stack_entry()
/********************** I M P L E M E N T A T I O N **********************/
-convert_po_impl::convert_po_impl(const string& srSourceFile, l10nMem& crMemory)
+convert_po_impl::convert_po_impl(const std::string& srSourceFile, l10nMem& crMemory)
: convert_gen (srSourceFile, crMemory),
mbCollectingData(false)
Modified: openoffice/branches/l10n/main/l10ntools/source/gConPo.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConPo.hxx?rev=1443640&r1=1443639&r2=1443640&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConPo.hxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConPo.hxx Thu Feb 7 18:15:33 2013
@@ -38,11 +38,11 @@ typedef enum {TAG_COMPONENT, TAG_PROP, T
class po_stack_entry
{
public:
- po_stack_entry(TAG_TYPE sIsNode, string& sName);
+ po_stack_entry(TAG_TYPE sIsNode, std::string& sName);
~po_stack_entry();
TAG_TYPE mbIsNode;
- string msName;
+ std::string msName;
};
@@ -53,21 +53,21 @@ class po_stack_entry;
class convert_po_impl : public convert_gen
{
public:
- convert_po_impl(const string& srSourceFile, l10nMem& crMemory);
+ convert_po_impl(const std::string& srSourceFile, l10nMem& crMemory);
~convert_po_impl();
- void pushKeyPart(TAG_TYPE eIsNode, string &sTag);
- void popKeyPart (TAG_TYPE eIsNode, string &sTag);
+ void pushKeyPart(TAG_TYPE eIsNode, std::string &sTag);
+ void popKeyPart (TAG_TYPE eIsNode, std::string &sTag);
- void startCollectData(string& sCollectedText);
- void stopCollectData(string& sCollectedText);
- void collectData(string& sCollectedText);
+ void startCollectData(std::string& sCollectedText);
+ void stopCollectData(std::string& sCollectedText);
+ void collectData(std::string& sCollectedText);
private:
- stack<po_stack_entry> mcStack;
+ std::stack<po_stack_entry> mcStack;
bool mbMergeMode;
bool mbCollectingData;
- string msCollector;
+ std::string msCollector;
void extract();
void insert();
Modified: openoffice/branches/l10n/main/l10ntools/source/gConPoWrap.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConPoWrap.cxx?rev=1443640&r1=1443639&r2=1443640&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConPoWrap.cxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConPoWrap.cxx Thu Feb 7 18:15:33 2013
@@ -18,7 +18,6 @@
* under the License.
*
*************************************************************/
-using namespace std;
#include "gConPo.hxx"
@@ -48,7 +47,7 @@ void convert_po_impl::runLex()
/********************** I M P L E M E N T A T I O N **********************/
-void convert_po_impl::pushKeyPart(TAG_TYPE bIsNode, string& sTag)
+void convert_po_impl::pushKeyPart(TAG_TYPE bIsNode, std::string& sTag)
{
// remember text for merge
msCollector += sTag;
@@ -61,7 +60,7 @@ void convert_po_impl::pushKeyPart(TAG_TY
/********************** I M P L E M E N T A T I O N **********************/
-void convert_po_impl::popKeyPart(TAG_TYPE bIsNode, string &sTag)
+void convert_po_impl::popKeyPart(TAG_TYPE bIsNode, std::string &sTag)
{
// remember text for merge
msCollector += sTag;
@@ -80,7 +79,7 @@ void convert_po_impl::popKeyPart(TAG_TYP
/********************** I M P L E M E N T A T I O N **********************/
-void convert_po_impl::startCollectData(string& sCollectedText)
+void convert_po_impl::startCollectData(std::string& sCollectedText)
{
if (mbMergeMode && msCollector.size())
writeSourceFile(msCollector);
@@ -92,9 +91,9 @@ void convert_po_impl::startCollectData(s
/********************** I M P L E M E N T A T I O N **********************/
-void convert_po_impl::stopCollectData(string& sCollectedText)
+void convert_po_impl::stopCollectData(std::string& sCollectedText)
{
- string useKey;
+ std::string useKey;
// locate key and extract it
@@ -108,8 +107,8 @@ void convert_po_impl::stopCollectData(st
if (mbMergeMode)
{
// get all languages (includes en-US)
- vector<l10nMem_entry *>& cExtraLangauges = mcMemory.getLanguagesForKey(useKey);
- string sNewLine;
+ std::vector<l10nMem_entry *>& cExtraLangauges = mcMemory.getLanguagesForKey(useKey);
+ std::string sNewLine;
int nL = cExtraLangauges.size();
writeSourceFile(msCollector + sCollectedText);
@@ -129,7 +128,7 @@ void convert_po_impl::stopCollectData(st
/********************** I M P L E M E N T A T I O N **********************/
-void convert_po_impl::collectData(string& sCollectedText)
+void convert_po_impl::collectData(std::string& sCollectedText)
{
msCollector += sCollectedText;
if (sCollectedText == "\n")
Modified: openoffice/branches/l10n/main/l10ntools/source/gConPolex.l
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConPolex.l?rev=1443640&r1=1443639&r2=1443640&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConPolex.l (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConPolex.l Thu Feb 7 18:15:33 2013
@@ -31,7 +31,7 @@
/*************** O V E R W R I T I N G F U N C T I O N S ***************/
%{
-/* enlarge token buffer to tokenize whole strings */
+/* enlarge token buffer to tokenize whole std::strings */
#undef YYLMAX
#define YYLMAX 64000
@@ -60,48 +60,48 @@
%%
"<oor:component-data "[^>]*> {
- string text(yytext);
+ std::string text(yytext);
convert_po::mcpImpl->pushKeyPart(TAG_COMPONENT, text);
}
"</oor:component-data>" {
- string text(yytext);
+ std::string text(yytext);
convert_po::mcpImpl->popKeyPart(TAG_COMPONENT, text);
}
"<prop oor:name=\""[^\"]*\" {
- string text(yytext);
+ std::string text(yytext);
convert_po::mcpImpl->pushKeyPart(TAG_PROP, text);
}
"</prop>" {
- string text(yytext);
+ std::string text(yytext);
convert_po::mcpImpl->popKeyPart(TAG_PROP, text);
}
"<node oor:name=\""[^\"]*\" {
- string text(yytext);
+ std::string text(yytext);
convert_po::mcpImpl->pushKeyPart(TAG_NODE, text);
}
"</node>" {
- string text(yytext);
+ std::string text(yytext);
convert_po::mcpImpl->popKeyPart(TAG_NODE, text);
}
"<value xml:lang=\""[^\"]*\"[^>]*">" {
- string text(yytext);
+ std::string text(yytext);
convert_po::mcpImpl->startCollectData(text);
}
"</value>" {
- string text(yytext);
+ std::string text(yytext);
convert_po::mcpImpl->stopCollectData(text);
}
.|\n {
- string text(yytext);
+ std::string text(yytext);
convert_po::mcpImpl->collectData(text);
}
%%
Modified: openoffice/branches/l10n/main/l10ntools/source/gConProp.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConProp.cxx?rev=1443640&r1=1443639&r2=1443640&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConProp.cxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConProp.cxx Thu Feb 7 18:15:33 2013
@@ -18,7 +18,6 @@
* under the License.
*
*************************************************************/
-using namespace std;
#include "gLang.hxx"
@@ -32,10 +31,10 @@ using namespace std;
/********************** I M P L E M E N T A T I O N **********************/
-convert_properties::convert_properties(const string& srSourceFile, l10nMem& crMemory)
+convert_properties::convert_properties(const std::string& srSourceFile, l10nMem& crMemory)
: convert_gen(srSourceFile, crMemory)
{
- throw string("convert_properties not implemented");
+ throw std::string("convert_properties not implemented");
}
@@ -50,7 +49,7 @@ convert_properties::~convert_properties(
/********************** I M P L E M E N T A T I O N **********************/
void convert_properties::extract()
{
- throw string("convert_properties::extract not implemented");
+ throw std::string("convert_properties::extract not implemented");
}
@@ -58,6 +57,6 @@ void convert_properties::extract()
/********************** I M P L E M E N T A T I O N **********************/
void convert_properties::insert()
{
- throw string("convert_properties::insert not implemented");
+ throw std::string("convert_properties::insert not implemented");
}
Modified: openoffice/branches/l10n/main/l10ntools/source/gConSrc.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConSrc.cxx?rev=1443640&r1=1443639&r2=1443640&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConSrc.cxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConSrc.cxx Thu Feb 7 18:15:33 2013
@@ -18,7 +18,6 @@
* under the License.
*
*************************************************************/
-using namespace std;
#include "gConSrc.hxx"
@@ -38,7 +37,7 @@ convert_src_impl * convert_src::mcpImpl;
/************ 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(const string& srSourceFile, l10nMem& crMemory)
+convert_src::convert_src(const std::string& srSourceFile, l10nMem& crMemory)
: convert_gen(srSourceFile, crMemory)
{mcpImpl = new convert_src_impl(srSourceFile, crMemory);}
convert_src::~convert_src() {delete mcpImpl;}
@@ -48,7 +47,7 @@ void convert_src::insert() {mcpImpl->in
/********************** I M P L E M E N T A T I O N **********************/
-convert_src_impl::convert_src_impl(const string& srSourceFile, l10nMem& crMemory)
+convert_src_impl::convert_src_impl(const std::string& srSourceFile, l10nMem& crMemory)
: convert_gen(srSourceFile, crMemory)
{
}
Modified: openoffice/branches/l10n/main/l10ntools/source/gConSrc.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConSrc.hxx?rev=1443640&r1=1443639&r2=1443640&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConSrc.hxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConSrc.hxx Thu Feb 7 18:15:33 2013
@@ -37,20 +37,20 @@
class convert_src_impl : public convert_gen
{
public:
- convert_src_impl(const string& srSourceFile, l10nMem& crMemory);
+ convert_src_impl(const std::string& srSourceFile, l10nMem& crMemory);
~convert_src_impl();
- void pushKey(string &sText);
- void popKey (string &sText);
- void pushNoKey(string &sText);
- void registerKey(string &sText);
+ void pushKey(std::string &sText);
+ void popKey (std::string &sText);
+ void pushNoKey(std::string &sText);
+ void registerKey(std::string &sText);
- void saveData(string& sText);
- void copyData(string& sText);
+ void saveData(std::string& sText);
+ void copyData(std::string& sText);
private:
- vector<string> mcStack;
- string msCollector;
+ std::vector<std::string> mcStack;
+ std::string msCollector;
void extract();
void insert();
Modified: openoffice/branches/l10n/main/l10ntools/source/gConSrcWrap.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConSrcWrap.cxx?rev=1443640&r1=1443639&r2=1443640&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConSrcWrap.cxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConSrcWrap.cxx Thu Feb 7 18:15:33 2013
@@ -18,7 +18,6 @@
* under the License.
*
*************************************************************/
-using namespace std;
#include "gConSrc.hxx"
@@ -51,9 +50,9 @@ void convert_src_impl::runLex()
/********************** I M P L E M E N T A T I O N **********************/
-void convert_src_impl::pushKey(string &sText)
+void convert_src_impl::pushKey(std::string &sText)
{
- string sKey;
+ std::string sKey;
int nL, nE;
// write text for merge
@@ -73,7 +72,7 @@ void convert_src_impl::pushKey(string &s
/********************** I M P L E M E N T A T I O N **********************/
-void convert_src_impl::popKey(string &sText)
+void convert_src_impl::popKey(std::string &sText)
{
// write text for merge
if (mbMergeMode)
@@ -88,7 +87,7 @@ void convert_src_impl::popKey(string &sT
/********************** I M P L E M E N T A T I O N **********************/
-void convert_src_impl::pushNoKey(string &sText)
+void convert_src_impl::pushNoKey(std::string &sText)
{
// write text for merge
if (mbMergeMode)
@@ -99,9 +98,9 @@ void convert_src_impl::pushNoKey(string
/********************** I M P L E M E N T A T I O N **********************/
-void convert_src_impl::registerKey(string &sText)
+void convert_src_impl::registerKey(std::string &sText)
{
- string sKey;
+ std::string sKey;
int nL, nE;
// write text for merge
@@ -120,10 +119,10 @@ void convert_src_impl::registerKey(strin
/********************** I M P L E M E N T A T I O N **********************/
-void convert_src_impl::saveData(string &sText)
+void convert_src_impl::saveData(std::string &sText)
{
int nL, nE;
- string sKey, sUseText;
+ std::string sKey, sUseText;
// write text for merge
if (mbMergeMode)
@@ -143,8 +142,8 @@ void convert_src_impl::saveData(string &
if (mbMergeMode)
{
// get all languages (includes en-US)
- vector<l10nMem_entry *>& cExtraLangauges = mcMemory.getLanguagesForKey(sKey);
- string sNewLine;
+ std::vector<l10nMem_entry *>& cExtraLangauges = mcMemory.getLanguagesForKey(sKey);
+ std::string sNewLine;
int nL = cExtraLangauges.size();
for (int i = 0; i < nL; ++i)
@@ -161,7 +160,7 @@ void convert_src_impl::saveData(string &
/********************** I M P L E M E N T A T I O N **********************/
-void convert_src_impl::copyData(string &sText)
+void convert_src_impl::copyData(std::string &sText)
{
msCollector += sText;
if (sText == "\n")
Modified: openoffice/branches/l10n/main/l10ntools/source/gConSrclex.l
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConSrclex.l?rev=1443640&r1=1443639&r2=1443640&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConSrclex.l (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConSrclex.l Thu Feb 7 18:15:33 2013
@@ -31,7 +31,7 @@
/*************** O V E R W R I T I N G F U N C T I O N S ***************/
%{
-/* enlarge token buffer to tokenize whole strings */
+/* enlarge token buffer to tokenize whole std::strings */
#undef YYLMAX
#define YYLMAX 64000
@@ -60,57 +60,57 @@
%%
[tT][aA][bB][dD][iI][aA][lL][oO][gG][^\{]* {
- string text(yytext);
+ std::string text(yytext);
convert_src::mcpImpl->pushKey(text);
}
[tT][aA][bB][cC][oO][nN][tT][rR][oO][lL][^\{]* {
- string text(yytext);
+ std::string text(yytext);
convert_src::mcpImpl->pushKey(text);
}
[tT][aA][bB][pP][aA][gG][eE][^\{]* {
- string text(yytext);
+ std::string text(yytext);
convert_src::mcpImpl->pushKey(text);
}
[fF][iI][xX][eE][dD][tT][eE][xX][tT][^\{]* {
- string text(yytext);
+ std::string text(yytext);
convert_src::mcpImpl->pushKey(text);
}
[sS][tT][rR][iI][nN][gG][^\{]* {
- string text(yytext);
+ std::string text(yytext);
convert_src::mcpImpl->pushKey(text);
}
[pP][aA][gG][eE][lL][iI][sS][tT][^\{]* {
- string text(yytext);
+ std::string text(yytext);
convert_src::mcpImpl->pushNoKey(text);
}
[pP][aA][gG][eE][iI][tT][eE][mM][^\{]* {
- string text(yytext);
+ std::string text(yytext);
convert_src::mcpImpl->pushNoKey(text);
}
[iI][dD][eE][nN][tT][iI][fF][iI][eE][rR][^;]* {
- string text(yytext);
+ std::string text(yytext);
convert_src::mcpImpl->registerKey(text);
}
[tT][eE][xX][tT][^\"]*"\""[^\"]*"\";" {
- string text(yytext);
+ std::string text(yytext);
convert_src::mcpImpl->saveData(text);
}
"};" {
- string text(yytext);
+ std::string text(yytext);
convert_src::mcpImpl->popKey(text);
}
.|\n {
- string text(yytext);
+ std::string text(yytext);
convert_src::mcpImpl->copyData(text);
}
Modified: openoffice/branches/l10n/main/l10ntools/source/gConTree.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConTree.cxx?rev=1443640&r1=1443639&r2=1443640&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConTree.cxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConTree.cxx Thu Feb 7 18:15:33 2013
@@ -18,7 +18,6 @@
* under the License.
*
*************************************************************/
-using namespace std;
#include "gLang.hxx"
@@ -32,12 +31,12 @@ using namespace std;
/********************** I M P L E M E N T A T I O N **********************/
-convert_tree::convert_tree(const string& srSourceFile, l10nMem& crMemory)
+convert_tree::convert_tree(const std::string& srSourceFile, l10nMem& crMemory)
: convert_gen(srSourceFile, crMemory)
{
// extension, program, parameter, collectMode, xxx
// ".tree", "xhtex", "", "negative", "noiso"
- throw string("convert_tree not implemented");
+ throw std::string("convert_tree not implemented");
}
@@ -52,7 +51,7 @@ convert_tree::~convert_tree()
/********************** I M P L E M E N T A T I O N **********************/
void convert_tree::extract()
{
- throw string("convert_tree::extract not implemented");
+ throw std::string("convert_tree::extract not implemented");
}
@@ -60,5 +59,5 @@ void convert_tree::extract()
/********************** I M P L E M E N T A T I O N **********************/
void convert_tree::insert()
{
- throw string("convert_tree::insert not implemented");
+ throw std::string("convert_tree::insert not implemented");
}
Modified: openoffice/branches/l10n/main/l10ntools/source/gConUlf.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConUlf.cxx?rev=1443640&r1=1443639&r2=1443640&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConUlf.cxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConUlf.cxx Thu Feb 7 18:15:33 2013
@@ -18,7 +18,6 @@
* under the License.
*
*************************************************************/
-using namespace std;
#include "gLang.hxx"
@@ -32,7 +31,7 @@ using namespace std;
/********************** I M P L E M E N T A T I O N **********************/
-convert_ulf::convert_ulf(const string& srSourceFile, l10nMem& crMemory)
+convert_ulf::convert_ulf(const std::string& srSourceFile, l10nMem& crMemory)
: convert_gen(srSourceFile, crMemory)
{
}
@@ -69,7 +68,7 @@ void convert_ulf::handleLines()
{
bool bEof, bMultiLineComment = false;
int nL;
- string sWorkLine, sKey, sText;
+ std::string sWorkLine, sKey, sText;
// loop through all lines
@@ -87,7 +86,7 @@ void convert_ulf::handleLines()
if (bMultiLineComment)
{
nL = sWorkLine.find("*/");
- if (nL == (int)string::npos)
+ if (nL == (int)std::string::npos)
continue;
bMultiLineComment = false;
@@ -96,10 +95,10 @@ void convert_ulf::handleLines()
// check for start of comment
nL = sWorkLine.find("/*");
- if (nL != (int)string::npos)
+ if (nL != (int)std::string::npos)
{
int nE = sWorkLine.find("*/");
- if (nE == (int)string::npos)
+ if (nE == (int)std::string::npos)
{
bMultiLineComment = true;
continue;
@@ -127,11 +126,11 @@ void convert_ulf::handleLines()
// must be language line
nL = sWorkLine.find_first_of("=");
- if (nL == (int)string::npos)
+ if (nL == (int)std::string::npos)
throw "unknown format in " + msSourceFile + " missing = in line: " + sWorkLine;
nL = sWorkLine.find_first_of("\"");
- if (nL == (int)string::npos)
+ if (nL == (int)std::string::npos)
throw "unknown format: <<" + sWorkLine + ">> missing '='";
if (!mbMergeMode)
@@ -145,8 +144,8 @@ void convert_ulf::handleLines()
// copy line if merging or add to translation
{
// get all languages (includes en-US)
- vector<l10nMem_entry *>& cExtraLangauges = mcMemory.getLanguagesForKey(sKey);
- string sNewLine;
+ std::vector<l10nMem_entry *>& cExtraLangauges = mcMemory.getLanguagesForKey(sKey);
+ std::string sNewLine;
nL = cExtraLangauges.size();
Modified: openoffice/branches/l10n/main/l10ntools/source/gConXcs.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConXcs.cxx?rev=1443640&r1=1443639&r2=1443640&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConXcs.cxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConXcs.cxx Thu Feb 7 18:15:33 2013
@@ -18,7 +18,6 @@
* under the License.
*
*************************************************************/
-using namespace std;
#include "gConXcs.hxx"
@@ -37,7 +36,7 @@ convert_xcs_impl * convert_xcs::mcpImpl;
/************ 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(const string& srSourceFile, l10nMem& crMemory)
+convert_xcs::convert_xcs(const std::string& srSourceFile, l10nMem& crMemory)
: convert_gen(srSourceFile, crMemory)
{mcpImpl = new convert_xcs_impl(srSourceFile, crMemory);}
convert_xcs::~convert_xcs() {delete mcpImpl;}
@@ -47,7 +46,7 @@ void convert_xcs::insert() {mcpImpl->in
/********************** I M P L E M E N T A T I O N **********************/
-convert_xcs_impl::convert_xcs_impl(const string& srSourceFile, l10nMem& crMemory)
+convert_xcs_impl::convert_xcs_impl(const std::string& srSourceFile, l10nMem& crMemory)
: convert_gen (srSourceFile, crMemory),
mbCollectingData(false)
{
@@ -69,7 +68,7 @@ void convert_xcs_impl::extract()
mbMergeMode = false;
// run lex parser and build token tree
- throw string("convert_xcs::extract not active");
+ throw std::string("convert_xcs::extract not active");
runLex();
}
@@ -82,7 +81,7 @@ void convert_xcs_impl::insert()
mbMergeMode = true;
// run lex parser and build token tree
- throw string("convert_xcs::insert not active");
+ throw std::string("convert_xcs::insert not active");
runLex();
}
Modified: openoffice/branches/l10n/main/l10ntools/source/gConXcs.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConXcs.hxx?rev=1443640&r1=1443639&r2=1443640&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConXcs.hxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConXcs.hxx Thu Feb 7 18:15:33 2013
@@ -36,19 +36,19 @@
class convert_xcs_impl : public convert_gen
{
public:
- convert_xcs_impl(const string& srSourceFile, l10nMem& crMemory);
+ convert_xcs_impl(const std::string& srSourceFile, l10nMem& crMemory);
~convert_xcs_impl();
- void setKey(string &sCollectedText);
- void unsetKey(string &sCollectedText);
- void startCollectData(string& sCollectedText);
- void stopCollectData(string& sCollectedText);
- void collectData(string& sCollectedText);
+ void setKey(std::string &sCollectedText);
+ void unsetKey(std::string &sCollectedText);
+ void startCollectData(std::string& sCollectedText);
+ void stopCollectData(std::string& sCollectedText);
+ void collectData(std::string& sCollectedText);
private:
bool mbCollectingData;
- string msCollector;
- string msKey;
+ std::string msCollector;
+ std::string msKey;
void extract();
void insert();
Modified: openoffice/branches/l10n/main/l10ntools/source/gConXcsWrap.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConXcsWrap.cxx?rev=1443640&r1=1443639&r2=1443640&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConXcsWrap.cxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConXcsWrap.cxx Thu Feb 7 18:15:33 2013
@@ -18,7 +18,6 @@
* under the License.
*
*************************************************************/
-using namespace std;
#include "gConXcs.hxx"
@@ -49,22 +48,22 @@ void convert_xcs_impl::runLex()
/********************** I M P L E M E N T A T I O N **********************/
-void convert_xcs_impl::setKey(string& sCollectedText)
+void convert_xcs_impl::setKey(std::string& sCollectedText)
{
int nL;
- string sHead;
+ std::string sHead;
if (mbMergeMode)
writeSourceFile(msCollector+sCollectedText);
msCollector.clear();
// is it to be translated
- if (sCollectedText.find("oor:localized=") == string::npos)
+ if (sCollectedText.find("oor:localized=") == std::string::npos)
return;
// locate key (is any)
nL = sCollectedText.find("oor:name=\"");
- if (nL == (int)string::npos)
+ if (nL == (int)std::string::npos)
return;
sHead = sCollectedText.substr(nL+10);
nL = sHead.find("\"");
@@ -74,7 +73,7 @@ void convert_xcs_impl::setKey(string& sC
/********************** I M P L E M E N T A T I O N **********************/
-void convert_xcs_impl::unsetKey(string& sCollectedText)
+void convert_xcs_impl::unsetKey(std::string& sCollectedText)
{
if (mbMergeMode)
writeSourceFile(msCollector+sCollectedText);
@@ -86,7 +85,7 @@ void convert_xcs_impl::unsetKey(string&
/********************** I M P L E M E N T A T I O N **********************/
-void convert_xcs_impl::startCollectData(string& sCollectedText)
+void convert_xcs_impl::startCollectData(std::string& sCollectedText)
{
if (mbMergeMode)
writeSourceFile(msCollector);
@@ -99,16 +98,16 @@ void convert_xcs_impl::startCollectData(
/********************** I M P L E M E N T A T I O N **********************/
-void convert_xcs_impl::stopCollectData(string& sCollectedText)
+void convert_xcs_impl::stopCollectData(std::string& sCollectedText)
{
- string sHead, sKey, sLang, sText;
+ std::string sHead, sKey, sLang, sText;
int nL;
// get type of tag
msCollector += sCollectedText;
nL = msCollector.find("<p");
- if (nL != (int)string::npos)
+ if (nL != (int)std::string::npos)
sHead = msCollector.substr(nL+1, 1);
else
{
@@ -127,8 +126,8 @@ void convert_xcs_impl::stopCollectData(s
if (mbMergeMode)
{
// get all languages (includes en-US)
- vector<l10nMem_entry *>& cExtraLangauges = mcMemory.getLanguagesForKey(sKey);
- string sNewLine;
+ std::vector<l10nMem_entry *>& cExtraLangauges = mcMemory.getLanguagesForKey(sKey);
+ std::string sNewLine;
nL = cExtraLangauges.size();
writeSourceFile(msCollector);
@@ -151,7 +150,7 @@ void convert_xcs_impl::stopCollectData(s
/********************** I M P L E M E N T A T I O N **********************/
-void convert_xcs_impl::collectData(string& sCollectedText)
+void convert_xcs_impl::collectData(std::string& sCollectedText)
{
msCollector += sCollectedText;
if (sCollectedText == "\n")
Modified: openoffice/branches/l10n/main/l10ntools/source/gConXcslex.l
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConXcslex.l?rev=1443640&r1=1443639&r2=1443640&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConXcslex.l (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConXcslex.l Thu Feb 7 18:15:33 2013
@@ -31,7 +31,7 @@
/*************** O V E R W R I T I N G F U N C T I O N S ***************/
%{
-/* enlarge token buffer to tokenize whole strings */
+/* enlarge token buffer to tokenize whole std::strings */
#undef YYLMAX
#define YYLMAX 64000
@@ -60,27 +60,27 @@
%%
"<prop"[^>]*> {
- string text(yytext);
+ std::string text(yytext);
convert_xcs::mcpImpl->setKey(text);
}
"</prop>" {
- string text(yytext);
+ std::string text(yytext);
convert_xcs::mcpImpl->unsetKey(text);
}
"<value"[^>]*> {
- string text(yytext);
+ std::string text(yytext);
convert_xcs::mcpImpl->startCollectData(text);
}
"</value>" {
- string text(yytext);
+ std::string text(yytext);
convert_xcs::mcpImpl->stopCollectData(text);
}
.|\n {
- string text(yytext);
+ std::string text(yytext);
convert_xcs::mcpImpl->collectData(text);
}
%%
Modified: openoffice/branches/l10n/main/l10ntools/source/gConXcu.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConXcu.cxx?rev=1443640&r1=1443639&r2=1443640&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConXcu.cxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConXcu.cxx Thu Feb 7 18:15:33 2013
@@ -18,7 +18,6 @@
* under the License.
*
*************************************************************/
-using namespace std;
#include "gConXcu.hxx"
@@ -37,7 +36,7 @@ convert_xcu_impl * convert_xcu::mcpImpl;
/************ 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(const string& srSourceFile, l10nMem& crMemory)
+convert_xcu::convert_xcu(const std::string& srSourceFile, l10nMem& crMemory)
: convert_gen(srSourceFile, crMemory)
{mcpImpl = new convert_xcu_impl(srSourceFile, crMemory);}
convert_xcu::~convert_xcu() {delete mcpImpl;}
@@ -47,7 +46,7 @@ void convert_xcu::insert() {mcpImpl->in
/********************** I M P L E M E N T A T I O N **********************/
-convert_xcu_impl::convert_xcu_impl(const string& srSourceFile, l10nMem& crMemory)
+convert_xcu_impl::convert_xcu_impl(const std::string& srSourceFile, l10nMem& crMemory)
: convert_gen (srSourceFile, crMemory),
mbCollectingData(false)
Modified: openoffice/branches/l10n/main/l10ntools/source/gConXcu.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConXcu.hxx?rev=1443640&r1=1443639&r2=1443640&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConXcu.hxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConXcu.hxx Thu Feb 7 18:15:33 2013
@@ -39,20 +39,20 @@ class xcu_stack_entry;
class convert_xcu_impl : public convert_gen
{
public:
- convert_xcu_impl(const string& srSourceFile, l10nMem& crMemory);
+ convert_xcu_impl(const std::string& srSourceFile, l10nMem& crMemory);
~convert_xcu_impl();
- void pushKeyPart(TAG_TYPE eIsNode, string &sTag);
- void popKeyPart (TAG_TYPE eIsNode, string &sTag);
+ void pushKeyPart(TAG_TYPE eIsNode, std::string &sTag);
+ void popKeyPart (TAG_TYPE eIsNode, std::string &sTag);
- void startCollectData(string& sCollectedText);
- void stopCollectData(string& sCollectedText);
- void collectData(string& sCollectedText);
+ void startCollectData(std::string& sCollectedText);
+ void stopCollectData(std::string& sCollectedText);
+ void collectData(std::string& sCollectedText);
private:
- vector<string> mcStack;
+ std::vector<std::string> mcStack;
bool mbCollectingData;
- string msCollector;
+ std::string msCollector;
void extract();
void insert();
Modified: openoffice/branches/l10n/main/l10ntools/source/gConXcuWrap.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConXcuWrap.cxx?rev=1443640&r1=1443639&r2=1443640&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConXcuWrap.cxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConXcuWrap.cxx Thu Feb 7 18:15:33 2013
@@ -18,7 +18,6 @@
* under the License.
*
*************************************************************/
-using namespace std;
#include "gConXcu.hxx"
@@ -48,9 +47,9 @@ void convert_xcu_impl::runLex()
/********************** I M P L E M E N T A T I O N **********************/
-void convert_xcu_impl::pushKeyPart(TAG_TYPE bIsNode, string& sTag)
+void convert_xcu_impl::pushKeyPart(TAG_TYPE bIsNode, std::string& sTag)
{
- string sKey;
+ std::string sKey;
int nL, nE;
@@ -61,13 +60,13 @@ void convert_xcu_impl::pushKeyPart(TAG_T
// find key in tag
nL = sTag.find("oor:name=\"");
- if (nL == (int)string::npos)
+ if (nL == (int)std::string::npos)
return;
// find end of key
nL += 10;
nE = sTag.find("\"", nL);
- if (nE == (int)string::npos)
+ if (nE == (int)std::string::npos)
return;
sKey = sTag.substr(nL, nE - nL);
@@ -77,7 +76,7 @@ void convert_xcu_impl::pushKeyPart(TAG_T
/********************** I M P L E M E N T A T I O N **********************/
-void convert_xcu_impl::popKeyPart(TAG_TYPE bIsNode, string &sTag)
+void convert_xcu_impl::popKeyPart(TAG_TYPE bIsNode, std::string &sTag)
{
// write text for merge
if (mbMergeMode)
@@ -92,7 +91,7 @@ void convert_xcu_impl::popKeyPart(TAG_TY
/********************** I M P L E M E N T A T I O N **********************/
-void convert_xcu_impl::startCollectData(string& sCollectedText)
+void convert_xcu_impl::startCollectData(std::string& sCollectedText)
{
if (mbMergeMode)
writeSourceFile(msCollector+sCollectedText);
@@ -104,10 +103,10 @@ void convert_xcu_impl::startCollectData(
/********************** I M P L E M E N T A T I O N **********************/
-void convert_xcu_impl::stopCollectData(string& sCollectedText)
+void convert_xcu_impl::stopCollectData(std::string& sCollectedText)
{
int nL;
- string useKey;
+ std::string useKey;
// time to do something ?
if (!mbCollectingData)
@@ -123,8 +122,8 @@ void convert_xcu_impl::stopCollectData(s
writeSourceFile(msCollector + sCollectedText);
// get all languages (includes en-US)
- vector<l10nMem_entry *>& cExtraLangauges = mcMemory.getLanguagesForKey(useKey);
- string sNewLine;
+ std::vector<l10nMem_entry *>& cExtraLangauges = mcMemory.getLanguagesForKey(useKey);
+ std::string sNewLine;
int nL = cExtraLangauges.size();
for (int i = 0; i < nL; ++i)
@@ -142,7 +141,7 @@ void convert_xcu_impl::stopCollectData(s
/********************** I M P L E M E N T A T I O N **********************/
-void convert_xcu_impl::collectData(string& sCollectedText)
+void convert_xcu_impl::collectData(std::string& sCollectedText)
{
msCollector += sCollectedText;
if (sCollectedText == "\n")
Modified: openoffice/branches/l10n/main/l10ntools/source/gConXculex.l
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConXculex.l?rev=1443640&r1=1443639&r2=1443640&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConXculex.l (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConXculex.l Thu Feb 7 18:15:33 2013
@@ -31,7 +31,7 @@
/*************** O V E R W R I T I N G F U N C T I O N S ***************/
%{
-/* enlarge token buffer to tokenize whole strings */
+/* enlarge token buffer to tokenize whole std::strings */
#undef YYLMAX
#define YYLMAX 64000
@@ -60,48 +60,48 @@
%%
"<oor:component-data "[^>]*> {
- string text(yytext);
+ std::string text(yytext);
convert_xcu::mcpImpl->pushKeyPart(TAG_COMPONENT, text);
}
"</oor:component-data>" {
- string text(yytext);
+ std::string text(yytext);
convert_xcu::mcpImpl->popKeyPart(TAG_COMPONENT, text);
}
"<prop oor:name=\""[^\"]*\" {
- string text(yytext);
+ std::string text(yytext);
convert_xcu::mcpImpl->pushKeyPart(TAG_PROP, text);
}
"</prop>" {
- string text(yytext);
+ std::string text(yytext);
convert_xcu::mcpImpl->popKeyPart(TAG_PROP, text);
}
"<node oor:name=\""[^\"]*\" {
- string text(yytext);
+ std::string text(yytext);
convert_xcu::mcpImpl->pushKeyPart(TAG_NODE, text);
}
"</node>" {
- string text(yytext);
+ std::string text(yytext);
convert_xcu::mcpImpl->popKeyPart(TAG_NODE, text);
}
"<value xml:lang=\""[^\"]*\"[^>]*">" {
- string text(yytext);
+ std::string text(yytext);
convert_xcu::mcpImpl->startCollectData(text);
}
"</value>" {
- string text(yytext);
+ std::string text(yytext);
convert_xcu::mcpImpl->stopCollectData(text);
}
.|\n {
- string text(yytext);
+ std::string text(yytext);
convert_xcu::mcpImpl->collectData(text);
}
%%
Modified: openoffice/branches/l10n/main/l10ntools/source/gConXhp.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConXhp.cxx?rev=1443640&r1=1443639&r2=1443640&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConXhp.cxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConXhp.cxx Thu Feb 7 18:15:33 2013
@@ -18,7 +18,6 @@
* under the License.
*
*************************************************************/
-using namespace std;
#include "gConXhp.hxx"
@@ -37,7 +36,7 @@ convert_xhp_impl * convert_xhp::mcpImpl;
/************ 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(const string& srSourceFile, l10nMem& crMemory)
+convert_xhp::convert_xhp(const std::string& srSourceFile, l10nMem& crMemory)
: convert_gen(srSourceFile, crMemory)
{mcpImpl = new convert_xhp_impl(srSourceFile, crMemory);}
convert_xhp::~convert_xhp() {delete mcpImpl;}
@@ -47,7 +46,7 @@ void convert_xhp::insert() {mcpImpl->in
/********************** I M P L E M E N T A T I O N **********************/
-convert_xhp_impl::convert_xhp_impl(const string& srSourceFile, l10nMem& crMemory)
+convert_xhp_impl::convert_xhp_impl(const std::string& srSourceFile, l10nMem& crMemory)
: convert_gen (srSourceFile, crMemory),
mbCollectingData(false)
{
Modified: openoffice/branches/l10n/main/l10ntools/source/gConXhp.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConXhp.hxx?rev=1443640&r1=1443639&r2=1443640&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConXhp.hxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConXhp.hxx Thu Feb 7 18:15:33 2013
@@ -36,18 +36,18 @@
class convert_xhp_impl : public convert_gen
{
public:
- convert_xhp_impl(const string& srSourceFile, l10nMem& crMemory);
+ convert_xhp_impl(const std::string& srSourceFile, l10nMem& crMemory);
~convert_xhp_impl();
- void startCollectData(string sType, string& sCollectedText);
- void stopCollectData(string sType, string& sCollectedText);
- void collectData(string& sCollectedText);
+ void startCollectData(std::string sType, std::string& sCollectedText);
+ void stopCollectData(std::string sType, std::string& sCollectedText);
+ void collectData(std::string& sCollectedText);
private:
bool mbCollectingData;
- string msCollector;
- string msMergeType;
- string msTag;
+ std::string msCollector;
+ std::string msMergeType;
+ std::string msTag;
void extract();
void insert();
Modified: openoffice/branches/l10n/main/l10ntools/source/gConXhpWrap.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConXhpWrap.cxx?rev=1443640&r1=1443639&r2=1443640&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConXhpWrap.cxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConXhpWrap.cxx Thu Feb 7 18:15:33 2013
@@ -18,7 +18,6 @@
* under the License.
*
*************************************************************/
-using namespace std;
#include "gConXhp.hxx"
@@ -50,7 +49,7 @@ void convert_xhp_impl::runLex()
/********************** I M P L E M E N T A T I O N **********************/
-void convert_xhp_impl::startCollectData(string sType, string& sCollectedText)
+void convert_xhp_impl::startCollectData(std::string sType, std::string& sCollectedText)
{
if (mbMergeMode)
writeSourceFile(msCollector+sCollectedText);
@@ -68,9 +67,9 @@ void convert_xhp_impl::startCollectData(
/********************** I M P L E M E N T A T I O N **********************/
-void convert_xhp_impl::stopCollectData(string sType, string& sCollectedText)
+void convert_xhp_impl::stopCollectData(std::string sType, std::string& sCollectedText)
{
- string sKey;
+ std::string sKey;
int nL;
@@ -85,8 +84,8 @@ void convert_xhp_impl::stopCollectData(s
if (mbMergeMode)
{
// get all languages (includes en-US)
- vector<l10nMem_entry *>& cExtraLangauges = mcMemory.getLanguagesForKey(sKey);
- string sNewLine;
+ std::vector<l10nMem_entry *>& cExtraLangauges = mcMemory.getLanguagesForKey(sKey);
+ std::string sNewLine;
nL = cExtraLangauges.size();
// write en-US entry
@@ -112,7 +111,7 @@ void convert_xhp_impl::stopCollectData(s
/********************** I M P L E M E N T A T I O N **********************/
-void convert_xhp_impl::collectData(string& sCollectedText)
+void convert_xhp_impl::collectData(std::string& sCollectedText)
{
msCollector += sCollectedText;
if (sCollectedText == "\n")
Modified: openoffice/branches/l10n/main/l10ntools/source/gConXhplex.l
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConXhplex.l?rev=1443640&r1=1443639&r2=1443640&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConXhplex.l (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConXhplex.l Thu Feb 7 18:15:33 2013
@@ -31,7 +31,7 @@
/*************** O V E R W R I T I N G F U N C T I O N S ***************/
%{
-/* enlarge token buffer to tokenize whole strings */
+/* enlarge token buffer to tokenize whole std::strings */
#undef YYLMAX
#define YYLMAX 64000
@@ -60,37 +60,37 @@
%%
"<title"[^>]*> {
- string text(yytext);
+ std::string text(yytext);
convert_xhp::mcpImpl->startCollectData(text.substr(1,5), text);
}
"<bookmark "[^>]*> {
- string text(yytext);
+ std::string text(yytext);
convert_xhp::mcpImpl->startCollectData(text.substr(1,8), text);
}
"<paragraph"[^>]*> {
- string text(yytext);
+ std::string text(yytext);
convert_xhp::mcpImpl->startCollectData(text.substr(1,9), text);
}
"</paragraph>" {
- string text(yytext);
+ std::string text(yytext);
convert_xhp::mcpImpl->stopCollectData(text.substr(2,9), text);
}
"</bookmark>" {
- string text(yytext);
+ std::string text(yytext);
convert_xhp::mcpImpl->stopCollectData(text.substr(2,8), text);
}
"</title>" {
- string text(yytext);
+ std::string text(yytext);
convert_xhp::mcpImpl->stopCollectData(text.substr(2,5), text);
}
.|\n {
- string text(yytext);
+ std::string text(yytext);
convert_xhp::mcpImpl->collectData(text);
}
Modified: openoffice/branches/l10n/main/l10ntools/source/gConXrm.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConXrm.cxx?rev=1443640&r1=1443639&r2=1443640&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConXrm.cxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConXrm.cxx Thu Feb 7 18:15:33 2013
@@ -18,7 +18,6 @@
* under the License.
*
*************************************************************/
-using namespace std;
#include "gConXrm.hxx"
@@ -37,7 +36,7 @@ convert_xrm_impl * convert_xrm::mcpImpl;
/************ 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(const string& srSourceFile, l10nMem& crMemory)
+convert_xrm::convert_xrm(const std::string& srSourceFile, l10nMem& crMemory)
: convert_gen(srSourceFile, crMemory)
{mcpImpl = new convert_xrm_impl(srSourceFile, crMemory);}
convert_xrm::~convert_xrm() {delete mcpImpl;}
@@ -47,7 +46,7 @@ void convert_xrm::insert() {mcpImpl->in
/********************** I M P L E M E N T A T I O N **********************/
-convert_xrm_impl::convert_xrm_impl(const string& srSourceFile, l10nMem& crMemory)
+convert_xrm_impl::convert_xrm_impl(const std::string& srSourceFile, l10nMem& crMemory)
: convert_gen (srSourceFile, crMemory),
mbCollectingData(false)
{
Modified: openoffice/branches/l10n/main/l10ntools/source/gConXrm.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConXrm.hxx?rev=1443640&r1=1443639&r2=1443640&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConXrm.hxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConXrm.hxx Thu Feb 7 18:15:33 2013
@@ -36,18 +36,18 @@
class convert_xrm_impl : public convert_gen
{
public:
- convert_xrm_impl(const string& srSourceFile, l10nMem& crMemory);
+ convert_xrm_impl(const std::string& srSourceFile, l10nMem& crMemory);
~convert_xrm_impl();
- void startCollectData(string sType, string& sCollectedText);
- void stopCollectData(string sType, string& sCollectedText);
- void collectData(string& sCollectedText);
+ void startCollectData(std::string sType, std::string& sCollectedText);
+ void stopCollectData(std::string sType, std::string& sCollectedText);
+ void collectData(std::string& sCollectedText);
private:
bool mbCollectingData;
- string msCollector;
- string msTag;
- string msMergeType;
+ std::string msCollector;
+ std::string msTag;
+ std::string msMergeType;
void extract();
void insert();
Modified: openoffice/branches/l10n/main/l10ntools/source/gConXrmWrap.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConXrmWrap.cxx?rev=1443640&r1=1443639&r2=1443640&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConXrmWrap.cxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConXrmWrap.cxx Thu Feb 7 18:15:33 2013
@@ -18,7 +18,6 @@
* under the License.
*
*************************************************************/
-using namespace std;
#include "gConXrm.hxx"
@@ -51,7 +50,7 @@ void convert_xrm_impl::runLex()
/********************** I M P L E M E N T A T I O N **********************/
-void convert_xrm_impl::startCollectData(string sType, string& sCollectedText)
+void convert_xrm_impl::startCollectData(std::string sType, std::string& sCollectedText)
{
if (mbMergeMode)
writeSourceFile(msCollector+sCollectedText);
@@ -65,9 +64,9 @@ void convert_xrm_impl::startCollectData(
/********************** I M P L E M E N T A T I O N **********************/
-void convert_xrm_impl::stopCollectData(string sType, string& sCollectedText)
+void convert_xrm_impl::stopCollectData(std::string sType, std::string& sCollectedText)
{
- string sKey;
+ std::string sKey;
int nL;
@@ -82,8 +81,8 @@ void convert_xrm_impl::stopCollectData(s
if (mbMergeMode)
{
// get all languages (includes en-US)
- vector<l10nMem_entry *>& cExtraLangauges = mcMemory.getLanguagesForKey(sKey);
- string sNewLine;
+ std::vector<l10nMem_entry *>& cExtraLangauges = mcMemory.getLanguagesForKey(sKey);
+ std::string sNewLine;
nL = cExtraLangauges.size();
// write en-US entry
@@ -109,7 +108,7 @@ void convert_xrm_impl::stopCollectData(s
/********************** I M P L E M E N T A T I O N **********************/
-void convert_xrm_impl::collectData(string& sCollectedText)
+void convert_xrm_impl::collectData(std::string& sCollectedText)
{
msCollector += sCollectedText;
if (sCollectedText == "\n")
Modified: openoffice/branches/l10n/main/l10ntools/source/gConXrmlex.l
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConXrmlex.l?rev=1443640&r1=1443639&r2=1443640&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConXrmlex.l (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConXrmlex.l Thu Feb 7 18:15:33 2013
@@ -31,7 +31,7 @@
/*************** O V E R W R I T I N G F U N C T I O N S ***************/
%{
-/* enlarge token buffer to tokenize whole strings */
+/* enlarge token buffer to tokenize whole std::strings */
#undef YYLMAX
#define YYLMAX 64000
@@ -60,27 +60,27 @@
%%
"<p"[^>]*> {
- string text(yytext);
+ std::string text(yytext);
convert_xrm::mcpImpl->startCollectData(text.substr(1,1), text);
}
"<h"[0-9][^>]*> {
- string text(yytext);
+ std::string text(yytext);
convert_xrm::mcpImpl->startCollectData(text.substr(1,2), text);
}
"</p>" {
- string text(yytext);
+ std::string text(yytext);
convert_xrm::mcpImpl->stopCollectData(text.substr(2,1), text);
}
"</h"[0-9]> {
- string text(yytext);
+ std::string text(yytext);
convert_xrm::mcpImpl->stopCollectData(text.substr(2,2), text);
}
.|\n {
- string text(yytext);
+ std::string text(yytext);
convert_xrm::mcpImpl->collectData(text);
}
Modified: openoffice/branches/l10n/main/l10ntools/source/gHandler.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gHandler.cxx?rev=1443640&r1=1443639&r2=1443640&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gHandler.cxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gHandler.cxx Thu Feb 7 18:15:33 2013
@@ -18,7 +18,6 @@
* under the License.
*
*************************************************************/
-using namespace std;
#include <iostream>
#include "gLang.hxx"
@@ -59,34 +58,34 @@ void handler::checkCommandLine(int argc,
{
// check for parameter count
if (argc <= 1)
- throw string("");
+ throw std::string("");
// check for working mode
- string meWorkText(argv[1]);
+ std::string meWorkText(argv[1]);
if (meWorkText == "extract") meWorkMode = DO_EXTRACT;
else if (meWorkText == "merge") meWorkMode = DO_MERGE;
else if (meWorkText == "generate") meWorkMode = DO_GENERATE;
else if (meWorkText == "insert") meWorkMode = DO_INSERT;
- else if (meWorkText == "--help") throw string("");
- else throw string("unknown mode (1 argument)");
+ else if (meWorkText == "--help") throw std::string("");
+ else throw std::string("unknown mode (1 argument)");
// decode parameters and translate to variables
for (int n = 2; n < argc; ++n)
{
- string sArg(argv[n]);
+ std::string sArg(argv[n]);
// all -x is followed by a directory
if (sArg.at(0) == '-')
{
if (n == argc)
- throw string("missing directory after ")+sArg;
+ throw std::string("missing directory after ")+sArg;
// find directory type, and set it
if (sArg == "-m") msModuleName = argv[++n];
else if (sArg == "-t") msTargetDir = argv[++n];
else if (sArg == "-s") msSourceDir = argv[++n];
- else throw string("unknown parameter: ")+sArg;
+ else throw std::string("unknown parameter: ")+sArg;
}
else
msSourceFiles.push_back(sArg);
@@ -97,52 +96,52 @@ void handler::checkCommandLine(int argc,
{
case DO_EXTRACT:
// required parameters
- if (!msModuleName.size()) throw string("missing -m <module name>");
- if (!msTargetDir.size()) throw string("missing -t <target dir>");
- if (!msSourceFiles.size()) throw string("missing source files");
+ if (!msModuleName.size()) throw std::string("missing -m <module name>");
+ if (!msTargetDir.size()) throw std::string("missing -t <target dir>");
+ if (!msSourceFiles.size()) throw std::string("missing source files");
break;
case DO_MERGE:
// required parameters
- if (!msSourceDir.size()) throw string("missing -s <source dir>");
- if (!msTargetDir.size()) throw string("missing -t <target dir>");
+ if (!msSourceDir.size()) throw std::string("missing -s <source dir>");
+ if (!msTargetDir.size()) throw std::string("missing -t <target dir>");
// not allowed parameters
- if (msModuleName.size()) throw string("-m is invalid with merge");
- if (msSourceFiles.size()) throw string("<source> is invalid with merge");
+ if (msModuleName.size()) throw std::string("-m is invalid with merge");
+ if (msSourceFiles.size()) throw std::string("<source> is invalid with merge");
break;
case DO_GENERATE:
// required parameters
- if (!msSourceDir.size()) throw string("missing -s <source dir>");
- if (!msTargetDir.size()) throw string("missing -t <target dir>");
+ if (!msSourceDir.size()) throw std::string("missing -s <source dir>");
+ if (!msTargetDir.size()) throw std::string("missing -t <target dir>");
// not allowed parameters
- if (msModuleName.size()) throw string("-m is invalid with generate");
- if (!msSourceFiles.size()) throw string("<source> is invalid with generate");
+ if (msModuleName.size()) throw std::string("-m is invalid with generate");
+ if (!msSourceFiles.size()) throw std::string("<source> is invalid with generate");
break;
case DO_INSERT:
// required parameters
- if (!msModuleName.size()) throw string("missing -m <module name>");
- if (!msSourceDir.size()) throw string("missing -s <source dir>");
+ if (!msModuleName.size()) throw std::string("missing -m <module name>");
+ if (!msSourceDir.size()) throw std::string("missing -s <source dir>");
// not allowed parameters
- if (!msSourceFiles.size()) throw string("<source> is invalid with generate");
+ if (!msSourceFiles.size()) throw std::string("<source> is invalid with generate");
break;
case DO_NONE:
- throw string("unknown mode (1 argument)");
+ throw std::string("unknown mode (1 argument)");
}
}
- catch(string sErr)
+ catch(std::string sErr)
{
// do we have an error text ?
if (sErr.size())
- cerr << "commandline error:" << sErr << endl;
+ std::cerr << "commandline error:" << sErr << std::endl;
// give the correct usage
- cout << "genLang (c)2012 by Apache Software Foundation\n"
+ std::cout << "genLang (c)2012 by Apache Software Foundation\n"
"====================================\n"
"As part of the L10N framework, genLang extracts and merges translations\n"
"out of and into the whole source tree.\n\n"
@@ -202,12 +201,12 @@ void handler::run()
case DO_MERGE: runMerge(); break;
case DO_GENERATE: runGenerate(); break;
case DO_INSERT: runInsert(); break;
- case DO_NONE: throw string("INTERNAL ERROR, checkCommandLine not called!!!");
+ case DO_NONE: throw std::string("INTERNAL ERROR, checkCommandLine not called!!!");
}
}
- catch(string sErr)
+ catch(std::string sErr)
{
- cerr << "runtime error: " << sErr << endl;
+ std::cerr << "runtime error: " << sErr << std::endl;
exit(-1);
}
}
@@ -221,7 +220,7 @@ void handler::runExtract()
mcMemory.setModuleName(msModuleName);
// loop through all source files, and extract messages from each file
- for (vector<string>::iterator siSource = msSourceFiles.begin(); siSource != msSourceFiles.end(); ++siSource)
+ for (std::vector<std::string>::iterator siSource = msSourceFiles.begin(); siSource != msSourceFiles.end(); ++siSource)
{
// JIX JUST FOR TEST
mcMemory.clear();
@@ -242,7 +241,7 @@ void handler::runExtract()
/********************** I M P L E M E N T A T I O N **********************/
void handler::runMerge()
{
- throw string("handler::runMerge not implemented");
+ throw std::string("handler::runMerge not implemented");
}
@@ -250,7 +249,7 @@ void handler::runMerge()
/********************** I M P L E M E N T A T I O N **********************/
void handler::runGenerate()
{
- throw string("handler::runGenerate not implemented");
+ throw std::string("handler::runGenerate not implemented");
}
@@ -258,5 +257,5 @@ void handler::runGenerate()
/********************** I M P L E M E N T A T I O N **********************/
void handler::runInsert()
{
- throw string("handler::runInsert not implemented");
+ throw std::string("handler::runInsert not implemented");
}
Modified: openoffice/branches/l10n/main/l10ntools/source/gL10nMem.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gL10nMem.cxx?rev=1443640&r1=1443639&r2=1443640&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gL10nMem.cxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gL10nMem.cxx Thu Feb 7 18:15:33 2013
@@ -18,7 +18,6 @@
* under the License.
*
*************************************************************/
-using namespace std;
#include "gLang.hxx"
@@ -33,9 +32,9 @@ using namespace std;
/********************** I M P L E M E N T A T I O N **********************/
-l10nMem_entry::l10nMem_entry(const string& srSourceFile, const string& srModuleName,
- const string& srKey, const string& srLanguage,
- const string& srText)
+l10nMem_entry::l10nMem_entry(const std::string& srSourceFile, const std::string& srModuleName,
+ const std::string& srKey, const std::string& srLanguage,
+ const std::string& srText)
: msSourceFile(srSourceFile),
msModuleName(srModuleName),
msKey(srKey),
@@ -71,14 +70,14 @@ l10nMem::~l10nMem()
/********************** I M P L E M E N T A T I O N **********************/
-void l10nMem::save(const string& srTargetFile)
+void l10nMem::save(const std::string& srTargetFile)
{
int i;
- cout << "--------------- dump of l10n " << srTargetFile << "-----------------" << endl;
+ std::cout << "--------------- dump of l10n " << srTargetFile << "-----------------" << std::endl;
for (i = 0; i < (int)mcMemory.size(); ++i)
- cout << "key: " << mcMemory[i].msKey << " text: " << mcMemory[i].msText << endl;
+ std::cout << "key: " << mcMemory[i].msKey << " text: " << mcMemory[i].msText << std::endl;
// JIX
}
@@ -87,7 +86,7 @@ void l10nMem::save(const string& srTarge
/********************** I M P L E M E N T A T I O N **********************/
void l10nMem::clear()
{
- cout << "--------------- clear of l10n -----------------" << endl;
+ std::cout << "--------------- clear of l10n -----------------" << std::endl;
mcMemory.clear();
// JIX
@@ -96,7 +95,7 @@ void l10nMem::clear()
/********************** I M P L E M E N T A T I O N **********************/
-void l10nMem::setFileName(const string& srSourceFile)
+void l10nMem::setFileName(const std::string& srSourceFile)
{
msCurrentSourceFileName = srSourceFile;
}
@@ -104,7 +103,7 @@ void l10nMem::setFileName(const string&
/********************** I M P L E M E N T A T I O N **********************/
-void l10nMem::setModuleName(const string& srModuleName)
+void l10nMem::setModuleName(const std::string& srModuleName)
{
msCurrentModuleName = srModuleName;
}
@@ -112,9 +111,9 @@ void l10nMem::setModuleName(const string
/********************** I M P L E M E N T A T I O N **********************/
-void l10nMem::setEnUsKey(const string& srKey, const string& srText)
+void l10nMem::setEnUsKey(const std::string& srKey, const std::string& srText)
{
- string baseLanguage = "en-US";
+ std::string baseLanguage = "en-US";
mcMemory.push_back(l10nMem_entry(msCurrentSourceFileName, msCurrentModuleName,
srKey, baseLanguage, srText));
}
@@ -122,7 +121,7 @@ void l10nMem::setEnUsKey(const string& s
/********************** I M P L E M E N T A T I O N **********************/
-vector<l10nMem_entry *>& l10nMem::getLanguagesForKey(const string& srKey)
+std::vector<l10nMem_entry *>& l10nMem::getLanguagesForKey(const std::string& srKey)
{
int nL = mcMemory.size();
Modified: openoffice/branches/l10n/main/l10ntools/source/gLang.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gLang.cxx?rev=1443640&r1=1443639&r2=1443640&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gLang.cxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gLang.cxx Thu Feb 7 18:15:33 2013
@@ -18,7 +18,6 @@
* under the License.
*
*************************************************************/
-using namespace std;
#include "gLang.hxx"
Modified: openoffice/branches/l10n/main/l10ntools/source/gLang.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gLang.hxx?rev=1443640&r1=1443639&r2=1443640&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gLang.hxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gLang.hxx Thu Feb 7 18:15:33 2013
@@ -42,15 +42,15 @@
class l10nMem_entry
{
public:
- l10nMem_entry(const string& srSourceFile, const string& srModuleName, const string& srKey,
- const string& srLanguage, const string& srText);
+ l10nMem_entry(const std::string& srSourceFile, const std::string& srModuleName, const std::string& srKey,
+ const std::string& srLanguage, const std::string& srText);
~l10nMem_entry();
- string msSourceFile;
- string msModuleName;
- string msKey;
- string msLanguage;
- string msText;
+ std::string msSourceFile;
+ std::string msModuleName;
+ std::string msKey;
+ std::string msLanguage;
+ std::string msText;
private:
};
@@ -63,18 +63,18 @@ class l10nMem
l10nMem();
~l10nMem();
- void save(const string& srTargetFile);
+ void save(const std::string& srTargetFile);
void clear();
- void setFileName(const string& srSourceFile);
- void setModuleName(const string& srModuleName);
- void setEnUsKey(const string& srKey, const string& srText);
- vector<l10nMem_entry *>& getLanguagesForKey(const string& srKey);
+ void setFileName(const std::string& srSourceFile);
+ void setModuleName(const std::string& srModuleName);
+ void setEnUsKey(const std::string& srKey, const std::string& srText);
+ std::vector<l10nMem_entry *>& getLanguagesForKey(const std::string& srKey);
private:
- string msCurrentModuleName;
- string msCurrentSourceFileName;
- vector<l10nMem_entry *> mcCurrentSelection;
- vector<l10nMem_entry> mcMemory;
+ std::string msCurrentModuleName;
+ std::string msCurrentSourceFileName;
+ std::vector<l10nMem_entry *> mcCurrentSelection;
+ std::vector<l10nMem_entry> mcMemory;
};
@@ -83,24 +83,24 @@ class l10nMem
class convert_gen
{
public:
- convert_gen(const string& srSourceFile, l10nMem& crMemory);
+ convert_gen(const std::string& srSourceFile, l10nMem& crMemory);
virtual ~convert_gen();
- static convert_gen& getConverter(const string& srSourceFile, l10nMem& crMemory);
+ static convert_gen& getConverter(const std::string& srSourceFile, l10nMem& crMemory);
virtual void extract() = 0;
virtual void insert() = 0;
void lexRead (char *sBuf, int *nResult, int nMax_size);
- void lineRead(bool *bEof, string& line);
- void writeSourceFile(const string& line);
- void trim(string& line);
+ void lineRead(bool *bEof, std::string& line);
+ void writeSourceFile(const std::string& line);
+ void trim(std::string& line);
protected:
bool mbMergeMode;
- const string& msSourceFile;
- string msSourceBuffer;
+ const std::string& msSourceFile;
+ std::string msSourceBuffer;
int mnSourceReadIndex;
l10nMem& mcMemory;
@@ -117,7 +117,7 @@ class convert_po : public convert_gen
static convert_po_impl *mcpImpl;
- convert_po(const string& srSourceFile, l10nMem& crMemory);
+ convert_po(const std::string& srSourceFile, l10nMem& crMemory);
~convert_po();
void extract();
@@ -136,7 +136,7 @@ class convert_src : public convert_gen
static convert_src_impl *mcpImpl;
- convert_src(const string& srSourceFile, l10nMem& crMemory);
+ convert_src(const std::string& srSourceFile, l10nMem& crMemory);
~convert_src();
void extract();
@@ -155,7 +155,7 @@ class convert_hrc : public convert_gen
static convert_hrc_impl *mcpImpl;
- convert_hrc(const string& srSourceFile, l10nMem& crMemory);
+ convert_hrc(const std::string& srSourceFile, l10nMem& crMemory);
~convert_hrc();
void extract();
@@ -170,7 +170,7 @@ class convert_hrc : public convert_gen
class convert_tree : public convert_gen
{
public:
- convert_tree(const string& srSourceFile, l10nMem& crMemory);
+ convert_tree(const std::string& srSourceFile, l10nMem& crMemory);
~convert_tree();
void extract();
@@ -185,7 +185,7 @@ class convert_tree : public convert_gen
class convert_ulf : public convert_gen
{
public:
- convert_ulf(const string& srSourceFile, l10nMem& srMemory);
+ convert_ulf(const std::string& srSourceFile, l10nMem& srMemory);
~convert_ulf();
void extract();
@@ -205,7 +205,7 @@ class convert_xcu : public convert_gen
static convert_xcu_impl *mcpImpl;
- convert_xcu(const string& srSourceFile, l10nMem& crMemory);
+ convert_xcu(const std::string& srSourceFile, l10nMem& crMemory);
virtual ~convert_xcu();
virtual void extract();
@@ -224,7 +224,7 @@ class convert_xcs : public convert_gen
static convert_xcs_impl *mcpImpl;
- convert_xcs(const string& srSourceFile, l10nMem& srMemory);
+ convert_xcs(const std::string& srSourceFile, l10nMem& srMemory);
~convert_xcs();
void extract();
@@ -243,7 +243,7 @@ class convert_xrm : public convert_gen
static convert_xrm_impl *mcpImpl;
- convert_xrm(const string& srSourceFile, l10nMem& srMemory);
+ convert_xrm(const std::string& srSourceFile, l10nMem& srMemory);
~convert_xrm();
void extract();
@@ -262,7 +262,7 @@ class convert_xhp : public convert_gen
static convert_xhp_impl *mcpImpl;
- convert_xhp(const string& srSourceFile, l10nMem& crMemory);
+ convert_xhp(const std::string& srSourceFile, l10nMem& crMemory);
~convert_xhp();
void extract();
@@ -277,7 +277,7 @@ class convert_xhp : public convert_gen
class convert_properties : public convert_gen
{
public:
- convert_properties(const string& srSourceFile, l10nMem& crMemory);
+ convert_properties(const std::string& srSourceFile, l10nMem& crMemory);
~convert_properties();
void extract();
@@ -302,11 +302,11 @@ class handler
private:
enum {DO_NONE, DO_EXTRACT, DO_MERGE, DO_GENERATE, DO_INSERT} meWorkMode;
l10nMem mcMemory;
- string msModuleName;
- string msSourceDir;
- string msTargetDir;
+ std::string msModuleName;
+ std::string msSourceDir;
+ std::string msTargetDir;
bool mbDoNotCopy;
- vector<string> msSourceFiles;
+ std::vector<std::string> msSourceFiles;
void runExtract();
void runMerge();