reportdesign/inc/ReportDefinition.hxx             |    5 +----
 reportdesign/source/core/api/ReportDefinition.cxx |   20 ++++++++------------
 2 files changed, 9 insertions(+), 16 deletions(-)

New commits:
commit de2cf78b7825935507a30f38ae468bfedb2f36cd
Author:     Michael Weghorn <[email protected]>
AuthorDate: Fri May 30 12:08:21 2025 +0200
Commit:     Michael Weghorn <[email protected]>
CommitDate: Fri May 30 15:20:47 2025 +0200

    reportdesign: Don't pass around empty Sequence
    
    `aProps`, used for the `rMediaDesc` param is an empty Sequence
    in all cases, so drop the param and create the empty Sequence
    where it's needed instead of passing it around.
    
    Change-Id: I3c66a11ae5d1902faed39906f696d8bf5ab06eef
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186038
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <[email protected]>

diff --git a/reportdesign/inc/ReportDefinition.hxx 
b/reportdesign/inc/ReportDefinition.hxx
index 01c132289b9f..589f1f641a7d 100644
--- a/reportdesign/inc/ReportDefinition.hxx
+++ b/reportdesign/inc/ReportDefinition.hxx
@@ -135,8 +135,6 @@ namespace reportdesign
             const OUString& rServiceName, /// service name of the component
             /// the argument (XInitialization)
             const css::uno::Sequence< css::uno::Any> & rArguments,
-            /// output descriptor
-            const css::uno::Sequence< css::beans::PropertyValue> & rMediaDesc,
             const css::uno::Reference< css::embed::XStorage >& 
_xStorageToSaveTo);
 
         /// write a single output stream
@@ -145,8 +143,7 @@ namespace reportdesign
             const css::uno::Reference< css::io::XOutputStream> & xOutputStream,
             const css::uno::Reference< css::lang::XComponent> & xComponent,
             const OUString& rServiceName,
-            const css::uno::Sequence< css::uno::Any> & rArguments,
-            const css::uno::Sequence< css::beans::PropertyValue> & rMediaDesc);
+            const css::uno::Sequence< css::uno::Any> & rArguments);
 
         void notifyEvent(const OUString& _sEventName);
         void init();
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx 
b/reportdesign/source/core/api/ReportDefinition.cxx
index 28b8f18d5da2..2c5c3e9d898a 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -1293,9 +1293,6 @@ void SAL_CALL OReportDefinition::storeToStorage( const 
uno::Reference< embed::XS
     bool AutoSaveEvent = false;
     aDescriptor[utl::MediaDescriptor::PROP_AUTOSAVEEVENT] >>= AutoSaveEvent;
 
-    // properties
-    uno::Sequence < beans::PropertyValue > aProps;
-
     // export sub streams for package, else full stream into a file
     uno::Reference< beans::XPropertySet> 
xProp(_xStorageToSaveTo,uno::UNO_QUERY);
     if ( xProp.is() )
@@ -1347,19 +1344,19 @@ void SAL_CALL OReportDefinition::storeToStorage( const 
uno::Reference< embed::XS
     // write to content.xml (keeping logic of commit 
94ccba3eebc83b58e74e18f0e028c6a995ce6aa6)
     xInfoSet->setPropertyValue(u"StreamName"_ustr, 
uno::Any(u"settings.xml"_ustr));
     WriteThroughComponent(xCom, u"settings.xml"_ustr, 
u"com.sun.star.comp.report.XMLSettingsExporter"_ustr,
-                          aDelegatorArguments, aProps, _xStorageToSaveTo);
+                          aDelegatorArguments, _xStorageToSaveTo);
 
     xInfoSet->setPropertyValue(u"StreamName"_ustr, uno::Any(u"meta.xml"_ustr));
     WriteThroughComponent(xCom, u"meta.xml"_ustr, 
u"com.sun.star.comp.report.XMLMetaExporter"_ustr,
-                          aDelegatorArguments, aProps, _xStorageToSaveTo);
+                          aDelegatorArguments, _xStorageToSaveTo);
 
     xInfoSet->setPropertyValue(u"StreamName"_ustr, 
uno::Any(u"styles.xml"_ustr));
     WriteThroughComponent(xCom, u"styles.xml"_ustr, 
u"com.sun.star.comp.report.XMLStylesExporter"_ustr,
-                          aDelegatorArguments, aProps, _xStorageToSaveTo);
+                          aDelegatorArguments, _xStorageToSaveTo);
 
     xInfoSet->setPropertyValue(u"StreamName"_ustr, 
uno::Any(u"content.xml"_ustr));
     bool bOk = WriteThroughComponent(xCom, u"content.xml"_ustr, 
u"com.sun.star.comp.report.ExportFilter"_ustr,
-                                     aDelegatorArguments, aProps, 
_xStorageToSaveTo);
+                                     aDelegatorArguments, _xStorageToSaveTo);
 
     uno::Any aImage;
     uno::Reference< embed::XVisualObject > 
xCurrentController(getCurrentController(),uno::UNO_QUERY);
@@ -1451,7 +1448,6 @@ bool OReportDefinition::WriteThroughComponent(
     const OUString& rStreamName,
     const OUString& rServiceName,
     const uno::Sequence<uno::Any> & rArguments,
-    const uno::Sequence<beans::PropertyValue> & rMediaDesc,
     const uno::Reference<embed::XStorage>& _xStorageToSaveTo)
 {
     // open stream
@@ -1484,7 +1480,7 @@ bool OReportDefinition::WriteThroughComponent(
     // write the stuff
     bool bRet = WriteThroughComponent(
         xOutputStream, xComponent,
-        rServiceName, rArguments, rMediaDesc);
+        rServiceName, rArguments);
     // finally, commit stream.
     return bRet;
 }
@@ -1493,8 +1489,7 @@ bool OReportDefinition::WriteThroughComponent(
     const uno::Reference<io::XOutputStream> & xOutputStream,
     const uno::Reference<lang::XComponent> & xComponent,
     const OUString& rServiceName,
-    const uno::Sequence<uno::Any> & rArguments,
-    const uno::Sequence<beans::PropertyValue> & rMediaDesc)
+    const uno::Sequence<uno::Any> & rArguments)
 {
     OSL_ENSURE( xOutputStream.is(), "I really need an output stream!" );
     OSL_ENSURE( xComponent.is(), "Need component!" );
@@ -1525,8 +1520,9 @@ bool OReportDefinition::WriteThroughComponent(
     xExporter->setSourceDocument( xComponent );
 
     // filter!
+    uno::Sequence<beans::PropertyValue> aMediaDesc;
     uno::Reference<document::XFilter> xFilter( xExporter, uno::UNO_QUERY );
-    return xFilter->filter( rMediaDesc );
+    return xFilter->filter(aMediaDesc);
 }
 
 // XLoadable

Reply via email to