LibreOffice Module sc (master) 1
prevwsh.hxx
Go to the documentation of this file.
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#pragma once
21
22#include <types.hxx>
23#include <scdllapi.h>
24
25#include <sfx2/viewsh.hxx>
26#include <sfx2/zoomitem.hxx>
27#include <vcl/syswin.hxx>
28
29#include <shellids.hxx>
30
31class ScDocument;
32class ScDocShell;
33class ScPreview;
36class CommandEvent;
37class SfxViewFactory;
38
40{
42
44 VclPtr<ScPreview> pPreview; // Output window
48
49 TriState nSourceDesignMode; // form design mode from TabView
52
53 std::unique_ptr<SfxBroadcaster> pAccessibilityBroadcaster;
54 bool GetPageSize( Size& aPageSize );
55private:
56 void Construct( vcl::Window* pParent );
57 DECL_DLLPRIVATE_LINK( ScrollHandler, ScrollBar*, void );
59 void DoScroll( sal_uInt16 nMode );
60 void ExitPreview();
61
62 virtual void Activate(bool bMDI) override;
63 void AdjustPosSizePixel( const Point &rPos, const Size &rSize );
64
65 virtual void InnerResizePixel( const Point &rOfs, const Size &rSize, bool inplaceEditModeChange ) override;
66 virtual void OuterResizePixel( const Point &rOfs, const Size &rSize ) override;
67
68 virtual void WriteUserData(OUString &, bool bBrowse = false) override;
69 virtual void ReadUserData(const OUString &, bool bBrowse = false) override;
70
71 virtual void WriteUserDataSequence (css::uno::Sequence < css::beans::PropertyValue >& ) override;
72 virtual void ReadUserDataSequence (const css::uno::Sequence < css::beans::PropertyValue >& ) override;
73
74public:
76 SFX_DECL_VIEWFACTORY(ScPreviewShell);
77
78private:
80 static void InitInterface_Impl();
81
82public:
83 ScPreviewShell( SfxViewFrame* pViewFrame,
84 SfxViewShell* pOldSh );
85
86 virtual ~ScPreviewShell() override;
87
88 void InitStartTable(SCTAB nTab);
89
90 void UpdateScrollBars();
91 void UpdateNeededScrollBars(bool bFromZoom);
92 bool ScrollCommand( const CommandEvent& rCEvt );
93
94 void Execute( SfxRequest& rReq );
95 void GetState( SfxItemSet& rSet );
96
97 void FillFieldData( ScHeaderFieldData& rData );
98
99 TriState GetSourceDesignMode() const { return nSourceDesignMode; }
100
101 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
102
103 virtual SfxPrinter* GetPrinter( bool bCreate = false ) override;
104 virtual sal_uInt16 SetPrinter( SfxPrinter* pNewPrinter, SfxPrinterChangeFlags nDiffFlags = SFX_PRINTER_ALL ) override;
105 virtual bool HasPrintOptionsPage() const override;
106 virtual std::unique_ptr<SfxTabPage> CreatePrintOptionsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet &rOptions) override;
107
108 void AddAccessibilityObject( SfxListener& rObject );
109 void RemoveAccessibilityObject( SfxListener& rObject );
110 void BroadcastAccessibility( const SfxHint &rHint );
111 bool HasAccessibilityObjects() const;
112
113 const ScPreviewLocationData& GetLocationData();
114 ScDocument& GetDocument();
115 ScPreview* GetPreview() { return pPreview; }
116};
117
118/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
VclPtr< ScrollBar > pVerScroll
Definition: prevwsh.hxx:46
VclPtr< vcl::Window > pCorner
Definition: prevwsh.hxx:47
TriState nSourceDesignMode
Definition: prevwsh.hxx:49
VclPtr< ScPreview > pPreview
Definition: prevwsh.hxx:44
std::unique_ptr< SfxBroadcaster > pAccessibilityBroadcaster
Definition: prevwsh.hxx:53
ScDocShell * pDocShell
Definition: prevwsh.hxx:41
ScPreview * GetPreview()
Definition: prevwsh.hxx:115
SvxZoomType eZoom
Definition: prevwsh.hxx:50
tools::Long nMaxVertPos
Definition: prevwsh.hxx:51
VclPtr< ScrollBar > pHorScroll
Definition: prevwsh.hxx:45
VclPtr< SystemWindow > mpFrameWindow
Definition: prevwsh.hxx:43
DECL_DLLPRIVATE_LINK(ScrollHandler, ScrollBar *, void)
DECL_DLLPRIVATE_LINK(CloseHdl, SystemWindow &, void)
virtual SfxPrinter * GetPrinter(bool bCreate=false)
virtual void Activate(bool IsMDIActivate) override
virtual void WriteUserData(OUString &, bool bBrowse=false)
virtual void InnerResizePixel(const Point &rOfs, const Size &rSize, bool inplaceEditModeChange)
virtual void OuterResizePixel(const Point &rOfs, const Size &rSize)
virtual void ReadUserDataSequence(const css::uno::Sequence< css::beans::PropertyValue > &)
virtual bool HasPrintOptionsPage() const
virtual void WriteUserDataSequence(css::uno::Sequence< css::beans::PropertyValue > &)
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
virtual void ReadUserData(const OUString &, bool bBrowse=false)
virtual sal_uInt16 SetPrinter(SfxPrinter *pNewPrinter, SfxPrinterChangeFlags nDiffFlags=SFX_PRINTER_ALL)
virtual std::unique_ptr< SfxTabPage > CreatePrintOptionsPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rOptions)
TriState
long Long
#define SC_DLLPUBLIC
Definition: scdllapi.h:27
#define SFX_DECL_INTERFACE(nId)
#define SCID_PREVIEW_SHELL
Definition: shellids.hxx:30
sal_Int16 SCTAB
Definition: types.hxx:22
SfxPrinterChangeFlags
SvxZoomType