[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - embeddedobj/source

Szymon Kłos szymon.klos at collabora.com
Fri Jul 14 13:46:54 UTC 2017


 embeddedobj/source/msole/olecomponent.cxx |    7 ++-----
 embeddedobj/source/msole/oleembed.cxx     |    1 +
 2 files changed, 3 insertions(+), 5 deletions(-)

New commits:
commit ada8c921794a79ced76b8b8772b779312c9fbe70
Author: Szymon Kłos <szymon.klos at collabora.com>
Date:   Fri Jul 7 19:15:11 2017 +0200

    OLE: show title of parent document in MSO
    
    Change-Id: I5eee6568e0805eb0c609640923a77ebc4244cb12
    Reviewed-on: https://gerrit.libreoffice.org/39859
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/39935
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    Tested-by: Andras Timar <andras.timar at collabora.com>

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();


More information about the Libreoffice-commits mailing list