ooo-build r12111 - in trunk: . patches/src680
- From: jonp svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r12111 - in trunk: . patches/src680
- Date: Sat, 5 Apr 2008 15:22:28 +0100 (BST)
Author: jonp
Date: Sat Apr 5 15:22:27 2008
New Revision: 12111
URL: http://svn.gnome.org/viewvc/ooo-build?rev=12111&view=rev
Log:
* patches/src680/forms-radio-button-groupnames.diff: Cleanup in accordance
with Frank's suggestions; add "native" ODF support so that the group-name
is stored as a //form:radio/@form:group-name attribute instead of as a
//form:radio/form:properties/form:property[ form:property-name="GroupName"]
element.
Modified:
trunk/ChangeLog
trunk/patches/src680/forms-radio-button-group-names.diff
Modified: trunk/patches/src680/forms-radio-button-group-names.diff
==============================================================================
--- trunk/patches/src680/forms-radio-button-group-names.diff (original)
+++ trunk/patches/src680/forms-radio-button-group-names.diff Sat Apr 5 15:22:27 2008
@@ -35,15 +35,15 @@
retrieving revision 1.47.18.1
diff -u -p -r1.47.18.1 formmetadata.cxx
--- extensions/source/propctrlr/formmetadata.cxx 11 Jan 2008 08:23:04 -0000 1.47.18.1
-+++ extensions/source/propctrlr/formmetadata.cxx 29 Mar 2008 19:39:04 -0000
-@@ -154,6 +154,7 @@ namespace pcr
- DEF_INFO_?( propname and id, resoure id, help id, flags ),
- */
- DEF_INFO_3( NAME, NAME, NAME, FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
-+ DEF_INFO_3( GROUP_NAME, GROUP_NAME, GROUP_NAME, FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
++++ extensions/source/propctrlr/formmetadata.cxx 5 Apr 2008 11:15:13 -0000
+@@ -157,6 +157,7 @@ namespace pcr
DEF_INFO_2( TITLE, TITLE, TITLE, FORM_VISIBLE, DIALOG_VISIBLE ),
DEF_INFO_3( LABEL, LABEL, LABEL, FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
DEF_INFO_2( CONTROLLABEL, LABELCONTROL, CONTROLLABEL, FORM_VISIBLE, COMPOSEABLE ),
++ DEF_INFO_2( GROUP_NAME, GROUP_NAME, GROUP_NAME, FORM_VISIBLE, COMPOSEABLE ),
+ DEF_INFO_2( TEXT, TEXT, TEXT, DIALOG_VISIBLE, COMPOSEABLE ),
+ DEF_INFO_3( MAXTEXTLEN, MAXTEXTLEN, MAXTEXTLEN, FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
+ DEF_INFO_3( EDITMASK, EDITMASK, EDITMASK, FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ),
Index: extensions/source/propctrlr/formstrings.hxx
===================================================================
RCS file: /cvs/util/extensions/source/propctrlr/formstrings.hxx,v
@@ -88,24 +88,36 @@
};
+String RID_STR_GROUP_NAME
+{
-+ Text [ en-US ] = "Group Name" ;
++ Text [ en-US ] = "Group name" ;
+};
String RID_STR_TABINDEX
{
Text [ en-US ] = "Tab order" ;
+Index: extensions/util/hidother.src
+===================================================================
+RCS file: /cvs/util/extensions/util/hidother.src,v
+retrieving revision 1.20
+diff -u -p -r1.20 hidother.src
+--- extensions/util/hidother.src 27 Nov 2007 11:53:36 -0000 1.20
++++ extensions/util/hidother.src 5 Apr 2008 11:15:14 -0000
+@@ -311,3 +311,4 @@ hidspecial HID_CHECK_FOR_UPD_STATUS
+ hidspecial HID_CHECK_FOR_UPD_DESCRIPTION { HelpId = HID_CHECK_FOR_UPD_DESCRIPTION; }
+ hidspecial HID_CHECK_FOR_UPD_CANCEL { HelpId = HID_CHECK_FOR_UPD_CANCEL; }
+ hidspecial HID_PROP_NOLABEL { HelpId = HID_PROP_NOLABEL; }
++hidspecial HID_PROP_GROUP_NAME { HelpId = HID_PROP_GROUP_NAME; }
Index: forms/source/component/GroupManager.hxx
===================================================================
RCS file: /cvs/gsl/forms/source/component/GroupManager.hxx,v
retrieving revision 1.11
diff -u -p -r1.11 GroupManager.hxx
--- forms/source/component/GroupManager.hxx 12 Oct 2006 11:12:12 -0000 1.11
-+++ forms/source/component/GroupManager.hxx 29 Mar 2008 19:39:05 -0000
++++ forms/source/component/GroupManager.hxx 5 Apr 2008 11:21:51 -0000
@@ -248,6 +248,8 @@ public:
void getGroup(sal_Int32 nGroup, ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel> >& _rGroup, ::rtl::OUString& Name);
void getGroupByName(const ::rtl::OUString& Name, ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel> >& _rGroup);
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel> > getControlModels();
+
-+ static void GetGroupName( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xComponent, ::rtl::OUString& sGroupName );
++ static ::rtl::OUString GetGroupName( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xComponent );
};
@@ -115,27 +127,34 @@
retrieving revision 1.17
diff -u -p -r1.17 GroupManager.cxx
--- forms/source/component/GroupManager.cxx 16 Sep 2006 23:51:13 -0000 1.17
-+++ forms/source/component/GroupManager.cxx 29 Mar 2008 19:39:05 -0000
-@@ -155,7 +155,7 @@ OGroupComp::OGroupComp(const Reference<X
++++ forms/source/component/GroupManager.cxx 5 Apr 2008 11:27:06 -0000
+@@ -148,14 +148,13 @@ OGroupComp::OGroupComp(const Reference<X
+ ,m_xControlModel(rxSet,UNO_QUERY)
+ ,m_nPos( nInsertPos )
+ ,m_nTabIndex(0)
++ ,m_aName( OGroupManager::GetGroupName( rxSet ) )
+ {
+ if (m_xComponent.is())
+ {
+ if (hasProperty( PROPERTY_TABINDEX, m_xComponent ) )
// Indices kleiner 0 werden wie 0 behandelt
m_nTabIndex = Max(getINT16(m_xComponent->getPropertyValue( PROPERTY_TABINDEX )) , sal_Int16(0));
-
+-
- m_xComponent->getPropertyValue( PROPERTY_NAME ) >>= m_aName;
-+ OGroupManager::GetGroupName (m_xComponent, m_aName);
}
}
-@@ -342,7 +342,8 @@ void OGroupManager::removeFromGroupMap(c
+@@ -342,7 +341,8 @@ void OGroupManager::removeFromGroupMap(c
aFind->second.RemoveComponent( _xSet );
// Wenn Anzahl der Gruppenelemente == 1 ist, Gruppe deaktivieren
- if ( aFind->second.Count() == 1 )
-+ int nCount = aFind->second.Count();
++ sal_Int32 nCount = aFind->second.Count();
+ if ( nCount == 1 || nCount == 0 )
{
OActiveGroups::iterator aActiveFind = ::std::find(
m_aActiveGroupMap.begin(),
-@@ -353,7 +354,7 @@ void OGroupManager::removeFromGroupMap(c
+@@ -353,7 +353,7 @@ void OGroupManager::removeFromGroupMap(c
{
// the group is active. Deactivate it if the remaining component
// is *no* radio button
@@ -144,7 +163,7 @@
m_aActiveGroupMap.erase( aActiveFind );
}
}
-@@ -362,6 +363,8 @@ void OGroupManager::removeFromGroupMap(c
+@@ -362,6 +362,8 @@ void OGroupManager::removeFromGroupMap(c
// Bei Component als PropertyChangeListener abmelden
_xSet->removePropertyChangeListener( PROPERTY_NAME, this );
@@ -153,11 +172,8 @@
if (hasProperty(PROPERTY_TABINDEX, _xSet))
_xSet->removePropertyChangeListener( PROPERTY_TABINDEX, this );
}
-@@ -369,13 +372,25 @@ void OGroupManager::removeFromGroupMap(c
- void SAL_CALL OGroupManager::propertyChange(const PropertyChangeEvent& evt) throw ( ::com::sun::star::uno::RuntimeException)
- {
- Reference<XPropertySet> xSet(evt.Source, UNO_QUERY);
--
+@@ -372,10 +374,23 @@ void SAL_CALL OGroupManager::propertyCha
+
// Component aus Gruppe entfernen
::rtl::OUString sGroupName;
- if (evt.PropertyName == PROPERTY_NAME)
@@ -178,20 +194,21 @@
+ }
else
- xSet->getPropertyValue( PROPERTY_NAME ) >>= sGroupName;
-+ GetGroupName (xSet, sGroupName);
++ sGroupName = GetGroupName( xSet );
removeFromGroupMap(sGroupName,xSet);
-@@ -459,7 +474,7 @@ void OGroupManager::InsertElement( const
+@@ -458,8 +473,7 @@ void OGroupManager::InsertElement( const
+ m_pCompGroup->InsertComponent( xSet );
// Component in Gruppe aufnehmen
- ::rtl::OUString sGroupName;
+- ::rtl::OUString sGroupName;
- xSet->getPropertyValue( PROPERTY_NAME ) >>= sGroupName;
-+ GetGroupName (xSet, sGroupName);
++ ::rtl::OUString sGroupName( GetGroupName( xSet ) );
OGroupArr::iterator aFind = m_aGroupArr.find(sGroupName);
-@@ -497,6 +512,8 @@ void OGroupManager::InsertElement( const
+@@ -497,6 +511,8 @@ void OGroupManager::InsertElement( const
// Bei Component als PropertyChangeListener anmelden
xSet->addPropertyChangeListener( PROPERTY_NAME, this );
@@ -200,18 +217,22 @@
// Tabindex muss nicht jeder unterstuetzen
if (hasProperty(PROPERTY_TABINDEX, xSet))
-@@ -514,11 +531,22 @@ void OGroupManager::RemoveElement( const
+@@ -513,12 +529,26 @@ void OGroupManager::RemoveElement( const
+ return;
// Component aus Gruppe entfernen
- ::rtl::OUString sGroupName;
+- ::rtl::OUString sGroupName;
- xSet->getPropertyValue( PROPERTY_NAME ) >>= sGroupName;
-+ GetGroupName (xSet, sGroupName);
++ ::rtl::OUString sGroupName( GetGroupName( xSet ) );
removeFromGroupMap(sGroupName,xSet);
}
-+void OGroupManager::GetGroupName (::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xComponent, ::rtl::OUString& sGroupName)
++::rtl::OUString OGroupManager::GetGroupName( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xComponent )
+{
++ if (!xComponent.is())
++ return ::rtl::OUString();
++ ::rtl::OUString sGroupName;
+ if (hasProperty( PROPERTY_GROUP_NAME, xComponent )) {
+ xComponent->getPropertyValue( PROPERTY_GROUP_NAME ) >>= sGroupName;
+ if (sGroupName.getLength() == 0)
@@ -219,6 +240,7 @@
+ }
+ else
+ xComponent->getPropertyValue( PROPERTY_NAME ) >>= sGroupName;
++ return sGroupName;
+}
+
//.........................................................................
@@ -258,7 +280,7 @@
retrieving revision 1.21
diff -u -p -r1.21 RadioButton.cxx
--- forms/source/component/RadioButton.cxx 9 Mar 2007 13:31:25 -0000 1.21
-+++ forms/source/component/RadioButton.cxx 29 Mar 2008 19:39:05 -0000
++++ forms/source/component/RadioButton.cxx 5 Apr 2008 11:27:06 -0000
@@ -39,6 +39,9 @@
#ifndef _FORMS_RADIOBUTTON_HXX_
#include "RadioButton.hxx"
@@ -293,18 +315,18 @@
- ::rtl::OUString sCurrentName;
- for (sal_Int32 i=0; i<xIndexAccess->getCount(); ++i)
+ ::rtl::OUString sCurrentGroup;
-+ int nNumSiblings = xIndexAccess->getCount();
++ sal_Int32 nNumSiblings = xIndexAccess->getCount();
+ for (sal_Int32 i=0; i<nNumSiblings; ++i)
{
Reference<XPropertySet> xSiblingProperties(*(InterfaceRef*)xIndexAccess->getByIndex(i).getValue(), UNO_QUERY);
if (!xSiblingProperties.is())
-@@ -218,34 +223,64 @@ void ORadioButtonModel::SetSiblingPropsT
+@@ -218,34 +223,65 @@ void ORadioButtonModel::SetSiblingPropsT
continue;
// das 'zur selben Gruppe gehoeren' wird am Namen festgemacht
- xSiblingProperties->getPropertyValue(PROPERTY_NAME) >>= sCurrentName;
- if (sCurrentName == sMyName)
-+ OGroupManager::GetGroupName( xSiblingProperties, sCurrentGroup );
++ sCurrentGroup = OGroupManager::GetGroupName( xSiblingProperties );
+ if (sCurrentGroup == sMyGroup)
xSiblingProperties->setPropertyValue(rPropName, rValue);
}
@@ -316,6 +338,11 @@
+void ORadioButtonModel::getFastPropertyValue(Any& rValue, sal_Int32 nHandle) const
{
- OReferenceValueComponent::setFastPropertyValue_NoBroadcast( nHandle, rValue );
+-
+- // if the label control changed ...
+- if (nHandle == PROPERTY_ID_CONTROLLABEL)
+- { // ... forward this to our siblings
+- SetSiblingPropsTo(PROPERTY_CONTROLLABEL, rValue);
+ switch (nHandle)
+ {
+ case PROPERTY_ID_GROUP_NAME:
@@ -324,37 +351,34 @@
+ default:
+ OReferenceValueComponent::getFastPropertyValue(rValue, nHandle);
+ break;
-+ }
+ }
+}
-
-- // if the label control changed ...
-- if (nHandle == PROPERTY_ID_CONTROLLABEL)
-- { // ... forward this to our siblings
-- SetSiblingPropsTo(PROPERTY_CONTROLLABEL, rValue);
++
+sal_Bool ORadioButtonModel::convertFastPropertyValue(
+ Any& _rConvertedValue, Any& _rOldValue,
+ sal_Int32 _nHandle,
+ const Any& _rValue)
+ throw (com::sun::star::lang::IllegalArgumentException)
+{
-+ sal_Bool bModified(sal_False);
-+ switch (_nHandle)
-+ {
-+ case PROPERTY_ID_GROUP_NAME:
-+ bModified = tryPropertyValue(_rConvertedValue, _rOldValue, _rValue, m_sGroupName);
-+ break;
-+ default:
-+ bModified = OReferenceValueComponent::convertFastPropertyValue(_rConvertedValue, _rOldValue, _nHandle, _rValue);
-+ break;
- }
-+ return bModified;
++ sal_Bool bModified(sal_False);
++ switch (_nHandle)
++ {
++ case PROPERTY_ID_GROUP_NAME:
++ bModified = tryPropertyValue(_rConvertedValue, _rOldValue, _rValue, m_sGroupName);
++ break;
++ default:
++ bModified = OReferenceValueComponent::convertFastPropertyValue(_rConvertedValue, _rOldValue, _nHandle, _rValue);
++ break;
++ }
++ return bModified;
+}
+void ORadioButtonModel::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const Any& rValue) throw (Exception)
+{
+ if (nHandle != PROPERTY_ID_GROUP_NAME)
+ OReferenceValueComponent::setFastPropertyValue_NoBroadcast( nHandle, rValue );
-+ switch (nHandle) {
++ switch (nHandle)
++ {
+ case PROPERTY_ID_CONTROLLABEL:
+ SetSiblingPropsTo(PROPERTY_CONTROLLABEL, rValue);
+ break;
@@ -377,7 +401,7 @@
// ... muss ich testen, ob ich Siblings mit dem selben Namen habe, damit ich deren ControlSource uebernehmen kann
Reference<XIndexAccess> xIndexAccess(getParent(), UNO_QUERY);
if (xIndexAccess.is())
-@@ -271,7 +306,7 @@ void ORadioButtonModel::setFastPropertyV
+@@ -271,7 +307,7 @@ void ORadioButtonModel::setFastPropertyV
// nur Radio-Buttons
continue;
@@ -386,7 +410,7 @@
// Control, das zur gleichen Gruppe gehoert ?
if (rValue == sName)
{
-@@ -280,10 +315,9 @@ void ORadioButtonModel::setFastPropertyV
+@@ -280,10 +316,9 @@ void ORadioButtonModel::setFastPropertyV
}
}
}
@@ -399,7 +423,7 @@
sal_Int16 nValue;
rValue >>= nValue;
if (1 == nValue)
-@@ -294,14 +328,20 @@ void ORadioButtonModel::setFastPropertyV
+@@ -294,14 +329,20 @@ void ORadioButtonModel::setFastPropertyV
aZero <<= nValue;
SetSiblingPropsTo(PROPERTY_DEFAULTCHECKED, aZero);
}
@@ -452,6 +476,107 @@
// free
// free
// free
+Index: xmloff/source/forms/formattributes.hxx
+===================================================================
+RCS file: /cvs/xml/xmloff/source/forms/formattributes.hxx,v
+retrieving revision 1.13
+diff -u -p -r1.13 formattributes.hxx
+--- xmloff/source/forms/formattributes.hxx 9 Sep 2005 14:08:11 -0000 1.13
++++ xmloff/source/forms/formattributes.hxx 5 Apr 2008 11:32:23 -0000
+@@ -137,6 +137,7 @@ namespace xmloff
+ #define SCA_MAX_VALUE 0x00000002
+ #define SCA_MIN_VALUE 0x00000004
+ #define SCA_VALIDATION 0x00000008
++ #define SCA_GROUP_NAME 0x00000010
+ #define SCA_MULTI_LINE 0x00000020
+ #define SCA_AUTOMATIC_COMPLETION 0x00000080
+ #define SCA_MULTIPLE 0x00000100
+Index: xmloff/source/forms/formattributes.cxx
+===================================================================
+RCS file: /cvs/xml/xmloff/source/forms/formattributes.cxx,v
+retrieving revision 1.20
+diff -u -p -r1.20 formattributes.cxx
+--- xmloff/source/forms/formattributes.cxx 27 Jun 2007 15:14:38 -0000 1.20
++++ xmloff/source/forms/formattributes.cxx 5 Apr 2008 11:32:23 -0000
+@@ -207,6 +207,7 @@ namespace xmloff
+ case SCA_MAX_VALUE: return "max-value";
+ case SCA_MIN_VALUE: return "min-value";
+ case SCA_VALIDATION: return "validation";
++ case SCA_GROUP_NAME: return "group-name";
+ case SCA_MULTI_LINE: return "multi-line";
+ case SCA_AUTOMATIC_COMPLETION: return "auto-complete";
+ case SCA_MULTIPLE: return "multiple";
+Index: xmloff/source/forms/strings.hxx
+===================================================================
+RCS file: /cvs/xml/xmloff/source/forms/strings.hxx,v
+retrieving revision 1.17
+diff -u -p -r1.17 strings.hxx
+--- xmloff/source/forms/strings.hxx 9 Sep 2005 14:16:39 -0000 1.17
++++ xmloff/source/forms/strings.hxx 5 Apr 2008 11:32:23 -0000
+@@ -213,6 +213,7 @@ namespace xmloff
+ XMLFORM_CONSTASCII_STRING( PROPERTY_VISUAL_EFFECT, "VisualEffect");
+ XMLFORM_CONSTASCII_STRING( PROPERTY_IMAGE_POSITION, "ImagePosition");
+ XMLFORM_CONSTASCII_STRING( PROPERTY_IMAGE_ALIGN, "ImageAlign");
++ XMLFORM_CONSTASCII_STRING( PROPERTY_GROUP_NAME, "GroupName");
+
+ XMLFORM_CONSTASCII_STRING( PROPERTY_BOUND_CELL, "BoundCell");
+ XMLFORM_CONSTASCII_STRING( PROPERTY_LIST_CELL_RANGE, "CellRange");
+Index: xmloff/source/forms/elementexport.cxx
+===================================================================
+RCS file: /cvs/xml/xmloff/source/forms/elementexport.cxx,v
+retrieving revision 1.46.108.1
+diff -u -p -r1.46.108.1 elementexport.cxx
+--- xmloff/source/forms/elementexport.cxx 18 Jan 2008 15:10:42 -0000 1.46.108.1
++++ xmloff/source/forms/elementexport.cxx 5 Apr 2008 11:32:23 -0000
+@@ -1194,6 +1194,39 @@ namespace xmloff
+ }
+
+ // ----------------------------------
++ // the string properties
++ {
++ static sal_Int32 nStringPropertyAttributeIds[] =
++ { // attribute flags
++ SCA_GROUP_NAME
++ };
++ static const ::rtl::OUString* pStringPropertyNames[] =
++ { // property names
++ &PROPERTY_GROUP_NAME
++ };
++
++ sal_Int32 nIdCount = sizeof( nStringPropertyAttributeIds ) / sizeof( nStringPropertyAttributeIds[0] );
++ #if OSL_DEBUG_LEVEL > 0
++ sal_Int32 nNameCount = sizeof( pStringPropertyNames ) / sizeof( pStringPropertyNames[0] );
++ OSL_ENSURE( ( nIdCount == nNameCount ),
++ "OControlExport::exportSpecialAttributes: somebody tampered with the maps (2)!" );
++ #endif
++ for ( i = 0; i < nIdCount; ++i )
++ if ( nStringPropertyAttributeIds[i] & m_nIncludeSpecial )
++ {
++ exportStringPropertyAttribute(
++ OAttributeMetaData::getSpecialAttributeNamespace( nStringPropertyAttributeIds[i] ),
++ OAttributeMetaData::getSpecialAttributeName( nStringPropertyAttributeIds[i] ),
++ *( pStringPropertyNames[i] )
++ );
++ #if OSL_DEBUG_LEVEL > 0
++ // reset the bit for later checking
++ m_nIncludeSpecial = m_nIncludeSpecial & ~nStringPropertyAttributeIds[i];
++ #endif
++ }
++ }
++
++ // ----------------------------------
+ if ((SCA_MIN_VALUE | SCA_MAX_VALUE) & m_nIncludeSpecial)
+ {
+ // need to export the min value and the max value as attributes
+@@ -1653,6 +1686,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;
+ m_nIncludeEvents = EA_CONTROL_EVENTS | EA_ON_CHANGE;
+ break;
Index: svx/source/msfilter/msocximex.cxx
===================================================================
RCS file: /cvs/graphics/svx/source/msfilter/msocximex.cxx,v
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]