summaryrefslogtreecommitdiff
path: root/writerfilter/source/dmapper/DomainMapper_Impl.cxx
AgeCommit message (Collapse)AuthorFilesLines
2014-04-11check that stacks are not empty before top()Caolán McNamara1-1/+6
Change-Id: Iad5b3381b8201c5ac32a5bdf99bd3d5872ea3afc (cherry picked from commit a1ea3838adee634ccf725bc5f2be7805c6294a16) Reviewed-on: https://gerrit.libreoffice.org/8933 Tested-by: Michael Stahl <mstahl@redhat.com> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2014-03-04fdo#65655 : fix for Different_Odd_And_Even_Pages flag ignoredAdam Co1-2/+8
Signed-off-by: Miklos Vajna <vmiklos@suse.cz> Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx (cherry picked from commit db23f89b76cb61b215bcae5495eadba2b5ceace2) Signed-off-by: Michael Stahl <mstahl@redhat.com> Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx Change-Id: Icf9949bb00aa905d22aedfd8f2b297dfa89dfedb
2013-12-03Related bnc#837302: Don't introduce a redlined delete and the end of doc.Jan Holesovsky1-0/+14
Conflicts: writerfilter/source/dmapper/DomainMapper_Impl.cxx Change-Id: I5c3903a40b69867684707d33acbc92b1f80a93ec Reviewed-on: https://gerrit.libreoffice.org/6898 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2013-11-24cp#1000016 DOCX/RTF import: fix RemoveLastParagraph() on WindowsMiklos Vajna1-0/+4
(cherry picked from commit a56bfe734a7bed40a175e0eeb7e86e7006a83f83) Signed-off-by: Andras Timar <andras.timar@collabora.com> Conflicts: sw/qa/extras/rtfimport/rtfimport.cxx writerfilter/source/dmapper/DomainMapper_Impl.cxx Change-Id: I3f9d69ddbb2144c60a724e4242128b65ae167455 Signed-off-by: Andras Timar <andras.timar@collabora.com>
2013-10-17fdo#69548 do not remove last space from hyperlink targetAndras Timar1-7/+3
Change-Id: Ia56a4012590cc56b3beaa887cbbb91318a0977b1 Reviewed-on: https://gerrit.libreoffice.org/6263 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-09-06bnc#816593 DOCX import: ignore page breaks in tablesMiklos Vajna1-1/+7
(cherry picked from commit 7d3778e0ef9f54f3c8988f1b84d58e7002d6c625) Conflicts: writerfilter/source/dmapper/DomainMapper.cxx Change-Id: Ibb250148d41d1929fa17dd993bb71c93c0e09dcf Reviewed-on: https://gerrit.libreoffice.org/5787 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-08-26bnc#834035 DOCX export: fix hyperlinks of illustration indexMiklos Vajna1-24/+4
We used to export raw Writer bookmarks, but that's not valid in OOXML. Instead, it has normal bookmarks around the sequence fields, so use them if they are available. Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx sw/source/filter/ww8/docxattributeoutput.cxx (cherry picked from commits 750f0ebf97d19d1cf305dabe72d52ad6e90adf70, e9275c08acc2f4f1c925f78b56a1089515cd9a37 and 8f146a8042dd8f3c88f39f8317372cd9c02ce4ad) Change-Id: I0ef2ff7967c2802b53752c9505ef6db4cc2b8265 Reviewed-on: https://gerrit.libreoffice.org/5635 Reviewed-by: Jan Holesovsky <kendy@suse.cz> Tested-by: Jan Holesovsky <kendy@suse.cz>
2013-08-12fdo#63428 writerfilter: fix paste of commented text rangesMiklos Vajna1-4/+9
There were multiple problems here: - xFoo->createTextCursorByRange() got a text range argument, where the text range wasn't from the xFoo text - it was assumed that all XText implements text::XParagraphCursor as well, but this is not true for e.g. comment text - commented text ranges were pasted as normal comments (once again, the insert position wasn't passed around) (cherry picked from commit c73b8072a1732f829d3d6ba6c1172d96d55b1c4f) Change-Id: I9a975a08b08a7f32b1ee71e42f58736cc0dbb09d Reviewed-on: https://gerrit.libreoffice.org/5368 Reviewed-by: Tor Lillqvist <tml@iki.fi> Tested-by: Tor Lillqvist <tml@iki.fi>
2013-07-22n#825976: handle TOC \h field for illustrations tables in writerfilterCédric Bosdonnat1-39/+63
Change-Id: I9ebc91d5f0e706dc1e316e0aa8494af7aec4da4e (cherry picked from commit 43f7bc96c0117a77610bfa5e1edfa870123f56f1) (cherry picked from commit f494d9dfd1c0c40eae7aa69a86c3aa4c45971a29) Reviewed-on: https://gerrit.libreoffice.org/5027 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-07-22fdo#65632 RTF import: send NS_ooxml::LN_trackchange only once for one rangeMiklos Vajna1-8/+20
The problem was that in case we had {\deleted foo\b bar} then both "foo" and "bar" triggered a trackchange, but "}" only ended one, resulting in overlapping redline ranges. This was cought by core, but caused a performance problem. For the first bugdoc, before: real 3m57.803s after: real 0m3.072s (cherry picked from commits 7c0a1557406ffffbb8145f8035ce86d31e927667, ed187fcbd457d01be6ac382d61b493039a5af7d5 and 54518a209d0ffe00f8e391472da92e398c474392 and 9f7676033585ab3bf352d5dc2ef43a3a9d8d5c46) Conflicts: writerfilter/source/rtftok/rtfdocumentimpl.cxx writerfilter/source/rtftok/rtfdocumentimpl.hxx Change-Id: Ibf6f2db30109f0b9a2571d2e4fb3cc76294f68d1 Reviewed-on: https://gerrit.libreoffice.org/4964 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-07-10writerfilter: not every field has a Content propertyMichael Stahl1-3/+6
... so don't try to get it unconditionally (but SetExpression does have it). (regression from c7e4264bed4e77daccf2f72063e5e00f1008c3cf) Change-Id: I14d24bd70f569ba0bc4f1e48d56ebf43c1441783 (cherry picked from commit 1c90902cbccd4e4f5946dfc454da351c33c24f71) Reviewed-on: https://gerrit.libreoffice.org/4807 Reviewed-by: Bosdonnat Cedric <cedric.bosdonnat@free.fr> Tested-by: Bosdonnat Cedric <cedric.bosdonnat@free.fr>
2013-07-08n#825976: Fixed the import of Table of FiguresCédric Bosdonnat1-2/+17
Support the TOC \c switch and fixed the SetExpression current presentation property to have updated fields and TOC. (cherry picked from commit 22a22a0983ec9c95e5b471395fc1c5bb813bd0d2) Conflicts: writerfilter/source/dmapper/DomainMapper_Impl.cxx writerfilter/source/dmapper/PropertyIds.cxx Change-Id: I6fbd7cc38cf8ea7f08a0d15d1f39ffe4805dd62b Reviewed-on: https://gerrit.libreoffice.org/4724 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-07-08n#825976: Added common flags support for SEQ field importCédric Bosdonnat1-3/+26
(cherry picked from commit 031ced0d1ade5350ef0b17a245a2cb5c76e6173d) Conflicts: writerfilter/source/dmapper/DomainMapper_Impl.cxx Change-Id: I9a4505cf060880811abfe355b2ebf810cde9a4d6 Reviewed-on: https://gerrit.libreoffice.org/4723 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-07-04bnc#820504 VML import: don't anchor shapes TO_PAGEMiklos Vajna1-1/+1
In theory, this is a problem because Word formats only support AT_CHAR and AS_CHAR, so importing something as AT_PAGE is buggy. In practice, this also leads to unvisible shapes, since f0d001a378c64ea457e722266e60c96522c72e9b. Change-Id: Ie730d67a789ef12734cede1f9b6c27764a66f237 (cherry picked from commit f5b7acac624f07fa95835b6054b8d295901bb1dd) Reviewed-on: https://gerrit.libreoffice.org/4716 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-06-06Related: #i119607#, text font spacing in comments doesn't expand/condense...Jian Fang Zhang1-0/+4
by the expected value Found by: xiao ting xiao, tingxiaox@gmail.com Patch by: bjcheny, companycy@gmail.com Review by: zhangjf (cherry picked from commit 11fda1bd134b07c5bcaca6186d63107ec9f47b98) Conflicts: writerfilter/source/dmapper/DomainMapper.cxx writerfilter/source/dmapper/DomainMapper_Impl.cxx writerfilter/source/dmapper/DomainMapper_Impl.hxx Change-Id: Iecdaee97e49395df59719d724e1544e1802d947d (cherry picked from commit 5f0c969f43538e8a92ed37c27fab228d97b1bebe)
2013-05-30bnc#817956 DOCX import: missing last character of shape textMiklos Vajna1-1/+4
Make sure writerfilter only removes the last character of the text if it's a newline. Change-Id: I96980e2d148ced93363b3147545afdd0dd070e5d (cherry picked from commit 4eaabc45f76aefe82558b283975ab9df3aea7fce)
2013-05-21bnc#818997 RTF import: don't ignore page breaks between shapesMiklos Vajna1-0/+15
Change-Id: Ief71ba9a3c60356714e73d08e88d0a3105b17b1a (cherry picked from commit b40fe8e5a5037d2745cc7b1c9cc408ce6c79b9d9)
2013-05-14fdo#64249: make sure we have matching start/end level for table in shapesCédric Bosdonnat1-7/+6
Change-Id: I4928f6a54e6cca9b26c0d2391fc1545688be2375
2013-05-02bnc#779630 initial DOCX import of w:sdt's w:dateMiklos Vajna1-58/+5
Also factor out the w:sdt-related methods to a helper class to avoid DomainMapper_Impl become a God object. Change-Id: Ic1a388940bce89688e8558818f92ce9ac997609c
2013-04-30bnc#779630 initial DOCX import of w:sdt's w:dropDownListMiklos Vajna1-0/+61
Change-Id: I57d4768a26476d1a0535087c60535393b7004b24
2013-04-16fdo#61193 fix crash on RTF paste of footnoteMiklos Vajna1-3/+7
Regression from 232ad2f2588beff50cb5c1f3b689c581ba317583. Change-Id: Ia0873851979df5bba0a4693f044aab2aeff2b8e4
2013-04-07mass removal of rtl:: prefixes for O(U)String*Luboš Luňák1-2/+2
Modules sal, salhelper, cppu, cppuhelper, codemaker (selectively) and odk have kept them, in order not to break external API (the automatic using declaration is LO-internal). Change-Id: I588fc9e0c45b914f824f91c0376980621d730f09
2013-04-05Resolves: #i119621# Outline level in sample file lostJürgen Schmidt1-5/+9
fix: - PropertyMap.hxx, add definition for outline level min value - DomainMapper.cxx, import outline level for paragraph property - DomainMapper_Impl.cxx, fix TOC import if no range is given Patch By: Yolanda Zhang Ying Reviewed By: jsc (cherry picked from commit 5b87b9b8bc679dfbb308646a6da7584d4b418337) Conflicts: writerfilter/source/dmapper/DomainMapper_Impl.cxx Change-Id: I2149a7338b128d0dd1c1317a259e537d2a1e1063
2013-04-04DOCX import of w:numPicBulletMiklos Vajna1-0/+16
Change-Id: Ifc827d5180ce1dc0e3db095c2b92023f4c2d72ec
2013-04-04Resolves: #i119544# sequence number is not displayed in docxJürgen Schmidt1-1/+27
fix: add code to handle the SEQ field command... Patch By: Jin Long Wu Found By: Don Jun Zung Reviewed By: jsc (cherry picked from commit 0d2415df82388eb1a9a00c2d5e6bd3d9193057db) Change-Id: Ia588857aa453ea05cde2e66f6efd403e8eb282f2
2013-03-19further OUString cleanupThomas Arnhold1-1/+1
Change-Id: I19954ee5976cb881a5fe73a889c8e04a19b14eb6
2013-03-18Wundef, fix various more or less broken debug codeLuboš Luňák1-10/+1
Change-Id: I347495f7960da099afdfbf3db608e0347b832f99
2013-03-08make use of startsWith()Thomas Arnhold1-2/+2
Change-Id: Ie70097de550ddd1cddc6714f8f86f9723cb36679 Reviewed-on: https://gerrit.libreoffice.org/2599 Tested-by: Fridrich Strba <fridrich@documentfoundation.org> Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-03-07DomainMapper_Impl::PushShapeContext: indentMiklos Vajna1-37/+37
Change-Id: Ib0e9dc50a124fcdc3c977a8d8e5c076872fc2e15
2013-03-07fdo#61343 fix DOCX import of OLE object after groupshapeMiklos Vajna1-1/+14
Change-Id: I88d5e49cc3fb915d25c1b2576cdda1fffc9e2f23
2013-03-04DOCX import: fix import of font size in table stylesMiklos Vajna1-1/+2
Change-Id: I2c7ea83fb910b57d78fda620bc42b90e55de3719
2013-02-20fdo#60789: writerfilter: do not insert a character at field startMichael Stahl1-6/+0
The character inserted in DomainMapper_Impl::PushFieldContext() causes problems in this bugdoc because there is a commentRangeStart immediately before a text field and the call to delete it via setString("") disposes the SwXTextRange that is stored in m_aAnnotationPosition.m_xStart, which results in an exception when trying to insert the comment. At least all the fields in the bugdoc import fine with this change. Change-Id: I6c08d72fafb0529e8612f1e35b2c8b871edb5a52
2013-02-20fdo#60789: writerfilter: continue the import if comment insertion failsMichael Stahl1-14/+31
Catch exceptions in DomainMapper_Impl::PopFieldContext(). Change-Id: Ia60857a5f773c9d89217991d481a5f20d0de3151
2013-02-18n#779642: ignore framePr inside table or the table import won't workCédric Bosdonnat1-1/+3
2013-01-28fdo#46808, Adapt document::*PropertyValues UNO service to new styleNoel Grandin1-2/+2
The services are: document::NamedPropertyValues document::IndexedPropertyValues The services already existed, they just did not have IDL files Change-Id: Ibafe9b5afb9b30785df4f66aa923f4b96ceabeed
2013-01-15fdo#59338 fix RTF paste into footnoteMiklos Vajna1-2/+5
Change-Id: I89501f267fd4256eb3b1316ef41a0f9b0786e0f0
2013-01-10fdo#58327: writerfilter: RemoveLastParagraph is tricky:Michael Stahl1-1/+7
What happens here is that the xCursor->goLeft( 1, true ) selects the entire inserted table, which is then deleted. That causes annoyances, such as an assertion from ~SwIndexReg because as collateral damage the SwTxtNode that SwReader::Read's pUndoPam points to is also deleted, as well as missing tables in the document. DomainMapper_Impl::RemoveLastParagraph() can avoid this by not using setString() but instead disposing the paragraph, like it already does in other cases. But don't do it for new (loaded) documents, because it may kill flys in that case, which i strangely couldn't reproduce when pasting as RTF. Change-Id: I87302b8916e39ca42bc4fedfee40ac38fadd0939
2013-01-04n#793262 fix DOCX import of last empty header/footer para char propsMiklos Vajna1-2/+15
At the end of the header/footer import, the last empty paragraph was removed. In case the last but one paragraph was empty, but had character properties (e.g. a custom font size), the removal changed these, and used the character properties of the last paragraph instead. Simply dispose the last paragraph, this way character properties are always kept.
2012-12-06-Werror,-Wunused-private-fieldStephan Bergmann1-1/+0
Change-Id: Ic4c805079529f13b6cabe78f0c7d33b76c0b7ce6
2012-11-29DomainMapper_Impl::finishParagraph: also handle insert of multi-para framesMiklos Vajna1-1/+3
Change-Id: Id2e761ab1c9fc9c5fd0837d1801af95674d0f99a
2012-11-29DomainMapper_Impl::finishParagraph: fix frame conversion vs insert posMiklos Vajna1-4/+5
Change-Id: I3aefc2185412b1dc370dd723cc57ed59e60a36be
2012-11-28API CHANGE: add a "position" parameter to XParagraph/TextPortionAppend methodsMiklos Vajna1-16/+51
So we can use the new RTF import for clipboard pastes in Writer without inserting text content to the end of the document only. Notes: - SwXText::insertTextPortion: the MovePara() call is removed, as all it did was trying to move the cursor beyond the end of the document. - SwRTFReader::Read: the double fake paragraph insertion / deletion is motivated by the ODT filter. - RtfFilter::filter: if TextInsertModeRange is not passed, then the behaviour is not changed. v2: - added missing @since tags - added insertTextContentWithProperties() method - removed unused appendParagraph() method Change-Id: I24cddb00a78e3b798e7d88764e59e6a77a6e98a4 Helped-by: Michael Stahl <mstahl@redhat.com>
2012-11-28writerfilter: remove copy&pasteMiklos Vajna1-2/+1
Change-Id: I7a5be1963e41dfba1394291becb53318cf4ae8f2
2012-10-29DOCX: w:doNotUseHTMLParagraphAutoSpacing should affect AddParaTableSpacingMiklos Vajna1-0/+1
commit 5d4bd2f97128adecc5b11699e98c934be3c3a462 unconditionally enabled AddParaTableSpacing doc setting, which broke the layout of some documents, e.g. n#778836. Fix this by doing what the WW8 importer does: enable the setting only in case the w:doNotUseHTMLParagraphAutoSpacing tag is present. Change-Id: I104259a1f37f28e3c4362eb638a134b593fcb851
2012-10-24fdo#46808, convert comphelper::ConfigurationHelper to XComponentContextNoel Grandin1-3/+3
Convert the helper methods to take an XComponentContext parameter, instead of XMultiServiceFactory. Change-Id: I9f0098af37b91f107d8799f14caa04756eac82b1
2012-10-18fix import of RTF default page left/right marginMiklos Vajna1-1/+3
This is one more fallout from fdo#42407, which is still incomplete. Change-Id: Ie47f06be598ce5236c45bd3750ea7a21fd98175c
2012-10-15fdo#46669 sw: RTF paste should not change page stylesMiklos Vajna1-2/+9
Change-Id: Ic163a639fae9de838258b3cca9567a29ab875a35
2012-10-13writerfilter: fix new clang warningsMiklos Vajna1-1/+1
Change-Id: I0f7cec0f300290fe3ea465f344cfda642824ed0b
2012-09-27writerfilter: unused includes in DomainMapper_ImplMiklos Vajna1-20/+0
Change-Id: I6df840e20da98918a8f1531e8d77a5b5c53101fb
2012-09-25n#780853 fix DOCX import of w:sdtContent in table cellMiklos Vajna1-1/+12
The problem was that the framePr token made the table import fail. Given that frames inside w:sdtContent are invisible anway, just ignore them. Change-Id: I88ab9d5dd6cf362c629de74bc079c3108725f0a1