diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-05-31 09:11:52 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-05-31 08:56:09 +0000 |
commit | 526ed1f7dbd9150734edcb03727d49e1b1306f56 (patch) | |
tree | e92571cc2d0d7cb9815be2574fa0f43e73aaf032 /sw/qa | |
parent | 9bfae70fcb91f15ecc0a58a0f5eb3e5f3c8d89d9 (diff) |
tdf#77349 RTF import: automatically generate names for images if needed
The DOC/ODT import can call SwDoc::SetAllUniqueFlyNames() at the end of
the process to assign unique names to fly frames which lack a name.
Add a similar (but much simpler) feature to the domain mapper to avoid
empty image names in the DOCX/RTF import result, so it's easier to click
on the items in Writer's navigator.
Change-Id: I432fc741f8d75d735e1dfe88daba50ba0797042d
Reviewed-on: https://gerrit.libreoffice.org/25705
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/rtfimport/data/tdf77349.rtf | 3 | ||||
-rw-r--r-- | sw/qa/extras/rtfimport/rtfimport.cxx | 7 |
2 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfimport/data/tdf77349.rtf b/sw/qa/extras/rtfimport/data/tdf77349.rtf new file mode 100644 index 000000000000..1451b367823a --- /dev/null +++ b/sw/qa/extras/rtfimport/data/tdf77349.rtf @@ -0,0 +1,3 @@ +{\rtf1 +{\pict \pngblip \picw-64 \pich-1061137057 \picwgoal0 \pichgoal0 47494638396110001000d5ff00000000ffffffc0c0c0555f00ffffaafcfcfcf6f6f6eaeaeae6e6e6e4e4e4e3e3e3c2c2c2c1c1c1bcbcbcb5b5b5b3b3b3b0b0b0adadada5a5a5a2a2a2a1a1a19f9f9f9494948a8a8a8888888686867b7b7b6c6c6c5c5c5c4e4e4e4b4b4b4747474646463d3d3d3c3c3c2e2e2e2525251b1b1b18181810101009090906060603030300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000021f90401000002002c0000000010001000000684408170482c0a06c8a4728924389f506833b281302a8e6b164b18103024c52111504cca67332102e0042e9a40d9319f8300a343c1200f54e47f7e2a00001e0b0a7d0d728a010d838400261a7c0d94947784252700127e9d159f6c8411140019080ea7a9a85f842122281612b1b3b25d6b1f29291d0fbbbdbc5d5e51c34e4cc64a46c94341003b} +\par } diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx index 2af36e6755ee..390079cf687a 100644 --- a/sw/qa/extras/rtfimport/rtfimport.cxx +++ b/sw/qa/extras/rtfimport/rtfimport.cxx @@ -2619,6 +2619,13 @@ DECLARE_RTFIMPORT_TEST(testTdf74795, "tdf74795.rtf") CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), getProperty<sal_Int32>(xCell, "LeftBorderDistance")); } +DECLARE_RTFIMPORT_TEST(testTdf77349, "tdf77349.rtf") +{ + uno::Reference<container::XNamed> xImage(getShape(1), uno::UNO_QUERY); + // This was empty: imported image wasn't named automatically. + CPPUNIT_ASSERT_EQUAL(OUString("Image1"), xImage->getName()); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |