Author: jani
Date: Sun Dec  2 20:38:26 2012
New Revision: 1416252

URL: http://svn.apache.org/viewvc?rev=1416252&view=rev
Log:
xcu handler works

Added:
    openoffice/branches/l10n/main/l10ntools/source/gHandler.cxx   (with props)
    openoffice/branches/l10n/main/l10ntools/source/gL10nMem.cxx   (with props)
    openoffice/branches/l10n/main/l10ntools/source/gLang.cxx   (with props)
    openoffice/branches/l10n/main/l10ntools/source/gLang.hxx   (with props)
Modified:
    openoffice/branches/l10n/main/l10ntools/source/gConXcuWrap.cxx

Modified: openoffice/branches/l10n/main/l10ntools/source/gConXcuWrap.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gConXcuWrap.cxx?rev=1416252&r1=1416251&r2=1416252&view=diff
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gConXcuWrap.cxx (original)
+++ openoffice/branches/l10n/main/l10ntools/source/gConXcuWrap.cxx Sun Dec  2 
20:38:26 2012
@@ -91,51 +91,35 @@ 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)
 {
-  string sHead, sKey, sLang, sText;
-  int    nL;
+  string useKey;
 
-#if 0
-  // 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);
-  }
 
   // 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);
+  while (mcStack.size())
+  {
+    xcu_stack_entry nowEntry = mcStack.top();
+       mcStack.pop();
+       useKey = useKey + nowEntry.msName;
+  }
 
   if (mbMergeMode)
   {
     // get all languages (includes en-US)
-    vector<l10nMem_entry *>& cExtraLangauges = 
mcMemory.getLanguagesForKey(sKey);
+    vector<l10nMem_entry *>& cExtraLangauges = 
mcMemory.getLanguagesForKey(useKey);
     string                   sNewLine;
     int                      nL = cExtraLangauges.size();
 
-    writeSourceFile(msCollector);
-    msCollector.clear();
+       writeSourceFile(msCollector + sCollectedText);
     for (int i = 0; i < nL; ++i)
     {
-      sNewLine = "\n<" + sHead + " id=\"" + sKey + "\"" + " xml:lang=\"" +
-                 cExtraLangauges[i]->msLanguage + "\">" +
-                 cExtraLangauges[i]->msText +
-                 "</" + sHead + ">";
-
+      sNewLine = "<value xml:lang=\"" + cExtraLangauges[i]->msLanguage + "\">" 
+
+                        cExtraLangauges[i]->msText + "</value>";
       writeSourceFile(sNewLine);
     }
   }
   else
-    mcMemory.setEnUsKey(sKey, sText);
-#endif
+    mcMemory.setEnUsKey(useKey, sCollectedText);
+
   mbCollectingData = false;
   msCollector.clear();
 }  

