summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorArmin Le Grand (Allotropia) <Armin.Le.Grand@me.com>2022-02-22 19:39:04 +0100
committerArmin Le Grand <Armin.Le.Grand@me.com>2022-02-25 09:48:14 +0100
commitec635b62af9424eddb32cc4646bc425559f4a622 (patch)
treed67108b25234233cb5fa7893c09bbcd3f8d32def /sw
parent56c871c247b84d7c2cddf685c13e8355db50da46 (diff)
Advanced Diagram support: cleanup/consolidate with existing code
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>
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/pch/precompiled_msword.hxx1
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx7
2 files changed, 4 insertions, 4 deletions
diff --git a/sw/inc/pch/precompiled_msword.hxx b/sw/inc/pch/precompiled_msword.hxx
index 035af3ef0359..4cef754130eb 100644
--- a/sw/inc/pch/precompiled_msword.hxx
+++ b/sw/inc/pch/precompiled_msword.hxx
@@ -429,7 +429,6 @@
#include <svl/zforlist.hxx>
#include <svtools/colorcfg.hxx>
#include <svtools/svtdllapi.h>
-#include <svx/DiagramDataInterface.hxx>
#include <svx/XPropertyEntry.hxx>
#include <svx/flagsdef.hxx>
#include <svx/ipolypolygoneditorcontroller.hxx>
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 959e391e3e37..9bb849bce6aa 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -98,6 +98,7 @@
#include <svx/xflgrit.hxx>
#include <svx/svdouno.hxx>
#include <svx/unobrushitemhelper.hxx>
+#include <svx/svdogrp.hxx>
#include <svl/grabbagitem.hxx>
#include <sfx2/sfxbasemodel.hxx>
#include <tools/date.hxx>
@@ -6426,10 +6427,10 @@ void DocxAttributeOutput::WriteFlyFrame(const ww8::Frame& rFrame)
const SdrObject* pSdrObj = rFrame.GetFrameFormat().FindRealSdrObject();
if ( pSdrObj )
{
- uno::Reference<drawing::XShape> xShape(
- const_cast<SdrObject*>(pSdrObj)->getUnoShape(), uno::UNO_QUERY);
+ const SdrObjGroup* pDiagramCandidate(dynamic_cast<const SdrObjGroup*>(pSdrObj));
+ const bool bIsDiagram(nullptr != pDiagramCandidate && pDiagramCandidate->isDiagram());
- if (xShape.is() && oox::drawingml::DrawingML::IsDiagram(xShape))
+ if (bIsDiagram)
{
if ( !m_pPostponedDiagrams )
{