2010-10-27 12:53:26 +01:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-21 14:30:25 +01: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:38:14 +00:00
|
|
|
|
2013-10-23 22:38:46 +02:00
|
|
|
#ifndef INCLUDED_SD_SOURCE_UI_INC_OUTLINEVIEWSHELL_HXX
|
|
|
|
#define INCLUDED_SD_SOURCE_UI_INC_OUTLINEVIEWSHELL_HXX
|
2004-01-20 10:38:14 +00:00
|
|
|
|
|
|
|
#include "ViewShell.hxx"
|
2018-09-06 00:36:41 +02:00
|
|
|
#include <glob.hxx>
|
2004-01-20 10:38:14 +00:00
|
|
|
|
|
|
|
class SdPage;
|
|
|
|
class TransferableDataHelper;
|
|
|
|
class TransferableClipboardListener;
|
|
|
|
|
2018-08-10 07:48:42 +02:00
|
|
|
namespace sd { class OutlineView; }
|
|
|
|
|
2004-01-20 10:38:14 +00:00
|
|
|
namespace sd {
|
|
|
|
|
|
|
|
/** Show a textual overview of the text contents of all slides.
|
|
|
|
*/
|
|
|
|
class OutlineViewShell
|
|
|
|
: public ViewShell
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
SFX_DECL_VIEWFACTORY(OutlineViewShell);
|
2006-12-12 16:36:00 +00:00
|
|
|
SFX_DECL_INTERFACE(SD_IF_SDOUTLINEVIEWSHELL)
|
2004-01-20 10:38:14 +00:00
|
|
|
|
2014-04-18 18:04:32 +02:00
|
|
|
private:
|
|
|
|
/// SfxInterface initializer.
|
|
|
|
static void InitInterface_Impl();
|
|
|
|
|
2004-01-20 10:38:14 +00:00
|
|
|
public:
|
|
|
|
/** Create a new view shell for the outline mode.
|
|
|
|
@param rViewShellBase
|
|
|
|
The new object will be stacked on this view shell base.
|
|
|
|
@param pFrameView
|
|
|
|
The frame view that makes it possible to pass information from
|
|
|
|
one view shell to the next.
|
|
|
|
*/
|
|
|
|
OutlineViewShell (
|
|
|
|
SfxViewFrame* pFrame,
|
|
|
|
ViewShellBase& rViewShellBase,
|
2015-04-28 23:09:13 +03:00
|
|
|
vcl::Window* pParentWindow,
|
2016-10-24 10:43:29 +02:00
|
|
|
FrameView* pFrameView);
|
2004-01-20 10:38:14 +00:00
|
|
|
|
2016-09-13 13:09:01 +02:00
|
|
|
virtual ~OutlineViewShell() override;
|
2004-01-20 10:38:14 +00:00
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void Shutdown() override;
|
2007-04-03 15:03:51 +00:00
|
|
|
|
2017-03-30 20:27:55 +02:00
|
|
|
virtual void Paint(const ::tools::Rectangle& rRect, ::sd::Window* pWin) override;
|
2004-01-20 10:38:14 +00:00
|
|
|
|
|
|
|
/** Arrange and resize the GUI elements like rulers, sliders, and
|
|
|
|
buttons as well as the actual document view according to the size of
|
|
|
|
the enclosing window and current sizes of buttons, rulers, and
|
|
|
|
sliders.
|
|
|
|
*/
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void ArrangeGUIElements() override;
|
2004-01-20 10:38:14 +00:00
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual bool PrepareClose( bool bUI = true ) override;
|
2004-01-20 10:38:14 +00:00
|
|
|
|
2016-01-14 11:44:28 +02:00
|
|
|
virtual void VirtHScrollHdl(ScrollBar* pHScroll) override;
|
|
|
|
virtual void VirtVScrollHdl(ScrollBar* pVHScroll) override;
|
2004-01-20 10:38:14 +00:00
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void Activate( bool IsMDIActivate ) override;
|
|
|
|
virtual void Deactivate( bool IsMDIActivate ) override;
|
2004-01-20 10:38:14 +00:00
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual SdPage* GetActualPage() override;
|
2005-02-17 08:42:18 +00:00
|
|
|
|
|
|
|
/// inherited from sd::ViewShell
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual SdPage* getCurrentPage() const override;
|
2005-02-17 08:42:18 +00:00
|
|
|
|
2004-01-20 10:38:14 +00:00
|
|
|
void ExecCtrl(SfxRequest &rReq);
|
|
|
|
void GetCtrlState(SfxItemSet &rSet);
|
2015-01-08 23:08:34 +01:00
|
|
|
// FIXME non-virtual override???
|
2004-01-20 10:38:14 +00:00
|
|
|
void GetMenuState(SfxItemSet &rSet);
|
|
|
|
void GetAttrState(SfxItemSet &rSet);
|
|
|
|
void GetState (SfxItemSet& rSet);
|
|
|
|
|
2015-04-29 09:55:11 +02:00
|
|
|
static void ExecStatusBar(SfxRequest& rReq);
|
2004-01-20 10:38:14 +00:00
|
|
|
void GetStatusBarState(SfxItemSet& rSet);
|
|
|
|
|
|
|
|
void FuTemporary(SfxRequest &rReq);
|
2006-01-10 13:31:50 +00:00
|
|
|
void FuTemporaryModify(SfxRequest &rReq);
|
2004-01-20 10:38:14 +00:00
|
|
|
void FuPermanent(SfxRequest &rReq);
|
|
|
|
void FuSupport(SfxRequest &rReq);
|
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void SetZoom(long nZoom) override;
|
2017-03-30 20:27:55 +02:00
|
|
|
virtual void SetZoomRect(const ::tools::Rectangle& rZoomRect) override;
|
2004-01-20 10:38:14 +00:00
|
|
|
|
|
|
|
void Execute(SfxRequest& rReq);
|
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void ReadFrameViewData(FrameView* pView) override;
|
|
|
|
virtual void WriteFrameViewData() override;
|
2004-01-20 10:38:14 +00:00
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void Command( const CommandEvent& rCEvt, ::sd::Window* pWin ) override;
|
|
|
|
virtual bool KeyInput(const KeyEvent& rKEvt, ::sd::Window* pWin) override;
|
|
|
|
virtual void MouseButtonUp(const MouseEvent& rMEvt, ::sd::Window* pWin) override;
|
2004-01-20 10:38:14 +00:00
|
|
|
|
2017-02-09 08:52:13 +02:00
|
|
|
ErrCode ReadRtf(SvStream& rInput);
|
2004-01-20 10:38:14 +00:00
|
|
|
|
2018-06-18 14:32:11 +02:00
|
|
|
virtual void WriteUserDataSequence ( css::uno::Sequence < css::beans::PropertyValue >& ) override;
|
|
|
|
virtual void ReadUserDataSequence ( const css::uno::Sequence < css::beans::PropertyValue >& ) override;
|
2004-01-20 10:38:14 +00:00
|
|
|
|
|
|
|
/** this method is called when the visible area of the view from this viewshell is changed */
|
2017-03-30 20:27:55 +02:00
|
|
|
virtual void VisAreaChanged(const ::tools::Rectangle& rRect) override;
|
2004-01-20 10:38:14 +00:00
|
|
|
|
|
|
|
/** Create an accessible object representing the specified window.
|
|
|
|
@param pWindow
|
|
|
|
The returned object makes the document displayed in this window
|
|
|
|
accessible.
|
|
|
|
@return
|
|
|
|
Returns an <type>AccessibleDrawDocumentView</type> object.
|
|
|
|
*/
|
2015-10-28 12:01:32 +02:00
|
|
|
virtual css::uno::Reference<css::accessibility::XAccessible>
|
2015-10-12 16:04:04 +02:00
|
|
|
CreateAccessibleDocumentView (::sd::Window* pWindow) override;
|
2004-01-20 10:38:14 +00:00
|
|
|
|
2013-11-28 12:09:19 +00:00
|
|
|
OUString m_StrOldPageName;
|
|
|
|
|
2004-01-20 10:38:14 +00:00
|
|
|
/** Update the preview to show the specified page.
|
|
|
|
*/
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void UpdatePreview (SdPage* pPage, bool bInit = false) override;
|
2004-01-20 10:38:14 +00:00
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual css::uno::Reference<css::drawing::XDrawSubController> CreateSubController() override;
|
2004-07-13 12:57:48 +00:00
|
|
|
|
|
|
|
/** Make the given page the new current page. This method
|
|
|
|
notifies the controller and adapts the selection of the
|
|
|
|
model.
|
|
|
|
@param pPage
|
|
|
|
The new current page. Pass NULL when there is no current page.
|
|
|
|
*/
|
|
|
|
void SetCurrentPage (SdPage* pPage);
|
|
|
|
|
2017-08-03 10:23:01 +02:00
|
|
|
void UpdateTitleObject( SdPage* pPage, Paragraph const * pPara );
|
2016-01-14 11:44:28 +02:00
|
|
|
void UpdateOutlineObject( SdPage* pPage, Paragraph* pPara );
|
2006-01-10 13:31:50 +00:00
|
|
|
|
2004-01-20 10:38:14 +00:00
|
|
|
private:
|
2018-03-23 11:15:16 +02:00
|
|
|
std::unique_ptr<OutlineView> pOlView;
|
2014-10-09 17:32:40 +01:00
|
|
|
SdPage* pLastPage; // For efficient processing of the preview
|
2016-06-01 16:22:29 +02:00
|
|
|
rtl::Reference<TransferableClipboardListener> mxClipEvtLstnr;
|
2014-04-24 10:52:02 +02:00
|
|
|
bool bPastePossible;
|
2006-03-21 16:24:24 +00:00
|
|
|
bool mbInitialized;
|
2004-01-20 10:38:14 +00:00
|
|
|
|
2017-05-02 16:23:46 +02:00
|
|
|
void Construct();
|
2016-10-05 07:56:12 +02:00
|
|
|
DECL_LINK( ClipboardChanged, TransferableDataHelper*, void );
|
2004-01-20 10:38:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // end of namespace sd
|
|
|
|
|
|
|
|
#endif
|
2010-10-27 12:53:26 +01:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|