Added: openoffice/branches/l10n/main/l10ntools/source/gHandler.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gHandler.cxx?rev=1416252&view=auto
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gHandler.cxx (added)
+++ openoffice/branches/l10n/main/l10ntools/source/gHandler.cxx Sun Dec  2 
20:38:26 2012
@@ -0,0 +1,259 @@
+/**************************************************************
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+using namespace std;
+#include <iostream>
+#include "gLang.hxx"
+
+
+
+/*****************************************************************************
+ ************************   G H A N D L E R . C X X   ************************
+ *****************************************************************************
+ * This is the control module, that interpret the command line and implement
+ * the different work types 
+ *     extract / merge / generate / insert
+ *****************************************************************************/
+
+
+
+/**********************   I M P L E M E N T A T I O N   **********************/
+handler::handler()
+                : meWorkMode(DO_NONE),
+                  mbDoNotCopy(false)
+{
+  // clear translation memory
+}
+
+
+
+/**********************   I M P L E M E N T A T I O N   **********************/
+handler::~handler()
+{
+}
+
+
+
+/**********************   I M P L E M E N T A T I O N   **********************/
+void handler::checkCommandLine(int argc, char *argv[])
+{
+  // make internal throw test (to avoid if cascades
+  try
+  {
+    // check for parameter count
+    if (argc <= 1)
+      throw string("");
+
+    // check for working mode
+    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)");
+
+    // decode parameters and translate to variables
+    for (int n = 2; n < argc; ++n)
+    {
+      string sArg(argv[n]);
+
+      // all -x is followed by a directory
+      if (sArg.at(0) == '-')
+      {
+        if (n == argc)
+          throw 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
+        msSourceFiles.push_back(sArg);
+    }
+
+    // check parameters according to function
+    switch (meWorkMode)
+    {
+      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");
+           break;
+
+      case DO_MERGE:
+           // required parameters
+           if (!msSourceDir.size())   throw string("missing -s <source dir>");
+           if (!msTargetDir.size())   throw 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");
+           break;
+
+      case DO_GENERATE:
+           // required parameters
+           if (!msSourceDir.size())   throw string("missing -s <source dir>");
+           if (!msTargetDir.size())   throw 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");
+           break;
+
+      case DO_INSERT:
+           // required parameters
+           if (!msModuleName.size())  throw string("missing -m <module name>");
+           if (!msSourceDir.size())   throw string("missing -s <source dir>");
+
+           // not allowed parameters
+           if (!msSourceFiles.size()) throw string("<source> is invalid with 
generate");
+           break;
+
+      case DO_NONE:
+           throw string("unknown mode (1 argument)");
+    }
+  }
+  catch(string sErr)
+  {
+    // do we have an error text ?
+    if (sErr.size())
+      cerr << "commandline error:" << sErr << endl;
+
+    // give the correct usage
+    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"
+            "Syntax:\n"
+            "  genLang extract -m <name> [-s <source dir>] -t <target dir> 
<sources>\n"
+            "  genLang merge   -s <source dir> -t <target dir>\n"
+            "  genLang generate -s <source dir> -t <target dir>\n"
+            "  genLang insert  -s <source dir> -m <name> [-t <target dir>]\n"
+            "  genLang --help\n"
+            "Parameters:\n"
+            "  extract,  causes a scan of the <sources> for en-US text, and 
creates\n"
+            "            a module file:  <target dir>/<module name>\n"
+            "            -s can optionally be used to specify the root of 
<source>\n"
+            "  merge,    causes a merge of the en-US files in <source dir> 
with the\n"
+            "            native language files in <target dir>/*\n"
+            "  generate, uses the native language files in <source dir> to 
build\n"
+            "            module files in <target dir> with all language\n"
+            "  insert,   uses the module file <source dir>/<module name> to\n"
+            "            update the source files in the module"
+            "\n"
+            "  -m <modulename>   name of the module, used in file naming\n"
+            "  -s <source dir>   extract:  source file directory\n"
+            "                    merge:    language staging input directory\n"
+            "                    generate: native language directory\n"
+            "                    insert:   language staging output directory\n"
+            "  -t <target dir>   extract:  language staging input directory\n"
+            "                    merge:    native language directory\n"
+            "                    generate: language output staging directory\n"
+            "  <sources>         list of files containing messages to be 
extracted\n";
+    exit(-1);
+  }
+
+  // update directories to include final /
+  {
+    int nLen;
+
+    nLen = msSourceDir.size();
+    if (nLen && msSourceDir.at(nLen-1) != '/')
+      msSourceDir.append("/");
+    nLen = msTargetDir.size();
+    if (msTargetDir.at(nLen-1) != '/')
+      msTargetDir.append("/");
+  }
+}
+
+
+
+/**********************   I M P L E M E N T A T I O N   **********************/
+void handler::run()
+{
+  try
+  {
+    // use workMode to start correct control part
+    switch (meWorkMode)
+    {
+      case DO_EXTRACT:  runExtract();  break;
+      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!!!");
+    }
+  }
+  catch(string sErr)
+  {
+    cerr << "runtime error: " << sErr << endl;
+    exit(-1);
+  }
+}
+
+
+
+/**********************   I M P L E M E N T A T I O N   **********************/
+void handler::runExtract()
+{
+  // prepare translation memory to module type
+  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)
+  {
+    // prepare translation memory
+    mcMemory.setFileName(*siSource);
+
+    // get converter and extract files
+    convert_gen::getConverter(msSourceDir + *siSource, mcMemory).extract();
+  }
+
+  // and generate language file
+  mcMemory.save(msTargetDir + msModuleName);
+}
+
+
+
+/**********************   I M P L E M E N T A T I O N   **********************/
+void handler::runMerge()
+{
+  throw string("handler::runMerge not implemented");
+}
+
+
+
+/**********************   I M P L E M E N T A T I O N   **********************/
+void handler::runGenerate()
+{
+  throw string("handler::runGenerate not implemented");
+}
+
+
+
+/**********************   I M P L E M E N T A T I O N   **********************/
+void handler::runInsert()
+{
+  throw string("handler::runInsert not implemented");
+}

Propchange: openoffice/branches/l10n/main/l10ntools/source/gHandler.cxx
------------------------------------------------------------------------------
    svn:executable = *

Added: openoffice/branches/l10n/main/l10ntools/source/gL10nMem.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gL10nMem.cxx?rev=1416252&view=auto
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gL10nMem.cxx (added)
+++ openoffice/branches/l10n/main/l10ntools/source/gL10nMem.cxx Sun Dec  2 
20:38:26 2012
@@ -0,0 +1,124 @@
+/**************************************************************
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+using namespace std;
+#include "gLang.hxx"
+
+
+
+/*****************************************************************************
+ ************************   G L 1 0 N M E M . C X X   ************************
+ *****************************************************************************
+ * This is the translation memory that links between the converts (from source
+ * files) and to the language files. The memory contains the actual text info
+ *****************************************************************************/
+
+
+
+/**********************   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)
+                            : msSourceFile(srSourceFile),
+                              msModuleName(srModuleName),
+                              msKey(srKey),
+                              msLanguage(srLanguage),
+                              msText(srText)
+{
+}
+
+
+
+/**********************   I M P L E M E N T A T I O N   **********************/
+l10nMem_entry::~l10nMem_entry()
+{}
+
+
+
+/**********************   I M P L E M E N T A T I O N   **********************/
+l10nMem::l10nMem()
+{
+  mcMemory.push_back(l10nMem_entry("file1", "module1",
+                                   "key", "da", "hovsa"));
+  mcMemory.push_back(l10nMem_entry("file1", "module1",
+                                   "key", "ja", "hovsa"));
+}
+
+
+
+/**********************   I M P L E M E N T A T I O N   **********************/
+l10nMem::~l10nMem()
+{
+}
+
+
+
+/**********************   I M P L E M E N T A T I O N   **********************/
+void l10nMem::save(const string& srTargetFile)
+{
+  int i;
+
+  cout << "--------------- dump of l10n " << srTargetFile << 
"-----------------" << endl;
+
+  for (i = 0; i < (int)mcMemory.size(); ++i)
+    cout << "key: " << mcMemory[i].msKey << "  text: " << mcMemory[i].msText 
<< endl;
+  // JIX
+}
+
+
+
+/**********************   I M P L E M E N T A T I O N   **********************/
+void l10nMem::setFileName(const string& srSourceFile)
+{
+  msCurrentSourceFileName = srSourceFile;
+}
+
+
+
+/**********************   I M P L E M E N T A T I O N   **********************/
+void l10nMem::setModuleName(const string& srModuleName)
+{
+  msCurrentModuleName = srModuleName;
+}
+
+
+
+/**********************   I M P L E M E N T A T I O N   **********************/
+void l10nMem::setEnUsKey(const string& srKey, const string& srText)
+{
+  string baseLanguage = "en-US";
+  mcMemory.push_back(l10nMem_entry(msCurrentSourceFileName, 
msCurrentModuleName,
+                                   srKey, baseLanguage, srText));
+}
+
+
+
+/**********************   I M P L E M E N T A T I O N   **********************/
+vector<l10nMem_entry *>&  l10nMem::getLanguagesForKey(const string& srKey)
+{
+  int nL = mcMemory.size();
+
+  mcCurrentSelection.clear();
+  for (int i = 0; i < nL; ++i)
+    if (mcMemory[i].msLanguage != "en-US")
+      mcCurrentSelection.push_back(&mcMemory[i]);
+
+  return mcCurrentSelection;
+}

