summaryrefslogtreecommitdiff
path: root/include/vcl/customweld.hxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-08-25 20:15:34 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-08-26 10:57:07 +0200
commit96e79b75535376c327279cc33e02c5bdb775a511 (patch)
tree9af3f9910ffb03f65f2e9903a813726a909a8b12 /include/vcl/customweld.hxx
parent65a15721a4e25bae151c84369bd410e65578dcc9 (diff)
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@redhat.com>
Diffstat (limited to 'include/vcl/customweld.hxx')
-rw-r--r--include/vcl/customweld.hxx4
1 files changed, 4 insertions, 0 deletions
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
{