Commit Graph
3045 Commits
Author SHA1 Message Date
Michael Meeks 25e4b59b2e First cut at annotating 'exotic' filters.
The idea being that we can improve security by warning for these.

Change-Id: I7d993417bfb6a8fe868bc3e07ccbcfe71bf285ff
Reviewed-on: https://gerrit.libreoffice.org/50387
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2018-03-16 21:33:50 +01:00
Julien Nabet c775efffa7 Modernize a bit filter (part1)
mainly by using for-range loops
+ some algo simplifications

Change-Id: Ibbf2c4bb504b93cb9d7b2314deb6e65257c56029
Reviewed-on: https://gerrit.libreoffice.org/51243
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-03-14 07:02:25 +01:00
Andras Timar 4547fa2c1e Let sysadmins disable individual file format filters
It makes sense to disable a filter, as a temporary security measure,
when there is a 0-day vulnerability in it.

E.g., when 0-day found in AbiWord filter, this config snippet disables it:
<item oor:path="/org.openoffice.TypeDetection.Filter">
    <node oor:name="Filters">
        <node oor:name="AbiWord">
            <prop oor:name="Enabled" oor:finalized="true">
                <value>false</value>
            </prop>
        </node>
    </node>
</item>

Change-Id: I8b84250c7e4aac3555877d23f58ed13a2210ebfc
Reviewed-on: https://gerrit.libreoffice.org/50961
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2018-03-09 11:49:46 +01:00
Andrea Gelmini 240e67e37e Fix typos
Change-Id: I005023337dbe593e0ac1d76f7b10848d24f314a5
Reviewed-on: https://gerrit.libreoffice.org/50785
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-03-06 09:42:04 +01:00
Andrea Gelmini 624f84c07e Fix typos
Change-Id: I078626eaa3155cc429320cc8c1532003b382b22a
Reviewed-on: https://gerrit.libreoffice.org/47855
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-16 12:40:51 +01:00
Andrea Gelmini a6b69a9384 Fix typo
Change-Id: I51c97356c9c2939f2d94d6388c829a179ca00daa
Reviewed-on: https://gerrit.libreoffice.org/47853
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-01-15 13:53:21 +01:00
Stephan Bergmann 5906792ea5 More loplugin:cstylecast: filter
Change-Id: I65244623321e409b48915abea3dee49abee47249
2018-01-15 09:05:39 +01:00
Stephan Bergmann c578d1c812 More loplugin:cstylecast: filter
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable
loplugin:cstylecast for some more cases" plus
solenv/clang-format/reformat-formatted-files

Change-Id: I39cc98d11a608d5fdad11c621b4cbde285204095
2018-01-12 20:24:12 +01:00
Andrea Gelmini dbe0201d3a Fix typos
Change-Id: I766862d255ac285329ae423629c7445837ddd55f
Reviewed-on: https://gerrit.libreoffice.org/47280
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2018-01-05 11:03:10 +01:00
Andrea Gelmini d0222ba1fd Fix typos
Change-Id: I3d16dc162e5fa2e08134d848a835eb392e64056e
Reviewed-on: https://gerrit.libreoffice.org/47126
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-29 09:54:33 +01:00
Kohei Yoshida 152c79ee2b Initial step on enabling the orcus-based Excel 2003 XML filter.
Still some work remains in the orcus interface implementation code
in sc.

Change-Id: Idc4d95b489e8e55fbe3593557399610abe6c4ae0
Reviewed-on: https://gerrit.libreoffice.org/46655
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
2017-12-18 02:30:39 +01:00
Stephan Bergmann 6f4f5677ac No need to keep these whitelisted functions decorated with SAL_CALL
The only effect SAL_CALL effectively has on LO-internal code is to change non-
static member functions from __thiscall to __cdecl in MSVC (where all other
functions are __cdecl by default, anyway).  (For 3rd-party code, it could be
argued that SAL_CALL is useful on function declarations in the URE stable
interface other than non-static member functions, too, in case 3rd-party code
uses a compiler switch to change the default calling convention to something
other than __cdecl.  But loplugin:salcall exempts the URE stable interface,
anyway.)

One could argue that SAL_CALL, even if today it effectively only affects non-
static member functions in MSVC, could be extended in the future to affect more
functions on more platforms.  However, the current code would already not
support that.  For example, 3af500580b
"loplugin:salcall fix functions" changed FrameControl_createInstance in
UnoControls/source/base/registercontrols.cxx to no longer be SAL_CALL, even
though its address (in ctl_component_getFacrory, in the same file) is passed to
cppuhelper::createSingleFactory as an argument of type
cppu::ComponentInstantiation, which is a pointer to SAL_CALL function.

Change-Id: I3acbf7314a3d7868ed70e35bb5c47bc11a0b7ff6
Reviewed-on: https://gerrit.libreoffice.org/46436
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-14 13:03:06 +01:00
Miklos Vajna 14daba5bd0 Related: tdf#114428 filter: associate .xhtml with HTML import
Since there is no XHTML import; and this way the expensive "deep"
detection (that calls into all the DLP libs, etc) can be avoided.

Times for a hello world input: 56 -> 23 ms is spent in
Desktop::loadComponentFromURL() (41% of original).

Change-Id: Ia2dec3837cf0c548ae2c5a0ca4d47a57a6cbb92a
Reviewed-on: https://gerrit.libreoffice.org/46387
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-12-14 09:09:59 +01:00
Noel Grandin 3af500580b loplugin:salcall fix functions
since cdecl is the default calling convention on Windows for
such functions, the annotation is redundant.

Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d
Reviewed-on: https://gerrit.libreoffice.org/46164
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-11 12:13:46 +01:00
Noel Grandin 68f8645752 new loplugin salcall: remove unnecessary SAL_CALL
In this first commit, I use the plugin to verify the consistency of our
SAL_CALL annotations.
The point being to make the next commit more mechanical in nature,
purely using the rewriter.

There are various chunks of unix-only code that have never had to be
compiled by MSVC, hence the inconsistencies.

In bridges, I had to inline some typedefs to make the verification code
happy, since it cannot see into typedefs.

Change-Id: Iec6e274bed857febf7295cfcf5e9f21fe4a34da0
Reviewed-on: https://gerrit.libreoffice.org/45502
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-04 07:24:52 +01:00
Gabor Kelemen 1764c0358d tdf#80713 Translate a few file format names
These are visible in Tools > Options > Load/Save > General > 'Always save as'

Change-Id: I879200a535b46b54653c9e0947a2e8064c72ac91
Reviewed-on: https://gerrit.libreoffice.org/45543
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2017-12-01 21:56:11 +01:00
Katarina Behrens 9e5e92c4a1 Support for GPG encryption in more ODF filters
not only Writer but also Calc, Impress, Draw and Math

Change-Id: I7f9fe86ffe5f9a812a5215617b9e673c73134202
Reviewed-on: https://gerrit.libreoffice.org/45472
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Tested-by: Katarina Behrens <Katarina.Behrens@cib.de>
2017-11-29 22:14:35 +01:00
David Tardon 8d0e8d5d29 upload libwps 0.4.8
Change-Id: Ib285c227cd935987311be40df3745316943a54e0
Reviewed-on: https://gerrit.libreoffice.org/45331
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: David Tardon <dtardon@redhat.com>
2017-11-28 08:52:48 +01:00
Caolán McNamara 6f31670783 set new document window as parent for dialogs during load
and exit typedetection early and completely if application quits
while detecting

During typedetection, before loading proper, we have the hidden window as
parent so warnings are not modal to existing windows and they are cancelled on
exit.

Once we do have a window, then reinit interaction handler to have that window
as the parent for any further dialogs.

Change-Id: I5c6711557266bf7d1eb9291f1c454cbfaf766886
Reviewed-on: https://gerrit.libreoffice.org/45148
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-24 09:55:17 +01:00
Andrea Gelmini 11ca1f86f8 Fix typos
Change-Id: I40b3a46d46f0586d086bdbe41876c088f8c1cb58
Reviewed-on: https://gerrit.libreoffice.org/45007
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jens Carl <j.carl43@gmx.de>
2017-11-21 08:48:40 +01:00
Andrea Gelmini d71bcc4dc5 Fix typos
Change-Id: Ia544298334364ece3b3963a4adc00c5e01189b91
Reviewed-on: https://gerrit.libreoffice.org/44654
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mark Page <aptitude@btconnect.com>
2017-11-13 08:43:17 +01:00
Caolán McNamara 9cb2962197 rename AvoidConfig to Fuzzing
cause that's what its really used for and a couple of cases
are not specifically about avoiding config but avoiding uninteresting
disk acccess and what not

Change-Id: I4c6454f98388579fcd0bf9798321d30408ab65ee
Reviewed-on: https://gerrit.libreoffice.org/44491
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-09 00:16:43 +01:00
Thorsten Behrens d952c0b42a vcl: remove sgf/sgv ancient gfx filters
Change-Id: Ib02986e5b3d54d65982836e22ebcb70eb7a0e7b3
Reviewed-on: https://gerrit.libreoffice.org/44216
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-11-03 05:51:18 +01:00
Noel Grandin 12c7643c51 loplugin:finalclasses in filter,extensions
Change-Id: I2822b8c5a91feaf47466356c01728d32a85bbae9
Reviewed-on: https://gerrit.libreoffice.org/44190
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-02 12:38:30 +01:00
Noel Grandin 87a9979c89 overload std::hash for OUString and OString
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>
2017-10-23 08:15:35 +02:00
Noel Grandin 2c05d758b2 add << operator for css::uno::Exception
Change-Id: Ia23dafd07133779144965682df3b7125a3214235
Reviewed-on: https://gerrit.libreoffice.org/43046
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
2017-10-04 15:18:00 +02:00
Julien Nabet 0e3c3350cd Replace list by vector in typedetection.cxx (filter)
Change-Id: Idfb4c0e26a109157f95f3dfe2cfcdccbb2428502
Reviewed-on: https://gerrit.libreoffice.org/42995
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-10-01 20:07:29 +02:00
Noel Grandin 2684aefcf5 new loplugin unnecessarycatchthrow
Change-Id: Iabab71ee076227bc38447ec109afaea1e53a86a6
Reviewed-on: https://gerrit.libreoffice.org/42643
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-23 09:01:46 +02:00
Samuel Mehrbrodt 28dff3780f Clean up xsl files
* Remove trailing spaces
* Use 4 spaces for indentation everywhere

See discussion at https://lists.freedesktop.org/archives/libreoffice/2017-September/078433.html

Change-Id: I0bb9a0b9b0502cdf0870529cea37ee9c4d1ffdf4
Reviewed-on: https://gerrit.libreoffice.org/41009
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-09-20 16:11:23 +02:00
Eike Rathke 0961cfc50a Writer Web export to PNG,JPG: switch to proper SvFilterOptionsDialog
Change-Id: I6388ad03d4b94556f5a955d06c1f4e0d8c7188b1
Reviewed-on: https://gerrit.libreoffice.org/42501
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2017-09-19 21:32:09 +02:00
Eike Rathke 51c7d52ee1 Writer does not support selection, so don't claim it would
Though it doesn't change anything UI wise.
See also commit cb9d99dbb5

Change-Id: Ic5e0e411325945f91a00b58da5341eeecd7b6623
Reviewed-on: https://gerrit.libreoffice.org/42500
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2017-09-19 21:11:55 +02:00
Eike Rathke 7c8db52424 Writer export to PNG,JPG: switch to proper SvFilterOptionsDialog
With all bells and whistles, instead of the crude size/dpi JPG dialog
even for PNG.

Change-Id: I695a78643e07900822ec9253ac818efd52339cc0
Reviewed-on: https://gerrit.libreoffice.org/42498
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2017-09-19 21:03:00 +02:00
Eike Rathke 52a6c68fb2 Calc: support export to JPEG, just because we can.. tdf#108317 related
Change-Id: I7b78fe3efe97267eca7bf2f085d8375ba7b483ca
2017-09-18 18:46:51 +02:00
Eike Rathke b149201a07 Export to PNG: use proper dialog and filter options, tdf#108317
... and not the crude JPG ones.

The com.sun.star.svtools.SvFilterOptionsDialog service has all we need,
so teach it to cope with non-Graphics source documents and let
ExportDialog handle that as well, just the actual rendering needs to go
via GraphicExportFilter (and effectively DocumentToGraphicRenderer), so
don't let that overwrite the properties set by the filter dialog.
Switching to the dialog then is just a matter of changing the
UIComponent in filter/source/config/fragments/filters/calc_png_Export

The same mechanism probably could be used by Writer as well by adjusting
filter/source/config/fragments/filters/writer_png_Export.xcu and maybe
filter/source/config/fragments/filters/writer_jpg_Export.xcu
in which case the GraphicExportOptionsDialog likely would be moot
then.

Also, it looks like a
filter/source/config/fragments/filters/calc_jpg_Export.xcu
(which doesn't exist yet) could be possible using the same mechanism.

Change-Id: I1fb9b33a6490dc39d7591b2b5913be182bb820e5
Reviewed-on: https://gerrit.libreoffice.org/42421
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2017-09-18 18:10:41 +02:00
Miklos Vajna e6746a0054 EPUB export: initial UI component
EPUBExportUIComponent::execute() still needs to launch an actual dialog,
but otherwise it has enough functionality that only tweaking
maFilterData is necessary in the UNO component to pass custom filter
options to the exporter.

Change-Id: I95af024f5babd66a5aa0b446550f4f0fec45ef43
Reviewed-on: https://gerrit.libreoffice.org/42204
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-09-12 17:16:44 +02:00
Noel Grandin 9c5c905680 clang-tidy modernize-use-emplace in editeng..framework
Change-Id: I7739c4f77c856d34f8484754244df13d8fef840e
Reviewed-on: https://gerrit.libreoffice.org/42151
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-11 09:42:55 +02:00
Andrea Gelmini 5aafb3db7e Fix typos
Change-Id: I4496faa9ce7cad393bf06ca789099b045aea2741
Reviewed-on: https://gerrit.libreoffice.org/41785
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-09-01 17:15:14 +02:00
Katarina Behrens dce78f9caa gpg4libre: Add flag for filters that support GPG encryption
Change-Id: I48518f26a3ccbe430d36fb6657bdeff0943492d3
Reviewed-on: https://gerrit.libreoffice.org/41263
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-08-30 17:56:41 +02:00
Jochen Nitschke c1629e680c filterconfig: drop unused debug macros
logging functionality went in
commit 0056fe28c7
Date:   Mon Feb 7 20:11:01 2011 +0100
    Remove lots of dead code

it was dead since initial commit in 2004

Change-Id: Idd4393854014e997e4e044dc75c16a76dae23e95
Reviewed-on: https://gerrit.libreoffice.org/41633
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-29 10:26:18 +02:00
Aleksas Pantechovskis e59b5b1fc7 integrate libqxp
Change-Id: Ic7479b82d09c1e36d28267434a77bf4bc158adfa
Reviewed-on: https://gerrit.libreoffice.org/41612
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: David Tardon <dtardon@redhat.com>
2017-08-28 08:20:47 +02:00
Noel Grandin 3dcf6dfcee remove unnecessary use of 'this->'
Change-Id: I5c115389af7d24c18ddaf5fbec8c00f35017a5b4
Reviewed-on: https://gerrit.libreoffice.org/40671
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-02 13:45:36 +02:00
Miklos Vajna ba7ebd400d writerperfect: add initial EPUB export filter
It doesn't do anything yet, but EPUBExportFilter::filter() is called.
Actual functionality will be provided by libepubgen later.

Change-Id: I7229dc33c69238c6e98a7bb30fd38473b3c35bfe
Reviewed-on: https://gerrit.libreoffice.org/40630
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-08-01 14:57:14 +02:00
Noel Grandin 00c9cb7318 loplugin:constparams in filter
Change-Id: I0ba463fcaff4c449f762a7969e0feab659b37adf
Reviewed-on: https://gerrit.libreoffice.org/40471
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-27 10:49:12 +02:00
Eike Rathke 4555e4361e Export to PNG: add SUPPORTSSELECTION flag to Calc and Writer filter fragments
Seems this is needed in some obscure (internal dialog?) context to enable the
SelectionBox, see sfx2/source/dialog/filedlghelper.cxx
FileDialogHelper_Impl::updateSelectionBox()

Change-Id: If7c7d5ce5362779c25985c7d492878e31c00f283
Reviewed-on: https://gerrit.libreoffice.org/40417
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2017-07-25 16:24:56 +02:00
Jan Holesovsky 5d0901a75e sd pptm: Add a separate PPTM filter.
Similarly to commit 697173f6fd, we have to
preserve the correct content-type which is not the same for PPTX and PPTM.

This commit also changes sdfilt.component to use the constructor feature.

Change-Id: I4b334540ec07a53d308e6b9dd6403294842bddf8
Reviewed-on: https://gerrit.libreoffice.org/40195
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Reviewed-on: https://gerrit.libreoffice.org/40265
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2017-07-21 19:46:41 +02:00
Noel Grandin dc63cc326e use more OUString::operator== in dbaccess..filter
Change-Id: Ib7b4f2b2403ce766a7db2f6ffc118468e7677776
Reviewed-on: https://gerrit.libreoffice.org/39889
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-13 12:05:42 +02:00
Noel Grandin 7de833a626 simplify calls OUString::copy in foo.copy(x, foo.getLength() - x)
Change-Id: I20318c77dcc3bc2a64336541ef5a3f412bfd9483
Reviewed-on: https://gerrit.libreoffice.org/39803
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-11 14:13:03 +02:00
Noel Grandin 4250b25c6a teach unnecessaryparen loplugin about identifiers
Change-Id: I5710b51e53779c222cec0bf08cd34bda330fec4b
Reviewed-on: https://gerrit.libreoffice.org/39737
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-10 09:57:24 +02:00
Jochen Nitschke db4741043d C++11 remove std::binary_function bases from functors
std::binary_function is deprecated since C++11 and removed in C++17

90% done with regexp magic.
removed obsolete <functional> includes.

The std::binary_function base class was used by deprecated
std::bind2nd, this was solved in individual commits.

The members first_argument_type and second_argument_type were used
in chart2/source/controller/dialogs/DataBrowserModel.cxx:
DataBrowserModel::implColumnLess and are inlined in this commit.

Change-Id: I60ded60a8d4afd59e15ac15a58e18d2498c9be5a
Reviewed-on: https://gerrit.libreoffice.org/39659
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-07 08:31:48 +02:00
Jochen Nitschke c4ddf6cd6d C++11 remove std::unary_function bases from functors
std::unary_function is deprecated since C++11 and removed in C++17

90% done with regexp magic.
removed obsolete <functional> includes.

The std::unary_function base class was used in 3 places:
* chart2/source/tools/DataSeriesHelper.cxx: lcl_MatchesRole
   is used in a std::not1 function helper who uses the members
   return_type and argument_type.
   - replace deprecated std::not1 with a lambda
* chart2/source/tools/ModifyListenerHelper.cxx:
   lcl_weakReferenceToSame used the argument_type member in the
   operator() parameter.
   - inline the parameter type.
* xmloff/source/chart/SchXMLExport.cxx: lcl_SequenceToMapElement
   used result_type and argument_type in operator().
   - inline the types

Also fix compile error with gcc about finding std::for_each.

Change-Id: I073673beb01410c3108e7d0346d9e7d6b9ad2e2f
Reviewed-on: https://gerrit.libreoffice.org/39358
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2017-07-03 12:21:03 +02:00