diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2023-10-11 19:13:53 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2023-10-12 11:54:51 +0200 |
commit | d5c19ef9d30cde052e8cd2486ac9395e62d9c9a9 (patch) | |
tree | aa143345d82cc29f47fd861ffc9ca854c6a00487 /svx/source/sdr/contact | |
parent | 2e32aa1e9fc240c9cd9854655106d0decbd3694a (diff) |
drawinglayer,svx: PDF/UA export: put Form SE into anchor paragraph SE
This is like commit d467f1aa3d028f399826c97e2eecedcd79efcf65
and commit 6e5d59c2ca6969e9491f97cd7a00d094fc62cfb3 but for the
form controls, which have their own special ControlPrimitive2D.
Change-Id: I4b4ac45e81f490a7b625acd9e8753300d10bf119
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157847
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'svx/source/sdr/contact')
-rw-r--r-- | svx/source/sdr/contact/viewcontactofunocontrol.cxx | 9 | ||||
-rw-r--r-- | svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx | 10 |
2 files changed, 16 insertions, 3 deletions
diff --git a/svx/source/sdr/contact/viewcontactofunocontrol.cxx b/svx/source/sdr/contact/viewcontactofunocontrol.cxx index cc14ae06ad5e..3018551d8175 100644 --- a/svx/source/sdr/contact/viewcontactofunocontrol.cxx +++ b/svx/source/sdr/contact/viewcontactofunocontrol.cxx @@ -106,6 +106,12 @@ namespace sdr::contact { if(xControlModel.is()) { + void const* pAnchorKey(nullptr); + if (auto const pUserCall = GetSdrObject().GetUserCall()) + { + pAnchorKey = pUserCall->GetPDFAnchorStructureElementKey(GetSdrObject()); + } + // create control primitive WITHOUT possibly existing XControl; this would be done in // the VOC in createPrimitive2DSequence() const drawinglayer::primitive2d::Primitive2DReference xRetval( @@ -114,7 +120,8 @@ namespace sdr::contact { xControlModel, nullptr, GetSdrObject().GetTitle(), - GetSdrObject().GetDescription())); + GetSdrObject().GetDescription(), + pAnchorKey)); rVisitor.visit(xRetval); } diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx index 27eddc715420..e5292b1515d5 100644 --- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx @@ -1564,12 +1564,18 @@ namespace sdr::contact { return; } + SdrObject const& rSdrObj(m_pVOCImpl->getViewContact().GetSdrObject()); + void const* pAnchorKey(nullptr); + if (auto const pUserCall = rSdrObj.GetUserCall()) + { + pAnchorKey = pUserCall->GetPDFAnchorStructureElementKey(rSdrObj); + } + // create a primitive and hand over the existing xControl. This will // allow the primitive to not need to create another one on demand. rContainer.push_back( new ::drawinglayer::primitive2d::ControlPrimitive2D( m_aTransformation, xControlModel, rControl.getControl(), - m_pVOCImpl->getViewContact().GetSdrObject().GetTitle(), - m_pVOCImpl->getViewContact().GetSdrObject().GetDescription()) ); + rSdrObj.GetTitle(), rSdrObj.GetDescription(), pAnchorKey) ); } sal_uInt32 LazyControlCreationPrimitive2D::getPrimitive2DID() const |