LCOV - code coverage report
Current view: top level - libreoffice/sc/source/ui/inc - prevwsh.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 2 4 50.0 %
Date: 2012-12-27 Functions: 2 4 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 SC_PREVWSH_HXX
      21             : #define SC_PREVWSH_HXX
      22             : 
      23             : class ScrollBar;
      24             : 
      25             : #include "address.hxx"
      26             : #include <sfx2/viewfac.hxx>
      27             : #include <sfx2/viewsh.hxx>
      28             : #include <sfx2/zoomitem.hxx>
      29             : 
      30             : #include "shellids.hxx"
      31             : 
      32             : class ScDocument;
      33             : class ScDocShell;
      34             : class ScPreview;
      35             : struct ScHeaderFieldData;
      36             : class ScPreviewLocationData;
      37             : class CommandEvent;
      38             : 
      39             : //==================================================================
      40             : 
      41             : 
      42             : class ScPreviewShell: public SfxViewShell
      43             : {
      44             :     ScDocShell*     pDocShell;
      45             : 
      46             :     SystemWindow*   mpFrameWindow;
      47             :     ScPreview*      pPreview;               // Output window
      48             :     ScrollBar*      pHorScroll;
      49             :     ScrollBar*      pVerScroll;
      50             :     Window*         pCorner;
      51             : 
      52             :     ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aSourceData;  // ViewData
      53             :     sal_uInt8           nSourceDesignMode;      // form design mode from TabView
      54             :     SvxZoomType     eZoom;
      55             :     long            nMaxVertPos;
      56             : 
      57             :     SfxBroadcaster* pAccessibilityBroadcaster;
      58             :     bool            GetPageSize( Size& aPageSize );
      59             : private:
      60             :     void            Construct( Window* pParent );
      61             :     DECL_LINK(ScrollHandler, ScrollBar* );
      62             :     DECL_LINK(CloseHdl, SystemWindow*);
      63             :     void            DoScroll( sal_uInt16 nMode );
      64             :     void ExitPreview();
      65             : 
      66             : protected:
      67             :     virtual void    Activate(sal_Bool bMDI);
      68             :     virtual void    Deactivate(sal_Bool bMDI);
      69             :     virtual void    AdjustPosSizePixel( const Point &rPos, const Size &rSize );
      70             : 
      71             :     virtual void    InnerResizePixel( const Point &rOfs, const Size &rSize );
      72             :     virtual void    OuterResizePixel( const Point &rOfs, const Size &rSize );
      73             : 
      74             :     virtual Size    GetOptimalSizePixel() const;
      75             : 
      76             :     virtual String  GetDescription() const;
      77             : 
      78             :     virtual void    WriteUserData(String &, sal_Bool bBrowse = false);
      79             :     virtual void    ReadUserData(const String &, sal_Bool bBrowse = false);
      80             : 
      81             :     virtual void    WriteUserDataSequence (::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = false );
      82             :     virtual void    ReadUserDataSequence (const ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = false );
      83             : 
      84             : public:
      85             :                     TYPEINFO_VISIBILITY( SC_DLLPUBLIC );
      86             : 
      87           5 :                     SFX_DECL_INTERFACE(SCID_PREVIEW_SHELL)
      88           5 :                     SFX_DECL_VIEWFACTORY(ScPreviewShell);
      89             : 
      90             :                     ScPreviewShell( SfxViewFrame*           pViewFrame,
      91             :                                     SfxViewShell*           pOldSh );
      92             : 
      93             :     virtual         ~ScPreviewShell();
      94             : 
      95             :     void            InitStartTable(SCTAB nTab);
      96             : 
      97             :     void            UpdateScrollBars();
      98             :     void            UpdateNeededScrollBars(bool bFromZoom = false);
      99             :     sal_Bool            ScrollCommand( const CommandEvent& rCEvt );
     100             : 
     101             :     void            Execute( SfxRequest& rReq );
     102             :     void            GetState( SfxItemSet& rSet );
     103             : 
     104             :     void            FillFieldData( ScHeaderFieldData& rData );
     105             : 
     106             :     ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >
     107             :                     GetSourceData() const       { return aSourceData; }
     108           0 :     sal_uInt8           GetSourceDesignMode() const { return nSourceDesignMode; }
     109             : 
     110             :     virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
     111             : 
     112             :     virtual SfxPrinter*     GetPrinter( sal_Bool bCreate = false );
     113             :     virtual sal_uInt16      SetPrinter( SfxPrinter* pNewPrinter, sal_uInt16 nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false );
     114             :     virtual bool            HasPrintOptionsPage() const;
     115             :     virtual SfxTabPage*     CreatePrintOptionsPage( Window *pParent, const SfxItemSet &rOptions );
     116             : 
     117             :     void    AddAccessibilityObject( SfxListener& rObject );
     118             :     void    RemoveAccessibilityObject( SfxListener& rObject );
     119             :     void    BroadcastAccessibility( const SfxHint &rHint );
     120             :     sal_Bool    HasAccessibilityObjects();
     121             : 
     122             :     const ScPreviewLocationData& GetLocationData();
     123             :     ScDocument*     GetDocument();
     124           0 :     SC_DLLPUBLIC ScPreview*      GetPreview() { return pPreview; }
     125             : };
     126             : 
     127             : 
     128             : 
     129             : #endif
     130             : 
     131             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10