Commit Graph

6228 Commits

Author SHA1 Message Date
7e776c0027 loplugin:unusedmethods
Change-Id: I150baadc442e57ee604563bc52965daa9d2e41af
2015-10-06 10:17:02 +02:00
56a5734b06 cppcheck: noExplicitConstructor
Change-Id: I80950aaf1385bd76b012eab7866fd16848751f45
2015-10-05 20:30:59 +01:00
ba65cb97bc Fix typos
Change-Id: Icde566ef79dc4ed8cb67a89c743f0a6c1b3c8f14
2015-10-03 07:08:53 -05:00
de47a96d3e Revert "vcl event filter"
that's just a local toy for now, didn't intended to push that

This reverts commit 4afbd0292e09d9850a3cd0d1f169c73c5a3296db.

Change-Id: I20b758d4582022ffda35c4aed7251948e721f821
2015-10-02 09:12:22 +01:00
4afbd0292e vcl event filter
Change-Id: Ib10dccec244f3168f1ac4a892a09012adf38a839
2015-10-02 09:09:39 +01:00
19b85e90ab Fix typos
Change-Id: Ib30f4e5f16518cbbe71cf03998513ebd8c2a4d1a
Reviewed-on: https://gerrit.libreoffice.org/18949
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
Tested-by: Oliver Specht <oliver.specht@cib.de>
2015-10-02 07:55:15 +00:00
317e5b5065 loplugin:refcounting
Change-Id: If98d81e37ee939feec70db737fdbdb5f53b555c4
2015-10-01 17:18:40 +02:00
326c93feaa coverity#1242658 Untrusted loop bound
Change-Id: Idc3b3ce1174537039ce613e2f84f857e94299faa
2015-10-01 14:41:34 +01:00
6480d68afc coverity#735748 Unchecked dynamic_cast
Change-Id: Id15888f32996dd2ce05bed6942ebebdb8223a85b
2015-10-01 14:41:32 +01:00
2cea241cb5 add 602 format to fftester
Change-Id: I52055dc66ab2119dce6e3df3a34c25a822dea166
2015-10-01 14:05:26 +01:00
58aea3f36c loplugin:unusedmethods
- improvements to the plugin to find more method calls
- improvements to python script to remove more false+
- fix the FORCE_COMPILE_ALL build flag to include code in
  the $WORKDIR

Change-Id: I4d6015dcb9b9d60c26f0bcee8abad807177a7836
Reviewed-on: https://gerrit.libreoffice.org/19064
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-01 10:43:24 +00:00
bd8a4ae223 com::sun::star->css in filter/
Change-Id: I3a5e6a349c903259698118542b0000b0f119859e
2015-10-01 12:20:41 +02:00
e209d115d4 remove old standalone Sun bug numbers
Sun bug numbers without any accompanying text are completely useless.

Fixed with
   git grep -lP '//\s*#\d+#\s*$'
       | xargs perl -i -ne'/\/\/\s*#\d+#\s*$/d or print'
And then hand-checking the result to restore places where it deleted code.
And then some more grepping and hand-editing to kill the others.

Change-Id: Ia96ce4466db8bb8da363ebf41f0ae7f45f28bf29
Reviewed-on: https://gerrit.libreoffice.org/19023
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-01 06:57:19 +00:00
66343a8aeb shared_array->unique_ptr<[]>
where we don't need to share the data

Change-Id: I0edc9d62186d96095ee67e3c93f5cf186dffcb71
2015-09-30 13:35:43 +01:00
ac9671f948 tdf#94559: second step to remove rtti.hxx
replaced use of PTR_CAST, IS_TYPE, ISA in
    chart2, connectivity, editeng, extensions, filter, forms, framework, idl

Change-Id: I6a2f9d8bbccb07088413f7552af4b5af8f0cad99
Reviewed-on: https://gerrit.libreoffice.org/18920
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2015-09-30 06:07:57 +00:00
c50eb68af3 Renamed wrongly prefixed boolean variables
Fixed tdf#94269

Change-Id: I63109cc4e095bad680d7637a065080ea368860ae
Reviewed-on: https://gerrit.libreoffice.org/18851
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2015-09-29 18:33:40 +00:00
34180700b2 loplugin:removeunusedmethods, remove unused stuff
Change-Id: I35456b2a3ad2a84a1d045f09cdfb29e4c19b8350
2015-09-29 15:08:43 +02:00
e77981764a filter: the placeware filter is not entitled to its own createTempFile
Change-Id: Id4f4c23eab4aaf4d0f42827a89ecf90364605d97
2015-09-29 14:57:42 +02:00
97a2ca5d68 coverity#1242658 Untrusted loop bound
Change-Id: I0a279e47a4d87f561f39d5a8ca65fa17e2bc4a65
2015-09-29 11:10:34 +01:00
e72e8c59fb OOXML with VBA needs to be a different filter type
The filter type also contains the file format, so we need to use a
different type to keep the xlsm extension during export.

Now the only missing part is the warning that saving as the non-VBA
version will loose the VBA stream.

Change-Id: I11f78d2c33cb2834086a4e9fad141b3e374b8991
2015-09-27 07:38:47 +02:00
c6726bdbd2 make gnumeric xml a real LibreOffice filter format
Change-Id: I502f4610718b5c1914a54346c46d4f998c4d370f
2015-09-27 07:38:47 +02:00
c52982e741 better OOXML VBA export
Change-Id: If02aa26e974b0f16b45c5476234c6425fd128ae4
2015-09-25 06:43:05 +02:00
21d67ef6c0 indentation fix
Change-Id: I3a68ec1a23474af12c138dcfdc5c00ec1ee2eab7
2015-09-25 06:43:04 +02:00
599fab44ad hide ScopedPtr::reset and add disposeAndClear
Change-Id: I55d6e789abd408b8478a2b9ae141d8899af2c309
Reviewed-on: https://gerrit.libreoffice.org/18745
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-09-21 19:34:16 +00:00
99bfc363a6 convert Link<> to typed
Change-Id: I10b050dc4aae45e646761a82520caa96969bc511
Reviewed-on: https://gerrit.libreoffice.org/18700
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-09-20 06:37:36 +00:00
3a00aaef2a boost->std
Change-Id: Ie490bf2c6921f393bdeed96b1a8815996b701bf0
Reviewed-on: https://gerrit.libreoffice.org/18670
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-09-18 07:59:14 +00:00
eaf2c27888 boost->std
Change-Id: Ifde84627578283bd057d7393eb7e5578ef5c029a
2015-09-17 11:00:51 +01:00
2a4ccc0c1e convert Link<> to typed
Change-Id: I1c501671d72edd5b998e80c7fa1e91dbeb507af8
2015-09-14 10:00:44 +02:00
2c6a260b12 clang-analyzer-deadcode.DeadStores
...ever since the code block's inception with
8037c7164c747ea240b563af39a11f4f6bf037ef "#119860# fix bent connector's type
lost when save .ppt file"

Change-Id: I6afa201a83c588cc8b280a99cb75c2267b962efc
2015-09-14 08:26:25 +02:00
b43e03353a check stream status more often
Change-Id: I233c2fff9c06a81117f8114ccee83b53ea4026db
2015-09-11 15:38:39 +01:00
cf0c04a428 convert Link<> to typed
Change-Id: I85658fa35b9b85106a3b9c8ef303584cad6f39b0
2015-09-11 08:48:54 +02:00
8ac129a59b Handle IOException during filter detection
Change-Id: Ie2b8b65f0f2b7b34efbba478a7ccda7ef3719bd6
2015-09-10 16:39:24 +02:00
f4e951a61a convert Link<> to typed
Change-Id: I603463d0486d4d0f21ebbdc6eca900db58bb090f
2015-09-10 11:38:30 +02:00
b02f1c58e7 fix size check related hang
Change-Id: I3e8aa5c48ba802cd363688502b44e27bfdf67f01
2015-09-10 09:25:11 +01:00
c30c635774 speed up eps testing
Change-Id: I5a7c42aff29277a8189dc00a4a3a185d3a8d3021
2015-09-09 09:12:28 +01:00
61623d5b90 convert Link<> to typed
Change-Id: I365a81a0a960f5da736c9a97aa056da16c99452f
2015-09-08 08:16:46 +02:00
2b8e62f7b6 tdf#39080 Hide white space between pages in 'print layout'
Merged Hide Whitespace with Browser Mode and hooked
the former with the UI. In Hide Whitespace mode
the headers and footers are removed and
page margins as well as between-page gaps are
reduced to minimum.

In single-page view the side margins are left
as-is. In multi-page and book-view the sides
are removed, however, they have twice the
width of the top and bottom.

Printing and PDF export disable this mode.

The usable screen real-estate is greatly
improved in this mode, which is controlled
from the View menu.

Change-Id: I2d0075ae9a76162c26c78e9eb23a71920cdfc522
Reviewed-on: https://gerrit.libreoffice.org/17281
Reviewed-by: Jean-Baptiste Faure <jbfaure@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-09-03 08:45:07 +00:00
37a6fdf890 loplugin:stringconstant also for cases using char const v[] = "..."
Change-Id: Iba38686620624178a7be39d703389402bbcea4cb
2015-09-03 09:34:00 +02:00
5beffcf3f1 convert Link<> to typed
Change-Id: Ic0482dc5ed26eb2fc6ccde73022eff8b4786de83
Reviewed-on: https://gerrit.libreoffice.org/18258
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-09-03 07:20:27 +00:00
2d215ceccf Fixed a bug due to conflicts with Casarin's commit.
Change-Id: I5226a55ba804d494a8c9c9c9b5cd7ed3889eafbf
2015-09-01 16:28:50 +01:00
51242678e2 filter: avoid casting BitmapChecksum to sal_uInt32
Since BitmapChecksum is a typedef for sal_uInt64.

Change-Id: I768fa5134fa6e86559f3c6cbe1071093b4e68152
2015-09-01 16:28:49 +01:00
c8a46ee519 truncate checksum to 32-bit when it slips inside a file stream
Change-Id: I2cedf8acf73f71529f4090ff2f9fce7ab7663e68
2015-09-01 16:28:48 +01:00
7fe85d7633 Switching to 64-bit checksum: substituted sal_uLong with BitmapChecksum
A typedef sal_uLong      BitmapChecksum;
has been added to include/vcl/checksum.hxx

Wherever needed sal_uLong and sal_Int32 has been substituted with
BitmapChecksum.

A BITMAP_CHECKSUM_BITS constant equal to the amount of bits used by the
BitmapChecksum type has been defined and used in
`GraphicID::GetIDString` (vstools/source/graphic/grfcache.cxx).

Change-Id: I74bd285089e58a8b18c06233d75b87023c7bf31b
2015-09-01 16:28:46 +01:00
cefbbd5c32 coverity#1321600 Dereference before null check
Change-Id: I5a2e61200333ca57af990d3d7be3899da836472a
2015-09-01 09:40:20 +01:00
239c25ff95 check for error more frequently
Change-Id: I909c225dd9bd92763ae24b62854a9217fc2e2a0e
2015-09-01 09:40:20 +01:00
0fad62c217 -fsanitize=enum
...as happens in CppunitTest_sw_filters_test with
sw/qa/core/data/ww8/pass/CVE-2015-2467-1.doc, first at:

