summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2021-06-08 10:24:36 +0200
committerStephan Bergmann <sbergman@redhat.com>2021-06-09 17:43:45 +0200
commitcb8d6ebfb5b5512c32027708859251fae8c2fcae (patch)
tree1c4310135af66b8f8e91290600e8eb85bb518540
parent85582c40bca587017611bb332d1c9997c687cdfe (diff)
-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@redhat.com>
-rw-r--r--sc/source/ui/view/viewdata.cxx10
1 files changed, 1 insertions, 9 deletions
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()