Commits

Anonymous committed 0a85724 Merge

jl158 merging with OOO330_m5

Comments (0)

Files changed (90)

 a61542f65727f9e64991c85056c22f890fd8934b OOO330_m1
 c85a59971620bc9e04ad689600ee9846f0f9dc18 OOO330_m2
 c605e94568651ba1b2626a6f37aa4c7ca4b4710f OOO330_m3
+03cf80e29979c28332a36bcb00a8947032433b3d OOO330_m4
+d9859c6e249e31fbd651f9a98c2fbe85d6f2df80 OOO330_m5

basegfx/source/polygon/b2dtrapezoid.cxx

 
             if(aSource.areControlPointsUsed())
             {
-                aSource = aSource.getDefaultAdaptiveSubdivision();
+	        const double fPrecisionFactor = 0.25;
+                aSource = adaptiveSubdivideByDistance( aSource, fLineWidth * fPrecisionFactor );
             }
 
             const sal_uInt32 nPointCount(aSource.count());

comphelper/inc/comphelper/storagehelper.hxx

 
     static sal_Bool IsValidZipEntryFileName( const ::rtl::OUString& aName, sal_Bool bSlashAllowed );
     static sal_Bool IsValidZipEntryFileName( const sal_Unicode *pChar, sal_Int32 nLength, sal_Bool bSlashAllowed );
+
+    static sal_Bool PathHasSegment( const ::rtl::OUString& aPath, const ::rtl::OUString& aSegment );
 };
 
 }

comphelper/source/misc/storagehelper.cxx

     return sal_True;
 }
 
+// ----------------------------------------------------------------------
+sal_Bool OStorageHelper::PathHasSegment( const ::rtl::OUString& aPath, const ::rtl::OUString& aSegment )
+{
+    sal_Bool bResult = sal_False;
+    const sal_Int32 nPathLen = aPath.getLength();
+    const sal_Int32 nSegLen = aSegment.getLength();
+
+    if ( nSegLen && nPathLen >= nSegLen )
+    {
+        ::rtl::OUString aEndSegment( RTL_CONSTASCII_USTRINGPARAM( "/" ) );
+        aEndSegment += aSegment;
+
+        ::rtl::OUString aInternalSegment( aEndSegment );
+        aInternalSegment += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/" ) );
+
+        if ( aPath.indexOf( aInternalSegment ) >= 0 )
+            bResult = sal_True;
+
+        if ( !bResult && !aPath.compareTo( aSegment, nSegLen ) )
+        {
+            if ( nPathLen == nSegLen || aPath.getStr()[nSegLen] == (sal_Unicode)'/' )
+                bResult = sal_True;
+        }
+
+        if ( !bResult && nPathLen > nSegLen && aPath.copy( nPathLen - nSegLen - 1, nSegLen + 1 ).equals( aEndSegment ) )
+            bResult = sal_True;
+    }
+
+    return bResult;
 }
 
+}
+

configmgr/source/rootaccess.cxx

         for (ChangesListeners::iterator i(changesListeners_.begin());
              i != changesListeners_.end(); ++i)
         {
+            cppu::OWeakObject* pSource = static_cast< cppu::OWeakObject * >(this);
+            css::uno::Reference< css::uno::XInterface > xBase( pSource, css::uno::UNO_QUERY );
             broadcaster->addChangesNotification(
                 *i,
                 css::util::ChangesEvent(
-                    static_cast< cppu::OWeakObject * >(this),
-                    css::uno::makeAny(pathRepresentation_), set));
+                    pSource, makeAny( xBase ), set));
         }
     }
 }

filter/source/xsltdialog/xmlfilterjar.cxx

 
 static Reference< XInterface > addFolder( Reference< XInterface >& xRootFolder, Reference< XSingleServiceFactory >& xFactory, const OUString& rName ) throw( Exception )
 {
+    if ( rName.equals( OUString( RTL_CONSTASCII_USTRINGPARAM( ".." ) ) )
+      || rName.equals( OUString( RTL_CONSTASCII_USTRINGPARAM( "." ) ) ) )
+        throw lang::IllegalArgumentException();
+
 	Sequence< Any > aArgs(1);
 	aArgs[0] <<= (sal_Bool)sal_True;
 
 	{
 		OUString szPackagePath( encodeZipUri( rURL.copy( sVndSunStarPackage.getLength() ) ) );
 
+        if ( ::comphelper::OStorageHelper::PathHasSegment( szPackagePath, OUString( RTL_CONSTASCII_USTRINGPARAM( ".." ) ) )
+          || ::comphelper::OStorageHelper::PathHasSegment( szPackagePath, OUString( RTL_CONSTASCII_USTRINGPARAM( "." ) ) ) )
+            throw lang::IllegalArgumentException();
+
 		if( xIfc->hasByHierarchicalName( szPackagePath ) )
 		{
 			Reference< XActiveDataSink > xFileEntry;

framework/source/accelerators/acceleratorconfiguration.cxx

 
 #include <svtools/acceleratorexecute.hxx>
 
+#include <stdio.h>
+
 //_______________________________________________
 // const
 
 
 	const sal_Int32 c = aEvent.Changes.getLength();
 	      sal_Int32 i = 0;
-
-	for (i=0; i<c; ++i)
+    for (i=0; i<c; ++i)
 	{
 		const css::util::ElementChange& aChange  =   aEvent.Changes[i];
 
 
         aChange.Accessor >>= sOrgPath;
         sPath              = sOrgPath;
-        ::rtl::OUString sPrimarySecondary = ::utl::extractFirstFromConfigurationPath(sPath);
-        sPath = ::utl::dropPrefixFromConfigurationPath(sPath, sPrimarySecondary);
-
-        ::rtl::OUString sGlobalModules = ::utl::extractFirstFromConfigurationPath(sPath);
-        sPath = ::utl::dropPrefixFromConfigurationPath(sPath, sGlobalModules);
-
+        ::rtl::OUString sPrimarySecondary = ::utl::extractFirstFromConfigurationPath(sPath, &sPath);
+        ::rtl::OUString sGlobalModules = ::utl::extractFirstFromConfigurationPath(sPath, &sPath);
+        
         if ( sGlobalModules.equals(CFG_ENTRY_GLOBAL) )
         {
             ::rtl::OUString sModule;
-            sKey = ::utl::extractFirstFromConfigurationPath(sPath);
-            if ( sKey.getLength() )
+            sKey = ::utl::extractFirstFromConfigurationPath(sPath, &sPath);
+            if (( sKey.getLength() > 0 ) && ( sPath.getLength() > 0 ))
                 reloadChanged(sPrimarySecondary, sGlobalModules, sModule, sKey);
         }
         else if ( sGlobalModules.equals(CFG_ENTRY_MODULES) )
         {
-            ::rtl::OUString sModule = ::utl::extractFirstFromConfigurationPath(sPath);
-            ::rtl::OUString sDropModule = ::rtl::OUString::createFromAscii("Module['") + sModule +  ::rtl::OUString::createFromAscii("']");
-            sPath = ::utl::dropPrefixFromConfigurationPath(sPath, sDropModule);
-            sKey = ::utl::extractFirstFromConfigurationPath(sPath);
-            if ( sKey.getLength() )
+            ::rtl::OUString sModule = ::utl::extractFirstFromConfigurationPath(sPath, &sPath);
+            sKey = ::utl::extractFirstFromConfigurationPath(sPath, &sPath);
+            
+            if (( sKey.getLength() > 0 ) && ( sPath.getLength() > 0 ))
+            {
                 reloadChanged(sPrimarySecondary, sGlobalModules, sModule, sKey);
+            }
         }
 	}
 }
                     aKeyEvent.Modifiers |= css::awt::KeyModifier::MOD1;
                 else if (sToken[k].equalsAscii("MOD2"))
                     aKeyEvent.Modifiers |= css::awt::KeyModifier::MOD2;
-		else if (sToken[k].equalsAscii("MOD3"))
-		    aKeyEvent.Modifiers |= css::awt::KeyModifier::MOD3;
+                else if (sToken[k].equalsAscii("MOD3"))
+		            aKeyEvent.Modifiers |= css::awt::KeyModifier::MOD3;
                 else
                 {
                     bValid = sal_False;

graphite/graphite-2.3.1.patch.mingw

  #include <assert.h>
 --- misc/silgraphite-2.3.1/wrappers/win32/WinFont.cpp	2009-01-29 17:33:19.000000000 +0900
 +++ misc/build/silgraphite-2.3.1/wrappers/win32/WinFont.cpp	2009-08-23 20:59:16.211375000 +0900
-@@ -408,7 +408,7 @@
- 					if (pPolyCurve->wType == TT_PRIM_QSPLINE &&
- 						// test if this is the last curve
- 						pPolyHdr->cb - (int)((byte *)(&pPolyCurve->apfx[j]) - (byte *)(pPolyHdr))
--							== sizeof POINTFX &&
-+							== sizeof(POINTFX) &&
- 						// and the two points are identical
- 						CompareFixed(pPolyCurve->apfx[j].x, pPolyHdr->pfxStart.x) &&
- 						CompareFixed(pPolyCurve->apfx[j].y, pPolyHdr->pfxStart.y))
 @@ -846,7 +846,7 @@
  
  } // namespace gr
Add a comment to this file

helpcontent2/source/auxiliary/no_localization

Empty file added.

javainstaller2/src/JavaSetup/org/openoffice/setup/InstallData.java

     static private boolean databaseQueried = false;
     static private boolean useRtl = false;
     static private boolean installedProductMinorSet = false;
+    static private boolean isDebianSystem = false;
+    static private boolean debianInvestigated = false;
     static private String installType;            /* custom or typical installation */
     static private String osType;                 /* Linux, SunOS, ...              */
     static private String installDir = null;
         installedProductMinorSet = value;
     }
 
+    public boolean debianInvestigated() {
+    	return debianInvestigated;
+    }
+
+    public void setDebianInvestigated(boolean value) {
+        debianInvestigated = value;
+    }
+
+    public boolean isDebianSystem() {
+    	return isDebianSystem;
+    }
+
+    public void setIsDebianSystem(boolean value) {
+        isDebianSystem = value;
+    }
+
     public boolean databaseQueried() {
     	return databaseQueried;
     }

javainstaller2/src/JavaSetup/org/openoffice/setup/Installer/LinuxInstaller.java

                 // already exists. These pacakges return true with methode "useForce()".
                 boolean useForce = false;
                 if ( packageData.useForce() ) {
-                	File sofficeLink = new File("/usr/bin/soffice");
-                	if ( sofficeLink.exists() ) { useForce = true; }
+                    File sofficeLink = new File("/usr/bin/soffice");
+                    if ( sofficeLink.exists() ) { useForce = true; }
+                }
+                
+                // On Debian based systems, rpms can be installed with the switch --force-debian, if a rpm
+                // is installed.
+
+                String forceDebianString = "";
+                String nodepsString = "";
+                
+                if ( ! data.debianInvestigated() ) {
+                    helper.investigateDebian(data);
+                    data.setDebianInvestigated(true);
+                }
+                
+                if ( data.isDebianSystem() ) {
+                    forceDebianString = "--force-debian";
+                    nodepsString = "--nodeps";
                 }
                 
                 String rpmCommand = "";
                 if (useForce) {
                     if (useLocalDatabase) {
                         if ( relocations != null ) {
-                            rpmCommand = "rpm --upgrade --ignoresize --force -vh " +
+                            rpmCommand = "rpm --upgrade --ignoresize --force " + forceDebianString + " " + nodepsString + " -vh " +
                                     "--relocate " + relocations + " " + databaseString +
                                     " " + databasePath + " " + packageName;
+                            rpmCommandArray = new String[12];
+                            rpmCommandArray[0] = "rpm";
+                            rpmCommandArray[1] = "--upgrade";
+                            rpmCommandArray[2] = "--ignoresize";
+                            rpmCommandArray[3] = "--force";
+                            rpmCommandArray[4] = forceDebianString;
+                            rpmCommandArray[5] = nodepsString;
+                            rpmCommandArray[6] = "-vh";
+                            rpmCommandArray[7] = "--relocate";
+                            rpmCommandArray[8] = relocations;
+                            rpmCommandArray[9] = databaseString;
+                            rpmCommandArray[10] = databasePath;
+                            rpmCommandArray[11] = packageName;                    
+                        } else {
+                            rpmCommand = "rpm --upgrade --ignoresize --force " + forceDebianString + " " + nodepsString + " -vh " + 
+                                    databaseString + " " + databasePath + " " + packageName;
                             rpmCommandArray = new String[10];
                             rpmCommandArray[0] = "rpm";
                             rpmCommandArray[1] = "--upgrade";
                             rpmCommandArray[2] = "--ignoresize";
                             rpmCommandArray[3] = "--force";
-                            rpmCommandArray[4] = "-vh";
-                            rpmCommandArray[5] = "--relocate";
-                            rpmCommandArray[6] = relocations;
+                            rpmCommandArray[4] = forceDebianString;
+                            rpmCommandArray[5] = nodepsString;
+                            rpmCommandArray[6] = "-vh";
                             rpmCommandArray[7] = databaseString;
                             rpmCommandArray[8] = databasePath;
-                            rpmCommandArray[9] = packageName;                    
+                            rpmCommandArray[9] = packageName;
+                        }
+                    } else {
+                        if ( relocations != null )
+                        {
+                            rpmCommand = "rpm --upgrade --ignoresize --force " + forceDebianString + " " + nodepsString + " -vh " +
+                                    "--relocate " + relocations + " " + packageName;
+                            rpmCommandArray = new String[10];
+                            rpmCommandArray[0] = "rpm";
+                            rpmCommandArray[1] = "--upgrade";
+                            rpmCommandArray[2] = "--ignoresize";
+                            rpmCommandArray[3] = "--force";
+                            rpmCommandArray[4] = forceDebianString;
+                            rpmCommandArray[5] = nodepsString;
+                            rpmCommandArray[6] = "-vh";
+                            rpmCommandArray[7] = "--relocate";
+                            rpmCommandArray[8] = relocations;
+                            rpmCommandArray[9] = packageName;
                         } else {
-                            rpmCommand = "rpm --upgrade --ignoresize --force -vh " +
-                                    databaseString + " " + databasePath + " " + packageName;
+                            rpmCommand = "rpm --upgrade --ignoresize --force " + forceDebianString + " " + nodepsString + " -vh " + packageName;
                             rpmCommandArray = new String[8];
                             rpmCommandArray[0] = "rpm";
                             rpmCommandArray[1] = "--upgrade";
                             rpmCommandArray[2] = "--ignoresize";
                             rpmCommandArray[3] = "--force";
-                            rpmCommandArray[4] = "-vh";
-                            rpmCommandArray[5] = databaseString;
-                            rpmCommandArray[6] = databasePath;
+                            rpmCommandArray[4] = forceDebianString;
+                            rpmCommandArray[5] = nodepsString;
+                            rpmCommandArray[6] = "-vh";
                             rpmCommandArray[7] = packageName;
                         }
-                    } else {
-                        if ( relocations != null )
-                        {
-                            rpmCommand = "rpm --upgrade --ignoresize --force -vh " +
-                                    "--relocate " + relocations + " " + packageName;
-                            rpmCommandArray = new String[8];
-                            rpmCommandArray[0] = "rpm";
-                            rpmCommandArray[1] = "--upgrade";
-                            rpmCommandArray[2] = "--ignoresize";
-                            rpmCommandArray[3] = "--force";
-                            rpmCommandArray[4] = "-vh";
-                            rpmCommandArray[5] = "--relocate";
-                            rpmCommandArray[6] = relocations;
-                            rpmCommandArray[7] = packageName;
-                        } else {
-                            rpmCommand = "rpm --upgrade --ignoresize --force -vh " + packageName;
-                            rpmCommandArray = new String[6];
-                            rpmCommandArray[0] = "rpm";
-                            rpmCommandArray[1] = "--upgrade";
-                            rpmCommandArray[2] = "--ignoresize";
-                            rpmCommandArray[3] = "--force";
-                            rpmCommandArray[4] = "-vh";
-                            rpmCommandArray[5] = packageName;
-                        }
                     }                
                 } else {
                     if (useLocalDatabase) {
                         if ( relocations != null ) {
-                            rpmCommand = "rpm --upgrade --ignoresize -vh " +
+                            rpmCommand = "rpm --upgrade --ignoresize " + forceDebianString + " " + nodepsString + " -vh " +
                                     "--relocate " + relocations + " " + databaseString +
                                     " " + databasePath + " " + packageName;
+                            rpmCommandArray = new String[11];
+                            rpmCommandArray[0] = "rpm";
+                            rpmCommandArray[1] = "--upgrade";
+                            rpmCommandArray[2] = "--ignoresize";
+                            rpmCommandArray[3] = forceDebianString;
+                            rpmCommandArray[4] = nodepsString;
+                            rpmCommandArray[5] = "-vh";
+                            rpmCommandArray[6] = "--relocate";
+                            rpmCommandArray[7] = relocations;
+                            rpmCommandArray[8] = databaseString;
+                            rpmCommandArray[9] = databasePath;
+                            rpmCommandArray[10] = packageName;                    
+                        } else {
+                            rpmCommand = "rpm --upgrade --ignoresize " + forceDebianString + " " + nodepsString + " -vh " +
+                                    databaseString + " " + databasePath + " " + packageName;
                             rpmCommandArray = new String[9];
                             rpmCommandArray[0] = "rpm";
                             rpmCommandArray[1] = "--upgrade";
                             rpmCommandArray[2] = "--ignoresize";
-                            rpmCommandArray[3] = "-vh";
-                            rpmCommandArray[4] = "--relocate";
-                            rpmCommandArray[5] = relocations;
+                            rpmCommandArray[3] = forceDebianString;
+                            rpmCommandArray[4] = nodepsString;
+                            rpmCommandArray[5] = "-vh";
                             rpmCommandArray[6] = databaseString;
                             rpmCommandArray[7] = databasePath;
-                            rpmCommandArray[8] = packageName;                    
+                            rpmCommandArray[8] = packageName;
+                        }
+                    } else {
+                        if ( relocations != null )
+                        {
+                            rpmCommand = "rpm --upgrade --ignoresize " + forceDebianString + " " + nodepsString + " -vh " +
+                                    "--relocate " + relocations + " " + packageName;
+                            rpmCommandArray = new String[9];
+                            rpmCommandArray[0] = "rpm";
+                            rpmCommandArray[1] = "--upgrade";
+                            rpmCommandArray[2] = "--ignoresize";
+                            rpmCommandArray[3] = forceDebianString;
+                            rpmCommandArray[4] = nodepsString;
+                            rpmCommandArray[5] = "-vh";
+                            rpmCommandArray[6] = "--relocate";
+                            rpmCommandArray[7] = relocations;
+                            rpmCommandArray[8] = packageName;
                         } else {
-                            rpmCommand = "rpm --upgrade --ignoresize -vh " +
-                                    databaseString + " " + databasePath + " " + packageName;
+                            rpmCommand = "rpm --upgrade --ignoresize " + forceDebianString + " " + nodepsString + " -vh " + packageName;
                             rpmCommandArray = new String[7];
                             rpmCommandArray[0] = "rpm";
                             rpmCommandArray[1] = "--upgrade";
                             rpmCommandArray[2] = "--ignoresize";
-                            rpmCommandArray[3] = "-vh";
-                            rpmCommandArray[4] = databaseString;
-                            rpmCommandArray[5] = databasePath;
+                            rpmCommandArray[3] = forceDebianString;
+                            rpmCommandArray[4] = nodepsString;
+                            rpmCommandArray[5] = "-vh";
                             rpmCommandArray[6] = packageName;
                         }
-                    } else {
-                        if ( relocations != null )
-                        {
-                            rpmCommand = "rpm --upgrade --ignoresize -vh " +
-                                    "--relocate " + relocations + " " + packageName;
-                            rpmCommandArray = new String[7];
-                            rpmCommandArray[0] = "rpm";
-                            rpmCommandArray[1] = "--upgrade";
-                            rpmCommandArray[2] = "--ignoresize";
-                            rpmCommandArray[3] = "-vh";
-                            rpmCommandArray[4] = "--relocate";
-                            rpmCommandArray[5] = relocations;
-                            rpmCommandArray[6] = packageName;
-                        } else {
-                            rpmCommand = "rpm --upgrade --ignoresize -vh " + packageName;
-                            rpmCommandArray = new String[5];
-                            rpmCommandArray[0] = "rpm";
-                            rpmCommandArray[1] = "--upgrade";
-                            rpmCommandArray[2] = "--ignoresize";
-                            rpmCommandArray[3] = "-vh";
-                            rpmCommandArray[4] = packageName;
-                        }
                     }
                 }
 
                 databaseString = "--dbpath";
                 useLocalDatabase = true;
             }
+
+            // On Debian based systems, rpms can be installed with the switch --force-debian, if a rpm
+            // is installed.
+
+            String forceDebianString = "";
+            String nodepsString = "";
+                
+            if ( ! data.debianInvestigated() ) {
+                helper.investigateDebian(data);
+                data.setDebianInvestigated(true);
+            }
+                
+            if ( data.isDebianSystem() ) {
+                forceDebianString = "--force-debian";
+                nodepsString = "--nodeps";
+            }
+          
+            // Code duplication for isDebianSystem is necessary, because there is no valid position 
+            // for forceDebianString, if it is empty. This is no problem in installPackage.
+
+            if ( data.isDebianSystem() ) {
             
-            if (useLocalDatabase) {
-                rpmCommand = "rpm -ev" + " " + databaseString + " " + databasePath + " " + packageName;
-                rpmCommandArray = new String[5];
-                rpmCommandArray[0] = "rpm";
-                rpmCommandArray[1] = "-ev";
-                rpmCommandArray[2] = databaseString;
-                rpmCommandArray[3] = databasePath;
-                rpmCommandArray[4] = packageName;                
+                if (useLocalDatabase) {
+                    rpmCommand = "rpm " + forceDebianString + " " + nodepsString + " -ev" + " " + databaseString + " " + databasePath + " " + packageName;
+                    rpmCommandArray = new String[7];
+                    rpmCommandArray[0] = "rpm";
+                    rpmCommandArray[1] = forceDebianString;
+                    rpmCommandArray[2] = nodepsString;
+                    rpmCommandArray[3] = "-ev";
+                    rpmCommandArray[4] = databaseString;
+                    rpmCommandArray[5] = databasePath;
+                    rpmCommandArray[6] = packageName;                
+                } else {
+                    rpmCommand = "rpm " + forceDebianString + " " + nodepsString + " -ev" + " " + packageName;
+                    rpmCommandArray = new String[5];
+                    rpmCommandArray[0] = "rpm";
+                    rpmCommandArray[1] = forceDebianString;
+                    rpmCommandArray[2] = nodepsString;
+                    rpmCommandArray[3] = "-ev";
+                    rpmCommandArray[4] = packageName;
+                }
             } else {
-                rpmCommand = "rpm -ev" + " " + packageName;
-                rpmCommandArray = new String[3];
-                rpmCommandArray[0] = "rpm";
-                rpmCommandArray[1] = "-ev";
-                rpmCommandArray[2] = packageName;
+                if (useLocalDatabase) {
+                    rpmCommand = "rpm -ev" + " " + databaseString + " " + databasePath + " " + packageName;
+                    rpmCommandArray = new String[5];
+                    rpmCommandArray[0] = "rpm";
+                    rpmCommandArray[1] = "-ev";
+                    rpmCommandArray[2] = databaseString;
+                    rpmCommandArray[3] = databasePath;
+                    rpmCommandArray[4] = packageName;                
+                } else {
+                    rpmCommand = "rpm -ev" + " " + packageName;
+                    rpmCommandArray = new String[3];
+                    rpmCommandArray[0] = "rpm";
+                    rpmCommandArray[1] = "-ev";
+                    rpmCommandArray[2] = packageName;
+                }            	
             }
 
             Vector returnVector = new Vector();

javainstaller2/src/JavaSetup/org/openoffice/setup/InstallerHelper/LinuxHelper.java

         databasePath = databaseFile.getPath();        
         return databasePath;
     }
+  
+    public void investigateDebian(InstallData data) {
+        
+        // String rpmQuery = "rpm --help;
+        String[] rpmQueryArray = new String[2];
+        rpmQueryArray[0] = "rpm";
+        rpmQueryArray[1] = "--help";
+
+        Vector returnVector = new Vector();
+        Vector returnErrorVector = new Vector();
+        int returnValue = ExecuteProcess.executeProcessReturnVector(rpmQueryArray, returnVector, returnErrorVector);
+        
+        // Checking if the return vector contains the string "force-debian"
+       
+        for (int i = 0; i < returnVector.size(); i++) {
+            String line = (String) returnVector.get(i);
+            if ( line.indexOf("force-debian") > -1 ) {
+                data.setIsDebianSystem(true);
+            }
+        }
+    } 
     
     public void getLinuxFileInfo(PackageDescription packageData) {
         // analyzing a string like "openoffice-core01-2.0.3-159" as "name-version-release"

l10ntools/inc/lngmerge.hxx

                     const ByteString &rPrj , 
                     const ByteString &rRoot , const ByteString &sActFileName , const ByteString &sID );
 public:
-	LngParser( const ByteString &rLngFile, BOOL bUTF8, BOOL bULFFormat, bool bQuiet_in );
+	LngParser( const ByteString &rLngFile, BOOL bUTF8, BOOL bULFFormat );
 	~LngParser();
 
 	BOOL CreateSDF( const ByteString &rSDFFile, const ByteString &rPrj, const ByteString &rRoot );
Add a comment to this file

l10ntools/java/jpropex/java/SdfEntity.java

File contents unchanged.

l10ntools/prj/d.lst

 ..\scripts\localize %_DEST%\bin%_EXT%\localize
 ..\scripts\fast_merge.pl %_DEST%\bin%_EXT%\fast_merge.pl
 ..\scripts\keyidGen.pl %_DEST%\bin%_EXT%\keyidGen.pl
+..\scripts\tool\const.py %_DEST%\bin%_EXT%\const.py
+..\scripts\tool\l10ntool.py %_DEST%\bin%_EXT%\l10ntool.py
+..\scripts\tool\xtxex.py  %_DEST%\bin%_EXT%\xtxex.py
+..\scripts\tool\sdf.py %_DEST%\bin%_EXT%\sdf.py
+..\scripts\tool\xhtex.py %_DEST%\bin%_EXT%\xhtex.py
+..\scripts\tool\pseudo.py %_DEST%\bin%_EXT%\pseudo.py
+..\scripts\xtxex %_DEST%\bin%_EXT%\xtxex
+..\scripts\xhtex %_DEST%\bin%_EXT%\xhtex
 
 ..\inc\export.hxx %_DEST%\inc%_EXT%\l10ntools\export.hxx
 ..\inc\l10ntools\directory.hxx %_DEST%\inc%_EXT%\l10ntools\directory.hxx

l10ntools/scripts/tool/const.py

+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+# 
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org.  If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+# Pseudo const
+class _const:
+    class ConstError(TypeError): pass
+    def __setattr__(self, name, value):
+        if self.__dict__.has_key(name):
+            raise self.ConstError, "Can't rebind const(%s)"%name
+        self.__dict__[name] = value
+
+import sys
+sys.modules[__name__] = _const()
+
+

l10ntools/scripts/tool/l10ntool.py

+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+# 
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org.  If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+from optparse import OptionParser
+from sdf import SdfData
+from pseudo import PseudoSet
+
+import sys
+import os
+import shutil
+
+class AbstractL10nTool:
+    _options            = {}
+    _args               = ""
+    _resource_type      = "" 
+    _source_language    = "en-US"
+   
+    ##### Implement these abstract methods
+
+    ##### Nameing scheme for the output files
+    def get_outputfile_format_str(self):
+        # filename,fileNoExt,language,extension,pathPrefix,pathPostFix,path
+        #return "{path}/{fileNoExt}_{language}.{extension}"
+        return self._options.pattern
+
+    ################################# Merge single files ###########################################
+
+    ##### Merge a single file
+    def merge_file(self, inputfilename, outputfilename, parsed_file_ref, lang, is_forced_lang, sdfdata):
+        pass
+
+    ##### Helper for parse-once-use-often like parsing a xml file is needed implement it here
+    def parse_file(self, filename):
+        return None
+
+    ################### Merge one big file containing all strings in all languages #################
+    def merge_one_big_file(self, inputfile, outputfilename, parsed_file_ref, lang, sdfdata):
+        pass
+
+    ################### Extract a single File ######################################################
+    def extract_file(self, inputfile):
+        pass
+    
+    ################################################################################################
+    
+    def format_outputfile(self, filename, language):
+        extension = filename[filename.rfind('.')+1:]
+        file = filename[:filename.rfind('.')]
+    
+        # Python 2.3.x friendly
+        return self.get_outputfile_format_str().replace('[', '%(').replace(']',')s') % \
+                { 'filename': filename, 'fileNoExt': file, 'language': language, 'extension': extension, 'path_prefix': self._options.path_prefix,
+                  'path_postfix': self._options.path_postfix, 'path': self.get_path() }
+
+        #return self.get_outputfile_format_str().replace('[', '{').replace(']','}').format(
+        #       filename=filename, fileNoExt=file, language=language, extension=extension, path_prefix=self._options.path_prefix,
+        #       path_postfix=self._options.path_postfix, path=self.get_path())
+
+    def get_path(self):
+        if self._options.outputfile.find('/') == -1:
+            return ""
+        else:
+            return self._options.outputfile[:self._options.outputfile.rfind('/')]
+            
+    def merge(self,  sdfdata):
+        langset,forcedset, foundset = PseudoSet(), PseudoSet() , PseudoSet()
+
+        if self._options.languages:       
+            langset = PseudoSet(self._options.languages)  
+        if self._options.forcedlanguages: 
+            forcedset = PseudoSet(self._options.forcedlanguages) 
+        if sdfdata.get_languages_found_in_sdf(): 
+            foundset = sdfdata.get_languages_found_in_sdf() 
+    
+        if self.has_multi_inputfiles(): 
+            filelist = self.read_inputfile_list()
+        else:
+            filelist = self._options.inputfile
+            
+        for inputfile in filelist:
+            ref = self.parse_file(inputfile)
+            # Don't write that files if there is no l10n present
+            if ((langset & foundset) - forcedset):  # all langs given and found in sdf without enforced 
+                [self.merge_file(inputfile,self.format_outputfile(inputfile, lang), ref, lang, False, sdfdata) for lang in ((langset & foundset) - forcedset)]
+            # Always write those files even if there is no l10n available
+            if forcedset: # all enforced langs
+                [self.merge_file(inputfile, self.format_outputfile(inputfile, lang), ref, lang, True, sdfdata)  for lang in forcedset]
+            # In case a big file have to be written
+            if ((langset & foundset) | forcedset): # all langs given ,found in sdf and enforced ones
+                self.merge_one_big_file(inputfile, self.format_outputfile(inputfile, lang), ref, ((langset & foundset) | forcedset), sdfdata)
+    
+    def has_multi_inputfiles(self): 
+        return self._options.inputfile[0] == '@'
+
+    def copy_file(self, inputfilename, outputfilename):
+        try:
+            shutil.copy(inputfilename, outputfilename)
+        except IOError:
+            print "ERROR: Can not copy file '" + inputfilename + "' to " + "'" + outputfilename + "'"
+            sys.exit(-1)
+    
+    def extract(self):
+        try:
+            f = open(self._options.outputfile, "w+")
+            f.write(self.extract_file(self._options.inputfile))
+        except IOError:
+            print "ERROR: Can not write file " + self._options.outputfile
+        else:
+            f.close()
+            
+    # Parse the common options
+    def parse_options(self):
+        parser = OptionParser()
+        parser.add_option("-i", "--inputfile",       dest="inputfile",       metavar="FILE", help="resource file to read"         )
+        parser.add_option("-o", "--outputfile",      dest="outputfile",      metavar="FILE", help="extracted sdf or merged file"  )
+        parser.add_option("-m", "--inputsdffile",    dest="input_sdf_file",  metavar="FILE", help="merge this sdf file"           )
+        parser.add_option("-x", "--pathprefix",      dest="path_prefix",     metavar="PATH", help=""                              )
+        parser.add_option("-y", "--pathpostfix",     dest="path_postfix",    metavar="PATH", help=""                              )
+        parser.add_option("-p", "--projectname",     dest="project_name",    metavar="NAME", help=""                              )
+        parser.add_option("-r", "--projectroot",     dest="project_root",    metavar="PATH", help=""                              )
+        parser.add_option("-f", "--forcedlanguages", dest="forcedlanguages", metavar="ISOCODE[,ISOCODE]", help="Always merge those langs even if no l10n is available for those langs" )
+        parser.add_option("-l", "--languages",       dest="languages",       metavar="ISOCODE[,ISOCODE]", help="Merge those langs if l10n is found for each")
+        parser.add_option("-s", "--pattern",         dest="pattern",         metavar="", help=""                                  )        
+        parser.add_option("-q", "--quiet",           action="store_true",    dest="quietmode", help="",default=False)
+        (self._options, self.args) = parser.parse_args()
+        
+        # -l "de,pr,pt-BR" => [ "de" , "pt" , "pt-BR" ]
+        parse_complex_arg = lambda arg: arg.split(",")
+        
+        if self._options.forcedlanguages: 
+            self._options.forcedlanguages = parse_complex_arg(self._options.forcedlanguages) 
+        if self._options.languages:       
+            self._options.languages = parse_complex_arg(self._options.languages) 
+        self.test_options()
+        
+    def __init__(self):
+        self.parse_options()
+        if self._options.input_sdf_file != None and len(self._options.input_sdf_file):
+            sdfdata = SdfData(self._options.input_sdf_file)
+            sdfdata.read()
+            self.merge(sdfdata)
+        else:
+            self.extract()
+
+    def make_dirs(self, filename):
+        dir = filename[:filename.rfind('/')]
+        if os.path.exists(dir):
+            if os.path.isfile(dir):
+                print "ERROR: There is a file '"+dir+"' where I want create a directory"
+                sys.exit(-1)
+            else:
+                return
+        else:
+            try:
+                os.makedirs(dir)
+            except IOError:
+                print "Error: Can not create dir " + dir
+                sys.exit(-1)
+            
+    def test_options(self):
+        opt = self._options
+        is_valid = lambda x: x != None and len(x) > 0
+        return  is_valid(opt.project_root) and is_valid(opt.project_name) and is_valid(opt.languages) and \
+                ( is_valid(opt.inputfile) and (( is_valid(opt.path_prefix) and is_valid(opt.path_postfix) ) or is_valid(opt.outputfile)) and \
+                ( ( is_valid(opt.input_sdf_file) and ( is_valid(opt.outputfile) or  ( is_valid(opt.path_prefix) and is_valid(opt.path_postfix) ) or \
+                ( is_valid(opt.inputfile) and is_valid(opt.outputFile)) ))))
+        print "Strange options ..."
+        sys.exit( -1 )
+                     
+    def read_inputfile_list(self):
+        if self.has_multi_inputfiles():
+            lines = []
+            try:
+                f = open(self._options.inputfile[1:], "r")
+                lines = [line.strip('\n') for line in f.readlines()]
+            except IOError:
+                print "ERROR: Can not read file list " + self._options.inputfile[2:]
+                sys.exit(-1)
+            else:
+                f.close()
+            return lines
+        
+    def get_filename_string(self, inputfile):
+        absfile = os.path.realpath(os.path.abspath(inputfile))
+        absroot = os.path.realpath(os.path.abspath(self._options.project_root)) 
+        return absfile[len(absroot)+1:].replace('/','\\')
+    

l10ntools/scripts/tool/pseudo.py

+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+# 
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org.  If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+# to support macosx baseline machines from Cretaceous period 
+
+# incomplete set() class implementation of Python 2.4
+class PseudoSet:
+    _list = []
+   
+    def __str__(self):
+        return str(self._list)
+
+    def __init__(self, newlist=[]):
+        self._list = self._remove_dupes(newlist)
+
+    def __or__(self, other):
+        tmplist = []
+        if self._list != None and other != None:
+            tmplist.extend(self._list)
+            tmplist.extend(other)
+            return PseudoSet(self._remove_dupes(tmplist))
+        else:
+            print "__or__(None)"
+
+    def __sub__(self,other):
+        tmplist = []
+        if self._list != None and other != None:
+            tmplist.extend(self._list)
+            [tmplist.remove(key) for key in other if key in tmplist]
+        else:
+            print "__sub__(none)"
+        return PseudoSet(tmplist)
+
+    def __and__(self, other):
+        tmplist = []
+        if other != None and self._list != None:
+            [tmplist.append(key) for key in self._list if key in other]
+            return PseudoSet(tmplist)
+        else:
+            print "__and__(None)"
+                    
+    def __iter__(self):
+        return self._list.__iter__()
+    
+    def __items__(self):
+        return self._list.items()
+
+    def __keys__(self):
+        return keys(self._list)
+
+    def _remove_dupes(self, list):
+        tmpdict = {} 
+        for key in list:
+            tmpdict[key] = 1
+        return tmpdict.keys()
+
+# incomplete OrderedDict() class implementation 
+class PseudoOrderedDict(dict):
+    _keylist        = []
+    _valuelist      = []
+    
+    def __init__(self, defaults={}):
+        dict.__init__(self)
+        for n,v in defaults.items():
+            self[n] = v
+
+    def __setitem__(self, key, value):
+        self._keylist.append(key)
+        self._valuelist.append(value)
+        return dict.__setitem__(self, key, value)
+        
+    def __delattr__(self, key):
+        self._keylist.__delattr__(key)
+        self._valuelist.__delattr__(dict[key])
+        return dict.__delattr__(self, key)
+
+    def __delitem__(self, key):
+        self._keylist.__delitem__(key)
+        self._valuelist.__delitem__(dict[key])
+        return dict.__delitem__(self, key)
+        
+    def __iter__(self):
+        raise NotImplementedError("__iter__")
+    
+    def __iterkeys__(self):
+        return self._keylist
+    
+    def iteritems(self):
+        #return self._valuelist
+        return zip(self._keylist, self._valuelist)
+   
+    def items(self):
+        return zip(self._keylist,self._valuelist)
+
+    def __keys__(self):
+        return self._keylist
+
+    def keys(self):
+        return self._keylist
+
+    def __keysattr__(self):
+        return self._keylist
+    
+    def pop(self, key):
+        self._keylist.pop(key)
+        self._valuelist.pop(key)
+        return dict.__pop__(self, key)
+    
+    def popitem(self):
+        raise NotImplementedError("popitem")
+    
+def _testdriver_set():
+    list, list1 = [] ,[]
+    list.append("a")
+    list.append("b")
+    list.append("c")
+
+    list1.append("a")
+    list1.append("b")
+    list1.append("d")
+    list1.append("e")
+    list1.append("e")
+
+    if "a" in list:
+        print "YEAH!"
+
+    a = PseudoSet(list)
+    b = PseudoSet(list1)
+
+    print "a="+str(a)
+    print "b="+str(b)
+    print "a|b=" + str(a|b)
+    print "a="+str(a)
+    print "b="+str(b)
+    print "a&b=" + str(a&b)
+    print "a="+str(a)
+    print "b="+str(b)
+    print "a-b" + str(a-b)
+
+    for key in a:
+        print key
+
+def _testdriver_dict():
+    d = PseudoOrderedDict()
+    d["a"] = 1
+    d["b"] = 2
+    d["c"] = 3
+    d["d"] = 4
+    d["e"] = 5
+    d["f"] = 6
+
+    print "a="+str(d["a"])
+    print "e="+str(d["e"])
+    for key,value in d.iteritems():
+        print "d["+key+"]="+str(d[key])
+        print "key="+str(key)+" value="+str(value)
+
+    print "keys="+str(d.keys())
+
+#_testdriver_dict()

l10ntools/scripts/tool/sdf.py

+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+# 
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org.  If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+from pseudo import PseudoSet,PseudoOrderedDict
+
+class SdfData:
+    _filename        = "";
+    _dict            = PseudoOrderedDict()
+    _languages_found = [];
+    
+    def __init__ (self, filename=""):
+        self._filename = filename
+    
+    def __getitem__(self, key):
+        if self._dict.has_key(key):
+            return self._dict[key]
+        else:
+            return None
+    
+    def has_key(self, key):
+        return self._dict.has_key(key)
+    
+    def __setitem__(self, key, value):
+        self._dict[key] = value
+    
+    def get_languages_found_in_sdf(self):
+        return PseudoSet(self._languages_found)
+
+    def read(self):
+        try:
+            f = open(self._filename, "r")
+            lines = [line.rstrip('\n') for line in f.readlines()] 
+        except IOError:
+            print "ERROR: Trying to read "+ self._filename
+            raise
+        else:
+            f.close()
+        for line in lines:        
+            entity = SdfEntity()
+            entity.set_properties(line)
+            self._dict[entity.get_id()] = entity
+            self._languages_found.append(entity.langid)
+
+    def write(self, filename):
+        try:
+            f = open(filename, "w+") 
+            for value in self._dict.itervalues():
+                #f.write( repr(value)+"\n" )
+                f.write(value + "\n")
+        except IOError:
+            print "ERROR: Trying to write " + filename
+            raise
+        else:
+            f.close()
+
+import sys
+class SdfEntity: 
+    # Sdf format columns
+    project         = ""
+    source_file     = ""
+    dummy1          = ""
+    resource_type   = ""
+    gid             = ""
+    lid             = ""
+    helpid          = ""
+    platform        = ""
+    dummy2          = ""
+    langid          = ""
+    text            = ""
+    helptext        = ""
+    quickhelptext   = ""
+    title           = ""
+    date            = ""
+    
+    import const
+    const._PROJECT_POS         = 0
+    const._SOURCE_FILE_POS     = 1
+    const._DUMMY1_POS          = 2
+    const._RESOURCE_TYPE_POS   = 3
+    const._GID_POS             = 4
+    const._LID_POS             = 5
+    const._HELPID_POS          = 6
+    const._PLATFORM_POS        = 7
+    const._DUMMY2_POS          = 8
+    const._LANGID_POS          = 9
+    const._TEXT_POS            = 10
+    const._HELPTEXT_POS        = 11
+    const._QUICKHELPTEXT_POS   = 12
+    const._TITLE_POS           = 13
+    const._DATE_POS            = 14
+        
+    def __init__(self, project="", source_file="", dummy1="", resource_type="", gid="", lid="", helpid="", platform="", dummy2="", langid="", 
+                       text="", helptext="", quickhelptext="", title="", date="2002-02-02 02:02:02"):
+        self.project        = project;
+        self.source_file    = source_file;
+        self.dummy1         = dummy1;
+        self.resource_type  = resource_type;
+        self.gid            = gid;
+        self.lid            = lid;
+        self.helpid         = helpid;
+        self.platform       = platform;
+        self.dummy2         = dummy2;
+        self.langid         = langid;
+        self.text           = text;
+        self.helptext       = helptext;
+        self.quickhelptext  = quickhelptext;
+        self.title          = title;
+        self.date           = date;
+
+    def set_properties(self, line):
+        splitted = line.split("\t")
+        if len(splitted) == 15:
+            self.project        = splitted[ self.const._PROJECT_POS ]             
+            self.source_file    = splitted[ self.const._SOURCE_FILE_POS ]     
+            self.dummy1         = splitted[ self.const._DUMMY1_POS ]         
+            self.resource_type  = splitted[ self.const._RESOURCE_TYPE_POS ] 
+            self.gid            = splitted[ self.const._GID_POS ]             
+            self.lid            = splitted[ self.const._LID_POS ]             
+            self.helpid         = splitted[ self.const._HELPID_POS ]         
+            self.platform       = splitted[ self.const._PLATFORM_POS ]         
+            self.dummy2         = splitted[ self.const._DUMMY2_POS ]         
+            self.langid         = splitted[ self.const._LANGID_POS ]         
+            self.text           = splitted[ self.const._TEXT_POS ]             
+            self.helptext       = splitted[ self.const._HELPTEXT_POS ]         
+            self.quickhelptext  = splitted[ self.const._QUICKHELPTEXT_POS ] 
+            self.title          = splitted[ self.const._TITLE_POS ]         
+            self.date           = splitted[ self.const._DATE_POS ]            
+
+    def get_file_id(self):
+        return self.project + "\\" + self.source_file
+    
+    def get_resource_path(self):
+            return self.source_file[0:self.source_file.rfind( "\\" )-1]
+    
+    def __str__(self):
+        return ''.join([self.project, "\t", self.source_file, "\t", self.dummy1, "\t", self.resource_type, "\t" , 
+            self.gid, "\t", self.lid, "\t", self.helpid, "\t", self.platform, "\t", self.dummy2, "\t" , self.langid, 
+            "\t", self.text, "\t", self.helptext, "\t", self.quickhelptext, "\t" , self.title, "\t", self.date ])
+    
+    def get_id(self):
+        return ''.join([self.project, self.gid, self.lid, self.source_file, self.resource_type, self.platform, self.helpid, self.langid])

l10ntools/scripts/tool/xhtex.py

+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+# 
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org.  If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+from l10ntool import AbstractL10nTool
+from sdf import SdfEntity
+import sys
+import xml.dom.minidom
+
+class Xhtex(AbstractL10nTool):
+    _resource_type = "xht" 
+    _sdfdata       = ()
+    _lang          = ""
+   
+    # Extract methods
+    def extract_topic(self, list, inputfile):
+        topics = []
+        for elem in list:                        
+            if elem.childNodes[0].nodeType == elem.TEXT_NODE and len(elem.childNodes[0].data.strip()):
+                topics.append(self.prepare_sdf_line(id=elem.getAttribute("id").strip(), text=elem.childNodes[0].data, inputfile=inputfile))            
+        return topics
+            
+    def extract_title(self, list, inputfile):
+        titles = []
+        for elem in list:
+            if len(elem.getAttribute("title").strip()):
+                titles.append(self.prepare_sdf_line(id=elem.getAttribute("id").strip(), text=elem.getAttribute("title").strip(), inputfile=inputfile))
+        return titles
+    
+    # Merge methods
+    def merge_topic(self, list, sdfdata, lang, inputfilename, dom):
+        for elem in list:
+            if elem.childNodes[0].nodeType == elem.TEXT_NODE and elem.getAttribute("id").strip():
+                obj = self.prepare_sdf_line(inputfile=inputfilename, lang=lang, id=elem.getAttribute("id").strip())
+                if sdfdata[obj.get_id()]:
+                    elem.childNodes[0].data = str(sdfdata[obj.get_id()].text)  
+                
+    def merge_title(self, list, sdfdata, lang, inputfilename):
+        for elem in list:
+            obj = self.prepare_sdf_line(inputfile=inputfilename, lang=lang, id=elem.getAttribute("id").strip())
+            if elem.getAttribute("id").strip() and sdfdata[obj.get_id()]: 
+                elem.setAttribute("title", str(sdfdata[obj.get_id()].text))
+
+    # L10N tool       
+    def __init__(self):
+        AbstractL10nTool.__init__(self)
+        
+    def parse_file(self, filename):
+        document = ""
+        try:
+            f = open(filename, "r+")
+            document = f.read()
+        except IOError:
+            print "ERROR: Can not read file " + filename
+            sys.exit(-1)
+        else:
+            f.close()
+        return xml.dom.minidom.parseString(document)
+
+        
+    def merge_file(self, inputfilename, outputfilename, parsed_file_ref, lang,is_forced_lang, sdfdata):
+        if lang == "en-US":             
+            mod_outputfilename = outputfilename.replace("_en-US",'')            
+            self.make_dirs(mod_outputfilename)
+            self.copy_file(inputfilename, mod_outputfilename)
+            return
+        dom = parsed_file_ref.cloneNode(True)
+        #dom = self.parse_file(inputfilename)    # in case cloneNode is buggy just parse it always
+                
+        self.merge_topic(dom.getElementsByTagName("topic"), sdfdata, lang, inputfilename, dom)
+        self.merge_title(dom.getElementsByTagName("node"), sdfdata, lang, inputfilename)
+        self.merge_title(dom.getElementsByTagName("help_section"), sdfdata, lang, inputfilename)
+        self.make_dirs(outputfilename)
+        try:
+            f = open(outputfilename, "w+")
+            str = dom.toxml()
+            f.write(str)
+        except IOError:
+            print "ERROR: Can not write file " + outputfilename
+            sys.exit(-1)
+        else:
+            f.close()
+    
+    ##### Helper for parse-once-use-often like parsing a xml file is needed implement it here
+    def parse_file(self, filename):
+        document = ""
+        try:
+            f = open(filename,"r+")
+            document = f.read()
+        except IOError:
+            print "ERROR: Can not read file " + filename
+        else:
+            f.close()        
+        return xml.dom.minidom.parseString(document)
+    
+    ##### Extract a single File
+    def extract_file(self, inputfile):
+        sdf_data = []
+        dom = self.parse_file(inputfile)        
+        sdf_data.extend(self.extract_topic(dom.getElementsByTagName("topic"), inputfile))
+        sdf_data.extend(self.extract_title(dom.getElementsByTagName("help_section"), inputfile))
+        sdf_data.extend(self.extract_title(dom.getElementsByTagName("node"), inputfile))        
+        return ''.join([str(line)+"\n" for line in sdf_data])                      
+
+    def prepare_sdf_line(self, inputfile="", lang="" , id="" , text=""):
+        if lang == "":
+            lang = self._source_language
+        return SdfEntity(project=self._options.project_name, source_file=self.get_filename_string(inputfile),
+                         resource_type=self._resource_type, gid=id, lid="", langid=lang,text=text)
+        
+run = Xhtex()
+ 

l10ntools/scripts/tool/xtxex.py

+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+# 
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org.  If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+from l10ntool import AbstractL10nTool
+from sdf import SdfEntity
+import sys
+import shutil 
+
+class Xtxex(AbstractL10nTool):
+    _resource_type       = "xtx" 
+       
+    def __init__(self):
+        AbstractL10nTool.__init__(self)
+        
+    def merge_file(self, inputfilename, outputfilename, parsed_file_ref, lang, is_forced_lang, sdfdata): 
+        # Special handling for en-US files
+        if lang == "en-US":             
+            mod_outputfilename = outputfilename.replace("_en-US",'')
+            self.copy_file(inputfilename, mod_outputfilename)
+            return      
+        # merge usual lang
+        sdfline = self.prepare_sdf_line(inputfilename,lang)
+        if sdfdata.has_key(sdfline.get_id()):
+            line = sdfdata[sdfline.get_id()].text.replace("\\n", '\n')
+            self.make_dirs(outputfilename)
+            try:
+                f = open(outputfilename, "w+")
+                f.write(line)
+            except IOError:
+                print "ERROR: Can not write file " + outputfilename
+                sys.exit(-1)
+            else:
+                f.close()
+            return        
+        # no sdf data found then copy en-US source file
+        if is_forced_lang:
+            self.copy_file(inputfilename, outputfilename)
+               
+    ##### Extract a single File
+    def extract_file(self, inputfile):
+        lines = []
+        try:
+            f = open(inputfile, "r")
+            lines = f.readlines()
+        except IOError:
+            print "ERROR: Can not open file " + inputfile
+            sys.exit(-1)
+        else:
+            f.close()
+        # remove legal header
+        lines = [line for line in lines if len(line) > 0 and not line[0] == '#']        
+        # escape all returns
+        lines = [line.replace('\n', "\\n") for line in lines]
+        line = ''.join(lines)
+        test = str(line)
+        if len(test.strip()):
+            sdf_entity = self.prepare_sdf_line(inputfile);
+            sdf_entity.text = line
+            return str(sdf_entity)
+        else:
+            return ""
+
+    def prepare_sdf_line(self, inputfile="", lang=""):
+        if lang == "":
+            lang = self._source_language
+        return SdfEntity(project=self._options.project_name, source_file=self.get_filename_string(inputfile),
+                          resource_type=self._resource_type, gid="none", lid="none", langid=lang,text="")
+         
+run = Xtxex()

l10ntools/scripts/xhtex

+#!/bin/sh
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+# 
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org.  If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+if [ x${SOLARENV}x = xx ]; then
+    echo No environment found, please use 'setsolar'
+exit 1
+fi
+
+if [ x${SOLARVER}x = xx -o x${UPDMINOREXT}x = xx  ]; then
+    exec python  -B $SOLARVERSION/$INPATH/bin/xhtex.py "$@"
+else
+    exec python  -B $SOLARVERSION/$INPATH/bin$UPDMINOREXT/xhtex.py "$@"
+fi
+

l10ntools/scripts/xtxex

+#!/bin/sh
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+# 
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org.  If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+if [ x${SOLARENV}x = xx ]; then
+    echo No environment found, please use 'setsolar'
+exit 1
+fi
+
+if [ x${SOLARVER}x = xx -o x${UPDMINOREXT}x = xx  ]; then
+    exec python -B  $SOLARVERSION/$INPATH/bin/xtxex.py "$@"
+else
+    exec python -B $SOLARVERSION/$INPATH/bin$UPDMINOREXT/xtxex.py "$@"
+fi
+

l10ntools/source/cfglex.l

 	FILE *pFile;
 
 	pOutput = GetOutputFile( argc, argv );
-	if( !isQuiet() ){
-        fprintf( stdout, "\nCfgEx 0.9 Copyright 2000, 2010 Oracle and/or its affiliates. All Rights Reserved.\n" );
-	    fprintf( stdout, "===================================================================================\n" );
-    }
 
     if ( !pOutput ) {
 		fprintf( stdout, "Syntax: CFGEX[-p Prj][-r PrjRoot]-i FileIn [-o FileOut][-m DataBase][-e][-b][-u][-f][-d DoneFile][-g[:dtd] ][-L l1,l2,...]\n" );
 		fprintf( stdout, " FileIn:   Source files (*.src)\n" );
 		fprintf( stdout, " FileOut:  Destination file (*.*)\n" );
 		fprintf( stdout, " DataBase: Mergedata (*.sdf)\n" );
-		fprintf( stdout, " -QQ: quiet output\n" );
         fprintf( stdout, " -e: Disable writing errorlog\n" );
 		fprintf( stdout, " -b: Break when Token \"HelpText\" found in source\n" );
 		fprintf( stdout, " -u: [english] and [german] are allowed, Id is Taken from DataBase \n" );
 	nRetValue = GetError();
 	EndCfgExport();
 
-	if( !isQuiet() ){
-        fprintf( stdout, "\n===================================\n\n" );
-    }
     
     removeTempFile();
 /* return error level */
 	return nRetValue;
 }
 
-/*"<!--"[^"-->"]*"-->" {
-	bText = 0;
-	WorkOnTokenSet( COMMEND, yytext );
-}*/
-/*"<!"[^\-].*\>	{
-	bText = 0;
-	WorkOnTokenSet( CFG_TAG, yytext );
-}*/
+

l10ntools/source/cfgmerge.cxx

 BOOL bErrorLog;
 BOOL bForce;
 BOOL bUTF8;
-bool bQuiet;
 ByteString sPrj;
 ByteString sPrjRoot;
 ByteString sInputFileName;
 	bErrorLog       = TRUE;
 	bForce          = FALSE;
 	bUTF8           = TRUE;
-    bQuiet          = false;
     sPrj            = "";
 	sPrjRoot        = "";
 	sInputFileName  = "";
 			nState = STATE_FORCE;
 			bForce = TRUE;
 		}
-		else if ( sSwitch == "-QQ" ) {
-		    bQuiet = true;
-        }
         else if ( sSwitch == "-L" ) {
 			nState = STATE_LANGUAGES;
 		}
 	// command line is not valid
 	return NULL;
 }
-int isQuiet(){
-    if( bQuiet )    return 1;
-    else            return 0;
-}
 /*****************************************************************************/
 int InitCfgExport( char *pOutput , char* pFilename )
 /*****************************************************************************/
 		if ( !pFile ){
 			fprintf( stderr, "Error: Could not open file %s\n",
 				sInputFileName.GetBuffer());
-            exit( 13 );
+            exit( -13 );
         }
 		else {
 			// this is a valid file which can be opened, so
 //			printf("sFullEntry = %s\n",sFullEntry.GetBuffer());
             sActFileName = sFullEntry.Copy( sPrjEntry.Len() + 1 );
 //            printf("sActFileName = %s\n",sActFileName.GetBuffer());    
-            if( !bQuiet )
-			    fprintf( stdout, "\nProcessing File %s ...\n", sInputFileName.GetBuffer());
 
 			sActFileName.SearchAndReplaceAll( "/", "\\" );
 
 		Error( sError );
 		delete pOutputStream;
 		pOutputStream = NULL;
-        exit( 13 );
+        exit( -13 );
 	}
 }
 

l10ntools/source/export.cxx

 BOOL bBreakWhenHelpText;
 BOOL bUnmerge;
 BOOL bUTF8;
-bool bQuiet;
 ByteString sPrj;
 ByteString sPrjRoot;
 ByteString sActFileName;
     Export::sForcedLanguages = "";
 	sTempFile = "";
 	pTempFile = NULL;
-    bQuiet = false;
 	USHORT nState = STATE_NON;
 	BOOL bInput = FALSE;
 
 		else if (sSwitch == "-p"  || sSwitch == "-P" ) {
 			nState = STATE_PRJ; // next token specifies the cur. project
 		}
-		else if (sSwitch == "-qq"  || sSwitch == "-QQ" ) {
-			bQuiet = true;  
-		}
 
 		else if (sSwitch == "-r"  || sSwitch == "-R" ) {
 			nState = STATE_ROOT; // next token specifies path to project root
 	return NULL;
 }
 /*****************************************************************************/
