openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1600568 [1/2] - in /openoffice/trunk/main/sw: inc/ source/core/access/ source/core/doc/ source/core/draw/ source/core/frmedt/ source/core/layout/ source/core/undo/ source/core/unocore/ source/core/view/ source/filter/html/ source/filter/rt...
Date Thu, 05 Jun 2014 08:44:40 GMT
Author: alg
Date: Thu Jun  5 08:44:38 2014
New Revision: 1600568

URL: http://svn.apache.org/r1600568
Log:
i124638 Corrected relationship between DrawModel and DocShell in Writer, made SwDrawModel and handling more known

Modified:
    openoffice/trunk/main/sw/inc/IDocumentDrawModelAccess.hxx
    openoffice/trunk/main/sw/inc/doc.hxx
    openoffice/trunk/main/sw/inc/docsh.hxx
    openoffice/trunk/main/sw/inc/dpage.hxx
    openoffice/trunk/main/sw/inc/drawdoc.hxx
    openoffice/trunk/main/sw/source/core/access/accmap.cxx
    openoffice/trunk/main/sw/source/core/doc/doc.cxx
    openoffice/trunk/main/sw/source/core/doc/docdesc.cxx
    openoffice/trunk/main/sw/source/core/doc/docdraw.cxx
    openoffice/trunk/main/sw/source/core/doc/docfly.cxx
    openoffice/trunk/main/sw/source/core/doc/doclay.cxx
    openoffice/trunk/main/sw/source/core/doc/docnew.cxx
    openoffice/trunk/main/sw/source/core/draw/dcontact.cxx
    openoffice/trunk/main/sw/source/core/draw/dpage.cxx
    openoffice/trunk/main/sw/source/core/draw/drawdoc.cxx
    openoffice/trunk/main/sw/source/core/frmedt/feshview.cxx
    openoffice/trunk/main/sw/source/core/layout/fly.cxx
    openoffice/trunk/main/sw/source/core/layout/frmtool.cxx
    openoffice/trunk/main/sw/source/core/layout/newfrm.cxx
    openoffice/trunk/main/sw/source/core/layout/paintfrm.cxx
    openoffice/trunk/main/sw/source/core/undo/docundo.cxx
    openoffice/trunk/main/sw/source/core/undo/unattr.cxx
    openoffice/trunk/main/sw/source/core/unocore/unodraw.cxx
    openoffice/trunk/main/sw/source/core/unocore/unoframe.cxx
    openoffice/trunk/main/sw/source/core/view/vdraw.cxx
    openoffice/trunk/main/sw/source/core/view/viewimp.cxx
    openoffice/trunk/main/sw/source/core/view/viewsh.cxx
    openoffice/trunk/main/sw/source/filter/html/htmldraw.cxx
    openoffice/trunk/main/sw/source/filter/rtf/rtffly.cxx
    openoffice/trunk/main/sw/source/filter/rtf/swparrtf.cxx
    openoffice/trunk/main/sw/source/filter/ww8/docxattributeoutput.cxx
    openoffice/trunk/main/sw/source/filter/ww8/rtfattributeoutput.cxx
    openoffice/trunk/main/sw/source/filter/ww8/wrtw8esh.cxx
    openoffice/trunk/main/sw/source/filter/ww8/wrtww8.cxx
    openoffice/trunk/main/sw/source/filter/ww8/ww8graf.cxx
    openoffice/trunk/main/sw/source/filter/xml/swxml.cxx
    openoffice/trunk/main/sw/source/filter/xml/xmlexp.cxx
    openoffice/trunk/main/sw/source/filter/xml/xmlimp.cxx
    openoffice/trunk/main/sw/source/ui/app/docsh.cxx
    openoffice/trunk/main/sw/source/ui/app/docshdrw.cxx
    openoffice/trunk/main/sw/source/ui/app/docshini.cxx
    openoffice/trunk/main/sw/source/ui/app/docst.cxx
    openoffice/trunk/main/sw/source/ui/app/docstyle.cxx
    openoffice/trunk/main/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx
    openoffice/trunk/main/sw/source/ui/lingu/sdrhhcwrap.cxx
    openoffice/trunk/main/sw/source/ui/shells/drwbassh.cxx
    openoffice/trunk/main/sw/source/ui/shells/frmsh.cxx
    openoffice/trunk/main/sw/source/ui/shells/grfsh.cxx
    openoffice/trunk/main/sw/source/ui/shells/textsh1.cxx
    openoffice/trunk/main/sw/source/ui/uiview/view.cxx
    openoffice/trunk/main/sw/source/ui/uno/unodefaults.cxx
    openoffice/trunk/main/sw/source/ui/uno/unotxdoc.cxx
    openoffice/trunk/main/sw/source/ui/utlui/content.cxx

Modified: openoffice/trunk/main/sw/inc/IDocumentDrawModelAccess.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/inc/IDocumentDrawModelAccess.hxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/inc/IDocumentDrawModelAccess.hxx (original)
+++ openoffice/trunk/main/sw/inc/IDocumentDrawModelAccess.hxx Thu Jun  5 08:44:38 2014
@@ -26,7 +26,7 @@
 
 #include <svx/svdtypes.hxx>
 
-class SdrModel;
+class SwDrawModel;
 class SdrPageView;
 
 /** IDocumentDrawModelAccess
@@ -37,10 +37,10 @@ public:
 
     /** Draw Model and id accessors
      */
-    virtual const SdrModel* GetDrawModel() const = 0;
-    virtual SdrModel* GetDrawModel() = 0;
-    virtual SdrModel* _MakeDrawModel() = 0;
-    virtual SdrModel* GetOrCreateDrawModel() = 0;
+    virtual const SwDrawModel* GetDrawModel() const = 0;
+    virtual SwDrawModel* GetDrawModel() = 0;
+    virtual SwDrawModel* _MakeDrawModel() = 0;
+    virtual SwDrawModel* GetOrCreateDrawModel() = 0;
     virtual SdrLayerID GetHeavenId() const = 0;
     virtual SdrLayerID GetHellId() const = 0;
     virtual SdrLayerID GetControlsId() const = 0;

Modified: openoffice/trunk/main/sw/inc/doc.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/inc/doc.hxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/inc/doc.hxx (original)
+++ openoffice/trunk/main/sw/inc/doc.hxx Thu Jun  5 08:44:38 2014
@@ -102,7 +102,7 @@ class Outliner;
 class OutputDevice;
 class Point;
 class SbxArray;
-class SdrModel;
+class SwDrawModel;
 class SdrObject;
 class SdrUndoAction;
 class VirtualDevice;
@@ -327,7 +327,7 @@ class SW_DLLPUBLIC SwDoc :
 
 	ViewShell		*pCurrentView;	// SwDoc should get a new member pCurrentView//swmod 071225
 	boost::shared_ptr<SwRootFrm> pLayoutPtr;
-	SdrModel		*pDrawModel;		// StarView Drawing
+	SwDrawModel*     pDrawModel;		// StarView Drawing
 
 	SwDocUpdtFld 	*pUpdtFlds;			// Struktur zum Field-Update
 	SwFldTypes		*pFldTypes;			// Feldtypen
@@ -957,8 +957,8 @@ public:
 
     /** IDocumentDrawModelAccess
     */
-    virtual const SdrModel* GetDrawModel() const;
-    virtual SdrModel* GetDrawModel();
+    virtual const SwDrawModel* GetDrawModel() const;
+    virtual SwDrawModel* GetDrawModel();
     virtual SdrLayerID GetHeavenId() const;
     virtual SdrLayerID GetHellId() const;
     virtual SdrLayerID GetControlsId() const;
@@ -969,8 +969,8 @@ public:
     virtual bool IsVisibleLayerId( const SdrLayerID& _nLayerId ) const;
     virtual SdrLayerID GetVisibleLayerIdByInvisibleOne( const SdrLayerID& _nInvisibleLayerId );
     virtual SdrLayerID GetInvisibleLayerIdByVisibleOne( const SdrLayerID& _nVisibleLayerId );
-    virtual SdrModel* _MakeDrawModel();
-    virtual SdrModel* GetOrCreateDrawModel();
+    virtual SwDrawModel* _MakeDrawModel();
+    virtual SwDrawModel* GetOrCreateDrawModel();
 
     /** IDocumentLayoutAccess
     */

Modified: openoffice/trunk/main/sw/inc/docsh.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/inc/docsh.hxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/inc/docsh.hxx (original)
+++ openoffice/trunk/main/sw/inc/docsh.hxx Thu Jun  5 08:44:38 2014
@@ -55,7 +55,12 @@ class IDocumentDeviceAccess;
 class IDocumentSettingAccess;
 class IDocumentTimerAccess;
 class IDocumentChartDataProviderAccess;
+class SwDocShell;
+class SwDrawModel;
 
