[Libreoffice-commits] core.git: embeddedobj/source

Szymon Kłos szymon.klos at collabora.com
Thu Jul 13 12:13:25 UTC 2017


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

New commits:
commit a307ad7ae029a0a62404996a63954e7026001ce3
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>

diff --git a/embeddedobj/source/msole/olecomponent.cxx b/embeddedobj/source/msole/olecomponent.cxx
index 8c2dd853adfd..26a5d350e6ea 100644
--- a/embeddedobj/source/msole/olecomponent.cxx
+++ b/embeddedobj/source/msole/olecomponent.cxx
@@ -1067,19 +1067,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 2a075c8da812..182d0a459548 100644
--- a/embeddedobj/source/msole/oleembed.cxx
+++ b/embeddedobj/source/msole/oleembed.cxx
@@ -877,6 +877,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