Propchange: openoffice/branches/l10n/main/l10ntools/source/gL10nMem.cxx
------------------------------------------------------------------------------
    svn:executable = *

Added: openoffice/branches/l10n/main/l10ntools/source/gLang.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gLang.cxx?rev=1416252&view=auto
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gLang.cxx (added)
+++ openoffice/branches/l10n/main/l10ntools/source/gLang.cxx Sun Dec  2 
20:38:26 2012
@@ -0,0 +1,50 @@
+/**************************************************************
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+using namespace std;
+#include "gLang.hxx"
+
+
+
+/*****************************************************************************
+ ***************************   G L A N G . C X X   ***************************
+ *****************************************************************************
+ * This is the main of the l10n localizer program, it is C based and call
+ * down to classes for handling.
+ *****************************************************************************/
+
+
+
+
+/**********************   I M P L E M E N T A T I O N   **********************/
+#if defined(UNX) || defined(OS2)
+int main(int argc, char *argv[])
+#else
+int _cdecl main(int argc, char *argv[])
+#endif
+{
+  handler cHandler;
+
+  // check command line (exit if problems)
+  cHandler.checkCommandLine(argc, argv);
+
+  // command line is ok, so execute it
+  cHandler.run();
+}

Propchange: openoffice/branches/l10n/main/l10ntools/source/gLang.cxx
------------------------------------------------------------------------------
    svn:executable = *

Added: openoffice/branches/l10n/main/l10ntools/source/gLang.hxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/l10n/main/l10ntools/source/gLang.hxx?rev=1416252&view=auto
==============================================================================
--- openoffice/branches/l10n/main/l10ntools/source/gLang.hxx (added)
+++ openoffice/branches/l10n/main/l10ntools/source/gLang.hxx Sun Dec  2 
20:38:26 2012
@@ -0,0 +1,276 @@
+/**************************************************************
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+#ifndef GLANG_HXX
+#define GLANG_HXX
+#include <cstdlib>
+#include <iostream>
+#include <fstream>
+#include <string>
+#include <vector>
+#include <queue>
+
+
+
+/*****************************************************************************
+ ***************************   G L A N G . H X X   ***************************
+ *****************************************************************************
+ * This is the class definition header of the l10n localizer program,
+ * all classes and their interrelations is defined here
+ *****************************************************************************/
+
+
+
+/********************   C L A S S   D E F I N I T I O N   ********************/
+class l10nMem_entry
+{
+  public:
+    l10nMem_entry(const string& srSourceFile, const string& srModuleName, 
const string& srKey,
+                  const string& srLanguage,   const string& srText);
+    ~l10nMem_entry();
+
+    string msSourceFile;
+    string msModuleName;
+    string msKey;
+    string msLanguage;
+    string msText;
+
+  private:
+};
+
+
+/********************   C L A S S   D E F I N I T I O N   ********************/
+class l10nMem
+{
+  public:
+    l10nMem();
+    ~l10nMem();
+
+    void save(const string& srTargetFile);
+    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);
+
+  private:
+    string                  msCurrentModuleName;
+    string                  msCurrentSourceFileName;
+    vector<l10nMem_entry *> mcCurrentSelection;
+    vector<l10nMem_entry>   mcMemory;
+};
+
+
+
+/********************   C L A S S   D E F I N I T I O N   ********************/
+class convert_gen
+{
+  public:
+    convert_gen(const string& srSourceFile, l10nMem& crMemory);
+    virtual ~convert_gen();
+    
+    static convert_gen& getConverter(const 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);
+
+
+  protected:
+    const string& msSourceFile;
+    string        msSourceBuffer;
+    int           mnSourceReadIndex;
+    l10nMem&      mcMemory;
+
+  private:
+};
+
+
+
+/********************   C L A S S   D E F I N I T I O N   ********************/
+class convert_src_impl;
+class convert_src : public convert_gen
+{
+  public:
+    static convert_src_impl *mcpImpl;
+
+
+    convert_src(const string& srSourceFile, l10nMem& crMemory);
+    ~convert_src();
+    
+    void extract();
+    void insert();
+
+  private:
+};
+
+
+
+/********************   C L A S S   D E F I N I T I O N   ********************/
+class convert_tree : public convert_gen
+{
+  public:
+    convert_tree(const string& srSourceFile, l10nMem& crMemory);
+    ~convert_tree();
+    
+    void extract();
+    void insert();
+
+  private:
+};
+
+
+
+/********************   C L A S S   D E F I N I T I O N   ********************/
+class convert_ulf : public convert_gen
+{
+  public:
+    convert_ulf(const string& srSourceFile, l10nMem& srMemory);
+    ~convert_ulf();
+    
+    void extract();
+    void insert();
+
+  private:
+    void handleLines(bool bMergeMode);
+};
+
+
+
+/********************   C L A S S   D E F I N I T I O N   ********************/
+class convert_xcu_impl;
+class convert_xcu : public convert_gen
+{
+  public:
+    static convert_xcu_impl *mcpImpl;
+
+
+    convert_xcu(const string& srSourceFile, l10nMem& crMemory);
+    virtual ~convert_xcu();
+    
+    virtual void extract();
+    virtual void insert();
+
+  private:
+};
+
+
+
+/********************   C L A S S   D E F I N I T I O N   ********************/
+class convert_xcs_impl;
+class convert_xcs : public convert_gen
+{
+  public:
+    static convert_xcs_impl *mcpImpl;
+
+
+    convert_xcs(const string& srSourceFile, l10nMem& srMemory);
+    ~convert_xcs();
+    
+    void extract();
+    void insert();
+
+  private:
+};
+
+
+
+/********************   C L A S S   D E F I N I T I O N   ********************/
+class convert_xrm_impl;
+class convert_xrm : public convert_gen
+{
+  public:
+    static convert_xrm_impl *mcpImpl;
+
+
+    convert_xrm(const string& srSourceFile, l10nMem& srMemory);
+    ~convert_xrm();
+    
+    void extract();
+    void insert();
+
+  private:
+};
+
+
+
+/********************   C L A S S   D E F I N I T I O N   ********************/
+class convert_xhp_impl;
+class convert_xhp : public convert_gen
+{
+  public:
+    static convert_xhp_impl *mcpImpl;
+
+
+    convert_xhp(const string& srSourceFile, l10nMem& crMemory);
+    ~convert_xhp();
+    
+    void extract();
+    void insert();
+
+  private:
+};
+
+
+
+/********************   C L A S S   D E F I N I T I O N   ********************/
+class convert_properties : public convert_gen
+{
+  public:
+    convert_properties(const string& srSourceFile, l10nMem& crMemory);
+    ~convert_properties();
+    
+    void extract();
+    void insert();
+
+  private:
+};
+
+
+
+/********************   C L A S S   D E F I N I T I O N   ********************/
+class handler
+{
+  public:
+
+    handler();
+    ~handler();
+
+    void checkCommandLine(int argc, char *argv[]);
+    void run();
+
+  private:
+    enum {DO_NONE, DO_EXTRACT, DO_MERGE, DO_GENERATE, DO_INSERT} meWorkMode;
+    l10nMem        mcMemory;
+    string         msModuleName;
+    string         msSourceDir;
+    string         msTargetDir;
+    bool           mbDoNotCopy;
+    vector<string> msSourceFiles;
+
+    void runExtract();
+    void runMerge();
+    void runGenerate();
+    void runInsert();
+};
+#endif

Propchange: openoffice/branches/l10n/main/l10ntools/source/gLang.hxx
------------------------------------------------------------------------------
    svn:executable = *


Reply via email to