[ooo-build-commit] .: 44 commits - l10ntools/java l10ntools/prj l10ntools/scripts l10ntools/source svtools/inc svtools/source toolkit/inc toolkit/source vcl/aqua vcl/inc vcl/source vcl/unx vcl/win

Jan Holesovsky kendy at kemper.freedesktop.org
Wed Oct 6 07:10:38 PDT 2010


 l10ntools/java/jpropex/java/JPropEx.java        |   86 ++--
 l10ntools/prj/build.lst                         |    3 
 l10ntools/prj/d.lst                             |   16 
 l10ntools/scripts/makefile.mk                   |   57 +++
 l10ntools/scripts/tool/xhtex.py                 |    2 
 l10ntools/scripts/xhtex                         |    8 
 l10ntools/scripts/xtxex                         |    8 
 l10ntools/source/help/HelpIndexerTool.java      |   30 +
 l10ntools/source/help/HelpLinker.cxx            |  201 +++++++----
 svtools/inc/svtools/table/tabledatawindow.hxx   |    1 
 svtools/source/contnr/svimpbox.cxx              |    8 
 svtools/source/table/defaultinputhandler.cxx    |    1 
 svtools/source/table/tabledatawindow.cxx        |    7 
 toolkit/inc/pch/precompiled_toolkit.hxx         |    1 
 toolkit/inc/toolkit/helper/solarrelease.hxx     |   61 ---
 toolkit/source/awt/vclxwindow.cxx               |    4 
 vcl/aqua/source/a11y/aqua11yselectionwrapper.mm |   33 -
 vcl/aqua/source/gdi/salgdi.cxx                  |  140 ++++---
 vcl/aqua/source/gdi/salnativewidgets.cxx        |    8 
 vcl/inc/vcl/svapp.hxx                           |   24 +
 vcl/source/gdi/pdfwriter_impl.cxx               |    6 
 vcl/source/window/dlgctrl.cxx                   |  115 +++---
 vcl/source/window/syswin.cxx                    |    2 
 vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx        |  436 ++++++++++++------------
 vcl/unx/source/gdi/pspgraphics.cxx              |   11 
 vcl/win/source/gdi/winlayout.cxx                |    4 
 26 files changed, 695 insertions(+), 578 deletions(-)

New commits:
commit c6d91ca4136c5966ae6ef66d4f8a581e481fe27c
Merge: 3230143... a450262...
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Wed Oct 6 16:04:41 2010 +0200

    Merge branch 'master' of ssh://git.freedesktop.org/git/libreoffice/libs-gui

commit 323014394a706aa2738472e9df6cc096247bb44d
Merge: ceffdb5... db06926...
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Wed Oct 6 14:41:38 2010 +0200

    Merge branch 'master' of ssh://git.freedesktop.org/git/libreoffice/libs-gui

commit ceffdb55dd4d8b9ab39fcdf507b670c33f2faa73
Merge: 272d3db... c356413...
Author: Luboš Luňák <l.lunak at suse.cz>
Date:   Wed Oct 6 14:25:47 2010 +0200

    Merge commit 'ooo/OOO330_m9'
    
    Conflicts:
    	toolkit/source/awt/vclxwindow.cxx

diff --cc l10ntools/java/jpropex/java/JPropEx.java
index 6d389c4,82f702d..f068f93
--- a/l10ntools/java/jpropex/java/JPropEx.java
+++ b/l10ntools/java/jpropex/java/JPropEx.java
@@@ -1,7 -1,7 +1,7 @@@
  /*************************************************************************
   *
   * 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
@@@ -43,7 -43,7 +43,7 @@@ public class JPropE
      private boolean isQuiet             = false;
      private final String resourceType   = "javaproperties";
      private final String sourceLanguage = "en-US";
--    
++
      static final int JAVA_TYPE      = 0;
      static final int JAVA_ENUS_TYPE = 1;
      static final int EXTENSION_TYPE = 2;
@@@ -52,23 -52,23 +52,23 @@@
      {
          //data = new SdfData();
      }
--    
++
      public JPropEx( String args[] )
      {
          super();
          parseArguments( args );
          testCL();
          //testArguments();
--        if( inputSdfFileArg != null && inputSdfFileArg.length() > 0 ) 
--            merge(); 
++        if( inputSdfFileArg != null && inputSdfFileArg.length() > 0 )
++            merge();
          else
              extract();
--    } 
++    }
  
      private String getSimpleArg( String[] args , int x )
      {
          if( x < args.length ) x++;
--        else 
++        else
          {
              System.err.println("ERROR: Missing arg for "+args[ x ]+"\n");
              help();
@@@ -91,7 -91,7 +91,7 @@@
      private void testCL()
      {
          if( inputFileArg.length()>0 && ( ( pathPrefixArg.length()>0 && pathPostfixArg.length()>0 ) || outputFileArg.length()>0 ) && projectArg.length()>0 && rootArg.length()>0 && langsArg.size()>0 )
--            if( ( inputSdfFileArg.length()>0 && ( outputFileArg.length()>0 ||  ( pathPrefixArg.length()>0 && pathPostfixArg.length()>0 ) ) ) ||  ( inputFileArg.length()>0 && outputFileArg.length()>0 ) )  
++            if( ( inputSdfFileArg.length()>0 && ( outputFileArg.length()>0 ||  ( pathPrefixArg.length()>0 && pathPostfixArg.length()>0 ) ) ) ||  ( inputFileArg.length()>0 && outputFileArg.length()>0 ) )
                      return;
          System.out.println("ERROR: Strange parameters!");
          help();
@@@ -105,7 -105,7 +105,7 @@@
          System.out.println("Extract:\njpropex -p reportbuilder -r ../../../../../../.. -i Title-Function.properties -o new.sdf -l en-US");
          System.out.println("Merge: use either ( -x path -y more_path ) or ( -o ) and ( -i filename ) or ( -i @filename ). @filename contains a list with files");
          System.out.println("jpropex -p reportbuilder -r ../../../../../../.. -x ../../../../../../../unxlngx6.pro/class/com/sun/star/report/function/metadata -y ivo -i @abc -l all -lf en-US,de,fr,pt -m ../../../../../../../common.pro/misc/reportbuilder/java/com/sun/star/report/function/metadata/localize.sdf");
--        System.out.println("jpropex -p reportbuilder -r ../../../../../../.. -x ../../../../../../../unxlngx6.pro/class/com/sun/star/report/function/metadata -y ivo -i @abc -l all -lf en-US,de,fr,pt -m ../../../../../../../common.pro/misc/reportbuilder/java/com/sun/star/report/function/metadata/localize.sdf");        
++        System.out.println("jpropex -p reportbuilder -r ../../../../../../.. -x ../../../../../../../unxlngx6.pro/class/com/sun/star/report/function/metadata -y ivo -i @abc -l all -lf en-US,de,fr,pt -m ../../../../../../../common.pro/misc/reportbuilder/java/com/sun/star/report/function/metadata/localize.sdf");
          System.out.println("jpropex -p reportbuilder -r ../../../../../../.. -o ../../../../../../../unxlngx6.pro/class/com/sun/star/report/function/metadata/ -i Title-Function.properties -l all -lf en-US,de,fr,pt -m ../../../../../../../common.pro/misc/reportbuilder/java/com/sun/star/report/function/metadata/localize.sdf");
          System.out.println("jpropex -p reportbuilder -r ../../../../../../.. -x ../../../../../../../unxlngx6.pro/class/com/sun/star/report/function/metadata -y ivooo -i Title-Function.properties -l all -lf en-US,de,fr,pt -m ../../../../../../../common.pro/misc/reportbuilder/java/com/sun/star/report/function/metadata/localize.sdf");
          System.exit( -1 );
@@@ -115,7 -115,7 +115,7 @@@
      {
          SdfData data = new SdfData();
          java.util.Properties prop = loadProp( inputFileArg );
--       
++
          // Get a prototype that already contains the most common settings
          SdfEntity dolly = prepareSdfObj( inputFileArg );
          String key;
@@@ -126,19 -126,19 +126,19 @@@
          {
              key         = (String)      e.nextElement();
              currentStr  = (SdfEntity)   dolly.clone();
-             // Set the new LID and the string text
-             currentStr.setLid( key );
-             value            = prop.getProperty( key , "" ); 
+             // Set the new GID and the string text
+             currentStr.setGid( key );
 -            value            = prop.getProperty( key , "" ); 
++            value            = prop.getProperty( key , "" );
              //if( value.equals("") )  System.err.println("Warning: in file "+inputFileArg+" the string with the key "+key+" has a empty string!");
              str = (prop.getProperty( key )).replaceAll("\t" , " " );    // remove tab
              str = str.replaceAll("\n"," ");                             // remove return
--            currentStr.setText( str );     
++            currentStr.setText( str );
              if( str.length() > 0 )
                  data.add( currentStr );
          }
          data.write( outputFileArg );
      }
--    
++
      private SdfEntity prepareSdfObj( String filename )
      {
          String path = makeAbs( filename );
@@@ -148,10 -148,10 +148,10 @@@
          // TODO: Make this static
          java.text.SimpleDateFormat dateformat = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
          String date = dateformat.format( new Date() );
--        return new SdfEntity( projectArg , path , "0" /* dummy1 */ , resourceType , "", "" , "" , "" , "0" /* dummy2 */ , 
++        return new SdfEntity( projectArg , path , "0" /* dummy1 */ , resourceType , "", "" , "" , "" , "0" /* dummy2 */ ,
                                sourceLanguage , "",  "" , ""  , "" , date );
      }
--    
++
      private void merge()
      {
          SdfData data = getSdfData();
@@@ -168,7 -168,7 +168,7 @@@
              mergeFile( inputFileArg , data , true );
          }
      }
--    
++
      private Vector readFileList( String filename )
      {
          Vector lines = new Vector();
@@@ -183,9 -183,9 +183,9 @@@
              System.out.println("ERROR: Can't open file '"+filename.substring( 1 )+"'");
              System.exit( -1 );
          }
--        return lines; 
++        return lines;
      }
--   
++
      private void mergeFile( String filename , SdfData data , boolean isSingleFile )
      {
          int type = detectFormat( filename );
@@@ -198,7 -198,7 +198,7 @@@
              props.put( (String)e.nextElement() , new java.util.Properties() );
          }
          // Get a prototype that already contains the most common settings
--        
++
          SdfEntity dolly = prepareSdfObj( filename );
          String key;
          String sourceString;
@@@ -217,7 -217,7 +217,7 @@@
                  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
@@@ -249,7 -249,7 +249,7 @@@
          // use of -x <path> -y <more_path>
          // -> <path>/<lang>/<more_path>
          if( pathPrefixArg != null && pathPrefixArg.length()>0 && pathPostfixArg != null && pathPostfixArg.length()>0 )
--        {    
++        {
              path = new StringBuffer().append( pathPrefixArg ).append( "/" ).append( lcLang ).append( "/" ).append( pathPostfixArg ).append( "/" ).toString();
              name += formatFilename( filename , filenameIdx , lang , type );
          }
@@@ -305,7 -305,7 +305,7 @@@
              System.exit( -1 );
          }
      }
--    
++
      // we have different types of properties in the source code
      // each needs a different file nameing scheme
      private int detectFormat( String filename )
@@@ -316,16 -316,16 +316,16 @@@
             return JAVA_ENUS_TYPE;
         else if( filename.endsWith( ".properties" ) )
             return JAVA_TYPE;
--       
++
         // Can not detect, exit
         System.err.println("ERROR: Invalid file name. Only allowed (case sensitive!)  *_en_US.properties , *_en_us.properties or *.properties\n");
         System.exit(-1);
         return JAVA_TYPE;    // dummy
      }
--    
++
      private String formatFilename( String filename , int filenameIdx , String lang , int type )
      {
--       
++
          if( !lang.equals( "en-US" ) )
          {
              // Parse iso code
@@@ -345,8 -345,8 +345,8 @@@
              switch( type )
              {
                  // -> de_DE
--                case EXTENSION_TYPE: 
--                    lang  =  langpart1.toLowerCase(); 
++                case EXTENSION_TYPE:
++                    lang  =  langpart1.toLowerCase();
                      if( langpart2.length() > 0 )                    // -> en_US
                          lang += "_" + langpart2.toUpperCase();
                      else                                            // -> de_DE
@@@ -385,16 -385,16 +385,16 @@@
      {
          Vector langs = new Vector();
  
--        if( ((String)langsArg.get( 0 )).equalsIgnoreCase( "all" ) ) // for "-l all" use all languages found in the -m sdf file 
++        if( ((String)langsArg.get( 0 )).equalsIgnoreCase( "all" ) ) // for "-l all" use all languages found in the -m sdf file
              langs.addAll( data.getLanguages() );
          else
              langs.addAll( langsArg );              // use the langs giving by -l
  
--        if( forcedLangsArg != null ) 
++        if( forcedLangsArg != null )
              langs.addAll( forcedLangsArg );
--        
++
          return removeDupes( langs );
--    } 
++    }
      private Vector removeDupes( Vector vec )
      {
          Collection coll = new LinkedHashSet( vec );
@@@ -415,7 -415,7 +415,7 @@@
      }
      private void parseArguments( String[] args )
      {
--        
++
          if( args.length == 0 )
          {
              System.out.println("ERROR: No args???");
@@@ -424,7 -424,7 +424,7 @@@
          }
          for( int x = 0; x < args.length ; x++ )
          {
--            if( args[ x ].equalsIgnoreCase("-i") ) 
++            if( args[ x ].equalsIgnoreCase("-i") )
              {
                  // Input resource file
                  inputFileArg = getSimpleArg( args , x );
@@@ -472,7 -472,7 +472,7 @@@
              }
              else if( args[ x ].equalsIgnoreCase("-qq") )
              {
--                isQuiet = true; 
++                isQuiet = true;
              }
          }
      }
@@@ -480,7 -480,7 +480,7 @@@
      {
          File file;
          try
--        {    
++        {
              file = new File( path );
              return file.getCanonicalPath();
          }catch( IOException e )
@@@ -492,12 -492,12 +492,12 @@@
      }
  /*    private boolean testArguments()
      {
--        // nice merge 
--        if( inputSdfFileArg != null && inputSdfFileArg.length()>0 ) 
++        // nice merge
++        if( inputSdfFileArg != null && inputSdfFileArg.length()>0 )
              // nice merge
              return  projectArg != null  && rootArg != null && inputFileArg != null && pathPrefixArg != null && pathPostfixArg != null && langsArg != null &&
                      projectArg.length()>0 && rootArg.length()>0 && inputFileArg.length()>0 && pathPrefixArg.length()>0 && pathPostfixArg.length()>0 && langsArg.size()>0 ;
--        else 
++        else
              // nice extract
              return  projectArg != null && rootArg != null && inputFileArg != null && outputFileArg != null && langsArg != null &&
                      projectArg.length()>0 && rootArg.length()>0 && inputFileArg.length()>0 && outputFileArg.length()>0 && langsArg.size()>0;
diff --cc l10ntools/scripts/makefile.mk
index 0000000,8bfa64e..af1f66b
mode 000000,100644..100644
--- a/l10ntools/scripts/makefile.mk
+++ b/l10ntools/scripts/makefile.mk
@@@ -1,0 -1,59 +1,57 @@@
+ #*************************************************************************
+ #
+ # 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.
+ #
+ #*************************************************************************
+ 
+ # Copy *.py files into output tree and call a script once to
+ # force python to create the *.pyc files.
+ 
+ PRJ=..
+ TARGET = l10ntools_dummy_pyc
+ 
+ .INCLUDE: settings.mk
+ 
+ .IF "$(SYSTEM_PYTHON)"!="YES"
+ PYTHON=$(AUGMENT_LIBRARY_PATH) $(WRAPCMD) $(SOLARBINDIR)/python
+ .ELSE                   # "$(SYSTEM_PYTHON)"!="YES"
+ PYTHON=$(AUGMENT_LIBRARY_PATH) $(WRAPCMD) python
+ .ENDIF                  # "$(SYSTEM_PYTHON)"!="YES"
+ 
+ PYFILES = $(BIN)$/const.py \
+           $(BIN)$/l10ntool.py \
+           $(BIN)$/pseudo.py \
+           $(BIN)$/sdf.py \
+           $(BIN)$/xhtex.py \
 -          $(BIN)$/xtxex.py   
++          $(BIN)$/xtxex.py
+ 
+ .INCLUDE: target.mk
+ 
 -.IGNORE : create_pyc 
 -ALLTAR : create_pyc 
++.IGNORE : create_pyc
++ALLTAR : create_pyc
+ create_pyc : $(PYFILES)
+     @$(PYTHON) $(BIN)/xtxex.py >& /dev/null
+ 
+ $(BIN)$/%.py : tool/%.py
+     @$(COPY) $< $@
 -
 -
diff --cc l10ntools/source/help/HelpIndexerTool.java
index ba91987,363f115..a39b539
--- a/l10ntools/source/help/HelpIndexerTool.java
+++ b/l10ntools/source/help/HelpIndexerTool.java
@@@ -1,7 -1,7 +1,7 @@@
  /*************************************************************************
   *
   * 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
@@@ -51,7 -51,7 +51,7 @@@ public class HelpIndexerToo
      {
      }
  
--    
++
      /**
       * @param args the command line arguments
       */
@@@ -83,7 -86,11 +86,11 @@@
          int nArgCount = args.length;
          for( int i = 0 ; i < nArgCount ; i++ )
          {
-             if( "-lang".equals(args[i]) )
+             if( "-extension".equals(args[i]) )
+             {
+                 bExtension = true;
 -            }            
++            }
+             else if( "-lang".equals(args[i]) )
              {
                  if( i + 1 < nArgCount )
                  {
@@@ -165,7 -173,7 +173,7 @@@
              aSrcDirStr = aDirToZipStr;
          File aCaptionFilesDir = new File( aSrcDirStr + File.separator + "caption" );
          File aContentFilesDir = new File( aSrcDirStr + File.separator + "content" );
--        
++
          try
          {
              Date start = new Date();
diff --cc l10ntools/source/help/HelpLinker.cxx
index bc0f187,2b75b08..66c794c
--- a/l10ntools/source/help/HelpLinker.cxx
+++ b/l10ntools/source/help/HelpLinker.cxx
@@@ -1,7 -1,7 +1,7 @@@
  /*************************************************************************
   *
   * 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
@@@ -58,7 -58,7 +58,7 @@@ private
      xsltStylesheetPtr		m_xsltStylesheetPtrCaption;
      xsltStylesheetPtr		m_xsltStylesheetPtrContent;
  
--public: 
++public:
      IndexerPreProcessor( const std::string& aModuleName, const fs::path& fsIndexBaseDir,
           const fs::path& idxCaptionStylesheet, const fs::path& idxContentStylesheet );
      ~IndexerPreProcessor();
@@@ -246,8 -246,8 +246,8 @@@ class HelpLinke
  public:
      void main(std::vector<std::string> &args,
  //		std::string* pExtensionPath = NULL, const rtl::OUString* pOfficeHelpPath = NULL )
--              std::string* pExtensionPath = NULL, 
--              std::string* pDestination = NULL, 
++              std::string* pExtensionPath = NULL,
++              std::string* pDestination = NULL,
                const rtl::OUString* pOfficeHelpPath = NULL )
  
              throw( HelpProcessingException );
@@@ -283,7 -285,7 +285,7 @@@ private
      void initIndexerPreProcessor();
      void link() throw( HelpProcessingException );
      void addBookmark( DB* dbBase, FILE* pFile_DBHelp, std::string thishid,
--        const std::string& fileB, const std::string& anchorB, 
++        const std::string& fileB, const std::string& anchorB,
          const std::string& jarfileB, const std::string& titleB );
  #if 0
      /**
@@@ -305,7 -307,7 +307,7 @@@ namespace URLEncode
      {
          const char *good = "!$&'()*+,-.=@_";
          static const char hex[17] = "0123456789ABCDEF";
--    
++
          std::string result;
          for (size_t i=0; i < rIn.length(); ++i)
          {
@@@ -353,7 -355,7 +355,7 @@@ void HelpLinker::addBookmark( DB* dbBas
      dataB[i++] = static_cast<unsigned char>(fileLen);
      for (size_t j = 0; j < fileB.length(); ++j)
          dataB[i++] = fileB[j];
--    if (!anchorB.empty()) 
++    if (!anchorB.empty())
      {
          dataB[i++] = '#';
          for (size_t j = 0; j < anchorB.length(); ++j)
@@@ -393,7 -395,7 +395,7 @@@ void HelpLinker::initIndexerPreProcesso
  }
  
  /**
--* 
++*
  */
  void HelpLinker::link() throw( HelpProcessingException )
  {
@@@ -434,7 -436,7 +436,7 @@@
  #ifndef DBHELP_ONLY
      fs::path helpTextFileName(indexDirParentName / (mod + ".ht"));
      db_create(&helpText,0,0);
--    helpText->open(helpText, NULL, helpTextFileName.native_file_string().c_str(), NULL, DB_BTREE, 
++    helpText->open(helpText, NULL, helpTextFileName.native_file_string().c_str(), NULL, DB_BTREE,
          DB_CREATE | DB_TRUNCATE, 0644);
  #endif
  
@@@ -446,7 -448,7 +448,7 @@@
  #ifndef DBHELP_ONLY
      fs::path dbBaseFileName(indexDirParentName / (mod + ".db"));
      db_create(&dbBase,0,0);
--    dbBase->open(dbBase, NULL, dbBaseFileName.native_file_string().c_str(), NULL, DB_BTREE, 
++    dbBase->open(dbBase, NULL, dbBaseFileName.native_file_string().c_str(), NULL, DB_BTREE,
          DB_CREATE | DB_TRUNCATE, 0644);
  #endif
  
@@@ -458,7 -460,7 +460,7 @@@
      DB* keyWord(0);
      fs::path keyWordFileName(indexDirParentName / (mod + ".key"));
      db_create(&keyWord,0,0);
--    keyWord->open(keyWord, NULL, keyWordFileName.native_file_string().c_str(), NULL, DB_BTREE, 
++    keyWord->open(keyWord, NULL, keyWordFileName.native_file_string().c_str(), NULL, DB_BTREE,
          DB_CREATE | DB_TRUNCATE, 0644);
  #endif
  
@@@ -491,7 -493,7 +493,7 @@@
      if( !bExtensionMode )
      {
  #ifndef OS2 // YD @TODO@ crashes libc runtime :-(
--        std::cout << "Making " << outputFile.native_file_string() << 
++        std::cout << "Making " << outputFile.native_file_string() <<
              " from " << helpFiles.size() << " input files" << std::endl;
  #endif
      }
@@@ -505,7 -507,7 +507,7 @@@
              std::cout << ".";
              std::cout.flush();
          }
--         
++
          // process one file
          // streamTable contains the streams in the hzip file
          StreamTable streamTable;
@@@ -537,8 -539,8 +539,8 @@@
              langsourceRoot.append('/' + lang + '/');
              xhpFile = fs::path(xhpFileName, fs::native);
          }
--         
--        HelpCompiler hc( streamTable, xhpFile, langsourceRoot, 
++
++        HelpCompiler hc( streamTable, xhpFile, langsourceRoot,
              embeddStylesheet, module, lang, bExtensionMode );
  
          HCDBG(std::cerr << "before compile of " << xhpFileName << std::endl);
@@@ -548,7 -550,7 +550,7 @@@
          if (!success && !bExtensionMode)
          {
              std::stringstream aStrStream;
--            aStrStream << 
++            aStrStream <<
                  "\nERROR: compiling help particle '"
                      << xhpFileName
                      << "' for language '"
@@@ -627,13 -629,13 +629,13 @@@
                  // std::cerr << hzipFileName << std::endl;
                  const LinkedList& ll = enumer->second;
                  LinkedList::const_iterator aOtherEnd = ll.end();
--                for (LinkedList::const_iterator llIter = ll.begin(); 
++                for (LinkedList::const_iterator llIter = ll.begin();
                      llIter != aOtherEnd; ++llIter)
                  {
                          helpKeyword.insert(*llIter, totalId);
                  }
              }
--                
++
          }
  
          // and last the helptexts
@@@ -686,7 -688,7 +688,7 @@@
              if (document)
              {
                  std::string temp = module;
--                std::transform (temp.begin(), temp.end(), temp.begin(), tolower); 
++                std::transform (temp.begin(), temp.end(), temp.begin(), tolower);
                  m_pIndexerPreProcessor->processDocument(document, URLEncoder::encode(documentPath) );
              }
          }
@@@ -758,7 -760,7 +760,7 @@@
  
  
  void HelpLinker::main( std::vector<std::string> &args,
--                       std::string* pExtensionPath, std::string* pDestination,  
++                       std::string* pExtensionPath, std::string* pDestination,
                         const rtl::OUString* pOfficeHelpPath )
      throw( HelpProcessingException )
  {
@@@ -793,23 -786,46 +786,46 @@@
      }
  
      size_t i = 0;
- 
+     bool bSrcOption = false;
      while (i < args.size())
      {
-         if (args[i].compare("-src") == 0)
+         if (args[i].compare("-extlangsrc") == 0)
+         {
+             ++i;
 -            if (i >= args.size()) 
++            if (i >= args.size())
+             {
+                 std::stringstream aStrStream;
+                 aStrStream << "extension source missing" << std::endl;
+                 throw HelpProcessingException( HELPPROCESSING_GENERAL_ERROR, aStrStream.str() );
+             }
+             extsource = args[i];
+         }
+         else if (args[i].compare("-extlangdest") == 0)
+         {
+             //If this argument is not provided then the location provided in -extsource will
+             //also be the destination
+             ++i;
 -            if (i >= args.size()) 
++            if (i >= args.size())
+             {
+                 std::stringstream aStrStream;
+                 aStrStream << "extension destination missing" << std::endl;
+                 throw HelpProcessingException( HELPPROCESSING_GENERAL_ERROR, aStrStream.str() );
+             }
+             extdestination = args[i];
+         }
+         else if (args[i].compare("-src") == 0)
          {
              ++i;
--            if (i >= args.size()) 
++            if (i >= args.size())
              {
                  std::stringstream aStrStream;
                  aStrStream << "sourceroot missing" << std::endl;
                  throw HelpProcessingException( HELPPROCESSING_GENERAL_ERROR, aStrStream.str() );
              }
- 
-             if( !bExtensionMode )
-                 sourceRoot = fs::path(args[i], fs::native);
+             bSrcOption = true;
+             sourceRoot = fs::path(args[i], fs::native);
          }
--        else if (args[i].compare("-sty") == 0) 
++        else if (args[i].compare("-sty") == 0)
          {
              ++i;
              if (i >= args.size())
@@@ -820,11 -836,11 +836,11 @@@
              }
  
              embeddStylesheet = fs::path(args[i], fs::native);
--        } 
--        else if (args[i].compare("-zipdir") == 0) 
++        }
++        else if (args[i].compare("-zipdir") == 0)
          {
              ++i;
--            if (i >= args.size()) 
++            if (i >= args.size())
              {
                  std::stringstream aStrStream;
                  aStrStream << "idxtemp missing" << std::endl;
@@@ -832,11 -848,11 +848,11 @@@
              }
  
              zipdir = fs::path(args[i], fs::native);
--        } 
--        else if (args[i].compare("-idxcaption") == 0) 
++        }
++        else if (args[i].compare("-idxcaption") == 0)
          {
              ++i;
--            if (i >= args.size()) 
++            if (i >= args.size())
              {
                  std::stringstream aStrStream;
                  aStrStream << "idxcaption stylesheet missing" << std::endl;
@@@ -844,11 -860,11 +860,11 @@@
              }
  
              idxCaptionStylesheet = fs::path(args[i], fs::native);
--        } 
--        else if (args[i].compare("-idxcontent") == 0) 
++        }
++        else if (args[i].compare("-idxcontent") == 0)
          {
              ++i;
--            if (i >= args.size()) 
++            if (i >= args.size())
              {
                  std::stringstream aStrStream;
                  aStrStream << "idxcontent stylesheet missing" << std::endl;
@@@ -868,8 -884,8 +884,8 @@@
              }
  
              outputFile = fs::path(args[i], fs::native);
--        } 
--        else if (args[i].compare("-mod") == 0) 
++        }
++        else if (args[i].compare("-mod") == 0)
          {
              ++i;
              if (i >= args.size())
@@@ -880,7 -896,7 +896,7 @@@
              }
  
              module = args[i];
--        } 
++        }
          else if (args[i].compare("-lang") == 0)
          {
              ++i;
@@@ -892,7 -908,7 +908,7 @@@
              }
  
              lang = args[i];
--        } 
++        }
          else if (args[i].compare("-hid") == 0)
          {
              ++i;
@@@ -904,7 -920,7 +920,7 @@@
              }
  
              hid = args[i];
--        } 
++        }
          else if (args[i].compare("-add") == 0)
          {
              std::string addFile, addFileUnderPath;
@@@ -928,19 -944,66 +944,66 @@@
              if (!addFileUnderPath.empty() && !addFile.empty())
                  additionalFiles[addFileUnderPath] = addFile;
          }
--        else 
++        else
              helpFiles.push_back(args[i]);
          ++i;
      }
  
+     //We can be called from the helplinker executable or the extension manager
+     //In the latter case extsource is not used.
+     if( (pExtensionPath && pExtensionPath->length() > 0 && pOfficeHelpPath)
+         || !extsource.empty())
+     {
+         bExtensionMode = true;
+         if (!extsource.empty())
+         {
+             //called from helplinker.exe, pExtensionPath and pOfficeHelpPath
+             //should be NULL
+             sourceRoot = fs::path(extsource, fs::native);
+             extensionPath = sourceRoot.toUTF8();
+ 
+             if (extdestination.empty())
+             {
+                 std::stringstream aStrStream;
+                 aStrStream << "-extlangdest is missing" << std::endl;
+                 throw HelpProcessingException( HELPPROCESSING_GENERAL_ERROR, aStrStream.str() );
+             }
+             else
+             {
+                 //Convert from system path to file URL!!!
+                 fs::path p(extdestination, fs::native);
+                 extensionDestination = p.toUTF8();
+             }
+         }
+         else
+         { //called from extension manager
+             extensionPath = *pExtensionPath;
+             sourceRoot = fs::path(extensionPath);
+             extensionDestination = *pDestination;
+         }
+         //check if -src option was used. This option must not be used
+         //when extension help is compiled.
+         if (bSrcOption)
+         {
+             std::stringstream aStrStream;
+             aStrStream << "-src must not be used together with -extsource missing" << std::endl;
+             throw HelpProcessingException( HELPPROCESSING_GENERAL_ERROR, aStrStream.str() );
+         }
+     }
 -    
++
      if (!bExtensionMode && zipdir.empty())
      {
          std::stringstream aStrStream;
          aStrStream << "no index dir given" << std::endl;
          throw HelpProcessingException( HELPPROCESSING_GENERAL_ERROR, aStrStream.str() );
      }
-     if (!bExtensionMode && idxCaptionStylesheet.empty())
 -    
++
+     if (!bExtensionMode && idxCaptionStylesheet.empty()
+         || !extsource.empty() && idxCaptionStylesheet.empty())
      {
+         //No extension mode and extension mode using commandline
+         //!extsource.empty indicates extension mode using commandline
+         // -idxcaption paramter is required
          std::stringstream aStrStream;
          aStrStream << "no index caption stylesheet given" << std::endl;
          throw HelpProcessingException( HELPPROCESSING_GENERAL_ERROR, aStrStream.str() );
@@@ -956,8 -1021,13 +1021,13 @@@
  
          idxCaptionStylesheet = fs::path( aStdStr_IdxCaptionPathFileURL );
      }
-     if (!bExtensionMode && idxContentStylesheet.empty())
 -    
++
+     if (!bExtensionMode && idxContentStylesheet.empty()
+         || !extsource.empty() && idxContentStylesheet.empty())
      {
+         //No extension mode and extension mode using commandline
+         //!extsource.empty indicates extension mode using commandline
+         // -idxcontent paramter is required
          std::stringstream aStrStream;
          aStrStream << "no index content stylesheet given" << std::endl;
          throw HelpProcessingException( HELPPROCESSING_GENERAL_ERROR, aStrStream.str() );
@@@ -1054,7 -1127,7 +1127,7 @@@ extern "C" void StructuredXMLErrorFunct
      GpXMLParsingException = pException;
  
      // Reset error handler
--    xmlSetStructuredErrorFunc( NULL, NULL ); 
++    xmlSetStructuredErrorFunc( NULL, NULL );
  }
  
  HelpProcessingErrorInfo& HelpProcessingErrorInfo::operator=( const struct HelpProcessingException& e )
@@@ -1115,7 -1188,7 +1188,7 @@@ HELPLINKER_DLLPUBLIC bool compileExtens
      std::string aStdStrDestination = pDestination;
  
      // Set error handler
--    xmlSetStructuredErrorFunc( NULL, (xmlStructuredErrorFunc)StructuredXMLErrorFunction ); 
++    xmlSetStructuredErrorFunc( NULL, (xmlStructuredErrorFunc)StructuredXMLErrorFunction );
      try
      {
          HelpLinker* pHelpLinker = new HelpLinker();
@@@ -1137,7 -1210,7 +1210,7 @@@
          bSuccess = false;
      }
      // Reset error handler
--    xmlSetStructuredErrorFunc( NULL, NULL ); 
++    xmlSetStructuredErrorFunc( NULL, NULL );
  
      // i83624: Tree files
      ::rtl::OUString aTreeFileURL = aExtensionLanguageRoot;
@@@ -1146,7 -1219,7 +1219,7 @@@
      osl::FileBase::RC rcGet = osl::DirectoryItem::get( aTreeFileURL, aTreeFileItem );
      osl::FileStatus aFileStatus( FileStatusMask_FileSize );
      if( rcGet == osl::FileBase::E_None &&
--        aTreeFileItem.getFileStatus( aFileStatus ) == osl::FileBase::E_None && 
++        aTreeFileItem.getFileStatus( aFileStatus ) == osl::FileBase::E_None &&
          aFileStatus.isValid( FileStatusMask_FileSize ) )
      {
          sal_uInt64 ret, len = aFileStatus.getFileSize();
@@@ -1169,7 -1242,7 +1242,7 @@@
              bSuccess = false;
          }
  
--        XML_ParserFree( parser );		
++        XML_ParserFree( parser );
          delete[] s;
      }
  
diff --cc toolkit/inc/pch/precompiled_toolkit.hxx
index c7430ec,c7430ec..8403a77
--- a/toolkit/inc/pch/precompiled_toolkit.hxx
+++ b/toolkit/inc/pch/precompiled_toolkit.hxx
@@@ -292,7 -292,7 +292,6 @@@
  #include "toolkit/helper/mutexhelper.hxx"
  #include "toolkit/helper/property.hxx"
  #include "toolkit/helper/servicenames.hxx"
--#include "toolkit/helper/solarrelease.hxx"
  #include "toolkit/helper/tkresmgr.hxx"
  #include "toolkit/helper/unomemorystream.hxx"
  #include "toolkit/helper/unopropertyarrayhelper.hxx"
diff --cc toolkit/inc/toolkit/helper/solarrelease.hxx
index b28d102,26ce02f..0000000
deleted file mode 100644,100644
--- a/toolkit/inc/toolkit/helper/solarrelease.hxx
+++ /dev/null
diff --cc toolkit/source/awt/vclxwindow.cxx
index 93e6c23,26e5106..e0a6d49
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@@ -65,7 -65,7 +65,6 @@@
  #include <vcl/tabpage.hxx>
  #include <vcl/button.hxx>
  #include <comphelper/asyncnotification.hxx>
--#include <toolkit/helper/solarrelease.hxx>
  #include "stylesettings.hxx"
  
  #include <toolkit/helper/unopropertyarrayhelper.hxx>
@@@ -92,7 -92,8 +91,6 @@@ using ::com::sun::star::style::Vertical
  namespace WritingMode2 = ::com::sun::star::text::WritingMode2;
  namespace MouseWheelBehavior = ::com::sun::star::awt::MouseWheelBehavior;
  
- 
 -using ::toolkit::ReleaseSolarMutex;
 -
  //====================================================================
  //= misc helpers
  //====================================================================
@@@ -339,7 -340,7 +337,7 @@@ IMPL_LINK( VCLXWindowImpl, OnProcessCal
      }
  
      {
-         SolarMutexReleaser aReleaseSolar;
 -        ReleaseSolarMutex aReleaseSolar( ReleaseSolarMutex::RescheduleDuringAcquire );
++        SolarMutexReleaser aReleaseSolar( SolarMutexReleaser::RescheduleDuringAcquire );
          for (   CallbackArray::const_iterator loop = aCallbacksCopy.begin();
                  loop != aCallbacksCopy.end();
                  ++loop
diff --cc vcl/aqua/source/a11y/aqua11yselectionwrapper.mm
index 53ab6dd,804cf10..81f203d
--- a/vcl/aqua/source/a11y/aqua11yselectionwrapper.mm
+++ b/vcl/aqua/source/a11y/aqua11yselectionwrapper.mm
@@@ -1,7 -1,7 +1,7 @@@
  /*************************************************************************
   *
   * 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
@@@ -40,20 -40,23 +40,23 @@@ using namespace ::com::sun::star::uno
  +(id)selectedChildrenAttributeForElement:(AquaA11yWrapper *)wrapper
  {
      Reference< XAccessibleSelection > xAccessibleSelection = [ wrapper accessibleSelection ];
-     NSMutableArray * children = [ [ NSMutableArray alloc ] init ];
-     
-     try {
-         sal_Int32 n = xAccessibleSelection -> getSelectedAccessibleChildCount();
-         for ( sal_Int32 i=0 ; i < n ; ++i ) {
-             [ children addObject: [ AquaA11yFactory wrapperForAccessible: xAccessibleSelection -> getSelectedAccessibleChild( i ) ] ];
+     if( xAccessibleSelection.is() )
+     {
+         NSMutableArray * children = [ [ NSMutableArray alloc ] init ];
+         try {
+             sal_Int32 n = xAccessibleSelection -> getSelectedAccessibleChildCount();
+             for ( sal_Int32 i=0 ; i < n ; ++i ) {
+                 [ children addObject: [ AquaA11yFactory wrapperForAccessible: xAccessibleSelection -> getSelectedAccessibleChild( i ) ] ];
+             }
 -            
++
+             return children;
 -            
++
+         } catch ( Exception& e)
+         {
          }
-         
-         return children;
-         
-     } catch ( Exception& e) {
-         return nil;
      }
--    
++
+     return nil;
  }
  
  
@@@ -79,13 -82,13 +82,13 @@@
      Reference< XAccessibleSelection > xAccessibleSelection = [ wrapper accessibleSelection ];
      try {
          xAccessibleSelection -> clearAccessibleSelection();
--        
++
          unsigned c = [ value count ];
          for ( unsigned i = 0 ; i < c ; ++i ) {
              xAccessibleSelection -> selectAccessibleChild( [ [ value objectAtIndex: i ] accessibleContext ] -> getAccessibleIndexInParent() );
          }
      } catch ( Exception& e) {
--    }            
++    }
  }
  
  @end
diff --cc vcl/aqua/source/gdi/salgdi.cxx
index 19f1907,7c502ac..843c190
--- a/vcl/aqua/source/gdi/salgdi.cxx
+++ b/vcl/aqua/source/gdi/salgdi.cxx
@@@ -1,7 -1,7 +1,7 @@@
  /*************************************************************************
   *
   * 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
@@@ -259,7 -259,7 +259,7 @@@ bool ImplMacFontData::HasCJKSupport( vo
  
      return mbHasCJKSupport;
  }
--        
++
  // =======================================================================
  
  AquaSalGraphics::AquaSalGraphics()
@@@ -346,24 -346,24 +346,24 @@@ void AquaSalGraphics::initResolution( N
      // #i100617# read DPI only once; there is some kind of weird caching going on
      // if the main screen changes
      // FIXME: this is really unfortunate and needs to be investigated
--    
++
      SalData* pSalData = GetSalData();
      if( pSalData->mnDPIX == 0 || pSalData->mnDPIY == 0 )
      {
          NSScreen* pScreen = nil;
--        
++
          /* #i91301#
          many woes went into the try to have different resolutions
          on different screens. The result of these trials is that OOo is not ready
          for that yet, vcl and applications would need to be adapted.
--        
++
          Unfortunately this is not possible in the 3.0 timeframe.
          So let's stay with one resolution for all Windows and VirtualDevices
          which is the resolution of the main screen
--        
++
          This of course also means that measurements are exact only on the main screen.
          For activating different resolutions again just comment out the two lines below.
--        
++
          if( pWin )
          pScreen = [pWin screen];
          */
@@@ -373,7 -373,7 +373,7 @@@
              if( pScreens )
                  pScreen = [pScreens objectAtIndex: 0];
          }
--        
++
          mnRealDPIX = mnRealDPIY = 96;
          if( pScreen )
          {
@@@ -404,7 -404,7 +404,7 @@@
          {
              DBG_ERROR( "no screen found" );
          }
--        
++
          // #i107076# maintaining size-WYSIWYG-ness causes many problems for
          //           low-DPI, high-DPI or for mis-reporting devices
          //           => it is better to limit the calculation result then
@@@ -437,7 -437,7 +437,7 @@@ void AquaSalGraphics::GetResolution( lo
  
      rDPIX = static_cast<long>(mfFakeDPIScale * mnRealDPIX);
      rDPIY = static_cast<long>(mfFakeDPIScale * mnRealDPIY);
--} 
++}
  
  void AquaSalGraphics::copyResolution( AquaSalGraphics& rGraphics )
  {
@@@ -447,7 -447,7 +447,7 @@@
      mnRealDPIX = rGraphics.mnRealDPIX;
      mnRealDPIY = rGraphics.mnRealDPIY;
      mfFakeDPIScale = rGraphics.mfFakeDPIScale;
--} 
++}
  
  // -----------------------------------------------------------------------
  
@@@ -612,7 -612,7 +612,7 @@@ void AquaSalGraphics::SetLineColor(
      maLineColor.SetAlpha( 0.0 );   // transparent
      if( CheckContext() )
          CGContextSetStrokeColor( mrContext, maLineColor.AsArray() );
--} 
++}
  
  // -----------------------------------------------------------------------
  
@@@ -639,7 -639,7 +639,7 @@@ void AquaSalGraphics::SetFillColor( Sal
      maFillColor = RGBAColor( nSalColor );
      if( CheckContext() )
          CGContextSetFillColor( mrContext, maFillColor.AsArray() );
--} 
++}
  
  // -----------------------------------------------------------------------
  
@@@ -657,7 -657,7 +657,7 @@@ void AquaSalGraphics::SetROPLineColor( 
  {
      if( ! mbPrinter )
          SetLineColor( ImplGetROPSalColor( nROPColor ) );
--} 
++}
  
  // -----------------------------------------------------------------------
  
@@@ -688,13 -688,13 +688,13 @@@ void AquaSalGraphics::drawPixel( long n
  {
      // draw pixel with current line color
      ImplDrawPixel( nX, nY, maLineColor );
--} 
++}
  
  void AquaSalGraphics::drawPixel( long nX, long nY, SalColor nSalColor )
  {
      const RGBAColor aPixelColor( nSalColor );
      ImplDrawPixel( nX, nY, aPixelColor );
--} 
++}
  
  // -----------------------------------------------------------------------
  
@@@ -706,7 -706,7 +706,7 @@@ void AquaSalGraphics::drawLine( long nX
          drawPixel( nX1, nY1 );
          return;
      }
--    
++
      if( !CheckContext() )
          return;
  
@@@ -733,10 -733,10 +733,10 @@@ void AquaSalGraphics::drawRect( long nX
           aRect.size.width    -= 1;
           aRect.size.height -= 1;
       }
--     
++
       if( IsBrushVisible() )
           CGContextFillRect( mrContext, aRect );
--    
++
       if( IsPenVisible() )
           CGContextStrokeRect( mrContext, aRect );
  
@@@ -784,9 -784,9 +784,9 @@@ void AquaSalGraphics::drawPolyLine( ULO
  
      long nX = 0, nY = 0, nWidth = 0, nHeight = 0;
      getBoundRect( nPoints, pPtAry, nX, nY, nWidth, nHeight );
--    
++
      float fX, fY;
--    
++
      CGContextBeginPath( mrContext );
      alignLinePoint( pPtAry, fX, fY );
      CGContextMoveToPoint( mrContext, fX, fY );
@@@ -798,7 -798,7 +798,7 @@@
      }
      CGContextDrawPath( mrContext, kCGPathStroke );
  
--    RefreshRect( nX, nY, nWidth, nHeight );        
++    RefreshRect( nX, nY, nWidth, nHeight );
  }
  
  // -----------------------------------------------------------------------
@@@ -824,7 -824,7 +824,7 @@@ void AquaSalGraphics::drawPolygon( ULON
          return;
  
      CGContextBeginPath( mrContext );
--    
++
      if( IsPenVisible() )
      {
          float fX, fY;
@@@ -846,7 -846,7 +846,7 @@@
      }
  
      CGContextDrawPath( mrContext, eMode );
--    RefreshRect( nX, nY, nWidth, nHeight );        
++    RefreshRect( nX, nY, nWidth, nHeight );
  }
  
  // -----------------------------------------------------------------------
@@@ -931,11 -931,11 +931,11 @@@ void AquaSalGraphics::drawPolyPolygon( 
              }
          }
      }
--    
++
      CGContextDrawPath( mrContext, eMode );
--        
++
      RefreshRect( leftX, topY, maxWidth, maxHeight );
--} 
++}
  
  // -----------------------------------------------------------------------
  
@@@ -969,16 -969,16 +969,16 @@@ bool AquaSalGraphics::drawPolyPolygon( 
          CGContextSaveGState( mrContext );
          CGContextBeginPath( mrContext );
          CGContextAddPath( mrContext, xPath );
--    
++
          // draw path with antialiased polygon
          CGContextSetShouldAntialias( mrContext, true );
--        CGContextSetAlpha( mrContext, 1.0 - fTransparency ); 
++        CGContextSetAlpha( mrContext, 1.0 - fTransparency );
          CGContextDrawPath( mrContext, kCGPathEOFillStroke );
          CGContextRestoreGState( mrContext );
--    
++
          // mark modified rectangle as updated
          RefreshRect( aRefreshRect );
--    }        
++    }
  
      CGPathRelease( xPath );
  
@@@ -1027,21 -1027,21 +1027,21 @@@ bool AquaSalGraphics::drawPolyLine( con
      // #i97317# workaround for Quartz having problems with drawing small polygons
      if( ! ((aRefreshRect.size.width <= 0.125) && (aRefreshRect.size.height <= 0.125)) )
  #endif
--    {	
++    {
          // use the path to prepare the graphics context
          CGContextSaveGState( mrContext );
          CGContextAddPath( mrContext, xPath );
          // draw path with antialiased line
          CGContextSetShouldAntialias( mrContext, true );
--        CGContextSetAlpha( mrContext, 1.0 - fTransparency ); 
++        CGContextSetAlpha( mrContext, 1.0 - fTransparency );
          CGContextSetLineJoin( mrContext, aCGLineJoin );
          CGContextSetLineWidth( mrContext, rLineWidths.getX() );
          CGContextDrawPath( mrContext, kCGPathStroke );
          CGContextRestoreGState( mrContext );
--        
++
          // mark modified rectangle as updated
          RefreshRect( aRefreshRect );
--    }        
++    }
  
      CGPathRelease( xPath );
  
@@@ -1114,7 -1114,7 +1114,7 @@@ void AquaSalGraphics::copyBits( const S
          (!mnBitmapDepth || (aDstPoint.x + pSrc->mnWidth) <= mnWidth) ) // workaround a Quartz crasher
      {
          // in XOR mode the drawing context is redirected to the XOR mask
--        // if source and target are identical then copyBits() paints onto the target context though 
++        // if source and target are identical then copyBits() paints onto the target context though
          CGContextRef xCopyContext = mrContext;
          if( mpXorEmulation && mpXorEmulation->IsEnabled() )
              if( pSrcGraphics == this )
@@@ -1353,7 -1353,7 +1353,7 @@@ void AquaSalGraphics::Pattern50Fill(
                                                        CGAffineTransformIdentity, 4, 4,
                                                        kCGPatternTilingConstantSpacing,
                                                        false, &aCallback );
--        
++
      CGContextSetFillColorSpace( mrContext, GetSalData()->mxP50Space );
      CGContextSetFillPattern( mrContext, GetSalData()->mxP50Pattern, aFillCol );
      CGContextFillPath( mrContext );
@@@ -1417,7 -1417,7 +1417,7 @@@ void AquaSalGraphics::invert( ULONG nPo
              CGContextSetBlendMode(mrContext, kCGBlendModeDifference);
              Pattern50Fill();
          }
--        else // just invert                   
++        else // just invert
          {
              CGContextSetBlendMode( mrContext, kCGBlendModeDifference );
              CGContextSetRGBFillColor( mrContext, 1.0, 1.0, 1.0, 1.0 );
@@@ -1453,8 -1453,13 +1453,13 @@@ BOOL AquaSalGraphics::drawEPS( long nX
  
      // prepare the target context
      NSGraphicsContext* pOrigNSCtx = [NSGraphicsContext currentContext];
+     [pOrigNSCtx retain];
 -    
++
+     // create new context
      NSGraphicsContext* pDrawNSCtx = [NSGraphicsContext graphicsContextWithGraphicsPort: mrContext flipped: IsFlipped()];
+     // set it, setCurrentContext also releases the prviously set one
      [NSGraphicsContext setCurrentContext: pDrawNSCtx];
 -    
++
      // draw the EPS
      const NSRect aDstRect = {{nX,nY},{nWidth,nHeight}};
      const BOOL bOK = [xEpsImage drawInRect: aDstRect];
@@@ -1504,10 -1512,10 +1512,10 @@@ bool AquaSalGraphics::drawAlphaRect( lo
  {
      if( !CheckContext() )
          return true;
--        
++
      // save the current state
      CGContextSaveGState( mrContext );
--    CGContextSetAlpha( mrContext, (100-nTransparency) * (1.0/100) ); 
++    CGContextSetAlpha( mrContext, (100-nTransparency) * (1.0/100) );
  
      CGRect aRect = {{nX,nY},{nWidth-1,nHeight-1}};
      if( IsPenVisible() )
@@@ -1554,7 -1560,7 +1562,7 @@@ void AquaSalGraphics::GetFontMetric( Im
      // get the ATSU font metrics (in point units)
      // of the font that has eventually been size-limited
  
--    ATSUFontID fontId; 	 
++    ATSUFontID fontId;
      OSStatus err = ATSUGetAttribute( maATSUStyle, kATSUFontTag, sizeof(ATSUFontID), &fontId, 0 );
      DBG_ASSERT( (err==noErr), "AquaSalGraphics::GetFontMetric() : could not get font id\n");
  
@@@ -1643,12 -1649,12 +1651,12 @@@ static bool AddLocalTempFontDirs( void 
      bFirst = false;
  
      // add private font files found in brand and base layer
--    
++
      rtl::OUString aBrandStr( RTL_CONSTASCII_USTRINGPARAM( "$BRAND_BASE_DIR" ) );
      rtl_bootstrap_expandMacros( &aBrandStr.pData );
      rtl::OUString aBrandSysPath;
      OSL_VERIFY( osl_getSystemPathFromFileURL( aBrandStr.pData, &aBrandSysPath.pData ) == osl_File_E_None );
--    
++
      rtl::OStringBuffer aBrandFontDir( aBrandSysPath.getLength()*2 );
      aBrandFontDir.append( rtl::OUStringToOString( aBrandSysPath, RTL_TEXTENCODING_UTF8 ) );
      aBrandFontDir.append( "/share/fonts/truetype/" );
@@@ -1658,7 -1664,7 +1666,7 @@@
      rtl_bootstrap_expandMacros( &aBaseStr.pData );
      rtl::OUString aBaseSysPath;
      OSL_VERIFY( osl_getSystemPathFromFileURL( aBaseStr.pData, &aBaseSysPath.pData ) == osl_File_E_None );
--    
++
      rtl::OStringBuffer aBaseFontDir( aBaseSysPath.getLength()*2 );
      aBaseFontDir.append( rtl::OUStringToOString( aBaseSysPath, RTL_TEXTENCODING_UTF8 ) );
      aBaseFontDir.append( "/share/fonts/truetype/" );
@@@ -1672,11 -1678,11 +1680,11 @@@ void AquaSalGraphics::GetDevFontList( I
      DBG_ASSERT( pFontList, "AquaSalGraphics::GetDevFontList(NULL) !");
  
      AddLocalTempFontDirs();
-- 
--    // The idea is to cache the list of system fonts once it has been generated. 
--    // SalData seems to be a good place for this caching. However we have to 
--    // carefully make the access to the font list thread-safe. If we register 
--    // a font-change event handler to update the font list in case fonts have 
++
++    // The idea is to cache the list of system fonts once it has been generated.
++    // SalData seems to be a good place for this caching. However we have to
++    // carefully make the access to the font list thread-safe. If we register
++    // a font-change event handler to update the font list in case fonts have
      // changed on the system we have to lock access to the list. The right
      // way to do that is the solar mutex since GetDevFontList is protected
      // through it as should be all event handlers
@@@ -1805,13 -1811,13 +1813,13 @@@ long AquaSalGraphics::GetGraphicsWidth(
      {
          w = mnWidth;
      }
--    
++
      if( w == 0 )
      {
          if( mbWindow && mpFrame )
              w = mpFrame->maGeometry.nWidth;
      }
--    
++
      return w;
  }
  
@@@ -1890,7 -1896,7 +1898,7 @@@ USHORT AquaSalGraphics::SetFont( ImplFo
      mbNonAntialiasedText = pReqFont->mbNonAntialiased;
      UInt32 nStyleRenderingOptions = kATSStyleNoOptions;
      if( pReqFont->mbNonAntialiased )
--        nStyleRenderingOptions |= kATSStyleNoAntiAliasing; 
++        nStyleRenderingOptions |= kATSStyleNoAntiAliasing;
  
      // set horizontal/vertical mode
      ATSUVerticalCharacterType aVerticalCharacterType = kATSUStronglyHorizontal;
@@@ -1913,21 -1919,21 +1921,21 @@@
          kATSUVerticalCharacterTag
      };
  
--    const ByteCount aValueSize[] = 
++    const ByteCount aValueSize[] =
      {
          sizeof(ATSUFontID),
          sizeof(fFixedSize),
--        sizeof(bFakeBold), 
++        sizeof(bFakeBold),
          sizeof(bFakeItalic),
          sizeof(nStyleRenderingOptions),
          sizeof(aVerticalCharacterType)
      };
-- 
--    const ATSUAttributeValuePtr aValue[] = 
++
++    const ATSUAttributeValuePtr aValue[] =
      {
          &nFontID,
          &fFixedSize,
--        &bFakeBold, 
++        &bFakeBold,
          &bFakeItalic,
          &nStyleRenderingOptions,
          &aVerticalCharacterType
@@@ -1991,7 -1997,7 +1999,7 @@@ ImplFontCharMap* AquaSalGraphics::GetIm
  
      return mpMacFontData->GetImplFontCharMap();
  }
--    
++
  // -----------------------------------------------------------------------
  
  // fake a SFNT font directory entry for a font table
@@@ -2089,7 -2095,7 +2097,7 @@@ static bool GetRawFontData( const ImplF
          eStatus = ATSFontGetTable( rFont, GetTag("cvt "), 0, 0, NULL, &nCvtLen);
          eStatus = ATSFontGetTable( rFont, GetTag("fpgm"), 0, 0, NULL, &nFpgmLen);
      }
--    
++
      // prepare a byte buffer for a fake font
      int nTableCount = 7;
      nTableCount += (nPrepLen>0) + (nCvtLen>0) + (nFpgmLen>0) + (nGlyfLen>0);
@@@ -2380,7 -2386,7 +2388,7 @@@ void AquaSalGraphics::GetGlyphWidths( c
  #else
          DBG_ERROR("not implemented for non-subsettable fonts!\n");
  #endif
--    }    
++    }
  }
  
  // -----------------------------------------------------------------------
@@@ -2420,7 -2426,7 +2428,7 @@@ SystemFontData AquaSalGraphics::GetSysF
      aSysFontData.nSize = sizeof( SystemFontData );
  
      // NOTE: Native ATSU font fallbacks are used, not the VCL fallbacks.
--    ATSUFontID fontId; 	 
++    ATSUFontID fontId;
      err = ATSUGetAttribute( maATSUStyle, kATSUFontTag, sizeof(fontId), &fontId, 0 );
      if (err) fontId = 0;
      aSysFontData.aATSUFontID = (void *) fontId;
@@@ -2429,8 -2435,8 +2437,8 @@@
      err = ATSUGetAttribute( maATSUStyle, kATSUQDBoldfaceTag, sizeof(bFbold), &bFbold, 0 );
      if (err) bFbold = FALSE;
      aSysFontData.bFakeBold = (bool) bFbold;
--    
--    Boolean bFItalic;    
++
++    Boolean bFItalic;
      err = ATSUGetAttribute( maATSUStyle, kATSUQDItalicTag, sizeof(bFItalic), &bFItalic, 0 );
      if (err) bFItalic = FALSE;
      aSysFontData.bFakeItalic = (bool) bFItalic;
@@@ -2465,7 -2471,7 +2473,7 @@@ void AquaSalGraphics::SetXORMode( bool 
      // return early if XOR mode remains unchanged
      if( mbPrinter )
          return;
--    
++
      if( ! bSet && mnXorMode == 2 )
      {
          CGContextSetBlendMode( mrContext, kCGBlendModeNormal );
diff --cc vcl/inc/vcl/svapp.hxx
index c36bb77,dd87b6c..5101e36
--- a/vcl/inc/vcl/svapp.hxx
+++ b/vcl/inc/vcl/svapp.hxx
@@@ -28,7 -28,9 +28,8 @@@
  #ifndef _SV_SVAPP_HXX
  #define _SV_SVAPP_HXX
  
 -#ifndef _VOS_THREAD_HXX
  #include <vos/thread.hxx>
 -#endif
++#include <vos/mutex.hxx>
  #include <tools/string.hxx>
  #include <tools/link.hxx>
  #include <tools/unqid.hxx>
@@@ -53,7 -57,7 +54,6 @@@ class NotifyEvent
  class KeyEvent;
  class MouseEvent;
  
--namespace vos { class IMutex; }
  #include <com/sun/star/uno/Reference.h>
  #include <com/sun/star/connection/XConnection.hpp>
  
@@@ -494,26 -498,6 +494,42 @@@ private
      DECL_STATIC_LINK( Application, PostEventHandler, void* );
  };
  
 +/**
 + A helper class that calls Application::ReleaseSolarMutex() in its constructor
 + and restores the mutex in its destructor.
 +*/
 +class SolarMutexReleaser
 +{
 +    ULONG mnReleased;
++    const bool  mbRescheduleDuringAcquire;
 +public:
-     SolarMutexReleaser()
++    enum
++    {
++        RescheduleDuringAcquire = true
++    };
++    SolarMutexReleaser( const bool i_rescheduleDuringAcquire = false )
++        : mnReleased( Application::ReleaseSolarMutex())
++        , mbRescheduleDuringAcquire( i_rescheduleDuringAcquire )
 +    {
-         mnReleased = Application::ReleaseSolarMutex();
 +    }
 +
 +    ~SolarMutexReleaser()
 +    {
-         if( mnReleased )
++        if ( mnReleased > 0 )
++        {
++            if ( mbRescheduleDuringAcquire )
++            {
++                while ( !Application::GetSolarMutex().tryToAcquire() )
++                {
++                    Application::Reschedule();
++                }
++                --mnReleased;
++            }
 +            Application::AcquireSolarMutex( mnReleased );
++        }
 +    }
 +};
 +
  VCL_DLLPUBLIC Application* GetpApp();
  
  VCL_DLLPUBLIC BOOL InitVCL( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & );
diff --cc vcl/source/window/dlgctrl.cxx
index 306a5ea,7b96f39..aebfcb6
--- a/vcl/source/window/dlgctrl.cxx
+++ b/vcl/source/window/dlgctrl.cxx
@@@ -1,7 -1,7 +1,7 @@@
  /*************************************************************************
   *
   * 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
@@@ -320,7 -320,7 +320,7 @@@ static Window* ImplFindDlgCtrlWindow( W
  
      if( pWindow == NULL )
          pWindow = pSWindow;
--    
++
      while ( pSWindow )
      {
          // the DialogControlStart mark is only accepted for the direct children
@@@ -372,7 -372,7 +372,7 @@@
          pTempWindow = ImplGetNextWindow( pParent, i, i, FALSE );
  
          // the DialogControlStart mark is only accepted for the direct children
--        if ( !i 
++        if ( !i
            || ( pTempWindow && !ImplHasIndirectTabParent( pTempWindow )
                 && pTempWindow->ImplGetWindow()->IsDialogControlStart() ) )
              break;
@@@ -465,10 -465,10 +465,10 @@@ static Window* ImplFindAccelWindow( Win
              if( pAccelWin )
                  return pAccelWin;
          }
--        
++
          if ( i == nStart )
              break;
--        
++
          if ( i < nFormEnd )
          {
              pWindow = ImplGetNextWindow( pParent, i, i, bCheckEnable );
@@@ -885,7 -885,7 +885,7 @@@ BOOL Window::ImplDlgCtrl( const KeyEven
  
          return TRUE;
      }
--    
++
      return FALSE;
  }
  
@@@ -1058,29 -1058,10 +1058,10 @@@ static sal_Unicode getAccel( const Stri
      return nChar;
  }
  
- Window* Window::GetLabelFor() const
+ static Window* ImplGetLabelFor( Window* pFrameWindow, WindowType nMyType, Window* pLabel, sal_Unicode nAccel )
  {
-     if ( mpWindowImpl->mbDisableAccessibleLabelForRelation )
-         return NULL;
- 
      Window* pWindow = NULL;
-     Window* pFrameWindow = ImplGetFrameWindow();
- 
-     WinBits nFrameStyle = pFrameWindow->GetStyle();
-     if( ! ( nFrameStyle & WB_DIALOGCONTROL )
-         || ( nFrameStyle & WB_NODIALOGCONTROL )
-         )
-         return NULL;
- 
-     if ( mpWindowImpl->mpRealParent )
-         pWindow = mpWindowImpl->mpRealParent->GetParentLabelFor( this );
- 
-     if( pWindow )
-         return pWindow;
 -    
 +
-     sal_Unicode nAccel = getAccel( GetText() );
-     
-     WindowType nMyType = GetType();
      if( nMyType == WINDOW_FIXEDTEXT		||
          nMyType == WINDOW_FIXEDLINE		||
          nMyType == WINDOW_GROUPBOX )
@@@ -1155,16 -1140,19 +1140,19 @@@ Window* Window::GetLabelFor() cons
      if( pWindow )
          return pWindow;
  
-     // #i62723#, #104191# checkboxes and radiobuttons are not supposed to have labels
-     if( GetType() == WINDOW_CHECKBOX || GetType() == WINDOW_RADIOBUTTON )
-         return NULL;
+     sal_Unicode nAccel = getAccel( GetText() );
 -    
 +
- //    if( ! ( GetType() == WINDOW_FIXEDTEXT		||
- //            GetType() == WINDOW_FIXEDLINE		||
- //            GetType() == WINDOW_GROUPBOX ) )
-     // #i100833# MT 2010/02: Group box and fixed lines can also lable a fixed text.
-     // See tools/options/print for example.
-     WindowType nMyType = GetType();
+     pWindow = ImplGetLabelFor( pFrameWindow, GetType(), const_cast<Window*>(this), nAccel );
+     if( ! pWindow && mpWindowImpl->mpRealParent )
+         pWindow = ImplGetLabelFor( mpWindowImpl->mpRealParent, GetType(), const_cast<Window*>(this), nAccel );
 -    return pWindow;    
++    return pWindow;
+ }
+ 
+ // -----------------------------------------------------------------------
+ 
+ static Window* ImplGetLabeledBy( Window* pFrameWindow, WindowType nMyType, Window* pLabeled )
+ {
+     Window* pWindow = NULL;
      if ( (nMyType != WINDOW_GROUPBOX) && (nMyType != WINDOW_FIXEDLINE) )
      {
          // search for a control that labels this window
@@@ -1172,7 -1160,7 +1160,7 @@@
          // that comes before this control; with the exception of push buttons
          // which are labeled only if the fixed text, fixed line or group box
          // is directly before the control
--        
++
          // get form start and form end and index of this control
          USHORT nIndex, nFormStart, nFormEnd;
          Window* pSWindow = ::ImplFindDlgCtrlWindow( pFrameWindow,
@@@ -1217,6 -1205,39 +1205,39 @@@
      return pWindow;
  }
  
+ Window* Window::GetLabeledBy() const
+ {
+     if ( mpWindowImpl->mbDisableAccessibleLabeledByRelation )
+         return NULL;
+ 
+     Window* pWindow = NULL;
+     Window* pFrameWindow = ImplGetFrameWindow();
 -    
++
+     if ( mpWindowImpl->mpRealParent )
+     {
+         pWindow = mpWindowImpl->mpRealParent->GetParentLabeledBy( this );
+ 
+         if( pWindow )
+             return pWindow;
+     }
+ 
+     // #i62723#, #104191# checkboxes and radiobuttons are not supposed to have labels
+     if( GetType() == WINDOW_CHECKBOX || GetType() == WINDOW_RADIOBUTTON )
+         return NULL;
+ 
+ //    if( ! ( GetType() == WINDOW_FIXEDTEXT		||
+ //            GetType() == WINDOW_FIXEDLINE		||
+ //            GetType() == WINDOW_GROUPBOX ) )
+     // #i100833# MT 2010/02: Group box and fixed lines can also lable a fixed text.
+     // See tools/options/print for example.
 -    
++
+     pWindow = ImplGetLabeledBy( pFrameWindow, GetType(), const_cast<Window*>(this) );
+     if( ! pWindow && mpWindowImpl->mpRealParent )
+         pWindow = ImplGetLabeledBy( mpWindowImpl->mpRealParent, GetType(), const_cast<Window*>(this) );
 -    
++
+     return pWindow;
+ }
+ 
  // -----------------------------------------------------------------------
  
  KeyEvent Window::GetActivationKey() const
diff --cc vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 0121be9,a4dcd31..8c72e6f
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@@ -1,7 -1,7 +1,7 @@@
  /*************************************************************************
   *
   * 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
@@@ -105,7 -105,7 +105,7 @@@ struct NWFWidgetDat
      NWPixmapCacheList* gNWPixmapCacheList;
      NWPixmapCache* gCacheTabItems;
      NWPixmapCache* gCacheTabPages;
--    
++
      NWFWidgetData() :
          gCacheWindow( NULL ),
          gDumbContainer( NULL ),
@@@ -197,7 -197,7 +197,7 @@@ static Rectangle NWGetButtonArea( int n
  static Rectangle NWGetEditBoxPixmapRect( int nScreen, ControlType nType, ControlPart nPart, Rectangle aAreaRect, ControlState nState,
                              const ImplControlValue& aValue, const OUString& rCaption );
  
--static void NWPaintOneEditBox( int nScreen, GdkDrawable * gdkDrawable, GdkRectangle *gdkRect, 
++static void NWPaintOneEditBox( int nScreen, GdkDrawable * gdkDrawable, GdkRectangle *gdkRect,
                                 ControlType nType, ControlPart nPart, Rectangle aEditBoxRect,
                                 ControlState nState, const ImplControlValue& aValue,
                                 const OUString& rCaption );
@@@ -231,7 -231,7 +231,7 @@@ static Rectangle NWGetToolbarRect( int 
  
  static Rectangle NWGetScrollButtonRect(	int nScreen, ControlPart nPart, Rectangle aAreaRect );
  //---
--                                
++
  /*********************************************************
   * PixmapCache
   *********************************************************/
@@@ -248,7 -248,7 +248,7 @@@ public
      ControlState m_nState;
      Rectangle   m_pixmapRect;
      GdkPixmap*  m_pixmap;
--    
++
      NWPixmapCacheData() : m_nType(0), m_nState(0), m_pixmap(0) {}
      ~NWPixmapCacheData()
          { SetPixmap( NULL ); };
@@@ -264,15 -264,15 +264,15 @@@ class NWPixmapCach
  public:
      NWPixmapCache( int nScreen );
      ~NWPixmapCache();
--    
++
      void SetSize( int n)
          { delete [] pData; m_idx = 0; m_size = n; pData = new NWPixmapCacheData[m_size]; }
      int GetSize() { return m_size; }
--    
++
      BOOL Find( ControlType aType, ControlState aState, const Rectangle& r_pixmapRect, GdkPixmap** pPixmap );
      void Fill( ControlType aType, ControlState aState, const Rectangle& r_pixmapRect, GdkPixmap* pPixmap );
--    
--    void ThemeChanged();    
++
++    void ThemeChanged();
  };
  
  class NWPixmapCacheList
@@@ -291,9 -291,9 +291,9 @@@ void NWPixmapCacheData::SetPixmap( GdkP
  {
      if( m_pixmap )
          g_object_unref( m_pixmap );
--    
++
      m_pixmap = pPixmap;
--    
++
      if( m_pixmap )
          g_object_ref( m_pixmap );
  }
@@@ -307,7 -307,7 +307,7 @@@ NWPixmapCache::NWPixmapCache( int nScre
      pData = NULL;
      if( gWidgetData[m_screen].gNWPixmapCacheList )
          gWidgetData[m_screen].gNWPixmapCacheList->AddCache(this);
--} 
++}
  NWPixmapCache::~NWPixmapCache()
  {
      if( gWidgetData[m_screen].gNWPixmapCacheList )
@@@ -329,9 -329,9 +329,9 @@@ BOOL  NWPixmapCache::Find( ControlType 
      for(i=0; i<m_size; i++)
      {
          if( pData[i].m_nType == aType &&
--            pData[i].m_nState == aState &&    
--            pData[i].m_pixmapRect.GetWidth() == r_pixmapRect.GetWidth() &&    
--            pData[i].m_pixmapRect.GetHeight() == r_pixmapRect.GetHeight() &&    
++            pData[i].m_nState == aState &&
++            pData[i].m_pixmapRect.GetWidth() == r_pixmapRect.GetWidth() &&
++            pData[i].m_pixmapRect.GetHeight() == r_pixmapRect.GetHeight() &&
              pData[i].m_pixmap != NULL )
          {
              *pPixmap = pData[i].m_pixmap;
@@@ -344,7 -344,7 +344,7 @@@
  void NWPixmapCache::Fill( ControlType aType, ControlState aState, const Rectangle& r_pixmapRect, GdkPixmap* pPixmap )
  {
      if( !(aState & CTRL_CACHING_ALLOWED) )
--        return; 
++        return;
  
      aState &= ~CTRL_CACHING_ALLOWED; // mask clipping flag
      m_idx = (m_idx+1) % m_size; // just wrap
@@@ -390,7 -390,7 +390,7 @@@ inline void NW_gtk_border_set_from_bord
  
  
  /*********************************************************
-- * Initialize GTK and local stuff                         
++ * Initialize GTK and local stuff
   *********************************************************/
  void GtkData::initNWF( void )
  {
@@@ -401,22 -401,22 +401,22 @@@
  
      // draw separate buttons for toolbox dropdown items
      pSVData->maNWFData.mbToolboxDropDownSeparate = true;
--    
++
      // small extra border around menu items
      pSVData->maNWFData.mnMenuFormatExtraBorder = 1;
--    
++
      // draw toolbars in separate lines
      pSVData->maNWFData.mbDockingAreaSeparateTB = true;
--    
++
      // open first menu on F10
      pSVData->maNWFData.mbOpenMenuOnF10 = true;
--    
++
      int nScreens = GetX11SalData()->GetDisplay()->GetScreenCount();
      gWidgetData = std::vector<NWFWidgetData>( nScreens );
      for( int i = 0; i < nScreens; i++ )
          gWidgetData[i].gNWPixmapCacheList = new NWPixmapCacheList;
  
--    
++
      if( SalGetDesktopEnvironment().equalsAscii( "KDE" ) )
      {
          // #i97196# ensure a widget exists and the style engine was loaded
@@@ -441,7 -441,7 +441,7 @@@
  
  
  /*********************************************************
-- * Release GTK and local stuff                         
++ * Release GTK and local stuff
   *********************************************************/
  void GtkData::deInitNWF( void )
  {
@@@ -634,7 -634,7 +634,7 @@@ BOOL GtkSalGraphics::hitTestNativeContr
          gboolean has_forward2;
          gboolean has_backward;
          gboolean has_backward2;
--        
++
          gtk_widget_style_get( gWidgetData[m_nScreen].gScrollHorizWidget, "has-forward-stepper", &has_forward,
                                          "has-secondary-forward-stepper", &has_forward2,
                                          "has-backward-stepper", &has_backward,
@@@ -741,8 -741,8 +741,8 @@@ BOOL GtkSalGraphics::drawNativeControl
      BOOL			returnVal = FALSE;
      // get a GC with current clipping region set
      SelectFont();
--    
--    
++
++
      // theme changed ?
      if( GtkSalGraphics::bThemeChanged )
      {
@@@ -750,15 -750,15 +750,15 @@@
          for( unsigned int i = 0; i < gWidgetData.size(); i++ )
              if( gWidgetData[i].gNWPixmapCacheList )
                  gWidgetData[i].gNWPixmapCacheList->ThemeChanged();
--        GtkSalGraphics::bThemeChanged = FALSE;    
++        GtkSalGraphics::bThemeChanged = FALSE;
      }
--    
++
      Rectangle aCtrlRect( rControlRegion );
      Region aClipRegion( m_aClipRegion );
      if( aClipRegion.IsNull() )
          aClipRegion = aCtrlRect;
--            
--    clipList aClip;        
++
++    clipList aClip;
      GdkDrawable* gdkDrawable = GDK_DRAWABLE( GetGdkWindow() );
      GdkPixmap* pixmap = NULL;
      Rectangle aPixmapRect;
@@@ -769,7 -769,7 +769,7 @@@
          && nType != CTRL_TAB_PANE
          && nType != CTRL_PROGRESS
          && ! (bToolbarGripWorkaround && nType == CTRL_TOOLBAR && (nPart == PART_THUMB_HORZ || nPart == PART_THUMB_VERT) )
--        ) 
++        )
      {
          // make pixmap a little larger since some themes draw decoration
          // outside the rectangle, see e.g. checkbox
@@@ -795,7 -795,7 +795,7 @@@
          }
          aClipRegion.EndEnumRects( aHdl );
      }
--    
++
      if ( (nType==CTRL_PUSHBUTTON) && (nPart==PART_ENTIRE_CONTROL) )
      {
          returnVal = NWPaintGTKButton( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rCaption );
@@@ -885,7 -885,7 +885,7 @@@
      {
          returnVal = NWPaintGTKSlider( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rCaption );
      }
--    
++
      if( pixmap )
      {
          returnVal = NWRenderPixmapToScreen( pixmap, aPixmapRect ) && returnVal;
@@@ -907,7 -907,7 +907,7 @@@ BOOL GtkSalGraphics::drawNativeMixedSta
      // do this via pixmap since some themes don't care for regions
      bool bOldNeedPixmapPaint = bNeedPixmapPaint;
      bNeedPixmapPaint = true;
--    
++
      Rectangle aCtrlRect = rControlRegion;
      BOOL      returnVal = FALSE;
      SelectFont();
@@@ -921,9 -921,9 +921,9 @@@
      XUnionRectWithRegion( &aXRect, aRegion, aRegion );
      SetClipRegion( pFontGC_, aRegion );
      XDestroyRegion( aRegion );
--    
++
      returnVal = drawNativeControl( nType, nPart, rControlRegion, nState, aValue, rCaption );
--    
++
      if( returnVal )
      {
          // draw lower half in on state
@@@ -935,7 -935,7 +935,7 @@@
          XDestroyRegion( aRegion );
          returnVal = drawNativeControl( nType, nPart, rControlRegion, nState, aValue, rCaption );
      }
--    
++
      // clean up
      bNeedPixmapPaint = bOldNeedPixmapPaint;
      const_cast<ImplControlValue&>(aValue).setTristateVal( BUTTONVALUE_MIXED );
@@@ -996,7 -996,7 +996,7 @@@ BOOL GtkSalGraphics::getNativeControlRe
          rNativeBoundingRegion = NWGetButtonArea( m_nScreen, nType, nPart, rControlRegion,
          nState, aValue, rCaption );
          rNativeContentRegion = rControlRegion;
--        
++
          returnVal = TRUE;
      }
      if ( (nType==CTRL_COMBOBOX) && ((nPart==PART_BUTTON_DOWN) || (nPart==PART_SUB_EDIT)) )
@@@ -1004,16 -1004,16 +1004,16 @@@
          rNativeBoundingRegion = NWGetComboBoxButtonRect( m_nScreen, nType, nPart, rControlRegion, nState,
          aValue, rCaption );
          rNativeContentRegion = rNativeBoundingRegion;
--        
++
          returnVal = TRUE;
      }
      if ( (nType==CTRL_SPINBOX) && ((nPart==PART_BUTTON_UP) || (nPart==PART_BUTTON_DOWN) || (nPart==PART_SUB_EDIT)) )
      {
--        
++
          rNativeBoundingRegion = NWGetSpinButtonRect( m_nScreen, nType, nPart, rControlRegion, nState,
          aValue, rCaption );
          rNativeContentRegion = rNativeBoundingRegion;
--        
++
          returnVal = TRUE;
      }
      if ( (nType==CTRL_LISTBOX) && ((nPart==PART_BUTTON_DOWN) || (nPart==PART_SUB_EDIT)) )
@@@ -1021,7 -1021,7 +1021,7 @@@
          rNativeBoundingRegion = NWGetListBoxButtonRect( m_nScreen, nType, nPart, rControlRegion, nState,
          aValue, rCaption );
          rNativeContentRegion = rNativeBoundingRegion;
--        
++
          returnVal = TRUE;
      }
      if ( (nType==CTRL_TOOLBAR) &&
@@@ -1041,7 -1041,7 +1041,7 @@@
      {
          rNativeBoundingRegion = NWGetScrollButtonRect( m_nScreen, nPart, rControlRegion );
          rNativeContentRegion = rNativeBoundingRegion;
--        
++
          returnVal = TRUE;
      }
      if( (nType == CTRL_MENUBAR) && (nPart == PART_ENTIRE_CONTROL) )
@@@ -1102,8 -1102,9 +1102,9 @@@
          GtkRequisition aReq;
          gtk_widget_size_request( widget, &aReq );
          Rectangle aEditRect = rControlRegion;
 -        long nHeight = (aEditRect.GetHeight() > aReq.height+1) ? aEditRect.GetHeight() : aReq.height+1; 
++        long nHeight = (aEditRect.GetHeight() > aReq.height+1) ? aEditRect.GetHeight() : aReq.height+1;
          aEditRect = Rectangle( aEditRect.TopLeft(),
-                                Size( aEditRect.GetWidth(), aReq.height+1 ) );
+                                Size( aEditRect.GetWidth(), nHeight ) );
          rNativeBoundingRegion = aEditRect;
          rNativeContentRegion = rNativeBoundingRegion;
          returnVal = TRUE;
@@@ -1132,7 -1133,7 +1133,7 @@@
          rNativeBoundingRegion = rNativeContentRegion = aRect;
          returnVal = TRUE;
      }
--        
++
      return( returnVal );
  }
  
@@@ -1143,7 -1144,7 +1144,7 @@@
  BOOL GtkSalGraphics::NWPaintGTKButton(
              GdkDrawable* gdkDrawable,
              ControlType, ControlPart,
--            const Rectangle& rControlRectangle,            
++            const Rectangle& rControlRectangle,
              const clipList& rClipList,
              ControlState nState, const ImplControlValue&,
              const OUString& )
@@@ -1158,7 -1159,7 +1159,7 @@@
      GtkBorder		aDefBorder;
      GtkBorder*		pBorder;
      GdkRectangle	clipRect;
--    
++
      NWEnsureGTKButton( m_nScreen );
      NWConvertVCLStateToGTKState( nState, &stateType, &shadowType );
  
@@@ -1211,17 -1212,17 +1212,17 @@@
          clipRect.y = it->Top();
          clipRect.width = it->GetWidth();
          clipRect.height = it->GetHeight();
--        
++
          // Buttons must paint opaque since some themes have alpha-channel enabled buttons
--        gtk_paint_flat_box( gWidgetData[m_nScreen].gBtnWidget->style, gdkDrawable, GTK_STATE_NORMAL, GTK_SHADOW_NONE, 
++        gtk_paint_flat_box( gWidgetData[m_nScreen].gBtnWidget->style, gdkDrawable, GTK_STATE_NORMAL, GTK_SHADOW_NONE,
                              &clipRect, m_pWindow, "base", x, y, w, h );
--        
++
          if ( (nState & CTRL_STATE_DEFAULT) && (GTK_BUTTON(gWidgetData[m_nScreen].gBtnWidget)->relief == GTK_RELIEF_NORMAL) )
          {
--            gtk_paint_box( gWidgetData[m_nScreen].gBtnWidget->style, gdkDrawable, GTK_STATE_NORMAL, GTK_SHADOW_IN, 
++            gtk_paint_box( gWidgetData[m_nScreen].gBtnWidget->style, gdkDrawable, GTK_STATE_NORMAL, GTK_SHADOW_IN,
                             &clipRect, gWidgetData[m_nScreen].gBtnWidget, "buttondefault", x, y, w, h );
          }
--        
++
          if ( (GTK_BUTTON(gWidgetData[m_nScreen].gBtnWidget)->relief != GTK_RELIEF_NONE)
              || (nState & CTRL_STATE_PRESSED)
              || (nState & CTRL_STATE_ROLLOVER) )
@@@ -1314,7 -1315,7 +1315,7 @@@ BOOL GtkSalGraphics::NWPaintGTKRadio( G
                                        ControlType, ControlPart,
                                        const Rectangle& rControlRectangle,
                                        const clipList& rClipList,
--                                      ControlState nState, 
++                                      ControlState nState,
                                        const ImplControlValue& aValue,
                                        const OUString& )
  {
@@@ -1323,7 -1324,7 +1324,7 @@@
      BOOL			isChecked = (aValue.getTristateVal()==BUTTONVALUE_ON);
      gint            x, y;
      GdkRectangle	clipRect;
--   
++
      NWEnsureGTKButton( m_nScreen );
      NWEnsureGTKRadio( m_nScreen );
      NWConvertVCLStateToGTKState( nState, &stateType, &shadowType );
@@@ -1333,7 -1334,7 +1334,7 @@@
  
      x = rControlRectangle.Left() + (rControlRectangle.GetWidth()-indicator_size)/2;
      y = rControlRectangle.Top() + (rControlRectangle.GetHeight()-indicator_size)/2;
--    
++
      // Set the shadow based on if checked or not so we get a freakin checkmark.
      shadowType = isChecked ? GTK_SHADOW_IN : GTK_SHADOW_OUT;
      NWSetWidgetState( gWidgetData[m_nScreen].gRadioWidget, nState, stateType );
@@@ -1341,7 -1342,7 +1342,7 @@@
  
      // GTK enforces radio groups, so that if we don't have 2 buttons in the group,
      // the single button will always be active.  So we have to have 2 buttons.
--    
++
      // #i59666# set the members directly where we should use
      // gtk_toggle_button_set_active. reason: there are animated themes
      // which are in active state only after a while leading to painting
@@@ -1357,12 -1358,12 +1358,12 @@@
          clipRect.y = it->Top();
          clipRect.width = it->GetWidth();
          clipRect.height = it->GetHeight();
--        
--        gtk_paint_option( gWidgetData[m_nScreen].gRadioWidget->style, gdkDrawable, stateType, shadowType, 
++
++        gtk_paint_option( gWidgetData[m_nScreen].gRadioWidget->style, gdkDrawable, stateType, shadowType,
                            &clipRect, gWidgetData[m_nScreen].gRadioWidget, "radiobutton",
                            x, y, indicator_size, indicator_size );
      }
--    
++
      return( TRUE );
  }
  
@@@ -1372,7 -1373,7 +1373,7 @@@ BOOL GtkSalGraphics::NWPaintGTKCheck( G
                                        ControlType, ControlPart,
                                        const Rectangle& rControlRectangle,
                                        const clipList& rClipList,
--                                      ControlState nState, 
++                                      ControlState nState,
                                        const ImplControlValue& aValue,
                                        const OUString& )
  {
@@@ -1391,7 -1392,7 +1392,7 @@@
  
      x = rControlRectangle.Left() + (rControlRectangle.GetWidth()-indicator_size)/2;
      y = rControlRectangle.Top() + (rControlRectangle.GetHeight()-indicator_size)/2;
--    
++
      // Set the shadow based on if checked or not so we get a checkmark.
      shadowType = isChecked ? GTK_SHADOW_IN : GTK_SHADOW_OUT;
      NWSetWidgetState( gWidgetData[m_nScreen].gCheckWidget, nState, stateType );
@@@ -1403,8 -1404,8 +1404,8 @@@
          clipRect.y = it->Top();
          clipRect.width = it->GetWidth();
          clipRect.height = it->GetHeight();
--        
--        gtk_paint_check( gWidgetData[m_nScreen].gCheckWidget->style, gdkDrawable, stateType, shadowType, 
++
++        gtk_paint_check( gWidgetData[m_nScreen].gCheckWidget->style, gdkDrawable, stateType, shadowType,
                           &clipRect, gWidgetData[m_nScreen].gCheckWidget, "checkbutton",
                           x, y, indicator_size, indicator_size );
      }
@@@ -1428,7 -1429,7 +1429,7 @@@ static void NWCalcArrowRect( const Rect
  BOOL GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart,
                                            const Rectangle& rControlRectangle,
                                            const clipList&,
--                                          ControlState nState, 
++                                          ControlState nState,
                                            const ImplControlValue& aValue,
                                            const OUString& )
  {
@@@ -1461,7 -1462,7 +1462,7 @@@
      gint			vShim = 0;
      gint			hShim = 0;
      gint			x,y,w,h;
--    
++
      // make controlvalue rectangles relative to area
      thumbRect.Move( -rControlRectangle.Left(), -rControlRectangle.Top() );
      button11BoundRect.Move( -rControlRectangle.Left(), -rControlRectangle.Top() );
@@@ -1472,7 -1473,7 +1473,7 @@@
      NWEnsureGTKButton( m_nScreen );
      NWEnsureGTKScrollbars( m_nScreen );
      NWEnsureGTKArrow( m_nScreen );
-- 
++
      // Find the overall bounding rect of the control
      pixmapRect = rControlRectangle;
      pixmapRect.SetSize( Size( pixmapRect.GetWidth() + 1,
@@@ -1493,7 -1494,7 +1494,7 @@@
      gboolean has_forward2;
      gboolean has_backward;
      gboolean has_backward2;
--    
++
      gtk_widget_style_get( gWidgetData[m_nScreen].gScrollHorizWidget, "has-forward-stepper", &has_forward,
                                        "has-secondary-forward-stepper", &has_forward2,
                                        "has-backward-stepper", &has_backward,
@@@ -1626,19 -1627,19 +1627,19 @@@
          scrollbarValues->page_size = scrollbarRect.GetHeight() / 2;
      }
      gtk_adjustment_changed( scrollbarValues );
--    
++
      // as multiple paints are required for the scrollbar
      // painting them directly to the window flickers
      pixmap = NWGetPixmapFromScreen( pixmapRect );
      if( ! pixmap )
          return FALSE;
      x = y = 0;
--    
++
      w = pixmapRect.GetWidth();
--    h = pixmapRect.GetHeight();    
++    h = pixmapRect.GetHeight();
  
      GdkDrawable* const &gdkDrawable = GDK_DRAWABLE( pixmap );
--    GdkRectangle* gdkRect = NULL; 
++    GdkRectangle* gdkRect = NULL;
  
      NWConvertVCLStateToGTKState( nState, &stateType, &shadowType );
      NWSetWidgetState( GTK_WIDGET(scrollbarWidget), nState, stateType );
@@@ -1646,18 -1647,18 +1647,18 @@@
      style = GTK_WIDGET( scrollbarWidget )->style;
  
      // ----------------- TROUGH
--    gtk_paint_flat_box( gWidgetData[m_nScreen].gBtnWidget->style, gdkDrawable, 
++    gtk_paint_flat_box( gWidgetData[m_nScreen].gBtnWidget->style, gdkDrawable,
                          GTK_STATE_NORMAL, GTK_SHADOW_NONE, gdkRect,
--                        m_pWindow, "base", x, y, 
++                        m_pWindow, "base", x, y,
                          w, h );
--    gtk_paint_box( style, gdkDrawable, GTK_STATE_ACTIVE, GTK_SHADOW_IN, 
++    gtk_paint_box( style, gdkDrawable, GTK_STATE_ACTIVE, GTK_SHADOW_IN,
                     gdkRect, GTK_WIDGET(scrollbarWidget), "trough",
                     x, y,
                     scrollbarRect.GetWidth(), scrollbarRect.GetHeight() );
  
      if ( nState & CTRL_STATE_FOCUSED )
      {
--        gtk_paint_focus( style, gdkDrawable, GTK_STATE_ACTIVE, 
++        gtk_paint_focus( style, gdkDrawable, GTK_STATE_ACTIVE,
                           gdkRect, GTK_WIDGET(scrollbarWidget), "trough",
                           x, y,
                           scrollbarRect.GetWidth(), scrollbarRect.GetHeight() );
@@@ -1668,9 -1669,9 +1669,9 @@@
      {
          NWConvertVCLStateToGTKState( pScrollbarVal->mnThumbState, &stateType, &shadowType );
          if ( pScrollbarVal->mnThumbState & CTRL_STATE_PRESSED )  stateType = GTK_STATE_PRELIGHT;
--        gtk_paint_slider( style, gdkDrawable, stateType, GTK_SHADOW_OUT, 
++        gtk_paint_slider( style, gdkDrawable, stateType, GTK_SHADOW_OUT,
                          gdkRect, GTK_WIDGET(scrollbarWidget), "slider",
--                        x+hShim+thumbRect.Left(), y+vShim+thumbRect.Top(), 
++                        x+hShim+thumbRect.Left(), y+vShim+thumbRect.Top(),
                          thumbRect.GetWidth(), thumbRect.GetHeight(), scrollbarOrientation );
      }
      // ----------------- BUTTON 1 //
@@@ -1678,30 -1679,30 +1679,30 @@@
      {
          NWConvertVCLStateToGTKState( pScrollbarVal->mnButton1State, &stateType, &shadowType );
          if ( stateType == GTK_STATE_INSENSITIVE )	stateType = GTK_STATE_NORMAL;
--        gtk_paint_box( style, gdkDrawable, stateType, shadowType, 
++        gtk_paint_box( style, gdkDrawable, stateType, shadowType,
                         gdkRect, GTK_WIDGET(scrollbarWidget), "stepper",
--                       x+hShim+button11BoundRect.Left(), y+vShim+button11BoundRect.Top(), 
++                       x+hShim+button11BoundRect.Left(), y+vShim+button11BoundRect.Top(),
                         button11BoundRect.GetWidth(), button11BoundRect.GetHeight() );
          // ----------------- ARROW 1
          NWCalcArrowRect( button11BoundRect, arrowRect );
--        gtk_paint_arrow( style, gdkDrawable, stateType, shadowType, 
++        gtk_paint_arrow( style, gdkDrawable, stateType, shadowType,
                           gdkRect, GTK_WIDGET(scrollbarWidget), scrollbarTag, button1Type, TRUE,
--                         x+hShim+arrowRect.Left(), y+vShim+arrowRect.Top(), 
++                         x+hShim+arrowRect.Left(), y+vShim+arrowRect.Top(),
                           arrowRect.GetWidth(), arrowRect.GetHeight() );
      }
      if ( has_forward2 )
      {
          NWConvertVCLStateToGTKState( pScrollbarVal->mnButton2State, &stateType, &shadowType );
          if ( stateType == GTK_STATE_INSENSITIVE )	stateType = GTK_STATE_NORMAL;
--        gtk_paint_box( style, gdkDrawable, stateType, shadowType, 
++        gtk_paint_box( style, gdkDrawable, stateType, shadowType,
                         gdkRect, GTK_WIDGET(scrollbarWidget), "stepper",
--                       x+hShim+button12BoundRect.Left(), y+vShim+button12BoundRect.Top(), 
++                       x+hShim+button12BoundRect.Left(), y+vShim+button12BoundRect.Top(),
                         button12BoundRect.GetWidth(), button12BoundRect.GetHeight() );
          // ----------------- ARROW 1
          NWCalcArrowRect( button12BoundRect, arrowRect );
--        gtk_paint_arrow( style, gdkDrawable, stateType, shadowType, 
++        gtk_paint_arrow( style, gdkDrawable, stateType, shadowType,
                           gdkRect, GTK_WIDGET(scrollbarWidget), scrollbarTag, button2Type, TRUE,
--                         x+hShim+arrowRect.Left(), y+vShim+arrowRect.Top(), 
++                         x+hShim+arrowRect.Left(), y+vShim+arrowRect.Top(),
                           arrowRect.GetWidth(), arrowRect.GetHeight() );
      }
      // ----------------- BUTTON 2
@@@ -1709,30 -1710,30 +1710,30 @@@
      {
          NWConvertVCLStateToGTKState( pScrollbarVal->mnButton1State, &stateType, &shadowType );
          if ( stateType == GTK_STATE_INSENSITIVE )	stateType = GTK_STATE_NORMAL;
--        gtk_paint_box( style, gdkDrawable, stateType, shadowType, gdkRect, 
++        gtk_paint_box( style, gdkDrawable, stateType, shadowType, gdkRect,
                         GTK_WIDGET(scrollbarWidget), "stepper",
--                       x+hShim+button21BoundRect.Left(), y+vShim+button21BoundRect.Top(), 
++                       x+hShim+button21BoundRect.Left(), y+vShim+button21BoundRect.Top(),
                         button21BoundRect.GetWidth(), button21BoundRect.GetHeight() );
          // ----------------- ARROW 2
          NWCalcArrowRect( button21BoundRect, arrowRect );
--        gtk_paint_arrow( style, gdkDrawable, stateType, shadowType, 
++        gtk_paint_arrow( style, gdkDrawable, stateType, shadowType,
                           gdkRect, GTK_WIDGET(scrollbarWidget), scrollbarTag, button1Type, TRUE,
--                         x+hShim+arrowRect.Left(), y+vShim+arrowRect.Top(), 
++                         x+hShim+arrowRect.Left(), y+vShim+arrowRect.Top(),
                           arrowRect.GetWidth(), arrowRect.GetHeight() );
      }
      if ( has_forward )
      {
          NWConvertVCLStateToGTKState( pScrollbarVal->mnButton2State, &stateType, &shadowType );
          if ( stateType == GTK_STATE_INSENSITIVE )	stateType = GTK_STATE_NORMAL;
--        gtk_paint_box( style, gdkDrawable, stateType, shadowType, gdkRect, 
++        gtk_paint_box( style, gdkDrawable, stateType, shadowType, gdkRect,
                         GTK_WIDGET(scrollbarWidget), "stepper",
--                       x+hShim+button22BoundRect.Left(), y+vShim+button22BoundRect.Top(), 
++                       x+hShim+button22BoundRect.Left(), y+vShim+button22BoundRect.Top(),
                         button22BoundRect.GetWidth(), button22BoundRect.GetHeight() );
          // ----------------- ARROW 2
          NWCalcArrowRect( button22BoundRect, arrowRect );
--        gtk_paint_arrow( style, gdkDrawable, stateType, shadowType, 
++        gtk_paint_arrow( style, gdkDrawable, stateType, shadowType,
                           gdkRect, GTK_WIDGET(scrollbarWidget), scrollbarTag, button2Type, TRUE,
--                         x+hShim+arrowRect.Left(), y+vShim+arrowRect.Top(), 
++                         x+hShim+arrowRect.Left(), y+vShim+arrowRect.Top(),
                           arrowRect.GetWidth(), arrowRect.GetHeight() );
      }
  
@@@ -1742,7 -1743,7 +1743,7 @@@
          return( FALSE );
      }
      g_object_unref( pixmap );
-- 
++
      return( TRUE );
  }
  
@@@ -1780,7 -1781,7 +1781,7 @@@ static Rectangle NWGetScrollButtonRect
  
      gint nFirst = 0;
      gint nSecond = 0;
--    
++
      if ( has_forward )   nSecond += 1;
      if ( has_forward2 )  nFirst  += 1;
      if ( has_backward )  nFirst  += 1;
@@@ -1796,7 -1797,7 +1797,7 @@@
          buttonWidth = stepper_size + trough_border + stepper_spacing;
          buttonHeight = slider_width + 2 * trough_border;
      }
-- 
++
      if ( nPart == PART_BUTTON_UP )
      {
          buttonHeight *= nFirst;
@@@ -1835,13 -1836,13 +1836,13 @@@ BOOL GtkSalGraphics::NWPaintGTKEditBox
                                          ControlType nType, ControlPart nPart,
                                          const Rectangle& rControlRectangle,
                                          const clipList& rClipList,
--                                        ControlState nState, 
++                                        ControlState nState,
                                          const ImplControlValue& aValue,
                                          const OUString& rCaption )
  {
      Rectangle		pixmapRect;
      GdkRectangle    clipRect;
--    
++
      // Find the overall bounding rect of the buttons's drawing area,
      // plus its actual draw rect excluding adornment
      pixmapRect = NWGetEditBoxPixmapRect( m_nScreen, nType, nPart, rControlRectangle,
@@@ -1852,7 -1853,7 +1853,7 @@@
          clipRect.y = it->Top();
          clipRect.width = it->GetWidth();
          clipRect.height = it->GetHeight();
--        
++
          NWPaintOneEditBox( m_nScreen, gdkDrawable, &clipRect, nType, nPart, pixmapRect, nState, aValue, rCaption );
      }
  
@@@ -1922,7 -1923,7 +1923,7 @@@ static void NWPaintOneEditBox(	int nScr
      /* border's shadowType for gtk entries is always GTK_SHADOW_IN (see gtkentry.c)
      shadowType = GTK_SHADOW_IN;
      */
--    
++
      switch ( nType )
      {
          case CTRL_SPINBOX:
@@@ -1954,13 -1955,13 +1955,13 @@@
      }
      NWSetWidgetState( widget, nState, stateType );
  
--    gtk_paint_flat_box( pBGWidget->style, gdkDrawable, stateType, GTK_SHADOW_NONE, 
++    gtk_paint_flat_box( pBGWidget->style, gdkDrawable, stateType, GTK_SHADOW_NONE,
                          gdkRect, pBGWidget, "entry_bg",
--                        aEditBoxRect.Left(), aEditBoxRect.Top(), 
++                        aEditBoxRect.Left(), aEditBoxRect.Top(),
                          aEditBoxRect.GetWidth(), aEditBoxRect.GetHeight() );
--    gtk_paint_shadow( widget->style, gdkDrawable, GTK_STATE_NORMAL, GTK_SHADOW_IN, 
++    gtk_paint_shadow( widget->style, gdkDrawable, GTK_STATE_NORMAL, GTK_SHADOW_IN,
                        gdkRect, widget, "entry",
--                      aEditBoxRect.Left(), aEditBoxRect.Top(), 
++                      aEditBoxRect.Left(), aEditBoxRect.Top(),
                        aEditBoxRect.GetWidth(), aEditBoxRect.GetHeight() );
  
  }
@@@ -1972,7 -1973,7 +1973,7 @@@
  BOOL GtkSalGraphics::NWPaintGTKSpinBox( ControlType nType, ControlPart nPart,
                                          const Rectangle& rControlRectangle,
                                          const clipList&,
--                                        ControlState nState, 
++                                        ControlState nState,
                                          const ImplControlValue& aValue,
                                          const OUString& rCaption )
  {
@@@ -2155,7 -2156,7 +2156,7 @@@ BOOL GtkSalGraphics::NWPaintGTKComboBox
                                           ControlType nType, ControlPart nPart,
                                           const Rectangle& rControlRectangle,
                                           const clipList& rClipList,
--                                         ControlState nState, 
++                                         ControlState nState,
                                           const ImplControlValue& aValue,
                                           const OUString& rCaption )
  {
@@@ -2201,20 -2202,20 +2202,20 @@@
          clipRect.y = it->Top();
          clipRect.width = it->GetWidth();
          clipRect.height = it->GetHeight();
--        
++
          if( nPart == PART_ENTIRE_CONTROL )
--            NWPaintOneEditBox( m_nScreen, gdkDrawable, &clipRect, nType, nPart, aEditBoxRect, 
++            NWPaintOneEditBox( m_nScreen, gdkDrawable, &clipRect, nType, nPart, aEditBoxRect,
                                 nState, aValue, rCaption );
--        
++
          // Buttons must paint opaque since some themes have alpha-channel enabled buttons
--        gtk_paint_flat_box( gWidgetData[m_nScreen].gBtnWidget->style, gdkDrawable, GTK_STATE_NORMAL, GTK_SHADOW_NONE, 
--                            &clipRect, m_pWindow, "base", 
--                            x+(buttonRect.Left() - pixmapRect.Left()), 
++        gtk_paint_flat_box( gWidgetData[m_nScreen].gBtnWidget->style, gdkDrawable, GTK_STATE_NORMAL, GTK_SHADOW_NONE,
++                            &clipRect, m_pWindow, "base",
++                            x+(buttonRect.Left() - pixmapRect.Left()),
                              y+(buttonRect.Top() - pixmapRect.Top()),
                              buttonRect.GetWidth(), buttonRect.GetHeight() );
          gtk_paint_box( GTK_COMBO(gWidgetData[m_nScreen].gComboWidget)->button->style, gdkDrawable, stateType, shadowType,
                         &clipRect, GTK_COMBO(gWidgetData[m_nScreen].gComboWidget)->button, "button",
--                       x+(buttonRect.Left() - pixmapRect.Left()), 
++                       x+(buttonRect.Left() - pixmapRect.Left()),
                         y+(buttonRect.Top() - pixmapRect.Top()),
                         buttonRect.GetWidth(), buttonRect.GetHeight() );
  
@@@ -2223,7 -2224,7 +2224,7 @@@
                           x+(arrowRect.Left() - pixmapRect.Left()), y+(arrowRect.Top() - pixmapRect.Top()),
                           arrowRect.GetWidth(), arrowRect.GetHeight() );
      }
--    
++
      return( TRUE );
  }
  
@@@ -2263,7 -2264,7 +2264,7 @@@ static Rectangle NWGetComboBoxButtonRec
      else if( nPart == PART_SUB_EDIT )
      {
          NWEnsureGTKCombo( nScreen );
--        
++
          gint adjust_x = GTK_CONTAINER(gWidgetData[nScreen].gComboWidget)->border_width +
                          nFocusWidth +
                          nFocusPad;
@@@ -2283,11 -2284,11 +2284,11 @@@
  //-------------------------------------
  
  
--    
++
  BOOL GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart,
                                          const Rectangle& rControlRectangle,
                                          const clipList&,
--                                        ControlState nState, 
++                                        ControlState nState,
                                          const ImplControlValue& aValue,
                                          const OUString& )
  {
@@@ -2310,10 -2310,9 +2310,9 @@@
          aCacheItems.SetSize( 20 );
      if( !aCachePage.GetSize() )
          aCachePage.SetSize( 1 );
--    
-     if ( !pTabitemValue && (nType==CTRL_TAB_ITEM) )
++
+     if ( (nType == CTRL_TAB_ITEM) && (aValue.getType() != CTRL_TAB_ITEM) )
      {
-         std::fprintf( stderr, "NWPaintGTKTabItem() received a NULL TabitemValue.  Cannot draw native tab\n" );
          return( false );
      }
  
@@@ -2348,7 -2348,7 +2348,7 @@@
  
          // Allow the tab to draw a right border if needed
          tabRect.Right() -= 1;
--    
++
          // #129732# avoid degenerate cases which might lead to crashes
          if( tabRect.GetWidth() <= 1 || tabRect.GetHeight() <= 1 )
              return false;
@@@ -2365,21 -2365,21 +2365,21 @@@
              return NWRenderPixmapToScreen( pixmap, pixmapRect );
      }
  
--        
++
  //	gtk_widget_set_state( gWidgetData[m_nScreen].gNotebookWidget, stateType );
  
--    pixmap = gdk_pixmap_new( NULL, pixmapRect.GetWidth(), pixmapRect.GetHeight(), 
++    pixmap = gdk_pixmap_new( NULL, pixmapRect.GetWidth(), pixmapRect.GetHeight(),
                               GetX11SalData()->GetDisplay()->GetVisual( m_nScreen ).GetDepth() );
      GdkRectangle paintRect;
      paintRect.x = paintRect.y = 0;
      paintRect.width = pixmapRect.GetWidth();
      paintRect.height = pixmapRect.GetHeight();
--                             
--    gtk_paint_flat_box( m_pWindow->style, pixmap, GTK_STATE_NORMAL, 
++
++    gtk_paint_flat_box( m_pWindow->style, pixmap, GTK_STATE_NORMAL,
                          GTK_SHADOW_NONE, &paintRect, m_pWindow, "base", 0, 0, -1, -1);
  
      NWSetWidgetState( gWidgetData[m_nScreen].gNotebookWidget, nState, stateType );
--    
++
      switch( nType )
      {
          case CTRL_TAB_BODY:
@@@ -2418,7 -2418,7 +2418,7 @@@
          aCacheItems.Fill( nType, nState, pixmapRect, pixmap );
      else
          aCachePage.Fill( nType, nState, pixmapRect, pixmap );
--        
++
      BOOL bSuccess = NWRenderPixmapToScreen(pixmap, pixmapRect);
      g_object_unref( pixmap );
      return bSuccess;
@@@ -2430,7 -2430,7 +2430,7 @@@ BOOL GtkSalGraphics::NWPaintGTKListBox
                                          ControlType nType, ControlPart nPart,
                                          const Rectangle& rControlRectangle,
                                          const clipList& rClipList,
--                                        ControlState nState, 
++                                        ControlState nState,
                                          const ImplControlValue& aValue,
                                          const OUString& rCaption )
  {
@@@ -2479,44 -2479,44 +2479,44 @@@
              "focus_padding",	&nFocusPadding,
              (char *)NULL);
      }
--    
++
      for( clipList::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it )
      {
          clipRect.x = it->Left();
          clipRect.y = it->Top();
          clipRect.width = it->GetWidth();
          clipRect.height = it->GetHeight();
--    
++
          if ( nPart != PART_WINDOW )
          {
              // Listboxes must paint opaque since some themes have alpha-channel enabled bodies
--            gtk_paint_flat_box( gWidgetData[m_nScreen].gBtnWidget->style, gdkDrawable, GTK_STATE_NORMAL, GTK_SHADOW_NONE, 
--                                &clipRect, m_pWindow, "base", x, y, 
++            gtk_paint_flat_box( gWidgetData[m_nScreen].gBtnWidget->style, gdkDrawable, GTK_STATE_NORMAL, GTK_SHADOW_NONE,
++                                &clipRect, m_pWindow, "base", x, y,
                                  pixmapRect.GetWidth(), pixmapRect.GetHeight() );
              gtk_paint_box( gWidgetData[m_nScreen].gOptionMenuWidget->style, gdkDrawable, stateType, shadowType, &clipRect,

... etc. - the rest is truncated


More information about the ooo-build-commit mailing list