LibreOffice Module sc (master)  1
vbawindow.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 #ifndef INCLUDED_SC_SOURCE_UI_VBA_VBAWINDOW_HXX
20 #define INCLUDED_SC_SOURCE_UI_VBA_VBAWINDOW_HXX
21 
22 #include <ooo/vba/excel/XWindow.hpp>
23 #include <com/sun/star/uno/XComponentContext.hpp>
24 #include <com/sun/star/frame/XModel.hpp>
25 #include <ooo/vba/excel/XPane.hpp>
26 #include <com/sun/star/awt/XDevice.hpp>
27 #include <cppuhelper/implbase.hxx>
28 
30 
31 typedef cppu::ImplInheritanceHelper< VbaWindowBase, ov::excel::XWindow > WindowImpl_BASE;
32 
34 {
35 private:
36  css::uno::Reference< ov::excel::XPane > m_xPane;
37 
38  void init();
40  css::uno::Reference< css::beans::XPropertySet > getControllerProps() const;
42  css::uno::Reference< css::beans::XPropertySet > getFrameProps() const;
44  css::uno::Reference< css::awt::XDevice > getDevice() const;
45 
46 protected:
47  void SplitAtDefinedPosition( sal_Int32 nColumns, sal_Int32 nRows );
48 
49 public:
51  void Scroll( const css::uno::Any& Down, const css::uno::Any& Up, const css::uno::Any& ToRight, const css::uno::Any& ToLeft, bool bLargeScroll );
52 
53 public:
56  const css::uno::Reference< ov::XHelperInterface >& xParent,
57  const css::uno::Reference< css::uno::XComponentContext >& xContext,
58  const css::uno::Reference< css::frame::XModel >& xModel,
59  const css::uno::Reference< css::frame::XController >& xController );
62  const css::uno::Sequence< css::uno::Any >& aArgs,
63  const css::uno::Reference< css::uno::XComponentContext >& xContext );
64 
65  // XWindow
66  virtual css::uno::Reference< ov::excel::XRange > SAL_CALL ActiveCell( ) override;
67  virtual css::uno::Reference< ov::excel::XPane > SAL_CALL ActivePane() override;
68  virtual css::uno::Reference< ov::excel::XWorksheet > SAL_CALL ActiveSheet( ) override;
69  virtual void SAL_CALL setCaption( const css::uno::Any& _caption ) override;
70  virtual css::uno::Any SAL_CALL getCaption() override;
71  virtual sal_Bool SAL_CALL getDisplayGridlines() override;
72  virtual void SAL_CALL setDisplayGridlines( sal_Bool _displaygridlines ) override;
73  virtual sal_Bool SAL_CALL getDisplayHeadings() override;
74  virtual void SAL_CALL setDisplayHeadings( sal_Bool _bDisplayHeadings ) override;
75  virtual sal_Bool SAL_CALL getDisplayHorizontalScrollBar() override;
76  virtual void SAL_CALL setDisplayHorizontalScrollBar( sal_Bool _bDisplayHorizontalScrollBar ) override;
77  virtual sal_Bool SAL_CALL getDisplayOutline() override;
78  virtual void SAL_CALL setDisplayOutline( sal_Bool _bDisplayOutline ) override;
79  virtual sal_Bool SAL_CALL getDisplayVerticalScrollBar() override;
80  virtual void SAL_CALL setDisplayVerticalScrollBar( sal_Bool _bDisplayVerticalScrollBar ) override;
81  virtual sal_Bool SAL_CALL getDisplayWorkbookTabs() override;
82  virtual void SAL_CALL setDisplayWorkbookTabs( sal_Bool _bDisplayWorkbookTabs ) override;
83  virtual sal_Bool SAL_CALL getFreezePanes() override;
84  virtual void SAL_CALL setFreezePanes( sal_Bool _bFreezePanes ) override;
85  virtual sal_Bool SAL_CALL getSplit() override;
86  virtual void SAL_CALL setSplit( sal_Bool _bSplit ) override;
87  virtual sal_Int32 SAL_CALL getSplitColumn() override ;
88  virtual void SAL_CALL setSplitColumn( sal_Int32 _splitcolumn ) override ;
89  virtual double SAL_CALL getSplitHorizontal() override ;
90  virtual void SAL_CALL setSplitHorizontal( double _splithorizontal ) override ;
91  virtual sal_Int32 SAL_CALL getSplitRow() override ;
92  virtual void SAL_CALL setSplitRow( sal_Int32 _splitrow ) override ;
93  virtual double SAL_CALL getSplitVertical() override ;
94  virtual void SAL_CALL setSplitVertical( double _splitvertical ) override ;
95  virtual css::uno::Any SAL_CALL getScrollRow() override ;
96  virtual void SAL_CALL setScrollRow( const css::uno::Any& _scrollrow ) override ;
97  virtual css::uno::Any SAL_CALL getScrollColumn() override ;
98  virtual void SAL_CALL setScrollColumn( const css::uno::Any& _scrollcolumn ) override ;
99  virtual css::uno::Any SAL_CALL getView() override;
100  virtual void SAL_CALL setView( const css::uno::Any& _view ) override;
101  virtual css::uno::Reference< ov::excel::XRange > SAL_CALL getVisibleRange() override;
102  virtual css::uno::Any SAL_CALL getWindowState() override;
103  virtual void SAL_CALL setWindowState( const css::uno::Any& _windowstate ) override;
104  virtual css::uno::Any SAL_CALL getZoom() override;
105  virtual void SAL_CALL setZoom(const css::uno::Any& _zoom) override;
106  virtual double SAL_CALL getTabRatio() override ;
107  virtual void SAL_CALL setTabRatio( double _tabratio ) override ;
108 
109  // Methods
110  virtual void SAL_CALL SmallScroll( const css::uno::Any& Down, const css::uno::Any& Up, const css::uno::Any& ToRight, const css::uno::Any& ToLeft ) override;
111  virtual void SAL_CALL LargeScroll( const css::uno::Any& Down, const css::uno::Any& Up, const css::uno::Any& ToRight, const css::uno::Any& ToLeft ) override;
112  virtual css::uno::Any SAL_CALL SelectedSheets( const css::uno::Any& aIndex ) override;
113  virtual void SAL_CALL ScrollWorkbookTabs( const css::uno::Any& Sheets, const css::uno::Any& Position ) override;
114  virtual void SAL_CALL Activate( ) override;
115  virtual void SAL_CALL Close( const css::uno::Any& SaveChanges, const css::uno::Any& FileName, const css::uno::Any& RouteWorkBook ) override;
116  virtual css::uno::Any SAL_CALL Selection( ) override;
117  virtual css::uno::Reference< ov::excel::XRange > SAL_CALL RangeSelection() override;
118  virtual sal_Int32 SAL_CALL PointsToScreenPixelsX(sal_Int32 _points) override;
119  virtual sal_Int32 SAL_CALL PointsToScreenPixelsY(sal_Int32 _points) override;
120  virtual void SAL_CALL PrintOut( const css::uno::Any& From, const css::uno::Any&To, const css::uno::Any& Copies, const css::uno::Any& Preview, const css::uno::Any& ActivePrinter, const css::uno::Any& PrintToFile, const css::uno::Any& Collate, const css::uno::Any& PrToFileName ) override;
121  virtual void SAL_CALL PrintPreview( const css::uno::Any& EnableChanges ) override;
122  // XHelperInterface
123  virtual OUString getServiceImplName() override;
124  virtual css::uno::Sequence<OUString> getServiceNames() override;
125 };
126 
127 #endif // INCLUDED_SC_SOURCE_UI_VBA_VBAWINDOW_HXX
128 
129 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
cppu::ImplInheritanceHelper< VbaWindowBase, ov::excel::XWindow > WindowImpl_BASE
Definition: vbawindow.hxx:31
virtual void SAL_CALL Activate() override
Definition: vbawindow.cxx:447
css::uno::Reference< ov::excel::XPane > m_xPane
Definition: vbawindow.hxx:36
virtual sal_Bool SAL_CALL getDisplayVerticalScrollBar() override
Definition: vbawindow.cxx:547
virtual void SAL_CALL setDisplayGridlines(sal_Bool _displaygridlines) override
Definition: vbawindow.cxx:499
virtual void SAL_CALL setScrollColumn(const css::uno::Any &_scrollcolumn) override
Definition: vbawindow.cxx:392
virtual css::uno::Sequence< OUString > getServiceNames() override
Definition: vbawindow.cxx:882
virtual css::uno::Reference< ov::excel::XRange > SAL_CALL getVisibleRange() override
Definition: vbawindow.cxx:813
virtual void SAL_CALL setFreezePanes(sal_Bool _bFreezePanes) override
Definition: vbawindow.cxx:582
void init()
Definition: vbawindow.cxx:207
virtual void SAL_CALL ScrollWorkbookTabs(const css::uno::Any &Sheets, const css::uno::Any &Position) override
Definition: vbawindow.cxx:282
virtual void SAL_CALL setSplit(sal_Bool _bSplit) override
Definition: vbawindow.cxx:620
virtual void SAL_CALL setTabRatio(double _tabratio) override
Definition: vbawindow.cxx:865
virtual OUString getServiceImplName() override
Definition: vbawindow.cxx:876
css::uno::Reference< css::beans::XPropertySet > getFrameProps() const
Definition: vbawindow.cxx:233
virtual css::uno::Any SAL_CALL getView() override
Definition: vbawindow.cxx:772
std::vector< uno::Reference< sheet::XSpreadsheet > > Sheets
Definition: vbawindow.cxx:57
virtual sal_Bool SAL_CALL getDisplayHorizontalScrollBar() override
Definition: vbawindow.cxx:519
virtual double SAL_CALL getTabRatio() override
Definition: vbawindow.cxx:853
virtual void SAL_CALL setSplitRow(sal_Int32 _splitrow) override
Definition: vbawindow.cxx:678
virtual sal_Bool SAL_CALL getFreezePanes() override
Definition: vbawindow.cxx:575
virtual css::uno::Any SAL_CALL getScrollRow() override
Definition: vbawindow.cxx:347
virtual css::uno::Reference< ov::excel::XRange > SAL_CALL RangeSelection() override
Definition: vbawindow.cxx:483
virtual void SAL_CALL SmallScroll(const css::uno::Any &Down, const css::uno::Any &Up, const css::uno::Any &ToRight, const css::uno::Any &ToLeft) override
Definition: vbawindow.cxx:256
css::uno::Reference< css::awt::XDevice > getDevice() const
Definition: vbawindow.cxx:239
virtual void SAL_CALL setScrollRow(const css::uno::Any &_scrollrow) override
Definition: vbawindow.cxx:362
virtual sal_Int32 SAL_CALL PointsToScreenPixelsX(sal_Int32 _points) override
Definition: vbawindow.cxx:822
virtual sal_Int32 SAL_CALL PointsToScreenPixelsY(sal_Int32 _points) override
Definition: vbawindow.cxx:830
virtual sal_Bool SAL_CALL getDisplayWorkbookTabs() override
Definition: vbawindow.cxx:561
virtual void SAL_CALL setDisplayOutline(sal_Bool _bDisplayOutline) override
Definition: vbawindow.cxx:541
virtual void SAL_CALL setSplitVertical(double _splitvertical) override
Definition: vbawindow.cxx:696
unsigned char sal_Bool
virtual css::uno::Reference< ov::excel::XRange > SAL_CALL ActiveCell() override
Definition: vbawindow.cxx:469
virtual css::uno::Any SAL_CALL getCaption() override
Definition: vbawindow.cxx:302
virtual sal_Int32 SAL_CALL getSplitColumn() override
Definition: vbawindow.cxx:638
css::uno::Reference< css::beans::XPropertySet > getControllerProps() const
Definition: vbawindow.cxx:227
virtual void SAL_CALL setDisplayVerticalScrollBar(sal_Bool _bDisplayVerticalScrollBar) override
Definition: vbawindow.cxx:555
virtual void SAL_CALL setDisplayHeadings(sal_Bool _bDisplayHeadings) override
Definition: vbawindow.cxx:513
virtual void SAL_CALL setView(const css::uno::Any &_view) override
Definition: vbawindow.cxx:790
virtual void SAL_CALL setSplitHorizontal(double _splithorizontal) override
Definition: vbawindow.cxx:663
virtual sal_Bool SAL_CALL getDisplayHeadings() override
Definition: vbawindow.cxx:505
virtual void SAL_CALL setZoom(const css::uno::Any &_zoom) override
Definition: vbawindow.cxx:750
virtual void SAL_CALL setDisplayWorkbookTabs(sal_Bool _bDisplayWorkbookTabs) override
Definition: vbawindow.cxx:569
virtual void SAL_CALL Close(const css::uno::Any &SaveChanges, const css::uno::Any &FileName, const css::uno::Any &RouteWorkBook) override
Definition: vbawindow.cxx:455
virtual void SAL_CALL setCaption(const css::uno::Any &_caption) override
Definition: vbawindow.cxx:341
void SplitAtDefinedPosition(sal_Int32 nColumns, sal_Int32 nRows)
Definition: vbawindow.cxx:703
virtual css::uno::Any SAL_CALL Selection() override
Definition: vbawindow.cxx:476
virtual void SAL_CALL PrintOut(const css::uno::Any &From, const css::uno::Any &To, const css::uno::Any &Copies, const css::uno::Any &Preview, const css::uno::Any &ActivePrinter, const css::uno::Any &PrintToFile, const css::uno::Any &Collate, const css::uno::Any &PrToFileName) override
Definition: vbawindow.cxx:838
virtual css::uno::Any SAL_CALL getWindowState() override
Definition: vbawindow.cxx:407
virtual css::uno::Any SAL_CALL SelectedSheets(const css::uno::Any &aIndex) override
Definition: vbawindow.cxx:268
virtual css::uno::Any SAL_CALL getScrollColumn() override
Definition: vbawindow.cxx:377
cppu::ImplInheritanceHelper< VbaWindowBase, ov::word::XWindow > WindowImpl_BASE
void Scroll(const css::uno::Any &Down, const css::uno::Any &Up, const css::uno::Any &ToRight, const css::uno::Any &ToLeft, bool bLargeScroll)
Definition: vbawindow.cxx:245
virtual void SAL_CALL setDisplayHorizontalScrollBar(sal_Bool _bDisplayHorizontalScrollBar) override
Definition: vbawindow.cxx:527
virtual double SAL_CALL getSplitHorizontal() override
Definition: vbawindow.cxx:656
virtual double SAL_CALL getSplitVertical() override
Definition: vbawindow.cxx:689
virtual void SAL_CALL LargeScroll(const css::uno::Any &Down, const css::uno::Any &Up, const css::uno::Any &ToRight, const css::uno::Any &ToLeft) override
Definition: vbawindow.cxx:262
virtual css::uno::Reference< ov::excel::XPane > SAL_CALL ActivePane() override
Definition: vbawindow.cxx:462
virtual sal_Bool SAL_CALL getSplit() override
Definition: vbawindow.cxx:613
virtual sal_Bool SAL_CALL getDisplayOutline() override
Definition: vbawindow.cxx:533
virtual css::uno::Reference< ov::excel::XWorksheet > SAL_CALL ActiveSheet() override
Definition: vbawindow.cxx:765
virtual sal_Int32 SAL_CALL getSplitRow() override
Definition: vbawindow.cxx:671
virtual sal_Bool SAL_CALL getDisplayGridlines() override
Definition: vbawindow.cxx:491
virtual css::uno::Any SAL_CALL getZoom() override
Definition: vbawindow.cxx:730
virtual void SAL_CALL PrintPreview(const css::uno::Any &EnableChanges) override
Definition: vbawindow.cxx:846
ScVbaWindow(const css::uno::Reference< ov::XHelperInterface > &xParent, const css::uno::Reference< css::uno::XComponentContext > &xContext, const css::uno::Reference< css::frame::XModel > &xModel, const css::uno::Reference< css::frame::XController > &xController)
virtual void SAL_CALL setSplitColumn(sal_Int32 _splitcolumn) override
Definition: vbawindow.cxx:645
virtual void SAL_CALL setWindowState(const css::uno::Any &_windowstate) override
Definition: vbawindow.cxx:425