Commit Graph

2625 Commits

Author SHA1 Message Date
Michael Meeks
936a496467 Switch VclBuilder constructors to use VclPtr.
Change-Id: Id35a86eb52bbde6ca09a5e61a0b1a79b23be8faf
2015-05-12 09:40:38 +01:00
Michael Meeks
667910530d Revert "Switch VclBuilder constructors to use VclPtr."
Behaves oddly; not ready yet.

This reverts commit 9f016bd694.

Change-Id: I30d746eac29d1dbe78d3072b10d2e22c051e3f4e
2015-05-11 16:28:22 +01:00
Michael Meeks
9f016bd694 Switch VclBuilder constructors to use VclPtr.
Change-Id: Id35a86eb52bbde6ca09a5e61a0b1a79b23be8faf
2015-05-11 15:12:08 +01:00
Noel Grandin
82d68f9cbc convert COMMAND_ constants to scoped enum
Change-Id: I88e67f89dbbab0646e8f106dfeb32c6ee1bb0b95
Reviewed-on: https://gerrit.libreoffice.org/15671
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-05-11 12:17:42 +00:00
Stephan Bergmann
000c31c384 loplugin:cstylecast: nop between pointer types of exactly same spelling
Change-Id: I13f6c41a9918363d1b91d64ab2b8c331d007561a
2015-05-11 12:48:59 +02:00
Tomaž Vajngerl
25a0bd7b90 refactor TreeListBox to use RenderContext
Change-Id: I901a1f1f9732fb66718dca34c698a851e5b0d87f
2015-05-11 10:03:29 +09:00
Stephan Bergmann
9bb254fc85 NOINSTANCE is implied now in IMPL_STATIC_LINK...
Change-Id: Ifb032457d6c1b279c4183282ef2b271c706dd71a
2015-05-10 11:25:47 +02:00
Stephan Bergmann
4a760a8d0b Replace IMPL_STATIC_LINK[_TYPED] with more useful variants
Change-Id: Ic59c2c9079dce37ad76b6a1396a719d372253674
2015-05-10 11:25:42 +02:00
Michael Meeks
266ce1cd53 tdf#91052 - more macros for 'make' constructors.
Change-Id: Id05266810760f73db2daba10d1efa14aa9f88dd9
2015-05-09 21:39:57 +01:00
Stephan Bergmann
5eb6bd4db7 lopluign:staticmethods: Handle DECL_LINK
Change-Id: Ib27854a8470f3ff5b208cb949a7bd02f2a86c969
2015-05-08 19:15:32 +02:00
Noel Grandin
2c8dc03733 convert BUTTONDIALOG constants to scoped enum
Change-Id: Icbf73fe55ad604f762dd2b98fd39189bab82f061
Reviewed-on: https://gerrit.libreoffice.org/15648
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-05-07 13:27:55 +00:00
Stephan Bergmann
7df89ec7a2 Remove unnecessary includes of sot/storage.hxx from include/
Change-Id: I242cd126814bbebdb99ea38d9e66513189c313d9
2015-05-07 11:05:05 +02:00
Tomaž Vajngerl
29b1e6718f refactor "TextEdit" & co. to use RenderContext
Change-Id: Ib26ecb9640d23714acec73304f26e2fd6af90ed4
2015-05-07 09:57:50 +02:00
Noel Grandin
bfcb2a1a75 convert DEFAULTFONT_ constants to scoped enum
Change-Id: Ia33e957f6cf530e2639b3c86d9482f642652cb46
2015-05-06 09:01:29 +02:00
Stephan Bergmann
c9b4c56811 Use typed Idle::SetIdleHdl Link
Change-Id: I189937950325dc4ef663f7f49cb45f38f8537de9
2015-05-05 12:05:38 +02:00
Stephan Bergmann
8cafd08278 Use typed Timer::SetTimeoutHdl Link
Change-Id: Iaaf0c93e5b28c0f7dbe4f02eda8beeae30708100
2015-05-05 10:21:54 +02:00
Stephan Bergmann
3ead3ad52f Gradually typed Link
Turn the Link class into a template abstracting over the link's argument and
return types, but provide default template arguments that keep the generic,
unsafe "void* in, sal_IntPtr out" behvior.  That way, individual uses of the
Link class can be updated over time.

