summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/text/frminf.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/sw/source/core/text/frminf.cxx b/sw/source/core/text/frminf.cxx
index 3d6234e6e1de..ac25d9d1c1b4 100644
--- a/sw/source/core/text/frminf.cxx
+++ b/sw/source/core/text/frminf.cxx
@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <o3tl/safeint.hxx>
+
#include <frminf.hxx>
#include "itrtxt.hxx"
@@ -78,7 +82,7 @@ bool SwTextFrameInfo::IsFilled( const sal_uInt8 nPercent ) const
long nWidth = pFrame->getFramePrintArea().Width();
nWidth *= nPercent;
nWidth /= 100;
- return sal_uInt16(nWidth) <= pLay->Width();
+ return o3tl::make_unsigned(nWidth) <= pLay->Width();
}
// Where does the text start (without whitespace)? (document global)