summaryrefslogtreecommitdiff
path: root/include
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 /include
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 'include')
-rw-r--r--include/svx/dialcontrol.hxx2
-rw-r--r--include/vcl/outdev.hxx1
-rw-r--r--include/vcl/print.hxx2
-rw-r--r--include/vcl/window.hxx2
4 files changed, 6 insertions, 1 deletions
diff --git a/include/svx/dialcontrol.hxx b/include/svx/dialcontrol.hxx
index c15e0ae92e3c..53976b86c606 100644
--- a/include/svx/dialcontrol.hxx
+++ b/include/svx/dialcontrol.hxx
@@ -43,9 +43,9 @@ public:
void DrawBackground( const Size& rSize, bool bEnabled );
void DrawBackground();
void DrawElements( const OUString& rText, sal_Int32 nAngle );
+ Color GetBackgroundColor() const override;
private:
- const Color& GetBackgroundColor() const;
const Color& GetTextColor() const;
const Color& GetScaleLineColor() const;
const Color& GetButtonLineColor() const;
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 8d385e003dd2..cac19b490fa3 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -629,6 +629,7 @@ public:
const Point& rPos, const Size& rSize, const Size& rBackgroundSize) const;
const Wallpaper& GetBackground() const { return maBackground; }
+ virtual Color GetBackgroundColor() const;
bool IsBackground() const { return mbBackground; }
void SetFont( const vcl::Font& rNewFont );
diff --git a/include/vcl/print.hxx b/include/vcl/print.hxx
index 957d97b49a61..854c08d96660 100644
--- a/include/vcl/print.hxx
+++ b/include/vcl/print.hxx
@@ -289,6 +289,8 @@ public:
PrinterSetupMode eMode = PrinterSetupMode::DocumentGlobal);
bool SetPrinterProps( const Printer* pPrinter );
+ Color GetBackgroundColor() const override { return COL_WHITE; }
+
/** SetPrinterOptions is used internally only now
in earlier times it was used only to set the options loaded directly from the configuration
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index ce8669895fe5..a93b1da700a8 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -764,6 +764,8 @@ public:
::OutputDevice const* GetOutDev() const;
::OutputDevice* GetOutDev();
+ Color GetBackgroundColor() const override;
+
virtual void EnableRTL ( bool bEnable = true ) override;
virtual void MouseMove( const MouseEvent& rMEvt );
virtual void MouseButtonDown( const MouseEvent& rMEvt );