summaryrefslogtreecommitdiff
path: root/sw/qa
AgeCommit message (Collapse)AuthorFilesLines
2019-11-22uitest for bug tdf#126168Zdeněk Crhonek1-0/+52
Change-Id: I35b7235b7f53789d781a567efe15f13be16f7193 Reviewed-on: https://gerrit.libreoffice.org/83530 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2019-11-22Extend loplugin:external to warn about classesStephan Bergmann6-0/+31
...following up on 314f15bff08b76bf96acf99141776ef64d2f1355 "Extend loplugin:external to warn about enums". Cases where free functions were moved into an unnamed namespace along with a class, to not break ADL, are in: filter/source/svg/svgexport.cxx sc/source/filter/excel/xelink.cxx sc/source/filter/excel/xilink.cxx svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx All other free functions mentioning moved classes appear to be harmless and not give rise to (silent, even) ADL breakage. (One remaining TODO in compilerplugins/clang/external.cxx is that derived classes are not covered by computeAffectedTypes, even though they could also be affected by ADL-breakage--- but don't seem to be in any acutal case across the code base.) For friend declarations using elaborate type specifiers, like class C1 {}; class C2 { friend class C1; }; * If C2 (but not C1) is moved into an unnamed namespace, the friend declaration must be changed to not use an elaborate type specifier (i.e., "friend C1;"; see C++17 [namespace.memdef]/3: "If the name in a friend declaration is neither qualified nor a template-id and the declaration is a function or an elaborated-type-specifier, the lookup to determine whether the entity has been previously declared shall not consider any scopes outside the innermost enclosing namespace.") * If C1 (but not C2) is moved into an unnamed namespace, the friend declaration must be changed too, see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71882> "elaborated-type-specifier friend not looked up in unnamed namespace". Apart from that, to keep changes simple and mostly mechanical (which should help avoid regressions), out-of-line definitions of class members have been left in the enclosing (named) namespace. But explicit specializations of class templates had to be moved into the unnamed namespace to appease <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92598> "explicit specialization of template from unnamed namespace using unqualified-id in enclosing namespace". Also, accompanying declarations (of e.g. typedefs or static variables) that could arguably be moved into the unnamed namespace too have been left alone. And in some cases, mention of affected types in blacklists in other loplugins needed to be adapted. And sc/qa/unit/mark_test.cxx uses a hack of including other .cxx, one of which is sc/source/core/data/segmenttree.cxx where e.g. ScFlatUInt16SegmentsImpl is not moved into an unnamed namespace (because it is declared in sc/inc/segmenttree.hxx), but its base ScFlatSegmentsImpl is. GCC warns about such combinations with enabled-by-default -Wsubobject-linkage, but "The compiler doesn’t give this warning for types defined in the main .C file, as those are unlikely to have multiple definitions." (<https://gcc.gnu.org/onlinedocs/gcc-9.2.0/gcc/Warning-Options.html>) The warned-about classes also don't have multiple definitions in the given test, so disable the warning when including the .cxx. Change-Id: Ib694094c0d8168be68f8fe90dfd0acbb66a3f1e4 Reviewed-on: https://gerrit.libreoffice.org/83239 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-22tdf#128153 docx/VML: apply style properties to shape textJustin Luth3-3/+23
This replaces LO 4.3 commit 8766011bccfd0f12f8dd77d2f94eb16e2e8c3471 DOCX import: set document-level font size default based on default para style ...and is needed for tdf#118947, since bogus DEFAULT_VALUEs really hinder determining what a table style should override. Shape text should inherit the font size from the style that is specified. In many cases, it will not be specified, and therefore the default style was appropriate, but in cases where a style IS specified, then of course use that fontsize ... and every other character and paragraph property. HOWEVER, I only added the properties used in vml import for now, and I skipped asian/complex fontnames since VML only handles CharHeight, and not CharHeightAsian/Complex. -note: this does not affect direct formatting - it just sets default value at the shape level, not at the paragraph level. So far I have only looked at DOCX:VML - which satisfies the unit tests. There are other codepaths that lead to PushShapeContext though, and this should be easy to expand to other import situations. I've tried lots of asserts to find unit tests that should be modified, and so far they all seemed to point to VML - although round-tripping doesn't use VML and still requires at minimum the CharHeight property to be overridden, so limiting non-VML to that to maintain backward compatibility, and reduce regression footprint. Since we have to emulate here (since paragraph styles are not supported on Draw text), a perfect solution cannot possibly be found - specifically in cases where multiple paragraphs exist in one shape with different styles applied, or where some pararaphs apply a paragraph property and others do not. Compromise 1: For ambiguous paragraph styles, fallback to the default paragraph style. Rationale: Normally, most styles inherit from default and only change a couple of properties. So MOST of the properties will match the normal style. The chances that the default style will be correct are more likely than that some other random default would be. -note: no existing unit tests were ambiguous Compromise 2: Ideally, each paragraph could report whether it had DIRECT formatting, and the paragraphs could be walked through instead of the shapes. But I don't think that is reasonably possible in this SyncProperties situation. At first I had a grabbag framework setup that monitored when a paragraph property was set, and then skipped applying that property. But I later noticed that the PropertyState for paragraph properties actually did seem to reflect that - which is a better solution if it works properly. Regression potential: -for VML: should be limited to non-charheight properties where the default style sets some weird default, and an ambiguous style sets it back to the program default. Prior to this patch, the default style value wouldn't apply. On the flip side (and more likely scenario), non-ambiguous cases will use the correct value and look more like MSWord, as seen in many existing unit tests that now use corrected fonts. -for non-VML: should be none since I limit it to only CharHeight which was previously emulated by changing the program default. Change-Id: I8f1fb7ed01f990dbf998ebe04064c2645a68e1aa Reviewed-on: https://gerrit.libreoffice.org/81365 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-11-21Revert "tdf#127579 DOCX export: fix losing color of ... ODT hyperlinks"Caolán McNamara2-9/+0
cause ~200 asserts of https://dev-builds.libreoffice.org/crashtest/299a13e8f7307b38ac10ad351273e2559e21ab16/backtraces This reverts commit 1d81d52b5da45f26e9d3adeb3b279eb9a488b94f. Change-Id: I8d00443f2fc8c71d6ef7baed5db0072847867ce1 Reviewed-on: https://gerrit.libreoffice.org/83406 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-11-21tdf#125300 extend AddParaSpacingToTableCells with line spacingLászló Németh2-2/+18
Now default compatibility mode AddParaSpacingToTableCells uses not only paragraph bottom margin, but also proportional line spacing before bottom cell border, as in MSO. Note: disable testForcepoint76, because it fails again with its fixed layout. Change-Id: I52f6204a5efc63aac4aa332a1563ada0cbeb9618 Reviewed-on: https://gerrit.libreoffice.org/83236 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2019-11-21uitest for bug tdf#126340Zdeněk Crhonek2-0/+39
Change-Id: I55972388b1f15dc86d309c5ffe998b44596b1cf2 Reviewed-on: https://gerrit.libreoffice.org/83351 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2019-11-21Fix typoAndrea Gelmini1-1/+1
Change-Id: I041dfdaac4903d1bb0bb9ee70a2e5e705af3aafb Reviewed-on: https://gerrit.libreoffice.org/83398 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-11-21tdf#121658 Roundtrip w:doNotHyphenateCaps via InteropGrabBagSamuel Mehrbrodt2-0/+8
Change-Id: I8a7efffb2866e46e978d09ca9fb5c9dec231e132 Reviewed-on: https://gerrit.libreoffice.org/83384 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-11-21tdf#97926 Add UI test for infobarSamuel Mehrbrodt1-0/+60
Change-Id: I82fe7ae4e9a564af27d1f080c0bf27e5aab17bfd Reviewed-on: https://gerrit.libreoffice.org/83188 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-11-21uitest for bug tdf#128431Zdeněk Crhonek1-0/+63
Change-Id: I390ac076136140f6aaa391212afeca49ebbd1dc3 Reviewed-on: https://gerrit.libreoffice.org/83355 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2019-11-20Removed executable permission on fileAndrea Gelmini1-0/+0
Change-Id: I331f6edcd530d0d409986cf40ebc05b134dfbd1d Reviewed-on: https://gerrit.libreoffice.org/83314 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-11-20tdf#124399 DOCX import: don't apply inside borders to 1-cell tablesSzabolcs Toth2-0/+11
Extra cell borders appeared on the bottom, top, left or right of the 1-cell tables when only the "inside borders" option was selected. The extra borders were the ones that would normally have appeared as inside borders if there were more than one cells in the table. Change-Id: I05d5f2a5a0168989f220d20a95b6dacf5152f9f7 Reviewed-on: https://gerrit.libreoffice.org/82675 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-11-20sw: revert change in expanding hints in SwXText::insertTextContent()Michael Stahl2-2/+95
The SwXText implementation for inserting text works like this: * XTextPortionAppend methods appendTextPortion()/insertTextPortion() get the text properties passed as a parameter, and they should apply only those properties to the inserted text, not expand any existing formatting hints at the insert position. * XSimpleText method insertString() does expand existing formatting at the insert position, just like editing in the UI does For inserting XTextContent: * XTextContentAppend methods appendTextContent()/insertTextContentWithProperties() with properties parameter, similar to XTextPortionAppend * XTextContent::insertTextContent(), without properties So arguably, by analogy to inserting text, the methods that take properties should not expand hints, and the insertTextContent() should follow the insertString and expand hints. Commit 18cbb8fe699131a234355e1d00fa917fede6ac46 is an important bugfix for writerfilter import, but the problem is, it added the DontExpandFormat() call to insertTextContent(), whereas the regression it was fixing (from commit 232ad2f2588beff50cb5c1f3b689c581ba317583) was that the call was removed from insertTextContentWithProperties(). So restore the state before 232ad2f2588beff50cb5c1f3b689c581ba317583. Turns out that SwUiWriterTest2::testTdf126206 was checking how a bookmark-start is formatted instead of how the text is formatted. Change-Id: If524409f88a1a36aa062b6e132996d3f9c1bb571 Reviewed-on: https://gerrit.libreoffice.org/83223 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2019-11-19ofz#18554 sw: fix Null-dereference due to overlapping fieldmarksMichael Stahl1-0/+0
The problem is that the WW8 import wants to set a fieldmark on a range that contains only the CH_TXT_ATR_FIELDEND of another fieldmark: (rr) p io_pDoc->GetNodes()[12]->m_Text.copy(33,10) $30 = "\bÿÿÿ\001ÿÿÿ\001 " MarkManager::makeMark() must check that a new fieldmark never overlaps existing fieldmarks or meta-fields. While at it, it looks like the test in DocumentContentOperationsManager::DelFullPara() can't necessarily use the passed rPam, because it obviously deletes entire nodes, but at least SwRangeRedline::DelCopyOfSection() doesn't even set nContent on rPam. Also, the check in makeMark() triggers an assert in CppunitTest_sw_uiwriter testTextFormFieldInsertion because SwHistoryTextFieldmark::SetInDoc() was neglecting to subtract 1 from the end position for the CH_TXT_ATR_FIELDEND. Change-Id: I46c1955dd8dd422a41dcbb9bc68dbe09075b4922 Reviewed-on: https://gerrit.libreoffice.org/83000 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-11-19tdf#128889: don't write "page break after" into w:pPrMike Kaganski2-0/+26
This produced invalid OOXML, which Word considers as "page before", and LibreOffice ignores when re-importing. Make sure to write it as *trailing* w:r with w:br, as Word also does when imports ODT with this atribute, and saves as DOCX. Change-Id: Ifc4f45d65d4455ecb5cd62aed1ef6a03375c8aa4 Reviewed-on: https://gerrit.libreoffice.org/83232 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-11-19tdf#128608 ww8import: COL_AUTO == NO FILL, not solidJustin Luth2-1/+8
This fixes problems in the patches for tdf#116071. Tables have nothing to do with this bug. It just is the most common place to have a background colour, and then to have direct formatting that reverts back to COL_AUTO. I created a unit test using the page background (black), default style paragraph background (blue), and direct formatting COL_AUTO. COL_AUTO was turned into WHITE if the fillstyle was set to SOLID. Change-Id: I8197c040cec5adbdf16f379a88fab5e534ac0c6e Reviewed-on: https://gerrit.libreoffice.org/82412 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2019-11-19sw: RTF export: fix invalid RTF for shapes and text frames againMichael Stahl2-0/+134
It turns out that commit 4652b911c4376048a452709c953197e1a879a921 wasn't quite right: writing out the m_aRunText doesn't necessarily put it in the right place, it just happened to work on that bugdoc but in other cases the shape may be written before the paragraph properties of the paragraph it's in... So instead change the text frame case to save and restore the run related buffers and members, so that the text frame itself can do whatever it wants, and the result is appended to m_aRunText. The members saved are a superset of those saved in WriteHeaderFooter_Impl(), writeTextFrame(), TextFootnote_Impl(). Also another thing was missing is that OLE objects would trigger the assert because they are also buffered into m_aRunText, e.g. ooo46760-1.odt. Change-Id: Icc6988f8ed19724c593760df46e0254792cd1735 Reviewed-on: https://gerrit.libreoffice.org/83105 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2019-11-19tdf#115576 sw: fix borders for single row/col autotable stylesJustin Luth2-3/+57
The 4*4 autostyle table matrix has no box format that can handle a table with a single column or single row. So the first and last row/column boxes need to be combined to get all of the necessary borders. This could easily be seen by setting one column and X rows using the default table style - missing right border. It could also be seen by setting one row and X columns using Box List yellow - missing bottom border. Change-Id: Ib2cf873b6d4e10ba5145e680ea7b3e2e3aea3970 Reviewed-on: https://gerrit.libreoffice.org/82998 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-11-19tdf#119054 DOCX: fix not table style based bottom marginLászló Németh2-0/+12
in table cells, ie. using paragraph styles with bottom margin setting or direct paragraph formatting of bottom margin. Both of them overwrite the table style based bottom margin. Change-Id: I527b16c24fe47df8412291089ff86fadd3f9430b Reviewed-on: https://gerrit.libreoffice.org/82800 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-11-18add uitest for bug tdf#126626Zdeněk Crhonek2-0/+43
Change-Id: Ic2ffd8f0418e208d7e17ac419a0ac7d98ffad30c Reviewed-on: https://gerrit.libreoffice.org/83118 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2019-11-18Extend DOCX input field export test for round-tripJan-Marek Glogowski2-4/+63
This expands the test from tdf#125103 to include more use cases and validate the import of the exported document (tdf#128460). Change-Id: Ifb8615b6b90931996becb8cb44d846eb30956971 Reviewed-on: https://gerrit.libreoffice.org/83038 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2019-11-18sw: insert image: set anchor to at-char by defaultMiklos Vajna1-1/+1
This changes the default set in commit 4f40bf6a79de6d60da0a5090cdfeda6242e889f0 (sw: insert image: set anchor to as-char by default, 2019-07-04), to have a better compromise, taking both Word defaults compatibility and usability into account. The problem is that users are used to just inserting an image and being able to drag it to its final location, which is broken with as-char anchoring. So default to at-char anchoring, this is still something that is fully interoperable to Word (unlike the old to-para anchoring), but allows the easier image move again. Change-Id: Ibc61ae167fc9e5cc31b04c83e854556309e27fd4 Reviewed-on: https://gerrit.libreoffice.org/83089 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-11-18related tdf#120412 ww8import: allow > 100% escapement, fix calculationJustin Luth2-2/+11
On import, it was calculating the escapement before reading the character size. If there is a fontsize SPRM in the character run, make sure that is processed first. Also, use the new MAX_*_ESC values since 100% is not nearly enough as a maximum. I looked for a mechanism that could delay processing, but found nothing. I thought about creating such a mechanism, but that could get extremely complicated, as loops would need to be detected (co-dependencies, etc). In the end, it seems likely that SOME function would need to be re-run (for example make Read_SubSuperProp runAgain at the end of the character properties) since there (likely) is no guarantee of the order of SPRMs. From my code-reading, it looks like Read_Fontsize is re-entrant-able, so that seems like the simplest solution in this case. This is mature code, so no real call for creating new mechanisms... Change-Id: I1269989c74cf34e38f8db77bd6fc510e395ee864 Reviewed-on: https://gerrit.libreoffice.org/82248 Reviewed-by: Justin Luth <justin_luth@sil.org> Tested-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-11-17Fix typoAndrea Gelmini1-1/+1
Change-Id: I0f71c9b31456b37130a9b6ef9f47d204b9c21aa1 Reviewed-on: https://gerrit.libreoffice.org/83006 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-11-17tdf#128820: improve unit test to not depend on opening bad file failingMike Kaganski1-0/+20
... also test exported XML directly Change-Id: I50237593dd111e7c7974452769c8d49c22012713 Reviewed-on: https://gerrit.libreoffice.org/83005 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-11-16Also consider saved exceptions when terminating parseMike Kaganski1-1345/+8
As with previous commit 18ae77a065cb8ae6940d4067f6ab7e99a3f74047, this will start showing parse errors on invalid files which previously just opened without warnings, silently losing the invalid stream part. Any bug bisected to this commit is not a regression from this commit! The real problem was already before, and was just disclosed by this (which is the actual goal). Also simplify unit test data for tdf#128820, which will now be enough after the change. A unit test (testN779627) revealed unexpected throws when parsing; this was fixed. Change-Id: I5a21b9001874ec6e3b8273c10043ef930bf1cc82 Reviewed-on: https://gerrit.libreoffice.org/82981 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-11-16tdf#128820: use wps namespace for simple text shapesMike Kaganski2-0/+1358
Without that, simple text shapes inside groups were written in <pic:wsp> elements, with many child elements also having pic:: prefix. Change-Id: I114cf3499e03aa5ca042211d7b134aaf5b0e7fbf Reviewed-on: https://gerrit.libreoffice.org/82980 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-11-15tdf#128736 sw ContinuousEndnotes: fix use-after-free on text frame joinMiklos Vajna2-0/+183
Regression from commit 61cf196631a2a846e0d3b8b83c0805cf4d1d14b2 (sw ContinuousEndnotes: fix moving them to the previous page, 2019-10-25), the problem was that the SwFootnoteFrame::mpReference was not updated on frame split. This meant that by the time the frame was joined, SwTextFrame::JoinFrame() thought that the follow has no footnotes, so the footnote reference was not updated, resulting in a dangling pointer. Fix the problem by going back to using bEnd for endnotes (both the Word compat and the normal case), this means that SwTextFrame::ConnectFootnote() will invoke SwFootnoteBossFrame::ChangeFootnoteRef(), fixing the dangling pointer. Then fix the original problem differently: similar to the in-section endnotes, just remove + append them, this makes sure that the endnotes (in the Word compat case) move to a previous page on page delete. Change-Id: Ia1b8e54b4a0b0f385c703f8e7016011c3ac57a03 Reviewed-on: https://gerrit.libreoffice.org/82778 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-11-15tdf#128752 DOCX: fix partial direct paragraph spacing in tablesLászló Németh2-0/+9
When direct formatting of a table paragraph set only top margin, but not the bottom margin, also there was no paragraph style setting for the bottom margin, the paragraph was imported using docDefault bottom spacing instead of the table style bottom spacing. Change-Id: Ib7f5f80dd2485a0fd4ab8e0645b7d730a7ec3c5c Reviewed-on: https://gerrit.libreoffice.org/82771 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2019-11-15ofz#18526 sw: WW8 import: don't insert control charactersMichael Stahl1-0/+0
Sanitize string before calling InsertString(). This segfaults since: commit b522fc0646915d4da94df38dd249c88b28f25be7 Date: Tue Sep 24 18:11:45 2019 +0200 sw: maintain fieldmarks in DeleteRange()/DeleteAndJoin()/ReplaceRange() Change-Id: I9ef73d924420686f6838fa21900ec57b4d25c905 Reviewed-on: https://gerrit.libreoffice.org/81949 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-11-15tdf#128700 ww8import: no relative width table if made into a flyJustin Luth2-0/+11
This is a partial revert for LO 6.0's bug 55528 commit e69473539a33da5450d3878999eba7f9bfb9e631 Apparently Word tables can float without a frame, but in LO they need to wrapped in a frame? The relative size is supposed to be relative to the container they are in - so floated tables must not be assigned a relative value - otherwise the tablesize becomes relative to the custom frame that was created to float it. The fix was easy to make, but then trying to figure out whether to test using InLocalApo(), or just m_xSFlyPara took a lot of time. The documentation is sparse and unclear. In the end I settled on ignoring relative width if pFlyFormat exists, since certain conditions can cancel (bNoFly) a FloatingTableConversion. I tested what happens if a real frame is created and then a relatively sized table is dropped inside. I confirmed that relative SHOULD be relative to the frame. That case still works fine since it isn't considered an x_sFlyPara - I think because it actually is a textbox that the table is anchored onto. LO round-trips frame/table as textbox/table. Conclusion: tables inside of frames/textboxes MAY be relative, but if the table itself is floating (a WORD-ONLY feature) then it should not be relatively sized. Change-Id: I2b0bd525051a33b5606b79d2b26665d3edeb5357 Reviewed-on: https://gerrit.libreoffice.org/82647 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-11-13add uitest for bug tdf#126627Zdeněk Crhonek2-0/+60
Change-Id: I115e014cafb9c4a85558567ccd6cd2987cabdfd6 Reviewed-on: https://gerrit.libreoffice.org/82483 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2019-11-13Add document level option to lock down edit doc commandSerge Krot1-1/+3
Change-Id: I431fa4cd0daa52c885030dbadcc4052b5a890d34 Reviewed-on: https://gerrit.libreoffice.org/82553 Reviewed-by: Serge Krot (CIB) <Serge.Krot@cib.de> Tested-by: Serge Krot (CIB) <Serge.Krot@cib.de> Reviewed-on: https://gerrit.libreoffice.org/82576 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-11-13tdf#95374 DOCX import: reset left indentation at disabled numberingLászló Németh2-0/+8
Paragraphs with disabled numbering using non-existent numId=0 haven't got inherited left indentation in MSO. Keeping them resulted unnecessary indentation, moreover, missing (non-visible) text in narrow table cells. Change-Id: I46003031d36f578b0b260dea74d7d45e75905261 Reviewed-on: https://gerrit.libreoffice.org/82509 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2019-11-13tdf#127925 DOCX export: fix visited hyperlink styleTünde Tóth2-0/+8
Custom visited hyperlink style reset to default in Word. Change-Id: I6a36c900788bb17d4f31c60048cf65960490a46b Reviewed-on: https://gerrit.libreoffice.org/80043 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-11-11add uitest for bug tdf#128593Zdeněk Crhonek1-0/+39
Change-Id: Icc0b22318406a92cf19843844e857d09dd9a4ba2 Reviewed-on: https://gerrit.libreoffice.org/82466 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2019-11-11Removed executable permission on fileAndrea Gelmini1-0/+0
Change-Id: I45174811c8e1ef80ddae97f206f2a5459540849f Reviewed-on: https://gerrit.libreoffice.org/82427 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-11-11tdf#127921 Revert mouse/key listeners to original stateSamuel Mehrbrodt1-31/+26
The changes caused several issues in the presenter console (mouse events delivered to wrong widgets). Also it turned up that parent windows got the notification about mouse events from their children, but the position was always relative to the top widget, so very unhelpful for the parent widgets. Also I found out that there are XKeyHandler and XMouseClickHandler interfaces which already do what I tried to do with the below commits (events get passed down to parent widgets, and they even can be marked as consumed). So the original issue reported can be fixed by using XKeyHandler/XMouseClickHandler instead. This reverts the following two commits: * "Related tdf#122920 Treat UNO key events the same as mouse events" 9e0e97b716ab074d4558c76a62a66bf597f332a5 * "tdf#122920 Send UNO mouse events to parent window listeners as well" 6f43902b12dd36fa2b69401065df198ef9ffdb09 Change-Id: I005d22770a7a4db9588c5bc22197dc0ae526627e Reviewed-on: https://gerrit.libreoffice.org/82423 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-11-11tdf#128428 RTF: clean-up for longer space sequence modeLászló Németh5-0/+168
Fix regressions from commit 24b04db5a63b57a74e58a7616091437ad68548ac (tdf#123703 RTF import: fix length of space character sequence). It seems, longer space sequence is an obsolete RTF-only feature, eg. new RTF documents created in MSO don't use it, but old RTF documents still keep their layout (only in RTF). - Only old-style (without \stshfdbch) or compatible (\stshfdbch31505) RTF documents get longer space sequences using a one-time conversion; - because Writer always exports old-style RTF documents, to avoid of enlargement of space sequences of new-style RTF documents later, RTF import doesn't modify the RTF documents saved in Writer (checking \generator); - text in monospaced font "Courier New" doesn't get longer space sequence (despite its \prq2 (not monospaced) font setting). Change-Id: I308ab06db57a2db5deec1d4c4573da3317cad8e9 Reviewed-on: https://gerrit.libreoffice.org/82145 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2019-11-11tdf#127579 DOCX export: fix losing color and underline of ODT hyperlinksTünde Tóth2-0/+10
using "InternetLink" in hyperlink/r/rPr/rStyle instead of the actual character style, and keep actual character formatting in hyperlink/r/rPr/rFonts, like MSO does. Change-Id: I13a5e1758ec5b96e647ca77736396ee2f8b22814 Reviewed-on: https://gerrit.libreoffice.org/80868 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-11-11tdf#124986: docx: remove trailing quotation marks and spaces from set fieldsbrinzing2-0/+21
Change-Id: I6390344b72b0148cff8e0ed5150d7abfc9490a2a Reviewed-on: https://gerrit.libreoffice.org/81892 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-11-09tdf124367 DOCX import: fix rounding error in table cell widthsBakos Attila6-4/+21
Follow-up of commit 29cbbad64088354425c606f9eb6c267bdf7731dc (DOCX import: fix rounding error in table cell widths), its revert in commit e502463fa9a601963aa9f5a8783eb1318de36c13 (tdf#123104 DOCX import: fix lack of vertical merge due to rounding) and commit 44e44239de35c1548809c96e13bfa9d64c7ca441 (tdf#120315 DOCX import: fix cells merged vertically). Change-Id: Id85e8fd25dba26af77fe2fd3024db2ae834b5052 Reviewed-on: https://gerrit.libreoffice.org/82072 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org> Tested-by: Jenkins
2019-11-09partial revert tdf#116071 import to XATTR_FILL not RES_BACKGROUNDJustin Luth2-0/+16
caused by commit 3539a1efb41a787237e4333ebc715db96ffacb5b which fixes table-related regression bug report tdf#128608. I was not able to create a unit test for this from scratch. In fact, if I use MSWord2003 to roundtrip the file, then LO opens it without problems. A real fix (to move LO away from RES_BACKGROUND in tables) should be subject to lots of testing time, so just reverting for now. Change-Id: I328741947b7ed319ff8df0ba169618f6ad0d2c75 Reviewed-on: https://gerrit.libreoffice.org/82339 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2019-11-08tdf#128504 save DOCX as ODT: don't color not highlighted hyperlinksTünde Tóth2-0/+10
During DOCX import, not highlighted hyperlinks, ie. without hyperlink character styles, set the Visited/Unvisited character style text attributes to "Default Style" to avoid saving them with the default highlighted hyperlink character styles in ODT. Regression from the commit 576611895e51186d38ddefa10ed8d66075d9de37 "tdf#127741 DOCX import: format hyperlink with Default character style". Change-Id: I5ffbb107e6704b285bc3d1546e08a324c386a0ab Reviewed-on: https://gerrit.libreoffice.org/82205 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-11-08sw: no reason why SwModelTestBase can be used only by "extras" testsMiklos Vajna2-5/+5
So move it one level up, this way more tests can share code in the future. Change-Id: I35300b3c88ac9a5c39916f53b1b1743aa85869a0 Reviewed-on: https://gerrit.libreoffice.org/82252 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-11-07sw XHTML export: <blockquote> can't have character childrenMiklos Vajna1-6/+36
Fixes the following reqif-xhtml validation error: ERROR at 214: [XSD] cvc-complex-type.2.3: Element 'reqif-xhtml:blockquote' cannot have character [children], because the type's content type is element-only. But this is probably useful in the general xhtml case as well. [ Also add a way to not load a document when we want to cover "store" behavior in a test. ] Change-Id: I88795271475863b9560ac1cb99636c507746f1e9 Reviewed-on: https://gerrit.libreoffice.org/82239 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-11-07tdf#125778 docxexport: handle pageBreak before TOXJustin Luth2-0/+5
The pagebreak before the TOX was lost in docx (but not in .doc or .rtf). Change-Id: I280b0bd19a73db180b65a0937bd0fe809e5dfc6f Reviewed-on: https://gerrit.libreoffice.org/81979 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-11-07tdf#128603 sw textbox: restore shape+frame pair on undoMiklos Vajna2-0/+45
Undo of cut + paste restored both the shape and the frame, but the shape's content pointed to an invalid node index. Later this resulted in a crash. Make sure that in case the content of shape+frame don't match by the time the frame format pointer is set, we sync the draw format to the fly format. Change-Id: I233a504ca52698d1c514769d16c256408c29ae30 Reviewed-on: https://gerrit.libreoffice.org/82192 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-11-07sw: convert remaining uses of DECLARE_RTFIMPORT_TEST()Miklos Vajna4-96/+190
See commit a226cec52e536c46e03f57a5f1f7931abbeb0cdd (CppunitTest_sw_rtfimport: convert one testcase to use CPPUNIT_TEST_FIXTURE(), 2019-11-05) for motivation. Change-Id: Icef8d75ac759480e841363142c474b95544bcf0e Reviewed-on: https://gerrit.libreoffice.org/82176 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-11-06tdf#120412 better unit testJustin Luth2-0/+9
The previous unit test OUGHT to have reported exactly 100% escapement, and the patch's purpose was to support greater than 100% escapement. Depending on a number of patches (related to bug 99602), this unit test verifies that 400% works. Change-Id: I1ee36d1570c34d86dbfb0a03ee3c2026b9645b63 Reviewed-on: https://gerrit.libreoffice.org/80220 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>