Commit Graph
137 Commits
Author SHA1 Message Date
Miklos Vajna 67e1e2ee40 tdf#42949 Fix some more Include What You Use warnings
Change-Id: I2040315707674dc99a37aedb96ac61dca274c13a
Reviewed-on: https://gerrit.libreoffice.org/47348
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2018-01-04 15:51:39 +01:00
Miklos Vajna fd61509152 RTF filter: drop now redundant astyle.options
I (tried to) keep the RTF filter style consistent locally with astyle in
the past, but now that's redundant when we have an enforcing
clang-format mechanism in place. So drop the astyle config and switch to
clang-format in the RTF filter case.

To minimize backport pain, do this shortly before the libreoffice-6-0
branch-off.

Change-Id: I708dbeb0b5ad2afacc90029ee5abba9495f4601f
2017-11-22 11:24:24 +01:00
Justin Luth b6e0fcf856 DomainMapper_Impl: add check for m_xTextFactory.is() where missing.
To test: make CppunitTest_writerfilter_rtftok

These crash triggering instances were hidden by the presense of \super
in topcontext-2.rtf - so I copied it, and only removed \super.

My fix for tdf#109382 triggered a unit test failure for one
missing m_xTextFactory. It seemed safe enough to test for all of them
that aren't in try/catch blocks, not just for the specific
instance I can prove with the test.

Change-Id: I1e317e05f9bcbbb14360941ce07af1bdf0edac6a
Reviewed-on: https://gerrit.libreoffice.org/41060
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-08-16 08:48:57 +02:00
Caolán McNamara 168c867fc0 fftester: no table manager
Change-Id: Icb3c640e04416f9120d37558646a570daeddf0a4
Reviewed-on: https://gerrit.libreoffice.org/28825
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-09-12 08:37:10 +00:00
Caolán McNamara 3c15beae43 fftester: no table manager
Change-Id: I033454670d1ee662bc80bc07578690155d97ce28
Reviewed-on: https://gerrit.libreoffice.org/28805
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-09-10 12:57:52 +00:00
Caolán McNamara 44d4d9d4e9 fftester: use of deleted RTFParserState
but we only use the RTFParserState to use its m_pDocumentImpl and
the m_pDocumentImpl is never changed for the RTFParserState lifetime,
so take the m_pDocumentImpl at ctor time instead and use that
directly later

Change-Id: I15152e3f6d9008553b4a384a5e5da21373904cc9
Reviewed-on: https://gerrit.libreoffice.org/28802
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-09-10 12:36:53 +00:00
Caolán McNamara 30af3971d8 fftester: missing ValueLast
Change-Id: I8e881871b1ae4dea757263d04796779e62e168dc
Reviewed-on: https://gerrit.libreoffice.org/28693
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-09-06 15:01:41 +00:00
Caolán McNamara a42f4aaba3 fftester: apparent wrong property tested for existence
Change-Id: I5d208bb2a85d7aa4eea9b1c950eeb6f35493f759
2016-09-02 21:15:17 +01:00
Caolán McNamara a3d74764d8 fftester: topcontext check
Change-Id: I2045ce82a1d536ab566e6a1218bea9c6a6696024
2016-08-27 13:35:53 +01:00
Caolán McNamara 145e2dfc45 fftester: guard against empty table manager stack
Change-Id: Ibb4cadb58aa17eacfc9741f7f13c780be347cd8b
2016-08-07 17:01:10 +01:00
Caolán McNamara db686815b4 fftester: guard against no drawing object property set
Change-Id: I51736459f9f098d9d793bff3b9a1a403962e099d
2016-08-02 16:08:46 +01:00
Caolán McNamara 8a6b2fb5b9 fftester: another table manager stack checks
and a m_xTextFactory check too

Change-Id: I9352410c42048b4dd7d6dbc3514351ab8f16790b
2016-07-31 20:13:51 +01:00
Caolán McNamara 2acc9d0629 fftester: context stack check
Change-Id: I4a135a9f9ac2f16f9dab096f5c234ff1d6e5e853
2016-07-30 19:23:29 +01:00
Caolán McNamara 4e58115b2d fftester: some more table manager stack checks
Change-Id: Ic8dd72da175fee656889910b55d31ea161b944cc
2016-07-29 21:29:03 +01:00
Caolán McNamara d00fc303bc fftester: another empty table manager stack
Change-Id: If3148cb6e16cff4aad28c4f86467c66ed04bcd05
2016-07-29 21:24:46 +01:00
Caolán McNamara f9ae1b31f7 fftester: another null DestinationText
Change-Id: I84bf3788ac092c491d7c5a9f86421f1cf9f3e814
2016-07-29 09:20:32 +01:00
Caolán McNamara 0dd2216534 fftester: null DestinationText
Change-Id: Icdd71733c4e9f4b36e6e957e4dea772087890faa
2016-07-29 08:50:31 +01:00
Caolán McNamara 2710211eb2 fftester: throw on empty stack access
rather than spend the rest of my life protecting each one

Change-Id: I181df33b052a0303f072ce0252d98562231569e2
2016-07-28 14:40:29 +01:00
Caolán McNamara 5de2d02806 fftester: empty states stack
Change-Id: I05dfffced9a8677650a46b43f65a29e9b21c5524
2016-07-28 13:59:58 +01:00
Caolán McNamara df9414084b fftester: empty table manager stack
Change-Id: Ia7f7ace8130d5dfe290207e0cd3d2e6a43b8ab46
2016-07-28 13:49:13 +01:00
Miklos Vajna 9f9fa48ad0 writerfilter: avoid ugly cross-directory include
Change-Id: I16db4e16e5c2fa3aa3bfb22f83d2c36695499b5c
2016-03-11 09:11:38 +01:00
Stephan Bergmann 60b1c95cc4 Extract Directories from BootstrapFixtureBase
(as some tests derive from the latter only for the Directories part, not for the
setUp/tearDown overrides: those tests will be cleaned up next)

Change-Id: Ib6b78eea868b8bc21d4cc6e8fd9e1d025deca05f
Reviewed-on: https://gerrit.libreoffice.org/23078
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-03-10 08:04:40 +00:00
Chirag Manwani b38f58a3f9 tdf#97703 Removed empty setUp/tearDown methods
Change-Id: Ia62de30ae94bdae87cd5109c44eab40af4d020e5
Reviewed-on: https://gerrit.libreoffice.org/22985
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-03-08 16:54:50 +00:00
Noel Grandin 70f87284c6 improve defaultparams loplugin
to catch calling params with defaults like "= OUSString()"

Change-Id: Iad060e318ed492c22f8be44e326174fe6d28fff9
Reviewed-on: https://gerrit.libreoffice.org/22932
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-07 05:57:17 +00:00
Caolán McNamara 1fd280f2c6 boost::tuple -> std::tuple
Change-Id: Ia08c184b792ff73d3ed49d6a5d54dec1a35943e9
Reviewed-on: https://gerrit.libreoffice.org/21955
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-01-31 17:25:52 +00:00
Miklos Vajna 572adcaf38 writerfilter: loplugin:stringconstant
Change-Id: Idb0865f4d0db6c4eda33810ab2ef4cff49bc85d1
2015-12-08 10:09:14 +01:00
Mike Kaganski e4d5b5efac tdf#54584: adjust skip-slash condition, allow unterminated quote
Experimenting with different non-alpha characters in front of
field, most of them aren't allowed and result in field not
recognized by MS Word: #$%&'()*+,-./:;<>?@[]^_`{|}~
Besides, if backslash "\" is followed by another backslash or
space, it is illegal, too. This patch takes care of it.

On the other side, not closing quotes is allowed by MS Word.
This patch allows this, too.

The patch does not handle another allowed field code "=2+2".
This should be done in another commit.

Change-Id: I842fe59c026b68977e61a7ae0b5495c02803ad83
Reviewed-on: https://gerrit.libreoffice.org/20435
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-12-08 08:16:35 +00:00
Noel Grandin 2812963307 use uno::Reference::set method instead of assignment
Change-Id: I31a69a997098eb1807361b8049c3312a4f287d75
2015-11-05 13:32:16 +02:00
Stephan Bergmann b36963c0a6 Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY code
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-12 17:52:29 +02:00
Caolán McNamara a30886283f need DISABLE_CVE_TESTS for these tests under windows too
Change-Id: I92de8fa6a48dac9a0a09e6ebda4af9b8e4c3a1d7
2015-05-26 10:06:19 +01:00
Miklos Vajna 20a2d64bce sw, writerfilter: these 'using namespace' statements can be avoided easily
Especially the 'using namespace std' is scary, now that we have
std::shared_ptr and boost::shared_ptr, too.

Change-Id: Ibb584281f1b9d56103ab5984473eb484157c12d5
2015-04-20 18:23:13 +02:00
Noel Grandin 48bb2913a7 convert SFX_FILTER_ constants to enum class
Change-Id: I7e53cfc90cefd9da7d6ecd795b09214bd44b1613
2015-03-19 08:25:03 +02:00
Noel Grandin fb14be5f8f create new 'enum class' SotClipboardFormatId to unify types
of which there are several.

There are some issues here I am unsure of
- the SW and SC and CHART2 modules essentially ignore the enum values and assign their own ids
  Perhaps I should change them to use the common values and create new enum values where necessary?
- the sc/qa/ and sq/qa/ and starmath/qa/ code was doing some dodgy stuff. I translated the code to pass down the stuff
   numeric values to the underlying code, but perhaps further fixing is necessary?

Change-Id: Ic06d723e404481e3f1bca67c43b70321b764d923
2015-03-18 14:23:50 +02:00
Miklos Vajna 34870f1882 Use std::initializer_list ctor
Change-Id: I0238d8f4ae6b92f92f8bb92df33da5552a158cbe
2015-01-11 13:54:25 +01:00
Miklos Vajna 013ec10d4e i#84172 RTF import: handle nested groups inside redlines
The problem was that in case we had {\revised foo {bar}}, then we only
started a redline before "foo", but we ended it twice: during handling
of both "}". Make sure that the end of the redline is only handled by
the second one.

Change-Id: I41ab8b486e8615d3479fa0fadd6016476859b4b2
2014-10-22 22:45:15 +02:00
Miklos Vajna 6118ea49ae i#74153 RTF import: fix track changes vs superscript char prop
Since 9dbf817fe5 (handle scope of
w:pPrChange and w:rPrChange properly (bnc#821804), 2014-10-01), this
caused an assertion failure -> crash.

Change-Id: I680edf58854d0c9be6e77c44c1e6beb1e0442a49
2014-10-18 16:15:29 +02:00
Caolán McNamara bd1be89c1a encrypt sf_508f4e1..rtf to avoid it triggering virus detection
use name CVE-pseudo-2009-0238-1.rtf to record its detected as
Virus:Trojan.Mdropper and pseudo because its just a fuzzed
file from some random .rtf and not an original reproducer for
CVE-2009-0238

Change-Id: I85f6a72e0d32c14ea27cbe03bc4da3c2306fd1f5
2014-10-06 16:25:08 +01:00
Caolán McNamara b3698a6ac2 NS_ooxml::LN_CT_LevelText_val might be missing
Change-Id: I2683dd30d521b91cf026b3553ed4f75ee4172b3a
2014-08-21 08:33:04 +01:00
Caolán McNamara 0a42632a74 empty Reference
valgrind + bff

Change-Id: Id3c039a46dec5d2d4a4642dfb53d23a76972dde2
2014-08-20 08:57:06 +01:00
Caolán McNamara e324771991 empty m_aStates
valgrind + bff

Change-Id: I3bd526b7ebf0f4fce5d0c7054809e0dc2908e73f
2014-08-20 08:43:09 +01:00
Caolán McNamara 28df98abec empty m_aStates
valgrind + bff

Change-Id: I7b45e10471de77bd0481adf0bccdbf852c36d815
2014-08-19 08:40:54 +01:00
Caolán McNamara e2b9531e43 check for empty m_aStates
valgrind + bff

Change-Id: Ib818d508e10877a845b733c4aa223d1e2cbbc05e
2014-08-18 08:32:30 +01:00
Jan Holesovsky 003434f1e2 fdo#76803: Kill resourcemodel::Fraction, and use Fraction from tools instead.
Change-Id: I72d336b8aacf80f9ab6472c0948766ee56fda34f
2014-07-15 09:16:07 +02:00
Michael Stahl 2e95e551c5 writerfilter: add unit test for Fraction initialization
... as used by wrap polygon import, see fdo#41068 fdo#76803.

Change-Id: I4467560c2c3bbdab3fc9f8cd7a0c0b415429186c
2014-07-14 18:59:48 +02:00
Noel Grandin dac4ca5f68 new loplugin: externalandnotdefined
Find "missing headers," where a function is declared directly in the
.cxx (as extern) and not defined, and should arguably instead be declared
in an include file.

Change-Id: I6d83ee432b2ab0cd050aec2b27c3658d32ac02a2
2014-07-11 14:12:25 +02:00
Matúš Kukan 6bcf07ec38 unit test for convertTwipToMM100 functions (cp#1000087)
Change-Id: I36d68ecaa71319d90b9abaec21543cc5d4e76f24
2014-07-09 23:00:53 +02:00
Caolán McNamara 5aeaba2e65 Resolves: rhbz#1089377 crash on loading a specific rtf
Change-Id: I26864f3a2247f5d7184f395cfed91eaf92e36295
2014-04-22 17:24:11 +01:00
Miklos Vajna 8f2c47739f writerfilter: remove no longer needed WRITERFILTER_WRITERFILTER_DLLPUBLIC
Change-Id: Idedee38be19bc770518b85af62c9fc2b5b64e822
2014-04-11 21:26:11 +02:00
Caolán McNamara ef52dd9f94 test cases for CVE-2014-1761
Change-Id: I8fa160818e5981090aadea7d4691b8acc61f0b40
2014-04-11 12:36:38 +01:00
Stephan Bergmann 567ef6d578 Second batch of adding SAL_OVERRIDE to overriding function declarations
...mostly done with a rewriting Clang plugin, with just some manual tweaking
necessary to fix poor macro usage.

Change-Id: Ie656f9d653fc716f72ac175925272696d509038f
2014-03-27 18:12:18 +01:00