ITEM: Refactor ItemType
[LibreOffice.git] / sw / source / ui / vba / vbarows.hxx
blob98a1069fa8a46afe128f058943a864d2f568bc91
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
19 #ifndef INCLUDED_SW_SOURCE_UI_VBA_VBAROWS_HXX
20 #define INCLUDED_SW_SOURCE_UI_VBA_VBAROWS_HXX
22 #include <vbahelper/vbacollectionimpl.hxx>
23 #include <ooo/vba/word/XRows.hpp>
24 #include <ooo/vba/word/XColumns.hpp>
25 #include <com/sun/star/table/XTableRows.hpp>
26 #include <com/sun/star/text/XTextTable.hpp>
28 typedef CollTestImplHelper< ooo::vba::word::XRows > SwVbaRows_BASE;
30 class SwVbaRows : public SwVbaRows_BASE
32 private:
33 css::uno::Reference< css::text::XTextTable > mxTextTable;
34 css::uno::Reference< css::table::XTableRows > mxTableRows;
35 sal_Int32 mnStartRowIndex;
36 sal_Int32 mnEndRowIndex;
38 private:
39 /// @throws css::uno::RuntimeException
40 void setIndentWithAdjustNone( sal_Int32 indent );
41 /// @throws css::uno::RuntimeException
42 void setIndentWithAdjustFirstColumn( const css::uno::Reference< ooo::vba::word::XColumns >& xColumns, sal_Int32 indent );
43 /// @throws css::uno::RuntimeException
44 void setIndentWithAdjustProportional( const css::uno::Reference< ooo::vba::word::XColumns >& xColumns, sal_Int32 indent );
45 /// @throws css::uno::RuntimeException
46 void setIndentWithAdjustSameWidth( const css::uno::Reference< ooo::vba::word::XColumns >& xColumns, sal_Int32 indent );
48 public:
49 /// @throws css::uno::RuntimeException
50 SwVbaRows( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, css::uno::Reference< css::text::XTextTable > xTextTable, const css::uno::Reference< css::table::XTableRows >& xTableRows );
51 /// @throws css::uno::RuntimeException
52 SwVbaRows( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, css::uno::Reference< css::text::XTextTable > xTextTable, const css::uno::Reference< css::table::XTableRows >& xTableRows, sal_Int32 nStarIndex, sal_Int32 nEndIndex );
54 // Attributes
55 virtual ::sal_Int32 SAL_CALL getAlignment() override;
56 virtual void SAL_CALL setAlignment( ::sal_Int32 _alignment ) override;
57 virtual css::uno::Any SAL_CALL getAllowBreakAcrossPages() override;
58 virtual void SAL_CALL setAllowBreakAcrossPages( const css::uno::Any& _allowbreakacrosspages ) override;
59 virtual float SAL_CALL getSpaceBetweenColumns() override;
60 virtual void SAL_CALL setSpaceBetweenColumns( float _spacebetweencolumns ) override;
62 // Methods
63 virtual void SAL_CALL Delete( ) override;
64 virtual void SAL_CALL SetLeftIndent( float LeftIndent, ::sal_Int32 RulerStyle ) override;
65 virtual void SAL_CALL Select( ) override;
67 //XCollection
68 virtual ::sal_Int32 SAL_CALL getCount() override;
69 virtual css::uno::Any SAL_CALL Item( const css::uno::Any& Index1, const css::uno::Any& /*not processed in this base class*/ ) override;
70 // XEnumerationAccess
71 virtual css::uno::Type SAL_CALL getElementType() override;
72 virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override;
74 // SwVbaRows_BASE
75 virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ) override;
76 virtual OUString getServiceImplName() override;
77 virtual css::uno::Sequence<OUString> getServiceNames() override;
80 #endif // INCLUDED_SW_SOURCE_UI_VBA_VBAROWS_HXX
82 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */