summaryrefslogtreecommitdiff
path: root/svx
AgeCommit message (Collapse)Author
2021-08-17rename SetRectsDirty->SetBoundAndSnapRectsDirtyNoel Grandin
because there are lots of things being marked dirty, and I like to be sure I know what the code is doing Change-Id: Ifd0380c5560adc4a054495551885fe33af4f3e5a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120460 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-17Replace GDIMetaFile::Write and WriteGDIMetaFile with SvmWriter::Writepanoskorovesis
Use the new write functionality. This change also sets SvmWriter::Write second argument as const, as it's value does not change Change-Id: I1620756542a0bc54b5f8fc7ce3f57d0243a2ee55 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120408 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-08-16do less copying when constructing 2d sequence (tdf#105575)Noel Grandin
instead of constructing a child sequence, and appending that a parent sequence, just pass the parent sequence down the call hierarchy, so we end up doing less copying. Change-Id: If39a0779e543c6aa01f5e2e3ae63d395e0c85f7d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120521 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-16no need to make a local copy hereNoel Grandin
Change-Id: I54891bccd13ee3e63a6c737c47754ffaea354692 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120539 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-16Drop tools::Rectangle::getX/getY, which are just duplicates of Left/TopMike Kaganski
The change allowed to simplify many places where previously this API was used, to avoid inefficient calculations (e.g., moving rectangle keeping its size, and then immediately changing the size). Change-Id: Ica2dc594d91cae83e2c2740c1f4fb23f44998916 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120461 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-08-16pass OutlinerParaObject around by valueNoel Grandin
since it uses o3tl::cow_wrapper, so it is really just a wrapper around a pointer, no point in allocating it on the heap Remove assert in SdrText::SetOutlinerParaObject, which was bogus anyhow, because it was comparing pointers, not deep equality. And since we are now being more efficient and avoiding copying of the internal data in OutlinerParaObject, we hit this assert. Change-Id: I6dbfaab5ee2ca05b2001baf63110041e469df9c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120510 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-16Use o3tl::toTwips to define MINBODYMike Kaganski
This changes its value from 56 to the proper 57. See 9be17c52b7c565758088b8020a543d7b840e31a7, which had changed the previous 5-mm value to the incorrectly rounded 1-mm value; and cefce1a247a4674c5726a31b61571eab16328a0b, which had unified the other places mentioning i19922. Change-Id: I7186320b4c1a2a65a6f728ed8bafcbf0eb45c4cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120441 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-08-13tdf#105575 Slow rendering when using a Logo commandNoel Grandin
Remove dynamic_cast'ing to Primitive2D, expensive and unnecessary <quikee[m]> noelgrandin: nobody is using XPrimtive that is not derived from BasePrimitive2D in an extension ... mainly as it is not even possible Change-Id: I68224021f0fbc35fe2a973198ba78d2b41ea172d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120417 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-13split SvNumberFormatter into it's own headerNoel Grandin
so I can make changes without running into cyclic dependencies between header files Change-Id: I98a91c7cc66002ba745cdb8239e5cc267922a45c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120412 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-13Replace ReadGDIMetaFile with SvmReader::Readpanoskorovesis
Use the new Read functionality Change-Id: Ied997377fda8793422b1c8877ece705e4a9b6dbd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120376 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-08-12tdf#95549 speed up load of xlsNoel Grandin
we don't need to perform layout during load, so disable a few places that do that reduces load time by 50% Change-Id: Ie746ca0b46de3b76ca1b7291e0528b525333278f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120384 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-12s/mpEdtOutl/mpEditingOutliner/gNoel Grandin
Change-Id: I5eb188cc1808055857f95c73ab838251cd93e4b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120379 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-11Drop convertMm100ToTwip in favor of the new o3tl::toTwipsMike Kaganski
Step by step, duplicates from <tools/UnitConversion.hxx> may go Change-Id: Id4c03ff8adc120ae06dbfdbdfb4f5ff0bb51f489 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120315 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-08-11tdf#143769 don't crash on null XFillColorItemCaolán McNamara
use same solution as: commit 5ee0e6ab93ad791f5e79506efafd16cb7364ffb1 Author: Markus Mohrhard <markus.mohrhard@googlemail.com> Date: Tue Jul 21 19:01:26 2015 +0200 avoid crash with color listbox for now Change-Id: I36ac6513546961ec8d8d1e9437a8ef88574acbf4 Change-Id: I46c55461e5867431a6e9c838b5ef462f9581eb28 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120297 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-08-11convert some LogicToLogic calls to use o3tl::convert insteadTomaž Vajngerl
If a LogicToLogic uses fixed units, we can use o3tl::convert instead. We can also do the same for all other cases where LogicToLogic is used, but that needs additional investigation to determine if it is safe to do so. Note: MapUnit::Pixel is converted to o3tl::Length::pt because it assumed 72 PPI for a logical pixel, which corresponds with the conversion rate of a point (72 PPI). Today, 96 PPI is standard, which is also used for o3tl::Length:px. Change-Id: I29126df38bfcfda74b5d83d4cb880a378aecd18b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120230 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-08-10Missing includeStephan Bergmann
(for std::unique_ptr, with recent libstdc++ 12 trunk) Change-Id: I61b7823dd740ea7cdfe0d7403a50ac73b24d1c4e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120229 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-08-09sw HTML export: avoid writing EMF data with JPG extensionMiklos Vajna
Regression from commit f3b2fc2276ee8a7f64e73d9975d0143d1696362c (sw XHTML import, improved <object> handling for images: support more formats, 2021-07-20), the problem was that now an EMF image was written with the JPG extension in the HTML export. Solve the problem by making the "use emf as-is" check more strict in XOutBitmap::WriteGraphic(): that will be still true in the XHTML case when the source image is EMF, but the filter name will be JPG in the HTML case, so that will avoid the unwanted EMF data in the HTML case. Change-Id: I7bced482d677cf121be1ed494a3aaeb319e1c5b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120209 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-08-08create comphelper:OMultiTypeInterfaceContainerHelperVar2 and use itNoel Grandin
based on OInterfaceContainerHelper2 which is considerably faster than the original OInterfaceContainerHelper Change-Id: Ia8cdbc5ef877a7af3d9193e1bb2faf1595c15470 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120165 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-06make --disable-scripting compileCaolán McNamara
Change-Id: Ie2be232e062389b74408dd9f001b1cf4db7db7d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120123 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-08-06drop intermediate vcl::Window from Application::GetDefDialogParentCaolán McNamara
Change-Id: I96be984cbefeb8e45bf49de4c50a225a46fbefb6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120089 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-08-05improve LOK notifyInvalidationNoel Grandin
(*) tweak buffer in SfxLokHelper::notifyInvalidation to be a bit larger, so we avoid the cost of a resize&copy (*) use our optimised OString concatentation instead of going via std::stringstream (*) pass down a pointer to rectangle, instead of a string. later we will use this to avoid doing the stringify until later Change-Id: Ia3e3042bc919d9b9cb80e47a93704eb236438605 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119994 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120072 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-05drop unneeded forward declareCaolán McNamara
Change-Id: I858d4a43690bd37385eb6f48945c05dd9c2a6182 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120031 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-08-05Pass context and resource string down to boost::locale separatelyNoel Grandin
because this is often on a hot path, and we can avoid the splitting and joining of strings like this. Change-Id: Ia36047209368ca53431178c2e8723a18cfe8260a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119220 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-04Resolves: tdf#143023 explicitly connect to ControlBase focus-[in/out]Caolán McNamara
instead of listening to the generic vcl::Window/Control focus events. The thing which really gets/loses focus is now a Widget hosted inside the ControlBase. Change-Id: I012d0bea687aa6d5965a4e2f6ce3899bfc629f1b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120003 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-08-04Log unhandled exceptionsMike Kaganski
Change-Id: I1674730620b9c130b5a640bc0e67b72394752a22 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119980 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-08-04EventWindow is always a svt::ControlBaseCaolán McNamara
Change-Id: I85220b91f23154c6480e7007eb24986c972ad8cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120001 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-08-04establish that DbCellControl Window member is always a ControlBaseCaolán McNamara
and remove resulting known redundant dynamic_casting Change-Id: I5f098ef1adee3ad5d2a2bc5fcd30523f980df2f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119999 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-08-03tdf#142436 svx: fix handling of linked background imagesMiklos Vajna
Regression from commit 9fb7aaf570c03c8a26d763f1205fb8c890e8211a (Make linked graphic register into LinkedManager again, 2018-04-13), the problem was that now SvXMLImport::loadGraphicByURL() produces a Graphic that has its type set to GraphicType::Default, but when drawinglayer::primitive2d::createNewSdrFillGraphicAttribute() consumes this graphic, it expects that the type is either a bitmap or a metafile. Fix the problem by explicitly loading the image when the default-type, origin-url-set case happens: this is rendering, so no problem to load the URL and that will give us the expected graphic type. This is also meant to keep the original problem fixed, since the Graphic that is part of the doc model is unchanged. Change-Id: If5bba09faa23ef35f99152d4b5d30cd9cf67ace8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119935 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-08-03simplify lookup maps in EnhancedCustomShapeTypeNamesNoel Grandin
simplify initialisation, and use OUString as the key to avoid conversions during lookup Change-Id: I0b1f1f461a4d2375cd92d13bb3333c8e0b887ee7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119897 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-03Consolidate on C++17 std::scoped_lock instead of std::lock_guardNoel Grandin
as in commit 9376f65a26240441bf9dd6ae1f69886dc9fa60fa Change-Id: I3ad9afd4d113582a214a4a4bc7eea55e38cd6ff9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119927 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-03tools::Long->sal_Int16 in FmXFormShellNoel Grandin
m_arrRelativeGridColumn is set from FmFoundRecordInformation.nFieldPos which is sal_Int16 Change-Id: Ifd3d72f8aa34d0d574d1b9fc2cbe755c32952b4b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119911 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-03osl::Mutex->std::mutex in OutputStorageWrapper_ImplNoel Grandin
Change-Id: Idb5e46d91cd933e4dcc1b3cd751c65d9ddd9e077 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119913 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-03osl::Mutex->std::mutex in createDefaultCross_3x3Noel Grandin
Change-Id: Icdb311f855ddd2fe2ca2f66f14df8934332e6ef3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119912 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-03osl::Mutex->std::mutex in OParseContextClientNoel Grandin
and remove the atomic, we don't need an atomic if we are using a mutex Change-Id: I4d3107111b92ebdaa1fe0c1182cdc532f60bc51b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119910 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-02convert #defines to OUStringLiteralNoel Grandin
mostly by doing $ git grep -l '#define.*\"' -- *.cxx | xargs perl -pi -e 's/^#define\s+(\w+)\s+(\".*\")/constexpr OUStringLiteral \1 = u\2;/g' Change-Id: Idface893449b0ef2a3c5254865a300585d752fbb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119669 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-31getArray->getConstArrayNoel Grandin
Change-Id: I951dd4a02c9ead98e7eb13ae2995ba2e1e57b38a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119740 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-31drawinglayer: extract Prop. Value conversion from ViewInformation2DTomaž Vajngerl
ViewInformation2D doesn't need to know anything about the Sequence of PropertyValue that is used for parameters when constructing it through UNO API. This can be done outside of ViewInfromation2D and it doesn't need to be responsible for that internally inside the ViewInformation2D. With this we get ViewInformation2D, which is much simpler and isn't prone to YAGNI. Change-Id: I3836237a1d26e38145b52136c3204931ae7c6b79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119721 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-07-31drawinglayer: remove extendedInformation from ViewInformation2DTomaž Vajngerl
We actually never use extended information when normally using the ViewInformation2D. The exception here is when we construct it from property values, where the unknown property values are then stored into the extended information sequence and then later reconstructed when we convert it back to a sequence of property values. Just for that case we don't neeed to expose the extended information to the outside and create it, as that is then a implementation detail for the UNO use case. I am also not convinced we need it when creating ViewInformation2D with the sequence of property values - it certantly not expected that we need to preserve the property values at all, but that is something that needs to be checked. Change-Id: I3b8d533cd412aac8b89ca2921738d6487be5cf45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119720 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-07-30osl::Mutex->std::atomic in FmSearchEngineNoel Grandin
Change-Id: Ie056215227ce19efcb28518f6a510bed5b15b93d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119705 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-30convert TextAlign to scoped enumCaolán McNamara
Change-Id: Id2c466eacb44f0ea6adba75a0ac0be8be8e7ed4c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119682 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-07-30osl::Mutex->std::mutex in FmXDisposeListenerNoel Grandin
Change-Id: I213499d4c707194c516cafe2ee323e61566cac71 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119706 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-30drop FontAlign alias of TextAlignCaolán McNamara
Change-Id: If69ce85482fdb7d33d00fb0cf9b4d4609bb92cd1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119681 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-07-29rtl::Static -> static localNoel Grandin
Change-Id: Ib8d9a24659a37e6b94237d98f030cd2be00bcb39 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119665 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-29sidebar: unify LineWidthPopup with other WeldToolbarPopupsSzymon Kłos
Change-Id: I9dd0d2b223972683a9066f0069e055175349526f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118023 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119654 Tested-by: Jenkins
2021-07-28a11y: Add XAccessibleValue::getMinimumIncrement methodMichael Weghorn
Add a method 'getMinimumIncrement' to the XAccessibleValue interface. The method returns the minimal increment by which the value represented by the object can be adjusted. The main motivation is to expose this to AT-SPI, so it can be retrieved e.g. by libatspi's 'atspi_value_get_minimum_increment' function [1], s. the note in Change-Id: I8af326c2d24c1801147a56ea2e2a886ab42ac634 "a11y: Expose FormattedField as spinbox" for more details. The implementation relevant for the 'FormattedField' class is in 'SVTXAccessibleNumericField::getMinimumIncrement', which returns the spin size. While at it, also move the comment in sw/source/core/access/acccell.hxx mentioning what methods are overriden for the 'XAccessibleValue' interface to the right place. [1] https://developer.gnome.org/libatspi/stable/libatspi-atspi-value.html#atspi-value-get-minimum-increment Change-Id: Ie148a4e1cedbdbb5964f8565c81611d3480465cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119596 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2021-07-28Don't steal focus from popup in onlineSzymon Kłos
To avoid closing the popup when it is first time activated. Change-Id: I23abd691ecc271b46f1bfba041f247208200ba7e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117595 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119599 Tested-by: Jenkins
2021-07-28use officecfg for SvtCJKOptionsNoel Grandin
and remove some unused options Change-Id: I487a233de4f7414012e5405f2c2e1f9c8b8fb4f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119554 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-27cid#1489549 Uncaught exceptionCaolán McNamara
no need to check if mpPolygons is in use before deleting it Change-Id: Ie4fdc35ca70fcef6985268dd317e34dde1ccc950 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119559 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-07-27ofz#36586 Abrt failed throwCaolán McNamara
Change-Id: I6ef391b5b96995db121fc52181b65e21fdc0d688 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119546 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-07-27tdf#123626 Allow opening shape hyperlink with Ctrl-ClickSamuel Mehrbrodt
Change-Id: I43201cd1fb7022fe5ff1479c66916c65adc554fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119550 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>