Proposed [API CHANGE] Synchronize supported Writer document zoom ranges
sbergman at redhat.com
Wed Feb 6 08:15:00 UTC 2019
FYI (and I assume this to be non-controversial),
> [API CHANGE] Synchronize supported Writer document zoom ranges
> On the one hand, SvxZoomSliderItem/SvxZoomSliderControl as used by SwView's
> SID_ATTR_ZOOMSLIDER support a range from MINZOOM (20) to MAXZOOM (600) (defined
> in sw/inc/view.hxx). Setting a zoom value outside that range for one causes the
> DBG_ASSERT "Looks like the zoom slider item is corrupted" in
> SvxZoomSliderControl::StateChanged (svx/source/stbctrls/zoomsliderctrl.cxx) to
> fire, and for another (when setting a too small value) tries to assign a
> negative value (which wraps around, and gets flagged by Clang's
> -fsanitize=implicit-signed-integer-truncation) to sal_uInt16 nCurrentZoom at
> nCurrentZoom = nCurrentZoom - mxImpl->mnMinZoom;
> in SvxZoomSliderControl::Zoom2Offset (svx/source/stbctrls/zoomsliderctrl.cxx).
> On the other hand, SwXViewSettings' support of css.text.ViewSettings' ZoomValue
> property allowed values in the range from 5 to 1000 (cf.
> SwXViewSettings::_setSingleValue in sw/source/uibase/uno/unomod.cxx), and some
> JunitTests actually set such values (10, 15) below the MINZOOM value of 20.
> The incompatible 5--1000 range was there ever since
> 7b0b5cdfeed656b279bc32cd929630d5fc25878b "initial import", but looks rather
> random, so change it to match the 20--600 range instead. (And lets flag this as
> an [API CHANGE], to be on the safe side.)
More information about the LibreOffice