Kaydet (Commit) 4954e2a2 authored tarafından Markus Mohrhard's avatar Markus Mohrhard

simplify code and fix out of bounds read

Change-Id: I5be3a28d3d1ae43974f844d143a30bfd989cbe5b
üst 34012133
......@@ -326,10 +326,10 @@ void XSpreadsheets2::importSheetToCopy()
bool XSpreadsheets2::isExternalReference(const OUString& aDestContent, const OUString& aSrcContent )
{
OUString aStart("'file://");
const sal_Char* sSrcContent = OUStringToOString( aSrcContent, RTL_TEXTENCODING_UTF8 ).getStr();
return (aDestContent.endsWithIgnoreAsciiCaseAsciiL(sSrcContent, aSrcContent.getLength()) // same cell address
&& aDestContent.indexOf(aStart)==0 // starts with 'file://
CPPUNIT_ASSERT(aDestContent.startsWith(aStart));
return (aDestContent.endsWithIgnoreAsciiCase(aSrcContent, NULL) // same cell address
&& aDestContent.indexOf(aSrcFileName)>0); // contains source file name
}
......
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