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/22 00:27:11 UTC

svn commit: r1448850 - in /openoffice/branches/l10n/main/l10ntools/source: gConSrcWrap.cxx gConSrclex.l gConXcuWrap.cxx gL10nMem.cxx

Author: jani
Date: Thu Feb 21 23:27:11 2013
New Revision: 1448850

URL: http://svn.apache.org/r1448850
Log:
change sdf format

Modified:
    openoffice/branches/l10n/main/l10ntools/source/gConSrcWrap.cxx
    openoffice/branches/l10n/main/l10ntools/source/gConSrclex.l
    openoffice/branches/l10n/main/l10ntools/source/gConXcuWrap.cxx
    openoffice/branches/l10n/main/l10ntools/source/gL10nMem.cxx

Modified: openoffice/branches/l10n/main/l10ntools/source/gConSrcWrap.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConSrcWrap.cxx?rev=1448850&r1=1448849&r2=1448850&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConSrcWrap.cxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConSrcWrap.cxx Thu Feb 21 23:27:11 2013
@@ -261,8 +261,8 @@ void convert_src::setListItem(char *syyT
     mbExpectName = false;
     mcStack.pop_back();
     ssBuf << ++miListCount;
-    if (msName.size())
-      ssBuf << "." << msName;
+//    if (msName.size())
+//      ssBuf << "." << msName;
     msName = ssBuf.str();
     mcStack.push_back(msName);
   }

Modified: openoffice/branches/l10n/main/l10ntools/source/gConSrclex.l
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConSrclex.l?rev=1448850&r1=1448849&r2=1448850&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConSrclex.l (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConSrclex.l Thu Feb 21 23:27:11 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)]|[0-9])
 KEYID [a-zA-Z0-9_-]+
 
 /*******************   R U L E S   D E F I N I T I O N S   *******************/
@@ -261,6 +261,7 @@ KEYID [a-zA-Z0-9_-]+
 {PRE}"#define"{SUF} {
   yyless(strlen(yytext)-1);
   LOCptr->setMacro(yytext);
+  BEGIN(CMD);
 }
 
 

Modified: openoffice/branches/l10n/main/l10ntools/source/gConXcuWrap.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConXcuWrap.cxx?rev=1448850&r1=1448849&r2=1448850&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConXcuWrap.cxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConXcuWrap.cxx Thu Feb 21 23:27:11 2013
@@ -139,7 +139,7 @@ void convert_xcu::stopCollectData(char *
 
   // locate key and extract it
   for (nL = 0; nL < (int)mcStack.size(); ++nL)
-    useKey += (nL > 0 ? "." : "") + mcStack[nL];
+    useKey += "." + mcStack[nL];
   
   if (mbMergeMode)
   {

Modified: openoffice/branches/l10n/main/l10ntools/source/gL10nMem.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gL10nMem.cxx?rev=1448850&r1=1448849&r2=1448850&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gL10nMem.cxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gL10nMem.cxx Thu Feb 21 23:27:11 2013
@@ -19,6 +19,7 @@
  * 
  *************************************************************/
 #include "gLang.hxx"
+#include <algorithm>
 #include <fstream>
 
 
@@ -72,7 +73,7 @@ l10nMem::~l10nMem()
 /**********************   I M P L E M E N T A T I O N   **********************/
 void l10nMem::save(const std::string& srTargetFile)
 {
-  int           i;
+  int           i, nL;
   std::string   sFile = srTargetFile + ".cnv";
   std::ofstream outputFile(sFile.c_str(), std::ios::binary);
 
@@ -82,12 +83,26 @@ void l10nMem::save(const std::string& sr
   
   for (i = 0; i < (int)mcMemory.size(); ++i)
   {
-  outputFile << mcMemory[i].msModuleName << "\t" << mcMemory[i].msSourceFile << "\t"
-             << mcMemory[i].msKey;
-  if (mcMemory[i].miIndex)
-    outputFile << "." << mcMemory[i].miIndex;
-  outputFile << "." << mcMemory[i].msObjectType << "\t" << mcMemory[i].msLanguage  << "\t"
-               << mcMemory[i].msText << std::endl;
+    std::replace( mcMemory[i].msSourceFile.begin(), mcMemory[i].msSourceFile.end(), '/', '\\' );
+    for (;;)
+    {
+      nL = mcMemory[i].msText.find("\\\"");
+      if (nL == (int)std::string::npos)
+        break;
+      mcMemory[i].msText.erase(nL,1);
+    }
+    for (;;)
+    {
+      nL = mcMemory[i].msText.find("\\\\");
+      if (nL == (int)std::string::npos)
+        break;
+      mcMemory[i].msText.erase(nL,1);
+    }
+    outputFile << mcMemory[i].msModuleName << "\t" << mcMemory[i].msSourceFile << "\t"
+               << mcMemory[i].msKey;
+    //if (mcMemory[i].miIndex)
+    //  outputFile << "." << mcMemory[i].miIndex;
+    outputFile << "\t" << mcMemory[i].msLanguage  << "\t" << mcMemory[i].msText << std::endl;
   }
   // JIX
 }