summaryrefslogtreecommitdiff
path: root/oox
AgeCommit message (Collapse)AuthorFilesLines
2013-12-04drawingml import: don't set CharEscapementHeight unconditionallyMiklos Vajna1-1/+1
Commit 840a8573c8cebe67ddd3c9fe106c7dbd789bb334 (Fix fdo#70220 Superscript not imported from pptx., 2013-10-07) made it possible to set CharEscapementHeight even if moBaseline is not set, but this causes problems in the docx importer + not necessary, according to the bugdoc; so just don't do that. Change-Id: Ib95ac449bd8fdf6376261ddc86108f0d23f2200e
2013-12-04DOCX import: parse drawingML group shapes in oox onlyMiklos Vajna2-0/+5
This is similar to commit d5c934d150cb6cea5f96cbbee4fb5e8312bf027e (n#792778 DOCX import: parse group shapes in oox only, 2012-12-14), except that was for the VML importer. The only difference is that in case of drawingML, OOXMLFastContextHandlerShape::lcl_createFastChildContext() is only called for the children of the group shape, not for the element itself, so compare against the start token, not the current element. Change-Id: Iddeabb20bbd5f0153e2fc4e6df463830126fdd37
2013-12-03filter: handle ooxml shapes in EscherPropertyContainer::GetCustomShapeType()Miklos Vajna1-1/+1
The problem was that the shapes produced by the drawingML import had types like ooxml-triangle, and EnhancedCustomShapeTypeNames::Get() only handles VML/binary MSO shapes (e.g. isosceles-triangle). Add an OOXML mode, and in that case use msfilter::util::GETVMLShapeType() instead, and only fall back to EnhancedCustomShapeTypeNames::Get() if necessary. Change-Id: Ic93ba4719133dd3e96c17d2562642a03e559fefa
2013-12-02Add a means to check if a namespace exists.Kohei Yoshida4-1/+28
Useful when we just need to check if the stream has a certain namespace defined. Calling getNamespaceURL() may throw SAXException in such case. Change-Id: Ib2b7b202492390158270d87bab95d1793c9d8a70
2013-12-02oox: move lcl_GetPresetGeometry to msfilter, so filter can use itMiklos Vajna1-426/+2
Change-Id: Ia741d392a87eaa2f02615a6c9626417a420f205c
2013-12-02DOCX drawingML shape import: fix sw text frame transparenceMiklos Vajna1-0/+10
Mirror what the VML import's ShapeBase::convertShapeProperties() already does, fixes CppunitTest_sw_ooxmlexport's testFdo66688 when wps import is enabled by default. Change-Id: Iabed3a5fa1353aefe3055232ad0b7770067a7a58
2013-12-02DOCX drawingML shape import: handle inset attrs for sw text framesMiklos Vajna1-0/+15
When the drawingML shape import is enabled by default, testFdo66929 (from CppunitTest_sw_ooxmlexport) fails without this. Change-Id: I38fc64201aaf28ae2e07e57c498a64391ac56f07
2013-12-01small clean-upMarkus Mohrhard1-6/+1
2013-12-01fix 2D vs 3D coordinatesystem regression, fdo#67300Markus Mohrhard1-2/+2
regression from 088e86b865062dd4cc5ba0c85c6068dea62238db
2013-12-01fix validation error for OOXML chart export, related fdo#67300Markus Mohrhard1-2/+5
Change-Id: I7d74439bba3b912fe9b81ebeca865298bc32d71e
2013-11-28fdo#69636 DOCX drawingML shape import: handle vert=vert270 prop for sw framesMiklos Vajna4-12/+42
Change-Id: I95b4cfa0494c8115ebf23c76f4712b48d17bd463
2013-11-27oox: initial import of wpg:wgpMiklos Vajna5-1/+137
We import something that's visible, but the position of the shape is not correct yet. Change-Id: Ie68f0ebad1cc992a6c8d7704d7262f7e983f3b19
2013-11-27oox: add support for the wpg namespaceMiklos Vajna3-0/+3
The plan is that once these are here, the writerfilter ooxml tokenizer can refer to them. And then the writerfilter will call back to oox to do the real drawingml import. Change-Id: I00eec562e32df359231d1a170367ab75702f0049
2013-11-26oox: accelerate common case boolean reading.Michael Meeks1-0/+13
2013-11-26fastparser: Avoid copying all tokens into a sequence.Michael Meeks2-10/+7
2013-11-26DOCX drawingML shape import: initial wps:txbx positioningMiklos Vajna1-1/+1
Change-Id: Id779ed88d657257b614d910a2191ed4974612c8f
2013-11-26oox: avoid crash in ContextHandler2Helper::processCollectedChars()Miklos Vajna1-0/+2
Change-Id: Ie70c9914745364c7f2beb3cb84a610ec919a950c
2013-11-26DOCX drawingML shape import: no need to add TextFrames to the drawpageMiklos Vajna1-1/+2
As (not) done for the VML import in Drawing::createAndInsertXShape() already. Change-Id: Ib4eac941a46e09df6b5363e8c7eeacc2e6dbac6d
2013-11-26fdo#71434: don't show master text if PlaceHolder types definedKorrawit Pruegsanusak1-3/+20
I've added all of valid PlaceHolder types from http://www.schemacentral.com/sc/ooxml/t-p_ST_PlaceholderType.html Change-Id: I038fe43ff83699f92ff5eb9945bce12540058478 Reviewed-on: https://gerrit.libreoffice.org/6814 Reviewed-by: Muthu Subramanian K <muthusuba@gmail.com> Tested-by: Muthu Subramanian K <muthusuba@gmail.com>
2013-11-25Allow worker threads to use their own FastParser instances.Kohei Yoshida1-7/+23
To prevent deadlock during threaded sheet stream parsing. It now deadlocks at a different place. Change-Id: I0ba0f2c9a257e71b0a340ab14e369b06d5fd8829
2013-11-25A bit of cleanup.Kohei Yoshida1-31/+13
Change-Id: I576a184ebc8422d760800c670f8d9070f66e9e78
2013-11-25No indent on namespaces.Kohei Yoshida1-62/+63
Change-Id: I2639a51c2faa19373a335c28b160862435cd6dbe
2013-11-24Support regression curve name in OOXML (import & export).Tomaž Vajngerl3-11/+20
Change-Id: I847e0df4f160e4b5078961a0e77c1e1e3fff9bd4
2013-11-23widht -> widthJulien Nabet1-1/+1
Change-Id: I661eeb167a95540a223ce72aac51789daf3767dc
2013-11-22oox: avoid per element allocation and freeing of OUStringBuffers.Michael Meeks1-2/+2
Change-Id: Ie4d4d7740ae002422f73a3bfc57e1fe1ad67e50f
2013-11-22getChar() to return a null-terminated char array.Kohei Yoshida1-8/+6
No need to fetch string size with this change. Change-Id: Iae5f6c60430fc57985a0fec5bfec59727e5a8f0f
2013-11-22Compiler warning.Kohei Yoshida1-1/+1
Change-Id: I66b16e9767369fd54611f92d66cd1b43f4e8c5a8
2013-11-22replace OUString::reverseCompareTo("xxx") with operator==Noel Grandin1-20/+20
operator== with OUString and literal internally does a reverse-compare (via OUString::equalsAsciiL) anyway, so no need to keep explicit calls to OUString::reverseCompareTo with literal argument Change-Id: I799d9bcd0d5c308a9547ce7cacb2db6042fdb643
2013-11-22remove unnecessary RTL_CONSTASCII_STRINGPARAMNoel Grandin1-1/+1
A final pass through the code, converting code to use the new OUString and OString methods that can detect string literals. Change-Id: Ifa6382335e5650a1c67e52006b26354e0692c710
2013-11-21DOCX drawingML shape import: initial wps:txbx handlingMiklos Vajna1-0/+3
A proper textframe is created, but the text on the shape is still outside the frame. Change-Id: I042295cfdd61ce9c0ee52cdf5e8700d8d2b1b1c5
2013-11-21oox: tokenize wps:txbxMiklos Vajna1-0/+1
Change-Id: I627d5f151e5bf1ae4604e32763ef5afeb66a0cfa
2013-11-21DOCX drawingML shape import: fix position when CustomShapeGeometry is setMiklos Vajna4-0/+34
DOCX drawingML shapes had wrong position if they had their CustomShapeGeometry set (e.g. flipped). This wasn't a problem for VML shapes, as there the shape knows its position, and position was always set in oox as well, not in writerfilter. However, in case of WPS shapes, oox created the shape, and previously writerfilter set the position after-the-fact. This leads to incorrect results if CustomShapeGeometry is involved. Fix this by passing the position from writerfilter to oox, and call setPosition() after creation, but before CustomShapeGeometry is set. The other problem was that normally writerfilter learns the position of the shape when relevant token in GraphicImport::lcl_sprm() arrives, but this happens after OOXMLFastContextHandlerShape::sendShape() needs that information. Work around this by accessing the PositionHandler directly. Change-Id: Iced35dc9467ef77c41f1897f124729f686bd045e
2013-11-21remove unnecessary use of OUString::createFromAsciiNoel Grandin2-4/+4
Convert code like this: OUString aStrSpacing(OUString::createFromAscii("spacing")); to: OUString aStrSpacing("spacing"); Change-Id: Ia2b7d6b42f35d33cfe587a0d6668030f3537fa6d
2013-11-20Expose raw char array and use it to avoid OUString allocations.Kohei Yoshida1-0/+12
In SheetDataContext::importCell(). Change-Id: I52db64219f672ea5fbbda17686bf1173ceac5926
2013-11-20fastparser: avoid excessive alloc/frees for int / bool / double parsingMichael Meeks1-7/+20
Change-Id: I596bbc723558f04588d9e767d64732164524e57a
2013-11-19oox: tokenize wps:cNvCnPrMiklos Vajna2-0/+3
Change-Id: I4d7a962e01f5a41c3ea629f73433416195f2259c
2013-11-19remove unnecessary use of OUString constructor when assigningNoel Grandin2-13/+13
change code like aStr = OUString("xxxx"); to aStr = "xxxx"; Change-Id: Ib981a5cc735677ec5dba76ef9279a107d22e99d4
2013-11-15fdo#71581: Use pictureFrame for images.Muthu Subramanian1-1/+1
Which would be a simple rect instead of the complicated shape.
2013-11-14fdo#65295 - fix gradient focus issueAdam Co1-1/+1
There was a wrong 'if' statement, that checked if the focus was over 75% and also if the angle was less than 180. If so - it compensated for that by adding 180 degrees to the angle (and losing the 'focus' attribute). But it should do that even if the angle is more than 180 degrees, so this was fixed. Reviewed on: https://gerrit.libreoffice.org/6647 Change-Id: Ib2dc8a61359e656721c5c6c99587d4d547eed835
2013-11-14fdo#70457: Preserve rotation of embedded bitmaps from docxJacobo Aragunde Pérez1-0/+3
When importing bitmaps coming from VML code, we were mistakenly ignoring rotation information: we have just added it to the existing XShape object. In the case of bitmaps expressed in DrawingML, the code was transforming them into SwXTextGraphicObjects which don't have rotation information. We are now preventing that transformation when rotation value differs from zero, leaving the XShape object that was built in the first pass through the document. Added a unit test. Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx Reviewed on: https://gerrit.libreoffice.org/6484 Change-Id: I40100f8919894e48c005f8ed445bb5cad4f58d8b
2013-11-14fdo#70838: Fix size issue when exporting shapes to docx.Jacobo Aragunde Pérez1-9/+1
We were saving the size of the rotated shape bounding box in the docx file but that size was being interpreted as the size of the original, unrotated shape. Now VMLExport::Commit will use the dimensions of the rectangle received as a parameter to save to the file instead of those returned by SdrAttrObject ->GetSnapRect Change-Id: I53670db77f5e5320a87579dcd56617d5ccf1851a Reviewed-on: https://gerrit.libreoffice.org/6432 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2013-11-14Move MediaDescriptor from comphelper to unotoolsStephan Bergmann6-11/+9
...so it will be able to use SvtSecurityOptions internally. Change-Id: Id7433247e8fc53651935578510bedbcca5aa2ac9
2013-11-14Make requestAndVerifyDocPassword var with MediaDescriptor a mem fn of latterStephan Bergmann1-2/+2
Change-Id: I645d554c7ce592d93ca0696fa7e6068ce40c9058
2013-11-14remove unnecessary sal_Unicode casts in OOX moduleNoel Grandin11-28/+28
Change-Id: I2b9f26cb500a9e56f5860bd1b483ed284b84f50d
2013-11-13n#828390: Export subscript text.Muthu Subramanian1-0/+13
2013-11-13oox: initial import of wps:wspMiklos Vajna5-1/+135
We import something that's visible, but the shape is always inline, even when it has to be anchored. Change-Id: I6e20aa1a208f06731098ad21bb51c1ca840213d0
2013-11-13oox: add support for the wps namespaceMiklos Vajna3-0/+3
The plan is that once these are here, the writerfilter ooxml tokenizer can refer to them. And then the writerfilter will call back to oox to do the real drawingml import. Change-Id: I1f860d1ade21cde767ad259d46b8d38ff167662f
2013-11-12 #65836- Fix for exporting image inside vml data was corrupting file.sushil_shinde1-2/+7
- Handled exporting of image for all type of format in vmlexport. - fixed issue - .rels file was not getting exported for vmlexport. - Not handled for .wmf image (will work on it) Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx Reviewed on: https://gerrit.libreoffice.org/6369 Change-Id: I9ccf7a36ae316a658f06d1074caa4e4b2f5d271f
2013-11-11convert OUString compareToAscii == 0 to equalsAsciiNoel Grandin6-7/+7
Convert code like aStr.compareToAscii("XXX") == 0 to aStr.equalsAscii("XXX") which is both easier to read and faster. Change-Id: I448abf58f2fa0e7715dba53f8e8825ca0587c83f
2013-11-11convert OUString !compareToAscii to equalsAsciiNoel Grandin1-3/+3
Convert code like if( ! aStr.compareToAscii("XXX") ) to if( aStr.equalsAscii("XXX") ) which is both clearer and faster. Change-Id: I267511bccab52f5225b291acbfa4e388b5a5302b