Kaydet (Commit) 615c2a2c authored tarafından Tamás Zolnai's avatar Tamás Zolnai

tdf#109228: FILESAVE: ODT: Anchor changed to 'to character' after RT

Ignore frames without names, becuase the code does not handle
them well. It does not affect those use case for which the
deduplication code was added.

Change-Id: I08ad062b8b11cc06323467329d8c4e97bc4932dd
Reviewed-on: https://gerrit.libreoffice.org/40222Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarTamás Zolnai <tamas.zolnai@collabora.com>
üst b64e5644
......@@ -838,5 +838,11 @@ DECLARE_ODFIMPORT_TEST(testTdf109080_style_ns, "tdf109080_style_ns.odt")
parseDump("/root/page[2]/footer/txt/text()"));
}
DECLARE_ODFIMPORT_TEST(testTdf109228, "tdf109228.odt")
{
// Embedded object with no frame name was imported incorrectly, it was achored 'to character' instead of 'as character'
CPPUNIT_ASSERT_EQUAL(text::TextContentAnchorType_AS_CHARACTER, getProperty<text::TextContentAnchorType>(getShape(1), "AnchorType"));
}
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -526,6 +526,7 @@ void XMLTextFrameContext_Impl::Create()
// Skip duplicated frames
if(!mbMultipleContent && // It's allowed to have multiple image for the same frame
!sName.isEmpty() &&
xTextImportHelper->IsDuplicateFrame(sName, nX, nY, nWidth, nHeight))
{
bCreateFailed = 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