[Libreoffice-commits] .: sc/inc sc/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Nov 29 06:36:48 PST 2012
sc/inc/conditio.hxx | 7 +------
sc/source/core/data/conditio.cxx | 4 ++--
2 files changed, 3 insertions(+), 8 deletions(-)
New commits:
commit ef322b54fa92877cb237a157d66408112dcc2573
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Nov 29 15:36:22 2012 +0100
Fix ScCondDateFormatEntry::mpCache
Change-Id: Iec348a367cedce8022f9be4be80adeaefab7b0a6
diff --git a/sc/inc/conditio.hxx b/sc/inc/conditio.hxx
index af571fd..6d23033 100644
--- a/sc/inc/conditio.hxx
+++ b/sc/inc/conditio.hxx
@@ -382,12 +382,7 @@ public:
private:
condformat::ScCondFormatDateType meType;
- struct ScCondDateFormatCache
- {
- Date aCachedDate;
- };
-
- boost::scoped_ptr<ScCondDateFormatCache> mpCache;
+ mutable boost::scoped_ptr<Date> mpCache;
rtl::OUString maStyleName;
};
diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx
index 987e75e..28d585f 100644
--- a/sc/source/core/data/conditio.cxx
+++ b/sc/source/core/data/conditio.cxx
@@ -1663,9 +1663,9 @@ bool ScCondDateFormatEntry::IsValid( const ScAddress& rPos ) const
return false;
if( !mpCache )
- mpCache->aCachedDate = Date( Date::SYSTEM );
+ mpCache.reset( new Date( Date::SYSTEM ) );
- const Date& rActDate = mpCache->aCachedDate;
+ const Date& rActDate = *mpCache;
SvNumberFormatter* pFormatter = mpDoc->GetFormatTable();
long nCurrentDate = rActDate - *(pFormatter->GetNullDate());
More information about the Libreoffice-commits
mailing list