diff options
author | Kurt Zenker <kz@openoffice.org> | 2007-06-20 09:39:15 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2007-06-20 09:39:15 +0000 |
commit | 3daf70800a9c355537b58c8de026335824c2913f (patch) | |
tree | 523c0de72705f3110ce63272d2a1321a3853f602 /basctl | |
parent | 2a36f2e687db998f9ffbaee37034933b46ab0a9b (diff) |
INTEGRATION: CWS jl61 (1.47.16); FILE MERGED
2007/06/14 12:24:04 ab 1.47.16.2: #i76438# Live mode without decoration with parent dialog
2007/05/11 06:41:46 ab 1.47.16.1: #i77021# Support for decoration property
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/source/dlged/dlged.cxx | 53 |
1 files changed, 45 insertions, 8 deletions
diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx index a6ad957875ec..20d7648e5b93 100644 --- a/basctl/source/dlged/dlged.cxx +++ b/basctl/source/dlged/dlged.cxx @@ -4,9 +4,9 @@ * * $RCSfile: dlged.cxx,v $ * - * $Revision: 1.47 $ + * $Revision: 1.48 $ * - * last change: $Author: obo $ $Date: 2007-03-15 16:00:06 $ + * last change: $Author: kz $ $Date: 2007-06-20 10:39:15 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -164,6 +164,10 @@ using ::rtl::OUString; static ::rtl::OUString aResourceResolverPropName = ::rtl::OUString::createFromAscii( "ResourceResolver" ); +static ::rtl::OUString aDecorationPropName = + ::rtl::OUString::createFromAscii( "Decoration" ); +static ::rtl::OUString aTitlePropName = + ::rtl::OUString::createFromAscii( "Title" ); //============================================================================ @@ -212,17 +216,35 @@ void DlgEditor::ShowDialog() uno::Reference< beans::XPropertySet > xSrcDlgModPropSet( m_xUnoControlDialogModel, uno::UNO_QUERY ); uno::Reference< beans::XPropertySet > xNewDlgModPropSet( xDlgMod, uno::UNO_QUERY ); - if( xSrcDlgModPropSet.is() && xNewDlgModPropSet.is() ) + if( xNewDlgModPropSet.is() ) { - try + if( xSrcDlgModPropSet.is() ) { - Any aResourceResolver = xSrcDlgModPropSet->getPropertyValue( aResourceResolverPropName ); - xNewDlgModPropSet->setPropertyValue( aResourceResolverPropName, aResourceResolver ); + try + { + Any aResourceResolver = xSrcDlgModPropSet->getPropertyValue( aResourceResolverPropName ); + xNewDlgModPropSet->setPropertyValue( aResourceResolverPropName, aResourceResolver ); + } + catch( UnknownPropertyException& ) + { + DBG_ERROR( "DlgEditor::ShowDialog(): No ResourceResolver property" ); + } } - catch( UnknownPropertyException& ) + + // Disable decoration + bool bDecoration = true; + try { - DBG_ERROR( "DlgEditor::ShowDialog(): No ResourceResolver property" ); + Any aDecorationAny = xSrcDlgModPropSet->getPropertyValue( aDecorationPropName ); + aDecorationAny >>= bDecoration; + if( !bDecoration ) + { + xNewDlgModPropSet->setPropertyValue( aDecorationPropName, makeAny( true ) ); + xNewDlgModPropSet->setPropertyValue( aTitlePropName, makeAny( ::rtl::OUString() ) ); + } } + catch( UnknownPropertyException& ) + {} } // set the model @@ -534,6 +556,21 @@ void DlgEditor::SetDialog( uno::Reference< container::XNameContainer > xUnoContr pDlgEdModel->SetChanged( FALSE ); } +void DlgEditor::ResetDialog( void ) +{ + DlgEdForm* pOldDlgEdForm = pDlgEdForm; + DlgEdPage* pPage = (DlgEdPage*)pDlgEdModel->GetPage(0); + SdrPageView* pPgView = pDlgEdView->GetSdrPageView(); + BOOL bWasMarked = pDlgEdView->IsObjMarked( pOldDlgEdForm ); + pDlgEdView->UnmarkAll(); + pPage->Clear(); + pPage->SetDlgEdForm( NULL ); + SetDialog( m_xUnoControlDialogModel ); + if( bWasMarked ) + pDlgEdView->MarkObj( pDlgEdForm, pPgView, FALSE ); +} + + //---------------------------------------------------------------------------- Reference< util::XNumberFormatsSupplier > const & DlgEditor::GetNumberFormatsSupplier() |