Age | Commit message (Collapse) | Author |
|
Use range-based loop or replace with STL functions
Change-Id: If6b734dab12a7298fce16003d3d175305fbe798d
Reviewed-on: https://gerrit.libreoffice.org/67701
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Id6280424627a3bbcb484d61cee2f2003aa1ca9b6
Reviewed-on: https://gerrit.libreoffice.org/67604
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I0853cf13162bae44cf8a5c44a4546a73f05772d9
Reviewed-on: https://gerrit.libreoffice.org/63780
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I1bf67196e97411aeecc13ed4f91d1088a315e323
Reviewed-on: https://gerrit.libreoffice.org/62839
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
which seem to have snuck back in since the great rounds of removals.
Change-Id: I85f7f5f4801c0b48dae8b50f51f83595b286d6a1
Reviewed-on: https://gerrit.libreoffice.org/62229
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
and improve the rewriter so I spend less time fixing formatting
Change-Id: Ic2a6e5e31a5a202d2d02a47d77c484a57a5ec514
Reviewed-on: https://gerrit.libreoffice.org/61676
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...where "inline" (in its meaning of "this function can be defined in multiple
translation units") thus doesn't make much sense. (As discussed in
compilerplugins/clang/redundantinline.cxx, exempt such "static inline" functions
in include files for now.)
All the rewriting has been done automatically by the plugin, except for one
instance in sw/source/ui/frmdlg/column.cxx that used to involve an #if), plus
some subsequent solenv/clang-format/reformat-formatted-files.
Change-Id: Ib8b996b651aeafc03bbdc8890faa05ed50517224
Reviewed-on: https://gerrit.libreoffice.org/61573
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...warning about (for now only) functions and variables with external linkage
that likely don't need it.
The problems with moving entities into unnamed namespacs and breaking ADL
(as alluded to in comments in compilerplugins/clang/external.cxx) are
illustrated by the fact that while
struct S1 { int f() { return 0; } };
int f(S1 s) { return s.f(); }
namespace N {
struct S2: S1 { int f() { return 1; } };
int f(S2 s) { return s.f(); }
}
int main() { return f(N::S2()); }
returns 1, both moving just the struct S2 into an nunnamed namespace,
struct S1 { int f() { return 0; } };
int f(S1 s) { return s.f(); }
namespace N {
namespace { struct S2: S1 { int f() { return 1; } }; }
int f(S2 s) { return s.f(); }
}
int main() { return f(N::S2()); }
as well as moving just the function f overload into an unnamed namespace,
struct S1 { int f() { return 0; } };
int f(S1 s) { return s.f(); }
namespace N {
struct S2: S1 { int f() { return 1; } };
namespace { int f(S2 s) { return s.f(); } }
}
int main() { return f(N::S2()); }
would each change the program to return 0 instead.
Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c
Reviewed-on: https://gerrit.libreoffice.org/60539
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
now that those functions are entirely malloc/free based, we can skip a
function call layer.
Change-Id: Ib091de0bdf4cdd58cee45185df17d96d3e8af402
Reviewed-on: https://gerrit.libreoffice.org/59576
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
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.
This is a continuation of commit 6ff2d84ade299cb3d14d4110e4cf1a4b8070c030 to be able to remove those unneeded includes.
This commit adds missing headers to every file found by:
grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG')
in files formerly omitted for oversight or non-cxx extension
Change-Id: I327c573f44076c6ccfecf737eafccba2da72e1bd
Reviewed-on: https://gerrit.libreoffice.org/58600
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
|
|
Change-Id: I9e37a3794fd2880aadab53b7fad3051a4dd8d49a
Reviewed-on: https://gerrit.libreoffice.org/45744
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: I0c356b100b732e259646d4ebb5d0aedd4dc4bcdd
Reviewed-on: https://gerrit.libreoffice.org/44302
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
|
|
Change-Id: I539ca8b9dee5edc5fc2282a2b9b0ffd78bad8b11
|
|
no need to explicitly specify it anymore
Change-Id: I6ad9259cce77201fdd75152533f5151aae83e9ec
Reviewed-on: https://gerrit.libreoffice.org/43567
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ief8bd59c903625ba65b75114b7b52c3b7ecbd331
Reviewed-on: https://gerrit.libreoffice.org/41019
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I8d00e616a56cc3edac6ba2149fd6f9ae44c23a95
|
|
* all .ui files go from <interface> to <interface domain="MODULE"> e.g. vcl
* all .src files go away and the english source strings folded into the .hrc as NC_("context", "source string")
* ResMgr is dropped in favour of std::locale imbued by boost::locale::generator pointed at matching
MODULE .mo files
* UIConfig translations are folded into the module .mo, so e.g. UIConfig_cui
goes from l10n target to normal one, so the res/lang.zips of UI files go away
* translation via Translation::get(hrc-define-key, imbued-std::locale)
* python can now be translated with its inbuilt gettext support (we keep the name strings.hrc there
to keep finding the .hrc file uniform) so magic numbers can go away there
* java and starbasic components can be translated via the pre-existing css.resource.StringResourceWithLocation
mechanism
* en-US res files go away, their strings are now the .hrc keys in the source code
* remaining .res files are replaced by .mo files
* in .res/.ui-lang-zip files, the old scheme missing translations of strings
results in inserting the english original so something can be found, now the
standard fallback of using the english original from the source key is used, so
partial translations shrink dramatically in size
* extract .hrc strings with hrcex which backs onto
xgettext -C --add-comments --keyword=NC_:1c,2 --from-code=UTF-8 --no-wrap
* extract .ui strings with uiex which backs onto
xgettext --add-comments --no-wrap
* qtz for gettext translations is generated at runtime as ascii-ified crc32 of
content + "|" + msgid
* [API CHANGE] remove deprecated binary .res resouce loader related uno apis
com::sun::star::resource::OfficeResourceLoader
com::sun::star::resource::XResourceBundleLoader
com::sun::star::resource::XResourceBundle
when translating strings via uno apis
com.sun.star.resource.StringResourceWithLocation
can continue to be used
Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a
|
|
Change-Id: I70d7e50f8c1e019524ccad915f0cca912c5035dc
Reviewed-on: https://gerrit.libreoffice.org/39899
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I70cf54799f08e3bc586d42d6c634eb02a049ea0f
|
|
run it against sal,cppu,cppuhelper
I had to run this multiple times to catch all the cases in each module,
and it requires some hand-tweaking of the resulting output - clang-tidy
is not very good about cleaning up trailing spaces, and aligning
things nicely.
Change-Id: I00336345f5f036e12422b98d66526509380c497a
Reviewed-on: https://gerrit.libreoffice.org/36194
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...from function definitions occurring within class definitions. Done with
a rewriting Clang plugin (to be pushed later).
Change-Id: I9c6f2818a57ccdb361548895a7743107cbacdff8
Reviewed-on: https://gerrit.libreoffice.org/34874
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I8bcea5ffc74d48148bea78da8c17744e288c069a
Reviewed-on: https://gerrit.libreoffice.org/32004
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
As per sberg' suggestion
Limit it to == and !=, because some people like the flow of inequalities
like: "0 < a && a < 42"
The changes to sal/ were made using the rewriter.
The rewriter still has one bug, in pipe.cxx, it managed to pick up
some random piece of macro. No idea why.
Change-Id: I01305f9c5396a4b6c7421d6e92f1b4b529388e82
Reviewed-on: https://gerrit.libreoffice.org/30962
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
'stringByAddingPercentEscapesUsingEncoding:' is deprecated: first
deprecated in iOS 9.0.
Change-Id: I3a95cbd4ff6ff4924bb7fe1a4c1bac4fad405856
|
|
Change-Id: I2641f16530ec7f1087c217a74aeb39b5c3a8aba5
|
|
Change-Id: Ic89d1c3be1939c8989ad5ee806980e8904f8e44d
Reviewed-on: https://gerrit.libreoffice.org/24069
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
|
|
... in modules reportdesign to sdext
Replace with C++11 delete copy-constructur and
copy-assignment.
Remove boost/noncopyable.hpp includes.
Make some overloaded ctors explicit
(most in sd slidesorter).
Add deleted copy-assignment in sc/inc/chart2uno.hxx.
Change-Id: I21d4209f0ddb00063ca827474516a05ab4bb2f9a
Reviewed-on: https://gerrit.libreoffice.org/23970
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
|
|
Change-Id: I7c96181399f4d7e62d4aceca404b22d68f903513
Reviewed-on: https://gerrit.libreoffice.org/23754
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
|
|
(f59136a2ed1e3eb01cc5b62c5a7da07c34cbdfae "tdf#91794 remove OSL_DEBUG_LEVEL > 1
conditionals" had changed it from OSL_DEBUG_LEVEL > 1 to > 0)
Change-Id: I40714993fb55ec27b80d225cec28c64f2959ab73
|
|
Change-Id: I60bb1e303f7a26b4324cccf2858258a375b53f34
|
|
Change-Id: If329cf8257684e7bd2936641b8f14ec3e9b9f733
Reviewed-on: https://gerrit.libreoffice.org/22647
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
|
|
Change-Id: I15a4237a1ab6d7c180b52c3f8d2834c0e034b7db
|
|
Change-Id: I1bc6c87fcd6e5e96362623be94c59be216a3b2b8
|
|
Change-Id: I95283ccf78e4ca699e88ea226d38153a8a92845a
|
|
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>
|
|
...from most rtl/bootstrap.h functions. They are effectively only called from
C++ code (there is no plain C UNO binding), so it should be fine to let std
exceptions (like bad_alloc or length_error) propagate from their implementations
to call sites.
(The exception is rtl_bootstrap_args_close, which is typically called from C++
dtors, so should not throw anyway.)
This would strictly speaking be an [API CHANGE], but it should make no practical
difference whether a process terminates abruptly because an exception cannot
pass through a SAL_THROW_EXTERN_C() nothrow specification or because legacy
client code does not expect exceptions to be thrown from functions from which
SAL_THROW_EXTERN_C() has now been removed.
Change-Id: I08e8479e9c5731e46021aadd6a725c1793024d10
|
|
Change-Id: Ia304622214c47d35387dd0393db8e9afa55118f2
|
|
found with
git grep -E '\* *\<reinterpret_cast\>[^>]+\<OUString\>'
Change-Id: I9306d4ad8e3b1664f54cb7df86f2d79bfd3c6cb9
|
|
Change-Id: Ie54d340478412e62b87d66e287fd8a3963e97898
|
|
Change-Id: I2a059f9332215678936d78990ee36a5ae2161712
|
|
So let's let this for Windows only
Change-Id: I1f76e03b0e3431a6954a75f5cb247ef1a1644a28
|
|
|
|
Change-Id: I28438000c2b0a8e6ce4f5640f861f572c0cb83c8
|
|
This feature had never been documented in include/rtl/bootstrap.h and had only
been used internally in LO on Windows for the multi-layer installations (thus is
unused since 827430c8c0417396b3c1d2a049ccddb818c89646 "Fold URE: Windows"), so
it should not hurt to remove it even if it could be considered part of the
stable URE interface.
Change-Id: If0f59f30dad8b2c3ff5f7931c19cd254073ccf80
|
|
After 2ad716f406e0fdb9b9294876c64ae92fecbf5e27 "Revert 'pyuno: set up fake
command line in getComponentContext(),'" e.g. PythonTest_sw_python would fail on
Windows, where WinSalGraphics::GetDevFontList (vcl/win/source/gdi/salgdi3.cxx)
calls osl_getExecutableFile and is itself called in a python process where
osl_setCommandArgs has not been set up.
This patch makes osl_getExecutableFile on all platforms if osl_setCommandArgs
has not (yet) been set fall back to the code that was
osl_bootstrap_getExecutableFile_Impl (which was called from
sal/rtl/bootstrap.cxx, which can now call osl_getExecutableFile).
Change-Id: I6c1bb59205041b3208c830a8b8406e28128b4566
|
|
Change-Id: Idf514941f4bb05834d8ac0d7bafbe86e34377611
|
|
This reverts commit 05050cdb23de586870bf479a9df5ced06828d498,
not all places that use e.g. OStringToOUString to convert potential UTF-8
are guaranteed to fulfil the prerequisites necessary to use fromUtf8 (and
some places like e.g. in codemaker are happy with the best-effort effect
of OStringToOUString's OSTRING_TO_OUSTRING_CVTFLAGS).
|
|
Change-Id: I771004b7ccab3344a67e827e45bc34c22ffa5f77
|
|
In other words, only executable files go in the MacOS folder. Dynamic
libraries and bundled frameworks (i.e., LibreOfficePython), and
nothing else, go in the Frameworks folder, and all other files go in
the Resources folder.
Especially, note that Java class files and rc (.ini) files also go in
Resources.
Such an app bundle structure is what Apple strongly suggests one
should use, and it has been hinted that future versions of code
signing and/or Gatekeeper will require such a structure.
There is still some ugliness thanks to traces of the historical
separation of URE from "the office". Like there are two separate
"unorc" files, one for URE, one for the LibreOffice application. IMHO,
this should be cleaned up, but is probably controversial.
(Eek! I now see there are actually *three* unorc files in the app
bundle. Not intentional. Need to fix that later.)
Change-Id: Idcf235038deb5b8e1d061734993e9f31869b7606
|
|
Change-Id: I42bff46998b3d516161068af3d53bf92ee2f2b15
|