summaryrefslogtreecommitdiff
path: root/vcl/inc/jobset.h
diff options
context:
space:
mode:
authorXisco Fauli <anistenis@gmail.com>2016-05-02 19:07:23 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2016-06-24 23:01:04 +0000
commit0325b22a2a2b537a71f53b7c5d3e6c13fef68911 (patch)
tree185ce849074b367c8005abb704fc4c7f271fca00 /vcl/inc/jobset.h
parent46773b0b59bb9061c5f5660e65e4ebc0d455fe02 (diff)
tdf#62525 vcl: use cow_wrapper for jobset
Besides: * Convert ImplJobSetup to be a class. * Use ImplJobSetup's setters and getters everywhere * add some const-correctness at places Change-Id: I32101048e9be4f3950a4540b0666ed548bbcb211 Reviewed-on: https://gerrit.libreoffice.org/24594 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'vcl/inc/jobset.h')
-rw-r--r--vcl/inc/jobset.h55
1 files changed, 49 insertions, 6 deletions
diff --git a/vcl/inc/jobset.h b/vcl/inc/jobset.h
index 09480202dccb..db833018f905 100644
--- a/vcl/inc/jobset.h
+++ b/vcl/inc/jobset.h
@@ -29,13 +29,9 @@
#define JOBSETUP_SYSTEM_UNIX 3
#define JOBSETUP_SYSTEM_MAC 4
-struct ImplJobSetup
+class ImplJobSetup
{
- ImplJobSetup();
- ImplJobSetup( const ImplJobSetup& rJobSetup );
- ~ImplJobSetup();
-
- sal_uInt16 mnRefCount; //< RefCount (only independent data)
+private:
sal_uInt16 mnSystem; //< System - JOBSETUP_SYSTEM_xxxx
OUString maPrinterName; //< Printer-Name
OUString maDriver; //< Driver-Name
@@ -49,6 +45,53 @@ struct ImplJobSetup
sal_uInt8* mpDriverData; //< system specific data (will be streamed a byte block)
bool mbPapersizeFromSetup;
std::unordered_map< OUString, OUString, OUStringHash > maValueMap;
+
+public:
+ ImplJobSetup();
+ ImplJobSetup( const ImplJobSetup& rJobSetup );
+ ~ImplJobSetup();
+
+ bool operator==( const ImplJobSetup& rImplJobSetup ) const;
+
+ sal_uInt16 GetSystem() const { return mnSystem; }
+ void SetSystem(sal_uInt16 nSystem);
+
+ const OUString& GetPrinterName() const { return maPrinterName; }
+ void SetPrinterName(const OUString& rPrinterName);
+
+ const OUString& GetDriver() const { return maDriver; }
+ void SetDriver(const OUString& rDriver);
+
+ Orientation GetOrientation() const { return meOrientation; }
+ void SetOrientation(Orientation eOrientation);
+
+ DuplexMode GetDuplexMode() const { return meDuplexMode; }
+ void SetDuplexMode(DuplexMode eDuplexMode);
+
+ sal_uInt16 GetPaperBin() const { return mnPaperBin; }
+ void SetPaperBin(sal_uInt16 nPaperBin);
+
+ Paper GetPaperFormat() const { return mePaperFormat; }
+ void SetPaperFormat(Paper ePaperFormat);
+
+ long GetPaperWidth() const { return mnPaperWidth; }
+ void SetPaperWidth(long nWidth);
+
+ long GetPaperHeight() const { return mnPaperHeight; }
+ void SetPaperHeight(long nHeight);
+
+ sal_uInt32 GetDriverDataLen() const { return mnDriverDataLen; }
+ void SetDriverDataLen(sal_uInt32 nDriverDataLen);
+
+ const sal_uInt8* GetDriverData() const { return mpDriverData; }
+ void SetDriverData(sal_uInt8* pDriverData);
+
+ bool GetPapersizeFromSetup() const { return mbPapersizeFromSetup; }
+ void SetPapersizeFromSetup(bool bPapersizeFromSetup);
+
+ const std::unordered_map< OUString, OUString, OUStringHash >& GetValueMap() const
+ { return maValueMap; }
+ void SetValueMap(const OUString& rKey, const OUString& rValue);
};
// If paper format is PAPER_USER, in the system-independent part it will