> filter/source/msfilter/msdffimp.cxx:1477:17: runtime error: load of value 8193, which is not a valid value for type 'MSO_Anchor'
>  DffPropertyReader::ApplyCustomShapeTextAttributes(SfxItemSet&) const filter/source/msfilter/msdffimp.cxx:1477:17
>  DffPropertyReader::ApplyAttributes(SvStream&, SfxItemSet&, DffObjData&) const filter/source/msfilter/msdffimp.cxx:2694:9
>  SvxMSDffManager::ImportShape(DffRecordHeader const&, SvStream&, void*, Rectangle&, Rectangle const&, int, int*) filter/source/msfilter/msdffimp.cxx:4332:21
>  SvxMSDffManager::ImportGroup(DffRecordHeader const&, SvStream&, void*, Rectangle&, Rectangle const&, int, int*) filter/source/msfilter/msdffimp.cxx:4119:39
>  SvxMSDffManager::ImportGroup(DffRecordHeader const&, SvStream&, void*, Rectangle&, Rectangle const&, int, int*) filter/source/msfilter/msdffimp.cxx:4106:39
>  SvxMSDffManager::ImportGroup(DffRecordHeader const&, SvStream&, void*, Rectangle&, Rectangle const&, int, int*) filter/source/msfilter/msdffimp.cxx:4106:39
>  SvxMSDffManager::ImportGroup(DffRecordHeader const&, SvStream&, void*, Rectangle&, Rectangle const&, int, int*) filter/source/msfilter/msdffimp.cxx:4106:39
>  SvxMSDffManager::ImportObj(SvStream&, void*, Rectangle&, Rectangle const&, int, int*) filter/source/msfilter/msdffimp.cxx:4033:16
>  SvxMSDffManager::GetShape(unsigned long, SdrObject*&, SvxMSDffImportData&) filter/source/msfilter/msdffimp.cxx:6210:23
>  SwWW8ImplReader::Read_GrafLayer(long) sw/source/filter/ww8/ww8graf.cxx:2502:17
>  SwWW8ImplReader::ReadChar(long, long) sw/source/filter/ww8/ww8par.cxx:3634:17
>  SwWW8ImplReader::ReadChars(int&, int, long, long) sw/source/filter/ww8/ww8par.cxx:3436:27
>  SwWW8ImplReader::ReadText(int, int, ManTypes) sw/source/filter/ww8/ww8par.cxx:3974:22
>  SwWW8ImplReader::CoreLoad(WW8Glossary*) sw/source/filter/ww8/ww8par.cxx:5175:9
>  SwWW8ImplReader::LoadThroughDecryption(WW8Glossary*) sw/source/filter/ww8/ww8par.cxx:5773:19
>  SwWW8ImplReader::LoadDoc(WW8Glossary*) sw/source/filter/ww8/ww8par.cxx:6045:19
>  WW8Reader::Read(SwDoc&, rtl::OUString const&, SwPaM&, rtl::OUString const&) sw/source/filter/ww8/ww8par.cxx:6167:20
>  SwReader::Read(Reader const&) sw/source/filter/basflt/shellio.cxx:175:18
>  SwDocShell::ConvertFrom(SfxMedium&) sw/source/uibase/app/docsh.cxx:258:22
>  SfxObjectShell::DoLoad(SfxMedium*) sfx2/source/doc/objstor.cxx:790:23
>  SwFiltersTest::filter(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) sw/qa/core/filters-test.cxx:112:20

Change-Id: Iafc548b5ba21a985521790770732f7f03e2485c9
2015-09-01 09:49:14 +02:00
ad6d83defb check for legal field sizes before reading
Change-Id: I3cdb647e1a057be5bb4b32d119ee5bcbbedf7473
2015-08-31 11:22:45 +01:00
a8fe085f97 check stream status
Change-Id: I65ed5979d35d8739367294a71620782b832cfd71
2015-08-31 09:57:00 +01:00
68ddda0f3f convert Link<> to typed
Change-Id: I53b0a7a9875a3ebcca915c8f2d8c53face6f9509
2015-08-31 09:50:10 +02:00
6f6884b198 loplugin:stringconstant: OUStringBuffer: appendAscii -> append
Change-Id: I8bbbb3f78d44ac1ddcc83170947038f20440f16f
2015-08-31 08:03:32 +02:00