[Libreoffice-commits] core.git: sc/source

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Wed Jun 9 15:44:34 UTC 2021


 sc/source/ui/view/viewdata.cxx |   10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

New commits:
commit cb8d6ebfb5b5512c32027708859251fae8c2fcae
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Jun 8 10:24:36 2021 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Wed Jun 9 17:43:45 2021 +0200

    -Werror,-Wunused-but-set-variable (Clang 13 trunk)
    
    The "INTEGRATION: CWS sheetzoom: #i24372# allow separate zoom per sheet" commits
    0846c467a921a27ebd3691e4bc187ece8d0ae7aa (sc/source/ui/inc/viewdata.hxx) and
    8d808f64ed32d55adc7af34c3615993ada02f117 (sc/source/ui/view/viewdata.cxx) had
    moved the aZoomX, aZoomY, aPageZoomX, aPageZoomY data members from ScViewData to
    ScViewTableData (and added aDefZoomX, aDefZoomY, aDefPageZoomX, aDefPageZoomY
    data members to ScViewData in their place), and introduced the local variables
    
    >     Fraction aZoomX, aZoomY, aPageZoomX, aPageZoomY;    //! evaluate (all sheets?)
    
    into ScViewData::ReadUserData, so the pre-exisiting assignments to them in that
    function, which used to assign to the ScViewData data members, now started to do
    dead assignments to those local variables.
    
    (8d808f64ed32d55adc7af34c3615993ada02f117 had similarly added local variables
    
    >     Fraction aZoomX, aZoomY, aPageZoomX, aPageZoomY;    //! evaluate (all sheets?)
    
    to the top of ScViewData::ReadUserDataSequence, but they have already been
    cleaned away by 305bf19e390aebdf2d20ea052a92f782e8d1185c "loplugin: unused
    variables".)
    
    Change-Id: I0053ba85b3e33fc515cf4724655baa3c5063826d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116818
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 5c66b48c6c72..1e045bf35ca4 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -3293,19 +3293,11 @@ void ScViewData::ReadUserData(const OUString& rData)
         return;
     }
 
-    Fraction aZoomX, aZoomY, aPageZoomX, aPageZoomY;    // evaluate (all sheets?)
-
     sal_Int32 nMainIdx {0};
     sal_Int32 nIdx {0};
 
     OUString aZoomStr = rData.getToken(0, ';', nMainIdx);       // Zoom/PageZoom/Mode
-    sal_uInt16 nNormZoom = sal::static_int_cast<sal_uInt16>(aZoomStr.getToken(0, '/', nIdx).toInt32());
-    if ( nNormZoom >= MINZOOM && nNormZoom <= MAXZOOM )
-        aZoomX = aZoomY = Fraction( nNormZoom, 100 );           //  "normal" zoom (always)
-    sal_uInt16 nPageZoom = sal::static_int_cast<sal_uInt16>(aZoomStr.getToken(0, '/', nIdx).toInt32());
-    if ( nPageZoom >= MINZOOM && nPageZoom <= MAXZOOM )
-        aPageZoomX = aPageZoomY = Fraction( nPageZoom, 100 );   // Pagebreak zoom, if set
-    sal_Unicode cMode = aZoomStr.getToken(0, '/', nIdx)[0];     // 0 or "0"/"1"
+    sal_Unicode cMode = aZoomStr.getToken(2, '/', nIdx)[0];     // 0 or "0"/"1"
     SetPagebreakMode( cMode == '1' );
     // SetPagebreakMode must always be called due to CalcPPT / RecalcPixPos()
 


More information about the Libreoffice-commits mailing list