diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-05-09 12:17:08 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-05-10 08:42:37 +0200 |
commit | 5c9ae702b42745bf6963d1cbb4e779b66ade0825 (patch) | |
tree | 323545cbc5386b483067030b66cf5ca07bc25e45 /editeng/inc | |
parent | c5f8a296fcfc08f8ac441cb8300a7565caa50b53 (diff) |
store Color using boost::optional in EditCharAttribField
Change-Id: If4af5991be51cdb035c0bc0fb7668844df703073
Reviewed-on: https://gerrit.libreoffice.org/54022
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'editeng/inc')
-rw-r--r-- | editeng/inc/editattr.hxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/editeng/inc/editattr.hxx b/editeng/inc/editattr.hxx index b93c0bdd5f3a..fd0e0de509c2 100644 --- a/editeng/inc/editattr.hxx +++ b/editeng/inc/editattr.hxx @@ -22,8 +22,9 @@ #include <editeng/eeitem.hxx> #include <svl/poolitem.hxx> +#include <boost/optional.hpp> +#include <tools/color.hxx> -class Color; class SvxFont; class SvxFontItem; class SvxWeightItem; @@ -363,8 +364,8 @@ public: class EditCharAttribField: public EditCharAttrib { OUString aFieldValue; - Color* pTxtColor; - Color* pFldColor; + boost::optional<Color> mxTxtColor; + boost::optional<Color> mxFldColor; EditCharAttribField& operator = ( const EditCharAttribField& rAttr ) = delete; @@ -378,8 +379,8 @@ public: { return !(operator == ( rAttr ) ); } virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ) override; - Color*& GetTextColor() { return pTxtColor; } - Color*& GetFieldColor() { return pFldColor; } + boost::optional<Color>& GetTextColor() { return mxTxtColor; } + boost::optional<Color>& GetFieldColor() { return mxFldColor; } const OUString& GetFieldValue() const { return aFieldValue;} void SetFieldValue(const OUString& rVal); |