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 10*c45d927aSAndrew Rist * 11*c45d927aSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*c45d927aSAndrew Rist * 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. 19*c45d927aSAndrew Rist * 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 SetStandardHelpLines(const SdrHelpLineList & rHelpLines)54cdf0e10cSrcweir void SetStandardHelpLines(const SdrHelpLineList& rHelpLines) 55cdf0e10cSrcweir { maStandardHelpLines = rHelpLines; } GetStandardHelpLines()56cdf0e10cSrcweir const SdrHelpLineList& GetStandardHelpLines() { return maStandardHelpLines; } SetNotesHelpLines(const SdrHelpLineList & rHelpLines)57cdf0e10cSrcweir void SetNotesHelpLines(const SdrHelpLineList& rHelpLines) 58cdf0e10cSrcweir { maNotesHelpLines = rHelpLines; } GetNotesHelpLines()59cdf0e10cSrcweir const SdrHelpLineList& GetNotesHelpLines() { return maNotesHelpLines; } SetHandoutHelpLines(const SdrHelpLineList & rHelpLines)60cdf0e10cSrcweir void SetHandoutHelpLines(const SdrHelpLineList& rHelpLines) 61cdf0e10cSrcweir { maHandoutHelpLines = rHelpLines; } GetHandoutHelpLines()62cdf0e10cSrcweir const SdrHelpLineList& GetHandoutHelpLines() { return maHandoutHelpLines; } 63cdf0e10cSrcweir SetVisibleLayers(const SetOfByte & rVisibleLayers)64cdf0e10cSrcweir void SetVisibleLayers(const SetOfByte& rVisibleLayers) 65cdf0e10cSrcweir { maVisibleLayers = rVisibleLayers; } GetVisibleLayers()66cdf0e10cSrcweir const SetOfByte& GetVisibleLayers() { return maVisibleLayers; } 67cdf0e10cSrcweir SetLockedLayers(const SetOfByte & rLockedLayers)68cdf0e10cSrcweir void SetLockedLayers(const SetOfByte& rLockedLayers) 69cdf0e10cSrcweir { maLockedLayers = rLockedLayers; } GetLockedLayers()70cdf0e10cSrcweir const SetOfByte& GetLockedLayers() { return maLockedLayers; } 71cdf0e10cSrcweir SetPrintableLayers(const SetOfByte & rPrintableLayers)72cdf0e10cSrcweir void SetPrintableLayers(const SetOfByte& rPrintableLayers) 73cdf0e10cSrcweir { maPrintableLayers = rPrintableLayers; } GetPrintableLayers()74cdf0e10cSrcweir const SetOfByte& GetPrintableLayers() { return maPrintableLayers; } 75cdf0e10cSrcweir SetRuler(const sal_Bool bRulerOn)76cdf0e10cSrcweir void SetRuler(const sal_Bool bRulerOn) 77cdf0e10cSrcweir { mbRuler = bRulerOn; } HasRuler() const78cdf0e10cSrcweir sal_Bool HasRuler() const { return mbRuler; } 79cdf0e10cSrcweir SetNoColors(const sal_Bool bNoCol)80cdf0e10cSrcweir void SetNoColors(const sal_Bool bNoCol) 81cdf0e10cSrcweir { mbNoColors = bNoCol; } IsNoColors() const82cdf0e10cSrcweir sal_Bool IsNoColors() const { return mbNoColors; } 83cdf0e10cSrcweir SetNoAttribs(const sal_Bool bNoAttr)84cdf0e10cSrcweir void SetNoAttribs(const sal_Bool bNoAttr) 85cdf0e10cSrcweir { mbNoAttribs = bNoAttr; } IsNoAttribs() const86cdf0e10cSrcweir sal_Bool IsNoAttribs() const { return mbNoAttribs; } 87cdf0e10cSrcweir SetVisArea(const Rectangle & rVisArea)88cdf0e10cSrcweir void SetVisArea(const Rectangle& rVisArea) 89cdf0e10cSrcweir { maVisArea = rVisArea; } GetVisArea()90cdf0e10cSrcweir const Rectangle GetVisArea() { return maVisArea; } 91cdf0e10cSrcweir SetPageKind(PageKind eKind)92cdf0e10cSrcweir void SetPageKind(PageKind eKind) { mePageKind = eKind; } GetPageKind() const93cdf0e10cSrcweir 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 */ SetPageKindOnLoad(PageKind eKind)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 */ GetPageKindOnLoad() const100cdf0e10cSrcweir 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 */ SetSelectedPageOnLoad(sal_uInt16 nPage)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 */ GetSelectedPageOnLoad() const110cdf0e10cSrcweir 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 SetLayerMode(sal_Bool bMode)125cdf0e10cSrcweir void SetLayerMode(sal_Bool bMode) 126cdf0e10cSrcweir { mbLayerMode = bMode; } IsLayerMode() const127cdf0e10cSrcweir sal_Bool IsLayerMode() const { return mbLayerMode; } 128cdf0e10cSrcweir SetQuickEdit(sal_Bool bQEdit)129cdf0e10cSrcweir void SetQuickEdit(sal_Bool bQEdit) 130cdf0e10cSrcweir { mbQuickEdit = bQEdit; } IsQuickEdit() const131cdf0e10cSrcweir sal_Bool IsQuickEdit() const { return mbQuickEdit; } 132cdf0e10cSrcweir SetBigHandles(sal_Bool bOn=sal_True)133cdf0e10cSrcweir void SetBigHandles( sal_Bool bOn = sal_True ) { mbBigHandles = bOn; } IsBigHandles() const134cdf0e10cSrcweir sal_Bool IsBigHandles() const { return mbBigHandles; } 135cdf0e10cSrcweir SetDoubleClickTextEdit(sal_Bool bOn=sal_True)136cdf0e10cSrcweir void SetDoubleClickTextEdit( sal_Bool bOn = sal_True ) { mbDoubleClickTextEdit = bOn; } IsDoubleClickTextEdit() const137cdf0e10cSrcweir sal_Bool IsDoubleClickTextEdit() const { return mbDoubleClickTextEdit; } 138cdf0e10cSrcweir SetClickChangeRotation(sal_Bool bOn=sal_True)139cdf0e10cSrcweir void SetClickChangeRotation( sal_Bool bOn = sal_True ) { mbClickChangeRotation = bOn; } IsClickChangeRotation() const140cdf0e10cSrcweir 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 SetPresentationViewShellId(sal_uInt16 nId)162cdf0e10cSrcweir void SetPresentationViewShellId(sal_uInt16 nId) 163cdf0e10cSrcweir { mnPresViewShellId = nId; } GetPresentationViewShellId() const164cdf0e10cSrcweir sal_uInt16 GetPresentationViewShellId() const { return mnPresViewShellId; } 165cdf0e10cSrcweir SetSlotId(sal_uInt16 nId)166cdf0e10cSrcweir void SetSlotId(sal_uInt16 nId) { mnSlotId = nId; } GetSlotId() const167cdf0e10cSrcweir sal_uInt16 GetSlotId() const { return mnSlotId; } 168cdf0e10cSrcweir SetSlidesPerRow(sal_uInt16 nSlides)169cdf0e10cSrcweir void SetSlidesPerRow(sal_uInt16 nSlides) { mnSlidesPerRow = nSlides; } GetSlidesPerRow() const170cdf0e10cSrcweir sal_uInt16 GetSlidesPerRow() const { return mnSlidesPerRow; } 171cdf0e10cSrcweir SetDrawMode(sal_uLong nNewDrawMode)172cdf0e10cSrcweir void SetDrawMode(sal_uLong nNewDrawMode) { mnDrawMode = nNewDrawMode; }; GetDrawMode() const173cdf0e10cSrcweir sal_uLong GetDrawMode() const { return mnDrawMode; }; 174cdf0e10cSrcweir SetTabCtrlPercent(double nPercent)175cdf0e10cSrcweir void SetTabCtrlPercent( double nPercent ) { mnTabCtrlPercent = nPercent; } GetTabCtrlPercent() const176cdf0e10cSrcweir 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