summaryrefslogtreecommitdiffstats
path: root/writerfilter
Commit message (Collapse)AuthorAgeFilesLines
* rtl::OUStringLiteral to the rescueStephan Bergmann2014-12-171-2/+2
| | | | | | | ...for cases where ? "a" : "bb" does not work, as well as to work around the MSVC bug for cases like ? "a" : "b". Change-Id: Id404716047aca5cc81440f291616d92365379b8f
* fix Windows buildLászló Németh2014-12-171-1/+1
| | | | Change-Id: I690163d7ab6d62c93da33d416e8757311f5d35c1
* (related fdo#84685): writerfilter: RTF import: support \tc TOC entryMichael Stahl2014-12-162-1/+10
| | | | Change-Id: Icda252e1f092707728d3a24df50fba7080e759bb
* fdo#84685: writerfilter: RTF import: support \xe index entryMichael Stahl2014-12-162-0/+19
| | | | Change-Id: Ia957541a5997961aa86b2eb8537ebd29d3092691
* writerfilter: Use appropriate OUString functions on string constantsStephan Bergmann2014-12-152-5/+4
| | | | Change-Id: I113dba36c8c6a15f93fb4f15cd85ddb07ce5eecf
* Unused includesMiklos Vajna2014-12-151-1/+0
| | | | Change-Id: I84e475a64cf09e4eeea524b73f8febf7f0a1a46b
* fdo#86761 RTF import: positive border width and fLine=0 means no borderMiklos Vajna2014-12-142-1/+4
| | | | | | | | | | | | | | | | | Regression from 01a32b7d074511bed24044dc94e1159aea62722b (fdo#85179 RTF filter: import image border, 2014-10-23), there were a number of problems here: - CppunitTest_sw_htmlexport: revert back to the old behavior, where in case there is no border, we don't set the color of it. - The testcase of the above commit omitted fLine=1 shape property, which is present in the original bugdoc, and only with that should we put a border around the shape. - Let fLine=1 explicitly change the line style from NONE. - dmapper: if line style is NONE, then don't bother setting the border color and width. Change-Id: Iffee41066d42822b699c478821645b9742df3f58
* writerfilter: only dmapper needs LoggedResourcesMiklos Vajna2014-12-1326-30/+30
| | | | Change-Id: Ic8c691c4185ec8b808e75885f9354c35d68be58c
* writerfilter: only dmapper needs DomainMapper.hxxMiklos Vajna2014-12-1311-12/+11
| | | | Change-Id: I9508938754cf353ecc210eb13d7063ac7ef437bf
* Avoid '#include "../'Miklos Vajna2014-12-138-18/+42
| | | | Change-Id: I1ae598269b81095dc7d6ad83044f228d1297bfb8
* writerfilter: use DomainMapperFactoryMiklos Vajna2014-12-132-4/+3
| | | | Change-Id: I8053676f9aec8f20dc9753c5651a072c5d80c1f2
* writerfilter: let ImportFilter only assume that DomainMapper is a StreamMiklos Vajna2014-12-122-6/+14
| | | | Change-Id: I2e0db194357657df81d8cd94f42cdfbd2c3a2664
* writerfilter: add a factory for DomainMapperMiklos Vajna2014-12-125-8/+84
| | | | | | | | | Ideally the XFilter implementations should only know that DomainMapper implements Stream, nothing more. Add a factory and use it in RtfFilter. When ImportFilter will do the same, then the DomainMapper class definition can be an implementation detail. Change-Id: If19cf23e61c2f78189d834261d57c569b9173b12
* DOCX import: handle <w:autoHyphenation/>Miklos Vajna2014-12-111-0/+24
| | | | | | It's the OOXML equivalent of the fAutoHyphen DOP flag from [MS-DOC]. Change-Id: Iae66dcd0d350ce4ebee3c3493ee07eff0d9a5e1d
* writerfilter: clean up useless debug output in ooxmltokMiklos Vajna2014-12-111-6/+0
| | | | | | | OOXMLFastDocumentHandler::createFastChildContext() is called for the streams we expect, no need to unconditionally produce output there. Change-Id: I164b3c4dc6f2294487e1b1283266957d8f24cbbb
* revert writer won't allow us to enter multiple CrossRefBookmarkCaolán McNamara2014-12-102-27/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | i.e. commit af64f430181088460d5c574683dd1fdfd377ebcd Date: Mon Dec 8 16:11:41 2014 +0000 writer won't allow us to enter multiple CrossRefBookmarks on the same node e.g. fdo63164-1.docx and loads more like that, and the .docx genuinely has multiple bookmarks at the same place, so just allow the first one and discard the following ones in favour of commit 7a12360e1f2c0a5bc0927131a750740d35cfd1ab Date: Wed Dec 10 14:56:27 2014 +0100 sw: don't assert when SwXBookmark creates duplicate CrossRef*Bookmark The bugdoc of fdo#87110 has a couple such duplicates. Check for it and let SwXBookmark throw an IllegalArgumentException. but leave test doc in place Change-Id: Ib0bfc991684b2c9c4f1959a17c49bf1c0179be79
* stray fprintfCaolán McNamara2014-12-101-3/+0
| | | | Change-Id: I9046c57440b6adb83204d0f596b1cb8467405dfa
* writerfilter: move QNameToString to the OOXML tokenizerMiklos Vajna2014-12-0910-15/+15
| | | | | | | It's filled with contents in the OOXML tokenizer anyway, keeping its interface outside of it is pointless. Change-Id: I10051c5b41a1247417bfb3dd3170a76bf20925aa
* writerfilter: no need to include QNameToString in dmapperMiklos Vajna2014-12-094-21/+0
| | | | | | | | All dmapper handler classes inherit from LoggedProperties, which takes care of logging already, and QNameToString is only useful to turn the numerical IDs into dmapper token strings. Change-Id: I437f2c815293caeda0dabbe65cf9458ae5a60566
* writerfilter: move include to the implementationMiklos Vajna2014-12-092-1/+1
| | | | Change-Id: I27b3c5276c5bfd1a29d8edadc6078c71cfbf2609
* writer won't allow us to enter multiple CrossRefBookmarks on the same nodeCaolán McNamara2014-12-082-4/+30
| | | | | | | | e.g. fdo63164-1.docx and loads more like that, and the .docx genuinely has multiple bookmarks at the same place, so just allow the first one and discard the following ones Change-Id: Ida2f5d79fdef4ed3e2d8c1e96ca6a086004f6c7d
* fdo#38835 strip out OUString globalsNoel Grandin2014-12-081-4/+4
| | | | Change-Id: I1a435214af102461e02217f7d95248dac14e5f1a
* fdo#86750 RTF import: fix table of contents linksMiklos Vajna2014-12-081-0/+9
| | | | Change-Id: I0f3d35a0e64c9ce5646fa63eda317bee42de5540
* writerfilter: util.hxx is used only inside dmapperMiklos Vajna2014-12-079-26/+21
| | | | Change-Id: Ia3736c32c460b466649f10f4790c30d0d25f8c5e
* writerfilter: unneeded include in GraphicHelpers.hxxMiklos Vajna2014-12-062-2/+3
| | | | Change-Id: I720db5fd2fb1a5c1e89e7d375541af035ebbd97f
* No need to have TableDataHandler as a templateMiklos Vajna2014-12-064-17/+10
| | | | Change-Id: If19feb011db4027bae6f0c59b48967657c36b7a8
* No need to have CellData as a templateMiklos Vajna2014-12-061-17/+15
| | | | Change-Id: I700b817b446cc11b2475800fb5b1f4c8f8c8b003
* No need to have RowData as a templateMiklos Vajna2014-12-063-22/+19
| | | | Change-Id: Id93b97b69d1f9d44e5e5314698e7a3a0790e51e3
* No need to have TableData as a templateMiklos Vajna2014-12-043-17/+15
| | | | Change-Id: I136f844c3823443a8a42eb7a6e41d3805b085bd1
* DOCX filter: effect extent should be part of the marginMiklos Vajna2014-12-041-0/+4
| | | | | | | | | | | OOXML has an object size (extent) a size including effects like shadow (effect extent) and the margin (top/bottom/left/right distance). Our doc model doesn't have an explicit "effect extent", but to have the intended layout, we at least need the spacing of the effect around flys (even if a number of effects are not rendered). Fix this by adding the effect extent to the margin; if we still have the effect extent grab-bag around, then this can be undone during export. Change-Id: I9609ce347c54588395e09ad91a84c872b9007f85
* TableData is only used with PropertiesPointer=TablePropertyMapPtrMiklos Vajna2014-12-043-28/+20
| | | | Change-Id: I613addb6cd8b57fce90659209503f633ee438a58
* writerfilter: only dmapper needs TableDataMiklos Vajna2014-12-032-5/+7
| | | | Change-Id: I4c2ead05d845eebe101d34ed8fe9284509beb752
* DomainMapperTableManager::m_bOOXML was always trueMiklos Vajna2014-12-023-9/+6
| | | | Change-Id: Icfbd0d779fac949484b37ee861e083a449b225c2
* Windows build fixAndras Timar2014-12-011-2/+2
| | | | Change-Id: I59c24c04965d7c582a1288d86cb589eb3c8290a2
* loplugin:unreffun: PropertySetDumpHandlerMiklos Vajna2014-11-301-64/+0
| | | | Change-Id: I5e2776a7c7a01ea7486b7608a8664aa88842a510
* Avoid having TableManager as a template classMiklos Vajna2014-11-306-523/+522
| | | | | | It was always used with T=css::uno::Reference<css::text::XTextRange> Change-Id: If79413cf68ad5d5f6fc7aba1c065f49e5781d71d
* TableManager is only used with PropertiesPointer=TablePropertyMapPtrMiklos Vajna2014-11-303-118/+109
| | | | Change-Id: Ie036cafd769328d9d5cc42265534ed8f7c0d0f2c
* Unused writerfilter::TagLogger::propertySetMiklos Vajna2014-11-302-14/+0
| | | | Change-Id: If0dd607823cad5dbc2da2df93ed0847a34791b58
* writerfilter: only dmapper needs TableManager.hxxMiklos Vajna2014-11-305-7/+8
| | | | Change-Id: I3354f82a3dd0a598b5405ab32c5d1b0d370829c3
* writerfilter: turn RTFOverwrite into a C++11 scoped enumerationMiklos Vajna2014-11-304-54/+43
| | | | Change-Id: Ic49033c85f77be8ba415078ae5e3518ef0faae75
* fdo#72031 RTF import: bogus call to getBestTextEncodingFromLocale()Miklos Vajna2014-11-301-10/+16
| | | | | | | | | | | | | | | | | | | | | | There were two problems here. First, commit bbe3627eece0c3486e7ea11f2f13377aaa3a8fed (rtftok: stop sending sprm:CRgFtc{0,1,2} tokens, 2014-03-05) broke the use-case when the font encoding is 0, but it's present. Before that commit, we parsed the font encoding instantly; after that commit we parse it once we have a font name. If we do that, then we have to have an idea if we have a font encoding. Given that 0 is a valid encoding, use -1 for the "have no encoding" case instead. Second, commit 7839633fb356285652ed96f4bf3f85bcd5b561a4 (fdo#85889 handle pc, pca and mac rtf keywords in writerfilter, 2014-11-24) abused m_nCurrentEncoding, which is meant to be used within the font table only. The problem with this is that this way only the first font will get the encoding, while the spec says it should be used in every context where there is no other explicit encoding. Fix this by setting the default encoding for those 3 control words instead -- and consider the default encoding in getEncoding(). Change-Id: Ia1d71f8ce70f2a53a3770b4840e21362d082e71f
* DOCX import: ignore <w:tblpPr> in shape textMiklos Vajna2014-11-283-1/+13
| | | | | | | | | | | | Floating tables are kind of anchored objects, which are not supported in shape text by Word, so we should ignore their flotation on import as well. Note that there is no need for a setIsInShape(false) in PopShapeContext() as we pop the whole table manager from the stack anyway. Change-Id: Ie9e88d2c83c0c34a01922e6e89f69f6089585b4b
* always pass bookmark name through to domainmapperCaolán McNamara2014-11-261-8/+5
| | | | | | | | | | | | | the rtf doc has three bookmark starts but only two matching bookmark ends. The tokenizer has three starts 0, 1, 2, but 0 is missing an end. Without the end of 0, the mapper never inserts an entry for it, so later inserts the start of rtftok index 1 as mapper index 0, and passing the end for a bare "1" cannot be found by index. If we pass the name then it finds it by name as mapper index 0 and all is well. Change-Id: I344db84e4f1c7d55fca59cdfe692080c7d0b8033
* writerfilter: Value stored to 'nPos' is never readMiklos Vajna2014-11-251-1/+0
| | | | Change-Id: Ic5b871e0e71b72b4aacc678200c26939a0065063
* fdo#85889 handle pc, pca and mac rtf keywords in writerfilterAndras Timar2014-11-241-0/+12
| | | | Change-Id: Ic54f2233a37562bdc516e440af0b4b7973f56342
* Revert "fdo#85889 handle pc, pca and mac rtf keywords in writerfilter"Andras Timar2014-11-241-12/+0
| | | | This reverts commit 31ef2b6396e2ebec10f84f21dfdee645690f5e62.
* fdo#85889 handle pc, pca and mac rtf keywords in writerfilterAndras Timar2014-11-241-0/+12
| | | | Change-Id: Ic54f2233a37562bdc516e440af0b4b7973f56342
* fdo#82006 RTF filter: import \sbauto and \saautoMiklos Vajna2014-11-221-0/+8
| | | | Change-Id: Iabff543c8191fc86dceb9274ea1552f60d73dabd
* RTF import: fix handling of multiple \lfolevel control wordsMiklos Vajna2014-11-221-1/+1
| | | | Change-Id: I242853d491c2ef83f192486fa6fe5a3407700047
* Use comphelper::SequenceAsVectorMiklos Vajna2014-11-221-10/+2
| | | | Change-Id: I0d2c312f903a2a326961430caa772a4841f4fa87