[Libreoffice-commits] .: sc/source
Noel Power
noelp at kemper.freedesktop.org
Fri Jan 13 02:22:53 PST 2012
sc/source/filter/excel/xename.cxx | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
New commits:
commit a0b20e1f023dedc849baf68f278c6f6df0660b11
Author: Noel Power <noel.power at novell.com>
Date: Thu Jan 12 13:00:55 2012 +0000
fix definedName corruption for xlsx export ( bnc#741182 )
set symbol for builtin name using rangelist
diff --git a/sc/source/filter/excel/xename.cxx b/sc/source/filter/excel/xename.cxx
index 08fae59..0c82a08 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;
}
More information about the Libreoffice-commits
mailing list