Fixed for libreoffice crashes while opening file.
Change-Id: I85a16e4ef8d75f19250115d5522046a968d5fc91 Reviewed-on: https://gerrit.libreoffice.org/6760 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
committed by
Caolán McNamara
parent
82b5172954
commit
c6e333e73b
BIN
sw/qa/extras/ooxmlimport/data/file_crash.docx
Normal file
BIN
sw/qa/extras/ooxmlimport/data/file_crash.docx
Normal file
Binary file not shown.
@@ -1555,6 +1555,11 @@ DECLARE_OOXMLIMPORT_TEST(testFdo70457, "fdo70457.docx")
|
|||||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(4500), getProperty<sal_Int32>(getShape(1), "RotateAngle"));
|
CPPUNIT_ASSERT_EQUAL(sal_Int32(4500), getProperty<sal_Int32>(getShape(1), "RotateAngle"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DECLARE_OOXMLIMPORT_TEST(testLOCrash,"file_crash.docx")
|
||||||
|
{
|
||||||
|
//The problem was libreoffice crash while opening the file.
|
||||||
|
getParagraph(1,"Contents");
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CPPUNIT_PLUGIN_IMPLEMENT();
|
CPPUNIT_PLUGIN_IMPLEMENT();
|
||||||
|
@@ -1616,7 +1616,7 @@ void SwTOXBaseSection::GenerateText( sal_uInt16 nArrayIdx,
|
|||||||
|
|
||||||
case TOKEN_ENTRY_TEXT:
|
case TOKEN_ENTRY_TEXT:
|
||||||
{
|
{
|
||||||
SwIndex aIdx( pTOXNd, rTxt.getLength() );
|
SwIndex aIdx( pTOXNd, std::min(pTOXNd->GetTxt().getLength(),rTxt.getLength()) );
|
||||||
rBase.FillText( *pTOXNd, aIdx );
|
rBase.FillText( *pTOXNd, aIdx );
|
||||||
rTxt = lcl_RemoveLineBreaks(rTxt);
|
rTxt = lcl_RemoveLineBreaks(rTxt);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user