1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
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>
28 #include <vbahelper/vbawindowbase.hxx>
30 typedef cppu::ImplInheritanceHelper
< VbaWindowBase
, ov::excel::XWindow
> WindowImpl_BASE
;
32 class ScVbaWindow
: public WindowImpl_BASE
35 css::uno::Reference
< ov::excel::XPane
> m_xPane
;
38 /// @throws css::uno::RuntimeException
39 css::uno::Reference
< css::beans::XPropertySet
> getControllerProps() const;
40 /// @throws css::uno::RuntimeException
41 css::uno::Reference
< css::beans::XPropertySet
> getFrameProps() const;
42 /// @throws css::uno::RuntimeException
43 css::uno::Reference
< css::awt::XDevice
> getDevice() const;
46 void SplitAtDefinedPosition( sal_Int32 nColumns
, sal_Int32 nRows
);
49 /// @throws css::uno::RuntimeException
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
);
53 /// @throws css::uno::RuntimeException
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
);
59 /// @throws css::uno::RuntimeException
61 const css::uno::Sequence
< css::uno::Any
>& aArgs
,
62 const css::uno::Reference
< css::uno::XComponentContext
>& xContext
);
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
;
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
;
122 virtual OUString
getServiceImplName() override
;
123 virtual css::uno::Sequence
<OUString
> getServiceNames() override
;
126 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */