[Libreoffice-commits] core.git: vcl/headless vcl/inc
Jan-Marek Glogowski (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jun 30 20:35:18 UTC 2021
vcl/headless/svpframe.cxx | 3 ++-
vcl/inc/headless/svpframe.hxx | 20 ++++++++++++++++++++
2 files changed, 22 insertions(+), 1 deletion(-)
New commits:
commit 54d7fc9ea9d56ec16ec4f641a3dbf01f64233297
Author: Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Tue Jun 29 16:13:42 2021 +0000
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Wed Jun 30 22:34:41 2021 +0200
svp: add ostream<< for SvpSalFrame
... and also store the window title.
Change-Id: I20d8b30f6e8e5c48740fe569d9689a117db11e6d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118129
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow at fbihome.de>
diff --git a/vcl/headless/svpframe.cxx b/vcl/headless/svpframe.cxx
index ab82a90a4faa..c7a1d8f50845 100644
--- a/vcl/headless/svpframe.cxx
+++ b/vcl/headless/svpframe.cxx
@@ -187,8 +187,9 @@ void SvpSalFrame::PostPaint() const
}
}
-void SvpSalFrame::SetTitle( const OUString& )
+void SvpSalFrame::SetTitle(const OUString& sTitle)
{
+ m_sTitle = sTitle;
}
void SvpSalFrame::SetIcon( sal_uInt16 )
diff --git a/vcl/inc/headless/svpframe.hxx b/vcl/inc/headless/svpframe.hxx
index 145ccf5b3655..4c6dd98e2ca9 100644
--- a/vcl/inc/headless/svpframe.hxx
+++ b/vcl/inc/headless/svpframe.hxx
@@ -54,6 +54,8 @@ class SvpSalFrame : public SalFrame
std::vector< SvpSalGraphics* > m_aGraphics;
static SvpSalFrame* s_pFocusFrame;
+ OUString m_sTitle;
+
public:
SvpSalFrame( SvpSalInstance* pInstance,
SalFrame* pParent,
@@ -64,6 +66,11 @@ public:
void LoseFocus();
void PostPaint() const;
+ OUString title() const { return m_sTitle; }
+ SalFrameStyleFlags style() const { return m_nStyle; }
+ bool isVisible() const { return m_bVisible; }
+ bool hasFocus() const { return s_pFocusFrame == this; }
+
// SalFrame
virtual SalGraphics* AcquireGraphics() override;
virtual void ReleaseGraphics( SalGraphics* pGraphics ) override;
@@ -120,6 +127,19 @@ private:
basegfx::B2IVector GetSurfaceFrameSize() const;
};
+template <typename charT, typename traits>
+inline std::basic_ostream<charT, traits>& operator<<(std::basic_ostream<charT, traits>& stream,
+ const SvpSalFrame& frame)
+{
+ stream << &frame << " (vis " << frame.isVisible() << " focus " << frame.hasFocus();
+ stream << " style " << std::hex << std::setfill('0') << std::setw(8) << static_cast<sal_uInt32>(frame.style());
+ OUString sTitle = frame.title();
+ if (!sTitle.isEmpty())
+ stream << " '" << sTitle << "'";
+ stream << ")";
+ return stream;
+}
+
#endif // INCLUDED_VCL_INC_HEADLESS_SVPFRAME_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list