diff options
author | Kurt Zenker <kz@openoffice.org> | 2009-10-14 15:49:17 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2009-10-14 15:49:17 +0000 |
commit | 458b43715fe289804a0bd8889e8709a72a8ac90e (patch) | |
tree | 32d4875b14791d62974bf95e1e5d647906e483ed /sc/source/core | |
parent | 34551159a38cbdef7e254664834c0b793e593d5b (diff) |
CWS-TOOLING: integrate CWS calc32stopper2
2009-10-01 12:42:16 +0200 dr r276592 : #i104992# and more typos...
2009-10-01 12:42:13 +0200 nn r276591 : #i105512# SetDocOptions: update number formatter if it already exists
2009-09-30 19:03:58 +0200 dr r276573 : #104992# oops, forgotten to skip a byte
2009-09-30 16:07:17 +0200 dr r276560 : #i103540# check valid vector size
2009-09-29 14:20:45 +0200 dr r276529 : dump some more BIFF records
2009-09-29 13:00:22 +0200 dr r276526 : dump some more BIFF records
2009-09-28 14:34:14 +0200 dr r276490 : #i104057# missing exception file
2009-09-28 10:35:42 +0200 dr r276483 : #i105325# set correct format while opening zip package
2009-09-25 19:07:32 +0200 dr r276475 : #i104992# handle cell styles built-in in Calc correctly
2009-09-25 19:06:46 +0200 dr r276474 : #i104992# handle cell styles built-in in Calc correctly
2009-09-25 17:37:28 +0200 dr r276472 : #i105219# missing include
2009-09-25 12:32:24 +0200 dr r276435 : #i10000# rebase error: renamed variable
2009-09-25 11:34:53 +0200 dr r276431 : CWS-TOOLING: rebase CWS calc32stopper2 to trunk@276429 (milestone: DEV300:m60)
2009-09-24 18:59:23 +0200 dr r276427 : 160550# preserve write-protection password in roundtrip
2009-09-24 18:54:43 +0200 dr r276426 : 160550# preserve write-protection password in roundtrip
2009-09-22 11:38:17 +0200 dr r276353 : #160550# the property has to be integer of course
2009-09-21 18:52:06 +0200 dr r276342 : #160550# new internal property WriteProtectinPassword
2009-09-21 18:22:40 +0200 dr r276340 : #i104057# load sheets substreams according to offsets in SHEET records
2009-09-21 18:11:00 +0200 dr r276338 : #i104057# load sheets substreams according to offsets in SHEET records
2009-09-17 20:07:33 +0200 dr r276255 : #i104057# BIFF5/BIFF8: order of sheet substreams may be different to sheet order, use stream offset provided in SHEET records
Diffstat (limited to 'sc/source/core')
-rw-r--r-- | sc/source/core/data/documen3.cxx | 3 | ||||
-rw-r--r-- | sc/source/core/data/poolhelp.cxx | 17 | ||||
-rw-r--r-- | sc/source/core/inc/poolhelp.hxx | 4 |
3 files changed, 19 insertions, 5 deletions
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx index 9fc4b09f21af..17650028db70 100644 --- a/sc/source/core/data/documen3.cxx +++ b/sc/source/core/data/documen3.cxx @@ -1734,11 +1734,8 @@ const ScDocOptions& ScDocument::GetDocOptions() const void ScDocument::SetDocOptions( const ScDocOptions& rOpt ) { - USHORT d,m,y; - DBG_ASSERT( pDocOptions, "No DocOptions! :-(" ); *pDocOptions = rOpt; - rOpt.GetDate( d,m,y ); xPoolHelper->SetFormTableOpt(rOpt); } diff --git a/sc/source/core/data/poolhelp.cxx b/sc/source/core/data/poolhelp.cxx index ff8f7bb76c5c..d85e16ad135f 100644 --- a/sc/source/core/data/poolhelp.cxx +++ b/sc/source/core/data/poolhelp.cxx @@ -95,14 +95,29 @@ SvNumberFormatter* ScPoolHelper::GetFormTable() const pFormTable->SetColorLink( LINK( m_pSourceDoc, ScDocument, GetUserDefinedColor ) ); pFormTable->SetEvalDateFormat( NF_EVALDATEFORMAT_INTL_FORMAT ); + UseDocOptions(); // null date, year2000, std precision + } + return pFormTable; +} + +void ScPoolHelper::UseDocOptions() const +{ + if (pFormTable) + { USHORT d,m,y; aOpt.GetDate( d,m,y ); pFormTable->ChangeNullDate( d,m,y ); pFormTable->ChangeStandardPrec( (USHORT)aOpt.GetStdPrecision() ); pFormTable->SetYear2000( aOpt.GetYear2000() ); } - return pFormTable; } + +void ScPoolHelper::SetFormTableOpt(const ScDocOptions& rOpt) +{ + aOpt = rOpt; + UseDocOptions(); // #i105512# if the number formatter exists, update its settings +} + void ScPoolHelper::SourceDocumentGone() { // reset all pointers to the source document diff --git a/sc/source/core/inc/poolhelp.hxx b/sc/source/core/inc/poolhelp.hxx index a60b8db462ab..00474d63c080 100644 --- a/sc/source/core/inc/poolhelp.hxx +++ b/sc/source/core/inc/poolhelp.hxx @@ -54,6 +54,8 @@ private: mutable SfxItemPool* pEnginePool; // EditEnginePool ScDocument* m_pSourceDoc; + void UseDocOptions() const; + public: ScPoolHelper( ScDocument* pSourceDoc ); virtual ~ScPoolHelper(); @@ -68,7 +70,7 @@ public: SfxItemPool* GetEditPool() const; SfxItemPool* GetEnginePool() const; - void SetFormTableOpt(const ScDocOptions& rOpt) { aOpt = rOpt; } + void SetFormTableOpt(const ScDocOptions& rOpt); }; #endif |