diff options
-rw-r--r-- | include/sax/fshelper.hxx | 1 | ||||
-rw-r--r-- | oox/source/export/vmlexport.cxx | 4 | ||||
-rw-r--r-- | sax/source/tools/fshelper.cxx | 6 | ||||
-rw-r--r-- | sc/source/filter/excel/xecontent.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/excel/xeextlst.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/excel/xestream.cxx | 27 | ||||
-rw-r--r-- | sc/source/filter/inc/xestream.hxx | 12 |
7 files changed, 20 insertions, 34 deletions
diff --git a/include/sax/fshelper.hxx b/include/sax/fshelper.hxx index 8169ce5ea166..773ce6892e26 100644 --- a/include/sax/fshelper.hxx +++ b/include/sax/fshelper.hxx @@ -131,6 +131,7 @@ public: { startElement( FSNS( namespaceTokenId, elementTokenId ), xAttrList ); } FastSerializerHelper* write(const char* value); + FastSerializerHelper* write(const OString& value); FastSerializerHelper* write(const OUString& value); FastSerializerHelper* write(sal_Int32 value); FastSerializerHelper* write(sal_Int64 value); diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx index eaf761a5d168..0bc408f3ef1c 100644 --- a/oox/source/export/vmlexport.cxx +++ b/oox/source/export/vmlexport.cxx @@ -1189,7 +1189,7 @@ sal_Int32 VMLExport::StartShape() "<v:path shadowok=\"f\" o:extrusionok=\"f\" strokeok=\"f\" fillok=\"f\" o:connecttype=\"rect\"/>\n" "<o:lock v:ext=\"edit\" shapetype=\"t\"/>\n" "</v:shapetype>"); - m_pSerializer->write(sShapeType.makeStringAndClear().getStr()); + m_pSerializer->write(sShapeType.makeStringAndClear()); m_aShapeTypeWritten[ m_nShapeType ] = true; } break; @@ -1224,7 +1224,7 @@ sal_Int32 VMLExport::StartShape() "<v:path o:extrusionok=\"f\" gradientshapeok=\"t\" o:connecttype=\"rect\"/>\n" "<o:lock v:ext=\"edit\" aspectratio=\"t\"/>\n" "</v:shapetype>"); - m_pSerializer->write(sShapeType.makeStringAndClear().getStr()); + m_pSerializer->write(sShapeType.makeStringAndClear()); m_aShapeTypeWritten[ m_nShapeType ] = true; } break; diff --git a/sax/source/tools/fshelper.cxx b/sax/source/tools/fshelper.cxx index 383d4a794bbc..0d265fe36d24 100644 --- a/sax/source/tools/fshelper.cxx +++ b/sax/source/tools/fshelper.cxx @@ -81,6 +81,12 @@ FastSerializerHelper* FastSerializerHelper::write(const char* value) return this; } +FastSerializerHelper* FastSerializerHelper::write(const OString& value) +{ + mpSerializer->write(value); + return this; +} + FastSerializerHelper* FastSerializerHelper::write(const OUString& value) { mpSerializer->write(value); diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx index 444b737d038c..c61425647e59 100644 --- a/sc/source/filter/excel/xecontent.cxx +++ b/sc/source/filter/excel/xecontent.cxx @@ -1507,7 +1507,7 @@ void XclExpDataBar::SaveXml( XclExpXmlStream& rStrm ) XML_uri, "{B025F937-C7B1-47D3-B67F-A62EFF666E3E}"); rWorksheet->startElementNS( XML_x14, XML_id ); - rWorksheet->write( maGUID.getStr() ); + rWorksheet->write(maGUID); rWorksheet->endElementNS( XML_x14, XML_id ); rWorksheet->endElement( XML_ext ); diff --git a/sc/source/filter/excel/xeextlst.cxx b/sc/source/filter/excel/xeextlst.cxx index 2d74db8b25dd..c2764b43da26 100644 --- a/sc/source/filter/excel/xeextlst.cxx +++ b/sc/source/filter/excel/xeextlst.cxx @@ -464,7 +464,7 @@ void XclExpExtConditionalFormatting::SaveXml( XclExpXmlStream& rStrm ) maCfRules.SaveXml( rStrm ); rWorksheet->startElementNS(XML_xm, XML_sqref); - rWorksheet->write(XclXmlUtils::ToOString(maRange).getStr()); + rWorksheet->write(XclXmlUtils::ToOString(maRange)); rWorksheet->endElementNS( XML_xm, XML_sqref ); diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx index 98444d6ca0b4..937a7d0c8ed2 100644 --- a/sc/source/filter/excel/xestream.cxx +++ b/sc/source/filter/excel/xestream.cxx @@ -813,33 +813,6 @@ OUString XclXmlUtils::ToOUString( const XclExpString& s ) return ToOUString( s.GetUnicodeBuffer() ); } -sax_fastparser::FSHelperPtr XclXmlUtils::WriteElement( sax_fastparser::FSHelperPtr pStream, sal_Int32 nElement, sal_Int32 nValue ) -{ - pStream->startElement(nElement); - pStream->write( nValue ); - pStream->endElement( nElement ); - - return pStream; -} - -sax_fastparser::FSHelperPtr XclXmlUtils::WriteElement( sax_fastparser::FSHelperPtr pStream, sal_Int32 nElement, sal_Int64 nValue ) -{ - pStream->startElement(nElement); - pStream->write( nValue ); - pStream->endElement( nElement ); - - return pStream; -} - -sax_fastparser::FSHelperPtr XclXmlUtils::WriteElement( sax_fastparser::FSHelperPtr pStream, sal_Int32 nElement, const char* sValue ) -{ - pStream->startElement(nElement); - pStream->write( sValue ); - pStream->endElement( nElement ); - - return pStream; -} - static void lcl_WriteValue( const sax_fastparser::FSHelperPtr& rStream, sal_Int32 nElement, const char* pValue ) { if( !pValue ) diff --git a/sc/source/filter/inc/xestream.hxx b/sc/source/filter/inc/xestream.hxx index 72239ef829a7..36e1543f5269 100644 --- a/sc/source/filter/inc/xestream.hxx +++ b/sc/source/filter/inc/xestream.hxx @@ -265,9 +265,15 @@ public: static OUString ToOUString( sc::CompileFormulaContext& rCtx, const ScAddress& rAddress, const ScTokenArray* pTokenArray ); static OUString ToOUString( const XclExpString& s ); - 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 ); + template <class T> + static sax_fastparser::FSHelperPtr WriteElement(sax_fastparser::FSHelperPtr pStream, sal_Int32 nElement, const T& value) + { + pStream->startElement(nElement); + pStream->write(value); + pStream->endElement(nElement); + + return pStream; + } static sax_fastparser::FSHelperPtr WriteFontData( sax_fastparser::FSHelperPtr pStream, const XclFontData& rFontData, sal_Int32 nNameId ); }; |