Commit Graph

1035 Commits

Author SHA1 Message Date
58aea3f36c loplugin:unusedmethods
- improvements to the plugin to find more method calls
- improvements to python script to remove more false+
- fix the FORCE_COMPILE_ALL build flag to include code in
  the $WORKDIR

Change-Id: I4d6015dcb9b9d60c26f0bcee8abad807177a7836
Reviewed-on: https://gerrit.libreoffice.org/19064
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-01 10:43:24 +00:00
ddc2809202 boost->std
Change-Id: Idfbcfa1e5ba7bff92e98693c33c4b33a6beda08f
2015-09-17 14:12:07 +01:00
ee7da352b8 Resolves: tdf#88206 replace cppu::WeakImplHelper* etc.
with the variadic variants.

Change-Id: I7154f9472f02fdf47d27ba715db55bb1ec669a8a
Reviewed-on: https://gerrit.libreoffice.org/18580
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-09-15 06:19:28 +00:00
899c21ce5d dbaccess: replace for_each with range-based for
Replace complex uses of ::std::for_each with a range-based for-loop.

Change-Id: I82331f16cc1994dd9ef36eb80d67b64171cecc74
Reviewed-on: https://gerrit.libreoffice.org/18355
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-09-07 07:18:33 +00:00
8106bfcdf3 loplugin:stringconstant: OUStringBuffer: appendAscii -> append
Change-Id: Icbef0736acd5143200478410d65cfdd2ce10eeee
2015-08-31 08:03:51 +02:00
6900bf41e2 o3tl/cow_wrapper: remove boost dependency
Remove boost dependencies from ::o3tl::cow_wrapper, and add
the necessary includes to files including checked_delete and
noncopyable that do not already include the necessary files.

Change-Id: Iedae4232002792724226829a5d5cf9d16ffd0686
Reviewed-on: https://gerrit.libreoffice.org/18125
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-08-29 22:51:36 +00:00
bd8b93fdff make PostUserEvent Link<> typed
Change-Id: I13f10bda985d55d419a5bff481130a456ae2db8a
2015-08-28 09:49:56 +02:00
fab18ef350 parameter names are useless in DECL_LINK declarations
Change-Id: I77f7b528ed97964bdc153f820f6f96977ddb9254
2015-08-25 11:23:45 +02:00
fe6c124da7 Remove demonstrated-useless comphelper::compare
Change-Id: Ifd1b38afb963255b76f0d821eb46e4c6a972128a
2015-08-21 10:34:04 +02:00
ad1f0d1f1a o3tl: rename compat_functional header
After the cleanup, the stuff there really stands on its own (and the
remaining usage of select1st/2nd is more descriptive than lambdas).

Change-Id: I0aba131d5dc550189f8130d167dc94167e404540
Reviewed-on: https://gerrit.libreoffice.org/17806
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-08-17 16:38:30 +00:00
56af9ab6bb loplugin: defaultparams
Change-Id: Ia66788f5db2da8c6259cd08f655b3cb7cb12ed59
2015-08-14 10:52:47 +02:00
87130a4e18 tdf#92459 Cleanup unclear lambdas
Replace lambdas used to select the first/second member of a pair with
the new simplified select1st/2nd from o3tl/compat_functional. There
should be no side effects due to this change.

Change-Id: I17f37796e0c4defe96a10aa491d192adb9eebb89
Reviewed-on: https://gerrit.libreoffice.org/17656
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-08-11 22:29:12 +00:00
8e08edb1d9 filter,desktop,dbaccess: inline some use-once typedefs
Change-Id: I35f256a11b211c3cb977ae76b5b561efbfd13b9d
2015-08-04 08:55:56 +02:00
7dc5e8731f com::sun::star->css in dbaccess
Change-Id: I4fbdd3fb7d1e0ad4423148aaaed3a15aebb26d14
2015-08-03 13:38:44 +02:00
37ec6cbeeb tdf#91112: pass by const reference to lambdas
Since the function returned by o3tl::compose1 had its parameter
passed by const reference, the same should be done for the lambda
expressions that replace o3tl::compose1. I overlooked this detail
in my previous commits.

