LCOV - code coverage report
Current view: top level - libreoffice/sd/source/ui/inc - FrameView.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 20 56 35.7 %
Date: 2012-12-27 Functions: 14 43 32.6 %
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 SD_FRAME_VIEW_HXX
      21             : #define SD_FRAME_VIEW_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             : |*
      34             : |* View fuer den MDIFrame
      35             : |*
      36             : \************************************************************************/
      37             : class SD_DLLPUBLIC FrameView
      38             :     : public SdrView
      39             : {
      40             : public:
      41             :     FrameView(SdDrawDocument* pDrawDoc, FrameView* pFrameView = NULL );
      42             :     FrameView(const FrameView& rFrameView);
      43             :     virtual ~FrameView();
      44             : 
      45             :     void Connect();
      46             :     void Disconnect();
      47             : 
      48             :     void Update(SdOptions* pOptions);
      49             : 
      50           0 :     void  SetStandardHelpLines(const SdrHelpLineList& rHelpLines)
      51           0 :                              { maStandardHelpLines = rHelpLines; }
      52           0 :     const SdrHelpLineList& GetStandardHelpLines() { return maStandardHelpLines; }
      53           0 :     void  SetNotesHelpLines(const SdrHelpLineList& rHelpLines)
      54           0 :                              { maNotesHelpLines = rHelpLines; }
      55           0 :     const SdrHelpLineList& GetNotesHelpLines() { return maNotesHelpLines; }
      56           0 :     void  SetHandoutHelpLines(const SdrHelpLineList& rHelpLines)
      57           0 :                              { maHandoutHelpLines = rHelpLines; }
      58           0 :     const SdrHelpLineList& GetHandoutHelpLines() { return maHandoutHelpLines; }
      59             : 
      60           0 :     void SetVisibleLayers(const SetOfByte& rVisibleLayers)
      61           0 :                          { maVisibleLayers = rVisibleLayers; }
      62           0 :     const SetOfByte& GetVisibleLayers() { return maVisibleLayers; }
      63             : 
      64           0 :     void SetLockedLayers(const SetOfByte& rLockedLayers)
      65           0 :                         { maLockedLayers = rLockedLayers; }
      66           0 :     const SetOfByte& GetLockedLayers() { return maLockedLayers; }
      67             : 
      68           0 :     void SetPrintableLayers(const SetOfByte& rPrintableLayers)
      69           0 :                          { maPrintableLayers = rPrintableLayers; }
      70           0 :     const SetOfByte& GetPrintableLayers() { return maPrintableLayers; }
      71             : 
      72           2 :     void SetRuler(const sal_Bool bRulerOn)
      73           2 :                  { mbRuler = bRulerOn; }
      74           0 :     sal_Bool HasRuler() const { return mbRuler; }
      75             : 
      76           2 :     void SetNoColors(const sal_Bool bNoCol)
      77           2 :                  { mbNoColors = bNoCol; }
      78           0 :     sal_Bool IsNoColors() const { return mbNoColors; }
      79             : 
      80           2 :     void SetNoAttribs(const sal_Bool bNoAttr)
      81           2 :                  { mbNoAttribs = bNoAttr; }
      82           0 :     sal_Bool IsNoAttribs() const { return mbNoAttribs; }
      83             : 
      84           8 :     void SetVisArea(const Rectangle& rVisArea)
      85           8 :                  { maVisArea = rVisArea; }
      86           8 :     const Rectangle GetVisArea() { return maVisArea; }
      87             : 
      88           7 :     void SetPageKind(PageKind eKind) { mePageKind = eKind; }
      89           0 :     PageKind GetPageKind() const { return mePageKind; }
      90             : 
      91             :     /** is used in FrameView::ReadUserDataSequence() only to store the
      92             :         page kind that was selected while last saving this document */
      93           2 :     void SetPageKindOnLoad(PageKind eKind) { mePageKindOnLoad = eKind; }
      94             : 
      95             :     /** can be used to get the page kind that was selected on last save of this document */
      96           2 :     PageKind GetPageKindOnLoad() const { return mePageKindOnLoad; }
      97             : 
      98             :     void SetSelectedPage (sal_uInt16 nPage);
      99             :     sal_uInt16 GetSelectedPage () const;
     100             : 
     101             :     /** is used in FrameView::ReadUserDataSequence() only to store the
     102             :         page that was selected while last saving this document */
     103           2 :     void SetSelectedPageOnLoad (sal_uInt16 nPage) { mnSelectedPageOnLoad = nPage; }
     104             : 
     105             :     /** can be used to get the page that was selected on last save of this document */
     106           0 :     sal_uInt16 GetSelectedPageOnLoad () const { return mnSelectedPageOnLoad; }
     107             : 
     108             :     void SetViewShEditMode(EditMode eMode, PageKind eKind);
     109             :     EditMode GetViewShEditMode (PageKind eKind);
     110             : 
     111             :     /** Remember the edit mode of the main view shell at the time when the
     112             :         document is loaded.
     113             :     */
     114             :     void SetViewShEditModeOnLoad (const EditMode eMode);
     115             : 
     116             :     /** Return the value of the edit mode as it was when the document was
     117             :         loaded.
     118             :     */
     119             :     EditMode GetViewShEditModeOnLoad (void) const;
     120             : 
     121           2 :     void SetLayerMode(sal_Bool bMode)
     122           2 :                  { mbLayerMode = bMode; }
     123           0 :     sal_Bool IsLayerMode() const { return mbLayerMode; }
     124             : 
     125           7 :     void SetQuickEdit(sal_Bool bQEdit)
     126           7 :                  { mbQuickEdit = bQEdit; }
     127           0 :     sal_Bool IsQuickEdit() const { return mbQuickEdit; }
     128             : 
     129           9 :     void        SetDoubleClickTextEdit( sal_Bool bOn = sal_True ) { mbDoubleClickTextEdit = bOn; }
     130           0 :     sal_Bool    IsDoubleClickTextEdit() const { return mbDoubleClickTextEdit; }
     131             : 
     132           9 :     void        SetClickChangeRotation( sal_Bool bOn = sal_True ) { mbClickChangeRotation = bOn; }
     133           0 :     sal_Bool    IsClickChangeRotation() const { return mbClickChangeRotation; }
     134             : 
     135             :     /** Remember the type of the view shell that was (or soon will be)
     136             :         previously associated with this frame view.
     137             :         @param eType
     138             :             The type of the previous view shell or ViewShell::ST_NONE to
     139             :             indicate that there is no previous view shell.
     140             :     */
     141             :     void SetPreviousViewShellType (ViewShell::ShellType eType);
     142             : 
     143             :     /** Return the type of the view shell previously associated with this
     144             :         frame view.
     145             :     */
     146             :     ViewShell::ShellType GetPreviousViewShellType (void) const;
     147             : 
     148             :     /** Remember the type of the view shell at the time when the document is
     149             :         loaded or, rather, when the ViewShellBase is constructed.
     150             :     */
     151             :     void SetViewShellTypeOnLoad (ViewShell::ShellType eType);
     152             : 
     153             :     ViewShell::ShellType GetViewShellTypeOnLoad (void) const;
     154             : 
     155           0 :     void SetPresentationViewShellId(sal_uInt16 nId)
     156           0 :                  { mnPresViewShellId = nId; }
     157           0 :     sal_uInt16 GetPresentationViewShellId() const { return mnPresViewShellId; }
     158             : 
     159           0 :     void SetSlotId(sal_uInt16 nId) { mnSlotId = nId; }
     160             :     sal_uInt16 GetSlotId() const { return mnSlotId; }
     161             : 
     162           9 :     void SetSlidesPerRow(sal_uInt16 nSlides) { mnSlidesPerRow = nSlides; }
     163           0 :     sal_uInt16 GetSlidesPerRow() const { return mnSlidesPerRow; }
     164             : 
     165           0 :     void SetDrawMode(sal_uLong nNewDrawMode) { mnDrawMode = nNewDrawMode; };
     166           0 :     sal_uLong GetDrawMode() const { return mnDrawMode; };
     167             : 
     168           0 :     void SetTabCtrlPercent( double nPercent ) { mnTabCtrlPercent = nPercent; }
     169           0 :     double GetTabCtrlPercent() const { return mnTabCtrlPercent; }
     170             : 
     171             :     void SetIsNavigatorShowingAllShapes (const bool bIsNavigatorShowingAllShapes);
     172             :     bool IsNavigatorShowingAllShapes (void) const;
     173             : 
     174             :     virtual void    WriteUserDataSequence ( ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = sal_False );
     175             :     virtual void    ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = sal_False );
     176             : 
     177             : private:
     178             :     sal_uInt16          mnRefCount;
     179             :     VirtualDevice*  mpVDev;
     180             :     sal_Bool            mbRuler;
     181             :     SetOfByte       maVisibleLayers;
     182             :     SetOfByte       maLockedLayers;
     183             :     SetOfByte       maPrintableLayers;
     184             :     SdrHelpLineList maStandardHelpLines;
     185             :     SdrHelpLineList maNotesHelpLines;
     186             :     SdrHelpLineList maHandoutHelpLines;
     187             :     sal_Bool            mbNoColors;        // Gliederungsmodus
     188             :     sal_Bool            mbNoAttribs;       // Gliederungsmodus
     189             :     Rectangle       maVisArea;         // Sichtbarer Bereich
     190             :     PageKind        mePageKind;        // Seitentyp (Standard, Notizen, Handzettel)
     191             :     sal_uInt16          mnSelectedPage;    // Selektierte Seite
     192             :     PageKind        mePageKindOnLoad;
     193             :     sal_uInt16          mnSelectedPageOnLoad;
     194             :     EditMode        meStandardEditMode; // Editmode im Zeichenmodus (Page/MasterPage)
     195             :     EditMode        meNotesEditMode;    // Editmode im Notizen-Modus (Page/MasterPage)
     196             :     EditMode        meHandoutEditMode;  // Editmode im Handzettel-Modus (Page/MasterPage)
     197             :     EditMode        meEditModeOnLoad;
     198             :     sal_Bool            mbLayerMode;       // Layer an/aus
     199             :     sal_Bool            mbQuickEdit;       // QuickEdit an/aus
     200             :     sal_Bool            mbDoubleClickTextEdit; // Textmodus nach Doppelklick
     201             :     sal_Bool            mbClickChangeRotation; // Einfachklick wechselt Selektions-/Rotationsmodus
     202             :     sal_uInt16          mnPresViewShellId;  // ViewShell aus der die Pres. gestartet wurde
     203             :     sal_uInt16          mnSlotId;          // SlotId, welche initial ausgefuehrt wird
     204             :     sal_uInt16          mnSlidesPerRow;     // Dias pro Reihe auf dem Diatisch
     205             :     sal_uLong           mnDrawMode;        // Drawmode fuer das normale Fenster
     206             :     double          mnTabCtrlPercent;
     207             :     /** Remember whether the navigator shows all shapes (<TRUE/>) or only
     208             :         the names ones (<FALSE/>).  Not persistent.
     209             :     */
     210             :     bool            mbIsNavigatorShowingAllShapes;
     211             : 
     212             :     /** The type of the previous view shell.  The (default) value
     213             :         ViewShell::ST_NONE indicates that there was no previous view shell.
     214             :         Note that this value is used only temporarily and is not saved or
     215             :         restored.
     216             :     */
     217             :     ViewShell::ShellType mePreviousViewShellType;
     218             : 
     219             :     ViewShell::ShellType meViewShellTypeOnLoad;
     220             : };
     221             : 
     222             : } // end of namespace sd
     223             : 
     224             : #endif
     225             : 
     226             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10