LCOV - code coverage report
Current view: top level - sd/source/ui/view - frmview.cxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 476 527 90.3 %
Date: 2014-04-11 Functions: 22 24 91.7 %
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             : 
      21             : #include "FrameView.hxx"
      22             : 
      23             : #include <svx/svxids.hrc>
      24             : #include <com/sun/star/awt/Rectangle.hpp>
      25             : #include <com/sun/star/drawing/framework/ResourceId.hpp>
      26             : #include <rtl/ustrbuf.hxx>
      27             : #include "unokywds.hxx"
      28             : #include <vcl/settings.hxx>
      29             : 
      30             : #include <vector>
      31             : #include "ViewShell.hxx"
      32             : #include "drawdoc.hxx"
      33             : #include "DrawDocShell.hxx"
      34             : #include "optsitem.hxx"
      35             : #include "ViewShellBase.hxx"
      36             : #include "DrawViewShell.hxx"
      37             : #include "OutlineViewShell.hxx"
      38             : #include "sdmod.hxx"
      39             : #include "sdresid.hxx"
      40             : #include "pres.hxx"
      41             : #include "glob.hrc"
      42             : #include "sdiocmpt.hxx"
      43             : #include "framework/FrameworkHelper.hxx"
      44             : #include <comphelper/processfactory.hxx>
      45             : #include <sfx2/viewfrm.hxx>
      46             : 
      47             : using namespace ::com::sun::star;
      48             : using namespace ::com::sun::star::uno;
      49             : using namespace ::com::sun::star::beans;
      50             : using namespace ::std;
      51             : 
      52             : namespace sd {
      53             : 
      54             : 
      55         155 : FrameView::FrameView(SdDrawDocument* pDrawDoc, FrameView* pFrameView /* = NULK */)
      56             :   : SdrView(pDrawDoc, (OutputDevice*) NULL),
      57             :     mnRefCount(0),
      58             :     mnPresViewShellId(SID_VIEWSHELL0),
      59             :     mnSlotId(SID_OBJECT_SELECT),
      60         155 :     mbIsNavigatorShowingAllShapes(false)
      61             : {
      62         155 :     EndListening(*pDrawDoc);
      63             : 
      64         155 :     EnableExtendedKeyInputDispatcher(false);
      65         155 :     EnableExtendedMouseEventDispatcher(false);
      66         155 :     EnableExtendedCommandEventDispatcher(false);
      67             : 
      68         155 :     SetGridFront( false );
      69         155 :     SetHlplFront( false );
      70         155 :     SetOConSnap( false );
      71         155 :     SetFrameDragSingles( true );
      72         155 :     SetSlidesPerRow(4);
      73             : 
      74         155 :     if( NULL == pFrameView )
      75             :     {
      76         155 :         DrawDocShell* pDocShell = pDrawDoc->GetDocSh();
      77             : 
      78         155 :         if ( pDocShell )
      79             :         {
      80             :             // document is loaded, is there a FrameView?
      81         155 :             sal_uLong nSdViewShellCount = 0;
      82         155 :             ViewShellBase* pBase = NULL;
      83         155 :             SfxViewShell* pSfxViewSh = NULL;
      84         155 :             SfxViewFrame* pSfxViewFrame = SfxViewFrame::GetFirst(pDocShell);
      85             : 
      86         373 :             while (pSfxViewFrame)
      87             :             {
      88             :                 // Count the FrameViews and remember the type of the main
      89             :                 // view shell.
      90          63 :                 pSfxViewSh = pSfxViewFrame->GetViewShell();
      91          63 :                 pBase = PTR_CAST(ViewShellBase, pSfxViewSh );
      92             : 
      93          63 :                 if (pBase != NULL)
      94             :                 {
      95          63 :                     nSdViewShellCount++;
      96             : 
      97          63 :                     OUString sViewURL;
      98             :                     Reference<drawing::framework::XView> xView (
      99             :                         framework::FrameworkHelper::Instance(*pBase)->GetView(
     100             :                             drawing::framework::ResourceId::create(
     101             :                                 ::comphelper::getProcessComponentContext(),
     102         126 :                                 framework::FrameworkHelper::msCenterPaneURL)));
     103          63 :                     if (xView.is())
     104          63 :                         sViewURL = xView->getResourceId()->getResourceURL();
     105             : 
     106          63 :                     switch (framework::FrameworkHelper::GetViewId(sViewURL))
     107             :                     {
     108             :                         default:
     109             : //                        case ViewShell::ST_IMPRESS:
     110             : //                        case ViewShell::ST_NOTES:
     111             : //                        case ViewShell::ST_HANDOUT:
     112          63 :                             mnPresViewShellId = SID_VIEWSHELL0;
     113          63 :                             break;
     114             : 
     115             :                         case ViewShell::ST_SLIDE_SORTER:
     116           0 :                             mnPresViewShellId = SID_VIEWSHELL1;
     117           0 :                             break;
     118             : 
     119             :                         case ViewShell::ST_OUTLINE:
     120           0 :                             mnPresViewShellId = SID_VIEWSHELL2;
     121           0 :                             break;
     122          63 :                     }
     123             :                 }
     124             : 
     125          63 :                 pSfxViewFrame = SfxViewFrame::GetNext(*pSfxViewFrame, pDocShell);
     126             :             }
     127             : 
     128         155 :             SdDrawDocument* pDoc = pDocShell->GetDoc();
     129         155 :             pFrameView = pDoc->GetFrameView(nSdViewShellCount);
     130             :         }
     131             :     }
     132             : 
     133         155 :     if (pFrameView)
     134             :     {
     135             :         // initialize FrameView with the FrameView of the DocShell
     136           1 :         SetRuler( pFrameView->HasRuler() );
     137           1 :         SetGridCoarse( pFrameView->GetGridCoarse() );
     138           1 :         SetGridFine( pFrameView->GetGridFine() );
     139           1 :         SetSnapGridWidth(pFrameView->GetSnapGridWidthX(), pFrameView->GetSnapGridWidthY());
     140           1 :         SetGridVisible( pFrameView->IsGridVisible() );
     141           1 :         SetGridFront( pFrameView->IsGridFront() );
     142           1 :         SetSnapAngle( pFrameView->GetSnapAngle() );
     143           1 :         SetGridSnap( pFrameView->IsGridSnap() );
     144           1 :         SetBordSnap( pFrameView->IsBordSnap() );
     145           1 :         SetHlplSnap( pFrameView->IsHlplSnap() );
     146           1 :         SetOFrmSnap( pFrameView->IsOFrmSnap() );
     147           1 :         SetOPntSnap( pFrameView->IsOPntSnap() );
     148           1 :         SetOConSnap( pFrameView->IsOConSnap() );
     149           1 :         SetHlplVisible( pFrameView->IsHlplVisible() );
     150           1 :         SetDragStripes( pFrameView->IsDragStripes() );
     151           1 :         SetPlusHandlesAlwaysVisible( pFrameView->IsPlusHandlesAlwaysVisible() );
     152           1 :         SetFrameDragSingles( pFrameView->IsFrameDragSingles() );
     153           1 :         SetSnapMagneticPixel( pFrameView->GetSnapMagneticPixel() );
     154           1 :         SetMarkedHitMovesAlways( pFrameView->IsMarkedHitMovesAlways() );
     155           1 :         SetMoveOnlyDragging( pFrameView->IsMoveOnlyDragging() );
     156           1 :         SetCrookNoContortion( pFrameView->IsCrookNoContortion() );
     157           1 :         SetSlantButShear( pFrameView->IsSlantButShear() );
     158           1 :         SetNoDragXorPolys( pFrameView->IsNoDragXorPolys() );
     159           1 :         SetAngleSnapEnabled( pFrameView->IsAngleSnapEnabled() );
     160           1 :         SetBigOrtho( pFrameView->IsBigOrtho() );
     161           1 :         SetOrtho( pFrameView->IsOrtho() );
     162           1 :         SetEliminatePolyPointLimitAngle( pFrameView->GetEliminatePolyPointLimitAngle() );
     163           1 :         SetEliminatePolyPoints( pFrameView->IsEliminatePolyPoints() );
     164           1 :         SetDesignMode( pFrameView->IsDesignMode() );
     165             : 
     166           1 :         SetSolidDragging( pFrameView->IsSolidDragging() );
     167             : 
     168           1 :         maVisibleLayers = pFrameView->GetVisibleLayers();
     169           1 :         maPrintableLayers = pFrameView->GetPrintableLayers();
     170           1 :         maLockedLayers = pFrameView->GetLockedLayers();
     171           1 :         maStandardHelpLines = pFrameView->GetStandardHelpLines();
     172           1 :         maNotesHelpLines = pFrameView->GetNotesHelpLines();
     173           1 :         maHandoutHelpLines = pFrameView->GetHandoutHelpLines();
     174           1 :         SetActiveLayer( pFrameView->GetActiveLayer() );
     175           1 :         mbNoColors = pFrameView->IsNoColors();
     176           1 :         mbNoAttribs = pFrameView->IsNoAttribs() ;
     177           1 :         maVisArea = pFrameView->GetVisArea();
     178           1 :         mePageKind = pFrameView->GetPageKind();
     179           1 :         mePageKindOnLoad = pFrameView->GetPageKindOnLoad();
     180           1 :         mnSelectedPage = pFrameView->GetSelectedPage();
     181           1 :         mnSelectedPageOnLoad = pFrameView->GetSelectedPageOnLoad();
     182           1 :         meStandardEditMode = pFrameView->GetViewShEditMode(PK_STANDARD);
     183           1 :         meNotesEditMode = pFrameView->GetViewShEditMode(PK_NOTES);
     184           1 :         meHandoutEditMode = pFrameView->GetViewShEditMode(PK_HANDOUT);
     185           1 :         SetViewShEditModeOnLoad(pFrameView->GetViewShEditModeOnLoad());
     186           1 :         mbLayerMode = pFrameView->IsLayerMode();
     187           1 :         mbQuickEdit = pFrameView->IsQuickEdit();
     188             : 
     189             :         // #i26631#
     190           1 :         SetMasterPagePaintCaching( pFrameView->IsMasterPagePaintCaching() );
     191             : 
     192           1 :         SetDragWithCopy( pFrameView->IsDragWithCopy() );
     193           1 :         mbDoubleClickTextEdit = pFrameView->IsDoubleClickTextEdit();
     194           1 :         mbClickChangeRotation = pFrameView->IsClickChangeRotation();
     195           1 :         mnSlidesPerRow = pFrameView->GetSlidesPerRow();
     196           1 :         mnDrawMode = pFrameView->GetDrawMode();
     197           1 :         mnTabCtrlPercent = pFrameView->GetTabCtrlPercent();
     198           1 :         mbIsNavigatorShowingAllShapes = pFrameView->IsNavigatorShowingAllShapes();
     199           1 :         SetPreviousViewShellType (pFrameView->GetPreviousViewShellType());
     200           1 :         SetViewShellTypeOnLoad (pFrameView->GetViewShellTypeOnLoad());
     201             :     }
     202             :     else
     203             :     {
     204             :         // initialize FrameView with the application data
     205         154 :         maVisibleLayers.SetAll();
     206         154 :         maPrintableLayers.SetAll();
     207         154 :         SetGridCoarse( Size( 1000, 1000 ) );
     208         154 :         SetSnapGridWidth(Fraction(1000, 1), Fraction(1000, 1));
     209         154 :         SetActiveLayer( SD_RESSTR(STR_LAYER_LAYOUT) );
     210         154 :         mbNoColors = sal_True;
     211         154 :         mbNoAttribs = sal_False;
     212         154 :         maVisArea = Rectangle( Point(), Size(0, 0) );
     213         154 :         mePageKind = PK_STANDARD;
     214         154 :         mePageKindOnLoad = PK_STANDARD;
     215         154 :         mnSelectedPage = 0;
     216         154 :         mnSelectedPageOnLoad = 0;
     217         154 :         meStandardEditMode = EM_PAGE;
     218         154 :         meNotesEditMode = EM_PAGE;
     219         154 :         meHandoutEditMode = EM_MASTERPAGE;
     220         154 :         SetViewShEditModeOnLoad(EM_PAGE);
     221         154 :         mbLayerMode = sal_False;
     222         154 :         SetEliminatePolyPoints(false);
     223         154 :         mbDoubleClickTextEdit = sal_False;
     224         154 :         mbClickChangeRotation = sal_False;
     225         154 :         mnSlidesPerRow = 4;
     226             : 
     227             :         {
     228         154 :             bool bUseContrast = Application::GetSettings().GetStyleSettings().GetHighContrastMode();
     229         154 :             mnDrawMode = bUseContrast ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR;
     230             :         }
     231         154 :         mnTabCtrlPercent = 0.0;
     232         154 :         mbIsNavigatorShowingAllShapes = false;
     233         154 :         SetPreviousViewShellType (ViewShell::ST_NONE);
     234         154 :         SetViewShellTypeOnLoad (ViewShell::ST_IMPRESS);
     235             : 
     236             :         // get default for design mode
     237         154 :         sal_Bool bInitDesignMode = pDrawDoc->GetOpenInDesignMode();
     238         154 :         if( pDrawDoc->OpenInDesignModeIsDefaulted() )
     239             :         {
     240         154 :             bInitDesignMode = sal_True;
     241             :         }
     242             : 
     243         154 :         SfxObjectShell* pObjShell = pDrawDoc->GetObjectShell();
     244         154 :         if( pObjShell && pObjShell->IsReadOnly() )
     245           0 :             bInitDesignMode = sal_False;
     246         154 :         SetDesignMode( bInitDesignMode );
     247             : 
     248         154 :         Update( SD_MOD()->GetSdOptions(pDrawDoc->GetDocumentType()) );
     249             :     }
     250             : 
     251         155 : }
     252             : 
     253             : 
     254         298 : FrameView::~FrameView()
     255             : {
     256         298 : }
     257             : 
     258             : 
     259             : 
     260         205 : void FrameView::Connect()
     261             : {
     262         205 :     mnRefCount++;
     263         205 : }
     264             : 
     265             : 
     266             : 
     267         201 : void FrameView::Disconnect()
     268             : {
     269         201 :     if (mnRefCount > 0)
     270             :     {
     271         201 :         mnRefCount--;
     272             :     }
     273             : 
     274         201 :     if (mnRefCount == 0)
     275             :     {
     276         132 :         delete this;
     277             :     }
     278         201 : }
     279             : 
     280             : /**
     281             :  * Update with data from the specified SdOptions
     282             :  */
     283         154 : void FrameView::Update(SdOptions* pOptions)
     284             : {
     285         154 :     if (pOptions)
     286             :     {
     287         154 :         mbRuler = pOptions->IsRulerVisible();
     288         154 :         SetGridVisible( pOptions->IsGridVisible() );
     289         154 :         SetSnapAngle( pOptions->GetAngle() );
     290         154 :         SetGridSnap( pOptions->IsUseGridSnap() );
     291         154 :         SetBordSnap( pOptions->IsSnapBorder()  );
     292         154 :         SetHlplSnap( pOptions->IsSnapHelplines() );
     293         154 :         SetOFrmSnap( pOptions->IsSnapFrame() );
     294         154 :         SetOPntSnap( pOptions->IsSnapPoints() );
     295         154 :         SetHlplVisible( pOptions->IsHelplines() );
     296         154 :         SetDragStripes( pOptions->IsDragStripes() );
     297         154 :         SetPlusHandlesAlwaysVisible( pOptions->IsHandlesBezier() );
     298         154 :         SetSnapMagneticPixel( pOptions->GetSnapArea() );
     299         154 :         SetMarkedHitMovesAlways( pOptions->IsMarkedHitMovesAlways() );
     300         154 :         SetMoveOnlyDragging( pOptions->IsMoveOnlyDragging() );
     301         154 :         SetSlantButShear( pOptions->IsMoveOnlyDragging() );
     302         154 :         SetNoDragXorPolys ( !pOptions->IsMoveOutline() );
     303         154 :         SetCrookNoContortion( pOptions->IsCrookNoContortion() );
     304         154 :         SetAngleSnapEnabled( pOptions->IsRotate() );
     305         154 :         SetBigOrtho( pOptions->IsBigOrtho() );
     306         154 :         SetOrtho( pOptions->IsOrtho() );
     307         154 :         SetEliminatePolyPointLimitAngle( pOptions->GetEliminatePolyPointLimitAngle() );
     308         154 :         GetModel()->SetPickThroughTransparentTextFrames( pOptions->IsPickThrough() );
     309             : 
     310         154 :         SetSolidDragging( pOptions->IsSolidDragging() );
     311             : 
     312         154 :         SetGridCoarse( Size( pOptions->GetFldDrawX(), pOptions->GetFldDrawY() ) );
     313         154 :         SetGridFine( Size( pOptions->GetFldDivisionX(), pOptions->GetFldDivisionY() ) );
     314         154 :         Fraction aFractX(pOptions->GetFldDrawX(), pOptions->GetFldDrawX() / ( pOptions->GetFldDivisionX() ? pOptions->GetFldDivisionX() : 1 ));
     315         154 :         Fraction aFractY(pOptions->GetFldDrawY(), pOptions->GetFldDrawY() / ( pOptions->GetFldDivisionY() ? pOptions->GetFldDivisionY() : 1 ));
     316         154 :         SetSnapGridWidth(aFractX, aFractY);
     317         154 :         SetQuickEdit(pOptions->IsQuickEdit());
     318             : 
     319             :         // #i26631#
     320         154 :         SetMasterPagePaintCaching( pOptions->IsMasterPagePaintCaching() );
     321             : 
     322         154 :         SetDragWithCopy(pOptions->IsDragWithCopy());
     323         154 :         SetDoubleClickTextEdit( pOptions->IsDoubleClickTextEdit() );
     324         154 :         SetClickChangeRotation( pOptions->IsClickChangeRotation() );
     325             :     }
     326         154 : }
     327             : 
     328             : 
     329             : /**
     330             :  * Set EditMode (Page or MasterPage) of working mode
     331             :  */
     332         517 : void FrameView::SetViewShEditMode(EditMode eMode, PageKind eKind)
     333             : {
     334         517 :     if (eKind == PK_STANDARD)
     335             :     {
     336         497 :         meStandardEditMode = eMode;
     337             :     }
     338          20 :     else if (eKind == PK_NOTES)
     339             :     {
     340          10 :         meNotesEditMode = eMode;
     341             :     }
     342          10 :     else if (eKind == PK_HANDOUT)
     343             :     {
     344          10 :         meHandoutEditMode = eMode;
     345             :     }
     346         517 : }
     347             : 
     348             : 
     349             : /**
     350             :  * Return EditMode (Page or MasterPage) of working mode
     351             :  */
     352         572 : EditMode FrameView::GetViewShEditMode(PageKind eKind)
     353             : {
     354         572 :     EditMode eMode = EM_PAGE;
     355             : 
     356         572 :     if (eKind == PK_STANDARD)
     357             :     {
     358         422 :         eMode = meStandardEditMode;
     359             :     }
     360         150 :     else if (eKind == PK_NOTES)
     361             :     {
     362          75 :         eMode = meNotesEditMode;
     363             :     }
     364          75 :     else if (eKind == PK_HANDOUT)
     365             :     {
     366          75 :         eMode = meHandoutEditMode;
     367             :     }
     368             : 
     369         572 :     return (eMode);
     370             : }
     371             : 
     372             : 
     373             : 
     374             : 
     375         234 : void FrameView::SetViewShEditModeOnLoad (EditMode eMode)
     376             : {
     377         234 :     meEditModeOnLoad = eMode;
     378         234 : }
     379             : 
     380             : 
     381             : 
     382             : 
     383           1 : EditMode FrameView::GetViewShEditModeOnLoad (void) const
     384             : {
     385           1 :     return meEditModeOnLoad;
     386             : }
     387             : 
     388             : 
     389             : 
     390             : 
     391           0 : static OUString createHelpLinesString( const SdrHelpLineList& rHelpLines )
     392             : {
     393           0 :     OUStringBuffer aLines;
     394             : 
     395           0 :     const sal_uInt16 nCount = rHelpLines.GetCount();
     396           0 :     for( sal_uInt16 nHlpLine = 0; nHlpLine < nCount; nHlpLine++ )
     397             :     {
     398           0 :         const SdrHelpLine& rHelpLine = rHelpLines[nHlpLine];
     399           0 :         const Point& rPos = rHelpLine.GetPos();
     400             : 
     401           0 :         switch( rHelpLine.GetKind() )
     402             :         {
     403             :             case SDRHELPLINE_POINT:
     404           0 :                 aLines.append( 'P' );
     405           0 :                 aLines.append( (sal_Int32)rPos.X() );
     406           0 :                 aLines.append( ',' );
     407           0 :                 aLines.append( (sal_Int32)rPos.Y() );
     408           0 :                 break;
     409             :             case SDRHELPLINE_VERTICAL:
     410           0 :                 aLines.append( 'V' );
     411           0 :                 aLines.append( (sal_Int32)rPos.X() );
     412           0 :                 break;
     413             :             case SDRHELPLINE_HORIZONTAL:
     414           0 :                 aLines.append( 'H' );
     415           0 :                 aLines.append( (sal_Int32)rPos.Y() );
     416           0 :                 break;
     417             :             default:
     418             :                 OSL_FAIL( "Unsupported helpline Kind!" );
     419             :         }
     420             :     }
     421             : 
     422           0 :     return aLines.makeStringAndClear();
     423             : }
     424             : 
     425             : #define addValue( n, v ) push_back( std::pair< OUString, Any >( OUString( n ), v ) )
     426          74 : void FrameView::WriteUserDataSequence ( ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >& rValues, sal_Bool )
     427             : {
     428          74 :     std::vector< std::pair< OUString, Any > > aUserData;
     429             : 
     430          74 :     aUserData.addValue( sUNO_View_GridIsVisible, makeAny( (sal_Bool)IsGridVisible() ) );
     431          74 :     aUserData.addValue( sUNO_View_GridIsFront, makeAny( (sal_Bool)IsGridFront() ) );
     432          74 :     aUserData.addValue( sUNO_View_IsSnapToGrid, makeAny( (sal_Bool)IsGridSnap() ) );
     433          74 :     aUserData.addValue( sUNO_View_IsSnapToPageMargins, makeAny( (sal_Bool)IsBordSnap() ) );
     434          74 :     aUserData.addValue( sUNO_View_IsSnapToSnapLines, makeAny( (sal_Bool)IsHlplSnap() ) );
     435          74 :     aUserData.addValue( sUNO_View_IsSnapToObjectFrame, makeAny( (sal_Bool)IsOFrmSnap() ) );
     436          74 :     aUserData.addValue( sUNO_View_IsSnapToObjectPoints, makeAny( (sal_Bool)IsOPntSnap() ) );
     437             : 
     438          74 :     aUserData.addValue( sUNO_View_IsPlusHandlesAlwaysVisible, makeAny( (sal_Bool)IsPlusHandlesAlwaysVisible() ) );
     439          74 :     aUserData.addValue( sUNO_View_IsFrameDragSingles, makeAny( (sal_Bool)IsFrameDragSingles() ) );
     440             : 
     441          74 :     aUserData.addValue( sUNO_View_EliminatePolyPointLimitAngle, makeAny( (sal_Int32)GetEliminatePolyPointLimitAngle() ) );
     442          74 :     aUserData.addValue( sUNO_View_IsEliminatePolyPoints, makeAny( (sal_Bool)IsEliminatePolyPoints() ) );
     443             : 
     444         148 :     Any aAny;
     445          74 :     GetVisibleLayers().QueryValue( aAny );
     446          74 :     aUserData.addValue( sUNO_View_VisibleLayers, aAny );
     447             : 
     448          74 :     GetPrintableLayers().QueryValue( aAny );
     449          74 :     aUserData.addValue( sUNO_View_PrintableLayers, aAny );
     450             : 
     451          74 :     GetLockedLayers().QueryValue( aAny );
     452          74 :     aUserData.addValue( sUNO_View_LockedLayers, aAny );
     453             : 
     454          74 :     aUserData.addValue( sUNO_View_NoAttribs, makeAny( (sal_Bool)IsNoAttribs() ) );
     455          74 :     aUserData.addValue( sUNO_View_NoColors, makeAny( (sal_Bool)IsNoColors() ) );
     456             : 
     457          74 :     if( GetStandardHelpLines().GetCount() )
     458           0 :         aUserData.addValue( sUNO_View_SnapLinesDrawing, makeAny( createHelpLinesString( GetStandardHelpLines() ) ) );
     459             : 
     460          74 :     if( GetNotesHelpLines().GetCount() )
     461           0 :         aUserData.addValue( sUNO_View_SnapLinesNotes, makeAny( createHelpLinesString( GetNotesHelpLines() ) ) );
     462             : 
     463          74 :     if( GetHandoutHelpLines().GetCount() )
     464           0 :         aUserData.addValue( sUNO_View_SnapLinesHandout, makeAny( createHelpLinesString( GetHandoutHelpLines() ) ) );
     465             : 
     466          74 :     aUserData.addValue( sUNO_View_RulerIsVisible, makeAny( (sal_Bool)HasRuler() ) );
     467          74 :     aUserData.addValue( sUNO_View_PageKind, makeAny( (sal_Int16)GetPageKind() ) );
     468          74 :     aUserData.addValue( sUNO_View_SelectedPage, makeAny( (sal_Int16)GetSelectedPage() ) );
     469          74 :     aUserData.addValue( sUNO_View_IsLayerMode, makeAny( (sal_Bool)IsLayerMode() ) );
     470             : 
     471          74 :     aUserData.addValue( sUNO_View_IsDoubleClickTextEdit,  makeAny( (sal_Bool)IsDoubleClickTextEdit() ) );
     472          74 :     aUserData.addValue( sUNO_View_IsClickChangeRotation, makeAny( (sal_Bool)IsClickChangeRotation() ) );
     473             : 
     474          74 :     aUserData.addValue( sUNO_View_SlidesPerRow, makeAny( (sal_Int16)GetSlidesPerRow() ) );
     475          74 :     aUserData.addValue( sUNO_View_EditModeStandard, makeAny( (sal_Int32)GetViewShEditMode( PK_STANDARD ) ) );
     476          74 :     aUserData.addValue( sUNO_View_EditModeNotes, makeAny( (sal_Int32)GetViewShEditMode( PK_NOTES ) ) );
     477          74 :     aUserData.addValue( sUNO_View_EditModeHandout, makeAny( (sal_Int32)GetViewShEditMode( PK_HANDOUT ) ) );
     478             : 
     479             :     {
     480          74 :         const Rectangle aVisArea = GetVisArea();
     481             : 
     482          74 :         aUserData.addValue( sUNO_View_VisibleAreaTop, makeAny( (sal_Int32)aVisArea.Top() ) );
     483          74 :         aUserData.addValue( sUNO_View_VisibleAreaLeft, makeAny( (sal_Int32)aVisArea.Left() ) );
     484          74 :         aUserData.addValue( sUNO_View_VisibleAreaWidth, makeAny( (sal_Int32)aVisArea.GetWidth() ) );
     485          74 :         aUserData.addValue( sUNO_View_VisibleAreaHeight, makeAny( (sal_Int32)aVisArea.GetHeight() ) );
     486             :     }
     487             : 
     488          74 :     aUserData.addValue( sUNO_View_GridCoarseWidth, makeAny( (sal_Int32)GetGridCoarse().Width() ) );
     489          74 :     aUserData.addValue( sUNO_View_GridCoarseHeight, makeAny( (sal_Int32)GetGridCoarse().Height() ) );
     490          74 :     aUserData.addValue( sUNO_View_GridFineWidth, makeAny( (sal_Int32)GetGridFine().Width() ) );
     491          74 :     aUserData.addValue( sUNO_View_GridFineHeight, makeAny( (sal_Int32)GetGridFine().Height() ) );
     492          74 :     aUserData.addValue( sUNO_View_GridSnapWidthXNumerator, makeAny( (sal_Int32)GetSnapGridWidthX().GetNumerator() ) );
     493          74 :     aUserData.addValue( sUNO_View_GridSnapWidthXDenominator, makeAny( (sal_Int32)GetSnapGridWidthX().GetDenominator() ) );
     494          74 :     aUserData.addValue( sUNO_View_GridSnapWidthYNumerator, makeAny( (sal_Int32)GetSnapGridWidthY().GetNumerator() ) );
     495          74 :     aUserData.addValue( sUNO_View_GridSnapWidthYDenominator, makeAny( (sal_Int32)GetSnapGridWidthY().GetDenominator() ) );
     496          74 :     aUserData.addValue( sUNO_View_IsAngleSnapEnabled, makeAny( (sal_Bool)IsAngleSnapEnabled() ) );
     497          74 :     aUserData.addValue( sUNO_View_SnapAngle, makeAny( (sal_Int32)GetSnapAngle() ) );
     498             : 
     499          74 :     const sal_Int32 nOldLength = rValues.getLength();
     500          74 :     rValues.realloc( nOldLength + aUserData.size() );
     501             : 
     502          74 :     PropertyValue* pValue = &(rValues.getArray()[nOldLength]);
     503             : 
     504          74 :     std::vector< std::pair< OUString, Any > >::iterator aIter( aUserData.begin() );
     505        3034 :     for( ; aIter != aUserData.end(); ++aIter, ++pValue )
     506             :     {
     507        2960 :         pValue->Name = (*aIter).first;
     508        2960 :         pValue->Value = (*aIter).second;
     509          74 :     }
     510          74 : }
     511             : #undef addValue
     512             : 
     513           1 : static void createHelpLinesFromString( const OUString& rLines, SdrHelpLineList& rHelpLines )
     514             : {
     515           1 :     const sal_Unicode * pStr = rLines.getStr();
     516           1 :     SdrHelpLine aNewHelpLine;
     517           1 :     OUStringBuffer sBuffer;
     518             : 
     519           1 :     while( *pStr )
     520             :     {
     521           9 :         Point aPoint;
     522             : 
     523           9 :         switch( *pStr )
     524             :         {
     525             :         case (sal_Unicode)'P':
     526           0 :             aNewHelpLine.SetKind( SDRHELPLINE_POINT );
     527           0 :             break;
     528             :         case (sal_Unicode)'V':
     529           4 :             aNewHelpLine.SetKind( SDRHELPLINE_VERTICAL );
     530           4 :             break;
     531             :         case (sal_Unicode)'H':
     532           5 :             aNewHelpLine.SetKind( SDRHELPLINE_HORIZONTAL );
     533           5 :             break;
     534             :         default:
     535             :             OSL_FAIL( "syntax error in snap lines settings string" );
     536           0 :             return;
     537             :         }
     538             : 
     539           9 :         pStr++;
     540             : 
     541          56 :         while( (*pStr >= '0' && *pStr <= '9') || (*pStr == '+') || (*pStr == '-') )
     542             :         {
     543          38 :             sBuffer.append( *pStr++ );
     544             :         }
     545             : 
     546           9 :         sal_Int32 nValue = sBuffer.makeStringAndClear().toInt32();
     547             : 
     548           9 :         if( aNewHelpLine.GetKind() == SDRHELPLINE_HORIZONTAL )
     549             :         {
     550           5 :             aPoint.Y() = nValue;
     551             :         }
     552             :         else
     553             :         {
     554           4 :             aPoint.X() = nValue;
     555             : 
     556           4 :             if( aNewHelpLine.GetKind() == SDRHELPLINE_POINT )
     557             :             {
     558           0 :                 if( *pStr++ != ',' )
     559           0 :                     return;
     560             : 
     561           0 :                 while( (*pStr >= '0' && *pStr <= '9') || (*pStr == '+') || (*pStr == '-')  )
     562             :                 {
     563           0 :                     sBuffer.append( *pStr++ );
     564             :                 }
     565             : 
     566           0 :                 aPoint.Y() = sBuffer.makeStringAndClear().toInt32();
     567             : 
     568             :             }
     569             :         }
     570             : 
     571           9 :         aNewHelpLine.SetPos( aPoint );
     572           9 :         rHelpLines.Insert( aNewHelpLine );
     573           1 :     }
     574             : }
     575             : 
     576          79 : void FrameView::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >& rSequence, sal_Bool )
     577             : {
     578          79 :     const sal_Int32 nLength = rSequence.getLength();
     579          79 :     if (nLength)
     580             :     {
     581          79 :         const bool bImpress = dynamic_cast< SdDrawDocument* >(GetModel())->GetDocumentType() == DOCUMENT_TYPE_IMPRESS;
     582             : 
     583          79 :         sal_Bool bBool = sal_False;
     584          79 :         sal_Int32 nInt32 = 0;
     585          79 :         sal_Int16 nInt16 = 0;
     586          79 :         OUString aString;
     587             : 
     588          79 :         sal_Int32 aSnapGridWidthXNum = GetSnapGridWidthX().GetNumerator();
     589          79 :         sal_Int32 aSnapGridWidthXDom = GetSnapGridWidthX().GetDenominator();
     590             : 
     591          79 :         sal_Int32 aSnapGridWidthYNum = GetSnapGridWidthY().GetNumerator();
     592          79 :         sal_Int32 aSnapGridWidthYDom = GetSnapGridWidthY().GetDenominator();
     593             : 
     594          79 :         const com::sun::star::beans::PropertyValue *pValue = rSequence.getConstArray();
     595        3398 :         for (sal_Int16 i = 0 ; i < nLength; i++, pValue++ )
     596             :         {
     597        3319 :             if ( pValue->Name == sUNO_View_ViewId )
     598             :             {
     599             :             }
     600        3241 :             else if ( pValue->Name == sUNO_View_SnapLinesDrawing )
     601             :             {
     602           1 :                 if( pValue->Value >>= aString )
     603             :                 {
     604           1 :                     SdrHelpLineList aHelpLines;
     605           1 :                     createHelpLinesFromString( aString, aHelpLines );
     606           1 :                     SetStandardHelpLines( aHelpLines );
     607             :                 }
     608             :             }
     609        3240 :             else if ( pValue->Name == sUNO_View_SnapLinesNotes )
     610             :             {
     611           0 :                 if( pValue->Value >>= aString )
     612             :                 {
     613           0 :                     SdrHelpLineList aHelpLines;
     614           0 :                     createHelpLinesFromString( aString, aHelpLines );
     615           0 :                     SetNotesHelpLines( aHelpLines );
     616             :                 }
     617             :             }
     618        3240 :             else if ( pValue->Name == sUNO_View_SnapLinesHandout )
     619             :             {
     620           0 :                 if( pValue->Value >>= aString )
     621             :                 {
     622           0 :                     SdrHelpLineList aHelpLines;
     623           0 :                     createHelpLinesFromString( aString, aHelpLines );
     624           0 :                     SetHandoutHelpLines( aHelpLines );
     625             :                 }
     626             :             }
     627        3240 :             else if ( pValue->Name == sUNO_View_RulerIsVisible )
     628             :             {
     629          79 :                 if( pValue->Value >>= bBool )
     630             :                 {
     631          79 :                     SetRuler( bBool );
     632             :                 }
     633             :             }
     634        3161 :             else if ( pValue->Name == sUNO_View_PageKind )
     635             :             {
     636          79 :                 if( pValue->Value >>= nInt16 )
     637             :                 {
     638          79 :                     SdDrawDocument* pDoc = dynamic_cast< SdDrawDocument* >( GetModel() );
     639          79 :                     if( pDoc && pDoc->GetDocSh() && ( SFX_CREATE_MODE_EMBEDDED == pDoc->GetDocSh()->GetCreateMode() ) )
     640          10 :                         SetPageKind( (PageKind)nInt16 );
     641             : 
     642          79 :                     SetPageKindOnLoad( (PageKind)nInt16 );
     643             :                 }
     644             :             }
     645        3082 :             else if ( pValue->Name == sUNO_View_SelectedPage )
     646             :             {
     647          79 :                 if( pValue->Value >>= nInt16 )
     648             :                 {
     649          79 :                     SdDrawDocument* pDoc = dynamic_cast< SdDrawDocument* >( GetModel() );
     650          79 :                     if( pDoc && pDoc->GetDocSh() && ( SFX_CREATE_MODE_EMBEDDED == pDoc->GetDocSh()->GetCreateMode() ) )
     651          10 :                         SetSelectedPage( (sal_uInt16)nInt16 );
     652             : 
     653          79 :                     SetSelectedPageOnLoad( (sal_uInt16)nInt16 );
     654             :                 }
     655             :             }
     656        3003 :             else if ( pValue->Name == sUNO_View_IsLayerMode )
     657             :             {
     658          79 :                 if( pValue->Value >>= bBool )
     659             :                 {
     660          79 :                     SetLayerMode( bBool );
     661             :                 }
     662             :             }
     663        2924 :             else if ( pValue->Name == sUNO_View_IsDoubleClickTextEdit )
     664             :             {
     665          79 :                 if( pValue->Value >>= bBool )
     666             :                 {
     667          79 :                     SetDoubleClickTextEdit( bBool );
     668             :                 }
     669             :             }
     670        2845 :             else if ( pValue->Name == sUNO_View_IsClickChangeRotation )
     671             :             {
     672          79 :                 if( pValue->Value >>= bBool )
     673             :                 {
     674          79 :                     SetClickChangeRotation( bBool );
     675             :                 }
     676             :             }
     677        2766 :             else if ( pValue->Name == sUNO_View_SlidesPerRow )
     678             :             {
     679          79 :                 if( pValue->Value >>= nInt16 )
     680             :                 {
     681          79 :                     SetSlidesPerRow( (sal_uInt16)nInt16 );
     682             :                 }
     683             :             }
     684        2687 :             else if ( pValue->Name == sUNO_View_EditModeStandard )
     685             :             {
     686          79 :                 if( pValue->Value >>= nInt32 )
     687             :                 {
     688          79 :                     SdDrawDocument* pDoc = dynamic_cast< SdDrawDocument* >( GetModel() );
     689          79 :                     if( pDoc && pDoc->GetDocSh() && ( SFX_CREATE_MODE_EMBEDDED == pDoc->GetDocSh()->GetCreateMode() ) )
     690          10 :                         SetViewShEditMode( (EditMode)nInt32, PK_STANDARD );
     691             :                 }
     692             :             }
     693        2608 :             else if ( pValue->Name == sUNO_View_EditModeNotes )
     694             :             {
     695          79 :                 if( pValue->Value >>= nInt32 )
     696             :                 {
     697          79 :                     SdDrawDocument* pDoc = dynamic_cast< SdDrawDocument* >( GetModel() );
     698          79 :                     if( pDoc && pDoc->GetDocSh() && ( SFX_CREATE_MODE_EMBEDDED == pDoc->GetDocSh()->GetCreateMode() ) )
     699          10 :                         SetViewShEditMode( (EditMode)nInt32, PK_NOTES );
     700             :                 }
     701             :             }
     702        2529 :             else if ( pValue->Name == sUNO_View_EditModeHandout )
     703             :             {
     704          79 :                 if( pValue->Value >>= nInt32 )
     705             :                 {
     706          79 :                     SdDrawDocument* pDoc = dynamic_cast< SdDrawDocument* >( GetModel() );
     707          79 :                     if( pDoc && pDoc->GetDocSh() && ( SFX_CREATE_MODE_EMBEDDED == pDoc->GetDocSh()->GetCreateMode() ) )
     708          10 :                         SetViewShEditMode( (EditMode)nInt32, PK_HANDOUT );
     709             :                 }
     710             :             }
     711        2450 :             else if ( pValue->Name == sUNO_View_VisibleAreaTop )
     712             :             {
     713          79 :                 sal_Int32 nTop = 0;
     714          79 :                 if( pValue->Value >>= nTop )
     715             :                 {
     716          79 :                     Rectangle aVisArea( GetVisArea() );
     717          79 :                     aVisArea.Bottom() += nTop - aVisArea.Top();
     718          79 :                     aVisArea.Top() = nTop;
     719          79 :                     SetVisArea( aVisArea );
     720             :                 }
     721             :             }
     722        2371 :             else if ( pValue->Name == sUNO_View_VisibleAreaLeft )
     723             :             {
     724          79 :                 sal_Int32 nLeft = 0;
     725          79 :                 if( pValue->Value >>= nLeft )
     726             :                 {
     727          79 :                     Rectangle aVisArea( GetVisArea() );
     728          79 :                     aVisArea.Right() += nLeft - aVisArea.Left();
     729          79 :                     aVisArea.Left() = nLeft;
     730          79 :                     SetVisArea( aVisArea );
     731             :                 }
     732             :             }
     733        2292 :             else if ( pValue->Name == sUNO_View_VisibleAreaWidth )
     734             :             {
     735          79 :                 sal_Int32 nWidth = 0;
     736          79 :                 if( pValue->Value >>= nWidth )
     737             :                 {
     738          79 :                     Rectangle aVisArea( GetVisArea() );
     739          79 :                     aVisArea.Right() = aVisArea.Left() + nWidth - 1;
     740          79 :                     SetVisArea( aVisArea );
     741             :                 }
     742             :             }
     743        2213 :             else if ( pValue->Name == sUNO_View_VisibleAreaHeight )
     744             :             {
     745          79 :                 sal_Int32 nHeight = 0;
     746          79 :                 if( pValue->Value >>= nHeight )
     747             :                 {
     748          79 :                     Rectangle aVisArea( GetVisArea() );
     749          79 :                     aVisArea.Bottom() = nHeight + aVisArea.Top() - 1;
     750          79 :                     SetVisArea( aVisArea );
     751             :                 }
     752             :             }
     753             : 
     754        2134 :             else if ( pValue->Name == sUNO_View_GridIsVisible )
     755             :             {
     756          79 :                 if( pValue->Value >>= bBool )
     757             :                 {
     758          79 :                     SetGridVisible( bBool );
     759             :                 }
     760             :             }
     761             : 
     762        2055 :             else if ( pValue->Name == sUNO_View_IsSnapToGrid )
     763             :             {
     764          79 :                 if( pValue->Value >>= bBool )
     765             :                 {
     766          79 :                     SetGridSnap( bBool );
     767             :                 }
     768             :             }
     769        1976 :             else if ( pValue->Name == sUNO_View_GridIsFront )
     770             :             {
     771          79 :                 if( pValue->Value >>= bBool )
     772             :                 {
     773          79 :                     SetGridFront( bBool );
     774             :                 }
     775             :             }
     776        1897 :             else if ( pValue->Name == sUNO_View_IsSnapToPageMargins )
     777             :             {
     778          79 :                 if( pValue->Value >>= bBool )
     779             :                 {
     780          79 :                     SetBordSnap( bBool );
     781             :                 }
     782             :             }
     783        1818 :             else if ( pValue->Name == sUNO_View_IsSnapToSnapLines )
     784             :             {
     785          79 :                 if( pValue->Value >>= bBool )
     786             :                 {
     787          79 :                     SetHlplSnap( bBool );
     788             :                 }
     789             :             }
     790        1739 :             else if ( pValue->Name == sUNO_View_IsSnapToObjectFrame )
     791             :             {
     792          79 :                 if( pValue->Value >>= bBool )
     793             :                 {
     794          79 :                     SetOFrmSnap( bBool );
     795             :                 }
     796             :             }
     797        1660 :             else if ( pValue->Name == sUNO_View_IsSnapToObjectPoints )
     798             :             {
     799          79 :                 if( pValue->Value >>= bBool )
     800             :                 {
     801          79 :                     SetOPntSnap( bBool );
     802             :                 }
     803             :             }
     804        1581 :             else if ( pValue->Name == sUNO_View_IsPlusHandlesAlwaysVisible )
     805             :             {
     806          79 :                 if( pValue->Value >>= bBool )
     807             :                 {
     808          79 :                     SetPlusHandlesAlwaysVisible( bBool );
     809             :                 }
     810             :             }
     811        1502 :             else if ( pValue->Name == sUNO_View_IsFrameDragSingles )
     812             :             {
     813          79 :                 if( pValue->Value >>= bBool )
     814             :                 {
     815          79 :                     SetFrameDragSingles( bBool );
     816             :                 }
     817             :             }
     818        1423 :             else if ( pValue->Name == sUNO_View_EliminatePolyPointLimitAngle )
     819             :             {
     820          79 :                 if( pValue->Value >>= nInt32 )
     821             :                 {
     822          79 :                     SetEliminatePolyPointLimitAngle( nInt32 );
     823             :                 }
     824             :             }
     825        1344 :             else if ( pValue->Name == sUNO_View_IsEliminatePolyPoints )
     826             :             {
     827          79 :                 if( pValue->Value >>= bBool )
     828             :                 {
     829          79 :                     SetEliminatePolyPoints( bBool );
     830             :                 }
     831             :             }
     832        1265 :             else if ( pValue->Name == sUNO_View_ActiveLayer )
     833             :             {
     834           0 :                 if( pValue->Value >>= aString )
     835             :                 {
     836           0 :                     SetActiveLayer( aString );
     837             :                 }
     838             :             }
     839        1265 :             else if ( pValue->Name == sUNO_View_NoAttribs )
     840             :             {
     841          79 :                 if( pValue->Value >>= bBool )
     842             :                 {
     843          79 :                     SetNoAttribs( bBool );
     844             :                 }
     845             :             }
     846        1186 :             else if ( pValue->Name == sUNO_View_NoColors )
     847             :             {
     848          79 :                 if( pValue->Value >>= bBool )
     849             :                 {
     850          79 :                     SetNoColors( bBool );
     851             :                 }
     852             :             }
     853        1107 :             else if ( pValue->Name == sUNO_View_GridCoarseWidth )
     854             :             {
     855          79 :                 if( pValue->Value >>= nInt32 )
     856             :                 {
     857          79 :                     const Size aCoarse( nInt32, GetGridCoarse().Height() );
     858          79 :                     SetGridCoarse( aCoarse );
     859             :                 }
     860             :             }
     861        1028 :             else if ( pValue->Name == sUNO_View_GridCoarseHeight )
     862             :             {
     863          79 :                 if( pValue->Value >>= nInt32 )
     864             :                 {
     865          79 :                     const Size aCoarse( GetGridCoarse().Width(), nInt32 );
     866          79 :                     SetGridCoarse( aCoarse );
     867             :                 }
     868             :             }
     869         949 :             else if ( pValue->Name == sUNO_View_GridFineWidth )
     870             :             {
     871          79 :                 if( pValue->Value >>= nInt32 )
     872             :                 {
     873          79 :                     const Size aCoarse( nInt32, GetGridFine().Height() );
     874          79 :                     SetGridFine( aCoarse );
     875             :                 }
     876             :             }
     877         870 :             else if ( pValue->Name == sUNO_View_GridFineHeight )
     878             :             {
     879          79 :                 if( pValue->Value >>= nInt32 )
     880             :                 {
     881          79 :                     const Size aCoarse( GetGridFine().Width(), nInt32 );
     882          79 :                     SetGridFine( aCoarse );
     883             :                 }
     884             :             }
     885         791 :             else if ( pValue->Name == sUNO_View_IsAngleSnapEnabled )
     886             :             {
     887          79 :                 if( pValue->Value >>= bBool )
     888             :                 {
     889          79 :                     SetAngleSnapEnabled( bBool );
     890             :                 }
     891             :             }
     892         712 :             else if ( pValue->Name == sUNO_View_SnapAngle )
     893             :             {
     894          79 :                 if( pValue->Value >>= nInt32 )
     895             :                 {
     896          79 :                     SetSnapAngle( nInt32 );
     897             :                 }
     898             :             }
     899         633 :             else if ( pValue->Name == sUNO_View_GridSnapWidthXNumerator )
     900             :             {
     901          79 :                 pValue->Value >>= aSnapGridWidthXNum;
     902             :             }
     903         554 :             else if ( pValue->Name == sUNO_View_GridSnapWidthXDenominator )
     904             :             {
     905          79 :                 pValue->Value >>= aSnapGridWidthXDom;
     906             :             }
     907         475 :             else if ( pValue->Name == sUNO_View_GridSnapWidthYNumerator )
     908             :             {
     909          79 :                 pValue->Value >>= aSnapGridWidthYNum;
     910             :             }
     911         396 :             else if ( pValue->Name == sUNO_View_GridSnapWidthYDenominator )
     912             :             {
     913          79 :                 pValue->Value >>= aSnapGridWidthYDom;
     914             :             }
     915         317 :             else if (!bImpress && pValue->Name == sUNO_View_VisibleLayers  )
     916             :             {
     917          52 :                 SetOfByte aSetOfBytes;
     918          52 :                 aSetOfBytes.PutValue( pValue->Value );
     919          52 :                 SetVisibleLayers( aSetOfBytes );
     920             :             }
     921         265 :             else if (!bImpress && pValue->Name == sUNO_View_PrintableLayers )
     922             :             {
     923          52 :                 SetOfByte aSetOfBytes;
     924          52 :                 aSetOfBytes.PutValue( pValue->Value );
     925          52 :                 SetPrintableLayers( aSetOfBytes );
     926             :             }
     927         213 :             else if (!bImpress && pValue->Name == sUNO_View_LockedLayers )
     928             :             {
     929          52 :                 SetOfByte aSetOfBytes;
     930          52 :                 aSetOfBytes.PutValue( pValue->Value );
     931          52 :                 SetLockedLayers( aSetOfBytes );
     932             :             }
     933             :         }
     934             : 
     935          79 :         switch (GetPageKindOnLoad())
     936             :         {
     937          79 :             case PK_STANDARD: SetViewShEditModeOnLoad(meStandardEditMode); break;
     938           0 :             case PK_NOTES: SetViewShEditModeOnLoad(meNotesEditMode); break;
     939           0 :             case PK_HANDOUT: SetViewShEditModeOnLoad(meHandoutEditMode); break;
     940           0 :             default: SetViewShEditModeOnLoad(EM_PAGE); break;
     941             :         }
     942             : 
     943          79 :         const Fraction aSnapGridWidthX( aSnapGridWidthXNum, aSnapGridWidthXDom );
     944          79 :         const Fraction aSnapGridWidthY( aSnapGridWidthYNum, aSnapGridWidthYDom );
     945             : 
     946          79 :         SetSnapGridWidth( aSnapGridWidthX, aSnapGridWidthY );
     947             :     }
     948          79 : }
     949             : 
     950             : 
     951             : 
     952             : 
     953         155 : void FrameView::SetPreviousViewShellType (ViewShell::ShellType eType)
     954             : {
     955         155 :     mePreviousViewShellType = eType;
     956         155 : }
     957             : 
     958             : 
     959             : 
     960             : 
     961           1 : ViewShell::ShellType FrameView::GetPreviousViewShellType (void) const
     962             : {
     963           1 :     return mePreviousViewShellType;
     964             : }
     965             : 
     966             : 
     967             : 
     968             : 
     969         224 : void FrameView::SetViewShellTypeOnLoad (ViewShell::ShellType eType)
     970             : {
     971         224 :     meViewShellTypeOnLoad = eType;
     972         224 : }
     973             : 
     974             : 
     975             : 
     976             : 
     977           1 : ViewShell::ShellType FrameView::GetViewShellTypeOnLoad (void) const
     978             : {
     979           1 :     return meViewShellTypeOnLoad;
     980             : }
     981             : 
     982             : 
     983             : 
     984             : 
     985        1094 : void FrameView::SetSelectedPage(sal_uInt16 nPage)
     986             : {
     987        1094 :     mnSelectedPage = nPage;
     988        1094 : }
     989             : 
     990             : 
     991             : 
     992             : 
     993         349 : sal_uInt16 FrameView::GetSelectedPage (void) const
     994             : {
     995         349 :     return mnSelectedPage;
     996             : }
     997             : 
     998             : 
     999             : 
    1000             : 
    1001           0 : void FrameView::SetIsNavigatorShowingAllShapes (const bool bIsNavigatorShowingAllShapes)
    1002             : {
    1003           0 :     mbIsNavigatorShowingAllShapes = bIsNavigatorShowingAllShapes;
    1004           0 : }
    1005             : 
    1006             : 
    1007             : 
    1008             : 
    1009           1 : bool FrameView::IsNavigatorShowingAllShapes (void) const
    1010             : {
    1011           1 :     return mbIsNavigatorShowingAllShapes;
    1012             : }
    1013             : 
    1014             : 
    1015          48 : } // end of namespace sd
    1016             : 
    1017             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10