Change-Id: I0db5eec4e74d4835e786742ee6de3805215f377f
Reviewed-on: https://gerrit.libreoffice.org/17465
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-03 07:02:57 +00:00
7339c360ef tdf92459 replace select1st/2nd in dbaccess
Replace all uses of deprecated features in the o3tl with lambda
expressions in dbaccess.

Change-Id: I865bb5db5257e985a0eed0110874d6b29892fcfb
Reviewed-on: https://gerrit.libreoffice.org/17483
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-03 06:48:14 +00:00
2660d24a07 new loplugin: refcounting
This was a feature requested by mmeeks, as a result of
tdf#92611.

It validates that things that extend XInterface are not
directly heap/stack-allocated, but have their lifecycle managed
via css::uno::Reference or rtl::Reference.

Change-Id: I28e3b8b236f6a4a56d0a6d6f26ad54e44b36e692
Reviewed-on: https://gerrit.libreoffice.org/16924
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-03 06:37:16 +00:00
a45827b230 loplugin:unusedmethods
Change-Id: Ib4d77ee01e7362f5951f81fceeca3c489872d971
Reviewed-on: https://gerrit.libreoffice.org/17378
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-30 06:23:00 +00:00
38ecca9b30 inline a bunch of use-once macros
no point in having a macro unless it's actually going to reduce the
number of lines of code

Change-Id: Ic8760d6506cf272d7bd088f7b3b4dcbf288099fc
2015-07-27 08:18:16 +02:00
7fa29ecc72 tdf#88206 replace cppu::WeakImplHelper* etc.
with the variadic variants, for dbaccess.

Change-Id: I60921b1b1d3b65fb9087552ed118c60dc9f89032
Reviewed-on: https://gerrit.libreoffice.org/17146
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-17 07:13:29 +00:00
4ca2cf1b7e loplugin:unusedmethods sfx2
Change-Id: I98c455d89f76fbcacf74929a4e8775b4da697f62
Reviewed-on: https://gerrit.libreoffice.org/17069
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-16 05:47:52 +00:00
799cc41b53 Fix typos
Change-Id: I70b03c152f63e48341dc5629a99b0eeab7b497c0
Reviewed-on: https://gerrit.libreoffice.org/16834
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2015-07-08 05:48:18 +00:00
64385c7555 cppcheck: noExplicitConstructor
Change-Id: I999923031c573f361bc421eab84e68a4a130d688
2015-07-05 21:22:31 +01:00
87dc6c82d5 Fix typos
Change-Id: Ideb5688a8c9e7cf10038f2e9d00991e8653b1875
Reviewed-on: https://gerrit.libreoffice.org/16706
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
2015-07-03 09:02:48 +00:00
e71ccd6e45 coverity#1308522 Uncaught exception
Change-Id: I2cab6b55aebc50bd024fe68553040292e40acb4b
2015-06-28 17:55:53 +01:00
f571a17484 tdf#91112 replace o3tl::compose1 with lambdas in dbaccess
Change-Id: Ic4a95272e88cda0080f0faddfb0671e3ff3f9d7c
Reviewed-on: https://gerrit.libreoffice.org/16418
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2015-06-25 10:17:11 +00:00
a51ac4d2bb Add variadic PartialWeakComponentImplHelper, remove need for implbase_var.hxx
Change-Id: Iad3417822b2ab3afb75da09c311a0bf07af5e2e4
2015-06-22 21:48:36 +02:00
90134af864 cppcheck: noExplicitConstructor
Change-Id: I913f983bb0f55e05bb5ec8994ee75a7e7d69bd1b
2015-06-22 15:46:13 +01:00
1f116adb7c callcatcher: update unused code
Change-Id: I29b3f1408b814a1424d8bab232e9ac618901b4c2
2015-06-20 14:20:33 +01:00
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
81b954718f loplugin:unnecessaryvirtuals
Improve the plugin a little.
Create a python script to process the output.
Run it again.