+// initialize DrawModel (in form of a SwDrawModel) and DocShell (in form of a SwDocShell)
+// as needed, one or both parameters may be zero
+void SW_DLLPRIVATE InitDrawModelAndDocShell(SwDocShell* pSwDocShell, SwDrawModel* pSwDrawModel);
 
 class SW_DLLPUBLIC SwDocShell: public SfxObjectShell, public SfxListener
 {
@@ -132,7 +137,6 @@ class SW_DLLPUBLIC SwDocShell: public Sf
 	SW_DLLPRIVATE sal_uInt16					MakeByExample(const String &rName,
 											sal_uInt16 nFamily, sal_uInt16 nMask, SwWrtShell* pShell = 0);
 
-	SW_DLLPRIVATE void					InitDraw();
 	SW_DLLPRIVATE void					SubInitNew();   // fuer InitNew und HtmlSourceModus
 
 	SW_DLLPRIVATE void 					RemoveOLEObjects();

Modified: openoffice/trunk/main/sw/inc/dpage.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/inc/dpage.hxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/inc/dpage.hxx (original)
+++ openoffice/trunk/main/sw/inc/dpage.hxx Thu Jun  5 08:44:38 2014
@@ -29,7 +29,7 @@
 #include <svx/svdobj.hxx>
 
 class SdrPageGridFrameList;
-class SwDrawDocument;
+class SwDrawModel;
 class SwDoc;
 
 class SwDPage : public FmFormPage, public SdrObjUserCall
@@ -38,7 +38,7 @@ class SwDPage : public FmFormPage, publi
 	SwDoc& 					rDoc;
 
 public:
-	SwDPage(SwDrawDocument& rNewModel, sal_Bool bMasterPage=sal_False);
+	SwDPage(SwDrawModel& rNewModel, sal_Bool bMasterPage=sal_False);
 	~SwDPage();
 
 	// #i3694#

Modified: openoffice/trunk/main/sw/inc/drawdoc.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/inc/drawdoc.hxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/inc/drawdoc.hxx (original)
+++ openoffice/trunk/main/sw/inc/drawdoc.hxx Thu Jun  5 08:44:38 2014
@@ -32,12 +32,12 @@ class SwDocShell;
 
 //==================================================================
 
-class SwDrawDocument : public FmFormModel
+class SwDrawModel : public FmFormModel
 {
 	SwDoc* pDoc;
 public:
-	SwDrawDocument( SwDoc* pDoc );
-	~SwDrawDocument();
+	SwDrawModel( SwDoc* pDoc );
+	~SwDrawModel();
 
 	const SwDoc& GetDoc() const	{ return *pDoc; }
 		  SwDoc& GetDoc()      	{ return *pDoc; }

Modified: openoffice/trunk/main/sw/source/core/access/accmap.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/access/accmap.cxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/core/access/accmap.cxx (original)
+++ openoffice/trunk/main/sw/source/core/access/accmap.cxx Thu Jun  5 08:44:38 2014
@@ -19,19 +19,15 @@
  * 
  *************************************************************/
 
- 
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
 
-
 #include <vos/ref.hxx>
 #include <cppuhelper/weakref.hxx>
 #include <vcl/window.hxx>
 #include <svx/svdmodel.hxx>
 #include <svx/unomod.hxx>
 #include <tools/debug.hxx>
-
 #include <map>
 #include <list>
 #include <vector>
@@ -61,15 +57,9 @@
 #include <IDocumentDrawModelAccess.hxx>
 #include <svx/ShapeTypeHandler.hxx>
 #include <vcl/svapp.hxx>
-#ifndef _SVX_ACCESSIBILITY_SHAPE_TYPE_HANDLER_HXX
 #include <svx/ShapeTypeHandler.hxx>
-#endif
-#ifndef _SVX_ACCESSIBILITY_SVX_SHAPE_TYPES_HXX
 #include <svx/SvxShapeTypes.hxx>
-#endif
-#ifndef _SVDPAGE_HXX
 #include <svx/svdpage.hxx>
-#endif
 #include <com/sun/star/accessibility/AccessibleRelationType.hpp>
 #include <com/sun/star/accessibility/AccessibleEventId.hpp>
 #include <com/sun/star/accessibility/AccessibleStateType.hpp>
@@ -85,6 +75,7 @@
 #include <dflyobj.hxx>
 #include <prevwpage.hxx>
 #include <switerator.hxx>
+#include <drawdoc.hxx>
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::accessibility;

Modified: openoffice/trunk/main/sw/source/core/doc/doc.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/doc/doc.cxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/core/doc/doc.cxx (original)
+++ openoffice/trunk/main/sw/source/core/doc/doc.cxx Thu Jun  5 08:44:38 2014
@@ -19,15 +19,12 @@
  * 
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
 
 #include <doc.hxx>
 #include <UndoManager.hxx>
 #include <hintids.hxx>
-
 #include <tools/shl.hxx>
 #include <tools/globname.hxx>
 #include <svx/svxids.hrc>
@@ -57,7 +54,6 @@
 #include <editeng/pbinitem.hxx>
 #include <unotools/charclass.hxx>
 #include <unotools/localedatawrapper.hxx>
-
 #include <swatrset.hxx>
 #include <swmodule.hxx>
 #include <fmtpdsc.hxx>
@@ -115,25 +111,16 @@
 #include <shellres.hxx>
 #include <txtfrm.hxx>
 #include <attrhint.hxx>
-
 #include <wdocsh.hxx>           // SwWebDocShell
 #include <prtopt.hxx>           // SwPrintOptions
-
 #include <vector>
 #include <map>
-
 #include <osl/diagnose.h>
 #include <osl/interlck.h>
 #include <vbahelper/vbaaccesshelper.hxx>
-
 #include "switerator.hxx"
-
-/* @@@MAINTAINABILITY-HORROR@@@
-   Probably unwanted dependency on SwDocShell
-*/
-// --> OD 2005-08-29 #125370#
 #include <layouter.hxx>
-// <--
+#include <drawdoc.hxx>
 
 using namespace ::com::sun::star;
 using ::rtl::OUString;

Modified: openoffice/trunk/main/sw/source/core/doc/docdesc.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/doc/docdesc.cxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/core/doc/docdesc.cxx (original)
+++ openoffice/trunk/main/sw/source/core/doc/docdesc.cxx Thu Jun  5 08:44:38 2014
@@ -19,8 +19,6 @@
  * 
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
 
@@ -74,6 +72,7 @@
 #include <SwUndoPageDesc.hxx>
 #include <pagedeschint.hxx>
 #include <tgrditem.hxx>
+#include <drawdoc.hxx>
 
 using namespace com::sun::star;
 

Modified: openoffice/trunk/main/sw/source/core/doc/docdraw.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/doc/docdraw.cxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/core/doc/docdraw.cxx (original)
+++ openoffice/trunk/main/sw/source/core/doc/docdraw.cxx Thu Jun  5 08:44:38 2014
@@ -605,7 +605,7 @@ void SwDoc::InitDrawModel()
 	RTL_LOGFILE_CONTEXT_TRACE( aLog, "before create DrawDocument" );
 	//Das SdrModel gehoert dem Dokument, wir haben immer zwei Layer und eine
 	//Seite.
-	pDrawModel = new SwDrawDocument( this );
+	pDrawModel = new SwDrawModel( this );
 
     pDrawModel->EnableUndo( GetIDocumentUndoRedo().DoesUndo() );
 
@@ -825,7 +825,7 @@ void SwDoc::ReleaseDrawModel()
 /*************************************************************************/
 
 
-SdrModel* SwDoc::_MakeDrawModel()
+SwDrawModel* SwDoc::_MakeDrawModel()
 {
 	ASSERT( !pDrawModel, "_MakeDrawModel: Why?" );
 	InitDrawModel();
@@ -955,15 +955,15 @@ IMPL_LINK(SwDoc, CalcFieldValueHdl, Edit
 
 /* TFFDI: The functions formerly declared 'inline'
  */
-const SdrModel* SwDoc::GetDrawModel() const { return pDrawModel; }
-SdrModel* SwDoc::GetDrawModel() { return pDrawModel; }
+const SwDrawModel* SwDoc::GetDrawModel() const { return pDrawModel; }
+SwDrawModel* SwDoc::GetDrawModel() { return pDrawModel; }
 SdrLayerID SwDoc::GetHeavenId() const { return nHeaven; }
 SdrLayerID SwDoc::GetHellId() const { return nHell; }
 SdrLayerID SwDoc::GetControlsId() const { return nControls;   }
 SdrLayerID SwDoc::GetInvisibleHeavenId() const { return nInvisibleHeaven; }
 SdrLayerID SwDoc::GetInvisibleHellId() const { return nInvisibleHell; }
 SdrLayerID SwDoc::GetInvisibleControlsId() const { return nInvisibleControls; }
-SdrModel* SwDoc::GetOrCreateDrawModel() { return GetDrawModel() ? GetDrawModel() : _MakeDrawModel(); }
+SwDrawModel* SwDoc::GetOrCreateDrawModel() { return GetDrawModel() ? GetDrawModel() : _MakeDrawModel(); }
 
 // --> OD 2006-03-14 #i62875#
 namespace docfunc

Modified: openoffice/trunk/main/sw/source/core/doc/docfly.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/doc/docfly.cxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/core/doc/docfly.cxx (original)
+++ openoffice/trunk/main/sw/source/core/doc/docfly.cxx Thu Jun  5 08:44:38 2014
@@ -19,8 +19,6 @@
  * 
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
 
@@ -39,7 +37,6 @@
 #include <fmtornt.hxx>
 #include <fmtsrnd.hxx>
 #include <dcontact.hxx>
-
 #include <ndgrf.hxx>
 #include <doc.hxx>
 #include <IDocumentUndoRedo.hxx>
@@ -67,14 +64,12 @@
 #include <dflyobj.hxx>
 #include <undoflystrattr.hxx>
 #include <switerator.hxx>
-
-//UUUU
 #include <svx/xbtmpit.hxx>
 #include <svx/xflftrit.hxx>
+#include <drawdoc.hxx>
 
 extern sal_uInt16 GetHtmlMode( const SwDocShell* );
 
-
 using namespace ::com::sun::star;
 
 sal_uInt16 SwDoc::GetFlyCount( FlyCntType eType ) const
@@ -438,7 +433,7 @@ lcl_SetFlyFrmAttr(SwDoc & rDoc,
 
 void SwDoc::CheckForUniqueItemForLineFillNameOrIndex(SfxItemSet& rSet)
 {
-    SdrModel* pDrawModel = GetOrCreateDrawModel();
+    SwDrawModel* pDrawModel = GetOrCreateDrawModel();
     SfxItemIter aIter(rSet);
 
     for(const SfxPoolItem* pItem = aIter.FirstItem(); pItem; pItem = aIter.NextItem())

Modified: openoffice/trunk/main/sw/source/core/doc/doclay.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/doc/doclay.cxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/core/doc/doclay.cxx (original)
+++ openoffice/trunk/main/sw/source/core/doc/doclay.cxx Thu Jun  5 08:44:38 2014
@@ -19,8 +19,6 @@
  * 
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
 
@@ -44,7 +42,6 @@
 #include <svx/svdouno.hxx>
 #include <svx/fmpage.hxx>
 #include <editeng/frmdiritem.hxx>
-
 #include <swmodule.hxx>
 #include <modcfg.hxx>
 #include <com/sun/star/beans/XPropertySet.hpp>
@@ -96,15 +93,10 @@
 #include <pagedesc.hxx>
 #include <PostItMgr.hxx>
 #include <comcore.hrc>		// STR-ResId's
-
-// #i11176#
 #include <unoframe.hxx>
-// OD 2004-05-24 #i28701#
 #include <sortedobjs.hxx>
-
-// --> OD 2004-07-26 #i32089#
 #include <vector>
-// <--
+#include <drawdoc.hxx>
 
 using namespace ::com::sun::star;
 using ::rtl::OUString;

Modified: openoffice/trunk/main/sw/source/core/doc/docnew.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/doc/docnew.cxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/core/doc/docnew.cxx (original)
+++ openoffice/trunk/main/sw/source/core/doc/docnew.cxx Thu Jun  5 08:44:38 2014
@@ -769,28 +769,26 @@ SfxPrinter& SwDoc::CreatePrinter_() cons
 
 void SwDoc::SetDocShell( SwDocShell* pDSh )
 {
-	if( pDocShell != pDSh )
-	{
+    if(pDocShell != pDSh)
+    {
         if (pDocShell)
         {
             pDocShell->SetUndoManager(0);
         }
-		pDocShell = pDSh;
+
+        pDocShell = pDSh;
+
         if (pDocShell)
         {
             pDocShell->SetUndoManager(& GetUndoManager());
         }
 
-		pLinkMgr->SetPersist( pDocShell );
-		//JP 27.08.98: Bug 55570 - DocShell Pointer auch am DrawModel setzen
-		if( pDrawModel )
-		{
-			((SwDrawDocument*)pDrawModel)->SetObjectShell( pDocShell );
-			pDrawModel->SetPersist( pDocShell );
-			ASSERT( pDrawModel->GetPersist() == GetPersist(),
-					"draw model's persist is out of sync" );
-		}
-	}
+        pLinkMgr->SetPersist(pDocShell);
+
+        // set DocShell pointer also on DrawModel
+        InitDrawModelAndDocShell(pDocShell, GetDrawModel());
+        OSL_ENSURE(!pDrawModel || pDrawModel->GetPersist() == GetPersist(), "draw model's persist is out of sync");
+    }
 }
 
 

Modified: openoffice/trunk/main/sw/source/core/draw/dcontact.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/draw/dcontact.cxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/core/draw/dcontact.cxx (original)
+++ openoffice/trunk/main/sw/source/core/draw/dcontact.cxx Thu Jun  5 08:44:38 2014
@@ -19,8 +19,6 @@
  * 
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
 #include "hintids.hxx"
@@ -70,10 +68,10 @@
 #include <com/sun/star/text/WritingMode2.hpp>
 #include <switerator.hxx>
 #include <algorithm>
+#include <drawdoc.hxx>
 
 using namespace ::com::sun::star;
 
-
 TYPEINIT1( SwContact, SwClient )
 TYPEINIT1( SwFlyDrawContact, SwContact )
 TYPEINIT1( SwDrawContact, SwContact )

Modified: openoffice/trunk/main/sw/source/core/draw/dpage.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/draw/dpage.cxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/core/draw/dpage.cxx (original)
+++ openoffice/trunk/main/sw/source/core/draw/dpage.cxx Thu Jun  5 08:44:38 2014
@@ -59,7 +59,7 @@ using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::drawing;
 using namespace ::com::sun::star::frame;
 
-SwDPage::SwDPage(SwDrawDocument& rNewModel, sal_Bool bMasterPage) :
+SwDPage::SwDPage(SwDrawModel& rNewModel, sal_Bool bMasterPage) :
 	FmFormPage(rNewModel, 0, bMasterPage),
 	pGridLst( 0 ),
 	rDoc(rNewModel.GetDoc())
@@ -114,7 +114,7 @@ void InsertGridFrame( SdrPageGridFrameLi
 const SdrPageGridFrameList*  SwDPage::GetGridFrameList(
 						const SdrPageView* pPV, const Rectangle *pRect ) const
 {
-	ViewShell *pSh = ((SwDrawDocument*)GetModel())->GetDoc().GetCurrentViewShell();	//swmod 071108//swmod 071225
+	ViewShell *pSh = static_cast< SwDrawModel* >(GetModel())->GetDoc().GetCurrentViewShell();	//swmod 071108//swmod 071225
 	if ( pSh )
 	{
 		while ( pSh->Imp()->GetPageView() != pPV )

Modified: openoffice/trunk/main/sw/source/core/draw/drawdoc.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/draw/drawdoc.cxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/core/draw/drawdoc.cxx (original)
+++ openoffice/trunk/main/sw/source/core/draw/drawdoc.cxx Thu Jun  5 08:44:38 2014
@@ -62,37 +62,16 @@ const String GetPalettePath()
 	return aPathOpt.GetPalettePath();
 }
 
-SwDrawDocument::SwDrawDocument( SwDoc* pD ) :
-	FmFormModel( ::GetPalettePath(), &pD->GetAttrPool(), pD->GetDocShell() ),
-	pDoc( pD )
+SwDrawModel::SwDrawModel( SwDoc* pD ) 
+:   FmFormModel( ::GetPalettePath(), &pD->GetAttrPool(), pD->GetDocShell() ),
+    pDoc( pD )
 {
 	SetScaleUnit( MAP_TWIP );
 	SetSwapGraphics( sal_True );
 
-	SwDocShell* pDocSh = pDoc->GetDocShell();
-	if ( pDocSh )
-	{
-		SetObjectShell( pDocSh );
-		SvxColorTableItem* pColItem = ( SvxColorTableItem* )
-                                ( pDocSh->GetItem( SID_COLOR_TABLE ) );
-		XColorListSharedPtr aXCol = pColItem ? 
-            pColItem->GetColorTable() :
-			XColorList::GetStdColorList();
-		SetColorTableAtSdrModel( aXCol );
-
-		if ( !pColItem )
-            pDocSh->PutItem( SvxColorTableItem( aXCol, SID_COLOR_TABLE ) );
-
-        pDocSh->PutItem( SvxGradientListItem( GetGradientListFromSdrModel(), SID_GRADIENT_LIST ));
-        pDocSh->PutItem( SvxHatchListItem( GetHatchListFromSdrModel(), SID_HATCH_LIST ) );
-        pDocSh->PutItem( SvxBitmapListItem( GetBitmapListFromSdrModel(), SID_BITMAP_LIST ) );
-        pDocSh->PutItem( SvxDashListItem( GetDashListFromSdrModel(), SID_DASH_LIST ) );
-        pDocSh->PutItem( SvxLineEndListItem( GetLineEndListFromSdrModel(), SID_LINEEND_LIST ) );
-		pDocSh->PutItem( SfxUInt16Item(SID_ATTR_LINEEND_WIDTH_DEFAULT, 111) );
-		SetObjectShell( pDocSh );
-	}
-	else
-		SetColorTableAtSdrModel( XColorList::GetStdColorList() );
+    // use common InitDrawModelAndDocShell which will set the associations as needed,
+    // including SvxColorTableItem  with WhichID SID_COLOR_TABLE
+    InitDrawModelAndDocShell(pDoc ? pDoc->GetDocShell() : 0, this);
 
 	// copy all the default values to the SdrModel
 	SfxItemPool* pSdrPool = pD->GetAttrPool().GetSecondaryPool();
@@ -137,7 +116,7 @@ SwDrawDocument::SwDrawDocument( SwDoc* p
 \************************************************************************/
 
 
-SwDrawDocument::~SwDrawDocument()
+SwDrawModel::~SwDrawModel()
 {
 	Broadcast(SdrHint(HINT_MODELCLEARED));
 
@@ -156,7 +135,7 @@ SwDrawDocument::~SwDrawDocument()
 \************************************************************************/
 
 
-SdrPage* SwDrawDocument::AllocPage(FASTBOOL bMasterPage)
+SdrPage* SwDrawModel::AllocPage(FASTBOOL bMasterPage)
 {
 	SwDPage* pPage = new SwDPage(*this, 0 != bMasterPage);
 	pPage->SetName( String::CreateFromAscii(
@@ -165,7 +144,7 @@ SdrPage* SwDrawDocument::AllocPage(FASTB
 }
 
 
-SvStream* SwDrawDocument::GetDocumentStream( SdrDocumentStreamInfo& rInfo ) const
+SvStream* SwDrawModel::GetDocumentStream( SdrDocumentStreamInfo& rInfo ) const
 {
 	SvStream* pRet = NULL;
     uno::Reference < embed::XStorage > xRoot( pDoc->GetDocStorage() );
@@ -205,14 +184,14 @@ SvStream* SwDrawDocument::GetDocumentStr
 	return pRet;
 }
 
-SdrLayerID SwDrawDocument::GetControlExportLayerId( const SdrObject & ) const
+SdrLayerID SwDrawModel::GetControlExportLayerId( const SdrObject & ) const
 {
 	//fuer Versionen < 5.0, es gab nur Hell und Heaven
 	return (SdrLayerID)pDoc->GetHeavenId();
 }
 
 // --> OD 2006-03-01 #b6382898#
-uno::Reference< uno::XInterface > SwDrawDocument::createUnoModel()
+uno::Reference< uno::XInterface > SwDrawModel::createUnoModel()
 {
 
     uno::Reference< uno::XInterface > xModel;
@@ -226,8 +205,7 @@ uno::Reference< uno::XInterface > SwDraw
     }
     catch( uno::RuntimeException& )
     {
-        ASSERT( false,
-                "<SwDrawDocument::createUnoModel()> - could *not* retrieve model at <SwDocShell>" );
+        ASSERT( false, "<SwDrawModel::createUnoModel()> - could *not* retrieve model at <SwDocShell>" );
     }
 
     return xModel;

Modified: openoffice/trunk/main/sw/source/core/frmedt/feshview.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/frmedt/feshview.cxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/core/frmedt/feshview.cxx (original)
+++ openoffice/trunk/main/sw/source/core/frmedt/feshview.cxx Thu Jun  5 08:44:38 2014
@@ -19,15 +19,11 @@
  * 
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
 
 #include <com/sun/star/embed/EmbedMisc.hpp>
-
 #include "hintids.hxx"
-
 #include <svx/sdrobjectfilter.hxx>
 #include <svx/svditer.hxx>
 #include <svx/svdobj.hxx>
@@ -86,6 +82,7 @@
 #include <HandleAnchorNodeChg.hxx>
 #include <basegfx/polygon/b2dpolygon.hxx>
 #include <switerator.hxx>
+#include <drawdoc.hxx>
 
 #define SCROLLVAL 75
 

Modified: openoffice/trunk/main/sw/source/core/layout/fly.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/layout/fly.cxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/core/layout/fly.cxx (original)
+++ openoffice/trunk/main/sw/source/core/layout/fly.cxx Thu Jun  5 08:44:38 2014
@@ -19,10 +19,9 @@
  * 
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
+
 #include "hintids.hxx"
 #include <svl/itemiter.hxx>
 #include <svtools/imap.hxx>
@@ -85,10 +84,10 @@
 #include <vcl/svapp.hxx>
 #include <vcl/salbtype.hxx>		// FRound
 #include "switerator.hxx"
+#include <drawdoc.hxx>
 
 using namespace ::com::sun::star;
 
-
 // OD 2004-03-23 #i26791
 TYPEINIT2(SwFlyFrm,SwLayoutFrm,SwAnchoredObject);
 
@@ -450,8 +449,7 @@ void SwFlyFrm::InitDrawObj( sal_Bool bNo
 	if ( !pContact )
     {
         // --> OD 2005-08-08 #i52858# - method name changed
-		pContact = new SwFlyDrawContact( (SwFlyFrmFmt*)GetFmt(),
-                                          pIDDMA->GetOrCreateDrawModel() );
+		pContact = new SwFlyDrawContact( (SwFlyFrmFmt*)GetFmt(), pIDDMA->GetOrCreateDrawModel() );
         // <--
     }
 	ASSERT( pContact, "InitDrawObj failed" );

Modified: openoffice/trunk/main/sw/source/core/layout/frmtool.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/layout/frmtool.cxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/core/layout/frmtool.cxx (original)
+++ openoffice/trunk/main/sw/source/core/layout/frmtool.cxx Thu Jun  5 08:44:38 2014
@@ -19,10 +19,9 @@
  * 
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
+
 #include <hintids.hxx>
 #include <tools/bigint.hxx>
 #include <svx/svdmodel.hxx>
@@ -35,7 +34,6 @@
 #include <editeng/boxitem.hxx>
 #include <sfx2/printer.hxx>
 #include <editeng/lspcitem.hxx>
-
 #include <fmtornt.hxx>
 #include <fmtanchr.hxx>
 #include <fmthdft.hxx>
@@ -80,9 +78,8 @@
 #include <sortedobjs.hxx>
 #include <objectformatter.hxx>
 #include <switerator.hxx>
-
-//UUUU
 #include <svx/sdr/attribute/sdrallfillattributeshelper.hxx>
+#include <drawdoc.hxx>
 
 // ftnfrm.cxx:
 void lcl_RemoveFtns( SwFtnBossFrm* pBoss, sal_Bool bPageOnly, sal_Bool bEndNotes );

Modified: openoffice/trunk/main/sw/source/core/layout/newfrm.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/layout/newfrm.cxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/core/layout/newfrm.cxx (original)
+++ openoffice/trunk/main/sw/source/core/layout/newfrm.cxx Thu Jun  5 08:44:38 2014
@@ -19,10 +19,9 @@
  * 
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
+
 #include <svx/svdmodel.hxx>
 #include <svx/svdpage.hxx>
 #include <fmtfordr.hxx>
@@ -51,6 +50,7 @@
 #include "IDocumentDrawModelAccess.hxx"
 #include <hints.hxx>
 #include <viewopt.hxx>
+#include <drawdoc.hxx>
 
 SwLayVout     *SwRootFrm::pVout = 0;
 sal_Bool 		   SwRootFrm::bInPaint = sal_False;
@@ -515,7 +515,7 @@ void SwRootFrm::Init( SwFrmFmt* pFmt )
 	pLayoutAccess->SetCurrentViewShell( this->GetCurrShell() );		//Fuer das Erzeugen der Flys durch MakeFrms()	//swmod 071108//swmod 071225
 	bCallbackActionEnabled = sal_False;	//vor Verlassen auf sal_True setzen!
 
-    SdrModel *pMd = pFmt->getIDocumentDrawModelAccess()->GetDrawModel();
+    SwDrawModel* pMd = pFmt->getIDocumentDrawModelAccess()->GetDrawModel();
 	if ( pMd )
 	{
         // Disable "multiple layout"

Modified: openoffice/trunk/main/sw/source/core/layout/paintfrm.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/layout/paintfrm.cxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/core/layout/paintfrm.cxx (original)
+++ openoffice/trunk/main/sw/source/core/layout/paintfrm.cxx Thu Jun  5 08:44:38 2014
@@ -19,8 +19,6 @@
  * 
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
 
@@ -82,23 +80,18 @@
 #include <svx/svdogrp.hxx>
 #include <sortedobjs.hxx>
 #include <EnhancedPDFExportHelper.hxx>
-// <--
-// --> OD #i76669#
 #include <svx/sdr/contact/viewobjectcontactredirector.hxx>
 #include <svx/sdr/contact/viewobjectcontact.hxx>
 #include <svx/sdr/contact/viewcontact.hxx>
-// <--
-
 #include <ndole.hxx>
 #include <svx/charthelper.hxx>
 #include <PostItMgr.hxx>
 #include <tools/color.hxx>
 #include <vcl/svapp.hxx>
-
-//UUUU
 #include <svx/sdr/attribute/sdrallfillattributeshelper.hxx>
 #include <drawinglayer/processor2d/processor2dtools.hxx>
 #include <ndtxt.hxx>
+#include <drawdoc.hxx>
 
 #define COL_NOTES_SIDEPANE					RGB_COLORDATA(230,230,230)
 #define COL_NOTES_SIDEPANE_BORDER			RGB_COLORDATA(200,200,200)
@@ -6926,7 +6919,7 @@ Graphic SwFlyFrmFmt::MakeGraphic( ImageM
 Graphic SwDrawFrmFmt::MakeGraphic( ImageMap* )
 {
 	Graphic aRet;
-    SdrModel *pMod = getIDocumentDrawModelAccess()->GetDrawModel();
+    SwDrawModel* pMod = getIDocumentDrawModelAccess()->GetDrawModel();
 	if ( pMod )
 	{
 		SdrObject *pObj = FindSdrObject();
@@ -6940,4 +6933,4 @@ Graphic SwDrawFrmFmt::MakeGraphic( Image
 	return aRet;
 }
 
-
+//eof

Modified: openoffice/trunk/main/sw/source/core/undo/docundo.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/undo/docundo.cxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/core/undo/docundo.cxx (original)
+++ openoffice/trunk/main/sw/source/core/undo/docundo.cxx Thu Jun  5 08:44:38 2014
@@ -19,19 +19,13 @@
  * 
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
 
 #include <UndoManager.hxx>
-
 #include <unotools/undoopt.hxx>
-
 #include <vcl/wrkwin.hxx>
-
 #include <svx/svdmodel.hxx>
-
 #include <swmodule.hxx>
 #include <doc.hxx>
 #include <ndarr.hxx>
@@ -44,16 +38,13 @@
 #include <editsh.hxx>
 #include <unobaseclass.hxx>
 #include <limits>
-
-#include <limits>
+#include <drawdoc.hxx>
 
 using namespace ::com::sun::star;
 
-
 // the undo array should never grow beyond this limit:
 #define UNDO_ACTION_LIMIT (USHRT_MAX - 1000)
 
-
 // UndoManager ///////////////////////////////////////////////////////////
 
 namespace sw {
@@ -98,7 +89,7 @@ void UndoManager::DoUndo(bool const bDoU
     {
         EnableUndo(bDoUndo);
 
-        SdrModel *const pSdrModel = m_rDrawModelAccess.GetDrawModel();
+        SwDrawModel*const pSdrModel = m_rDrawModelAccess.GetDrawModel();
 	    if( pSdrModel )
         {
             pSdrModel->EnableUndo(bDoUndo);

Modified: openoffice/trunk/main/sw/source/core/undo/unattr.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/undo/unattr.cxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/core/undo/unattr.cxx (original)
+++ openoffice/trunk/main/sw/source/core/undo/unattr.cxx Thu Jun  5 08:44:38 2014
@@ -19,22 +19,16 @@
  * 
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
 
 #define _SVSTDARR_USHORTS
 #define _SVSTDARR_USHORTSSORT
 #include <UndoAttribute.hxx>
-
 #include <svl/itemiter.hxx>
-
 #include <editeng/tstpitem.hxx>
-
 #include <svx/svdmodel.hxx>
 #include <svx/svdpage.hxx>
-
 #include <hintids.hxx>
 #include <fmtflcnt.hxx>
 #include <txtftn.hxx>
@@ -63,7 +57,7 @@
 #include <section.hxx>
 #include <charfmt.hxx>
 #include <switerator.hxx>
-
+#include <drawdoc.hxx>
 
 // -----------------------------------------------------
 

Modified: openoffice/trunk/main/sw/source/core/unocore/unodraw.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/unocore/unodraw.cxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/core/unocore/unodraw.cxx (original)
+++ openoffice/trunk/main/sw/source/core/unocore/unodraw.cxx Thu Jun  5 08:44:38 2014
@@ -19,14 +19,11 @@
  * 
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
 
 #include <swtypes.hxx>
 #include <cmdid.h>
-
 #include <unomid.h>
 #include <unodraw.hxx>
 #include <unocoll.hxx>
@@ -83,6 +80,7 @@
 #include <list>
 #include <iterator>
 #include <switerator.hxx>
+#include <drawdoc.hxx>
 
 using ::rtl::OUString;
 using namespace ::com::sun::star;
@@ -862,7 +860,7 @@ SwFmDrawPage* 	SwXDrawPage::GetSvxPage()
 	{
 		vos::OGuard  aGuard(Application::GetSolarMutex());
         // --> OD 2005-08-08 #i52858# - method name changed
-        SdrModel* pModel = pDoc->GetOrCreateDrawModel();
+        SwDrawModel* pModel = pDoc->GetOrCreateDrawModel();
         // <--
 		SdrPage* pPage = pModel->GetPage( 0 );
 

Modified: openoffice/trunk/main/sw/source/core/unocore/unoframe.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/unocore/unoframe.cxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/core/unocore/unoframe.cxx (original)
+++ openoffice/trunk/main/sw/source/core/unocore/unoframe.cxx Thu Jun  5 08:44:38 2014
@@ -116,8 +116,6 @@
 #include <fmtwrapinfluenceonobjpos.hxx>
 #include <toolkit/helper/vclunohelper.hxx>
 #include <switerator.hxx>
-
-//UUUU
 #include <svx/unobrushitemhelper.hxx>
 #include <svx/xfillit0.hxx>
 #include <svx/xbtmpit.hxx>
@@ -135,6 +133,7 @@
 #include <svx/xflbckit.hxx>
 #include <svx/unoshape.hxx>
 #include <swunohelper.hxx>
+#include <drawdoc.hxx>
 
 // from fefly1.cxx
 extern sal_Bool lcl_ChkAndSetNewAnchor( SwEditShell& rEditShell, const SwFlyFrm& rFly, SfxItemSet& rSet );
@@ -1287,7 +1286,7 @@ SdrObject *SwXFrame::GetOrCreateSdrObjec
 	{
 		SwDoc *pDoc = pFmt->GetDoc();
         // --> OD 2005-08-08 #i52858# - method name changed
-        SdrModel *pDrawModel = pDoc->GetOrCreateDrawModel();
+        SwDrawModel* pDrawModel = pDoc->GetOrCreateDrawModel();
         // <--
 		SwFlyDrawContact* pContactObject
 					= new SwFlyDrawContact( pFmt, pDrawModel );
@@ -1680,7 +1679,7 @@ void SwXFrame::setPropertyValue(const ::
 			{
 				SdrObject* pObject =
 					GetOrCreateSdrObject( (SwFlyFrmFmt*)pFmt );
-				SdrModel *pDrawModel = pDoc->GetDrawModel();
+				SwDrawModel* pDrawModel = pDoc->GetDrawModel();
 				pDrawModel->GetPage(0)->
 							SetObjectOrdNum(pObject->GetOrdNum(), nZOrder);
 			}

Modified: openoffice/trunk/main/sw/source/core/view/vdraw.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/view/vdraw.cxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/core/view/vdraw.cxx (original)
+++ openoffice/trunk/main/sw/source/core/view/vdraw.cxx Thu Jun  5 08:44:38 2014
@@ -19,12 +19,9 @@
  * 
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
 
-
 #include <svx/svdmodel.hxx>
 #include <svx/svdpage.hxx>
 #include <tools/shl.hxx>
@@ -33,15 +30,10 @@
 #include <svx/svdpagv.hxx>
 #include <fmtanchr.hxx>
 #include <frmfmt.hxx>
-
-/// OD 29.08.2002 #102450#
-/// include <svx/svdoutl.hxx>
 #include <svx/svdoutl.hxx>
-
 #ifdef DBG_UTIL
 #include <svx/fmglob.hxx>
 #endif
-
 #include "fesh.hxx"
 #include "pagefrm.hxx"
 #include "rootfrm.hxx"
@@ -53,9 +45,8 @@
 #include "dview.hxx"
 #include "flyfrm.hxx"
 #include <vcl/svapp.hxx>
-
 #include <IDocumentDrawModelAccess.hxx>
-
+#include <drawdoc.hxx>
 
 /*************************************************************************
 |*

Modified: openoffice/trunk/main/sw/source/core/view/viewimp.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/view/viewimp.cxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/core/view/viewimp.cxx (original)
+++ openoffice/trunk/main/sw/source/core/view/viewimp.cxx Thu Jun  5 08:44:38 2014
@@ -19,12 +19,9 @@
  * 
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
 
-
 #include "crsrsh.hxx"
 #include "rootfrm.hxx"
 #include "pagefrm.hxx"
@@ -41,16 +38,14 @@
 #include <swmodule.hxx>
 #include <svx/svdpage.hxx>
 #include <accmap.hxx>
-
-// OD 12.12.2002 #103492#
 #include <pagepreviewlayout.hxx>
-
 #include <comcore.hrc>
 #include <svx/svdundo.hxx>
 #include <IDocumentLayoutAccess.hxx>
 #include <IDocumentDrawModelAccess.hxx>
 #include <IDocumentDeviceAccess.hxx>
 #include <IDocumentSettingAccess.hxx>
+#include <drawdoc.hxx>
 
 /*************************************************************************
 |*

Modified: openoffice/trunk/main/sw/source/core/view/viewsh.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/view/viewsh.cxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/core/view/viewsh.cxx (original)
+++ openoffice/trunk/main/sw/source/core/view/viewsh.cxx Thu Jun  5 08:44:38 2014
@@ -71,6 +71,7 @@
 #include <vcl/svapp.hxx>
 #include <svx/sdrpaintwindow.hxx>
 #include <vcl/dibtools.hxx>
+#include <drawdoc.hxx>
 
 sal_Bool ViewShell::bLstAct = sal_False;
 ShellResource *ViewShell::pShellRes = 0;
@@ -844,7 +845,7 @@ void ViewShell::SetAddExtLeading( bool b
     {
         SwWait aWait( *GetDoc()->GetDocShell(), true );
         pIDSA->set(IDocumentSettingAccess::ADD_EXT_LEADING, bNew );
-        SdrModel* pTmpDrawModel = getIDocumentDrawModelAccess()->GetDrawModel();
+        SwDrawModel* pTmpDrawModel = getIDocumentDrawModelAccess()->GetDrawModel();
         if ( pTmpDrawModel )
             pTmpDrawModel->SetAddExtLeading( bNew );
         const sal_uInt8 nInv = INV_PRTAREA | INV_SIZE | INV_TABLE | INV_SECTION;
@@ -978,7 +979,7 @@ void ViewShell::Reformat()
 
  void ViewShell::ChgNumberDigits()
  {
-     SdrModel* pTmpDrawModel = getIDocumentDrawModelAccess()->GetDrawModel();
+     SwDrawModel* pTmpDrawModel = getIDocumentDrawModelAccess()->GetDrawModel();
      if ( pTmpDrawModel )
             pTmpDrawModel->ReformatAllTextObjects();
 	 Reformat();

Modified: openoffice/trunk/main/sw/source/filter/html/htmldraw.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/html/htmldraw.cxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/filter/html/htmldraw.cxx (original)
+++ openoffice/trunk/main/sw/source/filter/html/htmldraw.cxx Thu Jun  5 08:44:38 2014
@@ -19,12 +19,9 @@
  * 
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
 
-
 #include "hintids.hxx"
 #include <vcl/svapp.hxx>
 #include <vcl/wrkwin.hxx>
@@ -33,7 +30,6 @@
 #include <svx/svdobj.hxx>
 #include <svx/svdotext.hxx>
 #include <editeng/eeitem.hxx>
-
 #ifndef _OUTLINER_HXX //autogen
 #define _EEITEMID_HXX
 #include <editeng/outliner.hxx>
@@ -49,8 +45,6 @@
 #include <svtools/htmltokn.h>
 #include <svtools/htmlkywd.hxx>
 #include <svx/svdpool.hxx>
-
-
 #include "charatr.hxx"
 #include <frmfmt.hxx>
 #include <fmtanchr.hxx>
@@ -62,10 +56,10 @@
 #include "swcss1.hxx"
 #include "swhtml.hxx"
 #include "wrthtml.hxx"
+#include <drawdoc.hxx>
 
 using namespace ::com::sun::star;
 
-
 const sal_uInt32 HTML_FRMOPTS_MARQUEE 	=
 	HTML_FRMOPT_ALIGN |
 	HTML_FRMOPT_SPACE;
@@ -383,7 +377,7 @@ void SwHTMLParser::NewMarquee( HTMLTable
 
 	// Ein DrawTxtobj anlegen
     // --> OD 2005-08-08 #i52858# - method name changed
-    SdrModel* pModel = pDoc->GetOrCreateDrawModel();
+    SwDrawModel* pModel = pDoc->GetOrCreateDrawModel();
     // <--
 	SdrPage* pPg = pModel->GetPage( 0 );
 	pMarquee = SdrObjFactory::MakeNewObject( SdrInventor,

Modified: openoffice/trunk/main/sw/source/filter/rtf/rtffly.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/rtf/rtffly.cxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/filter/rtf/rtffly.cxx (original)
+++ openoffice/trunk/main/sw/source/filter/rtf/rtffly.cxx Thu Jun  5 08:44:38 2014
@@ -19,10 +19,9 @@
  * 
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
+
 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
 #include <hintids.hxx>
 #include <tools/list.hxx>
@@ -61,15 +60,11 @@
 #include <deque>
 #include <map>
 #include <utility>
-// --> OD 2004-06-30 #i27767#
 #include <fmtwrapinfluenceonobjpos.hxx>
-// <--
 #include <editeng/brshitem.hxx>
 #include <fmtfollowtextflow.hxx>
-// --> OD, FLR 2006-02-16 #131205#
 #include "dcontact.hxx"
-// <--
-
+#include <drawdoc.hxx>
 
 using namespace ::com::sun::star;
 

Modified: openoffice/trunk/main/sw/source/filter/rtf/swparrtf.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/rtf/swparrtf.cxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/filter/rtf/swparrtf.cxx (original)
+++ openoffice/trunk/main/sw/source/filter/rtf/swparrtf.cxx Thu Jun  5 08:44:38 2014
@@ -19,15 +19,12 @@
  * 
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
+
 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
 #include <hintids.hxx>
-
 #include <stack>
-
 #include <tools/errinf.hxx>
 #include <tools/stream.hxx>
 #include <svl/itemiter.hxx>
@@ -82,14 +79,11 @@
 #include <statstr.hrc>          // ResId fuer Statusleiste
 #include <SwStyleNameMapper.hxx>
 #include <tblsel.hxx>           // SwSelBoxes
-
 #include <docsh.hxx>
 #include <fmtlsplt.hxx> // SwLayoutSplit
 #include <editeng/keepitem.hxx>
 #include <svx/svdopath.hxx>
 #include <svx/svdorect.hxx>
-
-
 #include <fmtsrnd.hxx>
 #include <fmtfollowtextflow.hxx>
 #include <svx/svdmodel.hxx>
@@ -101,19 +95,16 @@
 #include <svx/svdoutl.hxx>
 #include <editeng/outlobj.hxx>
 #include <editeng/paperinf.hxx>
-
 #include <tools/stream.hxx>
 #include <basegfx/polygon/b2dpolygon.hxx>
 #include <basegfx/polygon/b2dpolypolygon.hxx>
 #include <basegfx/range/b2drange.hxx>
 #include <vcl/salbtype.hxx>     // FRound
-
 #include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
-
+#include <drawdoc.hxx>
 
 using namespace ::com::sun::star;
 
-
 // einige Hilfs-Funktionen
 // char
 inline const SvxFontHeightItem& GetSize(const SfxItemSet& rSet,sal_Bool bInP=sal_True)
@@ -1305,7 +1296,7 @@ void SwRTFParser::ReadDrawingObject()
         aFlySet.Put( aVert );
 
         pDoc->GetOrCreateDrawModel();
-        SdrModel* pDrawModel  = pDoc->GetDrawModel();
+        SwDrawModel* pDrawModel  = pDoc->GetDrawModel();
         SdrPage* pDrawPg = pDrawModel->GetPage(0);
         pDrawPg->InsertObject(pStroke, 0);
 
@@ -1339,7 +1330,7 @@ void SwRTFParser::InsertShpObject(SdrObj
         aFlySet.Put(SvxOpaqueItem(RES_OPAQUE,false));
 
         pDoc->GetOrCreateDrawModel();
-        SdrModel* pDrawModel  = pDoc->GetDrawModel();
+        SwDrawModel* pDrawModel  = pDoc->GetDrawModel();
         SdrPage* pDrawPg = pDrawModel->GetPage(0);
         pDrawPg->InsertObject(pStroke);
         pDrawPg->SetObjectOrdNum(pStroke->GetOrdNum(), _nZOrder);

Modified: openoffice/trunk/main/sw/source/filter/ww8/docxattributeoutput.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/ww8/docxattributeoutput.cxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/filter/ww8/docxattributeoutput.cxx (original)
+++ openoffice/trunk/main/sw/source/filter/ww8/docxattributeoutput.cxx Thu Jun  5 08:44:38 2014
@@ -1696,7 +1696,7 @@ void DocxAttributeOutput::OutputFlyFrame
                     bool bSwapInPage = false;
                     if ( !pSdrObj->GetPage() )
                     {
-                        if ( SdrModel* pModel = m_rExport.pDoc->GetDrawModel() )
+                        if ( SwDrawModel* pModel = m_rExport.pDoc->GetDrawModel() )
                         {
                             if ( SdrPage *pPage = pModel->GetPage( 0 ) )
                             {

Modified: openoffice/trunk/main/sw/source/filter/ww8/rtfattributeoutput.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/ww8/rtfattributeoutput.cxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/filter/ww8/rtfattributeoutput.cxx (original)
+++ openoffice/trunk/main/sw/source/filter/ww8/rtfattributeoutput.cxx Thu Jun  5 08:44:38 2014
@@ -19,7 +19,8 @@
  * 
  *************************************************************/
 
-
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sw.hxx"
 
 #include "rtfattributeoutput.hxx"
 #include "rtfexport.hxx"
@@ -34,14 +35,10 @@
 #include "fmtruby.hxx"
 #include "charfmt.hxx"
 #include "breakit.hxx"
-
 #include <i18npool/mslangid.hxx>
-
 #include <hintids.hxx>
-
 #include <svl/poolitem.hxx>
 #include <svtools/rtfkeywd.hxx>
-
 #include <editeng/fontitem.hxx>
 #include <editeng/tstpitem.hxx>
 #include <editeng/adjitem.hxx>
@@ -86,7 +83,6 @@
 #include <svx/fmglob.hxx>
 #include <svx/svdouno.hxx>
 #include <filter/msfilter/msoleexp.hxx>
-
 #include <docufld.hxx>
 #include <flddropdown.hxx>
 #include <format.hxx>
@@ -116,23 +112,19 @@
 #include <ndole.hxx>
 #include <lineinfo.hxx>
 #include <rtf.hxx>
-
 #include <rtl/strbuf.hxx>
 #include <rtl/ustrbuf.hxx>
 #include <rtl/ustring.hxx>
-
 #include <tools/color.hxx>
-
 #include <vcl/cvtgrf.hxx>
-
 #include <com/sun/star/i18n/ScriptType.hdl>
 #include <com/sun/star/drawing/XShape.hpp>
 #include <com/sun/star/frame/XModel.hpp>
 #include <com/sun/star/chart2/XChartDocument.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/container/XNamed.hpp>
-
 #include <osl/diagnose.h>
+#include <drawdoc.hxx>
 
 using rtl::OString;
 using rtl::OStringBuffer;
@@ -1732,7 +1724,7 @@ void RtfAttributeOutput::OutputFlyFrame_
                     bool bSwapInPage = false;
                     if ( !pSdrObj->GetPage() )
                     {
-                        if ( SdrModel* pModel = m_rExport.pDoc->GetDrawModel() )
+                        if ( SwDrawModel* pModel = m_rExport.pDoc->GetDrawModel() )
                         {
                             if ( SdrPage *pPage = pModel->GetPage( 0 ) )
                             {

Modified: openoffice/trunk/main/sw/source/filter/ww8/wrtw8esh.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/ww8/wrtw8esh.cxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/filter/ww8/wrtw8esh.cxx (original)
+++ openoffice/trunk/main/sw/source/filter/ww8/wrtw8esh.cxx Thu Jun  5 08:44:38 2014
@@ -19,16 +19,12 @@
  * 
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
+
 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
 #include <com/sun/star/embed/Aspects.hpp>
-
-
 #include <hintids.hxx>
-
 #define _SVSTDARR_ULONGSSORT
 #define _SVSTDARR_USHORTS
 #include <svl/svstdarr.hxx>
@@ -56,27 +52,21 @@
 #include <editeng/editeng.hxx>
 #ifndef _SVX_FLDITEM_HXX
 //miserable hack to get around #98519#
-
 #include <editeng/flditem.hxx>
 #endif
-
 #include <comphelper/seqstream.hxx>
 #include <unotools/ucbstreamhelper.hxx>
 #include <svtools/filter.hxx>
 #include <svx/fmglob.hxx>
 #include <svx/svdouno.hxx>
 #include <svx/unoapi.hxx>
-
-// #i71538#
 #include <svx/svdview.hxx>
 #include <fmtcnct.hxx>
 #include <fmtanchr.hxx>
 #include <fmtsrnd.hxx>
 #include <fmtornt.hxx>
 #include <fmtfsize.hxx>
-// --> OD 2005-01-06 #i30669#
 #include <fmtfollowtextflow.hxx>
-// <--
 #include <dcontact.hxx>
 #include <frmfmt.hxx>
 #include <fmtcntnt.hxx>
@@ -98,9 +88,7 @@
 #include "writerwordglue.hxx"
 #include "wrtww8.hxx"
 #include "escher.hxx"
-// --> OD 2007-07-24 #148096#
 #include <ndtxt.hxx>
-// <--
 #include "WW8FFData.hxx"
 #include <editeng/shaditem.hxx>
 #include <svx/unoapi.hxx>
@@ -110,6 +98,7 @@
 #include "sfx2/sfxsids.hrc"
 #include <svl/urihelper.hxx>
 #include <unotools/saveopt.hxx>
+#include <drawdoc.hxx>
 
 using namespace com::sun::star;
 using namespace sw::util;
@@ -986,7 +975,7 @@ sal_uInt32 WW8Export::GetSdrOrdNum( cons
         SwFrmFmt* pFmt = (SwFrmFmt*)&rFmt;
         nOrdNum = pDoc->GetSpzFrmFmts()->GetPos( pFmt );
 
-        const SdrModel* pModel = pDoc->GetDrawModel();
+        const SwDrawModel* pModel = pDoc->GetDrawModel();
         if( pModel )
             nOrdNum += pModel->GetPage( 0 )->GetObjCount();
     }
@@ -2166,7 +2155,7 @@ sal_Int32 SwEscherEx::WriteFlyFrameAttr(
 void SwBasicEscherEx::Init()
 {
     MapUnit eMap = MAP_TWIP;
-    if (SdrModel *pModel = rWrt.pDoc->GetDrawModel())
+    if (SwDrawModel* pModel = rWrt.pDoc->GetDrawModel())
     {
         // PPT arbeitet nur mit Einheiten zu 576DPI
         // WW hingegen verwendet twips, dh. 1440DPI.
@@ -2289,7 +2278,7 @@ SwEscherEx::SwEscherEx(SvStream* pStrm, 
                             bool bSwapInPage = false;
                             if (!pSdrObj->GetPage())
                             {
-                                if (SdrModel* pModel = rWrt.pDoc->GetDrawModel())
+                                if (SwDrawModel* pModel = rWrt.pDoc->GetDrawModel())
                                 {
                                     if (SdrPage *pPage = pModel->GetPage(0))
                                     {
@@ -3044,7 +3033,7 @@ void SwEscherEx::WriteOCXControl( const 
     {
         OpenContainer( ESCHER_SpContainer );
 
-        SdrModel *pModel = rWrt.pDoc->GetDrawModel();
+        SwDrawModel* pModel = rWrt.pDoc->GetDrawModel();
         OutputDevice *pDevice = Application::GetDefaultDevice();
         ASSERT(pModel && pDevice, "no model or device");
 

Modified: openoffice/trunk/main/sw/source/filter/ww8/wrtww8.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/ww8/wrtww8.cxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/filter/ww8/wrtww8.cxx (original)
+++ openoffice/trunk/main/sw/source/filter/ww8/wrtww8.cxx Thu Jun  5 08:44:38 2014
@@ -19,31 +19,23 @@
  * 
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
 
 #include <iostream>
-
 #include <com/sun/star/embed/ElementModes.hpp>
 #include <com/sun/star/embed/XStorage.hpp>
 #include <unotools/ucbstreamhelper.hxx>
-
 #include <algorithm>
-
 #include <map>
 #include <set>
-
 #include <hintids.hxx>
 #include <string.h>             // memcpy()
 #include <osl/endian.h>
 #include <docsh.hxx>
-
 #define _SVSTDARR_BOOLS
 #include <svl/svstdarr.hxx>
-
 #include <unotools/fltrcfg.hxx>
 #include <vcl/salbtype.hxx>
 #include <sot/storage.hxx>
@@ -97,19 +89,14 @@
 #include <comphelper/extract.hxx>
 #include <comphelper/stlunosequence.hxx>
 #include <writerfilter/doctok/sprmids.hxx>
-
 #include "writerhelper.hxx"
 #include "writerwordglue.hxx"
 #include "ww8attributeoutput.hxx"
-
 #include <IDocumentMarkAccess.hxx>
 #include <xmloff/odffields.hxx>
-
 #include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
 #include <com/sun/star/document/XDocumentProperties.hpp>
-
 #include "dbgoutsw.hxx"
-
 #include <sfx2/docfile.hxx>
 #include <sfx2/request.hxx>
 #include <sfx2/frame.hxx>
@@ -123,9 +110,8 @@
 #include <editeng/charrotateitem.hxx>
 #include "WW8FibData.hxx"
 #include "numrule.hxx"
-
 #include <boost/scoped_ptr.hpp>
-
+#include <drawdoc.hxx>
 
 using namespace sw::util;
 using namespace sw::types;

Modified: openoffice/trunk/main/sw/source/filter/ww8/ww8graf.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/ww8/ww8graf.cxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/filter/ww8/ww8graf.cxx (original)
+++ openoffice/trunk/main/sw/source/filter/ww8/ww8graf.cxx Thu Jun  5 08:44:38 2014
@@ -19,10 +19,9 @@
  * 
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
+
 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
 #include <svl/urihelper.hxx>
 #include <hintids.hxx>
@@ -89,20 +88,18 @@
 #include <fmtinfmt.hxx>
 #include <editeng/eeitem.hxx>
 #include <editeng/flditem.hxx>
-// OD 30.09.2003 #i18732#
 #include <fmtfollowtextflow.hxx>
 #include "writerhelper.hxx"
 #include "writerwordglue.hxx"
 #include <basegfx/point/b2dpoint.hxx>
 #include <basegfx/polygon/b2dpolygon.hxx>
 #include <editeng/editobj.hxx>
-
 #include <math.h>
-
 #include <fmturl.hxx>
 #include <svx/hlnkitem.hxx>
 #include <svl/whiter.hxx>
 #include "ww8par2.hxx"
+#include <drawdoc.hxx>
 
 using namespace ::com::sun::star;
 using namespace sw::types;

Modified: openoffice/trunk/main/sw/source/filter/xml/swxml.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/xml/swxml.cxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/filter/xml/swxml.cxx (original)
+++ openoffice/trunk/main/sw/source/filter/xml/swxml.cxx Thu Jun  5 08:44:38 2014
@@ -19,14 +19,9 @@
  * 
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
 
-
-
-
 #define _SVSTDARR_STRINGS
 #include <rsc/rscsfx.hxx>
 #include <tools/urlobj.hxx>
@@ -57,7 +52,6 @@
 #include <svx/xmleohlp.hxx>
 #include <comphelper/genericpropertyset.hxx>
 #include <rtl/logfile.hxx>
-
 #include <sfx2/frame.hxx>
 #include <unotools/ucbstreamhelper.hxx>
 #include <swerror.h>
@@ -68,33 +62,21 @@
 #include <unotextrange.hxx>
 #include <swmodule.hxx>
 #include <SwXMLSectionList.hxx>
-
 #include <statstr.hrc>
-
-// --> OD 2005-09-06 #i44177#
 #include <SwStyleNameMapper.hxx>
 #include <poolfmt.hxx>
 #include <numrule.hxx>
 #include <paratr.hxx>
-// <--
-
-// --> OD 2006-02-22 #b6382898#
 #include <svx/svdmodel.hxx>
 #include <svx/svdpage.hxx>
 #include <svx/svditer.hxx>
 #include <svx/svdoole2.hxx>
 #include <svx/svdograf.hxx>
-// <--
-
-// --> OD 2008-12-17 #i70748#
 #include <sfx2/docfilt.hxx>
-// <--
-
 #include <istyleaccess.hxx>
 #define LOGFILE_AUTHOR "mb93740"
-
 #include <sfx2/DocumentMetadataAccess.hxx>
-
+#include <drawdoc.hxx>
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;

Modified: openoffice/trunk/main/sw/source/filter/xml/xmlexp.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/xml/xmlexp.cxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/filter/xml/xmlexp.cxx (original)
+++ openoffice/trunk/main/sw/source/filter/xml/xmlexp.cxx Thu Jun  5 08:44:38 2014
@@ -19,8 +19,6 @@
  * 
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
 
@@ -59,12 +57,10 @@
 #include <editeng/unolingu.hxx>
 #include <editeng/forbiddencharacterstable.hxx>
 #include <ForbiddenCharactersEnum.hxx>
-
-// for locking SolarMutex: svapp + mutex
 #include <vcl/svapp.hxx>
 #include <vos/mutex.hxx>
-
 #include <pausethreadstarting.hxx>
+#include <drawdoc.hxx>
 
 using ::rtl::OUString;
 using namespace ::com::sun::star;
@@ -326,7 +322,7 @@ sal_uInt32 SwXMLExport::exportDoc( enum 
 	if( (getExportFlags() & (EXPORT_MASTERSTYLES|EXPORT_CONTENT)) != 0 )
 	{
 		//Auf die Korrektheit der OrdNums sind wir schon angewiesen.
-		SdrModel* pModel = pDoc->GetDrawModel();
+		SwDrawModel* pModel = pDoc->GetDrawModel();
 		if( pModel )
 			pModel->GetPage( 0 )->RecalcObjOrdNums();
 	}

Modified: openoffice/trunk/main/sw/source/filter/xml/xmlimp.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/xml/xmlimp.cxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/filter/xml/xmlimp.cxx (original)
+++ openoffice/trunk/main/sw/source/filter/xml/xmlimp.cxx Thu Jun  5 08:44:38 2014
@@ -19,8 +19,6 @@
  * 
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
 
@@ -61,14 +59,12 @@
 #include <tools/diagnose_ex.h>
 #include <hash_set>
 #include <stringhash.hxx>
-
-// for locking SolarMutex: svapp + mutex
 #include <vcl/svapp.hxx>
 #include <vos/mutex.hxx>
 #include <unotxdoc.hxx>    // for initXForms()
-
 #include <xmloff/xmlmetai.hxx>
 #include <xmloff/xformsimport.hxx>
+#include <drawdoc.hxx>
 
 using ::rtl::OUString;
 
@@ -759,7 +755,7 @@ void SwXMLImport::startDocument( void )
     // <--
 
 	// SJ: #i49801# locking the modell to disable repaints
-	SdrModel* pDrawModel = pDoc->GetDrawModel();
+	SwDrawModel* pDrawModel = pDoc->GetDrawModel();
 	if ( pDrawModel )
 		pDrawModel->setLock( sal_True );
 
@@ -965,7 +961,7 @@ void SwXMLImport::endDocument( void )
 	// SJ: #i49801# -> now permitting repaints
 	if ( pDoc )
 	{
-		SdrModel* pDrawModel = pDoc->GetDrawModel();
+		SwDrawModel* pDrawModel = pDoc->GetDrawModel();
 		if ( pDrawModel )
 			pDrawModel->setLock( sal_False );
 	}

Modified: openoffice/trunk/main/sw/source/ui/app/docsh.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/app/docsh.cxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/app/docsh.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/app/docsh.cxx Thu Jun  5 08:44:38 2014
@@ -271,7 +271,7 @@ sal_Bool SwDocShell::ConvertFrom( SfxMed
     }
 
     UpdateFontList();
-	InitDraw();
+    InitDrawModelAndDocShell(this, pDoc ? pDoc->GetDrawModel() : 0);
 
 	delete pRdr;
 

Modified: openoffice/trunk/main/sw/source/ui/app/docshdrw.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/app/docshdrw.cxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/app/docshdrw.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/app/docshdrw.cxx Thu Jun  5 08:44:38 2014
@@ -19,35 +19,19 @@
  * 
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
 
-
 #include <hintids.hxx>
-
-#ifndef _SVX_SVXIDS_HRC //autogen
 #include <svx/svxids.hrc>
-#endif
-
-
-
-
-
-
-
-
 #include <svl/stritem.hxx>
 #include <svx/drawitem.hxx>
 #include <svx/svdmodel.hxx>
 #include <svx/svdoutl.hxx>
 #include <svx/xtable.hxx>
-
-#ifndef _DOCSH_HXX
 #include <docsh.hxx>
-#endif
 #include <doc.hxx>
+#include <drawdoc.hxx>
 
 using namespace ::com::sun::star;
 
@@ -55,26 +39,58 @@ using namespace ::com::sun::star;
 	Beschreibung: Document laden
  --------------------------------------------------------------------*/
 
-
-void  SwDocShell::InitDraw()
+void InitDrawModelAndDocShell(SwDocShell* pSwDocShell, SwDrawModel* pSwDrawDocument)
 {
-	SdrModel *pDrDoc = pDoc->GetDrawModel();
-	if( pDrDoc )
-	{
-		// Listen, bzw. Tables im ItemSet der DocShell anlegen
-        PutItem( SvxGradientListItem( pDrDoc->GetGradientListFromSdrModel(), SID_GRADIENT_LIST ) );
-        PutItem( SvxHatchListItem( pDrDoc->GetHatchListFromSdrModel(), SID_HATCH_LIST ) );
-        PutItem( SvxBitmapListItem( pDrDoc->GetBitmapListFromSdrModel(), SID_BITMAP_LIST ) );
-        PutItem( SvxDashListItem( pDrDoc->GetDashListFromSdrModel(), SID_DASH_LIST ) );
-        PutItem( SvxLineEndListItem( pDrDoc->GetLineEndListFromSdrModel(), SID_LINEEND_LIST ) );
-
-		Outliner& rOutliner = pDrDoc->GetDrawOutliner();
-        uno::Reference<linguistic2::XHyphenator> xHyphenator( ::GetHyphenator() );
-		rOutliner.SetHyphenator( xHyphenator );
-	}
-	else
-        PutItem( SvxColorTableItem( XColorList::GetStdColorList(), SID_COLOR_TABLE ));
+    if(pSwDrawDocument)
+    {
+        if(pSwDocShell == pSwDrawDocument->GetObjectShell())
+        {
+            // association already done, nothing to do
+        }
+        else
+        {
+            // set object shell (mainly for FormControl stuff), maybe zero
+            pSwDrawDocument->SetObjectShell(pSwDocShell);
+
+            // set persist, maybe zero
+            pSwDrawDocument->SetPersist(pSwDocShell);
+
+            // get and decide on the color table to use
+            if(pSwDocShell)
+            {
+                const SvxColorTableItem* pColItemFromDocShell = static_cast< const SvxColorTableItem* >(pSwDocShell->GetItem(SID_COLOR_TABLE));
+
+                if(pColItemFromDocShell)
+                {
+                    // the DocShell has a ColorTable, use it also in DrawingLayer
+                    pSwDrawDocument->SetColorTableAtSdrModel(pColItemFromDocShell->GetColorTable());
+                }
+                else
+                {
+                    // Use the ColorTable which is used at the DrawingLayer's SdrModel
+                    pSwDocShell->PutItem(SvxColorTableItem(pSwDrawDocument->GetColorTableFromSdrModel(), SID_COLOR_TABLE));
+                }
+
+                // add other tables in SfxItemSet of the DocShell
+                pSwDocShell->PutItem(SvxGradientListItem(pSwDrawDocument->GetGradientListFromSdrModel(), SID_GRADIENT_LIST));
+                pSwDocShell->PutItem(SvxHatchListItem(pSwDrawDocument->GetHatchListFromSdrModel(), SID_HATCH_LIST));
+                pSwDocShell->PutItem(SvxBitmapListItem(pSwDrawDocument->GetBitmapListFromSdrModel(), SID_BITMAP_LIST));
+                pSwDocShell->PutItem(SvxDashListItem(pSwDrawDocument->GetDashListFromSdrModel(), SID_DASH_LIST));
+                pSwDocShell->PutItem(SvxLineEndListItem(pSwDrawDocument->GetLineEndListFromSdrModel(), SID_LINEEND_LIST));
+            }
+
+            // init hyphenator for DrawingLayer outliner
+            uno::Reference<linguistic2::XHyphenator> xHyphenator(::GetHyphenator());
+            Outliner& rOutliner = pSwDrawDocument->GetDrawOutliner();
+
+            rOutliner.SetHyphenator(xHyphenator);
+        }
+    }
+    else if(pSwDocShell)
+    {
+        // fallback: add the default color list to have one when someone requests it from the DocShell
+        pSwDocShell->PutItem(SvxColorTableItem(XColorList::GetStdColorList(), SID_COLOR_TABLE));
+    }
 }
 
-
-
+//eof

Modified: openoffice/trunk/main/sw/source/ui/app/docshini.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/app/docshini.cxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/app/docshini.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/app/docshini.cxx Thu Jun  5 08:44:38 2014
@@ -637,7 +637,7 @@ sal_Bool  SwDocShell::Load( SfxMedium& r
 		}
 
 		UpdateFontList();
-		InitDraw();
+        InitDrawModelAndDocShell(this, pDoc ? pDoc->GetDrawModel() : 0);
 
 		SetError( nErr, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
 		bRet = !IsError( nErr );
@@ -736,7 +736,7 @@ void SwDocShell::SubInitNew()
 	ASSERT( !mxBasePool.is(), "wer hat seinen Pool nicht zerstoert?" );
 	mxBasePool = new SwDocStyleSheetPool( *pDoc, SFX_CREATE_MODE_ORGANIZER == GetCreateMode() );
 	UpdateFontList();
-	InitDraw();
+    InitDrawModelAndDocShell(this, pDoc ? pDoc->GetDrawModel() : 0);
 
     pDoc->setLinkUpdateMode( GLOBALSETTING );
     pDoc->setFieldUpdateFlags( AUTOUPD_GLOBALSETTING );

Modified: openoffice/trunk/main/sw/source/ui/app/docst.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/app/docst.cxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/app/docst.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/app/docst.cxx Thu Jun  5 08:44:38 2014
@@ -19,15 +19,12 @@
  * 
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
 
 #include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/container/XNameAccess.hpp>
-
 #include <hintids.hxx>
 #include <sfx2/app.hxx>
 #include <svl/whiter.hxx>
@@ -53,11 +50,8 @@
 #include <SwRewriter.hxx>
 #include <numrule.hxx>
 #include <swundo.hxx>
-
-//UUUU
 #include <svx/svdmodel.hxx>
 #include <svx/drawitem.hxx>
-
 #include "view.hxx"
 #include "wrtsh.hxx"
 #include "docsh.hxx"
@@ -79,15 +73,12 @@
 #include "swevent.hxx"
 #include "edtwin.hxx"
 #include "unochart.hxx"
-
 #include "app.hrc"
 #include <fmtui.hrc>
 #include "swabstdlg.hxx"
-// --> OD 2008-03-27 #refactorlists#
 #include <list.hxx>
-// <--
-
 #include <paratr.hxx>	//#outline level,add by zhaojianwei
+#include <drawdoc.hxx>
 
 using namespace ::com::sun::star;
 
@@ -674,7 +665,7 @@ sal_uInt16 SwDocShell::Edit(
         //UUUU create needed items for XPropertyList entries from the DrawModel so that
         // the Area TabPage can access them
         SfxItemSet& rSet = xTmp->GetItemSet();
-        const SdrModel* pDrawModel = GetDoc()->GetDrawModel();
+        const SwDrawModel* pDrawModel = GetDoc()->GetDrawModel();
 
         rSet.Put(SvxColorTableItem(pDrawModel->GetColorTableFromSdrModel(), SID_COLOR_TABLE));
         rSet.Put(SvxGradientListItem(pDrawModel->GetGradientListFromSdrModel(), SID_GRADIENT_LIST));

Modified: openoffice/trunk/main/sw/source/ui/app/docstyle.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/app/docstyle.cxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/app/docstyle.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/app/docstyle.cxx Thu Jun  5 08:44:38 2014
@@ -19,13 +19,10 @@
  * 
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
 
 #define _SVSTDARR_USHORTS
-
 #include <svl/smplhint.hxx>
 #include <hintids.hxx>
 #include <svl/itemiter.hxx>
@@ -63,12 +60,11 @@
 #include <fmthdft.hxx>
 #include <svx/svxids.hrc>
 #include <SwRewriter.hxx>
-
-//UUUU
 #include <svx/xfillit0.hxx>
 #include <svx/xflftrit.hxx>
 #include <svx/svdmodel.hxx>
 #include <svx/drawitem.hxx>
+#include <drawdoc.hxx>
 
 // MD 06.02.95: Die Formatnamen in der Liste aller Namen haben als
 // erstes Zeichen die Familie:
@@ -1115,7 +1111,7 @@ SfxItemSet&   SwDocStyleSheet::GetItemSe
 
                     //UUUU create needed items for XPropertyList entries from the DrawModel so that
                     // the Area TabPage can access them
-                    const SdrModel* pDrawModel = rDoc.GetDrawModel();
+                    const SwDrawModel* pDrawModel = rDoc.GetDrawModel();
 
                     aCoreSet.Put(SvxColorTableItem(pDrawModel->GetColorTableFromSdrModel(), SID_COLOR_TABLE));
                     aCoreSet.Put(SvxGradientListItem(pDrawModel->GetGradientListFromSdrModel(), SID_GRADIENT_LIST));

Modified: openoffice/trunk/main/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx Thu Jun  5 08:44:38 2014
@@ -19,8 +19,6 @@
  * 
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
 
@@ -54,7 +52,7 @@
 #include <unotextrange.hxx>
 #include <dialog.hrc>
 #include <cmdid.h>
-
+#include <drawdoc.hxx>
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;

Modified: openoffice/trunk/main/sw/source/ui/lingu/sdrhhcwrap.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/lingu/sdrhhcwrap.cxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/lingu/sdrhhcwrap.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/lingu/sdrhhcwrap.cxx Thu Jun  5 08:44:38 2014
@@ -19,10 +19,9 @@
  * 
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
+
 #include <hintids.hxx>
 #include <svx/svditer.hxx>
 #include <svx/svdotext.hxx>
@@ -40,17 +39,14 @@
 #include <unotools/localedatawrapper.hxx>
 #include <sdrhhcwrap.hxx>
 #include <frmfmt.hxx>
-#ifndef _DOCSH_HXX
 #include <docsh.hxx>        //     "     "     "
-#endif
 #include <wrtsh.hxx>        //  MakeVisible
-#ifndef _VIEW_HXX
 #include <view.hxx>
-#endif
 #include <dcontact.hxx>		// Spelling von DrawObj
 #include <doc.hxx>        //     "     "     "
 #include <docary.hxx>
 #include <edtwin.hxx>
+#include <drawdoc.hxx>
 
 using namespace ::com::sun::star;
 using ::rtl::OUString;

Modified: openoffice/trunk/main/sw/source/ui/shells/drwbassh.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/shells/drwbassh.cxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/shells/drwbassh.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/shells/drwbassh.cxx Thu Jun  5 08:44:38 2014
@@ -19,12 +19,9 @@
  * 
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
 
-
 #include <tools/shl.hxx>
 #include <hintids.hxx>
 #include <helpid.h>
@@ -57,7 +54,6 @@
 #include <svx/svdogrp.hxx>
 #include <svx/svdpage.hxx>
 #include <svx/svditer.hxx>
-
 #include <shells.hrc>
 #define SwDrawBaseShell
 #include <sfx2/msg.hxx>
@@ -70,8 +66,8 @@
 #include <com/sun/star/text/HoriOrientation.hpp>
 #include <com/sun/star/text/VertOrientation.hpp>
 #include <com/sun/star/text/RelOrientation.hpp>
-
 #include <IDocumentDrawModelAccess.hxx>
+#include <drawdoc.hxx>
 
 using namespace ::com::sun::star;
 
@@ -651,7 +647,7 @@ IMPL_LINK( SwDrawBaseShell, CheckGroupSh
     else
     {
         nRet = 1;
-        SdrModel* pModel = rSh.getIDocumentDrawModelAccess()->GetDrawModel();
+        SwDrawModel* pModel = rSh.getIDocumentDrawModelAccess()->GetDrawModel();
         // --> OD 2006-03-09 #i51726# - all drawing objects can be named now.
         // consider also drawing objects inside group objects
 //        SdrPage* pPage = pModel->GetPage(0);

Modified: openoffice/trunk/main/sw/source/ui/shells/frmsh.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/shells/frmsh.cxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/shells/frmsh.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/shells/frmsh.cxx Thu Jun  5 08:44:38 2014
@@ -76,9 +76,9 @@
 #include "swabstdlg.hxx"
 #include "misc.hrc"
 #include <svx/dialogs.hrc>
-
 #include <docsh.hxx>
 #include <svx/drawitem.hxx>
+#include <drawdoc.hxx>
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -449,7 +449,7 @@ void SwFrameShell::Execute(SfxRequest &r
 
                 //UUUU create needed items for XPropertyList entries from the DrawModel so that
                 // the Area TabPage can access them
-                const SdrModel* pDrawModel = rSh.GetView().GetDocShell()->GetDoc()->GetDrawModel();
+                const SwDrawModel* pDrawModel = rSh.GetView().GetDocShell()->GetDoc()->GetDrawModel();
 
                 aSet.Put(SvxColorTableItem(pDrawModel->GetColorTableFromSdrModel(), SID_COLOR_TABLE));
                 aSet.Put(SvxGradientListItem(pDrawModel->GetGradientListFromSdrModel(), SID_GRADIENT_LIST));

Modified: openoffice/trunk/main/sw/source/ui/shells/grfsh.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/shells/grfsh.cxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/shells/grfsh.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/shells/grfsh.cxx Thu Jun  5 08:44:38 2014
@@ -19,17 +19,10 @@
  * 
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
 
-
-
-
-#ifndef _CMDID_H
 #include <cmdid.h>
-#endif
 #include <hintids.hxx>
 #include <tools/urlobj.hxx>
 #include <vcl/msgbox.hxx>
@@ -38,7 +31,6 @@
 #include <svl/urihelper.hxx>
 #include <sfx2/docfile.hxx>
 #include <sfx2/dispatch.hxx>
-
 #include <sfx2/objface.hxx>
 #include <editeng/sizeitem.hxx>
 #include <editeng/protitem.hxx>
@@ -74,16 +66,14 @@
 #include <swwait.hxx>
 #include <shells.hrc>
 #include <popup.hrc>
-
 #include <doc.hxx>
 #include <docsh.hxx>
 #include <svx/drawitem.hxx>
-
 #define SwGrfShell
 #include <sfx2/msg.hxx>
 #include "swslots.hxx"
-
 #include "swabstdlg.hxx"
+#include <drawdoc.hxx>
 
 #define TOOLBOX_NAME    ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "colorbar" ) )
 
@@ -161,7 +151,7 @@ void SwGrfShell::Execute(SfxRequest &rRe
 
             //UUUU create needed items for XPropertyList entries from the DrawModel so that
             // the Area TabPage can access them
-            const SdrModel* pDrawModel = rSh.GetView().GetDocShell()->GetDoc()->GetDrawModel();
+            const SwDrawModel* pDrawModel = rSh.GetView().GetDocShell()->GetDoc()->GetDrawModel();
 
             aSet.Put(SvxColorTableItem(pDrawModel->GetColorTableFromSdrModel(), SID_COLOR_TABLE));
             aSet.Put(SvxGradientListItem(pDrawModel->GetGradientListFromSdrModel(), SID_GRADIENT_LIST));

Modified: openoffice/trunk/main/sw/source/ui/shells/textsh1.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/shells/textsh1.cxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/shells/textsh1.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/shells/textsh1.cxx Thu Jun  5 08:44:38 2014
@@ -19,20 +19,16 @@
  * 
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
 
 #include <com/sun/star/i18n/WordType.hpp>
 #include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
-
 #include <comphelper/processfactory.hxx>
 #include <svx/dialogs.hrc>
 #include <hintids.hxx>
 #include <cmdid.h>
 #include <helpid.h>
-
 #include <i18npool/mslangid.hxx>
 #include <svl/languageoptions.hxx>
 #include <editeng/langitem.hxx>
@@ -91,7 +87,6 @@
 #include <edtwin.hxx>
 #include <redlndlg.hxx>
 #include "fldmgr.hxx"
-
 #include <globals.hrc>
 #include <shells.hrc>
 #include <app.hrc>
@@ -102,15 +97,12 @@
 #include <vcl/svapp.hxx>
 #include <sfx2/app.hxx>
 #include <breakit.hxx>
-
 #include <SwSmartTagMgr.hxx>
-
 #include <editeng/acorrcfg.hxx>
 #include "swabstdlg.hxx"
 #include "misc.hrc"
 #include "chrdlg.hrc"
 #include <IDocumentStatistics.hxx>
-
 #include <sfx2/sfxdlg.hxx>
 #include <svl/languageoptions.hxx>
 #include <unotools/lingucfg.hxx>
@@ -125,25 +117,16 @@
 #include <pam.hxx>
 #include <sfx2/objface.hxx>
 #include <langhelper.hxx>
-
-#ifndef _NBDTMGFACT_HXX
 #include <svx/nbdtmgfact.hxx>
-#endif
-#ifndef _NBDTMG_HXX
 #include <svx/nbdtmg.hxx>
-#endif
-
-//UUUU
 #include <svx/svdmodel.hxx>
 #include <svx/drawitem.hxx>
-
 #include <numrule.hxx>
-
+#include <drawdoc.hxx>
 
 using namespace ::com::sun::star;
 using namespace svx::sidebar;
 
-
 void lcl_CharDialog( SwWrtShell &rWrtSh, sal_Bool bUseDialog, sal_uInt16 nSlot,const SfxItemSet *pArgs, SfxRequest *pReq )
 {
 	FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, &rWrtSh.GetView()));
@@ -931,7 +914,7 @@ void SwTextShell::Execute(SfxRequest &rR
             //UUUU create needed items for XPropertyList entries from the DrawModel so that
             // the Area TabPage can access them
             // Do this after GetCurAttr, this resets the ItemSet content again
-            const SdrModel* pDrawModel = GetView().GetDocShell()->GetDoc()->GetDrawModel();
+            const SwDrawModel* pDrawModel = GetView().GetDocShell()->GetDoc()->GetDrawModel();
 
             aCoreSet.Put(SvxColorTableItem(pDrawModel->GetColorTableFromSdrModel(), SID_COLOR_TABLE));
             aCoreSet.Put(SvxGradientListItem(pDrawModel->GetGradientListFromSdrModel(), SID_GRADIENT_LIST));

Modified: openoffice/trunk/main/sw/source/ui/uiview/view.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/uiview/view.cxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/uiview/view.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/uiview/view.cxx Thu Jun  5 08:44:38 2014
@@ -1677,10 +1677,11 @@ void SwView::Notify( SfxBroadcaster& rBC
                     //#i76332# if document is to be opened in alive-mode then this has to be regarded while switching from readonly-mode to edit-mode
                     if( !bReadonly )
                     {
-                        SwDrawDocument * pDrawDoc = 0;
-                        if ( 0 != ( pDrawDoc = dynamic_cast< SwDrawDocument * > (GetDocShell()->GetDoc()->GetDrawModel() ) ) )
+                        SwDrawModel* pDrawModel = 0;
+
+                        if ( 0 != ( pDrawModel = GetDocShell()->GetDoc()->GetDrawModel() ) )
                         {
-				            if( !pDrawDoc->GetOpenInDesignMode() )
+                            if( !pDrawModel->GetOpenInDesignMode() )
                                 break;// don't touch the design mode
                         }
                     }

Modified: openoffice/trunk/main/sw/source/ui/uno/unodefaults.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/uno/unodefaults.cxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/uno/unodefaults.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/uno/unodefaults.cxx Thu Jun  5 08:44:38 2014
@@ -19,16 +19,14 @@
  * 
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
 
-
 #include <unodefaults.hxx>
 #include <svx/svdmodel.hxx>
 #include <svx/unoprov.hxx>
 #include <doc.hxx>
+#include <drawdoc.hxx>
 
 /* -----------------------------13.03.01 14:16--------------------------------
 

Modified: openoffice/trunk/main/sw/source/ui/uno/unotxdoc.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/uno/unotxdoc.cxx?rev=1600568&r1=1600567&r2=1600568&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/uno/unotxdoc.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/uno/unotxdoc.cxx Thu Jun  5 08:44:38 2014
@@ -2088,11 +2088,13 @@ void SwXTextDocument::setPropertyValue(c
 		break;
 		case WID_DOC_AUTOMATIC_CONTROL_FOCUS:
 		{
-			SwDrawDocument * pDrawDoc;
+			SwDrawModel* pDrawModel = 0;
 			sal_Bool bAuto = *(sal_Bool*) aValue.getValue();
 
-            if ( 0 != ( pDrawDoc = dynamic_cast< SwDrawDocument * >( pDocShell->GetDoc()->GetDrawModel() ) ) )
-				pDrawDoc->SetAutoControlFocus( bAuto );
+            if ( 0 != ( pDrawModel = pDocShell->GetDoc()->GetDrawModel() ) )
+            {
+				pDrawModel->SetAutoControlFocus( bAuto );
+            }
 			else if (bAuto)
 			{
 				// if setting to true, and we don't have an
@@ -2101,19 +2103,21 @@ void SwXTextDocument::setPropertyValue(c
 				// SdrModel and we are leaving the default at false,
 				// we don't need to make an SdrModel and can do nothing
                 // --> OD 2005-08-08 #i52858# - method name changed
-                pDrawDoc = dynamic_cast< SwDrawDocument * > (pDocShell->GetDoc()->GetOrCreateDrawModel() );
+                pDrawModel = pDocShell->GetDoc()->GetOrCreateDrawModel();
                 // <--
-				pDrawDoc->SetAutoControlFocus ( bAuto );
+				pDrawModel->SetAutoControlFocus ( bAuto );
 			}
 		}
 		break;
 		case WID_DOC_APPLY_FORM_DESIGN_MODE:
 		{
-			SwDrawDocument * pDrawDoc;
+			SwDrawModel* pDrawModel = 0;
 			sal_Bool bMode = *(sal_Bool*)aValue.getValue();
 
-            if ( 0 != ( pDrawDoc = dynamic_cast< SwDrawDocument * > (pDocShell->GetDoc()->GetDrawModel() ) ) )
-				pDrawDoc->SetOpenInDesignMode( bMode );
+            if ( 0 != ( pDrawModel = pDocShell->GetDoc()->GetDrawModel() ) )
+            {
+				pDrawModel->SetOpenInDesignMode( bMode );
+            }
 			else if (!bMode)
 			{
 				// if setting to false, and we don't have an
@@ -2123,9 +2127,9 @@ void SwXTextDocument::setPropertyValue(c
 				// we don't need to make an SdrModel and can do
 				// nothing
                 // --> OD 2005-08-08 #i52858# - method name changed
-                pDrawDoc = dynamic_cast< SwDrawDocument * > (pDocShell->GetDoc()->GetOrCreateDrawModel() );
+                pDrawModel = pDocShell->GetDoc()->GetOrCreateDrawModel();
                 // <--
-				pDrawDoc->SetOpenInDesignMode ( bMode );
+				pDrawModel->SetOpenInDesignMode ( bMode );
 			}
 		}
 		break;
@@ -2268,23 +2272,35 @@ Any SwXTextDocument::getPropertyValue(co
 		break;
 		case WID_DOC_AUTOMATIC_CONTROL_FOCUS:
 		{
-			SwDrawDocument * pDrawDoc;
-			sal_Bool bAuto;
-            if ( 0 != ( pDrawDoc = dynamic_cast< SwDrawDocument * > (pDocShell->GetDoc()->GetDrawModel() ) ) )
-				bAuto = pDrawDoc->GetAutoControlFocus();
+			SwDrawModel* pDrawModel = 0;
+			sal_Bool bAuto(sal_False);
+
+            if ( 0 != ( pDrawModel = pDocShell->GetDoc()->GetDrawModel() ) )
+            {
+				bAuto = pDrawModel->GetAutoControlFocus();
+            }
 			else
+            {
 				bAuto = sal_False;
+            }
+
 			aAny.setValue(&bAuto, ::getBooleanCppuType());
 		}
 		break;
 		case WID_DOC_APPLY_FORM_DESIGN_MODE:
 		{
-			SwDrawDocument * pDrawDoc;
-			sal_Bool bMode;
-            if ( 0 != ( pDrawDoc = dynamic_cast< SwDrawDocument * > (pDocShell->GetDoc()->GetDrawModel() ) ) )
-				bMode = pDrawDoc->GetOpenInDesignMode();
+			SwDrawModel* pDrawModel = 0;
+			sal_Bool bMode(sal_False);
+
+            if ( 0 != ( pDrawModel = pDocShell->GetDoc()->GetDrawModel() ) )
+            {
+				bMode = pDrawModel->GetOpenInDesignMode();
+            }
 			else
+            {
 				bMode = sal_True;
+            }
+
 			aAny.setValue(&bMode, ::getBooleanCppuType());
 		}
 		break;



Mime
View raw message