summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-08-01 16:46:54 +0200
committerMichael Stahl <mstahl@redhat.com>2014-08-04 11:31:06 +0000
commitb28c11025b08cae4cd4685c75fbc474d2c216fb0 (patch)
tree3fe5176315cb29628c31c1c52884c4088a979a60 /sw
parente9297597088f36d4072515fd46d1299381dcfe6b (diff)
RTF import: fix as-char anchored OLE objects
Regression from 2a35f5c7945d00b6f6e21fc7cf5b05b184eba88f (DOCX OLE import: inherit anchor type from replacement graphic, 2014-02-18), then problem was that dmapper expected that the anchor type of the replacement graphic is set, but the RTF tokenizer wasn't adapted to fulfill this requirement. (cherry picked from commit 43b88364b0b05def27899d585a1dab46ba3fb729) Conflicts: sw/qa/extras/inc/swmodeltestbase.hxx sw/qa/extras/rtfimport/rtfimport.cxx Change-Id: I0f7e1a71052f337793d6f844fe5476c3868c03f4 Reviewed-on: https://gerrit.libreoffice.org/10677 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/rtfimport/data/ole-inline.rtf188
-rw-r--r--sw/qa/extras/rtfimport/rtfimport.cxx6
2 files changed, 194 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfimport/data/ole-inline.rtf b/sw/qa/extras/rtfimport/data/ole-inline.rtf
new file mode 100644
index 000000000000..b8af690d68ee
--- /dev/null
+++ b/sw/qa/extras/rtfimport/data/ole-inline.rtf
@@ -0,0 +1,188 @@
+{\rtf1
+{\object\objemb\objw797\objh299
+{\*\objclass Equation.3}
+{\*\objdata 01050000020000000b0000004571756174696f6e2e33000000000000000000000c0000
+d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff0900060000000000000000000000010000000100000000000000001000000200000001000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+fffffffffffffffffdffffff04000000fefffffffefffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffff0100000002ce020000000000c0000000000000460000000000000000000000000000
+00000000000003000000000200000000000001004f006c00650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000200ffffffff02000000ffffffff00000000000000000000000000000000000000000000000000000000
+0000000000000000000000001400000000000000010043006f006d0070004f0062006a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012000200ffffffff03000000ffffffff0000000000000000000000000000000000000000000000000000
+000000000000000000000100000066000000000000004500710075006100740069006f006e0020004e0061007400690076006500000000000000000000000000000000000000000000000000000000000000000000002000020004000000ffffffffffffffff000000000000000000000000000000000000000000000000
+000000000000000000000000030000004600000000000000feffffff02000000feffffff04000000fefffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff010000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100feff030a0000ffffffff02ce020000000000c0000000000000461700
+00004d6963726f736f6674204571756174696f6e20332e30000c0000004453204571756174696f6e000b0000004571756174696f6e2e3300f439b27100000000000000000000000000000000000000000000000000000000000000000000000000001c0000000200c6c12a0000000000000090f61400b4eb140000000000
+03010103000a010a010283650002833d0002836d0002836300030f00000b11010281320000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030001000000000000000000000000000000000000000000
+000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000000003004f0062006a0049006e0066006f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012000200ffffffffffffffffffffffff000000000000
+000000000000000000000000000000000000000000000000000000000000050000000600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105000000000000}
+{\result
+{\rtlch\fcs1 \af40 \ltrch\fcs0 \insrsid5264144
+{\*\shppict
+{\pict
+{\*\picprop\shplid1025
+{\sp
+{\sn shapeType}
+{\sv 75}
+}
+{\sp
+{\sn fFlipH}
+{\sv 0}
+}
+{\sp
+{\sn fFlipV}
+{\sv 0}
+}
+{\sp
+{\sn dxTextLeft}
+{\sv 0}
+}
+{\sp
+{\sn dyTextTop}
+{\sv 0}
+}
+{\sp
+{\sn dxTextRight}
+{\sv 0}
+}
+{\sp
+{\sn dyTextBottom}
+{\sv 0}
+}
+{\sp
+{\sn pictureActive}
+{\sv 0}
+}
+{\sp
+{\sn fillBackColor}
+{\sv 0}
+}
+{\sp
+{\sn fFilled}
+{\sv 1}
+}
+{\sp
+{\sn fLine}
+{\sv 0}
+}
+{\sp
+{\sn fLayoutInCell}
+{\sv 1}
+}
+}
+\picscalex100\picscaley100\piccropl0\piccropr0\piccropt0\piccropb0
+\picw1406\pich527\picwgoal797\pichgoal299\emfblip\bliptag193488543
+{\*\blipuid 0b88669f00000000715d505234020020}
+010000006c0000000000000000000000340000001300000000000000000000007c0500000f02000020454d460000010098090000350000000200000000000000
+000000000000000035000000140000000e00000005000000000000000000000000000000e2360000a0140000460000002c00000020000000454d462b01400100
+1c000000100000000210c0db010000005e0000006400000046000000580000004c000000454d462b224000000c000000000000001e4009000c00000000000000
+244000010c00000000000000304001000c00000000000000214000000c00000000000000044000000c00000000000000110000000c000000080000000b000000
+1000000060000000600000000900000010000000ec090000ec0900000c0000001000000000000000000000000a00000010000000000000000000000014000000
+0c0000000d000000120000000c0000000100000021000000080000001e0000001800000000000000000000007c0500000f020000210000000800000052000000
+4c010000010000005afeffff0000000000000000000000009001000001000000000000104c0069006200650072006100740069006f006e002000530065007200
+69006600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000160000000c00000018000000180000000c00000000000000250000000c0000000100000054000000540000006a000000c201000022010000
+830300000100000000000000000000006a000000c2010000010000004c00000002000000000000000000000000000000000000005000000065000000b9000000
+220000000c000000ffffffff140000000c0000000d0000002100000008000000250000000c0000000a000080280000000c00000001000000520000004c010000
+010000005afeffff0000000000000000000000009001000000000000000000004f00700065006e00530079006d0062006f006c00000000000000000000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+00000000160000000c00000018000000180000000c00000000000000250000000c0000000100000054000000540000003e010000c201000095020000d2030000
+0100000000000000000000003e010000c2010000010000004c0000000200000000000000000000000000000000000000500000003d0000005801000022000000
+0c000000ffffffff140000000c0000000d0000002100000008000000250000000c0000000a000080280000000c00000001000000520000004c01000001000000
+5afeffff0000000000000000000000009001000001000000000000104c0069006200650072006100740069006f006e0020005300650072006900660000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+160000000c00000018000000180000000c00000000000000250000000c00000001000000540000005800000095020000c20100008b0400008303000001000000
+000000000000000095020000c2010000020000004c0000000200000000000000000000000000000000000000500000006d006300370100003701000022000000
+0c000000ffffffff140000000c0000000d0000002100000008000000250000000c0000000a000080280000000c00000001000000520000004c01000001000000
+03ffffff0000000000000000000000009001000000000000000000104c0069006200650072006100740069006f006e0020005300650072006900660000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+160000000c00000018000000180000000c00000000000000250000000c000000010000005400000054000000a7040000ee0000002a0500001002000001000000
+0000000000000000a7040000ee000000010000004c0000000200000000000000000000000000000000000000500000003200000084000000220000000c000000
+ffffffff140000000c0000000d000000220000000c000000ffffffff140000000c0000000d000000460000001c00000010000000454d462b024000000c000000000000000e00000014000000000000001000000014000000}
+}
+{\nonshppict
+{\pict\picscalex100\picscaley100\piccropl0\piccropr0\piccropt0\piccropb0\picw1406\pich527\picwgoal797\pichgoal299\wmetafile8\bliptag193488543\blipupi2540
+{\*\blipuid 0b88669f00000000715d505234020020}
+010009000003fa0600000500e20400000000e204000026060f00ba09574d46430100000000000100a00b00000000010000009809000000000000980900000100
+00006c0000000000000000000000340000001300000000000000000000007c0500000f02000020454d4600000100980900003500000002000000000000000000
+00000000000035000000140000000e00000005000000000000000000000000000000e2360000a0140000460000002c00000020000000454d462b014001001c00
+0000100000000210c0db010000005e0000006400000046000000580000004c000000454d462b224000000c000000000000001e4009000c000000000000002440
+00010c00000000000000304001000c00000000000000214000000c00000000000000044000000c00000000000000110000000c000000080000000b0000001000
+000060000000600000000900000010000000ec090000ec0900000c0000001000000000000000000000000a000000100000000000000000000000140000000c00
+00000d000000120000000c0000000100000021000000080000001e0000001800000000000000000000007c0500000f0200002100000008000000520000004c01
+0000010000005afeffff0000000000000000000000009001000001000000000000104c0069006200650072006100740069006f006e0020005300650072006900
+66000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+000000000000160000000c00000018000000180000000c00000000000000250000000c0000000100000054000000540000006a000000c2010000220100008303
+00000100000000000000000000006a000000c2010000010000004c00000002000000000000000000000000000000000000005000000065000000b90000002200
+00000c000000ffffffff140000000c0000000d0000002100000008000000250000000c0000000a000080280000000c00000001000000520000004c0100000100
+00005afeffff0000000000000000000000009001000000000000000000004f00700065006e00530079006d0062006f006c000000000000000000000000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+0000160000000c00000018000000180000000c00000000000000250000000c0000000100000054000000540000003e010000c201000095020000d20300000100
+000000000000000000003e010000c2010000010000004c0000000200000000000000000000000000000000000000500000003d00000058010000220000000c00
+0000ffffffff140000000c0000000d0000002100000008000000250000000c0000000a000080280000000c00000001000000520000004c010000010000005afe
+ffff0000000000000000000000009001000001000000000000104c0069006200650072006100740069006f006e00200053006500720069006600000000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001600
+00000c00000018000000180000000c00000000000000250000000c00000001000000540000005800000095020000c20100008b04000083030000010000000000
+00000000000095020000c2010000020000004c0000000200000000000000000000000000000000000000500000006d0063003701000037010000220000000c00
+0000ffffffff140000000c0000000d0000002100000008000000250000000c0000000a000080280000000c00000001000000520000004c0100000100000003ff
+ffff0000000000000000000000009001000000000000000000104c0069006200650072006100740069006f006e00200053006500720069006600000000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001600
+00000c00000018000000180000000c00000000000000250000000c000000010000005400000054000000a7040000ee0000002a05000010020000010000000000
+000000000000a7040000ee000000010000004c0000000200000000000000000000000000000000000000500000003200000084000000220000000c000000ffff
+ffff140000000c0000000d000000220000000c000000ffffffff140000000c0000000d000000460000001c00000010000000454d462b024000000c0000000000
+00000e000000140000000000000010000000140000000400000003010800050000000b0200000000050000000c02140035000500000009020000000005000000
+0102ffffff00050000002e01000000000400000004010d00040000000601010004000000070101000400000003010100050000000b0200000000050000000d02
+000000000400000004010d000400000002010100030000001e000700000016040f027c0500000000030000001e00050000002e01180000000500000009020000
+00001c000000fb025afe000000000000900101000000000000104c696265726174696f6e20536572696600000000000000000000000000000000040000002d01
+0000040000002d0100000d000000320ac2016a000100020000000000000000006500b900040000002701ffff0400000004010d00030000001e001c000000fb02
+0c000000000000009001000000ff000000310000000000000000000000000000000000000000000000000000000000000000040000002d01010004000000f001
+0000050000002e0118000000050000000902000000001c000000fb025afe000000000000900100000000000000004f70656e53796d626f6c0000000000000000
+0000000000000000000000000000040000002d010000040000002d0100000d000000320ac2013e010100020000000000000000003d005801040000002701ffff
+0400000004010d00030000001e00040000002d01010004000000f0010000050000002e0118000000050000000902000000001c000000fb025afe000000000000
+900101000000000000104c696265726174696f6e20536572696600000000000000000000000000000000040000002d010000040000002d0100000e000000320a
+c20195020200020000000000000000006d6337013701040000002701ffff0400000004010d00030000001e00040000002d01010004000000f001000005000000
+2e0118000000050000000902000000001c000000fb0203ff000000000000900100000000000000104c696265726174696f6e2053657269660000000000000000
+0000000000000000040000002d010000040000002d0100000d000000320aee00a70401000200000000000000000032008400040000002701ffff040000000401
+0d00040000002701ffff0400000004010d00040000000701010004000000060101000400000004010d00050000002e0100000000050000000102ffffff000500
+000009020000000007000000fc020000ffffff000000040000002d01020008000000fa0200000000000000000000040000002d0103001c000000fb0210000700
+00000000bc02000000ee0000002253797374656d0000000000000000000000000000000000000000000000000000040000002d0104000400000003010100050000000b0200000000050000000c0201000100050000000d0200000000050000000e020100010004000000f0010000030000000000}
+}
+}
+}
+}\par
+}
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index 44d49da79e14..5ed5d3621a68 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -1807,6 +1807,12 @@ DECLARE_RTFIMPORT_TEST(testFdo80905, "fdo80905.rtf")
CPPUNIT_ASSERT_EQUAL(true, static_cast<bool>(xFields->hasMoreElements()));
}
+DECLARE_RTFIMPORT_TEST(testOleInline, "ole-inline.rtf")
+{
+ // Problem was that inline shape had at-page anchor.
+ CPPUNIT_ASSERT_EQUAL(text::TextContentAnchorType_AS_CHARACTER, getProperty<text::TextContentAnchorType>(getShape(1), "AnchorType"));
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */