summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-11-30 14:01:46 +0100
committerStephan Bergmann <sbergman@redhat.com>2019-11-30 15:00:29 +0100
commitd0e040698de6a88793f4ddd3b257a3dde0644b2f (patch)
tree133076f04c18f6d1445a8b48eeea996881e5bb91 /oox
parentd86cfcaf709638d73fcb0de5067b902dab7a7f2f (diff)
Assign bool directly to boost::optional<bool>
...instead of going via boost::optional<sal_Bool>. (In preparation of replacing boost::optional with std::optional, which doesn't support implicit conversion from std::optional<sal_Bool> to std::optional<bool>.) Change-Id: I5dd74dd1c6346c99bd3e2a9b1156c9fce56db77c Reviewed-on: https://gerrit.libreoffice.org/84116 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/table/tableproperties.cxx9
-rw-r--r--oox/source/drawingml/table/tablestyletextstylecontext.cxx8
2 files changed, 8 insertions, 9 deletions
diff --git a/oox/source/drawingml/table/tableproperties.cxx b/oox/source/drawingml/table/tableproperties.cxx
index b6f9a8a59cfc..b6d8bf378127 100644
--- a/oox/source/drawingml/table/tableproperties.cxx
+++ b/oox/source/drawingml/table/tableproperties.cxx
@@ -135,11 +135,10 @@ static void SetTableStyleProperties(const std::unique_ptr<TableStyle> &pTableSty
pTableStyle->getBand1V().getFillProperties() = pBand1HFillProperties;
//tet bold for 1st row/last row/column
- ::boost::optional< sal_Bool > textBoldStyle(true);
- pTableStyle->getFirstRow().getTextBoldStyle() = textBoldStyle;
- pTableStyle->getLastRow().getTextBoldStyle() = textBoldStyle;
- pTableStyle->getFirstCol().getTextBoldStyle() = textBoldStyle;
- pTableStyle->getLastCol().getTextBoldStyle() = textBoldStyle;
+ pTableStyle->getFirstRow().getTextBoldStyle() = true;
+ pTableStyle->getLastRow().getTextBoldStyle() = true;
+ pTableStyle->getFirstCol().getTextBoldStyle() = true;
+ pTableStyle->getLastCol().getTextBoldStyle() = true;
}
static std::unique_ptr<TableStyle> CreateTableStyle(const OUString& styleId)
diff --git a/oox/source/drawingml/table/tablestyletextstylecontext.cxx b/oox/source/drawingml/table/tablestyletextstylecontext.cxx
index 5b93f25d9ca3..7567ac4c8130 100644
--- a/oox/source/drawingml/table/tablestyletextstylecontext.cxx
+++ b/oox/source/drawingml/table/tablestyletextstylecontext.cxx
@@ -39,17 +39,17 @@ TableStyleTextStyleContext::TableStyleTextStyleContext( ContextHandler2Helper co
if( rAttribs.hasAttribute( XML_b ) ) {
sal_Int32 nB = rAttribs.getToken( XML_b, XML_def );
if ( nB == XML_on )
- mrTableStylePart.getTextBoldStyle() = ::boost::optional< sal_Bool >( true );
+ mrTableStylePart.getTextBoldStyle() = true;
else if ( nB == XML_off )
- mrTableStylePart.getTextBoldStyle() = ::boost::optional< sal_Bool >( false );
+ mrTableStylePart.getTextBoldStyle() = false;
}
if( rAttribs.hasAttribute( XML_i ) ) {
sal_Int32 nI = rAttribs.getToken( XML_i, XML_def );
if ( nI == XML_on )
- mrTableStylePart.getTextItalicStyle() = ::boost::optional< sal_Bool >( true );
+ mrTableStylePart.getTextItalicStyle() = true;
else if ( nI == XML_off )
- mrTableStylePart.getTextItalicStyle() = ::boost::optional< sal_Bool >( false );
+ mrTableStylePart.getTextItalicStyle() = false;
}
}