summaryrefslogtreecommitdiff
path: root/sc/source/filter/excel/xename.cxx
diff options
context:
space:
mode:
authorNoel Power <noel.power@novell.com>2012-01-12 13:00:55 +0000
committerNoel Power <noel.power@novell.com>2012-01-13 10:19:48 +0000
commita0b20e1f023dedc849baf68f278c6f6df0660b11 (patch)
treef057e74109fe403aa3def53f9e801c0831493ab0 /sc/source/filter/excel/xename.cxx
parent6008c3f547a8cfa5f8c97f4084dfbab8fd263b6f (diff)
fix definedName corruption for xlsx export ( bnc#741182 )
set symbol for builtin name using rangelist
Diffstat (limited to 'sc/source/filter/excel/xename.cxx')
-rw-r--r--sc/source/filter/excel/xename.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/sc/source/filter/excel/xename.cxx b/sc/source/filter/excel/xename.cxx
index 08fae592dd2a..0c82a08bb487 100644
--- a/sc/source/filter/excel/xename.cxx
+++ b/sc/source/filter/excel/xename.cxx
@@ -139,7 +139,7 @@ public:
sal_uInt16 InsertName( SCTAB nTab, sal_uInt16 nScNameIdx );
/** Inserts a new built-in defined name. */
- sal_uInt16 InsertBuiltInName( sal_Unicode cBuiltIn, XclTokenArrayRef xTokArr, SCTAB nScTab );
+ sal_uInt16 InsertBuiltInName( sal_Unicode cBuiltIn, XclTokenArrayRef xTokArr, SCTAB nScTab, const ScRangeList& aRangeList );
sal_uInt16 InsertBuiltInName( sal_Unicode cBuiltIn, XclTokenArrayRef xTokArr, const ScRange& aRange );
/** Inserts a new defined name. Sets another unused name, if rName already exists. */
sal_uInt16 InsertUniqueName( const String& rName, XclTokenArrayRef xTokArr, SCTAB nScTab );
@@ -410,11 +410,14 @@ sal_uInt16 XclExpNameManagerImpl::InsertBuiltInName( sal_Unicode cBuiltIn, XclTo
return Append( xName );
}
-sal_uInt16 XclExpNameManagerImpl::InsertBuiltInName( sal_Unicode cBuiltIn, XclTokenArrayRef xTokArr, SCTAB nScTab )
+sal_uInt16 XclExpNameManagerImpl::InsertBuiltInName( sal_Unicode cBuiltIn, XclTokenArrayRef xTokArr, SCTAB nScTab, const ScRangeList& rRangeList )
{
XclExpNameRef xName( new XclExpName( GetRoot(), cBuiltIn ) );
xName->SetTokenArray( xTokArr );
xName->SetLocalTab( nScTab );
+ String sSymbol;
+ rRangeList.Format( sSymbol, SCR_ABS_3D, GetDocPtr(), ::formula::FormulaGrammar::CONV_XL_A1 );
+ xName->SetSymbol( sSymbol );
return Append( xName );
}
@@ -725,7 +728,7 @@ sal_uInt16 XclExpNameManager::InsertBuiltInName( sal_Unicode cBuiltIn, const ScR
if( !rRangeList.empty() )
{
XclTokenArrayRef xTokArr = GetFormulaCompiler().CreateFormula( EXC_FMLATYPE_NAME, rRangeList );
- nNameIdx = mxImpl->InsertBuiltInName( cBuiltIn, xTokArr, rRangeList.front()->aStart.Tab() );
+ nNameIdx = mxImpl->InsertBuiltInName( cBuiltIn, xTokArr, rRangeList.front()->aStart.Tab(), rRangeList );
}
return nNameIdx;
}