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

Generated by: LCOV version 1.10