6858 Commits

Author SHA1 Message Date
Noel Grandin
ff339c89b5 loplugin:constantparam part2
Change-Id: I7ec4c946be52a6b56aee908426f95ecacc7b0746
Reviewed-on: https://gerrit.libreoffice.org/36072
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-05 06:42:40 +00:00
Mike Kaganski
156f778593 tdf#106955: Detect XML by MediaType
According to Extensible Markup Language (XML) 1.0 (see
https://www.w3.org/TR/2008/REC-xml-20081126/#sec-prolog-dtd),
all parts of XML prolog (including XML declaration) are optional,
so XML stream without <?xml ... ?> is well-formed (though not
valid).

XMLFilterDetect uses only XML declaration to detect if the file is
to be processed further. However, this creates problems with said
documents.

This commit checks if the document has MediaType set to one of
known XML media types, in case when the check for XML declaration
failed.

Change-Id: I31627c0e3a39bee241f609650280ebac3f1cede8
Reviewed-on: https://gerrit.libreoffice.org/36101
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-04-05 06:07:14 +00:00
Mike Kaganski
d6323a2180 tdf#106525: Implement an XSLT import filter for ADO rowset XML
There are online services and management systems (like SharePoint)
that allow to export datasets in ADO rowset XML format ([MS-PRSTFR],
https://msdn.microsoft.com/en-us/library/cc313112). Usually they are
intended to be open with MS Excel as a spreadsheet (with autofilter).

This allows to open this data in Calc.

Change-Id: I495cd790138bdd6bd24630c0f422a0c8b4e3d0fb
Reviewed-on: https://gerrit.libreoffice.org/35159
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-04-05 05:17:22 +00:00
Noel Grandin
5676ced825 make UNO enums scoped for internal LO code
this modifies codemaker so that, for an UNO enum, we generate code
that effectively looks like:

   #ifdef LIBO_INTERNAL_ONLY && HAVE_CX11_CONSTEXPR
       enum class XXX {
           ONE = 1
       };
       constexpr auto ONE = XXX_ONE;
   #else
      ...the old normal way..
   #endif

which means that for LO internal code, the enums are scoped.

The "constexpr auto" trick acts like an alias so we don't have to
use scoped naming everywhere.

Change-Id: I3054ecb230e8666ce98b4a9cb87b384df5f64fb4
Reviewed-on: https://gerrit.libreoffice.org/34546
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-04 06:38:03 +00:00
Jens Carl
6b4a149a65 tdf#39468 Translate German comments
Translate German comments and terms in UnoControls/, editeng/, filter/,
odk/, reportdesign/, sd/, sfx2/, starmath/, svl/, svtools/, toolkit/,
tools/, writerfilter/, and xmloff/.

Change-Id: Ibc401a425ddfdf41e4e4a78600f3fbce8cfaa2b1
Reviewed-on: https://gerrit.libreoffice.org/35992
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-04-03 19:25:49 +00:00
Caolán McNamara
f2b52c8597 coverity#1403736 Unintentional integer overflow
Change-Id: I3902dda8f7b420ea3f5e7e8c5d50a47b7e762918
2017-04-03 10:13:18 +01:00
Caolán McNamara
fb41ebff32 ofz: more check bounds on read
Change-Id: I70018ee2ab282c11547f5bf9d81b2ee74c74aa04
2017-04-02 16:50:38 +01:00
Caolán McNamara
adb597102e signed/unsigned comparison warnings
Change-Id: I384c5bd3e87b3615fdcd31768f920d6679946ba7
2017-04-02 16:46:11 +01:00
Caolán McNamara
66147965d5 ofz: drop hard-coded limit
Change-Id: I175b2db73a29c7e83003ad0638818e7876d552d4
2017-04-02 15:27:10 +01:00
Caolán McNamara
4cd4ec2855 convert to std::vector
Change-Id: Icd442975cbc084a67bdd3e7f24113f499981db60
2017-04-02 15:27:10 +01:00
Caolán McNamara
9e0bcd809a drop the weird casting
Change-Id: I62d4eb8c3bdc9026484242463dc278094f8941f4
2017-04-02 15:27:10 +01:00
Caolán McNamara
67bf8ecc6f signed/unsigned comparison warnings
Change-Id: Ibc091869529ad290f3af3d87c82a5489ba22cc6f
2017-04-02 15:27:10 +01:00
osnola
0e261a6908 libmwaw import filter improvements
+ correct a small mistake
  + add pot the file extension (the file extension for PowerPoint 95
     template)

Change-Id: I4ad18088ccb9777e1b34f393effbe2d24468804e
2017-04-02 13:42:20 +02:00
osnola
8988c925ce libstaroffice import filter improvements
+ add support for presentation file (i.e. the file created will StarImpress
     are now open as presentation).
  + modify the OLE parser to be similar to the librevenge OLE parser,
    ie. the librevenge parser ignores the first character of a filename if
    this is a control character...

Change-Id: I913a70cba29839d43dac58d5e00dbebfc4d28abc
2017-04-02 13:42:20 +02:00
osnola
b0067c89e6 libwps import filter improvements
+ some astyle modifications,
  + add .wk4 and .123 to the list of file extensions,
  + add support to open Lotus files protected by a password.

Change-Id: I94d4afffd73f0999ff2b1958704cb3985fcd0cc9
2017-04-02 13:42:19 +02:00
Caolán McNamara
af45b3d48e ofz: more check bounds on read
Change-Id: I92b10aeab34cb6a78deff1d4b54545c8f506113c
2017-04-02 12:05:20 +01:00
Caolán McNamara
fb05611064 ofz: check bounds on read
Change-Id: I07779bec876b90e36f20a81d6dbf06ae727edf85
2017-04-02 11:33:28 +01:00
Caolán McNamara
647ff1add9 ofz: use safer ctor
Change-Id: I23d23a73442a22ecced0c0287b42a7c667ebfa7e
2017-04-02 11:33:28 +01:00
Caolán McNamara
f050faebab cgm mode is now unused
Change-Id: Iea58345633cdea50fdecfe9376160ae4ffcfc6a9
2017-04-01 19:51:19 +01:00
Caolán McNamara
7c7204ceef CGM_EXPORT_IMPRESS is always used
Change-Id: Ic5d9f0f015deae6e4db00912f1b432dbfefd8534
2017-04-01 19:51:18 +01:00
Caolán McNamara
537fff14c2 CGM_IMPORT_CGM is always used
Change-Id: I77616b97970486aa6bb3c9af577d4bb412c35ca2
2017-04-01 19:51:18 +01:00
Caolán McNamara
252f59b702 adjust cgm import to make testing easier
Change-Id: I2979af77522e085075d4f1e1e379fe82e614163b
2017-04-01 19:51:18 +01:00
Caolán McNamara
62961938ca rework ImportCGM to take a SvStream
Change-Id: I261cb5afd251e96fa676ba37fa397159eb7fce32
2017-04-01 16:33:18 +01:00
Caolán McNamara
cc2b6dbb26 ofz: make scanline copy faster
Change-Id: I69225a7b0d0d09d6bc5faf5711552322a7a2ab01
2017-04-01 14:54:22 +01:00
Miklos Vajna
a5a571307f tdf#82580 tools: rename Rectangle to tools::Rectangle
Mostly generated using

make check COMPILER_EXTERNAL_TOOL=1 CCACHE_PREFIX=clang-rename-wrapper RENAME_ARGS="-qualified-name=Rectangle -new-name=tools::Rectangle"

Except some modules have their own foo::tools namespace, so there have
to use ::tools::Rectangle. This commit just moves the class from the
global namespace, it does not update pre/postwin.h yet.

Change-Id: I42b2de3c6f769fcf28cfe086f98eb31e42a305f2
Reviewed-on: https://gerrit.libreoffice.org/35923
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-03-31 06:27:11 +00:00
Caolán McNamara
bb3715b628 ofz#967 optimize tiff import if line is the same as previous line
Change-Id: Ided61679a579a73481320f85c05b03e3ce3d762a
2017-03-30 21:14:48 +01:00
Caolán McNamara
0d658dfc8f ofz#969 endless loop in ppt loading
Change-Id: If68bf21cd135c64957cc6def654230daa5240698
2017-03-30 14:15:22 +01:00
Noel Grandin
0cd7ccb87e convert GradientType to scoped enum
Change-Id: Ie71ead122965e967796ed01270cc2824d35905ac
Reviewed-on: https://gerrit.libreoffice.org/35900
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-30 13:06:54 +00:00
Jochen Nitschke
da56de9ac4 remove type decorations on char literals
they are only needed where type deduction fails.
left them in defines for now.

Change-Id: I7f002dd6bc7acc083c73b6c64076de6dd28d0b09
Reviewed-on: https://gerrit.libreoffice.org/35893
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-03-30 12:21:40 +00:00
Jens Carl
63e36cdd9d tdf#39468 Translate German comments
Translate German comments and terms in filter/

Change-Id: I37a5c87952b2664ea3171373c8bb9020c0fa73d0
Reviewed-on: https://gerrit.libreoffice.org/35887
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2017-03-30 10:26:27 +00:00
Noel Grandin
a34b33d2b9 convert SvxDateType to scoped enum
Change-Id: I5ce04f252642cb3a6c1b08ee22255f6c7b97f0f8
Reviewed-on: https://gerrit.libreoffice.org/35842
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-30 06:26:12 +00:00
Miklos Vajna
9c944b0d1b vcl PDF export, norefxobj: add UI for this
Disable the "use reference XObjects" (old behavior) by default, but keep
it as an option in case someone wants it.

Summary till the help is updated: the old way is simpler code, so it's
always correct, but really only Acrobat supports that markup. The new
way is supported by all readers, but more complex, so it's more likely
it goes wrong.

Change-Id: I4769474f29d98412be496a0aa4e8254ae4f0919e
Reviewed-on: https://gerrit.libreoffice.org/35826
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-03-29 08:46:52 +00:00
dennisroczek
b0a3a48c1d expand vis to visible; fix typos
* translate German source code comments
* remove bogus surce code comments
* remove ascii art
* removed old StarOffice/Sun internal bug tracker references
* remove left over from commit dcd5dee88e3c1185638b190553bef65c2ef6566f


Change-Id: I3c5cce621c43e4a03afb76f4cc5a12065914e5ad
Reviewed-on: https://gerrit.libreoffice.org/35404
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-03-29 08:12:10 +00:00
Caolán McNamara
b7152aff51 valgrind: use of uninitialized values
Change-Id: I5b8c6d4d4576fd88dbffdfc710cbd9b2e9429942
2017-03-28 14:45:00 +01:00
Chr. Rossmanith
f900888ba5 tdf#105641: no javascript in svg export for selection of objects
Change-Id: I9150449770b7cef0c424277f87a21e00e123b9ea
Reviewed-on: https://gerrit.libreoffice.org/34432
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-03-27 20:56:50 +00:00
Caolán McNamara
b79d0136b5 ofz#668: more complete fix
This reverts commit f01a975cb22d33a386bfd8db4ea6b4b77aceca1b.

Change-Id: I18d11dcc137c20d54076e3c4117c10f2dd80efda
Reviewed-on: https://gerrit.libreoffice.org/34738
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-03-27 16:10:19 +00:00
Caolán McNamara
dfdf256d82 Resolves: ofz#668 check for massive row lengths before trying to allocate them
Change-Id: I7b3f1abf5dcf457e8ff7d04a7cf48ffee70817a2
Reviewed-on: https://gerrit.libreoffice.org/34571
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-03-27 12:54:40 +00:00
Caolán McNamara
26262de4d5 ofz#942 fix leak
Change-Id: I52f69e9dc4c47764c1b3773b1c41b2f04807703e
2017-03-25 22:25:20 +00:00
Stephan Bergmann
0f9b0f4712 loplugin:redundantcast
Change-Id: I7f20df3b568f9c33a66726202952dbf4232132c6
Reviewed-on: https://gerrit.libreoffice.org/35677
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-03-25 12:50:48 +00:00
Andrea Gelmini
e4af83972e Fix typos
Change-Id: Ifb779b6c96a009e6c770a8017bb2e2031a288f5f
Reviewed-on: https://gerrit.libreoffice.org/35630
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-25 08:57:51 +00:00
Stephan Bergmann
d2d6e7dc90 Change SvxMSDffManager::ImportOLE nOLEId parameter from long to sal_uInt32
The only place this function is called (SvxMSDffManager::ImportGraphic,
filter/source/msfilter/msdffimp.cxx) it is passed the sal_uInt32 return value
from a call to DffPropSet::GetPropertyValue, so that seems a better type.
(SvxMSDffManager::ImportOLE used long at least since
d2000efb31f864e912c6cf52760eea0e602b6893 "#i106421#: move msfilter to filter";
DffPropSet::GetPropertyValue used UINT32 back then, changed to sal_uInt32 with
e8c2c1daae9008d383288f94600b1d34d2059fb1 "removetooltypes01: #i112600# remove
tooltypes from filter".  Unclear if those had ever had more compatible types in
the distant past.)

Change-Id: Ia486d169cd2cc0e73042e72fd4476cc2ae0e8cc5
2017-03-23 19:57:22 +01:00
Stephan Bergmann
6291574d94 Remove unused #include <ctype.h>
Change-Id: I8bf3e30687e20151a9e1936e69362abfe9b3a99d
2017-03-23 17:55:31 +01:00
Noel Grandin
ed76d1d350 loplugins:redundantcast teach it about c-style typedef casts
Change-Id: I1ac11a2481c0f4d8be1e1fd7c7637ac0ece3d65c
Reviewed-on: https://gerrit.libreoffice.org/35558
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-23 09:48:10 +00:00
Stephan Bergmann
dccbd373c9 Use rtl::isAscii* instead of ctype.h is*
Change-Id: I3fc3db1cc2de49ebe5492fc7dae26b71aece3c6b
2017-03-22 21:43:43 +01:00
Miklos Vajna
5f4826d89b tdf#106693 vcl PDF export: initial UseReferenceXObject option
It's still on, but in experimental mode start work towards the ability
to not use that markup.

Change-Id: Idf11c0e0a3c61ad93af331346ec7107304f6dc0f
Reviewed-on: https://gerrit.libreoffice.org/35538
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-03-22 16:52:14 +00:00
Caolán McNamara
ac655f20ad ofz#923 don't crash on missing shell storage
Change-Id: I689fcf6b82d5df8121c1bb4ca1a92bf0f145d7f5
2017-03-21 11:50:28 +00:00
Caolán McNamara
73f81f714c ofz#922 support avoiding config
Change-Id: I133b3881ea0b21fdb972342e8107e28bbf1727dd
2017-03-21 09:35:15 +00:00
Stephan Bergmann
d8ce3f60ba Fix ooo::vba::parseKeyEvent
Use rtl::isAscii* functions (correctly operating on OUString elements) instead
of truncating OUString elements to char and then using <ctype.h> is* functions
(which, in addition, for one can cause UB for char arguments when char is
singed, and for another can be locale-dependent).

(Found when auditing uses of <ctype.h> is* functions.)

Change-Id: I826aec92b18bd5dba72ceb69ff88c477d6ebd44c
2017-03-21 09:12:25 +01:00
Caolán McNamara
91e6638708 ofz#912 support avoiding config
Change-Id: I10bef028badc1a3d1d96adaa1757fa7d9c6d2dc8
2017-03-20 08:59:47 +00:00
Noel Grandin
4307643b2f remove unused defines from HRC files in misc(2)
Change-Id: I6d27c03925e7756022c3e343c0873c4dd1dd90dc
Reviewed-on: https://gerrit.libreoffice.org/35324
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-20 06:54:49 +00:00