[Libreoffice-commits] .: 7 commits - framework/source sc/source sd/source sfx2/source vcl/inc vcl/source vcl/unx

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Aug 23 08:54:57 PDT 2012


 framework/source/layoutmanager/toolbarlayoutmanager.cxx |    4 -
 sc/source/ui/app/inputwin.cxx                           |   23 +++++--
 sc/source/ui/inc/inputwin.hxx                           |    1 
 sd/source/ui/view/ViewShellBase.cxx                     |    7 +-
 sfx2/source/view/impviewframe.hxx                       |    3 
 vcl/inc/vcl/decoview.hxx                                |    3 
 vcl/inc/vcl/status.hxx                                  |    4 -
 vcl/inc/vcl/window.hxx                                  |    3 
 vcl/source/app/settings.cxx                             |    2 
 vcl/source/window/brdwin.cxx                            |    4 -
 vcl/source/window/decoview.cxx                          |   15 ----
 vcl/source/window/status.cxx                            |   52 +---------------
 vcl/source/window/toolbox2.cxx                          |    4 -
 vcl/source/window/window.cxx                            |    2 
 vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx                |   14 +---
 15 files changed, 43 insertions(+), 98 deletions(-)

New commits:
commit 1a3f44e52b31c520d52261af8a2f92b88e107459
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Thu Aug 23 08:08:38 2012 +0200

    Fix typo in a comment (copied here and there).
    
    Change-Id: Ic3c3e71a79ea8bf73a51fc7f001833d6ccedcb76

diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index aa6064f..421b65d 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -1508,7 +1508,7 @@ bool AllSettings::GetLayoutRTL() const
         nUIMirroring = 0; // ask configuration only once
         utl::OConfigurationNode aNode = utl::OConfigurationTreeRoot::tryCreateWithServiceFactory(
             vcl::unohelper::GetMultiServiceFactory(),
-            OUString("org.openoffice.Office.Common/I18N/CTL") );    // note: case sensisitive !
+            OUString("org.openoffice.Office.Common/I18N/CTL") );    // note: case sensitive !
         if ( aNode.isValid() )
         {
             sal_Bool bTmp = sal_Bool();
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index 0a16c9d..d7920cf 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -2140,7 +2140,7 @@ sal_Bool ToolBox::AlwaysLocked()
 
         utl::OConfigurationNode aNode = utl::OConfigurationTreeRoot::tryCreateWithServiceFactory(
             vcl::unohelper::GetMultiServiceFactory(),
-            OUString("/org.openoffice.Office.UI.GlobalSettings/Toolbars") );    // note: case sensisitive !
+            OUString("/org.openoffice.Office.UI.GlobalSettings/Toolbars") );    // note: case sensitive !
         if ( aNode.isValid() )
         {
             // feature enabled ?
@@ -2153,7 +2153,7 @@ sal_Bool ToolBox::AlwaysLocked()
                     // now read the locking state
                     utl::OConfigurationNode aNode2 = utl::OConfigurationTreeRoot::tryCreateWithServiceFactory(
                         vcl::unohelper::GetMultiServiceFactory(),
-                        OUString("/org.openoffice.Office.UI.GlobalSettings/Toolbars/States") );    // note: case sensisitive !
+                        OUString("/org.openoffice.Office.UI.GlobalSettings/Toolbars/States") );    // note: case sensitive !
 
                     sal_Bool bLocked = sal_Bool();
                     ::com::sun::star::uno::Any aValue2 = aNode2.getNodeValue( OUString("Locked") );
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index a39d855..73280fe 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -486,7 +486,7 @@ void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, sal_Bool bCallHdl
         sal_Bool bTmp = sal_False, bAutoHCMode = sal_True;
         utl::OConfigurationNode aNode = utl::OConfigurationTreeRoot::tryCreateWithServiceFactory(
             vcl::unohelper::GetMultiServiceFactory(),
-            OUString("org.openoffice.Office.Common/Accessibility") );    // note: case sensisitive !
+            OUString("org.openoffice.Office.Common/Accessibility") );    // note: case sensitive !
         if ( aNode.isValid() )
         {
             ::com::sun::star::uno::Any aValue = aNode.getNodeValue( OUString("AutoDetectSystemHC") );
commit 35c9ffb2750178b558c71af12240cd5809a0314e
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Thu Aug 23 07:57:53 2012 +0200

    Fix off-by-one drawing problems of the bottom docking area.
    
    Change-Id: Ic463f6829f7faa6d9667656f42f844a12d85518e

diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
index a7789bd..0fbd031 100644
--- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx
+++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
@@ -180,12 +180,12 @@ void ToolbarLayoutManager::implts_setDockingAreaWindowSizes( const awt::Rectangl
     if ( rBorderSpace.Height >= 0 )
     {
         // Bottom docking area window
-        sal_Int32 nBottomPos = std::max( sal_Int32( aContainerClientSize.Height - rBorderSpace.Height - aStatusBarHeight ), sal_Int32( 0 ));
+        sal_Int32 nBottomPos = std::max( sal_Int32( aContainerClientSize.Height - rBorderSpace.Height - aStatusBarHeight + 1 ), sal_Int32( 0 ));
         sal_Int32 nHeight = ( nBottomPos == 0 ) ? 0 : rBorderSpace.Height;
 
         xBottomDockAreaWindow->setPosSize( 0, nBottomPos, aContainerClientSize.Width, nHeight, awt::PosSize::POSSIZE );
         xBottomDockAreaWindow->setVisible( sal_True );
-        nLeftRightDockingAreaHeight -= nHeight;
+        nLeftRightDockingAreaHeight -= nHeight - 1;
     }
 
     nLeftRightDockingAreaHeight -= aStatusBarHeight;
commit dd7382353d4c248a6d6f9d21401480ccc37e2b9d
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Wed Aug 22 19:58:26 2012 +0200

    Remove ViewShell's border.
    
    It is not necessary now; where it was necessary previously, we visually
    distinguish the viewshell from the rest by other means.
    
    Change-Id: I24f3ed1916c0886683bf8b770ce3bf22a5e9ec7a

diff --git a/sfx2/source/view/impviewframe.hxx b/sfx2/source/view/impviewframe.hxx
index aaf94e4..f6b431e 100644
--- a/sfx2/source/view/impviewframe.hxx
+++ b/sfx2/source/view/impviewframe.hxx
@@ -75,7 +75,7 @@ class SfxFrameViewWindow_Impl : public Window
 
 public:
                         SfxFrameViewWindow_Impl( SfxViewFrame* p, Window& rParent, WinBits nBits=0 ) :
-                            Window( &rParent, nBits | WB_BORDER | WB_CLIPCHILDREN ),
+                            Window( &rParent, nBits | WB_CLIPCHILDREN ),
                             pFrame( p )
                         {
                             p->GetFrame().GetWindow().SetBorderStyle( WINDOW_BORDER_NOBORDER );
commit 0a5b49e7199198974113dc2e8b68257b881fb9fb
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Wed Aug 22 19:56:36 2012 +0200

    Seemingly off-by-one painting error in Impress' ViewShell.
    
    In fact, it is not a off-by-one, just the scrollbars do not align with the
    splitters; so adjust it to fit better.
    
    Change-Id: I062b5da6baf4c20bedbf69301066547dcd1ace20

diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx
index 3b4114e..6898081 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -272,7 +272,7 @@ ViewShellBase::ViewShellBase (
     mpImpl->mpViewWindow.reset(new FocusForwardingWindow(_pFrame->GetWindow(),*this));
     mpImpl->mpViewWindow->SetBackground(Wallpaper());
 
-    _pFrame->GetWindow().SetBackground(Wallpaper());
+    _pFrame->GetWindow().SetBackground(Application::GetSettings().GetStyleSettings().GetLightColor());
 
     // Set up the members in the correct order.
     if (GetViewFrame()->GetObjectShell()->ISA(DrawDocShell))
@@ -1298,9 +1298,12 @@ void ViewShellBase::Implementation::ResizePixel (
     Point aViewWindowPosition (
         rOrigin.X()+aBaseBorder.Left(),
         rOrigin.Y()+aBaseBorder.Top());
+
+    // -1 (below) is there to let one line of _pFrame->GetWindow() visible,
+    // so that it plays better with the overall look
     Size aViewWindowSize (
         rSize.Width() - aBaseBorder.Left() - aBaseBorder.Right(),
-        rSize.Height() - aBaseBorder.Top() - aBaseBorder.Bottom());
+        rSize.Height() - aBaseBorder.Top() - aBaseBorder.Bottom() - 1);
     mpViewWindow->SetPosSizePixel(aViewWindowPosition, aViewWindowSize);
 
     maClientArea = Rectangle(Point(0,0), aViewWindowSize);
commit 682c4f1bf7b6548222321adbee5f64da61ae6685
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Wed Aug 22 18:39:04 2012 +0200

    Get rid of the 3D look of the Formula Bar.
    
    Change-Id: I146123149bd32223f9321b1bf4b49e71805aa37e

diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 65b1a0d..4e69063 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -86,7 +86,9 @@
 #define TBX_WINDOW_HEIGHT   22 // in Pixeln - fuer alle Systeme gleich?
 #define LEFT_OFFSET         5
 #define INPUTWIN_MULTILINES 6
-const long BUTTON_OFFSET = 2; // space bettween input line and the button to expand / collapse
+const long BUTTON_OFFSET = 2; ///< space between input line and the button to expand / collapse
+const long ADDITIONAL_BORDER = 1; ///< height of the line at the bottom
+const long ADDITIONAL_SPACE = 4; ///< additional vertical space when the multiline edit has more lines
 
 using com::sun::star::uno::Reference;
 using com::sun::star::uno::UNO_QUERY;
@@ -186,7 +188,7 @@ ScTextWndBase* lcl_chooseRuntimeImpl( Window* pParent, SfxBindings* pBind )
 
 ScInputWindow::ScInputWindow( Window* pParent, SfxBindings* pBind ) :
 // mit WB_CLIPCHILDREN, sonst Flicker
-        ToolBox         ( pParent, WinBits(WB_BORDER|WB_3DLOOK|WB_CLIPCHILDREN) ),
+        ToolBox         ( pParent, WinBits(WB_CLIPCHILDREN) ),
         aWndPos         ( this ),
         pRuntimeWindow ( lcl_chooseRuntimeImpl( this, pBind ) ),
         aTextWindow    ( *pRuntimeWindow ),
@@ -535,6 +537,19 @@ void ScInputWindow::Select()
     }
 }
 
+void ScInputWindow::Paint( const Rectangle& rRect )
+{
+    ToolBox::Paint( rRect );
+
+    // draw a line at the bottom to distinguish that from the grid
+    // (we have space for that thanks to ADDITIONAL_BORDER)
+    const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
+    SetLineColor( rStyleSettings.GetShadowColor() );
+
+    Size aSize = GetSizePixel();
+    DrawLine( Point( 0, aSize.Height() - 1 ), Point( aSize.Width() - 1, aSize.Height() - 1 ) );
+}
+
 void ScInputWindow::Resize()
 {
     ToolBox::Resize();
@@ -542,7 +557,7 @@ void ScInputWindow::Resize()
     {
         aTextWindow.Resize();
         Size aSize = GetSizePixel();
-        aSize.Height() = CalcWindowSizePixel().Height();
+        aSize.Height() = CalcWindowSizePixel().Height() + ADDITIONAL_BORDER;
         ScInputBarGroup* pGroupBar = dynamic_cast< ScInputBarGroup* > ( pRuntimeWindow.get() );
         if ( pGroupBar )
         {
@@ -553,7 +568,7 @@ void ScInputWindow::Resize()
             // then the largest item ( e.g. the GroupBar window ) will actually be
             // positioned such that the toolbar will cut off the bottom of that item
             if ( pGroupBar->GetNumLines() > 1 )
-                aSize.Height() += pGroupBar->GetVertOffset();
+                aSize.Height() += pGroupBar->GetVertOffset() + ADDITIONAL_SPACE;
         }
         SetSizePixel(aSize);
         Invalidate();
diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx
index 0efc497..ed94aed 100644
--- a/sc/source/ui/inc/inputwin.hxx
+++ b/sc/source/ui/inc/inputwin.hxx
@@ -254,6 +254,7 @@ public:
                     ScInputWindow( Window* pParent, SfxBindings* pBind );
     virtual         ~ScInputWindow();
 
+    virtual void    Paint( const Rectangle& rRect );
     virtual void    Resize();
     virtual void    Select();
 
commit e280b01cafdfd5c7c3b5660a8e9031a9eeb2865c
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Fri Aug 10 13:32:48 2012 +0200

    Draw separating line at the top of the status bar.
    
    This makes the status bar optically one pixel smaller; which is correct,
    because the new icons used there are one pixel smaller too ;-)
    
    This also kills IsTopBorder() and IsBottomBorder(), as they always returned
    'false' anyway.
    
    Change-Id: I94c87e8d4ac1ff3c4df57b17e530f3b087efa1e1

diff --git a/vcl/inc/vcl/status.hxx b/vcl/inc/vcl/status.hxx
index ac28972..f181e4b 100644
--- a/vcl/inc/vcl/status.hxx
+++ b/vcl/inc/vcl/status.hxx
@@ -101,7 +101,6 @@ private:
     sal_Bool                mbFormat;
     sal_Bool                mbProgressMode;
     sal_Bool                mbInUserDraw;
-    sal_Bool                mbBottomBorder;
     Link                maClickHdl;
     Link                maDoubleClickHdl;
 
@@ -173,9 +172,6 @@ public:
     void                SetHelpId( sal_uInt16 nItemId, const rtl::OString& rHelpId );
     rtl::OString        GetHelpId( sal_uInt16 nItemId ) const;
 
-    sal_Bool                IsBottomBorder() const { return mbBottomBorder; }
-    sal_Bool                IsTopBorder() const;
-
     void                StartProgressMode( const XubString& rText );
     void                SetProgressValue( sal_uInt16 nPercent );
     void                EndProgressMode();
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index e7ffdff..51c01c9 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -60,14 +60,12 @@ public:
 
     VirtualDevice*      mpVirDev;
     long                mnItemBorderWidth;
-    bool                mbTopBorder:1;
     bool                mbDrawItemFrames:1;
 };
 
 StatusBar::ImplData::ImplData()
 {
     mpVirDev = NULL;
-    mbTopBorder = false;
     mbDrawItemFrames = false;
     mnItemBorderWidth = 0;
 }
@@ -152,7 +150,6 @@ void StatusBar::ImplInit( Window* pParent, WinBits nStyle )
     mbVisibleItems  = sal_True;
     mbProgressMode  = sal_False;
     mbInUserDraw    = sal_False;
-    mbBottomBorder  = sal_False;
     mnItemsWidth    = STATUSBAR_OFFSET_X;
     mnDX            = 0;
     mnDY            = 0;
@@ -335,8 +332,6 @@ Rectangle StatusBar::ImplGetItemRectPos( sal_uInt16 nPos ) const
             aRect.Right()  = aRect.Left() + pItem->mnWidth + pItem->mnExtraWidth;
             aRect.Top()    = mnItemY;
             aRect.Bottom() = mnCalcHeight - STATUSBAR_OFFSET_Y;
-            if( IsTopBorder() )
-                aRect.Bottom()+=2;
         }
     }
 
@@ -658,8 +653,6 @@ void StatusBar::ImplCalcProgressRect()
     maPrgsFrameRect.Left()      = maPrgsTxtPos.X()+aPrgsTxtSize.Width()+STATUSBAR_OFFSET;
     maPrgsFrameRect.Top()       = mnItemY;
     maPrgsFrameRect.Bottom()    = mnCalcHeight - STATUSBAR_OFFSET_Y;
-    if( IsTopBorder() )
-        maPrgsFrameRect.Bottom()+=2;
 
     // calculate size of progress rects
     mnPrgsSize = maPrgsFrameRect.Bottom()-maPrgsFrameRect.Top()-(STATUSBAR_PRGS_OFFSET*2);
@@ -767,24 +760,11 @@ void StatusBar::Paint( const Rectangle& )
         }
     }
 
-    // draw borders
-    if( IsTopBorder() )
-    {
-        const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
-        SetLineColor( rStyleSettings.GetShadowColor() );
-        DrawLine( Point( 0, 0 ), Point( mnDX-1, 0 ) );
-        SetLineColor( rStyleSettings.GetLightColor() );
-        DrawLine( Point( 0, 1 ), Point( mnDX-1, 1 ) );
-    }
-
-    if ( IsBottomBorder() )
-    {
-        const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
-        SetLineColor( rStyleSettings.GetShadowColor() );
-        DrawLine( Point( 0, mnDY-2 ), Point( mnDX-1, mnDY-2 ) );
-        SetLineColor( rStyleSettings.GetLightColor() );
-        DrawLine( Point( 0, mnDY-1 ), Point( mnDX-1, mnDY-1 ) );
-    }
+    // draw line at the top of the status bar (to visually distinguish it from
+    // shell / docking area)
+    const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
+    SetLineColor( rStyleSettings.GetShadowColor() );
+    DrawLine( Point( 0, 0 ), Point( mnDX-1, 0 ) );
 }
 
 // -----------------------------------------------------------------------
@@ -803,18 +783,9 @@ void StatusBar::Resize()
     mnDX = aSize.Width() - ImplGetSVData()->maNWFData.mnStatusBarLowerRightOffset;
     mnDY = aSize.Height();
     mnCalcHeight = mnDY;
-    // subtract border
-    if( IsTopBorder() )
-        mnCalcHeight -= 2;
-    if ( IsBottomBorder() )
-        mnCalcHeight -= 2;
 
     mnItemY = STATUSBAR_OFFSET_Y;
-    if( IsTopBorder() )
-        mnItemY += 2;
     mnTextY = (mnCalcHeight-GetTextHeight())/2;
-    if( IsTopBorder() )
-        mnTextY += 2;
 
     // Formatierung neu ausloesen
     mbFormat = sal_True;
@@ -1338,13 +1309,6 @@ rtl::OString StatusBar::GetHelpId( sal_uInt16 nItemId ) const
     return aRet;
 }
 
-sal_Bool StatusBar::IsTopBorder() const
-{
-    return mpImplData->mbTopBorder;
-}
-
-// -----------------------------------------------------------------------
-
 void StatusBar::StartProgressMode( const XubString& rText )
 {
     DBG_ASSERT( !mbProgressMode, "StatusBar::StartProgressMode(): progress mode is active" );
@@ -1498,12 +1462,6 @@ Size StatusBar::CalcWindowSizePixel() const
     if( nCalcHeight < nProgressHeight+2 )
         nCalcHeight = nProgressHeight+2;
 
-    // add border
-    if( IsTopBorder() )
-        nCalcHeight += 2;
-    if ( IsBottomBorder() )
-        nCalcHeight += 2;
-
     return Size( nCalcWidth, nCalcHeight );
 }
 
commit 9b10ef9fc39dc0251b03d6d9285bb86aab29abee
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Fri Aug 10 12:34:00 2012 +0200

    Revert the TOPBOTTOM border window type, this needs another approach.
    
    This reverts commit 51fdf273e9893d3d05c99a09e1c2e5835a78e891.
    
    In order to be able to draw the toolbars docked on the left or on the right
    nicely and reliably, we have to avoid any border in the shell; instead, the
    docking areas will draw the separating lines (when finished).
    
    Change-Id: I74c18a7e471a66ac0a436c2bf01f5be016280d22

diff --git a/sfx2/source/view/impviewframe.hxx b/sfx2/source/view/impviewframe.hxx
index 079b84a..aaf94e4 100644
--- a/sfx2/source/view/impviewframe.hxx
+++ b/sfx2/source/view/impviewframe.hxx
@@ -78,7 +78,6 @@ public:
                             Window( &rParent, nBits | WB_BORDER | WB_CLIPCHILDREN ),
                             pFrame( p )
                         {
-                            SetBorderStyle( WINDOW_BORDER_TOPBOTTOM );
                             p->GetFrame().GetWindow().SetBorderStyle( WINDOW_BORDER_NOBORDER );
                         }
 
diff --git a/vcl/inc/vcl/decoview.hxx b/vcl/inc/vcl/decoview.hxx
index cb66422..add5d20 100644
--- a/vcl/inc/vcl/decoview.hxx
+++ b/vcl/inc/vcl/decoview.hxx
@@ -43,8 +43,7 @@ class OutputDevice;
 #define FRAME_DRAW_GROUP                    ((sal_uInt16)0x0003)
 #define FRAME_DRAW_DOUBLEIN                 ((sal_uInt16)0x0004)
 #define FRAME_DRAW_DOUBLEOUT                ((sal_uInt16)0x0005)
-#define FRAME_DRAW_TOPBOTTOM                ((sal_uInt16)0x0006)
-#define FRAME_DRAW_NWF                      ((sal_uInt16)0x0007)
+#define FRAME_DRAW_NWF                      ((sal_uInt16)0x0006)
 #define FRAME_DRAW_MENU                     ((sal_uInt16)0x0010)
 #define FRAME_DRAW_WINDOWBORDER             ((sal_uInt16)0x0020)
 #define FRAME_DRAW_BORDERWINDOWBORDER       ((sal_uInt16)0x0040)
diff --git a/vcl/inc/vcl/window.hxx b/vcl/inc/vcl/window.hxx
index aaf7f3a..63b5025 100644
--- a/vcl/inc/vcl/window.hxx
+++ b/vcl/inc/vcl/window.hxx
@@ -290,8 +290,7 @@ typedef sal_uInt16 StateChangedType;
 #define WINDOW_BORDER_NORMAL            ((sal_uInt16)0x0001)
 #define WINDOW_BORDER_MONO              ((sal_uInt16)0x0002)
 #define WINDOW_BORDER_MENU              ((sal_uInt16)0x0010)
-#define WINDOW_BORDER_TOPBOTTOM         ((sal_uInt16)0x0020)
-#define WINDOW_BORDER_NWF               ((sal_uInt16)0x0040)
+#define WINDOW_BORDER_NWF               ((sal_uInt16)0x0020)
 #define WINDOW_BORDER_NOBORDER          ((sal_uInt16)0x1000)
 #define WINDOW_BORDER_REMOVEBORDER      ((sal_uInt16)0x2000)
 
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index 94a21e9..527c31c 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -1200,8 +1200,6 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei
             // ist, dann Border nach aussen
             if ( mpBorderWindow->mbSmallOutBorder )
                 nStyle |= FRAME_DRAW_DOUBLEOUT;
-            else if ( nBorderStyle & WINDOW_BORDER_TOPBOTTOM )
-                nStyle |= FRAME_DRAW_TOPBOTTOM;
             else if ( nBorderStyle & WINDOW_BORDER_NWF )
                 nStyle |= FRAME_DRAW_NWF;
             else
@@ -1382,8 +1380,6 @@ void ImplSmallBorderWindowView::DrawWindow( sal_uInt16 nDrawFlags, OutputDevice*
         // ist, dann Border nach aussen
         if ( mpBorderWindow->mbSmallOutBorder )
             nStyle |= FRAME_DRAW_DOUBLEOUT;
-        else if ( nBorderStyle & WINDOW_BORDER_TOPBOTTOM )
-            nStyle |= FRAME_DRAW_TOPBOTTOM;
         else if ( nBorderStyle & WINDOW_BORDER_NWF )
             nStyle |= FRAME_DRAW_NWF;
         else
diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx
index 4c71722..2825959 100644
--- a/vcl/source/window/decoview.cxx
+++ b/vcl/source/window/decoview.cxx
@@ -736,11 +736,6 @@ void ImplDrawFrame( OutputDevice *const pDev, Rectangle& rRect,
                     rRect.Bottom() -= 2;
                     break;
 
-                case FRAME_DRAW_TOPBOTTOM:
-                    ++rRect.Top();
-                    --rRect.Bottom();
-                    break;
-
                 case FRAME_DRAW_NWF:
                     // enough space for the native rendering
                     rRect.Left() += 4;
@@ -830,16 +825,6 @@ void ImplDrawFrame( OutputDevice *const pDev, Rectangle& rRect,
                     }
                     break;
 
-                case FRAME_DRAW_TOPBOTTOM:
-                    pDev->SetLineColor( rStyleSettings.GetShadowColor() );
-                    pDev->DrawLine( Point( rRect.Left(), rRect.Top() ), Point( rRect.Right(), rRect.Top() ) );
-                    pDev->DrawLine( Point( rRect.Left(), rRect.Bottom() ), Point( rRect.Right(), rRect.Bottom() ) );
-
-                    // adjust target rectangle
-                    ++rRect.Top();
-                    --rRect.Bottom();
-                    break;
-
                 case FRAME_DRAW_NWF:
                     // no rendering, just enough space for the native rendering
                     rRect.Left() += 4;
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 4d8ba82..a0ccfb6 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -1184,16 +1184,10 @@ sal_Bool GtkSalGraphics::getNativeControlRegion(  ControlType nType,
 
         if( nStyle & FRAME_DRAW_NODRAW )
         {
-            if( (nStyle & FRAME_DRAW_TOPBOTTOM) == FRAME_DRAW_TOPBOTTOM )
-                rNativeContentRegion = Rectangle(x1,
-                                                 y1+frameWidth,
-                                                 x2,
-                                                 y2-frameWidth);
-            else
-                rNativeContentRegion = Rectangle(x1+frameWidth,
-                                                 y1+frameWidth,
-                                                 x2-frameWidth,
-                                                 y2-frameWidth);
+            rNativeContentRegion = Rectangle(x1+frameWidth,
+                                             y1+frameWidth,
+                                             x2-frameWidth,
+                                             y2-frameWidth);
         }
         else
             rNativeContentRegion = rControlRegion;


More information about the Libreoffice-commits mailing list