summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2015-02-05 17:26:16 +0100
committerMichael Stahl <mstahl@redhat.com>2015-02-05 16:48:02 +0000
commitaf9890c60f35c7b84df2543690b0b8c39a884bb6 (patch)
treec993983fe76009009947532c4772b873682f863e /xmloff
parente810928cea6535dd2fc187e18adea23e1a158e11 (diff)
Revert "ODF export: don't write invalid "group-name" attribute"
This reverts commit 2d4b87f0c1bfd97185a89c18d5b7680d11a958d6. The reverted commit leads to the following regressions: - Basic dialogs (which were not targeted, but impacted, by the reverted commit) with several RadioButtons sharing a group-name (as they will have a tendency to do) cannot be loaded anymore, since the implementation assumes (and checks) that names are unique. - Even in forms, where a RadioButton had both a form:name and a form:group-name attribute, the form:name attribute wins and thus RadioButtons that has the same group-name but different form:name (as they will tend to do) will not anymore be mutually exclusive, which defeats their point. Additionally, since it did not change the UI parts (property editor window), the user was still presented with two different editable properties "Name" and "Group Name", where "Group Name" was empty... Change-Id: I1bff532a5a7336cf2eb0579bcd4e2d16be6480fe Reviewed-on: https://gerrit.libreoffice.org/14338 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/forms/elementexport.cxx4
-rw-r--r--xmloff/source/forms/layerimport.cxx6
2 files changed, 6 insertions, 4 deletions
diff --git a/xmloff/source/forms/elementexport.cxx b/xmloff/source/forms/elementexport.cxx
index 099a8bf228d1..0d86328d0a13 100644
--- a/xmloff/source/forms/elementexport.cxx
+++ b/xmloff/source/forms/elementexport.cxx
@@ -1159,9 +1159,11 @@ namespace xmloff
{
static const sal_Int32 nStringPropertyAttributeIds[] =
{ // attribute flags
+ SCA_GROUP_NAME
};
static const OUString pStringPropertyNames[] =
{ // property names
+ OUString(PROPERTY_GROUP_NAME)
};
static const sal_Int32 nIdCount = sizeof( nStringPropertyAttributeIds ) / sizeof( nStringPropertyAttributeIds[0] );
@@ -1657,6 +1659,8 @@ namespace xmloff
}
if ( m_xPropertyInfo->hasPropertyByName( PROPERTY_IMAGE_POSITION ) )
m_nIncludeSpecial |= SCA_IMAGE_POSITION;
+ if ( m_xPropertyInfo->hasPropertyByName( PROPERTY_GROUP_NAME ) )
+ m_nIncludeSpecial |= SCA_GROUP_NAME;
m_nIncludeDatabase = DA_DATA_FIELD | DA_INPUT_REQUIRED;
m_nIncludeEvents = EA_CONTROL_EVENTS | EA_ON_CHANGE;
break;
diff --git a/xmloff/source/forms/layerimport.cxx b/xmloff/source/forms/layerimport.cxx
index 125abd40a852..dbab783800e0 100644
--- a/xmloff/source/forms/layerimport.cxx
+++ b/xmloff/source/forms/layerimport.cxx
@@ -76,11 +76,9 @@ OFormLayerXMLImport_Impl::OFormLayerXMLImport_Impl(SvXMLImport& _rImporter)
// string properties which are exported as attributes
m_aAttributeMetaData.addStringProperty(
OAttributeMetaData::getCommonControlAttributeName(CCA_NAME), PROPERTY_NAME);
- // map invalid "group-name" attribute to "name"
- // (since radio buttons are grouped by name)
- m_aAttributeMetaData.addStringProperty(
- OAttributeMetaData::getSpecialAttributeName(SCA_GROUP_NAME), PROPERTY_NAME);
m_aAttributeMetaData.addStringProperty(
+ OAttributeMetaData::getSpecialAttributeName(SCA_GROUP_NAME), PROPERTY_GROUP_NAME);
+ m_aAttributeMetaData.addStringProperty(
OAttributeMetaData::getCommonControlAttributeName(CCA_IMAGE_DATA), PROPERTY_IMAGEURL);
m_aAttributeMetaData.addStringProperty(
OAttributeMetaData::getCommonControlAttributeName(CCA_LABEL), PROPERTY_LABEL);