summaryrefslogtreecommitdiff
path: root/sw/qa
AgeCommit message (Collapse)Author
2016-03-11work on sane lifecylce for SfxFilterMarkus Mohrhard
all SfxFilter instances should now be hold inside of a std::shared_ptr. This fixes a number of huge memory leaks in the test framework and removes one huge source of memory issue in sfx2. SfxMedium contains a pointer to the SfxFilter but does not own. Therefore it is required that any SfxFilter belonging to a SfxMedium lives longer. However this seems to work mostly by hoping that all SfxFilter instances are stored in a global array. As we have seen with the tests this is not true (there are also some cases inside of sd that seem to not follow that pattern as well). Change-Id: I12fd04a504cc4efc0a94967abd91c6fe2c6a8ce8 Reviewed-on: https://gerrit.libreoffice.org/23140 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-03-10RTF import: handle classification during copy&pasteMiklos Vajna
With this, it can't happen that "paste" returns an error, but "paste as rtf" succeeds (from a classification point of view). Change-Id: Ia6807e5a6c065557cdd735a574ea858d29a97160
2016-03-10sfx2: make SfxClassificationHelper not require a full doc shellMiklos Vajna
So that input filters can build their own doc properties and can also use CheckPaste() without having the full original document around. Change-Id: I0b8a63702f73ce04e8728a360b56ab9d1ca67af1
2016-03-10Extract Directories from BootstrapFixtureBaseStephan Bergmann
(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-09RTF export: write user-defined document propertiesMiklos Vajna
Change-Id: I07dfd626f7d248e264fd1724f6f2bd1241be39d0
2016-03-09RTF import: handle \staticvalMiklos Vajna
With this, user-defined document properties are imported from RTF. Change-Id: I8dfb8e802bd26906827620550d6f5d88f047d364
2016-03-09CppunitTest_sw_uiwriter: add classification copy/paste testcaseMiklos Vajna
Change-Id: Ic3ac02fe28bee0ea3189fb2c9d3548f5ca13fe5c
2016-03-09sw testcases: avoid using UI name for default style nameMiklos Vajna
Change-Id: Ic2e08245dd022555ad6308283d406d81141a9124
2016-03-08tdf#87530 finish the regression testMichael Stahl
Need to store the document twice to actually reproduce the bug. Change-Id: I2332bce1e30546b3a9fe2ec020f2eea8e8d0da58
2016-03-08tdf#97601 sw: don't mark an already modified chart as modifiedMiklos Vajna
Regression from commit e2b260fc98e833d4e64426b90992094f2da0498c (sw: let layout not mark embedded object as modified, 2014-06-03), an infinite loop was caused by: 1) SwDoc::SetOLEObjModified() triggering the maOLEModifiedIdle Idle 2) which at the end called SwWrtShell::CalcAndSetScale() 3) which at the end called chart::ChartModel::setModified() 4) where chart code called back into SwDoc::SetOLEObjModified() via the modification listener, and this happened again and again. The original fix wanted to avoid marking the document as modified without a user interaction, so fix the bug by only calling setModified() if it prevents a not-modified -> modified transition. This keeps the original bug fixed, but prevents the infinite loop, that is always a modified -> modified transition. Change-Id: I3b56a91afaacd3e0b7cb646a492fd15f1b5168ee
2016-03-07tdf#65219 Fix temp files clean up in sw unit testsAleksas Pantechovskis
Change-Id: I57f4dc90bc2ad8488af8cd42515b195f4320a9d9 Reviewed-on: https://gerrit.libreoffice.org/22939 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-03-07basic: tdf#87530 don't copy storage that doesn't existMichael Stahl
If the Basic library is newly created it may not have been stored to the document storage yet. (regression from 5246fa262450f686674850c53df666422f441c86) Change-Id: I9c2fc1d7446795b9c1c2224671118b2a671dcad8
2016-03-02loplugin:unuseddefaultparam in sfx2Noel Grandin
Change-Id: I37afde801a6468c79259fe51acbdea0614c2c8c5
2016-03-01tdf#96326 RTF import: handle checkbox form field undefined resultMiklos Vajna
The RTF spec is quite terse on how the form filed result should be interpreted, but the binary equivalent documents properly that checkboxes have 3 valid states: 0, 1 and 25, the later meaning undefined. Use the default value in that case. Change-Id: I672bf8d1f63d7880227b7fa7b5c81f91e1877b2a
2016-02-29Updated search flag for testSearchWithTransliterateVarun Dhall
Change-Id: Ie540aca97cddbd657faae5d15293a922ba5196d5 Reviewed-on: https://gerrit.libreoffice.org/22702 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-02-25loplugin:stringconstantStephan Bergmann
Change-Id: I6e22654d78ba8e043bab1009a295f078f9666000
2016-02-25Added test for tdf#73660 search for string with soft hyphenVarun Dhall
Change-Id: Ia152f9cd97ead8e4289541ae6cd3e21a9635ffe0
2016-02-24let SvxSearchItem use SearchOptions2Eike Rathke
And all those places that interface to SvxSearchItem. Change-Id: I08915824a596cd0f247a89f44e4684cd22b98082
2016-02-24Remove unncessary castsStephan Bergmann
Change-Id: I5a2a465bec4fe38de683ce989264062a70a12d36
2016-02-23tdf#59699 RTF import: handle INCLUDEPICTURE fieldMiklos Vajna
On one hand, don't handle a fieldmark for it in dmapper. On the other hand, handle the field in the RTF tokenizer as it would be {\pict ...hexdump... }, that will result in an inline picture, as wanted. Change-Id: I554fdf017920350144300fd86617bf74eed8995b
2016-02-22sw: fix typo in commentChris Sherlock
Change-Id: I34d7cdc7146c8e4d89b44a8a2824cd69ff9d7d6a
2016-02-22Work around apprently rounding issue in test with retina mac.Norbert Thiebaud
Change-Id: I5c3a4ab39768393090ca0ddc3cf3efe600184fcc Reviewed-on: https://gerrit.libreoffice.org/22606 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2016-02-21tdf#84938 replace FRMMGR_TYPE_ with enumackepenek
Change-Id: I899b57a485b83cd7c10ddc5192c92b4c87fe583a Reviewed-on: https://gerrit.libreoffice.org/22582 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-17use consistent #define checks for the Windows platformNoel Grandin
stage 2 of replacing usage of various checks for the windows platform with the compiler-defined '_WIN32' macro In this stage we focus on replacing usage of the WIN macro Change-Id: Ie8a4a63198a6de96bd158ecd707dadafb9c8ea84 Reviewed-on: https://gerrit.libreoffice.org/22393 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-17sw: indentation fixesMiklos Vajna
Change-Id: I2a33fa5df5afed804adcbf904d5b47a507924034
2016-02-16Related: tdf#59699 DOCX import: fix linked graphics with relative URLsMiklos Vajna
Because the writerfilter::ooxml::OOXMLFastContextHandlerShape constructor only sent the input stream (and not the full media descriptor) to oox::shape::ShapeContextHandler, it's startFastElement() tried to reconstruct a media descriptor from just the input stream. As a result, the base URL of the document got lost at the time the oox::drawingml::BlipContext constructor tried to call getAbsoluteUrl(), to convert the relative URL to an absolute one. Fix the problem by sending not only the input stream, but the full media descriptor to the shape importer. As a bonus that makes code simpler, too. Change-Id: I1f06c04d0745aa7e2e06d4848cf454790d5073ca
2016-02-15tdf#56321 - .doc import image flipped statusJustin Luth
Although LO was exporting whether an image was flipped horizontally or vertically, it wasn't reading it in during an import. Change-Id: Ia85e3459d00f40d852bbcd3fcfe15e7b53d518ba Reviewed-on: https://gerrit.libreoffice.org/22344 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-02-14tdf#92157: allow both dimensions of a graphic to be 0Mike Kaganski
Commit ca80f73 made it possible for one of dimensions to be zero. This commit goes further, allowing opening real-life documents with graphics having both width and height equal to 0. Thanks to libreoffice@arbruijn.dds.nl for debugging and initial patch! Change-Id: I96a13b776adfd9fe46fc2c7691eb7904400c20a1 Reviewed-on: https://gerrit.libreoffice.org/21287 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-13tdf#76817: fix missing heading styles assigned to outline levels in ooxmlMark Hung
1. Export pStyle because writerfilter regard a list as an outline only if associated pStyle is set to "Heading N". 2. Export English style name to ensure style names created by LO with non-English UI is always recognized. Change-Id: I88c590e4bae6cf30e78ebc1011023461eac4e883 Reviewed-on: https://gerrit.libreoffice.org/22086 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Hung <marklh9@gmail.com>
2016-02-13tdf#81129 Support reading non-BMP characters in HTML documents.Mark Hung
1. Allow character entity ( &#nnnn; ) to exceed 0xffff in HTMLParser::ScanText() 2. Return a character as sal_uInt32 ( utf32 ) instead of sal_Unicode ( utf16 ) from SvParser::GetNextChar(). Conflicts: sw/qa/extras/htmlexport/htmlexport.cxx Change-Id: Ida455040970fae800f0f11471b27f53461fb78e4 Reviewed-on: https://gerrit.libreoffice.org/21152 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Hung <marklh9@gmail.com>
2016-02-12sfx2: related tdf#56270: loss of embedded objects imported from DOCXMichael Stahl
After the import some of these are kept in RUNNING state. For Math objects imported from MathType3 OLEs in particular, first a new Math object is created and stored to the XStorage, only then is the MathType3 stream imported. This means the Math object is modified and contains data that must be stored. The problem is then that SfxObjectShell::ImportFrom() simply calls setModified(false), clearing the flag without storing the object. For Flat ODF export we lose all the objects that are cached in sw's SwOLELRUCache; for the bugdoc something more inexplicable happens for ODT export where we lose "Object 214" (which is the first one in the cache) but no other ones. (The main difference is that for ODF there is an optimization to copy the embedded object's storage without loading the object, but for Flat ODF every object must be loaded and exported.) (regression from 83777cd6e0f3f1a4458af896fd13344c696ecb1e) Change-Id: Id1474fba9f4da2d5247c7ff4dc6819ddb9829fe8
2016-02-12sw: ensure that configuration change in odfexporttest.cxx ...Michael Stahl
... is reverted in case the test function throws an exception, so that subsequent^Wfollowing tests don't inherit the changed configuration. Change-Id: I748f9edf15a7f860607ae4cce891450db254c73e
2016-02-10tdf#87034 RTF import: fix multiple superscripts after footnote ...Miklos Vajna
... in the same paragraph. The intention was to avoid replaying the supertext buffer and using its contents as a custom footnote mark at the same time. However, it's enough to check if the buffer is empty to do so, and that avoids the mis-import of the bugdoc as well. Change-Id: I1e3b0c7f0c6d8eb8250d8b1d0d7d196039c40e79
2016-02-09Remove excess newlinesChris Sherlock
A ridiculously fast way of doing this is: for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \ --exclude-dir=workdir --exclude-dir=instdir '^ {3,}' .) do perl -0777 -i -pe 's/^ {3,}/ /gm' $i done Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c Reviewed-on: https://gerrit.libreoffice.org/22224 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-08tdf#83890 sw html export: fix missing start numbering attributeMarc Bessières
In the sequence 1 Title 1 1.1 Subtitle 1.1 Not numbered item 1.2 Subitle 1.2 2 Title 2 The numbering element for the Subitle 1.2 was missing the html start attribute when it was followed by a numbering element of lower level. So let's force it, when it comes after a not numbered item. Adding a test case that validate that the Subtitle now contains the right attribute Removed a reference to an openoffice bug that brings no value too Change-Id: I928592a667f59128a4aa079d6b042ffb14244181 Reviewed-on: https://gerrit.libreoffice.org/22191 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-02-08loplugin:unusedmethodsNoel Grandin
using an idea from dtardon: <dtardon> noelgrandin, hi. could you try to run the unusedmethods clang plugin with "make build-nocheck"? that would catch functions that are only used in tests. e.g., i just removed the whole o3tl::range class, which has not been used in many years, but htere was a test for it... <noelgrandin> dtardon, interesting idea! Sure, I can do that. Change-Id: I5653953a426a2186a1e43017212d87ffce520387 Reviewed-on: https://gerrit.libreoffice.org/22041 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-06vcl: bmpacc.hxx -> bitmapaccess.hxxChris Sherlock
Change-Id: I4bb19d6103c4a6a902d86b62a857e3478493924c
2016-02-05Fix typosAndrea Gelmini
Change-Id: Ice72f8d9971e15dd6ef365e64cd567b8581a92d3 Reviewed-on: https://gerrit.libreoffice.org/21797 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2016-02-03Added Test for checking newly created writer document with AppYieldVarun Dhall
Change-Id: If331fb2b0c03cd153387ddad7b33bbc28727ac11 Reviewed-on: https://gerrit.libreoffice.org/21995 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-02-03add EDB-39396-1 test-caseCaolán McNamara
Change-Id: I8afd1db3859b99cf09d0d52e999bbd95cd88ed10
2016-02-03Improve DrawingML export of rotated/flipped customshapesAndras Timar
When we export the customshape as polypolygon, we need to take into account, that the polypolygon of the shape already has flipped coordinates, but coordinates has to be relative to the rotated bounding rectangle. Change-Id: I4f3b015e439d3d6041adc67eddd460f5bd4dfca1 Reviewed-on: https://gerrit.libreoffice.org/21905 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2016-02-02loplugin:stringconstantStephan Bergmann
Change-Id: Ie4554214e475da1bddba7ab0694ce23d1d93f06f
2016-02-02xmloff: tdf#96147: ODF export: fix duplicate fo:background-colorMichael Stahl
... attributes that happen if both CharHighlight and CharBackColor properties are used, because the CharBackTransparent property wasn't taken into account, and combining the CharBackColor and CharBackTransparent properties happens *after* XMLTextExportPropertySetMapper::ContextFilter() runs. Also, it looks like a transparent highlight wouldn't export properly but apparently DomainMapper::getColorFromId() won't create such. (regression from f880962f5bf26bfaef06bd3f9e67e2d901a2e74c) Change-Id: Ib628ef8bb377482f74fadb97c81afb95fbbf7184
2016-02-01sw: for better or worse getParagraph() is 1-basedMichael Stahl
Change-Id: I2bc99b4cbb86a368b6218b3c1a7dfc693858d1c9
2016-02-01writerfilter: tdf#97417: don't insert numbering on end-of-sectionMichael Stahl
... paragraph, it will be copied to every following paragraph. (Before commit 2b78f2cd7b9e4bab0f3b3b9119238f36a1bbc7b2 the properties of the end-of-section paragraph would be overwritten by the properties inside the header) Change-Id: Ibe095cf873a09ef9e12f898d09b5fd6f61c914c9
2016-01-31tdf#97362: Deleted CheckTable.java(this test translated to Python already.)kadertarlan
v2: Deleted CheckTable.java in JunitTest_sw_complex.mk Change-Id: I737a887d6f48fb2cacbe893289a430dd8312b3d8 Reviewed-on: https://gerrit.libreoffice.org/21949 Reviewed-by: jan iversen <jani@documentfoundation.org> Tested-by: jan iversen <jani@documentfoundation.org>
2016-01-30tdf#97362: Convert Java unit test to Python (check_named_property_values.py)kadertarlan
Change-Id: Icb94cdf3601d6d985ea147e3c80eadba2999ccee Reviewed-on: https://gerrit.libreoffice.org/21877 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-01-29CppunitTest_sw_rtfexport: add RtfExport::WriteRevTab() testcaseMiklos Vajna
Change-Id: Ie091a38b34f14f6f641d591092bcbc38b0c548f6 Reviewed-on: https://gerrit.libreoffice.org/21910 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-01-29tdf#96175 RTF filter: export \companyMiklos Vajna
Change-Id: I590d015aa50350cceef70313498e72474d242789 Reviewed-on: https://gerrit.libreoffice.org/21897 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-01-29tdf#97362: Fixed Python unit test (check_indexed_property_values.py)kadertarlan
Change-Id: Ib8cfaccaaf5bf75169c96e46d95ff118cc850f79 v2: Deleted whitespaces Reviewed-on: https://gerrit.libreoffice.org/21886 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org>