summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)Author
2020-02-15weld NumEditAction Item WindowCaolán McNamara
Change-Id: Idd528666aa2daad336d8cbaab51d073bb982c474 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88722 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-02-15weld NavElementBox_Impl Item WindowCaolán McNamara
Change-Id: I72a7cc6d60cb4149838933c3c57982ebefea458d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88677 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-02-15convert XML_STYLE_FAMILY to scoped enumNoel Grandin
Change-Id: I5335b0190a2f5a8111993c0c9c224c8a6a8f0cfb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88723 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-14remove MetricField use from swCaolán McNamara
Change-Id: Ib59efd309521db5dd568ae4f3353034839cb7e1e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88729 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-02-14rework SwNavigationPI to listen to two propertiesCaolán McNamara
SID_DOCFULLNAME as before, and FN_STAT_PAGE to keep track of the current number of pages to always keep the page spinbutton up to date instead of waiting until its focusin signal to change it. a true gtk spinbutton will have its + disabled unless it can be increased so it will need to have the current max uptodate before focusing in Change-Id: I29a5d93ae38c6a3d0e74994a466102af234bfd48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88707 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-02-14use fwd decl of SpinFieldCaolán McNamara
Change-Id: Ifea23e791ec53448a8591583f283b87430ef38c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88678 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-02-14sw: fix handling of table vs fly overlaps in the AddVerticalFlyOffsets caseMiklos Vajna
When a table overlaps with a fly frame, Writer creates a fly portion inside the relevant cell frame (increasing its height), and Word shifts the table down. Both are valid approaches, but the rendering result is different in case the table has a border. So keep the default unchanged, but in case the AddVerticalFlyOffsets compat flag (set by the Word importers) is set, avoid the overlap the Word way. Note that the table frame uses the full width (available in the body) even for e.g. 50% width tables, so check for the overlap using the print area, which does not always overlap. Finally, don't always require a valid frame area definition from the fly frame: - the mentioned i#46807 bugdoc currently doesn't need that check - the fly frame area definition becomes valid only after already positioning the table, leading to an overlap Keep that check for the non-compat case, though. Change-Id: I9202050befebf2efdbb5395ded6fcb52b378d8e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88724 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-02-14sw: fix splitting text frames wrt. footnotes in followMichael Stahl
When the simplified (thanks Vasily) bugdoc is loaded, it has 2 pages and the last text frame 6 on page 1 has N lines, but after hiding tracked changes and showing them again, page 1 has N-1 lines, the last line starting at offset 1064 moved to the follow frame 7 on page 2, and this is the only difference from the state after loading. Frame 6 is formatted exactly 3 times; the difference between the 1st and the 3rd time is that footnote number 8 (footnote frame 34) doesn't exist yet the 1st time, but is on page 1 at the 3rd time. This reduces the space available in the body frame from 14040 to 13817, and SwTextFrameBreak::IsInside() finds there's not enough space for the last line. Interestingly the sw_redlinehide didn't change anything here; this reproduces in the same way back to OOo 3.3. There's a few obvious ways to try and fix this: a) The footnotes that are anchored beyond the end of the current text frame are moved by RemoveFootnote() called later: 4 in SwTextFrame::RemoveFootnote() at sw/source/core/text/txtftn.cxx:508 5 in SwTextIter::TruncLines(bool) at sw/source/core/text/itrtxt.cxx:375 6 in WidowsAndOrphans::FindBreak(SwTextFrame*, SwTextMargin&, bool) at sw/source/core/text/widorp.cxx:338 This could be done earlier, in IsInside(), which already tries to do 2 other things to get more space, so it seems plausible that footnotes which are known not to be in the frame (including the line that doesn't fit) could be moved off the page. b) An approach similar to commit e37ffdd118da2d21c5e78e8c7b67252d0d1adc8c "tdf#125685 sw: disregard footnotes in follow table on table split" would be to temporarily add the footnotes anchored beyond the current frame to the available space, and leave them to actually be moved later. c) When RemoveFootote() is called and it does move a footnote, invalidate its anchor text frame so that it gets formatted again. This seems to have the highest risk of introducing loops though. Let's try out a) for now and see how it works. Change-Id: I54b59637b79d67f5eca61f11bd575145f244381f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88714 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-02-14Fix typoAndrea Gelmini
Change-Id: Ice82d39a0f523f3d535ecf2669edc3856c378e15 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88711 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-02-14split out MetricField value conversion functionsCaolán McNamara
Change-Id: I67a33bd2a5cb06dc66e471918b5c378044a2eff2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88679 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-02-14RTF/DOCX export: always set hyphenation to auto at document levelVasily Melenchuk
MS formats unlike ODT have also global setting for hyphenation params. Previous approach was to set this global value depending on default paragraph style settings. However, if hyphenation is enabled ony for specific other paragraphs, hyphenation in MS Word will not work. Let's try to set global hyphenation value to "auto" and explicitly enable/disable hyphenation on paragraph level. Change-Id: I199fa80eb1204930e2640dac0e90802b6b98597b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88536 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-02-14use forward decls to reduce including unnecessary headersCaolán McNamara
Change-Id: Iaa25ac1ac99e0dcf09bce21f4bad8cb9b5568a1e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88633 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-02-14tdf#89566 Replace navigation toolbox in Writer navigatorJim Raykowski
Replaces the navigation toolbox with the navigate by elements control. Change-Id: Idba18e63ac29f37d8e614b6459ea67b71b65c885 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87005 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2020-02-13writer table sidebar update for smaler height and better layoutingandreas kainz
Change-Id: Ide2b956879c469565b7fd220cdbe9a081bcaf145 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88572 Tested-by: Jenkins Reviewed-by: andreas_kainz <kainz.a@gmail.com>
2020-02-13extract NaturalSortCompare from ListBoxCaolán McNamara
Change-Id: I260c83778aea06eba9ae774739c6dc31fe5366d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88613 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-02-13Add uno cmd to protect bookmarks in a documentSamuel Mehrbrodt
Change-Id: I7cc0dfa2b129d69d49b555495d77c2c710689e94 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88586 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2020-02-13Add uno cmd to protect fields in a documentSamuel Mehrbrodt
Change-Id: Ifb9f757111a6fcbb283d2350ed2ccd42de19d5df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88585 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2020-02-13tdf#45589 sw: add tooltip to Formatting Aids dialog Bookmark labelMichael Stahl
Thanks to sdc.blanco for the suggestion. Change-Id: Ib9a1874eeba1e9e1bf594e725be6883e79ed9a67 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88541 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-02-13tdf#45589 sw: fix Formatting Aids options page for Writer/WebMichael Stahl
The pre-existing problem of the lone "tab" label was compounded by the new bookmark label. There is no Insert->Bookmark in Writer/Web so i guess the Bookmark checkbox shouldn't be shown. Change-Id: I5a2348599562bb20d7a8de916d0268a133771a0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88535 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-02-13tdf#95495 DOCX import: fix inherited list level of custom stylesSzabolcs Toth
in DOCX export of MSO 2003, 2007 and 2010, where ilvl and outlinelvl settings are missing, based on the settings of the parent styles. Change-Id: I01d239db505d46a89d7f3b9118ef0b55697bc7fc CO-Author: Balázs Nádasdy (NISZ) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87328 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-02-12tdf#130610 docx export: handle bold as toggle propertiesSerge Krot
Change-Id: I4c60b7eab6430a64ea1c8bcf40d0036d0b38516f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88460 Reviewed-by: Michael Stahl <michael.stahl@cib.de> Tested-by: Jenkins
2020-02-12DOCX import: fix ZOrder of inline vs anchored shapesMiklos Vajna
Shapes which are anchored but are not in the background should be always on top of as-char anchored shapes in OOXML terms. Writer supports a custom ZOrder even for as-char shapes, so make sure that they are always behind anchored shapes. To avoid unnecessary work, make sure that when there are multiple inline shapes, we don't pointlessly reorder them (the old vs new style of the sorting controls exactly this, what happens when two shapes have the same ZOrder, and all inline shapes have a 0 ZOrder). Adapt a few tests that used ZOrder indexes to access shapes, but the intention was to just refer to a shape: fix the index and migrate to shape names where possible. Change-Id: I670e4dc2acbd2a0c6d47fe964cb5e3f2300e6848 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88540 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-02-12Classify shape(s) selections as 'complex'...Dennis Francis
in isComplex() of XTransferable2 implementation SwTransferable. This method is used by online via doc_getSelectionType() to determine the type of selection. In writer this method used to classify shape objects as non-complex which translates to 'text' in online, so if a shape is selected in online, the js code there would treat it as text. This is problematic when you want to send the correct align uno commands based on selection type. So returning true in isComplex() for writer would correctly treat the shape selections as 'complex' in online Writer. Change-Id: I09fcd9e4fab48aa0d7e7d04c88bae9e1281a1b0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88158 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com> (cherry picked from commit c7178a12e6e57e3d85cecd09e9c0373ececbb33f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88495 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-02-12cypress: mobile: Font size combobox is broken on core/master.Caolán McNamara
a) for vcl version, listen to modify and select, instead of just modify so we can get the artificial select via uiobject that the mobile makes use of. (and disregard the modify which we know will lead to select so we get just one event in that case) b) default to assuming something has been picked "directly" unless we know otherwise. ideally the result is that https://cgit.freedesktop.org/libreoffice/online/commit/?id=08d6c3fdf9bac4ad8318151ab1402690eb950f52 isn't needed Change-Id: Ibbf33eab88dabd55d0c329aa00c8adaf001a4f50 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88476 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-02-12Get the align states of draw-shapes in...Dennis Francis
SwDrawBaseShell::GetState() so that the align buttons are informed (in core desktop and online via statechange messages) Change-Id: Ic69fb03bc98f39b1a6a389d50d3d6404fefd7f29 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88159 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88453 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-02-12Allow boolean valued statechange messages for...Dennis Francis
object align commands : ObjectAlignLeft [SID_OBJECT_ALIGN_LEFT] ObjectAlignRight [SID_OBJECT_ALIGN_RIGHT] AlignCenter [SID_OBJECT_ALIGN_CENTER] What is pending is to set correct align state items for Impress in DrawViewShell::GetMenuStateSel(). For doing that we need to store the object align state somewhere when we execute SID_OBJECT_ALIGN_* in DrawViewShell::FuTemporary(). For Writer the align state information was already available in frame-format-manager object. Change-Id: I86fcf59cfc66af98097611277201ecaa3b8c22cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88077 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88452 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-02-12tdf#129575 DOCX import: fix table style preferenceLászló Németh
handling by recognizing docDefault properties instead of default-value based heuristics. Change-Id: I3bab9d85d77d0e5f1c357121b1caf02cbe4899c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88457 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-02-12ofz#20455 sw: add some checks in SwTable::CheckConsistency()Michael Stahl
Check consistency of number of boxes in SwTable and nodes. Change-Id: I617f99282b900b17a65ecd18fdd8e8f8860896db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88471 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-02-12ofz#20455 sw: HTML import: fix invalid table in footerCaolán McNamara
The obvious problem was that a bookmark failed to be copied to the correct node, it was created on a SwStartNode, which failed in makeMark() and caused a null-pointer. The target position was off by 1 node because there was a spurious StartNode/EndNode pair directly below the table: [ 41] 0x5b13430 TableNode , [ 42] 0x5b1d010 StartNode , [ 43] 0x5b12a50 StartNode , [ 44] 0x5b135f0 TextNode "", This was created by a special case in SwTableNode::MakeCopy() because .GetTabSortBoxes().size() == 1. But the table had actually quite a bunch more cells in the nodes-array, just they were not yet in the SwTable. In an exciting twist of events, it turns out the table was copied while it was not yet finished parsing: the problem was that in the middle of the table, some CSS set some page attributes, and this caused a first-page page style to be created in SwCSS1Parser::ParseStyleSheet(), by copying the master page style. Unfortunately the table was in the <div title="footer">, so it was copied in this incomplete and inconsistent state. It might be possible to get rid of the special case in SwTableNode::MakeCopy() by restricting the special case skipping of StartNodes at the start in SwNodes::CopyNodes() a bit so that StartNodes whose EndNodes are copied aren't skipped; at least that's the most reasonable explanation for the special case. But for now just fix the HTML import. Additionally, only on MacOSX, using libc++, this triggered an assert: Assertion failed: (!pImpl->mpStaticDefaults || typeid(rItem) == typeid(GetDefaultItem(nWhich))), function PutImpl, file /Users/tdf/lode/jenkins/workspace/lo_gerrit/Config/macosx_clang_dbgutil/svl/source/items/itempool.cxx, line 611. Probably because SdrTextAniCountItem is not marked DLLPUBLIC. Change-Id: Ia167265e7540eea649801eaac2b89f9e18b685cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87859 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-02-12Revert "tdf#118947 sw tablestyle: manually scan parents for ::SET"László Németh
Except its unit test. This reverts commit 6bced3c6a1bf8d4652dd6ba75e41b128ce1bfc5c. Change-Id: I525edd59b9d4d522048b272575285f13675413e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88456 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2020-02-12Revert "related tdf#118947 sw tablestyle: no need to avoid numbered para"László Németh
This reverts commit 6ed87cc5a4f755f360951550cac836e8967fc6bf. Change-Id: Idd56da3056b60a60228875c644d57099b3d2520f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88455 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2020-02-12lok: Add LOK_CALLBACK_STATE_CHANGED for uno:OrientationMuhammet Kara
Change-Id: Iab3aaf742bdb9fc4b9c5875fee7d769fa0581eeb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87370 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Aron Budea <aron.budea@collabora.com> Tested-by: Aron Budea <aron.budea@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88451 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-02-12clang-analyzer-deadcode.DeadStoresNoel Grandin
Change-Id: Ifa384933569b27d0d08eb479bb95b799163ae386 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88450 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-12tdf#126700 allow replacing the default documentsJan-Marek Glogowski
Per default, a document opened by a user action will always open in a new frame. For tdf#83722, this behaviour was extended to documents created from templates. But this currently also affects the default factory templates, if these are replaced by a config setting with a real template, which was not intentional. So this patch introduces a new MediaDescriptor property, which allows to mark a document as replaceable and automatically sets it for factory default documents. If this property is set to true, a document just acts as a placeholder while it's unmodified. I.e. the next opened document from its frame will close and replace it. Change-Id: I45ffa8709f7cdda949fac78f3b363f120f0c4a03 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88257 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-02-11UI test for tdf#128739Artur Neumann
cut, paste and undo with documents containing fieldmarks and bookmarks Change-Id: I4ee8edf061f7cdb08ae90bee32ac07b6a0980cc1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/84054 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2020-02-11make Base install via packagekit also confgurable (like fonts/langpacks)Rene Engelhard
Change-Id: I72f98e89d1c8e92f10da8e3843956658d035528d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87907 Tested-by: Rene Engelhard <rene@debian.org> Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-02-11tdf#130494: DOCX import: limit paragraph-level character propertyLászló Németh
expansion for the whole table paragraph based on the last character context. regression from 2ab481b038b62b1ff576ac4d49d03c1798cd7f84 (tdf#90069 DOCX: fix character style of new table rows) Change-Id: I49da23c268436488ff1537771869c38108113c12 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88199 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2020-02-11DOCX import: fix margins of inline shapes with effects, imported as Draw shapesMiklos Vajna
Effects have an extent, and unhandled effects (like this blurred shadow) need to take space in the margin of the shape to make sure they use the correct amount of space in the layout. This was working in general, but not in case the importer decided to import the shape as Draw shape + the shape was inline. (And also disable a new CppunitTest_sw_uibase_shells test on Windows, which is only stable on Linux, it seems.) Change-Id: I9d0531d9393d8c2cd274e6f54bbbfe8024bf270f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88427 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-02-11Writer Sidebar Wrap section update for better alignment and fitandreas kainz
Change-Id: I9bb3054f5e55346f09828e5ce7220445794c5880 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88411 Tested-by: Jenkins Reviewed-by: andreas_kainz <kainz.a@gmail.com>
2020-02-11related: tdf#106742 sw: DOCX import/export: fix default of table indentMichael Stahl
There's a compatibilityMode in word/settings.xml in DOCX files: https://docs.microsoft.com/en-us/openspecs/office_standards/ms-docx/90138c4d-eb18-4edc-aa6c-dfb799cb1d0d If a document doesn't contain compatibilityMode, then the default is 12, but the code for table indent import/export assumed that the default is 15, so loading an ODF document and exporting as DOCX results in wrong table indent when loaded in Word. (regression from 9a31d1c83e08600507689dc18f6f0973bc7e4389) Change-Id: I3ce32286473640e5b7e12b487aef5f123bfb8d12 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88408 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-02-10refactor PostIt access to SwFormatFields in ...Bjoern Michaelsen
- SwTextShell::ExecField() - PostItManager Change-Id: I7eabf0a7d8170d0dacf3069925abfe1a91a4a9f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88334 Tested-by: Jenkins Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-02-10weld SvxFmAbsRecWin item windowCaolán McNamara
Change-Id: I6a11d8ba226b28447e2ab04925090491d6953132 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88348 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-02-10sw/qa: fix libxml2 parser error for testChineseMark Hung
in htmlexport CUT on Windows with tradtional Chinese as the system locale. Libxml2 complaints about encoding: Entity: line 2: parser error : Input is not proper UTF-8, indicate encoding ! Bytes: 0xB4 0x49 0xA4 0xE5 - By default SvxHtmlOptions::GetTextEncoding() uses SvtSysLocale::GetBestMimeEncoding() to decide the decoding, where osl_getThreadTextEncoding() is used. That results in big5 if you're using Windows with tradtional Chinese as the system Locale. - libxml2 expects the xml begins with "<?xm", and guesses the encoding based on first 4 bytes of the content. So it always falls back to utf8 in our test. Change-Id: I48be9bf552ab6ea76f8baea7e48a8c02a7e8c2cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88260 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-02-10sw: prefix members of SwExtTextInput, SwLineNumberInfo, SwWriter and ...Miklos Vajna
... SwgReaderOption See tdf#94879 for motivation. Change-Id: Ib44eaa1adbc731499d22b0bf538380b8bc0cc4eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88357 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-02-10tdf#90834: Turn in-line version control comments into good commentsPelin Kuran
Change-Id: I366badf234f00536cd208a516eff9667f99d2f86 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87719 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-02-10sw: DOCX export: fix rotated text fieldsMichael Stahl
The rotation works in RTF export and DOC export, but not DOCX. If a text field is rotated via SvxCharRotateItem, the w:eastAsianLayout element gets written on the run that contains the fldChar begin, but not the subsequent 4 runs that are written via DoWriteFieldRunProperties(), because it doesn't write m_pEastAsianLayoutAttrList. It's not clear why that function manually writes a subset of the run properties instead of simply calling WriteCollectedRunProperties() to get all of them. Change-Id: I6d8cacda4b62a6f6fdc77885149e7de8666e7200 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88196 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-02-10tdf#130262 ignore negative wrap distance values in doc prop importPatrick Jaap
Change-Id: I2c06b12c958dfde09adcc2ae4c59532ffde6b6fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88127 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-02-10use FindFormatForField some moreBjoern Michaelsen
Change-Id: I96dc7599d755c035d4079d1bbe6b6c21201034d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88335 Tested-by: Jenkins Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-02-10Remove unused variable sWordMuhammet Kara
Change-Id: I56e7c23ae309df112392327a381a4104091222be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88351 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2020-02-09Simplify SwTableField::GetNodeOfFormula()Bjoern Michaelsen
... by using the new SwFormatType::FindFormatForField() Change-Id: If0492ca04ed836d89bcfcc56572859ba04e084b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88273 Tested-by: Jenkins Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>