[ooo-build-commit] .: 4 commits - patches/dev300

Jan Holesovsky kendy at kemper.freedesktop.org
Tue May 11 18:56:28 PDT 2010


 patches/dev300/apply                                       |   19 
 patches/dev300/kde4-border-frame.diff                      |   13 
 patches/dev300/toolbar-decorations-fix-new-table.diff      |  643 -----------
 patches/dev300/toolbar-decorations-rsc.diff                |   61 +
 patches/dev300/toolbar-decorations-svx-tables-columns.diff |  738 +++++++++++++
 patches/dev300/toolbar-decorations-svx.diff                |  179 +++
 patches/dev300/toolbar-decorations-vcl-nwf.diff            |   40 
 patches/dev300/toolbar-decorations-vcl.diff                |  277 ++++
 8 files changed, 1323 insertions(+), 647 deletions(-)

New commits:
commit e3f309806ee9fae66c432249de417f0a8388a173
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Wed May 12 03:55:49 2010 +0200

    Only one section owner allowed...
    
    * patches/dev300/apply: Fix.

diff --git a/patches/dev300/apply b/patches/dev300/apply
index f50fa9e..2014765 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -3935,7 +3935,7 @@ skip-empty-links-in-pdf.diff, bnc#598816, tml
 cws-impressmedia01-pptin.diff, i#83753, thorsten
 
 [ Toolbars ]
-SectionOwner => cbosdo, jholesov
+SectionOwner => jholesov
 
 # Improved toolbar popups
 toolbar-decorations-rsc.diff
@@ -3946,7 +3946,7 @@ toolbar-decorations-svx.diff
 toolbar-decorations-svx-tables-columns.diff
 
 # The proof-of-concept
-#toolbar-decorations-fix.diff
+#toolbar-decorations-fix.diff, cbosdo
 # Not too well looking, but might be useful?
 #toolbar-decorations-vcl-nwf.diff
 
commit a01167cbe69f385e63a68a2c83dbba6ff26f4e12
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Wed May 12 03:45:40 2010 +0200

    Updated the 'New table' widget to the new look of the toolbars.
    
    * patches/dev300/apply: Update.
    * patches/dev300/toolbar-decorations-fix-new-table.diff: Remove.
    * patches/dev300/toolbar-decorations-svx-tables-columns.diff: New.
    * patches/dev300/toolbar-decorations-vcl.diff: Small update of the condition
      when the popup title is shown.

diff --git a/patches/dev300/apply b/patches/dev300/apply
index 90a4573..f50fa9e 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -3942,8 +3942,8 @@ toolbar-decorations-rsc.diff
 toolbar-decorations-vcl.diff
 toolbar-decorations-svx.diff
 
-# 'New table' toolbar widget rework
-#toolbar-decorations-fix-new-table.diff, jholesov
+# 'New table' toolbar widget rework, and a small update of the 'Colums' widget
+toolbar-decorations-svx-tables-columns.diff
 
 # The proof-of-concept
 #toolbar-decorations-fix.diff
diff --git a/patches/dev300/toolbar-decorations-fix-new-table.diff b/patches/dev300/toolbar-decorations-fix-new-table.diff
deleted file mode 100644
index 1e02b7f..0000000
--- a/patches/dev300/toolbar-decorations-fix-new-table.diff
+++ /dev/null
@@ -1,643 +0,0 @@
-diff --git svx/source/tbxctrls/layctrl.cxx svx/source/tbxctrls/layctrl.cxx
-index 27b8bfd..956a768 100644
---- svx/source/tbxctrls/layctrl.cxx
-+++ svx/source/tbxctrls/layctrl.cxx
-@@ -32,9 +32,7 @@
- 
- #include <string> // HACK: prevent conflict between STLPORT and Workshop headers
- #include <vcl/toolbox.hxx>
--#ifndef _SV_BUTTON_HXX //autogen
- #include <vcl/button.hxx>
--#endif
- #include <svtools/intitem.hxx>
- #include <sfx2/dispatch.hxx>
- #include <sfx2/app.hxx>
-@@ -56,27 +54,36 @@ SFX_IMPL_TOOLBOX_CONTROL(SvxColumnsToolBoxControl,SfxUInt16Item);
- 
- // class TableWindow -----------------------------------------------------
- 
-+const long TABLE_CELL_WIDTH  = 15;
-+const long TABLE_CELL_HEIGHT = 15;
-+
-+const long TABLE_CELLS_HORIZ = 10;
-+const long TABLE_CELLS_VERT  = 15;
-+
-+const long TABLE_POS_X = 2;
-+const long TABLE_POS_Y = 18;
-+
-+const long TABLE_WIDTH  = TABLE_POS_X + TABLE_CELLS_HORIZ*TABLE_CELL_WIDTH;
-+const long TABLE_HEIGHT = TABLE_POS_Y + TABLE_CELLS_VERT*TABLE_CELL_HEIGHT;
-+
- class TableWindow : public SfxPopupWindow
- {
- private:
-+    FixedText*          aTitleTxt;
-+    PushButton*         aTableButton;
-     ::Color			    aLineColor;
--    ::Color			    aHighlightLineColor;
-     ::Color			    aFillColor;
-     ::Color			    aHighlightFillColor;
-+    ::Color			    aBackgroundColor;
-     long                nCol;
-     long                nLine;
--    long                nWidth;
--    long                nHeight;
--    long                nMX;
--    long                nMY;
--    long                nTextHeight;
-     BOOL                bInitialKeyInput;
-     BOOL                m_bMod1;
-     ToolBox&            rTbx;
-     Reference< XFrame > mxFrame;
-     rtl::OUString       maCommand;
- 
--    void UpdateSize_Impl( long nNewCol, long nNewLine);
-+    DECL_LINK( SelectHdl, void * );
- 
- public:
-                             TableWindow( USHORT                     nSlotId,
-@@ -87,20 +94,31 @@ public:
- 
-     void                    KeyInput( const KeyEvent& rKEvt );
-     virtual void            MouseMove( const MouseEvent& rMEvt );
--    virtual void			MouseButtonDown( const MouseEvent& rMEvt );
-     virtual void			MouseButtonUp( const MouseEvent& rMEvt );
-     virtual void    		Paint( const Rectangle& );
--    virtual void    		PopupModeEnd();
-     virtual SfxPopupWindow*	Clone() const;
- 
--    USHORT          		GetColCount() const { return (USHORT)nCol; }
--    USHORT          		GetLineCount() const { return (USHORT)nLine; }
-+private:
-+    void    				Update( long nNewCol, long nNewLine );
-+    void    				TableDialog( const Sequence< PropertyValue >& rArgs );
-+    void    				CloseAndCreateTable( bool bSucess );
-+    void    				CloseAndShowTableDialog();
- };
- 
- // -----------------------------------------------------------------------
- 
-+IMPL_LINK( TableWindow, SelectHdl, void *, EMPTYARG )
-+{
-+    CloseAndShowTableDialog();
-+    return NULL;
-+}
-+
-+// -----------------------------------------------------------------------
-+
- TableWindow::TableWindow( USHORT nSlotId, const rtl::OUString& rCmd, ToolBox& rParentTbx, const Reference< XFrame >& rFrame ) :
-     SfxPopupWindow( nSlotId, rFrame, WB_SYSTEMWINDOW ),
-+    nCol( 0 ),
-+    nLine( 0 ),
-     bInitialKeyInput(TRUE),
-     m_bMod1(FALSE),
-     rTbx(rParentTbx),
-@@ -109,33 +127,45 @@ TableWindow::TableWindow( USHORT nSlotId, const rtl::OUString& rCmd, ToolBox& rP
- {
-     const StyleSettings& rStyles = Application::GetSettings().GetStyleSettings();
-     svtools::ColorConfig aColorConfig;
--    aLineColor = ::Color( aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor );
--    aHighlightLineColor = rStyles.GetHighlightTextColor();
-+
-+    aLineColor = rStyles.GetShadowColor();
-     aFillColor = rStyles.GetWindowColor();
-     aHighlightFillColor = rStyles.GetHighlightColor();
-+    aBackgroundColor = GetSettings().GetStyleSettings().GetFaceColor();
- 
--    nTextHeight = GetTextHeight()+1;
--    SetBackground();
-+    SetBackground( aBackgroundColor );
-     Font aFont = GetFont();
--    aFont.SetColor( aLineColor );
--    aFont.SetFillColor( aFillColor );
-+    aFont.SetColor( ::Color( aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor )  );
-+    aFont.SetFillColor( aBackgroundColor );
-     aFont.SetTransparent( FALSE );
-     SetFont( aFont );
- 
--    nCol    = 0;
--    nLine   = 0;
--    nWidth  = 5;
--    nHeight = 5;
--
--    Size aLogicSize = LogicToPixel( Size( 55, 35 ), MapMode( MAP_10TH_MM ) );
--    nMX = aLogicSize.Width();
--    nMY = aLogicSize.Height();
--    SetOutputSizePixel( Size( nMX*nWidth-1, nMY*nHeight-1+nTextHeight ) );
-+    aTitleTxt = new FixedText( this );
-+    aTitleTxt->SetPosPixel( Point( 2, 2 ) );
-+    aTitleTxt->SetSizePixel( Size( 106, 15 ) );
-+    aTitleTxt->SetText( String( SVX_RESSTR( RID_SVXSTR_TABLE ) ) );
-+    aFont = aTitleTxt->GetFont();
-+    aFont.SetWeight( WEIGHT_BOLD );
-+    aTitleTxt->SetFont( aFont );
-+    aTitleTxt->SetBackground( GetBackground() );
-+    aTitleTxt->Show();
-+
-+    aTableButton = new PushButton( this );
-+    aTableButton->SetPosPixel( Point( TABLE_POS_X + TABLE_CELL_WIDTH, TABLE_HEIGHT + 5 ) );
-+    aTableButton->SetSizePixel( Size( TABLE_WIDTH - TABLE_POS_X - 2*TABLE_CELL_WIDTH, 24 ) );
-+    aTableButton->SetText( String( SVX_RESSTR( RID_SVXSTR_MORE ) ) );
-+    aTableButton->SetClickHdl( LINK( this, TableWindow, SelectHdl ) );
-+    aTableButton->Show();
-+
-+    SetOutputSizePixel( Size( TABLE_WIDTH + 3, TABLE_HEIGHT + 33 ) );
- }
-+
- // -----------------------------------------------------------------------
-+
- TableWindow::~TableWindow()
- {
- }
-+
- // -----------------------------------------------------------------------
- 
- SfxPopupWindow* TableWindow::Clone() const
-@@ -151,164 +181,64 @@ void TableWindow::MouseMove( const MouseEvent& rMEvt )
-     Point aPos = rMEvt.GetPosPixel();
-     Point aMousePos( aPos );
- 
--    if ( rMEvt.IsEnterWindow() )
--        CaptureMouse();
--    else if ( aMousePos.X() < 0 || aMousePos.Y() < 0 )
--    {
--        nCol = 0;
--        nLine = 0;
--        ReleaseMouse();
--        Invalidate();
--        return;
--    }
--
--    long    nNewCol = 0;
--    long    nNewLine = 0;
--
--    if ( aPos.X() > 0 )
--        nNewCol = aPos.X() / nMX + 1;
--    if ( aPos.Y() > 0 )
--        nNewLine = aPos.Y() / nMY + 1;
--
--    if ( nNewCol > 500 )
--        nNewCol = 500;
--    if ( nNewLine > 1000 )
--        nNewLine = 1000;
--
--    UpdateSize_Impl( nNewCol, nNewLine);
-+    long nNewCol = ( aMousePos.X() - TABLE_POS_X + TABLE_CELL_WIDTH ) / TABLE_CELL_WIDTH;
-+    long nNewLine = ( aMousePos.Y() - TABLE_POS_Y + TABLE_CELL_HEIGHT ) / TABLE_CELL_HEIGHT;
- 
-+    Update( nNewCol, nNewLine );
- }
--/* -----------------------------15.05.2002 17:14------------------------------
--
-- ---------------------------------------------------------------------------*/
--void TableWindow::UpdateSize_Impl( long nNewCol, long nNewLine)
--{
--    Size  aWinSize = GetOutputSizePixel();
--    Point aWinPos = GetPosPixel();
--    Point aMaxPos = OutputToScreenPixel( GetDesktopRectPixel().BottomRight() );
--    if ( (nWidth <= nNewCol) || (nHeight < nNewLine) )
--    {
--        long    nOff = 0;
--
--        if ( nWidth <= nNewCol )
--        {
--            nWidth = nNewCol;
--            nWidth++;
--        }
--        if ( nHeight <= nNewLine )
--        {
--            nHeight = nNewLine;
--            nOff = 1;
--        }
--        while ( nWidth > 0 &&
--                (short)(aWinPos.X()+(nMX*nWidth-1)) >= aMaxPos.X()-3 )
--            nWidth--;
--
--        while ( nHeight > 0 &&
--                (short)(aWinPos.Y()+(nMY*nHeight-1+nTextHeight)) >=
--                aMaxPos.Y()-3 )
--            nHeight--;
--
--        if ( nNewCol > nWidth )
--            nNewCol = nWidth;
--
--        if ( nNewLine > nHeight )
--            nNewLine = nHeight;
--
--        Size    _aWinSize = GetOutputSizePixel();
--        Invalidate( Rectangle( 0, _aWinSize.Height()-nTextHeight+2-nOff,
--                               _aWinSize.Width(), _aWinSize.Height() ) );
--        SetOutputSizePixel( Size( nMX*nWidth-1, nMY*nHeight-1+nTextHeight ) );
--    }
--    long    nMinCol = 0;
--    long    nMaxCol = 0;
--    long    nMinLine = 0;
--    long    nMaxLine = 0;
--    if ( nNewCol < nCol )
--    {
--        nMinCol = nNewCol;
--        nMaxCol = nCol;
--    }
--    else
--    {
--        nMinCol = nCol;
--        nMaxCol = nNewCol;
--    }
--    if ( nNewLine < nLine )
--    {
--        nMinLine = nNewLine;
--        nMaxLine = nLine;
--    }
--    else
--    {
--        nMinLine = nLine;
--        nMaxLine = nNewLine;
--    }
--
--    if ( (nNewCol != nCol) || (nNewLine != nLine) )
--    {
--        Invalidate( Rectangle( 0, aWinSize.Height()-nTextHeight+2,
--                               aWinSize.Width(), aWinSize.Height() ) );
- 
--        if ( nNewCol != nCol )
--        {
--            Invalidate( Rectangle( nMinCol*nMX-1, 0, nMaxCol*nMX+1, nMaxLine*nMY ) );
--            nCol  = nNewCol;
--        }
--        if ( nNewLine != nLine )
--        {
--            Invalidate( Rectangle( 0, nMinLine*nMY-2, nMaxCol*nMX, nMaxLine*nMY+1 ) );
--            nLine = nNewLine;
--        }
--    }
--    Update();
--}
--/* -----------------------------15.05.2002 14:22------------------------------
-+// -----------------------------------------------------------------------
- 
-- ---------------------------------------------------------------------------*/
- void TableWindow::KeyInput( const KeyEvent& rKEvt )
- {
--    BOOL bHandled = FALSE;
-+    bool bHandled = false;
-     USHORT nModifier = rKEvt.GetKeyCode().GetModifier();
-     USHORT nKey = rKEvt.GetKeyCode().GetCode();
--    if(!nModifier)
-+    if ( !nModifier )
-     {
--        if( KEY_UP == nKey || KEY_DOWN == nKey ||
--            KEY_LEFT == nKey || KEY_RIGHT == nKey ||
--            KEY_ESCAPE == nKey ||KEY_RETURN == nKey )
-+        bHandled = true;
-+        long nNewCol = nCol;
-+        long nNewLine = nLine;
-+        switch(nKey)
-         {
--            bHandled = TRUE;
--            long nNewCol = nCol;
--            long nNewLine = nLine;
--            switch(nKey)
--            {
--                case KEY_UP :
--                    if(nNewLine > 1)
--                    {
--                        nNewLine--;
--                        break;
--                    }
--                //no break;
--                case KEY_ESCAPE:
--                    EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL);
-+            case KEY_UP:
-+                if ( nNewLine > 1 )
-+                    nNewLine--;
-+                else
-+                    CloseAndCreateTable( false );
-                 break;
--                case KEY_DOWN :
-+            case KEY_DOWN:
-+                if ( nNewLine < TABLE_CELLS_VERT )
-                     nNewLine++;
-+                else
-+                    CloseAndShowTableDialog();
-                 break;
--                case KEY_LEFT :
--
--                    if(nNewCol)
--                        nNewCol--;
-+            case KEY_LEFT:
-+                if ( nNewCol > 1 )
-+                    nNewCol--;
-+                else
-+                    CloseAndCreateTable( false );
-                 break;
--                case KEY_RIGHT :
-+            case KEY_RIGHT:
-+                if ( nNewCol < TABLE_CELLS_HORIZ )
-                     nNewCol++;
-+                else
-+                    CloseAndShowTableDialog();
-                 break;
--                case KEY_RETURN :
--                    if(IsMouseCaptured())
--                        ReleaseMouse();
--                    EndPopupMode(FLOATWIN_POPUPMODEEND_CLOSEALL );
-+            case KEY_ESCAPE:
-+                CloseAndCreateTable( false );
-                 break;
--            }
-+            case KEY_RETURN:
-+                CloseAndCreateTable( true );
-+                break;
-+            case KEY_TAB:
-+                CloseAndShowTableDialog();
-+                break;
-+            default:
-+                bHandled = false;
-+        }
-+        if ( bHandled )
-+        {
-             //make sure that a table can initially be created
-             if(bInitialKeyInput)
-             {
-@@ -318,27 +248,17 @@ void TableWindow::KeyInput( const KeyEvent& rKEvt )
-                 if(!nNewCol)
-                     nNewCol = 1;
-             }
--            UpdateSize_Impl( nNewCol, nNewLine);
-+            Update( nNewCol, nNewLine );
-         }
-     }
-     else if(KEY_MOD1 == nModifier && KEY_RETURN == nKey)
-     {
-         m_bMod1 = TRUE;
--        if(IsMouseCaptured())
--            ReleaseMouse();
--        EndPopupMode(FLOATWIN_POPUPMODEEND_CLOSEALL );
-+        CloseAndCreateTable( true );
-     }
- 
-     if(!bHandled)
-         SfxPopupWindow::KeyInput(rKEvt);
--
--}
--// -----------------------------------------------------------------------
--
--void TableWindow::MouseButtonDown( const MouseEvent& rMEvt )
--{
--    SfxPopupWindow::MouseButtonDown( rMEvt );
--    CaptureMouse();
- }
- 
- // -----------------------------------------------------------------------
-@@ -346,56 +266,45 @@ void TableWindow::MouseButtonDown( const MouseEvent& rMEvt )
- void TableWindow::MouseButtonUp( const MouseEvent& rMEvt )
- {
-     SfxPopupWindow::MouseButtonUp( rMEvt );
--    ReleaseMouse();
--
--    if ( IsInPopupMode() )
--        EndPopupMode( FLOATWIN_POPUPMODEEND_CLOSEALL );
-+    CloseAndCreateTable( true );
- }
- 
- // -----------------------------------------------------------------------
- 
- void TableWindow::Paint( const Rectangle& )
- {
--    long    i;
--    long    nStart;
--    Size    aSize = GetOutputSizePixel();
-+    const long nSelectionWidth = TABLE_POS_X + nCol*TABLE_CELL_WIDTH;
-+    const long nSelectionHeight = TABLE_POS_Y + nLine*TABLE_CELL_HEIGHT;
- 
--    SetLineColor();
--    SetFillColor( aHighlightFillColor );
--    DrawRect( Rectangle( 0, 0, nCol*nMX-1, nLine*nMY-1 ) );
--    SetFillColor( aFillColor );
--    DrawRect( Rectangle( nCol*nMX-1, 0,
--                         aSize.Width(), aSize.Height()-nTextHeight+1 ) );
--    DrawRect( Rectangle( 0, nLine*nMY-1,
--                         aSize.Width(), aSize.Height()-nTextHeight+1 ) );
--
--    SetLineColor( aHighlightLineColor );
--    for ( i = 1; i < nCol; i++ )
--        DrawLine( Point( i*nMX-1, 0 ), Point( i*nMX-1, nLine*nMY-1 ) );
--    for ( i = 1; i < nLine; i++ )
--        DrawLine( Point( 0, i*nMY-1 ), Point( nCol*nMX-1, i*nMY-1 ) );
-+    // the non-selected parts of the table
-     SetLineColor( aLineColor );
--    for ( i = 1; i <= nWidth; i++ )
--    {
--        if ( i < nCol )
--            nStart = nLine*nMY-1;
--        else
--            nStart = 0;
--        DrawLine( Point( i*nMX-1, nStart ), Point( i*nMX-1, nHeight*nMY-1 ) );
--    }
--    for ( i = 1; i <= nHeight; i++ )
-+    SetFillColor( aFillColor );
-+    DrawRect( Rectangle( nSelectionWidth, TABLE_POS_Y, TABLE_WIDTH, nSelectionHeight ) );
-+    DrawRect( Rectangle( TABLE_POS_X, nSelectionHeight, nSelectionWidth, TABLE_HEIGHT ) );
-+    DrawRect( Rectangle( nSelectionWidth, nSelectionHeight, TABLE_WIDTH, TABLE_HEIGHT ) );
-+
-+    // the selection
-+    if ( nCol > 0 && nLine > 0 )
-     {
--        if ( i < nLine )
--            nStart = nCol*nMX-1;
--        else
--            nStart = 0;
--        DrawLine( Point( nStart, i*nMY-1 ), Point( nWidth*nMX-1, i*nMY-1 ) );
-+        SetFillColor( aHighlightFillColor );
-+        DrawRect( Rectangle( TABLE_POS_X, TABLE_POS_Y,
-+                    nSelectionWidth, nSelectionHeight ) );
-     }
- 
--    SetLineColor();
--    String aText;
-+    // lines inside of the table
-+    SetLineColor( aLineColor );
-+    for ( long i = 1; i < TABLE_CELLS_VERT; ++i )
-+        DrawLine( Point( TABLE_POS_X, TABLE_POS_Y + i*TABLE_CELL_HEIGHT ),
-+                  Point( TABLE_WIDTH, TABLE_POS_Y + i*TABLE_CELL_HEIGHT ) );
-+
-+    for ( long i = 1; i < TABLE_CELLS_HORIZ; ++i )
-+        DrawLine( Point( TABLE_POS_X + i*TABLE_CELL_WIDTH, TABLE_POS_Y ),
-+                  Point( TABLE_POS_X + i*TABLE_CELL_WIDTH, TABLE_HEIGHT ) );
-+
-+    // the text near the mouse cursor telling the table dimensions
-     if ( nCol && nLine )
-     {
-+        String aText;
-         aText += String::CreateFromInt32( nCol );
-         aText.AppendAscii( " x " );
-         aText += String::CreateFromInt32( nLine );
-@@ -405,61 +314,107 @@ void TableWindow::Paint( const Rectangle& )
-             aText += String(SVX_RESSTR(RID_SVXSTR_PAGES));
-         }
- 
-+        Size aSize = GetOutputSizePixel();
-+        Size aTextSize( GetTextWidth( aText ), GetTextHeight() );
-+
-+        long nTextX = nSelectionWidth + TABLE_CELL_WIDTH;
-+        long nTextY = nSelectionHeight + TABLE_CELL_HEIGHT;
-+        const long nTipBorder = 2;
-+
-+        if ( aTextSize.Width() + TABLE_POS_X + TABLE_CELL_WIDTH + 2*nTipBorder < nSelectionWidth )
-+            nTextX = nSelectionWidth - TABLE_CELL_WIDTH - aTextSize.Width();
-+
-+        if ( aTextSize.Height() + TABLE_POS_Y + TABLE_CELL_HEIGHT + 2*nTipBorder < nSelectionHeight )
-+            nTextY = nSelectionHeight - TABLE_CELL_HEIGHT - aTextSize.Height();
-+
-+        SetLineColor( aLineColor );
-+        SetFillColor( aBackgroundColor );
-+        DrawRect( Rectangle ( nTextX - 2*nTipBorder, nTextY - 2*nTipBorder,
-+                    nTextX + aTextSize.Width() + nTipBorder, nTextY + aTextSize.Height() + nTipBorder ) );
-+
-+        // #i95350# force RTL output
-+        if ( IsRTLEnabled() )
-+            aText.Insert( 0x202D, 0 );
-+
-+        DrawText( Point( nTextX, nTextY ), aText );
-     }
--    else
--        aText = Button::GetStandardText( BUTTON_CANCEL );
--    Size aTextSize( GetTextWidth( aText ), GetTextHeight() );
-+}
- 
--    Rectangle aClearRect( 0, aSize.Height()-nTextHeight+2, (aSize.Width()), aSize.Height() );
--    DrawRect( aClearRect );
-+// -----------------------------------------------------------------------
-+
-+void TableWindow::Update( long nNewCol, long nNewLine )
-+{
-+    if ( nNewCol < 0 || nNewCol > TABLE_CELLS_HORIZ )
-+        nNewCol = 0;
- 
--    // #i95350# force RTL output
--    if( IsRTLEnabled() && 	nCol && nLine )
--        aText.Insert(0x202D, 0);
--    DrawText( Point( (aSize.Width() - aTextSize.Width()) / 2, aSize.Height() - nTextHeight + 2 ), aText );
-+    if ( nNewLine < 0 || nNewLine > TABLE_CELLS_VERT )
-+        nNewLine = 0;
- 
--    SetLineColor( aLineColor );
--    SetFillColor();
--    DrawRect( Rectangle( Point(0,0), aSize ) );
-+    if ( nNewCol != nCol || nNewLine != nLine )
-+    {
-+        nCol = nNewCol;
-+        nLine = nNewLine;
-+        Invalidate( Rectangle( TABLE_POS_X, TABLE_POS_Y, TABLE_WIDTH, TABLE_HEIGHT ) );
-+    }
- }
- 
- // -----------------------------------------------------------------------
- 
--void TableWindow::PopupModeEnd()
-+void TableWindow::TableDialog( const Sequence< PropertyValue >& rArgs )
- {
--    if ( !IsPopupModeCanceled() && nCol && nLine )
-+    Window* pParent = rTbx.GetParent();
-+    USHORT nId = GetId();
-+    pParent->UserEvent(SVX_EVENT_COLUM_WINDOW_EXECUTE, reinterpret_cast<void*>(nId));
-+
-+    Reference< XDispatchProvider > xDispatchProvider( mxFrame, UNO_QUERY );
-+    if ( xDispatchProvider.is() )
-     {
--        Window* pParent = rTbx.GetParent();
--        USHORT nId = GetId();
--        pParent->UserEvent(SVX_EVENT_COLUM_WINDOW_EXECUTE, reinterpret_cast<void*>(nId));
-+        com::sun::star::util::URL aTargetURL;
-+        Reference < XURLTransformer > xTrans( ::comphelper::getProcessServiceFactory()->createInstance(
-+                    rtl::OUString::createFromAscii("com.sun.star.util.URLTransformer" )),
-+                UNO_QUERY );
-+        aTargetURL.Complete = maCommand;
-+        xTrans->parseStrict( aTargetURL );
-+
-+        Reference< XDispatch > xDispatch = xDispatchProvider->queryDispatch( aTargetURL, rtl::OUString(), 0 );
-+        if ( xDispatch.is() )
-+            xDispatch->dispatch( aTargetURL, rArgs );
-+    }
-+}
- 
--        Reference< XDispatchProvider > xDispatchProvider( mxFrame, UNO_QUERY );
--        if ( xDispatchProvider.is() )
--        {
--            com::sun::star::util::URL aTargetURL;
--            Reference < XURLTransformer > xTrans( ::comphelper::getProcessServiceFactory()->createInstance(
--                                                    rtl::OUString::createFromAscii("com.sun.star.util.URLTransformer" )),
--                                                  UNO_QUERY );
--            aTargetURL.Complete = maCommand;
--            xTrans->parseStrict( aTargetURL );
--            Reference< XDispatch > xDispatch = xDispatchProvider->queryDispatch( aTargetURL, rtl::OUString(), 0 );
--            if ( xDispatch.is() )
--            {
--                Sequence< PropertyValue > aArgs( 2 );
--                aArgs[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Columns" ));
--                aArgs[0].Value = makeAny( sal_Int16( nCol ));
--                aArgs[1].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Rows" ));
--                aArgs[1].Value = makeAny( sal_Int16( nLine ));
-+// -----------------------------------------------------------------------
- 
--                xDispatch->dispatch( aTargetURL, aArgs );
--            }
--        }
-+void TableWindow::CloseAndCreateTable( bool bCreate )
-+{
-+    if ( !GetDockingManager()->IsInPopupMode( this ) )
-+        return;
-+
-+    if ( bCreate && nCol && nLine )
-+    {
-+        Sequence< PropertyValue > aArgs( 2 );
-+        aArgs[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Columns" ));
-+        aArgs[0].Value = makeAny( sal_Int16( nCol ));
-+        aArgs[1].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Rows" ));
-+        aArgs[1].Value = makeAny( sal_Int16( nLine ));
-+
-+        TableDialog( aArgs );
-     }
--    else if ( IsPopupModeCanceled() )
--        ReleaseMouse();
--    SfxPopupWindow::PopupModeEnd();
-+    
-+    GetDockingManager()->EndPopupMode( this );
-+    doLazyDelete();
- }
- 
-+// -----------------------------------------------------------------------
-+
-+void TableWindow::CloseAndShowTableDialog()
-+{
-+    // close the toolbar tool
-+    CloseAndCreateTable( false );
-+
-+    // and open the table dialog instead
-+    TableDialog( Sequence< PropertyValue >() );
-+}
-+    
- // class ColumnsWindow ---------------------------------------------------
- 
- class ColumnsWindow : public SfxPopupWindow
-@@ -735,7 +690,8 @@ void ColumnsWindow::Paint( const Rectangle& )
-     if ( nCol )
-         aText = String( String::CreateFromInt32(nCol) );
-     else
--        aText = Button::GetStandardText( BUTTON_CANCEL );
-+        aText = Button::GetStandardText( BUTTON_CANCEL ).EraseAllChars( '~' );
-+
-     Size aTextSize(GetTextWidth( aText ), GetTextHeight());
-     DrawText( Point( ( aSize.Width() - aTextSize.Width() ) / 2, aSize.Height() - nTextHeight + 2 ), aText );
- 
-@@ -803,8 +759,8 @@ SfxPopupWindow* SvxTableToolBoxControl::CreatePopupWindow()
-     {
-         ToolBox& rTbx = GetToolBox();
-         TableWindow* pWin = new TableWindow( GetSlotId(), m_aCommandURL, rTbx, m_xFrame );
--        pWin->StartPopupMode( &rTbx, FLOATWIN_POPUPMODE_GRABFOCUS|FLOATWIN_POPUPMODE_NOKEYCLOSE );
--        SetPopupWindow( pWin );
-+        pWin->EnableDocking(true);
-+        pWin->GetDockingManager()->StartPopupMode(&GetToolBox(),pWin);
-         return pWin;
-     }
-     return 0;
diff --git a/patches/dev300/toolbar-decorations-svx-tables-columns.diff b/patches/dev300/toolbar-decorations-svx-tables-columns.diff
new file mode 100644
index 0000000..d2789cc
--- /dev/null
+++ b/patches/dev300/toolbar-decorations-svx-tables-columns.diff
@@ -0,0 +1,738 @@
+diff --git svx/source/tbxctrls/layctrl.cxx svx/source/tbxctrls/layctrl.cxx
+index 27b8bfd..b4eb85d 100644
+--- svx/source/tbxctrls/layctrl.cxx
++++ svx/source/tbxctrls/layctrl.cxx
+@@ -32,9 +32,7 @@
+ 
+ #include <string> // HACK: prevent conflict between STLPORT and Workshop headers
+ #include <vcl/toolbox.hxx>
+-#ifndef _SV_BUTTON_HXX //autogen
+ #include <vcl/button.hxx>
+-#endif
+ #include <svtools/intitem.hxx>
+ #include <sfx2/dispatch.hxx>
+ #include <sfx2/app.hxx>
+@@ -56,51 +54,72 @@ SFX_IMPL_TOOLBOX_CONTROL(SvxColumnsToolBoxControl,SfxUInt16Item);
+ 
+ // class TableWindow -----------------------------------------------------
+ 
++const long TABLE_CELL_WIDTH  = 15;
++const long TABLE_CELL_HEIGHT = 15;
++
++const long TABLE_CELLS_HORIZ = 10;
++const long TABLE_CELLS_VERT  = 15;
++
++const long TABLE_POS_X = 2;
++const long TABLE_POS_Y = 2;
++
++const long TABLE_WIDTH  = TABLE_POS_X + TABLE_CELLS_HORIZ*TABLE_CELL_WIDTH;
++const long TABLE_HEIGHT = TABLE_POS_Y + TABLE_CELLS_VERT*TABLE_CELL_HEIGHT;
++
+ class TableWindow : public SfxPopupWindow
+ {
+ private:
++    PushButton          aTableButton;
+     ::Color			    aLineColor;
+-    ::Color			    aHighlightLineColor;
+     ::Color			    aFillColor;
+     ::Color			    aHighlightFillColor;
++    ::Color			    aBackgroundColor;
+     long                nCol;
+     long                nLine;
+-    long                nWidth;
+-    long                nHeight;
+-    long                nMX;
+-    long                nMY;
+-    long                nTextHeight;
+     BOOL                bInitialKeyInput;
+     BOOL                m_bMod1;
+     ToolBox&            rTbx;
+     Reference< XFrame > mxFrame;
+     rtl::OUString       maCommand;
+ 
+-    void UpdateSize_Impl( long nNewCol, long nNewLine);
++    DECL_LINK( SelectHdl, void * );
+ 
+ public:
+                             TableWindow( USHORT                     nSlotId,
+                                          const rtl::OUString&       rCmd,
++                                         const String&              rText,
+                                          ToolBox&                   rParentTbx,
+                                          const Reference< XFrame >& rFrame );
+                             ~TableWindow();
+ 
+     void                    KeyInput( const KeyEvent& rKEvt );
+     virtual void            MouseMove( const MouseEvent& rMEvt );
+-    virtual void			MouseButtonDown( const MouseEvent& rMEvt );
+     virtual void			MouseButtonUp( const MouseEvent& rMEvt );
+     virtual void    		Paint( const Rectangle& );
+     virtual void    		PopupModeEnd();
+     virtual SfxPopupWindow*	Clone() const;
+ 
+-    USHORT          		GetColCount() const { return (USHORT)nCol; }
+-    USHORT          		GetLineCount() const { return (USHORT)nLine; }
++private:
++    void    				Update( long nNewCol, long nNewLine );
++    void    				TableDialog( const Sequence< PropertyValue >& rArgs );
++    void    				CloseAndShowTableDialog();
+ };
+ 
+ // -----------------------------------------------------------------------
+ 
+-TableWindow::TableWindow( USHORT nSlotId, const rtl::OUString& rCmd, ToolBox& rParentTbx, const Reference< XFrame >& rFrame ) :
+-    SfxPopupWindow( nSlotId, rFrame, WB_SYSTEMWINDOW ),
++IMPL_LINK( TableWindow, SelectHdl, void *, EMPTYARG )
++{
++    CloseAndShowTableDialog();
++    return NULL;
++}
++
++// -----------------------------------------------------------------------
++
++TableWindow::TableWindow( USHORT nSlotId, const rtl::OUString& rCmd, const String& rText, ToolBox& rParentTbx, const Reference< XFrame >& rFrame ) :
++    SfxPopupWindow( nSlotId, rFrame, WinBits( WB_STDPOPUP ) ),
++    aTableButton( this ),
++    nCol( 0 ),
++    nLine( 0 ),
+     bInitialKeyInput(TRUE),
+     m_bMod1(FALSE),
+     rTbx(rParentTbx),
+@@ -109,38 +128,41 @@ TableWindow::TableWindow( USHORT nSlotId, const rtl::OUString& rCmd, ToolBox& rP
+ {
+     const StyleSettings& rStyles = Application::GetSettings().GetStyleSettings();
+     svtools::ColorConfig aColorConfig;
+-    aLineColor = ::Color( aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor );
+-    aHighlightLineColor = rStyles.GetHighlightTextColor();
++
++    aLineColor = rStyles.GetShadowColor();
+     aFillColor = rStyles.GetWindowColor();
+     aHighlightFillColor = rStyles.GetHighlightColor();
++    aBackgroundColor = GetSettings().GetStyleSettings().GetFaceColor();
+ 
+-    nTextHeight = GetTextHeight()+1;
+-    SetBackground();
++    SetBackground( aBackgroundColor );
+     Font aFont = GetFont();
+-    aFont.SetColor( aLineColor );
+-    aFont.SetFillColor( aFillColor );
++    aFont.SetColor( ::Color( aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor )  );
++    aFont.SetFillColor( aBackgroundColor );
+     aFont.SetTransparent( FALSE );
+     SetFont( aFont );
+ 
+-    nCol    = 0;
+-    nLine   = 0;
+-    nWidth  = 5;
+-    nHeight = 5;
++    SetText( rText );
+ 
+-    Size aLogicSize = LogicToPixel( Size( 55, 35 ), MapMode( MAP_10TH_MM ) );
+-    nMX = aLogicSize.Width();
+-    nMY = aLogicSize.Height();
+-    SetOutputSizePixel( Size( nMX*nWidth-1, nMY*nHeight-1+nTextHeight ) );
++    aTableButton.SetPosSizePixel( Point( TABLE_POS_X + TABLE_CELL_WIDTH, TABLE_HEIGHT + 5 ),
++            Size( TABLE_WIDTH - TABLE_POS_X - 2*TABLE_CELL_WIDTH, 24 ) );
++    aTableButton.SetText( String( SVX_RESSTR( RID_SVXSTR_MORE ) ) );
++    aTableButton.SetClickHdl( LINK( this, TableWindow, SelectHdl ) );
++    aTableButton.Show();
++
++    SetOutputSizePixel( Size( TABLE_WIDTH + 3, TABLE_HEIGHT + 33 ) );
+ }
++
+ // -----------------------------------------------------------------------
++
+ TableWindow::~TableWindow()
+ {
+ }
++
+ // -----------------------------------------------------------------------
+ 
+ SfxPopupWindow* TableWindow::Clone() const
+ {
+-    return new TableWindow( GetId(), maCommand, rTbx, mxFrame );
++    return new TableWindow( GetId(), maCommand, GetText(), rTbx, mxFrame );
+ }
+ 
+ // -----------------------------------------------------------------------
+@@ -151,164 +173,64 @@ void TableWindow::MouseMove( const MouseEvent& rMEvt )
+     Point aPos = rMEvt.GetPosPixel();
+     Point aMousePos( aPos );
+ 
+-    if ( rMEvt.IsEnterWindow() )
+-        CaptureMouse();
+-    else if ( aMousePos.X() < 0 || aMousePos.Y() < 0 )
+-    {
+-        nCol = 0;
+-        nLine = 0;
+-        ReleaseMouse();
+-        Invalidate();
+-        return;
+-    }
+-
+-    long    nNewCol = 0;
+-    long    nNewLine = 0;
+-
+-    if ( aPos.X() > 0 )
+-        nNewCol = aPos.X() / nMX + 1;
+-    if ( aPos.Y() > 0 )
+-        nNewLine = aPos.Y() / nMY + 1;
+-
+-    if ( nNewCol > 500 )
+-        nNewCol = 500;
+-    if ( nNewLine > 1000 )
+-        nNewLine = 1000;
+-
+-    UpdateSize_Impl( nNewCol, nNewLine);
++    long nNewCol = ( aMousePos.X() - TABLE_POS_X + TABLE_CELL_WIDTH ) / TABLE_CELL_WIDTH;
++    long nNewLine = ( aMousePos.Y() - TABLE_POS_Y + TABLE_CELL_HEIGHT ) / TABLE_CELL_HEIGHT;
+ 
++    Update( nNewCol, nNewLine );
+ }
+-/* -----------------------------15.05.2002 17:14------------------------------
+ 
+- ---------------------------------------------------------------------------*/
+-void TableWindow::UpdateSize_Impl( long nNewCol, long nNewLine)
+-{
+-    Size  aWinSize = GetOutputSizePixel();
+-    Point aWinPos = GetPosPixel();
+-    Point aMaxPos = OutputToScreenPixel( GetDesktopRectPixel().BottomRight() );
+-    if ( (nWidth <= nNewCol) || (nHeight < nNewLine) )
+-    {
+-        long    nOff = 0;
+-
+-        if ( nWidth <= nNewCol )
+-        {
+-            nWidth = nNewCol;
+-            nWidth++;
+-        }
+-        if ( nHeight <= nNewLine )
+-        {
+-            nHeight = nNewLine;
+-            nOff = 1;
+-        }
+-        while ( nWidth > 0 &&
+-                (short)(aWinPos.X()+(nMX*nWidth-1)) >= aMaxPos.X()-3 )
+-            nWidth--;
+-
+-        while ( nHeight > 0 &&
+-                (short)(aWinPos.Y()+(nMY*nHeight-1+nTextHeight)) >=
+-                aMaxPos.Y()-3 )
+-            nHeight--;
+-
+-        if ( nNewCol > nWidth )
+-            nNewCol = nWidth;
+-
+-        if ( nNewLine > nHeight )
+-            nNewLine = nHeight;
+-
+-        Size    _aWinSize = GetOutputSizePixel();
+-        Invalidate( Rectangle( 0, _aWinSize.Height()-nTextHeight+2-nOff,
+-                               _aWinSize.Width(), _aWinSize.Height() ) );
+-        SetOutputSizePixel( Size( nMX*nWidth-1, nMY*nHeight-1+nTextHeight ) );
+-    }
+-    long    nMinCol = 0;
+-    long    nMaxCol = 0;
+-    long    nMinLine = 0;
+-    long    nMaxLine = 0;
+-    if ( nNewCol < nCol )
+-    {
+-        nMinCol = nNewCol;
+-        nMaxCol = nCol;
+-    }
+-    else
+-    {
+-        nMinCol = nCol;
+-        nMaxCol = nNewCol;
+-    }
+-    if ( nNewLine < nLine )
+-    {
+-        nMinLine = nNewLine;
+-        nMaxLine = nLine;
+-    }
+-    else
+-    {
+-        nMinLine = nLine;
+-        nMaxLine = nNewLine;
+-    }
+-
+-    if ( (nNewCol != nCol) || (nNewLine != nLine) )
+-    {
+-        Invalidate( Rectangle( 0, aWinSize.Height()-nTextHeight+2,
+-                               aWinSize.Width(), aWinSize.Height() ) );
+-
+-        if ( nNewCol != nCol )
+-        {
+-            Invalidate( Rectangle( nMinCol*nMX-1, 0, nMaxCol*nMX+1, nMaxLine*nMY ) );
+-            nCol  = nNewCol;
+-        }
+-        if ( nNewLine != nLine )
+-        {
+-            Invalidate( Rectangle( 0, nMinLine*nMY-2, nMaxCol*nMX, nMaxLine*nMY+1 ) );
+-            nLine = nNewLine;
+-        }
+-    }
+-    Update();
+-}
+-/* -----------------------------15.05.2002 14:22------------------------------
++// -----------------------------------------------------------------------
+ 
+- ---------------------------------------------------------------------------*/
+ void TableWindow::KeyInput( const KeyEvent& rKEvt )
+ {
+-    BOOL bHandled = FALSE;
++    bool bHandled = false;
+     USHORT nModifier = rKEvt.GetKeyCode().GetModifier();
+     USHORT nKey = rKEvt.GetKeyCode().GetCode();
+-    if(!nModifier)
++    if ( !nModifier )
+     {
+-        if( KEY_UP == nKey || KEY_DOWN == nKey ||
+-            KEY_LEFT == nKey || KEY_RIGHT == nKey ||
+-            KEY_ESCAPE == nKey ||KEY_RETURN == nKey )
++        bHandled = true;
++        long nNewCol = nCol;
++        long nNewLine = nLine;
++        switch(nKey)
+         {
+-            bHandled = TRUE;
+-            long nNewCol = nCol;
+-            long nNewLine = nLine;
+-            switch(nKey)
+-            {
+-                case KEY_UP :
+-                    if(nNewLine > 1)
+-                    {
+-                        nNewLine--;
+-                        break;
+-                    }
+-                //no break;
+-                case KEY_ESCAPE:
+-                    EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL);
++            case KEY_UP:
++                if ( nNewLine > 1 )
++                    nNewLine--;
++                else
++                    EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL );
+                 break;
+-                case KEY_DOWN :
++            case KEY_DOWN:
++                if ( nNewLine < TABLE_CELLS_VERT )
+                     nNewLine++;
++                else
++                    CloseAndShowTableDialog();
+                 break;
+-                case KEY_LEFT :
+-
+-                    if(nNewCol)
+-                        nNewCol--;
++            case KEY_LEFT:
++                if ( nNewCol > 1 )
++                    nNewCol--;
++                else
++                    EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL );
+                 break;
+-                case KEY_RIGHT :
++            case KEY_RIGHT:
++                if ( nNewCol < TABLE_CELLS_HORIZ )
+                     nNewCol++;
++                else
++                    CloseAndShowTableDialog();
+                 break;
+-                case KEY_RETURN :
+-                    if(IsMouseCaptured())
+-                        ReleaseMouse();
+-                    EndPopupMode(FLOATWIN_POPUPMODEEND_CLOSEALL );
++            case KEY_ESCAPE:
++                EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL );
+                 break;
+-            }
++            case KEY_RETURN:
++                EndPopupMode( FLOATWIN_POPUPMODEEND_CLOSEALL );
++                break;
++            case KEY_TAB:
++                CloseAndShowTableDialog();
++                break;
++            default:
++                bHandled = false;
++        }
++        if ( bHandled )
++        {
+             //make sure that a table can initially be created
+             if(bInitialKeyInput)
+             {
+@@ -318,27 +240,17 @@ void TableWindow::KeyInput( const KeyEvent& rKEvt )
+                 if(!nNewCol)
+                     nNewCol = 1;
+             }
+-            UpdateSize_Impl( nNewCol, nNewLine);
++            Update( nNewCol, nNewLine );
+         }
+     }
+     else if(KEY_MOD1 == nModifier && KEY_RETURN == nKey)
+     {
+         m_bMod1 = TRUE;
+-        if(IsMouseCaptured())
+-            ReleaseMouse();
+-        EndPopupMode(FLOATWIN_POPUPMODEEND_CLOSEALL );
++        EndPopupMode( FLOATWIN_POPUPMODEEND_CLOSEALL );
+     }
+ 
+     if(!bHandled)
+         SfxPopupWindow::KeyInput(rKEvt);
+-
+-}
+-// -----------------------------------------------------------------------
+-
+-void TableWindow::MouseButtonDown( const MouseEvent& rMEvt )
+-{
+-    SfxPopupWindow::MouseButtonDown( rMEvt );
+-    CaptureMouse();
+ }
+ 
+ // -----------------------------------------------------------------------
+@@ -346,56 +258,45 @@ void TableWindow::MouseButtonDown( const MouseEvent& rMEvt )
+ void TableWindow::MouseButtonUp( const MouseEvent& rMEvt )
+ {
+     SfxPopupWindow::MouseButtonUp( rMEvt );
+-    ReleaseMouse();
+-
+-    if ( IsInPopupMode() )
+-        EndPopupMode( FLOATWIN_POPUPMODEEND_CLOSEALL );
++    EndPopupMode( FLOATWIN_POPUPMODEEND_CLOSEALL );
+ }
+ 
+ // -----------------------------------------------------------------------
+ 
+ void TableWindow::Paint( const Rectangle& )
+ {
+-    long    i;
+-    long    nStart;
+-    Size    aSize = GetOutputSizePixel();
++    const long nSelectionWidth = TABLE_POS_X + nCol*TABLE_CELL_WIDTH;
++    const long nSelectionHeight = TABLE_POS_Y + nLine*TABLE_CELL_HEIGHT;
+ 
+-    SetLineColor();
+-    SetFillColor( aHighlightFillColor );
+-    DrawRect( Rectangle( 0, 0, nCol*nMX-1, nLine*nMY-1 ) );
+-    SetFillColor( aFillColor );
+-    DrawRect( Rectangle( nCol*nMX-1, 0,
+-                         aSize.Width(), aSize.Height()-nTextHeight+1 ) );
+-    DrawRect( Rectangle( 0, nLine*nMY-1,
+-                         aSize.Width(), aSize.Height()-nTextHeight+1 ) );
+-
+-    SetLineColor( aHighlightLineColor );
+-    for ( i = 1; i < nCol; i++ )
+-        DrawLine( Point( i*nMX-1, 0 ), Point( i*nMX-1, nLine*nMY-1 ) );
+-    for ( i = 1; i < nLine; i++ )
+-        DrawLine( Point( 0, i*nMY-1 ), Point( nCol*nMX-1, i*nMY-1 ) );
++    // the non-selected parts of the table
+     SetLineColor( aLineColor );
+-    for ( i = 1; i <= nWidth; i++ )
+-    {
+-        if ( i < nCol )
+-            nStart = nLine*nMY-1;
+-        else
+-            nStart = 0;
+-        DrawLine( Point( i*nMX-1, nStart ), Point( i*nMX-1, nHeight*nMY-1 ) );
+-    }
+-    for ( i = 1; i <= nHeight; i++ )
++    SetFillColor( aFillColor );
++    DrawRect( Rectangle( nSelectionWidth, TABLE_POS_Y, TABLE_WIDTH, nSelectionHeight ) );
++    DrawRect( Rectangle( TABLE_POS_X, nSelectionHeight, nSelectionWidth, TABLE_HEIGHT ) );
++    DrawRect( Rectangle( nSelectionWidth, nSelectionHeight, TABLE_WIDTH, TABLE_HEIGHT ) );
++
++    // the selection
++    if ( nCol > 0 && nLine > 0 )
+     {
+-        if ( i < nLine )
+-            nStart = nCol*nMX-1;
+-        else
+-            nStart = 0;
+-        DrawLine( Point( nStart, i*nMY-1 ), Point( nWidth*nMX-1, i*nMY-1 ) );
++        SetFillColor( aHighlightFillColor );
++        DrawRect( Rectangle( TABLE_POS_X, TABLE_POS_Y,
++                    nSelectionWidth, nSelectionHeight ) );
+     }
+ 
+-    SetLineColor();
+-    String aText;
++    // lines inside of the table
++    SetLineColor( aLineColor );
++    for ( long i = 1; i < TABLE_CELLS_VERT; ++i )
++        DrawLine( Point( TABLE_POS_X, TABLE_POS_Y + i*TABLE_CELL_HEIGHT ),
++                  Point( TABLE_WIDTH, TABLE_POS_Y + i*TABLE_CELL_HEIGHT ) );
++
++    for ( long i = 1; i < TABLE_CELLS_HORIZ; ++i )
++        DrawLine( Point( TABLE_POS_X + i*TABLE_CELL_WIDTH, TABLE_POS_Y ),
++                  Point( TABLE_POS_X + i*TABLE_CELL_WIDTH, TABLE_HEIGHT ) );
++
++    // the text near the mouse cursor telling the table dimensions
+     if ( nCol && nLine )
+     {
++        String aText;
+         aText += String::CreateFromInt32( nCol );
+         aText.AppendAscii( " x " );
+         aText += String::CreateFromInt32( nLine );
+@@ -405,22 +306,30 @@ void TableWindow::Paint( const Rectangle& )
+             aText += String(SVX_RESSTR(RID_SVXSTR_PAGES));
+         }
+ 
+-    }
+-    else
+-        aText = Button::GetStandardText( BUTTON_CANCEL );
+-    Size aTextSize( GetTextWidth( aText ), GetTextHeight() );
++        Size aSize = GetOutputSizePixel();
++        Size aTextSize( GetTextWidth( aText ), GetTextHeight() );
+ 
+-    Rectangle aClearRect( 0, aSize.Height()-nTextHeight+2, (aSize.Width()), aSize.Height() );
+-    DrawRect( aClearRect );
++        long nTextX = nSelectionWidth + TABLE_CELL_WIDTH;
++        long nTextY = nSelectionHeight + TABLE_CELL_HEIGHT;
++        const long nTipBorder = 2;
+ 
+-    // #i95350# force RTL output
+-    if( IsRTLEnabled() && 	nCol && nLine )
+-        aText.Insert(0x202D, 0);
+-    DrawText( Point( (aSize.Width() - aTextSize.Width()) / 2, aSize.Height() - nTextHeight + 2 ), aText );
++        if ( aTextSize.Width() + TABLE_POS_X + TABLE_CELL_WIDTH + 2*nTipBorder < nSelectionWidth )
++            nTextX = nSelectionWidth - TABLE_CELL_WIDTH - aTextSize.Width();
+ 
+-    SetLineColor( aLineColor );
+-    SetFillColor();
+-    DrawRect( Rectangle( Point(0,0), aSize ) );
++        if ( aTextSize.Height() + TABLE_POS_Y + TABLE_CELL_HEIGHT + 2*nTipBorder < nSelectionHeight )
++            nTextY = nSelectionHeight - TABLE_CELL_HEIGHT - aTextSize.Height();
++
++        SetLineColor( aLineColor );
++        SetFillColor( aBackgroundColor );
++        DrawRect( Rectangle ( nTextX - 2*nTipBorder, nTextY - 2*nTipBorder,
++                    nTextX + aTextSize.Width() + nTipBorder, nTextY + aTextSize.Height() + nTipBorder ) );
++
++        // #i95350# force RTL output
++        if ( IsRTLEnabled() )
++            aText.Insert( 0x202D, 0 );
++
++        DrawText( Point( nTextX, nTextY ), aText );
++    }
+ }
+ 
+ // -----------------------------------------------------------------------
+@@ -429,37 +338,71 @@ void TableWindow::PopupModeEnd()
+ {
+     if ( !IsPopupModeCanceled() && nCol && nLine )
+     {
+-        Window* pParent = rTbx.GetParent();
+-        USHORT nId = GetId();
+-        pParent->UserEvent(SVX_EVENT_COLUM_WINDOW_EXECUTE, reinterpret_cast<void*>(nId));
+-
+-        Reference< XDispatchProvider > xDispatchProvider( mxFrame, UNO_QUERY );
+-        if ( xDispatchProvider.is() )
+-        {
+-            com::sun::star::util::URL aTargetURL;
+-            Reference < XURLTransformer > xTrans( ::comphelper::getProcessServiceFactory()->createInstance(
+-                                                    rtl::OUString::createFromAscii("com.sun.star.util.URLTransformer" )),
+-                                                  UNO_QUERY );
+-            aTargetURL.Complete = maCommand;
+-            xTrans->parseStrict( aTargetURL );
+-            Reference< XDispatch > xDispatch = xDispatchProvider->queryDispatch( aTargetURL, rtl::OUString(), 0 );
+-            if ( xDispatch.is() )
+-            {
+-                Sequence< PropertyValue > aArgs( 2 );
+-                aArgs[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Columns" ));
+-                aArgs[0].Value = makeAny( sal_Int16( nCol ));
+-                aArgs[1].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Rows" ));
+-                aArgs[1].Value = makeAny( sal_Int16( nLine ));
++        Sequence< PropertyValue > aArgs( 2 );
++        aArgs[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Columns" ));
++        aArgs[0].Value = makeAny( sal_Int16( nCol ));
++        aArgs[1].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Rows" ));
++        aArgs[1].Value = makeAny( sal_Int16( nLine ));
+ 
+-                xDispatch->dispatch( aTargetURL, aArgs );
+-            }
+-        }
++        TableDialog( aArgs );
+     }
+-    else if ( IsPopupModeCanceled() )
+-        ReleaseMouse();
++
+     SfxPopupWindow::PopupModeEnd();
+ }
+ 
++// -----------------------------------------------------------------------
++
++void TableWindow::Update( long nNewCol, long nNewLine )
++{
++    if ( nNewCol < 0 || nNewCol > TABLE_CELLS_HORIZ )
++        nNewCol = 0;
++
++    if ( nNewLine < 0 || nNewLine > TABLE_CELLS_VERT )
++        nNewLine = 0;
++
++    if ( nNewCol != nCol || nNewLine != nLine )
++    {
++        nCol = nNewCol;
++        nLine = nNewLine;
++        Invalidate( Rectangle( TABLE_POS_X, TABLE_POS_Y, TABLE_WIDTH, TABLE_HEIGHT ) );
++    }
++}
++
++// -----------------------------------------------------------------------
++
++void TableWindow::TableDialog( const Sequence< PropertyValue >& rArgs )
++{
++    Window* pParent = rTbx.GetParent();
++    USHORT nId = GetId();
++    pParent->UserEvent(SVX_EVENT_COLUM_WINDOW_EXECUTE, reinterpret_cast<void*>(nId));
++
++    Reference< XDispatchProvider > xDispatchProvider( mxFrame, UNO_QUERY );
++    if ( xDispatchProvider.is() )
++    {
++        com::sun::star::util::URL aTargetURL;
++        Reference < XURLTransformer > xTrans( ::comphelper::getProcessServiceFactory()->createInstance(
++                    rtl::OUString::createFromAscii("com.sun.star.util.URLTransformer" )),
++                UNO_QUERY );
++        aTargetURL.Complete = maCommand;
++        xTrans->parseStrict( aTargetURL );
++
++        Reference< XDispatch > xDispatch = xDispatchProvider->queryDispatch( aTargetURL, rtl::OUString(), 0 );
++        if ( xDispatch.is() )
++            xDispatch->dispatch( aTargetURL, rArgs );
++    }
++}
++
++// -----------------------------------------------------------------------
++
++void TableWindow::CloseAndShowTableDialog()
++{
++    // close the toolbar tool
++    EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL );
++
++    // and open the table dialog instead
++    TableDialog( Sequence< PropertyValue >() );
++}
++    
+ // class ColumnsWindow ---------------------------------------------------
+ 
+ class ColumnsWindow : public SfxPopupWindow
+@@ -469,6 +412,7 @@ private:
+     ::Color			    aHighlightLineColor;
+     ::Color			    aFillColor;
+     ::Color			    aHighlightFillColor;
++    ::Color			    aFaceColor;
+     long                nCol;
+     long                nWidth;
+     long                nMX;
+@@ -481,7 +425,7 @@ private:
+ 
+     void UpdateSize_Impl( long nNewCol );
+ public:
+-                            ColumnsWindow( USHORT nId, const ::rtl::OUString& rCmd, ToolBox& rParentTbx, const Reference< XFrame >& rFrame );
++                            ColumnsWindow( USHORT nId, const ::rtl::OUString& rCmd, const String& rText, ToolBox& rParentTbx, const Reference< XFrame >& rFrame );
+ 
+     void                    KeyInput( const KeyEvent& rKEvt );
+     virtual void            MouseMove( const MouseEvent& rMEvt );
+@@ -496,8 +440,8 @@ public:
+ 
+ // -----------------------------------------------------------------------
+ 
+-ColumnsWindow::ColumnsWindow( USHORT nId, const ::rtl::OUString& rCmd, ToolBox& rParentTbx, const Reference< XFrame >& rFrame ) :
+-    SfxPopupWindow( nId, rFrame, WB_SYSTEMWINDOW ),
++ColumnsWindow::ColumnsWindow( USHORT nId, const ::rtl::OUString& rCmd, const String& rText, ToolBox& rParentTbx, const Reference< XFrame >& rFrame ) :
++    SfxPopupWindow( nId, rFrame, WB_STDPOPUP ),
+     bInitialKeyInput(TRUE),
+     m_bMod1(FALSE),
+     rTbx(rParentTbx),
+@@ -510,18 +454,21 @@ ColumnsWindow::ColumnsWindow( USHORT nId, const ::rtl::OUString& rCmd, ToolBox&
+     aHighlightLineColor = rStyles.GetHighlightTextColor();
+     aFillColor = rStyles.GetWindowColor();
+     aHighlightFillColor = rStyles.GetHighlightColor();
++    aFaceColor = rStyles.GetFaceColor();
+ 
+     nTextHeight = GetTextHeight()+1;
+     SetBackground();
+     Font aFont( GetFont() );
+     aFont.SetColor( aLineColor );
+-    aFont.SetFillColor( aFillColor );
++    aFont.SetFillColor( aFaceColor );
+     aFont.SetTransparent( FALSE );
+     SetFont( aFont );
+ 
+     nCol        = 0;
+     nWidth      = 4;
+ 
++    SetText( rText );
++
+     Size aLogicSize = LogicToPixel( Size( 95, 155 ), MapMode( MAP_10TH_MM ) );
+     nMX = aLogicSize.Width();
+     SetOutputSizePixel( Size( nMX*nWidth-1, aLogicSize.Height()+nTextHeight ) );
+@@ -532,7 +479,7 @@ ColumnsWindow::ColumnsWindow( USHORT nId, const ::rtl::OUString& rCmd, ToolBox&
+ 
+ SfxPopupWindow* ColumnsWindow::Clone() const
+ {
+-    return new ColumnsWindow( GetId(), maCommand, rTbx, mxFrame );
++    return new ColumnsWindow( GetId(), maCommand, GetText(), rTbx, mxFrame );
+ }
+ 
+ // -----------------------------------------------------------------------
+@@ -730,12 +677,13 @@ void ColumnsWindow::Paint( const Rectangle& )
+     }
+ 
+     SetLineColor();
+-    SetFillColor( aFillColor );
++    SetFillColor( aFaceColor );
+     String aText;
+     if ( nCol )
+         aText = String( String::CreateFromInt32(nCol) );
+     else
+-        aText = Button::GetStandardText( BUTTON_CANCEL );
++        aText = Button::GetStandardText( BUTTON_CANCEL ).EraseAllChars( '~' );
++
+     Size aTextSize(GetTextWidth( aText ), GetTextHeight());
+     DrawText( Point( ( aSize.Width() - aTextSize.Width() ) / 2, aSize.Height() - nTextHeight + 2 ), aText );
+ 
+@@ -744,7 +692,7 @@ void ColumnsWindow::Paint( const Rectangle& )
+ 
+     SetLineColor( aLineColor );
+     SetFillColor();
+-    DrawRect( Rectangle( Point(0,0), aSize ) );
++    DrawRect( Rectangle( 0, 0, aSize.Width() - 1, aSize.Height() - nTextHeight + 1 ) );
+ }
+ 
+ // -----------------------------------------------------------------------
+@@ -802,7 +750,7 @@ SfxPopupWindow* SvxTableToolBoxControl::CreatePopupWindow()
+     if ( bEnabled )
+     {
+         ToolBox& rTbx = GetToolBox();
+-        TableWindow* pWin = new TableWindow( GetSlotId(), m_aCommandURL, rTbx, m_xFrame );
++        TableWindow* pWin = new TableWindow( GetSlotId(), m_aCommandURL, GetToolBox().GetItemText( GetId() ), rTbx, m_xFrame );
+         pWin->StartPopupMode( &rTbx, FLOATWIN_POPUPMODE_GRABFOCUS|FLOATWIN_POPUPMODE_NOKEYCLOSE );
+         SetPopupWindow( pWin );
+         return pWin;
+@@ -815,7 +763,7 @@ SfxPopupWindow* SvxTableToolBoxControl::CreatePopupWindow()
+ SfxPopupWindow* SvxTableToolBoxControl::CreatePopupWindowCascading()
+ {
+     if ( bEnabled )
+-        return new TableWindow( GetSlotId(), m_aCommandURL, GetToolBox(), m_xFrame );
++        return new TableWindow( GetSlotId(), m_aCommandURL, GetToolBox().GetItemText( GetId() ), GetToolBox(), m_xFrame );
+     return 0;
+ }
+ 
+@@ -868,7 +816,7 @@ SfxPopupWindow* SvxColumnsToolBoxControl::CreatePopupWindow()
+     ColumnsWindow* pWin = 0;
+     if(bEnabled)
+     {
+-            pWin = new ColumnsWindow( GetSlotId(), m_aCommandURL, GetToolBox(), m_xFrame );
++            pWin = new ColumnsWindow( GetSlotId(), m_aCommandURL, GetToolBox().GetItemText( GetId() ), GetToolBox(), m_xFrame );
+             pWin->StartPopupMode( &GetToolBox(),
+                                   FLOATWIN_POPUPMODE_GRABFOCUS|FLOATWIN_POPUPMODE_NOKEYCLOSE );
+             SetPopupWindow( pWin );
+@@ -883,7 +831,7 @@ SfxPopupWindow* SvxColumnsToolBoxControl::CreatePopupWindowCascading()
+     ColumnsWindow* pWin = 0;
+     if(bEnabled)
+     {
+-        pWin = new ColumnsWindow( GetSlotId(), m_aCommandURL, GetToolBox(), m_xFrame );
++        pWin = new ColumnsWindow( GetSlotId(), m_aCommandURL, GetToolBox().GetItemText( GetId() ), GetToolBox(), m_xFrame );
+     }
+     return pWin;
+ }
diff --git a/patches/dev300/toolbar-decorations-vcl.diff b/patches/dev300/toolbar-decorations-vcl.diff
index 740a5c7..b492d61 100644
--- a/patches/dev300/toolbar-decorations-vcl.diff
+++ b/patches/dev300/toolbar-decorations-vcl.diff
@@ -173,17 +173,16 @@ index 0d39900..117a9fd 100644
          else // nTitle == FLOATWIN_TITLE_NONE
              nTitleStyle = BORDERWINDOW_TITLE_NONE;
          ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->SetTitleType( nTitleStyle, aOutSize );
-@@ -673,7 +675,12 @@ void FloatingWindow::StartPopupMode( const Rectangle& rRect, ULONG nFlags )
+@@ -673,8 +675,10 @@ void FloatingWindow::StartPopupMode( const Rectangle& rRect, ULONG nFlags )
+ 
      // remove title 
      mnOldTitle = mnTitle;
-     if ( nFlags & FLOATWIN_POPUPMODE_ALLOWTEAROFF )
+-    if ( nFlags & FLOATWIN_POPUPMODE_ALLOWTEAROFF )
 -        SetTitleType( FLOATWIN_TITLE_TEAROFF );
-+    {
-+        if ( mpWindowImpl->mnStyle & WB_POPUP )
-+            SetTitleType( FLOATWIN_TITLE_POPUP );
-+        else
-+            SetTitleType( FLOATWIN_TITLE_TEAROFF );
-+    }
++    if ( mpWindowImpl->mnStyle & WB_POPUP )
++        SetTitleType( FLOATWIN_TITLE_POPUP );
++    else if ( nFlags & FLOATWIN_POPUPMODE_ALLOWTEAROFF )
++        SetTitleType( FLOATWIN_TITLE_TEAROFF );
      else
          SetTitleType( FLOATWIN_TITLE_NONE );
  
commit 3c2cbb46e5424270b0e6da017ccbe82ca2c71b13
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Wed May 12 01:23:51 2010 +0200

    Less intrusive approach to the nicer toolbar decorations.
    
    * patches/dev300/apply: Apply the new files.
    * patches/dev300/toolbar-decorations-rsc.diff:
    * patches/dev300/toolbar-decorations-svx.diff:
    * patches/dev300/toolbar-decorations-vcl-nwf.diff:
    * patches/dev300/toolbar-decorations-vcl.diff:

diff --git a/patches/dev300/apply b/patches/dev300/apply
index 8d7b8e9..90a4573 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -3935,12 +3935,20 @@ skip-empty-links-in-pdf.diff, bnc#598816, tml
 cws-impressmedia01-pptin.diff, i#83753, thorsten
 
 [ Toolbars ]
-SectionOwner => cbosdo
+SectionOwner => cbosdo, jholesov
 
-toolbar-decorations-fix.diff
+# Improved toolbar popups
+toolbar-decorations-rsc.diff
+toolbar-decorations-vcl.diff
+toolbar-decorations-svx.diff
 
 # 'New table' toolbar widget rework
-toolbar-decorations-fix-new-table.diff, jholesov
+#toolbar-decorations-fix-new-table.diff, jholesov
+
+# The proof-of-concept
+#toolbar-decorations-fix.diff
+# Not too well looking, but might be useful?
+#toolbar-decorations-vcl-nwf.diff
 
 [ BorderTypes]
 SectionOwner => cbosdo
diff --git a/patches/dev300/toolbar-decorations-rsc.diff b/patches/dev300/toolbar-decorations-rsc.diff
new file mode 100644
index 0000000..a68a6e6
--- /dev/null
+++ b/patches/dev300/toolbar-decorations-rsc.diff
@@ -0,0 +1,61 @@
+diff --git rsc/inc/rscdb.hxx rsc/inc/rscdb.hxx
+index 3382c06..0e785d3 100644
+--- rsc/inc/rscdb.hxx
++++ rsc/inc/rscdb.hxx
+@@ -97,6 +97,7 @@ class RscTypCont
+     Atom				nMinimizeId;
+     Atom				nMaximizeId;
+     Atom				nCloseableId;
++    Atom				nStdPopupId;
+     Atom				nAppId;
+     Atom				nTabstopId;
+     Atom				nGroupId;
+diff --git rsc/inc/vclrsc.hxx rsc/inc/vclrsc.hxx
+index 3a28ea0..81bf445 100644
+--- rsc/inc/vclrsc.hxx
++++ rsc/inc/vclrsc.hxx
+@@ -84,6 +84,11 @@ typedef sal_Int64 WinBits;
+ #define WB_AUTOVSCROLL          ((WinBits)0x40000000)
+ 
+ #define WB_HIDE 				((WinBits)0x80000000)
++
++// system floating window
++#define WB_OWNERDRAWDECORATION  ((WinBits)0x10000000)
++#define WB_POPUP                ((WinBits)0x20000000)
++
+ #define WB_HSCROLL				WB_HORZ
+ #define WB_VSCROLL				WB_VERT
+ #define WB_TOPIMAGE 			WB_TOP
+@@ -152,6 +157,7 @@ typedef sal_Int64 WinBits;
+ #define WB_STDMODAL 			(WB_STDDIALOG)
+ #define WB_STDTABDIALOG 		(WB_STDDIALOG)
+ #define WB_STDTABCONTROL		0
++#define WB_STDPOPUP				(WB_BORDER | WB_POPUP | WB_SYSTEMWINDOW | WB_OWNERDRAWDECORATION | WB_3DLOOK | WB_DIALOGCONTROL)
+ 
+ // For TreeListBox
+ #define WB_HASBUTTONS			((WinBits)0x00800000)
+diff --git rsc/source/parser/rscicpx.cxx rsc/source/parser/rscicpx.cxx
+index 91a5776..8779f56 100644
+--- rsc/source/parser/rscicpx.cxx
++++ rsc/source/parser/rscicpx.cxx
+@@ -2218,6 +2218,7 @@ RscTop * RscTypCont::InitClassFloatingWindow( RscTop * pSuper,
+     INS_WINBIT(pClassFloatingWindow,Zoomable)
+     INS_WINBIT(pClassFloatingWindow,HideWhenDeactivate)
+     INS_WINBIT(pClassFloatingWindow,EnableResizing)
++    INS_WINBIT(pClassFloatingWindow,StdPopup)
+ 
+     return pClassFloatingWindow;
+ }
+diff --git rsc/source/parser/rscinit.cxx rsc/source/parser/rscinit.cxx
+index 611cd86..d557dca 100644
+--- rsc/source/parser/rscinit.cxx
++++ rsc/source/parser/rscinit.cxx
+@@ -374,6 +374,8 @@ void RscTypCont::Init()
+     aWinBits.SetConstant( nSingleLineId, sal::static_int_cast<INT32>(WB_SINGLELINE) );
+     nSysWinId           = pHS->getID( "WB_SYSTEMWINDOW" );
+     aWinBits.SetConstant( nSysWinId, sal::static_int_cast<INT32>(WB_SYSTEMWINDOW) );
++    nStdPopupId			= pHS->getID( "WB_STDPOPUP" );
++    aWinBits.SetConstant( nStdPopupId, sal::static_int_cast<INT32>(WB_STDPOPUP) );
+ }
+ {
+     /********** I n i t   B a s i c   T y p e s **************************/
diff --git a/patches/dev300/toolbar-decorations-svx.diff b/patches/dev300/toolbar-decorations-svx.diff
new file mode 100644
index 0000000..5c9f973
--- /dev/null
+++ b/patches/dev300/toolbar-decorations-svx.diff
@@ -0,0 +1,179 @@
+diff --git svx/source/tbxctrls/extrusioncontrols.src svx/source/tbxctrls/extrusioncontrols.src
+index 96c4439..f6d1461 100644
+--- svx/source/tbxctrls/extrusioncontrols.src
++++ svx/source/tbxctrls/extrusioncontrols.src
+@@ -32,13 +32,8 @@
+ 
+ FloatingWindow RID_SVXFLOAT_EXTRUSION_DIRECTION
+ {
+-    Border = TRUE ;
++    StdPopup = TRUE ;
+     Hide = TRUE ;
+-    SVLook = TRUE ;
+-    Sizeable = FALSE ;
+-    Moveable = TRUE ;
+-    Closeable = TRUE ;
+-    Zoomable = TRUE ;
+ 
+     Text [ en-US ] = "Extrusion Direction" ;
+ 
+@@ -202,13 +197,8 @@ FloatingWindow RID_SVXFLOAT_EXTRUSION_DIRECTION
+ 
+ FloatingWindow RID_SVXFLOAT_EXTRUSION_DEPTH
+ {
+-    Border = TRUE ;
++    StdPopup = TRUE ;
+     Hide = TRUE ;
+-    SVLook = TRUE ;
+-    Sizeable = FALSE ;
+-    Moveable = TRUE ;
+-    Closeable = TRUE ;
+-    Zoomable = TRUE ;
+ 
+     Text [ en-US ] = "Extrusion Depth" ;
+     
+@@ -291,13 +281,8 @@ FloatingWindow RID_SVXFLOAT_EXTRUSION_DEPTH
+ 
+ FloatingWindow RID_SVXFLOAT_EXTRUSION_LIGHTING
+ {
+-    Border = TRUE ;
++    StdPopup = TRUE ;
+     Hide = TRUE ;
+-    SVLook = TRUE ;
+-    Sizeable = FALSE ;
+-    Moveable = TRUE ;
+-    Closeable = TRUE ;
+-    Zoomable = TRUE ;
+ 
+     Text [ en-US ] = "Extrusion Lighting" ;
+     
+@@ -607,13 +592,8 @@ FloatingWindow RID_SVXFLOAT_EXTRUSION_LIGHTING
+ 
+ FloatingWindow RID_SVXFLOAT_EXTRUSION_SURFACE
+ {
+-    Border = TRUE ;
++    StdPopup = TRUE ;
+     Hide = TRUE ;
+-    SVLook = TRUE ;
+-    Sizeable = FALSE ;
+-    Moveable = TRUE ;
+-    Closeable = TRUE ;
+-    Zoomable = TRUE ;
+ 
+     Text [ en-US ] = "Extrusion Surface" ;
+     
+diff --git svx/source/tbxctrls/fontworkgallery.src svx/source/tbxctrls/fontworkgallery.src
+index e2e6e47..2b960db 100644
+--- svx/source/tbxctrls/fontworkgallery.src
++++ svx/source/tbxctrls/fontworkgallery.src
+@@ -94,13 +94,8 @@ ModalDialog RID_SVX_MDLG_FONTWORK_GALLERY
+ 
+ FloatingWindow RID_SVXFLOAT_FONTWORK_ALIGNMENT
+ {
+-    Border = TRUE ;
++    StdPopup = TRUE ;
+     Hide = TRUE ;
+-    SVLook = TRUE ;
+-    Sizeable = FALSE ;
+-    Moveable = TRUE ;
+-    Closeable = TRUE ;
+-    Zoomable = TRUE ;
+ 
+     Text [ en-US ] = "Fontwork Alignment" ;
+     
+@@ -229,13 +224,8 @@ FloatingWindow RID_SVXFLOAT_FONTWORK_ALIGNMENT
+ 
+ FloatingWindow RID_SVXFLOAT_FONTWORK_CHARSPACING
+ {
+-    Border = TRUE ;
++    StdPopup = TRUE ;
+     Hide = TRUE ;
+-    SVLook = TRUE ;
+-    Sizeable = FALSE ;
+-    Moveable = TRUE ;
+-    Closeable = TRUE ;
+-    Zoomable = TRUE ;
+ 
+     Text [ en-US ] = "Fontwork Character Spacing" ;
+     
+diff --git svx/source/tbxctrls/lboxctrl.src svx/source/tbxctrls/lboxctrl.src
+index 18e3456..97ab4c8 100644
+--- svx/source/tbxctrls/lboxctrl.src
++++ svx/source/tbxctrls/lboxctrl.src
+@@ -32,12 +32,10 @@
+ FloatingWindow RID_SVXTBX_UNDO_REDO_CTRL
+ {
+     Pos = MAP_APPFONT ( 0 , 0 ) ;
+-    Size = MAP_APPFONT ( 150 , 74 ) ;
++    Size = MAP_APPFONT ( 152 , 74 ) ;
+     HelpID = HID_SVXTBX_UNDO_REDO_CTRL ;
+-    SysWin = TRUE;
+-    Border = TRUE ;
++    StdPopup = TRUE;
+     Hide = TRUE ;
+-    SVLook = TRUE ;
+     OutputSize = TRUE ;
+ 
+     ListBox LB_SVXTBX_UNDO_REDO_CTRL
+@@ -50,7 +48,7 @@ FloatingWindow RID_SVXTBX_UNDO_REDO_CTRL
+     };
+     FixedText FT_NUM_OPERATIONS
+     {
+-        Pos = MAP_APPFONT ( 6 , 64 ) ;
++        Pos = MAP_APPFONT ( 2 , 64 ) ;
+         Size = MAP_APPFONT ( 138 , 10 ) ;
+     };
+ };
+diff --git svx/source/tbxctrls/linectrl.cxx svx/source/tbxctrls/linectrl.cxx
+index 2a69a5f..df3378c 100644
+--- svx/source/tbxctrls/linectrl.cxx
++++ svx/source/tbxctrls/linectrl.cxx
+@@ -382,7 +382,7 @@ SvxLineEndWindow::SvxLineEndWindow(
+     const String& rWndTitle ) :
+     SfxPopupWindow( nSlotId,
+                     rFrame,
+-                    WinBits( WB_BORDER | WB_STDFLOATWIN | WB_SIZEABLE | WB_3DLOOK ) ),
++                    WinBits( WB_STDPOPUP ) ),
+     pLineEndList	( NULL ),
+     aLineEndSet		( this, WinBits( WB_ITEMBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT ) ),
+     nCols			( 2 ),
+@@ -404,7 +404,7 @@ SvxLineEndWindow::SvxLineEndWindow(
+     SfxPopupWindow( nSlotId,
+                     rFrame,
+                     pParentWindow,
+-                    WinBits( WB_BORDER | WB_STDFLOATWIN | WB_SIZEABLE | WB_3DLOOK ) ),
++                    WinBits( WB_STDPOPUP ) ),
+     pLineEndList	( NULL ),
+     aLineEndSet		( this, WinBits( WB_ITEMBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT ) ),
+     nCols			( 2 ),
+diff --git svx/source/tbxctrls/tbcontrl.cxx svx/source/tbxctrls/tbcontrl.cxx
+index be75081..131636d 100644
+--- svx/source/tbxctrls/tbcontrl.cxx
++++ svx/source/tbxctrls/tbcontrl.cxx
+@@ -831,7 +831,7 @@ SvxColorWindow_Impl::SvxColorWindow_Impl( const OUString&            rCommand,
+                                           const String&              rWndTitle,
+                                           Window*                    pParentWindow ) :
+ 
+-    SfxPopupWindow( nSlotId, rFrame, pParentWindow, WinBits( WB_BORDER | WB_STDFLOATWIN | WB_3DLOOK|WB_DIALOGCONTROL ) ),
++    SfxPopupWindow( nSlotId, rFrame, pParentWindow, WinBits( WB_STDPOPUP ) ),
+ 
+     theSlotId( nSlotId ),
+     aColorSet( this, WinBits( WB_ITEMBORDER | WB_NAMEFIELD | WB_3DLOOK | WB_NO_DIRECTSELECT) ),
+@@ -1057,7 +1057,7 @@ void SvxColorWindow_Impl::StateChanged( USHORT nSID, SfxItemState eState, const
+ 
+ SvxFrameWindow_Impl::SvxFrameWindow_Impl( USHORT nId, const Reference< XFrame >& rFrame, Window* pParentWindow ) :
+ 
+-    SfxPopupWindow( nId, rFrame, pParentWindow, WinBits( WB_BORDER | WB_STDFLOATWIN | WB_3DLOOK | WB_DIALOGCONTROL ) ),
++    SfxPopupWindow( nId, rFrame, pParentWindow, WinBits( WB_STDPOPUP ) ),
+     aFrameSet   ( this, WinBits( WB_ITEMBORDER | WB_DOUBLEBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT ) ),
+     bParagraphMode(sal_False)
+ 
+@@ -1331,7 +1331,7 @@ BOOL SvxFrameWindow_Impl::Close()
+ 
+ SvxLineWindow_Impl::SvxLineWindow_Impl( USHORT nId, const Reference< XFrame >& rFrame, Window* pParentWindow ) :
+ 
+-    SfxPopupWindow( nId, rFrame, pParentWindow, WinBits( WB_BORDER | WB_STDFLOATWIN | WB_3DLOOK | WB_DIALOGCONTROL ) ),
++    SfxPopupWindow( nId, rFrame, pParentWindow, WinBits( WB_STDPOPUP ) ),
+ 
+     aLineSet( this, WinBits( WB_3DLOOK | WB_ITEMBORDER | WB_DOUBLEBORDER | WB_NAMEFIELD | WB_NONEFIELD | WB_NO_DIRECTSELECT ) )
+ {
diff --git a/patches/dev300/toolbar-decorations-vcl-nwf.diff b/patches/dev300/toolbar-decorations-vcl-nwf.diff
new file mode 100644
index 0000000..50ab73e
--- /dev/null
+++ b/patches/dev300/toolbar-decorations-vcl-nwf.diff
@@ -0,0 +1,40 @@
+diff --git vcl/source/window/brdwin.cxx vcl/source/window/brdwin.cxx
+index 4bebcd9..1d75f22 100644
+--- vcl/source/window/brdwin.cxx
++++ vcl/source/window/brdwin.cxx
+@@ -138,12 +138,29 @@ static void ImplDrawBrdWinSymbolButton( OutputDevice* pDev,
+     {
+         if( bMouseOver )
+         {
+-            // provide a bright background for selection effect
+-            pWin->SetFillColor( pDev->GetSettings().GetStyleSettings().GetWindowColor() );
+-            pWin->SetLineColor();
+-            pWin->DrawRect( rRect );
+-            pWin->DrawSelectionBackground( rRect, 2, (nState & BUTTON_DRAW_PRESSED) ? TRUE : FALSE,
+-                                            TRUE, FALSE );
++            bool bNativeOK = false;
++            if ( false /*pWin->IsNativeControlSupported( CTRL_TOOLBAR, PART_BUTTON )*/ )
++            {
++                ImplControlValue aControlValue;
++                Region aCtrlRegion( rRect );
++
++                ControlState nCtrlState = CTRL_STATE_ENABLED | CTRL_STATE_ROLLOVER;
++                if ( nState & BUTTON_DRAW_PRESSED )
++                    nCtrlState |= CTRL_STATE_PRESSED;
++
++                bNativeOK = pWin->DrawNativeControl( CTRL_TOOLBAR, PART_BUTTON, aCtrlRegion, nCtrlState,
++                        aControlValue, rtl::OUString() );
++            }
++
++            if ( !bNativeOK )
++            {
++                // provide a bright background for selection effect
++                pWin->SetFillColor( pDev->GetSettings().GetStyleSettings().GetWindowColor() );
++                pWin->SetLineColor();
++                pWin->DrawRect( rRect );
++                pWin->DrawSelectionBackground( rRect, 2, (nState & BUTTON_DRAW_PRESSED) ? TRUE : FALSE,
++                        TRUE, FALSE );
++            }
+         }
+         aTempRect = rRect;
+         aTempRect.nLeft+=3;
diff --git a/patches/dev300/toolbar-decorations-vcl.diff b/patches/dev300/toolbar-decorations-vcl.diff
new file mode 100644
index 0000000..740a5c7
--- /dev/null
+++ b/patches/dev300/toolbar-decorations-vcl.diff
@@ -0,0 +1,278 @@
+diff --git vcl/inc/vcl/brdwin.hxx vcl/inc/vcl/brdwin.hxx
+index b6fcb85..3de3671 100644
+--- vcl/inc/vcl/brdwin.hxx
++++ vcl/inc/vcl/brdwin.hxx
+@@ -84,7 +84,8 @@ class ImplBorderWindowView;
+ #define BORDERWINDOW_TITLE_NORMAL			((USHORT)0x0001)
+ #define BORDERWINDOW_TITLE_SMALL			((USHORT)0x0002)
+ #define BORDERWINDOW_TITLE_TEAROFF			((USHORT)0x0004)
+-#define BORDERWINDOW_TITLE_NONE 			((USHORT)0x0008)
++#define BORDERWINDOW_TITLE_POPUP			((USHORT)0x0008)
++#define BORDERWINDOW_TITLE_NONE 			((USHORT)0x0010)
+ 
+ // --------------------
+ // - ImplBorderWindow -
+diff --git vcl/inc/vcl/floatwin.hxx vcl/inc/vcl/floatwin.hxx
+index e6bb97c..b315910 100644
+--- vcl/inc/vcl/floatwin.hxx
++++ vcl/inc/vcl/floatwin.hxx
+@@ -65,7 +65,8 @@ class PopupModeEvent;
+ 
+ #define FLOATWIN_TITLE_NORMAL					((USHORT)0x0001)
+ #define FLOATWIN_TITLE_TEAROFF					((USHORT)0x0002)
+-#define FLOATWIN_TITLE_NONE 					((USHORT)0x0004)
++#define FLOATWIN_TITLE_POPUP					((USHORT)0x0004)
++#define FLOATWIN_TITLE_NONE 					((USHORT)0x0008)
+ 
+ // ------------------
+ // - FloatingWindow -
+diff --git vcl/inc/vcl/wintypes.hxx vcl/inc/vcl/wintypes.hxx
+index 6abe87d..02f4a4a 100644
+--- vcl/inc/vcl/wintypes.hxx
++++ vcl/inc/vcl/wintypes.hxx
+@@ -190,9 +190,10 @@ typedef sal_Int64 WinBits;
+ #define WB_INTROWIN             ((WinBits)SAL_CONST_INT64(0x200000000))
+ #define WB_NOSHADOW             ((WinBits)SAL_CONST_INT64(0x400000000))
+ #define WB_TOOLTIPWIN           ((WinBits)SAL_CONST_INT64(0x800000000))
+-#define WB_OWNERDRAWDECORATION  ((WinBits)SAL_CONST_INT64(0x2000000000))
++#define WB_OWNERDRAWDECORATION  ((WinBits)SAL_CONST_INT64(0x10000000))
+ #define WB_DEFAULTWIN           ((WinBits)SAL_CONST_INT64(0x4000000000))
+ #define WB_NEEDSFOCUS           ((WinBits)SAL_CONST_INT64(0x1000000000))
++#define WB_POPUP                ((WinBits)SAL_CONST_INT64(0x20000000))
+ 
+ #define WB_HSCROLL				WB_HORZ
+ #define WB_VSCROLL				WB_VERT
+@@ -271,6 +272,7 @@ typedef sal_Int64 WinBits;
+ #define WB_STDMODAL 			(WB_STDDIALOG)
+ #define WB_STDTABDIALOG 		(WB_STDDIALOG)
+ #define WB_STDTABCONTROL		0
++#define WB_STDPOPUP				(WB_BORDER | WB_POPUP | WB_SYSTEMWINDOW | WB_OWNERDRAWDECORATION | WB_3DLOOK | WB_DIALOGCONTROL)
+ 
+ // For TreeListBox
+ #define WB_HASBUTTONS			((WinBits)0x00800000)
+diff --git vcl/source/app/settings.cxx vcl/source/app/settings.cxx
+index 6424fe8..04004a1 100644
+--- vcl/source/app/settings.cxx
++++ vcl/source/app/settings.cxx
+@@ -562,8 +562,8 @@ void ImplStyleData::SetStandardStyles()
+     maPushButtonFont            = aStdFont;
+     maFieldFont                 = aStdFont;
+     maIconFont                  = aStdFont;
+-    maFloatTitleFont            = aStdFont;
+     aStdFont.SetWeight( WEIGHT_BOLD );
++    maFloatTitleFont            = aStdFont;
+     maTitleFont                 = aStdFont;
+ 
+     maFaceColor                 = Color( COL_LIGHTGRAY );
+diff --git vcl/source/window/brdwin.cxx vcl/source/window/brdwin.cxx
+index 4bebcd9..9b0d610 100644
+--- vcl/source/window/brdwin.cxx
++++ vcl/source/window/brdwin.cxx
+@@ -211,7 +211,7 @@ void ImplBorderWindowView::ImplInitTitle( ImplBorderFrameData* pData )
+ {
+     ImplBorderWindow* pBorderWindow = pData->mpBorderWindow;
+ 
+-    if ( !(pBorderWindow->GetStyle() & WB_MOVEABLE) ||
++    if ( !(pBorderWindow->GetStyle() & (WB_MOVEABLE | WB_POPUP)) ||
+           (pData->mnTitleType == BORDERWINDOW_TITLE_NONE) )
+     {
+         pData->mnTitleType	 = BORDERWINDOW_TITLE_NONE;
+@@ -1495,7 +1495,7 @@ void ImplStdBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHeigh
+     pData->mnTitleType		= pBorderWindow->mnTitleType;
+     pData->mbFloatWindow	= pBorderWindow->mbFloatWindow;
+ 
+-    if ( !(pBorderWindow->GetStyle() & WB_MOVEABLE) || (pData->mnTitleType == BORDERWINDOW_TITLE_NONE) )
++    if ( !(pBorderWindow->GetStyle() & (WB_MOVEABLE | WB_POPUP)) || (pData->mnTitleType == BORDERWINDOW_TITLE_NONE) )
+         pData->mnBorderSize = 0;
+     else if ( pData->mnTitleType == BORDERWINDOW_TITLE_TEAROFF )
+         pData->mnBorderSize = 0;
+@@ -1520,7 +1520,7 @@ void ImplStdBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHeigh
+ 
+         // set a proper background for drawing
+         // highlighted buttons in the title
+-        pBorderWindow->SetBackground( rStyleSettings.GetWindowColor() );
++        pBorderWindow->SetBackground( rStyleSettings.GetFaceColor() );
+ 
+         pData->maTitleRect.Left()	 = pData->mnLeftBorder;
+         pData->maTitleRect.Right()	 = nWidth-pData->mnRightBorder-1;
+@@ -1670,12 +1670,35 @@ void ImplStdBorderWindowView::DrawWindow( USHORT nDrawFlags, OutputDevice* pOutD
+     // Draw Frame
+     if ( nDrawFlags & BORDERWINDOW_DRAW_FRAME )
+     {
++        Region oldClipRgn( pDev->GetClipRegion( ) );
++
++        // for popups, don't draw part of the frame
++        if ( pData->mnTitleType == BORDERWINDOW_TITLE_POPUP )
++        {
++            FloatingWindow *pWin = dynamic_cast< FloatingWindow* >( pData->mpBorderWindow->GetWindow( WINDOW_CLIENT ) );
++            if ( pWin )
++            {
++                Region aClipRgn( aInRect );
++                Rectangle aItemClipRect( pWin->ImplGetItemEdgeClipRect() );
++                if( !aItemClipRect.IsEmpty() )
++                {
++                    aItemClipRect.SetPos( pData->mpBorderWindow->AbsoluteScreenToOutputPixel( aItemClipRect.TopLeft() ) );
++                    aClipRgn.Exclude( aItemClipRect );
++                    pDev->SetClipRegion( aClipRgn );
++                }
++            }
++        }
++
+         // single line frame
+         pDev->SetLineColor( aFrameColor );
+         pDev->SetFillColor();
+         pDev->DrawRect( aInRect );
+         aInRect.nLeft++; aInRect.nRight--;
+         aInRect.nTop++; aInRect.nBottom--;
++
++        // restore
++        if ( pData->mnTitleType == BORDERWINDOW_TITLE_POPUP )
++            pDev->SetClipRegion( oldClipRgn );
+     }
+     else
+         aInRect = aDecoView.DrawFrame( aInRect, FRAME_DRAW_DOUBLEOUT | FRAME_DRAW_NODRAW);
+@@ -1707,8 +1730,9 @@ void ImplStdBorderWindowView::DrawWindow( USHORT nDrawFlags, OutputDevice* pOutD
+         Rectangle aTitleRect( pData->maTitleRect );
+         if( pOffset )
+             aTitleRect.Move( pOffset->X(), pOffset->Y() );
+-        pDev->DrawRect( aTitleRect );
+ 
++        if ( pData->mnTitleType != BORDERWINDOW_TITLE_POPUP )
++            pDev->DrawRect( aTitleRect );
+ 
+         if ( pData->mnTitleType != BORDERWINDOW_TITLE_TEAROFF )
+         {
+@@ -1837,7 +1861,7 @@ void ImplBorderWindow::ImplInit( Window* pParent,
+ {
+     // Alle WindowBits entfernen, die wir nicht haben wollen
+     WinBits nOrgStyle = nStyle;
+-    WinBits nTestStyle = (WB_MOVEABLE | WB_SIZEABLE | WB_ROLLABLE | WB_PINABLE | WB_CLOSEABLE | WB_STANDALONE | WB_DIALOGCONTROL | WB_NODIALOGCONTROL | WB_SYSTEMFLOATWIN | WB_INTROWIN | WB_DEFAULTWIN | WB_TOOLTIPWIN | WB_NOSHADOW | WB_OWNERDRAWDECORATION | WB_SYSTEMCHILDWINDOW  | WB_NEEDSFOCUS);
++    WinBits nTestStyle = (WB_MOVEABLE | WB_SIZEABLE | WB_ROLLABLE | WB_PINABLE | WB_CLOSEABLE | WB_STANDALONE | WB_DIALOGCONTROL | WB_NODIALOGCONTROL | WB_SYSTEMFLOATWIN | WB_INTROWIN | WB_DEFAULTWIN | WB_TOOLTIPWIN | WB_NOSHADOW | WB_OWNERDRAWDECORATION | WB_SYSTEMCHILDWINDOW  | WB_NEEDSFOCUS | WB_POPUP);
+     if ( nTypeStyle & BORDERWINDOW_STYLE_APP )
+         nTestStyle |= WB_APP;
+     nStyle &= nTestStyle;
+diff --git vcl/source/window/floatwin.cxx vcl/source/window/floatwin.cxx
+index 0d39900..117a9fd 100644
+--- vcl/source/window/floatwin.cxx
++++ vcl/source/window/floatwin.cxx
+@@ -138,7 +138,7 @@ void FloatingWindow::ImplInit( Window* pParent, WinBits nStyle )
+     mpNextFloat             = NULL;
+     mpFirstPopupModeWin     = NULL;
+     mnPostId                = 0;
+-    mnTitle                 = (nStyle & WB_MOVEABLE) ? FLOATWIN_TITLE_NORMAL : FLOATWIN_TITLE_NONE;
++    mnTitle                 = (nStyle & (WB_MOVEABLE | WB_POPUP)) ? FLOATWIN_TITLE_NORMAL : FLOATWIN_TITLE_NONE;
+     mnOldTitle              = mnTitle;
+     mnPopupModeFlags        = 0;
+     mbInPopupMode           = FALSE;
+@@ -652,6 +652,8 @@ void FloatingWindow::SetTitleType( USHORT nTitle )
+             nTitleStyle = BORDERWINDOW_TITLE_SMALL;
+         else if ( nTitle == FLOATWIN_TITLE_TEAROFF )
+             nTitleStyle = BORDERWINDOW_TITLE_TEAROFF;
++        else if ( nTitle == FLOATWIN_TITLE_POPUP )
++            nTitleStyle = BORDERWINDOW_TITLE_POPUP;
+         else // nTitle == FLOATWIN_TITLE_NONE
+             nTitleStyle = BORDERWINDOW_TITLE_NONE;
+         ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->SetTitleType( nTitleStyle, aOutSize );
+@@ -673,7 +675,12 @@ void FloatingWindow::StartPopupMode( const Rectangle& rRect, ULONG nFlags )
+     // remove title 
+     mnOldTitle = mnTitle;
+     if ( nFlags & FLOATWIN_POPUPMODE_ALLOWTEAROFF )
+-        SetTitleType( FLOATWIN_TITLE_TEAROFF );
++    {
++        if ( mpWindowImpl->mnStyle & WB_POPUP )
++            SetTitleType( FLOATWIN_TITLE_POPUP );
++        else
++            SetTitleType( FLOATWIN_TITLE_TEAROFF );
++    }
+     else
+         SetTitleType( FLOATWIN_TITLE_NONE );
+ 
+diff --git vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+index 1d163d9..3f1afb3 100644
+--- vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
++++ vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+@@ -3407,8 +3407,6 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
+ 
+     aStyleSet.SetAppFont( aFont );
+     aStyleSet.SetHelpFont( aFont );
+-    aStyleSet.SetTitleFont( aFont );
+-    aStyleSet.SetFloatTitleFont( aFont );
+     aStyleSet.SetMenuFont( aFont );
+     aStyleSet.SetToolFont( aFont );
+     aStyleSet.SetLabelFont( aFont );
+@@ -3419,6 +3417,10 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
+     aStyleSet.SetIconFont( aFont );
+     aStyleSet.SetGroupFont( aFont );
+ 
++    aFont.SetWeight( WEIGHT_BOLD );
++    aStyleSet.SetTitleFont( aFont );
++    aStyleSet.SetFloatTitleFont( aFont );
++
+     // get cursor blink time
+     GtkSettings *pSettings = gtk_widget_get_settings( gWidgetData[m_nScreen].gEditBoxWidget );
+     gboolean blink = false;
+diff --git vcl/unx/kde/salnativewidgets-kde.cxx vcl/unx/kde/salnativewidgets-kde.cxx
+index 2e3d71d..9da0fde 100644
+--- vcl/unx/kde/salnativewidgets-kde.cxx
++++ vcl/unx/kde/salnativewidgets-kde.cxx
+@@ -1954,9 +1954,6 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
+ 
+     aStyleSettings.SetAppFont( aFont );
+     aStyleSettings.SetHelpFont( aFont );
+-    if( !bSetTitleFont )
+-        aStyleSettings.SetTitleFont( aFont );
+-    aStyleSettings.SetFloatTitleFont( aFont );
+     aStyleSettings.SetMenuFont( aFont ); // will be changed according to pMenuBar
+     aStyleSettings.SetToolFont( aFont ); // will be changed according to pToolBar
+     aStyleSettings.SetLabelFont( aFont );
+@@ -1966,6 +1963,12 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
+     aStyleSettings.SetFieldFont( aFont );
+     aStyleSettings.SetIconFont( aFont );
+     aStyleSettings.SetGroupFont( aFont );
++
++    aFont.SetWeight( WEIGHT_BOLD );
++    if( !bSetTitleFont )
++        aStyleSettings.SetTitleFont( aFont );
++    aStyleSettings.SetFloatTitleFont( aFont );
++
+     int flash_time = QApplication::cursorFlashTime();
+     aStyleSettings.SetCursorBlinkTime( flash_time != 0 ? flash_time/2 : STYLE_CURSOR_NOBLINKTIME );
+ 
+diff --git vcl/unx/kde4/KDESalFrame.cxx vcl/unx/kde4/KDESalFrame.cxx
+index 95ca526..b4417c9 100644
+--- vcl/unx/kde4/KDESalFrame.cxx
++++ vcl/unx/kde4/KDESalFrame.cxx
+@@ -288,12 +288,6 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
+     style.SetAppFont( aFont );
+     style.SetHelpFont( aFont );
+     
+-    if( !bSetTitleFont )
+-    {
+-        style.SetTitleFont( aFont );
+-    }
+-    
+-    style.SetFloatTitleFont( aFont );
+     style.SetMenuFont( aFont ); // will be changed according to pMenuBar
+     //style.SetToolFont( aFont ); //already set above
+     style.SetLabelFont( aFont );
+@@ -303,6 +297,13 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
+     style.SetFieldFont( aFont );
+     style.SetIconFont( aFont );
+     style.SetGroupFont( aFont );
++
++    aFont.SetWeight( WEIGHT_BOLD );
++    if( !bSetTitleFont )
++    {
++        style.SetTitleFont( aFont );
++    }
++    style.SetFloatTitleFont( aFont );
+     
+     int flash_time = QApplication::cursorFlashTime();
+     style.SetCursorBlinkTime( flash_time != 0 ? flash_time/2 : STYLE_CURSOR_NOBLINKTIME );
+@@ -407,4 +408,4 @@ SalGraphics* KDESalFrame::GetGraphics()
+     }
+     
+     return NULL;
+-}
+\ No newline at end of file
++}
commit eda5b3bd2c2bbc2e57d4b7e2d954ef65004d7d74
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Fri May 7 21:40:10 2010 +0200

    Fix the KDE4 border frame width.
    
    * patches/dev300/apply: Add.
    * patches/dev300/kde4-border-frame.diff:

diff --git a/patches/dev300/apply b/patches/dev300/apply
index b061256..8d7b8e9 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -2316,6 +2316,9 @@ kde4-and-kde3-shell-build.diff, jholesov
 # Fix qt/qt4 moc detection
 qt-moc-detect.diff
 
+# Fix frame border calculation
+kde4-border-frame.diff, i#111464, jholesov
+
 [ KDE4Experimental ]
 # Not yet ported to co-exist with the KDE3 stuff
 kde4-kab.diff
diff --git a/patches/dev300/kde4-border-frame.diff b/patches/dev300/kde4-border-frame.diff
new file mode 100644
index 0000000..17f128c
--- /dev/null
+++ b/patches/dev300/kde4-border-frame.diff
@@ -0,0 +1,13 @@
+diff --git a/vcl/unx/kde4/KDESalGraphics.cxx b/vcl/unx/kde4/KDESalGraphics.cxx
+index 3be4baa..7e69722 100644
+--- vcl/unx/kde4/KDESalGraphics.cxx
++++ vcl/unx/kde4/KDESalGraphics.cxx
+@@ -671,7 +671,7 @@ BOOL KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart part,
+         {
+             if( part == PART_BORDER )
+             {
+-                int size = kapp->style()->pixelMetric(QStyle::PM_LayoutLeftMargin);
++                int size = kapp->style()->pixelMetric(QStyle::PM_DefaultFrameWidth);
+                 USHORT nStyle = val.getNumericVal();
+                 if( nStyle & FRAME_DRAW_NODRAW )
+                 {


More information about the ooo-build-commit mailing list