diff options
Diffstat (limited to 'embeddedobj/source/general/docholder.cxx')
-rw-r--r-- | embeddedobj/source/general/docholder.cxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/embeddedobj/source/general/docholder.cxx b/embeddedobj/source/general/docholder.cxx index 1bef54e7741f..60ac61682ae1 100644 --- a/embeddedobj/source/general/docholder.cxx +++ b/embeddedobj/source/general/docholder.cxx @@ -19,6 +19,7 @@ #include <com/sun/star/embed/Aspects.hpp> #include <com/sun/star/frame/TaskCreator.hpp> +#include <com/sun/star/frame/XTitle.hpp> #include <com/sun/star/frame/TerminationVetoException.hpp> #include <com/sun/star/frame/XComponentLoader.hpp> #include <com/sun/star/frame/XSynchronousFrameLoader.hpp> @@ -65,6 +66,9 @@ #include <rtl/process.h> #include <vcl/svapp.hxx> #include <svtools/embedhlp.hxx> +#include <tools/resmgr.hxx> +#include <vcl/settings.hxx> +#include <sfx2/sfx.hrc> #include <comphelper/processfactory.hxx> #include <comphelper/namedvaluecollection.hxx> @@ -962,6 +966,17 @@ bool DocumentHolder::LoadDocToFrame( bool bInPlace ) ::comphelper::NamedValueCollection aArgs; aArgs.put( "Model", m_xComponent ); aArgs.put( "ReadOnly", m_bReadOnly ); + + // set document title to show in the title bar + css::uno::Reference< css::frame::XTitle > xModelTitle( xDoc, css::uno::UNO_QUERY ); + if( xModelTitle.is() ) + { + LanguageTag aLocale( Application::GetSettings().GetUILanguageTag() ); + ResMgr* pResMgr = ResMgr::SearchCreateResMgr( "sfx", aLocale ); + OUString nTitle = ResId( STR_EMBEDDED_TITLE, *pResMgr ); + xModelTitle->setTitle( m_pEmbedObj->getContainerName() + nTitle ); + } + if ( bInPlace ) aArgs.put( "PluginMode", sal_Int16(1) ); OUString sUrl; |