[PATCH 1/2] DecoView cleanup - remove unused button styles
Matteo Casalin
matteo.casalin at poste.it
Sun Dec 4 14:20:40 PST 2011
---
vcl/inc/vcl/decoview.hxx | 5 +----
vcl/source/window/decoview.cxx | 29 +++++------------------------
2 files changed, 6 insertions(+), 28 deletions(-)
diff --git a/vcl/inc/vcl/decoview.hxx b/vcl/inc/vcl/decoview.hxx
index 63434be..64b738e 100644
--- a/vcl/inc/vcl/decoview.hxx
+++ b/vcl/inc/vcl/decoview.hxx
@@ -76,12 +76,9 @@ class OutputDevice;
#define BUTTON_DRAW_DISABLED ((sal_uInt16)0x0080)
#define BUTTON_DRAW_HIGHLIGHT ((sal_uInt16)0x0100)
#define BUTTON_DRAW_FLAT ((sal_uInt16)0x0200)
-#define BUTTON_DRAW_NOTOPLIGHTBORDER ((sal_uInt16)0x0400)
-#define BUTTON_DRAW_NOBOTTOMSHADOWBORDER ((sal_uInt16)0x0800)
#define BUTTON_DRAW_NOLEFTLIGHTBORDER ((sal_uInt16)0x1000)
#define BUTTON_DRAW_NOTEXT ((sal_uInt16)0x2000)
-#define BUTTON_DRAW_NOIMAGE ((sal_uInt16)0x4000)
-#define BUTTON_DRAW_NODRAW ((sal_uInt16)0x8000)
+#define BUTTON_DRAW_NOIMAGE ((sal_uInt16)0x4000)
// ------------------
// - DecorationView -
diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx
index ec46b89..1958cd6 100644
--- a/vcl/source/window/decoview.cxx
+++ b/vcl/source/window/decoview.cxx
@@ -589,22 +589,6 @@ void ImplDrawButton( OutputDevice *const pDev, Rectangle aFillRect,
}
else
{
- if ( nStyle & BUTTON_DRAW_NOTOPLIGHTBORDER )
- {
- pDev->SetLineColor( rStyleSettings.GetLightBorderColor() );
- pDev->DrawLine( Point( aFillRect.Left(), aFillRect.Top()),
- Point( aFillRect.Right(), aFillRect.Top() ) );
- ++aFillRect.Top();
- }
- if ( (( (nStyle & BUTTON_DRAW_NOBOTTOMSHADOWBORDER) | BUTTON_DRAW_FLAT) == (BUTTON_DRAW_NOBOTTOMSHADOWBORDER | BUTTON_DRAW_FLAT)) &&
- !(nStyle & BUTTON_DRAW_HIGHLIGHT) )
- {
- pDev->SetLineColor( rStyleSettings.GetDarkShadowColor() );
- pDev->DrawLine( Point( aFillRect.Left(), aFillRect.Bottom() ),
- Point( aFillRect.Right(), aFillRect.Bottom() ) );
- --aFillRect.Bottom();
- }
-
if ( nStyle & BUTTON_DRAW_NOLIGHTBORDER )
aColor1 = rStyleSettings.GetLightBorderColor();
else
@@ -1024,14 +1008,11 @@ Rectangle DecorationView::DrawButton( const Rectangle& rRect, sal_uInt16 nStyle
mpOutDev->EnableMapMode( false );
}
- if ( !(nStyle & BUTTON_DRAW_NODRAW) )
- {
- const Color maOldLineColor = mpOutDev->GetLineColor();
- const Color maOldFillColor = mpOutDev->GetFillColor();
- ImplDrawButton( mpOutDev, aRect, nStyle );
- mpOutDev->SetLineColor( maOldLineColor );
- mpOutDev->SetFillColor( maOldFillColor );
- }
+ const Color maOldLineColor = mpOutDev->GetLineColor();
+ const Color maOldFillColor = mpOutDev->GetFillColor();
+ ImplDrawButton( mpOutDev, aRect, nStyle );
+ mpOutDev->SetLineColor( maOldLineColor );
+ mpOutDev->SetFillColor( maOldFillColor );
// Ein Border freilassen, der jedoch bei Default-Darstellung
// mitbenutzt wird
--
1.7.5.4
--------------030709070107080705040907--
More information about the LibreOffice
mailing list