summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/rtl/ustrbuf.hxx15
-rw-r--r--vcl/inc/salframe.hxx1
-rw-r--r--vcl/source/app/salvtables.cxx24
3 files changed, 40 insertions, 0 deletions
diff --git a/include/rtl/ustrbuf.hxx b/include/rtl/ustrbuf.hxx
index 8c8cc54f8f01..605fb1efb6d0 100644
--- a/include/rtl/ustrbuf.hxx
+++ b/include/rtl/ustrbuf.hxx
@@ -34,6 +34,7 @@
#if defined LIBO_INTERNAL_ONLY
#include <string_view>
#include <type_traits>
+#include <utility>
#endif
#include "rtl/ustrbuf.h"
@@ -974,6 +975,20 @@ public:
return pData->buffer + n;
}
+#if defined LIBO_INTERNAL_ONLY
+ /**
+ "Stream" operator to append a value to this OUStringBuffer.
+
+ @internal
+ @since LibreOffice 7.5
+ */
+ template<typename T>
+ OUStringBuffer& operator<<(T&& rValue)
+ {
+ return append(std::forward<T>(rValue));
+ }
+#endif
+
/**
Inserts the string into this string buffer.
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))
{