Kaydet (Commit) ff26f022 authored tarafından Michael Stahl's avatar Michael Stahl

xmlscript: fix import/export of dialog radio-buttons

The BASIC dialog format is not specified by ODF anyway, so the change
was particularly stupid.

(regression from 2d4b87f0)

Change-Id: I5b20d690093b0d2b898f3e45cc0292fb72fbb353
üst dafcf023
...@@ -419,6 +419,7 @@ void ElementDescriptor::readRadioButtonModel( StyleBag * all_styles ) ...@@ -419,6 +419,7 @@ void ElementDescriptor::readRadioButtonModel( StyleBag * all_styles )
readImageURLAttr( "ImageURL", XMLNS_DIALOGS_PREFIX ":image-src" ); readImageURLAttr( "ImageURL", XMLNS_DIALOGS_PREFIX ":image-src" );
readImagePositionAttr( "ImagePosition", XMLNS_DIALOGS_PREFIX ":image-position" ); readImagePositionAttr( "ImagePosition", XMLNS_DIALOGS_PREFIX ":image-position" );
readBoolAttr( "MultiLine", XMLNS_DIALOGS_PREFIX ":multiline" ); readBoolAttr( "MultiLine", XMLNS_DIALOGS_PREFIX ":multiline" );
readStringAttr( "GroupName", XMLNS_DIALOGS_PREFIX ":group-name" );
sal_Int16 nState = 0; sal_Int16 nState = 0;
if (readProp( "State" ) >>= nState) if (readProp( "State" ) >>= nState)
......
...@@ -1178,9 +1178,7 @@ void TitledBoxElement::endElement() ...@@ -1178,9 +1178,7 @@ void TitledBoxElement::endElement()
ctx.importImageURLProperty( "ImageURL" , "image-src" , _xAttributes ); ctx.importImageURLProperty( "ImageURL" , "image-src" , _xAttributes );
ctx.importImagePositionProperty( "ImagePosition", "image-position", xAttributes ); ctx.importImagePositionProperty( "ImagePosition", "image-position", xAttributes );
ctx.importBooleanProperty( "MultiLine", "multiline", xAttributes ); ctx.importBooleanProperty( "MultiLine", "multiline", xAttributes );
// map invalid "group-name" attribute to "name" ctx.importStringProperty( "GroupName", "group-name", xAttributes );
// (since radio buttons are grouped by name)
ctx.importStringProperty( "Name", "group-name", xAttributes );
sal_Int16 nVal = 0; sal_Int16 nVal = 0;
sal_Bool bChecked = sal_False; sal_Bool bChecked = sal_False;
...@@ -1275,9 +1273,7 @@ void RadioGroupElement::endElement() ...@@ -1275,9 +1273,7 @@ void RadioGroupElement::endElement()
ctx.importImageURLProperty( "ImageURL" , "image-src" , xAttributes ); ctx.importImageURLProperty( "ImageURL" , "image-src" , xAttributes );
ctx.importImagePositionProperty( "ImagePosition", "image-position", xAttributes ); ctx.importImagePositionProperty( "ImagePosition", "image-position", xAttributes );
ctx.importBooleanProperty( "MultiLine", "multiline", xAttributes ); ctx.importBooleanProperty( "MultiLine", "multiline", xAttributes );
// map invalid "group-name" attribute to "name" ctx.importStringProperty( "GroupName", "group-name", xAttributes );
// (since radio buttons are grouped by name)
ctx.importStringProperty( "Name", "group-name", xAttributes );
sal_Int16 nVal = 0; sal_Int16 nVal = 0;
sal_Bool bChecked = sal_False; sal_Bool bChecked = sal_False;
if (getBoolAttr( &bChecked, "checked", xAttributes, _pImport->XMLNS_DIALOGS_UID ) && bChecked) if (getBoolAttr( &bChecked, "checked", xAttributes, _pImport->XMLNS_DIALOGS_UID ) && bChecked)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment