diff options
Diffstat (limited to 'filter/source/xsltdialog/xmlfiltertestdialog.cxx')
-rw-r--r-- | filter/source/xsltdialog/xmlfiltertestdialog.cxx | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/filter/source/xsltdialog/xmlfiltertestdialog.cxx b/filter/source/xsltdialog/xmlfiltertestdialog.cxx index f2f237c31c30..e4a659a3653c 100644 --- a/filter/source/xsltdialog/xmlfiltertestdialog.cxx +++ b/filter/source/xsltdialog/xmlfiltertestdialog.cxx @@ -219,34 +219,34 @@ void XMLFilterTestDialog::updateCurrentDocumentButtonState( Reference< XComponen m_xPBCurrentDocument->set_sensitive( bExport && xCurrentDocument.is() ); m_xFTNameOfCurrentFile->set_sensitive( bExport && xCurrentDocument.is() ); - if( xCurrentDocument.is() ) + if( !xCurrentDocument.is() ) + return; + + OUString aTitle; + Reference< XDocumentPropertiesSupplier > xDPS( xCurrentDocument, UNO_QUERY ); + if( xDPS.is() ) { - OUString aTitle; - Reference< XDocumentPropertiesSupplier > xDPS( xCurrentDocument, UNO_QUERY ); - if( xDPS.is() ) + Reference< XDocumentProperties > xProps( xDPS->getDocumentProperties() ); + if( xProps.is() ) { - Reference< XDocumentProperties > xProps( xDPS->getDocumentProperties() ); - if( xProps.is() ) - { - aTitle = xProps->getTitle(); - } + aTitle = xProps->getTitle(); } + } - if( aTitle.isEmpty() ) + if( aTitle.isEmpty() ) + { + Reference< XStorable > xStorable( xCurrentDocument, UNO_QUERY ); + if( xStorable.is() ) { - Reference< XStorable > xStorable( xCurrentDocument, UNO_QUERY ); - if( xStorable.is() ) + if( xStorable->hasLocation() ) { - if( xStorable->hasLocation() ) - { - OUString aURL( xStorable->getLocation() ); - aTitle = getFileNameFromURL( aURL ); - } + OUString aURL( xStorable->getLocation() ); + aTitle = getFileNameFromURL( aURL ); } } - - m_xFTNameOfCurrentFile->set_label( aTitle ); } + + m_xFTNameOfCurrentFile->set_label( aTitle ); } void XMLFilterTestDialog::initDialog() |