include/vcl/errinf.hxx | 66 ++++++++++++++++++++++--------------------- vcl/source/window/errinf.cxx | 4 +- 2 files changed, 36 insertions(+), 34 deletions(-)
New commits: commit 5302c78163934b58ac6ee0506b211f2ce5352fd6 Author: Chris Sherlock <chris.sherloc...@gmail.com> Date: Mon Apr 24 01:25:49 2017 +1000 vcl: lUserId -> nUserId Change-Id: I7617b25b1d63fc2926c1b500830ba3c1ddc8105c Reviewed-on: https://gerrit.libreoffice.org/36857 Reviewed-by: Chris Sherlock <chris.sherloc...@gmail.com> Tested-by: Chris Sherlock <chris.sherloc...@gmail.com> diff --git a/include/vcl/errinf.hxx b/include/vcl/errinf.hxx index 2d42e5deffc7..e8bb5127da20 100644 --- a/include/vcl/errinf.hxx +++ b/include/vcl/errinf.hxx @@ -29,6 +29,7 @@ #include <vector> #include <memory> + #include <limits.h> namespace vcl { class Window; } @@ -46,7 +47,7 @@ namespace { } typedef DialogMask WindowDisplayErrorFunc( - vcl::Window *, DialogMask eMask, const OUString &rErr, const OUString &rAction); + vcl::Window*, DialogMask eMask, const OUString &rErr, const OUString &rAction); typedef void BasicDisplayErrorFunc( const OUString &rErr, const OUString &rAction); @@ -114,76 +115,76 @@ class SAL_WARN_UNUSED VCL_DLLPUBLIC ErrorHandler friend class ErrorStringFactory; public: - ErrorHandler(); - virtual ~ErrorHandler(); + ErrorHandler(); + virtual ~ErrorHandler(); - static DialogMask HandleError(sal_uInt32 lId, DialogMask nMask = DialogMask::MAX); - static bool GetErrorString(sal_uInt32 lId, OUString& rStr); + static DialogMask HandleError(sal_uInt32 nId, DialogMask nMask = DialogMask::MAX); + static bool GetErrorString(sal_uInt32 nId, OUString& rStr); protected: - virtual bool CreateString(const ErrorInfo*, OUString &) const = 0; + virtual bool CreateString(const ErrorInfo*, OUString &) const = 0; }; class SAL_WARN_UNUSED VCL_DLLPUBLIC ErrorInfo { -private: - sal_uInt32 lUserId; - public: - - ErrorInfo(sal_uInt32 lArgUserId) : - lUserId( lArgUserId ){} + ErrorInfo(sal_uInt32 nArgUserId) : + nUserId(nArgUserId) {} virtual ~ErrorInfo(); - sal_uInt32 GetErrorCode() const { return lUserId; } + sal_uInt32 GetErrorCode() const { return nUserId; } static ErrorInfo* GetErrorInfo(sal_uInt32); + +private: + sal_uInt32 nUserId; }; class SAL_WARN_UNUSED VCL_DLLPUBLIC DynamicErrorInfo : public ErrorInfo { friend class DynamicErrorInfo_Impl; -private: - std::unique_ptr<DynamicErrorInfo_Impl> pImpl; - public: - - DynamicErrorInfo(sal_uInt32 lUserId, DialogMask nMask); + DynamicErrorInfo(sal_uInt32 nUserId, DialogMask nMask); virtual ~DynamicErrorInfo() override; operator sal_uInt32() const; - DialogMask GetDialogMask() const; + DialogMask GetDialogMask() const; + +private: + std::unique_ptr<DynamicErrorInfo_Impl> pImpl; + }; class SAL_WARN_UNUSED VCL_DLLPUBLIC StringErrorInfo : public DynamicErrorInfo { -private: - OUString aString; - public: - - StringErrorInfo(sal_uInt32 lUserId, + StringErrorInfo(sal_uInt32 nUserId, const OUString& aStringP, DialogMask nMask = DialogMask::NONE); + const OUString& GetErrorString() const { return aString; } + +private: + OUString aString; + }; class SAL_WARN_UNUSED VCL_DLLPUBLIC TwoStringErrorInfo: public DynamicErrorInfo { -private: - OUString aArg1; - OUString aArg2; - public: - TwoStringErrorInfo(sal_uInt32 nUserID, const OUString & rTheArg1, const OUString & rTheArg2, DialogMask nMask): DynamicErrorInfo(nUserID, nMask), aArg1(rTheArg1), aArg2(rTheArg2) {} const OUString& GetArg1() const { return aArg1; } const OUString& GetArg2() const { return aArg2; } + +private: + OUString aArg1; + OUString aArg2; + }; struct ErrorContextImpl; @@ -192,9 +193,6 @@ class SAL_WARN_UNUSED VCL_DLLPUBLIC ErrorContext { friend class ErrorHandler; -private: - std::unique_ptr<ErrorContextImpl> pImpl; - public: ErrorContext(vcl::Window *pWin); virtual ~ErrorContext(); @@ -203,6 +201,10 @@ public: vcl::Window* GetParent(); static ErrorContext* GetContext(); + +private: + std::unique_ptr<ErrorContextImpl> pImpl; + }; #endif diff --git a/vcl/source/window/errinf.cxx b/vcl/source/window/errinf.cxx index b6ed18d616c1..00091c52de39 100644 --- a/vcl/source/window/errinf.cxx +++ b/vcl/source/window/errinf.cxx @@ -140,8 +140,8 @@ DialogMask DynamicErrorInfo::GetDialogMask() const } StringErrorInfo::StringErrorInfo( - sal_uInt32 UserId, const OUString& aStringP, DialogMask nMask) -: DynamicErrorInfo(UserId, nMask), aString(aStringP) + sal_uInt32 nUserId, const OUString& aStringP, DialogMask nMask) +: DynamicErrorInfo(nUserId, nMask), aString(aStringP) { } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits