Commit Graph

404 Commits

Author SHA1 Message Date
Stephan Bergmann
b2c8ea3a02 loplugin:cstylecast: deal with remaining pointer casts
Change-Id: I8d27ae80d209159690182ab91e272cf00e9f863d
2015-06-08 16:28:47 +02:00
Caolán McNamara
afe5672fbc cppcheck: noExplicitConstructor
Change-Id: I27c24d3284a8e0678fc5c041426b4a7e71cbd363
2015-05-27 13:54:54 +01:00
Noel Grandin
d3714207b1 remove some unnecessary casts and convert some to const_cast
Change-Id: I590a87c832bc59947ae04e52d3ac5ea71574bb11
Reviewed-on: https://gerrit.libreoffice.org/15888
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-05-25 11:02:57 +00:00
Noel Grandin
e929194317 convert POINTER constants to scoped enum
Change-Id: Iea29ce5fd6c620535197d3ca8538335078430e19
Reviewed-on: https://gerrit.libreoffice.org/15825
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-05-22 06:32:35 +00:00
Christian Lohmaier
ab465b90f6 bin/rename-sw-abbreviations.sh
renames the most annoying abbreviations in Writer (and partially
in the shared code too).

Change-Id: I9a62759138126c1537cc5c985ba05cf54d6132d9
2015-05-20 13:05:49 +02:00
Stephan Bergmann
9bb254fc85 NOINSTANCE is implied now in IMPL_STATIC_LINK...
Change-Id: Ifb032457d6c1b279c4183282ef2b271c706dd71a
2015-05-10 11:25:47 +02:00
Caolán McNamara
bbf2457a01 coverity#1297232 Division or modulo by float zero
and

coverity#1297231 Division or modulo by float zero

Change-Id: Icb303956bb3804bca1078c1135aca0eff370902b
2015-05-09 17:18:36 +01:00
Stephan Bergmann
5eb6bd4db7 lopluign:staticmethods: Handle DECL_LINK
Change-Id: Ib27854a8470f3ff5b208cb949a7bd02f2a86c969
2015-05-08 19:15:32 +02:00
Stephan Bergmann
ca35b59701 Various loplugin warnings
Change-Id: I8d38521f08441f123a236729c01909f2da4ec478
2015-05-05 12:48:27 +02:00
Philippe Jung
8c4a1663f5 tdf#34555 add crop features to sw
Adds Crop (by handles) to writer. Proposal of new Format menu and image
context menu organisation.

This is part of a serie of 4 patches that adds Save graphic, Change Picture,
Edit with external tool, Crop (by handles) in all products (scalc,
sdraw, simpress, swriter).
Main menus, toolbars and contextual menus are updated accordingly.

Change-Id: I6fe8907e08519326c78f0bc71f27032b5716bb8e
Reviewed-on: https://gerrit.libreoffice.org/15590
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2015-05-05 10:04:26 +00:00
Noel Grandin
259820af71 loplugin:staticmethods
Change-Id: I90dd921077bbfc57200e398e7959306f26c65cfe
2015-05-05 09:30:41 +02:00
Tor Lillqvist
c07a3b0396 Get rid of initial :: for the svx namespace
Change-Id: I03e428a749bca409ebac9c142acaddafcbfeca23
2015-04-30 09:11:40 +03:00
Noel Grandin
4e62eee559 convert SDRSEARCH_ constants to scoped enum
Change-Id: I1495dbaf05b642d98f41639d41f831f007601df3
2015-04-29 10:41:39 +02:00
Michael Meeks
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
Tor Lillqvist
4de9e22ce7 We run into this assertion too often when using LOKit
So until somebody has the time to figure out what is really going on, just
don't assert when being used from LOKit.

Change-Id: I5c4a87b94e7bd7ffdbf90973387b61407b8e6c8d
2015-04-27 19:02:02 +03:00
Matteo Casalin
9e88862956 Use range-for loops
Change-Id: I00a7af83acd1b67e913c444aaffbe74986b589a3
2015-04-12 22:36:22 +02:00
Noel Grandin
52789497db wrap more stuff in VclPtr
Change-Id: Ia742c47399231bc5914b6586132ad3daf694fdb0
2015-04-10 13:01:47 +01:00
Michael Stahl
41b72adab4 sw: no need to handle a null SwDoc in SwDrawModel ctor
Change-Id: I9ac596ade8b42979ee3fc944af878c702a7e223b
2015-03-31 20:08:53 +02:00
Michael Stahl
17757784c0 sw: prefix members of SwDrawModel
Change-Id: Ica69a3c94e674c12619ec0f5c849b8e82dff6090
2015-03-31 20:08:52 +02:00
Stephan Bergmann
6f3c52bb37 const_cast: convert some C-style casts and remove some redundant ones
Change-Id: Icb14a036ea9d7636359b6bc5e0af17568c0d54cb
2015-03-26 15:33:38 +01:00
Bjoern Michaelsen
d26725ad0f move SwIterator into calbck.hxx
Change-Id: Icdcd46d392bbf1dbe45448328c310d9a327ba60d
2015-03-19 23:41:06 +01:00
Noel Grandin
6970a4dc77 convert DocumentSettingId to an enum class
Change-Id: Ia4f135c64e6b6b5bd7a522e4a1e9ca63738ff3ef
2015-03-18 14:23:49 +02:00
Bjoern Michaelsen
553a058ec8 core: dont use 'shortcut' that is longer than the original
Change-Id: I0154e484a4f4d6ce6672ddf35d1869157a61f71e
2015-03-16 15:17:59 +01:00
Caolán McNamara
b6d6dab920 V668 no sense in testing the result of new against null
Change-Id: I1cff71d15f4d1b5ee47cc734b3fc2168d7f99201
2015-03-10 15:44:58 +00:00
Miklos Vajna
5ea32020e8 SdrMarkView: aHdl -> maHdlList
aHdl is an SdrHdlList, so reading aHdl.GetHdl() as "get the handle of the
handle" was confusing.

Change-Id: Ib21fa74cc1daa4b6d2034f07715147a8fb0cf934
Reviewed-on: https://gerrit.libreoffice.org/14779
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2015-03-07 13:10:04 +00:00
Miklos Vajna
97eead6da3 sw: rename SwViewImp to SwViewShellImp
It was quite confusing that the implementation class for SwView is
SwView_Impl, but SwViewShell's implementation class was SwViewImp.

Change-Id: I44fdc79f446a576b3d9b952b0c9212001b0b88fe
Reviewed-on: https://gerrit.libreoffice.org/14681
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-02-28 19:30:34 +00:00
Caolán McNamara
309574394b callcatcher: large newly detected unused methods post de-virtualization
i.e lots now able to be detected after...

commit b44cbb26ef
Author: Noel Grandin <noel@peralex.com>
Date:   Tue Jan 20 12:38:10 2015 +0200

    new loplugin: change virtual methods to non-virtual

    Where we can prove that the virtual method is never overriden.

    In the case of pure-virtual methods, we remove the method entirely.
    Sometimes this leads to entire methods and fields being
    eliminated.

Change-Id: I605e2fa56f7186c3d3a764f3cd30f5cf7f881f9d
2015-01-29 23:42:26 +00:00
Bjoern Michaelsen
35f70c86f2 do not use manual iteration
Change-Id: If53c38b21cad756259f084ad84de090def596eb0
2015-01-23 23:15:17 +01:00
Bjoern Michaelsen
a597037292 do not use manual iteration
Change-Id: Iafb10e4a3cf26138a4a5d2647d115bc435ef61ba
2015-01-23 23:15:17 +01:00
Stephan Bergmann
e6c124ae3b Some more loplugin:cstylecast: sw
note the two TODOs about suspicious casts

Change-Id: I324fa05b30a5c8aa1d9e9a6d488a1e295226e788
2015-01-22 08:13:42 +01:00
Michael Stahl
2f69e16c72 override the overloading of "overload" to decrease cognitive (over-)load
Change-Id: I4d0e1de89d0bbdbea23bc5a46bf75ae0ce4e2796
2015-01-09 00:00:47 +01:00
Caolán McNamara
ba9c2376f1 OSL_ENSURE->assert when followed by unconditional deref
Change-Id: If2130dbbb7b4afd3d88553da449163f60cdc0c1e
2015-01-06 14:24:21 +00:00
Caolán McNamara
886f962d3a coverity#1257108 Explicit null dereferenced
Change-Id: Ic4d9c99c8a2b994cec8828808d02a46ec6a18e2c
2014-12-12 12:20:50 +00:00
Caolán McNamara
d9ae37a3cc coverity#1257109 Unchecked dynamic_cast
and

coverity#1257108 Unchecked dynamic_cast

Change-Id: Ib0d42b7fcd3b2b87a95301b111cebe80f54dd13f
2014-12-08 16:24:26 +00:00
David Tardon
51bacc6a06 impl. Clone for all subclasses of SdrPage
Change-Id: Ie370161e51ff83cb605bc57d317ff945404e5611
2014-12-04 23:10:25 +01:00
Bjoern Michaelsen
ada94e72af unnecessary cast
Change-Id: Ib00a00332c1a8841106243a57f555b543037b0de
2014-12-04 01:09:41 +01:00
Bjoern Michaelsen
4fbe3e79c4 unnecessary cast
Change-Id: I160bfc482a9f7bcdea1e3104e6172f142db6d9d6
2014-12-04 01:09:41 +01:00
Noel Grandin
6457297522 loplugin: cstylecast
Change-Id: I8c5d2302695d22e4fe976a370b75b26dec373024
2014-11-25 10:09:50 +02:00
Noel Grandin
eb41a2ba20 loplugin: cstylecast
Change-Id: I322c6f9cd106a0ac3ad5c67dd0d49660b608e079
2014-11-19 13:19:37 +02:00
Matteo Casalin
9ba8304dad sal_True/sal_False to true/false in sw comments (also delete obsolete ones)
Change-Id: Ifb29bd3e9c5dc7671c189fd9daa010305f7a85a4
2014-11-16 16:54:38 +01:00
Andrea Gelmini
da40cac540 Fix common typos. No automatic tools. Handmade…
Change-Id: I1ab4e23b0539f8d39974787f226e57a21f96e959
Reviewed-on: https://gerrit.libreoffice.org/12164
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-11-12 11:04:11 +00:00
Noel Grandin
a52f29216d fdo#84938: replace HELPMODE_ constants with enum
Change-Id: I44be5567e84cdabd8b10771ea37e28b8a88cc23e
Reviewed-on: https://gerrit.libreoffice.org/12333
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-11-11 06:17:36 +00:00
Luboš Luňák
92e00493ae const
Change-Id: Ie2f4c5059a4160287690cf7a4e99472d9a575102
2014-11-09 19:45:20 +01:00
Noel Grandin
a3e2b884f3 rename nWink->nAngle
Change-Id: I3a4cec65307c517684d4f8a291ca73b6a212a857
2014-11-04 14:45:58 +02:00
Andrea Gelmini
c70f1545e2 Removed duplicated includes
Change-Id: I5362d997bfa086c9fb1726efcb15132a966684f6
Reviewed-on: https://gerrit.libreoffice.org/12160
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2014-10-31 16:18:30 +00:00
Jan Holesovsky
31af61ea09 Fraction: Revert "fdo#81356: convert Fraction to boost::rational<long> - wip"
This reverts commit 47a2d7642d.

Conflicts:

	cui/source/tabpages/transfrm.cxx
	svx/source/svdraw/svdedtv1.cxx
	svx/source/svdraw/svdibrow.cxx
	sw/source/filter/ww1/w1filter.cxx
	tools/source/generic/rational.cxx

Change-Id: I4849916f5f277a4afef0e279b0135c76b36b9d15
2014-10-23 18:34:39 +02:00
Jan Holesovsky
858c2a2977 Fraction: Revert "fdo#84854 it seems long is not enough on 32 bit"
This reverts commit 582ef22d3e.

Conflicts:

	svx/source/svdraw/svdedtv1.cxx
	svx/source/svdraw/svdibrow.cxx
	sw/source/filter/ww1/w1filter.cxx

Change-Id: I80abc7abdeddc267eaabc9f8ab49611bb3f8ae83
2014-10-23 18:34:34 +02:00
David Tardon
582ef22d3e fdo#84854 it seems long is not enough on 32 bit
Fraction used BigInt internally for computations, rational does nothing
like that.

Change-Id: I3e9b25074f979bc291208f7c6362c3c40eb77ff5
2014-10-16 17:44:44 +02:00
Noel Grandin
af5ebbf783 create a macro library for implementing bit-flags types
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>,
changed from a macro- to a template-based solution.  (Unfortunately MSVC 2012
does not support explicit conversion operators.  Worked around that with
explicit #ifs rather than some HAVE_EXPLICIT_CONVERSION_OPERATORS and
SAL_EXPLICIT_CONVERSION_OPERATOR ainticipating we hopefully soon move to a
baseline that requires unconditional support for them.)

Change-Id: I4a89643b218d247e8e4a861faba458ec6dfe1396
2014-10-13 17:45:57 +02:00
Juan Picca
47a2d7642d fdo#81356: convert Fraction to boost::rational<long> - wip
* Added rational util functions used by Fraction class not
  available in the boost::rational class.
* Replaced usage of Fraction by boost::rational<long>
* Removed code that relies on:
  1. fraction.IsValid() -- rational only allow valid values, ie
     denominator() != 0
  2. rational.denominator() == 0 -- always false
  3. rational.denominator() < 0 -- always false but implementation
     detail: http://www.boost.org/doc/libs/release/libs/rational/rational.html#Internal%20representation
* Simplified code that relies on:
  1. rational.denominator() != 0 -- always true
* BUGS EXIST because Fraction allows the creation of invalid values but
  boost::rational throws the exception boost::bad_rational

Change-Id: I84970a4956afb3f91ac0c8f726547466319420f9
Reviewed-on: https://gerrit.libreoffice.org/11551
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
2014-10-09 11:33:33 +00:00