xref: /aoo41x/main/sw/source/core/layout/flyincnt.cxx (revision efeef26f)
1*efeef26fSAndrew Rist /**************************************************************
2*efeef26fSAndrew Rist  *
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
12cdf0e10cSrcweir  *
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 #include "cntfrm.hxx"
28cdf0e10cSrcweir #include "doc.hxx"
29cdf0e10cSrcweir #include "flyfrm.hxx"
30cdf0e10cSrcweir #include "frmtool.hxx"
31cdf0e10cSrcweir #include "frmfmt.hxx"
32cdf0e10cSrcweir #include "hints.hxx"
33cdf0e10cSrcweir #include <fmtornt.hxx>
34cdf0e10cSrcweir #include <fmtfsize.hxx>
35cdf0e10cSrcweir #include "txtfrm.hxx"		//fuer IsLocked()
36cdf0e10cSrcweir #include "flyfrms.hxx"
37cdf0e10cSrcweir // OD 2004-01-19 #110582#
38cdf0e10cSrcweir #include <dflyobj.hxx>
39cdf0e10cSrcweir 
40cdf0e10cSrcweir //aus FlyCnt.cxx
41cdf0e10cSrcweir void DeepCalc( const SwFrm *pFrm );
42cdf0e10cSrcweir 
43cdf0e10cSrcweir /*************************************************************************
44cdf0e10cSrcweir |*
45cdf0e10cSrcweir |*	SwFlyInCntFrm::SwFlyInCntFrm(), ~SwFlyInCntFrm()
46cdf0e10cSrcweir |*
47cdf0e10cSrcweir |*	Ersterstellung		MA 01. Dec. 92
48cdf0e10cSrcweir |*	Letzte Aenderung	MA 09. Apr. 99
49cdf0e10cSrcweir |*
50cdf0e10cSrcweir |*************************************************************************/
SwFlyInCntFrm(SwFlyFrmFmt * pFmt,SwFrm * pSib,SwFrm * pAnch)51cdf0e10cSrcweir SwFlyInCntFrm::SwFlyInCntFrm( SwFlyFrmFmt *pFmt, SwFrm* pSib, SwFrm *pAnch ) :
52cdf0e10cSrcweir 	SwFlyFrm( pFmt, pSib, pAnch )
53cdf0e10cSrcweir {
54cdf0e10cSrcweir 	bInCnt = bInvalidLayout = bInvalidCntnt = sal_True;
55cdf0e10cSrcweir     SwTwips nRel = pFmt->GetVertOrient().GetPos();
56cdf0e10cSrcweir     // OD 2004-05-27 #i26791# - member <aRelPos> moved to <SwAnchoredObject>
57cdf0e10cSrcweir     Point aRelPos;
58cdf0e10cSrcweir     if( pAnch && pAnch->IsVertical() )
59cdf0e10cSrcweir         aRelPos.X() = pAnch->IsReverse() ? nRel : -nRel;
60cdf0e10cSrcweir     else
61cdf0e10cSrcweir         aRelPos.Y() = nRel;
62cdf0e10cSrcweir     SetCurrRelPos( aRelPos );
63cdf0e10cSrcweir }
64cdf0e10cSrcweir 
~SwFlyInCntFrm()65cdf0e10cSrcweir SwFlyInCntFrm::~SwFlyInCntFrm()
66cdf0e10cSrcweir {
67cdf0e10cSrcweir 	//und Tschuess.
68cdf0e10cSrcweir     if ( !GetFmt()->GetDoc()->IsInDtor() && GetAnchorFrm() )
69cdf0e10cSrcweir 	{
70cdf0e10cSrcweir         SwRect aTmp( GetObjRectWithSpaces() );
71cdf0e10cSrcweir 		SwFlyInCntFrm::NotifyBackground( FindPageFrm(), aTmp, PREP_FLY_LEAVE );
72cdf0e10cSrcweir 	}
73cdf0e10cSrcweir }
74cdf0e10cSrcweir 
75cdf0e10cSrcweir // --> OD 2004-06-29 #i28701#
76cdf0e10cSrcweir TYPEINIT1(SwFlyInCntFrm,SwFlyFrm);
77cdf0e10cSrcweir // <--
78cdf0e10cSrcweir /*************************************************************************
79cdf0e10cSrcweir |*
80cdf0e10cSrcweir |*	SwFlyInCntFrm::SetRefPoint(),
81cdf0e10cSrcweir |*
82cdf0e10cSrcweir |*	Ersterstellung		MA 01. Dec. 92
83cdf0e10cSrcweir |*	Letzte Aenderung	MA 06. Aug. 95
84cdf0e10cSrcweir |*
85cdf0e10cSrcweir |*************************************************************************/
SetRefPoint(const Point & rPoint,const Point & rRelAttr,const Point & rRelPos)86cdf0e10cSrcweir void SwFlyInCntFrm::SetRefPoint( const Point& rPoint,
87cdf0e10cSrcweir                                  const Point& rRelAttr,
88cdf0e10cSrcweir                                  const Point& rRelPos )
89cdf0e10cSrcweir {
90cdf0e10cSrcweir     // OD 2004-05-27 #i26791# - member <aRelPos> moved to <SwAnchoredObject>
91cdf0e10cSrcweir     ASSERT( rPoint != aRef || rRelAttr != GetCurrRelPos(), "SetRefPoint: no change" );
92cdf0e10cSrcweir     SwFlyNotify *pNotify = NULL;
93cdf0e10cSrcweir     // No notify at a locked fly frame, if a fly frame is locked, there's
94cdf0e10cSrcweir     // already a SwFlyNotify object on the stack (MakeAll).
95cdf0e10cSrcweir     if( !IsLocked() )
96cdf0e10cSrcweir         pNotify = new SwFlyNotify( this );
97cdf0e10cSrcweir 	aRef = rPoint;
98cdf0e10cSrcweir     SetCurrRelPos( rRelAttr );
99cdf0e10cSrcweir     SWRECTFN( GetAnchorFrm() )
100cdf0e10cSrcweir     (Frm().*fnRect->fnSetPos)( rPoint + rRelPos );
101cdf0e10cSrcweir     // --> OD 2006-08-25 #i68520#
102cdf0e10cSrcweir     InvalidateObjRectWithSpaces();
103cdf0e10cSrcweir     // <--
104cdf0e10cSrcweir     if( pNotify )
105cdf0e10cSrcweir     {
106cdf0e10cSrcweir         InvalidatePage();
107cdf0e10cSrcweir         bValidPos = sal_False;
108cdf0e10cSrcweir         bInvalid  = sal_True;
109cdf0e10cSrcweir         Calc();
110cdf0e10cSrcweir         delete pNotify;
111cdf0e10cSrcweir     }
112cdf0e10cSrcweir }
113cdf0e10cSrcweir 
114cdf0e10cSrcweir /*************************************************************************
115cdf0e10cSrcweir |*
116cdf0e10cSrcweir |*	SwFlyInCntFrm::Modify()
117cdf0e10cSrcweir |*
118cdf0e10cSrcweir |*	Ersterstellung		MA 16. Dec. 92
119cdf0e10cSrcweir |*	Letzte Aenderung	MA 02. Sep. 93
120cdf0e10cSrcweir |*
121cdf0e10cSrcweir |*************************************************************************/
Modify(const SfxPoolItem * pOld,const SfxPoolItem * pNew)122cdf0e10cSrcweir void SwFlyInCntFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
123cdf0e10cSrcweir {
124cdf0e10cSrcweir 	sal_Bool bCallPrepare = sal_False;
125cdf0e10cSrcweir 	sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
126cdf0e10cSrcweir 	if( RES_ATTRSET_CHG == nWhich )
127cdf0e10cSrcweir 	{
128cdf0e10cSrcweir 		if( SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->
129cdf0e10cSrcweir 			GetItemState( RES_SURROUND, sal_False ) ||
130cdf0e10cSrcweir 			SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->
131cdf0e10cSrcweir 			GetItemState( RES_FRMMACRO, sal_False ) )
132cdf0e10cSrcweir 		{
133cdf0e10cSrcweir 			SwAttrSetChg aOld( *(SwAttrSetChg*)pOld );
134cdf0e10cSrcweir 			SwAttrSetChg aNew( *(SwAttrSetChg*)pNew );
135cdf0e10cSrcweir 
136cdf0e10cSrcweir 			aOld.ClearItem( RES_SURROUND );
137cdf0e10cSrcweir 			aNew.ClearItem( RES_SURROUND );
138cdf0e10cSrcweir 			aOld.ClearItem( RES_FRMMACRO );
139cdf0e10cSrcweir 			aNew.ClearItem( RES_FRMMACRO );
140cdf0e10cSrcweir 			if( aNew.Count() )
141cdf0e10cSrcweir 			{
142cdf0e10cSrcweir 				SwFlyFrm::Modify( &aOld, &aNew );
143cdf0e10cSrcweir 				bCallPrepare = sal_True;
144cdf0e10cSrcweir 			}
145cdf0e10cSrcweir 		}
146cdf0e10cSrcweir 		else if( ((SwAttrSetChg*)pNew)->GetChgSet()->Count())
147cdf0e10cSrcweir 		{
148cdf0e10cSrcweir 			SwFlyFrm::Modify( pOld, pNew );
149cdf0e10cSrcweir 			bCallPrepare = sal_True;
150cdf0e10cSrcweir 		}
151cdf0e10cSrcweir 	}
152cdf0e10cSrcweir 	else if( nWhich != RES_SURROUND && RES_FRMMACRO != nWhich )
153cdf0e10cSrcweir 	{
154cdf0e10cSrcweir 		SwFlyFrm::Modify( pOld, pNew );
155cdf0e10cSrcweir 		bCallPrepare = sal_True;
156cdf0e10cSrcweir 	}
157cdf0e10cSrcweir 
158cdf0e10cSrcweir     if ( bCallPrepare && GetAnchorFrm() )
159cdf0e10cSrcweir         AnchorFrm()->Prepare( PREP_FLY_ATTR_CHG, GetFmt() );
160cdf0e10cSrcweir }
161cdf0e10cSrcweir /*************************************************************************
162cdf0e10cSrcweir |*
163cdf0e10cSrcweir |*	SwFlyInCntFrm::Format()
164cdf0e10cSrcweir |*
165cdf0e10cSrcweir |*	Beschreibung:		Hier wird der Inhalt initial mit Formatiert.
166cdf0e10cSrcweir |*	Ersterstellung		MA 16. Dec. 92
167cdf0e10cSrcweir |*	Letzte Aenderung	MA 19. May. 93
168cdf0e10cSrcweir |*
169cdf0e10cSrcweir |*************************************************************************/
Format(const SwBorderAttrs * pAttrs)170cdf0e10cSrcweir void SwFlyInCntFrm::Format( const SwBorderAttrs *pAttrs )
171cdf0e10cSrcweir {
172cdf0e10cSrcweir 	if ( !Frm().Height() )
173cdf0e10cSrcweir 	{
174cdf0e10cSrcweir 		Lock();	//nicht hintenherum den Anker formatieren.
175cdf0e10cSrcweir 		SwCntntFrm *pCntnt = ContainsCntnt();
176cdf0e10cSrcweir 		while ( pCntnt )
177cdf0e10cSrcweir 		{	pCntnt->Calc();
178cdf0e10cSrcweir 			pCntnt = pCntnt->GetNextCntntFrm();
179cdf0e10cSrcweir 		}
180cdf0e10cSrcweir 		Unlock();
181cdf0e10cSrcweir 	}
182cdf0e10cSrcweir 	SwFlyFrm::Format( pAttrs );
183cdf0e10cSrcweir }
184cdf0e10cSrcweir /*************************************************************************
185cdf0e10cSrcweir |*
186cdf0e10cSrcweir |*	SwFlyInCntFrm::MakeFlyPos()
187cdf0e10cSrcweir |*
188cdf0e10cSrcweir |*	Beschreibung		Im Unterschied zu anderen Frms wird hier nur die
189cdf0e10cSrcweir |*		die RelPos berechnet. Die absolute Position wird ausschliesslich
190cdf0e10cSrcweir |*		per SetAbsPos errechnet.
191cdf0e10cSrcweir |*	Ersterstellung		MA 03. Dec. 92
192cdf0e10cSrcweir |*	Letzte Aenderung	MA 12. Apr. 96
193cdf0e10cSrcweir |*
194cdf0e10cSrcweir |*************************************************************************/
195cdf0e10cSrcweir // OD 2004-03-23 #i26791#
196cdf0e10cSrcweir //void SwFlyInCntFrm::MakeFlyPos()
MakeObjPos()197cdf0e10cSrcweir void SwFlyInCntFrm::MakeObjPos()
198cdf0e10cSrcweir {
199cdf0e10cSrcweir     if ( !bValidPos )
200cdf0e10cSrcweir     {
201cdf0e10cSrcweir         bValidPos = sal_True;
202cdf0e10cSrcweir         SwFlyFrmFmt *pFmt = (SwFlyFrmFmt*)GetFmt();
203cdf0e10cSrcweir         const SwFmtVertOrient &rVert = pFmt->GetVertOrient();
204cdf0e10cSrcweir         //Und ggf. noch die aktuellen Werte im Format updaten, dabei darf
205cdf0e10cSrcweir         //zu diesem Zeitpunkt natuerlich kein Modify verschickt werden.
206cdf0e10cSrcweir         const bool bVert = GetAnchorFrm()->IsVertical();
207cdf0e10cSrcweir         const bool bRev = GetAnchorFrm()->IsReverse();
208cdf0e10cSrcweir         SwTwips nOld = rVert.GetPos();
209cdf0e10cSrcweir         SwTwips nAct = bVert ? -GetCurrRelPos().X() : GetCurrRelPos().Y();
210cdf0e10cSrcweir         if( bRev )
211cdf0e10cSrcweir             nAct = -nAct;
212cdf0e10cSrcweir         if( nAct != nOld )
213cdf0e10cSrcweir         {
214cdf0e10cSrcweir             SwFmtVertOrient aVert( rVert );
215cdf0e10cSrcweir             aVert.SetPos( nAct );
216cdf0e10cSrcweir             pFmt->LockModify();
217cdf0e10cSrcweir             pFmt->SetFmtAttr( aVert );
218cdf0e10cSrcweir             pFmt->UnlockModify();
219cdf0e10cSrcweir         }
220cdf0e10cSrcweir     }
221cdf0e10cSrcweir }
222cdf0e10cSrcweir 
223cdf0e10cSrcweir // --> OD 2004-12-02 #115759#
_ActionOnInvalidation(const InvalidationType _nInvalid)224cdf0e10cSrcweir void SwFlyInCntFrm::_ActionOnInvalidation( const InvalidationType _nInvalid )
225cdf0e10cSrcweir {
226cdf0e10cSrcweir     if ( INVALID_POS == _nInvalid || INVALID_ALL == _nInvalid )
227cdf0e10cSrcweir         AnchorFrm()->Prepare( PREP_FLY_ATTR_CHG, &GetFrmFmt() );
228cdf0e10cSrcweir }
229cdf0e10cSrcweir // <--
230cdf0e10cSrcweir /*************************************************************************
231cdf0e10cSrcweir |*
232cdf0e10cSrcweir |*	SwFlyInCntFrm::NotifyBackground()
233cdf0e10cSrcweir |*
234cdf0e10cSrcweir |*	Ersterstellung		MA 03. Dec. 92
235cdf0e10cSrcweir |*	Letzte Aenderung	MA 26. Aug. 93
236cdf0e10cSrcweir |*
237cdf0e10cSrcweir |*************************************************************************/
NotifyBackground(SwPageFrm *,const SwRect & rRect,PrepareHint eHint)238cdf0e10cSrcweir void SwFlyInCntFrm::NotifyBackground( SwPageFrm *, const SwRect& rRect,
239cdf0e10cSrcweir 									   PrepareHint eHint)
240cdf0e10cSrcweir {
241cdf0e10cSrcweir 	if ( eHint == PREP_FLY_ATTR_CHG )
242cdf0e10cSrcweir         AnchorFrm()->Prepare( PREP_FLY_ATTR_CHG );
243cdf0e10cSrcweir 	else
244cdf0e10cSrcweir         AnchorFrm()->Prepare( eHint, (void*)&rRect );
245cdf0e10cSrcweir }
246cdf0e10cSrcweir 
247cdf0e10cSrcweir /*************************************************************************
248cdf0e10cSrcweir |*
249cdf0e10cSrcweir |*	SwFlyInCntFrm::GetRelPos()
250cdf0e10cSrcweir |*
251cdf0e10cSrcweir |*	Ersterstellung		MA 04. Dec. 92
252cdf0e10cSrcweir |*	Letzte Aenderung	MA 04. Dec. 92
253cdf0e10cSrcweir |*
254cdf0e10cSrcweir |*************************************************************************/
GetRelPos() const255cdf0e10cSrcweir const Point SwFlyInCntFrm::GetRelPos() const
256cdf0e10cSrcweir {
257cdf0e10cSrcweir 	Calc();
258cdf0e10cSrcweir     return GetCurrRelPos();
259cdf0e10cSrcweir }
260cdf0e10cSrcweir 
261cdf0e10cSrcweir /*************************************************************************
262cdf0e10cSrcweir |*
263cdf0e10cSrcweir |*	SwFlyInCntFrm::RegistFlys()
264cdf0e10cSrcweir |*
265cdf0e10cSrcweir |*	Ersterstellung		MA 26. Nov. 93
266cdf0e10cSrcweir |*	Letzte Aenderung	MA 26. Nov. 93
267cdf0e10cSrcweir |*
268cdf0e10cSrcweir |*************************************************************************/
RegistFlys()269cdf0e10cSrcweir void SwFlyInCntFrm::RegistFlys()
270cdf0e10cSrcweir {
271cdf0e10cSrcweir 	// vgl. SwRowFrm::RegistFlys()
272cdf0e10cSrcweir 	SwPageFrm *pPage = FindPageFrm();
273cdf0e10cSrcweir 	ASSERT( pPage, "Flys ohne Seite anmelden?" );
274cdf0e10cSrcweir 	::RegistFlys( pPage, this );
275cdf0e10cSrcweir }
276cdf0e10cSrcweir 
277cdf0e10cSrcweir /*************************************************************************
278cdf0e10cSrcweir |*
279cdf0e10cSrcweir |*	SwFlyInCntFrm::MakeAll()
280cdf0e10cSrcweir |*
281cdf0e10cSrcweir |*	Ersterstellung		MA 18. Feb. 94
282cdf0e10cSrcweir |*	Letzte Aenderung	MA 13. Jun. 96
283cdf0e10cSrcweir |*
284cdf0e10cSrcweir |*************************************************************************/
MakeAll()285cdf0e10cSrcweir void SwFlyInCntFrm::MakeAll()
286cdf0e10cSrcweir {
287cdf0e10cSrcweir     // OD 2004-01-19 #110582#
288cdf0e10cSrcweir     if ( !GetFmt()->GetDoc()->IsVisibleLayerId( GetVirtDrawObj()->GetLayer() ) )
289cdf0e10cSrcweir     {
290cdf0e10cSrcweir         return;
291cdf0e10cSrcweir     }
292cdf0e10cSrcweir 
293cdf0e10cSrcweir     if ( !GetAnchorFrm() || IsLocked() || IsColLocked() || !FindPageFrm() )
294cdf0e10cSrcweir 		return;
295cdf0e10cSrcweir 
296cdf0e10cSrcweir 	Lock();	//Der Vorhang faellt
297cdf0e10cSrcweir 
298cdf0e10cSrcweir 		//uebernimmt im DTor die Benachrichtigung
299cdf0e10cSrcweir 	const SwFlyNotify aNotify( this );
300cdf0e10cSrcweir 	SwBorderAttrAccess aAccess( SwFrm::GetCache(), this );
301cdf0e10cSrcweir 	const SwBorderAttrs &rAttrs = *aAccess.Get();
302cdf0e10cSrcweir 
303cdf0e10cSrcweir 	if ( IsClipped() )
304cdf0e10cSrcweir 		bValidSize = bHeightClipped = bWidthClipped = sal_False;
305cdf0e10cSrcweir 
306cdf0e10cSrcweir 	while ( !bValidPos || !bValidSize || !bValidPrtArea )
307cdf0e10cSrcweir 	{
308cdf0e10cSrcweir 		//Nur einstellen wenn das Flag gesetzt ist!!
309cdf0e10cSrcweir 		if ( !bValidSize )
310cdf0e10cSrcweir 		{
311cdf0e10cSrcweir 			bValidPrtArea = sal_False;
312cdf0e10cSrcweir /*
313cdf0e10cSrcweir             // This is also done in the Format function, so I think
314cdf0e10cSrcweir             // this code is not necessary anymore:
315cdf0e10cSrcweir 			long nOldWidth = aFrm.Width();
316cdf0e10cSrcweir             const Size aRelSize( CalcRel( rFrmSz ) );
317cdf0e10cSrcweir 			aFrm.Width( aRelSize.Width() );
318cdf0e10cSrcweir 
319cdf0e10cSrcweir 			if ( aFrm.Width() > nOldWidth )
320cdf0e10cSrcweir 				//Damit sich der Inhalt anpasst
321cdf0e10cSrcweir 				aFrm.Height( aRelSize.Height() );
322cdf0e10cSrcweir */
323cdf0e10cSrcweir 		}
324cdf0e10cSrcweir 
325cdf0e10cSrcweir 		if ( !bValidPrtArea )
326cdf0e10cSrcweir 			MakePrtArea( rAttrs );
327cdf0e10cSrcweir 
328cdf0e10cSrcweir 		if ( !bValidSize )
329cdf0e10cSrcweir 			Format( &rAttrs );
330cdf0e10cSrcweir 
331cdf0e10cSrcweir 		if ( !bValidPos )
332cdf0e10cSrcweir         {
333cdf0e10cSrcweir             // OD 2004-03-23 #i26791#
334cdf0e10cSrcweir             //MakeFlyPos();
335cdf0e10cSrcweir             MakeObjPos();
336cdf0e10cSrcweir         }
337cdf0e10cSrcweir 
338cdf0e10cSrcweir         // --> OD 2006-04-13 #b6402800#
339cdf0e10cSrcweir         // re-activate clipping of as-character anchored Writer fly frames
340cdf0e10cSrcweir         // depending on compatibility option <ClipAsCharacterAnchoredWriterFlyFrames>
341cdf0e10cSrcweir         if ( bValidPos && bValidSize &&
342cdf0e10cSrcweir              GetFmt()->getIDocumentSettingAccess()->get( IDocumentSettingAccess::CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAME ) )
343cdf0e10cSrcweir 		{
344cdf0e10cSrcweir             SwFrm* pFrm = AnchorFrm();
345cdf0e10cSrcweir             if ( Frm().Left() == (pFrm->Frm().Left()+pFrm->Prt().Left()) &&
346cdf0e10cSrcweir 				 Frm().Width() > pFrm->Prt().Width() )
347cdf0e10cSrcweir 			{
348cdf0e10cSrcweir 				Frm().Width( pFrm->Prt().Width() );
349cdf0e10cSrcweir 				bValidPrtArea = sal_False;
350cdf0e10cSrcweir 				bWidthClipped = sal_True;
351cdf0e10cSrcweir 			}
352cdf0e10cSrcweir 		}
353cdf0e10cSrcweir         // <--
354cdf0e10cSrcweir 	}
355cdf0e10cSrcweir 	Unlock();
356cdf0e10cSrcweir }
357cdf0e10cSrcweir 
358