Commit Graph
1199 Commits
Author SHA1 Message Date
Miklos Vajna 29d4ecf323 tdf#115574 sot: fix Excel -> Writer paste
Reported problem is that nothing happens for paste. Direct cause is that
BITMAP is selected as the format, and Excel advertises BITMAP, but when
we try to import that, it fails. There are 3 interesting commits in the
recent history for this topic:

- commit c47db038f9 (fdo#52547 SOT: Prefer
  embedding image data to embedding linked image., 2014-02-07) was a
  bugfix due to newer firefox
- commit 538c13f3d1 (fdo#78801 fdo#52547
  Paste preference is image, then html, then text., 2014-05-28) was a
  regression fix from the previous fix
- commit a96a7ce51a (fdo#81835 Don't
  prefer GDI Metafiles to RTF/HTML, 2014-08-05), was a regression fix
  from the previous fixes

Going back to the original state shows that the Excel -> Writer use-case
used to be RTF.

Restore the old Excel -> Writer (RTF) behavior by:

- going back to the original state, ignoring the enum class conversions
- re-fix fdo#52547: prefer bitmap over html, but leave everything else
  unchanged
- fdo#78801 needs no fix in this case
- fdo#81835 needs no fix in this case
- tdf#115574 selects RTF -> table shows up

After all these complications, the actual fix is surprisingly simple.

Change-Id: I2d728afa7d1dd7888fa43525366c197d806eea6c
Reviewed-on: https://gerrit.libreoffice.org/52120
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2018-03-29 19:28:11 +02:00
Caolán McNamara e89964ebb3 ofz: Pos2Page returns true on same value that returned false previously
a failed position returns false, but stays at the failed position, so
next time its called without moving it then it returns true

store what we return for a given position for reuse if the position
doesn't change

Change-Id: I404c65ac89eb6f5c867f62a62028b87effdbcbf8
Reviewed-on: https://gerrit.libreoffice.org/49308
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-07 10:25:25 +01:00
Caolán McNamara 523fc71115 pOptionalCalcSize is never null
Change-Id: I830d02cbac6d281ab7fbeaf43e7af6136896b503
2018-02-06 09:23:14 +00:00
Mike Kaganski 4b51097021 sot: MSVC: pragma warning: make more specific, remove obsolete
Change-Id: I0a0dc82561968cd1ff179c9930525e188060d9b7
Reviewed-on: https://gerrit.libreoffice.org/49050
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-02-02 13:11:08 +01:00
Caolán McNamara bfc04bc43e ofz#2976 Timeout
Change-Id: Iff085d6bdbbfc7f2c821fdcef8e412aa91152d93
Reviewed-on: https://gerrit.libreoffice.org/48804
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-29 09:51:06 +01:00
Caolán McNamara fdd41c995d ofz#5747 short->sal_Int32 like in StgDataStrm
Change-Id: I254c00b1142d7187beabe5d18532efec036de494
Reviewed-on: https://gerrit.libreoffice.org/48751
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-28 15:18:55 +01:00
Noel Grandin be94207ecb new loplugin:emptyif
Change-Id: I1092115a0ceb3a5e6680a4b724b129f98a892c42
Reviewed-on: https://gerrit.libreoffice.org/48128
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-19 13:25:54 +01:00
Noel Grandin 34d8710fff remove local copies of std::min,std::max
Change-Id: I067c4dcabad55180e4734fb06338a8e843713936
Reviewed-on: https://gerrit.libreoffice.org/47692
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-15 10:36:17 +01:00
Stephan Bergmann c81e832585 More loplugin:cstylecast: sot
Change-Id: Ic591422ad8b643d690a43a599e99352160fea480
2018-01-15 09:03:03 +01:00
Stephan Bergmann 5632c830e9 More loplugin:cstylecast: sot
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable
loplugin:cstylecast for some more cases" plus
solenv/clang-format/reformat-formatted-files

