[Libreoffice-commits] core.git: compilerplugins/clang cui/source include/vcl vcl/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Nov 27 09:15:39 UTC 2018
compilerplugins/clang/unusedenumconstants.readonly.results | 2
cui/source/options/optdict.cxx | 13 -----
include/vcl/decoview.hxx | 5 --
vcl/source/window/decoview.cxx | 30 +++++--------
4 files changed, 14 insertions(+), 36 deletions(-)
New commits:
commit 190de05d55880c303a6161ec9b27a760300ff2ce
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon Nov 26 09:59:05 2018 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Nov 27 10:15:14 2018 +0100
remove unused DrawButtonFlags enum value
Change-Id: I5e1a92d94e5b7963c8162b74f1b67dbbf3eeccc9
Reviewed-on: https://gerrit.libreoffice.org/64063
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
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 );
}
}
More information about the Libreoffice-commits
mailing list