xref: /aoo41x/main/sc/source/ui/vba/vbaname.hxx (revision 38d50f7b)
1*38d50f7bSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*38d50f7bSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*38d50f7bSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*38d50f7bSAndrew Rist  * distributed with this work for additional information
6*38d50f7bSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*38d50f7bSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*38d50f7bSAndrew Rist  * "License"); you may not use this file except in compliance
9*38d50f7bSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*38d50f7bSAndrew Rist  *
11*38d50f7bSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*38d50f7bSAndrew Rist  *
13*38d50f7bSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*38d50f7bSAndrew Rist  * software distributed under the License is distributed on an
15*38d50f7bSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*38d50f7bSAndrew Rist  * KIND, either express or implied.  See the License for the
17*38d50f7bSAndrew Rist  * specific language governing permissions and limitations
18*38d50f7bSAndrew Rist  * under the License.
19*38d50f7bSAndrew Rist  *
20*38d50f7bSAndrew Rist  *************************************************************/
21*38d50f7bSAndrew Rist 
22*38d50f7bSAndrew Rist 
23cdf0e10cSrcweir #ifndef SC_VBA_NAME_HXX
24cdf0e10cSrcweir #define SC_VBA_NAME_HXX
25cdf0e10cSrcweir 
26cdf0e10cSrcweir #include <ooo/vba/excel/XName.hpp>
27cdf0e10cSrcweir #include <com/sun/star/sheet/XNamedRange.hpp>
28cdf0e10cSrcweir #include <com/sun/star/sheet/XNamedRanges.hpp>
29cdf0e10cSrcweir 
30cdf0e10cSrcweir #include <vbahelper/vbahelperinterface.hxx>
31cdf0e10cSrcweir 
32cdf0e10cSrcweir class ScDocument;
33cdf0e10cSrcweir 
34cdf0e10cSrcweir typedef InheritedHelperInterfaceImpl1< ov::excel::XName > NameImpl_BASE;
35cdf0e10cSrcweir 
36cdf0e10cSrcweir class ScVbaName : public NameImpl_BASE
37cdf0e10cSrcweir {
38cdf0e10cSrcweir 	css::uno::Reference< css::frame::XModel > mxModel;
39cdf0e10cSrcweir 	css::uno::Reference< css::sheet::XNamedRange > mxNamedRange;
40cdf0e10cSrcweir 	css::uno::Reference< css::sheet::XNamedRanges > mxNames;
41cdf0e10cSrcweir 
42cdf0e10cSrcweir 	ScDocument * m_pDoc;
43cdf0e10cSrcweir 
44cdf0e10cSrcweir protected:
getModel()45cdf0e10cSrcweir 	virtual css::uno::Reference< css::frame::XModel >  getModel() { return mxModel; }
46cdf0e10cSrcweir 	virtual css::uno::Reference< ov::excel::XWorksheet > getWorkSheet() throw (css::uno::RuntimeException);
47cdf0e10cSrcweir 
48cdf0e10cSrcweir public:
49cdf0e10cSrcweir 	ScVbaName( const css::uno::Reference< ov::XHelperInterface >& xParent,  const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::sheet::XNamedRange >& xName , const css::uno::Reference< css::sheet::XNamedRanges >& xNames , const css::uno::Reference< css::frame::XModel >& xModel );
50cdf0e10cSrcweir 	virtual ~ScVbaName();
51cdf0e10cSrcweir 
52cdf0e10cSrcweir 	// Attributes
53cdf0e10cSrcweir 	virtual ::rtl::OUString SAL_CALL getName() throw (css::uno::RuntimeException);
54cdf0e10cSrcweir 	virtual void SAL_CALL setName( const ::rtl::OUString &rName ) throw (css::uno::RuntimeException);
55cdf0e10cSrcweir 	virtual ::rtl::OUString SAL_CALL getNameLocal() throw (css::uno::RuntimeException);
56cdf0e10cSrcweir 	virtual void SAL_CALL setNameLocal( const ::rtl::OUString &rName ) throw (css::uno::RuntimeException);
57cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL getVisible() throw (css::uno::RuntimeException);
58cdf0e10cSrcweir 	virtual void SAL_CALL setVisible( sal_Bool bVisible ) throw (css::uno::RuntimeException);
59cdf0e10cSrcweir 	virtual ::rtl::OUString SAL_CALL getValue() throw (css::uno::RuntimeException);
60cdf0e10cSrcweir 	virtual void SAL_CALL setValue( const ::rtl::OUString &rValue ) throw (css::uno::RuntimeException);
61cdf0e10cSrcweir 	virtual ::rtl::OUString SAL_CALL getRefersTo() throw (css::uno::RuntimeException);
62cdf0e10cSrcweir 	virtual void SAL_CALL setRefersTo( const ::rtl::OUString &rRefersTo ) throw (css::uno::RuntimeException);
63cdf0e10cSrcweir 	virtual ::rtl::OUString SAL_CALL getRefersToLocal() throw (css::uno::RuntimeException);
64cdf0e10cSrcweir 	virtual void SAL_CALL setRefersToLocal( const ::rtl::OUString &rRefersTo ) throw (css::uno::RuntimeException);
65cdf0e10cSrcweir 	virtual ::rtl::OUString SAL_CALL getRefersToR1C1() throw (css::uno::RuntimeException);
66cdf0e10cSrcweir 	virtual void SAL_CALL setRefersToR1C1( const ::rtl::OUString &rRefersTo ) throw (css::uno::RuntimeException);
67cdf0e10cSrcweir 	virtual ::rtl::OUString SAL_CALL getRefersToR1C1Local() throw (css::uno::RuntimeException);
68cdf0e10cSrcweir 	virtual void SAL_CALL setRefersToR1C1Local( const ::rtl::OUString &rRefersTo ) throw (css::uno::RuntimeException);
69cdf0e10cSrcweir 	virtual css::uno::Reference< ov::excel::XRange > SAL_CALL getRefersToRange() throw (css::uno::RuntimeException);
70cdf0e10cSrcweir 	virtual void SAL_CALL setRefersToRange( const css::uno::Reference< ov::excel::XRange > xRange ) throw (css::uno::RuntimeException);
71cdf0e10cSrcweir 
72cdf0e10cSrcweir 	// Methods
73cdf0e10cSrcweir 	virtual void SAL_CALL Delete() throw (css::uno::RuntimeException);
74cdf0e10cSrcweir 
75cdf0e10cSrcweir 	// XHelperInterface
76cdf0e10cSrcweir 	virtual rtl::OUString& getServiceImplName();
77cdf0e10cSrcweir 	virtual css::uno::Sequence<rtl::OUString> getServiceNames();
78cdf0e10cSrcweir };
79cdf0e10cSrcweir #endif /* SC_VBA_NAME_HXX */
80cdf0e10cSrcweir 
81