w10:wrap was originally arrived to
writerfilter::dmapper::WrapHandler::lcl_attribute(), but
writerfilter::dmapper::DomainMapper_Impl::PushShapeContext() was called
already and set the anchor type. Fix this, then we can set a a suitable
anchor type in lcl_SetAnchorType() based on the type model.
Change-Id: Ib411450b10f29f814bc13d81eaec434971b2e52a
This commit partially reverts 9e8957de20
(as it interpreted mso-wrap-style as the wrap type of the textbox
itself, not the wrap type of the contained text) and also extends the
effect of commit 0016757efe to the
SimpleShape class as well.
Change-Id: If2bded6ad94f2866e8ea398ff0f2792e8c8e86b0
Another attempt, whoever has written this apparently didn't consider
the possibility of recursion at all, and this still feels a bit hackish.
Writerfilter keeps just one oox::shape::ShapeContextHandler object during
the entire time of parsing the document, because e.g. <v:shapetype> needs
to be reachable even across VML block (see sw testcases for bnc#705956).
This however presents a problem when VML contains <w:txbxContent> which
contains another VML, as this code previously just took whatever has been
read and returned it to writerfilter, and it broke with recursion.
So now try to mark recursion entry and returns the right shape.
Related to 36c12c246d886b2d96d7a2d4d0c250db9d925c74 and the previous
commits it reverted.
Change-Id: I949a6b52ec7540aa59b047c7b6e908b10fb3bdc1
Stupid containers with shared_ptr. Trying to remove the object
from it gets it deleted because it's owned by the shared_ptr
and there's no sensible way to wrestle it out of it. This will
need to be redone somehow.
This reverts commit 04d600d4be.
This is a mess. Shapes from oox/vml are added to Writer by calling
SwXDrawPage::add(), which forces the shapes to be AT_PAGE, because
the pDoc->GetCurrentLayout() there is NULL. After that writerfilter
in DomainMapper_Impl::PushShapeContext() tries to do further
tricks with the anchoring. Such as the fix for bnc#764005
(0a412cc13e) that broke inline shapes
because of the AT_PAGE above.
So try to set the proper anchoring already in oox, although I'm not
entirely sure I got it right. Ideally writerfilter should not touch
it, but when I simply removed it another testcase breaks, so hopefully
this all can be cleaned up somewhen later when we have enough testcases
for all the possibilities.
Change-Id: I7dd95d87bd027ce0f129f76b3377f3d1445c34d1
Not all percentage attributes actually use this, but better be
safe and no point in checking only the allowed ones use them.
Change-Id: I851f9b19ea85201d70d5e6b2e219bbcd88ae3dea
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 SimpleFileAccess::create method
Change-Id: Ie5b0696fe2228a9033b19969245a53c21a61aa14
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>, added some tweaks.
chang the visibility of aMceState in order to access that member to filter out reading and parsing of ./xl/ctrlProps/ctrlProp[N].xml fragments for 'controls' & 'oleObjects' elements nested withing 'mc:AlternateContent' elements
Change-Id: I6892db7e3302b9977f0fdaabbe3ac1444315e011
Update calls to factories to use new ::create methods
Change-Id: I01d4417820f52718836c92faf3c2fae0dc96b30d
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>, added some tweaks.