summaryrefslogtreecommitdiff
path: root/writerfilter/source/filter/ImportFilter.cxx
AgeCommit message (Collapse)AuthorFilesLines
2015-02-22writerfilter: clean up DOCX XFilter implementationMiklos Vajna1-354/+0
Change-Id: I4524d0a93231f291e074d1eeb10d00efc64e0cc5
2015-02-19writerfilter: use constructor for writerfilter moduleChris Sherlock1-8/+7
Change-Id: Iada80d2c6989de2811cf35cb288a430e2eeba8e9 Reviewed-on: https://gerrit.libreoffice.org/14536 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2015-02-11Guard against createInstance throwing non-Runtime-ExceptionStephan Bergmann1-3/+14
...leading to exception specification violations down the road Change-Id: If017ffd18953d1200fde476ba7e400298dcd5b29
2015-01-22loplugin:stringconcatStephan Bergmann1-2/+2
Change-Id: I5a95556b2a9975af150aeb65d6f363f643349a49
2015-01-22WaE: warning C4101: ´e´ : unreferenced local variableCaolán McNamara1-1/+1
Change-Id: I91745c868310b301e86cf9b5d6607ae362e2b945
2015-01-22writerfilter: DOCX import: better error handling than "catch (...) {}"Michael Stahl1-1/+71
If there is a SAXParseException, OOXMLDocumentImpl::resolve() should not ignore it, because if it occurs in a substream some end tag handlers may not have been run and the DomainMapper may be in an inconsistent state, so continuing to parse the outer document is probably not a good idea. Also add some exception mangling so sfx2 can present a useful error dialog. Change-Id: I169ba6db25f2ae264af08a64edf76a6bf6757f85
2014-12-25writerfilter: turn SourceDocumentType into a C++11 scoped enumerationMiklos Vajna1-1/+1
Change-Id: I11c550d0ec5a10f17116ac8f7025c0283e292f2e
2014-12-20writerfilter: clean up copy&pasted dmapper_logger start / endMiklos Vajna1-16/+0
Change-Id: Iacae41a32acec153b1db1e1a03b2f2913d114d9b
2014-12-20writerfilter: pass the whole MediaDescriptor to dmapperMiklos Vajna1-1/+1
This gives dmapper access to the document URL. Change-Id: I4844c2fe97815f788de87b53170d4a1d1faebde8
2014-12-13writerfilter: use DomainMapperFactoryMiklos Vajna1-3/+3
Change-Id: I8053676f9aec8f20dc9753c5651a072c5d80c1f2
2014-12-12writerfilter: let ImportFilter only assume that DomainMapper is a StreamMiklos Vajna1-6/+0
Change-Id: I2e0db194357657df81d8cd94f42cdfbd2c3a2664
2014-10-30fdo#79602: sw: add new compatibiltiy flag PropLineSpacingShrinksFirstLineMichael Stahl1-0/+1
This is enabled by default, to get the new formatting where the first line of a paragraph is shrunk if a proportional line spacing < 100% is applied; existing OOo documents get the previous (before LO 3.3) formatting. Since the formatting in LO releases is broken anyway, it does not matter much which way documents written by old LO get formatted. Change-Id: I0952f568a933c137bd03070759989cac3517d8b9
2014-10-17Work around Clang 3.2 -Wnull-conversion bugStephan Bergmann1-1/+1
...by running all of writerfilter through loplugin:nullptr rewriter Change-Id: Ie6ec5dd989dc2035ccd10941bc38e557e128be0f
2014-10-17DEBUG_DOMAINMAPPER -> DEBUG_WRITERFILTERMiklos Vajna1-3/+3
As it's used in the tokenizers as well. Change-Id: I7a78cad0414c724f33b50315a45a5ff2c941f4db
2014-10-16writerfilter: make dmapper logging a runtime decision, not a buildtime oneMiklos Vajna1-1/+2
It's still only enabled in debug builds, but it now requires an environment variable, not rebuilding with dbglevel=2. Change-Id: I970c7bfe0b3f547429ef37f37406a095a60c34ff
2014-09-13Use comphelper::SequenceAsHashMapMiklos Vajna1-14/+5
Change-Id: Ib510ce39e83f87c8a9c7a4f5dce4b29b012ce732
2014-08-28Remove pointless WriterFilter::initialize()Miklos Vajna1-30/+8
Change-Id: I2341f9665835b4591d0e7c26f32a0fa120b6e7b9
2014-08-07Use comphelper::SequenceAsHashMapMiklos Vajna1-22/+12
Change-Id: I50e32d275c99c445033fc5f9ecfcaf2a9bbc72c8
2014-06-18writerfilter: Fold all the various DEBUG_* macros into DEBUG_DOMAINMAPPER.Jan Holesovsky1-3/+3
They were set either all, or none anyway. Change-Id: I4893ff5fef7c1a472ee8889ad36db2c3d3734be6
2014-06-18writerfilter: Consistent naming of dmapper_logger.Jan Holesovsky1-4/+4
Change-Id: I229c8c9fa08827a15404bf0851b7c27771f35706
2014-06-11writerfilter: Kill debug_logger.Jan Holesovsky1-7/+1
Does not really log interesting stuff; if anybody wants some kind of logging like this, better to use SAL_INFO(), and add it only for really interesting stuff. Change-Id: I11b4caa9660aaf1e70819322b7fc207a544ea3bb
2014-06-02fix debug=2 buildCaolán McNamara1-1/+1
Change-Id: I46b7bdfe4c467d52c9304ee880d74c7d88779b43
2014-05-30writerfilter: clean up 'using namespace ::rtl'Miklos Vajna1-5/+3
Most probably this is just a leftover when one had to spell out rtl::OString and friends, and not using it ensures that rtl::Reference vs css::uno::Reference is written out. Change-Id: I13e20e6566a56a93b2a1a3f980c301d3bfc41d89
2014-05-23DOCX import: detect document signatureMiklos Vajna1-0/+8
Change-Id: Ic84b1f1446d6ab1a1529de4e0a435afbf62915a7
2014-04-12fdo#74599 RTF import: enable StylesNoDefault compat settingMiklos Vajna1-3/+0
The Writer 'Heading 3' paragraph style is gray by default, but (just like in case of DOCX) that shouldn't have any influence on the RTF import result. Fix this by moving the compat setting from the DOCX filter implementation to the common dmapper. Change-Id: I86c7cf1a66f82b438ce8379467773a88c9e229af
2014-03-21DOCX import: implement progressbarMiklos Vajna1-1/+2
The design follows what we do in case of ODT import already: read the number of paragraphs from the document statistics metadata, and then estimate progress based on the number of already imported paragraphs. Change-Id: I042cc6014c05ca7456fdf1c8d7247b615ba3a244
2014-02-28writerfilter: put w:compatSettings into a document level GrabBagTomaž Vajngerl1-1/+5
Change-Id: Iefb8ef14c61e7966098754b8f3395f994bb9bda7
2014-02-26cppuhelper: retrofit std::exception into overriding exception specsStephan Bergmann1-8/+8
Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3
2014-01-10fdo#72520 : Added embedded data of docx file to InteropGrabBag.sushil_shinde1-1/+5
- Added embedded exel sheet data for charts to grab bag. Change-Id: I7f52b56de2306671fea9247c8a789c0e2a5a8874 Reviewed-on: https://gerrit.libreoffice.org/7211 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2013-12-13writerfilter: remove unused WW8StreamMiklos Vajna1-1/+0
Change-Id: I375b4768bc4474f78f6857176c8b77856609aeaa
2013-12-13fdo#71786 : Implemented Glossary folderRohit Deshmukh1-1/+7
1. Glosary folder is imported as Intrograb and exported. 2. Added unit test case Reviewed on: https://gerrit.libreoffice.org/6825 Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx writerfilter/source/filter/ImportFilter.cxx Change-Id: Ifd51a75a65e030d44d30e02cd7ab51fb088186b3
2013-12-12writerfilter: refactor code to fill document grab bagJacobo Aragunde Pérez1-129/+57
There were several chunks of identical code to add attributes to the document grab bag. I have refactored the common code to a method. Change-Id: Ia1de75280a7725ab9703b08b1b08e7a7d1e0a8f2
2013-12-11fdo#64232: export w:themeFontLang setting to docxJacobo Aragunde Pérez1-1/+34
We store the values of themeFontLang tag to the document grab bag so we can save it back to the document on export time. Added unit tests to check that the attribute is properly set back and also that the theme fonts are correctly applied to the text. Change-Id: Ia54c513796ba38a571396ca7b72dfd28463c15fd
2013-11-19remove unnecessary use of OUString constructor when assigningNoel Grandin1-1/+1
change code like aStr = OUString("xxxx"); to aStr = "xxxx"; Change-Id: Ib981a5cc735677ec5dba76ef9279a107d22e99d4
2013-11-15[docx] activeX reference files (.bin) saved in InteropGrabBag and exported.sushil_shinde1-1/+5
The XInputStream for activeX.bin files is stored as the PropertyValue "OOXActiveXBin" into the "InteropGraBag" Added mxActiveXBinList object which holds XInputStreams for each activeX.bin from activeX folder. Added .bin files entry to respective acivex.xml's .rels file. Added Unit Test to test all .bin files are stores properly. Reviewed on: https://gerrit.libreoffice.org/6679 Change-Id: I3a0e9462a6cc53d8cbb9c7d59ed24631d77d4d30
2013-11-14[docx] activeX files saved in InteropGrabBag and exported.sushil_shinde1-0/+30
The XDocuments representing the DOM of an OOXML's activex document is stored as the PropertyValue "OOXActiveX" into the "InteropGraBag". Added mxActiveXDomList object which holds xDocument for each activeX.xml from activeX folder. This changeset stores only activeX[n].xml files. Relationship files (example activeX.bin) from activex are not stored yet. (Working on it.) Reviewed on: https://gerrit.libreoffice.org/6654 Change-Id: I658e361211e1446ed095a73b0422da0c4f74df1c
2013-11-14Move MediaDescriptor from comphelper to unotoolsStephan Bergmann1-2/+2
...so it will be able to use SvtSecurityOptions internally. Change-Id: Id7433247e8fc53651935578510bedbcca5aa2ac9
2013-11-13[docx] CustomXml relationship files saved in InteropGrabBag and exported.sushil_shinde1-1/+6
The XDocuments representing the DOM of an OOXML's customxml property document is stored as the PropertyValue "OOXCustomXmlProps" into the "InteropGraBag". Added mxCustomXmlDomPropList object which holds xDocument for each itemProps.xml from relationship of item.xml. Exporting all itemprops files from customxml. Reviewed on: https://gerrit.libreoffice.org/6603 Change-Id: I3973e6ce40382bbc4da247b5b27d99b03e851744
2013-11-07remove unnecessary use of OUString constructor in WRITERFILTER moduleNoel Grandin1-2/+2
Change-Id: Iba6fd6e2bb9b2a9e937149f3e3465b0817208a58
2013-11-05[docx] CustomXml saved in InteropGrabBag and exported customxml when saving.sushil_shinde1-0/+32
The XDocuments representing the DOM of an OOXML's customxml document is stored as the PropertyValue "OOXCustomXml" into the "InteropGraBag". Added mxCustomXmlDomList object which holds xDocuments for each item.xml from CustomXml. Exporting all items dom tree from customxml that has been parsed when loading the file. This is necessary in order to properly reopen docx files that contain data like citation. This fix grab bags only item[n].xml's files from CustomXml folder. itemProps[n].xml's and item.xml's .rels are not preserved and exported yet. (Working on this part) Change-Id: I330f34f38a7aa4cd39094371bff15ebbc0318167 Reviewed-on: https://gerrit.libreoffice.org/6519 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2013-10-30fdo#54938: Convert package, writerfilter and writerperfectMarcos Paulo de Souza1-17/+4
Change-Id: I5220e172bf9722ad86eef3bc557c30779f07201c Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2013-09-25writerfilter: remove dead WW8DocumentFactoryMiklos Vajna1-7/+0
Change-Id: I9896c3b221d2ec4766b9ee63aadc90bff9c33ea6
2013-09-20writerfilter: OOXML theme saved in InteropGrabBagAndres Gomez1-0/+33
The XDocuments representing the DOM of an OOXML's theme document is now stored as the PropertyValue "OOXTheme" into the "InteropGraBag" property of the SwXTextDocument. Added the importSubStream() method to the writerfilter::ooxml::OOXMLDocumentImpl class in order to create the XDocument for the theme XML fragment stream and invoked it during the resolve() method. Modified the writerfilter::ooxml::OOXMLDocument abstract class to be able to hold the OOXML's theme XDocument. Added the set/getTheme() methods to store and obtain the XDocument directly. Modified the WriterFilter::filter() method to store the OOXML's theme XDocument in the "InteropGrabBag" property of the TextDocument service SwXTextDocument implementation. Updated the UTs accordingly. Change-Id: I3960590fcf4856caf770908b983ffb6898f061c0 Reviewed-on: https://gerrit.libreoffice.org/6002 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2013-01-08n#793998 sw: add TabOverMargin compat modeMiklos Vajna1-0/+1
In case the right margin is larger then the tab position (e.g. the right margin of 7cm, there is a tab position at 16cm and right margin begins at 9cm), we have a conflicting case. In Word, the tab has priority, so in this conflicting case, the text can be outside the specified margin. In Writer, the right margin has priority. Add a compat flag to let the tab have priority in Writer as well for Word formats. This is similar to TabOverflow, but that was only applied to left tabs and only in case there were no characters after the tabs in the paragraph.
2012-11-28API CHANGE: add a "position" parameter to XParagraph/TextPortionAppend methodsMiklos Vajna1-1/+1
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-10-29DOCX: w:doNotUseHTMLParagraphAutoSpacing should affect AddParaTableSpacingMiklos Vajna1-1/+0
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-13writerfilter: fix new clang warningsMiklos Vajna1-1/+0
Change-Id: I0f7cec0f300290fe3ea465f344cfda642824ed0b
2012-09-21fdo#49819 - allow slightly inconsistent docx files to be repairedMichael Meeks1-4/+3
2012-09-20n#779627: added quite some compat options from the ww8 filter on writerfilterCédric Bosdonnat1-0/+14
Change-Id: I9e8dee39f63a08517eb654e33747bd8c95d84b59
2012-09-14n#778140 enable AddParaTableSpacing for docx, as it's enabled for ww8 as wellMiklos Vajna1-0/+1
Change-Id: I7523be9f07d378e1c4d88468077653d3fa4161d3