LCOV - code coverage report
Current view: top level - libreoffice/sw/source/core/view - viewimp.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 96 216 44.4 %
Date: 2012-12-27 Functions: 11 26 42.3 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #include "crsrsh.hxx"
      21             : #include "rootfrm.hxx"
      22             : #include "pagefrm.hxx"
      23             : #include "viewimp.hxx"
      24             : #include "viewopt.hxx"
      25             : #include "flyfrm.hxx"
      26             : #include "frmfmt.hxx"
      27             : #include "layact.hxx"
      28             : #include "swregion.hxx"
      29             : #include "dflyobj.hxx"
      30             : #include "dview.hxx"
      31             : #include <tools/shl.hxx>
      32             : #include <swmodule.hxx>
      33             : #include <svx/svdpage.hxx>
      34             : #include <accmap.hxx>
      35             : 
      36             : // OD 12.12.2002 #103492#
      37             : #include <pagepreviewlayout.hxx>
      38             : 
      39             : #include <comcore.hrc>
      40             : #include <svx/svdundo.hxx>
      41             : #include <IDocumentLayoutAccess.hxx>
      42             : #include <IDocumentDrawModelAccess.hxx>
      43             : #include <IDocumentDeviceAccess.hxx>
      44             : #include <IDocumentSettingAccess.hxx>
      45             : 
      46             : /*************************************************************************
      47             : |*
      48             : |*  SwViewImp::Init()
      49             : |*
      50             : |*  Ersterstellung      MA 25. Jul. 94
      51             : |*  Letzte Aenderung    MA 03. Nov. 95
      52             : |*
      53             : |*************************************************************************/
      54         238 : void SwViewImp::Init( const SwViewOption *pNewOpt )
      55             : {
      56             :     OSL_ENSURE( pDrawView, "SwViewImp::Init without DrawView" );
      57             :     //Jetzt die PageView erzeugen wenn sie noch nicht existiert.
      58         238 :     SwRootFrm *pRoot = pSh->GetLayout();    //swmod 071108//swmod 071225
      59         238 :     if ( !pSdrPageView )
      60             :     {
      61         238 :         IDocumentDrawModelAccess* pIDDMA = pSh->getIDocumentDrawModelAccess();
      62         238 :         if ( !pRoot->GetDrawPage() )
      63           0 :             pRoot->SetDrawPage( pIDDMA->GetDrawModel()->GetPage( 0 ) );
      64             : 
      65         238 :         if ( pRoot->GetDrawPage()->GetSize() != pRoot->Frm().SSize() )
      66         236 :             pRoot->GetDrawPage()->SetSize( pRoot->Frm().SSize() );
      67             : 
      68         238 :         pSdrPageView = pDrawView->ShowSdrPage( pRoot->GetDrawPage());
      69             :         // OD 26.06.2003 #108784# - notify drawing page view about invisible
      70             :         // layers.
      71         238 :         pIDDMA->NotifyInvisibleLayers( *pSdrPageView );
      72             :     }
      73         238 :     pDrawView->SetDragStripes( pNewOpt->IsCrossHair() );
      74         238 :     pDrawView->SetGridSnap( pNewOpt->IsSnap() );
      75         238 :     pDrawView->SetGridVisible( pNewOpt->IsGridVisible() );
      76         238 :     const Size &rSz = pNewOpt->GetSnapSize();
      77         238 :     pDrawView->SetGridCoarse( rSz );
      78             :     const Size aFSize
      79         476 :             ( rSz.Width() ? rSz.Width() /Max(short(1),pNewOpt->GetDivisionX()):0,
      80         714 :               rSz.Height()? rSz.Height()/Max(short(1),pNewOpt->GetDivisionY()):0);
      81         238 :      pDrawView->SetGridFine( aFSize );
      82         238 :     Fraction aSnGrWdtX(rSz.Width(), pNewOpt->GetDivisionX() + 1);
      83         238 :     Fraction aSnGrWdtY(rSz.Height(), pNewOpt->GetDivisionY() + 1);
      84         238 :     pDrawView->SetSnapGridWidth( aSnGrWdtX, aSnGrWdtY );
      85             : 
      86         238 :     if ( pRoot->Frm().HasArea() )
      87         238 :         pDrawView->SetWorkArea( pRoot->Frm().SVRect() );
      88             : 
      89         238 :     if ( GetShell()->IsPreView() )
      90           0 :         pDrawView->SetAnimationEnabled( sal_False );
      91             : 
      92         238 :     pDrawView->SetUseIncompatiblePathCreateInterface( sal_False );
      93             : 
      94             :     // set handle size to 9 pixels, always
      95         238 :     pDrawView->SetMarkHdlSizePixel(9);
      96         238 : }
      97             : 
      98             : /*************************************************************************
      99             : |*
     100             : |*  SwViewImp::SwViewImp()  CTor fuer die Core-Internas
     101             : |*
     102             : |*  Ersterstellung      MA 25. Jul. 94
     103             : |*  Letzte Aenderung    MA 06. Sep. 96
     104             : |*
     105             : |*************************************************************************/
     106             : 
     107         238 : SwViewImp::SwViewImp( ViewShell *pParent ) :
     108             :     pSh( pParent ),
     109             :     pDrawView( 0 ),
     110             :     pSdrPageView( 0 ),
     111             :     pFirstVisPage( 0 ),
     112             :     pRegion( 0 ),
     113             :     pLayAct( 0 ),
     114             :     pIdleAct( 0 ),
     115             :     pAccMap( 0 ),
     116             :     pSdrObjCached(NULL),
     117             :     nRestoreActions( 0 ),
     118             :     // OD 12.12.2002 #103492#
     119         238 :     mpPgPrevwLayout( 0 )
     120             : {
     121             :     //bResetXorVisibility =
     122             :     //HMHbShowHdlPaint =
     123             :     bResetHdlHiddenPaint =
     124         238 :     bSmoothUpdate = bStopSmooth = bStopPrt = sal_False;
     125         238 :     bFirstPageInvalid = sal_True;
     126         238 : }
     127             : 
     128             : /******************************************************************************
     129             : |*
     130             : |*  SwViewImp::~SwViewImp()
     131             : |*
     132             : |*  Ersterstellung      MA 25. Jul. 94
     133             : |*  Letzte Aenderung    MA 16. Dec. 94
     134             : |*
     135             : ******************************************************************************/
     136             : 
     137         130 : SwViewImp::~SwViewImp()
     138             : {
     139          65 :     delete pAccMap;
     140             : 
     141             :     // OD 12.12.2002 #103492#
     142          65 :     delete mpPgPrevwLayout;
     143             : 
     144             :     //JP 29.03.96: nach ShowSdrPage muss auch HideSdrPage gemacht werden!!!
     145          65 :     if( pDrawView )
     146          65 :          pDrawView->HideSdrPage();
     147             : 
     148          65 :     delete pDrawView;
     149             : 
     150          65 :     DelRegion();
     151             : 
     152             :     OSL_ENSURE( !pLayAct, "Have action for the rest of your life." );
     153             :     OSL_ENSURE( !pIdleAct,"Be idle for the rest of your life." );
     154          65 : }
     155             : 
     156             : /******************************************************************************
     157             : |*
     158             : |*  SwViewImp::DelRegions()
     159             : |*
     160             : |*  Ersterstellung      MA 14. Apr. 94
     161             : |*  Letzte Aenderung    MA 14. Apr. 94
     162             : |*
     163             : ******************************************************************************/
     164             : 
     165          90 : void SwViewImp::DelRegion()
     166             : {
     167          90 :     DELETEZ(pRegion);
     168          90 : }
     169             : 
     170             : /******************************************************************************
     171             : |*
     172             : |*  SwViewImp::AddPaintRect()
     173             : |*
     174             : |*  Ersterstellung      MA ??
     175             : |*  Letzte Aenderung    MA 27. Jul. 94
     176             : |*
     177             : ******************************************************************************/
     178             : 
     179         168 : sal_Bool SwViewImp::AddPaintRect( const SwRect &rRect )
     180             : {
     181         168 :     if ( rRect.IsOver( pSh->VisArea() ) )
     182             :     {
     183          65 :         if ( !pRegion )
     184          27 :             pRegion = new SwRegionRects( pSh->VisArea() );
     185          65 :         (*pRegion) -= rRect;
     186          65 :         return sal_True;
     187             :     }
     188         103 :     return sal_False;
     189             : }
     190             : 
     191             : /******************************************************************************
     192             : |*
     193             : |*  ViewImp::CheckWaitCrsr()
     194             : |*
     195             : |*  Ersterstellung      MA 10. Aug. 94
     196             : |*  Letzte Aenderung    MA 10. Aug. 94
     197             : |*
     198             : ******************************************************************************/
     199             : 
     200           2 : void SwViewImp::CheckWaitCrsr()
     201             : {
     202           2 :     if ( pLayAct )
     203           1 :         pLayAct->CheckWaitCrsr();
     204           2 : }
     205             : 
     206             : /******************************************************************************
     207             : |*
     208             : |*  ViewImp::IsCalcLayoutProgress()
     209             : |*
     210             : |*  Ersterstellung      MA 12. Aug. 94
     211             : |*  Letzte Aenderung    MA 12. Aug. 94
     212             : |*
     213             : ******************************************************************************/
     214             : 
     215         748 : sal_Bool SwViewImp::IsCalcLayoutProgress() const
     216             : {
     217         748 :     if ( pLayAct )
     218         192 :         return pLayAct->IsCalcLayout();
     219         556 :     return sal_False;
     220             : }
     221             : 
     222             : /******************************************************************************
     223             : |*
     224             : |*  ViewImp::IsUpdateExpFlds()
     225             : |*
     226             : |*  Ersterstellung      MA 28. Mar. 96
     227             : |*  Letzte Aenderung    MA 28. Mar. 96
     228             : |*
     229             : ******************************************************************************/
     230             : 
     231         244 : sal_Bool SwViewImp::IsUpdateExpFlds()
     232             : {
     233         244 :     if ( pLayAct && pLayAct->IsCalcLayout() )
     234             :     {
     235           0 :         pLayAct->SetUpdateExpFlds();
     236           0 :         return sal_True;
     237             :     }
     238         244 :      return sal_False;
     239             : }
     240             : 
     241             : 
     242             : /******************************************************************************
     243             : |*
     244             : |*  SwViewImp::SetFirstVisPage(), ImplGetFirstVisPage();
     245             : |*
     246             : |*  Ersterstellung      MA 21. Sep. 93
     247             : |*  Letzte Aenderung    MA 08. Mar. 94
     248             : |*
     249             : ******************************************************************************/
     250             : 
     251         782 : void SwViewImp::SetFirstVisPage()
     252             : {
     253         782 :     if ( pSh->bDocSizeChgd && pSh->VisArea().Top() > pSh->GetLayout()->Frm().Height() )
     254             :     {
     255             :         //Wir stecken in einer Action und die VisArea sitzt wegen
     256             :         //Loeschoperationen hinter der erste sichtbaren Seite.
     257             :         //Damit nicht zu heftig Formatiert wird, liefern wir die letzte Seite
     258             :         //zurueck.
     259           0 :         pFirstVisPage = (SwPageFrm*)pSh->GetLayout()->Lower();
     260           0 :         while ( pFirstVisPage && pFirstVisPage->GetNext() )
     261           0 :             pFirstVisPage = (SwPageFrm*)pFirstVisPage->GetNext();
     262             :     }
     263             :     else
     264             :     {
     265         782 :         const SwViewOption* pSwViewOption = GetShell()->GetViewOptions();
     266         782 :         const bool bBookMode = pSwViewOption->IsViewLayoutBookMode();
     267             : 
     268         782 :         SwPageFrm *pPage = (SwPageFrm*)pSh->GetLayout()->Lower();
     269         782 :         SwRect aPageRect = pPage->GetBoundRect();
     270        1861 :         while ( pPage && !aPageRect.IsOver( pSh->VisArea() ) )
     271             :         {
     272         297 :             pPage = (SwPageFrm*)pPage->GetNext();
     273         297 :             if ( pPage )
     274             :             {
     275          44 :                 aPageRect = pPage->GetBoundRect();
     276          44 :                 if ( bBookMode && pPage->IsEmptyPage() )
     277             :                 {
     278           0 :                     const SwPageFrm& rFormatPage = pPage->GetFormatPage();
     279           0 :                     aPageRect.SSize() = rFormatPage.GetBoundRect().SSize();
     280             :                 }
     281             :             }
     282             :         }
     283         782 :         pFirstVisPage = pPage ? pPage : (SwPageFrm*)pSh->GetLayout()->Lower();
     284             :     }
     285         782 :     bFirstPageInvalid = sal_False;
     286         782 : }
     287             : 
     288             : /******************************************************************************
     289             : |*
     290             : |*  SwViewImp::MakeDrawView();
     291             : |*
     292             : |*  Ersterstellung      AMA 01. Nov. 95
     293             : |*  Letzte Aenderung    AMA 01. Nov. 95
     294             : |*
     295             : ******************************************************************************/
     296             : 
     297         238 : void SwViewImp::MakeDrawView()
     298             : {
     299         238 :     IDocumentDrawModelAccess* pIDDMA = GetShell()->getIDocumentDrawModelAccess();
     300             : 
     301             :     // the else here is not an error, _MakeDrawModel() calls this method again
     302             :     // after the DrawModel is created to create DrawViews for all shells...
     303         238 :     if( !pIDDMA->GetDrawModel() )
     304             :     {
     305           0 :         pIDDMA->_MakeDrawModel();
     306             :     }
     307             :     else
     308             :     {
     309         238 :         if ( !pDrawView )
     310             :         {
     311             :             // #i72809#
     312             :             // Discussed with FME, he also thinks that the getPrinter is old and not correct. When i got
     313             :             // him right, it anyways returns GetOut() when it's a printer, but NULL when not. He suggested
     314             :             // to use GetOut() and check the existing cases.
     315             :             // Check worked well. Took a look at viewing, printing, PDF export and print preview with a test
     316             :             // document which has an empty 2nd page (right page, see bug)
     317         238 :             OutputDevice* pOutDevForDrawView = GetShell()->GetWin();
     318             : 
     319         238 :             if(!pOutDevForDrawView)
     320             :             {
     321             :                 // pOutDevForDrawView = (OutputDevice*)GetShell()->getIDocumentDeviceAccess()->getPrinter( false );
     322           2 :                 pOutDevForDrawView = GetShell()->GetOut();
     323             :             }
     324             : 
     325         238 :             pDrawView = new SwDrawView( *this, pIDDMA->GetDrawModel(), pOutDevForDrawView);
     326             :         }
     327             : 
     328         238 :         GetDrawView()->SetActiveLayer(rtl::OUString("Heaven"));
     329         238 :         const SwViewOption* pSwViewOption = GetShell()->GetViewOptions();
     330         238 :         Init(pSwViewOption);
     331             : 
     332             :         // #i68597# If document is read-only, we will not profit from overlay,
     333             :         // so switch it off.
     334         238 :         if(pDrawView && pDrawView->IsBufferedOverlayAllowed())
     335             :         {
     336         238 :             if(pSwViewOption->IsReadonly())
     337             :             {
     338           0 :                 pDrawView->SetBufferedOverlayAllowed(false);
     339             :             }
     340             :         }
     341             :     }
     342         238 : }
     343             : 
     344             : /******************************************************************************
     345             : |*
     346             : |*  SwViewImp::GetRetoucheColor()
     347             : |*
     348             : |*  Ersterstellung      MA 24. Jun. 98
     349             : |*  Letzte Aenderung    MA 24. Jun. 98
     350             : |*
     351             : ******************************************************************************/
     352             : 
     353         264 : Color SwViewImp::GetRetoucheColor() const
     354             : {
     355         264 :     Color aRet( COL_TRANSPARENT );
     356         264 :     const ViewShell &rSh = *GetShell();
     357         264 :     if ( rSh.GetWin() )
     358             :     {
     359         262 :         if ( rSh.GetViewOptions()->getBrowseMode() &&
     360           0 :              COL_TRANSPARENT != rSh.GetViewOptions()->GetRetoucheColor().GetColor() )
     361           0 :             aRet = rSh.GetViewOptions()->GetRetoucheColor();
     362         262 :         else if(rSh.GetViewOptions()->IsPagePreview()  &&
     363           0 :                     !SW_MOD()->GetAccessibilityOptions().GetIsForPagePreviews())
     364           0 :             aRet.SetColor(COL_WHITE);
     365             :         else
     366         262 :             aRet = SwViewOption::GetDocColor();
     367             :     }
     368         264 :     return aRet;
     369             : }
     370             : 
     371             : /** create page preview layout
     372             : 
     373             :     OD 12.12.2002 #103492#
     374             : 
     375             :     @author OD
     376             : */
     377           0 : void SwViewImp::InitPagePreviewLayout()
     378             : {
     379             :     OSL_ENSURE( pSh->GetLayout(), "no layout - page preview layout can not be created.");
     380           0 :     if ( pSh->GetLayout() )
     381           0 :         mpPgPrevwLayout = new SwPagePreviewLayout( *pSh, *(pSh->GetLayout()) );
     382           0 : }
     383             : 
     384           0 : void SwViewImp::UpdateAccessible()
     385             : {
     386             :     // We require a layout and an XModel to be accessible.
     387           0 :     IDocumentLayoutAccess* pIDLA = GetShell()->getIDocumentLayoutAccess();
     388           0 :     Window *pWin = GetShell()->GetWin();
     389             :     OSL_ENSURE( GetShell()->GetLayout(), "no layout, no access" );  //swmod 071108//swmod 071225
     390             :     OSL_ENSURE( pWin, "no window, no access" );
     391             : 
     392           0 :     if( IsAccessible() && pIDLA->GetCurrentViewShell() && pWin )    //swmod 071108//swmod 071225
     393           0 :         GetAccessibleMap().GetDocumentView();
     394           0 : }
     395             : 
     396           0 : void SwViewImp::DisposeAccessible( const SwFrm *pFrm,
     397             :                                    const SdrObject *pObj,
     398             :                                    sal_Bool bRecursive )
     399             : {
     400             :     OSL_ENSURE( !pFrm || pFrm->IsAccessibleFrm(), "frame is not accessible" );
     401           0 :     ViewShell *pVSh = GetShell();
     402           0 :     ViewShell *pTmp = pVSh;
     403           0 :     do
     404             :     {
     405           0 :         if( pTmp->Imp()->IsAccessible() )
     406           0 :             pTmp->Imp()->GetAccessibleMap().Dispose( pFrm, pObj, 0, bRecursive );
     407           0 :         pTmp = (ViewShell *)pTmp->GetNext();
     408             :     } while ( pTmp != pVSh );
     409           0 : }
     410             : 
     411           0 : void SwViewImp::MoveAccessible( const SwFrm *pFrm, const SdrObject *pObj,
     412             :                                 const SwRect& rOldFrm )
     413             : {
     414             :     OSL_ENSURE( !pFrm || pFrm->IsAccessibleFrm(), "frame is not accessible" );
     415           0 :     ViewShell *pVSh = GetShell();
     416           0 :     ViewShell *pTmp = pVSh;
     417           0 :     do
     418             :     {
     419           0 :         if( pTmp->Imp()->IsAccessible() )
     420           0 :             pTmp->Imp()->GetAccessibleMap().InvalidatePosOrSize( pFrm, pObj, 0,
     421           0 :                                                                  rOldFrm );
     422           0 :         pTmp = (ViewShell *)pTmp->GetNext();
     423             :     } while ( pTmp != pVSh );
     424           0 : }
     425             : 
     426           0 : void SwViewImp::InvalidateAccessibleFrmContent( const SwFrm *pFrm )
     427             : {
     428             :     OSL_ENSURE( pFrm->IsAccessibleFrm(), "frame is not accessible" );
     429           0 :     ViewShell *pVSh = GetShell();
     430           0 :     ViewShell *pTmp = pVSh;
     431           0 :     do
     432             :     {
     433           0 :         if( pTmp->Imp()->IsAccessible() )
     434           0 :             pTmp->Imp()->GetAccessibleMap().InvalidateContent( pFrm );
     435           0 :         pTmp = (ViewShell *)pTmp->GetNext();
     436             :     } while ( pTmp != pVSh );
     437           0 : }
     438             : 
     439           0 : void SwViewImp::InvalidateAccessibleCursorPosition( const SwFrm *pFrm )
     440             : {
     441           0 :     if( IsAccessible() )
     442           0 :         GetAccessibleMap().InvalidateCursorPosition( pFrm );
     443           0 : }
     444             : 
     445           0 : void SwViewImp::InvalidateAccessibleEditableState( sal_Bool bAllShells,
     446             :                                                       const SwFrm *pFrm )
     447             : {
     448           0 :     if( bAllShells )
     449             :     {
     450           0 :         ViewShell *pVSh = GetShell();
     451           0 :         ViewShell *pTmp = pVSh;
     452           0 :         do
     453             :         {
     454           0 :             if( pTmp->Imp()->IsAccessible() )
     455           0 :                 pTmp->Imp()->GetAccessibleMap().InvalidateStates( ACC_STATE_EDITABLE, pFrm );
     456           0 :             pTmp = (ViewShell *)pTmp->GetNext();
     457             :         } while ( pTmp != pVSh );
     458             :     }
     459           0 :     else if( IsAccessible() )
     460             :     {
     461           0 :         GetAccessibleMap().InvalidateStates( ACC_STATE_EDITABLE, pFrm );
     462             :     }
     463           0 : }
     464             : 
     465           0 : void SwViewImp::InvalidateAccessibleRelationSet( const SwFlyFrm *pMaster,
     466             :                                                  const SwFlyFrm *pFollow )
     467             : {
     468           0 :     ViewShell *pVSh = GetShell();
     469           0 :     ViewShell *pTmp = pVSh;
     470           0 :     do
     471             :     {
     472           0 :         if( pTmp->Imp()->IsAccessible() )
     473           0 :             pTmp->Imp()->GetAccessibleMap().InvalidateRelationSet( pMaster,
     474           0 :                                                                    pFollow );
     475           0 :         pTmp = (ViewShell *)pTmp->GetNext();
     476             :     } while ( pTmp != pVSh );
     477           0 : }
     478             : 
     479             :  /** invalidate CONTENT_FLOWS_FROM/_TO relation for paragraphs
     480             : 
     481             :     OD 2005-12-01 #i27138#
     482             : 
     483             :     @author OD
     484             : */
     485           0 : void SwViewImp::_InvalidateAccessibleParaFlowRelation( const SwTxtFrm* _pFromTxtFrm,
     486             :                                                        const SwTxtFrm* _pToTxtFrm )
     487             : {
     488           0 :     if ( !_pFromTxtFrm && !_pToTxtFrm )
     489             :     {
     490             :         // No text frame provided. Thus, nothing to do.
     491           0 :         return;
     492             :     }
     493             : 
     494           0 :     ViewShell* pVSh = GetShell();
     495           0 :     ViewShell* pTmp = pVSh;
     496           0 :     do
     497             :     {
     498           0 :         if ( pTmp->Imp()->IsAccessible() )
     499             :         {
     500           0 :             if ( _pFromTxtFrm )
     501             :             {
     502           0 :                 pTmp->Imp()->GetAccessibleMap().
     503           0 :                             InvalidateParaFlowRelation( *_pFromTxtFrm, true );
     504             :             }
     505           0 :             if ( _pToTxtFrm )
     506             :             {
     507           0 :                 pTmp->Imp()->GetAccessibleMap().
     508           0 :                             InvalidateParaFlowRelation( *_pToTxtFrm, false );
     509             :             }
     510             :         }
     511           0 :         pTmp = (ViewShell *)pTmp->GetNext();
     512             :     } while ( pTmp != pVSh );
     513             : }
     514             : 
     515             : /** invalidate text selection for paragraphs
     516             : 
     517             :     OD 2005-12-12 #i27301#
     518             : 
     519             :     @author OD
     520             : */
     521           0 : void SwViewImp::_InvalidateAccessibleParaTextSelection()
     522             : {
     523           0 :     ViewShell* pVSh = GetShell();
     524           0 :     ViewShell* pTmp = pVSh;
     525           0 :     do
     526             :     {
     527           0 :         if ( pTmp->Imp()->IsAccessible() )
     528             :         {
     529           0 :             pTmp->Imp()->GetAccessibleMap().InvalidateTextSelectionOfAllParas();
     530             :         }
     531             : 
     532           0 :         pTmp = (ViewShell *)pTmp->GetNext();
     533             :     } while ( pTmp != pVSh );
     534           0 : }
     535             : 
     536             : /** invalidate attributes for paragraphs
     537             : 
     538             :     OD 2009-01-06 #i88069#
     539             : 
     540             :     @author OD
     541             : */
     542           0 : void SwViewImp::_InvalidateAccessibleParaAttrs( const SwTxtFrm& rTxtFrm )
     543             : {
     544           0 :     ViewShell* pVSh = GetShell();
     545           0 :     ViewShell* pTmp = pVSh;
     546           0 :     do
     547             :     {
     548           0 :         if ( pTmp->Imp()->IsAccessible() )
     549             :         {
     550           0 :             pTmp->Imp()->GetAccessibleMap().InvalidateAttr( rTxtFrm );
     551             :         }
     552             : 
     553           0 :         pTmp = (ViewShell *)pTmp->GetNext();
     554             :     } while ( pTmp != pVSh );
     555           0 : }
     556             : 
     557             : // OD 15.01.2003 #103492# - method signature change due to new page preview functionality
     558           0 : void SwViewImp::UpdateAccessiblePreview( const std::vector<PrevwPage*>& _rPrevwPages,
     559             :                                          const Fraction&  _rScale,
     560             :                                          const SwPageFrm* _pSelectedPageFrm,
     561             :                                          const Size&      _rPrevwWinSize )
     562             : {
     563           0 :     if( IsAccessible() )
     564           0 :         GetAccessibleMap().UpdatePreview( _rPrevwPages, _rScale,
     565           0 :                                           _pSelectedPageFrm, _rPrevwWinSize );
     566           0 : }
     567             : 
     568           0 : void SwViewImp::InvalidateAccessiblePreViewSelection( sal_uInt16 nSelPage )
     569             : {
     570           0 :     if( IsAccessible() )
     571           0 :         GetAccessibleMap().InvalidatePreViewSelection( nSelPage );
     572           0 : }
     573             : 
     574           0 : SwAccessibleMap *SwViewImp::CreateAccessibleMap()
     575             : {
     576             :     OSL_ENSURE( !pAccMap, "accessible map exists" );
     577           0 :     pAccMap = new SwAccessibleMap( GetShell() );
     578           0 :     return pAccMap;
     579             : }
     580             : 
     581           0 : void SwViewImp::FireAccessibleEvents()
     582             : {
     583           0 :     if( IsAccessible() )
     584           0 :         GetAccessibleMap().FireEvents();
     585           0 : }
     586             : 
     587             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10