Commit Graph

1472 Commits

Author SHA1 Message Date
Stephan Bergmann
77cc71476b LinkUpdateMode is a global setting
Change-Id: Ida1257337c6e0916f2228fe053d9c9f085183af6
2015-06-23 08:26:36 +02:00
Andrea Gelmini
ae150c6a54 Fix typos
Change-Id: Ibfa971952cd330ddf430e7e951c5c235d2ae6bd8
Reviewed-on: https://gerrit.libreoffice.org/16314
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2015-06-18 11:44:56 +00:00
Andrea Gelmini
3fa7b0b70f Fix typos
Change-Id: Id8c7cf460cba5af89891c470e1aaa61b227d356e
Reviewed-on: https://gerrit.libreoffice.org/16310
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2015-06-16 11:25:13 +00:00
Noel Grandin
4729774b24 remove unnecessary check for null when calling delete
Idea originally from caolan.
Found using the following command:
find . -name *.cxx | xargs /opt/local/bin/grep -zlP '(?m)if\s*\(\s*\w+\s*\)\s*delete\s+\w+\;'

Change-Id: I3338f4e22193a6dfd6219c8c75835224a3392763
2015-06-15 14:46:41 +02:00
Caolán McNamara
8d5a2116bc add (and call before dtor) Commit to SvtSearchOptions
i.e. follow up to

commit 465359c35f
Author: Michael Stahl <mstahl@redhat.com>
Date:   Wed Mar 11 16:39:24 2015 +0100

    do not call virtual Commit() from dtors of utl::ConfigItem subclasses

    ~SvtAppFilterOptions_Impl() demonstrates that this is a bad idea, by not
    invoking its subclasses' ImplCommit() but its own.

to avoid assert in SvtSearchOptions dtor

Change-Id: I0eaf93450e1daddb81a9463f2c1df48a334dfb22
2015-06-08 17:35:00 +01:00
Stephan Bergmann
9f356d3e66 loplugin:cstylecast: deal with remaining pointer casts
Change-Id: Ic05bc081ec190cc80d8821630e94f51c8db225b6
2015-06-08 16:29:34 +02:00
Noel Grandin
d5129a9dd6 new clang plugin: loopvartoosmall
Idea from bubli - look for loops where the index variable is of such
size that it cannot cover the range revealed by examining the length
part of the condition.

So far, I have only run the plugin up till the VCL module.

Also the plugin deliberately excludes anything more complicated than a
straightforward incrementing for loop.

Change-Id: Ifced18b01c03ea537c64168465ce0b8287a42015
2015-05-28 12:49:54 +02:00
Caolán McNamara
6c9dfa8ab7 cppcheck: noExplicitConstructor
Change-Id: If947733a205e8ece1845079be95cbc2d6cbd5029
2015-05-26 09:57:21 +01:00
Noel Grandin
24600dcf31 loplugin:constantfunction
Change-Id: I7cb5b0c2cf9ade557173ca596ea5d42d853ff448
2015-05-22 09:59:46 +02:00
Joren De Cuyper
1e49e40c36 tdf#91064: Revert "tdf#89790 DOCX: saving LO version number in app.xml"
This reverts commit 480ca7434a.

Change-Id: I69a16425fc36979d49f409bbd7921495a22a35dc
Reviewed-on: https://gerrit.libreoffice.org/15737
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Joren De Cuyper <jorendc@libreoffice.org>
2015-05-15 18:16:06 +00:00
Stephan Bergmann
9bb254fc85 NOINSTANCE is implied now in IMPL_STATIC_LINK...
Change-Id: Ifb032457d6c1b279c4183282ef2b271c706dd71a
2015-05-10 11:25:47 +02:00
Stephan Bergmann
5eb6bd4db7 lopluign:staticmethods: Handle DECL_LINK
Change-Id: Ib27854a8470f3ff5b208cb949a7bd02f2a86c969
2015-05-08 19:15:32 +02:00
Noel Grandin
498e25e14b fix for CONFIG_MODE constant -> enum conversion
in my commit b35828ba7d
"convert CONFIG_MODE constants to scoped enum"

Change-Id: Iafb6b1643920eb066a2d50150f408161331f9d04
2015-05-07 09:51:08 +02:00
Noel Grandin
0a825b9aae fix windows build
warning C4334: '<<' : result of 32-bit shift implicitly converted to 64
bits (was 64-bit shift intended?)

after my commit 60e659ae35
"convert IMPL_FONT_ATTR constants to scoped enum"

Change-Id: I83f1ea5869fa60c89dbc706020f68cc2c4277f48
2015-05-06 11:41:32 +02:00
Tor Lillqvist
fa405087c6 Add comments about ImplFontAttrs
Change-Id: I32d8b8f4301188245721d31fd234bb1784a1ae8d
2015-05-06 12:14:25 +03:00
Noel Grandin
ba121a3269 convert USER_OPT constants to scoped enum
Change-Id: I85a1c9f89ac79e0e54fcd8dfd1908325fae9a8ac
2015-05-06 09:01:29 +02:00
Noel Grandin
bfcb2a1a75 convert DEFAULTFONT_ constants to scoped enum
Change-Id: Ia33e957f6cf530e2639b3c86d9482f642652cb46
2015-05-06 09:01:29 +02:00
Noel Grandin
9b37c2176e convert SUBSFONT_ to scoped enum
Change-Id: Ic66191ac4cdfa753dc784e7bd1a6dd20f50def6b
2015-05-06 09:01:28 +02:00
Noel Grandin
78706545a6 convert FONTTOSUBSFONT constants to scoped enum
Change-Id: I994bfc76d709d01406404991dbfbd49b15bd03f4
2015-05-06 09:01:27 +02:00
Noel Grandin
60e659ae35 convert IMPL_FONT_ATTR constants to scoped enum
Change-Id: I2b5986ea69dc09e6ba18b23a80029f6551b48152
2015-05-06 09:01:27 +02:00
Noel Grandin
96471119f0 convert CVC_ flags to scoped enum
Change-Id: Iadc9b6240121e9fee91de299b94a9f8629656507
2015-05-06 09:01:26 +02:00
Noel Grandin
b35828ba7d convert CONFIG_MODE constants to scoped enum
Change-Id: I1b0fb976e7bf8d7de06da0c30012e8bba1320498
2015-05-06 09:01:26 +02:00
Noel Grandin
7d426e6fd6 loplugin:staticmethods
Change-Id: I97160fc51dc16ff92b06d44570298eeec637e132
2015-05-05 14:05:20 +02:00
Radu Ioan
480ca7434a tdf#89790 - DOCX: saving LO version number in correct tag in app.xml
Converted existing method that provides application name and version in two functions

Change-Id: I93b70da7c78ee5db3d6eb710a2a2a9f4b7b4fb86
Reviewed-on: https://gerrit.libreoffice.org/15151
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-05-01 22:01:53 +00:00
Stephan Bergmann
3ead3ad52f Gradually typed Link
Turn the Link class into a template abstracting over the link's argument and
return types, but provide default template arguments that keep the generic,
unsafe "void* in, sal_IntPtr out" behvior.  That way, individual uses of the
Link class can be updated over time.

All the related macros are duplicated with ..._TYPED counterparts, that
additionally take the RetType (except for LINK_TYPED, which manages to infer the
relevant types from the supplied Member).

(It would have been attractive to change the "untyped" LinkStubs from taking a
void* to a properly typed ArgType parameter, too, but that would cause
-fsanitize=function to flag uses of "untyped" Link::Call.)

Change-Id: I3b0140378bad99abbf240140ebb4a46a05d2d2f8
2015-04-30 10:20:00 +02:00
Michael Stahl
7368b6ca3f rhbz#1213173: connectivity: Calc driver: prevent document being disposed
... by adding a XCloseListener that vetoes any attempt to close it.

The Calc document can be opened by the user in the UI and closed again.

Change-Id: Ied427b67274d925c911e516c0a50a4c0b2b18db9
2015-04-29 16:13:10 +02:00
Noel Grandin
6bb742b9cb convert STR_EVENT constants to scoped enum
- also add needed infrastructure to o3tl::enumarray so we can use
std::find on it
- move the Impl inside the .cxx file, no need to expose it in the header

Change-Id: I7758a6175849f46723d97b1e657f846524c3b7cd
2015-04-29 10:41:40 +02:00
Stephan Bergmann
cb1507746a SvtSecurityOptions_Impl::m_nSecLevel is of type sal_Int32
Change-Id: I82576e00de006caa6f7f6e414e5399d035aed1bf
2015-04-28 13:44:18 +02:00
Stephan Bergmann
9796e52ab3 loplugin:simplifybool
Change-Id: I56557cd02bbb97d3c3aa4053608cf2dd48c35e7a
2015-04-24 12:36:30 +02:00
Stephan Bergmann
2240118177 Improved loplugin:literaltoboolconversion looking into cond. exprs.
...automatic rewriter fixes

Change-Id: I6b04ca80f08f8a71ff94e309fd52f44d736751ee
2015-04-23 18:39:07 +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
Markus Mohrhard
2f6d3d52be try to find a unique naming scheme for temp files
This should hopefully avoid name clashes during the test runs. During
the test runs two tests can try to access the same temp file which
causes one test to fail. Using the pid as part of the temp file name
should avoid that problem.

Change-Id: I696c3d34e33a5d8e9234238d86f1201ecdfa66ec
Reviewed-on: https://gerrit.libreoffice.org/15455
Tested-by: Jenkins <ci@libreoffice.org>
Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2015-04-21 09:40:54 +00:00
Stephan Bergmann
bfedaea492 improve comment
Change-Id: I451ab0fb0e7ee1a6d20091caa9c1142b16796dc7
2015-04-16 17:11:40 +02:00
Jan Kantert
3e55cf49f4 tdf#89394. fix hangs because of unavailable Windows UNC path.
UNC: \\server.domain\file.odt is stored as file://server.domain/file.odt.
Windows local: C:\folder\file.odt is stored as file:///C:/folder/file.odt.
Linux: /home/user/file.odt is stored as file:///home/user/file.odt.

I cannot find any case where we only have file:// (but not a third slash) on
a local file.

Change-Id: Ib15b3380cb40f1cd37123be7a38426b74fbde5cf

Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2015-04-16 17:11:40 +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
Noel Grandin
869aaf83bd convert SvtModuleOptions::EModule to scoped enum
Change-Id: I9665fc003cb3a44f4db857b24584fa3a70487259
2015-04-07 13:05:34 +02:00
Noel Grandin
4906c24387 convert SvtModuleOptions::EFactory to enum class
and fix issues in iterating through o3tl::enumarray

Change-Id: Ia59ef9be44d8c92c2e406fa71aa92269578e26e3
2015-04-07 13:05:34 +02:00
Julien Nabet
f9ac035b81 Fix "unknown factory" log, declare and use FACTORYNAME_BASIC
Also use FACTORYNAME_STARTMODULE in SvtModuleOptions::ClassifyFactoryByServiceName

Change-Id: I1ab87f13a9a1d071bf6abaae137fc6470101d711
Reviewed-on: https://gerrit.libreoffice.org/15113
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-04-03 09:33:42 +00:00
Stephan Bergmann
54e87df11f Change INetProtocol enumerators to CamelCase
...to avoid clashes with macros and poor warnings about hiding global FILE

Change-Id: I444e8b958f029201b228937e088efabc4b6d3050
2015-04-02 18:33:37 +02:00
Stephan Bergmann
44b3e56bb4 Change INetProtocol to scoped enumeration
...and fix o3tl::enumarray::operator [] const overload

Change-Id: I749b1b9d68686b03a97074253478d9d2d9d32b0b
2015-04-02 16:30:34 +02:00
Noel Grandin
1a18cafecb loplugin:staticmethods
Change-Id: I3ae555fd9f0dc3c11ea301ee1cb2c799fbec820d
2015-04-02 09:38:29 +02:00
Stephan Bergmann
63d4636da8 Replace remaining getCppuType et al with cppu::UnoType
Change-Id: I6b0974024e61e02639106d4ca3abcdcdb8e6fa87
2015-04-01 08:43:09 +02:00
Stephan Bergmann
e39da32bac Reduce to static_cast any reinterpret_cast from void pointers
Change-Id: I9e12cea5aba3b78e1f6ed284aedb7531d107edbf
2015-03-31 13:17:29 +02:00
Stephan Bergmann
b646aa35d0 Clean up C-style casts from pointers to void
Change-Id: I8c40cbe7c6928d89eb280344436a4b68a4884bd1
2015-03-28 19:09:28 +01:00
Stephan Bergmann
720f0e55a0 const_cast: convert some C-style casts and remove some redundant ones
Change-Id: I72a618a0deca795b87ec009105252f4594ecba90
2015-03-26 15:33:40 +01:00
Eike Rathke
dd8c23522f introduce ODFSaneDefaultVersion; ODFDefaultVersion is a mess, mess, mess..
A running ODFVER_LATEST is fine for configuration purposes, but not for
determining how to store a feature.

Change-Id: I8ebc13f900f62f8c36d2cdc50a18855fc6693527
2015-03-22 19:29:39 +00:00
Zolnai Tamás
89399a6ba7 Char highlight: option about export LO character background to MSO formats
Export as highlighting or shading.
Highlighting is the default.

Change-Id: Ib2a38e4cd0d49317288bb565383b690d4222c8ed
2015-03-21 16:19:09 +01:00
Noel Grandin
4e6410ba01 loplugin:constantfunction: unotools
Change-Id: Icf543973dc9edde270016c8af7e4c08c57eff650
2015-03-19 10:45:00 +02:00
Michael Stahl
465359c35f do not call virtual Commit() from dtors of utl::ConfigItem subclasses
~SvtAppFilterOptions_Impl() demonstrates that this is a bad idea, by not
invoking its subclasses' ImplCommit() but its own.

Change-Id: Ic675e9cd3be1494c740a4f289be3bdbf0d1a122b
2015-03-11 16:50:03 +01:00
Michael Stahl
765f6211b1 utl::ConfigItem::Commit() should call ClearModified()
Rename the virtual function, and add a new non-virtual Commit() to do
that.

Change-Id: I09421df781ba965d6ff638b46cd8214fb3a00022
2015-03-11 16:50:00 +01:00