Commit Graph

172 Commits

Author SHA1 Message Date
Stephan Bergmann
1234f96b96 loplugin:cstylecast: deal with remaining pointer casts
Change-Id: I0c6d14f0762ae804b931472bc201826821572e3e
2015-06-08 16:27:49 +02:00
Noel Grandin
3cbdf64ad5 convert DRAWMODE constants to scoped enum
Change-Id: I36cbe8057d09226f8b302963bdd94dc5600b686f
2015-05-20 09:52:08 +02:00
Stephan Bergmann
f9e73fe26b loplugin:cstylecast: nop between pointer types of exactly same spelling
Change-Id: Ia78ebb57f69c678ddc4ca2b42c82105fa528ff2b
2015-05-11 12:50:39 +02:00
Noel Grandin
1902ad6cad convert SDR_SWAPGRAPHICS constants to scoped enum
and drop unused DOC constant

Change-Id: Id35d18241642742500cc007c575a8a54b5b8dd97
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
Noel Grandin
7819d49fac sd: convert new to ::Create.
Change-Id: I35c03ea4430eb5a5bd4c7cfaed74f741c09cbf18
2015-04-20 13:44:47 +02:00
Noel Grandin
d8ebd90441 sfx2: convert new to ::Create.
Change-Id: I53f95a65702c144ba4c4b0caac1e172015fec0fa
2015-04-17 17:53:05 +02: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
ccfa9fa13d convert SFX_LOADED_ to scoped enum
Change-Id: I065a07e1bb5f5a7f85429c919830b6b9605206ea
2015-04-13 09:34:52 +02:00
Michael Meeks
4ce5a6e2d5 compile fixes.
Change-Id: I210c71c1a7236d286256a498f3f4f28f4185d052
2015-04-10 12:11:13 +01:00
Michael Meeks
cf06c0135d start of unwinding reference OutputDevice & Printer lifecycle.
Change-Id: I066337f46a3c39d1eaba5e7a1f4e1278816a0b27
2015-04-10 12:02:53 +01:00
Noel Grandin
89dd3f8068 convert SfxObjectCreateMode to scoped enum
and fix some dodgy usage in /sc in the process

Change-Id: Ia2bee267df31aba431fc8cb81195bb83e5b64deb
2015-04-10 09:48:06 +02:00
Noel Grandin
abf60c4a0f convert EE_CNTRL constants to enum class
there were a couple of lines in SC and SW where the code was using a
EV_CNTRL constant. I switched it to used the same-valued constant from
EE_CNTRL

Change-Id: I027183cc3b6e700bf365d48833e37eddc9b50f04
2015-03-25 08:56:14 +02:00
Noel Grandin
799a7878fd convert SFX_PRINTER constants to enum class
Change-Id: I5dca39f7668be2c03c904c33b6181ba769b70990
2015-03-24 09:36:59 +02:00
Noel Grandin
fb14be5f8f create new 'enum class' SotClipboardFormatId to unify types
of which there are several.

There are some issues here I am unsure of
- the SW and SC and CHART2 modules essentially ignore the enum values and assign their own ids
  Perhaps I should change them to use the common values and create new enum values where necessary?
- the sc/qa/ and sq/qa/ and starmath/qa/ code was doing some dodgy stuff. I translated the code to pass down the stuff
   numeric values to the underlying code, but perhaps further fixing is necessary?

Change-Id: Ic06d723e404481e3f1bca67c43b70321b764d923
2015-03-18 14:23:50 +02: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
Noel Grandin
ba233e87ef remove unnecessary parenthesis in return statements
found with
$ git grep -lP 'return\s*\(\s*\w+\s*\)\s*;'

Change-Id: Ic51606877a9edcadeb647c5bf17bc928b69ab60e
2015-02-23 09:26:58 +02: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
Stephan Bergmann
c4b3801c22 Some more loplugin:cstylecast: sd
Change-Id: I3562efaab55655bc758fe94090b2b6d05b548098
2015-01-21 14:03:43 +01:00
Stephan Bergmann
cb9e8bbdb9 sd: Use appropriate OUString functions on string constants
Change-Id: Ic402f5b5be1f657d9045091056bcb731b3407a9d
2014-12-18 14:12:31 +01:00
Noel Grandin
b52a7c4df4 loplugin: cstylecast
Change-Id: I071962c646199c30e842b9ec7673473de237ee45
2014-11-13 10:19:46 +02:00
Noel Grandin
be36b1644d loplugin: cstylecast
Change-Id: Ic4eca519c5ba8662b29901f196ecfd6e0aa776e2
2014-11-10 15:22:16 +02:00
Boris Egorov
10db2f7246 Related: fdo#84846 move code setting edit mode to a new method
First change in series to fix fdo#84846.

