Author: jani Date: Thu Feb 28 22:35:30 2013 New Revision: 1451405 URL: http://svn.apache.org/r1451405 Log: cleanup after extract test is finished, this source extracts all texts !
Modified: openoffice/branches/l10n/main/l10ntools/source/gCon.cxx openoffice/branches/l10n/main/l10ntools/source/gConSrc.hxx openoffice/branches/l10n/main/l10ntools/source/gConSrcWrap.cxx openoffice/branches/l10n/main/l10ntools/source/gConXhpWrap.cxx openoffice/branches/l10n/main/l10ntools/source/gL10nMem.cxx Modified: openoffice/branches/l10n/main/l10ntools/source/gCon.cxx URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gCon.cxx?rev=1451405&r1=1451404&r2=1451405&view=diff ============================================================================== --- openoffice/branches/l10n/main/l10ntools/source/gCon.cxx (original) +++ openoffice/branches/l10n/main/l10ntools/source/gCon.cxx Thu Feb 28 22:35:30 2013 @@ -124,7 +124,7 @@ void convert_gen_impl::prepareFile() if (!inputFile.is_open()) - throw showError("Cannot open file"); + throw showError((char *)"Cannot open file"); // get length of file: mnSourceReadIndex = 0; @@ -135,7 +135,7 @@ void convert_gen_impl::prepareFile() // 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 showError("cannot read whole file"); + throw showError((char *)"cannot read whole file"); inputFile.close(); } Modified: openoffice/branches/l10n/main/l10ntools/source/gConSrc.hxx URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConSrc.hxx?rev=1451405&r1=1451404&r2=1451405&view=diff ============================================================================== --- openoffice/branches/l10n/main/l10ntools/source/gConSrc.hxx (original) +++ openoffice/branches/l10n/main/l10ntools/source/gConSrc.hxx Thu Feb 28 22:35:30 2013 @@ -64,8 +64,8 @@ class convert_src : public convert_gen_i bool mbExpectMacro; bool mbAutoPush; bool mbValuePresent; - bool mbInListItem; bool mbInList; + bool mbInListItem; int miListCount; int miMacroLevel; void execute(); Modified: openoffice/branches/l10n/main/l10ntools/source/gConSrcWrap.cxx URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConSrcWrap.cxx?rev=1451405&r1=1451404&r2=1451405&view=diff ============================================================================== --- openoffice/branches/l10n/main/l10ntools/source/gConSrcWrap.cxx (original) +++ openoffice/branches/l10n/main/l10ntools/source/gConSrcWrap.cxx Thu Feb 28 22:35:30 2013 @@ -37,10 +37,10 @@ /************ I N T E R F A C E I M P L E M E N T A T I O N ************/ convert_src::convert_src(l10nMem& crMemory) : convert_gen_impl(crMemory), + mbExpectValue(false), mbEnUs(false), mbExpectName(false), mbExpectMacro(false), - mbExpectValue(false), mbAutoPush(false), mbValuePresent(false), mbInList(false), @@ -76,8 +76,8 @@ void convert_src::setValue(char *syyText if (mbInList && !mbInListItem) { - setListItem("", true); - setListItem("", false); + setListItem((char *)"", true); + setListItem((char *)"", false); } msValue = sbuildValue; mbValuePresent = true; @@ -285,8 +285,6 @@ void convert_src::setListItem(char *syyT mcStack.pop_back(); if (mbExpectName) { - std::stringstream ssBuf; - ssBuf << miListCount; msName = "item" + ssBuf.str(); } Modified: openoffice/branches/l10n/main/l10ntools/source/gConXhpWrap.cxx URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConXhpWrap.cxx?rev=1451405&r1=1451404&r2=1451405&view=diff ============================================================================== --- openoffice/branches/l10n/main/l10ntools/source/gConXhpWrap.cxx (original) +++ openoffice/branches/l10n/main/l10ntools/source/gConXhpWrap.cxx Thu Feb 28 22:35:30 2013 @@ -114,6 +114,9 @@ void convert_xhp::closeTag(char *yytext) msKey.clear(); meExpectValue = VALUE_NOT_USED; break; + case VALUE_NOT_USED: + case VALUE_IS_VALUE: + break; } } @@ -142,6 +145,10 @@ void convert_xhp::setId(char *yytext) msCollector.insert(nX + nE, "\\"); msCollector.insert(nX + nL, "\\"); break; + + case VALUE_NOT_USED: + case VALUE_IS_VALUE: + break; } } @@ -150,7 +157,7 @@ void convert_xhp::setId(char *yytext) /********************** I M P L E M E N T A T I O N **********************/ void convert_xhp::setLang(char *yytext) { - int nL, nE, nX = msCollector.size(); + int nL, nE; std::string sLang; std::string& sText = copySourceWithCollector(yytext); @@ -173,6 +180,11 @@ void convert_xhp::setLang(char *yytext) case VALUE_IS_VALUE_TAG: msCollector.erase(msCollector.size() - sText.size() -1); break; + + case VALUE_NOT_USED: + case VALUE_IS_TAG_TRANS: + case VALUE_IS_VALUE: + break; } } @@ -201,6 +213,10 @@ void convert_xhp::setRef(char *yytext) msCollector.insert(nX + nE, "\\"); msCollector.insert(nX + nL, "\\"); break; + + case VALUE_NOT_USED: + VALUE_IS_VALUE: + break; } } Modified: openoffice/branches/l10n/main/l10ntools/source/gL10nMem.cxx URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gL10nMem.cxx?rev=1451405&r1=1451404&r2=1451405&view=diff ============================================================================== --- openoffice/branches/l10n/main/l10ntools/source/gL10nMem.cxx (original) +++ openoffice/branches/l10n/main/l10ntools/source/gL10nMem.cxx Thu Feb 28 22:35:30 2013 @@ -177,6 +177,8 @@ void l10nMem::setEnUsKey(int iLineNo, co std::string baseLanguage = "en-US"; std::string myKey = srKey; + iLineNo; + if (!checkKey(srKey, srObjectType)) { std::stringstream ssBuf;