This can be triggered by using a style in the docx document, then
manually removing that style from styles.xml.
Change-Id: I4aad54d088d9fa56371ff49220316fb14fce6c37
If the documents ends with a table, both Word/Writer produces a
non-table empty paragraph after that table. However, it's valid not to
emit that empty paragraph, so handle the situation in the importer.
Change-Id: I8ea163f2de62954f3891f8f48e81d89f6e29ce6f
One would think that with {\pict{\foo1}}, the inner group has no effect
in the outer group, but this turns out to be valid, so we should handle
it as well.
Change-Id: I64b933ad1cd5946f22d27669e9240d9e1875bde3
There were two problems here:
1) SimpleShape::implConvertAndInsert() did not set the anchor type
2) DomainMapper_Impl::PushShapeContext() tried to overwrite it
Change-Id: I2c32016c4bb15c891cf287d8208e10817c6291e6
Update calls to factories to use new ::create methods
Change-Id: I01d4417820f52718836c92faf3c2fae0dc96b30d
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>, added some tweaks.
Most RTF documents (produced by Word/Writer) reset character and
paragraph properties at the start of each paragraph. Because of this,
appending properties of the same type didn't cause any noticable
performance problems. However, it's valid to not reset these properties,
and in this case a longer document takes forever to import.
Filter these duplicates at the tokenizer level for trivial properties to
get acceptable import speed.
Also fixes rhbz#825548 in an easier-to-backport way.
Change-Id: Id0b7289323d45ff0d747c74bb78d8eb7def0cfc2
rtf documents with vast sequences of replicated properties without any pard
resets to defaults create huge vectors of properties that eat time and memory
So if we are adding a property which already exists and there are no
intermediate properties which would cause side effects to the property then
update the existing one instead
Only implemented this optimization for some selected character properties
This takes my load time down to 7 seconds from effectively some "infinite"
hour+ load time.
Change-Id: I520779233180f4d9faf9fb0989d546e08fc6cabd
This is pretty much a revert of 60cb70b945.
Turns out e.g. <v:shapetype> is not local only to its <w:pict>.
Added a testcase.
Change-Id: Ibbb9fe01bc2fc77dd67151bf4ca0905443eebf63
g++ (GCC) 4.7.0 20120507 (Red Hat 4.7.0-5:
/com/sun/star/uno/Sequence.hxx:178:10: error: assuming signed overflow
does not occur when assuming that (X - c) > X is always false
[-Werror=strict-overflow]
<w:p><w:pict>...<w:txbxContent><w:p><w:p/> - in this case, the inner
paragraphs should not interfere with the outer one, but e.g.
detecting whether it was the last paragraph in section could get
broken.
Change-Id: I8634ee6a0d6274f5770423ff798adfa260a33326
As far as I can say, this reusing is just an optimization, but
it breaks e.g. with <w:pict><v:group><w:pict>... , where
using the same context for two shapes breaks things, e.g.
oox::vml::ShapeContainer::getFirstShape() does not work right.
Change-Id: I90bb85b4d320e1bb0727401879b0551abbac5f12
We used to ignore m_bTitlePage in this case, resulting in wrong
'Default' page style for the first page, instead of 'First Page'.
Change-Id: I1899354fb39db4f0eb663fd5233395f2d4a5e72a