Commit Graph

108 Commits

Author SHA1 Message Date
d3b5038cbb loplugin:staticmethods
Change-Id: Iea68c4e466dd8e1cb7164959a680e5e52542166b
2015-05-05 09:30:39 +02:00
77fd72237c loplugin:simplifybool
Change-Id: Idf2ae6b0b2c3d111125ad91ea7d13eec67325f36
2015-04-24 12:36:21 +02:00
2240118177 Improved loplugin:literaltoboolconversion looking into cond. exprs.
...automatic rewriter fixes

Change-Id: I6b04ca80f08f8a71ff94e309fd52f44d736751ee
2015-04-23 18:39:07 +02: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
0eea902d18 const_cast: convert some C-style casts and remove some redundant ones
Change-Id: Idbae574e5d51d497fea7eadb6d80dec8f97d499a
2015-03-26 15:33:30 +01:00
9b0e09dedc SkipImages option for document import
This option allows images and drawings to be skipped while importing
DOC and DOCX, for text-only conversion or indexing.

Change-Id: Id4bfbbe48d8a8e970b1cb5922187768bf94dc918
Reviewed-on: https://gerrit.libreoffice.org/14733
Reviewed-by: Németh László <nemeth@numbertext.org>
Tested-by: Németh László <nemeth@numbertext.org>
2015-03-24 07:38:04 +00:00
3e03767906 Char highlight: convert LO character background to MSO highlighting
DOC export has a good approximating algorithm for that
so use it everywhere.
In RTF case use the default color table which is added
also by MSO Word. With that highlight colors are also added to
the table.

Change-Id: Ie4827a933c316d4dc0c0c7a32d8cf319477d1bf9
2015-03-21 16:19:11 +01:00
cfeeceab9e loplugin:constantfunction: filter
Change-Id: I11e616ec1e3249573797bd2a4bb2b52f11c115ee
2015-03-19 10:45:02 +02:00
c19c242ec0 boost->std
Change-Id: I412137e7e7b9b2b87f401bc140a9499d1fc012c6
2015-02-18 11:00:17 +00:00
3744d8506e boost->std
Change-Id: I8371b942d915f777a29ca01cd0aed674db0ca853
2015-02-17 16:24:05 +00:00
a1ceacc17e boost::foo_ptr->std::foo_ptr
Change-Id: I9219619b538b6530a89f5932ac51eb3b62eb396a
2015-02-16 12:54:44 +00:00
107d53ab88 loplugin:deletedspecial
Change-Id: Ifdd7a80704f4ccd093d58117131b83c74da8b029
2015-02-07 12:35:58 +01:00
fe480d8136 remove unused typedefs
found with some minor modifications to find/find-unused-defines.sh

Change-Id: I18cc479adedc7a0dada68a4aeef08300e62631dd
Reviewed-on: https://gerrit.libreoffice.org/14194
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-01-28 06:19:49 +00:00
b44cbb26ef 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: I138ef81c95f115dbd8c023a83cfc7e9d5d6d14ae
2015-01-26 08:42:28 +02:00
45ec1d9b56 brute-force find-and-remove of unused #define constants.
Change-Id: I7223530ae37297a76654cd00cc1fedb56dbe3adb
2015-01-08 10:39:36 +02:00
fd1372ba8b boost::unordered_map->std::unordered_map
you can get debug stl this way

Change-Id: Ia70a3e7c7c452390e8bee34975d296c9318e4a19
2015-01-02 16:14:36 +00:00
e5a03da8eb fdo#84938 replace PPT_PLACEHOLDER_ constants->enum
Change-Id: I4110fab17f42a747ec55b27445f28bdef873ef86
Reviewed-on: https://gerrit.libreoffice.org/13447
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-12-15 06:48:23 +00:00
f5c5bab09f fdo#84938 replace PPT_LAYOUT_ constants with enum
Change-Id: I3c77e7e551bd4b657cb58fdfeead73d50441e890
Reviewed-on: https://gerrit.libreoffice.org/13437
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2014-12-12 08:07:07 +00:00
e9a3d259c7 loplugin:cstylecast, involving pointer to incomplete type
Change-Id: If8d2be68a75e69226f2a5a1d2936a257fa032c23
2014-12-05 16:08:25 +01:00
5b940edaf6 unused function Calc_nBLIPPos
Change-Id: Iaa4073e2f1c0ccea7a5d63d24e34ac5647a0e7b0
2014-11-27 23:08:08 +01:00
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
1361dfc0aa coverity#1242606 Untrusted loop bound
Change-Id: Iafa03d4dd65eb343a80996880bc1ed846d1b7491
2014-10-20 10:57:14 +01:00
b1023801e4 Blind Win fix attempt
Change-Id: I39df464321685ebef29f44221bab9005295d0c3f
2014-10-15 16:16:46 +02:00
7d05bbd50d avoid double-delete
This is a regression from commit b1d48f0d9a3442c11adae6e36325a463d89ce44e.

Change-Id: Iffd39782c1d1fd7be14f4d657919f704807a40f5
2014-10-15 11:41:51 +02:00
4c12951a03 Typo: compatability->compatibility
Change-Id: If0b98a30452a9d1fcc340173deb6856755926471
2014-10-12 13:00:46 +02:00
ad8c2f7090 fdo#75757: remove inheritance to std::vector
from SvxMSDffShapeOrders.

Change-Id: Idf551f1fbde907759d6a296141e2837264dbbb10
Reviewed-on: https://gerrit.libreoffice.org/11840
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-10-08 15:18:32 +00:00
b1d48f0d9a fdo#75757: remove inheritance to std::vector
from PptSlidePersistList.

This also puts in assertions that every entry in a PptSlidePersistList
is non-null.
Cf. 9536a28ede89e8c29940e8ba225215a45667062c

Change-Id: Iea35532ed668e58a3f02d3f3433a66c2d4e1fe2a
Reviewed-on: https://gerrit.libreoffice.org/11807
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
2014-10-06 14:09:20 +00:00
c9d4a2887c fdo#82577: Handle PolyPolygon
Put the TOOLS PolyPolygon class in the tools namespace. Avoids clash with the Windows
PolyPolygon typedef.

Change-Id: I811ecbb3d55ba4ce66e4555a8586f60fcd57fb66
2014-09-30 11:47:41 +02:00
402bb706da filter: std::auto_ptr -> std::unique_ptr
Change-Id: Id1d0392e1dbd33de326aa2bd8cbcf8cc03bf7c90
2014-09-26 10:14:30 +02:00
60e78fbb80 fdo#82577: Handle Font
Put the VCL Font class in the vcl namespace. Avoids clash with the X11
Font typedef.

Change-Id: I1a84f7cad8b31697b9860a3418f7dff794ff6537
2014-09-18 08:54:37 +02:00
e6fdd7ad0a The bLastBoxInChain fields are unused
Change-Id: I741733a053c8b0123be8efbcb9fde39f53f6d83c
2014-08-22 14:48:25 +03:00
db12d9042c bHasUDefProp is unused
Change-Id: I8eae6f1ed791ba92c3b4679d1b9f8041f16678d1
2014-08-22 14:48:25 +03:00
f8bf090bbb These "newly added" record types are publicly documented nowadays
Use symbolic names from the MS-PPT RecordType documentation,
http://msdn.microsoft.com/en-us/library/dd945336(v=office.12).aspx

Change-Id: I1deecfc69dd3360ef982f144d5ff5348a2953280
2014-08-21 12:33:19 +03:00
439c90916c warning C4800: 'int' : forcing value to bool 'true' or 'false'
Change-Id: I011954c2e12abb8a7551638567474e2123d3221e
2014-08-17 05:15:25 +02:00
245df9b4b3 fdo#78663 : The File gets corrupted when saved in LO
Problem Description:
The docx file contains a word art inside a drawing tool.
After RT, nesting of <txbxContent> tag is happening which
is causing the corruption.

Solution: Created a service in util.cxx for checking
few shapetypes for which textbox with content is not
allowed. This check also helps to find that if we are
already inside a DML then we should purely read VML
Information.An existing UT testWordArtWithinDraingtool
was failing. The UT is related to same issue
(word art inside drawing tool) hence changed it
accordingly. Following is the commit id of the
UT-Change-Id: I00e94712e912ad1977fcb65a945fefb927795d77

Change-Id: I7e456c9f6a69af80da443e29eb02a64ba7d59468
Reviewed-on: https://gerrit.libreoffice.org/10229
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Tested-by: Luboš Luňák <l.lunak@collabora.com>
2014-07-21 15:03:25 +00:00
3e82897353 improve the inlinesimplememberfunctions clang plugin
Change-Id: I6d5a952901648e01904ef5c37f953c517304d31e
2014-06-17 10:55:17 +02:00
2537d2dd49 convert some sal_uInt8 fields to bool
Change-Id: Icd5845367157cc0b0c9342c6037b199c49432a76
2014-06-03 08:21:39 +02:00
19b159416d SvxMSDffImportRec: these members are all 32bit "signed integers"
Change-Id: Iee1dab4895970628e5f5c4ee6070f7f67ba2df8c
2014-05-24 18:34:07 +02:00
7b34d19473 sprmids is used only inside sw/source/filter/ww8
Change-Id: Iebae4a08a452117e71f72836ed686221031a61e6
2014-05-14 22:37:25 +02:00
2732f2b18d coverity#707784 Uninitialized scalar field
Change-Id: Ibbe836d360fad481f2828b703871c8a242767cef
2014-05-10 21:13:03 +01:00
371046c6a3 add missing modelines to cxx and hxx files
some of them have no copyright header

Change-Id: I9c2c0c859dabe231cb29af29290847e7b4aa46a3
2014-04-24 11:58:15 +02:00
187a513742 coverity#1202981 Non-virtual destructor
Change-Id: Iabf91e6c8e450b72b83de51c6a1fb6986f88b430
2014-04-16 11:23:14 +01:00
893590f16e The entry points for these are hidden behind OSL_DEBUG_LEVEL > 1 too.
Change-Id: I728e808ac897aa1be184fb4a8bbbf781eb816cf0
2014-04-14 15:46:22 +02:00
52494aad92 Clean up function declarations and some unused functions
Change-Id: I68b488d45c77ebf82029bfede98dca2400e02f2f
2014-04-14 12:25:30 +02:00
6a7d04a9cb Rename .doc SPRM IDs to match current MS specs
I understand that Libreoffice's names for SPRM IDs come from old
documentation for WW8 (Word '97), plus some later additions named by
OpenOffice developers as they encountered newer SPRMs in the wild.

Meanwhile Microsoft has released newer documentation which supplies
names for these previously undocumented SPRMs, plus it renames some
WW8 properties to have the suffix "80" to make room for newer
versions of those properties.

This commit aims to bring LibreOffice's SPRM ID names in line with
the current file format specification from Microsoft.
http://msdn.microsoft.com/en-us/library/dd923581.aspx

Change-Id: I904c1db17a776e2d9e6076f87369160e3b80f2e4
Reviewed-on: https://gerrit.libreoffice.org/8884
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-04-07 08:47:44 -05:00
8f6c55a839 Replace SV_DECL/IMPL_REF macros with SvRef template
Change-Id: I0ef2e67f6d61e0ce118c0f5e926b8194ef9d8058
2014-04-07 12:38:27 +02:00
c78f918a7c Full colour table borders in .doc export
Currently LO writes table cell border information to .doc files as part
of the "sprmTDefTable" property, but this only supports the WW8 (Word '97)
BRC (BoRder Control) structure which can only select from 16 colours.
There is no newer version of this property.

This commit adds output of an alternate property "sprmTSetBrc" which
specifies border details for a sequence of cells.  There is a WW9
(Word 2000) version of this property supporting full colours.

For LO I have used the constant name NS_sprm::LN_TSetBorder following
the existing naming convention here, which is to use *Border for the WW9
version because *Brc is taken for the WW8 version.

Conflicts:
	include/filter/msfilter/sprmids.hxx

Change-Id: Ie091d91c6d187e1c2542f59f58cec9a373a23e11
2014-04-06 16:53:04 +02:00
5fa564d4a9 filter: LN_TSetBrc -> LN_TSetBrc80 to match spec
Change-Id: I81b78e09130141704c7ec62c1c52bf50d5428dfd
2014-04-06 16:53:04 +02:00
abc429987c filter/msfilter: sal_Bool->bool
Change-Id: I24deda680469ce99ba358a68e83551bdb584751a
2014-04-03 09:17:52 +02:00
362d4f0cd4 Explicitly mark overriding destructors as "virtual"
It appears that the C++ standard allows overriding destructors to be marked
"override," but at least some MSVC versions complain about it, so at least make
sure such destructors are explicitly marked "virtual."

Change-Id: I0e1cafa7584fd16ebdce61f569eae2373a71b0a1
2014-04-01 19:22:54 +02:00