LCOV - code coverage report
Current view: top level - sd/source/ui/inc - FrameView.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 46 56 82.1 %
Date: 2012-08-25 Functions: 36 43 83.7 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      12                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      14                 :            :  * only, as published by the Free Software Foundation.
      15                 :            :  *
      16                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      17                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19                 :            :  * GNU Lesser General Public License version 3 for more details
      20                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      21                 :            :  *
      22                 :            :  * You should have received a copy of the GNU Lesser General Public License
      23                 :            :  * version 3 along with OpenOffice.org.  If not, see
      24                 :            :  * <http://www.openoffice.org/license.html>
      25                 :            :  * for a copy of the LGPLv3 License.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : 
      29                 :            : #ifndef SD_FRAME_VIEW_HXX
      30                 :            : #define SD_FRAME_VIEW_HXX
      31                 :            : 
      32                 :            : #include "ViewShell.hxx"
      33                 :            : #include <svx/svdview.hxx>
      34                 :            : #include "pres.hxx"
      35                 :            : 
      36                 :            : class SdDrawDocument;
      37                 :            : class SdOptions;
      38                 :            : 
      39                 :            : namespace sd {
      40                 :            : 
      41                 :            : /*************************************************************************
      42                 :            : |*
      43                 :            : |* View fuer den MDIFrame
      44                 :            : |*
      45                 :            : \************************************************************************/
      46                 :            : class SD_DLLPUBLIC FrameView
      47                 :            :     : public SdrView
      48                 :            : {
      49                 :            : public:
      50                 :            :     FrameView(SdDrawDocument* pDrawDoc, FrameView* pFrameView = NULL );
      51                 :            :     FrameView(const FrameView& rFrameView);
      52                 :            :     virtual ~FrameView();
      53                 :            : 
      54                 :            :     void Connect();
      55                 :            :     void Disconnect();
      56                 :            : 
      57                 :            :     void Update(SdOptions* pOptions);
      58                 :            : 
      59                 :        952 :     void  SetStandardHelpLines(const SdrHelpLineList& rHelpLines)
      60                 :        952 :                              { maStandardHelpLines = rHelpLines; }
      61                 :        682 :     const SdrHelpLineList& GetStandardHelpLines() { return maStandardHelpLines; }
      62                 :          0 :     void  SetNotesHelpLines(const SdrHelpLineList& rHelpLines)
      63                 :          0 :                              { maNotesHelpLines = rHelpLines; }
      64                 :        134 :     const SdrHelpLineList& GetNotesHelpLines() { return maNotesHelpLines; }
      65                 :          0 :     void  SetHandoutHelpLines(const SdrHelpLineList& rHelpLines)
      66                 :          0 :                              { maHandoutHelpLines = rHelpLines; }
      67                 :        134 :     const SdrHelpLineList& GetHandoutHelpLines() { return maHandoutHelpLines; }
      68                 :            : 
      69                 :        117 :     void SetVisibleLayers(const SetOfByte& rVisibleLayers)
      70                 :        117 :                          { maVisibleLayers = rVisibleLayers; }
      71                 :       1621 :     const SetOfByte& GetVisibleLayers() { return maVisibleLayers; }
      72                 :            : 
      73                 :        117 :     void SetLockedLayers(const SetOfByte& rLockedLayers)
      74                 :        117 :                         { maLockedLayers = rLockedLayers; }
      75                 :       1621 :     const SetOfByte& GetLockedLayers() { return maLockedLayers; }
      76                 :            : 
      77                 :        117 :     void SetPrintableLayers(const SetOfByte& rPrintableLayers)
      78                 :        117 :                          { maPrintableLayers = rPrintableLayers; }
      79                 :       1621 :     const SetOfByte& GetPrintableLayers() { return maPrintableLayers; }
      80                 :            : 
      81                 :       1072 :     void SetRuler(const sal_Bool bRulerOn)
      82                 :       1072 :                  { mbRuler = bRulerOn; }
      83                 :        773 :     sal_Bool HasRuler() const { return mbRuler; }
      84                 :            : 
      85                 :        133 :     void SetNoColors(const sal_Bool bNoCol)
      86                 :        133 :                  { mbNoColors = bNoCol; }
      87                 :        134 :     sal_Bool IsNoColors() const { return mbNoColors; }
      88                 :            : 
      89                 :        133 :     void SetNoAttribs(const sal_Bool bNoAttr)
      90                 :        133 :                  { mbNoAttribs = bNoAttr; }
      91                 :        134 :     sal_Bool IsNoAttribs() const { return mbNoAttribs; }
      92                 :            : 
      93                 :       1471 :     void SetVisArea(const Rectangle& rVisArea)
      94                 :       1471 :                  { maVisArea = rVisArea; }
      95                 :        666 :     const Rectangle GetVisArea() { return maVisArea; }
      96                 :            : 
      97                 :        145 :     void SetPageKind(PageKind eKind) { mePageKind = eKind; }
      98                 :        264 :     PageKind GetPageKind() const { return mePageKind; }
      99                 :            : 
     100                 :            :     /** is used in FrameView::ReadUserDataSequence() only to store the
     101                 :            :         page kind that was selected while last saving this document */
     102                 :        133 :     void SetPageKindOnLoad(PageKind eKind) { mePageKindOnLoad = eKind; }
     103                 :            : 
     104                 :            :     /** can be used to get the page kind that was selected on last save of this document */
     105                 :        133 :     PageKind GetPageKindOnLoad() const { return mePageKindOnLoad; }
     106                 :            : 
     107                 :            :     void SetSelectedPage (sal_uInt16 nPage);
     108                 :            :     sal_uInt16 GetSelectedPage () const;
     109                 :            : 
     110                 :            :     /** is used in FrameView::ReadUserDataSequence() only to store the
     111                 :            :         page that was selected while last saving this document */
     112                 :        133 :     void SetSelectedPageOnLoad (sal_uInt16 nPage) { mnSelectedPageOnLoad = nPage; }
     113                 :            : 
     114                 :            :     /** can be used to get the page that was selected on last save of this document */
     115                 :          0 :     sal_uInt16 GetSelectedPageOnLoad () const { return mnSelectedPageOnLoad; }
     116                 :            : 
     117                 :            :     void SetViewShEditMode(EditMode eMode, PageKind eKind);
     118                 :            :     EditMode GetViewShEditMode (PageKind eKind);
     119                 :            : 
     120                 :            :     /** Remember the edit mode of the main view shell at the time when the
     121                 :            :         document is loaded.
     122                 :            :     */
     123                 :            :     void SetViewShEditModeOnLoad (const EditMode eMode);
     124                 :            : 
     125                 :            :     /** Return the value of the edit mode as it was when the document was
     126                 :            :         loaded.
     127                 :            :     */
     128                 :            :     EditMode GetViewShEditModeOnLoad (void) const;
     129                 :            : 
     130                 :       1072 :     void SetLayerMode(sal_Bool bMode)
     131                 :       1072 :                  { mbLayerMode = bMode; }
     132                 :        669 :     sal_Bool IsLayerMode() const { return mbLayerMode; }
     133                 :            : 
     134                 :       1240 :     void SetQuickEdit(sal_Bool bQEdit)
     135                 :       1240 :                  { mbQuickEdit = bQEdit; }
     136                 :        535 :     sal_Bool IsQuickEdit() const { return mbQuickEdit; }
     137                 :            : 
     138                 :        434 :     void        SetDoubleClickTextEdit( sal_Bool bOn = sal_True ) { mbDoubleClickTextEdit = bOn; }
     139                 :        170 :     sal_Bool    IsDoubleClickTextEdit() const { return mbDoubleClickTextEdit; }
     140                 :            : 
     141                 :        434 :     void        SetClickChangeRotation( sal_Bool bOn = sal_True ) { mbClickChangeRotation = bOn; }
     142                 :        170 :     sal_Bool    IsClickChangeRotation() const { return mbClickChangeRotation; }
     143                 :            : 
     144                 :            :     /** Remember the type of the view shell that was (or soon will be)
     145                 :            :         previously associated with this frame view.
     146                 :            :         @param eType
     147                 :            :             The type of the previous view shell or ViewShell::ST_NONE to
     148                 :            :             indicate that there is no previous view shell.
     149                 :            :     */
     150                 :            :     void SetPreviousViewShellType (ViewShell::ShellType eType);
     151                 :            : 
     152                 :            :     /** Return the type of the view shell previously associated with this
     153                 :            :         frame view.
     154                 :            :     */
     155                 :            :     ViewShell::ShellType GetPreviousViewShellType (void) const;
     156                 :            : 
     157                 :            :     /** Remember the type of the view shell at the time when the document is
     158                 :            :         loaded or, rather, when the ViewShellBase is constructed.
     159                 :            :     */
     160                 :            :     void SetViewShellTypeOnLoad (ViewShell::ShellType eType);
     161                 :            : 
     162                 :            :     ViewShell::ShellType GetViewShellTypeOnLoad (void) const;
     163                 :            : 
     164                 :          0 :     void SetPresentationViewShellId(sal_uInt16 nId)
     165                 :          0 :                  { mnPresViewShellId = nId; }
     166                 :          0 :     sal_uInt16 GetPresentationViewShellId() const { return mnPresViewShellId; }
     167                 :            : 
     168                 :          0 :     void SetSlotId(sal_uInt16 nId) { mnSlotId = nId; }
     169                 :            :     sal_uInt16 GetSlotId() const { return mnSlotId; }
     170                 :            : 
     171                 :        839 :     void SetSlidesPerRow(sal_uInt16 nSlides) { mnSlidesPerRow = nSlides; }
     172                 :        409 :     sal_uInt16 GetSlidesPerRow() const { return mnSlidesPerRow; }
     173                 :            : 
     174                 :          0 :     void SetDrawMode(sal_uLong nNewDrawMode) { mnDrawMode = nNewDrawMode; };
     175                 :       2154 :     sal_uLong GetDrawMode() const { return mnDrawMode; };
     176                 :            : 
     177                 :        319 :     void SetTabCtrlPercent( double nPercent ) { mnTabCtrlPercent = nPercent; }
     178                 :        104 :     double GetTabCtrlPercent() const { return mnTabCtrlPercent; }
     179                 :            : 
     180                 :            :     void SetIsNavigatorShowingAllShapes (const bool bIsNavigatorShowingAllShapes);
     181                 :            :     bool IsNavigatorShowingAllShapes (void) const;
     182                 :            : 
     183                 :            :     virtual void    WriteUserDataSequence ( ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = sal_False );
     184                 :            :     virtual void    ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = sal_False );
     185                 :            : 
     186                 :            : private:
     187                 :            :     sal_uInt16          mnRefCount;
     188                 :            :     VirtualDevice*  mpVDev;
     189                 :            :     sal_Bool            mbRuler;
     190                 :            :     SetOfByte       maVisibleLayers;
     191                 :            :     SetOfByte       maLockedLayers;
     192                 :            :     SetOfByte       maPrintableLayers;
     193                 :            :     SdrHelpLineList maStandardHelpLines;
     194                 :            :     SdrHelpLineList maNotesHelpLines;
     195                 :            :     SdrHelpLineList maHandoutHelpLines;
     196                 :            :     sal_Bool            mbNoColors;        // Gliederungsmodus
     197                 :            :     sal_Bool            mbNoAttribs;       // Gliederungsmodus
     198                 :            :     Rectangle       maVisArea;         // Sichtbarer Bereich
     199                 :            :     PageKind        mePageKind;        // Seitentyp (Standard, Notizen, Handzettel)
     200                 :            :     sal_uInt16          mnSelectedPage;    // Selektierte Seite
     201                 :            :     PageKind        mePageKindOnLoad;
     202                 :            :     sal_uInt16          mnSelectedPageOnLoad;
     203                 :            :     EditMode        meStandardEditMode; // Editmode im Zeichenmodus (Page/MasterPage)
     204                 :            :     EditMode        meNotesEditMode;    // Editmode im Notizen-Modus (Page/MasterPage)
     205                 :            :     EditMode        meHandoutEditMode;  // Editmode im Handzettel-Modus (Page/MasterPage)
     206                 :            :     EditMode        meEditModeOnLoad;
     207                 :            :     sal_Bool            mbLayerMode;       // Layer an/aus
     208                 :            :     sal_Bool            mbQuickEdit;       // QuickEdit an/aus
     209                 :            :     sal_Bool            mbDoubleClickTextEdit; // Textmodus nach Doppelklick
     210                 :            :     sal_Bool            mbClickChangeRotation; // Einfachklick wechselt Selektions-/Rotationsmodus
     211                 :            :     sal_uInt16          mnPresViewShellId;  // ViewShell aus der die Pres. gestartet wurde
     212                 :            :     sal_uInt16          mnSlotId;          // SlotId, welche initial ausgefuehrt wird
     213                 :            :     sal_uInt16          mnSlidesPerRow;     // Dias pro Reihe auf dem Diatisch
     214                 :            :     sal_uLong           mnDrawMode;        // Drawmode fuer das normale Fenster
     215                 :            :     double          mnTabCtrlPercent;
     216                 :            :     /** Remember whether the navigator shows all shapes (<TRUE/>) or only
     217                 :            :         the names ones (<FALSE/>).  Not persistent.
     218                 :            :     */
     219                 :            :     bool            mbIsNavigatorShowingAllShapes;
     220                 :            : 
     221                 :            :     /** The type of the previous view shell.  The (default) value
     222                 :            :         ViewShell::ST_NONE indicates that there was no previous view shell.
     223                 :            :         Note that this value is used only temporarily and is not saved or
     224                 :            :         restored.
     225                 :            :     */
     226                 :            :     ViewShell::ShellType mePreviousViewShellType;
     227                 :            : 
     228                 :            :     ViewShell::ShellType meViewShellTypeOnLoad;
     229                 :            : };
     230                 :            : 
     231                 :            : } // end of namespace sd
     232                 :            : 
     233                 :            : #endif
     234                 :            : 
     235                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10