summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)Author
2021-04-07tdf#126735 sw Next Change: cycle through tracked changesLászló Németh
Next/Previous Change commands don't stop at the start or end of the document, but continue on the end or start of the document to cycle through all tracked changes, like Find Next/Previous and other office suites do. Change-Id: I5578d6b98b81ca1f8f222ba78e7d3c08339eca89 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113716 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2021-04-07tdf#141341 docxexport: consolidate conversion of NumTypesJustin Luth
so that one comprehensive function is used for Page and Footnote numbering types (which was already being used by list numbering). I also added support for CHARS_ARABIC_ABJAD <=> arabicAbjad, which was my trigger for consolidating all this. OOXML has one definition (ST_NumberFormat) that specifies the valid values for pgNumType, numFmt (list numbering), numFmt (Endnote and Footnote numbering), so use the same conversion function for all of these. [Also used for caption, but I haven't noticed that yet in export.) In the previous code, there was no possibility for fmt.isEmpty() [despite repeated checks for that situation]. However, I thought it made sense to not specify anything if the conversion didn't match something known (because perhaps the locale could take over then?). In any case, that is a slight change, but for pgNumType we were specifying "none" instead of decimal, which didn't make much sense either. So I don't expect anyone crying 'regression' over that. Change-Id: I90037eb25a0f71d22d6ad1848f43761eb6b9fe00 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113351 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-04-07tdf#141467 xmloff,sc,sw: ODF export: reorder flys' ZOrder/z-index harderMichael Stahl
Also keep the control layer distinct from the foreground, as a follow-up to tdf#133487. Try to improve the detection of already sorted indexes a bit to avoid unnecessary sorting. Hilariously the test docs require adding 3 additional items to the extension schema. Change-Id: I629d5b09294f679717677b9d89537d905ac4c404 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113696 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-04-07tdf#119661: sw: Add UItestXisco Fauli
Change-Id: I7e24060b9b8e3b2b673a854256c8d8afaf399eb2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113707 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-04-07rtl::Static -> function local staticNoel Grandin
Change-Id: I2071c27bdf074403ec24e67f9278ac27f9491303 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113698 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-06remove Application::GetDefDialogParent call in editengCaolán McNamara
and pass in an explicit parent to use Change-Id: I1aa768ec5ac13b2097b78499f964a3590a0ac14e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113695 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-04-06ExecuteSpellPopup never called with a null spelling callbackCaolán McNamara
Change-Id: Id03001541ccfd8503a7b8181598bad9811542b4e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113694 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-04-06tdf#141084: sw: Add UItestXisco Fauli
Change-Id: Ib301adfe480217550b008f88938bb9cacc8c98ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113664 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-04-06update pchesCaolán McNamara
Change-Id: I835c8fcc237ece5cf9d7a3b261645139d022e9b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113652 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-04-06forward declare vcl::window in vcl/event.hxxCaolán McNamara
Change-Id: Ib3fc1b72d3d45377e2d4ccd0ff3e6835d2c29930 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113631 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-04-06tdf#136740: reimplement the fix using existing m_bIsNewDocMike Kaganski
This reimplements the fix from commit d7c4d0d4ea83481693af3645a03b03b53e456f60. The unit test from commit a90a324aa590a94a4091fbfadea67e0b0203767c still passes. Change-Id: I84c61fa68b9bee679a8e82ef7b8f164297bacb5a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113665 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-04-06Check for null SW_MODMike Kaganski
This prevents "read access violation. this was 0xC0" at shutdown when running 'make CppunitTest_sw_uiwriter3 CPPUNIT_TEST_NAME=testTdf136740' with this BT: swlo.dll!std::unique_ptr<SwMasterUsrPref,o3tl::default_delete<SwMasterUsrPref>>::operator bool() Line 3419 C++ swlo.dll!SwModule::GetMetric(bool bWeb) Line 594 C++ swlo.dll!SwHTMLWriter::WriteStream() Line 307 C++ swlo.dll!Writer::Write(SwPaM & rPaM, SvStream & rStrm, const rtl::OUString * pFName) Line 272 C++ swlo.dll!SwWriter::Write(const tools::SvRef<Writer> & rxWriter, const rtl::OUString * pRealFileName) Line 862 C++ swlo.dll!SwTransferable::WriteObject(tools::SvRef<SotTempStream> & xStream, void * pObject, unsigned long nObjectType, const com::sun::star::datatransfer::DataFlavor & __formal) Line 824 C++ vcllo.dll!TransferableHelper::SetObject(void * pUserObject, unsigned long nUserObjectId, const com::sun::star::datatransfer::DataFlavor & rFlavor) Line 883 C++ swlo.dll!SwTransferable::GetData(const com::sun::star::datatransfer::DataFlavor & rFlavor, const rtl::OUString & rDestDoc) Line 623 C++ vcllo.dll!TransferableHelper::getTransferData2(const com::sun::star::datatransfer::DataFlavor & rFlavor, const rtl::OUString & rDestDoc) Line 390 C++ vcllo.dll!TransferableHelper::getTransferData(const com::sun::star::datatransfer::DataFlavor & rFlavor) Line 288 C++ vclplug_winlo.dll!CXTDataObject::renderSynthesizedHtmlAndSetupStgMedium(tagFORMATETC & fetc, tagSTGMEDIUM & stgmedium) Line 516 C++ vclplug_winlo.dll!CXTDataObject::renderSynthesizedFormatAndSetupStgMedium(tagFORMATETC & fetc, tagSTGMEDIUM & stgmedium) Line 419 C++ vclplug_winlo.dll!`CXTDataObject::GetData'::`1'::catch$1() Line 269 C++ vcruntime140_1d.dll!_CallSettingFrame_LookupContinuationIndex() Line 98 Unknown vcruntime140_1d.dll!__FrameHandler4::CxxCallCatchBlock(_EXCEPTION_RECORD * pExcept) Line 1393 C++ ntdll.dll!RcConsolidateFrames() Unknown vclplug_winlo.dll!CXTDataObject::GetData(tagFORMATETC * pFormatetc, tagSTGMEDIUM * pmedium) Line 261 C++ vclplug_winlo.dll!CXNotifyingDataObject::GetData(tagFORMATETC * pFormatetc, tagSTGMEDIUM * pmedium) Line 86 C++ ole32.dll!HandleFromHandle(IDataObject * pDataObj, tagFORMATETC * pformatetc, tagSTGMEDIUM * pmedium) Line 2048 C++ ole32.dll!RenderCurrentFormat(HWND__ * hClipWnd, unsigned int cf, tagSTGMEDIUM * pmedium, IDataObject * pDataObj) Line 4057 C++ ole32.dll!RenderFormat(HWND__ * hClipWnd, unsigned int cf, IDataObject * pDataObj, void * pvMTADataObject) Line 4191 C++ ole32.dll!ClipboardWndProc(HWND__ * hWnd, unsigned int msg, unsigned __int64 wParam, __int64 lParam) Line 683 C++ user32.dll!UserCallWinProcCheckWow() Unknown user32.dll!DispatchClientMessage() Unknown user32.dll!__fnDWORD() Unknown ntdll.dll!KiUserCallbackDispatcherContinue() Unknown win32u.dll!NtUserGetMessage() Unknown user32.dll!GetMessageW() Unknown vclplug_winlo.dll!CMtaOleClipboard::run() Line 663 C++ vclplug_winlo.dll!CMtaOleClipboard::oleThreadProc(void * pParam) Line 692 C++ ucrtbased.dll!thread_start<unsigned int (__cdecl*)(void *),1>(void * const parameter) Line 97 C++ kernel32.dll!BaseThreadInitThunk() Unknown ntdll.dll!RtlUserThreadStart() Unknown Change-Id: I79c018781fb8c84a638a714bd3685fe2208697db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113625 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-04-06tdf#136740: add unit testMike Kaganski
Change-Id: Iaa42bc466de2d3f27db5e9dbb516026d140ee0fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113622 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-04-05tdf#136740: Do not initialize document settings when pastingMike Kaganski
When pasting from clipboard, the document already has the defaults set, and pasted text must not change those defaults. When pasting RTF, RTFDocumentImpl::outputSettingsTable does the document settings initialization, and is called from RTFDocumentImpl::checkFirstRun when m_bFirstRun is true. Other defaults are set in the latter function, too. This makes m_bFirstRun false when RTFDocumentImpl is created in the context of a paste operation. Alternatively, checking the context could be made when deciding if to apply specific settings. Change-Id: Ide1eabbef1d04a4fa2f1ca14846b8e404f2a0cb1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113613 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-04-02tdf#139906 Prevent to use the Mail Merge wizard without data source.Gülşah Köse
When the file has a data source but that data source is not available in LibreOffice we shouldn't let user continue mail merging. Change-Id: Ic28101a12b2e33e78fd9b478fc41707786344e52 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113432 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com>
2021-04-02tdf#139906 Show warning message when data source is not avaible.Gülşah Köse
CurrentDatabaseDataSource config item holds a database name for a specific file. When document has CurrentDatabaseDataSource config item but LibreOffice doesn't have in registered databases we should notify the user at load time and put a button to fix the problem. Change-Id: Ia0a6fd53985fc2fb82ce37d3962b3f479c20a647 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113296 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com>
2021-04-01Removed executable bits on docx fileAndrea Gelmini
Change-Id: I33e44f912723cf984322d13d7ad18aca138cabcd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113471 Tested-by: Jenkins Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2021-04-01Fix typoAndrea Gelmini
Change-Id: I5c55d9d51f1935406bca5a26307f78edfb73b9f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113373 Tested-by: Jenkins Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2021-04-01Removed execution bits on docx fileAndrea Gelmini
Change-Id: I2adf76801b5ad2f52a5c861b68c5dd3571874356 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113377 Tested-by: Jenkins Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2021-04-01Fix typosAndrea Gelmini
Change-Id: Id8850c9353203706f62b895132ef8d9d150d5bad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113470 Tested-by: Jenkins Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2021-04-01Removed duplicated includeAndrea Gelmini
Change-Id: I0becc94e87dee55fad57e66d182c54cc64ee5013 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113469 Tested-by: Jenkins Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2021-04-01tdf#141345 sw page gutter margin: reimplement ODF filterMiklos Vajna
See <https://issues.oasis-open.org/browse/OFFICE-4105>, the proposal is to include the gutter in the left/top/right margin to have better backwards compatibility, at the price of more complex xmloff code. This works by increasing the left/top/right margin on export (so even if gutter margin is ignored at import time, the layout will look fine, just the editing will be poor) and decreasing on import. Change-Id: I852e5c7366e8641abd61e136f9390466585953fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113464 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-04-01tdf#141341 writerfilter: use all NumberingTypes for pgNumFmtJustin Luth
We have a nice conversion function to translate from OOXML to writer's numbering formats, so lets use that for the page/section's numbering format too. Change-Id: Ibf2aaae5d66c971b54440862b1156c00202663e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113350 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-04-01Exclude tests based on device color depth, not RDPMike Kaganski
After 5c9ba1f47d00ed10960b59928befd68f6c020b15, the failures on Jenkins (see 21191d0d8953a3ca6eac6022c0a14a87fe9c5e2a) made it apparent that (at least some of) Jenkins builds also run in RDP sessions. Since the tests excluded in commit 9c6142ec26a0ba61b1cf58d1e6bf0b5376394bcd never failed in Jenkins builds before, it is wrong to exclude all those tests in all RDP sessions: our CI would not test those on Windows. In the meanwhile, I discovered that the system that failed the tests actually had 16-bit color depth, despite RDP being configured to use 32-bit colors; that was the reason why the colors were modified on roundtrip. So it is better to test the actual problem to exclude tests. This reimplements the check that was introduced in commit 9c6142ec26a0ba61b1cf58d1e6bf0b5376394bcd to test default virtual device color depth. Change-Id: I329a3e2d8eca21732c77dcacf15394d1246b2e18 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113460 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-04-01tdf#140343 sw page rtl gutter margin: add UIMiklos Vajna
And extend SwFrame::UpdateAttrFrame() so that the layout is updated when the UI mutates the doc model. Change-Id: I4112388981187226f97ec39f4c44ffb3cc1e5253 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113440 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-04-01Introduce Fontwork contextSzymon Kłos
Change-Id: I61512e4da13514d3e5a199ccb46468ba199b808f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110023 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112274 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2021-04-01tdf#140343 sw page rtl gutter margin: add RTF filterMiklos Vajna
Map to the \rtlgutter section flag. This means that now rtl gutter is handled for all Word formats. Change-Id: I4c2c12b7df2ce2109d4d638df71e6b7f322afe52 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113439 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-04-01Use o3tl::convert for conversion to/from EMUsMike Kaganski
Change-Id: Ifbf762194836a3d05157e98943e65ef8aa2149c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113425 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-31tdf#140343 sw page rtl gutter margin: add DOC filterMiklos Vajna
The import's tokenizer was there since commit 3e13e053749e1bf19179bf83bdf0a18a9488b5e8 (#i2408# Import and export set/ask references fields as set/input, change references to bookmarks to show variable as appropiate, 2002-02-04), but it tried to read 2 bytes, not 1 byte, so it was broken. This did not cause problems in practice till commit b897cc4dfc7111eb8dfd5d8aa8c970f21ab035d6 (consistently track amount of buffers remaining, 2017-04-10) started to check for not reading past the end of the buffer. The export was missing, since we previously tried to handle this at import time, so the doc model didn't have the info anymore. Change-Id: I0d15a16893de96104812b0cba4566c53f92673ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113415 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-03-31tdf#140863: sw: Add UItestXisco Fauli
Change-Id: Ic1d3a56857dd68f436b870168ab394729a31d629 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113416 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-03-31tdf#141158 DOCX: import discarded headers/footersAttila Bakos (NISZ)
Before the inactive DOCX headers/footers lost during import time. Now it can be restored by disabling the options “Same content on left and right pages” and “Same content on first page” on the Header and the Footer panes of the Page style. This is for improving the interoperability with other Office programs, e.g. supporting DOCX text document templates better. Follow-up of commit f5dc6b11d2218d94c9effe7a1ab418d0133da5e3 (tdf#140117 sw UI: keep headers/footers when inactive). To start the py-UItest run: $ make UITest_writer_tests7 UITEST_TEST_NAME="tdf141158.TestTdf141158.test_tdf141158" Note: In spite of this patch implements the left/first/first_left page header/footer stash at import time, the left one works correctly at now. This is because the first pages have different page styles so changing the right page style will restore the hidden header/footer content. For this problem further improvements are planned, exactly in the filter part. Number of unit tests had to be modified, because before these headers and footers were dropped. Co-developed-with: Daniel Arato (NISZ) Change-Id: I3dd452a648bc465710698707c083734dc762ed94 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112580 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-03-31tdf#117212 sw mailmerge: merge only the selected rangeBalazs Varga
All records were merged before saving or printing the record range selected in “From 'X' To 'Y' of the “Save Merged Documents” or “Print Merged Documents” dialog windows (opened via the Mail merge toolbar). This was a waste of time in the case of selecting only a few records. Change-Id: I52c47d3c5707b09ed7f9b05a1a0f4d20a5595b8d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112922 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-03-31tdf#140343 sw page rtl gutter margin: add DOCX filterMiklos Vajna
Map to <w:rtlGutter> inside <w:sectPr>. Change-Id: Iaa1d9da8c1585ec31c7cbe539f49643eb972c327 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113398 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-03-31tdf#140343 sw page rtl gutter margin: add layoutMiklos Vajna
We used to get the gutter margin on the left side and the right gutter margin on the right side, which works for normal and mirrored layout. Swap these two in RTL mode. Change-Id: Ibe866c2d971ce72e94fab5d5c71040ab62ffbe93 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113395 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-03-31tdf#134385 doc/docxexport: maybe export false contextualspacingJustin Luth
Instead of LO 4.2's solution of never exporting false, export if the inherited value would be true. Otherwise there is no way to override an inherited value. RTF doesn't have a "false" version of \contextualspace, so I ignored that format. Change-Id: I6d05eb9a5d3fbfbfca0fddd7eda0c230baa25c5c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113064 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-03-30Exclude some tests in Windows RDP sessionMike Kaganski
It seems that RDP may change (limit?) color space (even configured to use 32-bit colors), and then some tests start failing like this: Test name: BackendTest::testDrawAlphaBitmapMirrored equality assertion failed - Expected: c[80000000] - Actual : c[84000000] Debugging ImplDrawBitmap in vcl/win/gdi/gdiimpl.cxx, and adding a call to GetPixel immediately after the call to StretchDIBits, shows that the resulting color on the device is different from the color in the bitmap data: e.g., for original color {128, 0, 0} the result is {132, 0, 0}. Calling GetColorAdjustment shows that there's no color adjustments set for the device, so I can't detect or modify the behavior this way. So just disable the tests for now when running in RDP sessions. Change-Id: Ie89d07f18f53e56bed6f7fa58432b8575b4d9f12 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113388 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-30tdf#140343 sw page rtl gutter margin: add UNO APIMiklos Vajna
When true, the gutter position may be right and top, not left and top. Change-Id: I5e3e4b4d9cb217b81b2712cb208ca5725d46ae28 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113349 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-03-30For now, skip problematic test_tdf141166 also for --with-helpStephan Bergmann
...similar to how it already got skipped with 10fbf2b80e11620f3fc1691aa7968e6d3d460db9 "Skip a problematic UITest for --with-help=html/online". (And note how the check for "-DWITH_HELP" in $SCPDEFS would unfortunately also hit for the --with-help=html case, see configure.ac, if that were not already filtered with the preceding check, anyway.) The better fix would arguably be to make the code close both the "LibreOffice Help" window and the "LibreOffice Help Not Installed" dialog, whichever shows up for a given configuration. But this temporary fix at least gets --with-help builds like <https://ci.libreoffice.org/job/lo_ubsan/1961/> going again. Change-Id: I9d9d6ffeb26a056fa3fe65085264d75822e7646c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113372 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-03-30tdf#135662: sw_uiwriter3: Add unittestXisco Fauli
Change-Id: I517bff275bba0a84a69e79f45db1c2a873965feb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113345 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-03-30tdf#140336 ms formats export: export NONE background for ParaBackColorJustin Luth
This fixes a regression from LO 4.2 with tdf#88583's commit 60cdeb2d441a6bf5c55f511f574b2b9dd598fbb8. It isn't only SOLID that needs to be written, otherwise there is no way to cancel an inherited background. And only write out a SOLID if one is specified here. Do not duplicate a style's SOLID fill into every sub-style and paragraph. (Yikes) This fixes DOCX (seriously) and DOC (de-duplication), but not RTF (which doesn't write out transparent brushes). Surprisingly, I didn't find any examples where a NONE was specified that matched an inherited NONE. But it IS important (probably because of a bug) and also smart to determine and avoid writing NONE if there is no inheritance. So then, there is no reason not to do the last step of checking if the current brush matches the inherited brush. [That also paves the way for a potential follow-up commit to try deduplicating SOLID fills as well, although that likely adds grabbag complications into the mix. And perhaps deduplication isn't desired either, in case the user actually wanted to duplicate (if that is even possible under UI conditions).] Change-Id: I8958a68c779057d9fc5da74eca50fcf5b41d8b52 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113105 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-03-30related tdf#131801: remove completed TODO commentJustin Luth
The todo was done in LO 7.1 with commit c77b9c349f0a48392d8cb7a49532844b2cafb5ba Michael's reference to testParagraphMark is puzzling because the only place that is found is in a unit test, and Miklos' ooxmlexport.cxx test has nothing to do with numbering. Change-Id: Ie24ff6a69edf92f9dbe586c64a6ea631718002cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110122 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-03-30Simplify SwFormat::SetPageFormatToDefaultMike Kaganski
Change-Id: I5a85a3f32cd88cb8306d54e2fafa4156056cc577 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113334 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-30Missing test dependenciesStephan Bergmann
From-scratch CppunitTest_sw_ooxmlexport16 had failed for me due to > warn:vcl.builder:30496:4101353:vcl/source/window/builder.cxx:517: DBG_UNHANDLED_EXCEPTION in VclBuilder > when: Unable to read .ui file exception: com.sun.star.container.NoSuchElementException message: file:///.../instdir/LibreOffice.app/Contents/Resources/config/soffice.cfg/svt/ui/editcontrol.ui and > warn:vcl.builder:33595:4130924:vcl/source/window/builder.cxx:517: DBG_UNHANDLED_EXCEPTION in VclBuilder > when: Unable to read .ui file exception: com.sun.star.container.NoSuchElementException message: file:///.../instdir/LibreOffice.app/Contents/Resources/config/soffice.cfg/sfx/ui/tabbar.ui Change-Id: I07545784d70fe75a5b405e111866de5702f16424 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113335 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-03-30Use o3tl::convert instead of GetMetricValMike Kaganski
... and drop the latter. Change-Id: Ia877358bbd8a699b9e8cc4d72dc1fb7c4d0ef980 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113328 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-30tdf#140892 Revert outline fold button symbols to right and down arrowsJim Raykowski
Change-Id: I5db3d4d4c45f84ec0d9ce70db83bef7027f8e9d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113329 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2021-03-30Outline folding: only hide the fold button when neededJim Raykowski
Current behavior is to always hide the fold button on mouse leave which is usually followed by a delayed showing of the same button. This patch prevents this hide show by only hiding the button when the button mouse leave results in leaving the area of the frame the button controls. Change-Id: Iecb544bfeffb32ac4ba7183719a193a96162c7c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113243 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2021-03-30tdf#141102 friendlier naming for outline content visibility featureJim Raykowski
relabeled as outline folding Change-Id: I36b2dbe4eeee27abdf486e81db00d33e81c41679 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113005 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2021-03-29tdf#98749 Move initialization of page defaults to writer corePanos
A function (SetPageFormatToDefault) was created at sw/source/core/attr/format.cxx for the SwFormat class containing some hardcoded PageDescs defaults. The double setting of left was replaced with left, right The lines affected in sw/source/core/unocore/unostyle.cxx were replaced with the function call. Change-Id: I4ea548145d42321b696233995f6dba323c72d078 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113104 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-29sw page rtl gutter margin: add doc modelMiklos Vajna
This is a new flag on the page style, and if it's true, then non-top gutter is right, not left. This is just the doc model, other parts will come in follow-up commits. Change-Id: I36ffe9d2f62fc057cf98952c743d415d9240513d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113323 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-03-29sw_uiwriter: unify data folderXisco Fauli
Change-Id: I2506c9eb077ca8caa36010a06056b23f83b444a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113316 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>