Embedded documents: show title in menu entries
Change-Id: I478d81798e6f1e2d96e570cb6788a438c6a0be62 Reviewed-on: https://gerrit.libreoffice.org/40079 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
This commit is contained in:
parent
c932e26138
commit
00b506ff03
@ -973,8 +973,11 @@ bool DocumentHolder::LoadDocToFrame( bool bInPlace )
|
||||
{
|
||||
LanguageTag aLocale( Application::GetSettings().GetUILanguageTag() );
|
||||
ResMgr* pResMgr = ResMgr::SearchCreateResMgr( "sfx", aLocale );
|
||||
OUString nTitle = ResId( STR_EMBEDDED_TITLE, *pResMgr );
|
||||
xModelTitle->setTitle( m_pEmbedObj->getContainerName() + nTitle );
|
||||
OUString sEmbedded = ResId( STR_EMBEDDED_TITLE, *pResMgr );
|
||||
xModelTitle->setTitle( m_pEmbedObj->getContainerName() + sEmbedded);
|
||||
m_aContainerName = m_pEmbedObj->getContainerName();
|
||||
// TODO: get real m_aDocumentNamePart
|
||||
m_aDocumentNamePart = sEmbedded;
|
||||
}
|
||||
|
||||
if ( bInPlace )
|
||||
|
@ -155,7 +155,7 @@ Interceptor::addStatusListener(
|
||||
aStateEvent.FeatureDescriptor = "Close and Return";
|
||||
aStateEvent.IsEnabled = true;
|
||||
aStateEvent.Requery = false;
|
||||
aStateEvent.State <<= ( "($2) " + m_pDocHolder->GetTitle() );
|
||||
aStateEvent.State <<= ( "($2)" + m_pDocHolder->GetContainerName() );
|
||||
Control->statusChanged(aStateEvent);
|
||||
|
||||
|
||||
|
@ -128,7 +128,12 @@ public:
|
||||
|
||||
OUString GetTitle() const
|
||||
{
|
||||
return m_aContainerName + " - " + m_aDocumentNamePart;
|
||||
return m_aContainerName + ( m_aDocumentNamePart.isEmpty() ? OUString() : ( " - " + m_aDocumentNamePart ) );
|
||||
}
|
||||
|
||||
OUString GetContainerName() const
|
||||
{
|
||||
return m_aContainerName;
|
||||
}
|
||||
|
||||
void SetOutplaceFrameProperties( const css::uno::Sequence< css::uno::Any >& aProps )
|
||||
|
Loading…
x
Reference in New Issue
Block a user