[ooo-build-commit] Branch 'ooo/master' - 3 commits - comphelper/source dtrans/source i18npool/inc i18npool/source svtools/source toolkit/source vcl/aqua vcl/inc vcl/os2 vcl/source vcl/unx vcl/win

Jan Holesovsky kendy at kemper.freedesktop.org
Tue Sep 8 22:32:30 PDT 2009


 comphelper/source/misc/uieventslogger.cxx                             |   14 -
 dtrans/source/aqua/DropTarget.cxx                                     |    3 
 i18npool/inc/defaultnumberingprovider.hxx                             |    1 
 i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx |   11 
 svtools/source/dialogs/addresstemplate.cxx                            |   25 +
 svtools/source/syslocale/syslocale.cxx                                |   22 +
 toolkit/source/awt/vclxmenu.cxx                                       |    2 
 vcl/aqua/inc/salframe.h                                               |   86 +++---
 vcl/aqua/source/app/salinst.cxx                                       |   14 +
 vcl/aqua/source/gdi/salbmp.cxx                                        |   24 +
 vcl/aqua/source/window/salframe.cxx                                   |   23 +
 vcl/inc/vcl/settings.hxx                                              |    5 
 vcl/os2/source/window/salframe.cxx                                    |    1 
 vcl/source/app/settings.cxx                                           |    3 
 vcl/source/control/combobox.cxx                                       |   12 
 vcl/source/gdi/outdev3.cxx                                            |   90 +++---
 vcl/source/gdi/pdfwriter_impl.cxx                                     |   11 
 vcl/source/window/menu.cxx                                            |   14 -
 vcl/source/window/toolbox.cxx                                         |   75 ++++-
 vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx                              |   32 ++
 vcl/unx/kde/salnativewidgets-kde.cxx                                  |    1 
 vcl/unx/kde4/KDEData.cxx                                              |    2 
 vcl/unx/kde4/KDESalFrame.cxx                                          |    1 
 vcl/unx/kde4/KDESalGraphics.cxx                                       |  129 ++++++----
 vcl/unx/source/app/sm.cxx                                             |   40 ++-
 vcl/unx/source/gdi/cdeint.cxx                                         |    1 
 vcl/unx/source/gdi/salgdi.cxx                                         |   83 +++---
 vcl/unx/source/plugadapt/salplug.cxx                                  |    4 
 vcl/win/source/window/salframe.cxx                                    |    1 
 29 files changed, 497 insertions(+), 233 deletions(-)

New commits:
commit 29e16c9bbda28157f839267acb4a1b18e44e2444
Author: Oliver Bolte <obo at openoffice.org>
Date:   Tue Sep 8 10:44:42 2009 +0000

    CWS-TOOLING: integrate CWS vcl104

diff --git a/dtrans/source/aqua/DropTarget.cxx b/dtrans/source/aqua/DropTarget.cxx
index 51791e1..81de7dd 100644
--- a/dtrans/source/aqua/DropTarget.cxx
+++ b/dtrans/source/aqua/DropTarget.cxx
@@ -297,6 +297,9 @@ NSDragOperation DropTarget::draggingUpdated(id sender)
 
       fire_dragOver(dtde);
 
+      // drag over callbacks likely have rendered something 
+      [mView setNeedsDisplay: TRUE];
+
       dragOp = OfficeToSystemDragActions(mSelectedDropAction);
 
       //NSLog(@"Drag update: Source actions: %x proposed action %x selected action %x", mDragSourceSupportedActions, currentAction, mSelectedDropAction);
diff --git a/vcl/aqua/inc/salframe.h b/vcl/aqua/inc/salframe.h
index a776bd6..f853328 100644
--- a/vcl/aqua/inc/salframe.h
+++ b/vcl/aqua/inc/salframe.h
@@ -44,6 +44,8 @@
 #include <utility>
 #include <stdexcept>
 
+#include <boost/shared_ptr.hpp>
+
 class AquaSalGraphics;
 class AquaSalFrame;
 class AquaSalTimer;
@@ -60,47 +62,49 @@ typedef struct SalFrame::SalPointerState SalPointerState;
 class AquaSalFrame : public SalFrame
 {
 public:
-    NSWindow*               mpWindow;               // Cocoa window
-    NSView*                 mpView;				    // Cocoa view (actually a custom view, see below
-    NSMenuItem*             mpDockMenuEntry;        // entry in the dynamic dock menu
-    NSRect                  maScreenRect;           // for mirroring purposes
-    AquaSalGraphics*		mpGraphics; 			// current frame graphics
-    AquaSalFrame*			mpParent;				// pointer to parent frame
-     SystemEnvData			maSysData;				// system data
-    int                     mnMinWidth;             // min. client width in pixels
-    int                     mnMinHeight;            // min. client height in pixels
-    int                     mnMaxWidth;             // max. client width in pixels
-    int                     mnMaxHeight;            // max. client height in pixels
-    NSRect                  maFullScreenRect;       // old window size when in FullScreen
-    bool					mbGraphics:1; 			// is Graphics used?
-    bool                    mbFullScreen:1;         // is Window in FullScreen?
-    bool                    mbShown:1;
-    bool                    mbInitShow:1;
-    bool                    mbPositioned:1;
-    bool                    mbSized:1;
-    bool                    mbPresentation:1;
-    
-    ULONG                   mnStyle;
-    unsigned int            mnStyleMask;            // our style mask from NSWindow creation
-    
-    ULONG                   mnLastEventTime;
-    unsigned int            mnLastModifierFlags;
-    AquaSalMenu*            mpMenu;
-    
-    SalExtStyle             mnExtStyle;             // currently document frames are marked this way
-    
-    PointerStyle            mePointerStyle;         // currently active pointer style
-    
-    NSTrackingRectTag       mnTrackingRectTag;      // used to get enter/leave messages
-
-    CGMutablePathRef        mrClippingPath;         // used for "shaping"
-    std::vector< CGRect >   maClippingRects;
-    
-    std::list<AquaBlinker*> maBlinkers;
-    
-    Rectangle               maInvalidRect;
-    
-    ULONG                   mnICOptions;
+    NSWindow*                       mpWindow;               // Cocoa window
+    NSView*                         mpView;				    // Cocoa view (actually a custom view, see below
+    NSMenuItem*                     mpDockMenuEntry;        // entry in the dynamic dock menu
+    NSRect                          maScreenRect;           // for mirroring purposes
+    AquaSalGraphics*		        mpGraphics; 			// current frame graphics
+    AquaSalFrame*			        mpParent;				// pointer to parent frame
+     SystemEnvData			        maSysData;				// system data
+    int                             mnMinWidth;             // min. client width in pixels
+    int                             mnMinHeight;            // min. client height in pixels
+    int                             mnMaxWidth;             // max. client width in pixels
+    int                             mnMaxHeight;            // max. client height in pixels
+    NSRect                          maFullScreenRect;       // old window size when in FullScreen
+    bool					        mbGraphics:1; 			// is Graphics used?
+    bool                            mbFullScreen:1;         // is Window in FullScreen?
+    bool                            mbShown:1;
+    bool                            mbInitShow:1;
+    bool                            mbPositioned:1;
+    bool                            mbSized:1;
+    bool                            mbPresentation:1;
+    
+    ULONG                           mnStyle;
+    unsigned int                    mnStyleMask;            // our style mask from NSWindow creation
+    
+    ULONG                           mnLastEventTime;
+    unsigned int                    mnLastModifierFlags;
+    AquaSalMenu*                    mpMenu;
+    
+    SalExtStyle                     mnExtStyle;             // currently document frames are marked this way
+    
+    PointerStyle                    mePointerStyle;         // currently active pointer style
+    
+    NSTrackingRectTag               mnTrackingRectTag;      // used to get enter/leave messages
+
+    CGMutablePathRef                mrClippingPath;         // used for "shaping"
+    std::vector< CGRect >           maClippingRects;
+    
+    std::list<AquaBlinker*>         maBlinkers;
+    
+    Rectangle                       maInvalidRect;
+    
+    ULONG                           mnICOptions;
+    
+    boost::shared_ptr< Timer >      mpActivityTimer; // Timer to prevent system sleep during presentation
 public:
     /** Constructor
 
diff --git a/vcl/aqua/source/app/salinst.cxx b/vcl/aqua/source/app/salinst.cxx
index 887973a..82fb005 100644
--- a/vcl/aqua/source/app/salinst.cxx
+++ b/vcl/aqua/source/app/salinst.cxx
@@ -814,6 +814,18 @@ bool AquaSalInstance::AnyInput( USHORT nType )
         if( nType == INPUT_APPEVENT )
             return false;
     }
+    
+    if( nType & INPUT_TIMER )
+    {
+        if( AquaSalTimer::pRunningTimer )
+        {
+            NSDate* pDt = [AquaSalTimer::pRunningTimer fireDate];
+            if( pDt && [pDt timeIntervalSinceNow] < 0 )
+            {
+                return true;
+            }
+        }
+    }
         
     unsigned/*NSUInteger*/ nEventMask = 0;
     if( nType & INPUT_MOUSE)
@@ -828,7 +840,7 @@ bool AquaSalInstance::AnyInput( USHORT nType )
         nEventMask |= NSKeyDownMask | NSKeyUpMask | NSFlagsChangedMask;
     if( nType & INPUT_OTHER)
         nEventMask |= NSTabletPoint;
-    // TODO: INPUT_PAINT / INPUT_TIMER / more INPUT_OTHER
+    // TODO: INPUT_PAINT / more INPUT_OTHER
     if( !nType)
         return false;
 
diff --git a/vcl/aqua/source/gdi/salbmp.cxx b/vcl/aqua/source/gdi/salbmp.cxx
index 91bf04f..6ba8619 100644
--- a/vcl/aqua/source/gdi/salbmp.cxx
+++ b/vcl/aqua/source/gdi/salbmp.cxx
@@ -214,16 +214,26 @@ bool AquaSalBitmap::CreateContext()
     {
         // convert user data to 32 bit
         nContextBytesPerRow = mnWidth << 2;
-        maContextBuffer.reset( new sal_uInt8[ mnHeight * nContextBytesPerRow ] );
+        try
+        {
+            maContextBuffer.reset( new sal_uInt8[ mnHeight * nContextBytesPerRow ] );
 
-        if( !bSkipConversion )
-            ConvertBitmapData( mnWidth, mnHeight,
-                           32, nContextBytesPerRow, maPalette, maContextBuffer.get(),
-                           mnBits, mnBytesPerRow, maPalette, maUserBuffer.get() );		
+            if( !bSkipConversion )
+                ConvertBitmapData( mnWidth, mnHeight,
+                               32, nContextBytesPerRow, maPalette, maContextBuffer.get(),
+                               mnBits, mnBytesPerRow, maPalette, maUserBuffer.get() );
+        }
+        catch( std::bad_alloc )
+        {
+            mxGraphicContext = 0;
+        }
     }
 
-    mxGraphicContext = ::CGBitmapContextCreate( maContextBuffer.get(), mnWidth, mnHeight,
-        bitsPerComponent, nContextBytesPerRow, aCGColorSpace, aCGBmpInfo );
+    if( maContextBuffer.get() )
+    {
+        mxGraphicContext = ::CGBitmapContextCreate( maContextBuffer.get(), mnWidth, mnHeight,
+            bitsPerComponent, nContextBytesPerRow, aCGColorSpace, aCGBmpInfo );
+    }
 
     if( !mxGraphicContext )
         maContextBuffer.reset();
diff --git a/vcl/aqua/source/window/salframe.cxx b/vcl/aqua/source/window/salframe.cxx
index aa8686f..468d7ad 100644
--- a/vcl/aqua/source/window/salframe.cxx
+++ b/vcl/aqua/source/window/salframe.cxx
@@ -43,6 +43,7 @@
 #include "aqua11yfactory.h"
 #include "vcl/salwtype.hxx"
 #include "vcl/window.hxx"
+#include "vcl/timer.hxx"
 
 #include "premac.h"
 // needed for theming
@@ -749,16 +750,37 @@ void AquaSalFrame::ShowFullScreen( BOOL bFullScreen, sal_Int32 nDisplay )
 
 // -----------------------------------------------------------------------
 
+class PreventSleepTimer : public AutoTimer
+{
+public:
+    PreventSleepTimer()
+    {
+        SetTimeout( 30000 );
+        Start();
+    }
+    
+    virtual ~PreventSleepTimer()
+    {
+    }
+    
+    virtual void Timeout()
+    {
+        UpdateSystemActivity(OverallAct);
+    }
+};
+
 void AquaSalFrame::StartPresentation( BOOL bStart )
 {
     if( bStart )
     {
+        mpActivityTimer.reset( new PreventSleepTimer() );
         [mpWindow setLevel: NSScreenSaverWindowLevel];
         if( mbShown )
             [mpWindow makeMainWindow];
     }
     else
     {
+        mpActivityTimer.reset();
         [mpWindow setLevel: NSNormalWindowLevel];
     }
 }
@@ -1173,6 +1195,7 @@ void AquaSalFrame::UpdateSettings( AllSettings& rSettings )
     Color aMenuTextColor( getColor( [NSColor textColor],
                                     aStyleSettings.GetMenuTextColor(), mpWindow ) );
     aStyleSettings.SetMenuTextColor( aMenuTextColor );
+    aStyleSettings.SetMenuBarTextColor( aMenuTextColor );
 
     aStyleSettings.SetCursorBlinkTime( 500 );
     
diff --git a/vcl/inc/vcl/settings.hxx b/vcl/inc/vcl/settings.hxx
index 0970b70..8562e0e 100644
--- a/vcl/inc/vcl/settings.hxx
+++ b/vcl/inc/vcl/settings.hxx
@@ -379,6 +379,7 @@ private:
     Color                           maMenuHighlightColor;
     Color                           maMenuHighlightTextColor;
     Color                           maMenuTextColor;
+    Color                           maMenuBarTextColor;
     Color                           maMonoColor;
     Color                           maRadioCheckTextColor;
     Color                           maShadowColor;
@@ -689,6 +690,10 @@ public:
                                         { CopyData(); mpData->maMenuTextColor = rColor; }
     const Color&                    GetMenuTextColor() const
                                         { return mpData->maMenuTextColor; }
+    void                            SetMenuBarTextColor( const Color& rColor )
+                                        { CopyData(); mpData->maMenuBarTextColor = rColor; }
+    const Color&                    GetMenuBarTextColor() const
+                                        { return mpData->maMenuBarTextColor; }
     void                            SetMenuHighlightColor( const Color& rColor )
                                         { CopyData(); mpData->maMenuHighlightColor = rColor; }
     const Color&                    GetMenuHighlightColor() const
diff --git a/vcl/os2/source/window/salframe.cxx b/vcl/os2/source/window/salframe.cxx
index 045c258..fb53876 100644
--- a/vcl/os2/source/window/salframe.cxx
+++ b/vcl/os2/source/window/salframe.cxx
@@ -2172,6 +2172,7 @@ void Os2SalFrame::UpdateSettings( AllSettings& rSettings )
         aStyleSettings.SetDeactiveBorderColor( ImplOS2ColorToSal( WinQuerySysColor( HWND_DESKTOP, SYSCLR_INACTIVEBORDER, 0 ) ) );
         aStyleSettings.SetMenuColor( ImplOS2ColorToSal( WinQuerySysColor( HWND_DESKTOP, SYSCLR_MENU, 0 ) ) );
         aStyleSettings.SetMenuTextColor( ImplOS2ColorToSal( WinQuerySysColor( HWND_DESKTOP, SYSCLR_MENUTEXT, 0 ) ) );
+        aStyleSettings.SetMenuBarTextColor( ImplOS2ColorToSal( WinQuerySysColor( HWND_DESKTOP, SYSCLR_MENUTEXT, 0 ) ) );
     }
     aStyleSettings.SetDialogTextColor( aStyleSettings.GetButtonTextColor() );
     aStyleSettings.SetRadioCheckTextColor( aStyleSettings.GetButtonTextColor() );
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index 79b9c01..8bb191b 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -478,6 +478,7 @@ ImplStyleData::ImplStyleData( const ImplStyleData& rData ) :
     maMenuHighlightColor( rData.maMenuHighlightColor ),
     maMenuHighlightTextColor( rData.maMenuHighlightTextColor ),
     maMenuTextColor( rData.maMenuTextColor ),
+    maMenuBarTextColor( rData.maMenuBarTextColor ),
     maMonoColor( rData.maMonoColor ),
     maRadioCheckTextColor( rData.maRadioCheckTextColor ),
     maShadowColor( rData.maShadowColor ),
@@ -597,6 +598,7 @@ void ImplStyleData::SetStandardStyles()
     maMenuBarColor              = Color( COL_LIGHTGRAY );
     maMenuBorderColor           = Color( COL_LIGHTGRAY );
     maMenuTextColor             = Color( COL_BLACK );
+    maMenuBarTextColor          = Color( COL_BLACK );
     maMenuHighlightColor        = Color( COL_BLUE );
     maMenuHighlightTextColor    = Color( COL_WHITE );
     maHighlightColor            = Color( COL_BLUE );
@@ -1028,6 +1030,7 @@ BOOL StyleSettings::operator ==( const StyleSettings& rSet ) const
          (mpData->maMenuBarColor            == rSet.mpData->maMenuBarColor)             &&
          (mpData->maMenuBorderColor         == rSet.mpData->maMenuBorderColor)          &&
          (mpData->maMenuTextColor           == rSet.mpData->maMenuTextColor)            &&
+         (mpData->maMenuBarTextColor        == rSet.mpData->maMenuBarTextColor)         &&
          (mpData->maMenuHighlightColor      == rSet.mpData->maMenuHighlightColor)       &&
          (mpData->maMenuHighlightTextColor  == rSet.mpData->maMenuHighlightTextColor)   &&
          (mpData->maHighlightColor          == rSet.mpData->maHighlightColor)           &&
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index 59caccf..10961bc 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -800,14 +800,8 @@ void ComboBox::DataChanged( const DataChangedEvent& rDCEvt )
 
 long ComboBox::PreNotify( NotifyEvent& rNEvt )
 {
-    long nDone = 0;
-
-    if( ( rNEvt.GetType() == EVENT_MOUSEBUTTONDOWN ) && ( rNEvt.GetWindow() == mpImplLB->GetMainWindow() ) )
-    {
-        mpSubEdit->GrabFocus();
-    }
 
-    return nDone ? nDone : Edit::PreNotify( rNEvt );
+    return Edit::PreNotify( rNEvt );
 }
 
 // -----------------------------------------------------------------------
@@ -886,6 +880,10 @@ long ComboBox::Notify( NotifyEvent& rNEvt )
             nDone = 0;  // don't eat this event, let the default handling happen (i.e. scroll the context)
         }
     }
+    else if( ( rNEvt.GetType() == EVENT_MOUSEBUTTONDOWN ) && ( rNEvt.GetWindow() == mpImplLB->GetMainWindow() ) )
+    {
+        mpSubEdit->GrabFocus();
+    }
 
     return nDone ? nDone : Edit::Notify( rNEvt );
 }
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index 8a037b7..90c4340 100644
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -6,8 +6,6 @@
  *
  * OpenOffice.org - a multi-platform office productivity suite
  *
- * $RCSfile: outdev3.cxx,v $
- *
  * This file is part of OpenOffice.org.
  *
  * OpenOffice.org is free software: you can redistribute it and/or modify
@@ -4498,71 +4496,79 @@ void OutputDevice::ImplDrawStrikeoutChar( long nBaseX, long nBaseY,
                                           FontStrikeout eStrikeout,
                                           Color aColor )
 {
-    BOOL bOldMap = IsMapModeEnabled();
-    EnableMapMode( FALSE );
-
-    Color aOldColor = GetTextColor();
-    SetTextColor( aColor );
-    ImplInitTextColor();
+    // PDF-export does its own strikeout drawing... why again?
+    if( mpPDFWriter && mpPDFWriter->isBuiltinFont(mpFontEntry->maFontSelData.mpFontData) )
+        return;
 
-    xub_Unicode pChars[5];
+    // prepare string for strikeout measurement
+    static char cStrikeoutChar;
     if ( eStrikeout == STRIKEOUT_SLASH )
-        pChars[0] = '/';
+        cStrikeoutChar = '/';
     else // ( eStrikeout == STRIKEOUT_X )
-        pChars[0] = 'X';
-    pChars[3]=pChars[2]=pChars[1]=pChars[0];
+        cStrikeoutChar = 'X';
+    static const int nTestStrLen = 4;
+    static const int nMaxStrikeStrLen = 2048;
+    xub_Unicode aChars[ nMaxStrikeStrLen +1]; // +1 for valgrind...
+    for( int i = 0; i < nTestStrLen; ++i)
+        aChars[i] = cStrikeoutChar;
+    const String aStrikeoutTest( aChars, nTestStrLen );
 
     // calculate approximation of strikeout atom size
     long nStrikeoutWidth = nWidth;
     String aStrikeoutTest( pChars, 4 );
-    SalLayout* pLayout = ImplLayout( aStrikeoutTest, 0, 4 );
-    if ( pLayout )
+    SalLayout* pLayout = ImplLayout( aStrikeoutTest, 0, nTestStrLen );
+    if( pLayout )
     {
-        nStrikeoutWidth = (pLayout->GetTextWidth() + 2) / (4 * pLayout->GetUnitsPerPixel());
+        nStrikeoutWidth = (pLayout->GetTextWidth() +nTestStrLen/2) / (nTestStrLen * pLayout->GetUnitsPerPixel());        
         pLayout->Release();
-        if ( nStrikeoutWidth <= 0 ) // sanity check
-            nStrikeoutWidth = 1;
     }
+    if( nStrikeoutWidth <= 0 ) // sanity check
+        return;
 
     // calculate acceptable strikeout length
     // allow the strikeout to be one pixel larger than the text it strikes out
-    long nMaxWidth = nStrikeoutWidth/2;
+    long nMaxWidth = nStrikeoutWidth / 2;
     if ( nMaxWidth < 2 )
         nMaxWidth = 2;
     nMaxWidth += nWidth + 1;
 
-    // build strikeout string
-    long nFullStrikeoutWidth = 0;
-    String aStrikeoutText( pChars, 0 );
-    while ( (nFullStrikeoutWidth+=nStrikeoutWidth) < nMaxWidth+1 )
-        aStrikeoutText += pChars[0];
-
+    int nStrikeStrLen = (nMaxWidth + nStrikeoutWidth - 1) / nStrikeoutWidth;
     // if the text width is smaller than the strikeout text, then do not
     // strike out at all. This case requires user interaction, e.g. adding
     // a space to the text
-    if ( (aStrikeoutText.Len() > 0)
-    && !(mpPDFWriter && mpPDFWriter->isBuiltinFont(mpFontEntry->maFontSelData.mpFontData) ) )
-    {
-        if ( mpFontEntry->mnOrientation )
-            ImplRotatePos( nBaseX, nBaseY, nX, nY, mpFontEntry->mnOrientation );
+    if( nStrikeStrLen <= 0 )
+        return;
+    if( nStrikeStrLen > nMaxStrikeStrLen )
+        nStrikeStrLen = nMaxStrikeStrLen;
 
-        // strikeout text has to be left aligned
-        ULONG nOrigTLM = mnTextLayoutMode;
-        mnTextLayoutMode = TEXT_LAYOUT_BIDI_STRONG | TEXT_LAYOUT_COMPLEX_DISABLED;
-        SalLayout* pSalLayout = ImplLayout( aStrikeoutText, 0, STRING_LEN );
-        mnTextLayoutMode = nOrigTLM;
+    // build the strikeout string
+    for( int i = nTestStrLen; i < nStrikeStrLen; ++i)
+        aChars[i] = cStrikeoutChar;
+    const String aStrikeoutText( aChars, xub_StrLen(nStrikeStrLen) );
 
-        if ( pSalLayout )
-        {
-            pSalLayout->DrawBase() = Point( nX+mnTextOffX, nY+mnTextOffY );
-            pSalLayout->DrawText( *mpGraphics );
-            pSalLayout->Release();
-        }
-    }
+    if( mpFontEntry->mnOrientation )
+        ImplRotatePos( nBaseX, nBaseY, nX, nY, mpFontEntry->mnOrientation );
+
+    // strikeout text has to be left aligned
+    ULONG nOrigTLM = mnTextLayoutMode;
+    mnTextLayoutMode = TEXT_LAYOUT_BIDI_STRONG | TEXT_LAYOUT_COMPLEX_DISABLED;
+    pLayout = ImplLayout( aStrikeoutText, 0, STRING_LEN );
+    mnTextLayoutMode = nOrigTLM;
+
+    if( !pLayout )
+        return;
+
+    // draw the strikeout text
+    const Color aOldColor = GetTextColor();
+    SetTextColor( aColor );
+    ImplInitTextColor();
+
+    pLayout->DrawBase() = Point( nX+mnTextOffX, nY+mnTextOffY );
+    pLayout->DrawText( *mpGraphics );
+    pLayout->Release();
 
     SetTextColor( aOldColor );
     ImplInitTextColor();
-    EnableMapMode( bOldMap );
 }
 
 // -----------------------------------------------------------------------
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index cbfc64a..d2f01b9 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -805,7 +805,7 @@ class Matrix3
 {
     double f[6];
 
-    void set( double *pn ) { for( int i = 0 ; i < 5; i++ ) f[i] = pn[i]; }
+    void set( double *pn ) { for( int i = 0 ; i < 6; i++ ) f[i] = pn[i]; }
 public:
     Matrix3();
     ~Matrix3() {}
@@ -6787,14 +6787,15 @@ void PDFWriterImpl::drawHorizontalGlyphs(
         for( sal_uInt32 nPos = nBeginRun+1; nPos < aRunEnds[nRun]; nPos++ )
         {
             appendHex( rGlyphs[nPos].m_nMappedGlyphId, aUnkernedLine );
-            // check if glyph advance matches with the width of the previous glyph, else adjust
+            // check if default glyph positioning is sufficient
             const Point aThisPos = aMat.transform( rGlyphs[nPos].m_aPos );
             const Point aPrevPos = aMat.transform( rGlyphs[nPos-1].m_aPos );
             double fAdvance = aThisPos.X() - aPrevPos.X();
-            fAdvance *= 1000.0 / (fXScale * nPixelFontHeight);
-            const sal_Int32 nAdjustment = rGlyphs[nPos-1].m_nNativeWidth - sal_Int32(fAdvance+0.5);
+            fAdvance *= 1000.0 / nPixelFontHeight;
+            const sal_Int32 nAdjustment = (sal_Int32)(rGlyphs[nPos-1].m_nNativeWidth - fAdvance + 0.5);
             if( nAdjustment != 0 )
             {
+                // apply individual glyph positioning
                 bNeedKern = true;
                 aKernedLine.append( ">" );
                 aKernedLine.append( nAdjustment );
@@ -8643,6 +8644,8 @@ void PDFWriterImpl::drawPolyLine( const Polygon& rPoly, const PDFWriter::ExtLine
 
                 for(sal_uInt32 a(0); a < nEdgeCount; a++)
                 {
+                    if( a > 0 )
+                        aLine.append( " " );
                     const sal_uInt32 nNextIndex((a + 1) % nPointCount);
                     const basegfx::B2DPoint aNext(aPoly.getB2DPoint(nNextIndex));
 
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 76c3e20..ca80d1a 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -2731,7 +2731,14 @@ void Menu::ImplPaint( Window* pWin, USHORT nBorder, long nStartY, MenuItemData*
                 }
 
                 if ( pThisItemOnly && bHighlighted )
-                    pWin->SetTextColor( rSettings.GetMenuTextColor() );
+                {
+                    // This restores the normal menu or menu bar text
+                    // color for when it is no longer highlighted.
+            if ( bIsMenuBar )
+                pWin->SetTextColor( rSettings.GetMenuBarTextColor() );
+            else
+                pWin->SetTextColor( rSettings.GetMenuTextColor() );
+         }
             }
             if( bLayout )
             {
@@ -3787,7 +3794,10 @@ static void ImplInitMenuWindow( Window* pWin, BOOL bFont, BOOL bMenuBar )
             pWin->SetBackground( Wallpaper( rStyleSettings.GetMenuColor() ) );
     }
 
-    pWin->SetTextColor( rStyleSettings.GetMenuTextColor() );
+    if ( bMenuBar )
+        pWin->SetTextColor( rStyleSettings.GetMenuBarTextColor() );
+    else
+        pWin->SetTextColor( rStyleSettings.GetMenuTextColor() );
     pWin->SetTextFillColor();
     pWin->SetLineColor();
 }
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 920816b..ea27948 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -1901,37 +1901,78 @@ BOOL ToolBox::ImplCalcItem()
     nDefWidth       = GetDefaultImageSize().Width();
     nDefHeight      = GetDefaultImageSize().Height();
 
+    mnWinHeight = 0;
     // determine minimum size necessary in NWF
-    if( IsNativeControlSupported( CTRL_TOOLBAR, PART_BUTTON ) )
     {
         Rectangle aRect( Point( 0, 0 ), Size( nMinWidth, nMinHeight ) );
-        Region aArrowReg = aRect;
+        Region aReg = aRect;
         ImplControlValue aVal;
         Region aNativeBounds, aNativeContent;
-        if( GetNativeControlRegion( CTRL_TOOLBAR, PART_BUTTON,
-                                    aArrowReg,
+        if( IsNativeControlSupported( CTRL_TOOLBAR, PART_BUTTON ) )
+        {
+            if( GetNativeControlRegion( CTRL_TOOLBAR, PART_BUTTON,
+                                        aReg,
+                                        CTRL_STATE_ENABLED | CTRL_STATE_ROLLOVER,
+                                        aVal, OUString(),
+                                        aNativeBounds, aNativeContent ) )
+            {
+                aRect = aNativeBounds.GetBoundRect();
+                if( aRect.GetWidth() > nMinWidth )
+                    nMinWidth = aRect.GetWidth();
+                if( aRect.GetHeight() > nMinHeight )
+                    nMinHeight = aRect.GetHeight();
+                if( nDropDownArrowWidth < nMinWidth )
+                    nDropDownArrowWidth = nMinWidth;
+                if( nMinWidth > mpData->mnMenuButtonWidth )
+                    mpData->mnMenuButtonWidth = nMinWidth;
+                else if( nMinWidth < TB_MENUBUTTON_SIZE )
+                    mpData->mnMenuButtonWidth = TB_MENUBUTTON_SIZE;
+            }
+        }
+        
+        // also calculate the area for comboboxes, drop down list boxes and spinfields
+        // as these are often inserted into toolboxes; set mnWinHeight to the
+        // greater of those values to prevent toolbar flickering (#i103385#)
+        aRect = Rectangle( Point( 0, 0 ), Size( nMinWidth, nMinHeight ) );
+        aReg = aRect;
+        if( GetNativeControlRegion( CTRL_COMBOBOX, PART_ENTIRE_CONTROL,
+                                    aReg,
                                     CTRL_STATE_ENABLED | CTRL_STATE_ROLLOVER,
                                     aVal, OUString(),
                                     aNativeBounds, aNativeContent ) )
         {
             aRect = aNativeBounds.GetBoundRect();
-            if( aRect.GetWidth() > nMinWidth )
-                nMinWidth = aRect.GetWidth();
-            if( aRect.GetHeight() > nMinHeight )
-                nMinHeight = aRect.GetHeight();
-            if( nDropDownArrowWidth < nMinWidth )
-                nDropDownArrowWidth = nMinWidth;
-            if( nMinWidth > mpData->mnMenuButtonWidth )
-                mpData->mnMenuButtonWidth = nMinWidth;
-            else if( nMinWidth < TB_MENUBUTTON_SIZE )
-                mpData->mnMenuButtonWidth = TB_MENUBUTTON_SIZE;
+            if( aRect.GetHeight() > mnWinHeight )
+                mnWinHeight = aRect.GetHeight();
         }
-    }
+        aRect = Rectangle( Point( 0, 0 ), Size( nMinWidth, nMinHeight ) );
+        aReg = aRect;
+        if( GetNativeControlRegion( CTRL_LISTBOX, PART_ENTIRE_CONTROL,
+                                    aReg,
+                                    CTRL_STATE_ENABLED | CTRL_STATE_ROLLOVER,
+                                    aVal, OUString(),
+                                    aNativeBounds, aNativeContent ) )
+        {
+            aRect = aNativeBounds.GetBoundRect();
+            if( aRect.GetHeight() > mnWinHeight )
+                mnWinHeight = aRect.GetHeight();
+        }
+        aRect = Rectangle( Point( 0, 0 ), Size( nMinWidth, nMinHeight ) );
+        aReg = aRect;
+        if( GetNativeControlRegion( CTRL_SPINBOX, PART_ENTIRE_CONTROL,
+                                    aReg,
+                                    CTRL_STATE_ENABLED | CTRL_STATE_ROLLOVER,
+                                    aVal, OUString(),
+                                    aNativeBounds, aNativeContent ) )
+        {
+            aRect = aNativeBounds.GetBoundRect();
+            if( aRect.GetHeight() > mnWinHeight )
+                mnWinHeight = aRect.GetHeight();
+        }
+    }    
     
     if ( ! mpData->m_aItems.empty() )
     {        
-        mnWinHeight = 0;
-
         std::vector< ImplToolItem >::iterator it = mpData->m_aItems.begin();
         while ( it != mpData->m_aItems.end() )
         {
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 0bb298d..bad1e03 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -3291,11 +3291,37 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
     aBackColor = getColor( pMenubarStyle->bg[GTK_STATE_NORMAL] );
     aStyleSet.SetMenuBarColor( aBackColor );
     aBackColor = getColor( pMenuStyle->bg[GTK_STATE_NORMAL] );
-    aTextColor = getColor( pMenuTextStyle->fg[GTK_STATE_NORMAL] );
-    if( aBackColor == aTextColor )
-        aTextColor = (aBackColor.GetLuminance() < 128) ? Color( COL_WHITE ) : Color( COL_BLACK );
+    aTextColor = getColor( pMenuTextStyle->text[GTK_STATE_NORMAL] );
     aStyleSet.SetMenuColor( aBackColor );
     aStyleSet.SetMenuTextColor( aTextColor );
+
+    aTextColor = getColor( pMenubarStyle->text[GTK_STATE_NORMAL] );
+    aStyleSet.SetMenuBarTextColor( aTextColor );
+    
+#if OSL_DEBUG_LEVEL > 1
+    std::fprintf( stderr, "==\n" );
+    std::fprintf( stderr, "MenuColor = %x (%d)\n", (int)aStyleSet.GetMenuColor().GetColor(), aStyleSet.GetMenuColor().GetLuminance() );
+    std::fprintf( stderr, "MenuTextColor = %x (%d)\n", (int)aStyleSet.GetMenuTextColor().GetColor(), aStyleSet.GetMenuTextColor().GetLuminance() );
+    std::fprintf( stderr, "MenuBarColor = %x (%d)\n", (int)aStyleSet.GetMenuBarColor().GetColor(), aStyleSet.GetMenuBarColor().GetLuminance() );
+    std::fprintf( stderr, "MenuBarTextColor = %x (%d)\n", (int)aStyleSet.GetMenuBarTextColor().GetColor(), aStyleSet.GetMenuBarTextColor().GetLuminance() );
+    std::fprintf( stderr, "LightColor = %x (%d)\n", (int)aStyleSet.GetLightColor().GetColor(), aStyleSet.GetLightColor().GetLuminance() );
+    std::fprintf( stderr, "ShadowColor = %x (%d)\n", (int)aStyleSet.GetShadowColor().GetColor(), aStyleSet.GetShadowColor().GetLuminance() );
+#endif
+
+    // Awful hack for menu separators in the Sonar and similar themes.
+    // If the menu color is not too dark, and the menu text color is lighter,
+    // make the "light" color lighter than the menu color and the "shadow"
+    // color darker than it.
+    if ( aStyleSet.GetMenuColor().GetLuminance() >= 32 &&
+     aStyleSet.GetMenuColor().GetLuminance() <= aStyleSet.GetMenuTextColor().GetLuminance() )
+    {
+      Color temp = aStyleSet.GetMenuColor();
+      temp.IncreaseLuminance( 8 );
+      aStyleSet.SetLightColor( temp );
+      temp = aStyleSet.GetMenuColor();
+      temp.DecreaseLuminance( 16 );
+      aStyleSet.SetShadowColor( temp );
+    }
     
     aHighlightColor = getColor( pMenuItemStyle->bg[ GTK_STATE_SELECTED ] );
     aHighlightTextColor = getColor( pMenuTextStyle->fg[ GTK_STATE_PRELIGHT ] );
diff --git a/vcl/unx/kde/salnativewidgets-kde.cxx b/vcl/unx/kde/salnativewidgets-kde.cxx
index b3e0d3e..253c66b 100644
--- a/vcl/unx/kde/salnativewidgets-kde.cxx
+++ b/vcl/unx/kde/salnativewidgets-kde.cxx
@@ -1996,6 +1996,7 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
         }
         
         aStyleSettings.SetMenuTextColor( aMenuFore );
+        aStyleSettings.SetMenuBarTextColor( aMenuFore );
         aStyleSettings.SetMenuColor( aMenuBack );
         aStyleSettings.SetMenuBarColor( aMenuBack );
 
diff --git a/vcl/unx/kde4/KDEData.cxx b/vcl/unx/kde4/KDEData.cxx
index 971eae6..f0338b6 100644
--- a/vcl/unx/kde4/KDEData.cxx
+++ b/vcl/unx/kde4/KDEData.cxx
@@ -45,6 +45,8 @@ void KDEData::initNWF()
     
     // draw toolbars on separate lines
     pSVData->maNWFData.mbDockingAreaSeparateTB = true;
+    // no borders for menu, theming does that
+    pSVData->maNWFData.mbFlatMenu = true;
 }
 
 void KDEData::deInitNWF()
diff --git a/vcl/unx/kde4/KDESalFrame.cxx b/vcl/unx/kde4/KDESalFrame.cxx
index d22051d..33f4ab5 100644
--- a/vcl/unx/kde4/KDESalFrame.cxx
+++ b/vcl/unx/kde4/KDESalFrame.cxx
@@ -318,6 +318,7 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
         aMenuBack = toColor( qMenuCG.color( QPalette::Button ) );
         
         style.SetMenuTextColor( aMenuFore );
+        style.SetMenuBarTextColor( aMenuFore );
         style.SetMenuColor( aMenuBack );
         style.SetMenuBarColor( aMenuBack );
 
diff --git a/vcl/unx/kde4/KDESalGraphics.cxx b/vcl/unx/kde4/KDESalGraphics.cxx
index 9611526..2df4cde 100644
--- a/vcl/unx/kde4/KDESalGraphics.cxx
+++ b/vcl/unx/kde4/KDESalGraphics.cxx
@@ -35,6 +35,8 @@
 #include <QStyle>
 #include <QStyleOption>
 #include <QPainter>
+#include <QFrame>
+#include <QLabel>
 
 #include <kapplication.h>
 
@@ -42,10 +44,9 @@
 
 #include "KDESalGraphics.hxx"
 
-#include <vcl/settings.hxx>
-#include <rtl/ustrbuf.hxx>
-
-#include <stdio.h>
+#include "vcl/settings.hxx"
+#include "vcl/decoview.hxx"
+#include "rtl/ustrbuf.hxx"
 
 using namespace ::rtl;
 
@@ -150,6 +151,30 @@ BOOL KDESalGraphics::hitTestNativeControl( ControlType, ControlPart,
     return FALSE;
 }
 
+void lcl_drawFrame( QRect& i_rRect, QPainter& i_rPainter, QStyle::PrimitiveElement i_nElement,
+                    ControlState i_nState, const ImplControlValue& i_rValue )
+{
+    #if ( QT_VERSION >= QT_VERSION_CHECK( 4, 5, 0 ) )
+    QStyleOptionFrameV3 styleOption;
+    styleOption.frameShape = QFrame::StyledPanel;		
+    #else
+    QStyleOptionFrame styleOption;
+    QFrame aFrame( NULL );
+    aFrame.setFrameRect( QRect(0, 0, i_rRect.width(), i_rRect.height()) );
+    aFrame.setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
+    aFrame.ensurePolished();
+    styleOption.initFrom( &aFrame );
+    styleOption.lineWidth = aFrame.lineWidth();
+    styleOption.midLineWidth = aFrame.midLineWidth();
+    #endif
+    styleOption.rect = QRect(0, 0, i_rRect.width(), i_rRect.height());
+    styleOption.state = vclStateValue2StateFlag( i_nState, i_rValue );
+    #if ( QT_VERSION < QT_VERSION_CHECK( 4, 5, 0 ) )
+    styleOption.state |= QStyle::State_Sunken;
+    #endif
+    kapp->style()->drawPrimitive(i_nElement, &styleOption, &i_rPainter);
+}
+
 BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
                                         const Region& rControlRegion, ControlState nControlState,
                                         const ImplControlValue& value, SalControlHandle&,
@@ -352,18 +377,25 @@ BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
     }
     else if (type == CTRL_LISTBOX)
     {
-        QStyleOptionComboBox styleOption;
-        
-        styleOption.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
-        styleOption.state = vclStateValue2StateFlag( nControlState, value );
-        
-        if (part == PART_SUB_EDIT)
+        if( part == PART_WINDOW )
         {
-            kapp->style()->drawControl(QStyle::CE_ComboBoxLabel, &styleOption, &painter);
+            lcl_drawFrame( widgetRect, painter, QStyle::PE_Frame, nControlState, value );
         }
         else
         {
-            kapp->style()->drawComplexControl(QStyle::CC_ComboBox, &styleOption, &painter);
+            QStyleOptionComboBox styleOption;
+            
+            styleOption.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
+            styleOption.state = vclStateValue2StateFlag( nControlState, value );
+            
+            if (part == PART_SUB_EDIT)
+            {
+                kapp->style()->drawControl(QStyle::CE_ComboBoxLabel, &styleOption, &painter);
+            }
+            else
+            {
+                kapp->style()->drawComplexControl(QStyle::CC_ComboBox, &styleOption, &painter);
+            }
         }
     }
     else if (type == CTRL_LISTNODE)
@@ -481,33 +513,11 @@ BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
     }
     else if (type == CTRL_FRAME)
     {
-        #if ( QT_VERSION >= QT_VERSION_CHECK( 4, 5, 0 ) )
-        QStyleOptionFrameV3 styleOption;
-        #else
-        QStyleOptionFrameV2 styleOption;
-        #endif
-        styleOption.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
-        styleOption.state = vclStateValue2StateFlag( nControlState, value );
-        #if ( QT_VERSION >= QT_VERSION_CHECK( 4, 5, 0 ) )
-        styleOption.frameShape = QFrame::StyledPanel;
-        #endif
-        
-        kapp->style()->drawPrimitive(QStyle::PE_FrameWindow, &styleOption, &painter);
+        lcl_drawFrame( widgetRect, painter, QStyle::PE_Frame, nControlState, value );
     }
     else if (type == CTRL_FIXEDBORDER)
     {
-        #if ( QT_VERSION >= QT_VERSION_CHECK( 4, 5, 0 ) )
-        QStyleOptionFrameV3 styleOption;
-        #else
-        QStyleOptionFrameV2 styleOption;
-        #endif
-        styleOption.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
-        styleOption.state = vclStateValue2StateFlag( nControlState, value );
-        #if ( QT_VERSION >= QT_VERSION_CHECK( 4, 5, 0 ) )
-        styleOption.frameShape = QFrame::StyledPanel;
-        #endif
-        
-        kapp->style()->drawPrimitive(QStyle::PE_FrameWindow, &styleOption, &painter);
+        lcl_drawFrame( widgetRect, painter, QStyle::PE_FrameWindow, nControlState, value );
     }
     else if (type == CTRL_WINDOW_BACKGROUND)
     {
@@ -573,14 +583,21 @@ BOOL KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart part,
             break;
         case CTRL_EDITBOX:
         {
-            styleOption.rect = QRect(0, 0, contentRect.width(), contentRect.height());
-            styleOption.state = vclStateValue2StateFlag(controlState, val);
-
-            int size = kapp->style()->pixelMetric(QStyle::PM_LayoutLeftMargin) - 1;
-            
-            contentRect.adjust( -size, -size, size, size);
-            boundingRect = contentRect;
-            
+            int nFontHeight    = kapp->fontMetrics().height();
+            //int nFrameSize     = kapp->style()->pixelMetric(QStyle::PM_DefaultFrameWidth);
+            int nLayoutTop     = kapp->style()->pixelMetric(QStyle::PM_LayoutTopMargin);
+            int nLayoutBottom  = kapp->style()->pixelMetric(QStyle::PM_LayoutBottomMargin);
+            int nLayoutLeft    = kapp->style()->pixelMetric(QStyle::PM_LayoutLeftMargin);
+            int nLayoutRight   = kapp->style()->pixelMetric(QStyle::PM_LayoutRightMargin);
+
+            int nMinHeight = (nFontHeight + nLayoutTop + nLayoutBottom);
+            if( boundingRect.height() < nMinHeight )
+            {
+                int delta = nMinHeight - boundingRect.height();
+                boundingRect.adjust( 0, 0, 0, delta );
+            }
+            contentRect = boundingRect;
+            contentRect.adjust( -nLayoutLeft+1, -nLayoutTop+1, nLayoutRight-1, nLayoutBottom-1 );
             retVal = true;
             
             break;
@@ -621,7 +638,6 @@ BOOL KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart part,
                 case PART_ENTIRE_CONTROL:
                 {
                     int size = kapp->style()->pixelMetric(QStyle::PM_ComboBoxFrameWidth) - 2;
-                    contentRect.adjust(-size,-size,size,size);
                     
                     // find out the minimum size that should be used
                     // assume contents is a text ling
@@ -632,6 +648,11 @@ BOOL KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart part,
                     if( aMinSize.height() > contentRect.height() )
                         contentRect.adjust( 0, 0, 0, aMinSize.height() - contentRect.height() );
                     boundingRect = contentRect;
+                    // FIXME: why this difference between comboboxes and listboxes ?
+                    // because a combobox has a sub edit and that is positioned
+                    // inside the outer bordered control ?
+                    if( type == CTRL_COMBOBOX )
+                        contentRect.adjust(-size,-size,size,size);
                     retVal = true;
                     break;
                 }
@@ -647,6 +668,9 @@ BOOL KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart part,
                     
                     retVal = true;
                     break;
+                case PART_WINDOW:
+                    retVal = true;
+                    break;
             }
             break;
         }
@@ -703,14 +727,19 @@ BOOL KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart part,
             break;
         case CTRL_FRAME:
         {
-            if (part == PART_BORDER)
+            if( part == PART_BORDER )
             {
-                int size = kapp->style()->pixelMetric(QStyle::PM_DefaultFrameWidth);
-                //contentRect.adjust(size, size, size, size);
-                boundingRect.adjust(-size, -size, size, size);
+                int size = kapp->style()->pixelMetric(QStyle::PM_LayoutLeftMargin);
+                USHORT nStyle = val.getNumericVal();
+                if( nStyle & FRAME_DRAW_NODRAW )
+                {
+                    // in this case the question is: how thick would a frame be
+                    // see brdwin.cxx, decoview.cxx
+                    // most probably the behavior in decoview.cxx is wrong.
+                    contentRect.adjust(size, size, -size, -size);
+                }
                 retVal = true;
             }
-            
             break;
         }
         case CTRL_RADIOBUTTON:
diff --git a/vcl/unx/source/app/sm.cxx b/vcl/unx/source/app/sm.cxx
index 644e908..c5c25a4 100644
--- a/vcl/unx/source/app/sm.cxx
+++ b/vcl/unx/source/app/sm.cxx
@@ -48,6 +48,7 @@
 #include <saldisp.hxx>
 #include <salframe.h>
 #include <vcl/svapp.hxx>
+#include <vcl/window.hxx>
 #include <salinst.h>
 
 #include <osl/conditn.h>
@@ -187,6 +188,7 @@ bool SessionManagerClient::bDocSaveDone = false;
 static SmProp*	pSmProps = NULL;
 static SmProp**	ppSmProps = NULL;
 static int		nSmProps = 0;
+static unsigned char   *pSmRestartHint = NULL;
 
 
 static void BuildSmPropertyList()
@@ -195,7 +197,7 @@ static void BuildSmPropertyList()
     {
         ByteString aExec( SessionManagerClient::getExecName(), osl_getThreadTextEncoding() );
 
-        nSmProps = 4;
+        nSmProps = 5;
         pSmProps = new SmProp[ nSmProps ];
 
         pSmProps[ 0 ].name		= const_cast<char*>(SmCloneCommand);
@@ -243,6 +245,15 @@ static void BuildSmPropertyList()
         pSmProps[ 3 ].vals->value	= strdup( aUser.getStr() );
         pSmProps[ 3 ].vals->length	= strlen( (char *)pSmProps[ 3 ].vals->value )+1;
 
+        pSmProps[ 4 ].name		= const_cast<char*>(SmRestartStyleHint);
+        pSmProps[ 4 ].type		= const_cast<char*>(SmCARD8);
+        pSmProps[ 4 ].num_vals	= 1;
+        pSmProps[ 4 ].vals		= new SmPropValue;
+        pSmProps[ 4 ].vals->value	= malloc(1);
+        pSmRestartHint = (unsigned char *)pSmProps[ 4 ].vals->value;
+        *pSmRestartHint = SmRestartIfRunning;
+        pSmProps[ 4 ].vals->length	= 1;
+
         ppSmProps = new SmProp*[ nSmProps ];
         for( int i = 0; i < nSmProps; i++ )
             ppSmProps[ i ] = &pSmProps[i];
@@ -257,6 +268,31 @@ bool SessionManagerClient::checkDocumentsSaved()
 IMPL_STATIC_LINK( SessionManagerClient, SaveYourselfHdl, void*, EMPTYARG )
 {
     SMprintf( "posting save documents event shutdown = %s\n", (pThis!=0) ? "true" : "false" );
+
+    static bool bFirstShutdown=true;
+    if (pThis != 0 && bFirstShutdown) //first shutdown request
+    {
+        bFirstShutdown = false;
+        /*
+          If we have no actual frames open, e.g. we launched a quickstarter,
+          and then shutdown all our frames leaving just a quickstarter running,
+          then we don't want to launch an empty toplevel frame on the next 
+          start. (The job of scheduling the restart of the quick-starter is a 
+          task of the quick-starter)
+        */
+        *pSmRestartHint = SmRestartNever;
+        const std::list< SalFrame* >& rFrames = GetX11SalData()->GetDisplay()->getFrames();
+        for( std::list< SalFrame* >::const_iterator it = rFrames.begin(); it != rFrames.end(); ++it )
+        {
+            Window *pWindow = (*it)->GetWindow();
+            if (pWindow && pWindow->IsVisible())
+            {
+                *pSmRestartHint = SmRestartIfRunning;
+                break;
+            }
+        }
+    }
+
     if( pOneInstance )
     {
         SalSessionSaveRequestEvent aEvent( pThis != 0, false );
@@ -385,7 +421,7 @@ void SessionManagerClient::saveDone()
         ICEConnectionObserver::lock();
         SmcSetProperties( aSmcConnection, nSmProps, ppSmProps );
         SmcSaveYourselfDone( aSmcConnection, True );
-        SMprintf( "sent SaveYourselfDone\n" );
+        SMprintf( "sent SaveYourselfDone SmRestartHint of %d\n", *pSmRestartHint );
         bDocSaveDone = true;
         ICEConnectionObserver::unlock();
     }
diff --git a/vcl/unx/source/gdi/cdeint.cxx b/vcl/unx/source/gdi/cdeint.cxx
index 7091381..2222f40 100644
--- a/vcl/unx/source/gdi/cdeint.cxx
+++ b/vcl/unx/source/gdi/cdeint.cxx
@@ -216,6 +216,7 @@ void CDEIntegrator::GetSystemLook( AllSettings& rSettings )
 
         aStyleSettings.SetDialogTextColor( aDeactive );
         aStyleSettings.SetMenuTextColor( aDeactive );
+        aStyleSettings.SetMenuBarTextColor( aDeactive );
         aStyleSettings.SetButtonTextColor( aDeactive );
         aStyleSettings.SetRadioCheckTextColor( aDeactive );
         aStyleSettings.SetGroupTextColor( aDeactive );
diff --git a/vcl/unx/source/gdi/salgdi.cxx b/vcl/unx/source/gdi/salgdi.cxx
index 88ff949..abbf97e 100644
--- a/vcl/unx/source/gdi/salgdi.cxx
+++ b/vcl/unx/source/gdi/salgdi.cxx
@@ -1176,11 +1176,11 @@ typedef std::multiset< int, TrapezoidYCompare > VerticalTrapSet;
 } // end of anonymous namespace
 
 // draw a poly-polygon
-bool X11SalGraphics::drawPolyPolygon( const ::basegfx::B2DPolyPolygon& rPolyPoly, double fTransparency)
+bool X11SalGraphics::drawPolyPolygon( const ::basegfx::B2DPolyPolygon& rOrigPolyPoly, double fTransparency)
 {
     // nothing to do for empty polypolygons
-    const int nPolygonCount = rPolyPoly.count();
-    if( nPolygonCount <= 0 )
+    const int nOrigPolyCount = rOrigPolyPoly.count();
+    if( nOrigPolyCount <= 0 )
         return TRUE;
 
     // nothing to do if everything is transparent
@@ -1209,28 +1209,22 @@ bool X11SalGraphics::drawPolyPolygon( const ::basegfx::B2DPolyPolygon& rPolyPoly
 
     // don't bother with polygons outside of visible area
     const basegfx::B2DRange aViewRange( 0, 0, GetGraphicsWidth(), GetGraphicsHeight() );
-    const basegfx::B2DRange aPolyRange = basegfx::tools::getRange( rPolyPoly );
+    const basegfx::B2DRange aPolyRange = basegfx::tools::getRange( rOrigPolyPoly );
     const bool bNeedViewClip = !aPolyRange.isInside( aViewRange );
     if( !aPolyRange.overlaps( aViewRange ) )
         return true;
 
     // convert the polypolygon to trapezoids
 
-    // first convert the B2DPolyPolygon to HalfTrapezoids
-    // #i100922# try to prevent priority-queue reallocations by reservering enough
+    // prepare the polypolygon for the algorithm below:
+    // - clip it against the view range
+    // - make sure it contains no self-intersections
+    // while we are at it guess the number of involved polygon points
     int nHTQueueReserve = 0;
-    for( int nOuterPolyIdx = 0; nOuterPolyIdx < nPolygonCount; ++nOuterPolyIdx )
-    {
-        const ::basegfx::B2DPolygon aOuterPolygon = rPolyPoly.getB2DPolygon( nOuterPolyIdx );
-        const int nPointCount = aOuterPolygon.count();
-        nHTQueueReserve += aOuterPolygon.areControlPointsUsed() ? 8 * nPointCount : nPointCount;
-    }
-    nHTQueueReserve = ((4*nHTQueueReserve) | 0x1FFF) + 1;
-    HTQueue aHTQueue;
-    aHTQueue.reserve( nHTQueueReserve );
-    for( int nOuterPolyIdx = 0; nOuterPolyIdx < nPolygonCount; ++nOuterPolyIdx )
+    basegfx::B2DPolyPolygon aGoodPolyPoly;
+    for( int nOrigPolyIdx = 0; nOrigPolyIdx < nOrigPolyCount; ++nOrigPolyIdx )
     {
-        const ::basegfx::B2DPolygon aOuterPolygon = rPolyPoly.getB2DPolygon( nOuterPolyIdx );
+        const ::basegfx::B2DPolygon aOuterPolygon = rOrigPolyPoly.getB2DPolygon( nOrigPolyIdx );
 
         // render-trapezoids should be inside the view => clip polygon against view range
         basegfx::B2DPolyPolygon aClippedPolygon( aOuterPolygon );
@@ -1238,33 +1232,55 @@ bool X11SalGraphics::drawPolyPolygon( const ::basegfx::B2DPolyPolygon& rPolyPoly
         {
             aClippedPolygon = basegfx::tools::clipPolygonOnRange( aOuterPolygon, aViewRange, true, false );
             DBG_ASSERT( aClippedPolygon.count(), "polygon confirmed to overlap with view should not get here" );
-            if( !aClippedPolygon.count() )
-                continue;
         }
+        const int nClippedPolyCount = aClippedPolygon.count();
+        if( !nClippedPolyCount )
+            continue;
 
-        // render-trapezoids have linear edges => get rid of bezier segments
-        if( aClippedPolygon.areControlPointsUsed() )
-            aClippedPolygon = ::basegfx::tools::adaptiveSubdivideByDistance( aClippedPolygon, 0.125 );
-
-        // test and remove self intersections
-        // TODO: make code intersection save, then remove this test
-        basegfx::B2DPolyPolygon aInnerPolyPoly(basegfx::tools::solveCrossovers( aClippedPolygon));
-        const int nInnerPolyCount = aInnerPolyPoly.count();
-        for( int nInnerPolyIdx = 0; nInnerPolyIdx < nInnerPolyCount; ++nInnerPolyIdx )
+        // #i103259# polypoly.solveCrossover() fails to remove self-intersections
+        // but polygon.solveCrossover() works. Use it to build the intersection-free polypolygon
+        // TODO: if the self-intersection prevention is too expensive make the trap-algorithm tolerate intersections
+        for( int nClippedPolyIdx = 0; nClippedPolyIdx < nClippedPolyCount; ++nClippedPolyIdx )
         {
-            ::basegfx::B2DPolygon aInnerPolygon = aInnerPolyPoly.getB2DPolygon( nInnerPolyIdx );
-            const int nPointCount = aInnerPolygon.count();
-            if( !nPointCount )
-                continue;
+            ::basegfx::B2DPolygon aUnsolvedPolygon = aClippedPolygon.getB2DPolygon( nClippedPolyIdx );
+            basegfx::B2DPolyPolygon aSolvedPolyPoly( basegfx::tools::solveCrossovers( aUnsolvedPolygon) );
+            const int nSolvedPolyCount = aSolvedPolyPoly.count();
+            for( int nSolvedPolyIdx = 0; nSolvedPolyIdx < nSolvedPolyCount; ++nSolvedPolyIdx )
+            {
+                // build the intersection-free polypolygon one by one
+                const ::basegfx::B2DPolygon aSolvedPolygon = aSolvedPolyPoly.getB2DPolygon( nSolvedPolyIdx );
+                aGoodPolyPoly.append( aSolvedPolygon );
+                // and while we are at it use the conviently available point count to guess the number of needed half-traps
+                const int nPointCount = aSolvedPolygon.count();
+                nHTQueueReserve += aSolvedPolygon.areControlPointsUsed() ? 8 * nPointCount : nPointCount;
+            }
+        }
+    }
+    // #i100922# try to prevent priority-queue reallocations by reservering enough
+    nHTQueueReserve = ((4*nHTQueueReserve) | 0x1FFF) + 1;
+    HTQueue aHTQueue;
+    aHTQueue.reserve( nHTQueueReserve );
 
-            aHTQueue.reserve( aHTQueue.size() + 8 * nPointCount );
+    // first convert the B2DPolyPolygon to HalfTrapezoids
+    const int nGoodPolyCount = aGoodPolyPoly.count();
+    for( int nGoodPolyIdx = 0; nGoodPolyIdx < nGoodPolyCount; ++nGoodPolyIdx )
+    {
+        ::basegfx::B2DPolygon aInnerPolygon = aGoodPolyPoly.getB2DPolygon( nGoodPolyIdx );
+
+        // render-trapezoids have linear edges => get rid of bezier segments
+        if( aInnerPolygon.areControlPointsUsed() )
+            aInnerPolygon = ::basegfx::tools::adaptiveSubdivideByDistance( aInnerPolygon, 0.125 );
 
+        const int nPointCount = aInnerPolygon.count();
+        if( nPointCount >= 3 )
+        {
             // convert polygon point pairs to HalfTrapezoids
             // connect the polygon point with the first one if needed
             XPointFixed aOldXPF = { 0, 0 };
             XPointFixed aNewXPF;
             for( int nPointIdx = 0; nPointIdx <= nPointCount; ++nPointIdx, aOldXPF = aNewXPF )
             {
+                // auto-close the polygon if needed
                 const int k = (nPointIdx < nPointCount) ? nPointIdx : 0;
                 const ::basegfx::B2DPoint& aPoint = aInnerPolygon.getB2DPoint( k );
                 
@@ -1551,3 +1567,4 @@ bool X11SalGraphics::drawPolyLine(const ::basegfx::B2DPolygon& rPolygon, const :
 }
 
 // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+
diff --git a/vcl/unx/source/plugadapt/salplug.cxx b/vcl/unx/source/plugadapt/salplug.cxx
index 2bb07b2..836efdf 100644
--- a/vcl/unx/source/plugadapt/salplug.cxx
+++ b/vcl/unx/source/plugadapt/salplug.cxx
@@ -382,10 +382,10 @@ static const char * get_desktop_environment()
             
                 if ( is_kde4_desktop( pDisplay ) )
                     pRet = desktop_strings[DESKTOP_KDE4];
-                else if ( is_kde_desktop( pDisplay ) )
-                    pRet = desktop_strings[DESKTOP_KDE];
                 else if ( is_gnome_desktop( pDisplay ) )
                     pRet = desktop_strings[DESKTOP_GNOME];
+                else if ( is_kde_desktop( pDisplay ) )
+                    pRet = desktop_strings[DESKTOP_KDE];
                 else if ( is_cde_desktop( pDisplay ) )
                     pRet = desktop_strings[DESKTOP_CDE];
                 else
diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx
index 34ec682..4621b02 100644
--- a/vcl/win/source/window/salframe.cxx
+++ b/vcl/win/source/window/salframe.cxx
@@ -2930,6 +2930,7 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings )
         aStyleSettings.SetUseFlatBorders( FALSE );
         aStyleSettings.SetUseFlatMenues( FALSE );
         aStyleSettings.SetMenuTextColor( ImplWinColorToSal( GetSysColor( COLOR_MENUTEXT ) ) );
+        aStyleSettings.SetMenuBarTextColor( ImplWinColorToSal( GetSysColor( COLOR_MENUTEXT ) ) );
         aStyleSettings.SetActiveColor( ImplWinColorToSal( GetSysColor( COLOR_ACTIVECAPTION ) ) );
         aStyleSettings.SetActiveTextColor( ImplWinColorToSal( GetSysColor( COLOR_CAPTIONTEXT ) ) );
         aStyleSettings.SetDeactiveColor( ImplWinColorToSal( GetSysColor( COLOR_INACTIVECAPTION ) ) );
commit 9b57178e98e3e568841fc1514d5b7ac150a4d89f
Author: Oliver Bolte <obo at openoffice.org>
Date:   Tue Sep 8 08:54:47 2009 +0000

    CWS-TOOLING: integrate CWS dba32f
    2009-08-31 10:43:51 +0200 msc  r275590 : #no issuezilla available# make the testcase more error proof
    2009-08-31 10:43:28 +0200 msc  r275589 : #no issuezilla available# make the testcase more error proof
    2009-08-31 10:40:33 +0200 msc  r275588 : i85993 remove bugid
    2009-08-31 10:38:28 +0200 msc  r275587 : i100000
    2009-08-27 13:27:32 +0200 fs  r275476 : #i103882#
    2009-08-27 12:47:54 +0200 fs  r275474 : #i104544#
    do not allow re-entrance for impl_ensureControl_nothrow
    Actually, this is part of the fix only. I also removed the code which triggered this re-entrance (from
    the grid control implementation), but to ensure it won't happen, again, I added some safety herein.
    2009-08-27 12:47:16 +0200 fs  r275473 : #i104544# SetState: Do not call Update at the window which we just set text for. It should (sic\!) not be needed, but causes trouble
    2009-08-27 10:18:05 +0200 mav  r275461 : #i103266# do not allow any stream operation on package streams while commiting the package
    2009-08-20 15:25:48 +0200 fs  r275184 : #i104362# fall back to a ViewObjectContactOfSdrObj in case we don't have a page view
    2009-08-20 15:25:06 +0200 fs  r275183 : AUGMENT_LIBRARY_PATH
    2009-08-20 15:10:34 +0200 fs  r275182 : AUGMENT_LIBRARY_PATH
    2009-08-20 09:50:36 +0200 oj  r275167 : #i104266# notify propertyforward when new dest was created
    2009-08-19 08:01:28 +0200 mav  r275133 : #i103266# fix the typo
    2009-08-18 22:45:34 +0200 fs  r275131 : #i10000#
    2009-08-18 13:53:07 +0200 oj  r275105 : #i104266# set column settings after alter columns
    2009-08-18 13:41:49 +0200 fs  r275103 : #i102550# do not interpret names of existing data sources as system path
    2009-08-18 13:13:05 +0200 oj  r275097 : #i103882# use correct number Format
    2009-08-18 12:59:13 +0200 fs  r275094 : #i104181#
    2009-08-18 09:07:48 +0200 fs  r275079 : updated readme to refer to proper 1.1.14
    2009-08-18 08:32:31 +0200 oj  r275077 : #i104187# wrong default for FirstCellAsLabel corrected
    2009-08-18 08:10:00 +0200 oj  r275076 : #i104187# dispose status controller to avoid access of dead statusBar in sfx
    2009-08-17 21:56:19 +0200 fs  r275074 : merge fix for issue #102564# from dba32e
    2009-08-17 15:34:40 +0200 fs  r275058 : don't set MaxFieldSize to 0 unconditionally
    2009-08-17 14:33:57 +0200 oj  r275054 : #i103528# patch for bitxtor
    2009-08-17 14:12:26 +0200 oj  r275051 : #i104160# fix VerticalAlignment
    2009-08-17 14:11:47 +0200 oj  r275050 : #i104160# fix VerticalAlignment
    2009-08-14 15:54:04 +0200 mav  r274989 : #i103266# avoid possibility for race condition
    2009-08-13 13:52:43 +0200 fs  r274939 : improved diagnostics
    2009-08-13 13:52:28 +0200 fs  r274938 : typo
    2009-08-13 12:51:03 +0200 fs  r274934 : #i103763# provided by cloph: correct libIDL check when compiling Mozilla
    2009-08-13 12:43:23 +0200 fs  r274933 : #i103763# provided by cloph: allow to cross-compile prebuilt zips on Mac
    2009-08-13 12:41:15 +0200 fs  r274932 : #i103371# fire PREPARECLOSEDOC even for embedded objects (why not?)
    2009-08-13 12:24:49 +0200 fs  r274930 : #i99890# remove 'Insert Control' from the popup menu
    2009-08-13 12:23:38 +0200 fs  r274929 : #i99890# DoToolboxAction: assert unknown/unimplemented actions
    2009-08-13 09:32:07 +0200 fs  r274923 : #i103721#
    2009-08-13 09:26:32 +0200 fs  r274922 : #i99894# provided by dtardon: xforms_nowFunction: use proper memory allocation function
    2009-08-13 09:20:21 +0200 fs  r274921 : #i103938# provided by cmc: pass proper arguments to OUString::intern
    2009-08-12 22:34:28 +0200 fs  r274916 : #i104139# when executing a PopupMenu, pass the POPUPMENU_NOMOUSEUPCLOSE flag

diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx
index be9ec19..eb76402 100644
--- a/svtools/source/dialogs/addresstemplate.cxx
+++ b/svtools/source/dialogs/addresstemplate.cxx
@@ -97,6 +97,22 @@ namespace svt
     DECLARE_STL_VECTOR( String, StringArray );
     DECLARE_STL_STDKEY_SET( ::rtl::OUString, StringBag );
     DECLARE_STL_USTRINGACCESS_MAP( ::rtl::OUString, MapString2String );
+
+    namespace
+    {
+        String lcl_getSelectedDataSource( const ComboBox& _dataSourceCombo )
+        {
+            String selectedDataSource = _dataSourceCombo.GetText();
+            if ( _dataSourceCombo.GetEntryPos( selectedDataSource ) == LISTBOX_ENTRY_NOTFOUND )
+            {
+                // none of the pre-selected entries -> assume a path to a database document
+                OFileNotation aFileNotation( selectedDataSource, OFileNotation::N_SYSTEM );
+                selectedDataSource = aFileNotation.get( OFileNotation::N_URL );
+            }
+            return selectedDataSource;
+        }
+    }
+
     // ===================================================================
     // = IAssigmentData
     // ===================================================================
@@ -857,9 +873,7 @@ public:
             Reference< XCompletedConnection > xDS;
             if ( m_pImpl->bWorkingPersistent )
             {
-                String sSelectedDS = m_aDatasource.GetText();
-                OFileNotation aFileNotation( sSelectedDS ,OFileNotation::N_SYSTEM);
-                sSelectedDS = aFileNotation.get(OFileNotation::N_URL);
+                String sSelectedDS = lcl_getSelectedDataSource(  m_aDatasource );
                 
                 // get the data source the user has chosen and let it build a connection
                 INetURLObject aURL( sSelectedDS );
@@ -1179,9 +1193,7 @@ public:
     // -------------------------------------------------------------------
     IMPL_LINK(AddressBookSourceDialog, OnOkClicked, Button*, EMPTYARG)
     {
-        String sSelectedDS = m_aDatasource.GetText();
-        OFileNotation aFileNotation( sSelectedDS ,OFileNotation::N_SYSTEM);
-        sSelectedDS = aFileNotation.get(OFileNotation::N_URL);
+        String sSelectedDS = lcl_getSelectedDataSource(  m_aDatasource );
         if ( m_pImpl->bWorkingPersistent )
         {
             m_pImpl->pConfigData->setDatasourceName(sSelectedDS);
@@ -1231,7 +1243,6 @@ public:
                 Reference<XPropertySet> xProp(xAdminDialog,UNO_QUERY);
                 if ( xProp.is() )
                 {
-                    String sOldDS = m_aDatasource.GetText();
                     ::rtl::OUString sName;
                     xProp->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DataSourceName"))) >>= sName;
                     
diff --git a/toolkit/source/awt/vclxmenu.cxx b/toolkit/source/awt/vclxmenu.cxx
index 87ef99f..9a68e74 100644
--- a/toolkit/source/awt/vclxmenu.cxx
+++ b/toolkit/source/awt/vclxmenu.cxx
@@ -578,7 +578,7 @@ sal_Int16 VCLXMenu::execute( const ::com::sun::star::uno::Reference< ::com::sun:
 
     sal_Int16 nRet = 0;
     if ( mpMenu && IsPopupMenu() )
-        nRet = ((PopupMenu*)mpMenu)->Execute( VCLUnoHelper::GetWindow( rxWindowPeer ), VCLRectangle(rArea), nFlags );
+        nRet = ((PopupMenu*)mpMenu)->Execute( VCLUnoHelper::GetWindow( rxWindowPeer ), VCLRectangle(rArea), nFlags | POPUPMENU_NOMOUSEUPCLOSE );
     return nRet;
 }
 
commit 09b4450b12d35e71a01b9591f873e991d16d6097
Author: Oliver Bolte <obo at openoffice.org>
Date:   Tue Sep 8 04:57:32 2009 +0000

    CWS-TOOLING: integrate CWS oj18
    2009-08-21 15:08:49 +0200 oj  r275263 : wrong check
    2009-08-21 08:56:01 +0200 oj  r275215 : missing not
    2009-08-20 07:27:13 +0200 oj  r275164 : use new method from global
    2009-08-19 10:22:35 +0200 oj  r275138 : call GetLocale instead of pLocale
    2009-08-18 10:39:32 +0200 oj  r275082 : missing header include
    2009-08-18 10:09:44 +0200 oj  r275081 : new methods at global
    2009-08-18 10:09:00 +0200 oj  r275080 : unused var
    2009-08-18 08:59:04 +0200 oj  r275078 : move files from classes to xml
    2009-08-17 14:58:16 +0200 oj  r275056 : CWS-TOOLING: rebase CWS oj18 to trunk at 275001 (milestone: DEV300:m55)
    2009-08-17 13:29:44 +0200 oj  r275047 : compile error
    2009-08-17 13:27:47 +0200 oj  r275045 : compile error
    2009-08-17 11:44:54 +0200 oj  r275040 : add dep
    2009-07-22 14:26:05 +0200 oj  r274240 : move unused services into fwl
    2009-07-22 14:25:35 +0200 oj  r274239 : move unused services into fwl
    2009-07-22 13:47:45 +0200 oj  r274233 : remove some unused code
    2009-07-22 09:06:20 +0200 oj  r274219 : export dbtoolsclient dbcharsethelper for sc
    2009-07-22 08:48:58 +0200 oj  r274218 : create NumberFormatter on demand
    2009-07-22 08:39:23 +0200 oj  r274217 : change char to sal_Char
    2009-07-22 07:33:34 +0200 oj  r274214 : export dbtoolsclient dbcharsethelper for sc
    2009-07-22 07:30:04 +0200 oj  r274213 : late init of numberformatter and breakiterator
    2009-07-22 07:28:55 +0200 oj  r274212 : export dbtoolsclient dbcharsethelper for sc
    2009-07-21 13:43:28 +0200 oj  r274196 : check if quick start is enbaled
    2009-07-21 13:40:09 +0200 oj  r274195 : check config entry for UiEventsLogger
    2009-07-21 13:37:40 +0200 oj  r274194 : code refactoring, remove of duplicate code and some late inits and removale of not needed files
    2009-07-21 13:35:38 +0200 oj  r274193 : code refactoring, remove of duplicate code and some late inits and removale of not needed files
    2009-07-21 13:33:41 +0200 oj  r274192 : doc meta data will now be created on demand
    2009-07-21 13:13:40 +0200 oj  r274187 : load ldap functions on demand
    2009-07-21 13:03:17 +0200 oj  r274183 : late init of TransliterationImpl
    2009-07-21 12:36:10 +0200 oj  r274180 : late init of charClass

diff --git a/comphelper/source/misc/uieventslogger.cxx b/comphelper/source/misc/uieventslogger.cxx
index 6734f81..2a109db 100644
--- a/comphelper/source/misc/uieventslogger.cxx
+++ b/comphelper/source/misc/uieventslogger.cxx
@@ -218,11 +218,15 @@ namespace comphelper
     // public UiEventsLogger interface
     sal_Bool UiEventsLogger::isEnabled()
     {
-        try {
-            UiEventsLogger_Impl::prepareMutex();
-            Guard<Mutex> singleton_guard(UiEventsLogger_Impl::singleton_mutex);
-            return UiEventsLogger_Impl::getInstance()->m_Active;
-        } catch(...) { return false; } // never throws
+        if ( UiEventsLogger_Impl::getEnabledFromCfg() )
+        {
+            try {
+                UiEventsLogger_Impl::prepareMutex();
+                Guard<Mutex> singleton_guard(UiEventsLogger_Impl::singleton_mutex);
+                return UiEventsLogger_Impl::getInstance()->m_Active;
+            } catch(...) { return false; } // never throws
+        } // if ( )
+        return sal_False;
     }
 
     sal_Int32 UiEventsLogger::getSessionLogEventCount()
diff --git a/i18npool/inc/defaultnumberingprovider.hxx b/i18npool/inc/defaultnumberingprovider.hxx
index 7255ffb..355e083 100644
--- a/i18npool/inc/defaultnumberingprovider.hxx
+++ b/i18npool/inc/defaultnumberingprovider.hxx
@@ -53,6 +53,7 @@ class DefaultNumberingProvider : public cppu::WeakImplHelper4
     void GetCharStrN( sal_Int32 nValue, sal_Int16 nType, rtl::OUString& rStr ) const;
     void GetCharStr( sal_Int32 nValue, sal_Int16 nType, rtl::OUString& rStr ) const;
     void GetRomanString( sal_Int32 nValue, sal_Int16 nType, rtl::OUString& rStr ) const;
+    void impl_loadTranslit();
 public:
     DefaultNumberingProvider(
         const com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory >& xMSF );
diff --git a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
index cc9c30f..82ae543 100644
--- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
+++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
@@ -195,9 +195,9 @@ static sal_Unicode lowerLetter[] = {
     0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A 
 };
 
-DefaultNumberingProvider::DefaultNumberingProvider( const Reference < XMultiServiceFactory >& xMSF ) : xSMgr(xMSF)
+DefaultNumberingProvider::DefaultNumberingProvider( const Reference < XMultiServiceFactory >& xMSF ) : xSMgr(xMSF),translit(NULL)
 {
-        translit = new TransliterationImpl(xMSF);
+        
 }
 
 DefaultNumberingProvider::~DefaultNumberingProvider()
@@ -205,6 +205,12 @@ DefaultNumberingProvider::~DefaultNumberingProvider()
         delete translit;
 }
 
+void DefaultNumberingProvider::impl_loadTranslit()
+{
+    if ( !translit )
+        translit = new TransliterationImpl(xSMgr);
+}
+
 Sequence< Reference<container::XIndexAccess> >
 DefaultNumberingProvider::getDefaultOutlineNumberings(const Locale& rLocale ) throw(RuntimeException)
 {
@@ -468,6 +474,7 @@ DefaultNumberingProvider::makeNumberingString( const Sequence<beans::PropertyVal
                     const OUString &tmp = OUString::valueOf( number );
                     OUString transliteration;
                     getPropertyByName(aProperties, "Transliteration", sal_True) >>= transliteration;
+                    impl_loadTranslit();
                     translit->loadModuleByImplName(transliteration, aLocale);
                     result += translit->transliterateString2String(tmp, 0, tmp.getLength());
                } catch (Exception& ) {
diff --git a/svtools/source/syslocale/syslocale.cxx b/svtools/source/syslocale/syslocale.cxx
index ecd8712..77dcd2e 100644
--- a/svtools/source/syslocale/syslocale.cxx
+++ b/svtools/source/syslocale/syslocale.cxx
@@ -66,18 +66,18 @@ public:
 
     virtual void                Notify( SvtBroadcaster& rBC, const SfxHint& rHint );
 
+    CharClass*                  GetCharClass();
+
 };
 
 
 // -----------------------------------------------------------------------
 
-SvtSysLocale_Impl::SvtSysLocale_Impl()
+SvtSysLocale_Impl::SvtSysLocale_Impl() : pCharClass(NULL)
 {
     const lang::Locale& rLocale = Application::GetSettings().GetLocale();
     pLocaleData = new LocaleDataWrapper(
         ::comphelper::getProcessServiceFactory(), rLocale );
-    pCharClass = new CharClass(
-        ::comphelper::getProcessServiceFactory(), rLocale );
     aSysLocaleOptions.AddListener( *this );
 }
 
@@ -89,7 +89,15 @@ SvtSysLocale_Impl::~SvtSysLocale_Impl()
     delete pLocaleData;
 }
 
-
+CharClass* SvtSysLocale_Impl::GetCharClass()
+{
+    if ( !pCharClass )
+    {
+        const lang::Locale& rLocale = Application::GetSettings().GetLocale();
+        pCharClass = new CharClass(::comphelper::getProcessServiceFactory(), rLocale );
+    }
+    return pCharClass;
+}
 void SvtSysLocale_Impl::Notify( SvtBroadcaster&, const SfxHint& rHint )
 {
     const SfxSimpleHint* p = PTR_CAST( SfxSimpleHint, &rHint );
@@ -98,7 +106,7 @@ void SvtSysLocale_Impl::Notify( SvtBroadcaster&, const SfxHint& rHint )
         MutexGuard aGuard( SvtSysLocale::GetMutex() );
         const lang::Locale& rLocale = Application::GetSettings().GetLocale();
         pLocaleData->setLocale( rLocale );
-        pCharClass->setLocale( rLocale );
+        GetCharClass()->setLocale( rLocale );
     }
 }
 
@@ -158,11 +166,11 @@ const LocaleDataWrapper* SvtSysLocale::GetLocaleDataPtr() const
 
 const CharClass& SvtSysLocale::GetCharClass() const
 {
-    return *(pImpl->pCharClass);
+    return *(pImpl->GetCharClass());
 }
 
 
 const CharClass* SvtSysLocale::GetCharClassPtr() const
 {
-    return pImpl->pCharClass;
+    return pImpl->GetCharClass();
 }


More information about the ooo-build-commit mailing list