[Libreoffice-commits] core.git: include/IwyuFilter_include.yaml include/vcl vcl/inc vcl/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Feb 6 20:56:42 UTC 2019


 include/IwyuFilter_include.yaml |    3 ---
 include/vcl/prntypes.hxx        |    4 ++--
 vcl/inc/salprn.hxx              |    2 +-
 vcl/source/gdi/jobset.cxx       |    1 +
 4 files changed, 4 insertions(+), 6 deletions(-)

New commits:
commit a7521570c95cf4ecd3eb4324581ad09ff30ff70a
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Wed Feb 6 17:41:45 2019 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Wed Feb 6 21:56:16 2019 +0100

    Harmonize SalPrinterQueueInfo::mnJobs and QueueInfo::mnJobs
    
    The former was of type sal_uLong while the latter has been of (potentially
    smaller) type sal_uInt32 ever since at least
    a02e8af56ba44e9bb3ba2c6e995a23745ee629a0 "INTEGRATION: CWS hedaburemove01", and
    Printer::GetQueueInfo (vcl/source/gdi/print.cxx) assigns from the former to the
    latter (so potentially truncates).
    
    But it appears the only non-zero values ever stored in the former are
    QUEUE_JOBS_DONTKNOW (defined as 0xFFFFFFFF in include/vcl/prntypes.hxx, fitting
    into sal_uInt32) and Windows-specific PRINTER_INFO_2W::cJobs (in
    WinSalInstance::GetPrinterQueueState, vcl/win/gdi/salprn.cxx), which is of
    Windows type DWORD, i.e., unsigned 32-bit, compatible with sal_uInt32.
    
    So change the former (and QUEUE_JOBS_DONTKNOW) to sal_uInt32, too.
    
    Change-Id: I0cc993d26831313b362cc31ee06fd879c854d146
    Reviewed-on: https://gerrit.libreoffice.org/67468
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/include/IwyuFilter_include.yaml b/include/IwyuFilter_include.yaml
index 95379a3d61bd..4f51fbf63675 100644
--- a/include/IwyuFilter_include.yaml
+++ b/include/IwyuFilter_include.yaml
@@ -273,9 +273,6 @@ blacklist:
     - vcl/mapmod.hxx
     - tools/color.hxx
     - tools/gen.hxx
-    include/vcl/prntypes.hxx:
-    # Needed for macro
-    - tools/solar.h
     include/vcl/transfer.hxx:
     # base class has to be a complete type
     - com/sun/star/datatransfer/XTransferable2.hpp
diff --git a/include/vcl/prntypes.hxx b/include/vcl/prntypes.hxx
index de85acaa6ea1..6423d8e09f01 100644
--- a/include/vcl/prntypes.hxx
+++ b/include/vcl/prntypes.hxx
@@ -20,7 +20,7 @@
 #ifndef INCLUDED_VCL_PRNTYPES_HXX
 #define INCLUDED_VCL_PRNTYPES_HXX
 
-#include <tools/solar.h>
+#include <sal/types.h>
 #include <o3tl/typed_flags_set.hxx>
 
 
@@ -65,7 +65,7 @@ namespace o3tl
     template<> struct typed_flags<PrintQueueFlags> : is_typed_flags<PrintQueueFlags, 0x01ffffff> {};
 }
 
-#define QUEUE_JOBS_DONTKNOW             (sal_uLong(0xFFFFFFFF))
+#define QUEUE_JOBS_DONTKNOW             (sal_uInt32(0xFFFFFFFF))
 
 
 enum class PrinterCapType
diff --git a/vcl/inc/salprn.hxx b/vcl/inc/salprn.hxx
index f13d81945969..9c631dc02100 100644
--- a/vcl/inc/salprn.hxx
+++ b/vcl/inc/salprn.hxx
@@ -41,7 +41,7 @@ struct VCL_PLUGIN_PUBLIC SalPrinterQueueInfo
     OUString               maLocation;
     OUString               maComment;
     PrintQueueFlags        mnStatus;
-    sal_uLong              mnJobs;
+    sal_uInt32             mnJobs;
     std::unique_ptr<OUString> mpPortName; // only used by Windows backend
 
                             SalPrinterQueueInfo();
diff --git a/vcl/source/gdi/jobset.cxx b/vcl/source/gdi/jobset.cxx
index 7fc650c38e07..cc82ae183875 100644
--- a/vcl/source/gdi/jobset.cxx
+++ b/vcl/source/gdi/jobset.cxx
@@ -20,6 +20,7 @@
 #include <rtl/alloc.h>
 #include <rtl/ustring.hxx>
 #include <sal/log.hxx>
+#include <tools/solar.h>
 #include <tools/stream.hxx>
 #include <vcl/jobset.hxx>
 #include <jobset.h>


More information about the Libreoffice-commits mailing list