summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2011-04-13 12:42:35 +0200
committerKurt Zenker <kz@openoffice.org>2011-04-13 12:42:35 +0200
commitcf7dbdc2a3bbe999cf331b0d157d8e84eb7a61ff (patch)
tree97d4b31a30968ea0c728b126ed8c55c79d16fe54
parentmasterfix OOO340: #i117701# prevent warning in xmlitem.cxx (diff)
parentimpress210: fixed solaris compile warning (diff)
downloadcore-cf7dbdc2a3bbe999cf331b0d157d8e84eb7a61ff.tar.gz
core-cf7dbdc2a3bbe999cf331b0d157d8e84eb7a61ff.zip
CWS-TOOLING: integrate CWS impress210_OOO340
-rw-r--r--sw/inc/doc.hxx9
-rw-r--r--sw/source/core/doc/docdraw.cxx15
-rw-r--r--sw/source/core/doc/docnew.cxx3
-rw-r--r--sw/source/ui/app/docshini.cxx2
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.