diff options
author | Tamás Zolnai <tamas.zolnai@collabora.com> | 2017-08-17 21:47:22 +0200 |
---|---|---|
committer | Tamás Zolnai <tamas.zolnai@collabora.com> | 2017-08-17 23:11:15 +0200 |
commit | c0cc02e2934aeb12dda44818955e5964496c186a (patch) | |
tree | 16f450bbe38e14d336bdbac3220b642b9a302a87 /filter | |
parent | 8c0cc5cd7befffc6e8e6361ba67807a799cc997f (diff) |
tdf#50097: DOCX: export form controls as MSO ActiveX controls
* Use the same structure for export what MSO uses
** Position and size information are exported as VML shape properties
** Different handling of inline and floating controls (pict or object)
** Do some changes on VML shape export to match how MSO exports these controls
** Write out activeX.xml and activeX.bin to store control properties
** Use persistStorage storage type defined in activeX.xml
* Drop grabbaging of activex.XML and activeX.bin
* Cleanup control related test code
Change-Id: I38bb2b2ffd2676c5459b61ec2549c31348bab41c
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/41256
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/msfilter/eschesdo.cxx | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx index c89469405c68..1348c38bfe7e 100644 --- a/filter/source/msfilter/eschesdo.cxx +++ b/filter/source/msfilter/eschesdo.cxx @@ -40,6 +40,7 @@ #include <com/sun/star/drawing/TextAdjust.hpp> #include <com/sun/star/drawing/LineDash.hpp> #include <com/sun/star/text/XText.hpp> +#include <com/sun/star/text/TextContentAnchorType.hpp> #include <com/sun/star/drawing/CircleKind.hpp> #include <com/sun/star/drawing/FillStyle.hpp> #include <com/sun/star/task/XStatusIndicator.hpp> @@ -419,7 +420,24 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj, } else if ( rObj.GetType() == "drawing.Control" ) { - break; + mpEscherEx->OpenContainer( ESCHER_SpContainer ); + bool bInline = false; + const Reference< XPropertySet > xPropSet(rObj.mXPropSet, UNO_QUERY); + if(xPropSet.is()) + { + text::TextContentAnchorType eAnchorType; + xPropSet->getPropertyValue("AnchorType") >>= eAnchorType; + bInline = eAnchorType == text::TextContentAnchorType_AS_CHARACTER; + } + + if(bInline) + { + ADD_SHAPE( ESCHER_ShpInst_PictureFrame, SHAPEFLAG_HAVESPT | SHAPEFLAG_HAVEANCHOR ); + } + else + { + ADD_SHAPE( ESCHER_ShpInst_HostControl, SHAPEFLAG_HAVESPT | SHAPEFLAG_HAVEANCHOR ); + } } else if ( rObj.GetType() == "drawing.Connector" ) { |