desktop/source/app/dispatchwatcher.cxx |    7 ++++---
 desktop/source/app/dispatchwatcher.hxx |    2 +-
 2 files changed, 5 insertions(+), 4 deletions(-)

New commits:
commit 29b434ffe60d143a826485b099b748724a4b2769
Author:     Justin Luth <justin.l...@collabora.com>
AuthorDate: Fri May 3 09:01:42 2024 -0400
Commit:     Nagy Tibor <tibor.nagy.ext...@allotropia.de>
CommitDate: Wed Sep 11 14:29:54 2024 +0200

    NFC dispatchwatcher.hxx: rename aPrinterName to aParam
    
    It is rather confusing to have a generic parameter variable
    named aPrinterName.
    
    I'm going to use that in my patch, so first clean it up separately.
    
    Change-Id: I3e73eeddbc506d369ba5d6e2b569d30eef78bfb6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167059
    Tested-by: Jenkins
    Reviewed-by: Justin Luth <jl...@mail.com>
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>
    (cherry picked from commit ddc4cd3d0cf9e8bde440df3e92e98a2a2017c797)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173167
    Tested-by: allotropia jenkins <jenk...@allotropia.de>
    Reviewed-by: Nagy Tibor <tibor.nagy.ext...@allotropia.de>

diff --git a/desktop/source/app/dispatchwatcher.cxx 
b/desktop/source/app/dispatchwatcher.cxx
index 863d246951e9..41184ca37b82 100644
--- a/desktop/source/app/dispatchwatcher.cxx
+++ b/desktop/source/app/dispatchwatcher.cxx
@@ -566,7 +566,7 @@ bool DispatchWatcher::executeDispatchRequests( const 
std::vector<DispatchRequest
 // FIXME: factor out into a method ...
                         Reference< XStorable > xStorable( xDoc, UNO_QUERY );
                         if ( xStorable.is() ) {
-                            OUString aParam = aDispatchRequest.aPrinterName;
+                            const OUString& aParam = aDispatchRequest.aParam;
                             sal_Int32 nPathIndex =  aParam.lastIndexOf( ';' );
                             sal_Int32 nFilterIndex = aParam.indexOf( ':' );
                             sal_Int32 nImgFilterIndex = aParam.lastIndexOf( 
'|' );
@@ -746,7 +746,7 @@ bool DispatchWatcher::executeDispatchRequests( const 
std::vector<DispatchRequest
                     }
                     else if ( aDispatchRequest.aRequestType == 
REQUEST_BATCHPRINT )
                     {
-                        batchPrint( aDispatchRequest.aPrinterName, xDoc, aObj, 
aName );
+                        batchPrint(aDispatchRequest.aParam, xDoc, aObj, aName);
                     }
                     else
                     {
@@ -754,7 +754,8 @@ bool DispatchWatcher::executeDispatchRequests( const 
std::vector<DispatchRequest
                         {
                             // create the printer
                             Sequence < PropertyValue > aPrinterArgs{ 
comphelper::makePropertyValue(
-                                "Name", aDispatchRequest.aPrinterName) };
+                                "Name", aDispatchRequest.aParam) };
+
                             xDoc->setPrinter( aPrinterArgs );
                         }
 
diff --git a/desktop/source/app/dispatchwatcher.hxx 
b/desktop/source/app/dispatchwatcher.hxx
index 70a7fd42e679..9a970cf82dce 100644
--- a/desktop/source/app/dispatchwatcher.hxx
+++ b/desktop/source/app/dispatchwatcher.hxx
@@ -59,7 +59,7 @@ class DispatchWatcher : public ::cppu::WeakImplHelper< 
css::frame::XDispatchResu
             RequestType aRequestType;
             OUString    aURL;
             std::optional< OUString > aCwdUrl;
-            OUString    aPrinterName;  // also conversion params
+            OUString aParam;
             OUString    aPreselectedFactory;
         };
 

Reply via email to