summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-11-30 16:50:00 +0100
committerStephan Bergmann <sbergman@redhat.com>2019-11-30 17:44:34 +0100
commit47dd2c63f649828a833543e21d4eca5866ec9ebe (patch)
tree0b9a64485028cb9c7c0ffc52cad79033b2cb6209 /oox
parent6ddefb080b12f54f84a8de44347a9b1816972ad3 (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 'oox')
-rw-r--r--oox/source/drawingml/shape.cxx2
-rw-r--r--oox/source/drawingml/table/tablecell.cxx4
-rw-r--r--oox/source/drawingml/textparagraphproperties.cxx2
-rw-r--r--oox/source/drawingml/textparagraphpropertiescontext.cxx2
4 files changed, 5 insertions, 5 deletions
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 464961ee5a02..816711ba61d1 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -565,7 +565,7 @@ static void lcl_createPresetShape(const uno::Reference<drawing::XShape>& xShape,
{
ParagraphAdjust eAdjust = ParagraphAdjust_LEFT;
if (pParagraph->getProperties().getParaAdjust())
- eAdjust = pParagraph->getProperties().getParaAdjust().get();
+ eAdjust = *pParagraph->getProperties().getParaAdjust();
xSet->setPropertyValue( "ParaAdjust", uno::makeAny( eAdjust ) );
SvxShape* pShape = comphelper::getUnoTunnelImplementation<SvxShape>( xShape );
assert(pShape);
diff --git a/oox/source/drawingml/table/tablecell.cxx b/oox/source/drawingml/table/tablecell.cxx
index f27117fd2b42..48f73b269e6a 100644
--- a/oox/source/drawingml/table/tablecell.cxx
+++ b/oox/source/drawingml/table/tablecell.cxx
@@ -195,9 +195,9 @@ static void applyTableStylePart( const ::oox::core::XmlFilterBase& rFilterBase,
aTextCharProps.maFillProperties.maFillColor = rTableStylePart.getTextColor();
aTextCharProps.maFillProperties.moFillType.set(XML_solidFill);
}
- if( rTableStylePart.getTextBoldStyle().is_initialized() )
+ if( rTableStylePart.getTextBoldStyle() )
aTextCharProps.moBold = *rTableStylePart.getTextBoldStyle();
- if( rTableStylePart.getTextItalicStyle().is_initialized() )
+ if( rTableStylePart.getTextItalicStyle() )
aTextCharProps.moItalic = *rTableStylePart.getTextItalicStyle();
}
diff --git a/oox/source/drawingml/textparagraphproperties.cxx b/oox/source/drawingml/textparagraphproperties.cxx
index f1c966deeaa4..351ead9fb648 100644
--- a/oox/source/drawingml/textparagraphproperties.cxx
+++ b/oox/source/drawingml/textparagraphproperties.cxx
@@ -477,7 +477,7 @@ void TextParagraphProperties::pushToPropSet( const ::oox::core::XmlFilterBase* p
if ( moParaAdjust )
{
- aPropSet.setProperty( PROP_ParaAdjust, moParaAdjust.get());
+ aPropSet.setProperty( PROP_ParaAdjust, *moParaAdjust);
}
else
{
diff --git a/oox/source/drawingml/textparagraphpropertiescontext.cxx b/oox/source/drawingml/textparagraphpropertiescontext.cxx
index 8e02a7bdb694..fee3d8c50e02 100644
--- a/oox/source/drawingml/textparagraphpropertiescontext.cxx
+++ b/oox/source/drawingml/textparagraphpropertiescontext.cxx
@@ -160,7 +160,7 @@ TextParagraphPropertiesContext::~TextParagraphPropertiesContext()
rPropertyMap.setProperty( PROP_NumberingIsNumber, true);
if( mrTextParagraphProperties.getParaAdjust() )
- rPropertyMap.setProperty( PROP_ParaAdjust, mrTextParagraphProperties.getParaAdjust().get());
+ rPropertyMap.setProperty( PROP_ParaAdjust, *mrTextParagraphProperties.getParaAdjust());
}
ContextHandlerRef TextParagraphPropertiesContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )