summaryrefslogtreecommitdiff
path: root/sd/source/ui/unoidl
AgeCommit message (Collapse)Author
2022-04-14use more string_view in sdNoel Grandin
Change-Id: I301f3d8a6634df8be5fdd42649c0c265da8f9099 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133004 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-29-Werror,-Wunused-but-set-variableStephan Bergmann
...ever since f47a9d9db3d06927380bb79b04bb6d4721a92d2b "initial import" Change-Id: I5ae9d757270c69003899a3eaf825acbfc48ea047 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132239 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-14add TypedWhichId version of QueryStateNoel Grandin
Change-Id: I95b86fc081847da01e06f50a1b2c7e7f5456c638 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131529 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-02use SfxItemSet::GetItemIfSet in sdNoel Grandin
Change-Id: I198b6101c1d62e81a70bac6a57faa2adc2dd36f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130820 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-21Recheck modules sd* with IWYUGabor Kelemen
See tdf#42949 for motivation Change-Id: I97c1a0e8c7f26807b12e6062581066d09ea13086 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130114 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-02-04Added master slide handling in getPart* functions of SdXImpressDocumentPranam Lashkari
There was no option to get the master slide info from SdXImpressDocument Change-Id: Ic42a4c541c406a50ec26ec2113174ab25675a074 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129423 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Pranam Lashkari <lpranam@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129480 Tested-by: Jenkins
2022-01-25lok: enable in-place editing of math equationsMike Kaganski
Change-Id: Ic4d187d1e2ee92eab74a6bb43e47bb4f3d47ebd2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128506 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-01-22Use o3tl::convert instead of OutputDevice::LogicToLogicMike Kaganski
Change-Id: Ifb7be992c6e951692a741d10ed24ec8b3836982a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128782 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-01-20tdf#141340 PDF export: fix hyperlinks on the wrong page with page num rangeMiklos Vajna
Regression from commit 01dbb38680aa39a4d3bc7afd05d44a4b2c9bc6ab (tdf#61274 sd PDF export: fix links ending up on wrong pages with hidden slides, 2020-03-10), the problem was that the sd/ code that mapped page numbers between the model and the PDF output only handled hidden slides, but not partial exports. Fix this by revisiting the decision to handle hidden slides in sd/, the filter/ code at the end does have enough information to correctly do this mapping at the end, and this way both tdf#61274 and tdf#141340 can work at the same time. Change-Id: I5679743ca67fab562e14c73e32f1a06ead8e7a31 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128643 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
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>
2021-12-06loplugin:stringliteraldefine in sdNoel Grandin
Change-Id: Ie03e3d06a608ee89484a07439bd6deeb1679aade Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126405 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-06Add image preffered DPI document setting, use it in Writer, ImpressTomaž Vajngerl
This adds a "image preferred DPI" document setting, which is used as a suggestion of the DPI that an image should have in the document. This is currently used when the image is inserted into the document (Writer, Impress/Draw) to resize it to the preferred DPI value. Change-Id: I3ee9d409257e3c6aa2ead05144ecbba7b3b916f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126334 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-12-05use visitor in ViewObjectContact::createPrimitive2DSequenceNoel Grandin
to reduce intermediate object creation Change-Id: I03d34d15e88f82027f865868aca08503e38fd6ec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126372 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-01loplugin:stringliteraldefine in editengNoel Grandin
Change-Id: Ie8f4c338f1636945f61ec139706353df88a81087 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126171 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-28use more OInterfaceContainerHelper3 in sdNoel Grandin
Change-Id: Id981ff73b5c386652a312de73df1684a273b389c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125971 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-18import pptx color schemes as color setsSarper Akdemir
initial import work for color sets. Themes (which we get the color schemes from) in MSO can be different for each master - will need to support that too. [ Miklos: actually added that per-master-page support. ] (cherry picked from commit 3b21d166f585dcdf8d576d166aeff3cfd4694aab, from the feature/themesupport2 branch) Change-Id: Ia06d2645018e6bfa70817bbddba2374641ae13dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125477 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-11-18introduce XColorSetsManager interfaceSarper Akdemir
[ Miklos: rather go with a beans::PropertyValues-based interface to allow extending this incrementally, without an API change. This allows getting / setting a per-document theme via the UNO API, but the concept from the original commit is unchanged. ] (cherry picked from commit 3f1bca8b4f451fa30bf341116390738c456d651f, from the feature/themesupport2 branch) Change-Id: I24be34a5a7b68549b21a6cd55144901d4fe2c5f8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125436 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-11-08use more OUStringLiteral in MediaDescriptorNoel Grandin
Change-Id: I0567d103db8db401c737fed98483912a39352929 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124835 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-03Drop TWIPS_PER_PIXEL and use o3tl::convertMike Kaganski
Change-Id: I8ee3fddaccf6809c95319db1da9a1d2897d00c25 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124626 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-30Prepare for removal of non-const operator[] from Sequence in sdMike Kaganski
Change-Id: I82dc012188f846161beeb54901c2f5d298e5c3b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124385 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-22Revert part of "Simplify vector initialization in sd"Julien Nabet
since it needs 2 allocations instead of one This partially reverts commit 5393f9a53eb8b33537aedd03b7c9efc5222748d6 . Change-Id: Ifaa1327f2da4bb98ac134ebd8ef105becbc28b5e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124068 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-21loplugin:flattenNoel Grandin
Change-Id: I3b4226a9d089ec9aedab95d96e50a068f57a76c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123991 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-16Simplify vector initialization in sdJulien Nabet
Change-Id: I5f56919efeea66ce6e644f2cb123fd264edbcb73 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123697 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-15Remove non-const Sequence::begin()/end() in internal codeMike Kaganski
... to avoid hidden cost of multiple COW checks, because they call getArray() internally. This obsoletes [loplugin:sequenceloop]. Also rename toNonConstRange to asNonConstRange, to reflect that the result is a view of the sequence, not an independent object. TODO: also drop non-const operator[], but introduce operator[] in SequenceRange. Change-Id: Idd5fd7a3400fe65274d2a6343025e2ef8911635d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123518 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-13tdf#144943 PPTX import: fix permission for editingTünde Tóth
The passwords for editing in PPTX documents created with PowerPoint weren't asked and verified. Change-Id: I62eb4fd68aac6422c1221a639f4815459ab556c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123130 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-10-11loplugin:moveparam in sdNoel Grandin
Change-Id: Ia29e29d9af21dbd9bfb846db03f0100832835352 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123390 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-06lok: fix crash on chart doubleclick in patchPaintWindowSzymon Kłos
backtrace: SdrPageWindow::patchPaintWindow(SdrPaintWindow&) (this=0x0, rPaintWindow=...) at svx/source/svdraw/sdrpagewindow.cxx:168 SdXImpressDocument::paintTile(VirtualDevice&, int, int, int, int, long, long) (this=0x64589d0, rDevice=..., nOutputWidth=180, nOutputHeight=135, nTilePosX=0, nTilePosY=0, nTileWidth=15875, nTileHeight=11906) at sd/source/ui/unoidl/unomodel.cxx:2240 Change-Id: Ie5270c3cc4a40121485d5da756a498ec4fd8bf80 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123044 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123134 Tested-by: Jenkins
2021-09-30loplugin:constparams improve handling of pointer paramsNoel Grandin
Change-Id: I4c0002e72703eded435bfe4985f5b0121bf8524b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122843 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-29use SfxItemSetFixed in sdNoel Grandin
Change-Id: Ia28372dbb82fdaaa282756118e0eeb207cfd5146 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122789 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-15Use <comphelper/servicehelper.hxx> implementing XUnoTunnel part 4Mike Kaganski
- Change implementations of getSomething to use getSomethingImpl Or where that's impossible, use getSomething_cast to unify this and reduce number of places where we reinterpret_cast. All static methods getting tunnel ids were renamed to getUnoTunnelId, to comply with the convention used in <comphelper/servicehelper.hxx>. TODO (in separate commits): - Revise uses of getSomething to use getFromUnoTunnel Change-Id: Ifde9e214b52e5df678de71fcc32d2199c82e85cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122100 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
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-09-09tdf#144052 reduce Primitive2D copyingNoel Grandin
when creating charts, by using a Primitive2DContainer&& parameter in the GroupPrimitive2D constructor, which forces the call sites to pass a temporary, and at most call sites, we can std::move in an existing local variable. Change-Id: I531970918800c6832ab606b5a4ff5fd2d47ccf5b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121844 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-08patch SdrPageWindow in SdXImpressDocument::paintTile()Luboš Luňák
This is based on commit 424312aa99307da9f0ee60ea6e3213b2b3dc26b4 amd I don't quite understand everything that happens, because the drawing layer classes have all kinds of comments except those that would explain the purpose or usage of the classes. My understanding is that drawing layer keeps all kinds of state in Sdr* classes and when drawing it tries to find those based on the OutputDevice. But since tiled drawing uses its own VirtualDevice for the drawing, the search fails and a temporary state is used that's always setup up and cleared again. Which is wasteful, and not having the state around also means that e.g. when clicking a checkbox for impress master background, with idle painting disabled there's nothing to react to the event and cause a tile repaint. Change-Id: Ic9036680c628d67615a82dcc4f585ab827b91525 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121780 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-09-02clang-tidy:readability-redundant-member-initNoel Grandin
Change-Id: I0a9b238c0ba551b330bee7b89eb6cd48fad1b265 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121488 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-25i#114206 sd: unshare shape properties for the same type before insertionMiklos Vajna
Regression from commit 9bd99c08e8662becdd5ac8b47ef6f953c14e65fc (CWS-TOOLING: integrate CWS os128, 2009-06-03), the problem was that the SvxItemPropertySet was both used to store a property map (information about UNO properties) and also as a descriptor for a not yet inserted shape. The above commit improved performance by sharing a single instance of an SvxItemPropertySet for the same shape types: this works for the property map, but doing the same for property values is problematic. In practice, this eliminates the need for a workaround in oox/, the user-visible problem was that loading a document with smartart, then loading a document with group shapes (but without smartart) and saving it would copy information from the first, closed document (!) to the second document. Just removing the oox/ workaround would make make -C oox -sr CppunitTest_oox_drawingml CPPUNIT_TEST_NAME="testGroupShapeSmartArt testTdf131082" fail, unsharing the descriptor piece makes it pass again. Change-Id: Icdff2108ad0da18ce0ade081b1938dd74bc0ae90 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120996 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-08-20New loplugin:unusedcapturedefaultStephan Bergmann
In sc/qa/unit/ucalc_formula.cxx, dropping the capture-default from the lExpectedinF lambda revealed that MSVC in C++17 mode (i.e., when building without --with-latest-c++) requires ROW_RANGE (a local const int variable from the enclosing TestFormula::testTdf97369) to be captured, even though all uses of that variable within the lambda body are constant expressions. That is still true at least for the latest Visual Studio 2019 version 16.11.1. (This is not an issue for the lExpectedinH and lExpectedinI lambdas a few lines further down, as they, in addition to using that ROW_RANGE, also use the local const double variables SHIFT1 and SHIFT2, whose uses are not constant expressions, so they are implicitly captured and loplugin:unusedcapturedefault does not suggest dropping those lambdas' capture-defaults in the first place.) Change-Id: Iee7efb485187cbe8eba6a2d470afca4993eb1816 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120693 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-08-19Drop GetSdrObjectFromXShape and use SdrObject::getSdrObjectFromXShapeMike Kaganski
Change-Id: I0d233878ee49fcdc1338ec3bd700e5482d558163 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120694 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
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-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-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-07-25use officecfg to retrieve WarnAlienFormatNoel Grandin
Change-Id: Id7ca2ffa237cb8fda58af60ee5d296f492c5a47e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119462 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-21IsVertical->IsEffectivelyVertical, GetDirectVertical->GetVerticalMike Kaganski
Before commit 653b53287ca09a9ffe3f5ce0242919e719c1086c, editengine objects had a pair IsVertical/SetVertical, which queried and set a boolean flag (and SetVertical also had a second argument to set another flag). The mentioned commit had introduced an inconsistency, changing SetVertical to only set a single flag, but at the same time making IsVertical to return a synthesized result from two values: vertical and rotation. Additionally, GetDirectVertical was introduced to complement SetVertical. In many places, the use of synthetic IsVertical looks suspicious, especially where it is used in combinations with SetVertical. But here I don't change existing logic, and only rename the methods, so that in case someone sees an actual problem, it would be easier to spot the method mismatch. The end result is that now we have a proper getter/setter pair GetVertical/SetVertical, and also IsEffectivelyVertical, named to reflect that it calculates its return value. Change-Id: I38e2b7c5bd7af0787dd7a1c48e1385138dac80b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119315 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-07-19Move svl::Items to include/svl/whichranges.hxx, and unify its usageMike Kaganski
... in WhichRangesContainer and SfxItemSet ctors. Now it's not needed to explicitly use 'value' in WhichRangesContainer's ctor, or create an instance for use in SfxItemSet ctor (svl::Items is already defined as a template value of corresponding type). Instead of WhichRangesContainer Foo(svl::Items<1, 2>::value); SfxItemSet Bar(rItemPool, svl::Items<1, 2>{}); now use: WhichRangesContainer Foo(svl::Items<1, 2>); SfxItemSet Bar(rItemPool, svl::Items<1, 2>); Change-Id: I4681d952b6442732025e5a26768098878907a238 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119157 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-07-15drop the Pair constructor from SfxItemSetNoel Grandin
just so we have one fewer odd constructors here Change-Id: I81278e9436747a4eb46a33da9bfec7a8b30079b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118982 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-28loplugin:indentation improve checks for brace alignmentNoel Grandin
Change-Id: I333100fda7e181f68f36b03279b3fbb8cb768310 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117615 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-13ofz#34297 Indirect-leakCaolán McNamara
this is similar to the memory leak fixed by commit d6e752d5ebfaf66d1c9b0694f9c8582311d6151a Author: Jian Fang Zhang <zhangjf@apache.org> Date: Mon Jun 18 12:26:30 2012 +0000 i#113608#, memory leak in animations: newly exposed crashed problem where the parent node holds a reference to its children and the child held a reference to its parent. Change RandomAnimationNode to use a WeakReference to its parent like the other AnimationNodes do Change-Id: I251a6127c301d1fb7e51397d8f05db4020bc612c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117096 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-08Remove SfxItemState::READONLYArmin Le Grand
As I experimented with redesigning the whole Item/ItemSet/ItemPool paradigm, I alredy checked that SfxItemState::READONLY is not used (and no one really knows what it should do or stands for). Since a removal of complexity is needed to get forward with that redesign and I already made some experiences in branch item_refactor2, I propose to remove this state. It is not really used (gets never set). It is mirrored/used in the UNO API in css::frame::status::ItemState as 'READ_ONLY', but also not used in the office's code. ItenmState itself is used in three places, but all set the Item involved by using a SfxVoidItem to state SfxItemState::DISABLED, which I described in ItemState.idl. This means that no state of READ_ONLY in UNO API is ever imported to office code as DISABLED state at all, so not used. I also marked it as deprecated in the *.idl file. I think - including the experimenting in the mentioned branch - that this is safe for now. I already run a full 'make check' on the changed stuff. Change-Id: I8c15cf7b4f803076ecaaea67659f6e022ac7ef70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116752 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2021-06-01no need to allocate these on the heapNoel Grandin
Change-Id: Iddbc48638fbd1326df79b59080132280029c5d46 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116477 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-17split OutputDevice from WindowNoel Grandin
as part of a longer-term goal of doing our widget rendering only inside a top-level render- context. I moved all of the OutputDevice-related code that existed in vcl::Window into a new subclass of OutputDevice called WindowOutputDevice. Notes for further work (*) not sure why we are getting an 1x1 surface in SvpSalGraphics::releaseCairoContext, but to fix it I clamp the size there (*) might have to dump VCLXDevice, and move it's code down into VCLXWindow and VCLXVirtualDevice (*) can we remove use of VCLXDevice in other places, in favour of just talking to the VCL code? Change-Id: I105946377f5322677d6f7d0c1c23847178a720b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113204 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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>