summaryrefslogtreecommitdiff
path: root/libreofficekit
diff options
context:
space:
mode:
authorGökhan Gurbetoğlu <gokhan.gurbetoglu@pardus.org.tr>2018-04-16 15:33:03 +0300
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-04-17 08:14:56 +0200
commit0f166ef5240ee155bf2544e6bc3c985b1e3bf646 (patch)
treeece7b6b86e2426f3ec794130b1dfe2f4b29bf97d /libreofficekit
parentb9f9f8253f89151beed27499e6db5c11a7d81eba (diff)
cppcheck - fix variableScope in some files
Reduced the scope of some variables in source. Change-Id: Ib3b521ca5df8b9b254b51eab5f1d7040d6cfd846 Reviewed-on: https://gerrit.libreoffice.org/52974 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'libreofficekit')
-rw-r--r--libreofficekit/qa/tilebench/tilebench.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/libreofficekit/qa/tilebench/tilebench.cxx b/libreofficekit/qa/tilebench/tilebench.cxx
index ed3d57d05b3f..3c62e2e36838 100644
--- a/libreofficekit/qa/tilebench/tilebench.cxx
+++ b/libreofficekit/qa/tilebench/tilebench.cxx
@@ -104,12 +104,6 @@ int main( int argc, char* argv[] )
return 1;
}
- // Use realistic dimensions, similar to the Online client.
- long nTilePixelWidth = 512;
- long nTilePixelHeight = 512;
- long nTileTwipWidth = 3840;
- long nTileTwipHeight = 3840;
-
aTimes.emplace_back("initialization");
// coverity[tainted_string] - build time test tool
Office *pOffice = lok_cpp_init(argv[1]);
@@ -153,6 +147,12 @@ int main( int argc, char* argv[] )
}
aTimes.emplace_back();
+ // Use realistic dimensions, similar to the Online client.
+ long nTilePixelWidth = 512;
+ long nTilePixelHeight = 512;
+ long nTileTwipWidth = 3840;
+ long nTileTwipHeight = 3840;
+
// Estimate the maximum tiles based on the number of parts requested, if Writer.
if (pDocument->getDocumentType() == LOK_DOCTYPE_TEXT)
max_tiles = static_cast<int>(ceil(max_parts * 16128. / nTilePixelHeight)) * ceil(static_cast<double>(nWidth) / nTilePixelWidth);