/unoxml/

LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/oox/inc/drawingml/customshapeproperties.hxx
AgeCommit message (Collapse)Author
2023-11-17Add getUnicodeTokenName() to StaticTokenMap and use...Regina Henschel
it in several places. Currently these places get a Sequence<sal_Int8> by call of StaticTokenMap().getUtf8TokenName() and immediately after that generate an OUString from it using reinterpret_cast<const char*> and the OUString ctor with 8-Bit character buffer array. The patch moves this conversion to StaticTokenMap. Change-Id: Ia2af110e2a0f1708e0685115d325c1c12cab3857 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159514 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2022-10-31tdf#113187 exclude angle conversion from count of maGuideListRegina Henschel
The ooxml import uses the special viewBox value '0 0 0 0' to indicate that the point coordinates are relative to shape size and not to viewBox and need special treatment. To detect this case the number of guides in maGuideList was used. But that number might be larger than the guides in ooxml because each arcTo command introduces two additional guides for the conversion from 1/60000 degree in ooxml to degree in LibreOffice. The patch excludes these guides from count. Thus now a path which has no references in its points will get a viewBox with non-zero width and height in all cases and is rendered now. Change-Id: I410638a1fe02f692fd46313c88b5ea518f1d094f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142050 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2022-09-14tdf#149551 use 'WritingMode' instead of TextPreRotateAngleRegina Henschel
Commit 7e23cbdbb6ec0247a29ed8a8f744c01e10963ea0 changed the code so, that TextPreRotateAngle is used to track ooxml vert attribute. This patch changes it so, that the style attribute WritingMode is used. Now text direction can be written in 'writing-mode' attribute in the graphic properties in ODF, same for shapes as for frames. The needed conversion from WritingMode BT-LR and TB_LR90 to TextPreRotateAngle for rendering of text in custom shapes is now in one place in class SdrObjectCustomshape. The shape edit engine cannot yet render it itself. Some unit tests are adapted to use WritingMode property instead of TextPreRotateAngle. The value text::WritingMode2::TB_RL90 is introduced, corresponding to vert='vert' and textDirection='tbRl' or ='rl' in OOXML. It is used for frames too, so that the original text direction is preserved and vert='eaVert' can be distinguished from vert='vert'. TextPreRotateAngle is currently still used in SmartArt import for 'upr' and 'grav' and in emulating 'upright' but no longer to emulate text direction. Change-Id: Idc4339bbfc3592fe90b154d75e2c404a1fa30856 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138813 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-07-20tdf#149551 separate TextRotateAngle from TextPreRotateAngleRegina Henschel
The import filter had only one member for both and had it mapped to TextPreRotateAngle. That resulted in lost text area rotation when a shape had both types of rotations, and sheared text when only text area rotation existed. The patch introduces a new 'moTextAreaRotation' member for the 'rot' attribute of the <bodyPr> element. It is mapped to 'TextRotateAngle' property. It becomes the 'draw:text-rotate-angle' attribute of the <draw:enhanced-geometry> element for a shape and 'style:rotate-angle' for chart elements in ODF. It must also be used to simulate 'upright' and is used for the 'rot' attribute in <txXfrm> of diagram shapes. The 'moRotation' member is now only used for the 'TextPreRotateAngle' property. That angle describes a rotation of the text without changing the text area. Valid values are multiples of 90deg. It is used for simulating vertical writing modes that are not yet implemented. It has no corresponding attribute in ODF. To make the meaning clear in code, the member is renamed to 'moTextPreRotation'. MS Office recalutes a diagram on file opening from layout.xml and data.xml. That is not yet implemented in LO, but we use drawing.xml, which gives the state of the diagram at time of saving. The patch handles the 'rot' attribute of <txXfrm> element as well. It has to be mapped to moTextAreaRotation, because it might contain angles, which are not multiples of 90deg, for example diagram 'Gear'. The <off> and <ext> child elements of <txXfrm> describe the actual used text area rectangle. The existing import calculates the difference of the actual used text area rectangle to the predefined one and incorporates it into the TextArea*Distance attributes. The patch adds calculating the current values of the text area rectangle as it would be using the preset markup. At that time in import there is no SdrObjCustomShape object, thus we cannot use its GetTextBounds() method. So it is down manually, covering most of those types, which are used in diagrams of MS Office. Remarks to unit tests: Now the rotation introduced by txXfrm is no longer in TextPreRotateAngle, but in TextRotateAngle. According changes are in SdImportTest::testN86510_2 Test, testFdo87488 Now the correct preset text area rectangles are used. That requires adaption of the needed distances. Done in SdImportTest::testBnc870237() SdImportTest::testTdf93830() SdImportTestSmartArt::testTdf134221() The buggy 'upright' export is fixed. Adaption in ScExportTest2::testTdf137000_handle_upright() Change-Id: I79df1559f88b76e96988fe745304dc4162de6316 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136447 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-06-27replace oox::OptValue with std::optionalNoel Grandin
Change-Id: I16e7179b2851640b4d73665685dcc1e84042ddaf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136270 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-29tdf#89449 PPTX import: fix line connectorsTibor Nagy
Line connectors were imported as plain shapes, losing their functionality during editing, i.e. keeping connections of boxes and other shapes. Change-Id: I0f1562be2dbcce0e45eb209c6ca4e035731039e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131303 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2022-02-15tdf#132557: PPTX import: Workaround for slide footer shape presetsSarper Akdemir
It appears that placeholder shapes with service names: - com.sun.star.presentation.TitleTextShape - com.sun.star.presentation.DateTimeShape - com.sun.star.presentation.FooterShape - com.sun.star.presentation.SlideNumberShape ... Are unable to have custom shapes in Impress. (i.e. can't be ellipse, triangle etc.). These presets get specified in OOXML with <a:prstGeom prst="ellipse"/> inside spPr (shape properties). Therefore with similar results to the PPT import, a workaround is applied where slide footers which have non default shapes are imported with com.sun.star.drawing.CustomShapes service. The layout/master footers are left as is since if they were to be imported as CustomShapes they would appear on each slide even if the slide had those footers enabled or not. Change-Id: Ic8a8ab3f6dfb7367ecd2c619ce888bf77abef460 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129889 Tested-by: Jenkins Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2020-11-24loplugin:stringviewparam extend to comparison operatorsNoel
which means that some call sites have to change to use unicode string literals i.e. u"foo" instead of "foo" Change-Id: Ie51c3adf56d343dd1d1710777f9d2a43ee66221c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-09compact namespace in i18npool..ooxNoel Grandin
Change-Id: I1de87468b56b86a1eeee09a612551ab119a1be8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93857 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-12Remove some redundant user-provided dtorsStephan Bergmann
...which silences various -Wdeprecated-copy-dtor warnings from Clang 10 trunk about copy functions being implicitly defined as non-deleted even though the class has a user-declared dtor Change-Id: I3409d403c3c709de4ad94eccbc2d7869e41847cc Reviewed-on: https://gerrit.libreoffice.org/85032 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-16tdf#126060 Handle text camera z rotation while pptx import.Gülşah Köse
Change-Id: Ifa4589fb50affc4c5ffb52288db8533c98ec6dd9 Reviewed-on: https://gerrit.libreoffice.org/80587 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com>
2019-09-02loplugin:constmethod in ooxNoel Grandin
Change-Id: Ie6c9c60288accf7096288aa67d091548e43687cd Reviewed-on: https://gerrit.libreoffice.org/78397 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-29getUtf8TokenName can return by const refNoel Grandin
and avoid some reference-counting in a hot path Change-Id: I7f5fd7f8f5f9076eb5f8d60118afa8e3ac8a5e6c Reviewed-on: https://gerrit.libreoffice.org/38129 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-04cleanup includesJochen Nitschke
Change-Id: I9615a1da8224b0112acf5b811f7de566945c02c9 Reviewed-on: https://gerrit.libreoffice.org/37185 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-02loplugin:checkunusedparams in ooxNoel Grandin
Change-Id: I95bce82654bd0da7ed76ebd22b107b870ed15a1f Reviewed-on: https://gerrit.libreoffice.org/37144 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-08loplugin:unnecessaryvirtual in hwpfilter..rscNoel Grandin
Change-Id: I2e9df8223d503b813b4c458747e8c44bb8ef8868 Reviewed-on: https://gerrit.libreoffice.org/30661 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2015-10-23com::sun::star->css in lotuswordpro,mysqlc,ooxNoel Grandin
Change-Id: Id99ff87c4eb3f1b36702261ce63d5d2793ea35d7
2015-02-17oox: use std::enable_shared_from_thisMiklos Vajna
Change-Id: I184a7a3579bebd81d5d81f64b4ace74bde8e87fb
2015-01-02boost::unordered_map->std::unordered_mapCaolán McNamara
you can get debug stl this way Change-Id: Ia70a3e7c7c452390e8bee34975d296c9318e4a19
2014-09-24Remove TokenMap::getUnicodeTokenName()Matúš Kukan
Change-Id: I778dc43085b6afbb6456cbf53fe8c95b624b75b3
2014-09-14Move oox/drawingml/*hxx internal headers to oox/inc.Matúš Kukan
Do not export LinePropertiesContext class as visible. And move GraphicProperties to its own header. Change-Id: I047c181e9f2adc7e59885f59663ea56c7eb898ed