[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.2' - sc/source xmloff/source xmlscript/source

2014-12-03 Thread Andras Timar
 sc/source/filter/excel/xiescher.cxx|3 +--
 xmloff/source/forms/elementexport.cxx  |4 
 xmloff/source/forms/layerimport.cxx|6 ++
 xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx |1 +
 xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx |8 ++--
 5 files changed, 10 insertions(+), 12 deletions(-)

New commits:
commit 62f144ef3b4e9e5d8cd9b624f86ff823380d425b
Author: Andras Timar andras.ti...@collabora.com
Date:   Wed Dec 3 14:11:34 2014 -0800

Revert ODF export: don't write invalid group-name attribute

This reverts commit 53824b05f99ac7c68e6d48b53e2bd98c0fe274c7.

diff --git a/sc/source/filter/excel/xiescher.cxx 
b/sc/source/filter/excel/xiescher.cxx
index 8d86040..a739409 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -2321,8 +2321,7 @@ void XclImpOptionButtonObj::DoProcessControl( 
ScfPropertySet rPropSet ) const
 ScfPropertySet aProps( xCtrlModel );
 OUString sGroupName = OUString::number( 
pLeader-GetDffShapeId() );
 
-// for radio buttons, Name is the group name
-aProps.SetStringProperty( Name, sGroupName );
+aProps.SetStringProperty( GroupName, sGroupName );
 aProps.SetStringProperty( RefValue, OUString::number( 
nRefVal++ ) );
 if ( pLeader-HasCellLink()  !pTbxObj-HasCellLink() )
 {
diff --git a/xmloff/source/forms/elementexport.cxx 
b/xmloff/source/forms/elementexport.cxx
index 3118b19..5d4e635 100644
--- a/xmloff/source/forms/elementexport.cxx
+++ b/xmloff/source/forms/elementexport.cxx
@@ -1158,9 +1158,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] );
@@ -1656,6 +1658,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 39c5b4c..adc7998 100644
--- a/xmloff/source/forms/layerimport.cxx
+++ b/xmloff/source/forms/layerimport.cxx
@@ -78,11 +78,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);
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx 
b/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx
index e71389b..00d575e 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx
@@ -427,6 +427,7 @@ 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 3963e59..47ee825a 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
@@ -1177,9 +1177,7 @@ void TitledBoxElement::endElement()
 ctx.importImageURLProperty( ImageURL ,  image-src , _xAttributes );
 ctx.importImagePositionProperty( ImagePosition, 

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.2' - sc/source xmloff/source xmlscript/source

2014-12-02 Thread Michael Stahl
 sc/source/filter/excel/xiescher.cxx|3 ++-
 xmloff/source/forms/elementexport.cxx  |4 
 xmloff/source/forms/layerimport.cxx|6 --
 xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx |1 -
 xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx |8 ++--
 5 files changed, 12 insertions(+), 10 deletions(-)

New commits:
commit 53824b05f99ac7c68e6d48b53e2bd98c0fe274c7
Author: Michael Stahl mst...@redhat.com
Date:   Mon Aug 18 18:08:37 2014 +0200

ODF export: don't write invalid group-name attribute

Radio buttons are grouped via their form:name attribute already.

Change-Id: I9f8b27a2904d947c3d4665495d36961e3e41d2c6

diff --git a/sc/source/filter/excel/xiescher.cxx 
b/sc/source/filter/excel/xiescher.cxx
index a739409..8d86040 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -2321,7 +2321,8 @@ void XclImpOptionButtonObj::DoProcessControl( 
ScfPropertySet rPropSet ) const
 ScfPropertySet aProps( xCtrlModel );
 OUString sGroupName = OUString::number( 
pLeader-GetDffShapeId() );
 
-aProps.SetStringProperty( GroupName, sGroupName );
+// for radio buttons, Name is the group name
+aProps.SetStringProperty( Name, sGroupName );
 aProps.SetStringProperty( RefValue, OUString::number( 
nRefVal++ ) );
 if ( pLeader-HasCellLink()  !pTbxObj-HasCellLink() )
 {
diff --git a/xmloff/source/forms/elementexport.cxx 
b/xmloff/source/forms/elementexport.cxx
index 5d4e635..3118b19 100644
--- a/xmloff/source/forms/elementexport.cxx
+++ b/xmloff/source/forms/elementexport.cxx
@@ -1158,11 +1158,9 @@ 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] );
@@ -1658,8 +1656,6 @@ 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 adc7998..39c5b4c 100644
--- a/xmloff/source/forms/layerimport.cxx
+++ b/xmloff/source/forms/layerimport.cxx
@@ -78,9 +78,11 @@ 
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);
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx 
b/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx
index 00d575e..e71389b 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx
@@ -427,7 +427,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 47ee825a..3963e59 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
@@ -1177,7 +1177,9 @@ void TitledBoxElement::endElement()
 ctx.importImageURLProperty( ImageURL ,  image-src , _xAttributes );