From 2d4b87f0c1bfd97185a89c18d5b7680d11a958d6 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Mon, 18 Aug 2014 18:08:37 +0200 Subject: ODF export: don't write invalid "group-name" attribute Radio buttons are grouped via their "form:name" attribute already. Change-Id: I9f8b27a2904d947c3d4665495d36961e3e41d2c6 --- xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx | 1 - xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx | 8 ++++++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'xmlscript') diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx index 844a44522273..db43d540f5aa 100644 --- a/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx +++ b/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx @@ -419,7 +419,6 @@ void ElementDescriptor::readRadioButtonModel( StyleBag * all_styles ) readImageURLAttr( "ImageURL", XMLNS_DIALOGS_PREFIX ":image-src" ); readImagePositionAttr( "ImagePosition", XMLNS_DIALOGS_PREFIX ":image-position" ); readBoolAttr( "MultiLine", XMLNS_DIALOGS_PREFIX ":multiline" ); - readStringAttr( "GroupName", XMLNS_DIALOGS_PREFIX ":group-name" ); sal_Int16 nState = 0; if (readProp( "State" ) >>= nState) diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx index cabfb297d687..af40e4d51d65 100644 --- a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx +++ b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx @@ -1174,7 +1174,9 @@ void TitledBoxElement::endElement() ctx.importImageURLProperty( "ImageURL" , "image-src" , _xAttributes ); ctx.importImagePositionProperty( "ImagePosition", "image-position", xAttributes ); ctx.importBooleanProperty( "MultiLine", "multiline", xAttributes ); - ctx.importStringProperty( "GroupName", "group-name", xAttributes ); + // map invalid "group-name" attribute to "name" + // (since radio buttons are grouped by name) + ctx.importStringProperty( "Name", "group-name", xAttributes ); sal_Int16 nVal = 0; sal_Bool bChecked = sal_False; @@ -1269,7 +1271,9 @@ void RadioGroupElement::endElement() ctx.importImageURLProperty( "ImageURL" , "image-src" , xAttributes ); ctx.importImagePositionProperty( "ImagePosition", "image-position", xAttributes ); ctx.importBooleanProperty( "MultiLine", "multiline", xAttributes ); - ctx.importStringProperty( "GroupName", "group-name", xAttributes ); + // map invalid "group-name" attribute to "name" + // (since radio buttons are grouped by name) + ctx.importStringProperty( "Name", "group-name", xAttributes ); sal_Int16 nVal = 0; sal_Bool bChecked = sal_False; if (getBoolAttr( &bChecked, "checked", xAttributes, _pImport->XMLNS_DIALOGS_UID ) && bChecked) -- cgit