summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoren De Cuyper <jorendc@libreoffice.org>2014-07-29 21:45:52 +0200
committerDavid Tardon <dtardon@redhat.com>2014-07-30 12:34:07 +0000
commit77d2610012536fa2c31c55c3803a57c6eddd58f2 (patch)
treeae68094f23983c9cf8c057737d50af30ac352600
parent84dbcaf91f34873d2ae02556c8a02f27401f8a5d (diff)
Use OString::boolean in docxattributeoutput.cxx
Change-Id: I73b0c0ecd3ecf4e159f31e7ad9684c3e70b1ce5e Reviewed-on: https://gerrit.libreoffice.org/10622 Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com> Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx19
1 files changed, 9 insertions, 10 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 1b08aea6eb08..0ff219ecb189 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -3361,13 +3361,12 @@ void DocxAttributeOutput::TableCanSplit( ww8::WW8TableNodeInfoInner::Pointer_t p
const SwFrmFmt * pLineFmt = pTabLine->GetFrmFmt();
const SwFmtRowSplit& rSplittable = pLineFmt->GetRowSplit( );
- const char* pCantSplit = ( !rSplittable.GetValue( ) ) ? "true" : "false";
// if rSplittable is true then no need to write <w:cantSplit w:val="false"/>
// as default row prop is allow row to break across page.
if( !rSplittable.GetValue( ) )
- m_pSerializer->singleElementNS( XML_w, XML_cantSplit,
- FSNS( XML_w, XML_val ), pCantSplit,
- FSEND );
+ m_pSerializer->singleElementNS( XML_w, XML_cantSplit,
+ FSNS( XML_w, XML_val ), "true",
+ FSEND );
}
void DocxAttributeOutput::TableBidi( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner )
@@ -6651,7 +6650,7 @@ void DocxAttributeOutput::ParaTabStop( const SvxTabStopItem& rTabStop )
void DocxAttributeOutput::ParaHyphenZone( const SvxHyphenZoneItem& rHyphenZone )
{
m_pSerializer->singleElementNS( XML_w, XML_suppressAutoHyphens,
- FSNS( XML_w, XML_val ), rHyphenZone.IsHyphen( ) ? "false" : "true" ,
+ FSNS( XML_w, XML_val ), OString::boolean( !rHyphenZone.IsHyphen() ),
FSEND );
}
@@ -6669,21 +6668,21 @@ void DocxAttributeOutput::ParaNumRule_Impl( const SwTxtNode* /*pTxtNd*/, sal_Int
void DocxAttributeOutput::ParaScriptSpace( const SfxBoolItem& rScriptSpace )
{
m_pSerializer->singleElementNS( XML_w, XML_autoSpaceDE,
- FSNS( XML_w, XML_val ), rScriptSpace.GetValue( ) ? "true": "false",
+ FSNS( XML_w, XML_val ), OString::boolean( rScriptSpace.GetValue() ),
FSEND );
}
void DocxAttributeOutput::ParaHangingPunctuation( const SfxBoolItem& rItem )
{
m_pSerializer->singleElementNS( XML_w, XML_overflowPunct,
- FSNS( XML_w, XML_val ), rItem.GetValue( ) ? "true": "false",
+ FSNS( XML_w, XML_val ), OString::boolean( rItem.GetValue() ),
FSEND );
}
void DocxAttributeOutput::ParaForbiddenRules( const SfxBoolItem& rItem )
{
m_pSerializer->singleElementNS( XML_w, XML_kinsoku,
- FSNS( XML_w, XML_val ), rItem.GetValue( ) ? "true": "false",
+ FSNS( XML_w, XML_val ), OString::boolean( rItem.GetValue() ),
FSEND );
}
@@ -6717,7 +6716,7 @@ void DocxAttributeOutput::ParaVerticalAlign( const SvxParaVertAlignItem& rAlign
void DocxAttributeOutput::ParaSnapToGrid( const SvxParaGridItem& rGrid )
{
m_pSerializer->singleElementNS( XML_w, XML_snapToGrid,
- FSNS( XML_w, XML_val ), rGrid.GetValue( ) ? "true": "false",
+ FSNS( XML_w, XML_val ), OString::boolean( rGrid.GetValue() ),
FSEND );
}
@@ -7442,7 +7441,7 @@ void DocxAttributeOutput::FormatColumns_Impl( sal_uInt16 nCols, const SwFmtCol&
bool bHasSep = (COLADJ_NONE != rCol.GetLineAdj());
- pColsAttrList->add( FSNS( XML_w, XML_sep ), bHasSep ? "true" : "false" );
+ pColsAttrList->add( FSNS( XML_w, XML_sep ), OString::boolean( bHasSep ) );
// Write the element
m_pSerializer->startElementNS( XML_w, XML_cols, pColsAttrList );