LCOV - code coverage report
Current view: top level - libreoffice/sd/source/ui/inc - ViewShell.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 17 0.0 %
Date: 2012-12-27 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 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;       // fuer die, die Teile von SVDRAW rausdefiniert haben
      43             : class ScrollBarBox;
      44             : class SdDrawDocument;
      45             : class ScrollBar;
      46             : 
      47             : extern const String aEmptyStr;
      48             : 
      49             : namespace com { namespace sun { namespace star {
      50             : namespace embed {
      51             :     class XEmbeddedObject;
      52             : }}}}
      53             : 
      54             : namespace sd {
      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             :     };
      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();
     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 long 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             :     sal_Bool HasRuler (void);
     198             :     void SetRuler(sal_Bool bRuler);
     199             : 
     200             :     /** Set internal values of all scroll bars that determine thumb size and
     201             :         position.  The external values like size and position of the scroll
     202             :         bar controls are not modified.
     203             :     */
     204             :     virtual void UpdateScrollBars (void);
     205             :     void    Scroll(long nX, long nY);
     206             :     void    ScrollLines(long nX, long nY);
     207             :     virtual void    SetZoom(long nZoom);
     208             :     virtual void    SetZoomRect(const Rectangle& rZoomRect);
     209             :     void    InitWindows(const Point& rViewOrigin, const Size& rViewSize,
     210             :                         const Point& rWinPos, sal_Bool bUpdate = sal_False);
     211             :     void    InvalidateWindows();
     212             :     /** This method is still used by the OutlineViewShell to update the
     213             :         model according to the content of the outline view.  This in turn
     214             :         updates the previews in the slide sorter.
     215             :     */
     216             :      virtual void UpdatePreview (SdPage* pPage, sal_Bool bInit = sal_False);
     217             : 
     218             :     void    DrawMarkRect(const Rectangle& rRect) const;
     219             : 
     220             :     void    ExecReq( SfxRequest &rReq );
     221             : 
     222             :     ZoomList* GetZoomList (void);
     223             : 
     224             :     FrameView* GetFrameView (void);
     225             :     /** Setting a frame view triggers ReadFrameViewData() for the new
     226             :         frame.
     227             :         @param pFrameView
     228             :             The new frame view that replaces the old one.
     229             :     */
     230             :     void SetFrameView (FrameView* pFrameView);
     231             :     virtual void  ReadFrameViewData(FrameView* pView);
     232             :     virtual void  WriteFrameViewData();
     233             :     virtual void  WriteUserData(String& rString);
     234             :     virtual void  ReadUserData(const String& rString);
     235             : 
     236             :     virtual sal_Bool  ActivateObject(SdrOle2Obj* pObj, long nVerb);
     237             : 
     238             :     /** @returns
     239             :             current or selected page or 0. This method
     240             :             will fail in master page mode.
     241             : 
     242             :         @deprecated, please use getCurrentPage();
     243             :     */
     244             :     virtual SdPage* GetActualPage() = 0;
     245             : 
     246             :     /** @returns
     247             :             current or selected page or 0.
     248             :     */
     249             :     virtual SdPage* getCurrentPage() const = 0;
     250             : 
     251           0 :     FunctionReference GetOldFunction() const { return mxOldFunction; }
     252           0 :     bool HasOldFunction() const { return mxOldFunction.is(); }
     253           0 :     FunctionReference GetCurrentFunction() const { return mxCurrentFunction; }
     254           0 :     bool HasCurrentFunction( sal_uInt16 nSID ) { return mxCurrentFunction.is() && (mxCurrentFunction->GetSlotID() == nSID ); }
     255           0 :     bool HasCurrentFunction() { return mxCurrentFunction.is(); }
     256             : 
     257             :     void SetCurrentFunction(const FunctionReference& xFunction);
     258             :     void SetOldFunction(const FunctionReference& xFunction);
     259             :     void DeactivateCurrentFunction( bool bPermanent = false );
     260             : 
     261             :     void    SetPageSizeAndBorder(PageKind ePageKind, const Size& rNewSize,
     262             :                             long nLeft, long nRight, long nUpper, long nLower,
     263             :                             sal_Bool bScaleAll, Orientation eOrient, sal_uInt16 nPaperBin,
     264             :                             sal_Bool bBackgroundFullSize );
     265             : 
     266           0 :     void    SetStartShowWithDialog( sal_Bool bIn = sal_True ) { mbStartShowWithDialog = bIn; }
     267           0 :     sal_Bool    IsStartShowWithDialog() const { return mbStartShowWithDialog; }
     268             : 
     269           0 :     sal_uInt16 GetPrintedHandoutPageNum (void) const { return mnPrintedHandoutPageNum; }
     270           0 :     void SetPrintedHandoutPageNum (sal_uInt16 nPageNumber) {mnPrintedHandoutPageNum=nPageNumber; }
     271             : 
     272           0 :     sal_uInt16 GetPrintedHandoutPageCount(void) const { return mnPrintedHandoutPageCount; }
     273           0 :     void SetPrintedHandoutPageCount (sal_uInt16 nPageCount) {mnPrintedHandoutPageCount=nPageCount; }
     274             : 
     275             :     virtual sal_uInt16 PrepareClose( sal_Bool bUI = sal_True, sal_Bool bForBrowsing = sal_False );
     276             : 
     277             :     void GetMenuState(SfxItemSet& rSet);
     278             : 
     279             :     virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt, DropTargetHelper& rTargetHelper,
     280             :                                  ::sd::Window* pTargetWindow, sal_uInt16 nPage, sal_uInt16 nLayer );
     281             :     virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt, DropTargetHelper& rTargetHelper,
     282             :                                   ::sd::Window* pTargetWindow, sal_uInt16 nPage, sal_uInt16 nLayer );
     283             : 
     284             :     virtual void WriteUserDataSequence ( ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = sal_False );
     285             :     virtual void ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = sal_False );
     286             : 
     287             :     /** this method is called when the visible area of the view from this viewshell is changed */
     288             :     virtual void VisAreaChanged(const Rectangle& rRect);
     289             : 
     290             :     /** Create an accessible object representing the specified window.
     291             :         Overload this method to provide view mode specific objects.  The
     292             :         default implementation returns an empty reference.
     293             :         @param pWindow
     294             :             Make the document displayed in this window accessible.
     295             :         @return
     296             :             This default implementation returns an empty reference.
     297             :     */
     298             :     virtual ::com::sun::star::uno::Reference<
     299             :         ::com::sun::star::accessibility::XAccessible>
     300             :         CreateAccessibleDocumentView (::sd::Window* pWindow);
     301             : 
     302             :     void SetWinViewPos(const Point& rWinPos, bool bUpdate);
     303             :     Point GetWinViewPos() const;
     304             :     Point GetViewOrigin() const;
     305             : 
     306             :     /** Return the window updater of this view shell.
     307             :         @return
     308             :             In rare circumstances the returned pointer may be <null/>,
     309             :             i.e. when no memory is available anymore.
     310             :     */
     311             :     ::sd::WindowUpdater* GetWindowUpdater (void) const;
     312             : 
     313             :     /** Return the border that is drawn arround the actual document view.
     314             :         The border contains typically rulers and scroll bars.
     315             :         @param bOuterResize
     316             :             When this flag is <TRUE/> then the border is used for an
     317             :             OuterResizePixel(), i.e. there is a given window size and the
     318             :             border elements are placed inside so that the document view has
     319             :             the given window size minus the border.
     320             :             When the flag is <FALSE/> then the border is used for an
     321             :             InnerResizePixel(), i.e. the document view has a given size and
     322             :             the border is placed outside.  In this scenario the parent
     323             :             window has the size of the document view plus the border.
     324             :     */
     325             :     SvBorder GetBorder (bool bOuterResize);
     326             : 
     327             :     /** Notify the view shell that its parent window has been resized.
     328             :         The ViewShell places and resizes its UI elements accordingly.
     329             :         The new size can be obtained from the parent window.
     330             :     */
     331             :     virtual void Resize (void);
     332             : 
     333             :     /** Set the position and size of the area which contains the GUI
     334             :         elements like rulers, sliders, and buttons as well as the document
     335             :         view.  Both size and position are expected to be in pixel
     336             :         coordinates.  The positions and sizes of the mentioned GUI elements
     337             :         are updated as well.
     338             : 
     339             :         <p> This method is implemented by first setting copying the given
     340             :         values to internal variables and then calling the
     341             :         <type>ArrangeGUIElements</type> method which performs the actual
     342             :         work of sizeing and arranging the UI elements accordingly.</p>
     343             :         @param rPos
     344             :             The position of the enclosing window relative to the document
     345             :             window.  This is only interesting if a Draw/Impress document
     346             :             view is embedded as OLE object into another document view.  For
     347             :             normal documents this position is (0,0).
     348             :         @param rSize
     349             :             The new size in pixel.
     350             :     */
     351             :     // This is to be replaced by Resize.
     352             :     //  virtual void AdjustPosSizePixel(const Point &rPos, const Size &rSize);
     353             : 
     354             :     /** Set position and size of the GUI elements that are controllerd by
     355             :         the view shell like rulers and scroll bars as well as the actual
     356             :         document view according to the position and size that were given
     357             :         with the last Resize() call.
     358             :     */
     359             :     virtual void ArrangeGUIElements (void);
     360             : 
     361             :     //  virtual void OuterResizePixel(const Point &rPos, const Size &rSize);
     362             :     //  virtual void InnerResizePixel(const Point &rPos, const Size &rSize);
     363             : 
     364             :     ViewShellBase& GetViewShellBase (void) const;
     365             : 
     366             :     /** Return <TRUE/> when the called view shell is the main sub shell of
     367             :         its ViewShellBase object, i.e. is display in the center pane.  This
     368             :         convenience function is equivalent to comparing the this pointer to
     369             :         the result of ViewShellBase::GetViewShell(PT_CENTER).
     370             :     */
     371             :     bool IsMainViewShell (void) const;
     372             : 
     373             :     /** Set or reset the flag that indicates whether the called shell is the
     374             :         one displayed in the center pane.  By default this flag is set to
     375             :         <FALSE/>.  For the main view shell it thus has to be set to <TRUE/>.
     376             :     */
     377             :     void SetIsMainViewShell (bool bIsMainViewShell);
     378             : 
     379             :     /** Return a sub controller that implements the view shell specific
     380             :         part of the DrawController.
     381             :     */
     382             :     virtual css::uno::Reference<css::drawing::XDrawSubController> CreateSubController (void) = 0;
     383             : 
     384             :     /** Return the type of the shell.
     385             :     */
     386             :     virtual ShellType GetShellType (void) const;
     387             : 
     388             :     /** This method is more or less an alias to Deactivate().  It is called
     389             :         before an object of this class is taken from the stack of view
     390             :         shells.
     391             : 
     392             :         <p>When this method is not called before a view shell is taken from
     393             :         a stack then the Deactivate() call from the SFX as a response to
     394             :         RemoveSubShell() comes to late when the view shell is not on the
     395             :         stack anymore.</p>
     396             :     */
     397             :     virtual void Shutdown (void);
     398             : 
     399             :     /** This function is called from the underlying ViewShellBase
     400             :         object to handle a verb execution request.
     401             :     */
     402             :     virtual ErrCode DoVerb (long nVerb);
     403             : 
     404             :     virtual void UIActivating( SfxInPlaceClient* );
     405             :     virtual void UIDeactivated( SfxInPlaceClient* );
     406             : 
     407             :     /** Show controls of the UI or hide them, depending on the given flag.
     408             :         As a result the border is adapted.
     409             :     */
     410             :     virtual void ShowUIControls (bool bVisible = true);
     411             :     sal_Bool IsPageFlipMode(void) const;
     412             : 
     413             :     /** Set the given window as new parent window.  This is not possible for
     414             :         all views, so the return value tells the caller if the relocation
     415             :         was successfull.
     416             :     */
     417             :     virtual bool RelocateToParentWindow (::Window* pParentWindow);
     418             : 
     419             :     void AdaptDefaultsForChart(
     420             :         const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject > & xEmbObj );
     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;          // wird an Fenster weitergegeben
     495             : 
     496             :     sal_Bool        mbStartShowWithDialog;  // Praesentation wurde ueber Dialog gestartet
     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             :     // virt. Scroll-Handler, hier koennen sich abgeleitete Klassen einklinken
     531             :     virtual long VirtHScrollHdl(ScrollBar* pHScroll);
     532             :     virtual long VirtVScrollHdl(ScrollBar* pVScroll);
     533             : 
     534             :     // virtuelle Funktionen fuer Lineal-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             :     // Zeiger auf ein zusaetzliches Control im horizontalen ScrollBar
     541             :     // abgeleiteter Klassen (z.B. ein TabBar) zurueckgeben
     542             :     virtual long GetHCtrlWidth();
     543             : 
     544             :     virtual void Activate(sal_Bool IsMDIActivate);
     545             :     virtual void Deactivate(sal_Bool IsMDIActivate);
     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