summaryrefslogtreecommitdiff
path: root/scripting
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2008-01-28 12:57:53 +0000
committerVladimir Glazounov <vg@openoffice.org>2008-01-28 12:57:53 +0000
commitfb6d12c44286de9fd25a9f4b0dd3d687f8d753a6 (patch)
tree9e429762cee8364e485d9e668689a884c43faf2e /scripting
parent6033824d63bef751f37b54d8d290706db91c318f (diff)
INTEGRATION: CWS ab42 (1.12.4); FILE MERGED
2008/01/09 13:50:34 ab 1.12.4.1: #i83963# Force title bar for dialogs
Diffstat (limited to 'scripting')
-rw-r--r--scripting/source/dlgprov/dlgprov.cxx33
1 files changed, 30 insertions, 3 deletions
diff --git a/scripting/source/dlgprov/dlgprov.cxx b/scripting/source/dlgprov/dlgprov.cxx
index 2a5764797d0c..c5f2c0f34b9a 100644
--- a/scripting/source/dlgprov/dlgprov.cxx
+++ b/scripting/source/dlgprov/dlgprov.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: dlgprov.cxx,v $
*
- * $Revision: 1.12 $
+ * $Revision: 1.13 $
*
- * last change: $Author: ihi $ $Date: 2007-11-26 16:28:43 $
+ * last change: $Author: vg $ $Date: 2008-01-28 13:57:53 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -684,6 +684,11 @@ namespace dlgprov
// XDialogProvider
// -----------------------------------------------------------------------------
+ static ::rtl::OUString aDecorationPropName =
+ ::rtl::OUString::createFromAscii( "Decoration" );
+ static ::rtl::OUString aTitlePropName =
+ ::rtl::OUString::createFromAscii( "Title" );
+
Reference < XControl > DialogProviderImpl::createDialogImpl(
const ::rtl::OUString& URL, const Reference< XInterface >& xHandler,
const Reference< XWindowPeer >& xParent, bool bDialogProviderMode )
@@ -702,6 +707,28 @@ namespace dlgprov
Reference< XControlModel > xCtrlMod( createDialogModel( URL ) );
if ( xCtrlMod.is() )
{
+ // i83963 Force decoration
+ if( bDialogProviderMode )
+ {
+ uno::Reference< beans::XPropertySet > xDlgModPropSet( xCtrlMod, 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& )
+ {}
+ }
+ }
+
xCtrl = Reference< XControl >( createDialogControl( xCtrlMod, xParent ) );
if ( xCtrl.is() )
{
@@ -752,7 +779,7 @@ namespace dlgprov
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DialogProviderImpl::createContainerWindow: Invalid xParent!" ) ),
Reference< XInterface >(), 1 );
}
- Reference < XControl > xControl = DialogProviderImpl::createDialogImpl( URL, xHandler, xParent, true );
+ Reference < XControl > xControl = DialogProviderImpl::createDialogImpl( URL, xHandler, xParent, false );
Reference< XWindow> xWindow( xControl, UNO_QUERY );
return xWindow;
}