ooo-build r11590 - in trunk: . patches/src680
- From: noelpwer svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r11590 - in trunk: . patches/src680
- Date: Fri, 15 Feb 2008 11:04:08 +0000 (GMT)
Author: noelpwer
Date: Fri Feb 15 11:04:07 2008
New Revision: 11590
URL: http://svn.gnome.org/viewvc/ooo-build?rev=11590&view=rev
Log:
2008-02-15 Noel Power <noel power novell com>
* patches/src680/apply: moved the new patch below into unapplied
VBAUntested section
* patches/src680/radiobutton-group-hack.diff: partial solution for
n#359937
Added:
trunk/patches/src680/radiobutton-group-hack.diff
Modified:
trunk/ChangeLog
trunk/patches/src680/apply
Modified: trunk/patches/src680/apply
==============================================================================
--- trunk/patches/src680/apply (original)
+++ trunk/patches/src680/apply Fri Feb 15 11:04:07 2008
@@ -1465,10 +1465,14 @@
# fix for n#353242. missing APIs
# a set of CommandBar APIs.
vba-commandbar-bundle.diff, n#353242, Jianhua
-
[ VBAUntested ]
SectionOwner => noelpwer
+# start LCL hacks
+vba-stringtodouble.diff, n#359943, noelpwer
vba-stringtodouble.diff, n#359943, noelpwer
+# incomplete solution ( works for import of ocx radio buttons only )
+radiobutton-group-hack.diff, n#359937, jonp
+# end LCL hacks
basic-source-classes-eventatt-cxx.diff, #no-upstream
#ditto
vba-support-stoc-typeprovider-xexactname.diff, #no-upstream
Added: trunk/patches/src680/radiobutton-group-hack.diff
==============================================================================
--- (empty file)
+++ trunk/patches/src680/radiobutton-group-hack.diff Fri Feb 15 11:04:07 2008
@@ -0,0 +1,368 @@
+--- forms/source/component/GroupManager.cxx 2006-09-16 19:51:13.000000000 -0400
++++ forms/source/component/GroupManager.cxx 2008-01-30 19:08:58.000000000 -0500
+@@ -62,6 +62,7 @@
+ #include "property.hrc"
+
+ #include <algorithm>
++#include <stdio.h>
+
+ //.........................................................................
+ namespace frm
+@@ -91,6 +92,21 @@ namespace
+ }
+ return bIs;
+ }
++
++ #define CHAR_POINTER(THE_OUSTRING) ::rtl::OUStringToOString (THE_OUSTRING, RTL_TEXTENCODING_UTF8).pData->buffer
++ void GetGroupName (::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xComponent, ::rtl::OUString& sGroupName)
++ {
++ try // we seem to call ( and worse generate a core from the uncaught exception ) the method for objects that don't support the property
++ {
++ xComponent->getPropertyValue( PROPERTY_GROUP_NAME ) >>= sGroupName;
++ if (sGroupName.getLength() == 0)
++ xComponent->getPropertyValue( PROPERTY_NAME ) >>= sGroupName;
++ rtl::OUString name;
++ xComponent->getPropertyValue( PROPERTY_NAME ) >>= name;
++ OSL_TRACE ("# GetGroupName: Name=%s; sGroupName=%s", CHAR_POINTER(name), CHAR_POINTER(sGroupName));
++ }
++ catch ( Exception& ) {}
++ }
+ }
+
+ //========================================================================
+@@ -155,7 +167,7 @@ OGroupComp::OGroupComp(const Reference<X
+ // 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;
++ GetGroupName (m_xComponent, m_aName);
+ }
+ }
+
+@@ -331,6 +343,9 @@ void OGroupManager::disposing(const Even
+ // -----------------------------------------------------------------------------
+ void OGroupManager::removeFromGroupMap(const ::rtl::OUString& _sGroupName,const Reference<XPropertySet>& _xSet)
+ {
++ rtl::OUString name;
++ _xSet->getPropertyValue (PROPERTY_NAME) >>= name;
++ OSL_TRACE ("# removeFromGroupMap: Name=%s; GroupName=%s; Set=%p", CHAR_POINTER(name), CHAR_POINTER(_sGroupName), (void*) &_xSet);
+ // Component aus CompGroup entfernen
+ m_pCompGroup->RemoveComponent( _xSet );
+
+@@ -362,6 +377,11 @@ void OGroupManager::removeFromGroupMap(c
+
+ // Bei Component als PropertyChangeListener abmelden
+ _xSet->removePropertyChangeListener( PROPERTY_NAME, this );
++ try // we seem to try and get/set listeners for the property even on objects that don't support it ( results in core from uncaught exception )
++ {
++ _xSet->removePropertyChangeListener( PROPERTY_GROUP_NAME, this );
++ }
++ catch( Exception& e ){}
+ if (hasProperty(PROPERTY_TABINDEX, _xSet))
+ _xSet->removePropertyChangeListener( PROPERTY_TABINDEX, this );
+ }
+@@ -369,13 +385,21 @@ 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);
++ rtl::OUString o, n;
++ evt.OldValue >>= o;
++ evt.NewValue >>= n;
++ OSL_TRACE ("# propertyChange: PropertyName=%s; OldValue=%s; NewValue=%s",
++ CHAR_POINTER(evt.PropertyName), CHAR_POINTER(o), CHAR_POINTER(n));
+
+ // Component aus Gruppe entfernen
+ ::rtl::OUString sGroupName;
+- if (evt.PropertyName == PROPERTY_NAME)
++ if (evt.PropertyName == PROPERTY_NAME) {
++ rtl::OUString n;
++ }
++ else if (evt.PropertyName == PROPERTY_GROUP_NAME)
+ evt.OldValue >>= sGroupName;
+ else
+- xSet->getPropertyValue( PROPERTY_NAME ) >>= sGroupName;
++ GetGroupName (xSet, sGroupName);
+
+ removeFromGroupMap(sGroupName,xSet);
+
+@@ -459,7 +483,7 @@ void OGroupManager::InsertElement( const
+
+ // Component in Gruppe aufnehmen
+ ::rtl::OUString sGroupName;
+- xSet->getPropertyValue( PROPERTY_NAME ) >>= sGroupName;
++ GetGroupName (xSet, sGroupName);
+
+ OGroupArr::iterator aFind = m_aGroupArr.find(sGroupName);
+
+@@ -495,8 +519,16 @@ void OGroupManager::InsertElement( const
+ }
+
+
++ rtl::OUString name;
++ xSet->getPropertyValue( PROPERTY_NAME ) >>= name;
++ OSL_TRACE ("# InsertComponent: Name=%s; GroupName=%s; Set=%p", CHAR_POINTER(name), CHAR_POINTER(sGroupName), (void*) &xSet);
+ // Bei Component als PropertyChangeListener anmelden
+ xSet->addPropertyChangeListener( PROPERTY_NAME, this );
++ try // we use this property on objects that dont support it, resulting in cores from uncaught exceptions
++ {
++ xSet->addPropertyChangeListener( PROPERTY_GROUP_NAME, this );
++ }
++ catch( Exception& ){}
+
+ // Tabindex muss nicht jeder unterstuetzen
+ if (hasProperty(PROPERTY_TABINDEX, xSet))
+@@ -514,7 +542,7 @@ void OGroupManager::RemoveElement( const
+
+ // Component aus Gruppe entfernen
+ ::rtl::OUString sGroupName;
+- xSet->getPropertyValue( PROPERTY_NAME ) >>= sGroupName;
++ GetGroupName (xSet, sGroupName);
+
+ removeFromGroupMap(sGroupName,xSet);
+ }
+--- forms/source/component/RadioButton.cxx 2007-03-09 08:31:25.000000000 -0500
++++ forms/source/component/RadioButton.cxx 2008-01-29 19:13:03.000000000 -0500
+@@ -65,6 +65,9 @@
+ #include <com/sun/star/awt/XVclWindowPeer.hpp>
+ #endif
+
++#include <stdio.h>
++ #define CHAR_POINTER(THE_OUSTRING) ::rtl::OUStringToOString (THE_OUSTRING, RTL_TEXTENCODING_UTF8).pData->buffer
++
+ //.........................................................................
+ namespace frm
+ {
+@@ -226,26 +229,59 @@ void ORadioButtonModel::SetSiblingPropsT
+ }
+
+ //------------------------------------------------------------------------------
+-void ORadioButtonModel::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const Any& rValue) throw (Exception)
++void ORadioButtonModel::getFastPropertyValue(Any& rValue, sal_Int32 nHandle) const
+ {
+- OReferenceValueComponent::setFastPropertyValue_NoBroadcast( nHandle, rValue );
++ switch (nHandle)
++ {
++ case PROPERTY_ID_GROUP_NAME:
++ rValue <<= m_sGroupName;
++ break;
++ 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;
++}
+
++void ORadioButtonModel::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const Any& rValue) throw (Exception)
++{
++ ::rtl::OUString s;
++ rValue >>= s;
++ OSL_TRACE ("# setFastPropertyValue_NoBroadcast: nHandle=%i; rValue=%s", nHandle, CHAR_POINTER(s));
++ if (nHandle != PROPERTY_ID_GROUP_NAME)
++ OReferenceValueComponent::setFastPropertyValue_NoBroadcast( nHandle, rValue );
++ switch (nHandle) {
++ case PROPERTY_ID_CONTROLLABEL:
++ SetSiblingPropsTo(PROPERTY_CONTROLLABEL, rValue);
++ break;
+ // wenn sich die ControlSource-Eigenschaft geaendert hat ...
+- if (nHandle == PROPERTY_ID_CONTROLSOURCE)
+- { // ... muss ich allen meinen Siblings, die in der selben RadioButton-Gruppe sind wie ich, auch die
++ case PROPERTY_ID_CONTROLSOURCE:
++ // ... muss ich allen meinen Siblings, die in der selben RadioButton-Gruppe sind wie ich, auch die
+ // neue ControlSource mitgeben
+ SetSiblingPropsTo(PROPERTY_CONTROLSOURCE, rValue);
+- }
+-
++ break;
+ // die andere Richtung : wenn sich mein Name aendert ...
+- if (nHandle == PROPERTY_ID_NAME)
+- {
++ case PROPERTY_ID_GROUP_NAME:
++ rValue >>= m_sGroupName;
++ case PROPERTY_ID_NAME: {
+ // ... 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 +307,7 @@ void ORadioButtonModel::setFastPropertyV
+ // nur Radio-Buttons
+ continue;
+
+- xSiblingProperties->getPropertyValue(PROPERTY_NAME) >>= sName;
++ xSiblingProperties->getPropertyValue(nHandle == PROPERTY_ID_NAME ? PROPERTY_NAME : PROPERTY_GROUP_NAME) >>= sName;
+ // Control, das zur gleichen Gruppe gehoert ?
+ if (rValue == sName)
+ {
+@@ -280,10 +316,9 @@ void ORadioButtonModel::setFastPropertyV
+ }
+ }
+ }
++ break;
+ }
+-
+- if (nHandle == PROPERTY_ID_DEFAULTCHECKED)
+- {
++ case PROPERTY_ID_DEFAULTCHECKED: {
+ sal_Int16 nValue;
+ rValue >>= nValue;
+ if (1 == nValue)
+@@ -294,14 +329,20 @@ void ORadioButtonModel::setFastPropertyV
+ aZero <<= nValue;
+ SetSiblingPropsTo(PROPERTY_DEFAULTCHECKED, aZero);
+ }
++ break;
++ }
++ default:
++ // OReferenceValueComponent::setFastPropertyValue_NoBroadcast( nHandle, rValue );
++ break;
+ }
+ }
+
+ //------------------------------------------------------------------------------
+ void ORadioButtonModel::describeFixedProperties( Sequence< Property >& _rProps ) const
+ {
+- BEGIN_DESCRIBE_PROPERTIES( 1, OReferenceValueComponent )
++ BEGIN_DESCRIBE_PROPERTIES( 2, OReferenceValueComponent )
+ DECL_PROP1(TABINDEX, sal_Int16, BOUND);
++ DECL_PROP1( GROUP_NAME, ::rtl::OUString, BOUND);
+ END_DESCRIBE_PROPERTIES();
+ }
+
+--- forms/source/component/RadioButton.hxx 2007-03-09 08:31:41.000000000 -0500
++++ forms/source/component/RadioButton.hxx 2008-01-25 16:46:16.000000000 -0500
+@@ -49,6 +49,9 @@ namespace frm
+ //==================================================================
+ class ORadioButtonModel :public OReferenceValueComponent
+ {
++protected:
++ ::rtl::OUString m_sGroupName;
++
+ public:
+ DECLARE_DEFAULT_LEAF_XTOR( ORadioButtonModel );
+
+@@ -57,6 +60,10 @@ public:
+ virtual StringSequence SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
+
+ // OPropertySetHelper
++ virtual void SAL_CALL getFastPropertyValue(::com::sun::star::uno::Any& rValue, sal_Int32 nHandle) const;
++ virtual sal_Bool SAL_CALL convertFastPropertyValue(
++ ::com::sun::star::uno::Any& _rConvertedValue, ::com::sun::star::uno::Any& _rOldValue, sal_Int32 _nHandle, const ::com::sun::star::uno::Any& _rValue )
++ throw (::com::sun::star::lang::IllegalArgumentException);
+ virtual void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue )
+ throw (::com::sun::star::uno::Exception);
+
+--- forms/source/inc/frm_strings.hxx 2007-11-01 10:57:09.000000000 -0400
++++ forms/source/inc/frm_strings.hxx 2008-01-24 18:56:37.000000000 -0500
+@@ -109,6 +109,7 @@ namespace frm
+ FORMS_CONSTASCII_STRING( PROPERTY_TABINDEX, "TabIndex" );
+ FORMS_CONSTASCII_STRING( PROPERTY_TAG, "Tag" );
+ FORMS_CONSTASCII_STRING( PROPERTY_NAME, "Name" );
++ FORMS_CONSTASCII_STRING( PROPERTY_GROUP_NAME, "GroupName" );
+ FORMS_CONSTASCII_STRING( PROPERTY_CLASSID, "ClassId" );
+ FORMS_CONSTASCII_STRING( PROPERTY_FETCHSIZE, "FetchSize" );
+ FORMS_CONSTASCII_STRING( PROPERTY_VALUE, "Value" );
+--- forms/source/inc/property.hrc 2006-01-31 13:36:51.000000000 -0500
++++ forms/source/inc/property.hrc 2008-01-24 18:56:43.000000000 -0500
+@@ -65,7 +65,7 @@ namespace frm
+ #define PROPERTY_ID_ALLOWEDITS (PROPERTY_ID_START + 16)
+ #define PROPERTY_ID_ALLOWDELETIONS (PROPERTY_ID_START + 17)
+ #define PROPERTY_ID_NATIVE_LOOK (PROPERTY_ID_START + 18)
+- // free
++#define PROPERTY_ID_GROUP_NAME (PROPERTY_ID_START + 19)
+ // free
+ // free
+ // free
+--- extensions/inc/extensio.hrc 2007-11-27 06:51:34.000000000 -0500
++++ extensions/inc/extensio.hrc 2008-01-27 22:12:29.000000000 -0500
+@@ -162,7 +162,7 @@
+
+ //-----------------------------------------------------------------------
+ // FREE
+- // FREE
++#define HID_PROP_GROUP_NAME (HID_FORMS_START + 1)
+ #define HID_PROP_GROUPBOX (HID_FORMS_START + 2)
+ #define HID_PROP_CONTROLSOURCE (HID_FORMS_START + 3)
+ #define HID_PROP_NAME (HID_FORMS_START + 4)
+Only in ooh680-m3/extensions/inc: extensio.hrc~
+diff -rup -x '*.d*' -x '*.o*' -x 'CVS*' -x '*.mk' -x '*.cmd' -x '*.l*' -x '*.s*' ooo-build/build/ooh680-m3.bk/extensions/source/propctrlr/formmetadata.cxx ooh680-m3/extensions/source/propctrlr/formmetadata.cxx
+--- extensions/source/propctrlr/formmetadata.cxx 2008-01-11 03:23:04.000000000 -0500
++++ extensions/source/propctrlr/formmetadata.cxx 2008-01-27 22:12:41.000000000 -0500
+@@ -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 ),
+ 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 ),
+--- extensions/source/propctrlr/formmetadata.hxx 2007-11-27 06:52:15.000000000 -0500
++++ extensions/source/propctrlr/formmetadata.hxx 2008-01-27 22:09:03.000000000 -0500
+@@ -178,6 +178,7 @@ namespace pcr
+ #define PROPERTY_ID_ALLOWADDITIONS 20
+ #define PROPERTY_ID_ALLOWEDITS 21
+ #define PROPERTY_ID_ALLOWDELETIONS 22
++ #define PROPERTY_ID_GROUP_NAME 23
+ #define PROPERTY_ID_NAVIGATION 24
+ #define PROPERTY_ID_CYCLE 25
+ #define PROPERTY_ID_HIDDEN_VALUE 26
+--- extensions/source/propctrlr/formresid.hrc 2007-11-27 06:52:56.000000000 -0500
++++ extensions/source/propctrlr/formresid.hrc 2008-01-28 14:16:41.000000000 -0500
+@@ -152,7 +152,7 @@
+ #define RID_STR_TAG ( RID_FORMBROWSER_START + 116 )
+ #define RID_STR_HELPTEXT ( RID_FORMBROWSER_START + 117 )
+ #define RID_STR_HELPURL ( RID_FORMBROWSER_START + 118 )
+- // FREE
++#define RID_STR_GROUP_NAME ( RID_FORMBROWSER_START + 119 )
+ #define RID_STR_UNCHECKEDREFVALUE ( RID_FORMBROWSER_START + 120 )
+ #define RID_STR_CURSOR_TYPE ( RID_FORMBROWSER_START + 121 )
+ // FREE
+--- extensions/source/propctrlr/formstrings.hxx 2007-11-27 06:53:16.000000000 -0500
++++ extensions/source/propctrlr/formstrings.hxx 2008-01-27 22:03:53.000000000 -0500
+@@ -57,6 +57,7 @@ namespace pcr
+ PCR_CONSTASCII_STRING( PROPERTY_TABINDEX, "TabIndex");
+ PCR_CONSTASCII_STRING( PROPERTY_TAG, "Tag");
+ PCR_CONSTASCII_STRING( PROPERTY_NAME, "Name");
++ PCR_CONSTASCII_STRING( PROPERTY_GROUP_NAME, "GroupName");
+ PCR_CONSTASCII_STRING( PROPERTY_VALUE, "Value");
+ PCR_CONSTASCII_STRING( PROPERTY_TEXT, "Text");
+ PCR_CONSTASCII_STRING( PROPERTY_NAVIGATION, "NavigationBarMode");
+--- svx/source/msfilter/msocximex.cxx 2007-09-27 14:02:19.000000000 +0100
++++ svx/source/msfilter/msocximex.cxx 2008-02-04 23:56:17.000000000 +0000
+@@ -1758,11 +1758,15 @@ sal_Bool OCX_OptionButton::Import(com::s
+ aTmp <<= lclCreateOUString( pCaption, nCaptionLen );
+ rPropSet->setPropertyValue( WW8_ASCII2STR("Label"), aTmp);
+ }
+-
++
+ // #i40279# always centered vertically
+ aTmp <<= ::com::sun::star::style::VerticalAlignment_MIDDLE;
+ rPropSet->setPropertyValue( WW8_ASCII2STR("VerticalAlign"), aTmp );
+-
++ if ( pGroupName )
++ {
++ aTmp <<= lclCreateOUString( pGroupName, nGroupNameLen );
++ rPropSet->setPropertyValue( WW8_ASCII2STR("GroupName"), aTmp);
++ }
+ aFontData.Import(rPropSet);
+ return sal_True;
+ }
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]