summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2017-07-07 19:15:11 +0200
committerAndras Timar <andras.timar@collabora.com>2017-07-14 15:46:20 +0200
commitada8c921794a79ced76b8b8772b779312c9fbe70 (patch)
tree12da683682d02a635e5fbf8addd88c9aa22f2a98
parent0bd7b4ce4aa6ccce673947ab14d151e7f78ec221 (diff)
OLE: show title of parent document in MSO
Change-Id: I5eee6568e0805eb0c609640923a77ebc4244cb12 Reviewed-on: https://gerrit.libreoffice.org/39859 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/39935 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
-rw-r--r--embeddedobj/source/msole/olecomponent.cxx7
-rw-r--r--embeddedobj/source/msole/oleembed.cxx1
2 files changed, 3 insertions, 5 deletions
diff --git a/embeddedobj/source/msole/olecomponent.cxx b/embeddedobj/source/msole/olecomponent.cxx
index dd06e6c0d7c1..d1f81cb3bbf2 100644
--- a/embeddedobj/source/msole/olecomponent.cxx
+++ b/embeddedobj/source/msole/olecomponent.cxx
@@ -1063,19 +1063,16 @@ void OleComponent::ExecuteVerb( sal_Int32 nVerbID )
if ( FAILED( hr ) )
throw io::IOException(); // TODO
-
- // TODO/LATER: the real names should be used here
- m_pNativeImpl->m_pOleObject->SetHostNames( L"app name", L"untitled" );
}
void OleComponent::SetHostName( const OUString&,
- const OUString& )
+ const OUString& aEmbDocName )
{
if ( !m_pNativeImpl->m_pOleObject )
throw embed::WrongStateException(); // TODO: the object is in wrong state
- // TODO: use aContName and aEmbDocName in m_pNativeImpl->m_pOleObject->SetHostNames()
+ m_pNativeImpl->m_pOleObject->SetHostNames( L"app name", reinterpret_cast<const wchar_t*>( aEmbDocName.getStr() ) );
}
diff --git a/embeddedobj/source/msole/oleembed.cxx b/embeddedobj/source/msole/oleembed.cxx
index 47c8bfbbe7e1..b43904fa14d1 100644
--- a/embeddedobj/source/msole/oleembed.cxx
+++ b/embeddedobj/source/msole/oleembed.cxx
@@ -886,6 +886,7 @@ void SAL_CALL OleEmbeddedObject::doVerb( sal_Int32 nVerbID )
m_pOleComponent->ExecuteVerb( nVerbID );
+ m_pOleComponent->SetHostName( OUString(), m_aContainerName );
// ==== the STAMPIT related solution =============================
bool bModifiedOnExecution = m_aVerbExecutionController.EndControlExecution_WasModified();