summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2017-08-26 16:10:51 +0200
committerTamás Zolnai <tamas.zolnai@collabora.com>2017-08-26 18:31:45 +0200
commite463c96092e108a8fad3b9a91b693457f3c26545 (patch)
treea63cdaa424aefe561716ee3ea8a0cb469d0a0c45 /oox
parent1ab6d39146b6ff0a633ae0821e2db5705d3ad6c3 (diff)
tdf#111980: DOCX: Handle ActiveX radio button group
Change-Id: I3372b3b69623bda5c6e8587215e8fb7056fdf0a7 Reviewed-on: https://gerrit.libreoffice.org/41586 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/ole/axcontrol.cxx11
-rw-r--r--oox/source/token/properties.txt1
2 files changed, 11 insertions, 1 deletions
diff --git a/oox/source/ole/axcontrol.cxx b/oox/source/ole/axcontrol.cxx
index a59beb631475..8e2b87634ce4 100644
--- a/oox/source/ole/axcontrol.cxx
+++ b/oox/source/ole/axcontrol.cxx
@@ -1540,7 +1540,7 @@ void AxMorphDataModelBase::exportBinaryModel( BinaryOutputStream& rOutStrm )
aWriter.skipProperty(); // accelerator
aWriter.skipProperty(); // undefined
aWriter.writeBoolProperty(true); // must be 1 for morph
- if ( ( mnDisplayStyle == AX_DISPLAYSTYLE_CHECKBOX ) || ( mnDisplayStyle == AX_DISPLAYSTYLE_OPTBUTTON ) )
+ if ( mnDisplayStyle == AX_DISPLAYSTYLE_OPTBUTTON )
aWriter.writeStringProperty( maGroupName );
else
aWriter.skipProperty(); //maGroupName
@@ -1552,9 +1552,18 @@ void AxMorphDataModelBase::convertProperties( PropertyMap& rPropMap, const Contr
{
rPropMap.setProperty( PROP_Enabled, getFlag( mnFlags, AX_FLAGS_ENABLED ) );
rConv.convertColor( rPropMap, PROP_TextColor, mnTextColor );
+ if ( mnDisplayStyle == AX_DISPLAYSTYLE_OPTBUTTON )
+ rPropMap.setProperty( PROP_GroupName, maGroupName );
AxFontDataModel::convertProperties( rPropMap, rConv );
}
+void AxMorphDataModelBase::convertFromProperties( PropertySet& rPropSet, const ControlConverter& rConv )
+{
+ if ( mnDisplayStyle == AX_DISPLAYSTYLE_OPTBUTTON )
+ rPropSet.getProperty( maGroupName, PROP_GroupName );
+ AxFontDataModel::convertFromProperties( rPropSet, rConv );
+}
+
AxToggleButtonModel::AxToggleButtonModel()
{
mnDisplayStyle = AX_DISPLAYSTYLE_TOGGLE;
diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt
index b32924c2be9b..e6bc79ff3d08 100644
--- a/oox/source/token/properties.txt
+++ b/oox/source/token/properties.txt
@@ -208,6 +208,7 @@ GraphicSize
GraphicURL
GridColor
GroupInfo
+GroupName
HScroll
Handles
HasAutoShowInfo