Change-Id: I7387e4c7877faba8bc82372734c14d2263457300
2018-01-12 20:15:28 +01:00
Noel Grandin 75c604a4ec loplugin:convertlong in ucb,sot
Change-Id: I6fa355448834701f11b84584649dfcdecd0f7b2c
Reviewed-on: https://gerrit.libreoffice.org/47596
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-09 07:20:44 +01:00
Noel Grandin a8c1c0ae16 loplugin:passstuffbyref improved returns in vcl
Change-Id: I0b103df2e7ce59093869f547225c95865d33da27
Reviewed-on: https://gerrit.libreoffice.org/46916
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-23 12:36:24 +01:00
Noel Grandin 783120996a new loplugin: convertlong
merge the droplong and convertuintptr into one new plugin.
Limit the analysis to looking at var decl's, since that seems to be
safest proposition, even if that too needs some careful analysis.

Change-Id: Id005baaf05cfb157ce44a06a1c81f08559a07d1f
Reviewed-on: https://gerrit.libreoffice.org/46851
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-21 08:22:29 +01:00
Michael Stahl 29baa05bb9 tools: remove unused #include from solar.h
Change-Id: I214e13add371380701ae39403d90a574a63e495d
2017-12-13 22:12:39 +01:00
Noel Grandin 3af500580b loplugin:salcall fix functions
since cdecl is the default calling convention on Windows for
such functions, the annotation is redundant.

Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d
Reviewed-on: https://gerrit.libreoffice.org/46164
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-11 12:13:46 +01:00
Michael Stahl 07c7b54412 tdf#114243 sot: catch exceptions in SotStorage::GetFormatID()
This function returns an error code so it might as well convert
exceptions to that for the benefit of clients like lcl_ReadSections().

Change-Id: Iccf21bf64ee81b66dd9b9902b9b952fa48a318e5
2017-12-08 21:57:23 +01:00
Caolán McNamara d02e49d9b9 ofz#4476 Integer-overflow
Change-Id: I7ee197b396026fb25872f9e79c3be098329a5cee
Reviewed-on: https://gerrit.libreoffice.org/45467
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-29 11:17:35 +01:00
Noel Grandin a566fd1c1a loplugin:unusedmethods
Change-Id: I2efb5c0e5735c179314c6c5de87821cee3b033e1
Reviewed-on: https://gerrit.libreoffice.org/45386
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-29 07:28:57 +01:00
Stephan Bergmann b26012ef15 Make loplugin:unnecessaryparen look through implicit
...similar to how <https://gerrit.libreoffice.org/#/c/45083/2> "Make not warning
about !! in loplugin:simplifybool consistent" does for loplugin:simplifybool

Change-Id: I23eef400af71c582d380c9bae6546ce06e8a1e18
Reviewed-on: https://gerrit.libreoffice.org/45122
Tested-by: Stephan Bergmann <sbergman@redhat.com>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-23 10:00:44 +01:00
Caolán McNamara 2161d04688 drop duplicate method
Change-Id: Idadd0a64e41cd02f5167b275081c3576a6224b12
Reviewed-on: https://gerrit.libreoffice.org/45075
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-22 13:33:25 +01:00
Takeshi Abe c40c0a2773 sot: Simplify UCBStorageElement_Impl with std::unique_ptr
Change-Id: Ia2de0a990ed8157095e03aabf65c0f7cd9fc4c87
Reviewed-on: https://gerrit.libreoffice.org/44700
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-20 12:57:37 +01:00
Caolán McNamara 359286b90f ofz#4079 check for error earlier
Change-Id: I141417811b0d64dbf1ad898f9f3a00e4e02d33c8
Reviewed-on: https://gerrit.libreoffice.org/44826
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-16 15:22:11 +01:00
Eike Rathke 1568e51ff2 SotClipboardFormatId::STRING_TSVC "Unformatted text [TSV-Calc]", tdf#113571
In preparation to solve tdf#113571 *AND* keeping tdf#32213 fixed
we need two separate unformatted text formats to distinguish
between in-Calc on-cell paste and external or in-cell paste.

