summaryrefslogtreecommitdiff
path: root/writerfilter
AgeCommit message (Collapse)AuthorFilesLines
2015-05-19tdf#91261: DOCX import: snapGrid property of paragraphs are ignoredMark Hung5-5/+27
Fix the situation for OOXML import filter: a) While handling DocGrid type, SnapToChars was treated as None. Now it is implemented as described in the article: http://linpeifeng.blogspot.tw/2007/02/text-grid-enhancement.html Both LinesAndChars and SnapToChars will be translated to Writer grid type "lines and characters", and set SnapToGrid property to false or true accordingly. b) All the imported paragraphs snap to grid because SnapToGrid was appended to grabbag, now it allows SnapToGrid property in paragraph and paragraph styles to be imported properly. Change-Id: I446b4c64c0ed86960896bcd61a1006c9173a757a Reviewed-on: https://gerrit.libreoffice.org/15732 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2015-05-19loplugin:staticmethodsStephan Bergmann2-38/+38
Change-Id: I6dbc972c1d6e05667ac5f354703a77db4266aea0
2015-05-19TagLogger can be staticNoel Grandin39-448/+311
since we only ever instantiate one of them Change-Id: I48b3b976b4f33044c4bf6542ac5cce58f26e6244 Reviewed-on: https://gerrit.libreoffice.org/15759 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-05-18writerfilter: avoid unnecessary roundtrip to css::uno::SequenceMiklos Vajna2-47/+51
Just pass over an std::vector instead of getAsConstPropertyValueList() and comphelper::sequenceToContainer(). Change-Id: I584c44918b526cbed99abdbbf069c4bbf27ac887
2015-05-18writerfilter: avoid manual reallocMiklos Vajna2-5/+5
Change-Id: I5ce8b00736fed6d4fb307c6384deca4718e770a3
2015-05-18tdf#86814 RTF import: fix sometimes lost bold styleMiklos Vajna1-24/+33
The problem was that commit 76c0d0abc89cd8948706083c2660b71a2dad670c (RTF import: adapt getProperties() to createStyleProperties(), 2014-09-07) only made the character style sprms/attributes a flat list, but not the paragraph style ones. Fixing that inconsistency avoids the tokenizer adding unwanted default sprms, which cause the bold sprms go away in the bugdoc. Change-Id: I86bd1b26af18cd968375c9b39be9c8e71d51271f
2015-05-15Use comphelper::sequenceToContainerMiklos Vajna1-9/+7
Change-Id: I9df4b1e04178b99d40aa3e08297b5bc5a30a9bce
2015-05-13PropertyNameSupplier: use std::unique_ptr<>Miklos Vajna2-3/+3
Change-Id: I1e4cf3241bee20677f61ea334efc3aa4e490a016
2015-05-12tdf#90260 writerfilter: pasted RTF documents may contain no \parMiklos Vajna7-12/+25
sw core is not yet adapted, will be done in the next commit. Change-Id: If8da12427e0cdaced4c1c1776b9f0b8cbde5c57c
2015-05-12tdf#76941 : image greyscale not imported correctlyJoren De Cuyper1-110/+109
The eColorMode and other graphic attributes were never checked due to this statement. This statement is last altered by 0f0a22ade666d33a10d9c83c0f636be9acf1ed39 This only fixes the import. Change-Id: I9ba7e745582faf37898f284600d638aa4806a362 Reviewed-on: https://gerrit.libreoffice.org/15710 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-05-11tdf#91074 RTF import: handle \dplineco* for text framesMiklos Vajna3-20/+33
RTFSdrImport::resolve() already had the logic to use the relevant API depending on if the shape is a text frame or not -- extract that to a separate member function and use it from RTFDocumentImpl::popState(), too. Change-Id: I663b372244f09f002447ece62587143b2a575795
2015-05-08Booleans are logged via sal_uInt32 hereStephan Bergmann1-1/+1
Change-Id: I4c684903952fbfdaad52cabc135625a89b55c75a
2015-05-05loplugin:staticmethodsNoel Grandin9-27/+27
Change-Id: I64fdb27a7f83f6417a9cd67ed5d2c44072ec7f2e
2015-05-04tdf#91077 don't import shapes from discarded DOCX header/footerLászló Németh1-1/+2
Change-Id: I674eadb84fc870031244a61f5c07d2cdf18a8dd1
2015-05-04writerfilter: noExplicitConstructor cppcheck fixesMiklos Vajna10-40/+33
Change-Id: I4195fc8a7736a29a6f08d0745f39a0907a5545e8
2015-05-02writerfilter: avoid manual realloc in StyleSheetTableMiklos Vajna1-13/+7
Change-Id: Iebfbeab422b7a0ef19981e146db0e7b7508e80c0 Reviewed-on: https://gerrit.libreoffice.org/15594 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2015-04-30writerfilter: unused fill and CT_Fill resourcesMiklos Vajna1-6/+0
These were added by commit cfc4650c8594334edecc3b50ca54461f6bee2d43 (Added some teaks to 'model.xml', 2014-09-16), but the matching dmapper part is missing, so they aren't useful in practice, and cause a crash on import of crashtest's File_953.docx. Change-Id: I3d1c138534a37dc9ba500f1134ca4bb9ebae0e96
2015-04-28OOXMLFactory can be purely staticNoel Grandin4-59/+19
it has no subclasses and no state, so it doesn't need locking or reference counting or even an instance Change-Id: I1e0f883946cb0e9bd26b49d12e58d813ce90a3b8 Reviewed-on: https://gerrit.libreoffice.org/15532 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-04-28Booleans are logged via sal_uInt32 hereStephan Bergmann1-7/+7
Change-Id: I634402fb0739b8d42d43264c57340dd030f86d78
2015-04-27More loplugin:simplifyboolStephan Bergmann2-2/+2
Change-Id: I577db0bcb4c9fd45530132409fabf1a422f3d2cb
2015-04-26DomainMapper_Impl::finishParagraph: refactor to avoid manual reallocMiklos Vajna1-11/+9
Change-Id: Ia52a2e3d6d98cfcc33a307ddcfc218a8426058dd Reviewed-on: https://gerrit.libreoffice.org/15538 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2015-04-25writerfilter: remove remaining doctok bits from TablePropertiesHandlerMiklos Vajna1-34/+3
Change-Id: I61d1907a8c3a53c526992cc615478ee57a097fb6 Reviewed-on: https://gerrit.libreoffice.org/15528 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2015-04-24Related: rhbz#1215060 pass std::exceptions throughCaolán McNamara2-48/+48
Change-Id: Ifb3431a50f92b95dfc1e851f9584533271e69324
2015-04-24loplugin:simplifyboolStephan Bergmann3-11/+11
Change-Id: Ie145292074b39fae5da40a7337737dd753b4d2ea
2015-04-21RTF import: handle d{x,y}WrapDist* picture propertiesMiklos Vajna4-7/+21
Commit e789c7f0f15a6b571de95b81e77e3a323e9f540e (RTF import of d{x,y}WrapDist* shape properties, 2013-04-09) added support for wrap distance of shapes, but that was ignored for shapes, as dmapper later overwrote the set margins. Fix this by generating the expected tokens in case of pictures, then dmapper will take care of the rest. Also add testcases for the original shape wrap distance feature that was missing. Change-Id: I6f219ee6fef71328368409d142897dbae77a0f2f
2015-04-20sw, writerfilter: these 'using namespace' statements can be avoided easilyMiklos Vajna5-12/+5
Especially the 'using namespace std' is scary, now that we have std::shared_ptr and boost::shared_ptr, too. Change-Id: Ibb584281f1b9d56103ab5984473eb484157c12d5
2015-04-20RTF import: handle \hyphparMiklos Vajna1-0/+3
Change-Id: I2a1d0e194af6eb5fb865d3ed26712eed09a3b28f
2015-04-20writerfilter: remove newly unused methodsMiklos Vajna2-49/+0
Change-Id: Ie15422d7936cd84d5c4a07a5b75fdb02efc6ea1e
2015-04-19writerfilter: remove remaining doctok bits in GraphicImportMiklos Vajna1-20/+0
Change-Id: I399b389d4bd54357c6578417d2983017a60f0f51 Reviewed-on: https://gerrit.libreoffice.org/15383 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2015-04-19import chart MSO 2007 streams correctly for docx files, tdf#82216Markus Mohrhard1-0/+2
Change-Id: Icda809faf315dac5953d38781b2b401d51f7a40a
2015-04-18writerfilter: clean up remaining doctok bits in DomainMapperTableManagerMiklos Vajna1-90/+5
Change-Id: Ibbd0404c88a4086b9583a430e8c6fa4d0bc558eb Reviewed-on: https://gerrit.libreoffice.org/15377 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2015-04-17RTF filter: import \hyphautoMiklos Vajna1-0/+3
"Automatically Hyphenate Document Contents When Displayed" Change-Id: I832eed60511b332a3f936b8239fd0a56a84879f1
2015-04-17tdf#86182 RTF import: fix handling of \rtlparMiklos Vajna1-1/+1
Commit 558d5c25a0b1d6a937d33291a4b6cd7fca6cb15b (implement RTF_LTRPAR and RTF_RTLPAR, 2011-06-09) was just a guess, this one is the proper mapping. Change-Id: I1156ef5ddc34264d761d3e64dd0537bc6ec0ced7
2015-04-16rtftok: handle over ownership of stream to utl::OSeekableInputStreamWrapperMiklos Vajna2-6/+5
Previously we just kept the stream around till the next embedded object or document end and hoped that the stream wrapper is deleted before the underlying stream goes away. Change-Id: If2bdb1e664d803fc48d06204fe3aef72b279b5b6
2015-04-16RTF import: fix handling of \objdataMiklos Vajna2-47/+63
There were two problems here: 1) The input stream is read multiple times, so plain naive XInputStream is not enough, XSeekable is needed, as it is the case for the stream provided by the OOXML tokenizer. 2) Seeking to the correct start position is not enough, code using the stream will assume that seeking to the beginning of the stream allows reading the correct data again, so provide a dedicated stream instead. With this, handling of math equations created by Word <= 2007 and embedded to RTF files can be edited finally. Change-Id: Ic225e1e1060f8bdd5651a21e68970620c9ac6b68
2015-04-16RTF import: handle \objclassMiklos Vajna2-0/+11
Change-Id: I771c83d0ed8a06a2eeec57a40a80092b537d9b84
2015-04-16RTF import: allow multiple children for ooxml:OLEObject_OLEObjectMiklos Vajna2-8/+10
Change-Id: Iec84588daf5555d1207827efb0f26d8354ad462b
2015-04-15DOCX import: convert MathType to Math if MathTypeToMath is enabledMiklos Vajna1-2/+17
With this, math equations created by Word <= 2003 and embedded to docx files can be edited finally. Previously the result was read-only and opened in an unexpected new window. Change-Id: I4f9dd1cca4a149959f6151cf9af9242b53190ef5
2015-04-15writerfilter: reduce scope in ListsManagerMiklos Vajna1-1/+1
Change-Id: Ibc2fa865614df44088883acee4a2c87a3fb19279
2015-04-15writerfilter: TDefTableHandler's bOOXML was always trueMiklos Vajna4-10/+6
Change-Id: I9efcb32f742aa7a0549ceb246a1b75fa3af662be
2015-04-15writerfilter: TablePropertiesHandler's bOOXML was always trueMiklos Vajna5-10/+8
Change-Id: I8b1e05c6f685ea32a3c29a4636be4bc4894d7de0
2015-04-15writerfilter: these ctors can be explicitMiklos Vajna2-2/+2
Change-Id: I8f974bcc329267dcb707caa3b883fb748276433c
2015-04-12tdf#75614 RTF import: fix missing text after footnoteMiklos Vajna1-1/+5
Change-Id: I5901094cb603c35a1cd8ac718fd434a9dd55729b Reviewed-on: https://gerrit.libreoffice.org/15266 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2015-04-11writerfilter: no need to spell out com::sun::star, css is enoughMiklos Vajna30-291/+262
Change-Id: I7dfcb041509508969135a325bdef709de7a8218f Reviewed-on: https://gerrit.libreoffice.org/15247 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2015-04-11No need to spell out com::sun::star, css is enough.Miklos Vajna6-18/+15
Change-Id: I1cdf56df10516f01ca091043b6a01bc14095413a Reviewed-on: https://gerrit.libreoffice.org/15242 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2015-04-08A UNO Any can't contain an AnyStephan Bergmann1-2/+2
...and css::uno::makeAny<css::uno::Any>() was never meant to be used. Introduce css::uno::toAny for the (template-code) cases that shall return an Any for both Any and non-Any inputs. Change-Id: Ifa977d73f1da71b2fedde7e8140b19497c4a0257
2015-04-06writerfilter: use variadic cppu::WeakImplHelperMiklos Vajna5-13/+10
Change-Id: I38c7776d141bb1e582be7043993986cd6346c331 Reviewed-on: https://gerrit.libreoffice.org/15168 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2015-04-05writerfilter: remove <text> alias for <data type="string">Miklos Vajna3-328/+315
Change-Id: I44630ebc4395b86ae4f44c85d596b589a93b54b0 Reviewed-on: https://gerrit.libreoffice.org/15159 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-04-04Use std::make_shared<>Miklos Vajna1-38/+38
Change-Id: Ifc728dc0b42d713a5eaa2fc22d3e71c6aa4f196d Reviewed-on: https://gerrit.libreoffice.org/15146 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2015-03-29writerfilter: turn RTFDestinationState into a C++11 scoped enumerationMiklos Vajna9-551/+555
Change-Id: I5d3c0ab5869f415b3a435e5f931613a188e43173