nss: upgrade to release 3.73
[LibreOffice.git] / sc / source / ui / vba / vbaformat.hxx
blob0c18198521602e0c302f0187a2313eb04d9a318a
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_SC_SOURCE_UI_VBA_VBAFORMAT_HXX
20 #define INCLUDED_SC_SOURCE_UI_VBA_VBAFORMAT_HXX
22 #include <com/sun/star/lang/Locale.hpp>
23 #include <vbahelper/vbahelperinterface.hxx>
25 namespace com::sun::star::beans { class XPropertySet; }
26 namespace com::sun::star::beans { class XPropertyState; }
27 namespace com::sun::star::frame { class XModel; }
28 namespace com::sun::star::util { class XNumberFormats; }
29 namespace com::sun::star::util { class XNumberFormatsSupplier; }
30 namespace com::sun::star::util { class XNumberFormatTypes; }
31 namespace ooo::vba::excel { class XFont; }
32 namespace ooo::vba::excel { class XInterior; }
34 class ScCellRangesBase;
35 class SfxItemSet;
37 template< typename... Ifc >
38 class ScVbaFormat : public InheritedHelperInterfaceWeakImpl< Ifc... >
40 typedef InheritedHelperInterfaceWeakImpl< Ifc... > ScVbaFormat_BASE;
41 css::lang::Locale m_aDefaultLocale;
42 protected:
43 css::uno::Reference< css::beans::XPropertySet > mxPropertySet;
44 css::uno::Reference< css::util::XNumberFormatsSupplier > mxNumberFormatsSupplier;
45 css::uno::Reference< css::util::XNumberFormats > xNumberFormats;
46 css::uno::Reference< css::util::XNumberFormatTypes > xNumberFormatTypes;
47 css::uno::Reference< css::frame::XModel > mxModel;
48 css::uno::Reference< css::beans::XPropertyState > xPropertyState;
49 bool mbCheckAmbiguoity;
50 bool mbAddIndent;
51 /// @throws css::script::BasicErrorException
52 bool isAmbiguous(const OUString& _sPropertyName);
53 /// @throws css::uno::RuntimeException
54 css::uno::Reference< css::beans::XPropertyState > const & getXPropertyState();
55 /// @throws css::script::BasicErrorException
56 /// @throws css::uno::RuntimeException
57 void initializeNumberFormats();
58 /// @throws css::uno::RuntimeException
59 SfxItemSet* getCurrentDataSet( );
60 protected:
61 /// @throws css::uno::RuntimeException
62 virtual ScCellRangesBase* getCellRangesBase();
63 public:
64 /// @throws css::script::BasicErrorException
65 ScVbaFormat( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::beans::XPropertySet >& _xPropertySet, const css::uno::Reference< css::frame::XModel >& xModel, bool bCheckAmbiguoity );
66 virtual css::uno::Reference< ov::XHelperInterface > thisHelperIface() = 0;
67 /// @throws css::uno::RuntimeException
68 void SAL_CALL setAddIndent( const css::uno::Any& BAddIndent) { BAddIndent >>= mbAddIndent; }
69 /// @throws css::uno::RuntimeException
70 css::uno::Any SAL_CALL getAddIndent() { return css::uno::makeAny( mbAddIndent ); }
71 // Interface Methods
72 /// @throws css::script::BasicErrorException
73 /// @throws css::uno::RuntimeException
74 virtual css::uno::Any SAL_CALL Borders( const css::uno::Any& Index );
75 /// @throws css::script::BasicErrorException
76 /// @throws css::uno::RuntimeException
77 virtual css::uno::Reference< ::ooo::vba::excel::XFont > SAL_CALL Font( );
78 /// @throws css::script::BasicErrorException
79 /// @throws css::uno::RuntimeException
80 virtual css::uno::Reference< ::ooo::vba::excel::XInterior > SAL_CALL Interior( );
81 /// @throws css::script::BasicErrorException
82 /// @throws css::uno::RuntimeException
83 virtual void SAL_CALL setNumberFormat( const css::uno::Any& NumberFormat );
84 /// @throws css::script::BasicErrorException
85 /// @throws css::uno::RuntimeException
86 virtual css::uno::Any SAL_CALL getNumberFormat( );
87 /// @throws css::script::BasicErrorException
88 /// @throws css::uno::RuntimeException
89 virtual void SAL_CALL setNumberFormatLocal( const css::uno::Any& NumberFormatLocal );
90 /// @throws css::script::BasicErrorException
91 /// @throws css::uno::RuntimeException
92 virtual css::uno::Any SAL_CALL getNumberFormatLocal( );
93 /// @throws css::script::BasicErrorException
94 /// @throws css::uno::RuntimeException
95 virtual void SAL_CALL setIndentLevel( const css::uno::Any& IndentLevel );
96 /// @throws css::script::BasicErrorException
97 /// @throws css::uno::RuntimeException
98 virtual css::uno::Any SAL_CALL getIndentLevel( );
99 /// @throws css::script::BasicErrorException
100 /// @throws css::uno::RuntimeException
101 virtual void SAL_CALL setHorizontalAlignment( const css::uno::Any& HorizontalAlignment );
102 /// @throws css::script::BasicErrorException
103 /// @throws css::uno::RuntimeException
104 virtual css::uno::Any SAL_CALL getHorizontalAlignment( );
105 /// @throws css::script::BasicErrorException
106 /// @throws css::uno::RuntimeException
107 virtual void SAL_CALL setVerticalAlignment( const css::uno::Any& VerticalAlignment );
108 /// @throws css::script::BasicErrorException
109 /// @throws css::uno::RuntimeException
110 virtual css::uno::Any SAL_CALL getVerticalAlignment( );
111 /// @throws css::script::BasicErrorException
112 /// @throws css::uno::RuntimeException
113 virtual void SAL_CALL setOrientation( const css::uno::Any& Orientation );
114 /// @throws css::script::BasicErrorException
115 /// @throws css::uno::RuntimeException
116 virtual css::uno::Any SAL_CALL getOrientation( );
117 /// @throws css::script::BasicErrorException
118 /// @throws css::uno::RuntimeException
119 virtual void SAL_CALL setShrinkToFit( const css::uno::Any& ShrinkToFit );
120 /// @throws css::script::BasicErrorException
121 /// @throws css::uno::RuntimeException
122 virtual css::uno::Any SAL_CALL getShrinkToFit( );
123 /// @throws css::script::BasicErrorException
124 /// @throws css::uno::RuntimeException
125 virtual void SAL_CALL setWrapText( const css::uno::Any& WrapText );
126 /// @throws css::script::BasicErrorException
127 /// @throws css::uno::RuntimeException
128 virtual css::uno::Any SAL_CALL getWrapText( );
129 /// @throws css::script::BasicErrorException
130 /// @throws css::uno::RuntimeException
131 virtual void SAL_CALL setLocked( const css::uno::Any& Locked );
132 /// @throws css::script::BasicErrorException
133 /// @throws css::uno::RuntimeException
134 virtual css::uno::Any SAL_CALL getLocked( );
135 /// @throws css::script::BasicErrorException
136 /// @throws css::uno::RuntimeException
137 virtual void SAL_CALL setFormulaHidden( const css::uno::Any& FormulaHidden );
138 /// @throws css::script::BasicErrorException
139 /// @throws css::uno::RuntimeException
140 virtual css::uno::Any SAL_CALL getFormulaHidden( );
141 /// @throws css::script::BasicErrorException
142 /// @throws css::uno::RuntimeException
143 virtual void SAL_CALL setMergeCells( const css::uno::Any& MergeCells ) = 0;
144 /// @throws css::script::BasicErrorException
145 /// @throws css::uno::RuntimeException
146 virtual css::uno::Any SAL_CALL getMergeCells( ) = 0;
147 /// @throws css::script::BasicErrorException
148 /// @throws css::uno::RuntimeException
149 virtual void SAL_CALL setReadingOrder( const css::uno::Any& ReadingOrder );
150 /// @throws css::script::BasicErrorException
151 /// @throws css::uno::RuntimeException
152 virtual css::uno::Any SAL_CALL getReadingOrder( );
155 #endif
157 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */