summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2019-07-13 13:10:20 +1000
committerTomaž Vajngerl <quikee@gmail.com>2019-08-08 13:03:01 +0200
commit41dbf08b99c259b387e95e9143b88b508724d945 (patch)
tree95809c129da81a78d484836d32195effe780221b /starmath
parent7e88bc73030c7708f1a8b47491070aae5b73aac1 (diff)
tdf#74702: use OutputDevice::GetBackgroundColor()
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 <quikee@gmail.com>
Diffstat (limited to 'starmath')
-rw-r--r--starmath/source/tmpdevice.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/starmath/source/tmpdevice.cxx b/starmath/source/tmpdevice.cxx
index d69dc0be2c89..778d9196ad35 100644
--- a/starmath/source/tmpdevice.cxx
+++ b/starmath/source/tmpdevice.cxx
@@ -54,9 +54,7 @@ Color SmTmpDevice::Impl_GetColor( const Color& rColor )
nNewCol = COL_BLACK;
else
{
- Color aBgCol( rOutDev.GetBackground().GetColor() );
- if (OUTDEV_WINDOW == rOutDev.GetOutDevType())
- aBgCol = static_cast<vcl::Window &>(rOutDev).GetDisplayBackground().GetColor();
+ Color aBgCol(rOutDev.GetBackgroundColor());
nNewCol = SM_MOD()->GetColorConfig().GetColorValue(svtools::FONTCOLOR).nColor;