LibreOffice Module sc (master)  1
vbaname.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 #ifndef INCLUDED_SC_SOURCE_UI_VBA_VBANAME_HXX
20 #define INCLUDED_SC_SOURCE_UI_VBA_VBANAME_HXX
21 
22 #include <ooo/vba/excel/XName.hpp>
23 
25 #include <formula/grammar.hxx>
26 
27 namespace com::sun::star::sheet { class XNamedRange; }
28 namespace com::sun::star::sheet { class XNamedRanges; }
29 
31 
32 class ScVbaName : public NameImpl_BASE
33 {
34  css::uno::Reference< css::frame::XModel > mxModel;
35  css::uno::Reference< css::sheet::XNamedRange > mxNamedRange;
36  css::uno::Reference< css::sheet::XNamedRanges > mxNames;
37  OUString getContent( const formula::FormulaGrammar::Grammar eGrammar );
38  void setContent( const OUString& sContent, const formula::FormulaGrammar::Grammar eGrammar );
39 public:
40  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 );
41  virtual ~ScVbaName() override;
42 
43  // Attributes
44  virtual OUString SAL_CALL getName() override;
45  virtual void SAL_CALL setName( const OUString &rName ) override;
46  virtual OUString SAL_CALL getNameLocal() override;
47  virtual void SAL_CALL setNameLocal( const OUString &rName ) override;
48  virtual sal_Bool SAL_CALL getVisible() override;
49  virtual void SAL_CALL setVisible( sal_Bool bVisible ) override;
50  virtual OUString SAL_CALL getValue() override;
51  virtual void SAL_CALL setValue( const OUString &rValue ) override;
52  virtual OUString SAL_CALL getRefersTo() override;
53  virtual void SAL_CALL setRefersTo( const OUString &rRefersTo ) override;
54  virtual OUString SAL_CALL getRefersToLocal() override;
55  virtual void SAL_CALL setRefersToLocal( const OUString &rRefersTo ) override;
56  virtual OUString SAL_CALL getRefersToR1C1() override;
57  virtual void SAL_CALL setRefersToR1C1( const OUString &rRefersTo ) override;
58  virtual OUString SAL_CALL getRefersToR1C1Local() override;
59  virtual void SAL_CALL setRefersToR1C1Local( const OUString &rRefersTo ) override;
60  virtual css::uno::Reference< ov::excel::XRange > SAL_CALL getRefersToRange() override;
61 
62  // Methods
63  virtual void SAL_CALL Delete() override;
64 
65  // XHelperInterface
66  virtual OUString getServiceImplName() override;
67  virtual css::uno::Sequence<OUString> getServiceNames() override;
68 };
69 #endif // INCLUDED_SC_SOURCE_UI_VBA_VBANAME_HXX
70 
71 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual OUString SAL_CALL getName() override
Definition: vbaname.cxx:51
virtual css::uno::Sequence< OUString > getServiceNames() override
Definition: vbaname.cxx:208
virtual void SAL_CALL setRefersTo(const OUString &rRefersTo) override
Definition: vbaname.cxx:145
OUString getContent(const formula::FormulaGrammar::Grammar eGrammar)
Definition: vbaname.cxx:85
virtual void SAL_CALL setName(const OUString &rName) override
Definition: vbaname.cxx:57
virtual OUString SAL_CALL getRefersTo() override
Definition: vbaname.cxx:139
virtual css::uno::Reference< ov::excel::XRange > SAL_CALL getRefersToRange() override
Definition: vbaname.cxx:188
virtual OUString SAL_CALL getRefersToR1C1() override
Definition: vbaname.cxx:163
virtual void SAL_CALL setValue(const OUString &rValue) override
Definition: vbaname.cxx:133
css::uno::Reference< css::sheet::XNamedRange > mxNamedRange
Definition: vbaname.hxx:35
css::uno::Reference< css::sheet::XNamedRanges > mxNames
Definition: vbaname.hxx:36
virtual ~ScVbaName() override
Definition: vbaname.cxx:46
virtual OUString getServiceImplName() override
Definition: vbaname.cxx:202
virtual void SAL_CALL setVisible(sal_Bool bVisible) override
Definition: vbaname.cxx:81
virtual sal_Bool SAL_CALL getVisible() override
Definition: vbaname.cxx:75
virtual OUString SAL_CALL getRefersToLocal() override
Definition: vbaname.cxx:151
virtual void SAL_CALL setRefersToLocal(const OUString &rRefersTo) override
Definition: vbaname.cxx:157
unsigned char sal_Bool
virtual OUString SAL_CALL getValue() override
Definition: vbaname.cxx:125
InheritedHelperInterfaceWeakImpl< ov::excel::XName > NameImpl_BASE
Definition: vbaname.hxx:30
css::uno::Reference< css::frame::XModel > mxModel
Definition: vbaname.hxx:34
void setContent(const OUString &sContent, const formula::FormulaGrammar::Grammar eGrammar)
Definition: vbaname.cxx:100
virtual void SAL_CALL Delete() override
Definition: vbaname.cxx:196
virtual OUString SAL_CALL getNameLocal() override
Definition: vbaname.cxx:63
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)
Definition: vbaname.cxx:34
virtual void SAL_CALL setNameLocal(const OUString &rName) override
Definition: vbaname.cxx:69
virtual OUString SAL_CALL getRefersToR1C1Local() override
Definition: vbaname.cxx:176
virtual void SAL_CALL setRefersToR1C1Local(const OUString &rRefersTo) override
Definition: vbaname.cxx:182
virtual void SAL_CALL setRefersToR1C1(const OUString &rRefersTo) override
Definition: vbaname.cxx:170