[Libreoffice-commits] core.git: include/oox oox/source sc/source

Caolán McNamara caolanm at redhat.com
Fri Jul 7 13:03:14 UTC 2017


 include/oox/export/utils.hxx                 |   21 +++++++++++
 oox/source/export/chartexport.cxx            |   12 +++---
 oox/source/export/drawingml.cxx              |    4 +-
 sc/source/filter/excel/excrecds.cxx          |   49 +++++++++++++--------------
 sc/source/filter/excel/xecontent.cxx         |    9 ++--
 sc/source/filter/excel/xedbdata.cxx          |    6 +--
 sc/source/filter/excel/xeescher.cxx          |   10 ++---
 sc/source/filter/excel/xeextlst.cxx          |    9 ++--
 sc/source/filter/excel/xename.cxx            |    7 ++-
 sc/source/filter/excel/xepage.cxx            |    9 ++--
 sc/source/filter/excel/xepivotxml.cxx        |   42 +++++++++++------------
 sc/source/filter/excel/xerecord.cxx          |    3 +
 sc/source/filter/excel/xestream.cxx          |   22 ++----------
 sc/source/filter/excel/xestyle.cxx           |   33 +++++++++---------
 sc/source/filter/excel/xetable.cxx           |   21 ++++++-----
 sc/source/filter/excel/xeview.cxx            |   21 ++++++-----
 sc/source/filter/inc/xestream.hxx            |   11 ------
 sc/source/filter/xcl97/XclExpChangeTrack.cxx |   11 +++---
 sc/source/filter/xcl97/xcl97rec.cxx          |    4 +-
 19 files changed, 155 insertions(+), 149 deletions(-)

New commits:
commit 23978f85533e66b18ee2e9b72ad2fc71a93958a3
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jul 7 12:06:32 2017 +0100

    merge BS and ToPsz10, etc
    
    Change-Id: I25d4efe816bf6ae4ba456bb42a827b9a70f503c7
    Reviewed-on: https://gerrit.libreoffice.org/39689
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/include/oox/export/utils.hxx b/include/oox/export/utils.hxx
index 05ee6a750281..d94d6c4228ae 100644
--- a/include/oox/export/utils.hxx
+++ b/include/oox/export/utils.hxx
@@ -29,7 +29,26 @@ inline OString I64S_(sal_Int64 x) { return OString::number(x); }
 #define I32S(x) I32S_(x).getStr()
 #define I64S(x) I64S_(x).getStr()
 #define IS(x) OString::number( x ).getStr()
-inline const char* BS(bool x) { return x ? "1" : "0"; }
+
+/**
+ * @return const char* literal "true" for true value, or literal "false"
+ *         for false value.
+ */
+static inline const char* ToPsz(bool b)
+{
+    return b ? "true" : "false";
+}
+
+/**
+ * @return literal "1" for true value, or literal "0" for false value.
+ */
+static inline const char* ToPsz10(bool b)
+{
+    // xlsx seems to use "1" or "0" for boolean values.  I wonder it ever uses
+    // the "true" "false" variant.
+    return b ? "1" : "0";
+}
+
 #define USS(x) OUStringToOString( x, RTL_TEXTENCODING_UTF8 ).getStr()
 
 static inline sal_Int64 PPTtoEMU( sal_Int32 nPPT )
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index b1ac3f1b5415..5f488e0b4b75 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -888,7 +888,7 @@ void ChartExport::exportChart( const Reference< css::chart::XChartDocument >& xC
     bool bIncludeHiddenCells = false;
     aPlotVisOnly >>= bIncludeHiddenCells;
     pFS->singleElement( FSNS( XML_c, XML_plotVisOnly ),
-            XML_val, BS(!bIncludeHiddenCells),
+            XML_val, ToPsz10(!bIncludeHiddenCells),
             FSEND );
 
     exportMissingValueTreatment(Reference<beans::XPropertySet>(mxDiagram, uno::UNO_QUERY));
@@ -3030,11 +3030,11 @@ void writeLabelProperties(
         }
     }
 
-    pFS->singleElement(FSNS(XML_c, XML_showLegendKey), XML_val, BS(aLabel.ShowLegendSymbol), FSEND);
-    pFS->singleElement(FSNS(XML_c, XML_showVal), XML_val, BS(aLabel.ShowNumber), FSEND);
-    pFS->singleElement(FSNS(XML_c, XML_showCatName), XML_val, BS(aLabel.ShowCategoryName), FSEND);
-    pFS->singleElement(FSNS(XML_c, XML_showSerName), XML_val, BS(false), FSEND);
-    pFS->singleElement(FSNS(XML_c, XML_showPercent), XML_val, BS(aLabel.ShowNumberInPercent), FSEND);
+    pFS->singleElement(FSNS(XML_c, XML_showLegendKey), XML_val, ToPsz10(aLabel.ShowLegendSymbol), FSEND);
+    pFS->singleElement(FSNS(XML_c, XML_showVal), XML_val, ToPsz10(aLabel.ShowNumber), FSEND);
+    pFS->singleElement(FSNS(XML_c, XML_showCatName), XML_val, ToPsz10(aLabel.ShowCategoryName), FSEND);
+    pFS->singleElement(FSNS(XML_c, XML_showSerName), XML_val, ToPsz10(false), FSEND);
+    pFS->singleElement(FSNS(XML_c, XML_showPercent), XML_val, ToPsz10(aLabel.ShowNumberInPercent), FSEND);
 }
 
 }
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index e3615e6bb5de..ddb91babb7c5 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -2006,7 +2006,7 @@ void DrawingML::WriteParagraphProperties( const Reference< XTextContent >& rPara
                                XML_marL, nParaLeftMargin > 0 ? I32S( oox::drawingml::convertHmmToEmu( nParaLeftMargin ) ) : nullptr,
                                XML_indent, nParaFirstLineIndent ? I32S( oox::drawingml::convertHmmToEmu( nParaFirstLineIndent ) ) : nullptr,
                                XML_algn, GetAlignment( nAlignment ),
-                               XML_rtl, bRtl ? BS(bRtl) : nullptr,
+                               XML_rtl, bRtl ? ToPsz10(bRtl) : nullptr,
                                FSEND );
         else
             mpFS->startElementNS( XML_a, XML_pPr,
@@ -2014,7 +2014,7 @@ void DrawingML::WriteParagraphProperties( const Reference< XTextContent >& rPara
                                XML_marL, nLeftMargin > 0 ? I32S( oox::drawingml::convertHmmToEmu( nLeftMargin ) ) : nullptr,
                                XML_indent, nLineIndentation ? I32S( oox::drawingml::convertHmmToEmu( nLineIndentation ) ) : nullptr,
                                XML_algn, GetAlignment( nAlignment ),
-                               XML_rtl, bRtl ? BS(bRtl) : nullptr,
+                               XML_rtl, bRtl ? ToPsz10(bRtl) : nullptr,
                                FSEND );
 
 
diff --git a/sc/source/filter/excel/excrecds.cxx b/sc/source/filter/excel/excrecds.cxx
index 92b5460f77ba..9b2371200b27 100644
--- a/sc/source/filter/excel/excrecds.cxx
+++ b/sc/source/filter/excel/excrecds.cxx
@@ -67,6 +67,7 @@
 #include "stlpool.hxx"
 #include "editutil.hxx"
 #include <formula/errorcodes.hxx>
+#include <oox/export/utils.hxx>
 #include "queryentry.hxx"
 #include "queryparam.hxx"
 
@@ -302,14 +303,14 @@ void Exc1904::SaveXml( XclExpXmlStream& rStrm )
     if( bISOIEC )
     {
         rStrm.WriteAttributes(
-            XML_dateCompatibility, XclXmlUtils::ToPsz( bDateCompatibility ),
+            XML_dateCompatibility, ToPsz( bDateCompatibility ),
             FSEND );
     }
 
     if( !bISOIEC || bDateCompatibility )
     {
         rStrm.WriteAttributes(
-            XML_date1904, XclXmlUtils::ToPsz( bVal ),
+            XML_date1904, ToPsz( bVal ),
             FSEND );
     }
 }
@@ -416,7 +417,7 @@ void XclExpXmlSheetPr::SaveXml( XclExpXmlStream& rStrm )
             // OOXTODO: XML_transitionEntry,
             // OOXTODO: XML_published,
             // OOXTODO: XML_codeName,
-            XML_filterMode, mpManager ? XclXmlUtils::ToPsz( mpManager->HasFilterMode( mnScTab ) ) : nullptr,
+            XML_filterMode, mpManager ? ToPsz( mpManager->HasFilterMode( mnScTab ) ) : nullptr,
             // OOXTODO: XML_enableFormatConditionsCalculation,
             FSEND );
 
@@ -430,7 +431,7 @@ void XclExpXmlSheetPr::SaveXml( XclExpXmlStream& rStrm )
 
     rWorksheet->singleElement(XML_pageSetUpPr,
             // OOXTODO: XML_autoPageBreaks,
-        XML_fitToPage,  XclXmlUtils::ToPsz(mbFitToPage), FSEND);
+        XML_fitToPage,  ToPsz(mbFitToPage), FSEND);
 
     rWorksheet->endElement( XML_sheetPr );
 }
@@ -445,7 +446,7 @@ XclExpWindowProtection::XclExpWindowProtection(bool bValue) :
 void XclExpWindowProtection::SaveXml( XclExpXmlStream& rStrm )
 {
     rStrm.WriteAttributes(
-            XML_lockWindows, XclXmlUtils::ToPsz( GetBool() ),
+            XML_lockWindows, ToPsz( GetBool() ),
             FSEND );
 }
 
@@ -479,23 +480,23 @@ void XclExpSheetProtection::SaveXml( XclExpXmlStream& rStrm )
         }
         sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
         rWorksheet->singleElement( XML_sheetProtection,
-            XML_sheet,  XclXmlUtils::ToPsz( true ),
+            XML_sheet,  ToPsz( true ),
             XML_password, sHash.isEmpty()? nullptr : sHash.getStr(),
-            XML_objects, pTabProtect->isOptionEnabled( ScTableProtection::OBJECTS ) ? nullptr : XclXmlUtils::ToPsz( true ),
-            XML_scenarios, pTabProtect->isOptionEnabled( ScTableProtection::SCENARIOS ) ? nullptr : XclXmlUtils::ToPsz( true ),
-            XML_formatCells, pTabProtect->isOptionEnabled( ScTableProtection::FORMAT_CELLS ) ? XclXmlUtils::ToPsz( false ) : nullptr,
-            XML_formatColumns, pTabProtect->isOptionEnabled( ScTableProtection::FORMAT_COLUMNS ) ? XclXmlUtils::ToPsz( false ) : nullptr,
-            XML_formatRows, pTabProtect->isOptionEnabled( ScTableProtection::FORMAT_ROWS ) ? XclXmlUtils::ToPsz( false ) : nullptr,
-            XML_insertColumns, pTabProtect->isOptionEnabled( ScTableProtection::INSERT_COLUMNS ) ? XclXmlUtils::ToPsz( false ) : nullptr,
-            XML_insertRows, pTabProtect->isOptionEnabled( ScTableProtection::INSERT_ROWS ) ? XclXmlUtils::ToPsz( false ) : nullptr,
-            XML_insertHyperlinks, pTabProtect->isOptionEnabled( ScTableProtection::INSERT_HYPERLINKS ) ? XclXmlUtils::ToPsz( false ) : nullptr,
-            XML_deleteColumns, pTabProtect->isOptionEnabled( ScTableProtection::DELETE_COLUMNS ) ? XclXmlUtils::ToPsz( false ) : nullptr,
-            XML_deleteRows, pTabProtect->isOptionEnabled( ScTableProtection::DELETE_ROWS ) ? XclXmlUtils::ToPsz( false ) : nullptr,
-            XML_selectLockedCells, pTabProtect->isOptionEnabled( ScTableProtection::SELECT_LOCKED_CELLS ) ? nullptr : XclXmlUtils::ToPsz( true ),
-            XML_sort, pTabProtect->isOptionEnabled( ScTableProtection::SORT ) ? XclXmlUtils::ToPsz( false ) : nullptr,
-            XML_autoFilter, pTabProtect->isOptionEnabled( ScTableProtection::AUTOFILTER ) ? XclXmlUtils::ToPsz( false ) : nullptr,
-            XML_pivotTables, pTabProtect->isOptionEnabled( ScTableProtection::PIVOT_TABLES ) ? XclXmlUtils::ToPsz( false ) : nullptr,
-            XML_selectUnlockedCells, pTabProtect->isOptionEnabled( ScTableProtection::SELECT_UNLOCKED_CELLS ) ? nullptr : XclXmlUtils::ToPsz( true ),
+            XML_objects, pTabProtect->isOptionEnabled( ScTableProtection::OBJECTS ) ? nullptr : ToPsz( true ),
+            XML_scenarios, pTabProtect->isOptionEnabled( ScTableProtection::SCENARIOS ) ? nullptr : ToPsz( true ),
+            XML_formatCells, pTabProtect->isOptionEnabled( ScTableProtection::FORMAT_CELLS ) ? ToPsz( false ) : nullptr,
+            XML_formatColumns, pTabProtect->isOptionEnabled( ScTableProtection::FORMAT_COLUMNS ) ? ToPsz( false ) : nullptr,
+            XML_formatRows, pTabProtect->isOptionEnabled( ScTableProtection::FORMAT_ROWS ) ? ToPsz( false ) : nullptr,
+            XML_insertColumns, pTabProtect->isOptionEnabled( ScTableProtection::INSERT_COLUMNS ) ? ToPsz( false ) : nullptr,
+            XML_insertRows, pTabProtect->isOptionEnabled( ScTableProtection::INSERT_ROWS ) ? ToPsz( false ) : nullptr,
+            XML_insertHyperlinks, pTabProtect->isOptionEnabled( ScTableProtection::INSERT_HYPERLINKS ) ? ToPsz( false ) : nullptr,
+            XML_deleteColumns, pTabProtect->isOptionEnabled( ScTableProtection::DELETE_COLUMNS ) ? ToPsz( false ) : nullptr,
+            XML_deleteRows, pTabProtect->isOptionEnabled( ScTableProtection::DELETE_ROWS ) ? ToPsz( false ) : nullptr,
+            XML_selectLockedCells, pTabProtect->isOptionEnabled( ScTableProtection::SELECT_LOCKED_CELLS ) ? nullptr : ToPsz( true ),
+            XML_sort, pTabProtect->isOptionEnabled( ScTableProtection::SORT ) ? ToPsz( false ) : nullptr,
+            XML_autoFilter, pTabProtect->isOptionEnabled( ScTableProtection::AUTOFILTER ) ? ToPsz( false ) : nullptr,
+            XML_pivotTables, pTabProtect->isOptionEnabled( ScTableProtection::PIVOT_TABLES ) ? ToPsz( false ) : nullptr,
+            XML_selectUnlockedCells, pTabProtect->isOptionEnabled( ScTableProtection::SELECT_UNLOCKED_CELLS ) ? nullptr : ToPsz( true ),
             FSEND );
 
         const ::std::vector<ScEnhancedProtection>& rProts( pTabProtect->getEnhancedProtection());
