/source/hu/

kports LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/sc/source/filter/oox/condformatbuffer.cxx
AgeCommit message (Collapse)Author
2024-10-04tdf#162948: Add support for gte attribute in conditional formatXisco Fauli
Change-Id: I3dd1a9499ec8d3685b84f3745cf4156b75d1f76f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174470 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins
2024-05-17loplugin:ostr in sc/../filterNoel Grandin
Change-Id: I3c986d9e7f9780f08653131205626471ac75896f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167759 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-05-12replace createFromAscii with OUString literals in ScIconSetFormatNoel Grandin
Change-Id: I5af0128c55608bf6192af4dc46f9476393a15afa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167528 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-04-19rename rStyleIdx -> gnStyleIdxNoel Grandin
to make it obvious we are dealing with nasty global state here Change-Id: I7f2193600a6459c3a5cd51fece8151ac46aebe7e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166242 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-26tdf#158237 Use contains instead of find-endRMZeroFour
As part of the efforts in #158237 to replace older parts of the codebase using find() and end() methods, with contains(), this commit does the needed changes for a few files in the sc and sw modulues. Change-Id: Ibf0a432c537879f5bec8e8912d11150733366689 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165223 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-01-16ofz#65809 Direct-leakCaolán McNamara
since: commit c84a1928ea76cf175711942db9ca7bb2f0ec6f0b Date: Tue Oct 3 12:40:25 2023 +0530 sc: condfmt-perf: use a shared cache that... mbReadyForFinalize gets set to true, but the mpFormat is never set into the ScDocument, add a mbOwnsFormat to track successful transfer of ownership. Change-Id: I8f11c68a4253d1ad67ec96825d5036ad468562ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162128 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-09tdf#114441 - Convert sal_uLong to better integer typessahil
Change-Id: I55c758f6391cecb261adca79ae1b93006bcae806 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155979 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2023-06-26sc: filter: oox: fix crash delete ScDatabarFormatDataHenry Castro
Unfortunately, the instance of "ScDatabarFormatData" is deleted before finalizeImport is called. The "maEntries" is not usable, the global format buffer is required to hold the reference. #1 0x7f2ef19081c0 in oox::xls::CondFormatBuffer::finalizeImport() co-23.05-asan/sc/source/filter/oox/condformatbuffer.cxx:1322:23 #2 0x7f2ef1b9999a in oox::xls::WorksheetGlobals::finalizeWorksheetImport() co-23.05-asan/sc/source/filter/oox/worksheethelper.cxx:942:22 #3 0x7f2ef58d030e in sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) co-23.05-asan/sax/source/fastparser/fastparser.cxx:910:36 #4 0x7f2ef23f0e46 in oox::core::FastParser::parseStream(com::sun::star::xml::sax::InputSource const&, bool) co-23.05-asan/oox/source/core/fastparser.cxx:121:15 #5 0x7f2ef23f1544 in Signed-off-by: Henry Castro <hcastro@collabora.com> Change-Id: Ieb3840cc10372867d5462a19d9efa9771f633437 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153601 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-06-19sc: filter: oox: fix setting value to color scaleHenry Castro
The COLORSCALE_VALUE setValue method reset the mpCell that contains formula. Signed-off-by: Henry Castro <hcastro@collabora.com> Change-Id: Idbbfcdc5bce78542ce671753d9a70dcd375e7966 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153281 Tested-by: Jenkins
2023-06-17sc: filter: oox: only insert conditional format if has itemsHenry Castro
Otherwise, the empty conditional format will exists. Signed-off-by: Henry Castro <hcastro@collabora.com> Change-Id: I99d83bd50ce4c12ef9be6924cba31b8847c0ad07 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149720 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151978 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153200 Tested-by: Jenkins
2023-06-16sc: filter: oxx: insert more rules same rangeHenry Castro
If there are rules with the same range to preserve priority order. <conditionalFormatting sqref="I4:I5"> <cfRule type="cellIs" dxfId="5587" priority="1500" operator="equal"> <formula>"GO"</formula> </cfRule> </conditionalFormatting> <conditionalFormatting sqref="E11:I12 E15:I16"> <cfRule type="containsText" dxfId="5586" priority="1457" operator="containsText" text="R"> <formula>NOT(ISERROR(SEARCH("R",E11)))</formula> </cfRule> </conditionalFormatting> <conditionalFormatting sqref="I4:I5"> <cfRule type="containsText" dxfId="5585" priority="1501" operator="containsText" text="R"> <formula>NOT(ISERROR(SEARCH("R",E11)))</formula> </cfRule> </conditionalFormatting> Signed-off-by: Henry Castro <hcastro@collabora.com> Change-Id: Ibb98953f0a50140dbde4d52a79fde968095881d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150436 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151980 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153198 Tested-by: Jenkins
2023-06-16sc: filter: oox: fix conditional color scale same rangeHenry Castro
Otherwise, the condition color scale the priority order will be lost. <conditionalFormatting sqref="G1:G5"> <cfRule type="colorScale" priority="5"> <colorScale> <cfvo type="min" val=""""/> <cfvo type="max" val=""""/> <color theme="5" tint="-0.249977111117893"/> <color rgb="FF92D050"/> </colorScale> </cfRule> </conditionalFormatting> <conditionalFormatting sqref="G1:G5"> <cfRule type="colorScale" priority="1"> <colorScale> <cfvo type="min" val=""""/> <cfvo type="max" val=""""/> <color theme="0" tint="0"/> <color theme="0" tint="0"/> </colorScale> </cfRule> </conditionalFormatting> Signed-off-by: Henry Castro <hcastro@collabora.com> Change-Id: I33fa73bfe8f0bada1cf79bc07be2e43495a4290c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149721 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151979 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153182 Tested-by: Jenkins
2023-06-16sc: filter: oox: fix conditional color scale empty value \"\"Henry Castro
Signed-off-by: Henry Castro <hcastro@collabora.com> Change-Id: I115c3731db85267d115efd24739470bffaeace40 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149718 Tested-by: Andras Timar <andras.timar@collabora.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151976 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153178 Tested-by: Jenkins
2023-06-16sc: filter: oox: do not insert rule too earlyHenry Castro
The </cfRule> tag is a good place to do a post check the conditional format sanity. Signed-off-by: Henry Castro <hcastro@collabora.com> Change-Id: Id6e99c81011040ec47034e993490fae5c71d7e04 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149719 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151977 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153159 Tested-by: Jenkins
2023-06-14sc: filter: oox: update databar format before cloneHenry Castro
The ScDataBarFormatData should update from import (finalizeImport) before cloning, otherwise it loose data. Signed-off-by: Henry Castro <hcastro@collabora.com> Change-Id: I4af8b79e93eed8091bf01244bacac1d12e591c45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149068 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153068 Tested-by: Jenkins
2023-06-14cid#1532384 Out-of-bounds readCaolán McNamara
sizeof returns num of bytes, not num of elements Change-Id: I9dea109e5f322d93ee10680f120b15554efa92e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153064 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-06-13sc: filter: oox: Add a missing tag child of the parent tag "cfvo"Henry Castro
<x14:dataBar maxLength="100" minLength="0" border="1" axisPosition="automatic" direction="context" negativeBarBorderColorSameAsPositive="0"> <x14:cfvo type="num"> <xm:f>0</xm:f> </x14:cfvo> <x14:cfvo type="num"> <xm:f>1</xm:f> </x14:cfvo> <x14:fillColor rgb="FF63C384"/> <x14:borderColor rgb="FF63C384"/> <x14:negativeFillColor indexed="2"/> <x14:negativeBorderColor indexed="2"/> <x14:axisColor indexed="64"/> </x14:dataBar> Signed-off-by: Henry Castro <hcastro@collabora.com> Change-Id: Ie98507e11a5cdeb0d1adc77a44fd79edb2f26d6a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149066 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152998 Tested-by: Jenkins
2023-06-13sc: filter: oox: add missing attribute "indexed"Henry Castro
<x14:dataBar maxLength="100" minLength="0" axisPosition="automatic" direction="context" gradient="0" negativeBarBorderColorSameAsPositive="0"> <x14:cfvo type="autoMin"/> <x14:cfvo type="autoMax"/> <x14:fillColor rgb="FF638EC6"/> <x14:negativeFillColor indexed="2"/> <x14:axisColor indexed="64"/> </x14:dataBar> Signed-off-by: Henry Castro <hcastro@collabora.com> Change-Id: If7f6c8c902e4cd0d775f1014acad3dcd19f13f28 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149065 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152968 Tested-by: Jenkins
2023-06-13sc: filter: oox: add missing tag "fillcolor"Henry Castro
To fill the positive color of the conditional format data bar: <x14:dataBar maxLength="100" minLength="0" axisPosition="automatic" direction="context" gradient="0" negativeBarBorderColorSameAsPositive="0"> <x14:cfvo type="autoMin"/> <x14:cfvo type="autoMax"/> <x14:fillColor rgb="FF638EC6"/> <x14:negativeFillColor indexed="2"/> <x14:axisColor indexed="64"/> </x14:dataBar> Signed-off-by: Henry Castro <hcastro@collabora.com> Change-Id: I17e83a01affff292ff941d92f6ae59954aa246ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149064 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152965 Tested-by: Jenkins
2023-02-24crashtesting: null-deref seen on loading forum-mso-en4-399427.xlsxCaolán McNamara
and others. A problem since: commit 8c9a6abf30e9ff1ebd5647f7c271e0d64643860a Date: Thu Feb 2 20:16:04 2023 +0100 tdf#138601 XLSX import: fix priority of conditional formatting rules Change-Id: I663b193c5bd7c5c92d3c423e70b0f7a24e3e5d76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147592 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-02-15tdf#138601 XLSX import: fix priority of conditional formatting rulesTibor Nagy
Multiple conditional formattings can intersect or have the same range of cell with different rules. Without sorting the rules by their priority, the cells got bad formatting, e.g. different colors than what was set in MSO. Change-Id: I619359877f1a3e55fc8f895d5ba6f0f4f30e07f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146513 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2022-08-07clang-tidy modernize-pass-by-value in scNoel Grandin
Change-Id: Ia7ff651d1cbc119b36a9f8052594d03650988f59 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137848 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-27add string_view wrappers for rtl::math::stringToDoubleNoel Grandin
Change-Id: I114bec72cb933238675e539a8388a607226827cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133455 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-16make the Color constructors explicitly specify transparencyNoel
to reduce the churn, we leave the existing constructor in place, and add a clang plugin to detect when the value passed to the existing constructor may contain transparency/alpha data. i.e. we leave expressions like Color(0xffffff) alone, but warn about any non-constant expression, and any expression like Color(0xff000000) Change-Id: Id2ce58e08882d9b7bd0b9f88eca97359dcdbcc8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109362 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-24loplugin:stringviewparam extend to comparison operatorsNoel
which means that some call sites have to change to use unicode string literals i.e. u"foo" instead of "foo" Change-Id: Ie51c3adf56d343dd1d1710777f9d2a43ee66221c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-26std::unique_ptr -> std::optionalNoel
Change-Id: I25f8b337a3f9cecb4d7785c18d91dae89ba20799 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104797 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>