/source/hsb/oox/

ng.cn/lo/core' title='lo/core Git repository'/>
summaryrefslogtreecommitdiff
path: root/svx/source/unodraw/unoshap2.cxx
AgeCommit message (Collapse)Author
2024-11-08Deduplicate and unify using vcl::GetBitmapMike Kaganski
Change-Id: Ie940990b604cf23c961aa5b6fad124f1ebaf338c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176186 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-11-08Avoid checking exact interface type of Any valueMike Kaganski
Change-Id: Ic883c3a9fd8eb87469aec6b6570a39aadf575c3e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176184 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-05-29svx: TryToFindMarkedObject -> GetMarkedObjectList().FindObjectXisco Fauli
In order to reduce number of calls to GetMarkedObjectList() later on Change-Id: If05f5630e9413c162821370532f36598fc2e0341 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168212 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-05-11loplugin:ostr in svxNoel Grandin
Change-Id: Ia765a03e033acb82e367873380d289587ea87d6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167449 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-04-03tdf#146619 Drop unused 'using namespace' in: svx/Gabor Kelemen
Change-Id: Ic8b925a3ec55166a9d5da05827d2cb335943b665 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165542 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2024-03-13tdf#152878 switch off replacment image in picture frameOliver Specht
RTF documents may contain shapes of the type "Picture frame" ({\sn shapeType}{\sv 75}) that are imported as SdrGraphObj This change prevents the display of a replacement picture if there is no picture set. Change-Id: Ia3a576ddcb2a3bbffae859102d274d4ecd214f6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164755 Tested-by: Jenkins Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de> Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-10-11Drop o3tl::span, can use C++20 std::span directly nowStephan Bergmann
Change-Id: Ic21ff7bf48f07f7277979d52e99d2c5c268de83f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157825 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-09-02replace set(nullptr) with clear()Noel Grandin
It's a little easier to read, but mostly it makes an upcoming loplugin easier to implement Change-Id: I4ae7db8eda77795dab3255d1afd8ba4f20a8de76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156451 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-29Use getXWeak in svxMike Kaganski
Change-Id: I7e5c029a79b8437ae5f803df5ad20217c240d1d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150874 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-06-11use internal iterator for SfxBroadcasterNoel Grandin
So we can avoid exposing the internal listener vector. (which allows further optimisations) Change-Id: If288141a37314dcc01d203029dc51c71ec2b7f54 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152857 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-12use ComplexColor instead of ThemeColor for better OOXML compat.Tomaž Vajngerl
In OOXML a color definition includes more represenations, one of which is scheme color (which is what is implemented in ThemeColor currently), but it supports other representations too (RGB, HSL, System,..). ComplexColor includes all the representations, so to have a better compatibility with OOXML, this changes all uses of ThemeColor to ComplexColor. In many cases the usage of ComplexColor isn't the same as the usage of ThemeColors, but this cases will need to be changed in a later commit. Change-Id: I9cc8acee2ac0a1998fe9b98247bcf4a96273149a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151492 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-04-14loplugin:stringviewparam improvementsNoel Grandin
improve the check by checking for methods that exclude using string_view, rather than checking for methods that __can__ use string_view, which leads to exposing some holes in our o3tl/string_view.hxx coverage. Change-Id: Ic9dd60441c671f502692f9cd2a1bb67301c4b960 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150277 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-04svx: change Poly2Rect to return a rectangle, also clean-up the codeTomaž Vajngerl
There is no need to pass the rectangle by reference and to change it inside the function, better to return a new instance. Also clean-up the code of Poly2Rect and rename the function to svx::polygonToRectangle. Change-Id: I25e77c8abd12e2075939f55e06f40343ac23ca97 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148211 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-01-13introduce {Char,Fill}ColorThemeReference which uses XThemeColorTomaž Vajngerl
Adds a unified UNO property for theme colors *ColorTheme (CharColorTheme and FillColorTheme) which uses XThemeColor, that replaces the properties *Theme, *TintOrShade, *LumOff, *LumMod. The properties are still present for backwards compatibility and to keep ODF support working in tests as that needs a bigger change. Reactor the code and tests to accomodate for this change. Change-Id: If7983decb4ba528b49fe7b5968aa9efc696a9efc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144783 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-11-04SplineLine and SplineFill have never been implementedNoel Grandin
Change-Id: I75e01bc8831a9d8e6e1f52fc3a89cd9827e1d6b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142263 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-13ofz#50767 docxfuzzer: Indirect-leak in rtl_allocateMemoryNoel Grandin
Two fixes required here (1) the unnecessary use of aggregation in SwXDrawPage, which leads to a very confusing cycle that I don't fully follow. No indication why this is necessary in the git history, has been this way since initial commit (2) a ref-counting cycle through SvxShapeGroup and SvxDrawPage, use a weak reference here to break the ref-counting cycle. Change-Id: Ie7ec583960ed0864a073ad8489fb65964bd83080 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139828 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-29ref-count SdrObjectNoel Grandin
Which means we can get rid of the majestic hack of ScCaptionPtr Previously, SdrObject was manually managed, and the ownership passed around in very complicated fashion. Notes: (*) SvxShape has a strong reference to SdrObject, where previously it had a weak reference. It is now strong since otherwise the SdrObject will go away very eagerly. (*) SdrObject still has a weak reference to SvxShape (*) In the existing places that an SdrObject is being deleted, we now just clear the reference (*) instead of SwVirtFlyDrawObj removing itself from the page that contains inside it's destructor, make the call site do the removing from the page. (*) Needed to take the SolarMutex in UndoManagerHelper_Impl::impl_clear because this can be called from UNO (e.g. sfx2_complex JUnit test) and the SdrObjects need the SolarMutex when destructing. (*) handle a tricky situation with SwDrawVirtObj in the SwDrawModel destructor because the existing code wants mpDrawObj in SwAnchoredObject to be sometimes owning, sometimes not, which results in a cycle with the new code. Change-Id: I4d79df1660e386388e5d51030653755bca02a163 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138837 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-25use more o3tl::spanNoel Grandin
which means we can reserve precisely the right number of entries when building maps Change-Id: I580414699289369de4730caae09829bbd8759e82 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137292 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-03Just use Any ctor instead of makeAny in svxStephan Bergmann
Change-Id: I59b1b3f817a9028f132456ea5094f38f88674d00 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133768 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-02svx: the SdrObject of SvxGraphicObject can be nullptrMiklos Vajna
Crashreport: Graphic::GetType() const vcl/inc/impgraph.hxx:122 SvxGraphicObject::getPropertyValueImpl(rtl::OUString const&, SfxItemPropertySimpleEntry const*, com::sun::star::uno::Any&) svx/source/unodraw/unoshap2.cxx:1466 (discriminator 1) SvxShape::_getPropertyValue(rtl::OUString const&) svx/source/unodraw/unoshape.cxx:1747 non-virtual thunk to SvxShape::getPropertyValue(rtl::OUString const&) svx/source/unodraw/unoshape.cxx:1732 During SVG export of a selected shape. Change-Id: I29b56d49b0c5418dfe8fec8491ac8667e5ade2ed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130740 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130819 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-02-22tdf#64914 slow opening large chartNoel Grandin
shaves 2% off the load time by avoid the cost of comphelper::getFromUnoTunnel Change-Id: I9d0438bd0ad3cf753d34fe181481f3a57193651c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130284 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-17loplugin:unusedmethodsNoel Grandin
Change-Id: I58c60262ca543bafb4db4433dbb98b195f7571ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130063 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-07remove E3D_INVENTOR_FLAG and convert SdrObjKind to scoped enumNoel Grandin
We don't need E3D_INVENTOR_FLAG, we can just check if the SdrObjKind is in the right range. Which exposes some dodgy code in DrawViewShell::GetMenuStateSel SfxItemState::DEFAULT == rSet.GetItemState( OBJ_TITLETEXT ) || SfxItemState::DEFAULT == rSet.GetItemState( OBJ_OUTLINETEXT ) || which has been there ever since commit f47a9d9db3d06927380bb79b04bb6d4721a92d2b Date: Mon Sep 18 16:07:07 2000 +0000 initial import just remove that. In SwFEShell::ImpEndCreate() move some logic around to avoid using an out-of-range SdrObjKind value Change-Id: I4620bfe61aca8f7415503debe3c84bfe5f4368a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127763 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-03add new SvxShape hierarchy classNoel Grandin
to serve as a shared/common base class, so I can plumb SvxShape types through chart2. Change-Id: I8758fff1599c92a214b334ee44cf7b4e582c1915 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127873 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-26loplugin:stringliteraldefine in svxNoel Grandin
Change-Id: I2375ebfe9791c43063ffbc8ddbe1bd365499a576 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125868 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-17expose the SvxColorItem theme related uno for draw/impressSarper Akdemir
[ Miklos: added the missing SvxShapeControlPropertyMapping entries, breaking tests. ] (cherry picked from commit 88b6801ff2aa61ed2f0d64cef94fe6a9c09f3a35, from the feature/themesupport2 branch) Change-Id: Ifdcde6c4643eb9ac1c36040f5ccb490b9d900efd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125394 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-10-29tdf#141193 Added support for bar codes in qrcode dialog box[API Change].homeboy445
Change-Id: I6b79ece1d5419ef92b76755d3bd921a64d6e38fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113989 Tested-by: Jenkins Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2021-09-15Use <comphelper/servicehelper.hxx> implementing XUnoTunnel part 1Mike Kaganski
The header got some changes: 1. Move UnoTunnelIdInit and isUnoTunnelId into 'comphelper' namespace 2. Rename UnoTunnelIdInit to UnoIdInit, as a precondition to replace of uses of OImplementationId with it, including in XTypeProvider 3. Introduce convenience functions 'getSomething_cast' to cast between sal_Int64 and object pointers uniformly. 4. Rename getUnoTunnelImplementation to getFromUnoTunnel, both to make it a bit shorter, and to reflect its function better. Templatize it to take also css::uno::Any for convenience. 5. Introduce getSomethingImpl, inspired by sw::UnoTunnelImpl; allow it handle cases both with and without fallback to parent. 6. Adjust UNO3_GETIMPLEMENTATION_* macros TODO (in separate commits): - Drop sw::UnoTunnelImpl and sw::UnoTunnelGetImplementation - Replace all uses of OImplementationId in core with UnoIdInit - Deprecate OImplementationId in <cppuhelper/typeprovider.hxx> - Change implementations of getSomething to use getSomethingImpl - Revise uses of getSomething to use getFromUnoTunnel Change-Id: If4a3cb024130f1f552f988f0479589da1cd066e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122022 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-19svx: prefix member variables for SdrTextObj and othersTomaž Vajngerl
All classes in svdotext.hxx Change-Id: Ib15deca2a625d8352a2572d9fc3e15188b4e718a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117478 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-05-02throw() -> noexcept, part 2/3: Automatic loplugin:noexcept rewriteStephan Bergmann
Change-Id: I076f16d0536b534abf0ced4d76051eadb4c0e033 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114949 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-04-15store ptr to the original entries in SfxItemPropertyMapNoel Grandin
instead of copying them to a new data structure that is practically identical. Helps startup time since we build a ton of these when loading documents. And use o3tl::sorted_vector as a dense map data structure to reduce allocations and improve cache friendliness, since this is a build-once thing. Change-Id: I950be03b1a21c0c81c40f2677d4215f5e8e256cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114015 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-20SvxShape: no need to inherit from WeakAggImplHelper1 twiceNoel Grandin
once here, and once in one of the superclasses Change-Id: I0396012b613f195783ef8c7eae38f29120007381 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112744 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>