/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ #ifndef INCLUDED_SVTOOLS_URLCONTROL_HXX #define INCLUDED_SVTOOLS_URLCONTROL_HXX #include #include namespace svt { //= OFileURLControl class SVT_DLLPUBLIC OFileURLControl : public SvtURLBox { private: OUString m_sPreservedText; public: OFileURLControl(vcl::Window* _pParent, WinBits nStyle); protected: virtual bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE; virtual bool Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE; }; } // namespace svt #endif // INCLUDED_SVTOOLS_URLCONTROL_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ istro/cib/libreoffice-5-4 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-11-10com::sun::star -> cssMike Kaganski
Change-Id: I890ec73e30d3cc6b210903ecee29431f3cb5f635 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175979 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-05-10loplugin:ostr in ooxNoel Grandin
Change-Id: I08124ce2da1facbe2e84aa4a7a8e25fec24fa962 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167428 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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-06-22rename oox::OptValue::get to valueNoel Grandin
as a step in replacing OptValue with std::optional Change-Id: Ia5d05c28a88beaced11ae1d0414de66106cc9e20 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136269 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-21rename oox::OptValue::has() to has_valueNoel Grandin
as a step towards converting it to std::optional Change-Id: I9b2201c29827fcddae3b46480065c90b2907e6cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136210 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-30Prepare for removal of non-const operator[] from Sequence in ooxMike Kaganski
Change-Id: Iee1e16c516547e8f23631b33c928ac6637050f68 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124376 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-08-23tdf#142351 chart ooxml import: fix category axis cross positionBalazs Varga
Set PROP_CrossoverPosition value regardless of the mrModel.mbAuto value, which is a different thing. This element specifies that this axis is a date or text axis based on the data that is used for the axis labels, not a specific choice. Change-Id: Ifa291aac2f4bb3981d968de3489b23f1af485104 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120592 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-06-10tdf#140623 Chart OOXML import: set text overlap to falseTünde Tóth
of category axis label unless the rotation is 0 in xml. Regression from commit: 21620f9d2f50e66dffc45a5afb539edb8d54434c (tdf#138194 Chart OOXML import: set text break to true) Change-Id: I18db7483f49c84a83760200037f8858a3b471994 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116575 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-01-08tdf138773 Chart OOXML import: set text overlap to falseTünde Tóth
of category axis label, if the rotation is undefined in xml, to avoid e.g. missing rotation of them. Regression from commit: 21620f9d2f50e66dffc45a5afb539edb8d54434c (tdf#138194 Chart OOXML import: set text break to true) Change-Id: I5b03614eca547a206afc0d8118e3f6c055ed5348 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108792 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-11-24tdf#138194 Chart OOXML import: set text break to trueTünde Tóth
of rotated category axis label, if the rotation is 90 or 270 degree and the inner size of the chart is not fixed. Change-Id: I02e1fd940af8a277435aa46d4ad93a42b6723710 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106422 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-10-30tdf#126133 Chart OOXML import: set default text rotation to 0°Tünde Tóth
for the horizontal axis title, even if the position of the axis is left or right. With this, OOXML charts generated by third-party tools imported without bad rotated title text (as previously in commit fdb6d6ccf45e679ff3e369a876482b6801e08e25 [tdf#137734 Chart OOXML import: fix variable color charts], without bad variable colors). Change-Id: Id348fe037e4f1eb2d7253957224298aa95db5b15 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105012 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-09-18tdf#136267 OOXML Chart Import: create main category axis labels onceBalazs Varga
because InternalDataProvider can not handle different category names on the primary and secondary category axis. Revert e0b0502516a10181bbd1737b93b38b2bba4c98e8 commit, except the relevant unit test. Regression from commit: e0b0502516a10181bbd1737b93b38b2bba4c98e8 (tdf#128016 Chart OOXML Import: fix duplicated category labels) Also fix tdf#129994 (FILEOPEN - hang at import time), which is a a regression from commit fa0a981af41a2606541eec1cb20a379a739691e0 (tdf#114166 DOCX chart import: fix missing complex categories) Change-Id: I5d049e760eb1a647ea774be264349a2f16f15f5b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102463 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-04-24tdf#132076 Chart OOXML: fix lost date format of X axisBalazs Varga
labels. Set the number format of category or date axes too and use date axis type for date axes at import. Export the real axis type of the X axis. Change-Id: I45f5c69f0aadc4ec1db0b8873b5e374e2728d39c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92396 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-04-07loplugin:unusedvariableplus in ooxNoel Grandin
Change-Id: I742c0c9416a5cfaa1b2d471d25fbf6c7439f7ec8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91779 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-21tdf#130657 OOXML chart import: fix charts without CrossBetweenBalazs Varga
by using default values for ShiftedCategoryPosition. Regression from commit 111c260ab2883b7906f1a66e222dbf4dc3c58c4f (tdf#127777 OOXML chart export: fix "CrossBetween" for not imported charts) Change-Id: Idd48a8343e7d6609b487daf7182e9716f2f5e01f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88709 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-02-19Related tdf#130681: convert number format if model not deletedJulien Nabet
Opening docx from https://bugs.documentfoundation.org/attachment.cgi?id=157891 I noticed this log: warn:legacy.osl:151346:151346:oox/source/drawingml/chart/objectformatter.cxx:1113: ObjectFormatter::convertNumberFormat - cannot create number format '' bt: 0 0x00007fffdb9129f1 in oox::drawingml::chart::ObjectFormatter::convertNumberFormat(oox::PropertySet&, oox::drawingml::chart::NumberFormat const&, bool, bool) (this=0x55555cb5ef10, rPropSet=..., rNumberFormat=..., bAxis=true, bShowPercent=false) at /home/julien/lo/libreoffice/oox/source/drawingml/chart/objectformatter.cxx:1098 1 0x00007fffdb8ede01 in oox::drawingml::chart::AxisConverter::convertFromModel(com::sun::star::uno::Reference<com::sun::star::chart2::XCoordinateSystem> const&, oox::RefVector<oox::drawingml::chart::TypeGroupConverter>&, oox::drawingml::chart::AxisModel const*, int, int) (this=0x7ffffffedb70, rxCoordSystem= uno::Reference to (chart::PolarCoordinateSystem2d *) 0x55555cb5b590, rTypeGroups=..., pCrossingAxis=0x55555d413560, nAxesSetIdx=0, nAxisIdx=1) at /home/julien/lo/libreoffice/oox/source/drawingml/chart/axisconverter.cxx:344 2 0x00007fffdb92b96e in oox::drawingml::chart::(anonymous namespace)::AxesSetConverter::convertFromModel(com::sun::star::uno::Reference<com::sun::star::chart2::XDiagram> const&, oox::drawingml::chart::View3DModel&, sal_Int32, bool) (this=0x7ffffffedd90, rxDiagram=uno::Reference to (chart::Diagram *) 0x55555d905d38, rView3DModel=..., nAxesSetIdx=0, bSupportsVaryColorsByPoint=true) at /home/julien/lo/libreoffice/oox/source/drawingml/chart/plotareaconverter.cxx:167 3 0x00007fffdb92d32d in oox::drawingml::chart::PlotAreaConverter::convertFromModel(oox::drawingml::chart::View3DModel&) (this=0x7ffffffedfb0, rView3DModel=...) at /home/julien/lo/libreoffice/oox/source/drawingml/chart/plotareaconverter.cxx:425 4 0x00007fffdb8fb4b8 in oox::drawingml::chart::ChartSpaceConverter::convertFromModel(com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&, com::sun::star::awt::Point const&) (this=0x7ffffffee090, rxExternalPage=empty uno::Reference, rChartPos=...) at /home/julien/lo/libreoffice/oox/source/drawingml/chart/chartspaceconverter.cxx:163 5 0x00007fffdb8f3af4 in oox::drawingml::chart::ChartConverter::convertFromModel(oox::core::XmlFilterBase&, oox::drawingml::chart::ChartSpaceModel&, com::sun::star::uno::Reference<com::sun::star::chart2::XChartDocument> const&, com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&, com::sun::star::awt::Point const&, com::sun::star::awt::Size const&) (this=0x55555dc08800, rFilter= ..., rChartModel=..., rxChartDoc=uno::Reference to (chart::ChartModel *) 0x55555d4cc190, rxExternalPage=empty uno::Reference, rChartPos=..., rChartSize=...) at /home/julien/lo/libreoffice/oox/source/drawingml/chart/chartconverter.cxx:101 6 0x00007fffdba48a22 in oox::drawingml::Shape::finalizeXShape(oox::core::XmlFilterBase&, com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&) (this=0x55555dbdc450, rFilter=..., rxShapes= uno::Reference to (SwXDrawPage *) 0x55555dbbbfe0) at /home/julien/lo/libreoffice/oox/source/drawingml/shape.cxx:1717 Change-Id: I9196532025eb0b3ff2b73cac2c5bac3726fe0761 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88761 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-01-15clang-tidy modernize-concat-nested-namespace in ooxNoel Grandin
Change-Id: I9877be75e1f7dcefdf7172d05dfbb0a63d06ced1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86803 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-12tdf#128627 tdf#128634 Fix OOXML import of CrossBetweenBalazs Varga
Set default 'midCat' value during the import, for Radar charts, because MSO created them with default 'midCat', but exported a 'between' value. Set default 'between' value during the import, for 3D Bar and Stock charts, because sometimes the OOXML file can contain a wrong CrossBetween value, but MSO import them with default values. tdf#128627 regression from commit: 830e539547c463b932ce643517f880789185032d (tdf#127393 OOXML chart import: fix X axis position setting "CrossBetween") tdf#128634 regression from commit: 111c260ab2883b7906f1a66e222dbf4dc3c58c4f (tdf#127777 OOXML chart export: fix "CrossBetween" for not imported charts) Change-Id: Ie9763197b79c3a661e66043da7b89b4f0f00ba33 Reviewed-on: https://gerrit.libreoffice.org/82211 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>