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