V1037 Two or more case-branches perform the same actions. Check lines: 562, 587
Change-Id: I99c433daf9072b4e070a2ba0095d51591ebf7810
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175359
Reviewed-by: David Gilbert <freedesktop@treblig.org>
Tested-by: Jenkins
V768 The variable 'eS' is of enum type. It is odd that it is used as a variable of a Boolean-type.
Change-Id: I959f58e80cd0a2d82e6c9fffe140a442cf4dbb0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175477
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Most of these don't use boost themselves, nor do they need
it transitively since the use of boost::optional was removed
Change-Id: Ic9dee1c4e160b313ec5b91677b02ffdea6c5779d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164440
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
...by moving the char8_t -> char reinterpret_cast out of any potential constexpr
paths into a new TranslateId::getId. And demonstrate constexpr'ability by
making the aCategories var in OApplicationIconControl::Fill
(dbaccess/source/ui/app/AppIconControl.cxx) constexpr. (And there might be more
such cases that could now be made constexpr.)
Change-Id: I0b4e3292faf8f6b901f9b9e934e1aa6bf0f583ff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157862
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
As requested by the user, this patch makes it clearer that both Bottom and Top values may be returned by the RANDBETWEEN and RANDBETWEEN.NV functions, making the Function Wizard and the online Help descriptions more similar.
Change-Id: I730a9a5e42525f890c85c2489ef03797b812917a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141922
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
... but that was associated with de-DE instead.
Change-Id: I9024666b5d33bbabbdb514075fe0598d072dacd5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137706
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
... which is count*sizeof(char*), but luckily this private
function was never used with out-of-bounds values.
Change-Id: Ief3b3de614ca0df00c424f7caabf70e029ea7266
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137703
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
...which were used by ildc, which is gone since
a8485d558f "[API CHANGE] Remove deprecated idlc
and regmerge from the SDK", and have always been ignored as legacy by its
unoidl-write replacement.
This change has been carried out (making use of GNU sed extensions) with
> for i in $(git ls-files \*.idl); do sed -i -z -E -e 's/\n\n((#[^\n]*\n)+\n)*(#[^\n]*\n)+\n?/\n\n/g' -e 's/\n(#[^\n]*\n)+/\n/g' "$i"; done && git checkout extensions/source/activex/so_activex.idl odk/examples/OLE/activex/so_activex.idl
which apparently happened to do the work. (The final two files are not UNOIDL
source files.)
Change-Id: Ic9369e05d46e8f7e8a304ab01740b171b92335cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135683
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Replace the instances of Pi's value as magic number by M_PI
Use M_PI_2 and 2_M_PI instead of calculating these values in code.
Use basegfx functions to convert angle units.
Change-Id: I6cca7cc93704a70ccf3a0571a56a789bc9df51ef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129479
Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
Reviewed-by: Hossein <hossein@libreoffice.org>
Tested-by: Jenkins
...instead of by listing the content somewhat redundantly in the Rdb_*.mk
files, to avoid duplication of logic for components that are only built
conditionally (and thus should only be included conditionally in the
corresponding Rdb). To achieve that, add an "rdb" parameter to
gb_ComponentTarget_ComponentTarget (and to the gb_*_set_componentfile macros
that internally call gb_ComponentTarget_ComponentTarget), which is used to make
the appropriate gb_Rdb_add_component call internally from within
gb_ComponentTarget_ComponentTarget. (As a special case,
gb_CppunitTest_set_componentfile shall not call gb_Rdb_add_component, as that
has already been done by the corresponding gb_Library_set_componentfile call, so
allow the gb_ComponentTarget_ComponentTarget "rdb" parameter to be empty to
support that special case.)
Most Rdb_*.mk files are thus mostly empty now. One exception is
i18npool/Rdb_saxparser.mk, which duplicates some of the Rdb_services content as
needed during the build in CustomTarget_i18npool/localedata.
1c9a40299d "gbuild: create services.rdb from built
components" had already tried to do something similar (in addition to other
things) under a new --enable-services-rdb-from-build option. However, that
approach had four drawbacks that this approach here addresses (and which thus
partly reverts 1c9a40299d):
1 Rdb_services shall not contain the component files of all libraries that are
built. While that commit filtered out the component files that go into
Rdb_ure/services (ure/Rdb_ure.mk), it failed to filter out the component files
that go into others like Rdb_postgresql-sdbc
(connectivity/Rdb_postgresql-sdbc.mk).
2 The code added by that commit to Makefile.gbuild codified the knowledge that
there is an Rdb_services, which is brittle.
3 The code added by that commit to solenv/gbuild/Rdb.mk codified the knowledge
(for gb_Rdb__URECOMPONENTS) that there is an Rdb_ure/services, which is brittle.
4 Introducing an --enable-services-rdb-from-build option needlessly provided
two different ways how the content of Rdb_services is assembled.
The changes done here would leave --enable-services-rdb-from-build as a
misnomer, as it no longer controls how Rdb_services is assembled. I thus
renamed it to --enable-customtarget-components, as that is apparently what it
still does now.
Change-Id: Ia5e8df4b640146c77421fcec6daa11a9cd260265
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126577
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* Replace defined values of PI with M_PI defined in <cmath>
* Use M_PI_2 instead of PI / 2.0
* Instances could be found with:
git grep 3.14 *.cxx *.hxx|grep define
* One instance is ignored:
sc/source/core/opencl/opinlinefun_statistical.cxx
* Replace *(180 / PI) with basegfx::rad2deg()
* Replace 2*PI/360 with basegfx::deg2rad()
* Use atan2 instead of atan where it was more appropriate
+ atan2() handles all 4 quadrants
+ Extra conditions for different quadrants are removed
Change-Id: I083ee2e1427cd36ba0b8c38e4fe5f782d6486075
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124229
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
look for places where the statements inside a block are
not indented
Change-Id: I0cbfa7e0b6fb194b2aff6fa7e070fb907d70ca2f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123885
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
because this is often on a hot path, and we can avoid the splitting and
joining of strings like this.
Change-Id: Ia36047209368ca53431178c2e8723a18cfe8260a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119220
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
/** If a value is a valid argument for sin(), cos(), tan().
IEEE 754 specifies that absolute values up to 2^64 (=1.844e19) for the
radian must be supported by trigonometric functions. Unfortunately, at
least on x86 architectures, the FPU doesn't generate an error pattern for
values >2^64 but produces erroneous results instead and sets only the
"invalid operation" (IM) flag in the status word :-( Thus the application
has to handle it itself.
*/
chart2/source/tools/RelativePositionHelper.cxx
Function name: RelativePositionHelper::getCenterOfAnchoredObject
From here: suppose it's related to the orientation of the chart << 2^64
chart2/source/view/main/LabelPositionHelper.cxx
LabelPositionHelper::LabelPositionHelper
Suppose: setup label position.
There won't be angles grater than 360º.
chart2/source/view/main/PlottingPositionHelper.cxx
PolarPlottingPositionHelper::transformUnitCircleToScene
Suppose: maybe disc chart orientation?
Internal angle should be safe.
chart2/source/view/main/ShapeFactory.cxx
ShapeFactory::getSizeAfterRotation
Suppose: rotate shape
Internal angle should be safe.
drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
Constant 100% safe
sc/source/core/data/documen4.cxx
bool ScDocument::Solver
Suppose: the tangent is being used as numerical derivative (Regula falsi algorithm)
So no impossible angles
scaddins/source/analysis/bessel.cxx
Filtered it out as bad imput
Change-Id: Ib348cca6ce13263d087b6731f93f58d8a15cc725
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118193
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack@redhat.com>
to O[U]String from char array literals, we can convert the char literals
to O[U]StringLiteral and avoid a runtime allocation
Change-Id: I15d8dddb2cd428b90740e39f20daf98e0941aa6d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114125
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Previously, all of the README files have been renamed to README.md
and now, the contents of these files were changed to use Markdown
format. Other than format inconsistency, some README.md files lacked
information about modules, or were out of date. By using LibreOffice
/ OpenOffice wiki and other documentation websites, these files were
updated. Now every README.md file has a title, and some description.
The top-level README.md file is changed to add links to the modules.
The result of processing the Markdown format README.md files can be
seen at: https://docs.libreoffice.org/
Change-Id: Ic3b0c3c064a2498d6a435253b041df010cd7797a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113424
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Renaming all README files for all top level modules to README.md,
applying no content change at this stage to be able to track history
of the files. These files should be edited to use correct Markdown
syntax later.
Change-Id: I542fa3f3d32072156f16eaad2211a397cc212665
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112977
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
... where the object is created in-place, and its type is known
Change-Id: Ifabfcf2f3ad0d60152f14e8d970c1faa42115288
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112256
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
BIN2HEX() and OCT2HEX() were not affected because the string input
is already limited to 10 characters and the converted decimal
can't even reach the limits.
Change-Id: Iba4212e8fc382287a1a454edf91426ba21497ae2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108824
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins