From e2a8b4a420ab0f726c43ec6c609d17211cd6ed11 Mon Sep 17 00:00:00 2001 From: Jan-Marek Glogowski Date: Sun, 12 Jun 2022 08:01:32 +0200 Subject: [PATCH] Fix and add ostreams for vcl::WindowPosSize ... and inheriting classes. Follow-up on commit ea5a0918c8c32309821ab239c4b95f4d6a3b5c12 ("VCL add vcl::WindowPosSize abstract class"). Change-Id: I4733cd4619f91fe1ba05c208a650be591ecf5d8e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135806 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski --- include/vcl/WindowPosSize.hxx | 5 +++-- include/vcl/windowstate.hxx | 29 +++++++++++++++++++++++++++++ vcl/inc/salgeom.hxx | 2 +- 3 files changed, 33 insertions(+), 3 deletions(-) diff --git a/include/vcl/WindowPosSize.hxx b/include/vcl/WindowPosSize.hxx index ed52488be33a..6c5484c47b30 100644 --- a/include/vcl/WindowPosSize.hxx +++ b/include/vcl/WindowPosSize.hxx @@ -124,9 +124,10 @@ public: void setPosSize(const Point& rPos, const Size& rSize) { setPosSize({ rPos, rSize }); } }; -inline std::ostream& operator<<(std::ostream& s, const WindowPosSize& rGeom) +inline std::ostream& operator<<(std::ostream& s, const WindowPosSize& rPosSize) { - s << rGeom.width() << "x" << rGeom.height() << "@(" << rGeom.x() << "," << rGeom.y() << ")"; + s << rPosSize.width() << "x" << rPosSize.height() << "@(" << rPosSize.x() << "," << rPosSize.y() + << ")"; return s; } diff --git a/include/vcl/windowstate.hxx b/include/vcl/windowstate.hxx index 772d5c397f76..ed3cbf1a7f6e 100644 --- a/include/vcl/windowstate.hxx +++ b/include/vcl/windowstate.hxx @@ -115,6 +115,35 @@ template <> struct typed_flags : is_typed_flags(rData.state()) << std::dec; + else + s << "?"; + return s; +} + +} // namespace vcl + #endif // INCLUDED_VCL_WINDOWSTATE_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/salgeom.hxx b/vcl/inc/salgeom.hxx index 63675b6d9ceb..1b19931c5c50 100644 --- a/vcl/inc/salgeom.hxx +++ b/vcl/inc/salgeom.hxx @@ -98,7 +98,7 @@ public: inline std::ostream& operator<<(std::ostream& s, const SalFrameGeometry& rGeom) { - s << static_cast(&rGeom) << ":{" << rGeom.leftDecoration() << "," + s << *static_cast(&rGeom) << ":{" << rGeom.leftDecoration() << "," << rGeom.topDecoration() << "," << rGeom.rightDecoration() << "," << rGeom.bottomDecoration() << "}s" << rGeom.screen(); return s;