LCOV - code coverage report
Current view: top level - sd/source/ui/inc - ViewShell.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 18 25 72.0 %
Date: 2015-06-13 12:38:46 Functions: 11 18 61.1 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       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/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      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 .
      18             :  */
      19             : 
      20             : #ifndef INCLUDED_SD_SOURCE_UI_INC_VIEWSHELL_HXX
      21             : #define INCLUDED_SD_SOURCE_UI_INC_VIEWSHELL_HXX
      22             : 
      23             : #include <rtl/ref.hxx>
      24             : 
      25             : #include <vcl/field.hxx>
      26             : #include <sfx2/viewsh.hxx>
      27             : #include <vcl/prntypes.hxx>
      28             : #include <svtools/transfer.hxx>
      29             : #include "glob.hxx"
      30             : #include "pres.hxx"
      31             : #include "cfgids.hxx"
      32             : #include "View.hxx"
      33             : #include "sddllapi.h"
      34             : 
      35             : #include <com/sun/star/drawing/XDrawSubController.hpp>
      36             : #include <memory>
      37             : #include <boost/shared_ptr.hpp>
      38             : 
      39             : class SdPage;
      40             : class SvxRuler;
      41             : class SdrOle2Obj;       // for the ones, who have undefined parts of SVDRAW
      42             : class ScrollBarBox;
      43             : class SdDrawDocument;
      44             : class ScrollBar;
      45             : 
      46             : namespace com { namespace sun { namespace star {
      47             : namespace embed {
      48             :     class XEmbeddedObject;
      49             : }}}}
      50             : 
      51             : namespace sd {
      52             : 
      53             : extern const OUString aEmptyStr;
      54             : 
      55             : class DrawDocShell;
      56             : class FrameView;
      57             : class LayerTabBar;
      58             : class View;
      59             : class ViewShellBase;
      60             : class Window;
      61             : class WindowUpdater;
      62             : class ZoomList;
      63             : 
      64             : #undef OUTPUT_DRAWMODE_COLOR
      65             : #undef OUTPUT_DRAWMODE_CONTRAST
      66             : 
      67             : static const DrawModeFlags OUTPUT_DRAWMODE_COLOR = DrawModeFlags::Default;
      68        5043 : static const DrawModeFlags OUTPUT_DRAWMODE_GRAYSCALE
      69             :         = DrawModeFlags::GrayLine | DrawModeFlags::GrayFill
      70             :         | DrawModeFlags::BlackText | DrawModeFlags::GrayBitmap
      71       10086 :         | DrawModeFlags::GrayGradient;
      72        5043 : static const DrawModeFlags OUTPUT_DRAWMODE_BLACKWHITE
      73             :         = DrawModeFlags::BlackLine | DrawModeFlags::BlackText
      74             :         | DrawModeFlags::WhiteFill | DrawModeFlags::GrayBitmap
      75       10086 :         | DrawModeFlags::WhiteGradient;
      76        5043 : static const DrawModeFlags OUTPUT_DRAWMODE_CONTRAST
      77             :         = DrawModeFlags::SettingsLine | DrawModeFlags::SettingsFill
      78       10086 :         | DrawModeFlags::SettingsText | DrawModeFlags::SettingsGradient;
      79             : 
      80             : /** Base class of the stacked shell hierarchy.
      81             : 
      82             :     <p>Despite its name this class is not a descendant of SfxViewShell
      83             :     but of SfxShell.  Its name expresses the fact that it acts like a
      84             :     view shell.  Being a stacked shell rather then being an actual view shell
      85             :     there can be several instances of this class that
      86             :     <ul>
      87             :     <li>all are based on the same view shell and thus show the same
      88             :     document and share common view functionality and</li>
      89             :     <li>are all visible at the same time and live in the same
      90             :     frame.</li>
      91             :     <ul></p>
      92             : 
      93             :     <p>This class replaces the former ViewShell class.</p>
      94             : */
      95             : class ViewShell
      96             :     : public SfxShell
      97             : {
      98             : public:
      99             :     enum ShellType {
     100             :         ST_NONE,
     101             :         ST_DRAW,         // The Draw application.
     102             :         ST_IMPRESS,      // Main view of the Impress application.
     103             :         ST_NOTES,
     104             :         ST_HANDOUT,
     105             :         ST_OUTLINE,
     106             :         ST_SLIDE_SORTER,
     107             :         ST_PRESENTATION,
     108             :         ST_SIDEBAR
     109             :     };
     110             :     static const int MAX_HSPLIT_CNT = 1;
     111             :     static const int MAX_VSPLIT_CNT = 1;
     112             :     static const int MIN_SCROLLBAR_SIZE = 50;
     113             : 
     114             :     TYPEINFO_OVERRIDE();
     115             : 
     116             :     ViewShell (
     117             :         SfxViewFrame *pFrame,
     118             :         vcl::Window* pParentWindow,
     119             :         ViewShellBase& rViewShellBase,
     120             :         bool bAllowCenter = true);
     121             :     virtual ~ViewShell();
     122             : 
     123             :     /** The Init method has to be called from the outside directly
     124             :         after a new object of this class has been created.  It can be
     125             :         used for that part of the initialisation that can be run only
     126             :         after the creation of the new object is finished.  This
     127             :         includes registration as listener at event broadcasters.
     128             : 
     129             :         Derived classes should call this method at the head of their
     130             :         Init() methods.
     131             :         @param bIsMainViewShell
     132             :             This flag tells the Init() method whether the new ViewShell will
     133             :             be the main view shell.
     134             :     */
     135             :     virtual void Init (bool bIsMainViewShell);
     136             : 
     137             :     /** The Exit() method has to be called before the destructor so that the
     138             :         view shell is still a valid object and can safely call methods that
     139             :         rely on that.
     140             :     */
     141             :     void Exit();
     142             : 
     143             :     void Cancel();
     144             : 
     145             :     /** Return the window that is the parent of all controls of this view
     146             :         shell.  This may or may not be the window of the frame.
     147             :     */
     148        2559 :     inline vcl::Window* GetParentWindow() const { return mpParentWindow; }
     149             : 
     150        4254 :     inline ::sd::View* GetView() const { return mpView; }
     151             :     inline SdrView* GetDrawView() const;
     152             :     SD_DLLPUBLIC DrawDocShell* GetDocSh() const;
     153             : 
     154             :     SdDrawDocument*  GetDoc() const;
     155             : 
     156             :     SD_DLLPUBLIC SfxViewFrame* GetViewFrame() const;
     157             : 
     158             :     /** The active window is usually the mpContentWindow.  When there is a
     159             :         show running then the active window is a ShowWindow.
     160             :     */
     161       11718 :     ::sd::Window* GetActiveWindow() const { return mpActiveWindow;}
     162             : 
     163             :     /** Set the active window.  When the shell is displayed in the center
     164             :         pane then the window of the ViewShellBase is also set to the given
     165             :         window.
     166             :     */
     167             :     void SetActiveWindow (::sd::Window* pWindow);
     168             : 
     169             :     /** Return the rectangle that encloses all windows of the view.  That
     170             :         excludes the controls in the frame like rulers, scroll bars, tab
     171             :         bar, and buttons.
     172             :         @return
     173             :             The rectangle is returned in screen coordinates, i.e. pixel
     174             :             values relative to the upper left corner of the screen?.
     175             :     */
     176             :     const Rectangle& GetAllWindowRect();
     177             : 
     178             :     // Mouse- & Key-Events
     179             :     virtual void PrePaint();
     180             :     virtual void Paint (const Rectangle& rRect, ::sd::Window* pWin);
     181             :     virtual bool KeyInput(const KeyEvent& rKEvt, ::sd::Window* pWin);
     182             :     virtual void MouseMove(const MouseEvent& rMEvt, ::sd::Window* pWin);
     183             :     virtual void MouseButtonUp(const MouseEvent& rMEvt, ::sd::Window* pWin);
     184             :     virtual void MouseButtonDown(const MouseEvent& rMEvt, ::sd::Window* pWin);
     185             :     virtual void Command(const CommandEvent& rCEvt, ::sd::Window* pWin);
     186             :     bool RequestHelp( const HelpEvent& rEvt, ::sd::Window* pWin );
     187             :     bool Notify( NotifyEvent& rNEvt, ::sd::Window* pWin );
     188             : 
     189             :     bool HandleScrollCommand(const CommandEvent& rCEvt, ::sd::Window* pWin);
     190             : 
     191             :     virtual void SetUIUnit(FieldUnit eUnit);
     192             :     void SetDefTabHRuler( sal_uInt16 nDefTab );
     193             : 
     194             :     const SfxPoolItem* GetNumBulletItem(SfxItemSet& aNewAttr, sal_uInt16& nNumItemId);
     195             : 
     196        1235 :     bool HasRuler() { return mbHasRulers;}
     197             :     void SetRuler(bool bRuler);
     198             : 
     199             :     /** Set internal values of all scroll bars that determine thumb size and
     200             :         position.  The external values like size and position of the scroll
     201             :         bar controls are not modified.
     202             :     */
     203             :     virtual void UpdateScrollBars();
     204             :     void    Scroll(long nX, long nY);
     205             :     void    ScrollLines(long nX, long nY);
     206             :     virtual void    SetZoom(long nZoom);
     207             :     virtual void    SetZoomRect(const Rectangle& rZoomRect);
     208             :     void    InitWindows(const Point& rViewOrigin, const Size& rViewSize,
     209             :                         const Point& rWinPos, bool bUpdate = false);
     210             :     void    InvalidateWindows();
     211             :     /** This method is still used by the OutlineViewShell to update the
     212             :         model according to the content of the outline view.  This in turn
     213             :         updates the previews in the slide sorter.
     214             :     */
     215             :     virtual void UpdatePreview (SdPage* pPage, bool bInit = false);
     216             : 
     217             :     void    DrawMarkRect(const Rectangle& rRect) const;
     218             : 
     219             :     void    ExecReq( SfxRequest &rReq );
     220             : 
     221           0 :     ZoomList* GetZoomList() { return mpZoomList;}
     222             : 
     223         403 :     FrameView* GetFrameView() { return mpFrameView; }
     224             :     /** Setting a frame view triggers ReadFrameViewData() for the new
     225             :         frame.
     226             :         @param pFrameView
     227             :             The new frame view that replaces the old one.
     228             :     */
     229             :     void SetFrameView (FrameView* pFrameView);
     230             :     virtual void  ReadFrameViewData(FrameView* pView);
     231             :     virtual void  WriteFrameViewData();
     232             :     void  WriteUserData(OUString& rString);
     233             :     void  ReadUserData(const OUString& rString);
     234             : 
     235             :     virtual bool  ActivateObject(SdrOle2Obj* pObj, long nVerb);
     236             : 
     237             :     /** @returns
     238             :             current or selected page or 0. This method
     239             :             will fail in master page mode.
     240             : 
     241             :         @deprecated, please use getCurrentPage();
     242             :     */
     243             :     virtual SdPage* GetActualPage() = 0;
     244             : 
     245             :     /** @returns
     246             :             current or selected page or 0.
     247             :     */
     248             :     virtual SdPage* getCurrentPage() const = 0;
     249             : 
     250           6 :     rtl::Reference<FuPoor> GetOldFunction() const { return mxOldFunction; }
     251         138 :     bool HasOldFunction() const { return mxOldFunction.is(); }
     252       14038 :     rtl::Reference<FuPoor> GetCurrentFunction() const { return mxCurrentFunction; }
     253         156 :     bool HasCurrentFunction( sal_uInt16 nSID ) { return mxCurrentFunction.is() && (mxCurrentFunction->GetSlotID() == nSID ); }
     254       10829 :     bool HasCurrentFunction() { return mxCurrentFunction.is(); }
     255             : 
     256             :     void SetCurrentFunction(const rtl::Reference<FuPoor>& xFunction);
     257             :     void SetOldFunction(const rtl::Reference<FuPoor>& xFunction);
     258             :     void DeactivateCurrentFunction( bool bPermanent = false );
     259             : 
     260             :     void    SetPageSizeAndBorder(PageKind ePageKind, const Size& rNewSize,
     261             :                             long nLeft, long nRight, long nUpper, long nLower,
     262             :                             bool bScaleAll, Orientation eOrient, sal_uInt16 nPaperBin,
     263             :                             bool bBackgroundFullSize );
     264             : 
     265           0 :     void    SetStartShowWithDialog( bool bIn = true ) { mbStartShowWithDialog = bIn; }
     266           0 :     bool    IsStartShowWithDialog() const { return mbStartShowWithDialog; }
     267             : 
     268           0 :     sal_uInt16 GetPrintedHandoutPageNum() const { return mnPrintedHandoutPageNum; }
     269           0 :     void SetPrintedHandoutPageNum (sal_uInt16 nPageNumber) {mnPrintedHandoutPageNum=nPageNumber; }
     270             : 
     271           0 :     sal_uInt16 GetPrintedHandoutPageCount() const { return mnPrintedHandoutPageCount; }
     272           0 :     void SetPrintedHandoutPageCount (sal_uInt16 nPageCount) {mnPrintedHandoutPageCount=nPageCount; }
     273             : 
     274             :     virtual bool PrepareClose( bool bUI = true );
     275             : 
     276             :     void GetMenuState(SfxItemSet& rSet);
     277             : 
     278             :     virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt, DropTargetHelper& rTargetHelper,
     279             :                                  ::sd::Window* pTargetWindow, sal_uInt16 nPage, sal_uInt16 nLayer );
     280             :     virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt, DropTargetHelper& rTargetHelper,
     281             :                                   ::sd::Window* pTargetWindow, sal_uInt16 nPage, sal_uInt16 nLayer );
     282             : 
     283             :     virtual void WriteUserDataSequence ( ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, bool bBrowse = false );
     284             :     virtual void ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, bool bBrowse = false );
     285             : 
     286             :     /** this method is called when the visible area of the view from this viewshell is changed */
     287             :     virtual void VisAreaChanged(const Rectangle& rRect);
     288             : 
     289             :     /** Create an accessible object representing the specified window.
     290             :         Override this method to provide view mode specific objects.  The
     291             :         default implementation returns an empty reference.
     292             :         @param pWindow
     293             :             Make the document displayed in this window accessible.
     294             :         @return
     295             :             This default implementation returns an empty reference.
     296             :     */
     297             :     virtual ::com::sun::star::uno::Reference<
     298             :         ::com::sun::star::accessibility::XAccessible>
     299             :         CreateAccessibleDocumentView (::sd::Window* pWindow);
     300             : 
     301             :     virtual void SwitchViewFireFocus( ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > xAcc );
     302             :     void SwitchActiveViewFireFocus( );
     303             :     // Move these two methods from DrawViewShell to enable slide show view
     304             :     void    NotifyAccUpdate();
     305             :     void    fireSwitchCurrentPage(sal_Int32 pageIndex);
     306             :     void SetWinViewPos(const Point& rWinPos, bool bUpdate);
     307             :     Point GetWinViewPos() const;
     308             :     Point GetViewOrigin() const;
     309             : 
     310             :     /** Return the window updater of this view shell.
     311             :         @return
     312             :             In rare circumstances the returned pointer may be <null/>,
     313             :             i.e. when no memory is available anymore.
     314             :     */
     315             :     ::sd::WindowUpdater* GetWindowUpdater() const;
     316             : 
     317             :     /** Return the border that is drawn around the actual document view.
     318             :         The border contains typically rulers and scroll bars.
     319             :         @param bOuterResize
     320             :             When this flag is <TRUE/> then the border is used for an
     321             :             OuterResizePixel(), i.e. there is a given window size and the
     322             :             border elements are placed inside so that the document view has
     323             :             the given window size minus the border.
     324             :             When the flag is <FALSE/> then the border is used for an
     325             :             InnerResizePixel(), i.e. the document view has a given size and
     326             :             the border is placed outside.  In this scenario the parent
     327             :             window has the size of the document view plus the border.
     328             :     */
     329             :     SvBorder GetBorder (bool bOuterResize);
     330             : 
     331             :     /** Notify the view shell that its parent window has been resized.
     332             :         The ViewShell places and resizes its UI elements accordingly.
     333             :         The new size can be obtained from the parent window.
     334             :     */
     335             :     virtual void Resize();
     336             : 
     337             :     /** Set the position and size of the area which contains the GUI
     338             :         elements like rulers, sliders, and buttons as well as the document
     339             :         view.  Both size and position are expected to be in pixel
     340             :         coordinates.  The positions and sizes of the mentioned GUI elements
     341             :         are updated as well.
     342             : 
     343             :         <p> This method is implemented by first setting copying the given
     344             :         values to internal variables and then calling the
     345             :         <type>ArrangeGUIElements</type> method which performs the actual
     346             :         work of sizeing and arranging the UI elements accordingly.</p>
     347             :         @param rPos
     348             :             The position of the enclosing window relative to the document
     349             :             window.  This is only interesting if a Draw/Impress document
     350             :             view is embedded as OLE object into another document view.  For
     351             :             normal documents this position is (0,0).
     352             :         @param rSize
     353             :             The new size in pixel.
     354             :     */
     355             :     // This is to be replaced by Resize.
     356             :     //  virtual void AdjustPosSizePixel(const Point &rPos, const Size &rSize);
     357             : 
     358             :     /** Set position and size of the GUI elements that are controllerd by
     359             :         the view shell like rulers and scroll bars as well as the actual
     360             :         document view according to the position and size that were given
     361             :         with the last Resize() call.
     362             :     */
     363             :     virtual void ArrangeGUIElements();
     364             : 
     365             :     //  virtual void OuterResizePixel(const Point &rPos, const Size &rSize);
     366             :     //  virtual void InnerResizePixel(const Point &rPos, const Size &rSize);
     367             : 
     368             :     ViewShellBase& GetViewShellBase() const;
     369             : 
     370             :     /** Return <TRUE/> when the called view shell is the main sub shell of
     371             :         its ViewShellBase object, i.e. is display in the center pane.  This
     372             :         convenience function is equivalent to comparing the this pointer to
     373             :         the result of ViewShellBase::GetViewShell(PT_CENTER).
     374             :     */
     375             :     bool IsMainViewShell() const;
     376             : 
     377             :     /** Set or reset the flag that indicates whether the called shell is the
     378             :         one displayed in the center pane.  By default this flag is set to
     379             :         <FALSE/>.  For the main view shell it thus has to be set to <TRUE/>.
     380             :     */
     381             :     void SetIsMainViewShell (bool bIsMainViewShell);
     382             : 
     383             :     /** Return a sub controller that implements the view shell specific
     384             :         part of the DrawController.
     385             :     */
     386             :     virtual css::uno::Reference<css::drawing::XDrawSubController> CreateSubController() = 0;
     387             : 
     388             :     /** Return the type of the shell.
     389             :     */
     390             :     ShellType GetShellType() const;
     391             : 
     392             :     /** This method is more or less an alias to Deactivate().  It is called
     393             :         before an object of this class is taken from the stack of view
     394             :         shells.
     395             : 
     396             :         <p>When this method is not called before a view shell is taken from
     397             :         a stack then the Deactivate() call from the SFX as a response to
     398             :         RemoveSubShell() comes to late when the view shell is not on the
     399             :         stack anymore.</p>
     400             :     */
     401             :     virtual void Shutdown();
     402             : 
     403             :     /** This function is called from the underlying ViewShellBase
     404             :         object to handle a verb execution request.
     405             :     */
     406             :     virtual ErrCode DoVerb (long nVerb);
     407             : 
     408             :     virtual void UIActivating( SfxInPlaceClient* );
     409             :     virtual void UIDeactivated( SfxInPlaceClient* );
     410             : 
     411             :     /** Show controls of the UI or hide them, depending on the given flag.
     412             :         As a result the border is adapted.
     413             :     */
     414             :     virtual void ShowUIControls (bool bVisible = true);
     415             :     bool IsPageFlipMode() const;
     416             : 
     417             :     /** Set the given window as new parent window.  This is not possible for
     418             :         all views, so the return value tells the caller if the relocation
     419             :         was successful.
     420             :     */
     421             :     virtual bool RelocateToParentWindow (vcl::Window* pParentWindow);
     422             : 
     423             :     /** Depending on the given request create a new page or duplicate an
     424             :         existing one.  A new page is created behind the given slide.
     425             :         @param rRequest
     426             :             The request as passed to an Execute() method.  Its arguments are
     427             :             evaluated.  Its slot id determines whether to create or
     428             :             duplicate a slide.
     429             :         @param pPage
     430             :             This page is either duplicated or becomes the predecessor of the
     431             :             new slide.  If NULL a duplication request is ignored.  A new
     432             :             slide is inserted as first slide.
     433             :         @param nInsertPosition
     434             :             When -1 (the default) then insert after pPage.  Otherwise insert
     435             :             before the given index (of a standard page).
     436             :         @return
     437             :             The new slide is returned.  If for some reason a new page can
     438             :             not be created then NULL is returned.
     439             :     */
     440             :     virtual SdPage* CreateOrDuplicatePage (
     441             :         SfxRequest& rRequest,
     442             :         PageKind ePageKind,
     443             :         SdPage* pPage,
     444             :         const sal_Int32 nInsertPosition = -1);
     445             : 
     446             :     /// Same as MouseButtonDown(), but coordinates are in logic unit.
     447             :     void LogicMouseButtonDown(const MouseEvent& rMouseEvent);
     448             :     /// Same as MouseButtonUp(), but coordinates are in logic unit.
     449             :     void LogicMouseButtonUp(const MouseEvent& rMouseEvent);
     450             :     /// Allows adjusting the point or mark of the selection to a document coordinate.
     451             :     void SetCursorMm100Position(const Point& rPosition, bool bPoint, bool bClearMark);
     452             :     /// Allows starting or ending a graphic move or resize action.
     453             :     void SetGraphicMm100Position(bool bStart, const Point& rPosition);
     454             : 
     455             :     class Implementation;
     456             : 
     457             : protected:
     458             :     /** must be called in the beginning of each subclass d'tor.
     459             :         disposes and clears both current and old function. */
     460             :     void DisposeFunctions();
     461             : 
     462             :     friend class ViewShellBase;
     463             : 
     464             :     /** Window inside the rulers and scroll bars that shows a view of the
     465             :         document.
     466             :     */
     467             : 
     468             :     VclPtr<sd::Window> mpContentWindow;
     469             : 
     470             :     /// Horizontal scroll bar for the current slide is displayed when needed.
     471             :     VclPtr<ScrollBar> mpHorizontalScrollBar;
     472             :     /// Vertical scroll bar for whole document is always visible.
     473             :     VclPtr<ScrollBar> mpVerticalScrollBar;
     474             :     /// Horizontal ruler is not shown by default.
     475             :     VclPtr<SvxRuler> mpHorizontalRuler;
     476             :     /// Vertical ruler is not shown by default.
     477             :     VclPtr<SvxRuler> mpVerticalRuler;
     478             :     /// Filler of the little square enclosed by the two scroll bars.
     479             :     VclPtr<ScrollBarBox> mpScrollBarBox;
     480             :     /// Layer tab bar.
     481             :     VclPtr<LayerTabBar> mpLayerTabBar;
     482             : 
     483             :     /// This flag controls whether the rulers are visible.
     484             :     bool mbHasRulers;
     485             : 
     486             :     /// The active window.
     487             :     VclPtr< ::sd::Window> mpActiveWindow;
     488             :     ::sd::View* mpView;
     489             :     FrameView*  mpFrameView;
     490             : 
     491             :     rtl::Reference<FuPoor>   mxCurrentFunction;
     492             :     rtl::Reference<FuPoor>   mxOldFunction;
     493             :     ZoomList*   mpZoomList;
     494             : 
     495             :     Point       maViewPos;
     496             :     Size        maViewSize;
     497             :     Size        maScrBarWH;
     498             : 
     499             :     bool        mbCenterAllowed;          // will be forwarded to window
     500             : 
     501             :     bool        mbStartShowWithDialog;    // presentation is started by dialog
     502             :     sal_uInt16      mnPrintedHandoutPageNum; // Page number of the handout page that is to be printed.
     503             :     sal_uInt16      mnPrintedHandoutPageCount; // Page count of the handout pages that are to be printed.
     504             : 
     505             :     //af    bool        bPrintDirectSelected;       // Print only selected objects in direct print
     506             :     //afString      sPageRange;                 // pagerange if selected objects in direct print
     507             : 
     508             :     /** Area covered by all windows, i.e. the area of the parent window
     509             :         without the controls at the borders like rulers, scroll bars, tab
     510             :         bar, buttons.
     511             :         This rectangle may be set in window coordinates (i.e. pixel values
     512             :         relative to the parent window).  It is transformed by every call to
     513             :         GetAllWindowRectangle() into screen coordinates (relative to the
     514             :         upper left corner of the screen.
     515             :     */
     516             :     Rectangle maAllWindowRectangle;
     517             : 
     518             :     /// The type of the shell.  Returned by GetShellType().
     519             :     ShellType meShellType;
     520             : 
     521             :     ::std::unique_ptr<Implementation> mpImpl;
     522             : 
     523             :     // Support methods for centralized UNDO/REDO
     524             :     virtual ::svl::IUndoManager* ImpGetUndoManager() const;
     525             :     void ImpGetUndoStrings(SfxItemSet &rSet) const;
     526             :     void ImpGetRedoStrings(SfxItemSet &rSet) const;
     527             :     void ImpSidUndo(bool bDrawViewShell, SfxRequest& rReq);
     528             :     void ImpSidRedo(bool bDrawViewShell, SfxRequest& rReq);
     529             : 
     530             :     DECL_LINK( HScrollHdl, ScrollBar * );
     531             :     DECL_LINK( VScrollHdl, ScrollBar * );
     532             : 
     533             :     // virtual scroll handler, here, derivative classes can add themselves here
     534             :     virtual long VirtHScrollHdl(ScrollBar* pHScroll);
     535             :     virtual long VirtVScrollHdl(ScrollBar* pVScroll);
     536             : 
     537             :     // virtual functions ruler handling
     538             :     virtual SvxRuler* CreateHRuler(::sd::Window* pWin, bool bIsFirst);
     539             :     virtual SvxRuler* CreateVRuler(::sd::Window* pWin);
     540             :     virtual void UpdateHRuler();
     541             :     virtual void UpdateVRuler();
     542             : 
     543             :     virtual void Activate(bool IsMDIActivate) SAL_OVERRIDE;
     544             :     virtual void Deactivate(bool IsMDIActivate) SAL_OVERRIDE;
     545             : 
     546             :     virtual void SetZoomFactor( const Fraction &rZoomX,
     547             :                                 const Fraction &rZoomY );
     548             : 
     549             :     /**
     550             :         This must be called after the ctor, but before anything else.
     551             :         It's the part of construction that is dependent
     552             :         on showing the top-level window.
     553             : 
     554             :         Showing a window with a11y enabled causes various callbacks
     555             :         to be triggered.
     556             : 
     557             :         Due to the "virtual methods are not virtual during constructors"
     558             :         problem, this is a disaster to call from the ctor
     559             : 
     560             :         i.e. construct calls Show, and if a11y is enabled this
     561             :         reenters the not-fully constructed object and calls
     562             :         CreateAccessibleDocumentView, so if construct is called
     563             :         from the ctor then if a derived class is contructed the base-cass
     564             :         CreateAccessibleDocumentView is used, not the derived
     565             :         CreateAccessibleDocumentView. i.e. run smoketest under a11y with
     566             :         debugging assertions enabled
     567             :     */
     568             :     void doShow();
     569             : 
     570             : private:
     571             :     VclPtr<vcl::Window> mpParentWindow;
     572             :     /** This window updater is used to keep all relevant windows up to date
     573             :         with reference to the digit language used to display digits in text
     574             :         shapes.
     575             :     */
     576             :     ::std::unique_ptr< ::sd::WindowUpdater> mpWindowUpdater;
     577             : 
     578             :     /** Code common to all constructors.  It generally is a bad idea
     579             :         to call this function from outside a constructor.
     580             :     */
     581             :     void construct();
     582             : 
     583             :     DECL_LINK(FrameWindowEventListener, VclSimpleEvent*);
     584             : 
     585             :     /** Create the rulers.
     586             :     */
     587             :     void SetupRulers();
     588             : };
     589             : 
     590         539 : SdrView* ViewShell::GetDrawView() const
     591             : {
     592         539 :     return static_cast<SdrView*>(mpView);
     593             : }
     594             : 
     595             : } // end of namespace sd
     596             : 
     597             : #endif
     598             : 
     599             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11