diff options
author | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2018-10-01 03:09:35 +0200 |
---|---|---|
committer | Thorsten Behrens <thorsten.behrens@allotropia.de> | 2023-10-29 12:21:34 +0100 |
commit | d97e0458914991214e3d396273862855aff66234 (patch) | |
tree | 15a53170df16d021fee3459168871260022cd311 /vcl/inc/jobset.h | |
parent | c75cac85230d3899fe9f5f5086c117e4e1e5d330 (diff) |
vcl: no raw pointers
For ImplJobSetup. Also, check memcmp mem size more properly
Change-Id: Idcf20bf1b51bc2508f3d37e018efd18e591a6099
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/26648
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Diffstat (limited to 'vcl/inc/jobset.h')
-rw-r--r-- | vcl/inc/jobset.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/vcl/inc/jobset.h b/vcl/inc/jobset.h index e3f154254e35..7c0d0b55a4c3 100644 --- a/vcl/inc/jobset.h +++ b/vcl/inc/jobset.h @@ -25,6 +25,7 @@ #include <vcl/dllapi.h> #include <vcl/prntypes.hxx> #include <unordered_map> +#include <memory> // see com.sun.star.portal.client.JobSetupSystem.idl: #define JOBSETUP_SYSTEM_WINDOWS 1 @@ -44,7 +45,7 @@ private: tools::Long mnPaperWidth; //< paper width (100th mm) tools::Long mnPaperHeight; //< paper height (100th mm) sal_uInt32 mnDriverDataLen; //< length of system specific data - sal_uInt8* mpDriverData; //< system specific data (will be streamed a byte block) + std::unique_ptr<sal_uInt8[]> mpDriverData; //< system specific data (will be streamed a byte block) bool mbPapersizeFromSetup; // setup mode PrinterSetupMode meSetupMode; @@ -86,10 +87,8 @@ public: void SetPaperHeight(tools::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); + const sal_uInt8* GetDriverData() const { return mpDriverData.get(); } + void SetDriverData(std::unique_ptr<sal_uInt8[]> pDriverData, sal_uInt32 nDriverDataLen); bool GetPapersizeFromSetup() const { return mbPapersizeFromSetup; } void SetPapersizeFromSetup(bool bPapersizeFromSetup); |