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

Generated by: LCOV version 1.10