#!/bin/sh # # 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/. # # This file incorporates work covered by the following license notice: # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed # with this work for additional information regarding copyright # ownership. The ASF licenses this file to you under the Apache # License, Version 2.0 (the "License"); you may not use this file # except in compliance with the License. You may obtain a copy of # the License at http://www.apache.org/licenses/LICENSE-2.0 . # linenum=LINENUMBERPLACEHOLDER UNPACKDIR=/var/tmp/unpack_PRODUCTNAMEPLACEHOLDER diskSpaceRequired=DISCSPACEPLACEHOLDER checksum=CHECKSUMPLACEHOLDER EXTRACTONLY="no" if [ "$1" = "-x" ] then EXTRACTONLY=yes fi # Determining current platform platform=`uname -s` case $platform in SunOS) tail_prog="tail" ;; Linux) tail_prog="tail -n" ;; *) tail_prog="tail" ;; esac # Asking for the unpack directory echo echo "Select the directory in which to save the unpacked files. [$UNPACKDIR] " read reply leftover if [ "x$reply" != "x" ] then UNPACKDIR="$reply" fi if [ -d $UNPACKDIR ]; then printf "Directory $UNPACKDIR already exists.\n" printf "Please select a new directory name.\n" exit 1 fi # Unpacking mkdir -m 700 $UNPACKDIR diskSpace=`df -k $UNPACKDIR | $tail_prog -1 | awk '{if ( $4 ~ /%/) { print $3 } else { print $4 } }'` if [ $diskSpace -lt $diskSpaceRequired ]; then printf "The selected drive does not have enough disk space available.\n" printf "PRODUCTNAMEPLACEHOLDER requires at least %s kByte.\n" $diskSpaceRequired exit 1 fi trap 'rm -rf $UNPACKDIR; exit 1' HUP INT QUIT TERM if [ -x /usr/bin/sum ] ; then echo "File is being checked for errors ..." sum=`$tail_prog +$linenum $0 | /usr/bin/sum` sum=`echo $sum | awk '{ print $1 }'` if [ $sum != $checksum ]; then echo "The download file appears to be corrupted. Please download PRODUCTNAMEPLACEHOLDER again." exit 1 fi fi echo "Unpacking ..." $tail_prog +$linenum $0 | (cd $UNPACKDIR; tar xf -) echo "All files have been successfully unpacked." if [ "$EXTRACTONLY" != "yes" ] then if [ -f $UNPACKDIR/setup ] then chmod 775 $UNPACKDIR/setup $UNPACKDIR/setup fi fi exit 0 /option> LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/sc/source/filter/oox/formulabuffer.cxx
AgeCommit message (Collapse)Author
2024-03-21Related: tdf#160056 this SvNumberFormatter is the one from the ScDocumentCaolán McNamara
and ScCompiler ctor will take that one already. So drop this for clarity. Change-Id: I7fc16b4cd40f08556704bfa2e3ee28d56ed6e947 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164869 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-09-10using decls should come after #includeNoel Grandin
Change-Id: I058551e87bca42adede860f6f299b0f7ae2af3b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156798 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-07-26Resolves: tdf#147955 Recalculate OOXML for bad generators with all 0.0 resultsEike Rathke
Change-Id: I0ad301dddfe986a38303ce1134e080bafbf312de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154944 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2023-02-23Resolves: tdf#153767 Try harder to import OOXML bool shared formula resultEike Rathke
... by setting the result value or if necessary recalculating even if AutoCalc is turned off for the document. Similar for other implicitly recalculating formula types. Also set a boolean number format if none. Change-Id: I2f75735707180eccf4b2c525738ac0b763901230 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147425 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
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-07-14loplugin:moveitNoel Grandin
Change-Id: I2702e716dc669ffbb870d36d060e110288d7a744 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137043 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-23tdf#122098 xlsx im/export: let formulas guess their number formatJustin Luth
This fixes the import side of a LO 4.2 regression from commit 07b66cd3ac1a9f6c7b61a1d7da6e9d266e6de92d and the export side of a LO 4.3 regression from commit 69ecdad805281b2cb6ec2437da18daa19576deae make CppunitTest_sc_pivottable_filters_test \ CPPUNIT_TEST_NAME=testPivotTableBoolFieldFilterXLSX Change-Id: I4c680dbff844cf1eca52de641856daafa032eeb4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130406 Tested-by: Justin Luth <jluth@mail.com> Reviewed-by: Justin Luth <jluth@mail.com>
2021-09-12clang:optin.performance.Padding in scNoel Grandin
Excessive padding in 'struct ScPreviewLocationEntry' (10 padding bytes, where 2 is optimal). Excessive padding in 'struct oox::xls::FormulaBuffer::SharedFormulaDesc' (8 padding bytes, where 0 is optimal). Excessive padding in 'struct ScOrcusStyles::font' (11 padding bytes, where 3 is optimal). Excessive padding in 'struct ScOrcusFactory::CellStoreToken' (8 padding bytes, where 0 is optimal). Excessive padding in 'struct TokenPool::ExtCellRef' (10 padding bytes, where 2 is optimal). Excessive padding in 'struct TokenPool::ExtAreaRef' (10 padding bytes, where 2 is optimal). Change-Id: Ifce31c799b0f64d3c6971279345391bb74f210c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121994 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-03Consolidate on C++17 std::scoped_lock instead of std::lock_guardNoel Grandin
as in commit 9376f65a26240441bf9dd6ae1f69886dc9fa60fa Change-Id: I3ad9afd4d113582a214a4a4bc7eea55e38cd6ff9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119927 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-29osl::Mutex->std::mutex in FormulaBufferNoel Grandin
Change-Id: Idef0cddac54da4794553394f48d3006b8145b291 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119672 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-14tdf#76047 XLSX import: fix links to external dataAttila Szűcs
in array formulas to avoid loss of cell content. Without using SetExternalLinks in applyArrayFormulas the IDs of the linked files were not replaced with file names. Co-authored-by: Tibor Nagy (NISZ) Change-Id: I57c304a46899f4171db9ad12e7e187bd6e4c1c15 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104049 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-10-06loplugin:const* make some params and methods constNoel
Change-Id: If621bb2585fda4afef4be9a189c7f4c00008d358 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104029 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-24ScCellFormat::GetString never called with a null ScDocument*Caolán McNamara
and similar, allowing a few redundant null checks to be dropped Change-Id: Ice0d6d57df112a09d3e1af3d34126b3519529daf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103278 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-18ScCellIterator never passed a null ScDocument*Caolán McNamara
Change-Id: I5d8ea1533fe861cf969c2999343da217c82d54e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103006 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-17ScCompiler ctors never passed a null ScDocument*Caolán McNamara
add one assert to ScXMLConditionalFormatContext where this isn't immediately certain. Change-Id: I2103c5cd42288e0a5d2a1c2e2d2d031f806773bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102906 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-17TokenStringContext never called with a null ScDocument*Caolán McNamara
so we can drop the nullptr check Change-Id: I588619f3e6f701a003447c59f5c0530801b5e1ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102886 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-16ScFormulaCell ctor variants never called with null ScDocument*Caolán McNamara
Change-Id: Ie0814a8948e2a4bcf723f0418c496fbbe85495ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102878 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-13ScFormulaCell ctor variant never passed a null ScDocumentCaolán McNamara
Change-Id: Ic96245d22c717d4360fe73855aaca9eaa1fd206d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102587 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-01-28New loplugin:unsignedcompareStephan Bergmann
"Find explicit casts from signed to unsigned integer in comparison against unsigned integer, where the cast is presumably used to avoid warnings about signed vs. unsigned comparisons, and could thus be replaced with o3tl::make_unsigned for clairty." (compilerplugins/clang/unsignedcompare.cxx) o3tl::make_unsigned requires its argument to be non-negative, and there is a chance that some original code like static_cast<sal_uInt32>(n) >= c used the explicit cast to actually force a (potentially negative) value of sal_Int32 to be interpreted as an unsigned sal_uInt32, rather than using the cast to avoid a false "signed vs. unsigned comparison" warning in a case where n is known to be non-negative. It appears that restricting this plugin to non- equality comparisons (<, >, <=, >=) and excluding equality comparisons (==, !=) is a useful heuristic to avoid such false positives. The only remainging false positive I found was 0288c8ffecff4956a52b9147d441979941e8b87f "Rephrase cast from sal_Int32 to sal_uInt32". But which of course does not mean that there were no further false positivies that I missed. So this commit may accidentally introduce some false hits of the assert in o3tl::make_unsigned. At least, it passed a full (Linux ASan+UBSan --enable-dbgutil) `make check && make screenshot`. It is by design that o3tl::make_unsigned only accepts signed integer parameter types (and is not defined as a nop for unsigned ones), to avoid unnecessary uses which would in general be suspicious. But the STATIC_ARRAY_SELECT macro in include/oox/helper/helper.hxx is used with both signed and unsigned types, so needs a little oox::detail::make_unsigned helper function for now. (The ultimate fix being to get rid of the macro in the first place.) Change-Id: Ia4adc9f44c70ad1dfd608784cac39ee922c32175 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87556 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-15clang-tidy modernize-concat-nested-namespace in scNoel Grandin
Change-Id: I6a9b2b912434c053e20ce06ef03e52451e506693 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86804 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>