-int isQuiet(){
-/*****************************************************************************/
-   if( bQuiet ) return 1;
-   else         return 0;
-}
-/*****************************************************************************/
 int InitExport( char *pOutput , char* pFilename )
 /*****************************************************************************/
 {
 			// (e.g.: source\ui\src\menue.src)
 			sActFileName = sFullEntry.Copy( sPrjEntry.Len() + 1 );
 
-			if( !bQuiet ) fprintf( stdout, "\nProcessing File %s ...\n", sOrigFile.GetBuffer());
 
 			sActFileName.SearchAndReplaceAll( "/", "\\" );
             sFile = sActFileName;

l10ntools/source/helpex.cxx

 ByteString sOutputFileX;
 ByteString sOutputFileY;
 ByteString sSDFFile;
-bool bQuiet;
 
 /*****************************************************************************/
 BOOL ParseCommandLine( int argc, char* argv[])
 	bUTF8 = TRUE;
 	sPrj = "";
 	sPrjRoot = "";
-	bQuiet = false;
     Export::sLanguages = "";
     Export::sForcedLanguages = "";
 
 			nState = STATE_ERRORLOG;
 			bErrorLog = FALSE;
 		}
-		else if ( ByteString( argv[ i ] ).ToUpperAscii() == "-QQ" ) {
-            bQuiet = true;
-        }
         else if ( ByteString( argv[ i ]).ToUpperAscii() == "-UTF8" ) {
 			nState = STATE_UTF8;
 			bUTF8 = TRUE;
 void Help()
 /*****************************************************************************/
 {
-	fprintf( stdout, "Syntax: HELPEX[-p Prj][-r PrjRoot]-i FileIn ( -o FileOut | -x path -y relfile )[-m DataBase][-e][-b][-u][-L l1,l2,...][-QQ] -LF l1,l2 \n" );
+	fprintf( stdout, "Syntax: HELPEX[-p Prj][-r PrjRoot]-i FileIn ( -o FileOut | -x path -y relfile )[-m DataBase][-e][-b][-u][-L l1,l2,...] -LF l1,l2 \n" );
 	fprintf( stdout, " Prj:      Project\n" );
 	fprintf( stdout, " PrjRoot:  Path to project root (..\\.. etc.)\n" );
 	fprintf( stdout, " FileIn:   Source file (*.lng)\n" );
 	fprintf( stdout, " FileOut:  Destination file (*.*)\n" );
 	fprintf( stdout, " DataBase: Mergedata (*.sdf)\n" );
-	fprintf( stdout, " -QQ: quiet output\n" );
 	fprintf( stdout, " -L: Restrict the handled languages. l1,l2,... are elements of (en-US,fr,de...)\n" );
 	fprintf( stdout, "     A fallback language can be defined like this: l1=f1.\n" );
 	fprintf( stdout, "     f1, f2,... are also elements of (en-US,fr,de...)\n" );

l10ntools/source/helpmerge.cxx

 
     ByteString sActFileName = makeAbsolutePath( sHelpFile , rRoot_in );
 
-/*    DirEntry aEntry( String( sHelpFile, RTL_TEXTENCODING_ASCII_US ));
-	aEntry.ToAbs();
-	String sFullEntry = aEntry.GetFull();
-	aEntry += DirEntry( String( "..", RTL_TEXTENCODING_ASCII_US ));
-	aEntry += DirEntry( rRoot_in );
-	ByteString sPrjEntry( aEntry.GetFull(), gsl_getSystemTextEncoding());
-	ByteString sActFileName(
-	sFullEntry.Copy( sPrjEntry.Len() + 1 ), gsl_getSystemTextEncoding());
-
-	sActFileName.SearchAndReplaceAll( "/", "\\" );
-*/
 	XMLHashMap*  aXMLStrHM   = file->GetStrings();
 	LangHashMap* pElem;
 	XMLElement*  pXMLElement  = NULL;

l10ntools/source/lngex.cxx

 BOOL bErrorLog;
 BOOL bUTF8;
 BOOL bULF; // ULF = Unicode Language File
-bool bQuiet;
 ByteString sPrj;
 ByteString sPrjRoot;
 ByteString sOutputFile;
 	bErrorLog = TRUE;
 	bUTF8 = TRUE;
 	bULF = FALSE;
-    bQuiet = false;
 	sPrj = "";
 	sPrjRoot = "";
 	Export::sLanguages = "";
 		else if ( sSwitch == "-R" ) {
 			nState = STATE_ROOT; // next token specifies path to project root
 		}
-		else if ( sSwitch == "-QQ" ) {
-			bQuiet = true;
-		}
 		else if ( sSwitch == "-M" ) {
 			nState = STATE_MERGESRC; // next token specifies the merge database
 		}
 void Help()
 /*****************************************************************************/
 {
-	//fprintf( stdout, "Syntax:ULFEX[-p Prj][-r PrjRoot]-i FileIn -o FileOut[-m DataBase][-e][-b][-u][-NOUTF8][-ULF][-L l1,l2,...]\n" );
     fprintf( stdout, "Syntax:ULFEX[-p Prj][-r PrjRoot]-i FileIn -o FileOut[-m DataBase][-L l1,l2,...]\n" );
 	fprintf( stdout, " Prj:      Project\n" );
 	fprintf( stdout, " PrjRoot:  Path to project root (..\\.. etc.)\n" );
 	fprintf( stdout, " FileIn:   Source file (*.lng)\n" );
 	fprintf( stdout, " FileOut:  Destination file (*.*)\n" );
 	fprintf( stdout, " DataBase: Mergedata (*.sdf)\n" );
-	fprintf( stdout, " -QQ: quite output\n" );
-	//fprintf( stdout, " -NOUTF8: disable UTF8 as language independent encoding\n" );
-	//fprintf( stdout, " -ULF: enables Unicode Language File format, leads to UTF8 encoded version of lng files" );
 	fprintf( stdout, " -L: Restrict the handled languages. l1,l2,... are elements of (de,en-US...)\n" );
 	fprintf( stdout, "     A fallback language can be defined like this: l1=f1.\n" );
 	fprintf( stdout, "     f1, f2,... are also elements of (de,en-US...)\n" );
 		Help();
 		return 1;
 	}
-	if( !bQuiet ){ 
-        fprintf( stdout, "\nUlfEx 1 Copyright 2000, 2010 Oracle and/or its affiliates. All Rights Reserved.\n" );
-	    fprintf( stdout, "=================================================================================\n" );
-        fprintf( stdout, "\nProcessing File %s ...\n", sInputFile.GetBuffer());
-    }else
-    {
         fprintf(stdout, ".");
         fflush( stdout ); 
-    }
 
 	if ( sOutputFile.Len()) {
-		LngParser aParser( sInputFile, bUTF8, bULF , bQuiet );
+		LngParser aParser( sInputFile, bUTF8, bULF );
 		if ( bMergeMode )
 			aParser.Merge( sMergeSrc, sOutputFile , sPrj );
 		else
 			aParser.CreateSDF( sOutputFile, sPrj, sPrjRoot );
 	}
 
-	if( !bQuiet ) fprintf( stdout, "\n=================================================\n\n" );
-
 	return 0;
 }

l10ntools/source/lngmerge.cxx

 // class LngParser
 //
 /*****************************************************************************/
-LngParser::LngParser( const ByteString &rLngFile, BOOL bUTF8, BOOL bULFFormat , bool bQuiet_in )
+LngParser::LngParser( const ByteString &rLngFile, BOOL bUTF8, BOOL bULFFormat )
 /*****************************************************************************/
 				:
 				nError( LNG_OK ),
 				pLines( NULL ),
                 sSource( rLngFile ),
 				bDBIsUTF8( bUTF8 ),
-				bULF( bULFFormat ),
-                bQuiet( bQuiet_in )
+				bULF( bULFFormat )
 {
 	pLines = new LngLineList( 100, 100 );
 	DirEntry aEntry( String( sSource, RTL_TEXTENCODING_ASCII_US ));

l10ntools/source/localize.cxx

 const char *ExeTable[][5] = {
 	{ "src", "transex3", "  -UTF8 -e", "negative", "noiso" },
 	{ "hrc", "transex3", "  -UTF8 -e", "positive", "noiso" },
-	//{ "src", "transex3", "-UTF8 -e", "negative", "noiso" },
-	//{ "hrc", "transex3", "-UTF8 -e", "positive", "noiso" },
-
-	//{ "lng", "lngex", "-UTF8 -e", "negative", "noiso" },
+	{ "tree", "xhtex", "", "negative", "noiso" },
+	{ "xtx", "xtxex", "", "negative", "noiso" },
 	{ "ulf", "ulfex", " -e", "negative", "noiso" },
 	{ "xrb", "xmlex", "-UTF8 -e", "negative", "iso" },
 	{ "xxl", "xmlex", "-UTF8 -e", "negative", "iso" },
 	ByteString sLanguageRestriction;
    
 	ByteString sOutputFile;
-	bool bQuiet2;
 
     int nFileCnt;