[Libreoffice-commits] .: 21 commits - l10ntools/java l10ntools/prj l10ntools/scripts padmin/source svtools/source vcl/aqua vcl/source vcl/unx

Jan Holesovsky kendy at kemper.freedesktop.org
Wed Oct 13 05:59:52 PDT 2010


 l10ntools/java/jpropex/java/JPropEx.java   |   11 +-
 l10ntools/java/jpropex/java/SdfData.java   |    2 
 l10ntools/java/jpropex/java/SdfEntity.java |    1 
 l10ntools/prj/d.lst                        |    3 
 l10ntools/scripts/localize.pl              |  124 ++---------------------------
 l10ntools/scripts/tool/l10ntool.py         |    3 
 l10ntools/scripts/tool/xhtex.py            |    7 -
 padmin/source/spadmin.sh                   |    2 
 svtools/source/brwbox/brwbox2.cxx          |    7 -
 vcl/aqua/inc/salframeview.h                |    4 
 vcl/aqua/source/window/salframeview.mm     |   65 +++++++++------
 vcl/source/gdi/metaact.cxx                 |    2 
 vcl/source/gdi/outdev2.cxx                 |   11 ++
 vcl/unx/source/fontmanager/fontconfig.cxx  |   19 ++--
 14 files changed, 94 insertions(+), 167 deletions(-)

New commits:
commit faf640e02afbe5b1d1dc889c194482c52ed4ca3d
Merge: ce8ec7e... 3b08f03...
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Wed Oct 13 11:45:25 2010 +0200

    Merge commit 'ooo/OOO330_m10'
    
    Conflicts:
    	vcl/unx/source/fontmanager/fontconfig.cxx

diff --cc l10ntools/java/jpropex/java/JPropEx.java
index f068f93,febc6a4..9ff8bf9
--- a/l10ntools/java/jpropex/java/JPropEx.java
+++ b/l10ntools/java/jpropex/java/JPropEx.java
@@@ -138,12 -138,15 +138,15 @@@ public class JPropE
          }
          data.write( outputFileArg );
      }
 -    
 +
      private SdfEntity prepareSdfObj( String filename )
      {
-         String path = makeAbs( filename );
-         //String path = makeAbs( inputFileArg );
-         path = path.replace( rootArg + "/" , "" );
+         String path = makeAbs( filename ).trim();
+         String myRootArg = makeAbs( rootArg ).trim();
+         myRootArg = myRootArg.replace( "\\","/");
+         myRootArg += "/";
+         path = path.replace("\\","/");
+         path = path.replace( myRootArg, "" );
          path = path.replace("/","\\");
          // TODO: Make this static
          java.text.SimpleDateFormat dateformat = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
diff --cc l10ntools/scripts/localize.pl
index e242aa2,a1c9110..5478e6e
--- a/l10ntools/scripts/localize.pl
+++ b/l10ntools/scripts/localize.pl
@@@ -182,86 -181,14 +181,14 @@@ sub splitfile
      #print "$so_l10n_path\n";
      #print "$ooo_l10n_path\n";
      
-     write_sdf( \%string_hash_so , $so_l10n_path );
-     write_sdf( \%string_hash_ooo , $ooo_l10n_path );
-    
- }
- sub check_modules_scm
- {
-     #my @ooo_modules;
-     #my @so_modules;
-     my $src_path        = $ENV{ SRC_ROOT } ;
-     my $last_dir        = getcwd();
-     chdir $src_path ;
-     my @modules         = <*/.svn/entries>;
-     
-     foreach my $module ( @modules )
+     if( $force_ooo_module )
      {
-         #print "$module \n";
-         if( open ( FILE , "<$module" ) )
-         {
-             while( <FILE> )
-             {
-                 
-                 my @path = split ( "/" , $module ) ;
-                 
-                 if( /svn.services.openoffice.org/ )
-                 {
-                     my $mod = $path[ 0 ];
-                     #push @ooo_modules , $mod;
-                     $is_ooo_module{ $mod } = "true";
-                     # print "$module -> ooo ";
-                 }
-                 elsif ( /jumbo2.germany.sun.com/ )
-                 {
-                     my $mod = $path[ 0 ];
-                     #push @so_modules , $mod;
-                     # print "$module -> so ";
-                     #$so_lookup_hash{ $mod } = "true";
-                 }
-                 #else 
-                 #{
-                 #    print "ERROR: Is $module a SO or OOo module? Can not parese the $module/.svn/entries file ... please check mwsfinnish/merge/splitsdf.pl line 280\n";
-                 # exit -1;
-                 #}
-             }
-         }
+         write_sdf( \%string_hash_ooo , $ooo_l10n_path );
+     }
+     else
+     {
+         write_sdf( \%string_hash_so , $so_l10n_path );
 -    } 
 +    }
-     chdir $last_dir ;
-     #print "OOO\n";
-     #print @ooo_modules;
-     #print "\nSO\n";
-     #print @so_modules;
- }
- 
- 
- #sub parse
- #{
- #    my $command = "$CVS_BINARY -d:pserver:anoncvs\@anoncvs.services.openoffice.org:/cvs co -c";
- #    my $output  = `$command`;
- #    my $rc = $? << 8;
- #    if ( $output eq "" || $rc < 0 ){
- #        print STDERR "ERROR: Can not fetch cvs alias list, please login to the cvs server and press at the password prompt just return\ncvs -d:pserver:anoncvs\@anoncvs.services.openoffice.org:/cvs login\n"; 
- #        exit ( -1 );
- #    }
- #    my @list = split /\n/ , $output ;
- #    foreach my $string( @list )
- #    {
- #
- #        #        print "Found '$1'\n" , if( $string =~ /^(\w*)/ && $1 ne "" );
- #
- #        $is_ooo_module{ $1 } = "TRUE", if( $string =~ /^(\w*)/ && $1 ne "" );
- #    }
- #    #    foreach my $key( keys( %is_ooo_module ) )
- #    #{
- #        #    print "$key\n";
- #        #}
- #}
- sub is_openoffice_module
- {
-     my $module              = shift;
-     return "TRUE", if ( $force_ooo_module || defined $is_ooo_module{ $module } );
-     return "";
  }
  
  sub write_sdf
diff --cc l10ntools/scripts/tool/l10ntool.py
index 70d8867,f163002..d893333
--- a/l10ntools/scripts/tool/l10ntool.py
+++ b/l10ntools/scripts/tool/l10ntool.py
@@@ -66,7 -66,7 +66,7 @@@ class AbstractL10nTool
          pass
      
      ################################################################################################
-     
 -     
++
      def format_outputfile(self, filename, language):
          extension = filename[filename.rfind('.')+1:]
          file = filename[:filename.rfind('.')]
diff --cc vcl/source/gdi/outdev2.cxx
index 6559c59,68953fa..72ef4ce
mode 100644,100755..100755
--- a/vcl/source/gdi/outdev2.cxx
+++ b/vcl/source/gdi/outdev2.cxx
diff --cc vcl/unx/source/fontmanager/fontconfig.cxx
index d572a4b,ec9eb36..3be14eb
--- a/vcl/unx/source/fontmanager/fontconfig.cxx
+++ b/vcl/unx/source/fontmanager/fontconfig.cxx
@@@ -518,9 -518,11 +518,14 @@@ namespac
                  candidate = aIter->second;
                  break;
              }
-             else if( (rtl_str_compare(pLang,sLangMatch.getStr()) == 0) && (!alreadyclosematch))
+             else if( alreadyclosematch )
 -            continue;
 +            {
-                 //fairly close
++                // override candidate only if there is a perfect match
++                continue;
++            }
+             else if( rtl_str_compare( pLang, sLangMatch.getStr()) == 0)
+             {
+                 // just the language matches
                  candidate = aIter->second;
                  alreadyclosematch = true;
              }
commit 3b08f031d4fdb4832a4f09d43b4f5e271254c752
Merge: 6e42a6c... c0a2922...
Author: obo <obo at openoffice.org>
Date:   Fri Oct 8 08:45:29 2010 +0200

    CWS-TOOLING: integrate CWS hb22

commit 6e42a6c23e2b94192b85f51e771e55da51452467
Merge: 2ec453e... 546faf9...
Author: obo <obo at openoffice.org>
Date:   Fri Oct 8 08:35:58 2010 +0200

    CWS-TOOLING: integrate CWS ooo330l10n4

commit 2ec453e5f15e36a4fd73bebb3debd76c66565d59
Merge: e5e7418... aba683e...
Author: obo <obo at openoffice.org>
Date:   Fri Oct 8 08:19:25 2010 +0200

    CWS-TOOLING: integrate CWS sw33bf10

commit e5e7418030aae96799f7156439edf03c2efcaff4
Merge: a5c3a2c... a6e9452...
Author: obo <obo at openoffice.org>
Date:   Fri Oct 8 08:14:20 2010 +0200

    CWS-TOOLING: integrate CWS ooo33gsl10

commit a5c3a2c3f2602348bbe1f18d84eea1cfbbabb9ee
Merge: c356413... 5ee1164...
Author: obo <obo at openoffice.org>
Date:   Fri Oct 8 08:00:07 2010 +0200

    CWS-TOOLING: integrate CWS dba33j

commit 546faf9e6c5f55496b84a828028f046bc76ef2b3
Author: Ivo Hinkelmann <ihi at openoffice.org>
Date:   Wed Oct 6 18:02:51 2010 +0200

    ooo330l10n4: removed *.py from source tree

diff --git a/l10ntools/prj/d.lst b/l10ntools/prj/d.lst
index c7ae5c3..29dd21c 100644
--- a/l10ntools/prj/d.lst
+++ b/l10ntools/prj/d.lst
@@ -49,7 +49,6 @@ mkdir: %_DEST%\bin%_EXT%\help\com\sun\star\help
 ..\scripts\keyidGen.pl %_DEST%\bin%_EXT%\keyidGen.pl
 ..\scripts\xtxex %_DEST%\bin%_EXT%\xtxex
 ..\scripts\xhtex %_DEST%\bin%_EXT%\xhtex
-..\scripts\tool\*.py %_DEST%\bin%_EXT%\
 ..\%__SRC%\bin\const.py %_DEST%\bin%_EXT%\const.py
 ..\%__SRC%\bin\l10ntool.py %_DEST%\bin%_EXT%\l10ntool.py
 ..\%__SRC%\bin\pseudo.py %_DEST%\bin%_EXT%\pseudo.py
commit 9259e3258c2dc1171234b21b42a48a67f19b3297
Author: Ivo Hinkelmann <ihi at openoffice.org>
Date:   Wed Oct 6 17:59:24 2010 +0200

    ooo330l10n4: revert last change + added 2 missing pyc

diff --git a/l10ntools/prj/d.lst b/l10ntools/prj/d.lst
index c268f36..c7ae5c3 100644
--- a/l10ntools/prj/d.lst
+++ b/l10ntools/prj/d.lst
@@ -50,16 +50,18 @@ mkdir: %_DEST%\bin%_EXT%\help\com\sun\star\help
 ..\scripts\xtxex %_DEST%\bin%_EXT%\xtxex
 ..\scripts\xhtex %_DEST%\bin%_EXT%\xhtex
 ..\scripts\tool\*.py %_DEST%\bin%_EXT%\
-#..\scripts\tool\l10ntool.py %_DEST%\bin%_EXT%\l10ntool.py
-#..\scripts\tool\pseudo.py %_DEST%\bin%_EXT%\pseudo.py
-#..\script\tool\sdf.py %_DEST%\bin%_EXT%\sdf.py
-#..\script\tool\const.pyc %_DEST%\bin%_EXT%\const.pyc
-#..\script\tool\l10ntool.pyc %_DEST%\bin%_EXT%\l10ntool.pyc
-#..\script\tool\pseudo.pyc %_DEST%\bin%_EXT%\pseudo.pyc
-#..\script\tool\sdf.pyc %_DEST%\bin%_EXT%\sdf.pyc
-#..\script\tool\xhtex.py %_DEST%\bin%_EXT%\xhtex.py
-#..\script\tool\xtxex.py %_DEST%\bin%_EXT%\xtxex.py
-
+..\%__SRC%\bin\const.py %_DEST%\bin%_EXT%\const.py
+..\%__SRC%\bin\l10ntool.py %_DEST%\bin%_EXT%\l10ntool.py
+..\%__SRC%\bin\pseudo.py %_DEST%\bin%_EXT%\pseudo.py
+..\%__SRC%\bin\sdf.py %_DEST%\bin%_EXT%\sdf.py
+..\%__SRC%\bin\const.pyc %_DEST%\bin%_EXT%\const.pyc
+..\%__SRC%\bin\l10ntool.pyc %_DEST%\bin%_EXT%\l10ntool.pyc
+..\%__SRC%\bin\pseudo.pyc %_DEST%\bin%_EXT%\pseudo.pyc
+..\%__SRC%\bin\sdf.pyc %_DEST%\bin%_EXT%\sdf.pyc
+..\%__SRC%\bin\xhtex.py %_DEST%\bin%_EXT%\xhtex.py
+..\%__SRC%\bin\xtxex.py %_DEST%\bin%_EXT%\xtxex.py
+..\%__SRC%\bin\xhtex.pyc %_DEST%\bin%_EXT%\xhtex.pyc
+..\%__SRC%\bin\xtxex.pyc %_DEST%\bin%_EXT%\xtxex.pyc
 ..\inc\export.hxx %_DEST%\inc%_EXT%\l10ntools\export.hxx
 ..\inc\l10ntools\directory.hxx %_DEST%\inc%_EXT%\l10ntools\directory.hxx
 ..\inc\l10ntools\file.hxx %_DEST%\inc%_EXT%\l10ntools\file.hxx
commit a6e94527df6b97f72ff76944d200abe98a903029
Author: Philipp Lohmann [pl] <Philipp.Lohmann at Sun.COM>
Date:   Wed Oct 6 11:30:10 2010 +0200

    ooo33gsl10: #i97556# fix ImplDrawAlpha in RTL case

diff --git a/vcl/source/gdi/outdev2.cxx b/vcl/source/gdi/outdev2.cxx
old mode 100644
new mode 100755
index 25bf065..68953fa
--- a/vcl/source/gdi/outdev2.cxx
+++ b/vcl/source/gdi/outdev2.cxx
@@ -1988,7 +1988,15 @@ void OutputDevice::ImplDrawAlpha( const Bitmap& rBmp, const AlphaMask& rAlpha,
             const long		nSrcWidth = aBmpRect.GetWidth(), nSrcHeight = aBmpRect.GetHeight();
             const long		nDstWidth = aDstRect.GetWidth(), nDstHeight = aDstRect.GetHeight();
             const long		nOutWidth = aOutSz.Width(), nOutHeight = aOutSz.Height();
-            const long		nOffX = aDstRect.Left() - aOutPt.X(), nOffY = aDstRect.Top() - aOutPt.Y();
+            // calculate offset in original bitmap
+            // in RTL case this is a little more complicated since the contents of the
+            // bitmap is not mirrored (it never is), however the paint region and bmp region
+            // are in mirrored coordinates, so the intersection of (aOutPt,aOutSz) with these
+            // is content wise somewhere else and needs to take mirroring into account
+            const long		nOffX = IsRTLEnabled()
+                                    ? aOutSz.Width() - aDstRect.GetWidth() - (aDstRect.Left() - aOutPt.X())
+                                    : aDstRect.Left() - aOutPt.X(),
+                            nOffY = aDstRect.Top() - aOutPt.Y();
             long			nX, nOutX, nY, nOutY;
             long			nMirrOffX = 0;
             long			nMirrOffY = 0;
@@ -2002,7 +2010,6 @@ void OutputDevice::ImplDrawAlpha( const Bitmap& rBmp, const AlphaMask& rAlpha,
             for( nX = 0L, nOutX = nOffX; nX < nDstWidth; nX++, nOutX++ )
             {
                 pMapX[ nX ] = aBmpRect.Left() + nOutX * nSrcWidth / nOutWidth;
-
                 if( bHMirr )
                     pMapX[ nX ] = nMirrOffX - pMapX[ nX ];
             }
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
old mode 100644
new mode 100755
commit f47055a4de10a330ae7c3ed67a319a962c8ce063
Author: Ivo Hinkelmann <ihi at openoffice.org>
Date:   Tue Oct 5 19:11:17 2010 +0200

    ooo330l10n4: fixed encoding, windows path issue

diff --git a/l10ntools/java/jpropex/java/JPropEx.java b/l10ntools/java/jpropex/java/JPropEx.java
index 82f702d..febc6a4 100644
--- a/l10ntools/java/jpropex/java/JPropEx.java
+++ b/l10ntools/java/jpropex/java/JPropEx.java
@@ -141,9 +141,12 @@ public class JPropEx
     
     private SdfEntity prepareSdfObj( String filename )
     {
-        String path = makeAbs( filename );
-        //String path = makeAbs( inputFileArg );
-        path = path.replace( rootArg + "/" , "" );
+        String path = makeAbs( filename ).trim();
+        String myRootArg = makeAbs( rootArg ).trim();
+        myRootArg = myRootArg.replace( "\\","/");
+        myRootArg += "/";
+        path = path.replace("\\","/");
+        path = path.replace( myRootArg, "" );
         path = path.replace("/","\\");
         // TODO: Make this static
         java.text.SimpleDateFormat dateformat = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@@ -176,7 +179,7 @@ public class JPropEx
         {
             BufferedReader in = new BufferedReader( new FileReader( filename.substring( 1 ) ) );
             while( in.ready() )
-                lines.add( in.readLine() );
+                lines.add( in.readLine().trim() );
         }
         catch( IOException e )
         {
@@ -217,7 +220,7 @@ public class JPropEx
                 curEntity   = (SdfEntity) curStr.clone();
                 curLang     = (String)    lang.nextElement();
                 curEntity.setLangid( curLang );
-                mergedEntity = data.get( curEntity ); 
+                mergedEntity = data.get( curEntity );
                 if( mergedEntity == null )
                 {
                     // in case there is no translation then fallback to the en-US source string
diff --git a/l10ntools/java/jpropex/java/SdfData.java b/l10ntools/java/jpropex/java/SdfData.java
index d63cffe..53d1e57 100644
--- a/l10ntools/java/jpropex/java/SdfData.java
+++ b/l10ntools/java/jpropex/java/SdfData.java
@@ -68,7 +68,7 @@ public class SdfData
         BufferedReader in; 
         try
         {
-            in = new BufferedReader( new FileReader( filename ) );
+            in = new BufferedReader( new InputStreamReader( new FileInputStream( filename ), "UTF-8" ) );
             SdfEntity entity;
             while( in.ready() )
             {
diff --git a/l10ntools/java/jpropex/java/SdfEntity.java b/l10ntools/java/jpropex/java/SdfEntity.java
index 0be5723..26e3cfe 100644
--- a/l10ntools/java/jpropex/java/SdfEntity.java
+++ b/l10ntools/java/jpropex/java/SdfEntity.java
@@ -97,7 +97,6 @@ public class SdfEntity implements Cloneable{
     }
 
     public void setProperties( String line ){
-    
         if( line != null )
         {
             String[] splitted		= line.split("\t",15);
commit 432eb2b0ac4836bf1ff4dc49117c28c6eb83d52b
Author: Ivo Hinkelmann <ihi at openoffice.org>
Date:   Tue Oct 5 19:05:30 2010 +0200

    ooo330l10n4: deliver *.py

diff --git a/l10ntools/prj/d.lst b/l10ntools/prj/d.lst
index 9d493e1..c268f36 100644
--- a/l10ntools/prj/d.lst
+++ b/l10ntools/prj/d.lst
@@ -49,16 +49,16 @@ mkdir: %_DEST%\bin%_EXT%\help\com\sun\star\help
 ..\scripts\keyidGen.pl %_DEST%\bin%_EXT%\keyidGen.pl
 ..\scripts\xtxex %_DEST%\bin%_EXT%\xtxex
 ..\scripts\xhtex %_DEST%\bin%_EXT%\xhtex
-..\%__SRC%\bin\const.py %_DEST%\bin%_EXT%\const.py
-..\%__SRC%\bin\l10ntool.py %_DEST%\bin%_EXT%\l10ntool.py
-..\%__SRC%\bin\pseudo.py %_DEST%\bin%_EXT%\pseudo.py
-..\%__SRC%\bin\sdf.py %_DEST%\bin%_EXT%\sdf.py
-..\%__SRC%\bin\const.pyc %_DEST%\bin%_EXT%\const.pyc
-..\%__SRC%\bin\l10ntool.pyc %_DEST%\bin%_EXT%\l10ntool.pyc
-..\%__SRC%\bin\pseudo.pyc %_DEST%\bin%_EXT%\pseudo.pyc
-..\%__SRC%\bin\sdf.pyc %_DEST%\bin%_EXT%\sdf.pyc
-..\%__SRC%\bin\xhtex.py %_DEST%\bin%_EXT%\xhtex.py
-..\%__SRC%\bin\xtxex.py %_DEST%\bin%_EXT%\xtxex.py
+..\scripts\tool\*.py %_DEST%\bin%_EXT%\
+#..\scripts\tool\l10ntool.py %_DEST%\bin%_EXT%\l10ntool.py
+#..\scripts\tool\pseudo.py %_DEST%\bin%_EXT%\pseudo.py
+#..\script\tool\sdf.py %_DEST%\bin%_EXT%\sdf.py
+#..\script\tool\const.pyc %_DEST%\bin%_EXT%\const.pyc
+#..\script\tool\l10ntool.pyc %_DEST%\bin%_EXT%\l10ntool.pyc
+#..\script\tool\pseudo.pyc %_DEST%\bin%_EXT%\pseudo.pyc
+#..\script\tool\sdf.pyc %_DEST%\bin%_EXT%\sdf.pyc
+#..\script\tool\xhtex.py %_DEST%\bin%_EXT%\xhtex.py
+#..\script\tool\xtxex.py %_DEST%\bin%_EXT%\xtxex.py
 
 ..\inc\export.hxx %_DEST%\inc%_EXT%\l10ntools\export.hxx
 ..\inc\l10ntools\directory.hxx %_DEST%\inc%_EXT%\l10ntools\directory.hxx
commit cde9999f61516688cd4478540f84ad0cd677071b
Author: Ivo Hinkelmann <ihi at openoffice.org>
Date:   Tue Oct 5 19:04:25 2010 +0200

    ooo330l10n4: changed SRC_ROOT -> SOURCE_ROOT_DIR, misc cleanup

diff --git a/l10ntools/scripts/localize.pl b/l10ntools/scripts/localize.pl
index 3c53bab..a1c9110 100644
--- a/l10ntools/scripts/localize.pl
+++ b/l10ntools/scripts/localize.pl
@@ -87,7 +87,6 @@ my @sdfparticles;
 
 #### main ####
 parse_options();
-check_modules_scm();
 
 my $binpath = '';
 if( defined $ENV{UPDMINOREXT} )
@@ -159,7 +158,7 @@ sub splitfile{
             next if( $prj eq "binfilter" );     # Don't merge strings into binfilter module
             chomp( $line );
            
-            if( is_openoffice_module( $prj ) )
+            if( $force_ooo_module )
             {
                 $string_hash_ooo { $lang }{ "$prj\t$file\t$type\t$gid\t$lid\t$helpid\t$plattform\t$lang" } = $line; 
             }
@@ -171,97 +170,25 @@ sub splitfile{
     }
     close( MYFILE );
 
-    if( !defined $ENV{SRC_ROOT} ){
-        print "Error, no SRC_ROOT in env found.\n";
+    if( !defined $ENV{SOURCE_ROOT_DIR} ){
+        print "Error, no SOURCE_ROOT_DIR in env found.\n";
         exit( -1 );
     }
-    my $src_root = $ENV{SRC_ROOT};
-    my $so_l10n_path  = $src_root."/l10n_so/source";
-    my $ooo_l10n_path = $src_root."/l10n/source";
+    my $src_root = $ENV{SOURCE_ROOT_DIR};
+    my $so_l10n_path  = $src_root."/sun/l10n_so/source";
+    my $ooo_l10n_path = $src_root."/ooo/l10n/source";
 
     #print "$so_l10n_path\n";
     #print "$ooo_l10n_path\n";
     
-    write_sdf( \%string_hash_so , $so_l10n_path );
-    write_sdf( \%string_hash_ooo , $ooo_l10n_path );
-   
-}
-sub check_modules_scm
-{
-    #my @ooo_modules;
-    #my @so_modules;
-    my $src_path        = $ENV{ SRC_ROOT } ;
-    my $last_dir        = getcwd();
-    chdir $src_path ;
-    my @modules         = <*/.svn/entries>;
-    
-    foreach my $module ( @modules )
+    if( $force_ooo_module )
     {
-        #print "$module \n";
-        if( open ( FILE , "<$module" ) )
-        {
-            while( <FILE> )
-            {
-                
-                my @path = split ( "/" , $module ) ;
-                
-                if( /svn.services.openoffice.org/ )
-                {
-                    my $mod = $path[ 0 ];
-                    #push @ooo_modules , $mod;
-                    $is_ooo_module{ $mod } = "true";
-                    # print "$module -> ooo ";
-                }
-                elsif ( /jumbo2.germany.sun.com/ )
-                {
-                    my $mod = $path[ 0 ];
-                    #push @so_modules , $mod;
-                    # print "$module -> so ";
-                    #$so_lookup_hash{ $mod } = "true";
-                }
-                #else 
-                #{
-                #    print "ERROR: Is $module a SO or OOo module? Can not parese the $module/.svn/entries file ... please check mwsfinnish/merge/splitsdf.pl line 280\n";
-                # exit -1;
-                #}
-            }
-        }
+        write_sdf( \%string_hash_ooo , $ooo_l10n_path );
     }
-    chdir $last_dir ;
-    #print "OOO\n";
-    #print @ooo_modules;
-    #print "\nSO\n";
-    #print @so_modules;
-}
-
-
-#sub parse
-#{
-#    my $command = "$CVS_BINARY -d:pserver:anoncvs\@anoncvs.services.openoffice.org:/cvs co -c";
-#    my $output  = `$command`;
-#    my $rc = $? << 8;
-#    if ( $output eq "" || $rc < 0 ){
-#        print STDERR "ERROR: Can not fetch cvs alias list, please login to the cvs server and press at the password prompt just return\ncvs -d:pserver:anoncvs\@anoncvs.services.openoffice.org:/cvs login\n"; 
-#        exit ( -1 );
-#    }
-#    my @list = split /\n/ , $output ;
-#    foreach my $string( @list )
-#    {
-#
-#        #        print "Found '$1'\n" , if( $string =~ /^(\w*)/ && $1 ne "" );
-#
-#        $is_ooo_module{ $1 } = "TRUE", if( $string =~ /^(\w*)/ && $1 ne "" );
-#    }
-#    #    foreach my $key( keys( %is_ooo_module ) )
-#    #{
-#        #    print "$key\n";
-#        #}
-#}
-sub is_openoffice_module
-{
-    my $module              = shift;
-    return "TRUE", if ( $force_ooo_module || defined $is_ooo_module{ $module } );
-    return "";
+    else
+    {
+        write_sdf( \%string_hash_so , $so_l10n_path );
+    } 
 }
 
 sub write_sdf
@@ -458,16 +385,9 @@ sub collectfiles{
     # $| = 1; 
     STDOUT->autoflush( 1 );
 
-    ### Search sdf particles
-    #print STDOUT "### Searching sdf particles\n";
     my $working_path = getcwd();
     chdir $ENV{SOURCE_ROOT_DIR}, if defined $ENV{SOURCE_ROOT_DIR};
-    #chdir $srcpath;         
-    #find ( { wanted => \&wanted , follow => 1 }, getcwd() );
-    #chdir $working_path;
     add_paths( $langhash_ref );
-    #my $nFound  = $#sdfparticles +1; 
-    #print "\n    $nFound files found !\n";
 
     my ( $LOCALIZEPARTICLE , $localizeSDF ) = File::Temp::tempfile();
     close( $LOCALIZEPARTICLE ); 
@@ -591,7 +511,6 @@ sub collectfiles{
         }
     }
     close ALLPARTICLES_MERGED;
-#***************    
     
     # Hash of array
     my %output;
@@ -1156,22 +1075,3 @@ sub usage{
     print STDERR "\nlocalize -m -l cs -f my.sdf\n( Merge cs translation into the sourcecode ) \n";
 }
 
-#            my $line           = defined $_ ? $_ : '';
-#            my $leftpart       = defined $2 ? $2 : '';
-#            my $prj            = defined $3 ? $3 : '';
-#            my $file           = defined $4 ? $4 : '';
-#            my $dummy          = defined $5 ? $5 : '';
-#            my $type           = defined $6 ? $6 : '';
-#            my $gid            = defined $7 ? $7 : '';
-#            my $lid            = defined $8 ? $8 : '';
-#            my $helpid         = defined $9 ? $9 : '';
-#            my $plattform      = defined $10 ? $10 : '';
-#            my $width          = defined $11 ? $11 : '';
-#            my $lang           = defined $12 ? $12 : '';
-#            my $rightpart      = defined $13 ? $13 : '';
-#            my $text           = defined $14 ? $14 : '';
-#            my $helptext       = defined $15 ? $15 : '';
-#            my $quickhelptext  = defined $16 ? $16 : '';
-#            my $title          = defined $17 ? $17 : '';
-#            my $timestamp      = defined $18 ? $18 : '';
- 
commit 79e4fe12231d867946e5670be805e5c2a3e0fe5a
Author: Ivo Hinkelmann <ihi at openoffice.org>
Date:   Tue Oct 5 19:01:32 2010 +0200

    ooo330l10n4: utf8 encoding issue

diff --git a/l10ntools/scripts/tool/l10ntool.py b/l10ntools/scripts/tool/l10ntool.py
index 70d8867..f163002 100644
--- a/l10ntools/scripts/tool/l10ntool.py
+++ b/l10ntools/scripts/tool/l10ntool.py
@@ -66,11 +66,10 @@ class AbstractL10nTool:
         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,
diff --git a/l10ntools/scripts/tool/xhtex.py b/l10ntools/scripts/tool/xhtex.py
index ae973aa..d916fc6 100644
--- a/l10ntools/scripts/tool/xhtex.py
+++ b/l10ntools/scripts/tool/xhtex.py
@@ -56,13 +56,14 @@ class Xhtex(AbstractL10nTool):
             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)  
+                    elem.childNodes[0].data = unicode(str(sdfdata[obj.get_id()].text),"utf8")
+
                 
     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))
+                elem.setAttribute("title", unicode(str(sdfdata[obj.get_id()].text),"utf8"))
 
     # L10N tool       
     def __init__(self):
@@ -97,7 +98,7 @@ class Xhtex(AbstractL10nTool):
         try:
             f = open(outputfilename, "w+")
             str = dom.toxml()
-            f.write(str)
+            f.write(str.encode("utf-8"))
         except IOError:
             print "ERROR: Can not write file " + outputfilename
             sys.exit(-1)
commit 2ba28af94d701aeae51e3c36ae1e2a56b982075b
Author: Philipp Lohmann [pl] <Philipp.Lohmann at Oracle.COM>
Date:   Tue Oct 5 15:16:38 2010 +0200

    ooo33gsl10: #i112076# fix MetaFloatTransparentAction

diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx
index 99db8a8..f4c7fc1 100644
--- a/vcl/source/gdi/metaact.cxx
+++ b/vcl/source/gdi/metaact.cxx
@@ -3793,7 +3793,6 @@ MetaAction* MetaFloatTransparentAction::Clone()
 void MetaFloatTransparentAction::Move( long nHorzMove, long nVertMove )
 {
     maPoint.Move( nHorzMove, nVertMove );
-    maMtf.Move(nHorzMove, nVertMove);
 }
 
 // ------------------------------------------------------------------------
@@ -3804,7 +3803,6 @@ void MetaFloatTransparentAction::Scale( double fScaleX, double fScaleY )
     ImplScaleRect( aRectangle, fScaleX, fScaleY );
     maPoint = aRectangle.TopLeft();
     maSize = aRectangle.GetSize();
-    maMtf.Scale(fScaleX, fScaleY);
 }
 
 // ------------------------------------------------------------------------
commit cc14aa6f78d864c1b5ef2909572d74b0a319080f
Author: Herbert Duerr [hdu] <herbert.duerr at oracle.com>
Date:   Tue Oct 5 13:05:24 2010 -0700

    #i102807# adjust magnify event sensitivity to app expectations

diff --git a/vcl/aqua/inc/salframeview.h b/vcl/aqua/inc/salframeview.h
index 25048cc..9072664 100755
--- a/vcl/aqua/inc/salframeview.h
+++ b/vcl/aqua/inc/salframeview.h
@@ -77,6 +77,10 @@
     id              mpMouseEventListener;
     id              mDraggingDestinationHandler;
     NSEvent*        mpLastSuperEvent;
+
+    // #i102807# used by magnify event handler
+    NSTimeInterval	mfLastMagnifyTime;
+    float			mfMagnifyDeltaSum;
 }
 +(void)unsetMouseFrame: (AquaSalFrame*)pFrame;
 -(id)initWithSalFrame: (AquaSalFrame*)pFrame;
diff --git a/vcl/aqua/source/window/salframeview.mm b/vcl/aqua/source/window/salframeview.mm
index 25dadf0..2f9959a 100755
--- a/vcl/aqua/source/window/salframeview.mm
+++ b/vcl/aqua/source/window/salframeview.mm
@@ -378,6 +378,7 @@ static AquaSalFrame* getMouseContainerFrame()
         mpLastSuperEvent = nil;
     }
 
+    mfLastMagnifyTime = 0.0;
     return self;
 }
 
@@ -637,21 +638,40 @@ private:
     
     // TODO: ??  -(float)magnification;
     if( AquaSalFrame::isAlive( mpFrame ) )
-    {
-        mpFrame->mnLastEventTime = static_cast<ULONG>( [pEvent timestamp] * 1000.0 );
+	{
+		const NSTimeInterval fMagnifyTime = [pEvent timestamp];
+        mpFrame->mnLastEventTime = static_cast<ULONG>( fMagnifyTime * 1000.0 );
         mpFrame->mnLastModifierFlags = [pEvent modifierFlags];
-        
-        float dZ = 0.0;
-        for(;;)
+
+        // check if this is a new series of magnify events
+        static const NSTimeInterval fMaxDiffTime = 0.3;
+        const bool bNewSeries = (fMagnifyTime - mfLastMagnifyTime > fMaxDiffTime);
+
+        if( bNewSeries )
+            mfMagnifyDeltaSum = 0.0;
+        mfMagnifyDeltaSum += [pEvent deltaZ];
+
+		mfLastMagnifyTime = [pEvent timestamp];
+		// TODO: change to 0.1 when COMMAND_WHEEL_ZOOM handlers allow finer zooming control
+		static const float fMagnifyFactor = 0.25;
+        static const float fMinMagnifyStep = 15.0 / fMagnifyFactor;
+        if( fabs(mfMagnifyDeltaSum) <= fMinMagnifyStep )
+            return;
+
+        // adapt NSEvent-sensitivity to application expectations
+        // TODO: rather make COMMAND_WHEEL_ZOOM handlers smarter
+        const float fDeltaZ = mfMagnifyDeltaSum * fMagnifyFactor;
+        int nDeltaZ = FRound( fDeltaZ );
+        if( !nDeltaZ )
         {
-            dZ += [pEvent deltaZ];
-            NSEvent* pNextEvent = [NSApp nextEventMatchingMask: NSScrollWheelMask
-            untilDate: nil inMode: NSDefaultRunLoopMode dequeue: YES ];
-            if( !pNextEvent )
-                break;
-            pEvent = pNextEvent;
+            // handle new series immediately
+            if( !bNewSeries )
+                return;
+            nDeltaZ = (fDeltaZ >= 0.0) ? +1 : -1;
         }
-        
+        // eventually give credit for delta sum
+        mfMagnifyDeltaSum -= nDeltaZ / fMagnifyFactor;
+
         NSPoint aPt = [NSEvent mouseLocation];
         mpFrame->CocoaToVCL( aPt );
         
@@ -667,18 +687,15 @@ private:
         if( Application::GetSettings().GetLayoutRTL() )
             aEvent.mnX = mpFrame->maGeometry.nWidth-1-aEvent.mnX;
         
-        if( dZ != 0.0 )
-        {
-            aEvent.mnDelta = static_cast<long>(floor(dZ));
-            aEvent.mnNotchDelta = dZ < 0 ? -1 : 1;
-            if( aEvent.mnDelta == 0 )
-                aEvent.mnDelta = aEvent.mnNotchDelta;
-            aEvent.mbHorz = FALSE;
-            aEvent.mnScrollLines = dZ > 0 ? dZ/WHEEL_EVENT_FACTOR : -dZ/WHEEL_EVENT_FACTOR;
-            if( aEvent.mnScrollLines == 0 )
-                aEvent.mnScrollLines = 1;
-            mpFrame->CallCallback( SALEVENT_WHEELMOUSE, &aEvent );
-        }
+        aEvent.mnDelta = nDeltaZ;
+        aEvent.mnNotchDelta = (nDeltaZ >= 0) ? +1 : -1;
+        if( aEvent.mnDelta == 0 )
+            aEvent.mnDelta = aEvent.mnNotchDelta;
+        aEvent.mbHorz = FALSE;
+        aEvent.mnScrollLines = nDeltaZ;
+        if( aEvent.mnScrollLines == 0 )
+            aEvent.mnScrollLines = 1;
+        mpFrame->CallCallback( SALEVENT_WHEELMOUSE, &aEvent );
     }
 }
 
commit aba683e252530fcd7e68d8f9c0377a7ddda71447
Author: Herbert Duerr [hdu] <herbert.duerr at oracle.com>
Date:   Fri Sep 24 14:08:30 2010 +0200

    #i114703# better selection of localized fontnames (thanks cmc)

diff --git a/vcl/unx/source/fontmanager/fontconfig.cxx b/vcl/unx/source/fontmanager/fontconfig.cxx
index 1208dcb..ec9eb36 100644
--- a/vcl/unx/source/fontmanager/fontconfig.cxx
+++ b/vcl/unx/source/fontmanager/fontconfig.cxx
@@ -509,22 +509,29 @@ namespace
 
         std::vector<lang_and_family>::const_iterator aEnd = families.end();
         bool alreadyclosematch = false;
-        for (std::vector<lang_and_family>::const_iterator aIter = families.begin(); aIter != aEnd; ++aIter)
+        for( std::vector<lang_and_family>::const_iterator aIter = families.begin(); aIter != aEnd; ++aIter )
         {
             const char *pLang = (const char*)aIter->first;
-            //perfect
-            if( rtl_str_compare(pLang,sFullMatch.getStr() ) == 0)
+            if( rtl_str_compare( pLang, sFullMatch.getStr() ) == 0)
             {
+                // both language and country match
                 candidate = aIter->second;
                 break;
             }
-            else if( (rtl_str_compare(pLang,sLangMatch.getStr()) == 0) && (!alreadyclosematch))
+            else if( alreadyclosematch )
+            continue;
+            else if( rtl_str_compare( pLang, sLangMatch.getStr()) == 0)
             {
+                // just the language matches
                 candidate = aIter->second;
                 alreadyclosematch = true;
             }
+            else if( rtl_str_compare( pLang, "en") == 0)
+            {
+                // fallback to the english family name
+                candidate = aIter->second;
+            }
         }
-
         return candidate;
     }
 }
commit 5ee11644b91eb798fb000b515c9257511328c342
Merge: e68bd06... 8d3cc3c...
Author: Frank Schoenheit [fs] <frank.schoenheit at oracle.com>
Date:   Mon Sep 20 23:17:40 2010 +0200

    dba33j: merge after pulling OOO330.m8

commit c0a2922fc6e90000785a0a20591f25da7890e832
Merge: 209a378... 8d3cc3c...
Author: Henning Brinkmann <hbrinkm at openoffice.org>
Date:   Mon Sep 20 17:13:53 2010 +0200

    merged OOO330_m8

commit e68bd068ae969f4b6b009ad7c33ff35054b9d65b
Author: Frank Schoenheit [fs] <frank.schoenheit at oracle.com>
Date:   Tue Sep 14 09:09:34 2010 +0200

    dba33j: #i111125# Resize: do not leave the method prematurely, the more not depending on a condition whose state is about to be changed a few lines below

diff --git a/svtools/source/brwbox/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx
index 5f81ebe..47ac51f 100644
--- a/svtools/source/brwbox/brwbox2.cxx
+++ b/svtools/source/brwbox/brwbox2.cxx
@@ -613,13 +613,6 @@ void BrowseBox::Resize()
     if (IsZoom())
         nSBSize = (ULONG)(nSBSize * (double)GetZoom());
 
-    long nSize = pDataWin->GetPosPixel().Y();
-    if( !getDataWindow()->bNoHScroll )
-        nSize += aHScroll.GetSizePixel().Height();
-
-    if ( GetOutputSizePixel().Height() < nSize )
-        return;
-
     DoHideCursor( "Resize" );
     USHORT nOldVisibleRows =
         (USHORT)(pDataWin->GetOutputSizePixel().Height() / GetDataRowHeight() + 1);
commit 209a37874326d662d8a9c266b298feb0e842d7ae
Merge: 4bf68ac... 4c99ca3...
Author: Henning Brinkmann <hbrinkm at openoffice.org>
Date:   Fri Sep 10 17:42:43 2010 +0200

    merged changes by sb

commit 4c99ca33ecafb66c7576aa61dc5bdb8970ada311
Author: sb <sb at openoffice.org>
Date:   Thu Sep 9 10:48:03 2010 +0200

    hb22: #b6982587# treat null LD_LIBRARY_PATH like unset one

diff --git a/padmin/source/spadmin.sh b/padmin/source/spadmin.sh
index 26a720e..01b1964 100644
--- a/padmin/source/spadmin.sh
+++ b/padmin/source/spadmin.sh
@@ -57,7 +57,7 @@ if [ -x "$sd_prog/../basis-link/ure-link/bin/javaldx" ] ; then
     my_path=`"$sd_prog/../basis-link/ure-link/bin/javaldx" $BOOTSTRAPVARS \
         "-env:INIFILENAME=vnd.sun.star.pathname:$sd_prog/redirectrc"`
     if [ -n "$my_path" ] ; then
-        LD_LIBRARY_PATH=$my_path${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH}
+        LD_LIBRARY_PATH=$my_path${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
         export LD_LIBRARY_PATH
     fi
 fi


More information about the Libreoffice-commits mailing list