sw/source/uibase/utlui/tmplctrl.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit cb78333ec14a7664f2fae9bd6a9ef6b32e45cfe0 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Thu Jul 31 19:54:54 2025 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Fri Aug 1 17:14:25 2025 +0200 cid#1660007 Overflowed constant Change-Id: I25ce37f3b792f21284a3b12c34eaeff9a378b37b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188718 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/sw/source/uibase/utlui/tmplctrl.cxx b/sw/source/uibase/utlui/tmplctrl.cxx index 79a40011f9d1..e38b89d7dbbc 100644 --- a/sw/source/uibase/utlui/tmplctrl.cxx +++ b/sw/source/uibase/utlui/tmplctrl.cxx @@ -102,9 +102,9 @@ void SwTemplateControl::Command( const CommandEvent& rCEvt ) ::tools::Rectangle aRect(rCEvt.GetMousePosPixel(), Size(1, 1)); weld::Window* pParent = weld::GetPopupParent(GetStatusBar(), aRect); OUString sResult = xPopup->popup_at_rect(pParent, aRect); - if (!sResult.isEmpty()) + sal_uInt32 nCurrId = sResult.toUInt32(); + if (nCurrId > 0) { - sal_uInt32 nCurrId = sResult.toUInt32(); // looks a bit awkward, but another way is not possible pStyle = xIter->operator[]( nCurrId - 1 ); SfxStringItem aStyle( FN_SET_PAGE_STYLE, pStyle->GetName() );