summaryrefslogtreecommitdiff
path: root/writerfilter/source/dmapper/DomainMapper.cxx
AgeCommit message (Collapse)AuthorFilesLines
2013-06-12bnc#820819 docx import: don't apply complex font size to non-complex fontPierre-Eric Pelloux-Prayer1-2/+0
OOXML spec says: "[szCs] specifies the font size which shall be applied to all complex script characters in the contents of this run when displayed" Reviewed-on: https://gerrit.libreoffice.org/1454 Reviewed-by: Miklos Vajna <vmiklos@suse.cz> Tested-by: Miklos Vajna <vmiklos@suse.cz> (cherry picked from commit 73731b01cd65defdf9b42a9754bede3ba84221d7) Change-Id: I0faf599e38ef5a2e2005bb6f98874639be7d8287
2013-06-05bnc#820509 DOCX import: handle M.d.yyyy date format in w:sdtMiklos Vajna1-2/+3
Change-Id: Iae233c24a9580ffc8ea4680276161a543171f63c (cherry picked from commit 58197c3692df0d0fccb5bc7abddaf6d9667565f6)
2013-06-05bnc#820509 DOCX import: try harder to disable form design modeMiklos Vajna1-2/+3
Previously this only worked if we had indexes in the document as well, but actually these are independent. Change-Id: I28afa60d2606230c901948d4c1da8f5a7c50a9f7 (cherry picked from commit 3d6a7cf3eb7aa966601cbc019d1ad5fafdddd21f)
2013-05-30bnc#817956 DOCX import of page border shadowMiklos Vajna1-1/+1
See the comment in SectionPropertyMap::ApplyBorderToPageStyles() on what and how is mapped. The control flow is like this: BorderHandler::lcl_attribute() notices w:shadow, then PageBordersHandler::lcl_sprm() gets it, passes it to SectionPropertyMap::SetBorder(), finally SectionPropertyMap::ApplyBorderToPageStyles() uses the UNO API. (cherry picked from commit f0aa209390aea68f4c23cf16df9d1577aaea91b5) Change-Id: Ib0aef3245f58c62655769357f1f4dd07eef77f62
2013-05-30bnc#817956 DOCX import of document background colorMiklos Vajna1-0/+3
See wwSectionManager::SetSegmentToPageDesc(), this has to be applied to every page style. (cherry picked from commit 992da0d5cf04497bad55637f6a6ebfcdaec03e16) Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx Change-Id: Iea2707ae665a55eabda3ed7575cf3658f7af5237
2013-05-21bnc#818997 RTF import: don't ignore page breaks between shapesMiklos Vajna1-0/+13
(cherry picked from commit b40fe8e5a5037d2745cc7b1c9cc408ce6c79b9d9) Conflicts: sw/qa/extras/rtfimport/rtfimport.cxx writerfilter/source/dmapper/DomainMapper.cxx writerfilter/source/rtftok/rtfdocumentimpl.cxx Change-Id: Ief71ba9a3c60356714e73d08e88d0a3105b17b1a
2013-05-02bnc#779630 initial DOCX import of w:sdt's w:dateMiklos Vajna1-5/+36
Also factor out the w:sdt-related methods to a helper class to avoid DomainMapper_Impl become a God object. (cherry picked from commit 3ec2d26dc2017ac4a27483febfc63328632f352d) Conflicts: sw/CppunitTest_sw_ooxmlimport.mk sw/qa/extras/ooxmlimport/ooxmlimport.cxx writerfilter/source/dmapper/DomainMapper_Impl.cxx writerfilter/source/dmapper/DomainMapper_Impl.hxx Change-Id: Ic1a388940bce89688e8558818f92ce9ac997609c
2013-05-02bnc#779630 initial DOCX import of w:sdt's w:dropDownListMiklos Vajna1-0/+28
(cherry picked from commit 9cc1e7b165abe3f19c2919f8d9cf8efc3e8cf315) Conflicts: writerfilter/source/dmapper/DomainMapper_Impl.cxx writerfilter/source/dmapper/DomainMapper_Impl.hxx Change-Id: I57d4768a26476d1a0535087c60535393b7004b24
2013-03-04Merge tag 'libreoffice-3.6.5.2' into suse-3.6Petr Mladek1-2/+3
Tag libreoffice-3.6.5.2 Conflicts: editeng/source/editeng/impedit3.cxx instsetoo_native/util/openoffice.lst oovbaapi/UnoApi_oovbaapi.mk sc/source/filter/oox/workbookhelper.cxx sc/source/ui/app/scmod.cxx sc/source/ui/cctrl/checklistmenu.cxx solenv/inc/minor.mk writerfilter/source/dmapper/DomainMapper_Impl.cxx writerfilter/source/dmapper/DomainMapper_Impl.hxx writerfilter/source/dmapper/PropertyMap.cxx Change-Id: I7ea70b82b3b874cbe78354d5dd97307e63842e72
2013-02-18n#779642: ignore framePr inside table or the table import won't workCédric Bosdonnat1-2/+1
Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx
2012-11-05fdo#52208 DOCX import: don't always ignore cont sect break at the doc endMiklos Vajna1-2/+10
Regression from commit 1fdd61db155cf63d5dd55cc2bfb45af33796e131, continuous section break does make sense at the end of the doc, if the previous type was a non-continuous. (cherry picked from commit abd4ffadf30e02284290ea35e8f45d9ffd8eb5ee) Change-Id: I6d82c67e068d8dc3ce1edb1a5fe6ad293afd805d Reviewed-on: https://gerrit.libreoffice.org/877 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2012-11-05Merge remote-tracking branch 'origin/libreoffice-3-6-3' into suse-3.6Petr Mladek1-2/+1
Conflicts: desktop/source/app/sofficemain.cxx instsetoo_native/util/openoffice.lst solenv/inc/minor.mk Change-Id: I3e9510067c7173f6c71368e70ba6dfe168c5318e
2012-10-19fdo#46669 sw: RTF paste should not change page stylesMiklos Vajna1-2/+3
(cherry picked from commit 4f1ba0486241bd239e46b71405662db8e10d9b96) Conflicts: writerfilter/inc/dmapper/DomainMapper.hxx writerfilter/source/dmapper/DomainMapper.cxx writerfilter/source/dmapper/DomainMapper_Impl.cxx writerfilter/source/dmapper/DomainMapper_Impl.hxx writerfilter/source/filter/RtfFilter.cxx Change-Id: Ic163a639fae9de838258b3cca9567a29ab875a35 Reviewed-on: https://gerrit.libreoffice.org/878 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2012-10-19fdo#52208 DOCX import: don't always ignore cont sect break at the doc endMiklos Vajna1-2/+10
Regression from commit 1fdd61db155cf63d5dd55cc2bfb45af33796e131, continuous section break does make sense at the end of the doc, if the previous type was a non-continuous. (cherry picked from commit abd4ffadf30e02284290ea35e8f45d9ffd8eb5ee) Change-Id: I6d82c67e068d8dc3ce1edb1a5fe6ad293afd805d Reviewed-on: https://gerrit.libreoffice.org/877 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2012-10-03probably a rather ugly hack for inline text frame in a table (bnc#780851)Luboš Luňák1-2/+16
Change-Id: I2bd76799cf0a5da09664d0e1b1a9adb466633be1
2012-10-01n#782345 import DOCX w:splitPgBreakAndParaMark compat optionMiklos Vajna1-0/+10
This fixes docx import of page breaks in empty paragraphs, when the compat option in question is set. Even empty paragraphs have an "end of paragraph" character in dmapper: import page breaks there, instead of delaying the import till the all-catcher importer at the start of the next paragraph. Change-Id: Ie5c37042b3c445e0669771d15c8eb46380192db3 (cherry picked from commit 40d93d978d4f8fa709bdeb061b106122789d8e32)
2012-09-28n#782061 DOCX import: w:position should respect w:sz in w:rPrDefaultMiklos Vajna1-1/+13
Subscript relative font size (w:position) is in percents in Writer, but is in half points in Word. When checking for the default font size to count the percent value, the mapper should search font size (w:sz) not only in direct character properties, but also in default character properties (w:rPrDefault). Change-Id: I9286d44c6498c765ddfee795d50921ef58b80071 (cherry picked from commit 0c8017a364efb0e8a1cab57b22257e9b319fa0a1)
2012-09-28try somewhat harder to read w:position (bnc#773061)Luboš Luňák1-15/+33
SvxEscapementItem stores the vertical offset as percentage, so it depends on the font size. Change-Id: I1b2d5b2c230b6243a6c1a4580147c4e0c4ae94cc
2012-09-28support for deferred property processing in writerfilterLuboš Luňák1-0/+20
There currently does not seem to be any sane way to process an attribute or sprm that depends on another one that may not possibly be there yet (e.g. in e7ab4bb6b0e83f01148ffff41e8c5eaa0c5ba0a4, or w:position which for Svx internal reasons depends on fontsize and thus w:sz). So make it possible to defer such properties and process them only before they are actually used, instead of trying to get them out of PropertyMap, possibly in more places and possibly having to undo the changes that have been done to them already. Conflicts: writerfilter/source/dmapper/DomainMapper_Impl.hxx Change-Id: I1630057ecdf46443647ec1dd5253983ae15a083f
2012-09-28n#772094: writerfilter, pictures anchored in header/footer won't be opaqueCédric Bosdonnat1-0/+5
This dark magic is needed to have a behavior similar to the one of Word for images anchored in headers/footers. Writer can't have pictures laid over the header/footer but below the body text. Change-Id: I2c001d4f696c1623370c531059b74e3d5fa4f5b7
2012-09-28n#781825 fix DOCX import of bottom para margin autospacingMiklos Vajna1-1/+1
If w:doNotUseHTMLParagraphAutoSpacing is enabled, it should be 100, not 200, see SwWW8ImplReader::GetParagraphAutoSpace(). (cherry picked from commit 526e007bb6340e2c4a2cb96f5612ba268fcd5583) Conflicts: writerfilter/source/dmapper/DomainMapper.cxx Change-Id: I29c5e97c828f0f55b655410198bfa03dc42a196d
2012-09-28n#780853 fix DOCX import of w:sdtContent in table cellMiklos Vajna1-0/+8
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 (cherry picked from commit 73bd937420b9a99e1e35950e3f9dcbcfd874876d)
2012-09-28n#778140 DOCX import of w:doNotUseHTMLParagraphAutoSpacing compat optionMiklos Vajna1-6/+10
This reverts commit 61c94cbe2cbbbcaa1e44edecc4add60eb6d7937d (as it touched values which are not in the spec) and sets the correct paragraph top/bottom margin in case the compat option is enabled. (cherry picked from commit a10bb9a08b7a96477eefce59f8900cf49604316d) Conflicts: writerfilter/source/dmapper/SettingsTable.cxx writerfilter/source/dmapper/SettingsTable.hxx Conflicts: writerfilter/source/dmapper/SettingsTable.cxx Change-Id: I152a76d8fcdef3acf5491783c2ccacd2d48e76b3
2012-09-28n#778140 as the comment says, it's 100 twipsMiklos Vajna1-3/+3
Change-Id: If2e0d2f4805cd04bec0dd7983ec544b9922ef796 (cherry picked from commit 61c94cbe2cbbbcaa1e44edecc4add60eb6d7937d)
2012-09-28n#778140 enable AddParaTableSpacing for docx, as it's enabled for ww8 as wellMiklos Vajna1-4/+0
(cherry picked from commit 5d4bd2f97128adecc5b11699e98c934be3c3a462) Conflicts: writerfilter/source/filter/ImportFilter.cxx Change-Id: I7523be9f07d378e1c4d88468077653d3fa4161d3
2012-09-28n#778836 fix DOCX import of right margin vs numbering and paragraph stylesMiklos Vajna1-0/+56
The problem was that the left / first paragraph margin was defined in the numbering style, and that zeroed out the already inherited right margin. (cherry picked from commit c5f9d61d45e56d9baaf6e9a91640c60d9b549aab) Conflicts: writerfilter/source/dmapper/DomainMapper_Impl.hxx Change-Id: Ife521d1de4868a7be33de5f8d6af363d10cbc903
2012-09-28n#775906 dmapper: fix inherited first/left margin vs w:ind/w:rightMiklos Vajna1-0/+42
This is similar to 89f208c, but here the direct right margin reset the left/first margin, inherited from the numbering style. Change-Id: I2d238740c24db7607719dcefb17565656592be44 (cherry picked from commit 9133794932fc2ba221f1167fd539479951ed6a6c)
2012-09-21fdo#55187 fix DOCX import of unicode 0xNN0d when it's a separate runMiklos Vajna1-2/+1
E.g. 0x010d was parsed as a newline character... This also makes the RTF workaround from fdo#39856 unnecessary. (cherry picked from commit b3603e0e0e5dbfbeaa2426c499e8f64be2d15765) Change-Id: I5e4a95b4436e1492b64961820702caace0a33e4b Reviewed-on: https://gerrit.libreoffice.org/665 Reviewed-by: Noel Power <noel.power@suse.com> Tested-by: Noel Power <noel.power@suse.com>
2012-07-13do not let a style override paragraph's numberingLuboš Luňák1-9/+15
If a paragraph has its own <w:numPr>, do not let <w:pStyle> override that. Change-Id: I7cea0d1c8bf59804f8c56382ee68c7fad5ed3ef6 (cherry picked from commit e7ab4bb6b0e83f01148ffff41e8c5eaa0c5ba0a4) Signed-off-by: Caolán McNamara <caolanm@redhat.com>
2012-06-27n#693238 dmapper: fix margin values vs SBkc = 0 at the end of the docMiklos Vajna1-1/+6
The problem was that a continous section break at the end of the document caused the section margins to be ignored. Just ignoring the continous section break (only in case it's at the end of the document) makes the problem go away. The original fix was commit cd1c434c4bd4756fa1355e906cb2e8de4aae0618, but it got reverted in commit 2dee7d6205832a1212790ac1ab168a6b6fce686d, as it caused fdo#44292. This second attempt fixes the original bug again, without introducing the "4 columns" bug. Change-Id: I75d612430a5cd631dec0d224127cba580070900d
2012-06-26n#766487 dmapper: FirstLineIndent should be always inherited from numberingMiklos Vajna1-0/+36
Change-Id: I1eb5946d23cd3ff635d436adbd59bf007333aa60
2012-06-26n#766487 dmapper: sprmCHpsBi should affect sprmCHps, if the later is not setMiklos Vajna1-0/+4
Change-Id: Ia6e097f9f93bcfe14392f5ef0245994752001f6c
2012-06-25n#766481 dmapper: don't import fake paragraph containing sectpr only, take twoMiklos Vajna1-0/+11
Change-Id: I4623dfd05498b5ba8de73b7e301eaf486f667738
2012-06-22n#758883 DomainMapper::lcl_startParagraphGroup: set style name consistentlyMiklos Vajna1-0/+3
Change-Id: I71c3ebfcb68a53a291bcab2fdd397d62fd8b368a
2012-06-22n#758883 dmapper: paragraph-level run props should affect numberings as wellMiklos Vajna1-0/+9
Change-Id: I707105f6da53a6cb790d743738875acde561e20f
2012-06-22n#758883 dmapper: always set list id during stylesheet importMiklos Vajna1-7/+7
This way the sprm handlers can be aware that a numbering is provided by that style. Change-Id: I5b5f1570a9e50fd8b3372f5ac7a6cd48e9751254
2012-06-11fdo#49659 three RTF fixesMiklos Vajna1-0/+3
1) fix RTF import of pictures with inner groups One would think that with {\pict{\foo1}}, the inner group has no effect in the outer group, but this turns out to be valid, so we should handle it as well. (cherry picked from commit c5c3ce5e625a31d78a21fbbc339ee30ba99f3044) 2) handle RTF import of tables at the very end of the document If the documents ends with a table, both Word/Writer produces a non-table empty paragraph after that table. However, it's valid not to emit that empty paragraph, so handle the situation in the importer. (cherry picked from commit e08ab74b918be1473d91ed234ee7870cab137c7e) 3) dmapper: handle tables in substreams (cherry picked from commit 61ba6e49f5bbadaf1334ce71459647c3d0a3a37d)
2012-06-02targeted string re-workNorbert Thiebaud1-10/+10
Change-Id: I910a508722a309d7916377a7e2df2093070809ad
2012-04-23n#757890 dmapper: paragraph properties of shape text should have limited scopeMiklos Vajna1-0/+2
2012-04-17implement relativeHeight (z-order) in .docx import (part of bnc#747461)Luboš Luňák1-0/+8
2012-04-06Replaced equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(...)) with == operatorSzabolcs Dezsi1-2/+2
Pattern used: find . -name "*.cxx" -exec sed -i 's/\( *\)\(else if\|if\) *( *\([^!()|&]*\)\.equalsAsciiL( *RTL_CONSTASCII_STRINGPARAM *( *\([^)]*\) ) *) *)$/\1\2 ( \3 == \4 )/' \{\} \;
2012-03-12dmapper: implement contextual spacingMiklos Vajna1-1/+1
2012-03-08fold i18npaper into i18nutilCaolán McNamara1-1/+1
It's too small to justify standalone existence. We can accumulate i18n things we link to directly into i18nutil and rework i18npool uno implementions in terms of thin wrappers over i18nutil and prefer linking to i18nutil internally and leave the uno forwarders for use by external components and scripting
2012-02-02dmapper: Switch paragraphs to RTL based on the value of w:BiDi.Muhammad Haggag1-2/+7
This is a fix for 43398: FORMATTING: Documents opened in LibreOffice Writer incorrectly appear as right justified. Cause: dmapper used to treat the presence of a w:BiDi element in a paragraph's properties as an indicator of RTL directionality, which is incorrect. A w:BiDi element may have a value of 0, indicating LTR. Fix: Inspect the integral value of w:BiDi elements before switching to RTL.
2012-01-25writerfilter: drop unnecessary includes from DomainMapper.cxxMiklos Vajna1-25/+0
2012-01-23Fix for fdo43460 Part XLV getLength() to isEmpty()Olivier Hallot1-2/+2
Part XLV Modules writerfilter, writerperfect
2011-12-24dmapper: clog -> SAL_WARNMiklos Vajna1-2/+3
2011-12-11dmapper: when parsing NS_ooxml::LN_CT_Spacing_lineRule, pTopContext may be nilMiklos Vajna1-3/+10
2011-12-05RTF import: fixed the handling of frame properties n#417818Cédric Bosdonnat1-2/+4
Change the RTF tokenizer to send the same tokens than the docx tokenizer for the <w:framePr> element.
2011-12-05docx: actually import the last frame of a section.Cédric Bosdonnat1-0/+1
When there is no paragraph outside the frame before the section end, the paragraphs weren't transformed to a frame.