Change-Id: Ic81a0c17d0643af2f5f4be50e67b690fd8846388
2017-11-13 12:58:45 +01:00
Takeshi Abe 6dd8b70105 sot: Simplify SotData_Impl with std::unique_ptr
Change-Id: I08752c66fd2680aa5f2eb2968d7e23cf797090f9
Reviewed-on: https://gerrit.libreoffice.org/44667
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-13 12:49:25 +01:00
Caolán McNamara f1c790ca36 ofz short read considered as a successful full block read
i.e StgDataStrm::Read takes the bool of no error and
multiplies it by the block size to report the length
read. A short read isn't an error so full buffer is
considered valid.

To keep #i73846# working and get deterministic fuzzing
results, zero out the trailing space of a successful but
short read. Changing this to return the truthful
number of bytes read makes #i73846# stop working.

There's wonderful nonsense here calculating nPg2,
determining nBytes to read derived from this,
reading nBytes into the buffer and then considering
it an error if nPg2 is not 1 after the presumably
potentially fatal buffer overflow if nPg2 wasn't initially
1, but this doesn't seem possible in practice

Change-Id: I2bac6066deb8a2902677e04696367ba2c351b325
Reviewed-on: https://gerrit.libreoffice.org/44310
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-04 21:58:36 +01:00
Noel Grandin 455e4011f7 improve constparam loplugin
lots of little fixes to make the logic less pessimistic

Change-Id: If368822984250b11b98c56f5890177a1402e8660
Reviewed-on: https://gerrit.libreoffice.org/44168
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-02 10:45:01 +01:00
Noel Grandin db04585533 loplugin:constmethod in basegfx,sot
Change-Id: I05d2cdefb7faf489ec29ba28dc5e3c28d08b9780
Reviewed-on: https://gerrit.libreoffice.org/43863
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-26 12:44:44 +02:00
Stephan Bergmann d6d5da3a5e loplugin:includeform: sot
Change-Id: Ibdc9e9d2f9912172fe18a960fb67c874585ec09a
2017-10-23 22:45:52 +02:00
Caolán McNamara 312a8a32a5 ofz+ubsan: runtime error: left shift cannot be represented in type
Change-Id: Ic153b39475abbd562e4c81b47089ca8280080cff
Reviewed-on: https://gerrit.libreoffice.org/43569
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-10-20 00:39:38 +02:00
Noel Grandin 2c05d758b2 add << operator for css::uno::Exception
Change-Id: Ia23dafd07133779144965682df3b7125a3214235
Reviewed-on: https://gerrit.libreoffice.org/43046
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
2017-10-04 15:18:00 +02:00
Caolán McNamara b4d9f5d4d6 coverity#1418672 silence Explicit null deref
Change-Id: I9c39da02a344316b09c190a3c12bdb17201cf176
Reviewed-on: https://gerrit.libreoffice.org/43027
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-10-02 10:46:12 +02:00
Caolán McNamara c10b3f85a3 AddressSanitizer: undefined-behavior
Change-Id: I55a92512ad9e1508c49ee3149394196f5be5f162
Reviewed-on: https://gerrit.libreoffice.org/42784
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-26 14:47:55 +02:00
Caolán McNamara a1ee7a24b1 check sot multiply
Change-Id: I9d1e86834af87cd92c2792f66ac722ba94dff040
Reviewed-on: https://gerrit.libreoffice.org/42768
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-26 00:28:56 +02:00
Mike Kaganski cf48347e7a Fresh run of bin/update_pch.sh
Change-Id: I69d4157aaf6570cecd51ea59df20556914942e06
Reviewed-on: https://gerrit.libreoffice.org/42565
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-22 21:01:49 +02:00
Caolán McNamara 893c08b59a move TestImportOLE2 where it can be used by fftester
Change-Id: I7b41d9ec673cfb96f51b5008540df63fe78a7581
Reviewed-on: https://gerrit.libreoffice.org/42639
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-22 18:09:44 +02:00
Caolán McNamara e0c9088315 ofz#2976 timeout in olefuzzer
Change-Id: Ic64e5eaa6b524403e46f9907499b0b853792a971
Reviewed-on: https://gerrit.libreoffice.org/42640
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-22 18:00:03 +02:00
Caolán McNamara fc5513f40a tdf#112399 ignore size of unknown/unused ole2 entries
Change-Id: I9908453c1a11997141f7d6c4e1dccff53984321c
Reviewed-on: https://gerrit.libreoffice.org/42436
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-19 00:24:43 +02:00
Noel Grandin 7aa7f4d9e4 loplugin:unnecessaryparen include c++ casts
Change-Id: I132d3c66f0562e2c37a02eaf4c168d06c2b473eb
Reviewed-on: https://gerrit.libreoffice.org/41874
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-04 10:52:41 +02:00
Noel Grandin 2e8acde112 remove UL/L suffixes from integer constants on the RHS of expressions
Change-Id: I899a8126c9d971601fea6c77eca165718aea0ac5
Reviewed-on: https://gerrit.libreoffice.org/41237
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-17 11:25:21 +02:00
Noel Grandin ff1f6a5fc2 remove UL/L suffixes from integer constants in initialiser/call expressions
Change-Id: Iae081567c4fa5b88edbd12cf2fbafd2b8f31b300
Reviewed-on: https://gerrit.libreoffice.org/41214
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-17 08:14:31 +02:00
Noel Grandin 367fedcc44 loplugin:unusedenumconstants
Change-Id: I54c0c1fca8ea5c89e71c6cd1110fad081ed3d334
Reviewed-on: https://gerrit.libreoffice.org/40953
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-10 12:19:50 +02:00
Varun Dhall 544a978132 EditEngine: Removing BIN format from sot
Change-Id: I495e2749b961dfca63bb1e27239ac6a09b80fd19
Reviewed-on: https://gerrit.libreoffice.org/40333
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-08-07 17:00:26 +02:00
Noel Grandin 49bc18c047 loplugin:constparams in i18nutil,sot
Change-Id: I8e91b11baa855b1049130746b34f53158010948b
Reviewed-on: https://gerrit.libreoffice.org/40050
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-17 13:31:28 +02:00
Johnny_M 0018fd1b81 Translate German comments/debug strings (leftovers in the sot dir)
Translates leftovers found using a custom regex and manually checking
the rest of the affected file.

Change-Id: I0e44957d58e089b82738c65a8774d1a45ea7068d
Reviewed-on: https://gerrit.libreoffice.org/39879
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-07-13 14:36:36 +02:00
Miklos Vajna 7d876e48cb sot: fix loplugin:unnecessaryparen warning
Change-Id: Ia022f6cb1e9c91c9aa49025e54699a5c7718fc75
2017-07-07 17:23:27 +02:00
Noel Grandin 4b2262ab5b new loplugin unnecessaryparen
Change-Id: Ic883a07b30069ca6342d7521c8ad890f4326f0ec
Reviewed-on: https://gerrit.libreoffice.org/39549
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-05 11:08:48 +02:00
Noel Grandin e037381f85 loplugin:unusedfields in slideshow..svtools
Change-Id: I74d5a4b8cfc4b18267f99648a3112b163c91fd8c
Reviewed-on: https://gerrit.libreoffice.org/39474
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-03 16:03:34 +02:00
Jens Carl 6e0a152350 tdf#39468 Translate German comments/terms
Change-Id: I9edef3138964d3f43745be39956bc6bb66d0cc4d
Reviewed-on: https://gerrit.libreoffice.org/39403
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Johnny_M <klasse@partyheld.de>
Reviewed-by: Eike Rathke <erack@redhat.com>
2017-07-03 13:28:44 +02:00
Stephan Bergmann c91f05e174 aKey is demonstratedly always empty
...since cb958bb5e0 "loplugin:constantparam in
sot..svl"

Change-Id: Id74078a26efb9b7a5a8b58ea28f3142cef4ac71f
2017-06-30 16:43:48 +02:00
Stephan Bergmann 42634a370d aContentType is unused
...ever since f14feb754e "INTEGRATION: CWS
warnings01"

Change-Id: I96bbbf55fe3136550dac229e4f247457bcb66364
2017-06-30 16:06:10 +02:00