Change-Id: I05c21d8a21c8f4243af739c412fda0a521f9b5f0
2015-06-09 10:06:57 +02:00
8538026000 loplugin:cstylecast: deal with remaining pointer casts
Change-Id: If951c1982314c5a045d51bc4fff62a3e2b265e08
2015-06-08 16:24:31 +02:00
9535d5d1fd \<the the\> -> the
Change-Id: I9d820446411eb7dfca37bb3baf5e994f4ba6f421
2015-06-08 10:29:27 +02:00
cd33c5355f dbaccess: avoid pointless ucbhelper::Content instance in case of embedding
Change-Id: Ibc3d7a0d9b3373f17aa8d1da081946814904e6d5
2015-06-08 09:54:40 +02:00
4101949b2a dbaccess: set correct BaseURI for vnd.sun.star.pkg:// URLs on load
With this, in case the embedded data source definition has an URL like:

<db:file-based-database xlink:href="../../calc-data-source.ods/" db:media-type="application/vnd.oasis.opendocument.spreadsheet"/>

That's resolved to
file:///path/to/directory/of/Writer/doc/calc-data-source.ods correctly.

Change-Id: Ieb67f9f5ae104689c6dadc14ec84c66bec70a687
2015-06-08 09:54:39 +02:00
1f1ad7ac0d dbaccess: let ODatabaseDocument::impl_writeStorage_throw() respect BaseURI
Change-Id: Id30aaa624b9a1b0bbef016ef0b35bd39f19f6439
2015-06-05 13:10:40 +02:00
81610561ed uno::Sequence provides now begin and end
use begin() and end() when calling std::copy on an uno::Sequence

Inspired by commit b34b648fc3262c5d9aa295f621e8fe9c97d4c6b2
"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
b499739c43 dbaccess: add support for storing ODatabaseDocument to a sub-storage
When Writer creates an embedded data source definition, it should be
stored on the storage of the Writer document, so Writer sets the
TargetStorage and StreamRelPath parameters of the storeAsURL() call.

Let ODatabaseDocument::impl_storeAs_throw() and
ODatabaseDocument::impl_writeStorage_throw() respect these, so the save
actually succeeds.

Change-Id: I4568ef96204a219b813142d7b5eebe9f1ec5e22e
2015-06-01 12:30:26 +02:00
1166efc5f9 loplugin:redundantcast: const_cast to same type
Change-Id: Ib80d28bf3680fc7ff1f11f3d143a103075b7ef75
2015-05-29 12:04:19 +02:00
10749bbf82 remove the last of the OUString #defines in header files
Change-Id: Id9e8ce7987e055e83b52c7024413570f262e6e8d
2015-05-19 09:42:41 +02:00
0bfc98e63b loplugin:redundantcast: reinterpret_cast to void*
Change-Id: I947b49cfb15f0e7d6ddfaae386656c70e4bd48ba
2015-05-12 18:27:54 +02:00
66f866d2f5 dbaccess: avoid exceptions during loading embedded data sources
Situation before/after the patch is the same, just silence lots of
harmless warnings for now.

Change-Id: I00428bdfd939d8cdd3bfd447339e0417e70f4689
2015-05-08 19:16:22 +02:00
5c430093a3 dbaccess: move vnd.sun.star.pkg: handling from ODatabaseContext to ODBFilter
This way the data source's URL will be the vnd.sun.star.pkg: URL, that
gets stored in the user profile, and the data source will be usable when
we connect to the data source next time, too.

Change-Id: Ie2f45af453bfad4f813a1ea492edb633c148d08b
2015-05-08 18:19:15 +02:00
12bb6a054d dbaccess, sw: use vnd.sun.star.pkg:// for embedded data source handling
Change-Id: I69eaf2e4dd051d62f56caef962d40889cc3a3876
2015-05-08 17:12:53 +02:00
a20d53afb9 dbaccess: handle URL mark as StreamRelPath in ODatabaseContext
With this, dbaccess can not only load .odb files, but also other ODF
packages as well, as long as the URL's mark (the part after the "#")
contains under what namespace the real .odb is.

This will be used for embedding data source definitions into .odt
documents by Writer in a bit.

Change-Id: Ic1e922418c185fd6ec49d442a3419b80c9a6c76a
2015-05-08 11:34:53 +02:00
2b1bd0fac8 dbaccess: implement ODatabaseDocument::loadFromStorage()
With this, it's finally possible to load a .odb file embedded inside a
.odt.

