481 Commits

Author SHA1 Message Date
Noel Grandin
3e9e667af2 loplugin:unusedmethods SfxLinkUndoAction
Change-Id: I1ad7c2452dd9bc80e7404f41484b9667adbcfa7b
Reviewed-on: https://gerrit.libreoffice.org/25542
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-30 06:34:32 +00:00
Noel Grandin
9eb2e683ab tdf#34465 remove calls to SfxItemSet::Put(const SfxPoolItem&, sal_uInt16)
and put an assert in SfxPoolItem::SetWhich() so nothing new
creeps in.

Change-Id: I6497650fa61ffb2b6941ffff2d471c8f117be1df
Reviewed-on: https://gerrit.libreoffice.org/24324
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-27 07:21:45 +00:00
Noel Grandin
74713b34a3 loplugin:unusedmethods
Change-Id: Ib36bc0e87d00abb638cbfec511cd13b6179eabda
Reviewed-on: https://gerrit.libreoffice.org/25431
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-26 07:50:33 +00:00
Noel Grandin
2c8fe2e737 update unusedmethods plugin to deal with constructors
and fix the operator< implementations in some of the other
plugins too.

Change-Id: Ie5631e0cdc8d2a994ad2af2533cdb558a6cfc035
Reviewed-on: https://gerrit.libreoffice.org/25057
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-18 10:03:44 +00:00
Laurent Balland-Poirier
8f8fa5674d tdf#88657 calculate denominator length
Get length of denominator which could be different from numerator length

Change-Id: I9f5c10917185eb029d52efbc0f20be5f81c74d10
Reviewed-on: https://gerrit.libreoffice.org/24712
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2016-05-09 14:07:14 +00:00
Noel Grandin
bcb41235de convert SfxStyleFamily to scoped enum
and update the RSC compiler to accept such

In the process fix some confusion in SD where it was confusing
SfxStyleFamily and the index of the relevant family
(which other parts of the code in SVL use)

Change-Id: I1efc9f85fbed8ab76eafe8f6e1ada411753ae5f9
2016-05-09 10:17:13 +02:00
Stephan Bergmann
d916619658 No need to explicitly delete ctor the compiler wouldn't implicitly declare
Change-Id: Idd0e764765bd76e1f6a2d8ec6e18ebac27b91ec6
2016-05-04 14:24:47 +02:00
Jochen Nitschke
12c222a3ae C++11: disable ctors with delete in include/
replace the old declare and don't implement pattern
with C++11 delete keyword
no need to hide this design choice behind access restrictions

Change-Id: I7e8430a07189aa48514a4613c3a8c2950b230f49
Reviewed-on: https://gerrit.libreoffice.org/24495
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-05-03 20:12:22 +00:00
Laurent Balland-Poirier
48435bfddf tdf#97835 No decimal separtor for empty decimal
If decimal part is empty (with #) decimal separator should not be added.
It was not removed if there was text after value.

Change-Id: I891cad8b6bec0f27f4cef8aea80c5dad264f062d
Reviewed-on: https://gerrit.libreoffice.org/24586
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2016-05-03 12:18:52 +00:00
Laurent Balland-Poirier
3beb146b34 tdf#31449 Correctly test if fraction has no integer part
Test if fraction format has no integer part is modified
to take into account all cases: ??/?? or ##/##
and do not detect false positive like ? ??/??

Change-Id: Ia8677a5ad496e5df56ce6bf1290323555e46ba0a
Reviewed-on: https://gerrit.libreoffice.org/24540
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2016-05-03 11:54:41 +00:00
Noel Grandin
fe8896bab0 loplugin:passstuffbyref in svl
Change-Id: I1434d96ae800d8e155262831472cf632d640b4c5
2016-04-13 13:27:52 +02:00
Stephan Bergmann
634c164990 Avoid reserved identifiers
Change-Id: I15faa079a6e124b10bcd50bad19cf1301bafc500
2016-04-12 20:03:41 +02:00
Noel Grandin
bfff081e74 clang-tidy performance-unnecessary-value-param in svl
Change-Id: I8abc272d12e62e25be358dc4c73008971f1cd609
2016-04-11 11:38:57 +02:00
Noel Grandin
88e3b846b8 remove some dead bits of DDE
Change-Id: Ieb1d4e23f1a62b56d14a655a676d9c7d5f33c51c
Reviewed-on: https://gerrit.libreoffice.org/23849
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-06 11:46:53 +00:00
Noel Grandin
1e55aad799 loplugin:constantparam in svl
Change-Id: I6c336034a12fda493825b4a8388d3bde6bead910
Reviewed-on: https://gerrit.libreoffice.org/23729
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-04 12:15:42 +00:00
Jan Holesovsky
43c64fa24d Revert "tdf#98458 sw: make search in shape text optional"
Actually there seems to be a simpler solution to the immediate performance
problem which I'll commit next.

It still might be necessary to introduce the search switch at some stage, but
first let's see if there are complaints.

This reverts commit 8e0b08c3053ed5472409b1ea7e02653aad38f7d6.
2016-03-17 18:10:11 +01:00
Noel Grandin
07da25064f loplugin:constantparam in svl
Change-Id: If23e43beb401047825641817e09d7fdeb904f9d9
Reviewed-on: https://gerrit.libreoffice.org/23317
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-17 09:18:40 +00:00
Miklos Vajna
8e0b08c305 tdf#98458 sw: make search in shape text optional
Instead of forcing it silently on everyone, add a new search option and
enable it only in case it's requested, as shape search is expensive for
large documents.

(Regression from commit bdc1824ea7acfa2fe9d71cdbe57882acce155577.)

Change-Id: Ibb6e76ad5c870dfd63b36429e16ef6d572f5f1fd
2016-03-17 08:34:21 +01:00
Stephan Bergmann
df808bec43 Avoid reserved identifier
Change-Id: Iea66c7230f4570d6a2b88a514958788eb4105ffb
2016-03-10 18:32:02 +01:00
Noel Grandin
c8a93253e4 remove unused NOT_POOLABLE enum value
and simplify the resulting SfxItemInfo field down to a single bool

Change-Id: I73e24e83d39afc7660ac85872ba96bc790713cb2
Reviewed-on: https://gerrit.libreoffice.org/23058
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-09 09:46:53 +00:00
Noel Grandin
96a2aa94b2 loplugin:constantparam in svl
Change-Id: Iefc441262cbdc6f115ea4ca5a673456b59477e13
2016-03-09 10:07:46 +02:00
Noel Grandin
359e0b47a0 loplugin:unuseddefaultparams
Change-Id: Ia414f7845425ef73859ed04853378e96cc738795
Reviewed-on: https://gerrit.libreoffice.org/22971
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-07 09:16:00 +00:00
Noel Grandin
37a6bafea8 loplugin:unuseddefaultparam in various
Change-Id: I03d7381aad055cbe9bd905e4082586073f4112e0
Reviewed-on: https://gerrit.libreoffice.org/22900
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-07 05:56:59 +00:00
Eike Rathke
02caf16fc7 remnants of the past ...
... when OUString had to be automatically converted to String, but
nowadays we can return a const reference instead.

Change-Id: Ic3a68e100bd176b223575da8713c9dbdfe71c3d7
2016-03-01 20:54:05 +01:00
Noel Grandin
c6eb232cb7 loplugin:unuseddefaultparam in svl
Change-Id: Ifc82563c8930332d460df4d97935ba6e9946689f
2016-03-01 11:20:24 +02:00
Stephan Bergmann
9634b37097 loplugin:simplifybool
Change-Id: Ie213b385d666aa17d47e6c85ff1fbdbc31bac0b9
2016-02-26 09:15:53 +01:00
Eike Rathke
393f11f886 add Wildcards to Find&Replace dialog
Enabled only for Calc. Writer needs to be adapted to support wildcards.

The global escape character is '\' set in SvxSearchItem ctor.

Change-Id: I1af78f296deff81e023ee9f0e936f5f506f80c83
2016-02-26 01:41:50 +01:00
Eike Rathke
3a0abd3019 add SvxSearchItem::GetWildcard() SetWildcard()
Change-Id: I0aeb7fbcedad381a385ffe6649ac51e8c961ca11
2016-02-26 01:41:49 +01:00
Eike Rathke
21edff2a37 let SvxSearchItem use SearchOptions2
And all those places that interface to SvxSearchItem.

Change-Id: I08915824a596cd0f247a89f44e4684cd22b98082
2016-02-24 22:42:05 +01:00
Chris Sherlock
a238b1f8d3 Remove excess newlines
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>
2016-02-09 08:18:05 +00:00
Chris Sherlock
538f276ae0 Formatting changes across all modules
+ 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>
2016-02-09 08:11:34 +00:00
Noel Grandin
b14224fe97 loplugin:unusedmethods
using an idea from dtardon:

<dtardon> noelgrandin, hi. could you try to run the unusedmethods clang
plugin with "make build-nocheck"? that would catch functions that are
only used in tests. e.g., i just removed the whole o3tl::range class,
which has not been used in many years, but htere was a test for it...
<noelgrandin> dtardon, interesting idea! Sure, I can do that.

Change-Id: I5653953a426a2186a1e43017212d87ffce520387
Reviewed-on: https://gerrit.libreoffice.org/22041
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-08 06:08:14 +00:00
Noel Grandin
4ff5a55584 loplugin:unusedmethods
Change-Id: Ib2dc804f55d1a96ae01f2cf31b7d55956040a72e
Reviewed-on: https://gerrit.libreoffice.org/21603
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-20 08:13:51 +00:00
Noel Grandin
8bd9eb8334 loplugin:unusedmethods unused return value in include/svl
Change-Id: I759fe8769daccea07c2157bfb5912df8ba285534
2016-01-13 08:44:46 +02:00
Stephan Bergmann
548c43238d Mark some classes as final
...namely exactly those for which fa91dd31f39a24329d288d4e1cda28db3a16af0d
"5th step to remove tools/rtti.hxx" (which is assumed the culprit in tdf#96067
"Crash on undo row inserts") had replaced exact-type checks of the form

  v->Type() == TYPE(X)

with type-or-subtype-of checks of the form

  dynamic_cast<X *>(v) != nullptr

which is only sound if X is a final class.  (Except for one case already handled
differently in 791ad3e170bcb5a2daedac77932dc9822f7f1092 "Stick to exact-type
check.")

Change-Id: Ia822c55c7c0e982d42c6a97589307e577721e324
2016-01-12 14:44:42 +01:00
Andrea Gelmini
64d624b651 Fix typos
Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86
Reviewed-on: https://gerrit.libreoffice.org/21209
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-10 14:17:20 +00:00
Noel Grandin
e18b08363a loplugin:unusedmethods
Change-Id: Ifafdaf6da0225f244853a0042a6458643b570623
2015-12-21 10:20:31 +02:00
Julien Nabet
ded7c4ba32 Typos
Change-Id: I7a161afb520c3f26be0d5846a3ef2300c558a7d2
2015-12-12 23:46:34 +01:00
Noel Grandin
e6721d2d17 uno::Sequence->std::vector in SfxIntegerListItem
Change-Id: Icdbb361feea2ebee74f9d0a906bdd3c2882443e8
2015-12-03 13:57:23 +02:00
Noel Grandin
ec3f724158 loplugin:unusedfields
Change-Id: Icac4ac1a2614e72bc9ff070819533e09eeb1a864
2015-11-30 10:34:38 +02:00
Eike Rathke
2011b5412c introduce SvNumberFormatter::GetFormatStringForExcel()
Taking implementation from sc/source/filter/excel/xestyle.cxx
GetNumberFormatCode(), slightly modified to ensure valid conversion and
force en-US locale data. Also don't unnecessarily convert if format is
for system locale and system locale is en-US.

Change-Id: I9223eaa655132b4106a35c94cb0005559d7575b1
2015-11-27 23:21:35 +01:00
Eike Rathke
b55548043e introduce SvNumberFormatter::FillKeywordTableForExcel()
... to conflate the places that do this on their own.

Change-Id: Idde2173780e0515ad982b4be46fc4df23a7577ad
2015-11-27 23:21:35 +01:00
Noel Grandin
234884c09d loplugin:unusedfields in include/sot,include/svl,include/svtools
Change-Id: Ia2dd13c2c48b127ab85311a668fa1f37608d360a
2015-11-25 08:25:09 +02:00
Noel Grandin
0d62716f67 use unique_ptr for pImpl in svl/
Change-Id: Ieef897314ac0f056c0a09a5182ca59800fd58f41
2015-11-18 08:35:34 +02:00
Oliver Specht
fa91dd31f3 5th step to remove tools/rtti.hxx
tools/rtti.hxx removed
completed the interface of some Sdr.*  Items
and removed pseudo items

Change-Id: I0cdcd01494be35b97a27d5985aa908affa96048a
Reviewed-on: https://gerrit.libreoffice.org/19837
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2015-11-11 10:49:30 +00:00
Stephan Bergmann
bf057fab3c loplugin:nullptr (automatic rewrite)
Change-Id: I0f2f81dae91f62639e79799b1bed1b2df1fd79ab
2015-11-10 10:31:47 +01:00
Stephan Bergmann
a346dfccd7 tdf#70833: IDNA support when exporing hyperlinks to PDF
Any URLs using non-ASCII IDNA syntax need to be resolved to ASCII-only, as PDF
URI Action's URI needs to be "encoded in 7-bit ASCII."

Introduce URIHelper::resolveIdnaHost (svl/urihelper.hxx), which internally uses
icu::IDNA, which requires to bump the minimal --with-system-icu requirement from
4.2 to 4.6, which means ICU_RECLASSIFIED_CLOSE_PARENTHESIS is always true now.

Change-Id: I0e20d9a20ed2b869fba0cc7c969721411db590b3
Reviewed-on: https://gerrit.libreoffice.org/19669
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2015-10-29 13:02:40 +00:00
Noel Grandin
5d5c4686ba remove boost::noncopyable from /include
Change-Id: I9fa22b06fabf79043ebc68be7afebc6e810f4db1
2015-10-29 08:51:55 +02:00
Noel Grandin
c06e2fcc2c com::sun::star->css in include/sot to include/typelib
Change-Id: I9cd92b53370a6b6018d2f7c648890f9c014a27de
2015-10-23 10:48:50 +02:00
Dennis Francis
9a85743766 tdf#48456 : when searching for a number, consider formatting
Change-Id: I4a1e3e269a269bb37e88aa8810a46d0f4ecfc518
Reviewed-on: https://gerrit.libreoffice.org/19420
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2015-10-23 00:24:18 +00:00