1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 // MARKER(update_precomp.py): autogen include statement, do not remove 25 #include "precompiled_sw.hxx" 26 #include <svx/svdmodel.hxx> 27 #include <svx/svdpage.hxx> 28 #include <fmtfordr.hxx> 29 #include <fmtpdsc.hxx> 30 #include <frmfmt.hxx> 31 #include <swtable.hxx> 32 #include <rootfrm.hxx> 33 #include <pagefrm.hxx> 34 #include <cntfrm.hxx> 35 #include <viewsh.hxx> 36 #include <doc.hxx> 37 #include <node.hxx> 38 #include <dflyobj.hxx> 39 #include <frmtool.hxx> 40 #include <virtoutp.hxx> 41 #include <blink.hxx> 42 #include <ndindex.hxx> 43 #include <sectfrm.hxx> 44 #include <notxtfrm.hxx> 45 #include <pagedesc.hxx> 46 #include "viewimp.hxx" 47 #include "IDocumentTimerAccess.hxx" 48 #include "IDocumentLayoutAccess.hxx" 49 #include "IDocumentFieldsAccess.hxx" 50 #include "IDocumentSettingAccess.hxx" 51 #include "IDocumentDrawModelAccess.hxx" 52 #include <hints.hxx> 53 #include <viewopt.hxx> 54 55 SwLayVout *SwRootFrm::pVout = 0; 56 sal_Bool SwRootFrm::bInPaint = sal_False; 57 sal_Bool SwRootFrm::bNoVirDev = sal_False; 58 59 SwCache *SwFrm::pCache = 0; 60 61 long FirstMinusSecond( long nFirst, long nSecond ) 62 { return nFirst - nSecond; } 63 long SecondMinusFirst( long nFirst, long nSecond ) 64 { return nSecond - nFirst; } 65 long SwIncrement( long nA, long nAdd ) 66 { return nA + nAdd; } 67 long SwDecrement( long nA, long nSub ) 68 { return nA - nSub; } 69 70 static SwRectFnCollection aHorizontal = { 71 /* fnRectGet */ 72 &SwRect::_Top, 73 &SwRect::_Bottom, 74 &SwRect::_Left, 75 &SwRect::_Right, 76 &SwRect::_Width, 77 &SwRect::_Height, 78 &SwRect::TopLeft, 79 &SwRect::_Size, 80 /* fnRectSet */ 81 &SwRect::_Top, 82 &SwRect::_Bottom, 83 &SwRect::_Left, 84 &SwRect::_Right, 85 &SwRect::_Width, 86 &SwRect::_Height, 87 88 &SwRect::SubTop, 89 &SwRect::AddBottom, 90 &SwRect::SubLeft, 91 &SwRect::AddRight, 92 &SwRect::AddWidth, 93 &SwRect::AddHeight, 94 95 &SwRect::SetPosX, 96 &SwRect::SetPosY, 97 98 &SwFrm::GetTopMargin, 99 &SwFrm::GetBottomMargin, 100 &SwFrm::GetLeftMargin, 101 &SwFrm::GetRightMargin, 102 &SwFrm::SetLeftRightMargins, 103 &SwFrm::SetTopBottomMargins, 104 &SwFrm::GetPrtTop, 105 &SwFrm::GetPrtBottom, 106 &SwFrm::GetPrtLeft, 107 &SwFrm::GetPrtRight, 108 &SwRect::GetTopDistance, 109 &SwRect::GetBottomDistance, 110 &SwRect::GetLeftDistance, 111 &SwRect::GetRightDistance, 112 &SwFrm::SetMaxBottom, 113 &SwRect::OverStepBottom, 114 115 &SwRect::SetUpperLeftCorner, 116 &SwFrm::MakeBelowPos, 117 &FirstMinusSecond, 118 &FirstMinusSecond, 119 &SwIncrement, 120 &SwIncrement, 121 &SwRect::SetLeftAndWidth, 122 &SwRect::SetTopAndHeight 123 }; 124 125 static SwRectFnCollection aVertical = { 126 /* fnRectGet */ 127 &SwRect::_Right, 128 &SwRect::_Left, 129 &SwRect::_Top, 130 &SwRect::_Bottom, 131 &SwRect::_Height, 132 &SwRect::_Width, 133 &SwRect::TopRight, 134 &SwRect::SwappedSize, 135 /* fnRectSet */ 136 &SwRect::_Right, 137 &SwRect::_Left, 138 &SwRect::_Top, 139 &SwRect::_Bottom, 140 &SwRect::_Height, 141 &SwRect::_Width, 142 143 &SwRect::AddRight, 144 &SwRect::SubLeft, 145 &SwRect::SubTop, 146 &SwRect::AddBottom, 147 &SwRect::AddHeight, 148 &SwRect::AddWidth, 149 150 &SwRect::SetPosY, 151 &SwRect::SetPosX, 152 153 &SwFrm::GetRightMargin, 154 &SwFrm::GetLeftMargin, 155 &SwFrm::GetTopMargin, 156 &SwFrm::GetBottomMargin, 157 &SwFrm::SetTopBottomMargins, 158 &SwFrm::SetRightLeftMargins, 159 &SwFrm::GetPrtRight, 160 &SwFrm::GetPrtLeft, 161 &SwFrm::GetPrtTop, 162 &SwFrm::GetPrtBottom, 163 &SwRect::GetRightDistance, 164 &SwRect::GetLeftDistance, 165 &SwRect::GetTopDistance, 166 &SwRect::GetBottomDistance, 167 &SwFrm::SetMinLeft, 168 &SwRect::OverStepLeft, 169 170 &SwRect::SetUpperRightCorner, 171 &SwFrm::MakeLeftPos, 172 &FirstMinusSecond, 173 &SecondMinusFirst, 174 &SwIncrement, 175 &SwDecrement, 176 &SwRect::SetTopAndHeight, 177 &SwRect::SetRightAndWidth 178 }; 179 180 static SwRectFnCollection aBottomToTop = { 181 /* fnRectGet */ 182 &SwRect::_Bottom, 183 &SwRect::_Top, 184 &SwRect::_Left, 185 &SwRect::_Right, 186 &SwRect::_Width, 187 &SwRect::_Height, 188 &SwRect::BottomLeft, 189 &SwRect::_Size, 190 /* fnRectSet */ 191 &SwRect::_Bottom, 192 &SwRect::_Top, 193 &SwRect::_Left, 194 &SwRect::_Right, 195 &SwRect::_Width, 196 &SwRect::_Height, 197 198 &SwRect::AddBottom, 199 &SwRect::SubTop, 200 &SwRect::SubLeft, 201 &SwRect::AddRight, 202 &SwRect::AddWidth, 203 &SwRect::AddHeight, 204 205 &SwRect::SetPosX, 206 &SwRect::SetPosY, 207 208 &SwFrm::GetBottomMargin, 209 &SwFrm::GetTopMargin, 210 &SwFrm::GetLeftMargin, 211 &SwFrm::GetRightMargin, 212 &SwFrm::SetLeftRightMargins, 213 &SwFrm::SetBottomTopMargins, 214 &SwFrm::GetPrtBottom, 215 &SwFrm::GetPrtTop, 216 &SwFrm::GetPrtLeft, 217 &SwFrm::GetPrtRight, 218 &SwRect::GetBottomDistance, 219 &SwRect::GetTopDistance, 220 &SwRect::GetLeftDistance, 221 &SwRect::GetRightDistance, 222 &SwFrm::SetMinTop, 223 &SwRect::OverStepTop, 224 225 &SwRect::SetLowerLeftCorner, 226 &SwFrm::MakeUpperPos, 227 &FirstMinusSecond, 228 &SecondMinusFirst, 229 &SwIncrement, 230 &SwDecrement, 231 &SwRect::SetLeftAndWidth, 232 &SwRect::SetBottomAndHeight 233 }; 234 235 static SwRectFnCollection aVerticalRightToLeft = { 236 /* fnRectGet */ 237 &SwRect::_Left, 238 &SwRect::_Right, 239 &SwRect::_Top, 240 &SwRect::_Bottom, 241 &SwRect::_Height, 242 &SwRect::_Width, 243 &SwRect::BottomRight, 244 &SwRect::SwappedSize, 245 /* fnRectSet */ 246 &SwRect::_Left, 247 &SwRect::_Right, 248 &SwRect::_Top, 249 &SwRect::_Bottom, 250 &SwRect::_Height, 251 &SwRect::_Width, 252 253 &SwRect::SubLeft, 254 &SwRect::AddRight, 255 &SwRect::SubTop, 256 &SwRect::AddBottom, 257 &SwRect::AddHeight, 258 &SwRect::AddWidth, 259 260 &SwRect::SetPosY, 261 &SwRect::SetPosX, 262 263 &SwFrm::GetLeftMargin, 264 &SwFrm::GetRightMargin, 265 &SwFrm::GetTopMargin, 266 &SwFrm::GetBottomMargin, 267 &SwFrm::SetTopBottomMargins, 268 &SwFrm::SetLeftRightMargins, 269 &SwFrm::GetPrtLeft, 270 &SwFrm::GetPrtRight, 271 &SwFrm::GetPrtBottom, 272 &SwFrm::GetPrtTop, 273 &SwRect::GetLeftDistance, 274 &SwRect::GetRightDistance, 275 &SwRect::GetBottomDistance, 276 &SwRect::GetTopDistance, 277 &SwFrm::SetMaxRight, 278 &SwRect::OverStepRight, 279 280 &SwRect::SetLowerLeftCorner, 281 &SwFrm::MakeRightPos, 282 &FirstMinusSecond, 283 &FirstMinusSecond, 284 &SwDecrement, 285 &SwIncrement, 286 &SwRect::SetBottomAndHeight, 287 &SwRect::SetLeftAndWidth 288 }; 289 //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin 290 static SwRectFnCollection aVerticalLeftToRight = { 291 /* fnRectGet */ 292 &SwRect::_Left, 293 &SwRect::_Right, 294 &SwRect::_Top, 295 &SwRect::_Bottom, 296 &SwRect::_Height, 297 &SwRect::_Width, 298 &SwRect::TopLeft, 299 &SwRect::SwappedSize, 300 /* fnRectSet */ 301 &SwRect::_Left, 302 &SwRect::_Right, 303 &SwRect::_Top, 304 &SwRect::_Bottom, 305 &SwRect::_Height, 306 &SwRect::_Width, 307 308 &SwRect::SubLeft, 309 &SwRect::AddRight, 310 &SwRect::SubTop, 311 &SwRect::AddBottom, 312 &SwRect::AddHeight, 313 &SwRect::AddWidth, 314 315 &SwRect::SetPosY, 316 &SwRect::SetPosX, 317 318 &SwFrm::GetLeftMargin, 319 &SwFrm::GetRightMargin, 320 &SwFrm::GetTopMargin, 321 &SwFrm::GetBottomMargin, 322 &SwFrm::SetTopBottomMargins, 323 &SwFrm::SetLeftRightMargins, 324 &SwFrm::GetPrtLeft, 325 &SwFrm::GetPrtRight, 326 &SwFrm::GetPrtTop, 327 &SwFrm::GetPrtBottom, 328 &SwRect::GetLeftDistance, 329 &SwRect::GetRightDistance, 330 &SwRect::GetTopDistance, 331 &SwRect::GetBottomDistance, 332 &SwFrm::SetMaxRight, 333 &SwRect::OverStepRight, 334 335 &SwRect::SetUpperLeftCorner, 336 &SwFrm::MakeRightPos, 337 &FirstMinusSecond, 338 &FirstMinusSecond, 339 &SwIncrement, 340 &SwIncrement, 341 &SwRect::SetTopAndHeight, 342 &SwRect::SetLeftAndWidth 343 }; 344 //End of SCMS 345 SwRectFn fnRectHori = &aHorizontal; 346 SwRectFn fnRectVert = &aVertical; 347 //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin 348 SwRectFn fnRectVertL2R = &aVerticalLeftToRight; 349 //End of SCMS 350 SwRectFn fnRectB2T = &aBottomToTop; 351 SwRectFn fnRectVL2R = &aVerticalRightToLeft; 352 353 // --> OD 2006-05-10 #i65250# 354 sal_uInt32 SwFrm::mnLastFrmId=0; 355 // <-- 356 357 TYPEINIT1(SwFrm,SwClient); //rtti fuer SwFrm 358 TYPEINIT1(SwCntntFrm,SwFrm); //rtti fuer SwCntntFrm 359 360 361 void _FrmInit() 362 { 363 SwRootFrm::pVout = new SwLayVout(); 364 SwCache *pNew = new SwCache( 100, 100 365 #ifdef DBG_UTIL 366 , "static SwBorderAttrs::pCache" 367 #endif 368 ); 369 SwFrm::SetCache( pNew ); 370 } 371 372 373 374 void _FrmFinit() 375 { 376 #ifdef DBG_UTIL 377 // im Chache duerfen nur noch 0-Pointer stehen 378 for( sal_uInt16 n = SwFrm::GetCachePtr()->Count(); n; ) 379 if( (*SwFrm::GetCachePtr())[ --n ] ) 380 { 381 SwCacheObj* pObj = (*SwFrm::GetCachePtr())[ n ]; 382 ASSERT( !pObj, "Wer hat sich nicht ausgetragen?") 383 } 384 #endif 385 delete SwRootFrm::pVout; 386 delete SwFrm::GetCachePtr(); 387 } 388 389 /************************************************************************* 390 |* 391 |* RootFrm::Alles was so zur CurrShell gehoert 392 |* 393 |* Ersterstellung MA 09. Sep. 98 394 |* Letzte Aenderung MA 18. Feb. 99 395 |* 396 |*************************************************************************/ 397 398 typedef CurrShell* CurrShellPtr; 399 SV_DECL_PTRARR_SORT(SwCurrShells,CurrShellPtr,4,4) 400 SV_IMPL_PTRARR_SORT(SwCurrShells,CurrShellPtr) 401 402 CurrShell::CurrShell( ViewShell *pNew ) 403 { 404 ASSERT( pNew, "0-Shell einsetzen?" ); 405 pRoot = pNew->GetLayout(); 406 if ( pRoot ) 407 { 408 pPrev = pRoot->pCurrShell; 409 pRoot->pCurrShell = pNew; 410 pRoot->pCurrShells->Insert( this ); 411 } 412 else 413 pPrev = 0; 414 } 415 416 CurrShell::~CurrShell() 417 { 418 if ( pRoot ) 419 { 420 pRoot->pCurrShells->Remove( this ); 421 if ( pPrev ) 422 pRoot->pCurrShell = pPrev; 423 if ( !pRoot->pCurrShells->Count() && pRoot->pWaitingCurrShell ) 424 { 425 pRoot->pCurrShell = pRoot->pWaitingCurrShell; 426 pRoot->pWaitingCurrShell = 0; 427 } 428 } 429 } 430 431 void SetShell( ViewShell *pSh ) 432 { 433 SwRootFrm *pRoot = pSh->GetLayout(); 434 if ( !pRoot->pCurrShells->Count() ) 435 pRoot->pCurrShell = pSh; 436 else 437 pRoot->pWaitingCurrShell = pSh; 438 } 439 440 void SwRootFrm::DeRegisterShell( ViewShell *pSh ) 441 { 442 //Wenn moeglich irgendeine Shell aktivieren 443 if ( pCurrShell == pSh ) 444 pCurrShell = pSh->GetNext() != pSh ? (ViewShell*)pSh->GetNext() : 0; 445 446 //Das hat sich eruebrigt 447 if ( pWaitingCurrShell == pSh ) 448 pWaitingCurrShell = 0; 449 450 //Referenzen entfernen. 451 for ( sal_uInt16 i = 0; i < pCurrShells->Count(); ++i ) 452 { 453 CurrShell *pC = (*pCurrShells)[i]; 454 if (pC->pPrev == pSh) 455 pC->pPrev = 0; 456 } 457 } 458 459 void InitCurrShells( SwRootFrm *pRoot ) 460 { 461 pRoot->pCurrShells = new SwCurrShells; 462 } 463 464 465 /************************************************************************* 466 |* 467 |* SwRootFrm::SwRootFrm() 468 |* 469 |* Beschreibung: 470 |* Der RootFrm laesst sich grundsaetzlich vom Dokument ein eigenes 471 |* FrmFmt geben. Dieses loescht er dann selbst im DTor. 472 |* Das eigene FrmFmt wird vom uebergebenen Format abgeleitet. 473 |* Ersterstellung SS 05-Apr-1991 474 |* Letzte Aenderung MA 12. Dec. 94 475 |* 476 |*************************************************************************/ 477 478 479 SwRootFrm::SwRootFrm( SwFrmFmt *pFmt, ViewShell * pSh ) : 480 SwLayoutFrm( pFmt->GetDoc()->MakeFrmFmt( 481 XubString( "Root", RTL_TEXTENCODING_MS_1252 ), pFmt ), 0 ), 482 // --> PAGES01 483 maPagesArea(), 484 mnViewWidth( -1 ), 485 mnColumns( 0 ), 486 mbBookMode( false ), 487 mbSidebarChanged( false ), 488 mbNeedGrammarCheck( false ), 489 // <-- 490 nBrowseWidth( MM50*4 ), //2cm Minimum 491 pTurbo( 0 ), 492 pLastPage( 0 ), 493 pCurrShell( pSh ), 494 pWaitingCurrShell( 0 ), 495 pDrawPage( 0 ), 496 pDestroy( 0 ), 497 nPhyPageNums( 0 ), 498 nAccessibleShells( 0 ) 499 { 500 nType = FRMC_ROOT; 501 bIdleFormat = bTurboAllowed = bAssertFlyPages = bIsNewLayout = sal_True; 502 bCheckSuperfluous = bBrowseWidthValid = sal_False; 503 setRootFrm( this ); 504 } 505 506 void SwRootFrm::Init( SwFrmFmt* pFmt ) 507 { 508 InitCurrShells( this ); 509 510 IDocumentTimerAccess *pTimerAccess = pFmt->getIDocumentTimerAccess(); 511 IDocumentLayoutAccess *pLayoutAccess = pFmt->getIDocumentLayoutAccess(); 512 IDocumentFieldsAccess *pFieldsAccess = pFmt->getIDocumentFieldsAccess(); 513 const IDocumentSettingAccess *pSettingAccess = pFmt->getIDocumentSettingAccess(); 514 pTimerAccess->StopIdling(); 515 pLayoutAccess->SetCurrentViewShell( this->GetCurrShell() ); //Fuer das Erzeugen der Flys durch MakeFrms() //swmod 071108//swmod 071225 516 bCallbackActionEnabled = sal_False; //vor Verlassen auf sal_True setzen! 517 518 SdrModel *pMd = pFmt->getIDocumentDrawModelAccess()->GetDrawModel(); 519 if ( pMd ) 520 { 521 // Disable "multiple layout" 522 pDrawPage = pMd->GetPage(0); //pMd->AllocPage( FALSE ); 523 //pMd->InsertPage( pDrawPage ); 524 // end of disabling 525 526 pDrawPage->SetSize( Frm().SSize() ); 527 } 528 529 //Initialisierung des Layouts: Seiten erzeugen. Inhalt mit cntnt verbinden 530 //usw. 531 //Zuerst einiges initialiseren und den ersten Node besorgen (der wird 532 //fuer den PageDesc benoetigt). 533 534 SwDoc* pDoc = pFmt->GetDoc(); 535 SwNodeIndex aIndex( *pDoc->GetNodes().GetEndOfContent().StartOfSectionNode() ); 536 SwCntntNode *pNode = pDoc->GetNodes().GoNextSection( &aIndex, sal_True, sal_False ); 537 // --> FME 2005-05-25 #123067# pNode = 0 can really happen: 538 SwTableNode *pTblNd= pNode ? pNode->FindTableNode() : 0; 539 // <-- 540 541 //PageDesc besorgen (entweder vom FrmFmt des ersten Node oder den 542 //initialen.) 543 SwPageDesc *pDesc = 0; 544 sal_uInt16 nPgNum = 1; 545 546 if ( pTblNd ) 547 { 548 const SwFmtPageDesc &rDesc = pTblNd->GetTable().GetFrmFmt()->GetPageDesc(); 549 pDesc = (SwPageDesc*)rDesc.GetPageDesc(); 550 //#19104# Seitennummeroffset beruecksictigen!! 551 bIsVirtPageNum = 0 != ( nPgNum = rDesc.GetNumOffset() ); 552 } 553 else if ( pNode ) 554 { 555 const SwFmtPageDesc &rDesc = pNode->GetSwAttrSet().GetPageDesc(); 556 pDesc = (SwPageDesc*)rDesc.GetPageDesc(); 557 //#19104# Seitennummeroffset beruecksictigen!! 558 bIsVirtPageNum = 0 != ( nPgNum = rDesc.GetNumOffset() ); 559 } 560 else 561 bIsVirtPageNum = sal_False; 562 if ( !pDesc ) 563 pDesc = (SwPageDesc*) 564 &const_cast<const SwDoc *>(pDoc)->GetPageDesc( 0 ); 565 const sal_Bool bOdd = !nPgNum || 0 != ( nPgNum % 2 ); 566 567 //Eine Seite erzeugen und in das Layout stellen 568 SwPageFrm *pPage = ::InsertNewPage( *pDesc, this, bOdd, sal_False, sal_False, 0 ); 569 570 //Erstes Blatt im Bodytext-Bereich suchen. 571 SwLayoutFrm *pLay = pPage->FindBodyCont(); 572 while( pLay->Lower() ) 573 pLay = (SwLayoutFrm*)pLay->Lower(); 574 575 SwNodeIndex aTmp( *pDoc->GetNodes().GetEndOfContent().StartOfSectionNode(), 1 ); 576 ::_InsertCnt( pLay, pDoc, aTmp.GetIndex(), sal_True ); 577 //Noch nicht ersetzte Master aus der Liste entfernen. 578 RemoveMasterObjs( pDrawPage ); 579 if( pSettingAccess->get(IDocumentSettingAccess::GLOBAL_DOCUMENT) ) 580 pFieldsAccess->UpdateRefFlds( NULL ); 581 //b6433357: Update page fields after loading 582 // ---> 583 if ( !pCurrShell || !pCurrShell->Imp()->IsUpdateExpFlds() ) 584 { 585 SwDocPosUpdate aMsgHnt( pPage->Frm().Top() ); 586 pFieldsAccess->UpdatePageFlds( &aMsgHnt ); 587 } 588 // <--- 589 590 pTimerAccess->StartIdling(); 591 bCallbackActionEnabled = sal_True; 592 593 ViewShell *pViewSh = GetCurrShell(); 594 if (pViewSh) 595 mbNeedGrammarCheck = pViewSh->GetViewOptions()->IsOnlineSpell(); 596 } 597 598 /************************************************************************* 599 |* 600 |* SwRootFrm::~SwRootFrm() 601 |* 602 |* Ersterstellung SS 05-Apr-1991 603 |* Letzte Aenderung MA 12. Dec. 94 604 |* 605 |*************************************************************************/ 606 607 608 609 SwRootFrm::~SwRootFrm() 610 { 611 bTurboAllowed = sal_False; 612 pTurbo = 0; 613 if(pBlink) 614 pBlink->FrmDelete( this ); 615 static_cast<SwFrmFmt*>(GetRegisteredInNonConst())->GetDoc()->DelFrmFmt( static_cast<SwFrmFmt*>(GetRegisteredInNonConst()) ); 616 delete pDestroy; 617 pDestroy = 0; 618 619 //Referenzen entfernen. 620 for ( sal_uInt16 i = 0; i < pCurrShells->Count(); ++i ) 621 (*pCurrShells)[i]->pRoot = 0; 622 623 delete pCurrShells; 624 625 ASSERT( 0==nAccessibleShells, "Some accessible shells are left" ); 626 } 627 628 /************************************************************************* 629 |* 630 |* SwRootFrm::RemoveMasterObjs() 631 |* 632 |* Ersterstellung MA 19.10.95 633 |* Letzte Aenderung MA 19.10.95 634 |* 635 |*************************************************************************/ 636 637 638 void SwRootFrm::RemoveMasterObjs( SdrPage *pPg ) 639 { 640 //Alle Masterobjekte aus der Page entfernen. Nicht loeschen!! 641 for( sal_uLong i = pPg ? pPg->GetObjCount() : 0; i; ) 642 { 643 SdrObject* pObj = pPg->GetObj( --i ); 644 if( pObj->ISA(SwFlyDrawObj ) ) 645 pPg->RemoveObject( i ); 646 } 647 } 648 649 650 void SwRootFrm::AllCheckPageDescs() const 651 { 652 CheckPageDescs( (SwPageFrm*)this->Lower() ); 653 } 654 //swmod 080226 655 void SwRootFrm::AllInvalidateAutoCompleteWords() const 656 { 657 SwPageFrm *pPage = (SwPageFrm*)this->Lower(); 658 while ( pPage ) 659 { 660 pPage->InvalidateAutoCompleteWords(); 661 pPage = (SwPageFrm*)pPage->GetNext(); 662 } 663 }//swmod 080305 664 void SwRootFrm::AllAddPaintRect() const 665 { 666 GetCurrShell()->AddPaintRect( this->Frm() ); 667 }//swmod 080305 668 void SwRootFrm::AllRemoveFtns() 669 { 670 RemoveFtns(); 671 } 672 void SwRootFrm::AllInvalidateSmartTagsOrSpelling(sal_Bool bSmartTags) const 673 { 674 SwPageFrm *pPage = (SwPageFrm*)this->Lower(); 675 while ( pPage ) 676 { 677 if ( bSmartTags ) 678 pPage->InvalidateSmartTags(); 679 680 pPage->InvalidateSpelling(); 681 pPage = (SwPageFrm*)pPage->GetNext(); 682 } //swmod 080218 683 } 684 685