Files
loongoffice/sc/source/core/data/rowheightcontext.cxx
Noel Grandin 68547fa268 tdf#88109 speed up calc autofill
switch from ScFlatUInt16RowSegments to ScCompressedArray

The problem with the underlying mdds::flat_segment_tree data structure
is that it is optimised for bulk-load and then frequent read.
But here we are interleaving reading and updating the data, which means
flat_segment_tree spends a lot of time in its build_tree code.

Change-Id: Ic0d46834a2449e4fa9f84343971417adb48ba2de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94694
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-25 15:55:15 +02:00

39 lines
987 B
C++

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include <rowheightcontext.hxx>
namespace sc {
RowHeightContext::RowHeightContext(SCROW nMaxRow,
double fPPTX, double fPPTY, const Fraction& rZoomX, const Fraction& rZoomY,
OutputDevice* pOutDev ) :
maHeights(nMaxRow, 0),
mfPPTX(fPPTX), mfPPTY(fPPTY),
maZoomX(rZoomX), maZoomY(rZoomY),
mpOutDev(pOutDev),
mnExtraHeight(0),
mbForceAutoSize(false) {}
RowHeightContext::~RowHeightContext() {}
void RowHeightContext::setExtraHeight( sal_uInt16 nH )
{
mnExtraHeight = nH;
}
void RowHeightContext::setForceAutoSize( bool b )
{
mbForceAutoSize = b;
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */