LCOV - code coverage report
Current view: top level - sd/source/ui/inc - FrameView.hxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 48 56 85.7 %
Date: 2014-04-11 Functions: 38 43 88.4 %
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             : #ifndef INCLUDED_SD_SOURCE_UI_INC_FRAMEVIEW_HXX
      21             : #define INCLUDED_SD_SOURCE_UI_INC_FRAMEVIEW_HXX
      22             : 
      23             : #include "ViewShell.hxx"
      24             : #include <svx/svdview.hxx>
      25             : #include "pres.hxx"
      26             : 
      27             : class SdDrawDocument;
      28             : class SdOptions;
      29             : 
      30             : namespace sd {
      31             : 
      32             : /**
      33             :  * View for MDIFrame
      34             :  */
      35             : class SD_DLLPUBLIC FrameView
      36             :     : public SdrView
      37             : {
      38             : public:
      39             :     FrameView(SdDrawDocument* pDrawDoc, FrameView* pFrameView = NULL );
      40             :     FrameView(const FrameView& rFrameView);
      41             :     virtual ~FrameView();
      42             : 
      43             :     void Connect();
      44             :     void Disconnect();
      45             : 
      46             :     void Update(SdOptions* pOptions);
      47             : 
      48         484 :     void  SetStandardHelpLines(const SdrHelpLineList& rHelpLines)
      49         484 :                              { maStandardHelpLines = rHelpLines; }
      50         354 :     const SdrHelpLineList& GetStandardHelpLines() { return maStandardHelpLines; }
      51           0 :     void  SetNotesHelpLines(const SdrHelpLineList& rHelpLines)
      52           0 :                              { maNotesHelpLines = rHelpLines; }
      53          75 :     const SdrHelpLineList& GetNotesHelpLines() { return maNotesHelpLines; }
      54           0 :     void  SetHandoutHelpLines(const SdrHelpLineList& rHelpLines)
      55           0 :                              { maHandoutHelpLines = rHelpLines; }
      56          75 :     const SdrHelpLineList& GetHandoutHelpLines() { return maHandoutHelpLines; }
      57             : 
      58          57 :     void SetVisibleLayers(const SetOfByte& rVisibleLayers)
      59          57 :                          { maVisibleLayers = rVisibleLayers; }
      60         832 :     const SetOfByte& GetVisibleLayers() { return maVisibleLayers; }
      61             : 
      62          57 :     void SetLockedLayers(const SetOfByte& rLockedLayers)
      63          57 :                         { maLockedLayers = rLockedLayers; }
      64         832 :     const SetOfByte& GetLockedLayers() { return maLockedLayers; }
      65             : 
      66          57 :     void SetPrintableLayers(const SetOfByte& rPrintableLayers)
      67          57 :                          { maPrintableLayers = rPrintableLayers; }
      68         832 :     const SetOfByte& GetPrintableLayers() { return maPrintableLayers; }
      69             : 
      70         558 :     void SetRuler(const sal_Bool bRulerOn)
      71         558 :                  { mbRuler = bRulerOn; }
      72         401 :     sal_Bool HasRuler() const { return mbRuler; }
      73             : 
      74          79 :     void SetNoColors(const sal_Bool bNoCol)
      75          79 :                  { mbNoColors = bNoCol; }
      76          75 :     sal_Bool IsNoColors() const { return mbNoColors; }
      77             : 
      78          79 :     void SetNoAttribs(const sal_Bool bNoAttr)
      79          79 :                  { mbNoAttribs = bNoAttr; }
      80          75 :     sal_Bool IsNoAttribs() const { return mbNoAttribs; }
      81             : 
      82         794 :     void SetVisArea(const Rectangle& rVisArea)
      83         794 :                  { maVisArea = rVisArea; }
      84         391 :     const Rectangle GetVisArea() { return maVisArea; }
      85             : 
      86          92 :     void SetPageKind(PageKind eKind) { mePageKind = eKind; }
      87         144 :     PageKind GetPageKind() const { return mePageKind; }
      88             : 
      89             :     /** is used in FrameView::ReadUserDataSequence() only to store the
      90             :         page kind that was selected while last saving this document */
      91          79 :     void SetPageKindOnLoad(PageKind eKind) { mePageKindOnLoad = eKind; }
      92             : 
      93             :     /** can be used to get the page kind that was selected on last save of this document */
      94          80 :     PageKind GetPageKindOnLoad() const { return mePageKindOnLoad; }
      95             : 
      96             :     void SetSelectedPage (sal_uInt16 nPage);
      97             :     sal_uInt16 GetSelectedPage () const;
      98             : 
      99             :     /** is used in FrameView::ReadUserDataSequence() only to store the
     100             :         page that was selected while last saving this document */
     101          79 :     void SetSelectedPageOnLoad (sal_uInt16 nPage) { mnSelectedPageOnLoad = nPage; }
     102             : 
     103             :     /** can be used to get the page that was selected on last save of this document */
     104           1 :     sal_uInt16 GetSelectedPageOnLoad () const { return mnSelectedPageOnLoad; }
     105             : 
     106             :     void SetViewShEditMode(EditMode eMode, PageKind eKind);
     107             :     EditMode GetViewShEditMode (PageKind eKind);
     108             : 
     109             :     /** Remember the edit mode of the main view shell at the time when the
     110             :         document is loaded.
     111             :     */
     112             :     void SetViewShEditModeOnLoad (const EditMode eMode);
     113             : 
     114             :     /** Return the value of the edit mode as it was when the document was
     115             :         loaded.
     116             :     */
     117             :     EditMode GetViewShEditModeOnLoad (void) const;
     118             : 
     119         557 :     void SetLayerMode(sal_Bool bMode)
     120         557 :                  { mbLayerMode = bMode; }
     121         349 :     sal_Bool IsLayerMode() const { return mbLayerMode; }
     122             : 
     123         632 :     void SetQuickEdit(sal_Bool bQEdit)
     124         632 :                  { mbQuickEdit = bQEdit; }
     125         275 :     sal_Bool IsQuickEdit() const { return mbQuickEdit; }
     126             : 
     127         233 :     void        SetDoubleClickTextEdit( sal_Bool bOn = sal_True ) { mbDoubleClickTextEdit = bOn; }
     128          93 :     sal_Bool    IsDoubleClickTextEdit() const { return mbDoubleClickTextEdit; }
     129             : 
     130         233 :     void        SetClickChangeRotation( sal_Bool bOn = sal_True ) { mbClickChangeRotation = bOn; }
     131          93 :     sal_Bool    IsClickChangeRotation() const { return mbClickChangeRotation; }
     132             : 
     133             :     /** Remember the type of the view shell that was (or soon will be)
     134             :         previously associated with this frame view.
     135             :         @param eType
     136             :             The type of the previous view shell or ViewShell::ST_NONE to
     137             :             indicate that there is no previous view shell.
     138             :     */
     139             :     void SetPreviousViewShellType (ViewShell::ShellType eType);
     140             : 
     141             :     /** Return the type of the view shell previously associated with this
     142             :         frame view.
     143             :     */
     144             :     ViewShell::ShellType GetPreviousViewShellType (void) const;
     145             : 
     146             :     /** Remember the type of the view shell at the time when the document is
     147             :         loaded or, rather, when the ViewShellBase is constructed.
     148             :     */
     149             :     void SetViewShellTypeOnLoad (ViewShell::ShellType eType);
     150             : 
     151             :     ViewShell::ShellType GetViewShellTypeOnLoad (void) const;
     152             : 
     153           0 :     void SetPresentationViewShellId(sal_uInt16 nId)
     154           0 :                  { mnPresViewShellId = nId; }
     155           0 :     sal_uInt16 GetPresentationViewShellId() const { return mnPresViewShellId; }
     156             : 
     157           0 :     void SetSlotId(sal_uInt16 nId) { mnSlotId = nId; }
     158             :     sal_uInt16 GetSlotId() const { return mnSlotId; }
     159             : 
     160         423 :     void SetSlidesPerRow(sal_uInt16 nSlides) { mnSlidesPerRow = nSlides; }
     161         201 :     sal_uInt16 GetSlidesPerRow() const { return mnSlidesPerRow; }
     162             : 
     163           2 :     void SetDrawMode(sal_uLong nNewDrawMode) { mnDrawMode = nNewDrawMode; };
     164        1068 :     sal_uLong GetDrawMode() const { return mnDrawMode; };
     165             : 
     166         172 :     void SetTabCtrlPercent( double nPercent ) { mnTabCtrlPercent = nPercent; }
     167          53 :     double GetTabCtrlPercent() const { return mnTabCtrlPercent; }
     168             : 
     169             :     void SetIsNavigatorShowingAllShapes (const bool bIsNavigatorShowingAllShapes);
     170             :     bool IsNavigatorShowingAllShapes (void) const;
     171             : 
     172             :     virtual void    WriteUserDataSequence ( ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = sal_False );
     173             :     virtual void    ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = sal_False );
     174             : 
     175             : private:
     176             :     sal_uInt16          mnRefCount;
     177             :     sal_Bool            mbRuler;
     178             :     SetOfByte       maVisibleLayers;
     179             :     SetOfByte       maLockedLayers;
     180             :     SetOfByte       maPrintableLayers;
     181             :     SdrHelpLineList maStandardHelpLines;
     182             :     SdrHelpLineList maNotesHelpLines;
     183             :     SdrHelpLineList maHandoutHelpLines;
     184             :     sal_Bool            mbNoColors;        ///< structuring mode
     185             :     sal_Bool            mbNoAttribs;       ///< structuring mode
     186             :     Rectangle           maVisArea;         ///< visible area
     187             :     PageKind            mePageKind;        ///< kind of page (standard, notes, handout)
     188             :     sal_uInt16          mnSelectedPage;
     189             :     PageKind            mePageKindOnLoad;
     190             :     sal_uInt16          mnSelectedPageOnLoad;
     191             :     EditMode            meStandardEditMode; ///< edit mode in drawing mode (Page/MasterPage)
     192             :     EditMode            meNotesEditMode;    ///< edit mode in notes mode (Page/MasterPage)
     193             :     EditMode            meHandoutEditMode;  ///< edit mode in handout mode (Page/MasterPage)
     194             :     EditMode            meEditModeOnLoad;
     195             :     sal_Bool            mbLayerMode;        ///< layer on/off
     196             :     sal_Bool            mbQuickEdit;        ///< QuickEdit on/off
     197             :     sal_Bool            mbDoubleClickTextEdit; ///< text mode after double click
     198             :     sal_Bool            mbClickChangeRotation; ///< single click switches between selection/rotation mode
     199             :     sal_uInt16          mnPresViewShellId;  ///< ViewShell from which the presentation was started
     200             :     sal_uInt16          mnSlotId;           ///< SlotId, which was initial mentioned
     201             :     sal_uInt16          mnSlidesPerRow;     ///< slides per row on the slide-desk
     202             :     sal_uLong           mnDrawMode;         ///< draw mode for the normal window
     203             :     double              mnTabCtrlPercent;
     204             :     /** Remember whether the navigator shows all shapes (<TRUE/>) or only
     205             :         the names ones (<FALSE/>).  Not persistent.
     206             :     */
     207             :     bool            mbIsNavigatorShowingAllShapes;
     208             : 
     209             :     /** The type of the previous view shell.  The (default) value
     210             :         ViewShell::ST_NONE indicates that there was no previous view shell.
     211             :         Note that this value is used only temporarily and is not saved or
     212             :         restored.
     213             :     */
     214             :     ViewShell::ShellType mePreviousViewShellType;
     215             : 
     216             :     ViewShell::ShellType meViewShellTypeOnLoad;
     217             : };
     218             : 
     219             : } // end of namespace sd
     220             : 
     221             : #endif
     222             : 
     223             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10