Date: prev next · Thread: first prev next last
2019 Archives by date, by thread · List index


FYI (and I assume this to be non-controversial), <https://gerrit.libreoffice.org/#/c/67427/>:

[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.)
[...]

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.