LibreOffice Module sc (master) 1
defnamesbuffer.cxx
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
20#include <memory>
21#include <defnamesbuffer.hxx>
22
23#include <com/sun/star/sheet/NamedRangeFlag.hpp>
24#include <com/sun/star/sheet/XPrintAreas.hpp>
25#include <com/sun/star/sheet/XSpreadsheet.hpp>
26#include <o3tl/string_view.hxx>
27#include <osl/diagnose.h>
28#include <rtl/ustrbuf.hxx>
31#include <oox/token/tokens.hxx>
32#include <addressconverter.hxx>
33#include <biffhelper.hxx>
35#include <formulabase.hxx>
36#include <formulaparser.hxx>
37#include <worksheetbuffer.hxx>
38#include <tokenarray.hxx>
39#include <tokenuno.hxx>
40#include <compiler.hxx>
41#include <document.hxx>
42
43namespace oox::xls {
44
45using namespace ::com::sun::star::sheet;
46using namespace ::com::sun::star::table;
47using namespace ::com::sun::star::uno;
48
49namespace {
50
51const sal_uInt32 BIFF12_DEFNAME_HIDDEN = 0x00000001;
52const sal_uInt32 BIFF12_DEFNAME_FUNC = 0x00000002;
53const sal_uInt32 BIFF12_DEFNAME_VBNAME = 0x00000004;
54const sal_uInt32 BIFF12_DEFNAME_MACRO = 0x00000008;
55const sal_uInt32 BIFF12_DEFNAME_BUILTIN = 0x00000020;
56
57constexpr OUStringLiteral spcOoxPrefix(u"_xlnm.");
58
59const char* const sppcBaseNames[] =
60{
61 "Consolidate_Area",
62 "Auto_Open",
63 "Auto_Close",
64 "Extract",
65 "Database",
66 "Criteria",
67 "Print_Area",
68 "Print_Titles",
69 "Recorder",
70 "Data_Form",
71 "Auto_Activate",
72 "Auto_Deactivate",
73 "Sheet_Title",
74 "_FilterDatabase"
75};
76
77OUString lclGetBaseName( sal_Unicode cBuiltinId )
78{
79 OSL_ENSURE( cBuiltinId < SAL_N_ELEMENTS( sppcBaseNames ), "lclGetBaseName - unsupported built-in identifier" );
80 OUStringBuffer aBuffer;
81 if( cBuiltinId < SAL_N_ELEMENTS( sppcBaseNames ) )
82 aBuffer.appendAscii( sppcBaseNames[ cBuiltinId ] );
83 else
84 aBuffer.append( static_cast< sal_Int32 >( cBuiltinId ) );
85 return aBuffer.makeStringAndClear();
86}
87
88OUString lclGetPrefixedName( sal_Unicode cBuiltinId )
89{
90 return spcOoxPrefix + lclGetBaseName( cBuiltinId );
91}
92
94sal_Unicode lclGetBuiltinIdFromPrefixedName( std::u16string_view aModelName )
95{
96 if( o3tl::matchIgnoreAsciiCase( aModelName, spcOoxPrefix ) )
97 {
98 for( sal_Unicode cBuiltinId = 0; cBuiltinId < SAL_N_ELEMENTS( sppcBaseNames ); ++cBuiltinId )
99 {
100 OUString aBaseName = lclGetBaseName( cBuiltinId );
101 sal_Int32 nBaseNameLen = aBaseName.getLength();
102 if( (sal_Int32(aModelName.size()) == spcOoxPrefix.getLength() + nBaseNameLen) && o3tl::matchIgnoreAsciiCase( aModelName, aBaseName, spcOoxPrefix.getLength() ) )
103 return cBuiltinId;
104 }
105 }
107}
108
110sal_Unicode lclGetBuiltinIdFromBaseName( std::u16string_view rModelName )
111{
112 for( sal_Unicode cBuiltinId = 0; cBuiltinId < SAL_N_ELEMENTS( sppcBaseNames ); ++cBuiltinId )
113 if( o3tl::equalsIgnoreAsciiCase( rModelName, sppcBaseNames[ cBuiltinId ] ) )
114 return cBuiltinId;
116}
117
118OUString lclGetUpcaseModelName( const OUString& rModelName )
119{
120 // TODO: i18n?
121 return rModelName.toAsciiUpperCase();
122}
123
124} // namespace
125
127 mnSheet( -1 ),
128 mnFuncGroupId( -1 ),
129 mbMacro( false ),
130 mbFunction( false ),
131 mbVBName( false ),
132 mbHidden( false )
133{
134}
135
137 WorkbookHelper( rHelper )
138{
139}
140
142{
143 if( maUpModelName.isEmpty() )
144 maUpModelName = lclGetUpcaseModelName( maModel.maName );
145 return maUpModelName;
146}
147
149 DefinedNameBase( rHelper ),
150 maScRangeData(nullptr, false),
151 mnTokenIndex( -1 ),
152 mnCalcSheet( 0 ),
153 mcBuiltinId( BIFF_DEFNAME_UNKNOWN )
154{
155}
156
158{
159 maModel.maName = rAttribs.getXString( XML_name, OUString() );
160 maModel.mnSheet = rAttribs.getInteger( XML_localSheetId, -1 );
161 maModel.mnFuncGroupId = rAttribs.getInteger( XML_functionGroupId, -1 );
162 maModel.mbMacro = rAttribs.getBool( XML_xlm, false );
163 maModel.mbFunction = rAttribs.getBool( XML_function, false );
164 maModel.mbVBName = rAttribs.getBool( XML_vbProcedure, false );
165 maModel.mbHidden = rAttribs.getBool( XML_hidden, false );
167
168 /* Detect built-in state from name itself, there is no built-in flag.
169 Built-in names are prefixed with '_xlnm.' instead. */
170 mcBuiltinId = lclGetBuiltinIdFromPrefixedName( maModel.maName );
171}
172
173void DefinedName::setFormula( const OUString& rFormula )
174{
175 maModel.maFormula = rFormula;
176}
177
179{
180 sal_uInt32 nFlags;
181 nFlags = rStrm.readuInt32();
182 rStrm.skip( 1 ); // keyboard shortcut
183 maModel.mnSheet = rStrm.readInt32();
186
187 // macro function/command, hidden flag
188 maModel.mnFuncGroupId = extractValue< sal_Int32 >( nFlags, 6, 9 );
189 maModel.mbMacro = getFlag( nFlags, BIFF12_DEFNAME_MACRO );
190 maModel.mbFunction = getFlag( nFlags, BIFF12_DEFNAME_FUNC );
191 maModel.mbVBName = getFlag( nFlags, BIFF12_DEFNAME_VBNAME );
192 maModel.mbHidden = getFlag( nFlags, BIFF12_DEFNAME_HIDDEN );
193
194 // get built-in name index from name
195 if( getFlag( nFlags, BIFF12_DEFNAME_BUILTIN ) )
196 mcBuiltinId = lclGetBuiltinIdFromBaseName( maModel.maName );
197
198 // store token array data
199 sal_Int64 nRecPos = rStrm.tell();
200 sal_Int32 nFmlaSize = rStrm.readInt32();
201 rStrm.skip( nFmlaSize );
202 sal_Int32 nAddDataSize = rStrm.readInt32();
203 if( !rStrm.isEof() && (nFmlaSize > 0) && (nAddDataSize >= 0) && (rStrm.getRemaining() >= nAddDataSize) )
204 {
205 sal_Int32 nTotalSize = 8 + nFmlaSize + nAddDataSize;
206 mxFormula.reset( new StreamDataSequence );
207 rStrm.seek( nRecPos );
208 rStrm.readData( *mxFormula, nTotalSize );
209 }
210}
211
212void DefinedName::createNameObject( sal_Int32 nIndex )
213{
214 // do not create names for (macro) functions or VBA procedures
215 // #163146# do not ignore hidden names (may be regular names created by VBA scripts)
216 if( /*maModel.mbHidden ||*/ maModel.mbFunction || maModel.mbVBName )
217 return;
218
219 // convert original name to final Calc name (TODO: filter invalid characters from model name)
220 maCalcName = isBuiltinName() ? lclGetPrefixedName( mcBuiltinId ) : maModel.maName;
221
222 // #163146# do not rename sheet-local names by default, this breaks VBA scripts
223
224 // special flags for this name
225 sal_Int32 nNameFlags = 0;
226 using namespace ::com::sun::star::sheet::NamedRangeFlag;
227 if( !isGlobalName() ) switch( mcBuiltinId )
228 {
230 case BIFF_DEFNAME_FILTERDATABASE: nNameFlags = FILTER_CRITERIA; break;
231 case BIFF_DEFNAME_PRINTAREA: nNameFlags = PRINT_AREA; break;
232 case BIFF_DEFNAME_PRINTTITLES: nNameFlags = COLUMN_HEADER | ROW_HEADER; break;
233 }
234
235 // create the name and insert it into the document, maCalcName will be changed to the resulting name
236 if (maModel.mnSheet >= 0)
238 else
241}
242
244 const css::uno::Sequence<css::sheet::ExternalLinkInfo>& rExternalLinks) const
245{
246 ScRange aRange;
247 OUString aExternDocName;
248 OUString aStartTabName;
249 OUString aEndTabName;
251 aRange.Parse_XL_Header(maModel.maFormula.getStr(), getScDocument(), aExternDocName,
252 aStartTabName, aEndTabName, nFlags, /*bOnlyAcceptSingle=*/false,
253 &rExternalLinks);
254 // aExternDocName is something like 'file:///path/to/my.xlsx' in the valid case, and it's an int
255 // when it's invalid.
256 bool bInvalidExternalRef = aExternDocName.toInt32() > 0;
257 return !bInvalidExternalRef;
258}
259
260std::unique_ptr<ScTokenArray> DefinedName::getScTokens(
261 const css::uno::Sequence<css::sheet::ExternalLinkInfo>& rExternalLinks )
262{
264 aCompiler.SetExternalLinks( rExternalLinks);
265 std::unique_ptr<ScTokenArray> pArray(aCompiler.CompileString(maModel.maFormula));
266 // Compile the tokens into RPN once to populate information into tokens
267 // where necessary, e.g. for TableRef inner reference. RPN can be discarded
268 // after, a resulting error must be reset.
269 FormulaError nErr = pArray->GetCodeError();
270 aCompiler.CompileTokenArray();
272 pArray->DelRPN();
273 pArray->SetCodeError(nErr);
274
275 return pArray;
276}
277
278void DefinedName::convertFormula( const css::uno::Sequence<css::sheet::ExternalLinkInfo>& rExternalLinks )
279{
280 ScRangeData* pScRangeData = maScRangeData.first;
281 // macro function or vba procedure
282 if (!pScRangeData)
283 return;
284
285 // convert and set formula of the defined name
286 {
287 std::unique_ptr<ScTokenArray> pTokenArray = getScTokens( rExternalLinks);
288 pScRangeData->SetCode( *pTokenArray );
289 }
290
291 ScTokenArray* pTokenArray = pScRangeData->GetCode();
292 Sequence< FormulaToken > aFTokenSeq;
293 ScTokenConversion::ConvertToTokenSequence( getScDocument(), aFTokenSeq, *pTokenArray );
294 // set built-in names (print ranges, repeated titles, filter ranges)
295 if( isGlobalName() )
296 return;
297
298 switch( mcBuiltinId )
299 {
301 {
302 Reference< XPrintAreas > xPrintAreas( getSheetFromDoc( mnCalcSheet ), UNO_QUERY );
303 ScRangeList aPrintRanges;
304 getFormulaParser().extractCellRangeList( aPrintRanges, aFTokenSeq, mnCalcSheet );
305 if( xPrintAreas.is() && !aPrintRanges.empty() )
306 xPrintAreas->setPrintAreas( AddressConverter::toApiSequence(aPrintRanges) );
307 }
308 break;
310 {
311 Reference< XPrintAreas > xPrintAreas( getSheetFromDoc( mnCalcSheet ), UNO_QUERY );
312 ScRangeList aTitleRanges;
313 getFormulaParser().extractCellRangeList( aTitleRanges, aFTokenSeq, mnCalcSheet );
314 if( xPrintAreas.is() && !aTitleRanges.empty() )
315 {
316 bool bHasRowTitles = false;
317 bool bHasColTitles = false;
318 const ScAddress& rMaxPos = getAddressConverter().getMaxAddress();
319 for (size_t i = 0, nSize = aTitleRanges.size(); i < nSize; ++i)
320 {
321 const ScRange& rRange = aTitleRanges[i];
322 bool bFullRow = (rRange.aStart.Col() == 0) && ( rRange.aEnd.Col() >= rMaxPos.Col() );
323 bool bFullCol = (rRange.aStart.Row() == 0) && ( rRange.aEnd.Row() >= rMaxPos.Row() );
324 if( !bHasRowTitles && bFullRow && !bFullCol )
325 {
326 xPrintAreas->setTitleRows( CellRangeAddress(rRange.aStart.Tab(),
327 rRange.aStart.Col(), rRange.aStart.Row(),
328 rRange.aEnd.Col(), rRange.aEnd.Row()) );
329 xPrintAreas->setPrintTitleRows( true );
330 bHasRowTitles = true;
331 }
332 else if( !bHasColTitles && bFullCol && !bFullRow )
333 {
334 xPrintAreas->setTitleColumns( CellRangeAddress(rRange.aStart.Tab(),
335 rRange.aStart.Col(), rRange.aStart.Row(),
336 rRange.aEnd.Col(), rRange.aEnd.Row()) );
337 xPrintAreas->setPrintTitleColumns( true );
338 bHasColTitles = true;
339 }
340 }
341 }
342 }
343 break;
344 }
345}
346
348{
349 ScRangeData* pScRangeData = maScRangeData.first;
350 ScTokenArray* pTokenArray = pScRangeData->GetCode();
351 Sequence< FormulaToken > aFTokenSeq;
352 ScTokenConversion::ConvertToTokenSequence(getScDocument(), aFTokenSeq, *pTokenArray);
353 return getFormulaParser().extractCellRange( orRange, aFTokenSeq );
354}
355
357{
358 // this kind of field is owned by us - see lcl_addNewByNameAndTokens
359 bool bOwned = maScRangeData.second;
360 if (bOwned)
361 delete maScRangeData.first;
362}
363
365 WorkbookHelper( rHelper )
366{
367}
368
370{
372 xDefName->importDefinedName( rAttribs );
373 return xDefName;
374}
375
377{
378 createDefinedName()->importDefinedName( rStrm );
379}
380
382{
383 // first insert all names without formula definition into the document, and insert them into the maps
384 int index = 0;
385 for( DefinedNameRef& xDefName : maDefNames )
386 {
387 if (!xDefName->isValid(getExternalLinks().getLinkInfos()))
388 {
389 continue;
390 }
391
392 xDefName->createNameObject( ++index );
393 // map by sheet index and original model name
394 maModelNameMap[ SheetNameKey( xDefName->getLocalCalcSheet(), xDefName->getUpcaseModelName() ) ] = xDefName;
395 // map by sheet index and built-in identifier
396 if( !xDefName->isGlobalName() && xDefName->isBuiltinName() )
397 maBuiltinMap[ BuiltinKey( xDefName->getLocalCalcSheet(), xDefName->getBuiltinId() ) ] = xDefName;
398 // map by API formula token identifier
399 sal_Int32 nTokenIndex = xDefName->getTokenIndex();
400 if( nTokenIndex >= 0 )
401 maTokenIdMap[ nTokenIndex ] = xDefName;
402 }
403
404 /* Now convert all name formulas, so that the formula parser can find all
405 names in case of circular dependencies. */
407}
408
410{
411 return maDefNames.get( nIndex );
412}
413
415{
416 return maTokenIdMap.get( nIndex );
417}
418
419DefinedNameRef DefinedNamesBuffer::getByModelName( const OUString& rModelName, sal_Int16 nCalcSheet ) const
420{
421 OUString aUpcaseName = lclGetUpcaseModelName( rModelName );
422 DefinedNameRef xDefName = maModelNameMap.get( SheetNameKey( nCalcSheet, aUpcaseName ) );
423 // lookup global name, if no local name exists
424 if( !xDefName && (nCalcSheet >= 0) )
425 xDefName = maModelNameMap.get( SheetNameKey( -1, aUpcaseName ) );
426 return xDefName;
427}
428
429DefinedNameRef DefinedNamesBuffer::getByBuiltinId( sal_Unicode cBuiltinId, sal_Int16 nCalcSheet ) const
430{
431 return maBuiltinMap.get( BuiltinKey( nCalcSheet, cBuiltinId ) );
432}
433
435{
436 DefinedNameRef xDefName = std::make_shared<DefinedName>( *this );
437 maDefNames.push_back( xDefName );
438 return xDefName;
439}
440
441} // namespace oox::xls
442
443/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ScRefFlags
Definition: address.hxx:158
SCTAB Tab() const
Definition: address.hxx:283
SCROW Row() const
Definition: address.hxx:274
SCCOL Col() const
Definition: address.hxx:279
void SetExternalLinks(const css::uno::Sequence< css::sheet::ExternalLinkInfo > &rLinks)
Set external link info for ScAddress::CONV_XL_OOX.
Definition: compiler.hxx:468
std::unique_ptr< ScTokenArray > CompileString(const OUString &rFormula)
Tokenize formula expression string into an array of tokens.
Definition: compiler.cxx:4691
SC_DLLPUBLIC void CheckLinkFormulaNeedingCheck(const ScTokenArray &rCode)
Check token array and set link check if ocDde/ocWebservice is contained.
Definition: documen8.cxx:1149
ScTokenArray * GetCode()
Definition: rangenam.hxx:119
SC_DLLPUBLIC void SetCode(const ScTokenArray &)
Definition: rangenam.cxx:621
bool empty() const
Definition: rangelst.hxx:88
size_t size() const
Definition: rangelst.hxx:89
ScAddress aEnd
Definition: address.hxx:498
const sal_Unicode * Parse_XL_Header(const sal_Unicode *pString, const ScDocument &rDocument, OUString &rExternDocName, OUString &rStartTabName, OUString &rEndTabName, ScRefFlags &nFlags, bool bOnlyAcceptSingle, const css::uno::Sequence< css::sheet::ExternalLinkInfo > *pExternalLinks=nullptr, const OUString *pErrRef=nullptr)
Parse an Excel style reference up to and including the sheet name separator '!', including detection ...
Definition: address.cxx:473
ScAddress aStart
Definition: address.hxx:497
static SC_DLLPUBLIC void ConvertToTokenSequence(const ScDocument &rDoc, css::uno::Sequence< css::sheet::FormulaToken > &rSequence, const ScTokenArray &rTokenArray)
Definition: tokenuno.cxx:380
std::optional< OUString > getXString(sal_Int32 nAttrToken) const
std::optional< sal_Int32 > getInteger(sal_Int32 nAttrToken) const
std::optional< bool > getBool(sal_Int32 nAttrToken) const
mapped_type get(key_type nKey) const
value_type get(sal_Int32 nIndex) const
void forEachMem(FuncType pFunc) const
static css::uno::Sequence< css::table::CellRangeAddress > toApiSequence(const ScRangeList &orRanges)
Converts the passed range list to a sequence of cell range addresses.
const ScAddress & getMaxAddress() const
Returns the biggest valid cell address in both Calc and the imported/exported Excel document.
Base class for defined names and external names.
OUString maUpModelName
Model data for this defined name.
const OUString & getUpcaseModelName() const
Returns the original name as imported from or exported to the file.
OUString maCalcName
Model name converted to uppercase ASCII.
DefinedNameBase(const WorkbookHelper &rHelper)
bool isBuiltinName() const
Returns true, if this defined name is a special builtin name.
void convertFormula(const css::uno::Sequence< css::sheet::ExternalLinkInfo > &rExternalLinks)
Converts the formula string or BIFF token array for this defined name.
void createNameObject(sal_Int32 nIndex)
Creates a defined name in the Calc document.
StreamDataSeqPtr mxFormula
Identifier for built-in defined names.
sal_Int16 mnCalcSheet
Name index used in API token array.
bool isValid(const css::uno::Sequence< css::sheet::ExternalLinkInfo > &rExternalLinks) const
void importDefinedName(const AttributeList &rAttribs)
Sets the attributes for this defined name from the passed attribute set.
sal_Int32 mnTokenIndex
ScRangeData of the defined name.
bool isGlobalName() const
Returns true, if this defined name is global in the document.
virtual ~DefinedName() override
bool getAbsoluteRange(ScRange &orRange) const
Tries to resolve the defined name to an absolute cell range.
sal_Unicode mcBuiltinId
Calc sheet index for sheet-local names.
void setFormula(const OUString &rFormula)
Sets the formula string from the body of the definedName element.
std::unique_ptr< ScTokenArray > getScTokens(const css::uno::Sequence< css::sheet::ExternalLinkInfo > &rExternalLinks)
DefinedName(const WorkbookHelper &rHelper)
DefNameTokenIdMap maTokenIdMap
Maps all defined names by sheet index and built-in identifier.
DefinedNameRef getByModelName(const OUString &rModelName, sal_Int16 nCalcSheet=-1) const
Returns a defined name by its model name.
DefNameNameMap maModelNameMap
List of all defined names in insertion order.
::std::pair< sal_Int16, sal_Unicode > BuiltinKey
DefinedNameRef getByBuiltinId(sal_Unicode cBuiltinId, sal_Int16 nCalcSheet) const
Returns a built-in defined name by its built-in identifier.
DefNameBuiltinMap maBuiltinMap
Maps all defined names by sheet index and model name.
DefinedNameRef importDefinedName(const AttributeList &rAttribs)
Imports a defined name from the passed attribute set.
void finalizeImport()
Creates all defined names in the document.
DefinedNameRef getByTokenIndex(sal_Int32 nIndex) const
Returns a defined name by token index (index in XDefinedNames container).
DefinedNamesBuffer(const WorkbookHelper &rHelper)
DefinedNameRef createDefinedName()
DefinedNameRef getByIndex(sal_Int32 nIndex) const
Returns a defined name by zero-based index (order of appearance).
::std::pair< sal_Int16, OUString > SheetNameKey
bool extractCellRange(ScRange &orRange, const ApiTokenSequence &rTokens) const
Tries to extract a cell range address from a formula token sequence.
void extractCellRangeList(ScRangeList &orRanges, const ApiTokenSequence &rTokens, sal_Int32 nFilterBySheet) const
Tries to extract a cell range list from a formula token sequence.
Helper class to provide access to global workbook data.
css::uno::Reference< css::sheet::XSpreadsheet > getSheetFromDoc(sal_Int32 nSheet) const
Returns a reference to the specified spreadsheet in the document model.
WorksheetBuffer & getWorksheets() const
Returns the worksheet buffer containing sheet names and properties.
AddressConverter & getAddressConverter() const
Returns the converter for string to cell address/range conversion.
RangeDataRet createLocalNamedRangeObject(OUString &orName, sal_Int32 nIndex, sal_Int32 nNameFlags, sal_Int32 nTab, bool bHidden) const
Creates and returns a defined name on-the-fly in the sheet.
FormulaParser & getFormulaParser() const
Returns a shared import formula parser (import filter only!).
ExternalLinkBuffer & getExternalLinks() const
Returns the external links read from the external links substream.
RangeDataRet createNamedRangeObject(OUString &orName, sal_Int32 nIndex, sal_Int32 nNameFlags, bool bHidden) const
Creates and returns a defined name on-the-fly in the Calc document.
sal_Int16 getCalcSheetIndex(sal_Int32 nWorksheet) const
Returns the Calc index of the specified worksheet.
FormulaError
sal_Int32 nIndex
#define SAL_N_ELEMENTS(arr)
int i
index
void SvStream & rStrm
bool equalsIgnoreAsciiCase(std::u16string_view s1, std::u16string_view s2)
bool matchIgnoreAsciiCase(std::u16string_view s1, std::u16string_view s2, sal_Int32 fromIndex=0)
const sal_Unicode BIFF_DEFNAME_CRITERIA
const sal_Unicode BIFF_DEFNAME_UNKNOWN
std::shared_ptr< DefinedName > DefinedNameRef
const sal_Unicode BIFF_DEFNAME_PRINTAREA
const sal_Unicode BIFF_DEFNAME_PRINTTITLES
const sal_Unicode BIFF_DEFNAME_FILTERDATABASE
css::uno::Sequence< sal_Int8 > StreamDataSequence
bool getFlag(Type nBitField, Type nMask)
bool mbMacro
Function group identifier.
bool mbVBName
True = function, false = command.
sal_Int32 mnFuncGroupId
Sheet index for local names.
bool mbFunction
True = Macro name (VBA or sheet macro).
sal_Int32 mnSheet
The formula string.
bool mbHidden
True = VBA macro, false = sheet macro.
DefinedNameModel()
True = name hidden in UI.
OUString maFormula
The original name.
@ COLUMN_HEADER
Definition: tabview.hxx:59
@ ROW_HEADER
Definition: tabview.hxx:60
sal_uInt16 sal_Unicode
std::unique_ptr< char[]> aBuffer