diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-10-08 14:30:13 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-10-08 14:30:13 +0200 |
commit | 0d79e4c07a7a7328cc0bed1d7998317b634543d8 (patch) | |
tree | 2bf851061a61ef770d115bfd07492d9610c8d806 | |
parent | ac33ef3a4abe73c65600e1f199d25e1a1f0080db (diff) |
tdf#94049 RTF import: add missing check for empty shape when popping state
Change-Id: I3c9a5f89df721618bb60b8932b69a371bb6f3ff1
-rw-r--r-- | sw/qa/core/data/rtf/pass/tdf94049.rtf | 12 | ||||
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.cxx | 9 |
2 files changed, 18 insertions, 3 deletions
diff --git a/sw/qa/core/data/rtf/pass/tdf94049.rtf b/sw/qa/core/data/rtf/pass/tdf94049.rtf new file mode 100644 index 000000000000..52e25ebebab6 --- /dev/null +++ b/sw/qa/core/data/rtf/pass/tdf94049.rtf @@ -0,0 +1,12 @@ +{\rtf1 +\pard\plain\par +{\object\objemb\objw608\objh774\objscalex100\objscaley100 +{\*\objdata +0105000002000000080000005061636b6167650000000000000000006000000002000050726f674d616e2e45584500140001000000633a5c646f735c617474726962200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002f00101c01050000050000000d0000004d45544146494c45504943540022040000a0faffff480400000800220460058e1f010009000003090200000200410100000000050000000b0200000000050000000c023300270010000000fb02f5ff00000000000090010000000004000022417269616c005754040000002d01000005000000090200000000050000000102ffffff0065000000410bc6008800200020000000000020002000000004002800000020000000200000000100010000000000800000000000000000000000000000000000000000000000ffffff00fffffffffffffffffc7ffe3ffbffffdff73ffceffefc1f7ffff00fffffc003ffff0001fffe0000fffe00007ffe00007ffc00007ff000000fe0000003c00000018000000000000000003ff800003ff800007ff80000fff80101fffc0101fffc0183fffe0383fffe0387ffff07c7ffff07cfffff8fcfffff9fffffffffffffffff050000000902010000000500000001020100000005000000090200000000050000000102ffffff0041010000410b4600660020002000000000002000200000000400280000002000000020000000010004000000000000020000000000000000000000000000000000000000000000008000008000000080800080000000800080008080000080808000c0c0c0000000ff0000ff000000ffff00ff000000ff00ff00ffff0000ffffff00000000000000000000000000000000000000000000000000000000000000000000000077700000000000000777000000000007000000000000000000007000000000700077000000000000770007000000000007000000000000000070000000000000000000008f07700000000000000000000000008f08f00000000000000000000000008f08f0808877000000000000000000ff08f08f08f0000000000000000000000ff08f008fff88770000000000000000f008008ffff80000000000000000000fffffffffff808888000000000000008fffff80008808fff8700000000000608fffff0ff8008fffff8707000000066088fffff0fffffffffff0880700000e66088fffff0fffffffff0bb07770060e666088000000000007f0bb0787776660e666000000000000000bb078787766660e6660000000000000bb08878787666660ee0000000000000700f888787866666600000000000000007f8f888780666666000000000000000008f8f8887066666600000000000000000f8f8f8880066660000000000000000000f8f8f8000666600000000000000000008f8f8f0006660000000000000000000008f8f0000066000000000000000000000f8f800000600000000000000000000000f8000000600000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000005000000090201000000050000000102010000000d000000fb020000000000000000000000000000000000010044040000002d0101000300000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000002f00101c} +} +\pard\plain\par +{\object\objemb\objw608\objh774\objscalex100\objscaley100 +{\*\objdata +0105000002000000080000005061636b6167650000000000000000006000000002000050726f674d616e2e45584500140001000000633a5c646f735c617474726962200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002f00101c01050000050000000d0000004d45544146494c45504943540022040000a0faffff480400000800220460058e1f010009000003090200000200410100000000050000000b0200000000050000000c023300270010000000fb02f5ff00000000000090010000000004000022417269616c005754040000002d01000005000000090200000000050000000102ffffff0065000000410bc6008800200020000000000020002000000004002800000020000000200000000100010000000000800000000000000000000000000000000000000000000000ffffff00fffffffffffffffffc7ffe3ffbffffdff73ffceffefc1f7ffff00fffffc003ffff0001fffe0000fffe00007ffe00007ffc00007ff000000fe0000003c00000018000000000000000003ff800003ff800007ff80000fff80101fffc0101fffc0183fffe0383fffe0387ffff07c7ffff07cfffff8fcfffff9fffffffffffffffff050000000902010000000500000001020100000005000000090200000000050000000102ffffff0041010000410b4600660020002000000000002000200000000400280000002000000020000000010004000000000000020000000000000000000000000000000000000000000000008000008000000080800080000000800080008080000080808000c0c0c0000000ff0000ff000000ffff00ff000000ff00ff00ffff0000ffffff00000000000000000000000000000000000000000000000000000000000000000000000077700000000000000777000000000007000000000000000000007000000000700077000000000000770007000000000007000000000000000070000000000000000000008f07700000000000000000000000008f08f00000000000000000000000008f08f0808877000000000000000000ff08f08f08f0000000000000000000000ff08f008fff88770000000000000000f008008ffff80000000000000000000fffffffffff808888000000000000008fffff80008808fff8700000000000608fffff0ff8008fffff8707000000066088fffff0fffffffffff0880700000e66088fffff0fffffffff0bb07770060e666088000000000007f0bb0787776660e666000000000000000bb078787766660e6660000000000000bb08878787666660ee0000000000000700f888787866666600000000000000007f8f888780666666000000000000000008f8f8887066666600000000000000000f8f8f8880066660000000000000000000f8f8f8000666600000000000000000008f8f8f0006660000000000000000000008f8f0000066000000000000000000000f8f800000600000000000000000000000f8000000600000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000005000000090201000000050000000102010000000d000000fb020000000000000000000000000000000000010044040000002d0101000300000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000002f00101c} +} +} diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 1dd819752be0..a343a2a4679f 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -5410,9 +5410,12 @@ RTFError RTFDocumentImpl::popState() OSL_ASSERT(pShape.get()); if (pShape.get()) pShape->getAny() >>= xShape; - Mapper().startShape(xShape); - Mapper().props(pProperties); - Mapper().endShape(); + if (xShape.is()) + { + Mapper().startShape(xShape); + Mapper().props(pProperties); + Mapper().endShape(); + } m_aObjectAttributes.clear(); m_aOLEAttributes.clear(); m_bObject = false; |