1*38d50f7bSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*38d50f7bSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*38d50f7bSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*38d50f7bSAndrew Rist * distributed with this work for additional information 6*38d50f7bSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*38d50f7bSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*38d50f7bSAndrew Rist * "License"); you may not use this file except in compliance 9*38d50f7bSAndrew Rist * with the License. You may obtain a copy of the License at 10*38d50f7bSAndrew Rist * 11*38d50f7bSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*38d50f7bSAndrew Rist * 13*38d50f7bSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*38d50f7bSAndrew Rist * software distributed under the License is distributed on an 15*38d50f7bSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*38d50f7bSAndrew Rist * KIND, either express or implied. See the License for the 17*38d50f7bSAndrew Rist * specific language governing permissions and limitations 18*38d50f7bSAndrew Rist * under the License. 19*38d50f7bSAndrew Rist * 20*38d50f7bSAndrew Rist *************************************************************/ 21*38d50f7bSAndrew Rist 22*38d50f7bSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef SC_PREVWSH_HXX 25cdf0e10cSrcweir #define SC_PREVWSH_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir class ScrollBar; 28cdf0e10cSrcweir 29cdf0e10cSrcweir #include "address.hxx" 30cdf0e10cSrcweir #include <sfx2/viewfac.hxx> 31cdf0e10cSrcweir #include <sfx2/viewsh.hxx> 32cdf0e10cSrcweir #include <svx/zoomitem.hxx> 33cdf0e10cSrcweir 34cdf0e10cSrcweir #include "shellids.hxx" 35cdf0e10cSrcweir 36cdf0e10cSrcweir class ScDocument; 37cdf0e10cSrcweir class ScDocShell; 38cdf0e10cSrcweir class ScPreview; 39cdf0e10cSrcweir struct ScHeaderFieldData; 40cdf0e10cSrcweir class ScPreviewLocationData; 41cdf0e10cSrcweir class CommandEvent; 42cdf0e10cSrcweir 43cdf0e10cSrcweir //================================================================== 44cdf0e10cSrcweir 45cdf0e10cSrcweir 46cdf0e10cSrcweir class ScPreviewShell: public SfxViewShell 47cdf0e10cSrcweir { 48cdf0e10cSrcweir ScDocShell* pDocShell; 49cdf0e10cSrcweir 50cdf0e10cSrcweir ScPreview* pPreview; // Ausgabe-Fenster 51cdf0e10cSrcweir ScrollBar* pHorScroll; 52cdf0e10cSrcweir ScrollBar* pVerScroll; 53cdf0e10cSrcweir Window* pCorner; 54cdf0e10cSrcweir 55cdf0e10cSrcweir ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aSourceData; // ViewData 56cdf0e10cSrcweir sal_uInt8 nSourceDesignMode; // form design mode from TabView 57cdf0e10cSrcweir SvxZoomType eZoom; 58cdf0e10cSrcweir long nMaxVertPos; 59cdf0e10cSrcweir 60cdf0e10cSrcweir SfxBroadcaster* pAccessibilityBroadcaster; 61cdf0e10cSrcweir 62cdf0e10cSrcweir private: 63cdf0e10cSrcweir void Construct( Window* pParent ); 64cdf0e10cSrcweir DECL_LINK(ScrollHandler, ScrollBar* ); 65cdf0e10cSrcweir void DoScroll( sal_uInt16 nMode ); 66cdf0e10cSrcweir 67cdf0e10cSrcweir protected: 68cdf0e10cSrcweir virtual void Activate(sal_Bool bMDI); 69cdf0e10cSrcweir virtual void Deactivate(sal_Bool bMDI); 70cdf0e10cSrcweir 71cdf0e10cSrcweir virtual void AdjustPosSizePixel( const Point &rPos, const Size &rSize ); 72cdf0e10cSrcweir 73cdf0e10cSrcweir virtual void InnerResizePixel( const Point &rOfs, const Size &rSize ); 74cdf0e10cSrcweir virtual void OuterResizePixel( const Point &rOfs, const Size &rSize ); 75cdf0e10cSrcweir 76cdf0e10cSrcweir virtual Size GetOptimalSizePixel() const; 77cdf0e10cSrcweir 78cdf0e10cSrcweir virtual String GetDescription() const; 79cdf0e10cSrcweir 80cdf0e10cSrcweir virtual void WriteUserData(String &, sal_Bool bBrowse = sal_False); 81cdf0e10cSrcweir virtual void ReadUserData(const String &, sal_Bool bBrowse = sal_False); 82cdf0e10cSrcweir 83cdf0e10cSrcweir virtual void WriteUserDataSequence (::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = sal_False ); 84cdf0e10cSrcweir virtual void ReadUserDataSequence (const ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = sal_False ); 85cdf0e10cSrcweir 86cdf0e10cSrcweir public: 87cdf0e10cSrcweir TYPEINFO(); 88cdf0e10cSrcweir 89cdf0e10cSrcweir SFX_DECL_INTERFACE(SCID_PREVIEW_SHELL) 90cdf0e10cSrcweir SFX_DECL_VIEWFACTORY(ScPreviewShell); 91cdf0e10cSrcweir 92cdf0e10cSrcweir ScPreviewShell( SfxViewFrame* pViewFrame, 93cdf0e10cSrcweir SfxViewShell* pOldSh ); 94cdf0e10cSrcweir 95cdf0e10cSrcweir virtual ~ScPreviewShell(); 96cdf0e10cSrcweir 97cdf0e10cSrcweir void InitStartTable(SCTAB nTab); 98cdf0e10cSrcweir 99cdf0e10cSrcweir void UpdateScrollBars(); 100cdf0e10cSrcweir sal_Bool ScrollCommand( const CommandEvent& rCEvt ); 101cdf0e10cSrcweir 102cdf0e10cSrcweir void Execute( SfxRequest& rReq ); 103cdf0e10cSrcweir void GetState( SfxItemSet& rSet ); 104cdf0e10cSrcweir 105cdf0e10cSrcweir void FillFieldData( ScHeaderFieldData& rData ); 106cdf0e10cSrcweir 107cdf0e10cSrcweir ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue > GetSourceData() const108cdf0e10cSrcweir GetSourceData() const { return aSourceData; } GetSourceDesignMode() const109cdf0e10cSrcweir sal_uInt8 GetSourceDesignMode() const { return nSourceDesignMode; } 110cdf0e10cSrcweir 111cdf0e10cSrcweir virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); 112cdf0e10cSrcweir 113cdf0e10cSrcweir virtual SfxPrinter* GetPrinter( sal_Bool bCreate = sal_False ); 114cdf0e10cSrcweir virtual sal_uInt16 SetPrinter( SfxPrinter* pNewPrinter, sal_uInt16 nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false ); 115cdf0e10cSrcweir virtual SfxTabPage* CreatePrintOptionsPage( Window *pParent, const SfxItemSet &rOptions ); 116cdf0e10cSrcweir 117cdf0e10cSrcweir void AddAccessibilityObject( SfxListener& rObject ); 118cdf0e10cSrcweir void RemoveAccessibilityObject( SfxListener& rObject ); 119cdf0e10cSrcweir void BroadcastAccessibility( const SfxHint &rHint ); 120cdf0e10cSrcweir sal_Bool HasAccessibilityObjects(); 121cdf0e10cSrcweir 122cdf0e10cSrcweir const ScPreviewLocationData& GetLocationData(); 123cdf0e10cSrcweir ScDocument* GetDocument(); GetPreview()124cdf0e10cSrcweir ScPreview* GetPreview() { return pPreview; } 125cdf0e10cSrcweir }; 126cdf0e10cSrcweir 127cdf0e10cSrcweir 128cdf0e10cSrcweir 129cdf0e10cSrcweir #endif 130