Change-Id: Ib5eec603ce958abd848e456871aacfad4ab0a8b7
2015-05-05 10:22:47 +02:00
add1351e59 loplugin:staticmethods
Change-Id: Ie6867e04156f40cacee275d5bbf3d63ac4965b30
2015-05-05 09:30:39 +02:00
3d69f625fc dbaccess: allow storing to storage without a root one
In case of embedding a Base document, there is no root storage and
attachResource() is not called with a parameter to be able to make one,
all we can (and have to) do is to store the component to the target
store given as a parameter to storeToStorage().

With this, a .odb embedded in a .odt no longer lost on export. Import is
still broken, though.

Change-Id: I1d92a1d28f27f49609ef70fbf16effb592b9edf5
2015-04-30 15:54:54 +02:00
fa2304aef2 dbaccess: attachResource() and load() calls are swapped in case of embedding
Change-Id: I34600202f0f5c988222f7d4f305ba90df09cd614
2015-04-29 15:15:38 +02:00
e8b97a52c9 Merge remote-tracking branch 'origin/feature/vclptr'
Resolve several thousand lines of conflicts.

Conflicts:
	accessibility/source/extended/accessiblelistbox.cxx
	accessibility/source/standard/vclxaccessiblecombobox.cxx
	accessibility/source/standard/vclxaccessibledropdowncombobox.cxx
	accessibility/source/standard/vclxaccessibledropdownlistbox.cxx
	accessibility/source/standard/vclxaccessiblelistbox.cxx
	accessibility/source/standard/vclxaccessibletextfield.cxx
	basctl/source/basicide/basidesh.cxx
	cui/source/inc/chardlg.hxx
	cui/source/tabpages/tpbitmap.cxx
	dbaccess/source/ui/dlg/UserAdmin.cxx
	dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx
	extensions/source/propctrlr/propertyeditor.hxx
	extensions/source/scanner/sanedlg.cxx
	filter/source/pdf/impdialog.cxx
	include/sfx2/mgetempl.hxx
	include/sfx2/sidebar/SidebarToolBox.hxx
	include/sfx2/viewsh.hxx
	include/svtools/brwbox.hxx
	include/svtools/filectrl.hxx
	include/svtools/scrwin.hxx
	include/svx/dlgctrl.hxx
	include/svx/sidebar/Popup.hxx
	include/svx/sidebar/PopupContainer.hxx
	include/svx/sidebar/PopupControl.hxx
	include/svx/sidebar/SidebarDialControl.hxx
	include/svx/sidebar/ValueSetWithTextControl.hxx
	sc/source/ui/condformat/condformatdlgentry.cxx
	sc/source/ui/navipi/navipi.cxx
	sc/source/ui/sidebar/CellBorderStyleControl.hxx
	sd/source/ui/animations/CustomAnimationDialog.cxx
	sd/source/ui/inc/DrawViewShell.hxx
	sd/source/ui/inc/Ruler.hxx
	sd/source/ui/inc/SlideSorter.hxx
	sd/source/ui/inc/ViewTabBar.hxx
	sd/source/ui/inc/Window.hxx
	sd/source/ui/inc/morphdlg.hxx
	sd/source/ui/inc/sdpreslt.hxx
	sd/source/ui/sidebar/CurrentMasterPagesSelector.hxx
	sd/source/ui/sidebar/LayoutMenu.hxx
	sd/source/ui/sidebar/MasterPagesSelector.hxx
	sd/source/ui/sidebar/NavigatorWrapper.hxx
	sd/source/ui/sidebar/PanelBase.hxx
	sd/source/ui/sidebar/RecentMasterPagesSelector.cxx
	sd/source/ui/sidebar/RecentMasterPagesSelector.hxx
	sd/source/ui/slideshow/showwindow.hxx
	sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx
	sd/source/ui/slidesorter/view/SlsLayeredDevice.hxx
	sd/source/ui/view/ViewShellBase.cxx
	sd/source/ui/view/drviewsa.cxx
	sfx2/source/appl/fileobj.hxx
	sfx2/source/appl/opengrf.cxx
	sfx2/source/control/thumbnailviewacc.hxx
	sfx2/source/dialog/securitypage.cxx
	sfx2/source/dialog/templdlg.cxx
	sfx2/source/doc/docinsert.cxx
	sfx2/source/doc/guisaveas.cxx
	sfx2/source/inc/alienwarn.hxx
	sfx2/source/sidebar/Deck.cxx
	sfx2/source/sidebar/Deck.hxx
	sfx2/source/sidebar/DeckTitleBar.cxx
	sfx2/source/sidebar/DeckTitleBar.hxx
	sfx2/source/sidebar/MenuButton.cxx
	sfx2/source/sidebar/MenuButton.hxx
	sfx2/source/sidebar/Panel.cxx
	sfx2/source/sidebar/Panel.hxx
	sfx2/source/sidebar/PanelTitleBar.hxx
	sfx2/source/sidebar/SidebarDockingWindow.hxx
	sfx2/source/sidebar/SidebarToolBox.cxx
	sfx2/source/sidebar/TabBar.hxx
	sfx2/source/sidebar/TabItem.cxx
	sfx2/source/sidebar/TabItem.hxx
	sfx2/source/sidebar/TitleBar.hxx
	sfx2/source/toolbox/imgmgr.cxx
	starmath/inc/edit.hxx
	starmath/inc/smmod.hxx
	starmath/qa/cppunit/test_starmath.cxx
	starmath/source/edit.cxx
	starmath/source/smmod.cxx
	svtools/source/brwbox/brwbox1.cxx
	svtools/source/brwbox/datwin.hxx
	svtools/source/contnr/fileview.cxx
	svtools/source/contnr/simptabl.cxx
	svtools/source/control/filectrl.cxx
	svtools/source/control/valueimp.hxx
	svx/inc/GalleryControl.hxx
	svx/source/dialog/dlgctrl.cxx
	svx/source/dialog/swframeexample.cxx
	svx/source/fmcomp/fmgridif.cxx
	svx/source/gallery2/GalleryControl.cxx
	svx/source/sidebar/EmptyPanel.hxx
	svx/source/sidebar/area/AreaPropertyPanel.hxx
	svx/source/sidebar/area/AreaTransparencyGradientControl.hxx
	svx/source/sidebar/graphic/GraphicPropertyPanel.hxx
	svx/source/sidebar/insert/InsertPropertyPanel.cxx
	svx/source/sidebar/insert/InsertPropertyPanel.hxx
	svx/source/sidebar/line/LinePropertyPanel.hxx
	svx/source/sidebar/line/LineWidthControl.cxx
	svx/source/sidebar/line/LineWidthControl.hxx
	svx/source/sidebar/line/LineWidthValueSet.hxx
	svx/source/sidebar/paragraph/ParaPropertyPanel.hxx
	svx/source/sidebar/possize/SidebarDialControl.cxx
	svx/source/sidebar/text/TextCharacterSpacingPopup.hxx
	svx/source/sidebar/text/TextPropertyPanel.hxx
	svx/source/sidebar/tools/PopupContainer.cxx
	svx/source/sidebar/tools/PopupControl.cxx
	svx/source/sidebar/tools/ValueSetWithTextControl.cxx
	svx/source/svdraw/svdfmtf.hxx
	svx/source/svdraw/svdibrow.cxx
	svx/source/tbxctrls/colrctrl.cxx
	svx/source/tbxctrls/tbcontrl.cxx
	sw/source/ui/dbui/mmaddressblockpage.cxx
	sw/source/ui/dialog/uiregionsw.cxx
	sw/source/ui/index/cnttab.cxx
	sw/source/uibase/inc/drpcps.hxx
	sw/source/uibase/sidebar/PageColumnControl.hxx
	sw/source/uibase/sidebar/PageMarginControl.hxx
	sw/source/uibase/sidebar/PageOrientationControl.hxx
	sw/source/uibase/sidebar/PagePropertyPanel.hxx
	sw/source/uibase/sidebar/PageSizeControl.hxx
	sw/source/uibase/uiview/view2.cxx
	sw/source/uibase/utlui/navipi.cxx
	vcl/inc/svdata.hxx
	vcl/source/control/combobox.cxx
	vcl/source/control/lstbox.cxx
	vcl/source/window/dockwin.cxx
	vcl/source/window/winproc.cxx

Change-Id: I056cf3026ff17d65cca0b6e6588bda4a88fa8d95
2015-04-28 15:08:48 +01:00