summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOcke Janssen [oj] <Ocke.Janssen@oracle.com>2011-03-15 11:46:34 +0100
committerOcke Janssen [oj] <Ocke.Janssen@oracle.com>2011-03-15 11:46:34 +0100
commit37cbbd1d0cd7a5a44e8d887fecd2e7ba56c3977d (patch)
tree747ab36834e5bc5ebcfa6102ca4c857c818ce507
parentCWS-TOOLING: integrate CWS os146 (diff)
parentimpress210: merge (diff)
downloadcore-37cbbd1d0cd7a5a44e8d887fecd2e7ba56c3977d.tar.gz
core-37cbbd1d0cd7a5a44e8d887fecd2e7ba56c3977d.zip
Automated merge with http://hg-lan.germany.sun.com/ooo/DEV300
-rw-r--r--sw/inc/dcontact.hxx2
-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/core/draw/dcontact.cxx2
-rw-r--r--sw/source/core/draw/dflyobj.cxx2
-rw-r--r--sw/source/core/inc/dflyobj.hxx2
-rw-r--r--sw/source/ui/app/docshini.cxx2
8 files changed, 32 insertions, 5 deletions
diff --git a/sw/inc/dcontact.hxx b/sw/inc/dcontact.hxx
index 7d5fec3e37c0..a6f336d2776e 100644
--- a/sw/inc/dcontact.hxx
+++ b/sw/inc/dcontact.hxx
@@ -342,7 +342,7 @@ class SwDrawVirtObj : public SdrVirtObj
// #108784#
// All overloaded methods which need to use the offset
- virtual void RecalcBoundRect();
+ virtual void RecalcBoundRect(bool bForce = false);
virtual ::basegfx::B2DPolyPolygon TakeXorPoly() const;
virtual ::basegfx::B2DPolyPolygon TakeContour() const;
virtual SdrHdl* GetHdl(sal_uInt32 nHdlNum) const;
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 8ac03ff109bd..a5331ebef810 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -599,6 +599,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 ------------------------------
@@ -2092,6 +2094,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 91d99221e1fd..701ba2680961 100644
--- a/sw/source/core/doc/docdraw.cxx
+++ b/sw/source/core/doc/docdraw.cxx
@@ -699,6 +699,8 @@ void SwDoc::InitDrawModel()
pLayout->SetDrawPage( pDrawModel->GetPage( 0 ) );
pLayout->GetDrawPage()->SetSize( pLayout->Frm().SSize() );
}
+
+ UpdateDrawDefaults();
}
/** method to notify drawing page view about the invisible layers
@@ -1091,3 +1093,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 cdf031aeb923..c64017875fd5 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -300,7 +300,8 @@ SwDoc::SwDoc()
mbProtectForm(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/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index c510705c533c..3893f52769f0 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -2599,7 +2599,7 @@ void SwDrawVirtObj::SetBoundRectDirty()
// do nothing to not lose model information in aOutRect
}
-void SwDrawVirtObj::RecalcBoundRect()
+void SwDrawVirtObj::RecalcBoundRect(bool)
{
// OD 2004-04-05 #i26791# - switch order of calling <GetOffset()> and
// <ReferencedObj().GetCurrentBoundRect()>, because <GetOffset()> calculates
diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx
index 492b44e5c89f..a18a8947682c 100644
--- a/sw/source/core/draw/dflyobj.cxx
+++ b/sw/source/core/draw/dflyobj.cxx
@@ -563,7 +563,7 @@ const Rectangle& __EXPORT SwVirtFlyDrawObj::GetLastBoundRect() const
}
-void __EXPORT SwVirtFlyDrawObj::RecalcBoundRect()
+void __EXPORT SwVirtFlyDrawObj::RecalcBoundRect(bool)
{
SetRect();
}
diff --git a/sw/source/core/inc/dflyobj.hxx b/sw/source/core/inc/dflyobj.hxx
index 23216709a50a..64c987c54384 100644
--- a/sw/source/core/inc/dflyobj.hxx
+++ b/sw/source/core/inc/dflyobj.hxx
@@ -101,7 +101,7 @@ public:
//Wir nehemen die Groessenbehandlung vollstaendig selbst in die Hand.
virtual const Rectangle& GetCurrentBoundRect() const;
virtual const Rectangle& GetLastBoundRect() const;
- virtual void RecalcBoundRect();
+ virtual void RecalcBoundRect(bool bForce = false);
virtual void RecalcSnapRect();
virtual const Rectangle& GetSnapRect() const;
virtual void SetSnapRect(const Rectangle& rRect);
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.