From 41dbf08b99c259b387e95e9143b88b508724d945 Mon Sep 17 00:00:00 2001 From: Chris Sherlock Date: Sat, 13 Jul 2019 13:10:20 +1000 Subject: tdf#74702: use OutputDevice::GetBackgroundColor() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apply the Liskov substitution principle to OutputDevice::GetBackgroundColor(). This helps in SmTmpDevice::Impl_GetColor() because it no longer needs to know about what type of OutputDevice it is calling to get the background color. This forced a rename of basctl::ModulWindowLayout::GetBackgroundColor() to be GetSyntaxBackgroundColor(), but this is a happy coincidence as it makes the function intent clearer anyway. Change-Id: I11298a63cb01c187f3a8a4a2c9e90eacda6c3e6b Reviewed-on: https://gerrit.libreoffice.org/75521 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl --- toolkit/source/awt/vclxwindow.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toolkit') diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx index 04c8cffc2a2b..d632fc13036b 100644 --- a/toolkit/source/awt/vclxwindow.cxx +++ b/toolkit/source/awt/vclxwindow.cxx @@ -2012,7 +2012,7 @@ css::uno::Any VCLXWindow::getProperty( const OUString& PropertyName ) aProp <<= GetWindow()->GetControlBackground(); break; case BASEPROPERTY_DISPLAYBACKGROUNDCOLOR: - aProp <<= GetWindow()->GetDisplayBackground().GetColor(); + aProp <<= GetWindow()->GetBackgroundColor(); break; case BASEPROPERTY_FONTRELIEF: aProp <<= static_cast(GetWindow()->GetControlFont().GetRelief()); -- cgit