All the related macros are duplicated with ..._TYPED counterparts, that
additionally take the RetType (except for LINK_TYPED, which manages to infer the
relevant types from the supplied Member).

(It would have been attractive to change the "untyped" LinkStubs from taking a
void* to a properly typed ArgType parameter, too, but that would cause
-fsanitize=function to flag uses of "untyped" Link::Call.)

Change-Id: I3b0140378bad99abbf240140ebb4a46a05d2d2f8
2015-04-30 10:20:00 +02:00
Caolán McNamara
cee3e3d76f coverity#1296211 pCurWin == pNewWin at this point
should silence

coverity#1296211 Explicit null dereferenced

Change-Id: I0798db1b88bfec94139995db552029b18a9562af
2015-04-29 21:17:18 +01:00
Stephan Bergmann
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
Stephan Bergmann
e6c08b6b30 Remove unnecessary STATIC_LINK macro
Change-Id: I4788824667c8e0d1d4e0717b7ae7737bb0fd2c90
2015-04-29 18:29:59 +02:00
Noel Grandin
4e62eee559 convert SDRSEARCH_ constants to scoped enum
Change-Id: I1495dbaf05b642d98f41639d41f831f007601df3
2015-04-29 10:41:39 +02:00
Noel Grandin
07f6b08bdc convert LANG_LIST constants to scoped enum
Change-Id: Ibd699cfdfd3266c2965a5b6368cfe2f4431b7fb4
2015-04-29 10:41:38 +02:00
Tomaž Vajngerl
f50fd9692e mass rewrite Paint(Rect&) to Paint(RenderContext&, Rect&)
Change-Id: Ia1667246064d11827dbd149def15e5bf08b119b8
2015-04-29 09:19:47 +09:00
Miklos Vajna
d45142637a basctl: fix GCC-4.7 build
Change-Id: I1166987f49d2a9b67de95a9c43380f0e3ebf09dc
2015-04-28 17:45:41 +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
Stephan Bergmann
d39b9c29d5 loplugin:simplifybool
Change-Id: I4811afde43947a51938c3b67c7f35dab473f0b08
2015-04-24 12:36:18 +02:00
Noel Grandin
a880ec8131 loplugin:staticmethods
Change-Id: Id7fc12bc61c6e803f45cc60556d9cf54ac2e529f
2015-04-23 13:08:48 +02:00
Noel Grandin
12ba9e3cad loplugin:staticmethods
Change-Id: Ib0c0841e48814d1a6e13bcd4575725d86ffa5e5e
2015-04-23 13:08:48 +02:00
Stephan Bergmann
620318cfdd Unused using declaration
Change-Id: I17ed15d857c0887f426fe9e0dfa869752bb4b52f
2015-04-22 15:38:43 +02:00
Noel Grandin
dd7778a769 convert SV_ENTRYFLAG constants to scoped enum
Change-Id: I457b32ed5ee5d74e6f8361e7de79cbd406122651
2015-04-22 10:28:42 +02:00
Noel Grandin
1b5f6935a4 convert SV_DRAGDOP_ constants to scoped enum
Change-Id: If953610ed24a2b6d5f33f2ba014fba2ca5308d7d
2015-04-22 10:28:41 +02:00
Noel Grandin
923de833be convert SV_LBOXTAB_ constants to scoped enum
Change-Id: Ic7d91ca51106288fb0e14f6f243d74be77cb2c0d
2015-04-22 10:28:41 +02:00
Noel Grandin
9c50c39fb4 convert SEARCH_OPTIONS constants to scoped enum
Change-Id: Id0f0c7d692410cf5e1477c5180e7cfb8e7b0f52b
Reviewed-on: https://gerrit.libreoffice.org/15345
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-04-20 08:23:13 +00:00
Noel Grandin
5df70781f3 svx: convert new to ::Create.
Change-Id: I52f589dabdedb538a4a5d0eadfa42b0d10de9b80
2015-04-17 16:33:13 +02:00
Michael Meeks
5cc560f6c2 basctl, basic: convert new to ::Create.
Change-Id: I1fc2c69640ed625425a679380d6f25178bc5aeb1
2015-04-17 09:15:06 +01:00
Michael Meeks
d24f93dcf0 make CreateItemWindow return a VclPtr<>.
Change-Id: Id15ff8900376aaee4343d7ee08ae062e1c462ce4
2015-04-16 21:31:18 +01:00
Noel Grandin
d208cf834f convert SIGNATURESTATE_ constants to scoped enum
Change-Id: I715e39599464a199a8b78ec274bfe47b90fc4bb7
Reviewed-on: https://gerrit.libreoffice.org/15301
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-04-15 11:35:03 +00:00
Noel Grandin
9782438a58 convert SFX_VIEW constants to scoped enum
Change-Id: I327dc1ec722fa9445f13fc5168ad646e272ba9d4
Reviewed-on: https://gerrit.libreoffice.org/15300
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-04-15 11:34:21 +00:00
Noel Grandin
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
Noel Grandin
d320bc8a6f calling static member function through member call syntax
Change-Id: I29e8faa03f668a7471b47e7aca3c2400f034c3b6
2015-04-14 15:14:36 +02:00
Michael Meeks
5245021a80 Explicit disposeOnce instead of transient wrappers.
Change-Id: I578aa360c9923abd3fc516865896a004f377375b
audit: "vclwidget: check for calling delete on subclasses of vcl::Window"
2015-04-13 15:49:24 +01:00
Michael Meeks
c9f2abed2e More lifecycle correction.
Another (complete) audit of delete usage in:
        "vclwidget: change all vcl::window fields to be wrapped in VclPtr"

Change-Id: I828212ded66ecc5cc30c75a4de626c7b386cb77a
2015-04-13 15:10:32 +01:00
Noel Grandin
ee094bd46f loplugin:staticmethods
Change-Id: If97f01a05294fa7efd59a8934c7b6f65cda5084a
2015-04-13 09:37:12 +02:00
Caolán McNamara
fb150cb18b cppcheck: cstyleCast
Change-Id: I9add864d76d08e76a3a4ac9645323ba49c3906ec
2015-04-12 21:17:59 +01:00
Michael Meeks
efcce8fc84 VclPtr: unfortunate includes needed for inlining ref/unref.
Something of a compile time vs. run-time choice.

Change-Id: I7e9db3a6f14d352e0b78abd5f22ccc593aceb001
2015-04-10 21:00:13 +01:00
Michael Meeks
e985155bc5 Misc. other fixing.
Change-Id: Iffdb9951daaf38489f6b788e07d9b14256459fd4
2015-04-10 19:33:50 +01:00
Michael Meeks
cf13f78703 Lost more cleanup and fixing post re-basing.
Change-Id: Ia5317b93484d31af978a5276bc6697848130225d
2015-04-10 18:36:40 +01:00
Noel Grandin
3bf4ada33f dialogs lifetimes should be wrapped in ScopedVclPtr
Change-Id: Ica8467af599fb3f9313bfa916fec8b7792a6000f
2015-04-10 15:51:48 +02:00
Michael Meeks
8a65284fe3 Automated conversion of VclPtr construction to use Instance template.
Change-Id: I8be9141b9653e73ebd23a5a3d810f240c376f97e
2015-04-10 13:40:25 +01:00
Michael Meeks
c612c3b0ae protect more printer code-paths.
Change-Id: Ic5bc5c3325b460cba0d95484454c9bb826684890
2015-04-10 13:06:13 +01:00