Commit Graph

928 Commits

Author SHA1 Message Date
36a0abed4a filter: add BaseURL parameter to SvxMSDffManager::ImportOLE()
... mainly for the (unlikely) case of ODF embedded objects in MSO binary
files, which can be created by toggling the
Tools->Options->Load/Save->Microsoft Office export settings.

Change-Id: I270f1516b70b20ec0b60cfbd17c2c327c3d9efd0
2015-12-15 17:44:36 +01:00
1a18c92a52 consolidate MSO format ClassID magic numbers in msfilter/classids.hxx
Change-Id: I673eeaa4168f769cb002995c43d986ee5f2030b2
2015-12-08 22:11:43 +01:00
5e07e1be57 Simplify and remove this do/while
There wasn't even a kind of "finally" block!

Change-Id: Ib6836e8e8bd7369c2049c0fd26081002dfbfecba
2015-12-05 16:26:16 +01:00
e7c78e6729 Removed unused code found by cppcheck
Change-Id: I495c40af12a0f16b7f1b13736405489677b582af
Reviewed-on: https://gerrit.libreoffice.org/20304
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2015-11-30 21:00:25 +00:00
78407eea3d filter: fix DrMemory/valgrind warnings in PPT paragraph import
various uninitialized variables in CppunitTest_sd_filters_test hang-8.ppt

Change-Id: Id0b9f146a7ab8b5bb2b36a5c2a39d65ee52e122d
2015-11-24 16:04:56 +01:00
6cd5d5f0a1 loplugin:unusedfields in include/filter/
Change-Id: Id79bc51ba273746873a1381243b2c1d32711bbb4
2015-11-24 14:20:25 +02:00
c43a3a5867 establish that Virtual Devices either match Physical Device depth or ...
are 1 or (rarely) 8 bit and lock that down.

Change-Id: I3d946ebef34ffb71c5adea7aa420af50e9584e05
2015-11-23 14:25:59 +00:00
b55fb34c4b loplugin:unusedfields filter
Change-Id: I6c049c5318b71c48cd4e64d2b051035012dc11e4
2015-11-20 15:07:05 +02:00
49c5b9a98c use comphelper::containerToSequence
Change-Id: I223ff4af01ab2da92da0c26d32457204a5008c4a
2015-11-19 11:05:41 +02:00
2224d88f6b editeng: wrong default item for EE_PARA_FORBIDDENRULES
Change-Id: Idad6192fd1e3049913fac3dd906264fde6d1914e
2015-11-18 20:41:29 +01:00
6848461383 editeng: wrong default item for EE_PARA_HANGINGPUNCTUATION
Change-Id: Ib23b5847625964c701bda23d7c58ad32c6024c9b
2015-11-18 20:41:28 +01:00
61f168d987 Add SvStream::ReadUtf16 (don't assume sal_Unicode is unsigned short)
Change-Id: I74f34e3389582617fa83f8f4a3d6867cf87189e1
2015-11-17 10:36:13 +01:00
96c26b0d9d use initialiser for Sequence<OUString>
using variations of:
git grep -lP 'Sequence.*OUString.*\(\s*1\s*\)' | xargs perl -0777 -pi -e "s/Sequence<OUString> (\w+)\(1\)\;
\s*OUString\* pArray.*;
.*\[0\]\s*=\s*(\S+)\;/Sequence<OUString> \1 { \2 };/g"

Change-Id: I03c64334ff30ee14dce0d17b67f5122a3893bbe3
Reviewed-on: https://gerrit.libreoffice.org/19971
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-15 12:20:39 +00:00
3cdda9af2c loplugin:nullptr (automatic rewrite)
Change-Id: I61e494952df8cc40fff3ccad0936adf06035dbeb
2015-11-10 10:31:25 +01:00
6c80a8fe89 new loplugin: oncevar
Change-Id: If57390510dde4d166be3141b9f658a7453755d3f
Reviewed-on: https://gerrit.libreoffice.org/19815
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-09 08:34:40 +00:00
cc6e40d5a7 loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)
Change-Id: I90ec231ed163b9bd501993b64188deab10823e14
2015-11-06 09:35:56 +01:00
59b072e22b yyyyy
Change-Id: I9a947beefd2dfe21da8239e841ea3fb416bd1548
2015-11-04 14:10:44 +02:00
1b41208608 use uno::Reference::set method instead of assignment
Change-Id: I3d94c94a9829161663a7ed18421ace38ce95a659
Reviewed-on: https://gerrit.libreoffice.org/19733
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-02 06:17:21 +00:00
20635ed90b Reduce scope of #include <tools/stream.hxx>
Change-Id: I0752cbb0cb2e0f89607d81d9eda7ce7091449fd6
2015-10-27 13:59:10 +01:00
9962877513 sal_uLong to ErrCode
Change-Id: I2b4b2673aa27de664f6c6780e67c70559ec61971
2015-10-27 13:59:09 +01:00
7bac2a210d TBBase::indent_printf() only #if OSL_DEBUG_LEVEL > 1
... so the next unusedcode round doesn't remove it again.

Change-Id: I3bcbafb0461f09fcfbb0e14f4f1a1713a540b5a3
2015-10-26 20:13:27 +01:00
cc2ffcad79 reintroduce TBBase::indent_printf()
This partly reverts a90c6eb99c8c2167c4b1ec75a21a30a344bfea43 which
erroneously removed the method as unused because it is used only with
OSL_DEBUG_LEVEL > 2

Change-Id: I6fa52775b6a013c0086ba9d7ae21720a9ab8aa01
2015-10-26 20:08:10 +01:00
e07d58cd65 loplugin:defaultparams
Change-Id: If7a81c87ebc2e7f72498fbee025b0e98bc84ce60
2015-10-20 11:45:30 +02:00
9000094034 loplugin:defaultparams
Change-Id: I380dd94c8ea48ab6dc1be074d9a5801501e24c18
2015-10-19 17:50:01 +02:00
cd79d5caf6 Reduce scope of variable
Change-Id: Ifa8cf3fcb7b33ffb03ef89d2f88cf4ab8287e43f
2015-10-13 13:15:03 +02:00
b076bb1da6 Reduce scope of variable
Change-Id: Id55865a539c90ef7e1fa1a2da2cc614e71115e6c
2015-10-13 13:15:03 +02:00
6fc3c9a50d clang-analyzer-deadcode.DeadStores
since 1cbec9cd986100de185f6dc10301a54f6604e6af "Resolves: #i119480# Fixed import
of curves from PPT"

Change-Id: I90107e4163503fd83676c4e104d1c7db08f12a18
2015-10-13 13:15:02 +02:00
f7e7403644 clang-analyzer-deadcode.DeadStores
Change-Id: I8082afe49a568b1cba9ce25dde9cad5e283244e4
2015-10-13 13:15:02 +02:00
7a169c11be Read this MSO_Anchor value as a sal_uInt32 too
...for consistency with 0fad62c2178d6b8157b07ff30fe9e2fc8173d393
"-fsanitize=enum"

Change-Id: I96e2a791811b5f45735d2ccb0686bcc12fe9a5a2
2015-10-13 13:15:01 +02:00
1716b3a338 remove some useless comments
found with git grep '// /'

Change-Id: I948cf9ae61bbbf2ec706ca5b0572c4f27c58c745
2015-10-13 10:07:49 +02:00
d6f97a2124 inline typedef
Change-Id: I6ec88fbdb9bc0e86f4e53eb765eabd5382a25b88
2015-10-13 10:07:49 +02:00
b36963c0a6 Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY code
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-12 17:52:29 +02:00
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
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
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
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
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
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
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
7d4c77e374 pClientData can be null
Change-Id: I9375f84affdaef30d9b1ded31525e6b7b8709cbc
2015-08-30 20:18:26 +01:00
078235028a eof isn't a Error, so use good not GetError
Change-Id: Ie1df87c7eb9d391d0fa4a579f744051a1f1b2ae1
2015-08-28 20:06:37 +01:00
1847753ab1 check seeks and reads
Change-Id: I0c5c4784713376e0762bfbd197640f8d31b65562
2015-08-28 20:06:36 +01:00
5ed690a3e8 check seeks and offsets
Change-Id: I2b6ded138b9101415fc49e93e1ec3ebcd3a9d2ae
2015-08-27 20:32:28 +01:00
0c713e45f9 check seek
Change-Id: I358758999bb918e73cdee2224e575e72c2131453
2015-08-27 20:21:41 +01:00
d400f155fd check returns of SeekToEndOfRecord
Change-Id: Ia593dd0e2239a97f17bb03f005d22028da482445
2015-08-27 16:43:18 +01:00
de71eae580 avoid loops in atom chains
Change-Id: Icc40c0ee6c7d8d305cf7cc60cbf3e511c763aedd
2015-08-27 14:45:03 +01:00