summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8/docxexport.cxx
AgeCommit message (Collapse)Author
2020-10-02MSWordExportBase never passed a null SwDoc*Caolán McNamara
and drop redundant nullptr checks Change-Id: I42b86461ad276089454b35a51651c5aa1e1280ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103850 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-30loplugin:reducevarscope in swNoel
Change-Id: Ifed7220c6acf7049b2985f1911a806b37a54d794 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103646 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-22OUStringLiteral/OStringLiteral coverity PARSE_ERROR workaroundCaolán McNamara
do more like commit 121771e37f7e2de41cd5643475861062bf25627b Date: Mon Sep 21 09:17:54 2020 +0200 Make some OUStringLiteral vars constexpr cause coverity can live with that Change-Id: I9efd7f848289c4865997a44c6780373068422227 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103147 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-08-28Change OUStringLiteral from char[] to char16_t[]Stephan Bergmann
This is a prerequisite for making conversion from OUStringLiteral to OUString more efficient at least for C++20 (by replacing its internals with a constexpr- generated sal_uString-compatible layout with a SAL_STRING_STATIC_FLAG refCount, conditionally for C++20 for now). For a configure-wise bare-bones build on Linux, size reported by `du -bs instdir` grew by 118792 bytes from 1155636636 to 1155755428. In most places just a u"..." string literal prefix had to be added. In some places char const a[] = "..."; variables have been changed to char16_t, and a few places required even further changes to code (which prompted the addition of include/o3tl/string_view.hxx helper function o3tl::equalsIgnoreAsciiCase and the additional OUString::createFromAscii overload). For all uses of macros expanding to string literals, the relevant uses have been rewritten as u"" MACRO instead of changing the macro definitions. It should be possible to change at least some of those macro definitions (and drop the u"" from their call sites) in follow-up commits. Change-Id: Iec4ef1a057d412d22443312d40c6a8a290dc6144 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101483 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-08-13loplugin:stringstatic also look for local staticsNoel Grandin
Add some API to O*StringLiteral, to make it easier to use in some places that were using O*String Change-Id: I1fb93bd47ac2065c9220d509aad3f4320326d99e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100270 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-31loplugin:flatten in sw/filter/ww8Noel Grandin
Change-Id: Ia296fc6e6c8f78edf533dedf52996560ae62d143 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99853 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-22Read contentType from "MediaType" present in the streamMike Kaganski
Change-Id: I7268205529144ab6edc9634cb0310de9886fca08 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99198 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-07-22tdf#131288 Chart: fix export of embedded xlsxBalazs Varga
To avoid exporting a broken DOCX, we have to seek the 'embeddingsStream', so we avoid to export an empty (0 Kb) embedded xlsx. Co-authored-by: Balázs Regényi Change-Id: I1723091aab3e2070f3db75ce866897e38021718d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99151 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2020-07-20tdf#134973: restore unmodified status of chart on exportMike Kaganski
Upon first save, the chart model may get modified during export when accessing subtitle which gets created when not yet existing. That modified state hadn't been reset previously, when the save was done in the DocxAttributeOutput::WritePostponedChart. Prior to 129f55097f926661f00919329fb28c6a85ecebbb, because of double insertion of the same object, EmbeddedObjectContainer::StoreChildren stored the duplicate of the chart again (after the "modification" happened in DocxAttributeOutput::WritePostponedChart), and reset the status in ChartModel::impl_store. The mentioned commit made the old problem manifest itself. Change-Id: Ib6b11bf85fcef93c6d86f7ab5c0e4b0d6508860c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99044 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-07-06Don't explicitly convert OUString to OStringMike Kaganski
See commit 57afeb8d9e35933630568a02fc48a00f5582b261 Change-Id: Idb41fb2e3b90bd0eb1d7ebd588c13fd50b9536fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98173 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-04-30loplugin:makeshared in swNoel Grandin
Change-Id: I58d91e75ef96beaab7ec34df519ae3a376dce976 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93201 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-15sw: DOCX export: export AddExternalLeading as w:noLeadingMichael Stahl
For 11pt Arial, can fit 59 paragraphs on a page vs. 57... This is annoyingly complicated by the fact that Word 2013 ignores w:noLeading element if compatibilityMode is 15. Change-Id: Ie3093eabba45cdf6e7903ed860f5bad24dcc0323 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92208 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-04-02cid#1418980 Resource leakCaolán McNamara
Change-Id: I3a09b3165503bacbd2bab394eda9adc793f0bff9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91546 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-01tdf#120852 writerfilter: support read-only docProtectionJustin Luth
Setting the document to LoadReadonly nicely does not prompt the user to "press this button to edit". That is what we would generally want when Read-Only is enforced, so lets use that. The user can easily enter edit mode via the edit menu, if they want to temporarily override the protection, which seems natural and discoverable enough. There is a File menu - Properties - Security option that manages the LoadReadonly setting in LO. If the user turns that off, then export will also cancel enforcement of the readOnly grabbag item. The situation where read-only was not enforced before, but now is enforced by LO, is handled by _MarkAsFinal, so that case is ignored. In other words, there was no point in adding a WriterWantsToProtectReadOnly flag. See tdf#107690 for _MarkAsFinal fix. I had started going down the wrong patch of being innovative with boolean &=, not realizing that it now always evaluated the right side. Remove that bad example for other cut-and-pasters. In the end, this logic is much easier to understand anyway. Change-Id: Id26b283078a5fd62d662a26a96cfc461e0ba8459 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90323 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-03-31related tdf#106843 docxexport: if not enforced, let Writer protectJustin Luth
The problem was that sections, etc., could not be protected if the document previously had some kind of protection that was now disabled/not enforced. Docx has a special flag that actually enables the selected protection (forms/track changes/readonly). Even if it isn't enabled, grabbagging keeps the "suggestion" for next time when the user wants to enable protection. "If the value of this element is off, 0, or false, all the WordprocessingML pertaining to document protection is still preserved in the document, but is not enforced." If the user requested some kind of protection in Writer, it should be able to override a grabbag "suggestion" and set a real protection value. Change-Id: I638c6420bfb9a1801187f3e16586d2e18dfacb84 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90322 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-03-25tdf#106843 docxexport: don't write double docProtectJustin Luth
regression from LO 6.4 commit 2756ed9317e3474003c11ffe7d1e2f087c1412bf Change-Id: Iaf32974c7282d11bcd9572ed75cf1233ad3f0008 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90321 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-03-19sw pad-to-3 numbering: add DOCX filterMiklos Vajna
There is no NS_ooxml::LN_Value_ST_NumberFormat_foo code for this on the import side, rather the number format code is set to NS_ooxml::LN_Value_ST_NumberFormat_custom, then a separate NS_ooxml::LN_CT_NumFmt_format contains the number format string. Declare w14 as an XML namespace on the export side, even if we write no <w14:something> elements. This is needed by <mc:Choice Requires="w14">, which refers to an XML namespace in the OOXML markup. (Interestingly officeotron doesn't check for this, though.) Change-Id: If5fbcea4f163bd4d1a1ed820e15ceb61dc9c0519 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90761 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-03-18Fix typoAndrea Gelmini
Change-Id: Id7787ef9c0d37716572f79906c129ce1b037b5df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90703 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-03-18tdf#131304 .docx: flag new files as MS Word 2019 native modeJustin Luth
compatibilityMode = 15: [Word 2013/2016/2019] Up till now, documents that were exported into the docx format were treated by default as native Word 2007 format, since no compatibilityMode setting was provided. (Don't worry, we still round-trip existing older values. This patch only affects non-docx >>= .docx export.) Ultimately, this change is for the benefit of MS Word. It has no practical effect for LO. NOTE: This patch depends on previous commit 53f099c842d39266a0b4786a1af3db5628746634 which sets an appropriate value for existing .docx files. This scary change shouldn't actually be all that scary, since we already round-trip native 2019 files, without any complaint from Word or our users. The biggest change is that Word 2010 users might not be able to open NEW files perfectly. But Microsoft has already been doing that to them since 2013. By the time LO 7.0 hits stable version, it will have been months since 2010 has reached end-of-life. The vast majority of documents will still open perfectly for them. Plus, if a Word 2010 user does modify our new document, we will drop back down to their level. A nice, clear explanation of what compatibilityMode does is at howtogeek.com/256269/what-is-compatibility-mode-in-microsoft-office/ The MAIN CHANGE is that MS WORD has been DE-ACTIVATING features when it notices that it is SHARING the document with OLD_VERSION users. So Word is limiting what it will do for the BENEFIT OF THE OTHER USER while collaborating. There are a few instances where layout is affected by compatiblityMode. For example, tdf#123116 wants compat=15 so that Word will nicely layout an oversized table-row. tdf#131121 wants it too. By changing to compat=15, we can help Word take advantage of some fixes since docx 1.0, and avoid having to write new logic to export to old formats as well as new. Unfortunately, documentation on what layout changes are expected has not been identified yet. But in 7 years we should have run into most of them already... well maybe no. Change-Id: I1ce016618a680b9842fa6828c9e87cc6b677a557 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90455 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-02-25sw: DOCX export: limit FORMDROPDOWN listEntry to Word's abilitiesMichael Stahl
In theory wml.xsd says: <xsd:element name="listEntry" type="CT_String" minOccurs="0" maxOccurs="unbounded"/> In practice Word 2013 refuses to load a file with 26 listEntry in one FORMDROPDOWN field. Interestingly w:result w:val larger than the number of entries does not cause Word to complain. Go figure. Change-Id: I3a61533f9ee4ba3917a9c3bc55a483fd587f0471 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89358 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
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-01-30DOCX export: write document variablesMiklos Vajna
This means that in case a user field is exported to DOCX and the user updates the field, the result will be still correct, not empty. Change-Id: I2b52292c70aa6f597f92af95e16c773839247efa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87748 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-12-20tdf#42949 Fix IWYU warnings in sw/source/filter/*/*cxxGabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I87263017cb0802c9f5ca21d630bf3701b9c5e73a Reviewed-on: https://gerrit.libreoffice.org/85167 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-12-11convert SectionType to scoped enumNoel Grandin
Change-Id: Ib05b88b05c90b835107128f42c70170660788d00 Reviewed-on: https://gerrit.libreoffice.org/84851 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-06tdf#121658 Add option to not hyphenate words in CAPSSamuel Mehrbrodt
* Add checkbox to pagraph dialog * Store property in paragraph model * Move docx import/export from grabbag to paragraph model * Add ODF import/export * Add ODF unit test * Add layout test Change-Id: Id4e7c5a0ad145c042f862995d227c31ae2aa0abd Reviewed-on: https://gerrit.libreoffice.org/83979 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2019-12-03Use o3tl::doAccess, prevent -Werror=maybe-uninitializedStephan Bergmann
Change-Id: I6a86db428dcf92083ee13298417b3d3027e45822 Reviewed-on: https://gerrit.libreoffice.org/84338 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-21tdf#121658 Roundtrip w:doNotHyphenateCaps via InteropGrabBagSamuel Mehrbrodt
Change-Id: I8a7efffb2866e46e978d09ca9fb5c9dec231e132 Reviewed-on: https://gerrit.libreoffice.org/83384 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-11-19tdf#128889: don't write "page break after" into w:pPrMike Kaganski
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-06tdf#121661 Roundtrip w:hyphenationZone via InteropGrabBagSamuel Mehrbrodt
Change-Id: I097afb54ff31bd1c878231b51eac5af9f27d35e9 Reviewed-on: https://gerrit.libreoffice.org/81880 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-10-23sw: WW8/RTF/DOCX export: only export actual bookmarks as bookmarksMichael Stahl
Don't export all the other cruft that happens to be represented as some IMark derived type in Writer in MSWordExportBase::GetBookmarks(). Change-Id: I4fc05e84b9fc80bb2186899c58bf140dd3779f83 Reviewed-on: https://gerrit.libreoffice.org/80915 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2019-10-16tdf#106843 DOCX: export/import change tracking protectionLászló Németh
Now change tracking protection from Writer or from ODT files is exported to DOCX. In Writer it's always possible to disable change tracking protection without password in File->Properties->Security page-> Record Changes after confirmation. Now Writer uses the same confirmation to remove change tracking protection imported from DOCX, for example clicking on Record Track Changes. Disabled protection removes the export of the grab-bagged change tracking protection, too, to avoid of creating bad DOCX with enabled change tracking protection and disabled Record change tracking. See also commit d416250f4f1766e2d596ea3feef6a94b7adf29f4 "tdf#106843 DOCX: forbid disabling protected Record Changes" Change-Id: Ida4d72c57dbe5450ea22028bbed69d413f5a786d Reviewed-on: https://gerrit.libreoffice.org/80784 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-10-15new loplugin:bufferaddNoel Grandin
look for OUStringBuffer append sequences that can be turned into creating an OUString with + operations Change-Id: Ica840dc096000307b4a105fb4d9ec7588a15ade6 Reviewed-on: https://gerrit.libreoffice.org/80809 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-16use more TOOLS_WARN_EXCEPTIONNoel Grandin
Change-Id: Ic21ea11ff106e0732bb8fa600ef39a549d7bda86 Reviewed-on: https://gerrit.libreoffice.org/77569 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-15loplugin:sequenceloop in swNoel Grandin
Change-Id: Icda7c89b396e5607ca847c0a8393cb27a2d50c6c Reviewed-on: https://gerrit.libreoffice.org/77530 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-10sw: fix ~SwIndexReg asserts on ODF export of ooo83072-1.odtMichael Stahl
It is now possible that the stupid redline-moving code deletes the first node in the document, and there are 2 SwPaM that point to it, Writer::m_pCurrentPam and local pPam in SwWriter::Write(). So i thought it should be quite trivial to just use SwUnoCursors in these cases, but it required a bit more keyboard bashing than expected. (regression from beec1594587d0bf1ea2268f9a435c948b5580278, which i didn't really intend to push and am not sure if it's really a good idea but whatever...) Change-Id: Ia5c18d67af8760664517a4b7ee62ef3e4a417686 Reviewed-on: https://gerrit.libreoffice.org/77225 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-07-20loplugin:referencecasting in swNoel Grandin
Change-Id: Ib5de4377b22815ba718559ff6fcfd6ab5a0547a6 Reviewed-on: https://gerrit.libreoffice.org/75999 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-12MSForms: Rework text-based date form field's representationTamás Zolnai
* Better to represent it similar to text form field with two marking characters selecting a text range * So the text between the two marks can be anything (not only a well formatted date) and also have any character formatting. * With this we handle the case when the user needs a placeholder text in the date field or when the user needs time values (hour, minute, sec) next to the date. Change-Id: Id60a50a2028058f8a6a080e265c0730d88b98543 Reviewed-on: https://gerrit.libreoffice.org/75459 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2019-07-05Simplify Sequence iterations in sw/source/filter/*Arkadiy Illarionov
Use range-based loops, STL and comphelper functions Change-Id: I8ec58bdd38061936f621cdfdbfde59a38ac86705 Reviewed-on: https://gerrit.libreoffice.org/75103 Tested-by: Jenkins Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
2019-07-02sw comments on frames: fix DOCX handlingMiklos Vajna
We used to ignore annotation marks which just cover the comment anchor since commit fff019debf14a0bf8cd358591a686191347f1542 (MSWordExportBase: ignore empty annotation marks, 2014-09-17), but this means comments on images are lost. Pass around SwWW8AttrIter, so we can decide if we have a relevant at-char anchored frame in MSWordExportBase::GetAnnotationMarks(), without iterating over all frames in the document, which would be slow for large documents. Regarding the import side, the only problem was that the empty comment range resulted in a loss of annotation marks; fix that by using a marker while inserting. Change-Id: I385677d74423bc05824dac4a12d1a991bb3983c4 Reviewed-on: https://gerrit.libreoffice.org/74996 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-06-20tdf#42949 Fix IWYU warnings in sw/source/filter/*/*hxxGabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I7ccd6af737c21a50fe7df25266198ee6989c4c69 Reviewed-on: https://gerrit.libreoffice.org/74110 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-06-18loplugin:logexceptionnicely in swNoel Grandin
Change-Id: I92c84f5c869e5ccab344f7e3591d68a90a20eefa Reviewed-on: https://gerrit.libreoffice.org/74243 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-12tdf#89991 DOCX: import/export Show changes modeLászló Németh
handled by the optional w:revisionView OOXML setting. Using disabled Show Changes mode, exported DOCX contains <w:revisionView w:insDel="0" w:formatting="0"/> as the documents exported from MSO with disabled Show Changes and disabled Options -> Trust Center -> Trust Center Settings -> Privacy Options -> Make hidden markup visible when opening or saving (Note: this last setting needs also for opening the documents really with disabled Show Changes in MSO). Change-Id: I9f2c7df572f33838ae63185de21431102a7e139e Reviewed-on: https://gerrit.libreoffice.org/73885 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-05-27tdf#125103 Writer: input fields will be exported to docxIlhan Yesil
Changed the solution https://gerrit.libreoffice.org/#/c/70786/ of Vasily sligthly, so MS Office can recognize fields still as fields. Change-Id: Id45330a96dfe002685c6ef3dc62e408c5f9f46c4 Reviewed-on: https://gerrit.libreoffice.org/72868 Tested-by: Jenkins Reviewed-by: Vasily Melenchuk <vasily.melenchuk@cib.de>
2019-05-04Use hasElements to check Sequence emptiness in swArkadiy Illarionov
Similar to clang-tidy readability-container-size-empty Change-Id: If44f20a7aa678915e32d12101e1af71476f4b590 Reviewed-on: https://gerrit.libreoffice.org/71679 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-27docx export: implement text-input field exportVasily Melenchuk
It is expected that <text:text-input> will be converted to {FORMTEXT} MS field, but practical implementation was missing. Change-Id: Ifd17a523e253555a240f853bea5f21572d90d853 Reviewed-on: https://gerrit.libreoffice.org/70786 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2019-04-26tdf#67207 DOCX mail merge: fix export/import of database fieldsLászló Németh
to support the registered databases (containing ODS, XLSX sheet or ODT text table data sources). Now database fields don't lose their database connection, and File->Print can merge mails after DOCX export/import, if the LO instance has got a registered database with the same name and table, as in saved in w:settings/w:mailMerge/w:query element of the DOCX document in the form of SELECT * FROM [databaseName].dbo.[tableName]$ query. Notes: – This fix supports only single table usage. – The exported DOCX document is editable in MSO, too, without losing the database connection in LO later. Change-Id: I97826b7ee7defd0243dbaffa0325c5b11dd2c0d1 Reviewed-on: https://gerrit.libreoffice.org/71228 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2019-04-25WIP: Further preparations for deeper Item changesArmin Le Grand
(1) Migrated all still existing binary load/save stuff in SfxPoolItem to legacy files. Isolated from Item implementations. Adapted all usages. No more methods Create/Store needed, also GetVersion removed (2) Removed operator= for SfxPoolItem. Adapted all usages. Goal ist to handle Items more as Objects ('Object-Oriented') in the sense to move/handle instances, not to copy one instance over another one (which is more and more problematic with hard to copy content as UNO API stuff or similar). This lead to much more usages of std::shared_ptr which correlates well with future plans fr Items (see dev branch). Next logic step will be to also remove copy constructor Linux build and corrections done Fixed Writer test and removed unused defines Fixed another unused m,acro Started to unify the AutoFormat stuff Changes to OUString constructor usages, tests completely No idea why, but SfxStringItem constructor which takes a OUString& now insists of not getting ::OUString's handed in - changed all 'SfxStringItem.*OUString.*".*"' accordingly Change-Id: Ibed7358b18fb019994a7490332b9d797a6694c29 Reviewed-on: https://gerrit.libreoffice.org/71075 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2019-04-19Further cleanup of FastSerializerHelper's startElement/singleElement[NS]Mike Kaganski
Drop FSEND_t: C-style varargs code was replaced since version 6.0 in commit d43fc40718217d89cc95cc3c0bc0b8e7926abcc0, so it's time to remove the last bits. Drop int-to-string macros that are simple wrappers over OString::number. Avoid unnecessary string type conversions. Change-Id: I86478577b8e469f99b5a90619e5f78a61f4f23fb Reviewed-on: https://gerrit.libreoffice.org/70964 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
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-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>