summaryrefslogtreecommitdiff
path: root/writerfilter
AgeCommit message (Collapse)Author
2012-09-28gbuild: split uwinapi out of gb_STDLIBSMichael Stahl
Change-Id: I53316e0b9369d806197bccb42cf22d3497af43e7
2012-09-28n#782061 DOCX import: w:position should respect w:sz in w:rPrDefaultMiklos Vajna
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
2012-09-27writerfilter: unused includes in DomainMapper_ImplMiklos Vajna
Change-Id: I6df840e20da98918a8f1531e8d77a5b5c53101fb
2012-09-27n#781825 fix DOCX import of bottom para margin autospacingMiklos Vajna
If w:doNotUseHTMLParagraphAutoSpacing is enabled, it should be 100, not 200, see SwWW8ImplReader::GetParagraphAutoSpace(). Change-Id: I29c5e97c828f0f55b655410198bfa03dc42a196d
2012-09-26Apply shadow effect to graphics when importing from docx.Eilidh McAdam
Graphical objects imported into a text document do not seem to support differing X and Y distances for shadows, so the distance has been approximated by using the average of the two components. Change-Id: Ifd0c6d73b618cb2836837348d6f48c0efc0a9dc3 Reviewed-on: https://gerrit.libreoffice.org/703 Reviewed-by: Noel Power <noel.power@suse.com> Tested-by: Noel Power <noel.power@suse.com>
2012-09-26n#780843 fix docx import of cont section's header/footer on title pageMiklos Vajna
Change-Id: I129e154a3fea8a96607dc6350a99f4d6ca68196e
2012-09-25n#780853 fix DOCX import of w:sdtContent in table cellMiklos Vajna
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
2012-09-24warning C4482: nonstandard extension used: enum used in qualified nameStephan Bergmann
Change-Id: If00750b312cd4a13e85c5f9b083161d5eb30157d
2012-09-24fdo#49655 fix RTF import of text in the middle of table definitionMiklos Vajna
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. Change-Id: I34f1df7e171316a7d926179689627301860d492f
2012-09-24fdo#49655 dmapper: fix default page style layoutMiklos Vajna
The default in Writer is mirrored, but in Word it's left and right. Change-Id: I8c615a3a18ad7493deb2a3a9369c13f3e4d5799d
2012-09-22let's do this the other way around...David Tardon
This reverts commit 587ac17d51ded650ed72bb68a126587a9c2ca698.
2012-09-22fix typo causing missing dependencyMatúš Kukan
Change-Id: I9ac316b0491d2c2c69308c0a78e1be0009bf2caf
2012-09-21fdo#49819 - allow slightly inconsistent docx files to be repairedMichael Meeks
2012-09-21n#780563: Fixed table import in shapes table handler was missingCédric Bosdonnat
Change-Id: I7720cfc706d9612fcc1e8a53b13a31f22b91d99e
2012-09-21n#779627: fixed writerfilter import of grid when there are nested tablesCédric Bosdonnat
When a nested table is ended, it resets the m_nCell to 0... and thus the filter forgets about the previous cells of the outer table row it is importing. Using a vector to store the m_nCell values for each table solves the problem Change-Id: I8007960f4c95d713bfedc6b815d5783a5d25af23
2012-09-21fdo#55187 fix DOCX import of unicode 0xNN0d when it's a separate runMiklos Vajna
E.g. 0x010d was parsed as a newline character... This also makes the RTF workaround from fdo#39856 unnecessary. Change-Id: I5e4a95b4436e1492b64961820702caace0a33e4b
2012-09-21fdo#52389 fix RTF import of paragraph without RTF_PAR at the end of the docMiklos Vajna
Change-Id: Ib7b48986d5b01c75ae0be8dd6618a2e8be2ae51c
2012-09-20docx import: position table using tblInd OR tblCellMarPierre-Eric Pelloux-Prayer
Previously cell-margin was unconditionnaly used to compute table position. Office only does so on top-level tables and if tblInd is missing. Change-Id: I183647bcf090d5822b3f2e04e097c8bbd277168d
2012-09-20n#779627: added quite some compat options from the ww8 filter on writerfilterCédric Bosdonnat
Change-Id: I9e8dee39f63a08517eb654e33747bd8c95d84b59
2012-09-19writerfilter: try to make clang tinderbox happyMiklos Vajna
Change-Id: If24e8e3e48f8d043fdb48a0637e874743f9247f0
2012-09-19Import RTF shape wrap property.Eilidh McAdam
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 Change-Id: Ic700e06bf9ef894a6efa7e8d033888ed80a7082f Reviewed-on: https://gerrit.libreoffice.org/647 Reviewed-by: Miklos Vajna <vmiklos@suse.cz> Tested-by: Miklos Vajna <vmiklos@suse.cz>
2012-09-19Correctly import multiple-point curves from RTF document.Eilidh McAdam
The RTF segment specifier seems to indicate the type of segment with the first two bytes and how many points the specifier applies to with the last two bytes. Note that without further test docs, this hypothesis is yet to be thoroughly tested. Change-Id: I6f85435f52ef244b9c417e67d54c236ef4c7f149 Reviewed-on: https://gerrit.libreoffice.org/646 Reviewed-by: Miklos Vajna <vmiklos@suse.cz> Tested-by: Miklos Vajna <vmiklos@suse.cz>
2012-09-19n#778828 fix docx import of continous section break on title pageMiklos Vajna
Change-Id: Ib9e9cce5abdcf00c2546f831c8af191da10e1b15
2012-09-18deprecate oustringostreaminserter.hxxNorbert Thiebaud
the intent of this header has canged over time. now it is already systematically included with ustring.hxx and the operator overload it provide fit nicely there... Just to be safe, since that include as been added to the api during the 3.5 timeframe and therefore is already in 'production' the header remain and simply attempt to include ustring.hxx but a warning is issued indicating that this header should not be used anymore... in a couple of major release we will thenr emove it completely All internal users of that header are converted. Change-Id: I8934c55f089e29d78c0f5649b7c87b2ecf024bad Reviewed-on: https://gerrit.libreoffice.org/634 Tested-by: Norbert Thiebaud <nthiebaud@gmail.com> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2012-09-17targetted make reversion.Bjoern Michaelsen
2012-09-17fix typoMiklos Vajna
Change-Id: Iaccb9a09576e47ad35161f9ac5e4f07c192267d9
2012-09-17n#778140 DOCX import of w:doNotUseHTMLParagraphAutoSpacing compat optionMiklos Vajna
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. Change-Id: I152a76d8fcdef3acf5491783c2ccacd2d48e76b3
2012-09-14Improvement on previous commit, UCB clean upStephan Bergmann
* As UCB is only ever initialized with "Local"/"Office", remove this configuration vector completely. The "create" ctor creates an instance internally initialized with those "Local"/"Office" keys. Special (test) code can still instantiate an uninitialized one via plain createInstance. And for backwards compatilibity process startup still ensures to create an initialized instance early, in case there is still code out there (in extensions) that later calls plain createInstance and expects to get the already-initialized (single) instance. * XInitialization is an "implementation detail" of the UniversalContentBroker service, do not expose in XUniversalContentBroker. * ucbhelper/configurationkeys.hxx is no longer needed and is removed. * ucbhelper/contentbroker.hxx is an empty wrapper and is removed; however, that requires ucbhelper::Content constructors to take explicit XComponentContext arguments now. * The only remaining code in ucbhelper/source/client/contentbroker.cxx is Android-only InitUCBHelper. Is that relevant still? Change-Id: I3f7bddd0456bffbcd13590c66d9011915c760f28
2012-09-14n#778140 fix import of w:fldSimple character propertiesMiklos Vajna
The character properties of the field are applied when the next run begins, so insert an empty run right after the field to fix the issue. Change-Id: I18d747d99d6604fa331a0e70e6989f9f4975eab2
2012-09-14n#778140 as the comment says, it's 100 twipsMiklos Vajna
Change-Id: If2e0d2f4805cd04bec0dd7983ec544b9922ef796
2012-09-14n#778140 enable AddParaTableSpacing for docx, as it's enabled for ww8 as wellMiklos Vajna
Change-Id: I7523be9f07d378e1c4d88468077653d3fa4161d3
2012-09-13n#778836 fix DOCX import of right margin vs numbering and paragraph stylesMiklos Vajna
The problem was that the left / first paragraph margin was defined in the numbering style, and that zeroed out the already inherited right margin. Change-Id: Ife521d1de4868a7be33de5f8d6af363d10cbc903
2012-09-12Resolves: rhbz#831755 crash with 0 dyaLinePitch in .docxCaolán McNamara
This is similar to fdo#40686 (dyaLinePitch only valid between [1-31680]) for the .doc format Change-Id: I7d2745d695320b4b6b22ec2b519f092932587c2e
2012-09-12n#778133 sw: add BackgroundParaOverDrawings compat flagMiklos Vajna
In Word, the layer that contains a background image is behind the layer that contains the paragraph background. In Writer, the paragraph background is painted before the hell layer. Add a compat flag to change the order, so the DOCX importer can trigger that. To reproduce, create an XShape, send it to the background, set some color for a paragraph background, and notice that the background color is missing where the shape is behind the text. Change-Id: I9b1fffd9ac9a6e5a1c3d1f65371440047d125b38
2012-09-10Related: rhbz#855541 ensure PropertyNameSupplier singleton ctor is threadsafeCaolán McNamara
nothing really to do with odd multithreaded run_exit_handlers bug, just tidied it up in passing Change-Id: I9e56a21f92e5f89bbcb4413bb7cae44c48affb17
2012-09-10-Werror,-Wunused-private-fieldStephan Bergmann
Change-Id: I749184b885f8da29f2656e8ae29b981eeb9bbc7f
2012-09-07move the code for adding temporary fonts to a separate classLuboš Luňák
I'm a bit confused on how this stuff is separated between platforms, so better do it this way. Change-Id: I2dbd9baef587c81ee37b509bde272ef970f5b118
2012-09-06read support for docx w:embedTrueTypeFonts/w:embedSystemFontsLuboš Luňák
No write support yet. Change-Id: Ia10239acc77cf9ebc4f511e30c007da36abf43cb
2012-09-06basic .docx read support for embedded fonts (w:embedRegular etc.)Luboš Luňák
Change-Id: I9bbca2e348bd999e05f6d9e53f3bbcd2d6bb911a
2012-09-06temporarily set a substream as the document streamLuboš Luňák
If this is not done, then mpStream still refers to the main stream, and so e.g. resolving references uses the main document instead of the substream (specifically, in a followup commit, w:embedRegular will use _rels/document.xml.rels instead of _rels/fontTable.xml.rels). Change-Id: Ibf250b82f38be0b24a6c2b6198b6c96ab7f0423c
2012-09-06Java cleanup, remove unnecessary importsNoel Grandin
Change-Id: Iacfcb2e16cb0e3c25a4cd0678a374fe5111284f7
2012-09-04n#775270: clip pictures instead of scaling they don't fitCédric Bosdonnat
Word clips pictures that are bigger than a page instead of scaling them down. This patch introduces a new compatibility option to allow clipping a picture in Writer instead of scaling it down. Change-Id: I4defbee05be81e23ec28a2ed272eaf4e4cc6faf5
2012-08-31-Werror,-Wunused-private-field (Clang towards 3.2)Stephan Bergmann
Change-Id: If8ed0534ba282145e66b023777820c9c09b2b496
2012-08-30n#777337 fix DOCX import of title page top/bottom margin with headers/footersMiklos Vajna
SectionPropertyMap::PrepareHeaderFooterProperties() already backed up m_nTopMargin to have the same result when that method is called multiple times. Do the same for the header footer height values as well to match the WW8 behaviour. Change-Id: Ib2347abc3db39308900c7721c0e15de040d9a01f
2012-08-28Move group handling from RTFDocumentImpl to RTFTokenizerMiklos Vajna
This is one step towards hiding the RTFDocument implementation from RTFTokenizer. Change-Id: Ief35a2440cac3147495675d344e1efc64f5fbc2e
2012-08-28fdo#52052 fix RTF import of page breaks on landscape pagesMiklos Vajna
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. Change-Id: I22bc355994991beeadb41d26b44ce3e2beedbdb2
2012-08-27n#775899 docx import of w:usePrinterMetrics compat optionMiklos Vajna
This was set unconditionally, but it turns out it's not the default for docx, it's triggered by a compat flag there as well. Change-Id: I84dccfe7ffd49fbc6878b19ff4276f8a36b827a3
2012-08-27n#775899 docx import: set PrinterIndependentLayout like ww8 doesMiklos Vajna
Change-Id: I32869aa3d7b6b25c7eb9756d79ea7126130afc4b
2012-08-23refactor duplicated code to DomainMapper_Impl::getCurrentNumberingPropertyMiklos Vajna
Change-Id: Id68df67e1301d0eed74c3bdcaabc7c601d72770b
2012-08-23n#775906 dmapper: fix inherited first/left margin vs w:ind/w:rightMiklos Vajna
This is similar to 89f208c, but here the direct right margin reset the left/first margin, inherited from the numbering style. Change-Id: I2d238740c24db7607719dcefb17565656592be44