Age | Commit message (Collapse) | Author |
|
and move it to its own header file to make the include dependencies
easier to handle
Change-Id: I9449ebd70d83be332e47e1786422697f76175e53
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160905
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
so push the CreateObjectSpecificProperties implementation down to the
concrete subclasses.
Change-Id: If2c9545aada3e9f2c2f2a0140b6d880bdfef111d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158711
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ia0a6330278b044f448c9928362308aadc8fc9a20
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156989
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
|
|
it was not actually doing much besides managing the listener list, so
just use a regular listener list implementation.
Registering was unnecessary as well, we can use getPropertyValue() to
retrieve the current value.
Change-Id: I53ae496e07ff028b12646668b134ffcab18484aa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156619
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
... SdrObjUserData
See tdf#94879 for motivation.
Change-Id: I4d330b0f8e08a3bdfc2c256c2ee86ac584947fc0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155080
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
... should be below their anchor paragraph in the structure tree.
Refactor SwEnhancedPDFExportHelper (etc.) to use the new
EnsureStructureElement()/InitStructureElement() functions instead of
SetCurrentStructureElement() for the frames, and allow it for flys that
don't have their anchor paragraphs created yet because the hell layer is
exported before the document body.
Change-Id: I1be3b54002e8196772e6f9d81dd0fd0c85b6e34b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154399
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
|
|
* SdrObject new member m_IsDecorative
* new Undo SdrUndoObjDecorative
* surprising amount of changes in sw including additional SwUndoFlyDecorative
* svx API SvxShape property "Decorative"
* UI checkbox "Decorative"
* ODF import/export as loext:decorative on style:graphic-properties
* PDF/UA export: ViewObjectContcat tag shapes with this flag as Artifact
Change-Id: I37f7a0597eab92c6c6aff94fad6c16c59b231c80
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154063
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
|
|
which has the nice effect of
(a) removing some duplicated code
(b) being more efficient with deeply nested complex objects
Change-Id: Ifee10d40fca3faac0f5a7b79febdba756850f30f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152124
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
During testing the NbcRotate function on SdrObject it turned out
the the function is essentially a noop, because it uses normal
equality to test the values of a double, which are a product of
sin and cos functions (to determine the 90 degree angles). So
because of this the input rectangle was never modified - noop.
Because of this we can just remove the impl. of the function and
declare it abstract, so that the actual implementations define
a valid function to rotate.
There were some subclasses that didn't override the NbcRotate so
they used the one implementation in SdrObject. These subclasses
now override the function and in the implementation we call
assert(false), which is never called during a test run. It seems
we never rotate those objects.
Change-Id: I1b1a45a8e96ed2d061f9b9f80c5fdaa5a84d4c05
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148266
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
This change makes SdrObject an abstract class that can't be as
we don't want it to be instantiated. With this the ClonseSdrObject
became a pure virtual function.
With this change also the SwFlyDrawObj needs a implementation of
the CloneSdrFunction, which was previously provided by SdrObject.
Change-Id: I2efb8c1e6fac12b17ce497285067029d7da1c1fd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148239
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
Change-Id: I4b2d13dcd87f49cb73e7239102498629239005d0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147036
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
GetPDFAnchorStructureElementId was added in commit 6e5d59c2ca696, but
was unused even there
Change-Id: Id0624cac2854f5406ca93a4c495632fc3c1d0e74
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146354
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
The modern 'abc transform' in Word is not able to use bitmap fill, but
it is possible in legacy VML. Thus use VML in such cases.
A WordArt shape in VML has the text not in a <txbxContent> element but
as string='...' attribute in the <v:textpath> element. To detect
whether a custom shape is a Fontwork in an easy way without cast, I
have added the already for custom shapes existing method IsTextPath()
to the basis class SdrObject.
Using VML for Fontwork with bitmap fill, errors in the VML code become
visible:
* Using <v:imagedata> element results in Word in a picture of the shape.
The shape itself was lost. A bitmap fill of a shape has to be written
with the <v:fill> element.
* Mode 'stretched' in LO UI becomes type='frame' attribute in VML.
I have adapted the unit test NoFillAttrInImagedata in ooxmlexport2.cxx
in sw. The source file has the background image in a v:fill element.
If you replace the 'wps' namespace with a 'my' namespace in the file
generated by LO and so force Word to use the Fallback, you will see
that with v:imagedata Word does not show a background image. Thus the
assumption in the test was wrong, that there has to be a v:imagedata
element.
Change-Id: I6b2b5b8bb19adcee3b41e536419556465e85d135
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145823
Tested-by: Jenkins
Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
|
|
The problem is that setting the title via the dialog in Writer calls
SwFlyFrameFormat::SetObjTitle() which sets SwFrameFormat::msTitle and
SdrObject::m_pPlusData::aObjTitle on the master SwFlyDrawObj.
Now ViewContactOfSdrObj::embedToObjectSpecificInformation() is called
for the SwVirtFlyDrawObj, not the SwFlyDrawObj, because that one is not
on the SdrPage.
However, SwFlyFrameFormat::GetObjTitle() will return
SwFrameFormat::msTitle as a fallback.
So what's missing here is SwVirtFlyDrawObj must forward calls that
get/set model properties to its associated SwFlyDrawObj - implement that
in base class SdrVirtObj.
But note that this does not fix the reported PDF export bug - that was
already fixed by commit 122b4264d23df8b11419839ba700b88c4f936a6c in sw
and this fix is for other users of ObjectInfoPrimitive2D.
Change-Id: Id306c44c67c069777373e5e4d55415176b513afc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143465
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
|
|
... frame in the structure tree.
The problem is that in sw, the anchored objects are painted
outside of the call to paint the page frame, which is what generates the
/Document structure element.
For Writer fly frames, this is handled via their SwFlyDrawObj painting,
where SwTaggedPDFHelper::CheckReopenTag() finds the anchor frame and
temporarily sets it as the structure parent, even if it's on a previous
page.
But all the SdrObjects on a page are painted by 2 calls to PaintLayer()
and there isn't a call back into Writer now.
Somehow this even causes a spurious line like "/Document<</MCID 7>>BDC"
to be emitted outside any PDF object, which looks clearly wrong.
Try to extend the SdrObjUserCall to get a way to retrieve the anchor
frame's structure element index.
Another option would be to extend ViewObjectContactRedirector to return
the PDF Id in its subclass SwViewObjectContactRedirector, and it seems
possible since its only one caller is
ViewObjectContact::getPrimitive2DSequence(), but Armin adivses that the
ViewObjectContactRedirector might go away in the future so it's better
to use SdrObjUserCall.
It's annoying that the mapping is a static members of
SwEnhancedPDFExportHelper; possibly it could be in OutputDevice's
PDFExtOutDevData instead?
Change-Id: Id61faae469aba4f0bd278ab2324aae06c1fdde64
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143027
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
|
|
Change-Id: I2695c86e9b749a4c38920af6d33e8e89f8ea3c62
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142426
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I42bef355eeef15e3733a5ee57b0569887cfa5e84
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142183
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I0cbdb2ee46600559d9a37f09b574d484e72a0e0d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142133
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
add a helper, following the same style as the ones in sw/
Change-Id: I13c673bba5ff47df6beef9d90c200e5801030cf0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142119
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
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>
|
|
Change-Id: Ib2b2650da7abc9260897f9b5aad619a0ea6ae941
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138052
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I0d8a8e4df06595250c07a61181fbd76fe1da5662
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137571
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
Moved and isolated IDiagramHelper to own file to get SdrObjGroup smaller
and less dependent again, all places adapted. isDiagram() now available
at SdrObject directly, adapted and have less places which need to cast
for SdrObjGroup for check.
Started to add SdrHdl/selection visualization to seleced Diagram. Only
as a start, will need to be extended to look good/better, plus evtl.
functionality in handles/UI.
Corrected error(s) found by failing UnitTests
More clang-notes (static, namespace) I nneeded to follow
Change-Id: If4675b3270d3ee30259fce49deb017dbbaf5c0c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134825
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
|
|
Reorganized and streamlined, use IDiagramHelper as main interface
now also for existing code.
Had to adapt oox::Shape && Diagram handling since there the
import gets handled very different. This ensures that a Diagram
is detected at export and that the same happens for now as before
Had to add a detection that resetting the GrabBag is meant to
disable the Diagam functionality. That is very indirect, but
has to stay for compaibility reasons for now
Change-Id: I620b7d61cd84b5f9dd8ae4dc890ebf70ce779cdf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130389
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
|
|
shaves some small amount off the profile of loading a large chart
Change-Id: I24c99a68382663e52baccd34e22b63bf16fa1eb4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129954
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
(*) rename the enum to make it's purpose more obvious
(*) remove the enum header - it belongs to this class, no need to have
it somewhere else
(*) return property name by const&, no need to copy here
(*) use a o3tl::enumarray instead of a std::unordered_map - there are
only 3 entries here, and two of them are ALWAYS used, so just flatten
the data structure.
Change-Id: Ic496bd5220d55be1209a3243c095d461df0a02ae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129788
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
In the document from bsc#1183308, which contains a large number
of custom shapes, I get a noticeable time spent in the callchain
EnhancedCustomShapeEngine::render() -> SdrObject::NbcSetStyleSheet()
-> sdr::properties::GroupProperties::SetStyleSheet() ->
SdrObject::SetStyleSheet(), which means that a non-broadcast call
ends up in a broadcast one, and the time is spent in
SvxShape::Notify(). And it even seems that nobody actually cares
about the broadcasts, possibly because the SfxStyleSheet* value
is actually the same.
I originally tried to make SdrObject::SetStyleSheet() return
if the SfxStyleSheet* is the same, but that fails the test from
717dc8e3575a18e1e. I don't quite understand the reasoning for that,
but solve it then by changing the code to call the Nbc variant
if that's enough.
Change-Id: I096a6799a0dc51c31ec3b0ba070c7f99ec96ac5d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128048
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
Change-Id: I461449959fffa8948bf4321a6c3114505d87a149
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127997
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
since the one purely forwards to the other
Change-Id: I5f614cc1eb819572a55da57d9d6c9ae56b9139c2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126608
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
instead of XInterface, to make it obvious what the reality of the
requirement is
Change-Id: Icdd4113f2a0ece930305f4d8ba010b81d24f43c3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124802
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Id10dc2ef13f54a148a800003cc4bd88ca1a0056f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122233
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
|
|
Change-Id: I4f01eb3842ef198f02af274f54afb2760c820a4b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120655
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
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>
|
|
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>
|
|
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>
|
|
* Support hyperlinks on Shapes in Writer
* Add menu items
* Add context menu items
* ODF import/export + test
* OOXML import/export + test
Change-Id: I7269064c4cabd16fdb8259a48429c508184d3ccf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119164
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
|
|
so we can remove SfxItemPoolUser, which is a right
performance hog when we have large calc spreadsheets
Change-Id: I344002f536f6eead5cf98c6647dd1667fd9c8874
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115247
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
So that nOrdNum doesn't cause -Wshadow in
SwDrawVirtObj::AddToDrawingPage().
Change-Id: Ie7b1401f5c3cb07bfa653c4268dbdce7ba7abea5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113966
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
See tdf#42949 for motivation
Change-Id: Ifc253bf800bb1468b5774663a93f4fb30bec81d3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113657
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Change-Id: I0512ac563a8065814bccbcd942a47f1c5fa11c04
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113018
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
the indirection just makes the code harder to follow
Change-Id: I4046a822972d729ecfc9a9897bfdac146519dbd2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112678
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I5d584f40949e5c7f2fc7e126cd9cae81eed4db70
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110708
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
using operator= implies that overwriting an SdrObject is a
useful operation, but that is not at all true - they are typically
linked into and referred to by many other things.
So rather use a copy-constructor.
Also clean up a couple of weird "do some stuff after the clone"
code into the main copy constructor.
Change-Id: Iefc1481b527602748b5f3abed06e7cca66c0581c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110633
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Iab806959d79ce828069cb16b6a7883981d85dfaa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110579
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I330e0ab6c9955939dad313f9d472f93e39dbd313
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109924
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I78f837a1340be0ca5c49097f543a481b7b43a632
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108367
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I66d016a22158f9f9ef68a80842e95e45516f0b4e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108228
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I4685d7db802767553018d08d23d8b33bca7efff2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106958
Tested-by: Jenkins
Reviewed-by: Jim Raykowski <raykowj@gmail.com>
|
|
Change-Id: Iceb1c2f0c2e1c488e4bef4fed395dd61a40da8ca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106379
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
Change-Id: I256212175f66b5d0599df990675e7344505b7841
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106378
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|