diff options
author | Rüdiger Timm <rt@openoffice.org> | 2008-07-11 06:57:36 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2008-07-11 06:57:36 +0000 |
commit | 39a5753bc241dacbb8074967f822db0eabdb507a (patch) | |
tree | 94a2548064efc510982c46de7b547429c46ce8dd /comphelper | |
parent | a18044453e3f3f963b0f3921a77142b15815cb9c (diff) |
INTEGRATION: CWS tkr14 (1.5.24); FILE MERGED
2008/06/20 06:25:46 tkr 1.5.24.2: #i88104# move XTitle check to the end of the methode
2008/06/05 09:57:36 tkr 1.5.24.1: #i88104# use of XTitle to get the title
Diffstat (limited to 'comphelper')
-rw-r--r-- | comphelper/source/misc/documentinfo.cxx | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/comphelper/source/misc/documentinfo.cxx b/comphelper/source/misc/documentinfo.cxx index 0abe292bb4c4..4104f0888758 100644 --- a/comphelper/source/misc/documentinfo.cxx +++ b/comphelper/source/misc/documentinfo.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: documentinfo.cxx,v $ - * $Revision: 1.6 $ + * $Revision: 1.7 $ * * This file is part of OpenOffice.org. * @@ -60,6 +60,7 @@ namespace comphelper { using ::com::sun::star::uno::Exception; using ::com::sun::star::uno::RuntimeException; using ::com::sun::star::frame::XModel; + using ::com::sun::star::frame::XTitle; using ::com::sun::star::frame::XController; using ::com::sun::star::beans::XPropertySet; using ::com::sun::star::document::XDocumentPropertiesSupplier; @@ -161,6 +162,19 @@ namespace comphelper { nLastSepPos = sDocURL.lastIndexOf( '/' ); } sTitle = sDocURL.copy( nLastSepPos + 1 ); + + if ( sTitle.getLength() != 0 ) + return sTitle; + + // 5. + // <-- #i88104# (05-16-08) TKR: use the new XTitle Interface to get the Title --> + + Reference< XTitle > xTitle( _rxDocument, UNO_QUERY ); + if ( xTitle.is() ) + { + if ( xTitle->getTitle().getLength() != 0 ) + return xTitle->getTitle(); + } } catch ( const Exception& ) { |