summaryrefslogtreecommitdiff
path: root/include/oox/export
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2017-08-17 21:47:22 +0200
committerTamás Zolnai <tamas.zolnai@collabora.com>2017-08-17 23:11:15 +0200
commitc0cc02e2934aeb12dda44818955e5964496c186a (patch)
tree16f450bbe38e14d336bdbac3220b642b9a302a87 /include/oox/export
parent8c0cc5cd7befffc6e8e6361ba67807a799cc997f (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 'include/oox/export')
-rw-r--r--include/oox/export/vmlexport.hxx18
1 files changed, 16 insertions, 2 deletions
diff --git a/include/oox/export/vmlexport.hxx b/include/oox/export/vmlexport.hxx
index aac1811a4f17..c259db30cf06 100644
--- a/include/oox/export/vmlexport.hxx
+++ b/include/oox/export/vmlexport.hxx
@@ -82,6 +82,7 @@ class OOX_DLLPUBLIC VMLExport : public EscherEx
/// Anchoring.
sal_Int16 m_eHOri, m_eVOri, m_eHRel, m_eVRel;
+ bool m_bInline; // css::text::TextContentAnchorType_AS_CHARACTER
/// Parent position.
const Point* m_pNdTopLeft;
@@ -101,11 +102,20 @@ class OOX_DLLPUBLIC VMLExport : public EscherEx
/// Remember style, the most important shape attribute ;-)
OStringBuffer m_ShapeStyle;
+ /// Remember the generated shape id.
+ OString m_sShapeId;
+
/// Remember which shape types we had already written.
std::vector<bool> m_aShapeTypeWritten;
+ /// It seems useless to write out an XML_ID attribute next to XML_id which defines the actual shape id
+ bool m_bSkipwzName;
+
+ /// Use '#' mark for type attribute (check Type Attribute of VML shape in OOXML documentation)
+ bool m_bUseHashMarkForType;
+
public:
- VMLExport( ::sax_fastparser::FSHelperPtr const & pSerializer, VMLTextExport* pTextExport = nullptr );
+ VMLExport( ::sax_fastparser::FSHelperPtr const & pSerializer, VMLTextExport* pTextExport = nullptr);
virtual ~VMLExport() override;
const ::sax_fastparser::FSHelperPtr&
@@ -116,11 +126,15 @@ public:
/// Export the sdr object as VML.
///
/// Call this when you need to export the object as VML.
- void AddSdrObject( const SdrObject& rObj, sal_Int16 eHOri = -1,
+ OString AddSdrObject( const SdrObject& rObj, sal_Int16 eHOri = -1,
sal_Int16 eVOri = -1, sal_Int16 eHRel = -1,
sal_Int16 eVRel = -1, const Point* pNdTopLeft = nullptr, const bool bOOxmlExport = false );
+ OString AddInlineSdrObject( const SdrObject& rObj, const bool bOOxmlExport = false );
virtual void AddSdrObjectVMLObject( const SdrObject& rObj) override;
static bool IsWaterMarkShape(const OUString& rStr);
+
+ void SetSkipwzName() { m_bSkipwzName = true; }
+ void SetHashMarkForType() { m_bUseHashMarkForType = true; }
protected:
/// Add an attribute to the generated <v:shape/> element.
///