summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2006-08-14 15:58:35 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2006-08-14 15:58:35 +0000
commit332347bdfab814dcf4eda35cd485c65b663db4b0 (patch)
tree41b48e59e708e7e3e8b93ebb9f2e9430bc7e7fd0 /sw/source
parent119272f995309c7c6dedf5ca8d4d75a446edf3d1 (diff)
INTEGRATION: CWS writercorehandoff (1.15.4); FILE MERGED
2006/07/27 14:51:56 fme 1.15.4.2: RESYNC: (1.15-1.16); FILE MERGED 2005/11/18 14:53:36 fme 1.15.4.1: #i50348# Make SwDoc accessible via interfaces
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/view/vdraw.cxx86
1 files changed, 13 insertions, 73 deletions
diff --git a/sw/source/core/view/vdraw.cxx b/sw/source/core/view/vdraw.cxx
index 76e7bac40a..2139e0d776 100644
--- a/sw/source/core/view/vdraw.cxx
+++ b/sw/source/core/view/vdraw.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: vdraw.cxx,v $
*
- * $Revision: 1.16 $
+ * $Revision: 1.17 $
*
- * last change: $Author: rt $ $Date: 2006-07-25 12:37:11 $
+ * last change: $Author: hr $ $Date: 2006-08-14 16:58:35 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -79,7 +79,6 @@
#endif
#include "fesh.hxx"
-#include "doc.hxx"
#include "pagefrm.hxx"
#include "rootfrm.hxx"
#include "viewimp.hxx"
@@ -89,6 +88,10 @@
#include "dview.hxx"
#include "flyfrm.hxx"
+#ifndef IDOCUMENTDRAWMODELACCESS_HXX_INCLUDED
+#include <IDocumentDrawModelAccess.hxx>
+#endif
+
/*************************************************************************
|*
@@ -233,8 +236,9 @@ void SwViewImp::PaintLayer( const SdrLayerID _nLayerID,
// OD 09.12.2002 #103045# - set default horizontal text direction on
// painting <hell> or <heaven>.
EEHorizontalTextDirection aOldEEHoriTextDir;
- if ( (_nLayerID == GetShell()->GetDoc()->GetHellId()) ||
- (_nLayerID == GetShell()->GetDoc()->GetHeavenId()) )
+ const IDocumentDrawModelAccess* pIDDMA = GetShell()->getIDocumentDrawModelAccess();
+ if ( (_nLayerID == pIDDMA->GetHellId()) ||
+ (_nLayerID == pIDDMA->GetHeavenId()) )
{
ASSERT( _pPageBackgrdColor,
"incorrect usage of SwViewImp::PaintLayer: pPageBackgrdColor have to be set for painting layer <hell> or <heaven>");
@@ -265,8 +269,8 @@ void SwViewImp::PaintLayer( const SdrLayerID _nLayerID,
// OD 29.08.2002 #102450#
// reset background color of the outliner
// OD 09.12.2002 #103045# - reset default horizontal text direction
- if ( (_nLayerID == GetShell()->GetDoc()->GetHellId()) ||
- (_nLayerID == GetShell()->GetDoc()->GetHeavenId()) )
+ if ( (_nLayerID == pIDDMA->GetHellId()) ||
+ (_nLayerID == pIDDMA->GetHeavenId()) )
{
GetDrawView()->GetModel()->GetDrawOutliner().SetBackgroundColor( aOldOutlinerBackgrdColor );
GetDrawView()->GetModel()->GetDrawOutliner().SetDefaultHorizontalTextDirection( aOldEEHoriTextDir );
@@ -276,70 +280,6 @@ void SwViewImp::PaintLayer( const SdrLayerID _nLayerID,
}
}
-//#110094#-3
-// not necessary, see bugid
-//IMPL_LINK( SwViewImp, PaintDispatcher, SdrPaintProcRec *, pRec )
-//{
-// SdrObject *pObj = pRec->pObj;
-//
-// //Controls muessen im Control-Layer liegen. Dort duerfen aber auch
-// //Gruppenobjekte oder mit Controls gruppierte Objekte liegen.
-// ASSERT( FmFormInventor != pObj->GetObjInventor() ||
-// GetShell()->GetDoc()->GetControlsId() == pObj->GetLayer(),
-// "PaintDispatcher: Wrong Layer" );
-//
-// if ( !SwFlyFrm::IsPaint( pObj, GetShell() ) )
-// return 0;
-//
-// if ( pObj->IsWriterFlyFrame() )
-// {
-// const SdrLayerID nHellId = GetShell()->GetDoc()->GetHellId();
-// if( pObj->GetLayer() == nHellId )
-// {
-// //Fuer Rahmen in der Hoelle gelten andere Regeln:
-// //1. Rahmen mit einem Parent werden nie direkt, sondern von ihren
-// // Parents gepaintet.
-// //1a.Es sei denn, der Parent steht nicht in der Hoelle.
-// //2. Rahmen mit Childs painten zuerst die Childs in
-// // umgekehrter Z-Order.
-// SwFlyFrm *pFly = ((SwVirtFlyDrawObj*)pObj)->GetFlyFrm();
-// const FASTBOOL bInFly = pFly->GetAnchor()->IsInFly();
-// if ( !bInFly ||
-// (bInFly && pFly->GetAnchor()->FindFlyFrm()->
-// GetVirtDrawObj()->GetLayer() != nHellId))
-// PaintFlyChilds( pFly, pRec->rOut, pRec->rInfoRec );
-// }
-// else
-// pObj->Paint( pRec->rOut, pRec->rInfoRec );
-// }
-// else
-// {
-// SwRect aTmp( pRec->rInfoRec.aDirtyRect );
-//
-// OutputDevice *pOut = pRec->rOut.GetOutDev();
-// pOut->Push( PUSH_CLIPREGION );
-// pOut->IntersectClipRegion( aTmp.SVRect() );
-//
-// //Um zu verhindern, dass der Dispatcher fr jedes Gruppenobjekt
-// //gerufen wird, muessen wir die Struktur manipulieren
-// //(Absprache mit JOE).
-// const Link *pSave = 0;
-// if ( pObj->IsGroupObject() )
-// {
-// pSave = pRec->rInfoRec.pPaintProc;
-// ((SdrPaintInfoRec&)pRec->rInfoRec).pPaintProc = 0;
-// }
-//
-// pObj->Paint( pRec->rOut, pRec->rInfoRec );
-//
-// if ( pSave )
-// ((SdrPaintInfoRec&)pRec->rInfoRec).pPaintProc = pSave;
-//
-// pOut->Pop();
-// }
-// return 0;
-//}
-
/*************************************************************************
|*
|* SwViewImp::IsDragPossible()
@@ -409,8 +349,8 @@ void SwViewImp::NotifySizeChg( const Size &rNewSz )
if ( !bCheckDrawObjs )
return;
- ASSERT( pSh->GetDoc()->GetDrawModel(), "NotifySizeChg without DrawModel" );
- SdrPage* pPage = pSh->GetDoc()->GetDrawModel()->GetPage( 0 );
+ ASSERT( pSh->getIDocumentDrawModelAccess()->GetDrawModel(), "NotifySizeChg without DrawModel" );
+ SdrPage* pPage = pSh->getIDocumentDrawModelAccess()->GetDrawModel()->GetPage( 0 );
const ULONG nObjs = pPage->GetObjCount();
for( ULONG nObj = 0; nObj < nObjs; ++nObj )
{