@@ -838,15 +839,15 @@ void XclExpAutofilter::SaveXml( XclExpXmlStream& rStrm )
             if( HasTop10() )
             {
                 rWorksheet->singleElement( XML_top10,
-                        XML_top,        XclXmlUtils::ToPsz( get_flag( nFlags, EXC_AFFLAG_TOP10TOP ) ),
-                        XML_percent,    XclXmlUtils::ToPsz( get_flag( nFlags, EXC_AFFLAG_TOP10PERC ) ),
+                        XML_top,        ToPsz( get_flag( nFlags, EXC_AFFLAG_TOP10TOP ) ),
+                        XML_percent,    ToPsz( get_flag( nFlags, EXC_AFFLAG_TOP10PERC ) ),
                         XML_val,        OString::number(  (nFlags >> 7 ) ).getStr(),
                         // OOXTODO: XML_filterVal,
                         FSEND );
             }
 
             rWorksheet->startElement( XML_customFilters,
-                    XML_and,    XclXmlUtils::ToPsz( (nFlags & EXC_AFFLAG_ANDORMASK) == EXC_AFFLAG_AND ),
+                    XML_and,    ToPsz( (nFlags & EXC_AFFLAG_ANDORMASK) == EXC_AFFLAG_AND ),
                     FSEND );
             aCond[ 0 ].SaveXml( rStrm );
             aCond[ 1 ].SaveXml( rStrm );
diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx
index 5e7ad2d01d65..bf5534e32dbd 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -45,6 +45,7 @@
 #include "xestyle.hxx"
 #include "xename.hxx"
 #include <rtl/uuid.h>
+#include <oox/export/utils.hxx>
 #include <oox/token/namespaces.hxx>
 #include <oox/token/relationship.hxx>
 
@@ -1764,7 +1765,7 @@ void XclExpDV::SaveXml( XclExpXmlStream& rStrm )
 {
     sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
     rWorksheet->startElement( XML_dataValidation,
-            XML_allowBlank,         XclXmlUtils::ToPsz( ::get_flag( mnFlags, EXC_DV_IGNOREBLANK ) ),
+            XML_allowBlank,         ToPsz( ::get_flag( mnFlags, EXC_DV_IGNOREBLANK ) ),
             XML_error,              XESTRING_TO_PSZ( maErrorText ),
             // OOXTODO: XML_errorStyle,
             XML_errorTitle,         XESTRING_TO_PSZ( maErrorTitle ),
@@ -1773,9 +1774,9 @@ void XclExpDV::SaveXml( XclExpXmlStream& rStrm )
             XML_prompt,             XESTRING_TO_PSZ( maPromptText ),
             XML_promptTitle,        XESTRING_TO_PSZ( maPromptTitle ),
             // showDropDown should have been showNoDropDown - check oox/xlsx import for details
-            XML_showDropDown,       XclXmlUtils::ToPsz( ::get_flag( mnFlags, EXC_DV_SUPPRESSDROPDOWN ) ),
-            XML_showErrorMessage,   XclXmlUtils::ToPsz( ::get_flag( mnFlags, EXC_DV_SHOWERROR ) ),
-            XML_showInputMessage,   XclXmlUtils::ToPsz( ::get_flag( mnFlags, EXC_DV_SHOWPROMPT ) ),
+            XML_showDropDown,       ToPsz( ::get_flag( mnFlags, EXC_DV_SUPPRESSDROPDOWN ) ),
+            XML_showErrorMessage,   ToPsz( ::get_flag( mnFlags, EXC_DV_SHOWERROR ) ),
+            XML_showInputMessage,   ToPsz( ::get_flag( mnFlags, EXC_DV_SHOWPROMPT ) ),
             XML_sqref,              XclXmlUtils::ToOString( maScRanges ).getStr(),
             XML_type,               lcl_GetValidationType( mnFlags ),
             FSEND );
diff --git a/sc/source/filter/excel/xedbdata.cxx b/sc/source/filter/excel/xedbdata.cxx
index 92cb15b3b8fe..7437ce90b525 100644
--- a/sc/source/filter/excel/xedbdata.cxx
+++ b/sc/source/filter/excel/xedbdata.cxx
@@ -186,9 +186,9 @@ void XclExpTables::SaveTableXml( XclExpXmlStream& rStrm, const Entry& rEntry )
         XML_name, XclXmlUtils::ToOString( rData.GetName()).getStr(),
         XML_displayName, XclXmlUtils::ToOString( rData.GetName()).getStr(),
         XML_ref, XclXmlUtils::ToOString(aRange),
-        XML_headerRowCount, BS(rData.HasHeader()),
-        XML_totalsRowCount, BS(rData.HasTotals()),
-        XML_totalsRowShown, BS(rData.HasTotals()),  // we don't support that but if there are totals they are shown
+        XML_headerRowCount, ToPsz10(rData.HasHeader()),
+        XML_totalsRowCount, ToPsz10(rData.HasTotals()),
+        XML_totalsRowShown, ToPsz10(rData.HasTotals()),  // we don't support that but if there are totals they are shown
         // OOXTODO: XML_comment, ...,
         // OOXTODO: XML_connectionId, ...,
         // OOXTODO: XML_dataCellStyle, ...,
diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx
index f02edf0d6434..f0409324377b 100644
--- a/sc/source/filter/excel/xeescher.cxx
+++ b/sc/source/filter/excel/xeescher.cxx
@@ -1316,11 +1316,11 @@ void XclExpNote::WriteXml( sal_Int32 nAuthorId, XclExpXmlStream& rStrm )
         rComments->startElement( FSNS( XML_mc, XML_AlternateContent ), FSEND );
         rComments->startElement( FSNS( XML_mc, XML_Choice ), XML_Requires, "v2", FSEND );
         rComments->startElement( XML_commentPr,
-                XML_autoFill,       XclXmlUtils::ToPsz( mbAutoFill ),
-                XML_autoScale,      XclXmlUtils::ToPsz( mbAutoScale ),
-                XML_colHidden,      XclXmlUtils::ToPsz( mbColHidden ),
-                XML_locked,         XclXmlUtils::ToPsz( mbLocked ),
-                XML_rowHidden,      XclXmlUtils::ToPsz( mbRowHidden ),
+                XML_autoFill,       ToPsz( mbAutoFill ),
+                XML_autoScale,      ToPsz( mbAutoScale ),
+                XML_colHidden,      ToPsz( mbColHidden ),
+                XML_locked,         ToPsz( mbLocked ),
+                XML_rowHidden,      ToPsz( mbRowHidden ),
                 XML_textHAlign,     ToHorizAlign( meTHA ),
                 XML_textVAlign,     ToVertAlign( meTVA ) ,
                 FSEND );
diff --git a/sc/source/filter/excel/xeextlst.cxx b/sc/source/filter/excel/xeextlst.cxx
index fd6d5a10e572..6bb021ae9a7b 100644
--- a/sc/source/filter/excel/xeextlst.cxx
+++ b/sc/source/filter/excel/xeextlst.cxx
@@ -15,6 +15,7 @@
 #include "xecontent.hxx"
 #include "tokenarray.hxx"
 
+#include <oox/export/utils.hxx>
 #include <oox/token/namespaces.hxx>
 
 using namespace ::oox;
@@ -203,7 +204,7 @@ void XclExpExtDataBar::SaveXml( XclExpXmlStream& rStrm )
                                 XML_minLength, OString::number(mnMinLength).getStr(),
                                 XML_maxLength, OString::number(mnMaxLength).getStr(),
                                 XML_axisPosition, getAxisPosition(meAxisPosition),
-                                XML_gradient, XclXmlUtils::ToPsz(mbGradient),
+                                XML_gradient, ToPsz(mbGradient),
                                 FSEND );
 
     mpLowerLimit->SaveXml( rStrm );
@@ -242,9 +243,9 @@ void XclExpExtIconSet::SaveXml(XclExpXmlStream& rStrm)
 
     rWorksheet->startElementNS(XML_x14, XML_iconSet,
             XML_iconSet, mpIconSetName,
-            XML_custom, mbCustom ? XclXmlUtils::ToPsz10(mbCustom) : nullptr,
-            XML_reverse, XclXmlUtils::ToPsz10(mbReverse),
-            XML_showValue, XclXmlUtils::ToPsz10(mbShowValue),
+            XML_custom, mbCustom ? ToPsz10(mbCustom) : nullptr,
+            XML_reverse, ToPsz10(mbReverse),
+            XML_showValue, ToPsz10(mbShowValue),
             FSEND);
 
     maCfvos.SaveXml(rStrm);
diff --git a/sc/source/filter/excel/xename.cxx b/sc/source/filter/excel/xename.cxx
index fbedae44707b..71c160d4a56a 100644
--- a/sc/source/filter/excel/xename.cxx
+++ b/sc/source/filter/excel/xename.cxx
@@ -31,6 +31,7 @@
 #include "excrecds.hxx"
 
 #include <formula/grammar.hxx>
+#include <oox/export/utils.hxx>
 
 using namespace ::oox;
 
@@ -300,16 +301,16 @@ void XclExpName::SaveXml( XclExpXmlStream& rStrm )
             // OOXTODO: XML_comment, "",
             // OOXTODO: XML_customMenu, "",
             // OOXTODO: XML_description, "",
-            XML_function, XclXmlUtils::ToPsz( ::get_flag( mnFlags, EXC_NAME_VB ) ),
+            XML_function, ToPsz( ::get_flag( mnFlags, EXC_NAME_VB ) ),
             // OOXTODO: XML_functionGroupId, "",
             // OOXTODO: XML_help, "",
-            XML_hidden, XclXmlUtils::ToPsz( ::get_flag( mnFlags, EXC_NAME_HIDDEN ) ),
+            XML_hidden, ToPsz( ::get_flag( mnFlags, EXC_NAME_HIDDEN ) ),
             XML_localSheetId, mnScTab == SCTAB_GLOBAL ? nullptr : OString::number( mnScTab ).getStr(),
             XML_name, XclXmlUtils::ToOString( maOrigName ).getStr(),
             // OOXTODO: XML_publishToServer, "",
             // OOXTODO: XML_shortcutKey, "",
             // OOXTODO: XML_statusBar, "",
-            XML_vbProcedure, XclXmlUtils::ToPsz( ::get_flag( mnFlags, EXC_NAME_VB ) ),
+            XML_vbProcedure, ToPsz( ::get_flag( mnFlags, EXC_NAME_VB ) ),
             // OOXTODO: XML_workbookParameter, "",
             // OOXTODO: XML_xlm, "",
             FSEND );
diff --git a/sc/source/filter/excel/xepage.cxx b/sc/source/filter/excel/xepage.cxx
index dcd86be84c7a..e43f6a0d4a34 100644
--- a/sc/source/filter/excel/xepage.cxx
+++ b/sc/source/filter/excel/xepage.cxx
@@ -27,6 +27,7 @@
 #include <editeng/lrspitem.hxx>
 #include <editeng/ulspitem.hxx>
 #include <editeng/brushitem.hxx>
+#include <oox/export/utils.hxx>
 #include "document.hxx"
 #include "stlpool.hxx"
 #include "stlsheet.hxx"
@@ -105,11 +106,11 @@ void XclExpSetup::SaveXml( XclExpXmlStream& rStrm )
     // tdf#48767 if XML_usePrinterDefaults field is exist, then XML_orientation is always "portrait" in MS Excel
     // To resolve that import issue, if XML_usePrinterDefaults has default value (false) then XML_usePrinterDefaults is not added.
     if ( !mrData.mbValid )
-        pAttrList->add( XML_usePrinterDefaults, XclXmlUtils::ToPsz( !mrData.mbValid ) );
-    pAttrList->add( XML_blackAndWhite,      XclXmlUtils::ToPsz( mrData.mbBlackWhite ) );
-    pAttrList->add( XML_draft,              XclXmlUtils::ToPsz( mrData.mbDraftQuality ) );
+        pAttrList->add( XML_usePrinterDefaults, ToPsz( !mrData.mbValid ) );
+    pAttrList->add( XML_blackAndWhite,      ToPsz( mrData.mbBlackWhite ) );
+    pAttrList->add( XML_draft,              ToPsz( mrData.mbDraftQuality ) );
     pAttrList->add( XML_cellComments,       mrData.mbPrintNotes ? "atEnd" : "none" );         // OOXTODO: "asDisplayed"?
-    pAttrList->add( XML_useFirstPageNumber, XclXmlUtils::ToPsz( mrData.mbManualStart ) );
+    pAttrList->add( XML_useFirstPageNumber, ToPsz( mrData.mbManualStart ) );
     // OOXTODO: XML_errors, // == displayed|blank|dash|NA
     pAttrList->add( XML_horizontalDpi,      OString::number(  mrData.mnHorPrintRes ).getStr() );
     pAttrList->add( XML_verticalDpi,        OString::number(  mrData.mnVerPrintRes ).getStr() );
diff --git a/sc/source/filter/excel/xepivotxml.cxx b/sc/source/filter/excel/xepivotxml.cxx
index 2cd292d9ec6a..92e24cf74a3a 100644
--- a/sc/source/filter/excel/xepivotxml.cxx
+++ b/sc/source/filter/excel/xepivotxml.cxx
@@ -259,12 +259,12 @@ void XclExpXmlPivotCaches::SavePivotCacheXml( XclExpXmlStream& rStrm, const Entr
         }
         else
         {
-            pAttList->add(XML_containsMixedTypes, XclXmlUtils::ToPsz10(aDPTypes.size() > 1));
-            pAttList->add(XML_containsSemiMixedTypes, XclXmlUtils::ToPsz10(aDPTypes.size() > 1));
-            pAttList->add(XML_containsString, XclXmlUtils::ToPsz10(aDPTypes.find(ScDPItemData::String) != aDPTypeEnd));
+            pAttList->add(XML_containsMixedTypes, ToPsz10(aDPTypes.size() > 1));
+            pAttList->add(XML_containsSemiMixedTypes, ToPsz10(aDPTypes.size() > 1));
+            pAttList->add(XML_containsString, ToPsz10(aDPTypes.find(ScDPItemData::String) != aDPTypeEnd));
             if (aDPTypes.find(ScDPItemData::Value) != aDPTypeEnd)
             {
-                pAttList->add(XML_containsNumber, XclXmlUtils::ToPsz10(true));
+                pAttList->add(XML_containsNumber, ToPsz10(true));
                 pAttList->add(XML_minValue, OString::number(fMin));
                 pAttList->add(XML_maxValue, OString::number(fMax));
             }
@@ -568,18 +568,18 @@ void XclExpXmlPivotTables::SavePivotTableXml( XclExpXmlStream& rStrm, const ScDP
         XML_xmlns, XclXmlUtils::ToOString(rStrm.getNamespaceURL(OOX_NS(xls))).getStr(),
         XML_name, XclXmlUtils::ToOString(rDPObj.GetName()).getStr(),
         XML_cacheId, OString::number(nCacheId).getStr(),
-        XML_applyNumberFormats, BS(false),
-        XML_applyBorderFormats, BS(false),
-        XML_applyFontFormats, BS(false),
-        XML_applyPatternFormats, BS(false),
-        XML_applyAlignmentFormats, BS(false),
-        XML_applyWidthHeightFormats, BS(false),
+        XML_applyNumberFormats, ToPsz10(false),
+        XML_applyBorderFormats, ToPsz10(false),
+        XML_applyFontFormats, ToPsz10(false),
+        XML_applyPatternFormats, ToPsz10(false),
+        XML_applyAlignmentFormats, ToPsz10(false),
+        XML_applyWidthHeightFormats, ToPsz10(false),
         XML_dataCaption, "Values",
-        XML_useAutoFormatting, BS(false),
-        XML_itemPrintTitles, BS(true),
-        XML_indent, BS(false),
-        XML_outline, BS(true),
-        XML_outlineData, BS(true),
+        XML_useAutoFormatting, ToPsz10(false),
+        XML_itemPrintTitles, ToPsz10(true),
+        XML_indent, ToPsz10(false),
+        XML_outline, ToPsz10(true),
+        XML_outlineData, ToPsz10(true),
         FSEND);
 
     // NB: Excel's range does not include page field area (if any).
@@ -628,7 +628,7 @@ void XclExpXmlPivotTables::SavePivotTableXml( XclExpXmlStream& rStrm, const ScDP
         if (!pDim)
         {
             pPivotStrm->singleElement(XML_pivotField,
-                XML_showAll, BS(false),
+                XML_showAll, ToPsz10(false),
                 FSEND);
             continue;
         }
@@ -638,7 +638,7 @@ void XclExpXmlPivotTables::SavePivotTableXml( XclExpXmlStream& rStrm, const ScDP
         if (eOrient == sheet::DataPilotFieldOrientation_HIDDEN)
         {
             pPivotStrm->singleElement(XML_pivotField,
-                XML_showAll, BS(false),
+                XML_showAll, ToPsz10(false),
                 FSEND);
             continue;
         }
@@ -646,8 +646,8 @@ void XclExpXmlPivotTables::SavePivotTableXml( XclExpXmlStream& rStrm, const ScDP
         if (eOrient == sheet::DataPilotFieldOrientation_DATA)
         {
             pPivotStrm->singleElement(XML_pivotField,
-                XML_dataField, BS(true),
-                XML_showAll, BS(false),
+                XML_dataField, ToPsz10(true),
+                XML_showAll, ToPsz10(false),
                 FSEND);
 
             continue;
@@ -675,7 +675,7 @@ void XclExpXmlPivotTables::SavePivotTableXml( XclExpXmlStream& rStrm, const ScDP
 
         auto pAttList = sax_fastparser::FastSerializerHelper::createAttrList();
         pAttList->add(XML_axis, toOOXMLAxisType(eOrient));
-        pAttList->add(XML_showAll, BS(false));
+        pAttList->add(XML_showAll, ToPsz10(false));
 
         long nSubTotalCount = pDim->GetSubTotalsCount();
         std::vector<OString> aSubtotalSequence;
@@ -685,7 +685,7 @@ void XclExpXmlPivotTables::SavePivotTableXml( XclExpXmlStream& rStrm, const ScDP
             aSubtotalSequence.push_back(GetSubtotalFuncName(eFunc));
             sal_Int32 nAttToken = GetSubtotalAttrToken(eFunc);
             if (!pAttList->hasAttribute(nAttToken))
-                pAttList->add(nAttToken, BS(true));
+                pAttList->add(nAttToken, ToPsz10(true));
         }
 
         sax_fastparser::XFastAttributeListRef xAttributeList(pAttList);
diff --git a/sc/source/filter/excel/xerecord.cxx b/sc/source/filter/excel/xerecord.cxx
index d0e35ed8735b..4d724d77d150 100644
--- a/sc/source/filter/excel/xerecord.cxx
+++ b/sc/source/filter/excel/xerecord.cxx
@@ -20,6 +20,7 @@
 #include "xerecord.hxx"
 #include "xeroot.hxx"
 
+#include <oox/export/utils.hxx>
 #include <osl/diagnose.h>
 
 using namespace ::oox;
@@ -174,7 +175,7 @@ void XclExpBoolRecord::SaveXml( XclExpXmlStream& rStrm )
 
     rStrm.WriteAttributes(
             // HACK: HIDEOBJ (excdoc.cxx) should be its own object to handle XML_showObjects
-            mnAttribute, mnAttribute == XML_showObjects ? "all" : XclXmlUtils::ToPsz( mbValue ),
+            mnAttribute, mnAttribute == XML_showObjects ? "all" : ToPsz( mbValue ),
             FSEND );
 }
 
diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx
index 1037dd1ca57b..4813869a945e 100644
--- a/sc/source/filter/excel/xestream.cxx
+++ b/sc/source/filter/excel/xestream.cxx
@@ -819,18 +819,6 @@ OUString XclXmlUtils::ToOUString( const XclExpString& s )
     return ToOUString( s.GetUnicodeBuffer() );
 }
 
-const char* XclXmlUtils::ToPsz( bool b )
-{
-    return b ? "true" : "false";
-}
-
-const char* XclXmlUtils::ToPsz10( bool b )
-{
-    // xlsx seems to use "1" or "0" for boolean values.  I wonder it ever uses
-    // the "true" "false" variant.
-    return b ? "1" : "0";
-}
-
 sax_fastparser::FSHelperPtr XclXmlUtils::WriteElement( sax_fastparser::FSHelperPtr pStream, sal_Int32 nElement, sal_Int32 nValue )
 {
     pStream->startElement( nElement, FSEND );
@@ -899,13 +887,13 @@ sax_fastparser::FSHelperPtr XclXmlUtils::WriteFontData( sax_fastparser::FSHelper
     const char* pUnderline = lcl_GetUnderlineStyle( rFontData.GetScUnderline(), bHaveUnderline );
     const char* pVertAlign = lcl_ToVerticalAlignmentRun( rFontData.GetScEscapement(), bHaveVertAlign );
 
-    lcl_WriteValue( pStream, XML_b,          rFontData.mnWeight > 400 ? XclXmlUtils::ToPsz( rFontData.mnWeight > 400 ) : nullptr );
-    lcl_WriteValue( pStream, XML_i,          rFontData.mbItalic ? XclXmlUtils::ToPsz( rFontData.mbItalic ) : nullptr );
-    lcl_WriteValue( pStream, XML_strike,     rFontData.mbStrikeout ? XclXmlUtils::ToPsz( rFontData.mbStrikeout ) : nullptr );
+    lcl_WriteValue( pStream, XML_b,          rFontData.mnWeight > 400 ? ToPsz( rFontData.mnWeight > 400 ) : nullptr );
+    lcl_WriteValue( pStream, XML_i,          rFontData.mbItalic ? ToPsz( rFontData.mbItalic ) : nullptr );
+    lcl_WriteValue( pStream, XML_strike,     rFontData.mbStrikeout ? ToPsz( rFontData.mbStrikeout ) : nullptr );
     // OOXTODO: lcl_WriteValue( rStream, XML_condense, );    // mac compatibility setting
     // OOXTODO: lcl_WriteValue( rStream, XML_extend, );      // compatibility setting
-    lcl_WriteValue( pStream, XML_outline,    rFontData.mbOutline ? XclXmlUtils::ToPsz( rFontData.mbOutline ) : nullptr );
-    lcl_WriteValue( pStream, XML_shadow,     rFontData.mbShadow ? XclXmlUtils::ToPsz( rFontData.mbShadow ) : nullptr );
+    lcl_WriteValue( pStream, XML_outline,    rFontData.mbOutline ? ToPsz( rFontData.mbOutline ) : nullptr );
+    lcl_WriteValue( pStream, XML_shadow,     rFontData.mbShadow ? ToPsz( rFontData.mbShadow ) : nullptr );
     lcl_WriteValue( pStream, XML_u,          bHaveUnderline ? pUnderline : nullptr );
     lcl_WriteValue( pStream, XML_vertAlign,  bHaveVertAlign ? pVertAlign : nullptr );
     lcl_WriteValue( pStream, XML_sz,         OString::number( rFontData.mnHeight / 20.0 ).getStr() );  // Twips->Pt
diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx
index bd3a8045c8a6..93c269544ffc 100644
--- a/sc/source/filter/excel/xestyle.cxx
+++ b/sc/source/filter/excel/xestyle.cxx
@@ -51,6 +51,7 @@
 #include "xestring.hxx"
 #include "conditio.hxx"
 
+#include <oox/export/utils.hxx>
 #include <oox/token/tokens.hxx>
 #include <oox/token/namespaces.hxx>
 #include <o3tl/make_unique.hxx>
@@ -1110,7 +1111,7 @@ void XclExpDxfFont::SaveXml(XclExpXmlStream& rStrm)
     if (maDxfData.eWeight)
     {
         rStyleSheet->singleElement(XML_b,
-                XML_val, XclXmlUtils::ToPsz10(maDxfData.eWeight.get() != WEIGHT_NORMAL),
+                XML_val, ToPsz10(maDxfData.eWeight.get() != WEIGHT_NORMAL),
                 FSEND);
     }
 
@@ -1118,7 +1119,7 @@ void XclExpDxfFont::SaveXml(XclExpXmlStream& rStrm)
     {
         bool bItalic = (maDxfData.eItalic.get() == ITALIC_OBLIQUE) || (maDxfData.eItalic.get() == ITALIC_NORMAL);
         rStyleSheet->singleElement(XML_i,
-                XML_val, XclXmlUtils::ToPsz10(bItalic),
+                XML_val, ToPsz10(bItalic),
                 FSEND);
     }
 
@@ -1130,21 +1131,21 @@ void XclExpDxfFont::SaveXml(XclExpXmlStream& rStrm)
             (maDxfData.eStrike.get() == STRIKEOUT_X);
 
         rStyleSheet->singleElement(XML_strike,
-                XML_val, XclXmlUtils::ToPsz10(bStrikeout),
+                XML_val, ToPsz10(bStrikeout),
                 FSEND);
     }
 
     if (maDxfData.bOutline)
     {
         rStyleSheet->singleElement(XML_outline,
-                XML_val, XclXmlUtils::ToPsz10(maDxfData.bOutline.get()),
+                XML_val, ToPsz10(maDxfData.bOutline.get()),
                 FSEND);
     }
 
     if (maDxfData.bShadow)
     {
         rStyleSheet->singleElement(XML_shadow,
-                XML_val, XclXmlUtils::ToPsz10(maDxfData.bShadow.get()),
+                XML_val, ToPsz10(maDxfData.bShadow.get()),
                 FSEND);
     }
 
@@ -1462,8 +1463,8 @@ void XclExpCellProt::FillToXF3( sal_uInt16& rnProt ) const
 void XclExpCellProt::SaveXml( XclExpXmlStream& rStrm ) const
 {
     rStrm.GetCurrentStream()->singleElement( XML_protection,
-            XML_locked,     XclXmlUtils::ToPsz( mbLocked ),
-            XML_hidden,     XclXmlUtils::ToPsz( mbHidden ),
+            XML_locked,     ToPsz( mbLocked ),
+            XML_hidden,     ToPsz( mbHidden ),
             FSEND );
 }
 
@@ -1618,11 +1619,11 @@ void XclExpCellAlign::SaveXml( XclExpXmlStream& rStrm ) const
             XML_horizontal,         ToHorizontalAlignment( mnHorAlign ),
             XML_vertical,           ToVerticalAlignment( mnVerAlign ),
             XML_textRotation,       OString::number(  mnRotation ).getStr(),
-            XML_wrapText,           XclXmlUtils::ToPsz( mbLineBreak ),
+            XML_wrapText,           ToPsz( mbLineBreak ),
             XML_indent,             OString::number(  mnIndent ).getStr(),
             // OOXTODO: XML_relativeIndent,     mnIndent?
             // OOXTODO: XML_justifyLastLine,
-            XML_shrinkToFit,        XclXmlUtils::ToPsz( mbShrink ),
+            XML_shrinkToFit,        ToPsz( mbShrink ),
             XML_readingOrder, mnTextDir == EXC_XF_TEXTDIR_CONTEXT ? nullptr : OString::number(  mnTextDir ).getStr(),
             FSEND );
 }
@@ -1881,8 +1882,8 @@ void XclExpCellBorder::SaveXml( XclExpXmlStream& rStrm ) const
     XclExpPalette& rPalette = rStrm.GetRoot().GetPalette();
 
     rStyleSheet->startElement( XML_border,
-            XML_diagonalUp,     XclXmlUtils::ToPsz( mbDiagBLtoTR ),
-            XML_diagonalDown,   XclXmlUtils::ToPsz( mbDiagTLtoBR ),
+            XML_diagonalUp,     ToPsz( mbDiagBLtoTR ),
+            XML_diagonalDown,   ToPsz( mbDiagTLtoBR ),
             // OOXTODO: XML_outline,
             FSEND );
     lcl_WriteBorder( rStrm, XML_left,       mnLeftLine,     rPalette.GetColor( mnLeftColor ) );
@@ -2234,11 +2235,11 @@ void XclExpXF::SaveXml( XclExpXmlStream& rStrm )
             // OOXTODO: XML_quotePrefix,
             // OOXTODO: XML_pivotButton,
             // OOXTODO: XML_applyNumberFormat,  ;
-            XML_applyFont,          XclXmlUtils::ToPsz( mbFontUsed ),
+            XML_applyFont,          ToPsz( mbFontUsed ),
             // OOXTODO: XML_applyFill,
-            XML_applyBorder,        XclXmlUtils::ToPsz( mbBorderUsed ),
-            XML_applyAlignment,     XclXmlUtils::ToPsz( mbAlignUsed ),
-            XML_applyProtection,    XclXmlUtils::ToPsz( mbProtUsed ),
+            XML_applyBorder,        ToPsz( mbBorderUsed ),
+            XML_applyAlignment,     ToPsz( mbAlignUsed ),
+            XML_applyProtection,    ToPsz( mbProtUsed ),
             FSEND );
     if( mbAlignUsed )
         maAlignment.SaveXml( rStrm );
@@ -2349,7 +2350,7 @@ void XclExpStyle::SaveXml( XclExpXmlStream& rStrm )
                                              XML_builtinId, OString::number( std::min( static_cast<sal_Int32>( CELL_STYLE_MAX_BUILTIN_ID - 1 ), static_cast <sal_Int32>( mnStyleId ) ) ).getStr(),
             // OOXTODO: XML_iLevel,
             // OOXTODO: XML_hidden,
-            XML_customBuiltin,  XclXmlUtils::ToPsz( ! IsBuiltIn() ),
+            XML_customBuiltin,  ToPsz( ! IsBuiltIn() ),
             FSEND );
     // OOXTODO: XML_extLst
 }
