xref: /aoo41x/main/sw/source/core/view/vdraw.cxx (revision 79aad27f)
1*efeef26fSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*efeef26fSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*efeef26fSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*efeef26fSAndrew Rist  * distributed with this work for additional information
6*efeef26fSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*efeef26fSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*efeef26fSAndrew Rist  * "License"); you may not use this file except in compliance
9*efeef26fSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*efeef26fSAndrew Rist  *
11*efeef26fSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*efeef26fSAndrew Rist  *
13*efeef26fSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*efeef26fSAndrew Rist  * software distributed under the License is distributed on an
15*efeef26fSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*efeef26fSAndrew Rist  * KIND, either express or implied.  See the License for the
17*efeef26fSAndrew Rist  * specific language governing permissions and limitations
18*efeef26fSAndrew Rist  * under the License.
19*efeef26fSAndrew Rist  *
20*efeef26fSAndrew Rist  *************************************************************/
21*efeef26fSAndrew Rist 
22*efeef26fSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_sw.hxx"
26cdf0e10cSrcweir 
27cdf0e10cSrcweir 
28cdf0e10cSrcweir #include <svx/svdmodel.hxx>
29cdf0e10cSrcweir #include <svx/svdpage.hxx>
30cdf0e10cSrcweir #include <tools/shl.hxx>
31cdf0e10cSrcweir #include <swmodule.hxx>
32cdf0e10cSrcweir #include <svtools/accessibilityoptions.hxx>
33cdf0e10cSrcweir #include <svx/svdpagv.hxx>
34cdf0e10cSrcweir #include <fmtanchr.hxx>
35cdf0e10cSrcweir #include <frmfmt.hxx>
36cdf0e10cSrcweir 
37cdf0e10cSrcweir /// OD 29.08.2002 #102450#
38cdf0e10cSrcweir /// include <svx/svdoutl.hxx>
39cdf0e10cSrcweir #include <svx/svdoutl.hxx>
40cdf0e10cSrcweir 
41cdf0e10cSrcweir #ifdef DBG_UTIL
42cdf0e10cSrcweir #include <svx/fmglob.hxx>
43cdf0e10cSrcweir #endif
44cdf0e10cSrcweir 
45cdf0e10cSrcweir #include "fesh.hxx"
46cdf0e10cSrcweir #include "pagefrm.hxx"
47cdf0e10cSrcweir #include "rootfrm.hxx"
48cdf0e10cSrcweir #include "viewimp.hxx"
49cdf0e10cSrcweir #include "dflyobj.hxx"
50cdf0e10cSrcweir #include "viewopt.hxx"
51cdf0e10cSrcweir #include "printdata.hxx"
52cdf0e10cSrcweir #include "dcontact.hxx"
53cdf0e10cSrcweir #include "dview.hxx"
54cdf0e10cSrcweir #include "flyfrm.hxx"
55cdf0e10cSrcweir #include <vcl/svapp.hxx>
56cdf0e10cSrcweir 
57cdf0e10cSrcweir #include <IDocumentDrawModelAccess.hxx>
58cdf0e10cSrcweir 
59cdf0e10cSrcweir 
60cdf0e10cSrcweir /*************************************************************************
61cdf0e10cSrcweir |*
62cdf0e10cSrcweir |*	SwSaveHdl
63cdf0e10cSrcweir |*
64cdf0e10cSrcweir |*	Ersterstellung		MA 14. Feb. 95
65cdf0e10cSrcweir |*	Letzte Aenderung	MA 02. Jun. 98
66cdf0e10cSrcweir |*
67cdf0e10cSrcweir |*************************************************************************/
68cdf0e10cSrcweir //SwSaveHdl::SwSaveHdl( SwViewImp *pI ) :
69cdf0e10cSrcweir //	pImp( pI ),
70cdf0e10cSrcweir //	bXorVis( sal_False )
71cdf0e10cSrcweir //{
72cdf0e10cSrcweir 	//if ( pImp->HasDrawView() )
73cdf0e10cSrcweir 	//{
74cdf0e10cSrcweir 	//	bXorVis = pImp->GetDrawView()->IsShownXorVisible( pImp->GetShell()->GetOut());
75cdf0e10cSrcweir 	//	if ( bXorVis )
76cdf0e10cSrcweir 	//		pImp->GetDrawView()->HideShownXor( pImp->GetShell()->GetOut() );
77cdf0e10cSrcweir 	//}
78cdf0e10cSrcweir //}
79cdf0e10cSrcweir 
80cdf0e10cSrcweir 
81cdf0e10cSrcweir //SwSaveHdl::~SwSaveHdl()
82cdf0e10cSrcweir //{
83cdf0e10cSrcweir 	//if ( bXorVis )
84cdf0e10cSrcweir 	//	pImp->GetDrawView()->ShowShownXor( pImp->GetShell()->GetOut() );
85cdf0e10cSrcweir //}
86cdf0e10cSrcweir 
87cdf0e10cSrcweir 
88cdf0e10cSrcweir /*************************************************************************
89cdf0e10cSrcweir |*
90cdf0e10cSrcweir |*	SwViewImp::StartAction(), EndAction()
91cdf0e10cSrcweir |*
92cdf0e10cSrcweir |*	Ersterstellung		MA 14. Feb. 95
93cdf0e10cSrcweir |*	Letzte Aenderung	MA 14. Sep. 98
94cdf0e10cSrcweir |*
95cdf0e10cSrcweir |*************************************************************************/
96cdf0e10cSrcweir 
97cdf0e10cSrcweir 
StartAction()98cdf0e10cSrcweir void SwViewImp::StartAction()
99cdf0e10cSrcweir {
100cdf0e10cSrcweir 	if ( HasDrawView() )
101cdf0e10cSrcweir 	{
102cdf0e10cSrcweir 		SET_CURR_SHELL( GetShell() );
103cdf0e10cSrcweir 		if ( pSh->ISA(SwFEShell) )
104cdf0e10cSrcweir 			((SwFEShell*)pSh)->HideChainMarker();	//Kann sich geaendert haben
105cdf0e10cSrcweir 		//bResetXorVisibility = GetDrawView()->IsShownXorVisible( GetShell()->GetOut());
106cdf0e10cSrcweir 		//GetDrawView()->HideShownXor( GetShell()->GetOut() );
107cdf0e10cSrcweir 	}
108cdf0e10cSrcweir }
109cdf0e10cSrcweir 
110cdf0e10cSrcweir 
111cdf0e10cSrcweir 
EndAction()112cdf0e10cSrcweir void SwViewImp::EndAction()
113cdf0e10cSrcweir {
114cdf0e10cSrcweir 	if ( HasDrawView() )
115cdf0e10cSrcweir 	{
116cdf0e10cSrcweir 		SET_CURR_SHELL( GetShell() );
117cdf0e10cSrcweir 		//if ( bResetXorVisibility )
118cdf0e10cSrcweir 		//	GetDrawView()->ShowShownXor( GetShell()->GetOut() );
119cdf0e10cSrcweir 		if ( pSh->ISA(SwFEShell) )
120cdf0e10cSrcweir 			((SwFEShell*)pSh)->SetChainMarker();	//Kann sich geaendert haben
121cdf0e10cSrcweir 	}
122cdf0e10cSrcweir }
123cdf0e10cSrcweir 
124cdf0e10cSrcweir /*************************************************************************
125cdf0e10cSrcweir |*
126cdf0e10cSrcweir |*	SwViewImp::LockPaint(), UnlockPaint()
127cdf0e10cSrcweir |*
128cdf0e10cSrcweir |*	Ersterstellung		MA 11. Jun. 96
129cdf0e10cSrcweir |*	Letzte Aenderung	MA 11. Jun. 96
130cdf0e10cSrcweir |*
131cdf0e10cSrcweir |*************************************************************************/
132cdf0e10cSrcweir 
133cdf0e10cSrcweir 
LockPaint()134cdf0e10cSrcweir void SwViewImp::LockPaint()
135cdf0e10cSrcweir {
136cdf0e10cSrcweir 	if ( HasDrawView() )
137cdf0e10cSrcweir 	{
138cdf0e10cSrcweir 		//HMHbShowHdlPaint = GetDrawView()->IsMarkHdlShown();
139cdf0e10cSrcweir 		//HMHif ( bShowHdlPaint )
140cdf0e10cSrcweir 		//HMH	GetDrawView()->HideMarkHdl();
141cdf0e10cSrcweir 		bResetHdlHiddenPaint = !GetDrawView()->areMarkHandlesHidden();
142cdf0e10cSrcweir 		GetDrawView()->hideMarkHandles();
143cdf0e10cSrcweir 	}
144cdf0e10cSrcweir 	else
145cdf0e10cSrcweir 	{
146cdf0e10cSrcweir 		//HMHbShowHdlPaint = sal_False;
147cdf0e10cSrcweir 		bResetHdlHiddenPaint = sal_False;
148cdf0e10cSrcweir 	}
149cdf0e10cSrcweir }
150cdf0e10cSrcweir 
151cdf0e10cSrcweir 
152cdf0e10cSrcweir 
UnlockPaint()153cdf0e10cSrcweir void SwViewImp::UnlockPaint()
154cdf0e10cSrcweir {
155cdf0e10cSrcweir 	if ( bResetHdlHiddenPaint )
156cdf0e10cSrcweir 		GetDrawView()->showMarkHandles();
157cdf0e10cSrcweir 	//HMHif ( bShowHdlPaint )
158cdf0e10cSrcweir 	//HMH	GetDrawView()->ShowMarkHdl();
159cdf0e10cSrcweir }
160cdf0e10cSrcweir 
161cdf0e10cSrcweir 
162cdf0e10cSrcweir /*************************************************************************
163cdf0e10cSrcweir |*
164cdf0e10cSrcweir |*	SwViewImp::PaintLayer(), PaintDispatcher()
165cdf0e10cSrcweir |*
166cdf0e10cSrcweir |*	Ersterstellung		MA 20. Dec. 94
167cdf0e10cSrcweir |*	Letzte Aenderung	AMA 04. Jun. 98
168cdf0e10cSrcweir |*
169cdf0e10cSrcweir |*************************************************************************/
170cdf0e10cSrcweir // OD 29.08.2002 #102450#
171cdf0e10cSrcweir // add 3rd paramter <const Color* pPageBackgrdColor> for setting this
172cdf0e10cSrcweir // color as the background color at the outliner of the draw view.
173cdf0e10cSrcweir // OD 09.12.2002 #103045# - add 4th parameter for the horizontal text direction
174cdf0e10cSrcweir // of the page in order to set the default horizontal text direction at the
175cdf0e10cSrcweir // outliner of the draw view for painting layers <hell> and <heaven>.
176cdf0e10cSrcweir // OD 25.06.2003 #108784# - correct type of 1st parameter
PaintLayer(const SdrLayerID _nLayerID,SwPrintData const * const pPrintData,const SwRect &,const Color * _pPageBackgrdColor,const bool _bIsPageRightToLeft,sdr::contact::ViewObjectContactRedirector * pRedirector) const177cdf0e10cSrcweir void SwViewImp::PaintLayer( const SdrLayerID _nLayerID,
178cdf0e10cSrcweir                             SwPrintData const*const pPrintData,
179cdf0e10cSrcweir                             const SwRect& ,
180cdf0e10cSrcweir                             const Color* _pPageBackgrdColor,
181cdf0e10cSrcweir                             const bool _bIsPageRightToLeft,
182cdf0e10cSrcweir                             sdr::contact::ViewObjectContactRedirector* pRedirector ) const
183cdf0e10cSrcweir {
184cdf0e10cSrcweir     if ( HasDrawView() )
185cdf0e10cSrcweir 	{
186cdf0e10cSrcweir         //change the draw mode in high contrast mode
187cdf0e10cSrcweir         OutputDevice* pOutDev = GetShell()->GetOut();
188cdf0e10cSrcweir         sal_uLong nOldDrawMode = pOutDev->GetDrawMode();
189cdf0e10cSrcweir         if( GetShell()->GetWin() &&
190cdf0e10cSrcweir             Application::GetSettings().GetStyleSettings().GetHighContrastMode() &&
191cdf0e10cSrcweir             (!GetShell()->IsPreView()||SW_MOD()->GetAccessibilityOptions().GetIsForPagePreviews()))
192cdf0e10cSrcweir         {
193cdf0e10cSrcweir             pOutDev->SetDrawMode( nOldDrawMode | DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL |
194cdf0e10cSrcweir                                 DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT );
195cdf0e10cSrcweir         }
196cdf0e10cSrcweir 
197cdf0e10cSrcweir         // OD 29.08.2002 #102450#
198cdf0e10cSrcweir         // For correct handling of accessibility, high contrast, the page background
199cdf0e10cSrcweir         // color is set as the background color at the outliner of the draw view.
200cdf0e10cSrcweir         // Only necessary for the layers hell and heaven
201cdf0e10cSrcweir         Color aOldOutlinerBackgrdColor;
202cdf0e10cSrcweir         // OD 09.12.2002 #103045# - set default horizontal text direction on
203cdf0e10cSrcweir         // painting <hell> or <heaven>.
204cdf0e10cSrcweir         EEHorizontalTextDirection aOldEEHoriTextDir = EE_HTEXTDIR_L2R;
205cdf0e10cSrcweir         const IDocumentDrawModelAccess* pIDDMA = GetShell()->getIDocumentDrawModelAccess();
206cdf0e10cSrcweir         if ( (_nLayerID == pIDDMA->GetHellId()) ||
207cdf0e10cSrcweir              (_nLayerID == pIDDMA->GetHeavenId()) )
208cdf0e10cSrcweir         {
209cdf0e10cSrcweir             ASSERT( _pPageBackgrdColor,
210cdf0e10cSrcweir                     "incorrect usage of SwViewImp::PaintLayer: pPageBackgrdColor have to be set for painting layer <hell> or <heaven>");
211cdf0e10cSrcweir             if ( _pPageBackgrdColor )
212cdf0e10cSrcweir             {
213cdf0e10cSrcweir                 aOldOutlinerBackgrdColor =
214cdf0e10cSrcweir                         GetDrawView()->GetModel()->GetDrawOutliner().GetBackgroundColor();
215cdf0e10cSrcweir                 GetDrawView()->GetModel()->GetDrawOutliner().SetBackgroundColor( *_pPageBackgrdColor );
216cdf0e10cSrcweir             }
217cdf0e10cSrcweir 
218cdf0e10cSrcweir             aOldEEHoriTextDir =
219cdf0e10cSrcweir                 GetDrawView()->GetModel()->GetDrawOutliner().GetDefaultHorizontalTextDirection();
220cdf0e10cSrcweir             EEHorizontalTextDirection aEEHoriTextDirOfPage =
221cdf0e10cSrcweir                 _bIsPageRightToLeft ? EE_HTEXTDIR_R2L : EE_HTEXTDIR_L2R;
222cdf0e10cSrcweir             GetDrawView()->GetModel()->GetDrawOutliner().SetDefaultHorizontalTextDirection( aEEHoriTextDirOfPage );
223cdf0e10cSrcweir         }
224cdf0e10cSrcweir 
225cdf0e10cSrcweir 		pOutDev->Push( PUSH_LINECOLOR ); // #114231#
226cdf0e10cSrcweir         if (pPrintData)
227cdf0e10cSrcweir         {
228cdf0e10cSrcweir             // hide drawings but not form controls (form controls are handled elsewhere)
229cdf0e10cSrcweir             SdrView &rSdrView = const_cast< SdrView & >(GetPageView()->GetView());
230cdf0e10cSrcweir             rSdrView.setHideDraw( !pPrintData->IsPrintDraw() );
231cdf0e10cSrcweir         }
232cdf0e10cSrcweir         GetPageView()->DrawLayer( _nLayerID, pOutDev, pRedirector );
233cdf0e10cSrcweir 		pOutDev->Pop();
234cdf0e10cSrcweir 
235cdf0e10cSrcweir         // OD 29.08.2002 #102450#
236cdf0e10cSrcweir         // reset background color of the outliner
237cdf0e10cSrcweir         // OD 09.12.2002 #103045# - reset default horizontal text direction
238cdf0e10cSrcweir         if ( (_nLayerID == pIDDMA->GetHellId()) ||
239cdf0e10cSrcweir              (_nLayerID == pIDDMA->GetHeavenId()) )
240cdf0e10cSrcweir         {
241cdf0e10cSrcweir             GetDrawView()->GetModel()->GetDrawOutliner().SetBackgroundColor( aOldOutlinerBackgrdColor );
242cdf0e10cSrcweir             GetDrawView()->GetModel()->GetDrawOutliner().SetDefaultHorizontalTextDirection( aOldEEHoriTextDir );
243cdf0e10cSrcweir         }
244cdf0e10cSrcweir 
245cdf0e10cSrcweir         pOutDev->SetDrawMode( nOldDrawMode );
246cdf0e10cSrcweir     }
247cdf0e10cSrcweir }
248cdf0e10cSrcweir 
249cdf0e10cSrcweir /*************************************************************************
250cdf0e10cSrcweir |*
251cdf0e10cSrcweir |*	SwViewImp::IsDragPossible()
252cdf0e10cSrcweir |*
253cdf0e10cSrcweir |*	Ersterstellung		MA 19. Jan. 93
254cdf0e10cSrcweir |*	Letzte Aenderung	MA 16. Jan. 95
255cdf0e10cSrcweir |*
256cdf0e10cSrcweir |*************************************************************************/
257cdf0e10cSrcweir #define WIEDUWILLST 400
258cdf0e10cSrcweir 
IsDragPossible(const Point & rPoint)259cdf0e10cSrcweir sal_Bool SwViewImp::IsDragPossible( const Point &rPoint )
260cdf0e10cSrcweir {
261cdf0e10cSrcweir 	if ( !HasDrawView() )
262cdf0e10cSrcweir 		return sal_False;
263cdf0e10cSrcweir 
264cdf0e10cSrcweir 	const SdrMarkList &rMrkList = GetDrawView()->GetMarkedObjectList();
265cdf0e10cSrcweir 
266cdf0e10cSrcweir 	if( !rMrkList.GetMarkCount() )
267cdf0e10cSrcweir 		return sal_False;
268cdf0e10cSrcweir 
269cdf0e10cSrcweir 	SdrObject *pO = rMrkList.GetMark(rMrkList.GetMarkCount()-1)->GetMarkedSdrObj();
270cdf0e10cSrcweir 
271cdf0e10cSrcweir 	SwRect aRect;
272cdf0e10cSrcweir 	if( pO && ::CalcClipRect( pO, aRect, sal_False ) )
273cdf0e10cSrcweir 	{
274cdf0e10cSrcweir 		SwRect aTmp;
275cdf0e10cSrcweir 		::CalcClipRect( pO, aTmp, sal_True );
276cdf0e10cSrcweir 		aRect.Union( aTmp );
277cdf0e10cSrcweir 	}
278cdf0e10cSrcweir 	else
279cdf0e10cSrcweir 		aRect = GetShell()->GetLayout()->Frm();
280cdf0e10cSrcweir 
281cdf0e10cSrcweir 	aRect.Top(	  aRect.Top()	 - WIEDUWILLST );
282cdf0e10cSrcweir 	aRect.Bottom( aRect.Bottom() + WIEDUWILLST );
283cdf0e10cSrcweir 	aRect.Left(   aRect.Left()	 - WIEDUWILLST );
284cdf0e10cSrcweir 	aRect.Right(  aRect.Right()  + WIEDUWILLST );
285cdf0e10cSrcweir 	return aRect.IsInside( rPoint );
286cdf0e10cSrcweir }
287cdf0e10cSrcweir 
288cdf0e10cSrcweir /*************************************************************************
289cdf0e10cSrcweir |*
290cdf0e10cSrcweir |*	SwViewImp::NotifySizeChg()
291cdf0e10cSrcweir |*
292cdf0e10cSrcweir |*	Ersterstellung		MA 23. Jun. 93
293cdf0e10cSrcweir |*	Letzte Aenderung	MA 05. Oct. 98
294cdf0e10cSrcweir |*
295cdf0e10cSrcweir |*************************************************************************/
296cdf0e10cSrcweir 
NotifySizeChg(const Size & rNewSz)297cdf0e10cSrcweir void SwViewImp::NotifySizeChg( const Size &rNewSz )
298cdf0e10cSrcweir {
299cdf0e10cSrcweir 	if ( !HasDrawView() )
300cdf0e10cSrcweir 		return;
301cdf0e10cSrcweir 
302cdf0e10cSrcweir 	if ( GetPageView() )
303cdf0e10cSrcweir 		GetPageView()->GetPage()->SetSize( rNewSz );
304cdf0e10cSrcweir 
305cdf0e10cSrcweir 	//Begrenzung des Arbeitsbereiches.
306cdf0e10cSrcweir     const Rectangle aRect( Point( DOCUMENTBORDER, DOCUMENTBORDER ), rNewSz );
307cdf0e10cSrcweir 	const Rectangle &rOldWork = GetDrawView()->GetWorkArea();
308cdf0e10cSrcweir 	sal_Bool bCheckDrawObjs = sal_False;
309cdf0e10cSrcweir 	if ( aRect != rOldWork )
310cdf0e10cSrcweir 	{
311cdf0e10cSrcweir 		if ( rOldWork.Bottom() > aRect.Bottom() || rOldWork.Right() > aRect.Right())
312cdf0e10cSrcweir 			bCheckDrawObjs = sal_True;
313cdf0e10cSrcweir 		GetDrawView()->SetWorkArea( aRect );
314cdf0e10cSrcweir 	}
315cdf0e10cSrcweir 	if ( !bCheckDrawObjs )
316cdf0e10cSrcweir 		return;
317cdf0e10cSrcweir 
318cdf0e10cSrcweir     ASSERT( pSh->getIDocumentDrawModelAccess()->GetDrawModel(), "NotifySizeChg without DrawModel" );
319cdf0e10cSrcweir     SdrPage* pPage = pSh->getIDocumentDrawModelAccess()->GetDrawModel()->GetPage( 0 );
320cdf0e10cSrcweir 	const sal_uLong nObjs = pPage->GetObjCount();
321cdf0e10cSrcweir 	for( sal_uLong nObj = 0; nObj < nObjs; ++nObj )
322cdf0e10cSrcweir 	{
323cdf0e10cSrcweir 		SdrObject *pObj = pPage->GetObj( nObj );
324cdf0e10cSrcweir 		if( !pObj->ISA(SwVirtFlyDrawObj) )
325cdf0e10cSrcweir 		{
326cdf0e10cSrcweir 			//Teilfix(26793): Objekte, die in Rahmen verankert sind, brauchen
327cdf0e10cSrcweir 			//nicht angepasst werden.
328cdf0e10cSrcweir             const SwContact *pCont = (SwContact*)GetUserCall(pObj);
329cdf0e10cSrcweir 			//JP - 16.3.00 Bug 73920: this function might be called by the
330cdf0e10cSrcweir 			//				InsertDocument, when a PageDesc-Attribute is
331cdf0e10cSrcweir 			//				set on a node. Then the SdrObject must not have
332cdf0e10cSrcweir 			//				an UserCall.
333cdf0e10cSrcweir             if( !pCont || !pCont->ISA(SwDrawContact) )
334cdf0e10cSrcweir 				continue;
335cdf0e10cSrcweir 
336cdf0e10cSrcweir             const SwFrm *pAnchor = ((SwDrawContact*)pCont)->GetAnchorFrm();
337cdf0e10cSrcweir 			if ( !pAnchor || pAnchor->IsInFly() || !pAnchor->IsValid() ||
338cdf0e10cSrcweir                  !pAnchor->GetUpper() || !pAnchor->FindPageFrm() ||
339cdf0e10cSrcweir                  (FLY_AS_CHAR == pCont->GetFmt()->GetAnchor().GetAnchorId()) )
340cdf0e10cSrcweir             {
341cdf0e10cSrcweir 				continue;
342cdf0e10cSrcweir             }
343cdf0e10cSrcweir 
344cdf0e10cSrcweir             // OD 19.06.2003 #108784# - no move for drawing objects in header/footer
345cdf0e10cSrcweir             if ( pAnchor->FindFooterOrHeader() )
346cdf0e10cSrcweir             {
347cdf0e10cSrcweir                 continue;
348cdf0e10cSrcweir             }
349cdf0e10cSrcweir 
350cdf0e10cSrcweir 			const Rectangle aBound( pObj->GetCurrentBoundRect() );
351cdf0e10cSrcweir 			if ( !aRect.IsInside( aBound ) )
352cdf0e10cSrcweir 			{
353cdf0e10cSrcweir 				Size aSz;
354cdf0e10cSrcweir 				if ( aBound.Left() > aRect.Right() )
355cdf0e10cSrcweir 					aSz.Width() = (aRect.Right() - aBound.Left()) - MINFLY;
356cdf0e10cSrcweir 				if ( aBound.Top() > aRect.Bottom() )
357cdf0e10cSrcweir 					aSz.Height() = (aRect.Bottom() - aBound.Top()) - MINFLY;
358cdf0e10cSrcweir 				if ( aSz.Width() || aSz.Height() )
359cdf0e10cSrcweir 					pObj->Move( aSz );
360cdf0e10cSrcweir 
361cdf0e10cSrcweir 				//Notanker: Grosse Objekte nicht nach oben verschwinden lassen.
362cdf0e10cSrcweir 				aSz.Width() = aSz.Height() = 0;
363cdf0e10cSrcweir 				if ( aBound.Bottom() < aRect.Top() )
364cdf0e10cSrcweir 					aSz.Width() = (aBound.Bottom() - aRect.Top()) - MINFLY;
365cdf0e10cSrcweir 				if ( aBound.Right() < aRect.Left() )
366cdf0e10cSrcweir 					aSz.Height() = (aBound.Right() - aRect.Left()) - MINFLY;
367cdf0e10cSrcweir 				if ( aSz.Width() || aSz.Height() )
368cdf0e10cSrcweir 					pObj->Move( aSz );
369cdf0e10cSrcweir 			}
370cdf0e10cSrcweir 		}
371cdf0e10cSrcweir 	}
372cdf0e10cSrcweir }
373cdf0e10cSrcweir 
374cdf0e10cSrcweir 
375cdf0e10cSrcweir 
376