diff options
author | Szabolcs Dezsi <dezsiszabi@hotmail.com> | 2012-03-15 15:23:17 +0100 |
---|---|---|
committer | Andras Timar <atimar@suse.com> | 2012-03-15 23:10:53 +0100 |
commit | 010560f553ee361ccda4bd14f1ee6b3f18250847 (patch) | |
tree | 137da749000640d8b093930e23d066900d01de0d /sc/source/ui/view/tabvwsh4.cxx | |
parent | 2118ec3630fe12ff2a663c94421780870f264e83 (diff) |
i#84393 Fix title field in header, footer
According to help Title should be the Title property of the document,
not the file name without extension. If that property is missing, we
fall back to file name without extension.
Diffstat (limited to 'sc/source/ui/view/tabvwsh4.cxx')
-rw-r--r-- | sc/source/ui/view/tabvwsh4.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx index cf93d15309bb..35c2c5403fc8 100644 --- a/sc/source/ui/view/tabvwsh4.cxx +++ b/sc/source/ui/view/tabvwsh4.cxx @@ -97,6 +97,8 @@ #include "markdata.hxx" #include "preview.hxx" +#include <com/sun/star/document/XDocumentProperties.hpp> + void ActivateOlk( ScViewData* pViewData ); void DeActivateOlk( ScViewData* pViewData ); @@ -1824,7 +1826,11 @@ void ScTabViewShell::FillFieldData( ScHeaderFieldData& rData ) pDoc->GetName(nTab, aTmp); rData.aTabName = aTmp; - rData.aTitle = pDocShell->GetTitle(); + if( pDocShell->getDocProperties()->getTitle().getLength() != 0 ) + rData.aTitle = pDocShell->getDocProperties()->getTitle(); + else + rData.aTitle = pDocShell->GetTitle(); + const INetURLObject& rURLObj = pDocShell->GetMedium()->GetURLObject(); rData.aLongDocName = rURLObj.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS ); if ( rData.aLongDocName.Len() ) |