summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2022-06-13 03:53:54 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2022-06-21 13:39:40 +0200
commitbf35c2b7f4b9fa18e387e2ee8df518303696e13c (patch)
tree08aa36548e4b9c9982998c3edd9d0235d71d26f9 /vcl
parent909cdd552199d35f7c10be0a8be370158aea0815 (diff)
OUStringBuffer: add append via operator<<(T&&)
... and use it to implement SalFrame::DumpSetPosSize. Change-Id: I82301f7e1f6641d6167c9577ce9ef44ef8067297 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135808 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/salframe.hxx1
-rw-r--r--vcl/source/app/salvtables.cxx24
2 files changed, 25 insertions, 0 deletions
diff --git a/vcl/inc/salframe.hxx b/vcl/inc/salframe.hxx
index 45ed72956656..552d88eb2519 100644
--- a/vcl/inc/salframe.hxx
+++ b/vcl/inc/salframe.hxx
@@ -156,6 +156,7 @@ public:
virtual void SetMinClientSize( tools::Long nWidth, tools::Long nHeight ) = 0;
virtual void SetMaxClientSize( tools::Long nWidth, tools::Long nHeight ) = 0;
virtual void SetPosSize( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, sal_uInt16 nFlags ) = 0;
+ static OUString DumpSetPosSize(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, sal_uInt16 nFlags);
virtual void GetClientSize( tools::Long& rWidth, tools::Long& rHeight ) = 0;
virtual void GetWorkArea( tools::Rectangle& rRect ) = 0;
virtual SalFrame* GetParent() const = 0;
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index b6db52c8b87d..40c04421b8d5 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -111,6 +111,30 @@ void SalFrame::SetRepresentedURL(const OUString&)
// currently this is Mac only functionality
}
+OUString SalFrame::DumpSetPosSize(tools::Long nX, tools::Long nY, tools::Long nWidth,
+ tools::Long nHeight, sal_uInt16 nFlags)
+{
+ // assuming the 4 integers normally don't have more then 4 digits, but might be negative
+ OUStringBuffer aBuffer(4 * 5 + 5);
+ if (nFlags & SAL_FRAME_POSSIZE_WIDTH)
+ aBuffer << nWidth << "x";
+ else
+ aBuffer << "?x";
+ if (nFlags & SAL_FRAME_POSSIZE_HEIGHT)
+ aBuffer << nHeight << "@(";
+ else
+ aBuffer << "?@(";
+ if (nFlags & SAL_FRAME_POSSIZE_X)
+ aBuffer << nX << ",";
+ else
+ aBuffer << "?,";
+ if (nFlags & SAL_FRAME_POSSIZE_Y)
+ aBuffer << nY << ")";
+ else
+ aBuffer << "?)";
+ return aBuffer.makeStringAndClear();
+}
+
SalInstance::SalInstance(std::unique_ptr<comphelper::SolarMutex> pMutex)
: m_pYieldMutex(std::move(pMutex))
{