diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2019-06-16 14:19:09 +0000 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2019-06-18 20:27:49 +0200 |
commit | 4a478227f5af8322164ecce66fd056e9bf2eac89 (patch) | |
tree | 718e3049e6a8e6d8c2c14c329d48832d78c1cdd8 /vcl/headless | |
parent | 17c91a53d25c0b82524e04a0c108f8e0abc76685 (diff) |
VCL cleanup WidgetDrawInterface
I don't understand why WidgetDrawInterface, which is basically a
copy of the SalGraphics native controls interface, duplicated it,
instead of cleaning things up.
The whole commit message of commit 8fcfa3853a81, which added this
code, is just: "custom widgets: Custom Widget Themes". That's it.
So this patch does, what the original one skipped: replacing the
SalGraphics interface with the WidgetDrawInterface. One result is
the addition of handleDamage to SalGraphics to correctly handle
the damage done by a custom widget theme to the underlying
SalGraphics implementation.
Change-Id: I5fda1a64b28e6560fb3c62e02b6dcda827f698e2
Reviewed-on: https://gerrit.libreoffice.org/74118
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'vcl/headless')
-rw-r--r-- | vcl/headless/svpframe.cxx | 2 | ||||
-rw-r--r-- | vcl/headless/svpgdi.cxx | 63 |
2 files changed, 1 insertions, 64 deletions
diff --git a/vcl/headless/svpframe.cxx b/vcl/headless/svpframe.cxx index f54103ff1ecc..4259a84d5a0b 100644 --- a/vcl/headless/svpframe.cxx +++ b/vcl/headless/svpframe.cxx @@ -441,7 +441,7 @@ void SvpSalFrame::UpdateSettings( AllSettings& rSettings ) } rSettings.SetStyleSettings(aStyleSettings); #ifndef IOS // For now... - pGraphics->updateSettings(rSettings); + pGraphics->UpdateSettings(rSettings); #endif if (bFreeGraphics) ReleaseGraphics(pGraphics); diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx index 0f6fda87fd5b..b335d2ed630b 100644 --- a/vcl/headless/svpgdi.cxx +++ b/vcl/headless/svpgdi.cxx @@ -1866,69 +1866,6 @@ bool SvpSalGraphics::drawEPS( long, long, long, long, void*, sal_uInt32 ) return false; } -/* Widget drawing */ - -bool SvpSalGraphics::IsNativeControlSupported(ControlType eType, ControlPart ePart) -{ - if (hasWidgetDraw()) - return m_pWidgetDraw->isNativeControlSupported(eType, ePart); - - return false; -} - -bool SvpSalGraphics::hitTestNativeControl(ControlType eType, ControlPart ePart, - const tools::Rectangle& rBoundingControlRegion, - const Point& rPosition, bool& rIsInside) -{ - if (hasWidgetDraw()) - { - return m_pWidgetDraw->hitTestNativeControl(eType, ePart, rBoundingControlRegion, rPosition, rIsInside); - } - - return false; -} - -bool SvpSalGraphics::drawNativeControl(ControlType eType, ControlPart ePart, - const tools::Rectangle& rControlRegion, - ControlState eState, const ImplControlValue& aValue, - const OUString& aCaptions) -{ - if (hasWidgetDraw()) - { - bool bReturn = m_pWidgetDraw->drawNativeControl(eType, ePart, rControlRegion, - eState, aValue, aCaptions); - return bReturn; - } - - return false; -} - -bool SvpSalGraphics::getNativeControlRegion(ControlType eType, ControlPart ePart, - const tools::Rectangle& rBoundingControlRegion, - ControlState eState, - const ImplControlValue& aValue, - const OUString& aCaption, - tools::Rectangle& rNativeBoundingRegion, - tools::Rectangle& rNativeContentRegion) -{ - if (hasWidgetDraw()) - { - return m_pWidgetDraw->getNativeControlRegion(eType, ePart, rBoundingControlRegion, - eState, aValue, aCaption, - rNativeBoundingRegion, rNativeContentRegion); - } - - return false; -} - -void SvpSalGraphics::updateSettings(AllSettings& rSettings) -{ - if (hasWidgetDraw()) - { - m_pWidgetDraw->updateSettings(rSettings); - } -} - namespace { bool isCairoCompatible(const BitmapBuffer* pBuffer) |