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 #pragma once
20 
21 #include <ooo/vba/excel/XWindow.hpp>
22 #include <com/sun/star/uno/XComponentContext.hpp>
23 #include <com/sun/star/frame/XModel.hpp>
24 #include <ooo/vba/excel/XPane.hpp>
25 #include <com/sun/star/awt/XDevice.hpp>
26 #include <cppuhelper/implbase.hxx>
27 
29 
30 typedef cppu::ImplInheritanceHelper< VbaWindowBase, ov::excel::XWindow > WindowImpl_BASE;
31 
33 {
34 private:
35  css::uno::Reference< ov::excel::XPane > m_xPane;
36 
37  void init();
39  css::uno::Reference< css::beans::XPropertySet > getControllerProps() const;
41  css::uno::Reference< css::beans::XPropertySet > getFrameProps() const;
43  css::uno::Reference< css::awt::XDevice > getDevice() const;
44 
45 protected:
46  void SplitAtDefinedPosition( sal_Int32 nColumns, sal_Int32 nRows );
47 
48 public:
50  void Scroll( const css::uno::Any& Down, const css::uno::Any& Up, const css::uno::Any& ToRight, const css::uno::Any& ToLeft, bool bLargeScroll );
51 
52 public:
55  const css::uno::Reference< ov::XHelperInterface >& xParent,
56  const css::uno::Reference< css::uno::XComponentContext >& xContext,
57  const css::uno::Reference< css::frame::XModel >& xModel,
58  const css::uno::Reference< css::frame::XController >& xController );
61  const css::uno::Sequence< css::uno::Any >& aArgs,
62  const css::uno::Reference< css::uno::XComponentContext >& xContext );
63 
64  // XWindow
65  virtual css::uno::Reference< ov::excel::XRange > SAL_CALL ActiveCell( ) override;
66  virtual css::uno::Reference< ov::excel::XPane > SAL_CALL ActivePane() override;
67  virtual css::uno::Reference< ov::excel::XWorksheet > SAL_CALL ActiveSheet( ) override;
68  virtual void SAL_CALL setCaption( const css::uno::Any& _caption ) override;
69  virtual css::uno::Any SAL_CALL getCaption() override;
70  virtual sal_Bool SAL_CALL getDisplayGridlines() override;
71  virtual void SAL_CALL setDisplayGridlines( sal_Bool _displaygridlines ) override;
72  virtual sal_Bool SAL_CALL getDisplayHeadings() override;
73  virtual void SAL_CALL setDisplayHeadings( sal_Bool _bDisplayHeadings ) override;
74  virtual sal_Bool SAL_CALL getDisplayHorizontalScrollBar() override;
75  virtual void SAL_CALL setDisplayHorizontalScrollBar( sal_Bool _bDisplayHorizontalScrollBar ) override;
76  virtual sal_Bool SAL_CALL getDisplayOutline() override;
77  virtual void SAL_CALL setDisplayOutline( sal_Bool _bDisplayOutline ) override;
78  virtual sal_Bool SAL_CALL getDisplayVerticalScrollBar() override;
79  virtual void SAL_CALL setDisplayVerticalScrollBar( sal_Bool _bDisplayVerticalScrollBar ) override;
80  virtual sal_Bool SAL_CALL getDisplayWorkbookTabs() override;
81  virtual void SAL_CALL setDisplayWorkbookTabs( sal_Bool _bDisplayWorkbookTabs ) override;
82  virtual sal_Bool SAL_CALL getFreezePanes() override;
83  virtual void SAL_CALL setFreezePanes( sal_Bool _bFreezePanes ) override;
84  virtual sal_Bool SAL_CALL getSplit() override;
85  virtual void SAL_CALL setSplit( sal_Bool _bSplit ) override;
86  virtual sal_Int32 SAL_CALL getSplitColumn() override ;
87  virtual void SAL_CALL setSplitColumn( sal_Int32 _splitcolumn ) override ;
88  virtual double SAL_CALL getSplitHorizontal() override ;
89  virtual void SAL_CALL setSplitHorizontal( double _splithorizontal ) override ;
90  virtual sal_Int32 SAL_CALL getSplitRow() override ;
91  virtual void SAL_CALL setSplitRow( sal_Int32 _splitrow ) override ;
92  virtual double SAL_CALL getSplitVertical() override ;
93  virtual void SAL_CALL setSplitVertical( double _splitvertical ) override ;
94  virtual css::uno::Any SAL_CALL getScrollRow() override ;
95  virtual void SAL_CALL setScrollRow( const css::uno::Any& _scrollrow ) override ;
96  virtual css::uno::Any SAL_CALL getScrollColumn() override ;
97  virtual void SAL_CALL setScrollColumn( const css::uno::Any& _scrollcolumn ) override ;
98  virtual css::uno::Any SAL_CALL getView() override;
99  virtual void SAL_CALL setView( const css::uno::Any& _view ) override;
100  virtual css::uno::Reference< ov::excel::XRange > SAL_CALL getVisibleRange() override;
101  virtual css::uno::Any SAL_CALL getWindowState() override;
102  virtual void SAL_CALL setWindowState( const css::uno::Any& _windowstate ) override;
103  virtual css::uno::Any SAL_CALL getZoom() override;
104  virtual void SAL_CALL setZoom(const css::uno::Any& _zoom) override;
105  virtual double SAL_CALL getTabRatio() override ;
106  virtual void SAL_CALL setTabRatio( double _tabratio ) override ;
107 
108  // Methods
109  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;
110  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;
111  virtual css::uno::Any SAL_CALL SelectedSheets( const css::uno::Any& aIndex ) override;
112  virtual void SAL_CALL ScrollWorkbookTabs( const css::uno::Any& Sheets, const css::uno::Any& Position ) override;
113  virtual void SAL_CALL Activate( ) override;
114  virtual void SAL_CALL Close( const css::uno::Any& SaveChanges, const css::uno::Any& FileName, const css::uno::Any& RouteWorkBook ) override;
115  virtual css::uno::Any SAL_CALL Selection( ) override;
116  virtual css::uno::Reference< ov::excel::XRange > SAL_CALL RangeSelection() override;
117  virtual sal_Int32 SAL_CALL PointsToScreenPixelsX(sal_Int32 _points) override;
118  virtual sal_Int32 SAL_CALL PointsToScreenPixelsY(sal_Int32 _points) override;
119  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;
120  virtual void SAL_CALL PrintPreview( const css::uno::Any& EnableChanges ) override;
121  // XHelperInterface
122  virtual OUString getServiceImplName() override;
123  virtual css::uno::Sequence<OUString> getServiceNames() override;
124 };
125 
126 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
cppu::ImplInheritanceHelper< VbaWindowBase, ov::excel::XWindow > WindowImpl_BASE
Definition: vbawindow.hxx:30
virtual void SAL_CALL Activate() override
Definition: vbawindow.cxx:417
css::uno::Reference< ov::excel::XPane > m_xPane
Definition: vbawindow.hxx:35
virtual sal_Bool SAL_CALL getDisplayVerticalScrollBar() override
Definition: vbawindow.cxx:517
virtual void SAL_CALL setDisplayGridlines(sal_Bool _displaygridlines) override
Definition: vbawindow.cxx:469
virtual void SAL_CALL setScrollColumn(const css::uno::Any &_scrollcolumn) override
Definition: vbawindow.cxx:362
virtual css::uno::Sequence< OUString > getServiceNames() override
Definition: vbawindow.cxx:852
virtual css::uno::Reference< ov::excel::XRange > SAL_CALL getVisibleRange() override
Definition: vbawindow.cxx:783
virtual void SAL_CALL setFreezePanes(sal_Bool _bFreezePanes) override
Definition: vbawindow.cxx:552
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:590
virtual void SAL_CALL setTabRatio(double _tabratio) override
Definition: vbawindow.cxx:835
virtual OUString getServiceImplName() override
Definition: vbawindow.cxx:846
css::uno::Reference< css::beans::XPropertySet > getFrameProps() const
Definition: vbawindow.cxx:233
virtual css::uno::Any SAL_CALL getView() override
Definition: vbawindow.cxx:742
std::vector< uno::Reference< sheet::XSpreadsheet > > Sheets
Definition: vbawindow.cxx:57
virtual sal_Bool SAL_CALL getDisplayHorizontalScrollBar() override
Definition: vbawindow.cxx:489
virtual double SAL_CALL getTabRatio() override
Definition: vbawindow.cxx:823
virtual void SAL_CALL setSplitRow(sal_Int32 _splitrow) override
Definition: vbawindow.cxx:648
virtual sal_Bool SAL_CALL getFreezePanes() override
Definition: vbawindow.cxx:545
virtual css::uno::Any SAL_CALL getScrollRow() override
Definition: vbawindow.cxx:317
virtual css::uno::Reference< ov::excel::XRange > SAL_CALL RangeSelection() override
Definition: vbawindow.cxx:453
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:332
virtual sal_Int32 SAL_CALL PointsToScreenPixelsX(sal_Int32 _points) override
Definition: vbawindow.cxx:792
virtual sal_Int32 SAL_CALL PointsToScreenPixelsY(sal_Int32 _points) override
Definition: vbawindow.cxx:800
virtual sal_Bool SAL_CALL getDisplayWorkbookTabs() override
Definition: vbawindow.cxx:531
virtual void SAL_CALL setDisplayOutline(sal_Bool _bDisplayOutline) override
Definition: vbawindow.cxx:511
virtual void SAL_CALL setSplitVertical(double _splitvertical) override
Definition: vbawindow.cxx:666
unsigned char sal_Bool
virtual css::uno::Reference< ov::excel::XRange > SAL_CALL ActiveCell() override
Definition: vbawindow.cxx:439
virtual css::uno::Any SAL_CALL getCaption() override
Definition: vbawindow.cxx:302
virtual sal_Int32 SAL_CALL getSplitColumn() override
Definition: vbawindow.cxx:608
css::uno::Reference< css::beans::XPropertySet > getControllerProps() const
Definition: vbawindow.cxx:227
virtual void SAL_CALL setDisplayVerticalScrollBar(sal_Bool _bDisplayVerticalScrollBar) override
Definition: vbawindow.cxx:525
virtual void SAL_CALL setDisplayHeadings(sal_Bool _bDisplayHeadings) override
Definition: vbawindow.cxx:483
virtual void SAL_CALL setView(const css::uno::Any &_view) override
Definition: vbawindow.cxx:760
virtual void SAL_CALL setSplitHorizontal(double _splithorizontal) override
Definition: vbawindow.cxx:633
virtual sal_Bool SAL_CALL getDisplayHeadings() override
Definition: vbawindow.cxx:475
virtual void SAL_CALL setZoom(const css::uno::Any &_zoom) override
Definition: vbawindow.cxx:720
virtual void SAL_CALL setDisplayWorkbookTabs(sal_Bool _bDisplayWorkbookTabs) override
Definition: vbawindow.cxx:539
virtual void SAL_CALL Close(const css::uno::Any &SaveChanges, const css::uno::Any &FileName, const css::uno::Any &RouteWorkBook) override
Definition: vbawindow.cxx:425
virtual void SAL_CALL setCaption(const css::uno::Any &_caption) override
Definition: vbawindow.cxx:311
void SplitAtDefinedPosition(sal_Int32 nColumns, sal_Int32 nRows)
Definition: vbawindow.cxx:673
virtual css::uno::Any SAL_CALL Selection() override
Definition: vbawindow.cxx:446
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:808
virtual css::uno::Any SAL_CALL getWindowState() override
Definition: vbawindow.cxx:377
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:347
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:497
virtual double SAL_CALL getSplitHorizontal() override
Definition: vbawindow.cxx:626
virtual double SAL_CALL getSplitVertical() override
Definition: vbawindow.cxx:659
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:432
virtual sal_Bool SAL_CALL getSplit() override
Definition: vbawindow.cxx:583
virtual sal_Bool SAL_CALL getDisplayOutline() override
Definition: vbawindow.cxx:503
virtual css::uno::Reference< ov::excel::XWorksheet > SAL_CALL ActiveSheet() override
Definition: vbawindow.cxx:735
virtual sal_Int32 SAL_CALL getSplitRow() override
Definition: vbawindow.cxx:641
virtual sal_Bool SAL_CALL getDisplayGridlines() override
Definition: vbawindow.cxx:461
virtual css::uno::Any SAL_CALL getZoom() override
Definition: vbawindow.cxx:700
virtual void SAL_CALL PrintPreview(const css::uno::Any &EnableChanges) override
Definition: vbawindow.cxx:816
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:615
virtual void SAL_CALL setWindowState(const css::uno::Any &_windowstate) override
Definition: vbawindow.cxx:395