Commit Graph

1367 Commits

Author SHA1 Message Date
Takeshi Abe
0655f98565 Drop duplicate #includes
Change-Id: I4db77ea1de42676d9d2df70db3f2e1665a3fd983
Reviewed-on: https://gerrit.libreoffice.org/16419
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2015-06-23 10:40:00 +00:00
Andrea Gelmini
aade27554d Fix typos
Change-Id: I60ed5eb658d50cbc7dc572facb5463b7527b4d9b
Reviewed-on: https://gerrit.libreoffice.org/16408
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2015-06-22 12:36:21 +00:00
Andrea Gelmini
9ed033917b Fix typos
Change-Id: I2297bf392a405f02be2450f4624f1c9fc0b512ce
Reviewed-on: https://gerrit.libreoffice.org/16373
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-06-21 19:56:13 +00:00
Miklos Vajna
bcace9acaf Add SwTiledRenderingTest::testGetTextSelection() testcase.
Fails without commit 193b907b2b
(SwXTextDocument::getTextSelection: fix missing editeng forward,
2015-06-18).

Change-Id: I5fdab128471c12901f930b6b4ab4e2304dd3fe64
Reviewed-on: https://gerrit.libreoffice.org/16359
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2015-06-18 16:34:16 +00:00
Takeshi Abe
0980095619 Replace boost::scoped_array<T> with std::unique_ptr<T[]>
This may reduce some degree of dependency on boost.
Done by running a script like:

git grep -l '#include  *.boost/scoped_array.hpp.' \
 | xargs sed -i -e 's@#include  *.boost/scoped_array.hpp.@#include <memory>@'
git grep -l '\(boost::\)\?scoped_array<\([^<>]*\)>' \
 | xargs sed -i -e 's/\(boost::\)\?scoped_array<\([^<>]*\)>/std::unique_ptr<\2[]>/'

... and then killing duplicate or unnecessary includes,
while changing manually
m_xOutlineStylesCandidates in xmloff/source/text/txtimp.cxx,
extensions/source/ole/unoconversionutilities.hxx, and
extensions/source/ole/oleobjw.cxx.

Change-Id: I3955ed3ad99b94499a7bd0e6e3a09078771f9bfd
Reviewed-on: https://gerrit.libreoffice.org/16289
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-06-17 15:50:45 +00:00
Matthew J. Francis
46e12364dc Fix insertion and deletion in IndexedPropertyValuesContainer
The cases for iterating to an element from the end (used for
elements in the second half of the underlying array) had an off by
one error causing the wrong elements to be inserted/removed

Change-Id: Idcbf158cc31afaf02fce3f1975509edf6239d3ae
Reviewed-on: https://gerrit.libreoffice.org/16073
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2015-06-14 15:03:58 +00:00
Caolán McNamara
a941df0f89 cppcheck: noExplicitConstructor
Change-Id: Ie2ae923ad4c1a66e779711de6ff05328ef144dac
2015-06-08 17:35:00 +01:00
Stephan Bergmann
66a0a3726a loplugin:cstylecast: deal with remaining pointer casts
Change-Id: I1ceb4359188b61e15a31750a496021c4394e1a3f
2015-06-08 16:23:52 +02:00
Noel Grandin
81610561ed uno::Sequence provides now begin and end
use begin() and end() when calling std::copy on an uno::Sequence

Inspired by commit b34b648fc3
"uno::Sequence provides now begin and end"

Change-Id: I08e8c3fd6144e77b95a26f85bc0daf6a9edeeb0b
Reviewed-on: https://gerrit.libreoffice.org/16057
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-06-04 06:35:44 +00:00
Stephan Bergmann
cd93d5f36a loplugin:cstylecast: deal with those that are (technically) const_cast
Change-Id: Idbd718042e13e9c107c1a349c113656bf9468614
2015-06-02 11:25:47 +02:00
Caolán McNamara
bfd33a826c callcatcher: update unused code
Change-Id: I735264eb32ebdd165d23a4717f0329f666b8b140
2015-05-25 12:32:53 +01:00
Caolán McNamara
6240967cfc callcatcher: update unused code
Change-Id: I1f2a94cdcd4329af68d946ff0a74ddec4ac1c590
2015-05-24 15:40:22 +01:00
Michael Stahl
708f0d2afd comphelper::PropertySetInfo: convert legacy assertion
Change-Id: I23dbe1b3cf6cc611efe8a39c49f4e5b47bf25a49
2015-05-18 22:20:47 +02:00
Michael Stahl
24dbd76b8d comphelper::PropertySetInfo remove unused parameter
Change-Id: I960b31befe749860e926e5bb567c0b8d0f87867a
2015-05-18 22:20:47 +02:00
Andrea Gelmini
5b1337f7b2 tdf#62475: partial handmade fixes
Change-Id: Ib9af202c43b916b9af4b4e18db35d470a8692fe4
Reviewed-on: https://gerrit.libreoffice.org/15712
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2015-05-15 17:55:15 +00:00
Tor Lillqvist
44724236a0 Add support for progress bar callbacks to LibreOfficeKit clients
The comphelper::LibreOfficeKit bits. Also will need additions to the
libsofficeapp bits in desktop and then to the StatusIndicator implementation
in framework.

Change-Id: I15c2505bbf6439c07d1956685d0a6d2a22aefc58
2015-05-06 17:55:58 +03:00
Stephan Bergmann
c47f7dfb30 sal/log.hxx is what was missing
Change-Id: I11aa264391aa4fcd90d171b9a6d93ed8e430b6cc
2015-05-06 13:46:41 +02:00
Tor Lillqvist
776d74bb55 If using std::random_device fails, fall back to just time(nullptr)
For instance, if using LibreOfficeKit in a chroot jail, there might
not be a /dev/urandom, which causes the std::random_device ctor to
throw a std::runtime_error exception, at least in the libstdc++ I
have.

Change-Id: Icc91a4ddf92ce66c66b6ffb8b4d1a02ab5f29ee9
2015-05-06 12:39:36 +03:00
Norbert Thiebaud
011563a083 seed mt19937 with random data
time(NULL) is a poor seed. It is quite predictable and
multiple instance starting in the same second will get the same seed
and therefore the same pseudo random number sequence

Use std::random_device, witch is meant to provide 'true' random
data.. mix time(NULL) just in case the std implementation is crappy.

PS: sadly std::random_device.entropy() cannot be relied on
as clang and gcc are known to return 0 despite their random_device
being non-deterministic, hence the prophylactic systematic
mixing with time(null)

Change-Id: I44dab9970f8f0388dc1c99e9816d49d1afbecf18
Reviewed-on: https://gerrit.libreoffice.org/15591
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2015-05-05 10:41:56 +00:00
Miklos Vajna
eaf4104582 comphelper::dispatchCommand: allow passing command arguments
Change-Id: I6464c5d1a46fadac2510700101f3c8cc29dd7995
2015-04-22 14:11:47 +02:00
Stephan Bergmann
6ff2d84ade Various #include <sal/log.hxx> fixups
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx>
(and don't make use of it themselves), but many other files happen to depend on
it.  Cleaned up some, but something like

  grep -FwL sal/log.hxx $(git grep -Elw \
    'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF') -- \*.cxx)

shows lots more files that potentially need fixing before the include can be
removed from rtl/string.hxx and rtl/ustring.hxx.

Change-Id: Ibf033363e83d37851776f392dc0b077381cd8b90
2015-04-22 09:57:47 +02:00
Stephan Bergmann
da36fc8c95 No more need for PartialWeakComponentImplHelper here
...since 70626249cd "API CHANGE a11y unpublishing
and add/removeListener rename."

