LCOV - code coverage report
Current view: top level - sd/source/ui/inc - FrameView.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 51 59 86.4 %
Date: 2014-11-03 Functions: 41 46 89.1 %
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        1334 :     void  SetStandardHelpLines(const SdrHelpLineList& rHelpLines)
      49        1334 :                              { maStandardHelpLines = rHelpLines; }
      50         992 :     const SdrHelpLineList& GetStandardHelpLines() { return maStandardHelpLines; }
      51           0 :     void  SetNotesHelpLines(const SdrHelpLineList& rHelpLines)
      52           0 :                              { maNotesHelpLines = rHelpLines; }
      53         222 :     const SdrHelpLineList& GetNotesHelpLines() { return maNotesHelpLines; }
      54           0 :     void  SetHandoutHelpLines(const SdrHelpLineList& rHelpLines)
      55           0 :                              { maHandoutHelpLines = rHelpLines; }
      56         222 :     const SdrHelpLineList& GetHandoutHelpLines() { return maHandoutHelpLines; }
      57             : 
      58         168 :     void SetVisibleLayers(const SetOfByte& rVisibleLayers)
      59         168 :                          { maVisibleLayers = rVisibleLayers; }
      60        2316 :     const SetOfByte& GetVisibleLayers() { return maVisibleLayers; }
      61             : 
      62         168 :     void SetLockedLayers(const SetOfByte& rLockedLayers)
      63         168 :                         { maLockedLayers = rLockedLayers; }
      64        2316 :     const SetOfByte& GetLockedLayers() { return maLockedLayers; }
      65             : 
      66         168 :     void SetPrintableLayers(const SetOfByte& rPrintableLayers)
      67         168 :                          { maPrintableLayers = rPrintableLayers; }
      68        2316 :     const SetOfByte& GetPrintableLayers() { return maPrintableLayers; }
      69             : 
      70        1566 :     void SetRuler(const bool bRulerOn)
      71        1566 :                  { mbRuler = bRulerOn; }
      72        1144 :     bool HasRuler() const { return mbRuler; }
      73             : 
      74         240 :     void SetNoColors(const bool bNoCol)
      75         240 :                  { mbNoColors = bNoCol; }
      76         222 :     bool IsNoColors() const { return mbNoColors; }
      77             : 
      78         240 :     void SetNoAttribs(const bool bNoAttr)
      79         240 :                  { mbNoAttribs = bNoAttr; }
      80         222 :     bool IsNoAttribs() const { return mbNoAttribs; }
      81             : 
      82        2284 :     void SetVisArea(const Rectangle& rVisArea)
      83        2284 :                  { maVisArea = rVisArea; }
      84        1182 :     const Rectangle GetVisArea() { return maVisArea; }
      85             : 
      86         258 :     void SetPageKind(PageKind eKind) { mePageKind = eKind; }
      87         434 :     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         240 :     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         242 :     PageKind GetPageKindOnLoad() const { return mePageKindOnLoad; }
      95             : 
      96             :     void SetSelectedPage (sal_uInt16 nPage);
      97         984 :     sal_uInt16 GetSelectedPage () const { return mnSelectedPage;}
      98             : 
      99             :     /** is used in FrameView::ReadUserDataSequence() only to store the
     100             :         page that was selected while last saving this document */
     101         240 :     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           2 :     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           2 :     EditMode GetViewShEditModeOnLoad (void) const { return meEditModeOnLoad;}
     118             : 
     119        1564 :     void SetLayerMode(bool bMode)
     120        1564 :                  { mbLayerMode = bMode; }
     121         984 :     bool IsLayerMode() const { return mbLayerMode; }
     122             : 
     123        1706 :     void SetQuickEdit(bool bQEdit)
     124        1706 :                  { mbQuickEdit = bQEdit; }
     125         764 :     bool IsQuickEdit() const { return mbQuickEdit; }
     126             : 
     127         622 :     void        SetDoubleClickTextEdit( bool bOn = true ) { mbDoubleClickTextEdit = bOn; }
     128         241 :     bool    IsDoubleClickTextEdit() const { return mbDoubleClickTextEdit; }
     129             : 
     130         622 :     void        SetClickChangeRotation( bool bOn = true ) { mbClickChangeRotation = bOn; }
     131         241 :     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           2 :     ViewShell::ShellType GetPreviousViewShellType (void) const { return mePreviousViewShellType;}
     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           2 :     ViewShell::ShellType GetViewShellTypeOnLoad (void) const { return meViewShellTypeOnLoad;}
     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        1002 :     void SetSlidesPerRow(sal_uInt16 nSlides) { mnSlidesPerRow = nSlides; }
     161         474 :     sal_uInt16 GetSlidesPerRow() const { return mnSlidesPerRow; }
     162             : 
     163           4 :     void SetDrawMode(sal_uLong nNewDrawMode) { mnDrawMode = nNewDrawMode; };
     164        2718 :     sal_uLong GetDrawMode() const { return mnDrawMode; };
     165             : 
     166             :     void SetIsNavigatorShowingAllShapes (const bool bIsNavigatorShowingAllShapes);
     167          10 :     bool IsNavigatorShowingAllShapes (void) const { return mbIsNavigatorShowingAllShapes;}
     168             : 
     169             :     virtual void    WriteUserDataSequence ( ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, bool bBrowse = false );
     170             :     virtual void    ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, bool bBrowse = false );
     171             : 
     172             : private:
     173             :     sal_uInt16          mnRefCount;
     174             :     bool            mbRuler;
     175             :     SetOfByte       maVisibleLayers;
     176             :     SetOfByte       maLockedLayers;
     177             :     SetOfByte       maPrintableLayers;
     178             :     SdrHelpLineList maStandardHelpLines;
     179             :     SdrHelpLineList maNotesHelpLines;
     180             :     SdrHelpLineList maHandoutHelpLines;
     181             :     bool            mbNoColors;        ///< structuring mode
     182             :     bool            mbNoAttribs;       ///< structuring mode
     183             :     Rectangle           maVisArea;         ///< visible area
     184             :     PageKind            mePageKind;        ///< kind of page (standard, notes, handout)
     185             :     sal_uInt16          mnSelectedPage;
     186             :     PageKind            mePageKindOnLoad;
     187             :     sal_uInt16          mnSelectedPageOnLoad;
     188             :     EditMode            meStandardEditMode; ///< edit mode in drawing mode (Page/MasterPage)
     189             :     EditMode            meNotesEditMode;    ///< edit mode in notes mode (Page/MasterPage)
     190             :     EditMode            meHandoutEditMode;  ///< edit mode in handout mode (Page/MasterPage)
     191             :     EditMode            meEditModeOnLoad;
     192             :     bool            mbLayerMode;        ///< layer on/off
     193             :     bool            mbQuickEdit;        ///< QuickEdit on/off
     194             :     bool            mbDoubleClickTextEdit; ///< text mode after double click
     195             :     bool            mbClickChangeRotation; ///< single click switches between selection/rotation mode
     196             :     sal_uInt16          mnPresViewShellId;  ///< ViewShell from which the presentation was started
     197             :     sal_uInt16          mnSlotId;           ///< SlotId, which was initial mentioned
     198             :     sal_uInt16          mnSlidesPerRow;     ///< slides per row on the slide-desk
     199             :     sal_uLong           mnDrawMode;         ///< draw mode for the normal window
     200             :     /** Remember whether the navigator shows all shapes (<TRUE/>) or only
     201             :         the names ones (<FALSE/>).  Not persistent.
     202             :     */
     203             :     bool            mbIsNavigatorShowingAllShapes;
     204             : 
     205             :     /** The type of the previous view shell.  The (default) value
     206             :         ViewShell::ST_NONE indicates that there was no previous view shell.
     207             :         Note that this value is used only temporarily and is not saved or
     208             :         restored.
     209             :     */
     210             :     ViewShell::ShellType mePreviousViewShellType;
     211             : 
     212             :     ViewShell::ShellType meViewShellTypeOnLoad;
     213             : };
     214             : 
     215             : } // end of namespace sd
     216             : 
     217             : #endif
     218             : 
     219             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10