diff options
author | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2010-11-19 15:11:03 +0100 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2010-11-19 15:11:03 +0100 |
commit | bdb218cb76554a31f551f6c9452defc77ff736f8 (patch) | |
tree | 5b1e65d765dff0371b78392f25f56bf2a62ff2f4 /sfx2 | |
parent | 5946905d1dd19f8ddf1b80b33046a291d35dcab9 (diff) |
dba34b: #i45909# when a title has been set externally, respect this, and do not append the various status information like 'read-only', 'shared', etc.
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/sfxbasemodel.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index ee449d15b419..10333153caa3 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -221,6 +221,7 @@ struct IMPL_SfxBaseModel_DataContainer : public ::sfx2::IModifiableDocument sal_Bool m_bSaving ; sal_Bool m_bSuicide ; sal_Bool m_bInitialized ; + sal_Bool m_bExternalTitle ; sal_Bool m_bModifiedSinceLastSave; uno::Reference< com::sun::star::view::XPrintable> m_xPrintable ; uno::Reference< script::provider::XScriptProvider > m_xScriptProvider; @@ -241,6 +242,7 @@ struct IMPL_SfxBaseModel_DataContainer : public ::sfx2::IModifiableDocument , m_bSaving ( sal_False ) , m_bSuicide ( sal_False ) , m_bInitialized ( sal_False ) + , m_bExternalTitle ( sal_False ) , m_bModifiedSinceLastSave( sal_False ) , m_pStorageModifyListen ( NULL ) , m_xTitleHelper () @@ -3686,7 +3688,7 @@ css::uno::Reference< css::frame::XUntitledNumbers > SfxBaseModel::impl_getUntitl SfxModelGuard aGuard( *this ); ::rtl::OUString aResult = impl_getTitleHelper()->getTitle (); - if ( m_pData->m_pObjectShell ) + if ( !m_pData->m_bExternalTitle && m_pData->m_pObjectShell ) { SfxMedium* pMedium = m_pData->m_pObjectShell->GetMedium(); if ( pMedium ) @@ -3696,7 +3698,7 @@ css::uno::Reference< css::frame::XUntitledNumbers > SfxBaseModel::impl_getUntitl aResult += String( SfxResId(STR_REPAIREDDOCUMENT) ); } - if ( m_pData->m_pObjectShell->IsReadOnlyUI() || (m_pData->m_pObjectShell->GetMedium() && m_pData->m_pObjectShell->GetMedium()->IsReadOnly()) ) + if ( m_pData->m_pObjectShell->IsReadOnlyUI() || (pMedium && pMedium->IsReadOnly()) ) aResult += ::rtl::OUString( String( SfxResId(STR_READONLY) ) ); else if ( m_pData->m_pObjectShell->IsDocShared() ) aResult += ::rtl::OUString( String( SfxResId(STR_SHARED) ) ); @@ -3717,6 +3719,7 @@ void SAL_CALL SfxBaseModel::setTitle( const ::rtl::OUString& sTitle ) SfxModelGuard aGuard( *this ); impl_getTitleHelper()->setTitle (sTitle); + m_pData->m_bExternalTitle = sal_True; } //============================================================================= |