diff options
author | Kurt Zenker <kz@openoffice.org> | 2011-04-13 12:42:35 +0200 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2011-04-13 12:42:35 +0200 |
commit | cf7dbdc2a3bbe999cf331b0d157d8e84eb7a61ff (patch) | |
tree | 97d4b31a30968ea0c728b126ed8c55c79d16fe54 /sw | |
parent | 3486382f2b9358ab6fc95895de63a5e6baa354dc (diff) | |
parent | 2d6d500b8dc65a2f2c93b2dc2c1ad2ab0301b265 (diff) |
CWS-TOOLING: integrate CWS impress210_OOO340
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/doc.hxx | 9 | ||||
-rw-r--r-- | sw/source/core/doc/docdraw.cxx | 15 | ||||
-rw-r--r-- | sw/source/core/doc/docnew.cxx | 3 | ||||
-rw-r--r-- | sw/source/ui/app/docshini.cxx | 2 |
4 files changed, 28 insertions, 1 deletions
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index a72f4f46ec32..0d612ab70a33 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -600,6 +600,8 @@ private: sal_Bool mbStartIdleTimer ; // idle timer mode start/stop + bool mbSetDrawDefaults ; // set draw pool defaults for freshly created documents + static SwAutoCompleteWord *pACmpltWords; // Liste aller Worte fuers AutoComplete //---------------- private Methoden ------------------------------ @@ -2095,6 +2097,13 @@ public: ::sw::UndoManager & GetUndoManager(); ::sw::UndoManager const& GetUndoManager() const; SfxObjectShell* CreateCopy(bool bCallInitNew) const; + + /// must be called only in SwDocShell::InitNew, causes UpdateDrawDefaults to be called when drawing layer is created + void SetDrawDefaults(); + +private: + /// method to set new graphics pool defaults, must only be called by SetDrawDefaults! + void UpdateDrawDefaults(); }; diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx index b18ccb6af8c4..4cc0caf01772 100644 --- a/sw/source/core/doc/docdraw.cxx +++ b/sw/source/core/doc/docdraw.cxx @@ -709,6 +709,8 @@ void SwDoc::InitDrawModel() pViewSh = (ViewShell*)pViewSh->GetNext(); }while( pViewSh != pCurrentView ); } + + UpdateDrawDefaults(); } /** method to notify drawing page view about the invisible layers @@ -1101,3 +1103,16 @@ namespace docfunc } // <-- +void SwDoc::SetDrawDefaults() +{ + mbSetDrawDefaults = true; + UpdateDrawDefaults(); +} + +void SwDoc::UpdateDrawDefaults() +{ + // drawing layer defaults that are set for new documents (if InitNew was called) + if ( pDrawModel && mbSetDrawDefaults ) + pDrawModel->SetDrawingLayerPoolDefaults(); +} + diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index 98ad5724f10d..3872e24b456f 100644 --- a/sw/source/core/doc/docnew.cxx +++ b/sw/source/core/doc/docnew.cxx @@ -301,7 +301,8 @@ SwDoc::SwDoc() mbLastBrowseMode( false ), n32DummyCompatabilityOptions1(0), n32DummyCompatabilityOptions2(0), - mbStartIdleTimer(sal_False) + mbStartIdleTimer(sal_False), + mbSetDrawDefaults(false) { RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDoc::SwDoc" ); diff --git a/sw/source/ui/app/docshini.cxx b/sw/source/ui/app/docshini.cxx index 6c8e73931105..17eead88c233 100644 --- a/sw/source/ui/app/docshini.cxx +++ b/sw/source/ui/app/docshini.cxx @@ -351,6 +351,8 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) //#i16874# AutoKerning as default for new documents pDoc->SetDefault( SvxAutoKernItem( sal_True, RES_CHRATR_AUTOKERN ) ); + pDoc->SetDrawDefaults(); + // --> OD 2005-02-10 #i42080# - Due to the several calls of method <SetDefault(..)> // at the document instance, the document is modified. Thus, reset this // status here. Note: In method <SubInitNew()> this is also done. |