LCOV - code coverage report
Current view: top level - svx/source/sdr/contact - objectcontactofpageview.cxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 139 173 80.3 %
Date: 2014-04-11 Functions: 23 29 79.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 <svx/sdr/contact/objectcontactofpageview.hxx>
      21             : #include <svx/sdr/contact/viewobjectcontactofunocontrol.hxx>
      22             : #include <svx/svdpagv.hxx>
      23             : #include <svx/svdpage.hxx>
      24             : #include <svx/sdr/contact/displayinfo.hxx>
      25             : #include <svx/sdr/contact/viewobjectcontact.hxx>
      26             : #include <svx/svdview.hxx>
      27             : #include <svx/sdr/contact/viewcontact.hxx>
      28             : #include <svx/sdr/animation/objectanimator.hxx>
      29             : #include <svx/sdrpagewindow.hxx>
      30             : #include <svx/sdrpaintwindow.hxx>
      31             : #include <basegfx/matrix/b2dhommatrix.hxx>
      32             : #include <drawinglayer/primitive2d/transformprimitive2d.hxx>
      33             : #include <com/sun/star/rendering/XSpriteCanvas.hpp>
      34             : #include <drawinglayer/processor2d/processor2dtools.hxx>
      35             : #include <svx/unoapi.hxx>
      36             : 
      37             : #include "eventhandler.hxx"
      38             : 
      39             : using namespace com::sun::star;
      40             : 
      41             : namespace sdr
      42             : {
      43             :     namespace contact
      44             :     {
      45             :         // internal access to SdrPage of SdrPageView
      46      123427 :         SdrPage* ObjectContactOfPageView::GetSdrPage() const
      47             :         {
      48      123427 :             return GetPageWindow().GetPageView().GetPage();
      49             :         }
      50             : 
      51        1647 :         ObjectContactOfPageView::ObjectContactOfPageView(SdrPageWindow& rPageWindow)
      52             :         :   ObjectContact(),
      53        1647 :             mrPageWindow(rPageWindow)
      54             :         {
      55             :             // init PreviewRenderer flag
      56        1647 :             setPreviewRenderer(((SdrPaintView&)rPageWindow.GetPageView().GetView()).IsPreviewRenderer());
      57             : 
      58             :             // init timer
      59        1647 :             SetTimeout(1);
      60        1647 :             Stop();
      61        1647 :         }
      62             : 
      63        4935 :         ObjectContactOfPageView::~ObjectContactOfPageView()
      64             :         {
      65             :             // execute missing LazyInvalidates and stop timer
      66        1645 :             Timeout();
      67        3290 :         }
      68             : 
      69             :         // LazyInvalidate request. Take action.
      70        6627 :         void ObjectContactOfPageView::setLazyInvalidate(ViewObjectContact& /*rVOC*/)
      71             :         {
      72             :             // do NOT call parent, but remember that something is to do by
      73             :             // starting the LazyInvalidateTimer
      74        6627 :             Start();
      75        6627 :         }
      76             : 
      77             :         // call this to support evtl. preparations for repaint
      78       15636 :         void ObjectContactOfPageView::PrepareProcessDisplay()
      79             :         {
      80       15636 :             if(IsActive())
      81             :             {
      82             :                 static bool bInvalidateDuringPaint(true);
      83             : 
      84        1803 :                 if(bInvalidateDuringPaint)
      85             :                 {
      86             :                     // there are still non-triggered LazyInvalidate events, trigger these
      87        1803 :                     Timeout();
      88             :                 }
      89             :             }
      90       15636 :         }
      91             : 
      92             :         // From baseclass Timer, the timeout call triggered by te LazyInvalidate mechanism
      93        6315 :         void ObjectContactOfPageView::Timeout()
      94             :         {
      95             :             // stop the timer
      96        6315 :             Stop();
      97             : 
      98             :             // invalidate all LazyInvalidate VOCs new situations
      99        6315 :             const sal_uInt32 nVOCCount(getViewObjectContactCount());
     100             : 
     101      108791 :             for(sal_uInt32 a(0); a < nVOCCount; a++)
     102             :             {
     103      102476 :                 ViewObjectContact* pCandidate = getViewObjectContact(a);
     104      102476 :                 pCandidate->triggerLazyInvalidate();
     105             :             }
     106        6315 :         }
     107             : 
     108             :         // Process the whole displaying
     109       27918 :         void ObjectContactOfPageView::ProcessDisplay(DisplayInfo& rDisplayInfo)
     110             :         {
     111       27918 :             const SdrPage* pStartPage = GetSdrPage();
     112             : 
     113       27918 :             if(pStartPage && !rDisplayInfo.GetProcessLayers().IsEmpty())
     114             :             {
     115       27918 :                 const ViewContact& rDrawPageVC = pStartPage->GetViewContact();
     116             : 
     117       27918 :                 if(rDrawPageVC.GetObjectCount())
     118             :                 {
     119       27918 :                     DoProcessDisplay(rDisplayInfo);
     120             :                 }
     121             :             }
     122             : 
     123             :             // after paint take care of the evtl. scheduled asynchronious commands.
     124             :             // Do this by resetting the timer contained there. Thus, after the paint
     125             :             // that timer will be triggered and the events will be executed.
     126       27918 :             if(HasEventHandler())
     127             :             {
     128           0 :                 sdr::event::TimerEventHandler& rEventHandler = GetEventHandler();
     129             : 
     130           0 :                 if(!rEventHandler.IsEmpty())
     131             :                 {
     132           0 :                     rEventHandler.Restart();
     133             :                 }
     134             :             }
     135       27918 :         }
     136             : 
     137             :         // Process the whole displaying. Only use given DsiplayInfo, do not access other
     138             :         // OutputDevices then the given ones.
     139       27918 :         void ObjectContactOfPageView::DoProcessDisplay(DisplayInfo& rDisplayInfo)
     140             :         {
     141             :             // visualize entered group when that feature is switched on and it's not
     142             :             // a print output. #i29129# No ghosted display for printing.
     143       27918 :             bool bVisualizeEnteredGroup(DoVisualizeEnteredGroup() && !isOutputToPrinter());
     144             : 
     145             :             // Visualize entered groups: Set to ghosted as default
     146             :             // start. Do this only for the DrawPage, not for MasterPages
     147       27918 :             if(bVisualizeEnteredGroup)
     148             :             {
     149       27918 :                 rDisplayInfo.SetGhostedDrawMode();
     150             :             }
     151             : 
     152             :             // #114359# save old and set clip region
     153       27918 :             OutputDevice* pOutDev = TryToGetOutputDevice();
     154             :             OSL_ENSURE(0 != pOutDev, "ObjectContactOfPageView without OutDev, someone has overloaded TryToGetOutputDevice wrong (!)");
     155       27918 :             bool bClipRegionPushed(false);
     156       27918 :             const Region& rRedrawArea(rDisplayInfo.GetRedrawArea());
     157             : 
     158       27918 :             if(!rRedrawArea.IsEmpty())
     159             :             {
     160       27918 :                 bClipRegionPushed = true;
     161       27918 :                 pOutDev->Push(PUSH_CLIPREGION);
     162       27918 :                 pOutDev->IntersectClipRegion(rRedrawArea);
     163             :             }
     164             : 
     165             :             // Get start node and process DrawPage contents
     166       27918 :             const ViewObjectContact& rDrawPageVOContact = GetSdrPage()->GetViewContact().GetViewObjectContact(*this);
     167             : 
     168             :             // update current ViewInformation2D at the ObjectContact
     169       27918 :             const double fCurrentTime(getPrimitiveAnimator().GetTime());
     170       27918 :             OutputDevice& rTargetOutDev = GetPageWindow().GetPaintWindow().GetTargetOutputDevice();
     171       27918 :             basegfx::B2DRange aViewRange;
     172             : 
     173             :             // create ViewRange
     174       27918 :             if(isOutputToRecordingMetaFile())
     175             :             {
     176         524 :                 if(isOutputToPDFFile() || isOutputToPrinter())
     177             :                 {
     178             :                     // #i98402# if it's a PDF export, set the ClipRegion as ViewRange. This is
     179             :                     // mainly because SW does not use DrawingLayer Page-Oriented and if not doing this,
     180             :                     // all existing objects will be collected as primitives and processed.
     181             :                     // OD 2009-03-05 #i99876# perform the same also for SW on printing.
     182           0 :                     const Rectangle aLogicClipRectangle(rDisplayInfo.GetRedrawArea().GetBoundRect());
     183             : 
     184             :                     aViewRange = basegfx::B2DRange(
     185           0 :                         aLogicClipRectangle.Left(), aLogicClipRectangle.Top(),
     186           0 :                         aLogicClipRectangle.Right(), aLogicClipRectangle.Bottom());
     187             :                 }
     188             :             }
     189             :             else
     190             :             {
     191             :                 // use visible pixels, but transform to world coordinates
     192       27394 :                 const Size aOutputSizePixel(rTargetOutDev.GetOutputSizePixel());
     193       27394 :                 aViewRange = basegfx::B2DRange(0.0, 0.0, aOutputSizePixel.getWidth(), aOutputSizePixel.getHeight());
     194             : 
     195             :                 // if a clip region is set, use it
     196       27394 :                 if(!rDisplayInfo.GetRedrawArea().IsEmpty())
     197             :                 {
     198             :                     // get logic clip range and create discrete one
     199       27394 :                     const Rectangle aLogicClipRectangle(rDisplayInfo.GetRedrawArea().GetBoundRect());
     200             :                     basegfx::B2DRange aLogicClipRange(
     201       54788 :                         aLogicClipRectangle.Left(), aLogicClipRectangle.Top(),
     202       82182 :                         aLogicClipRectangle.Right(), aLogicClipRectangle.Bottom());
     203       27394 :                     basegfx::B2DRange aDiscreteClipRange(aLogicClipRange);
     204       27394 :                     aDiscreteClipRange.transform(rTargetOutDev.GetViewTransformation());
     205             : 
     206             :                     // align the discrete one to discrete boundaries (pixel bounds). Also
     207             :                     // expand X and Y max by one due to Rectangle definition source
     208             :                     aDiscreteClipRange.expand(basegfx::B2DTuple(
     209             :                         floor(aDiscreteClipRange.getMinX()),
     210       27394 :                         floor(aDiscreteClipRange.getMinY())));
     211             :                     aDiscreteClipRange.expand(basegfx::B2DTuple(
     212       27394 :                         1.0 + ceil(aDiscreteClipRange.getMaxX()),
     213       54788 :                         1.0 + ceil(aDiscreteClipRange.getMaxY())));
     214             : 
     215             :                     // intersect current ViewRange with ClipRange
     216       27394 :                     aViewRange.intersect(aDiscreteClipRange);
     217             :                 }
     218             : 
     219             :                 // transform to world coordinates
     220       27394 :                 aViewRange.transform(rTargetOutDev.GetInverseViewTransformation());
     221             :             }
     222             : 
     223             :             // update local ViewInformation2D
     224             :             const drawinglayer::geometry::ViewInformation2D aNewViewInformation2D(
     225             :                 basegfx::B2DHomMatrix(),
     226             :                 rTargetOutDev.GetViewTransformation(),
     227             :                 aViewRange,
     228             :                 GetXDrawPageForSdrPage(GetSdrPage()),
     229             :                 fCurrentTime,
     230       27918 :                 uno::Sequence<beans::PropertyValue>());
     231       27918 :             updateViewInformation2D(aNewViewInformation2D);
     232             : 
     233       55836 :             drawinglayer::primitive2d::Primitive2DSequence xPrimitiveSequence;
     234             :             // Only get the expensive hierarchy if we can be sure that the
     235             :             // returned sequence won't be empty anyway.
     236       27918 :             bool bGetHierarchy = rRedrawArea.IsEmpty();
     237       27918 :             if (!bGetHierarchy)
     238             :             {
     239             :                 // Not empty? Then not doing a full redraw, check if
     240             :                 // getPrimitive2DSequenceHierarchy() is still needed.
     241       27918 :                 sal_Int32 nObjCount = GetSdrPage()->GetObjCount();
     242       29661 :                 for (sal_Int32 i = 0; i < nObjCount; ++i)
     243             :                 {
     244       11755 :                     SdrObject* pObject = GetSdrPage()->GetObj(i);
     245       11755 :                     if (rRedrawArea.IsOver(pObject->GetCurrentBoundRect()))
     246             :                     {
     247       10012 :                         bGetHierarchy = true;
     248       10012 :                         break;
     249             :                     }
     250             :                 }
     251             :             }
     252             : 
     253       27918 :             if (bGetHierarchy)
     254             :                 // get whole Primitive2DSequence; this will already make use of updated ViewInformation2D
     255             :                 // and may use the MapMode from the Target OutDev in the DisplayInfo
     256       10012 :                 xPrimitiveSequence = rDrawPageVOContact.getPrimitive2DSequenceHierarchy(rDisplayInfo);
     257             : 
     258             :             // if there is something to show, use a primitive processor to render it. There
     259             :             // is a choice between VCL and Canvas processors currently. The decision is made in
     260             :             // createProcessor2DFromOutputDevice and takes into accout things like the
     261             :             // Target is a MetaFile, a VDev or something else. The Canvas renderer is triggered
     262             :             // currently using the shown boolean. Canvas is not yet the default.
     263       27918 :             if(xPrimitiveSequence.hasElements())
     264             :             {
     265             :                 // prepare OutputDevice (historical stuff, maybe soon removed)
     266        3530 :                 rDisplayInfo.ClearGhostedDrawMode(); // reset, else the VCL-paint with the processor will not do the right thing
     267        3530 :                 pOutDev->SetLayoutMode(0); // reset, default is no BiDi/RTL
     268             : 
     269             :                 // create renderer
     270             :                 drawinglayer::processor2d::BaseProcessor2D* pProcessor2D =
     271             :                     drawinglayer::processor2d::createProcessor2DFromOutputDevice(
     272        3530 :                         rTargetOutDev, getViewInformation2D());
     273             : 
     274        3530 :                 if(pProcessor2D)
     275             :                 {
     276        3530 :                     pProcessor2D->process(xPrimitiveSequence);
     277        3530 :                     delete pProcessor2D;
     278             :                 }
     279             :             }
     280             : 
     281             :             // #114359# restore old ClipReghion
     282       27918 :             if(bClipRegionPushed)
     283             :             {
     284       27918 :                 pOutDev->Pop();
     285             :             }
     286             : 
     287             :             // Visualize entered groups: Reset to original DrawMode
     288       27918 :             if(bVisualizeEnteredGroup)
     289             :             {
     290       27918 :                 rDisplayInfo.ClearGhostedDrawMode();
     291       27918 :             }
     292       27918 :         }
     293             : 
     294             :         // test if visualizing of entered groups is switched on at all
     295       65192 :         bool ObjectContactOfPageView::DoVisualizeEnteredGroup() const
     296             :         {
     297       65192 :             SdrView& rView = GetPageWindow().GetPageView().GetView();
     298       65192 :             return rView.DoVisualizeEnteredGroup();
     299             :         }
     300             : 
     301             :         // get active group's (the entered group) ViewContact
     302       19096 :         const ViewContact* ObjectContactOfPageView::getActiveViewContact() const
     303             :         {
     304       19096 :             SdrObjList* pActiveGroupList = GetPageWindow().GetPageView().GetObjList();
     305             : 
     306       19096 :             if(pActiveGroupList)
     307             :             {
     308       19096 :                 if(pActiveGroupList->ISA(SdrPage))
     309             :                 {
     310             :                     // It's a Page itself
     311       19096 :                     return &(((SdrPage*)pActiveGroupList)->GetViewContact());
     312             :                 }
     313           0 :                 else if(pActiveGroupList->GetOwnerObj())
     314             :                 {
     315             :                     // Group object
     316           0 :                     return &(pActiveGroupList->GetOwnerObj()->GetViewContact());
     317             :                 }
     318             :             }
     319           0 :             else if(GetSdrPage())
     320             :             {
     321             :                 // use page of associated SdrPageView
     322           0 :                 return &(GetSdrPage()->GetViewContact());
     323             :             }
     324             : 
     325           0 :             return 0;
     326             :         }
     327             : 
     328             :         // Invalidate given rectangle at the window/output which is represented by
     329             :         // this ObjectContact.
     330       12489 :         void ObjectContactOfPageView::InvalidatePartOfView(const basegfx::B2DRange& rRange) const
     331             :         {
     332             :             // invalidate at associated PageWindow
     333       12489 :             GetPageWindow().InvalidatePageWindow(rRange);
     334       12489 :         }
     335             : 
     336             :         // Get info if given Rectangle is visible in this view
     337           0 :         bool ObjectContactOfPageView::IsAreaVisible(const basegfx::B2DRange& rRange) const
     338             :         {
     339             :             // compare with the visible rectangle
     340           0 :             if(rRange.isEmpty())
     341             :             {
     342             :                 // no range -> not visible
     343           0 :                 return false;
     344             :             }
     345             :             else
     346             :             {
     347           0 :                 const OutputDevice& rTargetOutDev = GetPageWindow().GetPaintWindow().GetTargetOutputDevice();
     348           0 :                 const Size aOutputSizePixel(rTargetOutDev.GetOutputSizePixel());
     349           0 :                 basegfx::B2DRange aLogicViewRange(0.0, 0.0, aOutputSizePixel.getWidth(), aOutputSizePixel.getHeight());
     350             : 
     351           0 :                 aLogicViewRange.transform(rTargetOutDev.GetInverseViewTransformation());
     352             : 
     353           0 :                 if(!aLogicViewRange.isEmpty() && !aLogicViewRange.overlaps(rRange))
     354             :                 {
     355           0 :                     return false;
     356             :                 }
     357             :             }
     358             : 
     359             :             // call parent
     360           0 :             return ObjectContact::IsAreaVisible(rRange);
     361             :         }
     362             : 
     363             :         // Get info about the need to visualize GluePoints
     364       20219 :         bool ObjectContactOfPageView::AreGluePointsVisible() const
     365             :         {
     366       20219 :             return GetPageWindow().GetPageView().GetView().ImpIsGlueVisible();
     367             :         }
     368             : 
     369             :         // check if text animation is allowed.
     370       21192 :         bool ObjectContactOfPageView::IsTextAnimationAllowed() const
     371             :         {
     372       21192 :             SdrView& rView = GetPageWindow().GetPageView().GetView();
     373       21192 :             const SvtAccessibilityOptions& rOpt = rView.getAccessibilityOptions();
     374       21192 :             return rOpt.GetIsAllowAnimatedText();
     375             :         }
     376             : 
     377             :         // check if graphic animation is allowed.
     378       21192 :         bool ObjectContactOfPageView::IsGraphicAnimationAllowed() const
     379             :         {
     380       21192 :             SdrView& rView = GetPageWindow().GetPageView().GetView();
     381       21192 :             const SvtAccessibilityOptions& rOpt = rView.getAccessibilityOptions();
     382       21192 :             return rOpt.GetIsAllowAnimatedGraphics();
     383             :         }
     384             : 
     385             :         // check if asynchronious graphis loading is allowed. Default is sal_False.
     386           0 :         bool ObjectContactOfPageView::IsAsynchronGraphicsLoadingAllowed() const
     387             :         {
     388           0 :             SdrView& rView = GetPageWindow().GetPageView().GetView();
     389           0 :             return rView.IsSwapAsynchron();
     390             :         }
     391             : 
     392             :         // check if buffering of MasterPages is allowed. Default is sal_False.
     393           0 :         bool ObjectContactOfPageView::IsMasterPageBufferingAllowed() const
     394             :         {
     395           0 :             SdrView& rView = GetPageWindow().GetPageView().GetView();
     396           0 :             return rView.IsMasterPagePaintCaching();
     397             :         }
     398             : 
     399             :         // print?
     400      126803 :         bool ObjectContactOfPageView::isOutputToPrinter() const
     401             :         {
     402      126803 :             return (OUTDEV_PRINTER == mrPageWindow.GetPaintWindow().GetOutputDevice().GetOutDevType());
     403             :         }
     404             : 
     405             :         // window?
     406           0 :         bool ObjectContactOfPageView::isOutputToWindow() const
     407             :         {
     408           0 :             return (OUTDEV_WINDOW == mrPageWindow.GetPaintWindow().GetOutputDevice().GetOutDevType());
     409             :         }
     410             : 
     411             :         // VirtualDevice?
     412           0 :         bool ObjectContactOfPageView::isOutputToVirtualDevice() const
     413             :         {
     414           0 :             return (OUTDEV_VIRDEV == mrPageWindow.GetPaintWindow().GetOutputDevice().GetOutDevType());
     415             :         }
     416             : 
     417             :         // recording MetaFile?
     418       27918 :         bool ObjectContactOfPageView::isOutputToRecordingMetaFile() const
     419             :         {
     420       27918 :             GDIMetaFile* pMetaFile = mrPageWindow.GetPaintWindow().GetOutputDevice().GetConnectMetaFile();
     421       27918 :             return (pMetaFile && pMetaFile->IsRecord() && !pMetaFile->IsPause());
     422             :         }
     423             : 
     424             :         // pdf export?
     425        1894 :         bool ObjectContactOfPageView::isOutputToPDFFile() const
     426             :         {
     427        1894 :             return (0 != mrPageWindow.GetPaintWindow().GetOutputDevice().GetPDFWriter());
     428             :         }
     429             : 
     430             :         // gray display mode
     431         492 :         bool ObjectContactOfPageView::isDrawModeGray() const
     432             :         {
     433         492 :             const sal_uInt32 nDrawMode(mrPageWindow.GetPaintWindow().GetOutputDevice().GetDrawMode());
     434         492 :             return (nDrawMode == (DRAWMODE_GRAYLINE|DRAWMODE_GRAYFILL|DRAWMODE_BLACKTEXT|DRAWMODE_GRAYBITMAP|DRAWMODE_GRAYGRADIENT));
     435             :         }
     436             : 
     437             :         // gray display mode
     438           0 :         bool ObjectContactOfPageView::isDrawModeBlackWhite() const
     439             :         {
     440           0 :             const sal_uInt32 nDrawMode(mrPageWindow.GetPaintWindow().GetOutputDevice().GetDrawMode());
     441           0 :             return (nDrawMode == (DRAWMODE_BLACKLINE|DRAWMODE_BLACKTEXT|DRAWMODE_WHITEFILL|DRAWMODE_GRAYBITMAP|DRAWMODE_WHITEGRADIENT));
     442             :         }
     443             : 
     444             :         // high contrast display mode
     445         902 :         bool ObjectContactOfPageView::isDrawModeHighContrast() const
     446             :         {
     447         902 :             const sal_uInt32 nDrawMode(mrPageWindow.GetPaintWindow().GetOutputDevice().GetDrawMode());
     448         902 :             return (nDrawMode == (DRAWMODE_SETTINGSLINE|DRAWMODE_SETTINGSFILL|DRAWMODE_SETTINGSTEXT|DRAWMODE_SETTINGSGRADIENT));
     449             :         }
     450             : 
     451             :         // access to SdrPageView
     452       50239 :         SdrPageView* ObjectContactOfPageView::TryToGetSdrPageView() const
     453             :         {
     454       50239 :             return &(mrPageWindow.GetPageView());
     455             :         }
     456             : 
     457             : 
     458             :         // access to OutputDevice
     459       28203 :         OutputDevice* ObjectContactOfPageView::TryToGetOutputDevice() const
     460             :         {
     461       28203 :             SdrPreRenderDevice* pPreRenderDevice = mrPageWindow.GetPaintWindow().GetPreRenderDevice();
     462             : 
     463       28203 :             if(pPreRenderDevice)
     464             :             {
     465        1138 :                 return &(pPreRenderDevice->GetPreRenderDevice());
     466             :             }
     467             :             else
     468             :             {
     469       27065 :                 return &(mrPageWindow.GetPaintWindow().GetOutputDevice());
     470             :             }
     471             :         }
     472             : 
     473             :         // set all UNO controls displayed in the view to design/alive mode
     474          14 :         void ObjectContactOfPageView::SetUNOControlsDesignMode( bool _bDesignMode ) const
     475             :         {
     476          14 :             const sal_uInt32 nCount(getViewObjectContactCount());
     477             : 
     478          41 :             for(sal_uInt32 a(0); a < nCount; a++)
     479             :             {
     480          27 :                 const ViewObjectContact* pVOC = getViewObjectContact(a);
     481          27 :                 const ViewObjectContactOfUnoControl* pUnoObjectVOC = dynamic_cast< const ViewObjectContactOfUnoControl* >(pVOC);
     482             : 
     483          27 :                 if(pUnoObjectVOC)
     484             :                 {
     485           3 :                     pUnoObjectVOC->setControlDesignMode(_bDesignMode);
     486             :                 }
     487             :             }
     488          14 :         }
     489             :     } // end of namespace contact
     490             : } // end of namespace sdr
     491             : 
     492             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10