Kaydet (Commit) 64238976 authored tarafından Balazs Varga's avatar Balazs Varga Kaydeden (comit) László Németh

tdf#100084 XLSX import: fix missing charts clean-up

Clean-up the b2fc2ad7
commit.

Change-Id: I625373d9661cbe4528ca487af0aef356b40af2e7
Reviewed-on: https://gerrit.libreoffice.org/72237
Tested-by: Jenkins
Reviewed-by: 's avatarLászló Németh <nemeth@numbertext.org>
üst d1fcb0ec
......@@ -887,7 +887,7 @@ void Chart2ImportTest::testTdf108021()
void Chart2ImportTest::testTdf100084()
{
// The test file was created with IBM Cognos, so just check there is a diagram.
// The test file was created with IBM Cognos, make sure there is a diagram.
load("/chart2/qa/extras/data/xlsx/", "tdf100084.xlsx");
Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
......
......@@ -385,15 +385,16 @@ bool XmlFilterBase::importFragment( const rtl::Reference<FragmentHandler>& rxHan
handler to create specialized input streams, e.g. VML streams that
have to preprocess the raw input data. */
Reference< XInputStream > xInStrm = rxHandler->openFragmentStream();
// Check again the aFragmentPath route if there is no any file with lowercase letter. (tdf#100084)
/* tdf#100084 Check again the aFragmentPath route with lowercase file name
TODO: complete handling of case-insensitive file paths */
if ( !xInStrm.is() )
{
sal_Int32 nPathLen = aFragmentPath.lastIndexOf('/') + 1;
OUString fileName = aFragmentPath.copy(nPathLen);
if ( fileName != fileName.toAsciiLowerCase() )
OUString sLowerCaseFileName = fileName.toAsciiLowerCase();
if ( fileName != sLowerCaseFileName )
{
fileName = fileName.toAsciiLowerCase();
aFragmentPath = OUStringBuffer(aFragmentPath.copy(0, nPathLen)).append(fileName).makeStringAndClear();
aFragmentPath = aFragmentPath.copy(0, nPathLen) + sLowerCaseFileName;
xInStrm = openInputStream(aFragmentPath);
}
}
......
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