diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-26 09:59:05 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-27 10:15:14 +0100 |
commit | 190de05d55880c303a6161ec9b27a760300ff2ce (patch) | |
tree | 4cff9e144a8bf24e1008533bd63d46f849fbad6f | |
parent | 40c487469b0dcd367ca76a2407f5ef08287dbabb (diff) |
remove unused DrawButtonFlags enum value
Change-Id: I5e1a92d94e5b7963c8162b74f1b67dbbf3eeccc9
Reviewed-on: https://gerrit.libreoffice.org/64063
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | compilerplugins/clang/unusedenumconstants.readonly.results | 2 | ||||
-rw-r--r-- | cui/source/options/optdict.cxx | 13 | ||||
-rw-r--r-- | include/vcl/decoview.hxx | 5 | ||||
-rw-r--r-- | vcl/source/window/decoview.cxx | 30 |
4 files changed, 14 insertions, 36 deletions
diff --git a/compilerplugins/clang/unusedenumconstants.readonly.results b/compilerplugins/clang/unusedenumconstants.readonly.results index 720771de68c1..0bd6ffd899c7 100644 --- a/compilerplugins/clang/unusedenumconstants.readonly.results +++ b/compilerplugins/clang/unusedenumconstants.readonly.results @@ -594,8 +594,6 @@ include/vcl/bitmap.hxx:65 enum BmpDitherFlags Matrix include/vcl/bitmap.hxx:67 enum BmpDitherFlags Floyd16 -include/vcl/decoview.hxx:87 - enum DrawButtonFlags NoFill include/vcl/errinf.hxx:84 enum DialogMask ButtonsYesNo include/vcl/errinf.hxx:87 diff --git a/cui/source/options/optdict.cxx b/cui/source/options/optdict.cxx index 0c3c5d2bd045..ecd11054d07c 100644 --- a/cui/source/options/optdict.cxx +++ b/cui/source/options/optdict.cxx @@ -319,19 +319,6 @@ void SvxEditDictionaryDialog::dispose() } -/* -void SvxEditDictionaryDialog::Paint( const Rectangle& rRect ) -{ - ModalDialog::Paint(rRect ); - - //Rectangle aRect(aEditDictsBox.GetPosPixel(),aEditDictsBox.GetSizePixel()); - - sal_uInt16 nStyle=DrawButtonFlags::NoFill; -// aDecoView.DrawButton( aRect, nStyle); -} -*/ - - void SvxEditDictionaryDialog::SetDicReadonly_Impl( Reference< XDictionary > const &xDic ) { diff --git a/include/vcl/decoview.hxx b/include/vcl/decoview.hxx index f998a993fe78..eccdb084a776 100644 --- a/include/vcl/decoview.hxx +++ b/include/vcl/decoview.hxx @@ -85,8 +85,7 @@ enum class DrawButtonFlags Checked = 0x0008, DontKnow = 0x0010, Mono = 0x0020, - NoFill = 0x0040, - Disabled = 0x0080, + Disabled = 0x0040, Highlight = 0x0100, Flat = 0x0200, NoLeftLightBorder = 0x1000, @@ -95,7 +94,7 @@ enum class DrawButtonFlags }; namespace o3tl { - template<> struct typed_flags<DrawButtonFlags> : is_typed_flags<DrawButtonFlags, 0x73ff> {}; + template<> struct typed_flags<DrawButtonFlags> : is_typed_flags<DrawButtonFlags, 0x737f> {}; } class VCL_DLLPUBLIC DecorationView diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx index c105dc82fc76..c8cfb1d70f3f 100644 --- a/vcl/source/window/decoview.cxx +++ b/vcl/source/window/decoview.cxx @@ -509,15 +509,12 @@ void ImplDrawButton( OutputDevice *const pDev, tools::Rectangle aFillRect, aOrigFillRect.Right(), aOrigFillRect.Bottom() ) ); } - if ( !(nStyle & DrawButtonFlags::NoFill) ) - { - // Hack: in monochrome mode on printers we like to have grey buttons - if ( pDev->GetOutDevType() == OUTDEV_PRINTER ) - pDev->SetFillColor( COL_LIGHTGRAY ); - else - pDev->SetFillColor( COL_WHITE ); - pDev->DrawRect( aFillRect ); - } + // Hack: in monochrome mode on printers we like to have grey buttons + if ( pDev->GetOutDevType() == OUTDEV_PRINTER ) + pDev->SetFillColor( COL_LIGHTGRAY ); + else + pDev->SetFillColor( COL_WHITE ); + pDev->DrawRect( aFillRect ); } else { @@ -574,15 +571,12 @@ void ImplDrawButton( OutputDevice *const pDev, tools::Rectangle aFillRect, ImplDraw2ColorFrame( pDev, aFillRect, aColor1, aColor2 ); } - if ( !(nStyle & DrawButtonFlags::NoFill) ) - { - pDev->SetLineColor(); - if ( nStyle & (DrawButtonFlags::Checked | DrawButtonFlags::DontKnow) ) - pDev->SetFillColor( rStyleSettings.GetCheckedColor() ); - else - pDev->SetFillColor( rStyleSettings.GetFaceColor() ); - pDev->DrawRect( aFillRect ); - } + pDev->SetLineColor(); + if ( nStyle & (DrawButtonFlags::Checked | DrawButtonFlags::DontKnow) ) + pDev->SetFillColor( rStyleSettings.GetCheckedColor() ); + else + pDev->SetFillColor( rStyleSettings.GetFaceColor() ); + pDev->DrawRect( aFillRect ); } } |