summaryrefslogtreecommitdiff
path: root/writerfilter
AgeCommit message (Collapse)Author
2019-04-01tdf#42949 Fix IWYU warnings in include/sfx2/[sS]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I4a3baffa8944b522b16b50975185759081662020 Reviewed-on: https://gerrit.libreoffice.org/69945 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-29tdf#124384 sw DOCX: fix crash during bibliography loadingSerge Krot
Change-Id: Ic0c4b6f7480a4c6c3f53bd04e285cb0cab172531 Reviewed-on: https://gerrit.libreoffice.org/69888 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2019-03-28tdf#121456 sw: DOCX: fix loading of empty TOC titleSerge Krot
Change-Id: Ib241edd07e4c6781d80db274f73146bda310d8c0 Reviewed-on: https://gerrit.libreoffice.org/69827 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2019-03-25tdf#42949 Fix IWYU warnings in include/sfx2/[a-D]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I444cb71bc3d045072a4b1f9eed279ed7e425a0d4 Reviewed-on: https://gerrit.libreoffice.org/69481 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-25We can simply use DBG_UTIL now after efc29fbb6d458f5fd3660a36e2ff1592608fcbacTor Lillqvist
Change-Id: I74cce2d3fb4661ea9a44d0b166ca98dfade53056 Reviewed-on: https://gerrit.libreoffice.org/69604 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-25new loplugin:unoqueryNoel Grandin
look for places we are doing code like: Reference<XProperty>(model, css::uno::UNO_QUERY)->getAsProperty() which might result in a SIGSEGV is the query fails Change-Id: I5cbdbc9e64bd0bed588297c512bf60cbacb9442e Reviewed-on: https://gerrit.libreoffice.org/69044 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-20The DEBUG_WRITERFILTER code should be a dbgutil thingTor Lillqvist
DEBUG_WRITERFILTER being on or off introduces binary incompatibility between object files that implement and use those things, so it shouldn't be changed without a full recompilation. Thus is matches dbgutil. Change-Id: Iec3c713ca7b299daf4b9cf1c978e49bf5ddf6886 Reviewed-on: https://gerrit.libreoffice.org/69438 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-13DOCX import: fix unexpected page break on autotext insert at end of docMiklos Vajna
The problem was that the page style was set on the first paragraph, which means a page break on the UI. So if you used a multi-paragraph autotext twice (insert autotext, press enter, insert autotext again) then you ended up with 2 pages instead of just 1. Fix the problem by tracking when we are in autotext import mode, and similar to pasting, don't set the page style in autotext import mode. Change-Id: I4fc551b3c1b999687eb80242e261f186fd1b6f13 Reviewed-on: https://gerrit.libreoffice.org/69214 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-03-12tdf#123104 DOCX import: fix lack of vertical merge due to roundingMiklos Vajna
Regression from commit 29cbbad64088354425c606f9eb6c267bdf7731dc (DOCX import: fix rounding error in table cell widths, 2014-11-07), which changed truncation to rounding for the twips -> 1/10000th of relative width conversion during import, but left export unchanged. But adapting the export is not that easy: one part would be the std::unique() call in WW8TableNodeInfoInner::getColumnWidthsBasedOnAllRows() to not require exact comparison, but doing so has it own side effects (multiple failing tests). So just revert the mentioned commit, as a minor rounding error is much better than a broken vertical merge. And once it's clear how to adapt export at the same time, this rounding on the import side can be re-introduced. Change-Id: I9e01ea5cc2c2f8aabe1e21cb8118c9c0e2c45494 Reviewed-on: https://gerrit.libreoffice.org/69065 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-09MSForms: Introduce a new IFieldMark for drop-down form fieldTamás Zolnai
* It was weird anyway that a drop-down form field was represented as an CheckboxFieldmark. * It will be useful for later commits, to have a separate field type for drop-down field. * Needed to fix-up the API a bit because it was designed to specify the field type after initialization. I solved it in a way to not break the API behavior. Hopefully it's not very slow. Change-Id: I3103e6b1c36289b27b62ab9ca7dfeebc14901c8a Reviewed-on: https://gerrit.libreoffice.org/68960 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2019-03-09loplugin:singlevalfieldsNoel Grandin
Change-Id: I7f9ff0fc58adf51eae7fef5ce925b91b8d1f4922 Reviewed-on: https://gerrit.libreoffice.org/68940 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-07log nice exception messages whereever possibleNoel Grandin
Change-Id: Idd125c18bee1a39b9ea8cc4f8c55cddfd37c33e1 Reviewed-on: https://gerrit.libreoffice.org/68579 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-06writerfilter: remove empty RTFPicture constructorMiklos Vajna
This is really just a reference-counted struct, not a real class. Change-Id: Ifccd513e56632fd4df7711f7070188671b45e82d Reviewed-on: https://gerrit.libreoffice.org/68777 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-05re-land "new loplugin typedefparam""Noel Grandin
This reverts commit c9bb48386bad7d2a40e6958883328145ae439cad, and adds a bunch more fixes. Change-Id: Ib584d302a73125528eba85fa1e722cb6fc41538a Reviewed-on: https://gerrit.libreoffice.org/68680 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-05Avoid overflowing sal_Int16 PROP_GRID_LINESStephan Bergmann
...as seen with Clang's -fsanitize=implicit-signed-integer-truncation during CppunitTest_sw_ooxmlexport4 when nTextAreaHeight=36920 and m_nGridLinePitch=1: > writerfilter/source/dmapper/PropertyMap.cxx:1519:38: runtime error: implicit conversion from type 'int' of value 36920 (32-bit, signed) to type 'const sal_Int16' (aka 'const short') changed the value to -28616 (16-bit, signed) > #0 in writerfilter::dmapper::SectionPropertyMap::CloseSectionGroup(writerfilter::dmapper::DomainMapper_Impl&) at writerfilter/source/dmapper/PropertyMap.cxx:1519:38 > #1 in writerfilter::dmapper::DomainMapper::lcl_endSectionGroup() at writerfilter/source/dmapper/DomainMapper.cxx:2881:30 > #2 in writerfilter::LoggedStream::endSectionGroup() at writerfilter/source/dmapper/LoggedResources.cxx:101:5 > #3 in writerfilter::ooxml::OOXMLFastContextHandler::endSectionGroup() at writerfilter/source/ooxml/OOXMLFastContextHandler.cxx:434:23 > #4 in writerfilter::ooxml::OOXMLFactory_wml::endAction(writerfilter::ooxml::OOXMLFastContextHandler*) at workdir/CustomTarget/writerfilter/source/ooxml/OOXMLFactory_wml.cxx:7517:19 > #5 in writerfilter::ooxml::OOXMLFactory::endAction(writerfilter::ooxml::OOXMLFastContextHandler*) at writerfilter/source/ooxml/OOXMLFactory.cxx:199:19 > #6 in writerfilter::ooxml::OOXMLFastContextHandler::lcl_endFastElement(int) at writerfilter/source/ooxml/OOXMLFastContextHandler.cxx:195:5 > #7 in writerfilter::ooxml::OOXMLFastContextHandler::endFastElement(int) at writerfilter/source/ooxml/OOXMLFastContextHandler.cxx:177:9 > #8 in (anonymous namespace)::Entity::endElement() at sax/source/fastparser/fastparser.cxx:483:27 > #9 in sax_fastparser::FastSaxParserImpl::callbackEndElement() at sax/source/fastparser/fastparser.cxx:1274:17 > #10 in (anonymous namespace)::call_callbackEndElement(void*, unsigned char const*, unsigned char const*, unsigned char const*) at sax/source/fastparser/fastparser.cxx:310:18 > #11 in xmlParseEndTag2 at workdir/UnpackedTarball/libxml2/parser.c:9680:2 > #12 in xmlParseTryOrFinish at workdir/UnpackedTarball/libxml2/parser.c:11531:7 > #13 in xmlParseChunk__internal_alias at workdir/UnpackedTarball/libxml2/parser.c:12244:13 > #14 in sax_fastparser::FastSaxParserImpl::parse() at sax/source/fastparser/fastparser.cxx:1043:21 > #15 in sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) at sax/source/fastparser/fastparser.cxx:863:9 > #16 in sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) at sax/source/fastparser/fastparser.cxx:1359:13 > #17 in writerfilter::ooxml::OOXMLDocumentImpl::resolve(writerfilter::Stream&) at writerfilter/source/ooxml/OOXMLDocumentImpl.cxx:504:22 > #18 in WriterFilter::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at writerfilter/source/filter/WriterFilter.cxx:192:24 > #19 in SfxObjectShell::ImportFrom(SfxMedium&, com::sun::star::uno::Reference<com::sun::star::text::XTextRange> const&) at sfx2/source/doc/objstor.cxx:2212:34 > #20 in SfxObjectShell::DoLoad(SfxMedium*) at sfx2/source/doc/objstor.cxx:741:23 > #21 in SfxBaseModel::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/sfxbasemodel.cxx:1844:36 > #22 in (anonymous namespace)::SfxFrameLoader_Impl::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&) at sfx2/source/view/frmload.cxx:689:28 > #23 in framework::LoadEnv::impl_loadContent() at framework/source/loadenv/loadenv.cxx:1150:37 > #24 in framework::LoadEnv::startLoading() at framework/source/loadenv/loadenv.cxx:384:20 > #25 in framework::LoadEnv::loadComponentFromURL(com::sun::star::uno::Reference<com::sun::star::frame::XComponentLoader> const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at framework/source/loadenv/loadenv.cxx:170:14 > #26 in framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at framework/source/services/desktop.cxx:619:12 > #27 in non-virtual thunk to framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at framework/source/services/desktop.cxx > #28 in unotest::MacrosTest::loadFromDesktop(rtl::OUString const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at unotest/source/cpp/macros_test.cxx:50:60 > #29 in SwModelTestBase::loadURL(rtl::OUString const&, char const*, char const*) at sw/qa/extras/inc/swmodeltestbase.hxx:761:23 > #30 in SwModelTestBase::load(rtl::OUString const&, char const*, char const*) at sw/qa/extras/inc/swmodeltestbase.hxx:716:16 > #31 in SwModelTestBase::executeImportTest(char const*, char const*) at sw/qa/extras/inc/swmodeltestbase.hxx:264:13 > #32 in testTdf86926_A3::Import() at sw/qa/extras/ooxmlexport/ooxmlexport4.cxx:1140:1 [...] Change-Id: Idf694b0dda871f1313d36c03764b0199e10d1b25 Reviewed-on: https://gerrit.libreoffice.org/68710 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-05tdf#123243 DOCX import: make increased anchored obj spacing cond more strictMiklos Vajna
Regression from commit 8b73bafbc18acb4dd8911d2f2de8158d98eb6144 (tdf#115719 DOCX import: increase paragraph spacing for anchored objects, 2018-02-14), which is an import-time workaround for a Word layout bug. Re-checking the original document from that bug, this only happens with more anchored shapes (to the same paragraph), so make the workaround condition more strict, fixing the layout of this bugdoc. (Which means tdf115719.docx and tdf115719b.docx are modified to be more close to the original bugdoc.) Just checked, sadly Word's layout bug is still there in MSO 2019, so can't revert our emulation of it (not yet). Change-Id: I26f74a497b7718f8f3a2eadac481c8722e85e680 Reviewed-on: https://gerrit.libreoffice.org/68708 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-04tdf#119201 Don't show/print hidden shapes in DOCXAron Budea
Similar fix to b38065ea941375bf4f78f13314e84f4a875545d9 Only rely visibility setting for now, but properly: visible means also printed, hidden means not printed. Ie. import visible property also as printable, and only output visible property in DOCX format (DOC shapes have no such property). Change-Id: Ifc3c36f90aa16ded1a9f31197612a5c85fde5d87 Reviewed-on: https://gerrit.libreoffice.org/68239 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-04Revert "new loplugin typedefparam"Noel Grandin
This reverts commit 9865440d217d975206a3f91612f0666312bc8fd8. This is not ready to land yet, seems like the latest update of the logic reveals a bunch more places I need to fix before it can land.
2019-03-04new loplugin typedefparamNoel Grandin
verify that parameters use the exact same typedef-names (if any) in definition and declaration Change-Id: I55d2817f599b0253904dce2d35a1a93967e15a77 Reviewed-on: https://gerrit.libreoffice.org/68439 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-28tdf#121440 writerfilter: do not use imported style for foot/endnotesVasily Melenchuk
Extra style is causing editing problem near footnote/endnote references. This behavior is a side effect of eaa9cf6a3069fba3d82c046f0041bfb537d9e648, allowing emission of these "technical" styles. Change-Id: I1885b92814746e7b5cd19f3ddd7bc22eb691615e Reviewed-on: https://gerrit.libreoffice.org/68304 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2019-02-27writerfilter: make RTFDrawingObject members privateMiklos Vajna
Change-Id: I72085b130dede835f3fc75cb1335eb3b0c0d9b2e Reviewed-on: https://gerrit.libreoffice.org/68409 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-02-27loplugin:unusedfields look for classes where we can make all the..Noel Grandin
fields private Change-Id: Id3c6b123f06ab5dcf87628de4c347626110d2d27 Reviewed-on: https://gerrit.libreoffice.org/68302 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-26tdf#123393 RTF import: fix too big font size in table cellMiklos Vajna
The reason was that A2 had an explicit paragraph style reference, but A1 did not, so table buffering caused A2 style to affect A1 style as well. Combine this with style deduplication, and then A2 style considered the direct formatting (font size) in A1 to be redundant, so it was lost on import. Fix the problem by moving the copy&pasted properties buffering to a single function, and there buffering not only the properties, but also the active style index. Change-Id: I99f2020b8bef237849fd622b25ac5ef0516d69e4 Reviewed-on: https://gerrit.libreoffice.org/68361 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-02-22loplugin:unusedfields in writerfilterNoel Grandin
Change-Id: Icce42e5db6d8ac51bf8b7d40cb497c6c365099d2 Reviewed-on: https://gerrit.libreoffice.org/68152 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-21tdf#123434 FILEOPEN: RTF: missing content in cellsLászló Németh
Revert "tdf#122424 RTF import: ignore table row text outside the cells" This reverts commit dc8fa612054363e1a871b0e413a59889fbdb156a. Change-Id: Id68dc7ae55df013de64fb2d4955a412e4c046781 Reviewed-on: https://gerrit.libreoffice.org/68086 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-02-20Fix compilation error against boost 1.66 at leastTor Lillqvist
Change-Id: I95899bc44d895abbeedb10815ac566dfd4660f6d
2019-02-20writerfilter: make RTFShape members privateMiklos Vajna
Change-Id: Ifc8431514d95a848de9c31011c457acb32cf44f2 Reviewed-on: https://gerrit.libreoffice.org/68061 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-02-20tdf#123293 sfx2: fix metadata loss when loading from streamMichael Stahl
The problem is that when loading from a stream, there is no BaseURL and also no storage for the document. Due to the lack of BaseURL, the sfx2::createBaseURI() throws and loading RDF metadata fails, which also pops up an annoying warning dialog. Try to handle this in a similar way than a newly created document (see GetDMA()), by using the vnd.sun.star.tdoc scheme URL for the document; this however currently requires that the document has a XStorage, which is also not the case here. So add another UNO method to tdoc UCP's tdoc_ucp::ContentProvider, to split out the creation of the tdoc schema URL from the creation of the ucb Content, to get rid of the XStorage requirement. Change-Id: Ica62743f9d21db0b1464b70db1a62ebc61989ef8 Reviewed-on: https://gerrit.libreoffice.org/67882 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-02-19pretty up logging of exceptionsNoel Grandin
Add exceptionToString() and getCaughtExceptionAsString() methods in tools. Use the new methods in DbgUnhandledException() Add special-case case code for most of the exceptions that contain extra fields, so all of the relevant data ends up in the log Change-Id: I376f6549b4d7bd480202f8bff17a454657c75ece Reviewed-on: https://gerrit.libreoffice.org/67857 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-15sw btlr writing mode: implement DOCX filterMiklos Vajna
Replace the old trick with character-level rotation with the usage of the new writing direction. This means that finally table cells with btlr text direction and multiple paragraphs show all content, not only the first paragraph, as before (seen as data loss by users). Change-Id: I094f36fa6ba0701579e487e8e0212707987b1b2f Reviewed-on: https://gerrit.libreoffice.org/67870 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-02-15loplugin:simplifybool extend to !(a == b) where comparison an overloaded opNoel Grandin
Change-Id: I08fcbe2569c07f5f97269ad861fa6d38f23a7cc7 Reviewed-on: https://gerrit.libreoffice.org/67816 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-13writerfilter: make RTF TableRowBuffer members privateMiklos Vajna
Change-Id: Id16726ad6f0cd5aeae0b55c817d02b315506e863 Reviewed-on: https://gerrit.libreoffice.org/67747 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-02-12DOCX, RTF filter: handle distributed para adjustMiklos Vajna
Pointed out by lcov for the RTF import, but all of RTF/DOCX import/export was missing. DOC export is still missing. Change-Id: I9c48a08c3e951409f59dc1631a6ab39aa95f905d Reviewed-on: https://gerrit.libreoffice.org/67700 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-02-11new loplugin writeonlyvarsNoel Grandin
largely based on the relevant portion of the unusedfields loplugin, but adapted for local vars Change-Id: Ic522a941573940e8f75c88f90ba5f37508ca49b1 Reviewed-on: https://gerrit.libreoffice.org/66835 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-11tdf#116851: some rtf files provide param with "-" for "edmins"Julien Nabet
Change-Id: I2a2a189ee727a51aeef5601b39bb288d813fc8f3 Reviewed-on: https://gerrit.libreoffice.org/52610 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-02-11loplugin:indentation in writerfilter..xmloffNoel Grandin
Change-Id: Ibda157508e92ab5fb222daf79a38941c30a8057e Reviewed-on: https://gerrit.libreoffice.org/67611 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-06writerfilter: make members private in RTFMathSymbolMiklos Vajna
Change-Id: I5c63c28ba4c63e17b74e656d5382d45c9fcc6baa Reviewed-on: https://gerrit.libreoffice.org/67428 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-02-06tdf#123189 DOCX import: skip table bkground colorLászló Németh
settings to keep interoperability, use only cell properties, as MSO. Change-Id: I167eb0e8732fa7dc7f890c2a21d59a15299be8ba Reviewed-on: https://gerrit.libreoffice.org/67429 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2019-02-05tdf#122878: enable wrap for flys in footerPatrick Jaap
This patch removes the check for a footer node, intoduced by 23f698ecee033612ac3a9f5cfd7674b08bb3ccd1 preserving the behaviour for the connected bug reports i13832 and i24135. Without this check, the wraping becomes enabled for footer objects, too. With this enhencement, the commits 7df33caac85ac90c26e97dedbc201f46dc9e4cb4 d3db6ff43a531ecf1afc858a0a8832353d091644 are directly affected and therefore the unit test is edited. Change-Id: I093add9e251ac97859a66cb8b8563010ef734c2d Reviewed-on: https://gerrit.libreoffice.org/67069 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-02-05tdf#121867 DOCX filter: handle page width zoomMiklos Vajna
And other non-fixed zoom types, similar to how DOC does it. Change-Id: Ie84340b4e662d2329b5d3918900adfd0c3e9b8e9 Reviewed-on: https://gerrit.libreoffice.org/67378 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-01-31CppunitTest_writerfilter_rtftok: use CPPUNIT_TEST_FIXTURE()Miklos Vajna
Change-Id: I16e0c1adf854c3a2fa8d945724270d2d87461b39 Reviewed-on: https://gerrit.libreoffice.org/67192 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-01-30writerfilter: make members private in RTFSymbolMiklos Vajna
Change-Id: I8f608908689d9ebe2027bc36bf71b8cf84a016dc Reviewed-on: https://gerrit.libreoffice.org/67095 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-01-29tdf#122430 RTF import: fix lost font size on footnote startMiklos Vajna
This become more visible since commit 49614a9ea971ff7f370f863ce8a2735aab973cee (tdf#119599 RTF import: fix missing deduplication of font size, 2018-09-24) as now incorrect font size from style affects the rendering result. Change-Id: I5b339337f021e2fc359f6fc5f5aa2ed0bcf844b9 Reviewed-on: https://gerrit.libreoffice.org/67034 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-01-24loplugin:constparams in ucb..xmlhelpNoel Grandin
Change-Id: I3c1e0bfbba1a1849075500882133aac3899de5c8 Reviewed-on: https://gerrit.libreoffice.org/66834 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-15tdf#121670 ooxmlimport: no columns in page styles, only sectionsJustin Luth
LIKELY TO EXPOSE SECTION EXPORT/IMPORT PROBLEMS. That is already happening somewhat because support for forms/protected sections was added in LO6.2. By making this change, it will help to expose problems faster, with the hope that they can still be fixed for 6.2. Columns in page styles are very problematic, because it doesn't let you override the number of columns (except to put sub-columns inside one of the existing columns). So, always attempt to insert a column into it's own section, and never into the page style itself. I'm rather excited that this didn't cause any unit test failures. I've made a lot of section fixes over the years (and some this week which are required for the unit test to work). This change seems very natural, and gets rid of a regression-prone hack. I found all of the existing unit tests with columns and tested them. About 10 files - all look fine including complex files tdf81345.docx and tdf104061_tableSectionColumns.docx Change-Id: If02f1bfd91b1cf8210665244d0782ff926cc2869 Reviewed-on: https://gerrit.libreoffice.org/65557 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2019-01-13Avoid getToken index for single callMatteo Casalin
Change-Id: Ibefd5b0737de7d29a47bab0709ed96901a5e028e Reviewed-on: https://gerrit.libreoffice.org/66227 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-01-12tdf#122658: Empty date form field is not exported correctly to DOCX fileTamás Zolnai
We need to export date format and also text content in case of empty date field. Otherwise the exported date field will be lost during import into LO Writer or MSO Word. Change-Id: I5cf65bedba010f64ca8f56262057f3cce32b0943 Reviewed-on: https://gerrit.libreoffice.org/66194 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2019-01-11Drop o3tl/clamp.hxx, use C++17 std::clamp insteadStephan Bergmann
Change-Id: I5043c787dcc3b78bc7fdff130564801194e39f46 Reviewed-on: https://gerrit.libreoffice.org/66177 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-01-11Replace OUStringBuffer::appendCopy with append(std::u16string_view)Stephan Bergmann
...which is more general Change-Id: I94f28f8eda887120cf5f143b4549e0339b60e6a7 Reviewed-on: https://gerrit.libreoffice.org/66155 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-01-11writerfilter: import section margins and writingModeJustin Luth
Previously, only page styles got these values. But if the section is continuous, then these properties should be transferred to the section itself. This patch relies on the commit for tdf#122456. It confirms that it is a good idea for the last section to ignore the "fake" section and keep the real section properties. Otherwise these margins would be lost on export. Change-Id: I45efb0d80fb9307a57ff560b2e1a26899155f827 Reviewed-on: https://gerrit.libreoffice.org/65975 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>