1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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_VBANAME_HXX
20 #define INCLUDED_SC_SOURCE_UI_VBA_VBANAME_HXX
22 #include <ooo/vba/excel/XName.hpp>
23 #include <com/sun/star/sheet/XNamedRange.hpp>
24 #include <com/sun/star/sheet/XNamedRanges.hpp>
26 #include <vbahelper/vbahelperinterface.hxx>
27 #include <formula/grammar.hxx>
30 typedef InheritedHelperInterfaceImpl1
< ov::excel::XName
> NameImpl_BASE
;
32 class ScVbaName
: public NameImpl_BASE
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
, bool prependEquals
= true );
38 void setContent( const OUString
& sContent
, const formula::FormulaGrammar::Grammar eGrammar
, bool removeEquals
= true );
40 css::uno::Reference
< css::frame::XModel
> getModel() { return mxModel
; }
43 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
);
47 virtual OUString SAL_CALL
getName() throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
48 virtual void SAL_CALL
setName( const OUString
&rName
) throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
49 virtual OUString SAL_CALL
getNameLocal() throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
50 virtual void SAL_CALL
setNameLocal( const OUString
&rName
) throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
51 virtual sal_Bool SAL_CALL
getVisible() throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
52 virtual void SAL_CALL
setVisible( sal_Bool bVisible
) throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
53 virtual OUString SAL_CALL
getValue() throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
54 virtual void SAL_CALL
setValue( const OUString
&rValue
) throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
55 virtual OUString SAL_CALL
getRefersTo() throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
56 virtual void SAL_CALL
setRefersTo( const OUString
&rRefersTo
) throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
57 virtual OUString SAL_CALL
getRefersToLocal() throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
58 virtual void SAL_CALL
setRefersToLocal( const OUString
&rRefersTo
) throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
59 virtual OUString SAL_CALL
getRefersToR1C1() throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
60 virtual void SAL_CALL
setRefersToR1C1( const OUString
&rRefersTo
) throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
61 virtual OUString SAL_CALL
getRefersToR1C1Local() throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
62 virtual void SAL_CALL
setRefersToR1C1Local( const OUString
&rRefersTo
) throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
63 virtual css::uno::Reference
< ov::excel::XRange
> SAL_CALL
getRefersToRange() throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
66 virtual void SAL_CALL
Delete() throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
69 virtual OUString
getServiceImplName() SAL_OVERRIDE
;
70 virtual css::uno::Sequence
<OUString
> getServiceNames() SAL_OVERRIDE
;
72 #endif // INCLUDED_SC_SOURCE_UI_VBA_VBANAME_HXX
74 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */