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/05 18:58:45 UTC
svn commit: r1442679 - in /openoffice/branches/l10n/main/l10ntools/source:
gCon.cxx gConUlf.cxx gConXcs.cxx gConXcs.hxx gConXcu.hxx gConXcuWrap.cxx
gConXhp.hxx gConXhpWrap.cxx gConXhplex.l gConXrm.hxx gConXrmWrap.cxx
gConXrmlex.l gLang.hxx
Author: jani
Date: Tue Feb 5 17:58:45 2013
New Revision: 1442679
URL: http://svn.apache.org/viewvc?rev=1442679&view=rev
Log:
updated to speedy extract, wuth common func in gCon
Modified:
openoffice/branches/l10n/main/l10ntools/source/gCon.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/gConXcu.hxx
openoffice/branches/l10n/main/l10ntools/source/gConXcuWrap.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.hxx
openoffice/branches/l10n/main/l10ntools/source/gConXrmWrap.cxx
openoffice/branches/l10n/main/l10ntools/source/gConXrmlex.l
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=1442679&r1=1442678&r2=1442679&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gCon.cxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gCon.cxx Tue Feb 5 17:58:45 2013
@@ -138,7 +138,7 @@ void convert_gen::lineRead(bool *bEof, s
nNextLF = msSourceBuffer.size()+1;
// copy string
- line = msSourceBuffer.substr(mnSourceReadIndex, nNextLF - mnSourceReadIndex-1);
+ line = msSourceBuffer.substr(mnSourceReadIndex, nNextLF - mnSourceReadIndex);
mnSourceReadIndex = nNextLF +1;
*bEof = false;
return;
Modified: openoffice/branches/l10n/main/l10ntools/source/gConUlf.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConUlf.cxx?rev=1442679&r1=1442678&r2=1442679&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConUlf.cxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConUlf.cxx Tue Feb 5 17:58:45 2013
@@ -49,7 +49,8 @@ convert_ulf::~convert_ulf()
/*****************************************************************************/
void convert_ulf::extract()
{
- handleLines(false);
+ mbMergeMode = false;
+ handleLines();
}
@@ -57,17 +58,18 @@ void convert_ulf::extract()
/*****************************************************************************/
void convert_ulf::insert()
{
- handleLines(true);
+ mbMergeMode = true;
+ handleLines();
}
/*****************************************************************************/
-void convert_ulf::handleLines(bool bMergeMode)
+void convert_ulf::handleLines()
{
bool bEof, bMultiLineComment = false;
int nL;
- string sWorkLine, sOrgLine, sLanguage, sKey, sText;
+ string sWorkLine, sOrgLine, sKey, sText;
// loop through all lines
@@ -80,42 +82,40 @@ void convert_ulf::handleLines(bool bMerg
// copy line so the original can be copied
sWorkLine = sOrgLine;
sOrgLine += "\n";
+
+ if (mbMergeMode)
+ writeSourceFile(sOrgLine);
// check for end of multiLineComment
if (bMultiLineComment)
{
nL = sWorkLine.find("*/");
if (nL == string::npos)
- sWorkLine.erase();
- else
- {
- bMultiLineComment = false;
- sWorkLine.erase(0,nL+2);
- }
+ continue;
+
+ bMultiLineComment = false;
+ sWorkLine.erase(0,nL+2);
}
// check for start of comment
nL = sWorkLine.find("/*");
if (nL != string::npos)
{
- int nL2 = sWorkLine.find("*/");
- if (nL2 != string::npos)
- sWorkLine.erase(nL, nL2+2-nL);
- else
+ int nE = sWorkLine.find("*/");
+ if (nE == string::npos)
{
bMultiLineComment = true;
- sWorkLine.erase(nL);
+ continue;
}
+
+ // remove comment from line
+ sWorkLine.erase(nL, nE+2-nL);
}
// remove leading/trailing blanks and handle empty lines
trim(sWorkLine);
if (!sWorkLine.size())
- {
- if (bMergeMode)
- writeSourceFile(sOrgLine);
continue;
- }
// the format is:
// [key]
@@ -123,54 +123,45 @@ void convert_ulf::handleLines(bool bMerg
// check for key
if (sWorkLine[0] == '[')
- {
+ {
sKey = sWorkLine.substr(1, sWorkLine.size()-2);
+ continue;
+ }
- // copy line if merging
- if (bMergeMode)
- writeSourceFile(sOrgLine);
- }
- else
- {
- // must be language line
- nL = sWorkLine.find_first_of("=");
- if (nL == string::npos)
- throw "unknown format in " + msSourceFile + " missing = in line: " + sOrgLine;
- sLanguage = sWorkLine.substr(0, nL);
- trim(sLanguage);
-
- nL = sWorkLine.find_first_of("\"");
- if (nL == string::npos)
- throw "unknown format: <<" + sOrgLine + ">> missing '='";
- sText = sWorkLine.substr(nL+1, sWorkLine.size()-2);
+ // must be language line
+ nL = sWorkLine.find_first_of("=");
+ if (nL == string::npos)
+ throw "unknown format in " + msSourceFile + " missing = in line: " + sOrgLine;
+
+ nL = sWorkLine.find_first_of("\"");
+ if (nL == string::npos)
+ throw "unknown format: <<" + sOrgLine + ">> missing '='";
+
+ if (!mbMergeMode)
+ {
+ sText = sWorkLine.substr(nL+1, sWorkLine.size()-2);
trim(sText);
+ mcMemory.setEnUsKey(sKey, sText);
+ continue;
+ }
+
+ // copy line if merging or add to translation
+ {
+ // get all languages (includes en-US)
+ vector<l10nMem_entry *>& cExtraLangauges = mcMemory.getLanguagesForKey(sKey);
+ string sNewLine;
+ int nL = cExtraLangauges.size();
- // handle only en-US
- if (sLanguage != "en-US")
- continue;
- // copy line if merging or add to translation
- if (bMergeMode)
+ for (int i = 0; i < nL; ++i)
{
- // get all languages (includes en-US)
- vector<l10nMem_entry *>& cExtraLangauges = mcMemory.getLanguagesForKey(sKey);
- string sNewLine;
- int nL = cExtraLangauges.size();
-
-
- writeSourceFile(sOrgLine);
- for (int i = 0; i < nL; ++i)
- {
- sNewLine = cExtraLangauges[i]->msLanguage +
- " = \"" +
- cExtraLangauges[i]->msText +
- "\"\n";
+ sNewLine = cExtraLangauges[i]->msLanguage +
+ " = \"" +
+ cExtraLangauges[i]->msText +
+ "\"\n";
- writeSourceFile(sNewLine);
- }
+ writeSourceFile(sNewLine);
}
- else
- mcMemory.setEnUsKey(sKey, sText);
}
}
}
Modified: openoffice/branches/l10n/main/l10ntools/source/gConXcs.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConXcs.cxx?rev=1442679&r1=1442678&r2=1442679&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConXcs.cxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConXcs.cxx Tue Feb 5 17:58:45 2013
@@ -69,7 +69,7 @@ void convert_xcs_impl::extract()
mbMergeMode = false;
// run lex parser and build token tree
- runLex();
+ // CURRENTLY NOTHING TO TRANSLATE: runLex();
}
@@ -81,7 +81,7 @@ void convert_xcs_impl::insert()
mbMergeMode = true;
// run lex parser and build token tree
- runLex();
+ // CURRENTLY NOTHING TO TRANSLATE: 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=1442679&r1=1442678&r2=1442679&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConXcs.hxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConXcs.hxx Tue Feb 5 17:58:45 2013
@@ -46,7 +46,6 @@ class convert_xcs_impl : public convert_
void collectData(string& sCollectedText);
private:
- bool mbMergeMode;
bool mbCollectingData;
string msCollector;
string msKey;
Modified: openoffice/branches/l10n/main/l10ntools/source/gConXcu.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConXcu.hxx?rev=1442679&r1=1442678&r2=1442679&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConXcu.hxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConXcu.hxx Tue Feb 5 17:58:45 2013
@@ -65,7 +65,6 @@ class convert_xcu_impl : public convert_
private:
stack<xcu_stack_entry> mcStack;
- bool mbMergeMode;
bool mbCollectingData;
string msCollector;
Modified: openoffice/branches/l10n/main/l10ntools/source/gConXcuWrap.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConXcuWrap.cxx?rev=1442679&r1=1442678&r2=1442679&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConXcuWrap.cxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConXcuWrap.cxx Tue Feb 5 17:58:45 2013
@@ -47,27 +47,27 @@ 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)
{
- string sKey, sHead;
- int nL;
+ string sKey;
+ int nL, nE;
- // remember text for merge
- msCollector += sTag;
+ // write text for merge
+ if (mbMergeMode)
+ writeSourceFile(msCollector + sTag);
+ msCollector.clear();
// find key in tag
nL = sTag.find("oor:name=\"");
- if (nL != string::npos)
- sHead = sTag.substr(nL+10);
- else
+ if (nL == string::npos)
return;
// find end of key
- nL = sHead.find("\"");
- if (nL != string::npos)
- sKey = sHead.substr(0, nL);
- else
+ nL += 10;
+ nE = sTag.find("\"", nL);
+ if (nE == string::npos)
return;
+ sKey = sTag.substr(nL, nE - nL);
xcu_stack_entry newTag(bIsNode, sKey);
mcStack.push(newTag);
@@ -78,16 +78,14 @@ 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)
{
- // remember text for merge
- msCollector += sTag;
+ // write text for merge
+ if (mbMergeMode)
+ writeSourceFile(msCollector + sTag);
+ msCollector.clear();
// check for correct node/prop relations
if (mcStack.size())
mcStack.pop();
-
- if (mbMergeMode)
- writeSourceFile(msCollector);
- msCollector.clear();
}
@@ -96,10 +94,10 @@ void convert_xcu_impl::popKeyPart(TAG_TY
void convert_xcu_impl::startCollectData(string& sCollectedText)
{
if (mbMergeMode)
- writeSourceFile(msCollector);
+ writeSourceFile(msCollector+sCollectedText);
+ msCollector.clear();
mbCollectingData = true;
- msCollector.clear();
}
Modified: openoffice/branches/l10n/main/l10ntools/source/gConXhp.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConXhp.hxx?rev=1442679&r1=1442678&r2=1442679&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConXhp.hxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConXhp.hxx Tue Feb 5 17:58:45 2013
@@ -39,15 +39,15 @@ class convert_xhp_impl : public convert_
convert_xhp_impl(const string& srSourceFile, l10nMem& crMemory);
~convert_xhp_impl();
- void startCollectData(string& sCollectedText);
- void stopCollectData(string& sCollectedText);
+ void startCollectData(string& sType, string& sCollectedText);
+ void stopCollectData(string& sType, string& sCollectedText);
void collectData(string& sCollectedText);
private:
- bool mbMergeMode;
-
bool mbCollectingData;
string msCollector;
+ string msMergeType;
+ 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=1442679&r1=1442678&r2=1442679&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConXhpWrap.cxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConXhpWrap.cxx Tue Feb 5 17:58:45 2013
@@ -48,42 +48,37 @@ 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& sCollectedText)
+void convert_xhp_impl::startCollectData(string& sType, string& sCollectedText)
{
if (mbMergeMode)
- writeSourceFile(msCollector);
+ writeSourceFile(msCollector+sCollectedText);
+ msCollector.clear();
- mbCollectingData = true;
- msCollector = sCollectedText;
+ // Only start if tag is not imidiatly closed !
+ if (sCollectedText[sCollectedText.size()-2] != '/')
+ {
+ mbCollectingData = true;
+ msMergeType = sType;
+ msTag = sCollectedText;
+ }
}
/********************** I M P L E M E N T A T I O N **********************/
-void convert_xhp_impl::stopCollectData(string& sCollectedText)
+void convert_xhp_impl::stopCollectData(string& sType, string& sCollectedText)
{
- string sHead, sKey, sLang, sText;
+ string sKey;
int nL;
- // get type of tag
- msCollector += sCollectedText;
- nL = msCollector.find("<p");
- if (nL != string::npos)
- sHead = msCollector.substr(nL+1, 1);
- else
- {
- nL = msCollector.find("<h");
- sHead = msCollector.substr(nL+1, 2);
- }
+ // check tag match
+ if (sType != msMergeType)
+ throw "Conflicting tags: " + msTag + msCollector + sCollectedText;
// locate key and extract it
- nL = msCollector.find("id=") +4;
- sKey = msCollector.substr(nL, msCollector.find("\"", nL+1) - nL);
- nL = msCollector.find("xml:lang=\"") + 10;
- sLang = msCollector.substr(nL, msCollector.find("\"", nL+1) - nL);
- nL = msCollector.find(">") +1;
- sText = msCollector.substr(nL, msCollector.find("\"", nL+1) - nL);
+ nL = msTag.find("id=") +4;
+ sKey = msTag.substr(nL, msTag.find("\"", nL+1) - nL);
if (mbMergeMode)
{
@@ -92,20 +87,22 @@ void convert_xhp_impl::stopCollectData(s
string sNewLine;
int nL = cExtraLangauges.size();
- writeSourceFile(msCollector);
- msCollector.clear();
+ // write en-US entry
+ writeSourceFile(msCollector+sCollectedText);
+
+ // and all other languages for that key
for (int i = 0; i < nL; ++i)
{
- sNewLine = "\n<" + sHead + " id=\"" + sKey + "\"" + " xml:lang=\"" +
+ sNewLine = "\n<" + sType + " id=\"" + sKey + "\"" + " xml:lang=\"" +
cExtraLangauges[i]->msLanguage + "\">" +
cExtraLangauges[i]->msText +
- "</" + sHead + ">";
+ "</" + sType + ">";
writeSourceFile(sNewLine);
}
}
else
- mcMemory.setEnUsKey(sKey, sText);
+ mcMemory.setEnUsKey(sKey, msCollector);
mbCollectingData = false;
msCollector.clear();
Modified: openoffice/branches/l10n/main/l10ntools/source/gConXhplex.l
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConXhplex.l?rev=1442679&r1=1442678&r2=1442679&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConXhplex.l (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConXhplex.l Tue Feb 5 17:58:45 2013
@@ -59,16 +59,34 @@
/******************* R U L E S D E F I N I T I O N S *******************/
%%
-"<p"[^>]*> |
-"<h"[0-9][^>]*> {
+"<title"[^>]*> {
string text(yytext);
- convert_xhp::mcpImpl->startCollectData(text);
+ convert_xhp::mcpImpl->startCollectData(text.substr(1,5), text);
}
-"</p>" |
-"</h"[0-9]> {
+"<bookmark "[^>]*> {
string text(yytext);
- convert_xhp::mcpImpl->stopCollectData(text);
+ convert_xhp::mcpImpl->startCollectData(text.substr(1,8), text);
+}
+
+"<paragraph"[^>]*> {
+ string text(yytext);
+ convert_xhp::mcpImpl->startCollectData(text.substr(1,9), text);
+}
+
+"</paragraph>" {
+ string text(yytext);
+ convert_xhp::mcpImpl->stopCollectData(text.substr(2,9), text);
+}
+
+"</bookmark>" {
+ string text(yytext);
+ convert_xhp::mcpImpl->stopCollectData(text.substr(2,8), text);
+}
+
+"</title>" {
+ string text(yytext);
+ convert_xhp::mcpImpl->stopCollectData(text.substr(2,5), text);
}
.|\n {
Modified: openoffice/branches/l10n/main/l10ntools/source/gConXrm.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConXrm.hxx?rev=1442679&r1=1442678&r2=1442679&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConXrm.hxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConXrm.hxx Tue Feb 5 17:58:45 2013
@@ -39,15 +39,15 @@ class convert_xrm_impl : public convert_
convert_xrm_impl(const string& srSourceFile, l10nMem& crMemory);
~convert_xrm_impl();
- void startCollectData(string& sCollectedText);
- void stopCollectData(string& sCollectedText);
+ void startCollectData(string& sType, string& sCollectedText);
+ void stopCollectData(string& sType, string& sCollectedText);
void collectData(string& sCollectedText);
private:
- bool mbMergeMode;
-
- bool mbCollectingData;
+ bool mbCollectingData;
string msCollector;
+ string msTag;
+ 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=1442679&r1=1442678&r2=1442679&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConXrmWrap.cxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConXrmWrap.cxx Tue Feb 5 17:58:45 2013
@@ -49,45 +49,33 @@ 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& sCollectedText)
+void convert_xrm_impl::startCollectData(string& sType, string& sCollectedText)
{
if (mbMergeMode)
- writeSourceFile(msCollector);
+ writeSourceFile(msCollector+sCollectedText);
+ msCollector.clear();
mbCollectingData = true;
- msCollector = sCollectedText;
+ msMergeType = sType;
+ msTag = sCollectedText;
}
/********************** I M P L E M E N T A T I O N **********************/
-void convert_xrm_impl::stopCollectData(string& sCollectedText)
+void convert_xrm_impl::stopCollectData(string& sType, string& sCollectedText)
{
-static const char TEXT_P[] = "<p";
-static const char TEXT_H[] = "<h";
-static const char TEXT_ID[] = "id=";
- string sHead, sKey, sLang, sText;
+ string sKey;
int nL;
- // get type of tag
- msCollector += sCollectedText;
- nL = msCollector.find(TEXT_P);
- if (nL != string::npos)
- sHead = msCollector.substr(nL+1, 1);
- else
- {
- nL = msCollector.find(TEXT_H);
- sHead = msCollector.substr(nL+1, 2);
- }
+ // check tag match
+ if (sType != msMergeType)
+ throw "Conflicting tags: " + msTag + msCollector + sCollectedText;
// locate key and extract it
- nL = msCollector.find("id=") +4;
- sKey = msCollector.substr(nL, msCollector.find("\"", nL+1) - nL);
- nL = msCollector.find("xml:lang=\"") + 10;
- sLang = msCollector.substr(nL, msCollector.find("\"", nL+1) - nL);
- nL = msCollector.find(">") +1;
- sText = msCollector.substr(nL, msCollector.find("\"", nL+1) - nL);
+ nL = msTag.find("id=") +4;
+ sKey = msTag.substr(nL, msTag.find("\"", nL+1) - nL);
if (mbMergeMode)
{
@@ -96,20 +84,22 @@ static const char TEXT_ID[] = "id=";
string sNewLine;
int nL = cExtraLangauges.size();
- writeSourceFile(msCollector);
- msCollector.clear();
- for (int i = 0; i < nL; ++i)
+ // write en-US entry
+ writeSourceFile(msCollector+sCollectedText);
+
+ // and all other languages for that key
+ for (int i = 0; i < nL; ++i)
{
- sNewLine = "\n<" + sHead + " id=\"" + sKey + "\"" + " xml:lang=\"" +
+ sNewLine = "\n<" + sType + " id=\"" + sKey + "\"" + " xml:lang=\"" +
cExtraLangauges[i]->msLanguage + "\">" +
cExtraLangauges[i]->msText +
- "</" + sHead + ">";
+ "</" + sType + ">";
writeSourceFile(sNewLine);
}
}
else
- mcMemory.setEnUsKey(sKey, sText);
+ mcMemory.setEnUsKey(sKey, msCollector);
mbCollectingData = false;
msCollector.clear();
Modified: openoffice/branches/l10n/main/l10ntools/source/gConXrmlex.l
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConXrmlex.l?rev=1442679&r1=1442678&r2=1442679&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConXrmlex.l (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConXrmlex.l Tue Feb 5 17:58:45 2013
@@ -59,16 +59,24 @@
/******************* R U L E S D E F I N I T I O N S *******************/
%%
-"<p"[^>]*> |
+"<p"[^>]*> {
+ string text(yytext);
+ convert_xrm::mcpImpl->startCollectData(text.substr(1,1), text);
+}
+
"<h"[0-9][^>]*> {
string text(yytext);
- convert_xrm::mcpImpl->startCollectData(text);
+ convert_xrm::mcpImpl->startCollectData(text.substr(1,2), text);
+}
+
+"</p>" {
+ string text(yytext);
+ convert_xrm::mcpImpl->stopCollectData(text.substr(2,1), text);
}
-"</p>" |
"</h"[0-9]> {
string text(yytext);
- convert_xrm::mcpImpl->stopCollectData(text);
+ convert_xrm::mcpImpl->stopCollectData(text.substr(2,2), text);
}
.|\n {
Modified: openoffice/branches/l10n/main/l10ntools/source/gLang.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gLang.hxx?rev=1442679&r1=1442678&r2=1442679&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gLang.hxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gLang.hxx Tue Feb 5 17:58:45 2013
@@ -98,6 +98,7 @@ class convert_gen
protected:
+ bool mbMergeMode;
const string& msSourceFile;
string msSourceBuffer;
int mnSourceReadIndex;
@@ -172,7 +173,7 @@ class convert_ulf : public convert_gen
void insert();
private:
- void handleLines(bool bMergeMode);
+ void handleLines();
};