diff --git a/sc/source/filter/excel/xetable.cxx b/sc/source/filter/excel/xetable.cxx
index 1f95b7a8f45d..473f97a78daf 100644
--- a/sc/source/filter/excel/xetable.cxx
+++ b/sc/source/filter/excel/xetable.cxx
@@ -37,6 +37,7 @@
 #include <formula/errorcodes.hxx>
 #include <thread>
 #include <comphelper/threadpool.hxx>
+#include <oox/export/utils.hxx>
 
 #if defined(ANDROID)
 namespace std
@@ -994,7 +995,7 @@ void XclExpFormulaCell::SaveXml( XclExpXmlStream& rStrm )
                         aMatScRange.aStart.Row() == static_cast<SCROW>(GetXclPos().mnRow))
                 {
                     rWorksheet->startElement( XML_f,
-                            XML_aca, XclXmlUtils::ToPsz( (mxTokArr && mxTokArr->IsVolatile()) ||
+                            XML_aca, ToPsz( (mxTokArr && mxTokArr->IsVolatile()) ||
                                 (mxAddRec && mxAddRec->IsVolatile())),
                             XML_t, mxAddRec ? "array" : nullptr,
                             XML_ref, !sFmlaCellRange.isEmpty()? sFmlaCellRange.getStr() : nullptr,
@@ -1019,7 +1020,7 @@ void XclExpFormulaCell::SaveXml( XclExpXmlStream& rStrm )
         if (!bTagStarted)
         {
             rWorksheet->startElement( XML_f,
-                    XML_aca, XclXmlUtils::ToPsz( (mxTokArr && mxTokArr->IsVolatile()) ||
+                    XML_aca, ToPsz( (mxTokArr && mxTokArr->IsVolatile()) ||
                         (mxAddRec && mxAddRec->IsVolatile()) ),
                     FSEND );
         }
@@ -1695,9 +1696,9 @@ void XclExpColinfo::SaveXml( XclExpXmlStream& rStrm )
     const double nTruncatedExcelColumnWidth = std::trunc( nExcelColumnWidth * 100.0 + 0.5 ) / 100.0;
     rStrm.GetCurrentStream()->singleElement( XML_col,
             // OOXTODO: XML_bestFit,
-            XML_collapsed,      XclXmlUtils::ToPsz( ::get_flag( mnFlags, EXC_COLINFO_COLLAPSED ) ),
-            XML_customWidth,    XclXmlUtils::ToPsz( mbCustomWidth ),
-            XML_hidden,         XclXmlUtils::ToPsz( ::get_flag( mnFlags, EXC_COLINFO_HIDDEN ) ),
+            XML_collapsed,      ToPsz( ::get_flag( mnFlags, EXC_COLINFO_COLLAPSED ) ),
+            XML_customWidth,    ToPsz( mbCustomWidth ),
+            XML_hidden,         ToPsz( ::get_flag( mnFlags, EXC_COLINFO_HIDDEN ) ),
             XML_outlineLevel,   OString::number( mnOutlineLevel ).getStr(),
             XML_max,            OString::number( nLastXclCol + 1 ).getStr(),
             XML_min,            OString::number( mnFirstXclCol + 1 ).getStr(),
@@ -2125,12 +2126,12 @@ void XclExpRow::SaveXml( XclExpXmlStream& rStrm )
                 XML_r,              OString::number(  (mnCurrentRow++) ).getStr(),
                 // OOXTODO: XML_spans,          optional
                 XML_s,              haveFormat ? lcl_GetStyleId( rStrm, mnXFIndex ).getStr() : nullptr,
-                XML_customFormat,   XclXmlUtils::ToPsz( haveFormat ),
+                XML_customFormat,   ToPsz( haveFormat ),
                 XML_ht,             OString::number( (double) mnHeight / 20.0 ).getStr(),
-                XML_hidden,         XclXmlUtils::ToPsz( ::get_flag( mnFlags, EXC_ROW_HIDDEN ) ),
-                XML_customHeight,   XclXmlUtils::ToPsz( ::get_flag( mnFlags, EXC_ROW_UNSYNCED ) ),
+                XML_hidden,         ToPsz( ::get_flag( mnFlags, EXC_ROW_HIDDEN ) ),
+                XML_customHeight,   ToPsz( ::get_flag( mnFlags, EXC_ROW_UNSYNCED ) ),
                 XML_outlineLevel,   OString::number(  mnOutlineLevel ).getStr(),
-                XML_collapsed,      XclXmlUtils::ToPsz( ::get_flag( mnFlags, EXC_ROW_COLLAPSED ) ),
+                XML_collapsed,      ToPsz( ::get_flag( mnFlags, EXC_ROW_COLLAPSED ) ),
                 // OOXTODO: XML_thickTop,       bool
                 // OOXTODO: XML_thickBot,       bool
                 // OOXTODO: XML_ph,             bool
@@ -2712,7 +2713,7 @@ void XclExpCellTable::SaveXml( XclExpXmlStream& rStrm )
         // OOXTODO: XML_thickTop
         // OOXTODO: XML_thickBottom
         XML_defaultRowHeight, OString::number( static_cast< double> ( rDefData.mnHeight ) / 20.0 ).getStr(),
-        XML_zeroHeight, XclXmlUtils::ToPsz( rDefData.IsHidden() ),
+        XML_zeroHeight, ToPsz( rDefData.IsHidden() ),
         XML_outlineLevelRow, OString::number( maRowBfr.GetHighestOutlineLevel() ).getStr(),
         XML_outlineLevelCol, OString::number( maColInfoBfr.GetHighestOutlineLevel() ).getStr(),
         FSEND );
diff --git a/sc/source/filter/excel/xeview.cxx b/sc/source/filter/excel/xeview.cxx
index 918866c9b089..7a9d7dc2ecd5 100644
--- a/sc/source/filter/excel/xeview.cxx
+++ b/sc/source/filter/excel/xeview.cxx
@@ -23,6 +23,7 @@
 #include "viewopti.hxx"
 #include "xelink.hxx"
 #include "xestyle.hxx"
+#include <oox/export/utils.hxx>
 
 using namespace ::oox;
 
@@ -50,9 +51,9 @@ void XclExpWindow1::SaveXml( XclExpXmlStream& rStrm )
     rStrm.GetCurrentStream()->singleElement( XML_workbookView,
             // OOXTODO: XML_visibility, // ST_visibilty
             // OOXTODO: XML_minimized,  // bool
-            XML_showHorizontalScroll,   XclXmlUtils::ToPsz( ::get_flag( mnFlags, EXC_WIN1_HOR_SCROLLBAR ) ),
-            XML_showVerticalScroll,     XclXmlUtils::ToPsz( ::get_flag( mnFlags, EXC_WIN1_VER_SCROLLBAR ) ),
-            XML_showSheetTabs,          XclXmlUtils::ToPsz( ::get_flag( mnFlags, EXC_WIN1_TABBAR ) ),
+            XML_showHorizontalScroll,   ToPsz( ::get_flag( mnFlags, EXC_WIN1_HOR_SCROLLBAR ) ),
+            XML_showVerticalScroll,     ToPsz( ::get_flag( mnFlags, EXC_WIN1_VER_SCROLLBAR ) ),
+            XML_showSheetTabs,          ToPsz( ::get_flag( mnFlags, EXC_WIN1_TABBAR ) ),
             XML_xWindow,                "0",
             XML_yWindow,                "0",
             XML_windowWidth,            OString::number( 0x4000 ).getStr(),
@@ -418,14 +419,14 @@ void XclExpTabViewSettings::SaveXml( XclExpXmlStream& rStrm )
     rWorksheet->startElement( XML_sheetViews, FSEND );
     rWorksheet->startElement( XML_sheetView,
             // OOXTODO: XML_windowProtection,
-            XML_showFormulas,               XclXmlUtils::ToPsz( maData.mbShowFormulas ),
-            XML_showGridLines,              XclXmlUtils::ToPsz( maData.mbShowGrid ),
-            XML_showRowColHeaders,          XclXmlUtils::ToPsz( maData.mbShowHeadings ),
-            XML_showZeros,                  XclXmlUtils::ToPsz( maData.mbShowZeros ),
-            XML_rightToLeft,                XclXmlUtils::ToPsz( maData.mbMirrored ),
-            XML_tabSelected,                XclXmlUtils::ToPsz( maData.mbSelected ),
+            XML_showFormulas,               ToPsz( maData.mbShowFormulas ),
+            XML_showGridLines,              ToPsz( maData.mbShowGrid ),
+            XML_showRowColHeaders,          ToPsz( maData.mbShowHeadings ),
+            XML_showZeros,                  ToPsz( maData.mbShowZeros ),
+            XML_rightToLeft,                ToPsz( maData.mbMirrored ),
+            XML_tabSelected,                ToPsz( maData.mbSelected ),
             // OOXTODO: XML_showRuler,
-            XML_showOutlineSymbols,         XclXmlUtils::ToPsz( maData.mbShowOutline ),
+            XML_showOutlineSymbols,         ToPsz( maData.mbShowOutline ),
             XML_defaultGridColor,           mnGridColorId == XclExpPalette::GetColorIdFromIndex( EXC_COLOR_WINDOWTEXT ) ? "true" : "false",
             // OOXTODO: XML_showWhiteSpace,
             XML_view,                       maData.mbPageMode ? "pageBreakPreview" : "normal",  // OOXTODO: pageLayout
diff --git a/sc/source/filter/inc/xestream.hxx b/sc/source/filter/inc/xestream.hxx
index 077839828759..bb5192e22351 100644
--- a/sc/source/filter/inc/xestream.hxx
+++ b/sc/source/filter/inc/xestream.hxx
@@ -271,17 +271,6 @@ public:
     static OUString ToOUString( sc::CompileFormulaContext& rCtx, const ScAddress& rAddress, const ScTokenArray* pTokenArray );
     static OUString ToOUString( const XclExpString& s );
 
-    /**
-     * @return const char* literal "true" for true value, or literal "false"
-     *         for false value.
-     */
-    static const char* ToPsz( bool b );
-
-    /**
-     * @return literal "1" for true value, or literal "0" for false value.
-     */
-    static const char* ToPsz10( bool b );
-
     static sax_fastparser::FSHelperPtr  WriteElement( sax_fastparser::FSHelperPtr pStream, sal_Int32 nElement, sal_Int32 nValue );
     static sax_fastparser::FSHelperPtr  WriteElement( sax_fastparser::FSHelperPtr pStream, sal_Int32 nElement, sal_Int64 nValue );
     static sax_fastparser::FSHelperPtr  WriteElement( sax_fastparser::FSHelperPtr pStream, sal_Int32 nElement, const char* sValue );
diff --git a/sc/source/filter/xcl97/XclExpChangeTrack.cxx b/sc/source/filter/xcl97/XclExpChangeTrack.cxx
index 3e97fc30222b..0e083aadaa66 100644
--- a/sc/source/filter/xcl97/XclExpChangeTrack.cxx
+++ b/sc/source/filter/xcl97/XclExpChangeTrack.cxx
@@ -27,6 +27,7 @@
 #include "document.hxx"
 #include "editutil.hxx"
 
+#include <oox/export/utils.hxx>
 #include <oox/token/namespaces.hxx>
 #include <oox/token/tokens.hxx>
 #include <rtl/strbuf.hxx>
@@ -1053,7 +1054,7 @@ void XclExpChTrCellContent::SaveXml( XclExpXmlStream& rRevisionLogStrm )
     sax_fastparser::FSHelperPtr pStream = rRevisionLogStrm.GetCurrentStream();
     pStream->startElement( XML_rcc,
             XML_rId,                    OString::number(  GetActionNumber() ).getStr(),
-            XML_ua,                     XclXmlUtils::ToPsz( GetAccepted () ),   // OOXTODO? bAccepted == ua or ra; not sure.
+            XML_ua,                     ToPsz( GetAccepted () ),   // OOXTODO? bAccepted == ua or ra; not sure.
             XML_ra,                     nullptr,       // OOXTODO: RRD.fUndoAction?  Or RRD.fAccepted?
             XML_sId,                    OString::number(  GetTabId( aPosition.Tab() ) ).getStr(),
             XML_odxf,                   nullptr,       // OOXTODO: not supported
@@ -1186,10 +1187,10 @@ void XclExpChTrInsert::SaveXml( XclExpXmlStream& rRevisionLogStrm )
     sax_fastparser::FSHelperPtr pStream = rRevisionLogStrm.GetCurrentStream();
     pStream->startElement( XML_rrc,
             XML_rId,    OString::number(  GetActionNumber() ).getStr(),
-            XML_ua,     XclXmlUtils::ToPsz( GetAccepted () ),   // OOXTODO? bAccepted == ua or ra; not sure.
+            XML_ua,     ToPsz( GetAccepted () ),   // OOXTODO? bAccepted == ua or ra; not sure.
             XML_ra,     nullptr,       // OOXTODO: RRD.fUndoAction?  Or RRD.fAccepted?
             XML_sId,    OString::number(  GetTabId( aRange.aStart.Tab() ) ).getStr(),
-            XML_eol,    XclXmlUtils::ToPsz10(mbEndOfList),
+            XML_eol,    ToPsz10(mbEndOfList),
             XML_ref,    XclXmlUtils::ToOString( aRange ).getStr(),
             XML_action, lcl_GetAction( nOpCode ),
             XML_edge,   nullptr,       // OOXTODO: ???
@@ -1245,7 +1246,7 @@ void XclExpChTrInsertTab::SaveXml( XclExpXmlStream& rStrm )
     sax_fastparser::FSHelperPtr pStream = rStrm.GetCurrentStream();
     pStream->singleElement( XML_ris,
             XML_rId,            OString::number(  GetActionNumber() ).getStr(),
-            XML_ua,             XclXmlUtils::ToPsz( GetAccepted () ),   // OOXTODO? bAccepted == ua or ra; not sure.
+            XML_ua,             ToPsz( GetAccepted () ),   // OOXTODO? bAccepted == ua or ra; not sure.
             XML_ra,             nullptr,       // OOXTODO: RRD.fUndoAction?  Or RRD.fAccepted?
             XML_sheetId,        OString::number(  GetTabId( nTab ) ).getStr(),
             XML_name,           XclXmlUtils::ToOString( GetTabInfo().GetScTabName( nTab ) ).getStr(),
@@ -1313,7 +1314,7 @@ void XclExpChTrMoveRange::SaveXml( XclExpXmlStream& rRevisionLogStrm )
 
     pStream->startElement( XML_rm,
             XML_rId,            OString::number(  GetActionNumber() ).getStr(),
-            XML_ua,             XclXmlUtils::ToPsz( GetAccepted () ),   // OOXTODO? bAccepted == ua or ra; not sure.
+            XML_ua,             ToPsz( GetAccepted () ),   // OOXTODO? bAccepted == ua or ra; not sure.
             XML_ra,             nullptr,       // OOXTODO: RRD.fUndoAction?  Or RRD.fAccepted?
             XML_sheetId,        OString::number(  GetTabId( aDestRange.aStart.Tab() ) ).getStr(),
             XML_source,         XclXmlUtils::ToOString( aSourceRange ).getStr(),
diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx
index 93c9cf4f11ba..85d7ceac9dfb 100644
--- a/sc/source/filter/xcl97/xcl97rec.cxx
+++ b/sc/source/filter/xcl97/xcl97rec.cxx
@@ -1455,7 +1455,7 @@ void ExcEScenario::SaveXml( XclExpXmlStream& rStrm )
     sax_fastparser::FSHelperPtr& rWorkbook = rStrm.GetCurrentStream();
     rWorkbook->startElement( XML_scenario,
             XML_name,       XclXmlUtils::ToOString( sName ).getStr(),
-            XML_locked,     XclXmlUtils::ToPsz( bProtected ),
+            XML_locked,     ToPsz( bProtected ),
             // OOXTODO: XML_hidden,
             XML_count,      OString::number(  aCells.size() ).getStr(),
             XML_user,       XESTRING_TO_PSZ( sUserName ),
@@ -1692,7 +1692,7 @@ std::size_t XclIteration::GetLen() const
 void XclIteration::SaveXml( XclExpXmlStream& rStrm )
 {
     rStrm.WriteAttributes(
-            XML_iterate, XclXmlUtils::ToPsz( nIter == 1 ),
+            XML_iterate, ToPsz( nIter == 1 ),
             FSEND );
 }
 


More information about the Libreoffice-commits mailing list