From 7e2401a661def1b73b80bb6cb41d00ba76d76783 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Fri, 20 Mar 2026 10:31:30 +0100 Subject: [PATCH] svx: fix assertion failure in SwFrameExample::InitAllRects_Impl() online.git's 'make -C cypress_test check-desktop spec=writer/a11y_dialog_spec.js' points out these can be 0 in practice, just increase these from non-zero to avoid the assertion failure and keep commit 281596e7324fbf1f5e16245382cfddae2df18a8d (cid#1606823 silence Overflowed constant, 2024-09-16) fixed. Change-Id: I7a4ab6e3aa632345bb49f882d678c5d8af7a5e66 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202247 Reviewed-by: Miklos Vajna Tested-by: Jenkins --- svx/source/dialog/swframeexample.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/svx/source/dialog/swframeexample.cxx b/svx/source/dialog/swframeexample.cxx index ccb775f77677..82dcff7817be 100644 --- a/svx/source/dialog/swframeexample.cxx +++ b/svx/source/dialog/swframeexample.cxx @@ -104,9 +104,15 @@ void SwFrameExample::InitAllRects_Impl(vcl::RenderContext& rRenderContext) aPage.SetSize(GetOutputSizePixel()); sal_uInt32 nOutWPix = aPage.GetWidth(); + if (!nOutWPix) + { + nOutWPix = 1; + } sal_uInt32 nOutHPix = aPage.GetHeight(); - - assert(nOutWPix > 0 && nOutHPix > 0); + if (!nOutHPix) + { + nOutHPix = 1; + } // PrintArea sal_uInt32 nLBorder;