[Libreoffice-commits] .: Branch 'libreoffice-3-6' - toolkit/source
Noel Power
noelp at kemper.freedesktop.org
Fri Jul 6 03:15:38 PDT 2012
toolkit/source/controls/dialogcontrol.cxx | 13 +++++++++++++
1 file changed, 13 insertions(+)
New commits:
commit eae1d5d9664bb6ab9fedcf573bdfe6640b22fe4d
Author: Noel Power <noel.power at novell.com>
Date: Fri Jul 6 11:11:55 2012 +0100
fix dialog editor crasher fdo#51269
missing clone of AllDialogChildren property was the culprit here.
Change-Id: I6c5ee105003967429d5bf79639ae75fb7d90562a
diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx
index 41633b5..51c0510 100644
--- a/toolkit/source/controls/dialogcontrol.cxx
+++ b/toolkit/source/controls/dialogcontrol.cxx
@@ -186,6 +186,19 @@ UnoControlDialogModel::UnoControlDialogModel( const Reference< XMultiServiceFact
UnoControlDialogModel::UnoControlDialogModel( const UnoControlDialogModel& rModel )
: ControlModelContainerBase( rModel )
{
+ // need to clone BASEPROPERTY_USERFORMCONTAINEES too
+ Reference< XNameContainer > xSrcNameCont( const_cast< UnoControlDialogModel& >(rModel).getPropertyValue( GetPropertyName( BASEPROPERTY_USERFORMCONTAINEES ) ), UNO_QUERY );
+ Reference<XNameContainer > xNameCont( new SimpleNamedThingContainer< XControlModel >() );
+
+ uno::Sequence< rtl::OUString > sNames = xSrcNameCont->getElementNames();
+ rtl::OUString* pName = sNames.getArray();
+ rtl::OUString* pNamesEnd = pName + sNames.getLength();
+ for ( ; pName != pNamesEnd; ++pName )
+ {
+ if ( xSrcNameCont->hasByName( *pName ) )
+ xNameCont->insertByName( *pName, xSrcNameCont->getByName( *pName ) );
+ }
+ setFastPropertyValue_NoBroadcast( BASEPROPERTY_USERFORMCONTAINEES, makeAny( xNameCont ) );
}
UnoControlDialogModel::~UnoControlDialogModel()
More information about the Libreoffice-commits
mailing list