diff options
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/source/basicide/baside3.cxx | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx index 0409e4c5cae5..ece79057fc58 100644 --- a/basctl/source/basicide/baside3.cxx +++ b/basctl/source/basicide/baside3.cxx @@ -880,22 +880,17 @@ bool implImportDialog(weld::Window* pWin, const OUString& rCurPath, const Script OUString aXmlDlgName; Reference< beans::XPropertySet > xDialogModelPropSet( xDialogModel, UNO_QUERY ); - if( xDialogModelPropSet.is() ) + assert(xDialogModelPropSet.is()); + try { - try - { - Any aXmlDialogNameAny = xDialogModelPropSet->getPropertyValue( DLGED_PROP_NAME ); - OUString aOUXmlDialogName; - aXmlDialogNameAny >>= aOUXmlDialogName; - aXmlDlgName = aOUXmlDialogName; - } - catch(const beans::UnknownPropertyException& ) - {} + Any aXmlDialogNameAny = xDialogModelPropSet->getPropertyValue( DLGED_PROP_NAME ); + aXmlDialogNameAny >>= aXmlDlgName; + } + catch(const beans::UnknownPropertyException& ) + { + TOOLS_WARN_EXCEPTION("basctl", ""); } - bool bValidName = !aXmlDlgName.isEmpty(); - OSL_ASSERT( bValidName ); - if( !bValidName ) - return bDone; + assert( !aXmlDlgName.isEmpty() ); bool bDialogAlreadyExists = rDocument.hasDialog( aLibName, aXmlDlgName ); @@ -934,11 +929,7 @@ bool implImportDialog(weld::Window* pWin, const OUString& rCurPath, const Script } Shell* pShell = GetShell(); - if (!pShell) - { - OSL_ASSERT(pShell); - return bDone; - } + assert(pShell); // Resource? css::lang::Locale aLocale = Application::GetSettings().GetUILanguageTag().getLocale(); |