[Libreoffice-commits] core.git: include/vcl
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Wed Aug 26 08:57:48 UTC 2020
include/vcl/customweld.hxx | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit 96e79b75535376c327279cc33e02c5bdb775a511
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Aug 25 20:15:34 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Aug 26 10:57:07 2020 +0200
add GetTextWidth to CustomWidgetController
Change-Id: I1325ec66a8ed85626dfd0c9d5a79ac6264906abd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101371
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/include/vcl/customweld.hxx b/include/vcl/customweld.hxx
index 3e6835b8f864..938308a45ca8 100644
--- a/include/vcl/customweld.hxx
+++ b/include/vcl/customweld.hxx
@@ -69,6 +69,10 @@ public:
void Disable() const { m_pDrawingArea->set_sensitive(false); }
bool IsActive() const { return m_pDrawingArea->is_active(); }
int GetTextHeight() const { return m_pDrawingArea->get_text_height(); }
+ int GetTextWidth(const OUString& rText) const
+ {
+ return m_pDrawingArea->get_pixel_size(rText).Width();
+ }
OUString GetAccessibleName() const { return m_pDrawingArea->get_accessible_name(); }
OUString GetAccessibleDescription() const
{
More information about the Libreoffice-commits
mailing list