30#include <com/sun/star/xml/sax/XFastSAXSerializable.hpp>
43 std::shared_ptr< Diagram > xDiagramPtr,
44 std::shared_ptr<::oox::drawingml::Theme> xTheme,
45 css::awt::Size aImportSize)
46:
svx::diagram::IDiagramHelper()
47, mpDiagramPtr(
std::move(xDiagramPtr))
48, mpThemePtr(
std::move(xTheme))
49, maImportSize(aImportSize)
67 rTarget.TRGetBaseGeometry(aTransformation, aPolyPolygon);
73 pShapePtr->setDiagramType();
80 rTarget.getChildrenOfSdrObject()->ClearSdrObjList();
101 uno::Reference< uno::XInterface >
const & rUnoModel(rModel.
getUnoModel());
110 css::uno::Reference< css::lang::XComponent > aComponentModel( rUnoModel, uno::UNO_QUERY );
111 xFilter->setTargetDocument(aComponentModel);
114 xFilter->setDiagramFontHeights(&
mpDiagramPtr->getDiagramFontHeights());
117 uno::Reference<drawing::XShapes> xShapes(
rTarget.getUnoShape(), uno::UNO_QUERY_THROW);
119 for (
auto const& child : pShapePtr->getChildren())
125 xFilter->getCurrentTheme(),
128 pShapePtr->getFillProperties());
136 mpDiagramPtr->getData()->restoreDataFromShapeToModelAfterDiagramImport(*pShapePtr);
139 rTarget.TRSetBaseGeometry(aTransformation, aPolyPolygon);
159 return std::vector<std::pair<OUString, OUString>>();
176 mpDiagramPtr->getLayout()->getPresPointShapeMap().clear();
196 mpDiagramPtr->getLayout()->getPresPointShapeMap().clear();
209 return mpDiagramPtr->getData()->extractDiagramDataState();
234 mpDiagramPtr->getData()->secureDataFromShapeToModelAfterDiagramImport(rRootShape);
247 const uno::Reference< css::xml::dom::XDocument >& xThemeDocument(
mpDiagramPtr->getData()->getThemeDocument());
254 auto pTheme = std::make_shared<model::Theme>();
258 rxFilter->importFragment(
260 uno::Reference< css::xml::sax::XFastSAXSerializable >(
262 uno::UNO_QUERY_THROW));
css::uno::Reference< css::uno::XInterface > const & getUnoModel()
virtual bool removeNode(const OUString &rNodeId) override
void doAnchor(SdrObjGroup &rTarget, ::oox::drawingml::Shape &rRootShape)
std::shared_ptr<::oox::drawingml::Theme > mpThemePtr
const std::shared_ptr< Diagram > mpDiagramPtr
virtual ~AdvancedDiagramHelper()
css::awt::Size maImportSize
bool hasDiagramData() const
virtual std::shared_ptr< svx::diagram::DiagramDataState > extractDiagramDataState() const override
const std::shared_ptr< ::oox::drawingml::Theme > & getOrCreateThemePtr(rtl::Reference< oox::shape::ShapeFilterBase > &rxFilter) const
AdvancedDiagramHelper(std::shared_ptr< Diagram > xDiagramPtr, std::shared_ptr<::oox::drawingml::Theme > xTheme, css::awt::Size aImportSize)
virtual OUString addNode(const OUString &rText) override
virtual void reLayout(SdrObjGroup &rTarget) override
virtual void applyDiagramDataState(const std::shared_ptr< svx::diagram::DiagramDataState > &rState) override
virtual OUString getString() const override
virtual std::vector< std::pair< OUString, OUString > > getChildren(const OUString &rParentId) const override
bool ForceThemePtrRecreation() const
bool UseDiagramModelData() const
bool UseDiagramThemeData() const
void anchorToSdrObjGroup(SdrObjGroup &rTarget)
Reference< XComponentContext > getProcessComponentContext()
std::shared_ptr< Shape > ShapePtr
std::shared_ptr< DiagramDataState > DiagramDataStatePtr