26#include <compiler.hxx>
27#include <tokenarray.hxx>
38 const css::uno::Reference< css::uno::XComponentContext >& xContext,
39 css::uno::Reference< css::sheet::XNamedRange > xName,
40 css::uno::Reference< css::sheet::XNamedRanges > xNames,
41 css::uno::Reference< css::frame::XModel > xModel ):
44 mxNamedRange(
std::move( xName )),
45 mxNames(
std::move( xNames ))
96 aContent =
pData->GetSymbol( eGrammar );
98 if (aContent.indexOf(
'=') != 0)
99 aContent =
"=" + aContent;
105 OUString sContent( rContent );
106 if (sContent.startsWith(
"="))
107 sContent = sContent.copy(1);
112 if ( !(pNamedRange && pNamedRange->
pDocShell) )
121 std::unique_ptr<ScTokenArray> pArray(aComp.
CompileString(sContent));
189css::uno::Reference< ov::excel::XRange >
209uno::Sequence< OUString >
css::uno::Reference< css::frame::XModel2 > mxModel
css::uno::Reference< css::uno::XComponentContext > mxContext
std::unique_ptr< ScTokenArray > CompileString(const OUString &rFormula)
Tokenize formula expression string into an array of tokens.
const ScDocument & GetDocument() const
ScRangeData * GetRangeData_Impl()
SC_DLLPUBLIC void SetCode(const ScTokenArray &)
const ScAddress & GetPos() const
virtual void SAL_CALL setValue(const OUString &rValue) override
css::uno::Reference< css::sheet::XNamedRange > mxNamedRange
OUString getContent(const formula::FormulaGrammar::Grammar eGrammar)
virtual void SAL_CALL setName(const OUString &rName) override
void setContent(const OUString &sContent, const formula::FormulaGrammar::Grammar eGrammar)
virtual void SAL_CALL setVisible(sal_Bool bVisible) override
virtual sal_Bool SAL_CALL getVisible() override
virtual OUString SAL_CALL getNameLocal() override
virtual OUString getServiceImplName() override
virtual OUString SAL_CALL getRefersToR1C1Local() override
virtual OUString SAL_CALL getRefersToR1C1() override
virtual css::uno::Reference< ov::excel::XRange > SAL_CALL getRefersToRange() override
virtual void SAL_CALL setRefersTo(const OUString &rRefersTo) override
virtual void SAL_CALL Delete() override
virtual OUString SAL_CALL getRefersTo() override
virtual void SAL_CALL setRefersToR1C1Local(const OUString &rRefersTo) override
virtual OUString SAL_CALL getValue() override
virtual css::uno::Sequence< OUString > getServiceNames() override
virtual void SAL_CALL setRefersToLocal(const OUString &rRefersTo) override
virtual ~ScVbaName() override
css::uno::Reference< css::frame::XModel > mxModel
virtual OUString SAL_CALL getName() override
virtual void SAL_CALL setRefersToR1C1(const OUString &rRefersTo) override
ScVbaName(const css::uno::Reference< ov::XHelperInterface > &xParent, const css::uno::Reference< css::uno::XComponentContext > &xContext, css::uno::Reference< css::sheet::XNamedRange > xName, css::uno::Reference< css::sheet::XNamedRanges > xNames, css::uno::Reference< css::frame::XModel > xModel)
css::uno::Reference< css::sheet::XNamedRanges > mxNames
virtual OUString SAL_CALL getRefersToLocal() override
virtual void SAL_CALL setNameLocal(const OUString &rName) override
static css::uno::Reference< ov::excel::XRange > getRangeObjectForName(const css::uno::Reference< css::uno::XComponentContext > &xContext, const OUString &sRangeName, ScDocShell *pDocSh, formula::FormulaGrammar::AddressConvention eConv)
Sequence< OUString > aServiceNames
std::unique_ptr< sal_Int32[]> pData
ScDocShell * getDocShell(const css::uno::Reference< css::frame::XModel > &xModel)
Reference< XModel > xModel