2010-10-27 12:53:26 +01:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-11-27 16:10:40 +00:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2004-01-20 10:33:31 +00:00
|
|
|
|
|
|
|
#ifndef SD_FRAME_VIEW_HXX
|
|
|
|
#define SD_FRAME_VIEW_HXX
|
|
|
|
|
|
|
|
#include "ViewShell.hxx"
|
|
|
|
#include <svx/svdview.hxx>
|
|
|
|
#include "pres.hxx"
|
|
|
|
|
|
|
|
class SdDrawDocument;
|
|
|
|
class SdOptions;
|
|
|
|
|
|
|
|
namespace sd {
|
|
|
|
|
2013-03-13 17:55:26 +01:00
|
|
|
/**
|
|
|
|
* View for MDIFrame
|
|
|
|
*/
|
2011-06-13 05:51:12 +02:00
|
|
|
class SD_DLLPUBLIC FrameView
|
2004-01-20 10:33:31 +00:00
|
|
|
: public SdrView
|
|
|
|
{
|
|
|
|
public:
|
2011-06-13 05:51:12 +02:00
|
|
|
FrameView(SdDrawDocument* pDrawDoc, FrameView* pFrameView = NULL );
|
2004-01-20 10:33:31 +00:00
|
|
|
FrameView(const FrameView& rFrameView);
|
|
|
|
virtual ~FrameView();
|
|
|
|
|
|
|
|
void Connect();
|
|
|
|
void Disconnect();
|
|
|
|
|
|
|
|
void Update(SdOptions* pOptions);
|
|
|
|
|
|
|
|
void SetStandardHelpLines(const SdrHelpLineList& rHelpLines)
|
2006-12-12 16:33:25 +00:00
|
|
|
{ maStandardHelpLines = rHelpLines; }
|
|
|
|
const SdrHelpLineList& GetStandardHelpLines() { return maStandardHelpLines; }
|
2004-01-20 10:33:31 +00:00
|
|
|
void SetNotesHelpLines(const SdrHelpLineList& rHelpLines)
|
2006-12-12 16:33:25 +00:00
|
|
|
{ maNotesHelpLines = rHelpLines; }
|
|
|
|
const SdrHelpLineList& GetNotesHelpLines() { return maNotesHelpLines; }
|
2004-01-20 10:33:31 +00:00
|
|
|
void SetHandoutHelpLines(const SdrHelpLineList& rHelpLines)
|
2006-12-12 16:33:25 +00:00
|
|
|
{ maHandoutHelpLines = rHelpLines; }
|
|
|
|
const SdrHelpLineList& GetHandoutHelpLines() { return maHandoutHelpLines; }
|
2004-01-20 10:33:31 +00:00
|
|
|
|
|
|
|
void SetVisibleLayers(const SetOfByte& rVisibleLayers)
|
2006-12-12 16:33:25 +00:00
|
|
|
{ maVisibleLayers = rVisibleLayers; }
|
|
|
|
const SetOfByte& GetVisibleLayers() { return maVisibleLayers; }
|
2004-01-20 10:33:31 +00:00
|
|
|
|
|
|
|
void SetLockedLayers(const SetOfByte& rLockedLayers)
|
2006-12-12 16:33:25 +00:00
|
|
|
{ maLockedLayers = rLockedLayers; }
|
|
|
|
const SetOfByte& GetLockedLayers() { return maLockedLayers; }
|
2004-01-20 10:33:31 +00:00
|
|
|
|
|
|
|
void SetPrintableLayers(const SetOfByte& rPrintableLayers)
|
2006-12-12 16:33:25 +00:00
|
|
|
{ maPrintableLayers = rPrintableLayers; }
|
|
|
|
const SetOfByte& GetPrintableLayers() { return maPrintableLayers; }
|
2004-01-20 10:33:31 +00:00
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
void SetRuler(const sal_Bool bRulerOn)
|
2006-12-12 16:33:25 +00:00
|
|
|
{ mbRuler = bRulerOn; }
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_Bool HasRuler() const { return mbRuler; }
|
2004-01-20 10:33:31 +00:00
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
void SetNoColors(const sal_Bool bNoCol)
|
2006-12-12 16:33:25 +00:00
|
|
|
{ mbNoColors = bNoCol; }
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_Bool IsNoColors() const { return mbNoColors; }
|
2004-01-20 10:33:31 +00:00
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
void SetNoAttribs(const sal_Bool bNoAttr)
|
2006-12-12 16:33:25 +00:00
|
|
|
{ mbNoAttribs = bNoAttr; }
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_Bool IsNoAttribs() const { return mbNoAttribs; }
|
2004-01-20 10:33:31 +00:00
|
|
|
|
|
|
|
void SetVisArea(const Rectangle& rVisArea)
|
2006-12-12 16:33:25 +00:00
|
|
|
{ maVisArea = rVisArea; }
|
|
|
|
const Rectangle GetVisArea() { return maVisArea; }
|
2004-01-20 10:33:31 +00:00
|
|
|
|
2006-12-12 16:33:25 +00:00
|
|
|
void SetPageKind(PageKind eKind) { mePageKind = eKind; }
|
2008-10-10 13:02:43 +00:00
|
|
|
PageKind GetPageKind() const { return mePageKind; }
|
2004-01-20 10:33:31 +00:00
|
|
|
|
2005-07-14 10:28:51 +00:00
|
|
|
/** is used in FrameView::ReadUserDataSequence() only to store the
|
|
|
|
page kind that was selected while last saving this document */
|
2006-12-12 16:33:25 +00:00
|
|
|
void SetPageKindOnLoad(PageKind eKind) { mePageKindOnLoad = eKind; }
|
2005-07-14 10:28:51 +00:00
|
|
|
|
|
|
|
/** can be used to get the page kind that was selected on last save of this document */
|
2008-10-10 13:02:43 +00:00
|
|
|
PageKind GetPageKindOnLoad() const { return mePageKindOnLoad; }
|
2005-07-14 10:28:51 +00:00
|
|
|
|
2011-06-13 05:51:12 +02:00
|
|
|
void SetSelectedPage (sal_uInt16 nPage);
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_uInt16 GetSelectedPage () const;
|
2004-01-20 10:33:31 +00:00
|
|
|
|
2005-07-14 10:28:51 +00:00
|
|
|
/** is used in FrameView::ReadUserDataSequence() only to store the
|
|
|
|
page that was selected while last saving this document */
|
2011-01-17 11:41:00 +01:00
|
|
|
void SetSelectedPageOnLoad (sal_uInt16 nPage) { mnSelectedPageOnLoad = nPage; }
|
2005-07-14 10:28:51 +00:00
|
|
|
|
|
|
|
/** can be used to get the page that was selected on last save of this document */
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_uInt16 GetSelectedPageOnLoad () const { return mnSelectedPageOnLoad; }
|
2005-07-14 10:28:51 +00:00
|
|
|
|
2011-06-13 05:51:12 +02:00
|
|
|
void SetViewShEditMode(EditMode eMode, PageKind eKind);
|
2005-09-23 13:59:09 +00:00
|
|
|
EditMode GetViewShEditMode (PageKind eKind);
|
|
|
|
|
|
|
|
/** Remember the edit mode of the main view shell at the time when the
|
|
|
|
document is loaded.
|
|
|
|
*/
|
|
|
|
void SetViewShEditModeOnLoad (const EditMode eMode);
|
|
|
|
|
|
|
|
/** Return the value of the edit mode as it was when the document was
|
|
|
|
loaded.
|
|
|
|
*/
|
|
|
|
EditMode GetViewShEditModeOnLoad (void) const;
|
2004-01-20 10:33:31 +00:00
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
void SetLayerMode(sal_Bool bMode)
|
2006-12-12 16:33:25 +00:00
|
|
|
{ mbLayerMode = bMode; }
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_Bool IsLayerMode() const { return mbLayerMode; }
|
2004-01-20 10:33:31 +00:00
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
void SetQuickEdit(sal_Bool bQEdit)
|
2006-12-12 16:33:25 +00:00
|
|
|
{ mbQuickEdit = bQEdit; }
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_Bool IsQuickEdit() const { return mbQuickEdit; }
|
2004-01-20 10:33:31 +00:00
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
void SetDoubleClickTextEdit( sal_Bool bOn = sal_True ) { mbDoubleClickTextEdit = bOn; }
|
|
|
|
sal_Bool IsDoubleClickTextEdit() const { return mbDoubleClickTextEdit; }
|
2004-01-20 10:33:31 +00:00
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
void SetClickChangeRotation( sal_Bool bOn = sal_True ) { mbClickChangeRotation = bOn; }
|
|
|
|
sal_Bool IsClickChangeRotation() const { return mbClickChangeRotation; }
|
2004-01-20 10:33:31 +00:00
|
|
|
|
|
|
|
/** Remember the type of the view shell that was (or soon will be)
|
|
|
|
previously associated with this frame view.
|
|
|
|
@param eType
|
|
|
|
The type of the previous view shell or ViewShell::ST_NONE to
|
|
|
|
indicate that there is no previous view shell.
|
|
|
|
*/
|
|
|
|
void SetPreviousViewShellType (ViewShell::ShellType eType);
|
|
|
|
|
|
|
|
/** Return the type of the view shell previously associated with this
|
|
|
|
frame view.
|
|
|
|
*/
|
|
|
|
ViewShell::ShellType GetPreviousViewShellType (void) const;
|
|
|
|
|
2005-09-23 13:59:09 +00:00
|
|
|
/** Remember the type of the view shell at the time when the document is
|
|
|
|
loaded or, rather, when the ViewShellBase is constructed.
|
|
|
|
*/
|
|
|
|
void SetViewShellTypeOnLoad (ViewShell::ShellType eType);
|
|
|
|
|
|
|
|
ViewShell::ShellType GetViewShellTypeOnLoad (void) const;
|
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
void SetPresentationViewShellId(sal_uInt16 nId)
|
2006-12-12 16:33:25 +00:00
|
|
|
{ mnPresViewShellId = nId; }
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_uInt16 GetPresentationViewShellId() const { return mnPresViewShellId; }
|
2004-01-20 10:33:31 +00:00
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
void SetSlotId(sal_uInt16 nId) { mnSlotId = nId; }
|
|
|
|
sal_uInt16 GetSlotId() const { return mnSlotId; }
|
2004-01-20 10:33:31 +00:00
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
void SetSlidesPerRow(sal_uInt16 nSlides) { mnSlidesPerRow = nSlides; }
|
|
|
|
sal_uInt16 GetSlidesPerRow() const { return mnSlidesPerRow; }
|
2004-01-20 10:33:31 +00:00
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
void SetDrawMode(sal_uLong nNewDrawMode) { mnDrawMode = nNewDrawMode; };
|
|
|
|
sal_uLong GetDrawMode() const { return mnDrawMode; };
|
2004-01-20 10:33:31 +00:00
|
|
|
|
2006-12-12 16:33:25 +00:00
|
|
|
void SetTabCtrlPercent( double nPercent ) { mnTabCtrlPercent = nPercent; }
|
|
|
|
double GetTabCtrlPercent() const { return mnTabCtrlPercent; }
|
2004-01-20 10:33:31 +00:00
|
|
|
|
2007-08-28 12:37:48 +00:00
|
|
|
void SetIsNavigatorShowingAllShapes (const bool bIsNavigatorShowingAllShapes);
|
|
|
|
bool IsNavigatorShowingAllShapes (void) const;
|
|
|
|
|
2004-01-20 10:33:31 +00:00
|
|
|
virtual void WriteUserDataSequence ( ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = sal_False );
|
|
|
|
virtual void ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = sal_False );
|
|
|
|
|
|
|
|
private:
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_uInt16 mnRefCount;
|
2006-12-12 16:33:25 +00:00
|
|
|
VirtualDevice* mpVDev;
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_Bool mbRuler;
|
2006-12-12 16:33:25 +00:00
|
|
|
SetOfByte maVisibleLayers;
|
|
|
|
SetOfByte maLockedLayers;
|
|
|
|
SetOfByte maPrintableLayers;
|
|
|
|
SdrHelpLineList maStandardHelpLines;
|
|
|
|
SdrHelpLineList maNotesHelpLines;
|
|
|
|
SdrHelpLineList maHandoutHelpLines;
|
2013-03-13 17:55:26 +01:00
|
|
|
sal_Bool mbNoColors; ///< structuring mode
|
|
|
|
sal_Bool mbNoAttribs; ///< structuring mode
|
|
|
|
Rectangle maVisArea; ///< visible area
|
|
|
|
PageKind mePageKind; ///< kind of page (standard, notes, handout)
|
|
|
|
sal_uInt16 mnSelectedPage;
|
|
|
|
PageKind mePageKindOnLoad;
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_uInt16 mnSelectedPageOnLoad;
|
2013-03-13 17:55:26 +01:00
|
|
|
EditMode meStandardEditMode; ///< edit mode in drawing mode (Page/MasterPage)
|
|
|
|
EditMode meNotesEditMode; ///< edit mode in notes mode (Page/MasterPage)
|
|
|
|
EditMode meHandoutEditMode; ///< edit mode in handout mode (Page/MasterPage)
|
|
|
|
EditMode meEditModeOnLoad;
|
|
|
|
sal_Bool mbLayerMode; ///< layer on/off
|
|
|
|
sal_Bool mbQuickEdit; ///< QuickEdit on/off
|
|
|
|
sal_Bool mbDoubleClickTextEdit; ///< text mode after double click
|
|
|
|
sal_Bool mbClickChangeRotation; ///< single click switches between selection/rotation mode
|
|
|
|
sal_uInt16 mnPresViewShellId; ///< ViewShell from which the presentation was started
|
|
|
|
sal_uInt16 mnSlotId; ///< SlotId, which was initial mentioned
|
|
|
|
sal_uInt16 mnSlidesPerRow; ///< slides per row on the slide-desk
|
|
|
|
sal_uLong mnDrawMode; ///< draw mode for the normal window
|
|
|
|
double mnTabCtrlPercent;
|
2007-08-28 12:37:48 +00:00
|
|
|
/** Remember whether the navigator shows all shapes (<TRUE/>) or only
|
|
|
|
the names ones (<FALSE/>). Not persistent.
|
|
|
|
*/
|
|
|
|
bool mbIsNavigatorShowingAllShapes;
|
2004-01-20 10:33:31 +00:00
|
|
|
|
|
|
|
/** The type of the previous view shell. The (default) value
|
|
|
|
ViewShell::ST_NONE indicates that there was no previous view shell.
|
|
|
|
Note that this value is used only temporarily and is not saved or
|
|
|
|
restored.
|
|
|
|
*/
|
|
|
|
ViewShell::ShellType mePreviousViewShellType;
|
2005-09-23 13:59:09 +00:00
|
|
|
|
|
|
|
ViewShell::ShellType meViewShellTypeOnLoad;
|
2004-01-20 10:33:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // end of namespace sd
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2010-10-27 12:53:26 +01:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|