diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2008-01-28 12:59:47 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2008-01-28 12:59:47 +0000 |
commit | 4eaeeaf1d4c4111ee93d9f2e506716506fbd0098 (patch) | |
tree | 793a8fbe9a0beba5c58261743335ab14e4204f23 | |
parent | a20652cc876eb1a86ac6c7697c8be0c4cefbe032 (diff) |
INTEGRATION: CWS ab42 (1.30.24); FILE MERGED
2008/01/09 14:07:34 ab 1.30.24.1: #i83963# Force title bar for dialogs
-rw-r--r-- | basic/source/classes/eventatt.cxx | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/basic/source/classes/eventatt.cxx b/basic/source/classes/eventatt.cxx index a9d9197a98..e51225c386 100644 --- a/basic/source/classes/eventatt.cxx +++ b/basic/source/classes/eventatt.cxx @@ -4,9 +4,9 @@ * * $RCSfile: eventatt.cxx,v $ * - * $Revision: 1.30 $ + * $Revision: 1.31 $ * - * last change: $Author: vg $ $Date: 2007-10-15 13:03:12 $ + * last change: $Author: vg $ $Date: 2008-01-28 13:59:47 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -783,6 +783,11 @@ Any implFindDialogLibForDialog( const Any& rDlgAny, SbxObject* pBasic ) return aRetDlgLibAny; } +static ::rtl::OUString aDecorationPropName = + ::rtl::OUString::createFromAscii( "Decoration" ); +static ::rtl::OUString aTitlePropName = + ::rtl::OUString::createFromAscii( "Title" ); + void RTL_Impl_CreateUnoDialog( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ) { static OUString aResourceResolverPropName = OUString::createFromAscii( "ResourceResolver" ); @@ -839,6 +844,25 @@ void RTL_Impl_CreateUnoDialog( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ) Reference< XInputStream > xInput( xISP->createInputStream() ); xmlscript::importDialogModel( xInput, xDialogModel, xContext ); + // i83963 Force decoration + uno::Reference< beans::XPropertySet > xDlgModPropSet( xDialogModel, uno::UNO_QUERY ); + if( xDlgModPropSet.is() ) + { + bool bDecoration = true; + try + { + Any aDecorationAny = xDlgModPropSet->getPropertyValue( aDecorationPropName ); + aDecorationAny >>= bDecoration; + if( !bDecoration ) + { + xDlgModPropSet->setPropertyValue( aDecorationPropName, makeAny( true ) ); + xDlgModPropSet->setPropertyValue( aTitlePropName, makeAny( ::rtl::OUString() ) ); + } + } + catch( UnknownPropertyException& ) + {} + } + // Find dialog library for dialog, direct access is not possible here StarBASIC* pStartedBasic = pINST->GetBasic(); SbxObject* pParentBasic = pStartedBasic ? pStartedBasic->GetParent() : NULL; |