diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-11-30 16:50:00 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-11-30 17:44:34 +0100 |
commit | 47dd2c63f649828a833543e21d4eca5866ec9ebe (patch) | |
tree | 0b9a64485028cb9c7c0ffc52cad79033b2cb6209 /sc/source/filter | |
parent | 6ddefb080b12f54f84a8de44347a9b1816972ad3 (diff) |
Rewrite uses of boost::optional
...to only use functions that are also available for std::optional (in
preparation for changing from boost::optional to std::optional):
* uses of get are replaced with operator * or operator ->
* uses of is_initialized are replaced with operator bool
* uses of reset with an argument are replace with operator =
(All of the replacements are also available for boost::optional "since forever",
so this change should not break builds against old --with-system-boost. An
alternative replacement for is_initialized would have been has_value, but that
is only available since Boost 1.68.)
Change-Id: I532687b6a5ee37dab28befb8e0eb05c22cbecf0f
Reviewed-on: https://gerrit.libreoffice.org/84124
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sc/source/filter')
-rw-r--r-- | sc/source/filter/excel/xestyle.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx index 2ee1648432a8..9d52b28fa795 100644 --- a/sc/source/filter/excel/xestyle.cxx +++ b/sc/source/filter/excel/xestyle.cxx @@ -1097,39 +1097,39 @@ void XclExpDxfFont::SaveXml(XclExpXmlStream& rStrm) if (maDxfData.eWeight) { rStyleSheet->singleElement(XML_b, - XML_val, ToPsz10(maDxfData.eWeight.get() != WEIGHT_NORMAL)); + XML_val, ToPsz10(*maDxfData.eWeight != WEIGHT_NORMAL)); } if (maDxfData.eItalic) { - bool bItalic = (maDxfData.eItalic.get() == ITALIC_OBLIQUE) || (maDxfData.eItalic.get() == ITALIC_NORMAL); + bool bItalic = (*maDxfData.eItalic == ITALIC_OBLIQUE) || (*maDxfData.eItalic == ITALIC_NORMAL); rStyleSheet->singleElement(XML_i, XML_val, ToPsz10(bItalic)); } if (maDxfData.eStrike) { bool bStrikeout = - (maDxfData.eStrike.get() == STRIKEOUT_SINGLE) || (maDxfData.eStrike.get() == STRIKEOUT_DOUBLE) || - (maDxfData.eStrike.get() == STRIKEOUT_BOLD) || (maDxfData.eStrike.get() == STRIKEOUT_SLASH) || - (maDxfData.eStrike.get() == STRIKEOUT_X); + (*maDxfData.eStrike == STRIKEOUT_SINGLE) || (*maDxfData.eStrike == STRIKEOUT_DOUBLE) || + (*maDxfData.eStrike == STRIKEOUT_BOLD) || (*maDxfData.eStrike == STRIKEOUT_SLASH) || + (*maDxfData.eStrike == STRIKEOUT_X); rStyleSheet->singleElement(XML_strike, XML_val, ToPsz10(bStrikeout)); } if (maDxfData.bOutline) { - rStyleSheet->singleElement(XML_outline, XML_val, ToPsz10(maDxfData.bOutline.get())); + rStyleSheet->singleElement(XML_outline, XML_val, ToPsz10(*maDxfData.bOutline)); } if (maDxfData.bShadow) { - rStyleSheet->singleElement(XML_shadow, XML_val, ToPsz10(maDxfData.bShadow.get())); + rStyleSheet->singleElement(XML_shadow, XML_val, ToPsz10(*maDxfData.bShadow)); } if (maDxfData.aColor) { rStyleSheet->singleElement(XML_color, - XML_rgb, XclXmlUtils::ToOString(maDxfData.aColor.get())); + XML_rgb, XclXmlUtils::ToOString(*maDxfData.aColor)); } if (maDxfData.nFontHeight) @@ -1140,7 +1140,7 @@ void XclExpDxfFont::SaveXml(XclExpXmlStream& rStrm) if (maDxfData.eUnder) { - const char* pVal = getUnderlineOOXValue(maDxfData.eUnder.get()); + const char* pVal = getUnderlineOOXValue(*maDxfData.eUnder); rStyleSheet->singleElement(XML_u, XML_val, pVal); } |