diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2019-07-13 13:10:20 +1000 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2019-08-08 13:03:01 +0200 |
commit | 41dbf08b99c259b387e95e9143b88b508724d945 (patch) | |
tree | 95809c129da81a78d484836d32195effe780221b /basctl/source/basicide | |
parent | 7e88bc73030c7708f1a8b47491070aae5b73aac1 (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 'basctl/source/basicide')
-rw-r--r-- | basctl/source/basicide/baside2.hxx | 2 | ||||
-rw-r--r-- | basctl/source/basicide/baside2b.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx index 7fd23faa304f..dadcf639c666 100644 --- a/basctl/source/basicide/baside2.hxx +++ b/basctl/source/basicide/baside2.hxx @@ -418,7 +418,7 @@ public: public: void BasicAddWatch (OUString const&); void BasicRemoveWatch (); - Color const & GetBackgroundColor () const { return aSyntaxColors.GetBackgroundColor(); } + Color const & GetSyntaxBackgroundColor () const { return aSyntaxColors.GetBackgroundColor(); } Color const & GetFontColor () const { return aSyntaxColors.GetFontColor(); } Color const & GetSyntaxColor (TokenType eType) const { return aSyntaxColors.GetColor(eType); } diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index 4421e78cb6ff..57c18788319f 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -235,7 +235,7 @@ EditorWindow::EditorWindow (vcl::Window* pParent, ModulWindow* pModulWindow) : bDelayHighlight(true), pCodeCompleteWnd(VclPtr<CodeCompleteWindow>::Create(this)) { - SetBackground(Wallpaper(rModulWindow.GetLayout().GetBackgroundColor())); + SetBackground(Wallpaper(rModulWindow.GetLayout().GetSyntaxBackgroundColor())); SetPointer( PointerStyle::Text ); SetHelpId( HID_BASICIDE_EDITORWINDOW ); |