diff options
author | Kurt Zenker <kz@openoffice.org> | 2009-06-02 11:23:01 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2009-06-02 11:23:01 +0000 |
commit | b00d8072a266ef37192a677c5be7bc0eccd5822f (patch) | |
tree | 82c88961f227f6940e533d80af2be1b33653f797 | |
parent | CWS-TOOLING: integrate CWS macrofpicker01 (diff) | |
download | core-b00d8072a266ef37192a677c5be7bc0eccd5822f.tar.gz core-b00d8072a266ef37192a677c5be7bc0eccd5822f.zip |
CWS-TOOLING: integrate CWS calcperf04
2009-04-23 12:47:25 +0200 er r271155 : CWS-TOOLING: rebase CWS calcperf04 to trunk@270723 (milestone: DEV300:m46)
2009-04-22 13:49:45 +0200 er r271104 : #i101254# performance area broadcasters: replace ::std::set with ::std::hash_set; have broadcaster slots per sheet instead of document wide lumps
2009-04-16 15:04:58 +0200 nn r270886 : #i101126# ScFormatRangeStyles::GetStyleNameIndex: pass row before which to remove
2009-04-16 11:26:33 +0200 nn r270874 : #i101126# ScUniqueCellFormatsObj: collect ranges without ScRangeList::Join
2009-04-15 15:07:34 +0200 er r270846 : merged #i95967# changesets 263482,263483 for performance testcases
2009-03-06 12:48:52 +0100 nn r268996 : #i99960# don't get null date from the model repeatedly
2009-03-06 12:47:21 +0100 nn r268995 : #i99959# don't use GetInputString in ScXMLExport::WriteCell
2009-03-03 17:30:25 +0100 er r268772 : #i99828# NextNewToken: some string handling optimization, i.e. less toUpper calls
-rw-r--r-- | xmloff/inc/xmloff/xmlexp.hxx | 3 | ||||
-rw-r--r-- | xmloff/source/core/xmlexp.cxx | 11 | ||||
-rw-r--r-- | xmloff/source/style/numehelp.cxx | 4 |
3 files changed, 16 insertions, 2 deletions
diff --git a/xmloff/inc/xmloff/xmlexp.hxx b/xmloff/inc/xmloff/xmlexp.hxx index 1d855781ace6..99097487b604 100644 --- a/xmloff/inc/xmloff/xmlexp.hxx +++ b/xmloff/inc/xmloff/xmlexp.hxx @@ -580,6 +580,9 @@ public: // --> OD 2008-11-26 #158694# sal_Bool exportTextNumberElement() const; // <-- + + /// set null date from model to unit converter, if not already done + sal_Bool SetNullDateOnUnitConverter(); }; inline UniReference< XMLTextParagraphExport > SvXMLExport::GetTextParagraphExport() diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index b5b4ef3c296c..198304ce3348 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -225,6 +225,7 @@ public: // --> OD 2008-11-26 #158694# sal_Bool mbExportTextNumberElement; // <-- + sal_Bool mbNullDateInitialized; }; SvXMLExport_Impl::SvXMLExport_Impl() @@ -238,6 +239,7 @@ SvXMLExport_Impl::SvXMLExport_Impl() // --> OD 2008-11-26 #158694# ,mbExportTextNumberElement( sal_False ) // <-- + ,mbNullDateInitialized( sal_False ) { mxUriReferenceFactory = uri::UriReferenceFactory::create( comphelper_getProcessComponentContext()); @@ -2386,6 +2388,15 @@ sal_Bool SvXMLExport::exportTextNumberElement() const } // <-- +sal_Bool SvXMLExport::SetNullDateOnUnitConverter() +{ + // if the null date has already been set, don't set it again (performance) + if (!mpImpl->mbNullDateInitialized) + mpImpl->mbNullDateInitialized = GetMM100UnitConverter().setNullDate(GetModel()); + + return mpImpl->mbNullDateInitialized; +} + //============================================================================= void SvXMLElementExport::StartElement( SvXMLExport& rExp, diff --git a/xmloff/source/style/numehelp.cxx b/xmloff/source/style/numehelp.cxx index 259d6d9c943b..55ec5ad9abc8 100644 --- a/xmloff/source/style/numehelp.cxx +++ b/xmloff/source/style/numehelp.cxx @@ -170,7 +170,7 @@ void XMLNumberFormatAttributesExportHelper::WriteAttributes(SvXMLExport& rXMLExp } if (bExportValue) { - if ( rXMLExport.GetMM100UnitConverter().setNullDate(rXMLExport.GetModel()) ) + if ( rXMLExport.SetNullDateOnUnitConverter() ) { rtl::OUStringBuffer sBuffer; rXMLExport.GetMM100UnitConverter().convertDateTime(sBuffer, rValue); @@ -453,7 +453,7 @@ void XMLNumberFormatAttributesExportHelper::WriteAttributes( } if (bExportValue) { - if ( pExport->GetMM100UnitConverter().setNullDate(pExport->GetModel()) ) + if ( pExport->SetNullDateOnUnitConverter() ) { rtl::OUStringBuffer sBuffer; pExport->GetMM100UnitConverter().convertDateTime(sBuffer, rValue); |