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/23 18:43:55 UTC
svn commit: r1449378 - in /openoffice/branches/l10n/main/l10ntools/source:
gConSrcWrap.cxx gConSrclex.l gConXcu.hxx gConXcuWrap.cxx gConXculex.l
Author: jani
Date: Sat Feb 23 17:43:54 2013
New Revision: 1449378
URL: http://svn.apache.org/r1449378
Log:
xcu tested, and src updated. Ready for helpcontent2
Modified:
openoffice/branches/l10n/main/l10ntools/source/gConSrcWrap.cxx
openoffice/branches/l10n/main/l10ntools/source/gConSrclex.l
openoffice/branches/l10n/main/l10ntools/source/gConXcu.hxx
openoffice/branches/l10n/main/l10ntools/source/gConXcuWrap.cxx
openoffice/branches/l10n/main/l10ntools/source/gConXculex.l
Modified: openoffice/branches/l10n/main/l10ntools/source/gConSrcWrap.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConSrcWrap.cxx?rev=1449378&r1=1449377&r2=1449378&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConSrcWrap.cxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConSrcWrap.cxx Sat Feb 23 17:43:54 2013
@@ -208,7 +208,8 @@ void convert_src::setNL(char *syyText, b
if (!bMacro && mbExpectMacro)
{
- mcStack.pop_back();
+ if (mcStack.size())
+ mcStack.pop_back();
mbEnUs =
mbExpectMacro = false;
}
Modified: openoffice/branches/l10n/main/l10ntools/source/gConSrclex.l
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConSrclex.l?rev=1449378&r1=1449377&r2=1449378&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConSrclex.l (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConSrclex.l Sat Feb 23 17:43:54 2013
@@ -62,7 +62,7 @@ PRE ^[ \t]*
SUF [ \t\r\n]
SUFT [ \t\r\n\[]
SPACE [ \t]*
-IDENT ([a-zA-Z0-9_][ a-zA-Z0-9_\-\+\*(,&]*[a-zA-Z0-9)]|[0-9])
+IDENT ([a-zA-Z0-9_][ a-zA-Z0-9_\-\+\*(,&]*[a-zA-Z0-9)]|[a-zA-Z0-9_])
KEYID [a-zA-Z0-9_-]+
/******************* R U L E S D E F I N I T I O N S *******************/
@@ -211,7 +211,8 @@ KEYID [a-zA-Z0-9_-]+
{PRE}[tT][oO][oO][lL][bB][oO][xX][iI][tT][eE][mM]{SUF} |
{PRE}[tT][rR][iI][sS][tT][aA][tT][eE][bB][oO][xX]{SUF} |
{PRE}[wW][aA][rR][nN][iI][nN][gG][bB][oO][xX]{SUF} |
-{PRE}[wW][iI][nN][dD][oO][wW]{SUF} {
+{PRE}[wW][iI][nN][dD][oO][wW]{SUF} |
+{PRE}[wW][oO][rR][kK][wW][iI][nN][dD][oO][wW]{SUF} {
yyless(strlen(yytext)-1);
LOCptr->setCmd(yytext);
BEGIN(CMD);
@@ -226,11 +227,20 @@ KEYID [a-zA-Z0-9_-]+
IMPLptr->copySource(yytext);
}
+<CMD>"{" {
+ yyless(1);
+ BEGIN(INITIAL);
+}
+
<CMD>[\\\n/] {
yyless(1);
BEGIN(INITIAL);
}
+<CMD>. {
+ IMPLptr->showError("gCon encountered a translation problem in .src module");
+}
+
{PRE}[hH][eE][lL][pP][iI][dD]{SUF} {
Modified: openoffice/branches/l10n/main/l10ntools/source/gConXcu.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConXcu.hxx?rev=1449378&r1=1449377&r2=1449378&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConXcu.hxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConXcu.hxx Sat Feb 23 17:43:54 2013
@@ -42,7 +42,7 @@ class convert_xcu : public convert_gen_i
convert_xcu(l10nMem& crMemory);
~convert_xcu();
- void pushKey(char *syyText);
+ void pushKey(char *syyText, bool bIsComponent);
void popKey(char *syyText);
void startCollectData(char *syyText);
Modified: openoffice/branches/l10n/main/l10ntools/source/gConXcuWrap.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConXcuWrap.cxx?rev=1449378&r1=1449377&r2=1449378&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConXcuWrap.cxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConXcuWrap.cxx Sat Feb 23 17:43:54 2013
@@ -67,7 +67,7 @@ void convert_xcu::execute()
/********************** I M P L E M E N T A T I O N **********************/
-void convert_xcu::pushKey(char *syyText)
+void convert_xcu::pushKey(char *syyText, bool bIsComponent)
{
std::string sKey, sTag = copySource(syyText);
int nL, nE;
@@ -80,7 +80,7 @@ void convert_xcu::pushKey(char *syyText)
nL += 10;
nE = sTag.find("\"", nL);
if (nE != (int)std::string::npos)
- sKey = sTag.substr(nL, nE - nL);
+ sKey = (bIsComponent ? "." : "") + sTag.substr(nL, nE - nL);
}
mcStack.push_back(sKey);
}
@@ -139,7 +139,7 @@ void convert_xcu::stopCollectData(char *
// locate key and extract it
for (nL = 0; nL < (int)mcStack.size(); ++nL)
- useKey += "." + mcStack[nL];
+ useKey += (useKey.size() ? "." : "" ) + mcStack[nL];
if (mbMergeMode)
{
Modified: openoffice/branches/l10n/main/l10ntools/source/gConXculex.l
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConXculex.l?rev=1449378&r1=1449377&r2=1449378&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConXculex.l (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConXculex.l Sat Feb 23 17:43:54 2013
@@ -59,16 +59,21 @@
/*********************** H E L P E R M A C R O S ***********************/
SPACE [ \t]*
NAME {SPACE}"oor:name="\"[^\"]+\"{SPACE}
-
+FIN [^/>]*">"
/******************* R U L E S D E F I N I T I O N S *******************/
%%
-"<oor:component-data"{NAME} |
-"<prop"{NAME} |
-"<node"{NAME} {
- LOCptr->pushKey(yytext);
+"<oor:component-data"{NAME} {
+ LOCptr->pushKey(yytext, true);
+}
+
+
+
+"<prop"{NAME}{FIN} |
+"<node"{NAME}{FIN} {
+ LOCptr->pushKey(yytext, false);
}