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
4ea281a3cc
cppcheck:redundantAssignment
...
Change-Id: I1167d0ce6b6f6e48309d0551c1d2a283d79546a7
2015-06-15 13:34:14 +02:00
5a2e09989a
cppcheck:redundantCondition
...
Change-Id: Ib8b6342d1da526df6104125ded546b3f053c448b
2015-06-15 11:56:55 +02:00
b226928c6d
cppcheck: redundantCondition [part1]
...
Change-Id: I21c5340e7b5ec09248b08aa76f43acf883c56cd8
2015-06-14 12:17:55 +02:00
cc0e9a37de
cppcheck: variableScope
...
Change-Id: If0c56c89e2722d47a401363f3854331229856490
2015-06-09 10:33:59 +01:00
761e0ae0a7
loplugin:cstylecast: deal with remaining pointer casts
...
Change-Id: I8bce930283301130ec7a2b1eab2a2c8f65c8abf9
2015-06-08 16:23:17 +02:00
3f72218069
Apply new VclPtr clang plugin to catch potential problems.
...
Omit the plugin, and sw's FrameControlsManager for now.
Change-Id: Ifb98a2e6e03a9d099efc1668305b96bd9142ca5f
Reviewed-on: https://gerrit.libreoffice.org/16117
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Michael Meeks <michael.meeks@collabora.com >
Tested-by: Michael Meeks <michael.meeks@collabora.com >
2015-06-06 20:26:54 +00:00
b000faba86
loplugin:cstylecast: deal with those that are (technically) const_cast
...
Change-Id: I1788ad7d9f9dec892b31a0610d0f44ae1ccd2e64
2015-06-02 11:25:21 +02:00
8e22cd40ec
cppcheck: noExplicitConstructor
...
Change-Id: I8ae8623252546ca94f65fc04b331dd9cafa4fc92
2015-06-02 08:57:56 +01:00
ba81e5c6bd
tdf#91702 - fix stack-based MessBox allocation.
...
Change-Id: I62dd164e281911d9db3de453789a5badc7cd5fd7
Reviewed-on: https://gerrit.libreoffice.org/15954
Reviewed-by: Michael Meeks <michael.meeks@collabora.com >
Tested-by: Michael Meeks <michael.meeks@collabora.com >
2015-05-29 12:16:28 +00:00
1379e2feaa
Rewrite all calls like Dialog(params).Execute()
...
Replace all calls looking like
ADialog(some params).Execute()
by
ScopedVclPtrInstance<ADialog>::Create(some parms)->Execute()
Change-Id: I0b6f0a9ea5ef0a749ffa30ce131e9dc989604639
Reviewed-on: https://gerrit.libreoffice.org/15915
Tested-by: Jenkins <ci@libreoffice.org >
Tested-by: Michael Meeks <michael.meeks@collabora.com >
Reviewed-by: Michael Meeks <michael.meeks@collabora.com >
2015-05-28 08:44:31 +00:00
6a4a55d5f4
BASIC: User std::unique_ptr in basic runtime
...
Change-Id: Iac7efdad78cf2f827cbddbc671dd0d1b5ae1d467
Reviewed-on: https://gerrit.libreoffice.org/15874
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Caolán McNamara <caolanm@redhat.com >
Tested-by: Caolán McNamara <caolanm@redhat.com >
2015-05-26 08:13:35 +00:00
564fc48393
tdf#90110: basic: fix Randomize statement
...
- time() is used to seed the RNG but since it only has second resolution,
the same values will be generated if it's called multiple times like
in the bug report
- BASIC using the global rng would be fine except that BASIC Randomize
takes an optional parameter to set the seed, which should continue
to be supported, but should not affect the RNG state for non-BASIC
users of comphelper::random
(regression from df466d79cb126667cc9d5c108367bfa4f5ce76c8,
but the old implementation was even more delightfully absurd,
where Randomize was essentially srand((sal_uInt16)rand()) ...)
Change-Id: I0f30e509de08f933c02ac77c5d932b20e79586c5
2015-05-19 22:02:41 +02:00
2bb4d6cad4
Missing disposeAndClear in MsgBox basic function
...
Change-Id: Ida3d792a6f3797a6173b31b86a49b72ad7353340
Reviewed-on: https://gerrit.libreoffice.org/15717
Reviewed-by: Michael Meeks <michael.meeks@collabora.com >
Tested-by: Michael Meeks <michael.meeks@collabora.com >
2015-05-12 14:03:35 +00:00
ef6877c167
loplugin:cstylecast: nop between pointer types of exactly same spelling
...
Change-Id: I1e4363f917a978434fb11368918435da12531dc6
2015-05-11 12:49:03 +02:00
0acd47f68e
Remove unnecessary IMPL_LINK[_NOARG]_INLINE_START/END
...
...just use IMPL_LINK[_NOARG] and let the compiler decide what to inline
Change-Id: I63ec5116df7e79093ebf31193f8c674f1351c0e6
2015-04-29 18:29:59 +02:00
17cb3391ec
Remove unnecessary IMPL_LINK_INLINE macro
...
Change-Id: I81cbec049b98d2d2619b0480e0cf54bd1d7b6718
2015-04-29 18:29:59 +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
d0e9aa6a2b
Dialog::Execute returns short/VclResponseType
...
Change-Id: I48d63276ae0aaeba169e1e783c44b428a58314ac
2015-04-28 10:19:37 +02:00
ed83ba34a5
loplugin:simplifybool
...
Change-Id: I6e181bc4b144c2559ede99d3bae0496cf546415c
2015-04-24 12:36:18 +02:00
2240118177
Improved loplugin:literaltoboolconversion looking into cond. exprs.
...
...automatic rewriter fixes
Change-Id: I6b04ca80f08f8a71ff94e309fd52f44d736751ee
2015-04-23 18:39:07 +02:00
a75d907406
Related tdf#55502: Harden a bit
...
Change-Id: I56155e234b13ca3e9fb95565d08a38252eeba712
2015-04-19 15:40:56 +02:00
41392516ca
tdf#55502: Shell BASIC function with empty third param hangs
...
bt:
2 0x00002aaaab2b5226 in __assert_fail_base (fmt=0x2aaaab3ebce8 "%s%s%s:%u: %s%sAssertion `%s' failed.
%n",
assertion=assertion@entry=0x2aaaae2ecf10 "index >= 0 && static_cast<sal_uInt32>(index) < static_cast<sal_uInt32>(getLength())",
file=file@entry=0x2aaaae2ecec8 "/home/julien/compile-libreoffice/libreoffice/include/rtl/ustring.hxx", line=line@entry=500,
function=function@entry=0x2aaaae2ed740 <rtl::OUString::operator[](int) const::__PRETTY_FUNCTION__> "sal_Unicode rtl::OUString::operator[](sal_Int32) const") at assert.c:92
3 0x00002aaaab2b52d2 in __GI___assert_fail (assertion=0x2aaaae2ecf10 "index >= 0 && static_cast<sal_uInt32>(index) < static_cast<sal_uInt32>(getLength())",
file=0x2aaaae2ecec8 "/home/julien/compile-libreoffice/libreoffice/include/rtl/ustring.hxx", line=500,
function=0x2aaaae2ed740 <rtl::OUString::operator[](int) const::__PRETTY_FUNCTION__> "sal_Unicode rtl::OUString::operator[](sal_Int32) const") at assert.c:101
4 0x00002aaaae1f44f8 in rtl::OUString::operator[] (this=0x7fffffff36b0, index=13) at /home/julien/compile-libreoffice/libreoffice/include/rtl/ustring.hxx:500
5 0x00002aaaae274036 in SbRtl_Shell (pBasic=0x3531fc0, rPar=..., bWrite=false) at /home/julien/compile-libreoffice/libreoffice/basic/source/runtime/methods.cxx:3613
Check if third param isn't empty, if not, aCmdLine finishes with a space character
Change-Id: I095b6dc7c7d2d4c826fb47aa1414c558bbc27c04
2015-04-18 23:42:06 +02:00
5cc560f6c2
basctl, basic: convert new to ::Create.
...
Change-Id: I1fc2c69640ed625425a679380d6f25178bc5aeb1
2015-04-17 09:15:06 +01:00
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
ee094bd46f
loplugin:staticmethods
...
Change-Id: If97f01a05294fa7efd59a8934c7b6f65cda5084a
2015-04-13 09:37:12 +02:00
8a65284fe3
Automated conversion of VclPtr construction to use Instance template.
...
Change-Id: I8be9141b9653e73ebd23a5a3d810f240c376f97e
2015-04-10 13:40:25 +01:00
5d133eb621
first half of non-scriptable, Instance constructor conversion.
...
Change-Id: If73bb41bfa805e22609748f25971724b4778edb3
2015-04-10 13:27:16 +01:00
61b224f392
vclwidget: fixup locally allocated vcl::Window objects
...
They need to be wrapped in ScopedVclPtr in order to be disposed properly.
Change-Id: Ib64dba353774f54711e4de7f5d15d859c6a4dc7e
2015-04-10 12:37:44 +01:00
6d0c89123f
vclwidget: fix more places that should be wrapping in VclPtr
...
Change-Id: I31c9115662da2f81e1b22be91ee58e2862076b8e
2015-04-10 11:40:50 +01:00
d7a84ce840
vclwidget: only call dispose() once
...
by using a new utility method in vcl::Window
This means that we don't have to make all our dispose
methods safe to call more than once.
Change-Id: I2110c7de4a86c70fdc97dd8fd318c86b56865374
2015-04-10 10:55:36 +01:00
00f2787a4a
vclwidgets: wrap all vcl::Window subclasses allocated on stack in VclPtr
...
Change-Id: Ia8b0d84bbf69f9d8f85505d019acdded14e25133
Conflicts:
sw/qa/tiledrendering/tiledrendering.cxx
2015-04-09 22:17:00 +01:00
28c2cf4f56
vcl: VclPtr conversion in basic
...
Change-Id: Ia0330d596b696f914a8ee2f81f0399e9456ff87c
2015-04-09 21:02:13 +01:00
5ba54aacd5
Remove dead INetProtocol::Vim
...
...which removes the need to abstract over the standard URI '%' escape prefix
vs. the silly vim '=' special case invention.
Change-Id: I54a52dd912c3aafc38275a0ac2466a6daeec328f
2015-04-07 20:21:21 +02:00
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
44b3e56bb4
Change INetProtocol to scoped enumeration
...
...and fix o3tl::enumarray::operator [] const overload
Change-Id: I749b1b9d68686b03a97074253478d9d2d9d32b0b
2015-04-02 16:30:34 +02:00
4f2a236da4
Replace remaining getCppuType et al with cppu::UnoType
...
Change-Id: I69cac41fd3db1e99ecb55e23ac81c67046f81cb4
2015-04-01 08:35:28 +02:00
c3fb36ed26
Clean up C-style casts from pointers to void
...
Change-Id: I6dd7c7fbaf0d4b22abba0a7b1f5e37f0a46d0747
2015-03-28 19:09:17 +01:00
6c7291141c
WaE: implicit conversion from bool to 'int'
...
Change-Id: I40782009fb8d73f827c82c298586a7d4542561c9
2015-03-02 09:39:55 +02:00
e9beb26470
convert SBI_ constants to enum class
...
Change-Id: I65e706f4e1adfe242808293d9514c9db8d22cc12
2015-03-02 08:59:18 +02:00
2f928b2d09
remove NUMBERFORMAT_ constants
...
.. in favour of just using the underlying constants from
css::util::NumberFormat
Change-Id: I0c6b128b66c91b268f5ae300f9c17c7792df5e99
2015-02-25 10:34:27 +02:00
9473ba2469
fix marking of free slots in array
...
Change-Id: I5170b9bbc4a3acab8307f7ad5ebc5e4ba9d58352
2015-02-24 10:36:51 +02:00
3b513aefa4
tdf#86543: reinterpret_cast -1 of appropriate width as special marker
...
Change-Id: Idf0d2a77a78e0e8fcbf435984b9b8f4393e4c207
2015-02-23 13:13:39 +01:00
a8e6f0bea0
tdf#39440 - cppcheck cleanliness
...
Fixed some cppcheck defects
Change-Id: I25fd6aba9d76df98d20b9a1bb4c9d3c1bf6f84bb
Reviewed-on: https://gerrit.libreoffice.org/14487
Reviewed-by: Noel Grandin <noelgrandin@gmail.com >
Tested-by: Noel Grandin <noelgrandin@gmail.com >
2015-02-17 06:15:54 +00:00
a1ceacc17e
boost::foo_ptr->std::foo_ptr
...
Change-Id: I9219619b538b6530a89f5932ac51eb3b62eb396a
2015-02-16 12:54:44 +00:00
0f86834bd5
Remove redundant explicit up-casts
...
Change-Id: I58fd91354fe41673216674f5ae9c11c17cb3f29d
2015-02-05 12:47:23 +01:00
6e1d28efb3
fdo#39440: replace C-style cast's
...
* Add get() method to tools::SvRef
Change-Id: I3825852176c9c37f3ee21f4fd57328b1c7451951
Reviewed-on: https://gerrit.libreoffice.org/14268
Tested-by: Michael Stahl <mstahl@redhat.com >
Reviewed-by: Michael Stahl <mstahl@redhat.com >
2015-02-05 07:24:30 +00:00
bf7b702814
coverity#1267698 Uninitialized scalar field
...
Change-Id: I79974d276a8f7f856dbf09b14b06ce3b1bb418f0
2015-01-30 20:52:52 +00:00
cd528c3099
implement css::i18n::XCalendar4 and LocaleCalendar2 service, tdf#63230
...
Implementation only, new local date/time routines not used yet from the
outside in this step.
2015-01-26 18:12:10 +01:00
b5938bf4b3
WaE: rewrite call of rtl::OUString::operator= ...
...
... with empty string constant argument as call of rtl::OUString::clear
[loplugin:stringconstant].
Actually, no need to clear the string here as it already is empty, surely?
Change-Id: Ib4b1a6e1b0c0f59c1c964fe58d26058b492c3821
2015-01-24 08:10:50 +02:00