summaryrefslogtreecommitdiff
path: root/sw/source/filter
AgeCommit message (Collapse)Author
2020-11-11make tools::Long 64-bit on Windows platformNoel Grandin
This is only for the 64-bit windows platform. I don't see the point in messing with the 32-bit platforms, they are (a) become more and more rare (b) unlikely to even have enough available process memory to load extremely large calc spreadsheets The primary problem we are addressing here is bringing Windows-64bit up to same capability as Linux-64bit when it comes to handling very large spreadsheets, which is caused by things like tools::Rectangle using "long", which means that all the work done to make Libreoffice on 64-bit Linux capable of loading large spreadsheets is useless on Windows, where long is 32-bit. The operator<< for tools::Rectangle needs to be inside the tools namespace because of an interaction with the cppunit printing template stuff that I don't understand. SalPoint changed to use sal_Int32, since it needs to be the same definition as the Windows POINT structure. Change-Id: Iab6f1af88847b6c8d46995e8ceda3f82b6722ff7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104913 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-07std::set->o3tl::sorted_vector in SwSoftPageBreakListNoel
Change-Id: I929b2eb5824580d106b2505ea6b2d0a59248a6f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104856 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-06make SdrObject Identifiers SdrObjKind enum membersCaolán McNamara
with unique values so that, e.g. if (pObj->GetObjIdentifier() == OBJ_LINE) is only true if pObj is a SdrPathObj and not a E3dScene Change-Id: I30c91e57eb27141390c644dec42e2a4bee96edf0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105374 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-06tdf#136952 ww8export: always check for breakAfter on last splitJustin Luth
This patch primarily adds support for covering the situation where a rare page-after break exists on a split paragraph node. This patch also adds one more aspect to the fixes for tdf#132149, where a breakBefore wasn't evaluated with the correct CurrentPageDesc. Change-Id: Ia548c611c1b7b6c66cb7a7c58be1705cd8c42b77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103275 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-11-05StartElement->startFastElement in swNoel
Change-Id: I6a916011fa7c89c1187fa593b7bfe0081b2a6690 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105342 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-05retire most of SwModifyBjoern Michaelsen
only remaining uses are: - in calbck.{c,h}xx - in uwriter unittests - as a parameter of SwClientNotify all other uses have been replaced with sw::BroadcastingModify, which contains sw::BroadcastingMixin functionality. Existing code should then be moved to sw::BroadcastingMixin (only) as soon as possible. Change-Id: Ief7895597633c2fcb97e1cbc182905d75feb1567 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105320 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-11-05loplugin:unusedenumconstantsNoel
Change-Id: I9a2eb83647d6620b3c5b5ed5642227be47a657f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105303 Tested-by: Jenkins Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-03ofz#26943 detect if FormatOfJustInsertedApo was deletedCaolán McNamara
move FrameDeleteWatch for reuse in the doc filter Change-Id: I6e53549a837968cb738b5188e8670dd3e38a9c0e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105264 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-02move SwCondCollCondChg on top of SfxHintBjoern Michaelsen
... and get rid of ModifyNotifications along the way. Change-Id: I10fc9d24743d50cef771ff63dae004d31dce1846 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105195 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-11-02create common macro and method for logging unknown attributesNoel
instead of repeating the code everywhere Change-Id: Idb94054b392ed256e64259cdb17d1522bf3c52b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105184 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-02drop the SvXMLExport::EndElement method..Noel
in favour of just using the endFastElement() method Change-Id: Id95abb0b9e78bc44278c5e9e3cc8dee15185e2e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105175 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-02make SvXMLImport capable of mixing fast- and slow- contexts adhocNoel
so I can convert even *ImportContext subclasses in the middle of a context stack, and thus break the cyclic dependency nature of the writer import. and adjust the xmlimport loplugin for the new rules. As a consequence of the loplugin:xmlimport's checking, we remove a bunch of now unnecessary overrides of startFastElement. Change-Id: I97464522ede8ec5e345e928cdafa4b18364b1b80 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104730 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-01tdf#136814 Fix border padding in Word exportSven Lüppken
While converting twips to points in the Word export filer, information is lost due to integer division. This patch tries to fix this by using floating-point division and (hopefully) proper rounding. The example document attached to the bug ticket works as expected now. Change-Id: I4b5b2163e42932b5e877726d16635d9f02a43cb2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105128 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-10-31rename to NotifyContainsEmbeddedFontCaolán McNamara
to indicate better what its users do with this notification. This reflects better the reality that while the embedded font has been read at this point, vcl hasn't been informed of its existence yet. Change-Id: I87f4d0a0361192dac972f6146d3721a69e11ac27 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105086 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-30ofz#26753 avoid infinite regressCaolán McNamara
Change-Id: I3f5f14aa63c234ffdf1acd8bb730ce0ff08c7a81 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105043 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-30convert some tools::Long->sal_Int32Noel
in places where it is obvious we only need a sal_Int32, because we are dealing with rows and columns, and not even calc needs more than 32 bits for that. Change-Id: I114417e639c224d45bfd9fc6838122ab195eefa3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104584 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-28tdf#132149 ww8export: respect ginormous paragraphsJustin Luth
This handles the extremely unlikely case where a single paragraph contains multiple soft-page-breaks from spanning more than two pages. But it makes the unit tests I designed look much better, so I am happy. I think it might help to make the code slightly more understandable too, and it convinces me that I am understanding this section as I write multiple fixes against it. [Better evidence than all of this is that Michael Stahl came the the same conclusion from a code read - I just beat him to it.] (P.S. It isn't enough to change CurrentPageDesc, because that is reset from rNode.FindPageDesc on every WriteText. So the effective pageDesc needs to be kept track of.) Change-Id: I5852e90571a74f3df4362caf058f7960f413dad3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101545 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-10-28Extend loplugin:elidestringvar to OStringStephan Bergmann
(In VisitVarDecl, filtering out AbstractConditionalOperator avoids an unhelpful > ~/lo/core/vcl/source/pdf/XmpMetadata.cxx:63:32: error: replace single use of literal 'rtl::OString' variable with a literal [loplugin:elidestringvar] > aXmlWriter.content(sPdfConformance); > ^~~~~~~~~~~~~~~ > ~/lo/core/vcl/source/pdf/XmpMetadata.cxx:52:21: note: literal 'rtl::OString' variable defined here [loplugin:elidestringvar] > OString sPdfConformance = (mnPDF_A == 1) ? "A" : "B"; > ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ) Change-Id: I7d0410f04827d79b4b526752917c37d33cad2671 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104911 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-10-28convert some more long -> tools::LongNoel
grepping for stuff in template params this time Change-Id: Ia37bfd85480b3a72c3c465489581d56ad8dde851 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104855 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-27tdf#137641 DOCX export: fix relative from top page borderSzabolcs Toth
alignment. Follow-up of commit 1c593e1916c9164c7db71da2017cfc26972f8e9f (tdf#133045 sw: add shape alignment to the top page border). Change-Id: Ie5bc536556b72030d17829a917f91a15ad5157a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104660 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-10-27ofz#26619 detect if SwFrameFormat deleted during importCaolán McNamara
Change-Id: I5dc778e44dcb670353e83037a5a5d469fa437186 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104853 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-21new tools::Degree10 strong typedefNoel Grandin
partly to flush some use of "long" out the codebase, but also to make it obvious which units are being used for angle values. Change-Id: I1dc22494ca42c4677a63f685d5903f2b89886dc2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104548 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-20sw: DOCX export: don't export numPr to style from outline numruleMichael Stahl
8e9e705de29a1a3d9b964c9350aa2a3a17cce6f9 disabled this for paragraphs but it appears to be unnecessary for styles as well, since w:outlineLvl will be produced, and Word displays bullets active in the UI if numPr exists. Change-Id: I60f7cf6359b27a4d69450752fbc4de6595d98761 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104539 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-10-20use tools::Long in swNoel
Change-Id: I44be72b3a9b14823ec37a3c799cffb4fb4d6e1de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104527 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-20sw reqif-xhtml export, embedded objects: handle non-package Ole10Native streamMiklos Vajna
Commit 1392fd6a7eaf9f507639096984c2a0108f254795 (sw reqif-xhtml export, embedded objects: handle Ole10Native stream, 2020-04-30) added support for handling an OLE1 stream which contains something other than OLE2 data. However, that assumed a fixed class name ("Package") and a matching class id. Fix this, similar to how the import side was fixed with commit 247b247dadc8f0133a8eb94f1423a29315cf998a (sw reqif-xhtml import, embedded objects: handle non-package Ole10Native stream, 2020-10-16). Change-Id: If2ec9434c802e23e395cf2a6eaf63ad5b1db9c1c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104531 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-10-19tdf#136983 partial revert NFC ww8 cleanup: remove unused variablesJustin Luth
This is a partial revert of LO 6.2 commit 2ec0cf500222aef55d02df80154b47fbb92970c9 I can't think of any excuse for how I possibly missed that xDocProps was being defined/used outside of this clause. Just plain stupid and blind. The good news is that the create and modified date still seem to be getting saved somehow/somewhere. So it isn't the disaster that it looks like it could have been. Change-Id: I72ef56fa50b9e92e4ce687b132b1919cfae6c1f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103565 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2020-10-19ofz#26480 validate WW8PLCFpcd is sorted like WW8PLCF doesCaolán McNamara
Change-Id: I11393c730986585aeea229ebeec6417e4a0578d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104510 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-16sw: use the fastparser API when possibleNoel
part of the process of making SvXMLImport fastparser-only Change-Id: I240c92f8c1b06e1e17a836982d918e39719d2569 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104428 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-16fix some *printf which are using "%l" ie. long specifiersNoel
which are not portable between Linux and Windows because long is not portable. In preparation for converting long -> tools::Long Change-Id: I8bf1aa1570946ca887a6c83dd5f99c024d437336 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104374 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-13static_cast after dynamic_castNoel
Change-Id: I487b5dc148f5a3d0d45f198c00179002841242ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104213 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-12ofz#23602 Timeout processing huge SEPX full of non-SEP propertiesCaolán McNamara
Change-Id: If95bf624e4bd18368f41b350fc3675e2675576c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104190 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-12IsSizeLegalCheckSize is a silly nameCaolán McNamara
Change-Id: If39302042d3e53798aaa8564fddc8ddd6e539712 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104179 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-12ofz#23523 Timeout processing huge SEPX full of non-SEP propertiesCaolán McNamara
ignore properties in SEPX which aren't section properties Change-Id: I191acbd8d602d0c59ce541cecb847d7d57c1bc3a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104178 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-11split out check to functionCaolán McNamara
Change-Id: Ie4b2fc5c871e57d782f801b1ae6a72b9f0ac2dd3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104177 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-10we throw away the original of the cloneCaolán McNamara
so we can take ownership of the original instead Change-Id: I2399aa77b22e606008a5aed2bc73361e13b68455 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104174 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-10tdf#132289 missing styles when inserting file with listSerge Krot
Change-Id: I444997a6cc55cfe287f4c610f538f2f54803646c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104085 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-10-07tdf#137295 missing frames on roundtrip through docxCaolán McNamara
because they had the same name because GetUniqueDrawObjectName returned the same name twice because the drawing objects were replaced by flys so there was no actual drawing objects inserted Change-Id: Icbe1848b7115c441f8205b8f566ec5ae4b0c55a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104063 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-07dynamic_cast followed by static_castCaolán McNamara
Change-Id: I0e5b7a2531f10d7a9cafa45f33f128f82603f30f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104062 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-07RTF import: copy direct para formatting for first para in insert modeMiklos Vajna
This is really similar to commit ae9fe9d7107b2e25c9316033651e49c08537c0e9 (ODT import: copy direct para formatting for first para in insert mode, 2020-10-02), except that was for the ODT import. Change-Id: I5f4e82162f1c18335f472c004c742e0e0f0664f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104060 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-10-06loplugin:const* make some params and methods constNoel
Change-Id: I3c8ca72b2b41a4f82ee20cbe025b41425f32e715 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104028 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-05sw: ODF import: convert the simplest sub-tables to rowspan tablesMichael Stahl
Before OOo 2.3, CWS swnewtable, Writer represented complex table structures as sub-tables, i.e. <table:table table:is-sub-table="true">. Try to convert these to the modern rowspan tables, which export to non-ODF formats much easier. There are some cases where the result is going to look different, or where further work is required to adapt other things in the document; leave these alone for now. Change-Id: I6a6c497089ef886826484d2d723bf57c72f95b14 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103773 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-10-04DocxTableStyleExport never passed a null SwDoc*Caolán McNamara
ditto: SwASCIIParser ctor SwNumRule::CopyNumRule SwDataChanged ctor Change-Id: I0f731ef2856eb70bd5fff5372ee7bc769e1f8bd3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103922 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-04combine these identical blocks together into a functionCaolán McNamara
Change-Id: I783c7f649d0624de9fb46c2b8379fc47ec311f63 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103917 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-04related: tdf#127579: make use of FindCharFormatByName more robustXisco Fauli
the same way it's done in WW8AttributeOutput::TextINetFormat This might fix crashes like https://crashreport.libreoffice.org/stats/crash_details/3538a470-23d7-4e37-9504-fe6e81da301b unfortunatelly, I have no steps to reproduce it at the moment Change-Id: I509ee439643dfbaf6f08477142bbbd171e13eed8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103859 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-04MakeCopy family never called with a null SwDoc* argCaolán McNamara
Change-Id: I4ba4569a529425a5e92fb3f82990e34ae4db3228 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103877 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-04change these sal_uLong to sal_SizeCaolán McNamara
Change-Id: I5823283702b38d4b928cf0bee8645eafd10fe58f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103873 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-02ODT import: copy direct para formatting for first para in insert modeMiklos Vajna
It was inconsistent that we copied the paragraph style, but not the direct paragraph formatting from the to-be-deleted first inserted node to the last-before-insertion node. Change-Id: Ie5161c6314d7c1a71599bfe4eeafd3398450bd77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103864 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-10-02crashtesting: an odd number of bytes for RTL_TEXTENCODING_UCS2 encodingCaolán McNamara
seen with id:000316,src:000190+000204,op:splice,rep:32.doc Change-Id: Ia4eb13ed617828f0d35bed26651a7b9e9a4b6056 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103860 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
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-10-02SwWW8FltAnchorStack ctor never given a null SwDoc*Caolán McNamara
and similar Change-Id: I046be0e41b79f2fd51ebec0da20fccb17d947732 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103823 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>