summaryrefslogtreecommitdiff
path: root/writerfilter/source/rtftok
AgeCommit message (Collapse)AuthorFilesLines
2013-06-26bnc#823675 RTF import: fix import of numbering bullet associated fontMiklos Vajna1-4/+13
There were multiple problems here: - \f had a special handler for the listlevel destination, \af had not - in case of multiple \f or \af, the first one is used for the bullet font - in case only \af is used for the bullet font, its value should be used for \f as well (cherry picked from commit 55162d7422a3b175c7fe9c175e0dec91b1932b6a) Conflicts: sw/qa/extras/rtfimport/rtfimport.cxx Change-Id: I6631504c1aa9f2e0792a3469a5fdce5b7bd49518
2013-06-26bnc#823675 fdo#59638 handle RTF_F inside RTF_LISTLEVELMiklos Vajna1-0/+8
Word typically uses the Symbol font to describe bullet characters instead of using a sane Unicode value, the previous can only be handled if we parse the custom font set for the list. (cherry picked from commit 58c30a3545a5725d704eabd79071db02f1f2cb23) Conflicts: sw/qa/extras/rtfimport/rtfimport.cxx Change-Id: I1491f07c40953949e381a035c1596c207cdc4c35
2013-06-26bnc#823655 writerfilter: try to make clang tinderbox happyMiklos Vajna1-1/+2
(cherry picked from commit 591e23d03c27e2658889d913626fdcb2837d9064) Change-Id: If24e8e3e48f8d043fdb48a0637e874743f9247f0
2013-06-24bnc#823655 fix RTF import of freeform shape coordinatesMiklos Vajna1-7/+8
E.g. 0,1 was imported as 1,0, as we did not differentiate between not having the coordinate yet and having it as zero. (cherry picked from commit ddddfe8d6ffa05c467bddb3480e43d7043a3d3c9) Conflicts: sw/qa/extras/rtfimport/rtfimport.cxx Change-Id: Ia5fbbcc791dc9c6866ffd4c146793690661d81b4
2013-06-24bnc#823655 Import RTF shape wrap property.Eilidh McAdam3-2/+23
Property \shpwrN, where N can be 1: Wrap at top and bottom (no wrap at sides) 2: Wrap around shape 3: None (wrap as though shape isn't there) 4: Wrap tightly around shape 5: Wrap text through shape Reviewed-on: https://gerrit.libreoffice.org/647 Reviewed-by: Miklos Vajna <vmiklos@suse.cz> Tested-by: Miklos Vajna <vmiklos@suse.cz> (cherry picked from commit d56e7c9011e662b39f0e9775e654f62cea8765c2) Change-Id: Ic700e06bf9ef894a6efa7e8d033888ed80a7082f Signed-off-by: Miklos Vajna <vmiklos@suse.cz>
2013-05-21bnc#818997 RTF import: don't ignore page breaks between shapesMiklos Vajna2-7/+16
(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-03-05Merge branch 'distro/suse/suse-3.6' of ssh://logerrit/core into suse-3.6Petr Mladek1-1/+4
2013-03-04Make LO buildable again after the GraphicFilter move.Jan Holesovsky1-1/+4
Conflicts: cui/source/dialogs/SpellDialog.cxx editeng/source/items/frmitems.cxx filter/qa/cppunit/filters-pict-test.cxx sd/source/filter/grf/sdgrffilter.cxx sd/source/ui/app/sddll.cxx svgio/source/svgreader/svgimagenode.cxx svtools/Library_svt.mk svtools/Module_svtools.mk svtools/Package_inc.mk svtools/source/filter/exportdialog.cxx svx/source/core/graphichelper.cxx svx/source/dialog/compressgraphicdialog.cxx sw/source/ui/shells/grfshex.cxx sw/source/ui/uiview/view2.cxx sw/source/ui/utlui/glbltree.cxx test/source/bootstrapfixture.cxx tubes/source/contacts.cxx vcl/Library_vcl.mk vcl/qa/cppunit/graphicfilter/filters-test.cxx vcl/source/filter/FilterConfigCache.cxx vcl/source/filter/graphicfilter.cxx writerfilter/source/rtftok/rtfdocumentimpl.cxx Change-Id: I3455a7294b136400f32163626d5a7a7f2bfa898c
2013-01-09fdo#58933 RTF import: avoid fake pars / cells when having graphic inside cellsMiklos Vajna1-3/+4
Regression from 8063e36115a11ddf3db05928db9287947beee74d. (cherry picked from commit 555bc780c83114220012e198b5471a0d7452fb32) Conflicts: sw/qa/extras/rtfimport/rtfimport.cxx Change-Id: Ied422751783a00983bd137d6151e0d58217ef76d Reviewed-on: https://gerrit.libreoffice.org/1618 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2012-12-28fdo#57678 fix import of RTF_PARD between RTF_CELL and RTF_ROWMiklos Vajna1-3/+8
(cherry picked from commits 6fc868c6535932bedfa0fc51d8dd5a1814d73ee8 and c58981ca3dbf65c998acf979fb104534991b08c4) Change-Id: I3e3d0de98c9df1a5f9041f6a7dd03b92efb5d0f5 Reviewed-on: https://gerrit.libreoffice.org/1482 Reviewed-by: Muthu Subramanian K <muthusuba@gmail.com> Tested-by: Muthu Subramanian K <muthusuba@gmail.com> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2012-12-21fdo#54473 fdo#57133 fix RTF import of character stylesMiklos Vajna1-1/+1
Regression from commit d2d77fd86e6cb7341e113557e2cfe3d7948759bd (cherry picked from commit 41890bf714803969515578b47e63fa9730ea7090) Change-Id: I7accc5c383de3fa53c12527766c3fc155bfa9863 Reviewed-on: https://gerrit.libreoffice.org/1235 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2012-12-04fdo#54473 fdo#57133 fix RTF import of character stylesMiklos Vajna1-1/+1
Regression from commit d2d77fd86e6cb7341e113557e2cfe3d7948759bd (cherry picked from commit 41890bf714803969515578b47e63fa9730ea7090) Change-Id: I7accc5c383de3fa53c12527766c3fc155bfa9863 Reviewed-on: https://gerrit.libreoffice.org/1235 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2012-12-01fdo#57708 fix RTF import of pictures right before text framesMiklos Vajna2-1/+10
Change-Id: Ibfeaadd5b48fd48c2c1f20de5dc272d9a326bfc4 (cherry picked from commit 8063e36115a11ddf3db05928db9287947beee74d) Reviewed-on: https://gerrit.libreoffice.org/1215 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2012-12-01fdo#57708 fix fake page break problem during RTF importMiklos Vajna2-30/+44
The core of this change is: so far the continous section break at the end of the document was sent as a normal section break. This was introduced in commit 892d33c8d5033b4f8f7889bf91d257f55adf0e1f, probably as a workaround (sadly it's not documented and I no longer remember). Don't do this, since it causes additional page breaks during import. Instead, fix properly whatever was broken after getting rid of this workaround. (cherry picked from commits b836bf389d1150c9cafbb0aefa641af2316e536c and 3f13a8255be93cd3b697f42d691b35418eb87114) Conflicts: writerfilter/source/dmapper/PropertyMap.cxx writerfilter/source/rtftok/rtfdocumentimpl.cxx writerfilter/source/rtftok/rtfdocumentimpl.hxx Change-Id: I28c372d539c150fe21ff9db31209f9935a5e9063 Reviewed-on: https://gerrit.libreoffice.org/1214 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2012-11-14fdo#55525 import RTF_TRLEFTMiklos Vajna1-0/+37
Additionally: 1) Make sure cell margins are zero when they are not defined. 2) Handle cellx values in case of a negative left margin. (cherry picked from commit c4b91ae3178011c66c76c711c1a6469ba658872e) Change-Id: I9b8fb700b6459e622396c98e4344aba79f62c96e Reviewed-on: https://gerrit.libreoffice.org/1058 Reviewed-by: Tor Lillqvist <tml@iki.fi> Tested-by: Tor Lillqvist <tml@iki.fi>
2012-11-07fdo#52989 ignore provided size of JPEG files during RTF importMiklos Vajna2-3/+7
See commit 66fa759b for rationale, this fix just does the same for JPEG files as well. (cherry picked from commit ebc61e11cdb02f5cc33aeabead3d191eaf0d23d3) Conflicts: sw/qa/extras/rtfimport/rtfimport.cxx Change-Id: I6a9ead5f4b4b9c4661cae99501bd7c14a2a79409 Reviewed-on: https://gerrit.libreoffice.org/991 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2012-11-07fdo#48442 fix default hori/vert frame anchor during RTF importMiklos Vajna1-4/+6
We used to send nothing when we got nothing, but this is not correct: \pvmrg and \phmrg is the default in RTF, but not in Writer. (cherry picked from commit 7b7bee4ed5722ce59ffd3394a0330d71d69d66b3) Conflicts: sw/qa/extras/rtfimport/rtfimport.cxx Change-Id: I9f69e282e68f0828c8b5ba98657cad1dd0715eb3 Reviewed-on: https://gerrit.libreoffice.org/993 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2012-11-06fdo#52989 ignore provided size of JPEG files during RTF importMiklos Vajna2-3/+7
See commit 66fa759b for rationale, this fix just does the same for JPEG files as well. (cherry picked from commit ebc61e11cdb02f5cc33aeabead3d191eaf0d23d3) Conflicts: sw/qa/extras/rtfimport/rtfimport.cxx Change-Id: I6a9ead5f4b4b9c4661cae99501bd7c14a2a79409 Reviewed-on: https://gerrit.libreoffice.org/991 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2012-11-06fdo#48442 fix default hori/vert frame anchor during RTF importMiklos Vajna1-4/+6
We used to send nothing when we got nothing, but this is not correct: \pvmrg and \phmrg is the default in RTF, but not in Writer. (cherry picked from commit 7b7bee4ed5722ce59ffd3394a0330d71d69d66b3) Conflicts: sw/qa/extras/rtfimport/rtfimport.cxx Change-Id: I9f69e282e68f0828c8b5ba98657cad1dd0715eb3 Reviewed-on: https://gerrit.libreoffice.org/993 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2012-11-05fdo#55493 fix RTF import of specific PNG imageMiklos Vajna1-6/+12
The image was special in that the resulting Graphic's GetPrefMapMode().GetMapUnit() wasn't MAP_PIXEL. (cherry picked from commit 5ef0f1dc9a70c20fe6879832b782a0c34724353f) Conflicts: writerfilter/source/rtftok/rtfdocumentimpl.cxx Change-Id: I681e344a042721b99f6cb2e599f9c65156d219a4 Reviewed-on: https://gerrit.libreoffice.org/860 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2012-10-19fdo#55493 fix RTF import of specific PNG imageMiklos Vajna1-6/+12
The image was special in that the resulting Graphic's GetPrefMapMode().GetMapUnit() wasn't MAP_PIXEL. (cherry picked from commit 5ef0f1dc9a70c20fe6879832b782a0c34724353f) Conflicts: writerfilter/source/rtftok/rtfdocumentimpl.cxx Change-Id: I681e344a042721b99f6cb2e599f9c65156d219a4 Reviewed-on: https://gerrit.libreoffice.org/860 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2012-10-01fdo#52475 fix import of RTF_CHCBPAT with value 0Miklos Vajna1-2/+1
0 means auto, and for fdo#50539, this value was ignored. However a next sample shows that we should send something to the dmapper: COL_AUTO. Change-Id: I8d7d35125c9027dfb45288bbfbfa81ba4799e78d Reviewed-on: https://gerrit.libreoffice.org/740 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2012-09-24fdo#49655 fix RTF import of text in the middle of table definitionMiklos Vajna1-0/+8
Usually table text comes after the \intbl control word, but it turns out text is allowed earlier. Make sure such text is buffered, otherwise we'll send paragraph / run properties to the dmapper in the middle of table properties, which is obviously not allowed. (cherry picked from commit af6b7d8ba30d395e5f4a17876526434cf0a06005) Change-Id: I34f1df7e171316a7d926179689627301860d492f Reviewed-on: https://gerrit.libreoffice.org/689 Reviewed-by: Noel Power <noel.power@suse.com> Tested-by: Noel Power <noel.power@suse.com>
2012-09-21fdo#52389 fix RTF import of paragraph without RTF_PAR at the end of the docMiklos Vajna1-0/+2
(cherry picked from commit ebf0e1953ef422bb83201c89f0558bb9071edf63) Change-Id: Ib7b48986d5b01c75ae0be8dd6618a2e8be2ae51c Reviewed-on: https://gerrit.libreoffice.org/663 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2012-08-29fdo#52052 fix RTF import of page breaks on landscape pagesMiklos Vajna2-6/+48
The problem was that we tried to insert a page break before reaching the first section break, where section properties are sent. Additionally, the continuous section break at the end of the doc caused trouble, so ignore it explicitly. (cherry picked from commit 1efa576ef88141c4deb5da9818537e053dc6517b) Change-Id: I22bc355994991beeadb41d26b44ce3e2beedbdb2 Reviewed-on: https://gerrit.libreoffice.org/497 Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2012-08-14Fix fdo#47495 backportMiklos Vajna1-2/+2
On master, the fix was fine, but on -3-6 this broke the fdo#47036 unit test, fix this. Change-Id: I02449a41801646c7eb2408e60f9051e1269d6693 Signed-off-by: Petr Mladek <pmladek@suse.cz>
2012-08-14fdo#47495 fix RTF import of multiple shapes inside textframesMiklos Vajna1-1/+4
(cherry-picked from commit ad72a47dbd16f65316432df71dffe3b9b835fcc7) Change-Id: Iee8541ff9e88139648d45f08968476f2b1d4e1b3 Signed-off-by: Petr Mladek <pmladek@suse.cz>
2012-08-13fdo#48446 implement RTF_CPGMiklos Vajna1-0/+3
(cherry picked from commit f6a24ace5ad12e79f0cc90709a290a30e3758781) Change-Id: I2fb2004f2f755ce337ddd1419acf2510f17622f3 Signed-off-by: Petr Mladek <pmladek@suse.cz>
2012-08-02fdo#49892 import RTF_SHPB{X,Y}PAGEMiklos Vajna3-0/+23
(cherry picked from commit 2111c6e6dc18f3ffd11de176791ecc04bab41afb) Conflicts: writerfilter/source/rtftok/rtfdocumentimpl.cxx Change-Id: I8fe2b28f44ee61fc0f1438de3681fd86b16d29ae
2012-08-02fdo#49892 implement RTF import of dhgt shape propertyMiklos Vajna1-0/+10
Change-Id: I36d574c5f7915d732c6c158fadb91b6032370a01 (cherry picked from commit ce701e94db740ea8c2bb9f6dcf55a2aeda4d71af)
2012-07-30fdo#48033 fix RTF import of pictures inside table cellsMiklos Vajna1-1/+7
Change-Id: I2d9ef3b346d4b10b99b67d0934d63d59f6119f97
2012-07-19fdo#52066 fix RTF import of rectangle shape without text in itMiklos Vajna3-6/+10
We used to always add a paragraph on shapes, which breaks import of abused rectangle shapes with minimal height, used as lines. Change-Id: Ice240bad68bc030e7889c46f72c45646307f17e5 Signed-off-by: Luboš Luňák <l.lunak@suse.cz>
2012-07-04rtftok: border types must be mapped to the values in ooxml/model.xmlMichael Stahl1-19/+18
... not to the tables::BorderLineStyle values, because the domain mapper's MakeBorderLine converts the values to BorderLineStyle. Change-Id: Id89e0bcf80fbd9a1ac9238e09d898bb6b82303b4 (cherry picked from commit 6146c5d1557f4813c9793c1b00567885382c00e7)
2012-07-04replace enum SvxBorderStyle with css::table::BorderLineSyleMichael Stahl1-25/+28
Change-Id: I1dadb53f46b23f92d34061ef78dda872bdbcda67 (cherry picked from commit 8b4593948582c3b5b3d013bd751bb19ffd37a31b)
2012-06-15fdo#50087 fix RTF import of Title, Subject, Comments document propertiesMiklos Vajna2-1/+22
Change-Id: I3358fad4949c2c21ecf63983a36b7c8428df9f06
2012-06-11fdo#49659 three RTF fixesMiklos Vajna2-0/+17
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-06fdo#50665 rtftok: don't ignore character properties of text fieldsMiklos Vajna2-3/+6
The dmapper part was already fixed in commit 9486851baea59d16c449d79bd61a38f6e686cfe0 for DOCX, this fixes the RTF tokenizer. Change-Id: Iaca706e50367bb744f5a03e15134bda1646df8fc (cherry picked from commit b9508dd55f82d35f09a58021dc001cf79b390e08)
2012-06-01fdo#50539 fix RTF import of automatic character background colorMiklos Vajna1-0/+1
Change-Id: I7efb3bce9a3a6f6c029d99de2264e00bb1bc7c93
2012-05-30don't overload operator-> and just forward specific methods, take twoCaolán McNamara5-43/+44
Change-Id: If66b0a5f1b0444d8f0a6dfed1b518a0033d61d2e
2012-05-30Use RTFSprms::set() in RTFDocumentImpl everywhereMiklos Vajna1-146/+139
Change-Id: Iaf52206aad2f1053d54025b0e71eff1b229e1372
2012-05-30fdo#49968 speed up RTF import of repeated character/paragraph propertiesMiklos Vajna3-10/+26
Most RTF documents (produced by Word/Writer) reset character and paragraph properties at the start of each paragraph. Because of this, appending properties of the same type didn't cause any noticable performance problems. However, it's valid to not reset these properties, and in this case a longer document takes forever to import. Filter these duplicates at the tokenizer level for trivial properties to get acceptable import speed. Also fixes rhbz#825548 in an easier-to-backport way. Change-Id: Id0b7289323d45ff0d747c74bb78d8eb7def0cfc2
2012-05-30rtftok: undo tryToSafelyUpdateAnExistingProp, will be back soonMiklos Vajna5-254/+189
Change-Id: I171dac32f8a938dc4ecfbab13835823f65ee2611
2012-05-30Resolves: rhbz#825548 some rtf documents take vast amounts of time to loadCaolán McNamara2-3/+62
rtf documents with vast sequences of replicated properties without any pard resets to defaults create huge vectors of properties that eat time and memory So if we are adding a property which already exists and there are no intermediate properties which would cause side effects to the property then update the existing one instead Only implemented this optimization for some selected character properties This takes my load time down to 7 seconds from effectively some "infinite" hour+ load time. Change-Id: I520779233180f4d9faf9fb0989d546e08fc6cabd
2012-05-30don't overload operator-> and just forward specific methodsCaolán McNamara5-189/+195
Change-Id: I22f5f4a17f2eef0d04756ff4c8e614da073248ca
2012-05-29implement operator= tooDavid Tardon3-0/+15
Change-Id: I5d5b5562a130ac5ba46afa3273cf65e7bbed2c13
2012-05-24add missing initializationsDavid Tardon1-0/+2
Change-Id: I872987e02c1685810f6c2c71956c60e5f13b2706
2012-05-11fdo#45190 import of RTF_LI should reset inherited RTF_FIMiklos Vajna1-1/+7
Change-Id: I17c287fa4daa399876b34182c02d9cf928fe1b6f
2012-05-10fdo#49692 RTFValue::Clone(): copy m_bForceString as wellMiklos Vajna2-4/+4
Change-Id: Ib8f06ff33fd9c01ea4a1e47c97cfa12f2ced7318
2012-05-10RTFDocumentImpl::runProps: avoid copy&pasteMiklos Vajna2-28/+20
Change-Id: I3b1f03c0a3236461e753ef236881313ea7daa0d0
2012-05-09fdo#49271 rtftok: make sure we send char props if there are no runsMiklos Vajna1-0/+16
Change-Id: Id900b06fc1aad1d0f50ff92e3c12616dfbc1a81e