bump product version to 4.1.6.2
[LibreOffice.git] / sd / source / ui / inc / OutlineViewShell.hxx
blobf4ca53f62fc815713263fa3eae041b6c031ed4ef
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef SD_OUTLINE_VIEW_SHELL_HXX
21 #define SD_OUTLINE_VIEW_SHELL_HXX
23 #include "DrawDocShell.hxx"
24 #include "ViewShell.hxx"
25 #include "OutlineView.hxx"
27 class SdPage;
28 class TransferableDataHelper;
29 class TransferableClipboardListener;
31 namespace sd {
33 /** Show a textual overview of the text contents of all slides.
35 class OutlineViewShell
36 : public ViewShell
38 public:
39 TYPEINFO();
41 SFX_DECL_VIEWFACTORY(OutlineViewShell);
42 SFX_DECL_INTERFACE(SD_IF_SDOUTLINEVIEWSHELL)
44 // The previous macros change access mode. To be sure switch back
45 // to public access.
46 public:
47 /** Create a new view shell for the outline mode.
48 @param rViewShellBase
49 The new object will be stacked on this view shell base.
50 @param pFrameView
51 The frame view that makes it possible to pass information from
52 one view shell to the next.
54 OutlineViewShell (
55 SfxViewFrame* pFrame,
56 ViewShellBase& rViewShellBase,
57 ::Window* pParentWindow,
58 FrameView* pFrameView = NULL);
60 virtual ~OutlineViewShell (void);
62 virtual void Shutdown (void);
64 virtual void Paint(const Rectangle& rRect, ::sd::Window* pWin);
66 /** Arrange and resize the GUI elements like rulers, sliders, and
67 buttons as well as the actual document view according to the size of
68 the enclosing window and current sizes of buttons, rulers, and
69 sliders.
71 virtual void ArrangeGUIElements (void);
73 virtual sal_uInt16 PrepareClose( sal_Bool bUI = sal_True, sal_Bool bForBrowsing = sal_False );
75 virtual long VirtHScrollHdl(ScrollBar* pHScroll);
76 virtual long VirtVScrollHdl(ScrollBar* pVHScroll);
78 virtual void AddWindow(::sd::Window* pWin);
79 virtual void RemoveWindow(::sd::Window* pWin);
81 virtual void Activate( sal_Bool IsMDIActivate );
82 virtual void Deactivate( sal_Bool IsMDIActivate );
84 virtual SdPage* GetActualPage();
86 /// inherited from sd::ViewShell
87 virtual SdPage* getCurrentPage() const;
89 void ExecCtrl(SfxRequest &rReq);
90 void GetCtrlState(SfxItemSet &rSet);
91 void GetMenuState(SfxItemSet &rSet);
92 void GetAttrState(SfxItemSet &rSet);
93 void GetState (SfxItemSet& rSet);
95 void ExecStatusBar(SfxRequest& rReq);
96 void GetStatusBarState(SfxItemSet& rSet);
98 void FuTemporary(SfxRequest &rReq);
99 void FuTemporaryModify(SfxRequest &rReq);
100 void FuPermanent(SfxRequest &rReq);
101 void FuSupport(SfxRequest &rReq);
103 virtual void SetZoom(long nZoom);
104 virtual void SetZoomRect(const Rectangle& rZoomRect);
105 virtual String GetSelectionText( sal_Bool bCompleteWords = sal_False );
106 virtual sal_Bool HasSelection( sal_Bool bText = sal_True ) const;
108 void Execute(SfxRequest& rReq);
110 virtual void ReadFrameViewData(FrameView* pView);
111 virtual void WriteFrameViewData();
113 virtual void Command( const CommandEvent& rCEvt, ::sd::Window* pWin );
114 virtual sal_Bool KeyInput(const KeyEvent& rKEvt, ::sd::Window* pWin);
115 virtual void MouseButtonUp(const MouseEvent& rMEvt, ::sd::Window* pWin);
117 sal_uLong Read(SvStream& rInput, const String& rBaseURL, sal_uInt16 eFormat);
119 virtual void WriteUserDataSequence ( ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = sal_False );
120 virtual void ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = sal_False );
122 /** this method is called when the visible area of the view from this viewshell is changed */
123 virtual void VisAreaChanged(const Rectangle& rRect);
125 /** Create an accessible object representing the specified window.
126 @param pWindow
127 The returned object makes the document displayed in this window
128 accessible.
129 @return
130 Returns an <type>AccessibleDrawDocumentView</type> object.
132 virtual ::com::sun::star::uno::Reference<
133 ::com::sun::star::accessibility::XAccessible>
134 CreateAccessibleDocumentView (::sd::Window* pWindow);
136 /** Update the preview to show the specified page.
138 virtual void UpdatePreview (SdPage* pPage, sal_Bool bInit = sal_False);
140 virtual css::uno::Reference<css::drawing::XDrawSubController> CreateSubController (void);
142 /** Make the given page the new current page. This method
143 notifies the controller and adapts the selection of the
144 model.
145 @param pPage
146 The new current page. Pass NULL when there is no current page.
148 void SetCurrentPage (SdPage* pPage);
150 bool UpdateTitleObject( SdPage* pPage, Paragraph* pPara );
151 bool UpdateOutlineObject( SdPage* pPage, Paragraph* pPara );
153 private:
154 void ShowSlideShow(SfxRequest& rReq);
155 OutlineView* pOlView;
156 SdPage* pLastPage; // Zur performanten Aufbereitung der Preview
157 TransferableClipboardListener* pClipEvtLstnr;
158 sal_Bool bPastePossible;
159 bool mbInitialized;
161 void Construct (DrawDocShell* pDocSh);
162 DECL_LINK( ClipboardChanged, TransferableDataHelper* );
165 } // end of namespace sd
167 #endif
169 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */