summaryrefslogtreecommitdiff
path: root/include/editeng/outliner.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'include/editeng/outliner.hxx')
-rw-r--r--include/editeng/outliner.hxx17
1 files changed, 7 insertions, 10 deletions
diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx
index 1158f7195fea..67d2c47bb222 100644
--- a/include/editeng/outliner.hxx
+++ b/include/editeng/outliner.hxx
@@ -49,6 +49,7 @@
#include <editeng/paragraphdata.hxx>
#include <o3tl/typed_flags_set.hxx>
+#include <boost/optional.hpp>
#include <functional>
#include <memory>
#include <vector>
@@ -497,8 +498,8 @@ private:
Outliner* pOutliner;
const SvxFieldItem& rFldItem;
- std::unique_ptr<Color> pTxtColor;
- std::unique_ptr<Color> pFldColor;
+ boost::optional<Color> mxTxtColor;
+ boost::optional<Color> mxFldColor;
OUString aRepresentation;
@@ -522,15 +523,11 @@ public:
const SvxFieldItem& GetField() const { return rFldItem; }
- Color* GetTextColor() const { return pTxtColor.get(); }
- void SetTextColor( const Color& rColor )
- { pTxtColor.reset( new Color( rColor ) ); }
+ boost::optional<Color> const & GetTextColor() const { return mxTxtColor; }
+ void SetTextColor( boost::optional<Color> xCol ) { mxTxtColor = xCol; }
- Color* GetFieldColor() const { return pFldColor.get(); }
- void SetFieldColor( const Color& rColor )
- { pFldColor.reset( new Color( rColor ) ); }
- void ClearFieldColor()
- { pFldColor.reset(); }
+ boost::optional<Color> const & GetFieldColor() const { return mxFldColor; }
+ void SetFieldColor( boost::optional<Color> xCol ) { mxFldColor = xCol; }
sal_Int32 GetPara() const { return nPara; }
sal_Int32 GetPos() const { return nPos; }