1*c45d927aSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*c45d927aSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*c45d927aSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*c45d927aSAndrew Rist * distributed with this work for additional information 6*c45d927aSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*c45d927aSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*c45d927aSAndrew Rist * "License"); you may not use this file except in compliance 9*c45d927aSAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 11*c45d927aSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 13*c45d927aSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*c45d927aSAndrew Rist * software distributed under the License is distributed on an 15*c45d927aSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*c45d927aSAndrew Rist * KIND, either express or implied. See the License for the 17*c45d927aSAndrew Rist * specific language governing permissions and limitations 18*c45d927aSAndrew Rist * under the License. 19cdf0e10cSrcweir * 20*c45d927aSAndrew Rist *************************************************************/ 21*c45d927aSAndrew Rist 22*c45d927aSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef SD_FRAME_VIEW_HXX 25cdf0e10cSrcweir #define SD_FRAME_VIEW_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include "ViewShell.hxx" 28cdf0e10cSrcweir #include <svx/svdview.hxx> 29cdf0e10cSrcweir #include "pres.hxx" 30cdf0e10cSrcweir 31cdf0e10cSrcweir class SdDrawDocument; 32cdf0e10cSrcweir class SdOptions; 33cdf0e10cSrcweir 34cdf0e10cSrcweir namespace sd { 35cdf0e10cSrcweir 36cdf0e10cSrcweir /************************************************************************* 37cdf0e10cSrcweir |* 38cdf0e10cSrcweir |* View fuer den MDIFrame 39cdf0e10cSrcweir |* 40cdf0e10cSrcweir \************************************************************************/ 41cdf0e10cSrcweir class FrameView 42cdf0e10cSrcweir : public SdrView 43cdf0e10cSrcweir { 44cdf0e10cSrcweir public: 45cdf0e10cSrcweir SD_DLLPUBLIC FrameView(SdDrawDocument* pDrawDoc, FrameView* pFrameView = NULL ); 46cdf0e10cSrcweir FrameView(const FrameView& rFrameView); 47cdf0e10cSrcweir virtual ~FrameView(); 48cdf0e10cSrcweir 49cdf0e10cSrcweir void Connect(); 50cdf0e10cSrcweir void Disconnect(); 51cdf0e10cSrcweir 52cdf0e10cSrcweir void Update(SdOptions* pOptions); 53cdf0e10cSrcweir 54cdf0e10cSrcweir void SetStandardHelpLines(const SdrHelpLineList& rHelpLines) 55cdf0e10cSrcweir { maStandardHelpLines = rHelpLines; } 56cdf0e10cSrcweir const SdrHelpLineList& GetStandardHelpLines() { return maStandardHelpLines; } 57cdf0e10cSrcweir void SetNotesHelpLines(const SdrHelpLineList& rHelpLines) 58cdf0e10cSrcweir { maNotesHelpLines = rHelpLines; } 59cdf0e10cSrcweir const SdrHelpLineList& GetNotesHelpLines() { return maNotesHelpLines; } 60cdf0e10cSrcweir void SetHandoutHelpLines(const SdrHelpLineList& rHelpLines) 61cdf0e10cSrcweir { maHandoutHelpLines = rHelpLines; } 62cdf0e10cSrcweir const SdrHelpLineList& GetHandoutHelpLines() { return maHandoutHelpLines; } 63cdf0e10cSrcweir 64cdf0e10cSrcweir void SetVisibleLayers(const SetOfByte& rVisibleLayers) 65cdf0e10cSrcweir { maVisibleLayers = rVisibleLayers; } 66cdf0e10cSrcweir const SetOfByte& GetVisibleLayers() { return maVisibleLayers; } 67cdf0e10cSrcweir 68cdf0e10cSrcweir void SetLockedLayers(const SetOfByte& rLockedLayers) 69cdf0e10cSrcweir { maLockedLayers = rLockedLayers; } 70cdf0e10cSrcweir const SetOfByte& GetLockedLayers() { return maLockedLayers; } 71cdf0e10cSrcweir 72cdf0e10cSrcweir void SetPrintableLayers(const SetOfByte& rPrintableLayers) 73cdf0e10cSrcweir { maPrintableLayers = rPrintableLayers; } 74cdf0e10cSrcweir const SetOfByte& GetPrintableLayers() { return maPrintableLayers; } 75cdf0e10cSrcweir 76cdf0e10cSrcweir void SetRuler(const sal_Bool bRulerOn) 77cdf0e10cSrcweir { mbRuler = bRulerOn; } 78cdf0e10cSrcweir sal_Bool HasRuler() const { return mbRuler; } 79cdf0e10cSrcweir 80cdf0e10cSrcweir void SetNoColors(const sal_Bool bNoCol) 81cdf0e10cSrcweir { mbNoColors = bNoCol; } 82cdf0e10cSrcweir sal_Bool IsNoColors() const { return mbNoColors; } 83cdf0e10cSrcweir 84cdf0e10cSrcweir void SetNoAttribs(const sal_Bool bNoAttr) 85cdf0e10cSrcweir { mbNoAttribs = bNoAttr; } 86cdf0e10cSrcweir sal_Bool IsNoAttribs() const { return mbNoAttribs; } 87cdf0e10cSrcweir 88cdf0e10cSrcweir void SetVisArea(const Rectangle& rVisArea) 89cdf0e10cSrcweir { maVisArea = rVisArea; } 90cdf0e10cSrcweir const Rectangle GetVisArea() { return maVisArea; } 91cdf0e10cSrcweir 92cdf0e10cSrcweir void SetPageKind(PageKind eKind) { mePageKind = eKind; } 93cdf0e10cSrcweir PageKind GetPageKind() const { return mePageKind; } 94cdf0e10cSrcweir 95cdf0e10cSrcweir /** is used in FrameView::ReadUserDataSequence() only to store the 96cdf0e10cSrcweir page kind that was selected while last saving this document */ 97cdf0e10cSrcweir void SetPageKindOnLoad(PageKind eKind) { mePageKindOnLoad = eKind; } 98cdf0e10cSrcweir 99cdf0e10cSrcweir /** can be used to get the page kind that was selected on last save of this document */ 100cdf0e10cSrcweir PageKind GetPageKindOnLoad() const { return mePageKindOnLoad; } 101cdf0e10cSrcweir 102cdf0e10cSrcweir SD_DLLPUBLIC void SetSelectedPage (sal_uInt16 nPage); 103cdf0e10cSrcweir sal_uInt16 GetSelectedPage () const; 104cdf0e10cSrcweir 105cdf0e10cSrcweir /** is used in FrameView::ReadUserDataSequence() only to store the 106cdf0e10cSrcweir page that was selected while last saving this document */ 107cdf0e10cSrcweir void SetSelectedPageOnLoad (sal_uInt16 nPage) { mnSelectedPageOnLoad = nPage; } 108cdf0e10cSrcweir 109cdf0e10cSrcweir /** can be used to get the page that was selected on last save of this document */ 110cdf0e10cSrcweir sal_uInt16 GetSelectedPageOnLoad () const { return mnSelectedPageOnLoad; } 111cdf0e10cSrcweir 112cdf0e10cSrcweir SD_DLLPUBLIC void SetViewShEditMode(EditMode eMode, PageKind eKind); 113cdf0e10cSrcweir EditMode GetViewShEditMode (PageKind eKind); 114cdf0e10cSrcweir 115cdf0e10cSrcweir /** Remember the edit mode of the main view shell at the time when the 116cdf0e10cSrcweir document is loaded. 117cdf0e10cSrcweir */ 118cdf0e10cSrcweir void SetViewShEditModeOnLoad (const EditMode eMode); 119cdf0e10cSrcweir 120cdf0e10cSrcweir /** Return the value of the edit mode as it was when the document was 121cdf0e10cSrcweir loaded. 122cdf0e10cSrcweir */ 123cdf0e10cSrcweir EditMode GetViewShEditModeOnLoad (void) const; 124cdf0e10cSrcweir 125cdf0e10cSrcweir void SetLayerMode(sal_Bool bMode) 126cdf0e10cSrcweir { mbLayerMode = bMode; } 127cdf0e10cSrcweir sal_Bool IsLayerMode() const { return mbLayerMode; } 128cdf0e10cSrcweir 129cdf0e10cSrcweir void SetQuickEdit(sal_Bool bQEdit) 130cdf0e10cSrcweir { mbQuickEdit = bQEdit; } 131cdf0e10cSrcweir sal_Bool IsQuickEdit() const { return mbQuickEdit; } 132cdf0e10cSrcweir 133cdf0e10cSrcweir void SetBigHandles( sal_Bool bOn = sal_True ) { mbBigHandles = bOn; } 134cdf0e10cSrcweir sal_Bool IsBigHandles() const { return mbBigHandles; } 135cdf0e10cSrcweir 136cdf0e10cSrcweir void SetDoubleClickTextEdit( sal_Bool bOn = sal_True ) { mbDoubleClickTextEdit = bOn; } 137cdf0e10cSrcweir sal_Bool IsDoubleClickTextEdit() const { return mbDoubleClickTextEdit; } 138cdf0e10cSrcweir 139cdf0e10cSrcweir void SetClickChangeRotation( sal_Bool bOn = sal_True ) { mbClickChangeRotation = bOn; } 140cdf0e10cSrcweir sal_Bool IsClickChangeRotation() const { return mbClickChangeRotation; } 141cdf0e10cSrcweir 142cdf0e10cSrcweir /** Remember the type of the view shell that was (or soon will be) 143cdf0e10cSrcweir previously associated with this frame view. 144cdf0e10cSrcweir @param eType 145cdf0e10cSrcweir The type of the previous view shell or ViewShell::ST_NONE to 146cdf0e10cSrcweir indicate that there is no previous view shell. 147cdf0e10cSrcweir */ 148cdf0e10cSrcweir void SetPreviousViewShellType (ViewShell::ShellType eType); 149cdf0e10cSrcweir 150cdf0e10cSrcweir /** Return the type of the view shell previously associated with this 151cdf0e10cSrcweir frame view. 152cdf0e10cSrcweir */ 153cdf0e10cSrcweir ViewShell::ShellType GetPreviousViewShellType (void) const; 154cdf0e10cSrcweir 155cdf0e10cSrcweir /** Remember the type of the view shell at the time when the document is 156cdf0e10cSrcweir loaded or, rather, when the ViewShellBase is constructed. 157cdf0e10cSrcweir */ 158cdf0e10cSrcweir void SetViewShellTypeOnLoad (ViewShell::ShellType eType); 159cdf0e10cSrcweir 160cdf0e10cSrcweir ViewShell::ShellType GetViewShellTypeOnLoad (void) const; 161cdf0e10cSrcweir 162cdf0e10cSrcweir void SetPresentationViewShellId(sal_uInt16 nId) 163cdf0e10cSrcweir { mnPresViewShellId = nId; } 164cdf0e10cSrcweir sal_uInt16 GetPresentationViewShellId() const { return mnPresViewShellId; } 165cdf0e10cSrcweir 166cdf0e10cSrcweir void SetSlotId(sal_uInt16 nId) { mnSlotId = nId; } 167cdf0e10cSrcweir sal_uInt16 GetSlotId() const { return mnSlotId; } 168cdf0e10cSrcweir 169cdf0e10cSrcweir void SetSlidesPerRow(sal_uInt16 nSlides) { mnSlidesPerRow = nSlides; } 170cdf0e10cSrcweir sal_uInt16 GetSlidesPerRow() const { return mnSlidesPerRow; } 171cdf0e10cSrcweir 172cdf0e10cSrcweir void SetDrawMode(sal_uLong nNewDrawMode) { mnDrawMode = nNewDrawMode; }; 173cdf0e10cSrcweir sal_uLong GetDrawMode() const { return mnDrawMode; }; 174cdf0e10cSrcweir 175cdf0e10cSrcweir void SetTabCtrlPercent( double nPercent ) { mnTabCtrlPercent = nPercent; } 176cdf0e10cSrcweir double GetTabCtrlPercent() const { return mnTabCtrlPercent; } 177cdf0e10cSrcweir 178cdf0e10cSrcweir void SetIsNavigatorShowingAllShapes (const bool bIsNavigatorShowingAllShapes); 179cdf0e10cSrcweir bool IsNavigatorShowingAllShapes (void) const; 180cdf0e10cSrcweir 181cdf0e10cSrcweir virtual void WriteUserDataSequence ( ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = sal_False ); 182cdf0e10cSrcweir virtual void ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = sal_False ); 183cdf0e10cSrcweir 184cdf0e10cSrcweir private: 185cdf0e10cSrcweir sal_uInt16 mnRefCount; 186cdf0e10cSrcweir VirtualDevice* mpVDev; 187cdf0e10cSrcweir sal_Bool mbRuler; 188cdf0e10cSrcweir SetOfByte maVisibleLayers; 189cdf0e10cSrcweir SetOfByte maLockedLayers; 190cdf0e10cSrcweir SetOfByte maPrintableLayers; 191cdf0e10cSrcweir SdrHelpLineList maStandardHelpLines; 192cdf0e10cSrcweir SdrHelpLineList maNotesHelpLines; 193cdf0e10cSrcweir SdrHelpLineList maHandoutHelpLines; 194cdf0e10cSrcweir sal_Bool mbNoColors; // Gliederungsmodus 195cdf0e10cSrcweir sal_Bool mbNoAttribs; // Gliederungsmodus 196cdf0e10cSrcweir Rectangle maVisArea; // Sichtbarer Bereich 197cdf0e10cSrcweir PageKind mePageKind; // Seitentyp (Standard, Notizen, Handzettel) 198cdf0e10cSrcweir sal_uInt16 mnSelectedPage; // Selektierte Seite 199cdf0e10cSrcweir PageKind mePageKindOnLoad; 200cdf0e10cSrcweir sal_uInt16 mnSelectedPageOnLoad; 201cdf0e10cSrcweir EditMode meStandardEditMode; // Editmode im Zeichenmodus (Page/MasterPage) 202cdf0e10cSrcweir EditMode meNotesEditMode; // Editmode im Notizen-Modus (Page/MasterPage) 203cdf0e10cSrcweir EditMode meHandoutEditMode; // Editmode im Handzettel-Modus (Page/MasterPage) 204cdf0e10cSrcweir EditMode meEditModeOnLoad; 205cdf0e10cSrcweir sal_Bool mbLayerMode; // Layer an/aus 206cdf0e10cSrcweir sal_Bool mbQuickEdit; // QuickEdit an/aus 207cdf0e10cSrcweir sal_Bool mbBigHandles; // Grosse Handles 208cdf0e10cSrcweir sal_Bool mbDoubleClickTextEdit; // Textmodus nach Doppelklick 209cdf0e10cSrcweir sal_Bool mbClickChangeRotation; // Einfachklick wechselt Selektions-/Rotationsmodus 210cdf0e10cSrcweir sal_uInt16 mnPresViewShellId; // ViewShell aus der die Pres. gestartet wurde 211cdf0e10cSrcweir sal_uInt16 mnSlotId; // SlotId, welche initial ausgefuehrt wird 212cdf0e10cSrcweir sal_uInt16 mnSlidesPerRow; // Dias pro Reihe auf dem Diatisch 213cdf0e10cSrcweir sal_uLong mnDrawMode; // Drawmode fuer das normale Fenster 214cdf0e10cSrcweir double mnTabCtrlPercent; 215cdf0e10cSrcweir /** Remember whether the navigator shows all shapes (<TRUE/>) or only 216cdf0e10cSrcweir the names ones (<FALSE/>). Not persistent. 217cdf0e10cSrcweir */ 218cdf0e10cSrcweir bool mbIsNavigatorShowingAllShapes; 219cdf0e10cSrcweir 220cdf0e10cSrcweir /** The type of the previous view shell. The (default) value 221cdf0e10cSrcweir ViewShell::ST_NONE indicates that there was no previous view shell. 222cdf0e10cSrcweir Note that this value is used only temporarily and is not saved or 223cdf0e10cSrcweir restored. 224cdf0e10cSrcweir */ 225cdf0e10cSrcweir ViewShell::ShellType mePreviousViewShellType; 226cdf0e10cSrcweir 227cdf0e10cSrcweir ViewShell::ShellType meViewShellTypeOnLoad; 228cdf0e10cSrcweir }; 229cdf0e10cSrcweir 230cdf0e10cSrcweir } // end of namespace sd 231cdf0e10cSrcweir 232cdf0e10cSrcweir #endif 233cdf0e10cSrcweir 234