Change-Id: I89d81326d97712abcac94c3436a13905954c55cf
2015-04-21 22:48:02 +02:00
Stephan Bergmann
4592d27dca Get rid of trivial comphelper::in-/decrement wrappers
Change-Id: Id3a12ef9d56c30719f483e610c8a8b08caf05def
2015-04-21 08:56:51 +02:00
Noel Grandin
71b809959b remove unnecessary use of void in function declarations
ie.
    void f(void);
becomes
    void f();

I used the following command to make the changes:

  git grep -lP '\(\s*void\s*\)' -- *.cxx \
    | xargs perl -pi -w -e 's/(\w+)\s*\(\s*void\s*\)/$1\(\)/g;'

and ran it for both .cxx and .hxx files.

Change-Id: I314a1b56e9c14d10726e32841736b0ad5eef8ddd
2015-04-15 11:47:12 +02:00
Tor Lillqvist
cbd8587ffb Move osl::LibreOfficeKit stuff to comphelper for now
Let's see where it actually will be needed. Sal is a "picky" place for
new API, even inside LIBO_INTERNAL_ONLY.

Change-Id: Ia0c5ee8cfc6ee526c5ad34d2f8aab0b14b5f805b
2015-04-02 13:28:12 +03:00
Noel Grandin
aa1b911b64 loplugin:staticmethods
Change-Id: I1f6c6d13697aa397067478d6b07429120106e6bd
2015-04-02 09:38:29 +02:00
Stephan Bergmann
7bcf64c29a Add isReadOnly() support to simplified configuration access
[API CHANGE]: extends the css.configuration.XReadWriteAccess in an incompatible
way, but that is unpublished, has been commented as "still unpublished and
unstable," and was specifically introduced for internal use by the simplified
configuration access, so should not affect 3rd party code.

Change-Id: I99ce045f5bd8c598e689d46fb0d3626dfaa6d0a0
2015-04-01 14:26:26 +02:00
Stephan Bergmann
a88a386c72 Replace remaining getCppuType et al with cppu::UnoType
Change-Id: I8dd0e5c8837fe1615aa9d5f546c2fd1c0985f044
2015-04-01 08:36:11 +02:00
Caolán McNamara
026b17b7d7 V597: introduce a rtl_secureZeroMemory
Change-Id: Id28046eb318cd3b2ed0b813fd266617547cf6ee2
2015-03-31 13:38:01 +01:00
Stephan Bergmann
581c5075bb Reduce to static_cast any reinterpret_cast from void pointers
Change-Id: I062024d4768374e319b6c67ed8c7abcc89f9d552
2015-03-31 13:12:34 +02:00
Stephan Bergmann
962b77340f Clean up C-style casts from pointers to void
Change-Id: Icdb619101a992a740c71545e669e138cb5dc63a6
2015-03-28 19:09:18 +01:00
Noel Grandin
c4a9241f72 new clang plugin: staticmethods
Genius suggestion from Tor Lillqvist, write a clang plugin that finds
methods that can be static.

Change-Id: Ie6684cc95d088e8750b300a028b49f763da00345
2015-03-27 10:51:08 +02:00
Caolán McNamara
944d1fd5ca fix windows build and sal_Bool->bool
Change-Id: If88a5b1171ef0b586861dd071820bc993c4cf06e
2015-03-19 10:21:13 +00:00
Noel Grandin
4d2de58163 fix windows build
after my commit 48bb2913a7
"convert SFX_FILTER_ constants to enum class"

Change-Id: Ieaf524e076f5ecfe16b312a310cd6f5cb8bd637d
2015-03-19 09:56:24 +02:00
Noel Grandin
48bb2913a7 convert SFX_FILTER_ constants to enum class
Change-Id: I7e53cfc90cefd9da7d6ecd795b09214bd44b1613
2015-03-19 08:25:03 +02:00
Jan Holesovsky
a250e9d3ec Factor out the .uno: command dispatching to a separate function / file.
Change-Id: I8486933d57d42992e66be7f17443320cfc2ad629
2015-03-16 09:38:09 +01:00
Swachhand Lokhande
b1534edf52 tdf#89592 Using initializer_lists to populate Sequence<PropertyValue>
Change-Id: Idef9dd55eb1719eaf592bc4a86440cbd5aa4fb32
Reviewed-on: https://gerrit.libreoffice.org/14781
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-03-10 10:26:59 +00:00
Caolán McNamara
d22519f62b V801: Decreased performance
Change-Id: Id8cd45d2844c121f63684734ab3546c24a1aab32
2015-03-09 22:04:31 +00:00
Michael Stahl
802fe48751 comphelper: compare implemented as subtraction
Change-Id: Ic7abd7dd588339e06b6764659829f35b4ea87adb
2015-02-27 11:25:49 +01:00
Noel Grandin
ba233e87ef remove unnecessary parenthesis in return statements
found with
$ git grep -lP 'return\s*\(\s*\w+\s*\)\s*;'

Change-Id: Ic51606877a9edcadeb647c5bf17bc928b69ab60e
2015-02-23 09:26:58 +02:00
Caolán McNamara
01a8bda416 boost::noncopyable->'= delete'
Change-Id: If0f898a1e912fcd2095d8ba88b2b8046596e16ea
2015-02-16 12:54:45 +00:00
Caolán McNamara
a1ceacc17e boost::foo_ptr->std::foo_ptr
Change-Id: I9219619b538b6530a89f5932ac51eb3b62eb396a
2015-02-16 12:54:44 +00:00
Caolán McNamara
f8b80701e0 these can all be made const
Change-Id: I6a8af82e8612196f20143f4997eb95c80a2ca13d
2015-02-12 10:53:18 +00:00
Michael Stahl
e81888278d comphelper: add SAL_INFO for exception when graphic cannot be loaded
Change-Id: Ia0a4834987ae040a31e19276ece20b74b59ca445
2015-02-11 15:12:07 +01:00
Stephan Bergmann
e92e1959ca loplugin:deletedspecial
Change-Id: I0aeba0c65b19c1107f617ed0af0028cced9bd434
2015-02-07 12:35:57 +01:00
Matthew Pottage
4f7a1f5b94 fdo#75757: Remove inheritance from std::vector
Deprecated comphelper/sequenceasvector.hxx.

Rewritten code using it. Using instead the functions containerToSequence and
sequenceToContainer, found in include/comphelper/sequence.hxx.

One class that inherits from it (in framework/inc/stdtypes.h), and
the code using that has been left.

Signed-off-by: Michael Stahl <mstahl@redhat.com>

Conflicts:
	writerfilter/source/dmapper/DomainMapper.cxx
	writerfilter/source/dmapper/TblStylePrHandler.hxx
	writerfilter/source/dmapper/WrapPolygonHandler.hxx

Change-Id: Ice61c94ffb052e389281aebb7cdf185134221061
2015-02-06 23:06:58 +01:00
Caolán McNamara
c7258cfccd shared_ptr<T>(new T(args)) -> make_shared<T>(args)
and boost:make_shared->std::make_shared

Change-Id: Ic1e187c52c856a7b27817967b2caa8920f23a98d
2015-02-06 16:45:13 +00:00
Caolán McNamara
4d6a509efe convert all remaining BOOST_STATIC_ASSERT to static_assert
and we can include a few less headers

Change-Id: Id742849ff4c1c37a2b861aa3d6ab823f00ea87f8
2015-02-05 22:21:49 +00:00
Michael Stahl
893362bc39 comphelper: do not use "r" prefix for uno::Reference
Change-Id: I5e92ca9dbb0c9f33c9511cc4b12db1433e40fa68
2015-02-05 15:29:53 +01:00
Stephan Bergmann
876413440d Some more loplugin:cstylecast: comphelper
Change-Id: I6d3ffb195a7c9a3c44744d296fb9d9eca00115cd
2015-01-20 09:06:46 +01:00