A ridiculously fast way of doing this is:
for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \
--exclude-dir=workdir --exclude-dir=instdir '^
{3,}' .)
do
perl -0777 -i -pe 's/^
{3,}/
/gm' $i
done
Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c
Reviewed-on: https://gerrit.libreoffice.org/22224
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
+ Removed comment cruft
+ Tab formatting in number of files
+ Some commented out code removed
+ Tab characters replaced with spaces
+ Newline cleanup in quite a few files
+ Tweak header guard #endifs
Change-Id: I3208ff2f047da890edcc49b73389aca22442f5fc
Reviewed-on: https://gerrit.libreoffice.org/22221
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
detect when we can convert a new/delete sequence on a local variable to
use std::unique_ptr
Change-Id: Iecae4e4197eccdfacfce2eed39aa4a69e4a660bc
Reviewed-on: https://gerrit.libreoffice.org/19884
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
... and add description to clarify that it exists for interoperability
and for new documents WEEKNUM should be used instead.
Also NETWORKDAYS_ADD to NETWORKDAYS_XCL.
Change-Id: I01e705d57f0b31983950ac0e47ecb894f657de88
Sun bug numbers without any accompanying text are completely useless.
Fixed with
git grep -lP '//\s*#\d+#\s*$'
| xargs perl -i -ne'/\/\/\s*#\d+#\s*$/d or print'
And then hand-checking the result to restore places where it deleted code.
And then some more grepping and hand-editing to kill the others.
Change-Id: Ia96ce4466db8bb8da363ebf41f0ae7f45f28bf29
Reviewed-on: https://gerrit.libreoffice.org/19023
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
This time the existing collection used a vector internally and mapped
operations onto its standard interface.
Removing it in favour of a raw typedef'd vector and find_if reduces the
volume of code and simplifies the lookup mechanism.
Change-Id: I86fdb85773577019073803c2fc249d04196afe31
Reviewed-on: https://gerrit.libreoffice.org/17680
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
- Removed now-unused ScaList type
- Changed ScaFuncDataMap from a map to a vector, using find_if for
lookup.
Change-Id: Ia22763f221f9a58d85dc363cab2585d7df37877c
Reviewed-on: https://gerrit.libreoffice.org/17678
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: David Tardon <dtardon@redhat.com>
Removed the ScaList type.
Migrated the ScaFuncDataList to a vector and changed lookup to
std::find_if with a functor. This reduces memory use slightly and makes
the use of the lookup result a little simpler.
Change-Id: I4e5f4d27107512a7c53935f123d5e7e8aca625ee
Reviewed-on: https://gerrit.libreoffice.org/17652
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
This repeats the same change in the pricing addin as already carried out
in datefunc.
This type was a special case of a custom implemented list, and wasused
like a map. I have replaced it with a std::map typedef'd as
ScaFuncDataMap.
Since the map key also exists in the value object, there are more
memory-efficient ways to implement this with a vector and a predicate
functor for searching at the cost of some code complexity. I opted for
the simpler code afforded by using a std::map implementation.
Change-Id: I7d28e0bc58f713cf4f4e962302e09788b3ac4218
Reviewed-on: https://gerrit.libreoffice.org/17651
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
This type was a special case of a custom implemented list, and was used
like a map. I have replaced it with a std::map typedef'd as
ScaFuncDataMap.
Since the map key also exists in the value object, there are more
memory-efficient ways to implement this with a vector and a predicate
functor for searching at the cost of some code complexity. I opted for
the simpler code afforded by using a std::map implementation.
Change-Id: Idd450f4a908ff503cb02e8e363ddbe3512903f47
Reviewed-on: https://gerrit.libreoffice.org/17579
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>