Kaydet (Commit) 0762392c authored tarafından Noel Power's avatar Noel Power

Fix ScRangeList::Parse wrt defaulted delimiter and default tab params

At some point in the past default tab was introduced, the VBA Range code calling
ScRangeList::Parse was not adjusted to take care of this extra defaulted param and
and the delimiter param was passed in place of default tab.

Change-Id: I45a971f7ad9cb4f3299fae8cb1882cb0e7744c3b
üst 229d0d10
......@@ -173,15 +173,10 @@ void ScMacrosTest::testVba()
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TestCalc_Rangetest2.")),
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document"))
},
#if defined FIXRANGEADDRESSING
//ScVbaRange::getRangeForName()/getScRangeListForAddress() seems to get confused
//about the addressing mode of the document vs the addressing mode of a named
//range ( need to fix that )
{
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Ranges-2.")),
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document"))
},
#endif
{
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("pagesetup.")),
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document"))
......@@ -202,15 +197,40 @@ void ScMacrosTest::testVba()
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Shapes.")),
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document"))
},
#if VBA_TEST_WORKING
{
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Ranges.")),
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document"))
},
#endif
{
OUString("CheckOptionToggleValue."),
OUString("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document")
},
{
OUString("GeneratedEventTest."),
OUString("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document")
},
{
OUString("MiscControlTests."),
OUString("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document")
},
{
OUString("Workbooks."),
OUString("vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document")
},
};
rtl::OUString aFileExtension("xls");
OUString sTempDir;
OUString sTempDirURL;
osl::FileBase:: getTempDirURL( sTempDirURL );
osl::FileBase::getSystemPathFromFileURL( sTempDirURL, sTempDir );
Sequence< uno::Any > aParams;
if ( !sTempDir.isEmpty() )
{
aParams.realloc(1);
aParams[ 0 ] <<= sTempDir;
}
for ( sal_uInt32 i=0; i<SAL_N_ELEMENTS( testInfo ); ++i )
{
rtl::OUString aFileName;
......@@ -224,7 +244,6 @@ void ScMacrosTest::testVba()
Any aRet;
Sequence< sal_Int16 > aOutParamIndex;
Sequence< Any > aOutParam;
Sequence< uno::Any > aParams;
SfxObjectShell* pFoundShell = SfxObjectShell::GetShellFromComponent(xComponent);
......
......@@ -1165,7 +1165,7 @@ ScVbaRange::getCellRangesForAddress( sal_uInt16& rResFlags, const rtl::OUString&
pDoc = pDocSh->GetDocument();
String aString(sAddress);
sal_uInt16 nMask = SCA_VALID;
rResFlags = rCellRanges.Parse( sAddress, pDoc, nMask, eConv, cDelimiter );
rResFlags = rCellRanges.Parse( sAddress, pDoc, nMask, eConv, 0, cDelimiter );
if ( rResFlags & SCA_VALID )
{
return true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment