include/vcl/customweld.hxx | 4 ++++ 1 file changed, 4 insertions(+) New commits: commit 96e79b75535376c327279cc33e02c5bdb775a511 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Tue Aug 25 20:15:34 2020 +0100 Commit: Caolán McNamara <caol...@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 <caol...@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 { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits