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 | 6a0819abebb93f5f42dcb2b4ec5d2b0dfa2d229a (patch) | |
tree | 6fd8898065edf138c92c87781f02bf7b2b73d7a6 /basic | |
parent | 75cca1a1ca1dadc4a1ae38257875f9bfbd3e86be (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
Diffstat (limited to 'basic')
-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 9126de971875..29a83b45b579 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; |