Change-Id: I52dc333c2caa30ee3c75d9cc80862cf24a204f93
Reviewed-on: https://gerrit.libreoffice.org/12148
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-10-30 16:53:11 +00:00
Noel Grandin
8044acf2db convert SFX_CALLMODE constants to SfxCallMode enum class
and fix a couple of bugs in SC and SW where the call mode was
being passed to the hints parameter by accident

Change-Id: Ief805410b3f7035e012e229e77f92d5832430f58
Reviewed-on: https://gerrit.libreoffice.org/11916
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-11 15:14:52 +00:00
Lennart Poettering
1958ca235b German comment translation.
Change-Id: I479da454235a7cfc084ae1517ab9ffa07580ab0c
2014-10-09 17:44:58 +01:00
Michael Meeks
c78d5fae81 German comment translation.
Change-Id: I98526bfd6f69d95d5c309e67c397bc85fb8817ab
2014-10-09 17:44:58 +01:00
Tor Lillqvist
96d210bf9c bnc#657899: Paragraph vertical spacing differs from PowerPoint
We need to set the "paragraph summation" flag also for .pptx import. (As is
already done for .ppt import.)

This is what in the Options (Preferences) UI is called "Add spacing between
paragraphs and tables (in current document)", on the LibreOffice
Impress:General page. This is a setting that when set becomes local to the
document. I actually don't really understand why this needs to be a
user-visible option, wouldn't it be enough for it to be an internal flag that
is set for documents imported from .ppt and .pptx, and is clear otherwise?

Change-Id: I525178957276e7d587b6ac4be8ae7919fc245a27
2014-10-02 21:09:52 +03:00
Noel Grandin
827c46e7d7 fdo#82577: Handle Window
Put the VCL Window class in the vcl namespace. Avoids clash with the X11
Window typedef.

Change-Id: Ib1beb7ab4ad75562a42aeb252732a073d25eff1a
2014-09-23 14:11:39 +03:00
Stephan Bergmann
ea733ab5b6 Turn SfxItemState into a C++11 scoped enumeration
...to gain further confidence in the claim "that none of the existing
code tries to uses combinations of these enum values"
(d92602c5b1 "more fixes for SfxItemState")

Change-Id: I987922d945e8738e38adfde83b869adf3ff35b13
Reviewed-on: https://gerrit.libreoffice.org/11384
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2014-09-12 06:08:32 +00:00
Markus Mohrhard
ed6b8a100c remove whitespaces
Change-Id: I9daea42a433b5032931a722878874917cf37f4d1
2014-06-25 05:41:09 +02:00
Noel Grandin
e2080e70fe new compilerplugin returnbyref
Find places where we are returning a pointer to something, where we can
be returning a reference.
e.g.
   class A {
     struct X x;
     public X* getX() { return &x; }
   }
which can be:
     public X& getX() { return x; }

Change-Id: I796fd23fd36a18aedf6e36bc28f8fab4f518c6c7
2014-06-24 11:34:21 +02:00
Noel Grandin
184a00b962 loplugin: inlinesimplememberfunctions
Change-Id: I42119f656ca528286fb25d2d36c0af54b7d04a6b
2014-06-09 10:10:13 +02:00
Caolán McNamara
2fc3b4173f coverity#1078582 Dereference after null check
Change-Id: I3b972510871f36a3c7877b38d3a012aa88acf4c5
2014-05-23 14:16:13 +01:00
Matúš Kukan
5c2ab70cc2 cp#1000077: Set 'modified' document property more consistently.
Update document info at one place, so that it works for other formats
like .doc, .docx, ... too.

Change-Id: If71799b491d2210f0d3bdbdb05f91f26c986a260
2014-05-22 13:55:53 +02:00
Noel Grandin
b45a12c37d sd: sal_Bool->bool
Change-Id: I3172a42f6b6abe434ffe0475d1201ff50b6c06ea
2014-04-24 10:53:17 +02:00
Noel Grandin
b1de52241c svtools: sal_Bool->bool
Change-Id: Iaa489318f25107e91fc8133523fbd9d724493314
2014-03-24 08:12:08 +02:00
Noel Grandin
ac01de882d sfx2: sal_Bool->bool
Change-Id: I87c5a180566e9da185c2992844e6522e82c17747
2014-03-18 11:27:38 +02:00
Matteo Casalin
0e5c02da6e Fix indentation
Change-Id: I768699854c4e657e2d1b67d1a9b5ca5a925a05bd
2014-03-16 09:39:13 +01:00
Matteo Casalin
684baef506 sal_Bool to bool
Change-Id: Ib19ecab287396dc6d6cf4a77dcf7072c5c4c84f8
2014-03-16 09:39:12 +01:00
Noel Grandin
c2324940d3 sfx2: sal_Bool->bool
Change-Id: If960d94f867a1988ace83975cf16441c6f8866b0
2014-03-14 07:50:33 +02:00
Noel Grandin
6c97bc4717 svx: sal_Bool->bool
Change-Id: I78da39fc553b2e5040ee6665377ea51a1c4d04d7
2014-03-11 08:18:24 +02:00
Stephan Bergmann
12f1faf7bf svl: sal_Bool -> bool
Change-Id: Ic31455a1f5ffffa35d4fdde901dd70734207b6f4
2014-02-20 08:17:00 +01:00
Stephan Bergmann
608953c425 bool improvements
Change-Id: Icac34936bdb551ad517170fd497212513719d2aa
2014-01-28 20:26:23 +01:00
Noel Grandin
fb84710151 simplify - use OUString::startsWith where possible
Convert code like
   if( !aStr.isEmpty() && aStr[0] == 'x' )
to
   if( aStr.startsWith("x") )

Change-Id: Iabc3a44ed3be2d29eed876e0eeef212ccd271edf
2013-12-12 13:15:24 +02:00
Michael Stahl
c5138cad87 fdo#68724: sw: fix crash on Insert->File with Hybrid PDF
This is an unfortunate combination of 2 special cases:
- the Hybrid PDF has its own XFilter implementation to extract the
  embedded ODF document
- Writer needs to create a SwReader with SwPaM for Insert

Since the PDF XFilter uses a special service in sfx2 to implement
the import, handling this requires a new method in SfxObjectShell
that calls back into Writer to create the properly setup SwReader.

Change-Id: Ie85f3bfa322bfe883c479e1cb198a8bf0cbbac23
2013-12-05 13:00:27 +01:00
Takeshi Abe
3b2f956ba6 Drop duplicate #include
Change-Id: Ife8ebbb5e46704c5d2ff46cc345b4ed926e7dc12
2013-12-02 01:02:06 +09:00
Steve Yin
cc5518ca61 Integrate branch of IAccessible2
Change-Id: Ibf3be46e8619c2dce9636e8a90a6703f3e28ba33
2013-11-28 13:32:30 +00:00
Noel Grandin
2c35fff7ec remove most use of RTL_CONSTASCII_USTRINGPARAM macro
This is largely unnecessary when working with OUString

Change-Id: I3cf4d68357a43665d01162ef4a2d5346a45da9be
2013-11-19 10:29:30 +02:00
Thomas Arnhold
9de3cff361 String to OUString
Change-Id: I5ff57ede2217f1464571fb2beaa62a34425064ae
Reviewed-on: https://gerrit.libreoffice.org/5826
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2013-09-08 03:06:32 +00:00
Brian Fraser
bcbb20b0ef Print images in grayscale when printing using the "Black & White".
Black and white color option found in Impress at
File-->Print-->Libreoffice Impress tab

Before change, images are printed in pure white, and hence
missing from the printouts.

Should resolve bug 62838, and is contributed under the LGPLv3+ / MPL.

Change-Id: I29e291c2f2baf95b5725b862625f6a206e4cb8ba
Reviewed-on: https://gerrit.libreoffice.org/5798
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-09-04 09:22:08 +00:00