diff options
Diffstat (limited to 'vcl/inc')
-rw-r--r-- | vcl/inc/osx/salprn.h | 2 | ||||
-rw-r--r-- | vcl/inc/salprn.hxx | 4 | ||||
-rw-r--r-- | vcl/inc/salptype.hxx | 33 | ||||
-rw-r--r-- | vcl/inc/unx/genprn.h | 2 | ||||
-rw-r--r-- | vcl/inc/win/salprn.h | 2 |
5 files changed, 27 insertions, 16 deletions
diff --git a/vcl/inc/osx/salprn.h b/vcl/inc/osx/salprn.h index 7522bbc501b6..ea78b65cd258 100644 --- a/vcl/inc/osx/salprn.h +++ b/vcl/inc/osx/salprn.h @@ -72,7 +72,7 @@ class AquaSalInfoPrinter : public SalInfoPrinter virtual void ReleaseGraphics( SalGraphics* i_pGraphics ) override; virtual bool Setup( SalFrame* i_pFrame, ImplJobSetup* i_pSetupData ) override; virtual bool SetPrinterData( ImplJobSetup* pSetupData ) override; - virtual bool SetData( sal_uLong i_nFlags, ImplJobSetup* i_pSetupData ) override; + virtual bool SetData( JobSetFlags i_nFlags, ImplJobSetup* i_pSetupData ) override; virtual void GetPageInfo( const ImplJobSetup* i_pSetupData, long& o_rOutWidth, long& o_rOutHeight, long& o_rPageOffX, long& o_rPageOffY, diff --git a/vcl/inc/salprn.hxx b/vcl/inc/salprn.hxx index e9ceb2828660..d70ac368b0fd 100644 --- a/vcl/inc/salprn.hxx +++ b/vcl/inc/salprn.hxx @@ -26,6 +26,8 @@ #include <vcl/dllapi.h> #include <vcl/prntypes.hxx> +#include "salptype.hxx" + #include <vector> class SalGraphics; @@ -69,7 +71,7 @@ public: // and set the new indepen data in pSetupData // Only the data must changed, where the bit // in nFlags is set - virtual bool SetData( sal_uLong nFlags, ImplJobSetup* pSetupData ) = 0; + virtual bool SetData( JobSetFlags nFlags, ImplJobSetup* pSetupData ) = 0; virtual void GetPageInfo( const ImplJobSetup* pSetupData, long& rOutWidth, long& rOutHeight, diff --git a/vcl/inc/salptype.hxx b/vcl/inc/salptype.hxx index cbd04b028806..b121a12f9e6e 100644 --- a/vcl/inc/salptype.hxx +++ b/vcl/inc/salptype.hxx @@ -20,18 +20,27 @@ #ifndef INCLUDED_VCL_INC_SALPTYPE_HXX #define INCLUDED_VCL_INC_SALPTYPE_HXX -#include <tools/solar.h> - -// - SalJobSetupFlags - - -#define SAL_JOBSET_ORIENTATION ((sal_uLong)0x00000001) -#define SAL_JOBSET_PAPERBIN ((sal_uLong)0x00000002) -#define SAL_JOBSET_PAPERSIZE ((sal_uLong)0x00000004) -#define SAL_JOBSET_DUPLEXMODE ((sal_uLong)0x00000008) -#define SAL_JOBSET_ALL (SAL_JOBSET_ORIENTATION |\ - SAL_JOBSET_PAPERBIN |\ - SAL_JOBSET_PAPERSIZE |\ - SAL_JOBSET_DUPLEXMODE) +#include <sal/types.h> + +enum class JobSetFlags : sal_uInt16; + +inline SAL_CONSTEXPR JobSetFlags operator |(const JobSetFlags a, const JobSetFlags b) +{ + return static_cast<JobSetFlags>(static_cast<sal_uInt16>(a) & static_cast<sal_uInt16>(b)); +} + +inline SAL_CONSTEXPR bool operator &(const JobSetFlags a, const JobSetFlags b) +{ + return (static_cast<sal_uInt16>(a) & static_cast<sal_uInt16>(b)) != 0; +} + +enum class JobSetFlags : sal_uInt16 { + ORIENTATION = 1, + PAPERBIN = 2, + PAPERSIZE = 4, + DUPLEXMODE = 8, + ALL = ORIENTATION | PAPERBIN | PAPERSIZE | DUPLEXMODE +}; // - SalPrinterError - diff --git a/vcl/inc/unx/genprn.h b/vcl/inc/unx/genprn.h index 2479dd755193..109946440e22 100644 --- a/vcl/inc/unx/genprn.h +++ b/vcl/inc/unx/genprn.h @@ -42,7 +42,7 @@ public: virtual void ReleaseGraphics( SalGraphics* pGraphics ) override; virtual bool Setup( SalFrame* pFrame, ImplJobSetup* pSetupData ) override; virtual bool SetPrinterData( ImplJobSetup* pSetupData ) override; - virtual bool SetData( sal_uIntPtr nFlags, ImplJobSetup* pSetupData ) override; + virtual bool SetData( JobSetFlags nFlags, ImplJobSetup* pSetupData ) override; virtual void GetPageInfo( const ImplJobSetup* pSetupData, long& rOutWidth, long& rOutHeight, long& rPageOffX, long& rPageOffY, diff --git a/vcl/inc/win/salprn.h b/vcl/inc/win/salprn.h index 65730458f4f0..c7f201bbbc99 100644 --- a/vcl/inc/win/salprn.h +++ b/vcl/inc/win/salprn.h @@ -59,7 +59,7 @@ public: virtual void ReleaseGraphics( SalGraphics* pGraphics ) override; virtual bool Setup( SalFrame* pFrame, ImplJobSetup* pSetupData ) override; virtual bool SetPrinterData( ImplJobSetup* pSetupData ) override; - virtual bool SetData( sal_uIntPtr nFlags, ImplJobSetup* pSetupData ) override; + virtual bool SetData( JobSetFlags nFlags, ImplJobSetup* pSetupData ) override; virtual void GetPageInfo( const ImplJobSetup* pSetupData, long& rOutWidth, long& rOutHeight, long& rPageOffX, long& rPageOffY, |