/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
namespace com::sun::star::beans { class XPropertySet; } namespace com::sun::star::drawing { class XShape; } namespace com::sun::star::drawing { class XShapes; } namespace com::sun::star::frame { class XModel; }
class SvXMLImport; class SvXMLStylesContext; class XMLSdPropHdlFactory; class XMLTableImport;
// dr3d:3dlight context
class SdXML3DLightContext final : public SvXMLImportContext
{ // local parameters which need to be read
sal_Int32 maDiffuseColor;
::basegfx::B3DVector maDirection; bool mbEnabled; bool mbSpecular;
/** creates a 3d light context and adds it to the internal list for later processing */
SvXMLImportContext * create3DLightContext( const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList);
/** this should be called for each scene attribute */ void processSceneAttribute( const sax_fastparser::FastAttributeList::FastAttributeIter & aIter );
/** this sets the scene attributes at this propertyset */ void setSceneAttributes( const css::uno::Reference< css::beans::XPropertySet >& xPropSet );
};
class SvXMLShapeContext : public SvXMLImportContext
{ protected:
css::uno::Reference< css::drawing::XShape > mxShape; bool mbTemporaryShape;
OUString msHyperlink;
// get factories and mappers
SvXMLImportPropertyMapper* GetPropertySetMapper() const { return mpPropertySetMapper.get(); }
SvXMLImportPropertyMapper* GetPresPagePropsMapper() const { return mpPresPagePropsMapper.get(); }
// this function is called whenever the implementation classes like to add this new // shape to the given XShapes. virtualvoid addShape(
css::uno::Reference< css::drawing::XShape >& rShape, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList,
css::uno::Reference< css::drawing::XShapes >& rShapes);
// this function is called whenever the implementation classes have finished importing // a shape to the given XShapes. The shape is already inserted into its XShapes and // all properties and styles are set. virtualvoid finishShape(
css::uno::Reference< css::drawing::XShape >& rShape, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList,
css::uno::Reference< css::drawing::XShapes >& rShapes);
// tdf#127791 help function for group shape events void addShapeEvents(SdXMLEventContextData& rData);
// helper functions processing groups after their component shapes are collected // e.g. for z-order sorting or adding events to the group void pushGroupForPostProcessing( css::uno::Reference< css::drawing::XShapes >& rShapes ); void popGroupAndPostProcess();
void shapeWithZIndexAdded( css::uno::Reference< css::drawing::XShape > const & rShape,
sal_Int32 nZIndex ); /// Updates the z-order of other shapes to be consistent again, needed due /// to the removal of rShape. void shapeRemoved(const css::uno::Reference<css::drawing::XShape>& rShape);
/** adds a mapping for a gluepoint identifier from an xml file to the identifier created after inserting
the new gluepoint into the core. The saved mappings can be retrieved by getGluePointId() */ void addGluePointMapping( css::uno::Reference< css::drawing::XShape > const & xShape,
sal_Int32 nSourceId, sal_Int32 nDestinnationId );
/** moves all current DestinationId's for rXShape by n */ void moveGluePointMapping( const css::uno::Reference< css::drawing::XShape >& xShape, const sal_Int32 n );
/** retrieves a mapping for a gluepoint identifier from the current xml file to the identifier created after
inserting the new gluepoint into the core. The mapping must be initialized first with addGluePointMapping() */
sal_Int32 getGluePointId( const css::uno::Reference< css::drawing::XShape >& xShape, sal_Int32 nSourceId );
/** this method must be calling before the first shape is imported for the given page.
Calls to this method can be nested */ void startPage( css::uno::Reference< css::drawing::XShapes > const & rShapes );
/** this method must be calling after the last shape is imported for the given page
Calls to this method can be nested */ void endPage( css::uno::Reference< css::drawing::XShapes > const & rShapes );
void restoreConnections();
/** creates a property mapper for external chaining */ static std::unique_ptr<SvXMLImportPropertyMapper> CreateShapePropMapper( const css::uno::Reference< css::frame::XModel>& rModel, SvXMLImport& rImport );
/** defines if the import should increment the progress bar or not */ void enableHandleProgressBar(); bool IsHandleProgressBarEnabled() const;
/** queries the capability of the current model to create presentation shapes */ bool IsPresentationShapesSupported() const;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.