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

Generated by: LCOV version 1.10