diff options
Diffstat (limited to 'editeng/source')
-rw-r--r-- | editeng/source/editeng/impedit.cxx | 2 | ||||
-rw-r--r-- | editeng/source/editeng/impedit.hxx | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx index 2c18762e1f9d..9e82cedf32f4 100644 --- a/editeng/source/editeng/impedit.cxx +++ b/editeng/source/editeng/impedit.cxx @@ -214,7 +214,7 @@ ImpEditView::~ImpEditView() void ImpEditView::SetBackgroundColor( const Color& rColor ) { - pBackgroundColor.reset( new Color( rColor ) ); + mxBackgroundColor = rColor; } void ImpEditView::RegisterViewShell(OutlinerViewShell* pViewShell) diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index 921c0dfe5498..dc28f3db2a65 100644 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -257,7 +257,7 @@ class ImpEditView : public vcl::unohelper::DragAndDropClient private: EditView* pEditView; std::unique_ptr<vcl::Cursor, o3tl::default_delete<vcl::Cursor>> pCursor; - std::unique_ptr<Color> pBackgroundColor; + std::optional<Color> mxBackgroundColor; /// Containing view shell, if any. OutlinerViewShell* mpViewShell; /// Another shell, just listening to our state, if any. @@ -436,9 +436,9 @@ public: bool DoAutoHeight() const { return bool( nControl & EVControlBits::AUTOSIZEY); } bool DoInvalidateMore() const { return bool( nControl & EVControlBits::INVONEMORE ); } - void SetBackgroundColor( const Color& rColor ); - const Color& GetBackgroundColor() const { - return ( pBackgroundColor ? *pBackgroundColor : pOutWin->GetBackground().GetColor() ); } + void SetBackgroundColor( const Color& rColor ); + const Color & GetBackgroundColor() const { + return ( mxBackgroundColor ? *mxBackgroundColor : pOutWin->GetBackground().GetColor() ); } /// Informs this edit view about which view shell contains it. void RegisterViewShell(OutlinerViewShell* pViewShell); |