Kaydet (Commit) 00b506ff authored tarafından Szymon Kłos's avatar Szymon Kłos

Embedded documents: show title in menu entries

Change-Id: I478d81798e6f1e2d96e570cb6788a438c6a0be62
Reviewed-on: https://gerrit.libreoffice.org/40079Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarSzymon Kłos <szymon.klos@collabora.com>
üst c932e261
...@@ -973,8 +973,11 @@ bool DocumentHolder::LoadDocToFrame( bool bInPlace ) ...@@ -973,8 +973,11 @@ bool DocumentHolder::LoadDocToFrame( bool bInPlace )
{ {
LanguageTag aLocale( Application::GetSettings().GetUILanguageTag() ); LanguageTag aLocale( Application::GetSettings().GetUILanguageTag() );
ResMgr* pResMgr = ResMgr::SearchCreateResMgr( "sfx", aLocale ); ResMgr* pResMgr = ResMgr::SearchCreateResMgr( "sfx", aLocale );
OUString nTitle = ResId( STR_EMBEDDED_TITLE, *pResMgr ); OUString sEmbedded = ResId( STR_EMBEDDED_TITLE, *pResMgr );
xModelTitle->setTitle( m_pEmbedObj->getContainerName() + nTitle ); xModelTitle->setTitle( m_pEmbedObj->getContainerName() + sEmbedded);
m_aContainerName = m_pEmbedObj->getContainerName();
// TODO: get real m_aDocumentNamePart
m_aDocumentNamePart = sEmbedded;
} }
if ( bInPlace ) if ( bInPlace )
......
...@@ -155,7 +155,7 @@ Interceptor::addStatusListener( ...@@ -155,7 +155,7 @@ Interceptor::addStatusListener(
aStateEvent.FeatureDescriptor = "Close and Return"; aStateEvent.FeatureDescriptor = "Close and Return";
aStateEvent.IsEnabled = true; aStateEvent.IsEnabled = true;
aStateEvent.Requery = false; aStateEvent.Requery = false;
aStateEvent.State <<= ( "($2) " + m_pDocHolder->GetTitle() ); aStateEvent.State <<= ( "($2)" + m_pDocHolder->GetContainerName() );
Control->statusChanged(aStateEvent); Control->statusChanged(aStateEvent);
......
...@@ -128,7 +128,12 @@ public: ...@@ -128,7 +128,12 @@ public:
OUString GetTitle() const 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 ) void SetOutplaceFrameProperties( const css::uno::Sequence< css::uno::Any >& aProps )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment