• Stephan Bergmann's avatar
    [API CHANGE] Synchronize supported Writer document zoom ranges · 6287a4f0
    Stephan Bergmann yazdı
    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
    7b0b5cdf "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.)
    
    One of the JunitTests files that needed to be adapted,
    qadevOOo/tests/java/mod/_sw/SwAccessibleEndnoteView.java, oddly mentioned a
    zoom value of 130% in a comment while using the value 15 in the actual code.
    (And did so ever since the test code's introduction in
    26ebdfc4 "NEW: initial version".)  Changing the
    code to 130 would cause JunitTest_sw_unoapi_1 to fail in strange ways, with
    disposed UNO objects, while changing the code (and comment) to 21 appears to
    work.  Go figure.
    
    Change-Id: Id944ffdce501448312e008436e7038bf2aec63ac
    Reviewed-on: https://gerrit.libreoffice.org/67427
    Tested-by: Jenkins
    Reviewed-by: 's avatarSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
    Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
    6287a4f0
Adı
Son kayıt (commit)
Son güncelleme
..
objdsc Loading commit data...
qa Loading commit data...
runner Loading commit data...
testdocs Loading commit data...
tests/java Loading commit data...
.classpath Loading commit data...
.project Loading commit data...
Jar_OOoRunner.mk Loading commit data...
Makefile Loading commit data...
Module_qadevOOo.mk Loading commit data...
README Loading commit data...