diff options
author | Tor Lillqvist <tml@collabora.com> | 2017-11-26 23:28:05 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2017-11-30 06:34:59 +0100 |
commit | ea55492a6e55290d92a59324b3cb31ed958981ab (patch) | |
tree | 58263fb7ad37f07f93739bfac67ea25ae674127e /sc/CppunitTest_sc_cond_format_merge.mk | |
parent | 42dafb5c7bd218f4d368fbd1113fa4a0fcd7f0cb (diff) |
Deduplicate conditional formats loaded from .ods
If there are several separate conditional format elements that can be
represented as just one (with several ranges), try to do that.
A particular customer document used to take 3 minutes 20 seconds to
load, and it contained so many (tens of thousands) conditional formats
that the Format> Conditional Formatting> Manage... dialog was
practically impossible to use.
Now loading that document takes 15 seconds and there are just a
handful of separate conditional formats.
Also add a simple unit test to verify the deduplication.
Change-Id: I7c468af99956d4646ee5507390f1476caff52325
Reviewed-on: https://gerrit.libreoffice.org/45460
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'sc/CppunitTest_sc_cond_format_merge.mk')
-rw-r--r-- | sc/CppunitTest_sc_cond_format_merge.mk | 116 |
1 files changed, 116 insertions, 0 deletions
diff --git a/sc/CppunitTest_sc_cond_format_merge.mk b/sc/CppunitTest_sc_cond_format_merge.mk new file mode 100644 index 000000000000..bfb7dc2bba3f --- /dev/null +++ b/sc/CppunitTest_sc_cond_format_merge.mk @@ -0,0 +1,116 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# 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/. +# + +$(eval $(call gb_CppunitTest_CppunitTest,sc_cond_format_merge)) + +$(eval $(call gb_CppunitTest_add_exception_objects,sc_cond_format_merge, \ + sc/qa/unit/cond_format_merge \ +)) + +$(eval $(call gb_CppunitTest_use_externals,sc_cond_format_merge, \ + boost_headers \ +)) + +$(eval $(call gb_CppunitTest_use_libraries,sc_cond_format_merge, \ + basegfx \ + comphelper \ + cppu \ + cppuhelper \ + drawinglayer \ + editeng \ + for \ + forui \ + i18nlangtag \ + msfilter \ + oox \ + sal \ + salhelper \ + sax \ + sb \ + sc \ + scqahelper \ + sfx \ + sot \ + subsequenttest \ + svl \ + svt \ + svx \ + svxcore \ + test \ + tk \ + tl \ + ucbhelper \ + unotest \ + utl \ + vbahelper \ + vcl \ + xo \ +)) + +$(eval $(call gb_CppunitTest_set_include,sc_cond_format_merge,\ + -I$(SRCDIR)/sc/source/ui/inc \ + -I$(SRCDIR)/sc/inc \ + $$(INCLUDE) \ +)) + +$(eval $(call gb_CppunitTest_use_sdk_api,sc_cond_format_merge)) + +$(eval $(call gb_CppunitTest_use_ure,sc_cond_format_merge)) +$(eval $(call gb_CppunitTest_use_vcl,sc_cond_format_merge)) + +$(eval $(call gb_CppunitTest_use_components,sc_cond_format_merge,\ + basic/util/sb \ + chart2/source/chartcore \ + chart2/source/controller/chartcontroller \ + comphelper/util/comphelp \ + configmgr/source/configmgr \ + dbaccess/util/dba \ + embeddedobj/util/embobj \ + eventattacher/source/evtatt \ + filter/source/config/cache/filterconfig1 \ + filter/source/storagefilterdetect/storagefd \ + forms/util/frm \ + framework/util/fwk \ + i18npool/util/i18npool \ + oox/util/oox \ + package/source/xstor/xstor \ + package/util/package2 \ + sax/source/expatwrap/expwrap \ + scaddins/source/analysis/analysis \ + scaddins/source/datefunc/date \ + scripting/source/basprov/basprov \ + scripting/util/scriptframe \ + sc/util/sc \ + sc/util/scd \ + sc/util/scfilt \ + $(call gb_Helper_optional,SCRIPTING, \ + sc/util/vbaobj) \ + sfx2/util/sfx \ + sot/util/sot \ + svl/source/fsstor/fsstorage \ + svl/util/svl \ + svtools/util/svt \ + svx/util/svx \ + svx/util/svxcore \ + toolkit/util/tk \ + ucb/source/core/ucb1 \ + ucb/source/ucp/file/ucpfile1 \ + ucb/source/ucp/tdoc/ucptdoc1 \ + unotools/util/utl \ + unoxml/source/rdf/unordf \ + unoxml/source/service/unoxml \ + uui/util/uui \ + xmloff/util/xo \ +)) + +$(eval $(call gb_CppunitTest_use_configuration,sc_cond_format_merge)) + +$(eval $(call gb_CppunitTest_use_unittest_configuration,sc_cond_format_merge)) + +# vim: set noet sw=4 ts=4: |