reportdesign/source/core/api/ReportDefinition.cxx |    6 ++++++
 xmloff/source/draw/ximpshap.cxx                   |    3 +++
 2 files changed, 9 insertions(+)

New commits:
commit 1bdd38f6a86cebfa9d40e0a0136c1a9066c90661
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Mon Oct 16 12:31:50 2023 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Mon Oct 16 17:15:49 2023 +0200

    Resolves: tdf#157726 missing chart from Base report
    
    since:
    
    commit c9b5c627ccb5b70c103c559b1df38c1175efc2d1
    Author: Caolán McNamara <caolan.mcnam...@collabora.com>
    Date:   Wed Sep 6 10:05:23 2023 +0100
    
        add referer to ole objects
    
    Change-Id: I9ef18bf0d734dd900bdbcac475ca15af7b15456e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158027
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/reportdesign/source/core/api/ReportDefinition.cxx 
b/reportdesign/source/core/api/ReportDefinition.cxx
index c9a9f7f2f4cb..9c9a44991842 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -2009,6 +2009,12 @@ uno::Reference< uno::XInterface > SAL_CALL 
OReportDefinition::createInstanceWith
         m_pImpl->m_pObjectContainer->SwitchPersistence(xStorage);
         xRet = cppu::getXWeak(SvXMLEmbeddedObjectHelper::Create( 
xStorage,*this, SvXMLEmbeddedObjectHelperMode::Read ).get());
     }
+    else if (aServiceSpecifier == "com.sun.star.drawing.OLE2Shape")
+    {
+        uno::Reference<drawing::XShape> 
xShape(SvxUnoDrawMSFactory::createInstanceWithArguments(aServiceSpecifier, 
_aArgs), uno::UNO_QUERY_THROW);
+        xRet = m_pImpl->m_pReportModel->createShape(aServiceSpecifier, xShape);
+    }
+
     return xRet;
 }
 
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index 24475522f1e5..4de4bd28edb8 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -505,6 +505,9 @@ void SdXMLShapeContext::AddShape(OUString const & 
serviceName)
                  || serviceName == "com.sun.star.drawing.PluginShape"
                  || serviceName == "com.sun.star.presentation.MediaShape")
         {
+            // On adding another entry to this list of service names to pass 
an argument via the WithArguments variant
+            // you may need to adjust the more obscure 
OReportDefinition::createInstanceWithArguments as well as the
+            // more obvious SvxUnoDrawMSFactory::createInstanceWithArguments
             xShape.set( xServiceFact->createInstanceWithArguments(serviceName, 
{ css::uno::Any(GetImport().GetDocumentBase()) }),
                         css::uno::UNO_QUERY);
         }

Reply via email to