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 <osl/diagnose.h>
27#include <rtl/ustrbuf.hxx>
30#include <oox/token/tokens.hxx>
31#include <addressconverter.hxx>
32#include <biffhelper.hxx>
34#include <formulabase.hxx>
35#include <formulaparser.hxx>
36#include <worksheetbuffer.hxx>
37#include <tokenarray.hxx>
38#include <tokenuno.hxx>
39#include <compiler.hxx>
40#include <document.hxx>
41
42namespace oox::xls {
43
44using namespace ::com::sun::star::sheet;
45using namespace ::com::sun::star::table;
46using namespace ::com::sun::star::uno;
47
48namespace {
49
50const sal_uInt32 BIFF12_DEFNAME_HIDDEN = 0x00000001;
51const sal_uInt32 BIFF12_DEFNAME_FUNC = 0x00000002;
52const sal_uInt32 BIFF12_DEFNAME_VBNAME = 0x00000004;
53const sal_uInt32 BIFF12_DEFNAME_MACRO = 0x00000008;
54const sal_uInt32 BIFF12_DEFNAME_BUILTIN = 0x00000020;
55
56constexpr OUStringLiteral spcOoxPrefix(u"_xlnm.");
57
58const char* const sppcBaseNames[] =
59{
60 "Consolidate_Area",
61 "Auto_Open",
62 "Auto_Close",
63 "Extract",
64 "Database",
65 "Criteria",
66 "Print_Area",
67 "Print_Titles",
68 "Recorder",
69 "Data_Form",
70 "Auto_Activate",
71 "Auto_Deactivate",
72 "Sheet_Title",
73 "_FilterDatabase"
74};
75
76OUString lclGetBaseName( sal_Unicode cBuiltinId )
77{
78 OSL_ENSURE( cBuiltinId < SAL_N_ELEMENTS( sppcBaseNames ), "lclGetBaseName - unsupported built-in identifier" );
79 OUStringBuffer aBuffer;
80 if( cBuiltinId < SAL_N_ELEMENTS( sppcBaseNames ) )
81 aBuffer.appendAscii( sppcBaseNames[ cBuiltinId ] );
82 else
83 aBuffer.append( static_cast< sal_Int32 >( cBuiltinId ) );
84 return aBuffer.makeStringAndClear();
85}
86
87OUString lclGetPrefixedName( sal_Unicode cBuiltinId )
88{
89 return spcOoxPrefix + lclGetBaseName( cBuiltinId );
90}
91
93sal_Unicode lclGetBuiltinIdFromPrefixedName( const OUString& rModelName )
94{
95 if( rModelName.matchIgnoreAsciiCase( spcOoxPrefix ) )
96 {
97 for( sal_Unicode cBuiltinId = 0; cBuiltinId < SAL_N_ELEMENTS( sppcBaseNames ); ++cBuiltinId )
98 {
99 OUString aBaseName = lclGetBaseName( cBuiltinId );
100 sal_Int32 nBaseNameLen = aBaseName.getLength();
101 if( (rModelName.getLength() == spcOoxPrefix.getLength() + nBaseNameLen) && rModelName.matchIgnoreAsciiCase( aBaseName, spcOoxPrefix.getLength() ) )
102 return cBuiltinId;
103 }
104 }
106}
107
109sal_Unicode lclGetBuiltinIdFromBaseName( const OUString& rModelName )
110{
111 for( sal_Unicode cBuiltinId = 0; cBuiltinId < SAL_N_ELEMENTS( sppcBaseNames ); ++cBuiltinId )
112 if( rModelName.equalsIgnoreAsciiCaseAscii( sppcBaseNames[ cBuiltinId ] ) )
113 return cBuiltinId;
115}
116
117OUString lclGetUpcaseModelName( const OUString& rModelName )
118{
119 // TODO: i18n?
120 return rModelName.toAsciiUpperCase();
121}
122
123} // namespace
124
126 mnSheet( -1 ),
127 mnFuncGroupId( -1 ),
128 mbMacro( false ),
129 mbFunction( false ),
130 mbVBName( false ),
131 mbHidden( false )
132{
133}
134
136 WorkbookHelper( rHelper )
137{
138}
139
141{
142 if( maUpModelName.isEmpty() )
143 maUpModelName = lclGetUpcaseModelName( maModel.maName );
144 return maUpModelName;
145}
146
148 DefinedNameBase( rHelper ),
149 maScRangeData(nullptr, false),
150 mnTokenIndex( -1 ),
151 mnCalcSheet( 0 ),
152 mcBuiltinId( BIFF_DEFNAME_UNKNOWN )
153{
154}
155
157{
158 maModel.maName = rAttribs.getXString( XML_name, OUString() );
159 maModel.mnSheet = rAttribs.getInteger( XML_localSheetId, -1 );
160 maModel.mnFuncGroupId = rAttribs.getInteger( XML_functionGroupId, -1 );
161 maModel.mbMacro = rAttribs.getBool( XML_xlm, false );
162 maModel.mbFunction = rAttribs.getBool( XML_function, false );
163 maModel.mbVBName = rAttribs.getBool( XML_vbProcedure, false );
164 maModel.mbHidden = rAttribs.getBool( XML_hidden, false );
166
167 /* Detect built-in state from name itself, there is no built-in flag.
168 Built-in names are prefixed with '_xlnm.' instead. */
169 mcBuiltinId = lclGetBuiltinIdFromPrefixedName( maModel.maName );
170}
171
172void DefinedName::setFormula( const OUString& rFormula )
173{
174 maModel.maFormula = rFormula;
175}
176
178{
179 sal_uInt32 nFlags;
180 nFlags = rStrm.readuInt32();
181 rStrm.skip( 1 ); // keyboard shortcut
182 maModel.mnSheet = rStrm.readInt32();
185
186 // macro function/command, hidden flag
187 maModel.mnFuncGroupId = extractValue< sal_Int32 >( nFlags, 6, 9 );
188 maModel.mbMacro = getFlag( nFlags, BIFF12_DEFNAME_MACRO );
189 maModel.mbFunction = getFlag( nFlags, BIFF12_DEFNAME_FUNC );
190 maModel.mbVBName = getFlag( nFlags, BIFF12_DEFNAME_VBNAME );
191 maModel.mbHidden = getFlag( nFlags, BIFF12_DEFNAME_HIDDEN );
192
193 // get built-in name index from name
194 if( getFlag( nFlags, BIFF12_DEFNAME_BUILTIN ) )
195 mcBuiltinId = lclGetBuiltinIdFromBaseName( maModel.maName );
196
197 // store token array data
198 sal_Int64 nRecPos = rStrm.tell();
199 sal_Int32 nFmlaSize = rStrm.readInt32();
200 rStrm.skip( nFmlaSize );
201 sal_Int32 nAddDataSize = rStrm.readInt32();
202 if( !rStrm.isEof() && (nFmlaSize > 0) && (nAddDataSize >= 0) && (rStrm.getRemaining() >= nAddDataSize) )
203 {
204 sal_Int32 nTotalSize = 8 + nFmlaSize + nAddDataSize;
205 mxFormula.reset( new StreamDataSequence );
206 rStrm.seek( nRecPos );
207 rStrm.readData( *mxFormula, nTotalSize );
208 }
209}
210
211void DefinedName::createNameObject( sal_Int32 nIndex )
212{
213 // do not create names for (macro) functions or VBA procedures
214 // #163146# do not ignore hidden names (may be regular names created by VBA scripts)
215 if( /*maModel.mbHidden ||*/ maModel.mbFunction || maModel.mbVBName )
216 return;
217
218 // convert original name to final Calc name (TODO: filter invalid characters from model name)
219 maCalcName = isBuiltinName() ? lclGetPrefixedName( mcBuiltinId ) : maModel.maName;
220
221 // #163146# do not rename sheet-local names by default, this breaks VBA scripts
222
223 // special flags for this name
224 sal_Int32 nNameFlags = 0;
225 using namespace ::com::sun::star::sheet::NamedRangeFlag;
226 if( !isGlobalName() ) switch( mcBuiltinId )
227 {
229 case BIFF_DEFNAME_FILTERDATABASE: nNameFlags = FILTER_CRITERIA; break;
230 case BIFF_DEFNAME_PRINTAREA: nNameFlags = PRINT_AREA; break;
231 case BIFF_DEFNAME_PRINTTITLES: nNameFlags = COLUMN_HEADER | ROW_HEADER; break;
232 }
233
234 // create the name and insert it into the document, maCalcName will be changed to the resulting name
235 if (maModel.mnSheet >= 0)
237 else
240}
241
243 const css::uno::Sequence<css::sheet::ExternalLinkInfo>& rExternalLinks) const
244{
245 ScRange aRange;
246 OUString aExternDocName;
247 OUString aStartTabName;
248 OUString aEndTabName;
250 aRange.Parse_XL_Header(maModel.maFormula.getStr(), getScDocument(), aExternDocName,
251 aStartTabName, aEndTabName, nFlags, /*bOnlyAcceptSingle=*/false,
252 &rExternalLinks);
253 // aExternDocName is something like 'file:///path/to/my.xlsx' in the valid case, and it's an int
254 // when it's invalid.
255 bool bInvalidExternalRef = aExternDocName.toInt32() > 0;
256 return !bInvalidExternalRef;
257}
258
259std::unique_ptr<ScTokenArray> DefinedName::getScTokens(
260 const css::uno::Sequence<css::sheet::ExternalLinkInfo>& rExternalLinks )
261{
263 aCompiler.SetExternalLinks( rExternalLinks);
264 std::unique_ptr<ScTokenArray> pArray(aCompiler.CompileString(maModel.maFormula));
265 // Compile the tokens into RPN once to populate information into tokens
266 // where necessary, e.g. for TableRef inner reference. RPN can be discarded
267 // after, a resulting error must be reset.
268 FormulaError nErr = pArray->GetCodeError();
269 aCompiler.CompileTokenArray();
271 pArray->DelRPN();
272 pArray->SetCodeError(nErr);
273
274 return pArray;
275}
276
277void DefinedName::convertFormula( const css::uno::Sequence<css::sheet::ExternalLinkInfo>& rExternalLinks )
278{
279 ScRangeData* pScRangeData = maScRangeData.first;
280 // macro function or vba procedure
281 if (!pScRangeData)
282 return;
283
284 // convert and set formula of the defined name
285 {
286 std::unique_ptr<ScTokenArray> pTokenArray = getScTokens( rExternalLinks);
287 pScRangeData->SetCode( *pTokenArray );
288 }
289
290 ScTokenArray* pTokenArray = pScRangeData->GetCode();
291 Sequence< FormulaToken > aFTokenSeq;
292 ScTokenConversion::ConvertToTokenSequence( getScDocument(), aFTokenSeq, *pTokenArray );
293 // set built-in names (print ranges, repeated titles, filter ranges)
294 if( isGlobalName() )
295 return;
296
297 switch( mcBuiltinId )
298 {
300 {
301 Reference< XPrintAreas > xPrintAreas( getSheetFromDoc( mnCalcSheet ), UNO_QUERY );
302 ScRangeList aPrintRanges;
303 getFormulaParser().extractCellRangeList( aPrintRanges, aFTokenSeq, mnCalcSheet );
304 if( xPrintAreas.is() && !aPrintRanges.empty() )
305 xPrintAreas->setPrintAreas( AddressConverter::toApiSequence(aPrintRanges) );
306 }
307 break;
309 {
310 Reference< XPrintAreas > xPrintAreas( getSheetFromDoc( mnCalcSheet ), UNO_QUERY );
311 ScRangeList aTitleRanges;
312 getFormulaParser().extractCellRangeList( aTitleRanges, aFTokenSeq, mnCalcSheet );
313 if( xPrintAreas.is() && !aTitleRanges.empty() )
314 {
315 bool bHasRowTitles = false;
316 bool bHasColTitles = false;
317 const ScAddress& rMaxPos = getAddressConverter().getMaxAddress();
318 for (size_t i = 0, nSize = aTitleRanges.size(); i < nSize; ++i)
319 {
320 const ScRange& rRange = aTitleRanges[i];
321 bool bFullRow = (rRange.aStart.Col() == 0) && ( rRange.aEnd.Col() >= rMaxPos.Col() );
322 bool bFullCol = (rRange.aStart.Row() == 0) && ( rRange.aEnd.Row() >= rMaxPos.Row() );
323 if( !bHasRowTitles && bFullRow && !bFullCol )
324 {
325 xPrintAreas->setTitleRows( CellRangeAddress(rRange.aStart.Tab(),
326 rRange.aStart.Col(), rRange.aStart.Row(),
327 rRange.aEnd.Col(), rRange.aEnd.Row()) );
328 xPrintAreas->setPrintTitleRows( true );
329 bHasRowTitles = true;
330 }
331 else if( !bHasColTitles && bFullCol && !bFullRow )
332 {
333 xPrintAreas->setTitleColumns( CellRangeAddress(rRange.aStart.Tab(),
334 rRange.aStart.Col(), rRange.aStart.Row(),
335 rRange.aEnd.Col(), rRange.aEnd.Row()) );
336 xPrintAreas->setPrintTitleColumns( true );
337 bHasColTitles = true;
338 }
339 }
340 }
341 }
342 break;
343 }
344}
345
347{
348 ScRangeData* pScRangeData = maScRangeData.first;
349 ScTokenArray* pTokenArray = pScRangeData->GetCode();
350 Sequence< FormulaToken > aFTokenSeq;
351 ScTokenConversion::ConvertToTokenSequence(getScDocument(), aFTokenSeq, *pTokenArray);
352 return getFormulaParser().extractCellRange( orRange, aFTokenSeq );
353}
354
356{
357 // this kind of field is owned by us - see lcl_addNewByNameAndTokens
358 bool bOwned = maScRangeData.second;
359 if (bOwned)
360 delete maScRangeData.first;
361}
362
364 WorkbookHelper( rHelper )
365{
366}
367
369{
371 xDefName->importDefinedName( rAttribs );
372 return xDefName;
373}
374
376{
377 createDefinedName()->importDefinedName( rStrm );
378}
379
381{
382 // first insert all names without formula definition into the document, and insert them into the maps
383 int index = 0;
384 for( DefinedNameRef& xDefName : maDefNames )
385 {
386 if (!xDefName->isValid(getExternalLinks().getLinkInfos()))
387 {
388 continue;
389 }
390
391 xDefName->createNameObject( ++index );
392 // map by sheet index and original model name
393 maModelNameMap[ SheetNameKey( xDefName->getLocalCalcSheet(), xDefName->getUpcaseModelName() ) ] = xDefName;
394 // map by sheet index and built-in identifier
395 if( !xDefName->isGlobalName() && xDefName->isBuiltinName() )
396 maBuiltinMap[ BuiltinKey( xDefName->getLocalCalcSheet(), xDefName->getBuiltinId() ) ] = xDefName;
397 // map by API formula token identifier
398 sal_Int32 nTokenIndex = xDefName->getTokenIndex();
399 if( nTokenIndex >= 0 )
400 maTokenIdMap[ nTokenIndex ] = xDefName;
401 }
402
403 /* Now convert all name formulas, so that the formula parser can find all
404 names in case of circular dependencies. */
406}
407
409{
410 return maDefNames.get( nIndex );
411}
412
414{
415 return maTokenIdMap.get( nIndex );
416}
417
418DefinedNameRef DefinedNamesBuffer::getByModelName( const OUString& rModelName, sal_Int16 nCalcSheet ) const
419{
420 OUString aUpcaseName = lclGetUpcaseModelName( rModelName );
421 DefinedNameRef xDefName = maModelNameMap.get( SheetNameKey( nCalcSheet, aUpcaseName ) );
422 // lookup global name, if no local name exists
423 if( !xDefName && (nCalcSheet >= 0) )
424 xDefName = maModelNameMap.get( SheetNameKey( -1, aUpcaseName ) );
425 return xDefName;
426}
427
428DefinedNameRef DefinedNamesBuffer::getByBuiltinId( sal_Unicode cBuiltinId, sal_Int16 nCalcSheet ) const
429{
430 return maBuiltinMap.get( BuiltinKey( nCalcSheet, cBuiltinId ) );
431}
432
434{
435 DefinedNameRef xDefName = std::make_shared<DefinedName>( *this );
436 maDefNames.push_back( xDefName );
437 return xDefName;
438}
439
440} // namespace oox::xls
441
442/* 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:469
std::unique_ptr< ScTokenArray > CompileString(const OUString &rFormula)
Tokenize formula expression string into an array of tokens.
Definition: compiler.cxx:4687
SC_DLLPUBLIC void CheckLinkFormulaNeedingCheck(const ScTokenArray &rCode)
Check token array and set link check if ocDde/ocWebservice is contained.
Definition: documen8.cxx:1154
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, const css::uno::Sequence< css::sheet::FormulaToken > &rTokens, sal_Int32 nIndex, sal_Int32 nNameFlags, sal_Int32 nTab, bool bHidden) const
Creates and returns a defined name on-the-fly in the sheet.
RangeDataRet createNamedRangeObject(OUString &orName, const css::uno::Sequence< css::sheet::FormulaToken > &rTokens, sal_Int32 nIndex, sal_Int32 nNameFlags, bool bHidden) const
Creates and returns a defined name on-the-fly in the Calc document.
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.
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
const sal_Unicode BIFF_DEFNAME_CRITERIA
const sal_Unicode BIFF_DEFNAME_UNKNOWN
css::uno::Sequence< ApiToken > ApiTokenSequence
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