20#include <config_wasm_strip.h> 
   52#include <oox/token/properties.hxx> 
   53#include "diagram/datamodel.hxx" 
   65#include <com/sun/star/awt/FontSlant.hpp> 
   66#include <com/sun/star/awt/Size.hpp> 
   67#include <com/sun/star/awt/XBitmap.hpp> 
   68#include <com/sun/star/awt/FontWeight.hpp> 
   69#include <com/sun/star/graphic/XGraphic.hpp> 
   70#include <com/sun/star/container/XNamed.hpp> 
   71#include <com/sun/star/lang/XMultiServiceFactory.hpp> 
   72#include <com/sun/star/xml/dom/XDocument.hpp> 
   73#include <com/sun/star/xml/sax/XFastSAXSerializable.hpp> 
   74#include <com/sun/star/drawing/FillStyle.hpp> 
   75#include <com/sun/star/drawing/HomogenMatrix3.hpp> 
   76#include <com/sun/star/drawing/TextVerticalAdjust.hpp> 
   77#include <com/sun/star/drawing/GraphicExportFilter.hpp> 
   78#include <com/sun/star/drawing/XShapes.hpp> 
   79#include <com/sun/star/drawing/EnhancedCustomShapeAdjustmentValue.hpp> 
   80#include <com/sun/star/drawing/XEnhancedCustomShapeDefaulter.hpp> 
   81#include <com/sun/star/drawing/EnhancedCustomShapeTextPathMode.hpp> 
   82#include <com/sun/star/drawing/ConnectorType.hpp> 
   83#include <com/sun/star/embed/XEmbeddedObject.hpp> 
   84#include <com/sun/star/text/XText.hpp> 
   85#include <com/sun/star/table/BorderLine2.hpp> 
   86#include <com/sun/star/table/ShadowFormat.hpp> 
   87#include <com/sun/star/chart2/XChartDocument.hpp> 
   88#include <com/sun/star/style/ParagraphAdjust.hpp> 
   89#include <com/sun/star/io/XOutputStream.hpp> 
   90#include <com/sun/star/lang/Locale.hpp> 
   91#include <com/sun/star/i18n/ScriptType.hpp> 
   96#include <com/sun/star/document/XActionLockable.hpp> 
   97#include <com/sun/star/chart2/data/XDataReceiver.hpp> 
   98#include <com/sun/star/text/GraphicCrop.hpp> 
  140, meFrameType( FRAMETYPE_GENERIC )
 
  142, mnDiagramRotation( 0 )
 
  146, mbHiddenMasterShape( false )
 
  149, mbLockedCanvas( false )
 
  152, mbHasLinkedTxbx( false )
 
  154, mpDiagramHelper( nullptr )
 
  162: mpTextBody(pSourceShape->mpTextBody)
 
  163, mpLinePropertiesPtr( pSourceShape->mpLinePropertiesPtr )
 
  164, mpShapeRefLinePropPtr( pSourceShape->mpShapeRefLinePropPtr )
 
  165, mpFillPropertiesPtr( pSourceShape->mpFillPropertiesPtr )
 
  166, mpShapeRefFillPropPtr( pSourceShape->mpShapeRefFillPropPtr )
 
  167, mpGraphicPropertiesPtr( pSourceShape->mpGraphicPropertiesPtr )
 
  168, mpCustomShapePropertiesPtr( pSourceShape->mpCustomShapePropertiesPtr )
 
  169, mpTablePropertiesPtr( pSourceShape->mpTablePropertiesPtr )
 
  170, mp3DPropertiesPtr( pSourceShape->mp3DPropertiesPtr )
 
  171, mpEffectPropertiesPtr (pSourceShape->mpEffectPropertiesPtr)
 
  172, mpShapeRefEffectPropPtr(pSourceShape->mpShapeRefEffectPropPtr)
 
  173, maShapeProperties( pSourceShape->maShapeProperties )
 
  174, mpMasterTextListStyle( pSourceShape->mpMasterTextListStyle )
 
  175, msServiceName( pSourceShape->msServiceName )
 
  177, msInternalName( pSourceShape->msInternalName )
 
  178, msId( pSourceShape->msId )
 
  179, mnSubType( pSourceShape->mnSubType )
 
  180, moSubTypeIndex( pSourceShape->moSubTypeIndex )
 
  181, maShapeStyleRefs( pSourceShape->maShapeStyleRefs )
 
  184, meFrameType( pSourceShape->meFrameType )
 
  185, mnRotation( pSourceShape->mnRotation )
 
  186, mnDiagramRotation( pSourceShape->mnDiagramRotation )
 
  187, mbFlipH( pSourceShape->mbFlipH )
 
  188, mbFlipV( pSourceShape->mbFlipV )
 
  189, mbHidden( pSourceShape->mbHidden )
 
  190, mbHiddenMasterShape( pSourceShape->mbHiddenMasterShape )
 
  191, mbLocked( pSourceShape->mbLocked )
 
  192, mbWPGChild( pSourceShape->mbWPGChild )
 
  193, mbLockedCanvas( pSourceShape->mbLockedCanvas )
 
  194, mbWps( pSourceShape->mbWps )
 
  195, mbTextBox( pSourceShape->mbTextBox )
 
  196, mbHasLinkedTxbx(false)
 
  197, maDiagramDoms( pSourceShape->maDiagramDoms )
 
  198, mnZOrder(pSourceShape->mnZOrder)
 
  199, mnZOrderOff(pSourceShape->mnZOrderOff)
 
  200, mnDataNodeType(pSourceShape->mnDataNodeType)
 
  201, mfAspectRatio(pSourceShape->mfAspectRatio)
 
  202, mpDiagramHelper( nullptr )
 
  203, msDiagramDataModelID(pSourceShape->msDiagramDataModelID)
 
  214    const std::shared_ptr< Diagram >& rDiagramPtr,
 
  215    const std::shared_ptr<::oox::drawingml::Theme>& rTheme)
 
  266    if(pTarget->mpDiagramHelper)
 
  269        delete pTarget->mpDiagramHelper;
 
  270        pTarget->mpDiagramHelper = 
nullptr;
 
  297                                         static_cast<sal_Int16
>(ParagraphAdjust_LEFT));
 
  313        msServiceName = 
"com.sun.star.drawing.temporaryForXMLImportOLE2Shape";
 
  357    SAL_INFO(
"oox.drawingml", 
"Shape::addShape: id='" << 
msId << 
"'");
 
  367            if( pShapeMap && !
msId.isEmpty() )
 
  369                (*pShapeMap)[ 
msId ] = shared_from_this();
 
  375                addChildren( rFilterBase, *
this, pTheme, xShapes, pShapeMap, aMatrix );
 
  385                    xChildWPSProperties->setPropertyValue(
 
  389                    xChildWPSProperties->setPropertyValue(
 
  394                    xChildWPSProperties->setPropertyValue(
 
  399                    xChildWPSProperties->setPropertyValue(
 
  404                    xChildWPSProperties->setPropertyValue(
 
  415                    OUString sUrl = aAny.get<OUString>();
 
  440            if (xShape.is() && pNamedShapePairs)
 
  443                if (itPairs != pNamedShapePairs->end())
 
  445                    auto it = itPairs->second.find(shared_from_this());
 
  446                    if (it != itPairs->second.end())
 
  484    SAL_INFO(
"oox.drawingml", 
"Shape::applyShapeReference: apply '" << rReferencedShape.
msId << 
"' to '" << 
msId << 
"'");
 
  486    if ( rReferencedShape.
mpTextBody && bUseText )
 
  508struct ActionLockGuard
 
  541        child->addShape( rFilterBase, pTheme, rxShapes, aTransformation, 
getFillProperties(), pShapeMap, rMaster.shared_from_this());
 
  547    if (eAdjust == ParagraphAdjust_LEFT)
 
  549    else if (eAdjust == ParagraphAdjust_RIGHT)
 
  551    else if (eAdjust == ParagraphAdjust_CENTER)
 
  561                                     const ::oox::core::XmlFilterBase& rFilter)
 
  563    if (!xShape.is() || !pTextBody)
 
  578    auto aParaIt = std::find_if_not(rParagraphs.cbegin(), rParagraphs.cend(),
 
  579                                    [](
const std::shared_ptr<TextParagraph> pParagraph) {
 
  580                                        return pParagraph->getRuns().empty();
 
  582    if (aParaIt != rParagraphs.cend())
 
  584        std::shared_ptr<TextParagraph> pParagraph = *aParaIt;
 
  586        auto aRunIt = std::find_if_not(
 
  587            rRuns.cbegin(), rRuns.cend(),
 
  588            [](
const std::shared_ptr<TextRun> pRun) { return pRun->getText().isEmpty(); });
 
  589        if (aRunIt != rRuns.cend())
 
  591            std::shared_ptr<TextRun> pRun = *aRunIt;
 
  595            if (rCharProps.
moLang.has_value() && !rCharProps.
moLang.value().isEmpty())
 
  598                css::lang::Locale aLocale(aTag.
getLocale(
false));
 
  601                    case css::i18n::ScriptType::LATIN:
 
  602                        xSet->setPropertyValue(
u"CharLocale", 
uno::Any(aLocale));
 
  604                    case css::i18n::ScriptType::ASIAN:
 
  605                        xSet->setPropertyValue(
u"CharLocaleAsian", 
uno::Any(aLocale));
 
  607                    case css::i18n::ScriptType::COMPLEX:
 
  608                        xSet->setPropertyValue(
u"CharLocaleComplex", 
uno::Any(aLocale));
 
  615            if (rCharProps.
moBold.has_value() && rCharProps.
moBold.value())
 
  622                                       uno::Any(css::awt::FontSlant::FontSlant_ITALIC));
 
  624            if (rCharProps.
moHeight.has_value())
 
  626                sal_Int32 nHeight = rCharProps.
moHeight.value() / 100;
 
  632            sal_Int16 nFontPitch = 0;
 
  633            sal_Int16 nFontFamily = 0;
 
  635            if (
const Theme* pTheme = rFilter.getCurrentTheme())
 
  638                if (
const TextFont* pFont = pTheme->resolveFont(
u"+mn-lt"))
 
  640                    bRet = pFont->getFontData(sFontName, nFontPitch, nFontFamily, rFilter);
 
  643                        xSet->setPropertyValue(
u"CharFontName", 
uno::Any(sFontName));
 
  644                        xSet->setPropertyValue(
u"CharFontPitch", 
uno::Any(nFontPitch));
 
  645                        xSet->setPropertyValue(
u"CharFontFamily", 
uno::Any(nFontFamily));
 
  649                if (
const TextFont* pFont = pTheme->resolveFont(
u"+mn-ea"))
 
  651                    bRet = pFont->getFontData(sFontName, nFontPitch, nFontFamily, rFilter);
 
  654                        xSet->setPropertyValue(
u"CharFontNameAsian", 
uno::Any(sFontName));
 
  655                        xSet->setPropertyValue(
u"CharFontPitchAsian", 
uno::Any(nFontPitch));
 
  656                        xSet->setPropertyValue(
u"CharFontFamilyAsian", 
uno::Any(nFontFamily));
 
  660                if (
const TextFont* pFont = pTheme->resolveFont(
u"+mn-cs"))
 
  662                    bRet = pFont->getFontData(sFontName, nFontPitch, nFontFamily, rFilter);
 
  665                        xSet->setPropertyValue(
u"CharFontNameComplex", 
uno::Any(sFontName));
 
  666                        xSet->setPropertyValue(
u"CharFontPitchComplex", 
uno::Any(nFontPitch));
 
  667                        xSet->setPropertyValue(
u"CharFontFamilyComplex", 
uno::Any(nFontFamily));
 
  682                xSet->setPropertyValue(
u"CharFontName", 
uno::Any(sFontName));
 
  683                xSet->setPropertyValue(
u"CharFontPitch", 
uno::Any(nFontPitch));
 
  684                xSet->setPropertyValue(
u"CharFontFamily", 
uno::Any(nFontFamily));
 
  694                xSet->setPropertyValue(
u"CharFontNameAsian", 
uno::Any(sFontName));
 
  695                xSet->setPropertyValue(
u"CharFontPitchAsian", 
uno::Any(nFontPitch));
 
  696                xSet->setPropertyValue(
u"CharFontFamilyAsian", 
uno::Any(nFontFamily));
 
  707                xSet->setPropertyValue(
u"CharFontNameComplex", 
uno::Any(sFontName));
 
  708                xSet->setPropertyValue(
u"CharFontPitchComplex", 
uno::Any(nFontPitch));
 
  709                xSet->setPropertyValue(
u"CharFontFamilyComplex", 
uno::Any(nFontFamily));
 
  718                    aStrokeShapeProps, rFilter.getGraphicHelper());
 
  721                    xSet->setPropertyValue(rProp.Name, rProp.Value);
 
  740                                                       css::awt::Size(0, 0),
 
  746                xSet->setPropertyValue(rProp.Name, rProp.Value);
 
  754            ParagraphAdjust eAdjust = ParagraphAdjust_LEFT;
 
  755            if (pParagraph->getProperties().getParaAdjust())
 
  756                eAdjust = *pParagraph->getProperties().getParaAdjust();
 
  757            xSet->setPropertyValue(
"ParaAdjust", 
uno::Any(eAdjust));
 
  767    const OUString sMSPresetType = pTextBody->getTextProperties().msPrst;
 
  771    if (sFontworkType == 
"fontwork-arch-up-curve" || sFontworkType == 
"fontwork-circle-curve")
 
  773    else if (sFontworkType == 
"fontwork-arch-down-curve")
 
  786    if (!bFlipH && !bFlipV)
 
  789    aCenter *= aTransformation;
 
  791    aTransformation.
scale(bFlipH ? -1.0 : 1.0, bFlipV ? -1.0 : 1.0);
 
  801    const double fSx(aTransformation.
get(0, 0));
 
  802    const double fSy(aTransformation.
get(1, 1));
 
  803    const double fTx(aTransformation.
get(0, 2));
 
  804    const double fTy(aTransformation.
get(1, 2));
 
  805    aTransformation.
set(0, 0, fSy);
 
  806    aTransformation.
set(1, 1, fSx);
 
  807    aTransformation.
set(0, 2, fTx + 0.5 * (fSx - fSy));
 
  808    aTransformation.
set(1, 2, fTy + 0.5 * (fSy - fSx));
 
  814    if (nMSORotationAngle == 0)
 
  816    double fRad = basegfx::deg2rad<60000>(nMSORotationAngle);
 
  818    aCenter *= aTransformation;
 
  820    aTransformation.
rotate(fRad);
 
  828        const OUString& rServiceName,
 
  830        const css::uno::Reference< css::drawing::XShapes >& rxShapes,
 
  832        bool bDoNotInsertEmptyTextBody,
 
  837    bool bIsEmbMedia = 
false;
 
  838    SAL_INFO(
"oox.drawingml", 
"Shape::createAndInsert: id='" << 
msId << 
"' service='" << rServiceName << 
"'");
 
  843        for (
auto const& it : 
mpTextBody->getParagraphs())
 
  845            if (it->HasMathXml())
 
  847                if (!
mpTextBody->isEmpty() || pMathXml != 
nullptr)
 
  849                    SAL_WARN(
"oox.drawingml", 
"losing a Math object...");
 
  853                    pMathXml = &it->GetMathXml();
 
  875    awt::Rectangle aShapeRectHmm(
 
  881    OUString aServiceName;
 
  885        aServiceName = 
"com.sun.star.drawing.OLE2Shape";
 
  890    else if (rServiceName == 
"com.sun.star.drawing.GraphicObjectShape" &&
 
  893        aServiceName = 
finalizeServiceName( rFilterBase, 
"com.sun.star.presentation.MediaShape", aShapeRectHmm );
 
  902    bool bIsCroppedGraphic = (aServiceName == 
"com.sun.star.drawing.GraphicObjectShape" &&
 
  905    bool bIsCustomShape = (aServiceName == 
"com.sun.star.drawing.CustomShape" || bIsCroppedGraphic);
 
  906    bool bIsConnectorShape = (aServiceName == 
"com.sun.star.drawing.ConnectorShape");
 
  907    if(bIsCroppedGraphic)
 
  909        aServiceName = 
"com.sun.star.drawing.CustomShape";
 
  912    bool bUseRotationTransform = ( !
mbWps ||
 
  913            aServiceName == 
"com.sun.star.drawing.LineShape" ||
 
  914            aServiceName == 
"com.sun.star.drawing.GroupShape" ||
 
  930    if (aServiceName == 
"com.sun.star.drawing.LineShape" 
  931        || aServiceName == 
"com.sun.star.drawing.ConnectorShape")
 
  948    double fParentRotate(0.0);
 
  949    double fParentShearX(0.0);
 
  950    if (pParentGroupShape)
 
  952        aParentTransformation.
decompose(aParentScale, aParentTranslate, fParentRotate, fParentShearX);
 
  955            lcl_mirrorAtCenter(aTransformation, aParentScale.
getX() < 0, aParentScale.
getY() < 0);
 
  956            if(aParentScale.
getX() < 0)
 
  958            if(aParentScale.
getY() < 0)
 
  966        if (
mbWps && pParentGroupShape == 
nullptr)
 
  980    if (pParentGroupShape)
 
  987        aTransformation.
translate(-pParentGroupShape->maChPosition.X,
 
  988                                  -pParentGroupShape->maChPosition.Y);
 
  995        double fFactorX = 1.0;
 
  996        double fFactorY = 1.0;
 
  997        if (pParentGroupShape->maChSize.Width != 0)
 
  998            fFactorX = aParentScale.
getX() / pParentGroupShape->maChSize.Width;
 
  999        if (pParentGroupShape->maChSize.Height != 0)
 
 1000            fFactorY = aParentScale.
getY() / pParentGroupShape->maChSize.Height;
 
 1001        if (fFactorX != 1 || fFactorY != 1)
 
 1006            const bool bNeedsMSOWidthHeightToggle
 
 1007                = (nDeg >= 45 && nDeg < 135) || (nDeg >= 225 && nDeg < 315);
 
 1008            if (bNeedsMSOWidthHeightToggle)
 
 1009                lcl_doSpecialMSOWidthHeightToggle(aTransformation);
 
 1011            aTransformation.
scale(fFactorX, fFactorY);
 
 1013            if (bNeedsMSOWidthHeightToggle)
 
 1015                lcl_doSpecialMSOWidthHeightToggle(aTransformation);
 
 1017                if ((aParentScale.
getX() < 0) != (aParentScale.
getY() < 0))
 
 1018                    lcl_RotateAtCenter(aTransformation, 10800000);
 
 1025    sal_Int16 nOrientation = ((aParentScale.
getX() < 0) != (aParentScale.
getY() < 0)) ? -1 : 1;
 
 1030    if (bUseRotationTransform && (
mnRotation != 0 || nCameraRotation != 0))
 
 1031        lcl_RotateAtCenter(aTransformation, nOrientation * (
mnRotation - nCameraRotation));
 
 1033    if (fParentRotate != 0.0)
 
 1034        aTransformation.
rotate(fParentRotate);
 
 1036        aTransformation.
translate(aParentTranslate);
 
 1038    aParentTransformation = aTransformation;
 
 1041    aTransformation.
scale(fEmuToMm100, fEmuToMm100);
 
 1047        double fRotate, fShearX;
 
 1048        aTransformation.
decompose(aScale, aTranslate, fRotate, fShearX);
 
 1053            aCenter *= aTransformation;
 
 1055            aTransformation.
rotate( fRotate * -2.0 );
 
 1061    if ( aServiceName == 
"com.sun.star.drawing.LineShape" )
 
 1069        sal_Int32 
i, nNumPoints = aPoly.
count();
 
 1070        uno::Sequence< awt::Point > aPointSequence( nNumPoints );
 
 1071        awt::Point* pPoints = aPointSequence.getArray();
 
 1072        for( 
i = 0; 
i < nNumPoints; ++
i )
 
 1080                if (aPoint.
getX() - rPreviousPoint.
getX() == 0)
 
 1082                if (aPoint.
getY() - rPreviousPoint.
getY() == 0)
 
 1086            pPoints[
i] = awt::Point(
static_cast<sal_Int32
>(aPoint.
getX()), 
static_cast<sal_Int32
>(aPoint.
getY()));
 
 1088        uno::Sequence< uno::Sequence< awt::Point > > aPolyPolySequence( 1 );
 
 1089        aPolyPolySequence.getArray()[ 0 ] = aPointSequence;
 
 1093    else if ( aServiceName == 
"com.sun.star.drawing.ConnectorShape" )
 
 1102        awt::Point aAWTStartPosition( 
static_cast< sal_Int32 
>( aStartPosition.
getX() ), 
static_cast< sal_Int32 
>( aStartPosition.
getY() ) );
 
 1103        awt::Point aAWTEndPosition( 
static_cast< sal_Int32 
>( aEndPosition.
getX() ), 
static_cast< sal_Int32 
>( aEndPosition.
getY() ) );
 
 1111        HomogenMatrix3 aMatrix;
 
 1113        aMatrix.Line1.Column1 = aTransformation.
get(0,0);
 
 1114        aMatrix.Line1.Column2 = aTransformation.
get(0,1);
 
 1115        aMatrix.Line1.Column3 = aTransformation.
get(0,2);
 
 1117        aMatrix.Line2.Column1 = aTransformation.
get(1,0);
 
 1118        aMatrix.Line2.Column2 = aTransformation.
get(1,1);
 
 1119        aMatrix.Line2.Column3 = aTransformation.
get(1,2);
 
 1121        aMatrix.Line3.Column1 = 0;
 
 1122        aMatrix.Line3.Column2 = 0;
 
 1123        aMatrix.Line3.Column3 = 1;
 
 1131        mxShape.set( xServiceFact->createInstance( aServiceName ), UNO_QUERY_THROW );
 
 1141                xNamed->setName( 
msName );
 
 1151        if (aServiceName != 
"com.sun.star.text.TextFrame")
 
 1156            SAL_INFO(
"oox.drawingml", 
"Shape::createAndInsert: invisible shape with id='" << 
msId << 
"'");
 
 1157            xSet->setPropertyValue( 
"Visible", 
Any( 
false ) );
 
 1159            xSet->setPropertyValue( 
"Printable", 
Any( 
false ) );
 
 1164            xSet->setPropertyValue(
"MoveProtect", 
Any(
true));
 
 1165            xSet->setPropertyValue(
"SizeProtect", 
Any(
true));
 
 1168        ActionLockGuard 
const alg(
mxShape);
 
 1173            uno::Reference< text::XText > xText( 
mxShape, uno::UNO_QUERY );
 
 1176                xText->setString( 
"" );
 
 1186            xSet->setPropertyValue(
"CLSID", 
uno::Any(
name.GetHexName()));
 
 1187            uno::Reference<embed::XEmbeddedObject> 
const xObj(
 
 1188                xSet->getPropertyValue(
"EmbeddedObject"), uno::UNO_QUERY);
 
 1191                uno::Reference<uno::XInterface> 
const xMathModel(xObj->getComponent());
 
 1192                oox::FormulaImExportBase *
const pMagic(
 
 1193                        dynamic_cast<oox::FormulaImExportBase*
>(xMathModel.get()));
 
 1195                pMagic->readFormulaOoxml(*pMathXml);
 
 1203        sal_Int16 nFillPhClrTheme = -1;
 
 1204        sal_Int16 nLinePhClrTheme = -1;
 
 1220                nLinePhClr = pLineRef->maPhClr.getColor( rGraphicHelper );
 
 1221                nLinePhClrTheme = pLineRef->maPhClr.getSchemeColorIndex();
 
 1226                    {
"SchemeClr", 
uno::Any(pLineRef->maPhClr.getSchemeColorName())},
 
 1227                    {
"Idx", 
uno::Any(pLineRef->mnThemedIdx)},
 
 1233                    {
"Transformations", 
uno::Any(pLineRef->maPhClr.getTransformations())}
 
 1241                    nFillPhClr = pFillRef->maPhClr.getColor(rGraphicHelper);
 
 1242                    nFillPhClrTheme = pFillRef->maPhClr.getSchemeColorIndex();
 
 1245                OUString sColorScheme = pFillRef->maPhClr.getSchemeColorName();
 
 1246                if( !sColorScheme.isEmpty() )
 
 1250                        {
"SchemeClr", 
uno::Any(sColorScheme)},
 
 1251                        {
"Idx", 
uno::Any(pFillRef->mnThemedIdx)},
 
 1253                        {
"Transformations", 
uno::Any(pFillRef->maPhClr.getTransformations())}
 
 1267                    {
"SchemeClr", 
uno::Any(pEffectRef->maPhClr.getSchemeColorName())},
 
 1268                    {
"Idx", 
uno::Any(pEffectRef->mnThemedIdx)},
 
 1269                    {
"Transformations", 
uno::Any(pEffectRef->maPhClr.getTransformations())}
 
 1279            mpTextBody->getTextProperties().pushTextDistances(
Size(aShapeRectHmm.Width, aShapeRectHmm.Height));
 
 1293            aServiceName == 
"com.sun.star.drawing.GraphicObjectShape" ||
 
 1294            aServiceName == 
"com.sun.star.drawing.OLE2Shape")
 
 1304                pTableShape->SetSkipChangeLayout(
true);
 
 1311        if(!bIsCroppedGraphic)
 
 1313                                          css::awt::Size(aShapeRectHmm.Width, aShapeRectHmm.Height),
 
 1317        aLineProperties.
pushToPropMap( aShapeProps, rGraphicHelper, nLinePhClr, nLinePhClrTheme);
 
 1320        aEffectProperties.
pushToPropMap( aShapeProps, rGraphicHelper );
 
 1327        if( xSetInfo.is() && xSetInfo->hasPropertyByName( rPropName ) )
 
 1329                xSet->setPropertyValue( rPropName, 
Any( 
false ) );
 
 1333        if( aServiceName != 
"com.sun.star.drawing.GroupShape" )
 
 1335            if (aServiceName == 
"com.sun.star.text.TextFrame")
 
 1339                    uno::Reference<beans::XPropertySet> propertySet (
mxShape, uno::UNO_QUERY);
 
 1340                    uno::Sequence<beans::PropertyValue> aGrabBag;
 
 1341                    propertySet->getPropertyValue(
"FrameInteropGrabBag") >>= aGrabBag;
 
 1342                    sal_Int32 
length = aGrabBag.getLength();
 
 1343                    aGrabBag.realloc( 
length+1);
 
 1344                    auto pGrabBag = aGrabBag.getArray();
 
 1345                    pGrabBag[
length].Name = 
"mso-orig-shape-type";
 
 1346                    uno::Sequence< sal_Int8 > 
const & aNameSeq =
 
 1348                    OUString sShapePresetTypeName(
reinterpret_cast< const char* 
>(
 
 1349                        aNameSeq.getConstArray()), aNameSeq.getLength(), RTL_TEXTENCODING_UTF8);
 
 1350                    pGrabBag[
length].Value <<= sShapePresetTypeName;
 
 1351                    propertySet->setPropertyValue(
"FrameInteropGrabBag",
uno::Any(aGrabBag));
 
 1357                    uno::Reference<beans::XPropertySet> propertySet (
mxShape, uno::UNO_QUERY);
 
 1358                    uno::Sequence<beans::PropertyValue> aGrabBag;
 
 1359                    propertySet->getPropertyValue(
"FrameInteropGrabBag") >>= aGrabBag;
 
 1360                    sal_Int32 
length = aGrabBag.getLength();
 
 1361                    aGrabBag.realloc( 
length + 3 );
 
 1362                    auto pGrabBag = aGrabBag.getArray();
 
 1363                    pGrabBag[
length].Name = 
"TxbxHasLink";
 
 1365                    pGrabBag[
length + 1 ].Name = 
"Txbx-Id";
 
 1367                    pGrabBag[
length + 2 ].Name = 
"Txbx-Seq";
 
 1369                    propertySet->setPropertyValue(
"FrameInteropGrabBag",
uno::Any(aGrabBag));
 
 1388                    aShapeProps.
erase(PROP_FillBitmap);
 
 1393                    OUString aFillBitmapName = aAny.get<OUString>();
 
 1395                    uno::Reference<graphic::XGraphic> xGraphic(xBitmap, uno::UNO_QUERY);
 
 1402                    uno::Reference<beans::XPropertySet> xPropertySet(
mxShape, uno::UNO_QUERY);
 
 1403                    static const sal_Int32 aBorders[] =
 
 1407                    for (sal_Int32 
nBorder : aBorders)
 
 1419                    uno::Reference<beans::XPropertySet> xPropertySet(
mxShape, uno::UNO_QUERY);
 
 1420                    static constexpr OUStringLiteral aGrabBagPropName = 
u"FrameInteropGrabBag";
 
 1421                    uno::Sequence<beans::PropertyValue> aGrabBag;
 
 1422                    xPropertySet->getPropertyValue(aGrabBagPropName) >>= aGrabBag;
 
 1425                    if (aGrabBag.hasElements())
 
 1427                        sal_Int32 
nLength = aGrabBag.getLength();
 
 1428                        aGrabBag.realloc(
nLength + 1);
 
 1429                        aGrabBag.getArray()[
nLength] = aPair;
 
 1433                        aGrabBag = { aPair };
 
 1435                    xPropertySet->setPropertyValue(aGrabBagPropName, 
uno::Any(aGrabBag));
 
 1438                std::optional<sal_Int32> oShadowDistance;
 
 1449                std::optional<sal_Int32> oShadowColor;
 
 1458                if (oShadowDistance || oShadowColor || aEffectProperties.
maShadow.
moShadowDir.has_value())
 
 1460                    css::table::ShadowFormat aFormat;
 
 1462                        aFormat.Color = *oShadowColor;
 
 1465                        css::table::ShadowLocation nLocation = css::table::ShadowLocation_NONE;
 
 1469                            nLocation = css::table::ShadowLocation_TOP_LEFT;
 
 1472                            nLocation = css::table::ShadowLocation_TOP_RIGHT;
 
 1475                            nLocation = css::table::ShadowLocation_BOTTOM_LEFT;
 
 1478                            nLocation = css::table::ShadowLocation_BOTTOM_RIGHT;
 
 1481                        aFormat.Location = nLocation;
 
 1483                    aFormat.ShadowWidth = *oShadowDistance;
 
 1495            if (aServiceName != 
"com.sun.star.text.TextFrame" && 
isLinkedTxbx())
 
 1497                uno::Reference<beans::XPropertySet> propertySet (
mxShape, uno::UNO_QUERY);
 
 1498                uno::Sequence<beans::PropertyValue> aGrabBag;
 
 1499                propertySet->getPropertyValue(
"InteropGrabBag") >>= aGrabBag;
 
 1500                sal_Int32 
length = aGrabBag.getLength();
 
 1501                aGrabBag.realloc( 
length + 3 );
 
 1502                auto pGrabBag = aGrabBag.getArray();
 
 1503                pGrabBag[
length].Name = 
"TxbxHasLink";
 
 1505                pGrabBag[
length + 1 ].Name = 
"Txbx-Id";
 
 1507                pGrabBag[
length + 2 ].Name = 
"Txbx-Seq";
 
 1509                propertySet->setPropertyValue(
"InteropGrabBag",
uno::Any(aGrabBag));
 
 1513            if (aServiceName == 
"com.sun.star.presentation.GraphicObjectShape" && !bClearText)
 
 1522                uno::Reference<beans::XPropertySet> xGraphic(xSet->getPropertyValue(
"Graphic"), uno::UNO_QUERY);
 
 1525                    awt::Size aBitmapSize;
 
 1526                    xGraphic->getPropertyValue(
"Size100thMM") >>= aBitmapSize;
 
 1527                    sal_Int32 nXMargin = (aShapeRectHmm.Width - aBitmapSize.Width) / 2;
 
 1528                    sal_Int32 nYMargin = (aShapeRectHmm.Height - aBitmapSize.Height) / 2;
 
 1529                    if (nXMargin > 0 && nYMargin > 0)
 
 1531                        text::GraphicCrop aGraphicCrop;
 
 1532                        aGraphicCrop.Top = nYMargin * -1;
 
 1533                        aGraphicCrop.Bottom = nYMargin * -1;
 
 1534                        aGraphicCrop.Left = nXMargin * -1;
 
 1535                        aGraphicCrop.Right = nXMargin * -1;
 
 1550                    pTableShape->LayoutTableHeight(aArea);
 
 1551                    sal_Int32 nCorrectedHeight = aArea.
GetHeight();
 
 1552                    const auto& aShapeSize = 
mxShape->getSize();
 
 1553                    if( nCorrectedHeight > aShapeSize.Height )
 
 1554                        mxShape->setSize( {aShapeSize.Width, nCorrectedHeight} );
 
 1555                    pTableShape->SetSkipChangeLayout(
false);
 
 1562                if (aServiceName == 
"com.sun.star.drawing.LineShape")
 
 1565                    mxShape->setPosition(awt::Point(aShapeRectHmm.X, aShapeRectHmm.Y));
 
 1566                    mxShape->setSize(awt::Size(aShapeRectHmm.Width, aShapeRectHmm.Height));
 
 1596            if( aShapeProps.
hasProperty( PROP_FillGradient ) )
 
 1598                std::vector<beans::PropertyValue> aGradientStops;
 
 1604                    std::vector<beans::PropertyValue> aGradientStop
 
 1609                    OUString sStopColorScheme = rColor.getSchemeColorName();
 
 1610                    if( sStopColorScheme.isEmpty() )
 
 1617                        if( rColor.hasTransparency() )
 
 1639            if (!aEffectProperties.
m_Effects.empty())
 
 1641                std::vector<beans::PropertyValue> aEffects;
 
 1642                for (
auto const& it : aEffectProperties.
m_Effects)
 
 1644                    PropertyValue aEffect = it->getEffect();
 
 1645                    if( !aEffect.Name.isEmpty() )
 
 1647                        std::vector<beans::PropertyValue> aEffectsGrabBag
 
 1652                        Color& aColor( it->moColor );
 
 1654                        if( sColorScheme.isEmpty() )
 
 1676            if( aCamera3DEffects.hasElements() || aLightRig3DEffects.hasElements() || aShape3DEffects.hasElements() )
 
 1680                    {
"Camera", 
uno::Any(aCamera3DEffects)},
 
 1681                    {
"LightRig", 
uno::Any(aLightRig3DEffects)},
 
 1682                    {
"Shape3D", 
uno::Any(aShape3DEffects)}
 
 1693                if( aTextCamera3DEffects.hasElements() || aTextLightRig3DEffects.hasElements() || aTextShape3DEffects.hasElements() )
 
 1697                        {
"Camera", 
uno::Any(aTextCamera3DEffects)},
 
 1698                        {
"LightRig", 
uno::Any(aTextLightRig3DEffects)},
 
 1699                        {
"Shape3D", 
uno::Any(aTextShape3DEffects)}
 
 1720        if (
mbWps && aServiceName == 
"com.sun.star.drawing.LineShape" && !pParentGroupShape)
 
 1723        if (bIsConnectorShape)
 
 1725            OUString sConnectorShapePresetTypeName(
 
 1726                reinterpret_cast<const char*
>(
 
 1729                RTL_TEXTENCODING_UTF8);
 
 1733            for (
size_t i = 0; 
i < aAdjustmentList.size(); 
i++)
 
 1740            case XML_straightConnector1:
 
 1741                xSet->setPropertyValue(
"EdgeKind", 
Any(ConnectorType_LINE));
 
 1743            case XML_bentConnector2:
 
 1744            case XML_bentConnector3:
 
 1745            case XML_bentConnector4:
 
 1746            case XML_bentConnector5:
 
 1747                xSet->setPropertyValue(
"EdgeKind", 
Any(ConnectorType_STANDARD));
 
 1749            case XML_curvedConnector2:
 
 1750            case XML_curvedConnector3:
 
 1751            case XML_curvedConnector4:
 
 1752            case XML_curvedConnector5:
 
 1753                xSet->setPropertyValue(
"EdgeKind", 
Any(ConnectorType_CURVE));
 
 1760        if( bIsCustomShape )
 
 1768                sal_Int32 nTextCameraZRotation = 
getTextBody()->get3DProperties().maCameraRotation.mnRevolution.value_or(0);
 
 1772                sal_Int32 nTextPreRotateAngle = 
static_cast< sal_Int32 
>( 
getTextBody()->getTextProperties().moTextPreRotation.value_or( 0 ) );
 
 1777                sal_Int32 nTextAreaRotateAngle = 
getTextBody()->getTextProperties().moTextAreaRotation.value_or(0);
 
 1788                    if ((nDeg >= 45 && nDeg < 135) || (nDeg >= 225 && nDeg < 315))
 
 1790                        nTextAreaRotateAngle += 5400000;
 
 1791                        nTextPreRotateAngle -= 5400000; 
 
 1798                if (nTextAreaRotateAngle != 0)
 
 1801                auto sHorzOverflow = 
getTextBody()->getTextProperties().msHorzOverflow;
 
 1802                if (!sHorzOverflow.isEmpty())
 
 1804                if (XML_ellipsis == 
getTextBody()->getTextProperties().moVertOverflow)
 
 1810            SAL_INFO(
"oox.cscode", 
"==cscode== shape name: '" << 
msName << 
"'");
 
 1811            SAL_INFO(
"oox.csdata", 
"==csdata== shape name: '" << 
msName << 
"'");
 
 1817                && 
mpTextBody->getTextProperties().msPrst != 
u"textNoShape")
 
 1819                bool bFromWordArt(aShapeProps.
hasProperty(PROP_FromWordArt)
 
 1820                                      ? aShapeProps.
getProperty(PROP_FromWordArt).get<
bool>()
 
 1828            getTextBody()->getTextProperties().pushVertSimulation();
 
 1832        if ( !bUseRotationTransform && (
mnRotation != 0 || nCameraRotation != 0) )
 
 1850                    if( pFontRef->mnThemedIdx != 0 )
 
 1854                                aCharStyleProperties.
assignUsed( *pCharProps );
 
 1855                        SAL_INFO(
"oox.drawingml", 
"Shape::createAndInsert: use font color");
 
 1856                        if ( pFontRef->maPhClr.isUsed() )
 
 1863                xText->setString(
"");
 
 1868                if (!rParagraphs.empty())
 
 1870                    const std::shared_ptr<TextParagraph>& pParagraph = rParagraphs[0];
 
 1871                    if (pParagraph->getProperties().getParaAdjust())
 
 1873                        style::ParagraphAdjust eAdjust = *pParagraph->getProperties().getParaAdjust();
 
 1874                        if (eAdjust == style::ParagraphAdjust_CENTER)
 
 1884                    if (rParagraphs.size() == 1 && pParagraph->getRuns().empty())
 
 1889                        aTextCharacterProps.
assignUsed(pParagraph->getEndProperties());
 
 1890                        aTextCharacterProps.pushToPropSet(aPropertySet, rFilterBase);
 
 1896                if (!
mpTextBody->getTextProperties().msPrst.isEmpty()
 
 1897                    && 
mpTextBody->getTextProperties().msPrst != 
u"textNoShape")
 
 1909                ::Color nCharColor = pFontRef->maPhClr.getColor(rGraphicHelper);
 
 1917            uno::Reference<beans::XPropertySet> propertySet (
mxShape, uno::UNO_QUERY);
 
 1926            uno::Reference<beans::XPropertySet> propertySet(
mxShape, uno::UNO_QUERY);
 
 1927            propertySet->setPropertyValue(
 
 1932        if (aServiceName == 
"com.sun.star.drawing.OLE2Shape" && 
mxOleObjectInfo 
 1935                if (const ::oox::vml::ShapeBase* pVmlShape
 
 1940                    pVmlShape->getTypeModel().maStrokeModel.pushToPropMap(
 
 1943                    pVmlShape->getTypeModel().maFillModel.pushToPropMap(
 
 1973    uno::Sequence<uno::Any> diagramDrawing{
 
 1979    pValue[
length].Name = 
"OOXDrawing";
 
 1980    pValue[
length].Value <<= diagramDrawing;
 
 1992        if ( !xSetInfo.is() )
 
 1996        if( !xSetInfo->hasPropertyByName( aGrabBagPropName ) )
 
 2000        xSet->getPropertyValue( aGrabBagPropName ) >>= aGrabBag;
 
 2003        if ( aGrabBag.hasElements() )
 
 2020        xSet->setPropertyValue(
"MoveProtect", 
Any(
true));
 
 2021        xSet->setPropertyValue(
"SizeProtect", 
Any(
true));
 
 2031        while (xShapes->hasElements())
 
 2033        xShapes->add(xShape);
 
 2059        awt::Size aActualSize = 
mxShape->getSize();
 
 2061        double fPixelsPer100thmm = 
static_cast < double > ( aResolution.
Width() ) / 100000.0;
 
 2062        awt::Size aSize( 
static_cast < sal_Int32 
> ( ( fPixelsPer100thmm * aActualSize.Width ) + 0.5 ),
 
 2063                         static_cast < sal_Int32 
> ( ( fPixelsPer100thmm * aActualSize.Height ) + 0.5 ) );
 
 2080        xGraphicExporter->setSourceDocument( xSourceDoc );
 
 2081        xGraphicExporter->filter( aDescriptor );
 
 2089            SAL_WARN( 
"oox.drawingml", 
"Shape::renderDiagramToGraphic: Unable to import rendered stream into graphic object" );
 
 2095        xShape.set( xServiceFact->createInstance( 
"com.sun.star.drawing.GraphicObjectShape" ), UNO_QUERY_THROW );
 
 2097        xPropSet->setPropertyValue(  
"Graphic", 
Any( xGraphic ) );
 
 2098        xPropSet->setPropertyValue(  
"MoveProtect", 
Any( 
true ) );
 
 2099        xPropSet->setPropertyValue(  
"SizeProtect", 
Any( 
true ) );
 
 2100        xPropSet->setPropertyValue(  
"Name", 
Any( OUString( 
"RenderedShapes" ) ) );
 
 2117    SAL_INFO(
"oox.drawingml", 
"Shape::setMasterTextListStyle: Set master text list style to shape id='" << 
msId << 
"'");
 
 2124    OUString aServiceName = rServiceName;
 
 2129            awt::Size aOleSize( rShapeRect.Width, rShapeRect.Height );
 
 2131                aServiceName = 
"com.sun.star.drawing.OLE2Shape";
 
 2134            OUString aGraphicPath;
 
 2137                    if( const ::oox::vml::ShapeBase* pVmlShape = pVmlDrawing->getShapes().getShapeById( 
mxOleObjectInfo->maShapeId ) )
 
 2138                        aGraphicPath = pVmlShape->getGraphicPath();
 
 2141            if( !aGraphicPath.isEmpty() )
 
 2146                aExtHeader.
xExt = rShapeRect.Width;
 
 2147                aExtHeader.
yExt = rShapeRect.Height;
 
 2158    return aServiceName;
 
 2167            OSL_ENSURE( !
mxChartShapeInfo->maFragmentPath.isEmpty(), 
"Shape::finalizeXShape - missing chart fragment" );
 
 2172                aShapeProp.setProperty( PROP_CLSID, OUString( 
"12dcae26-281f-416f-a234-c3086127382e" ) );
 
 2176                aShapeProp.getProperty( xDocModel, PROP_Model );
 
 2180#if ENABLE_WASM_STRIP_CHART 
 2193                const OUString aThemeOverrideFragmentPath( pChartSpaceFragment->
 
 2194                        getFragmentPathFromFirstTypeFromOfficeDoc(u
"themeOverride") );
 
 2202                if (!aThemeOverrideFragmentPath.isEmpty() && pPowerPointImport)
 
 2205                    uno::Reference< xml::sax::XFastSAXSerializable > xDoc(
 
 2206                            rFilter.
importFragment(aThemeOverrideFragmentPath), uno::UNO_QUERY_THROW);
 
 2208                    auto pThemeOverride = std::make_shared<Theme>(*pTheme);
 
 2216                Reference< drawing::XShapes > xExternalPage;
 
 2218                    xExternalPage = rxShapes;
 
 2222                    if( !xChartDoc->hasInternalDataProvider() )
 
 2224                        Reference< chart2::data::XDataReceiver > xDataRec( xChartDoc, UNO_QUERY );
 
 2225                        Reference< chart2::data::XDataSource > xData = xDataRec->getUsedData();
 
 2226                        if( !xData->getDataSequences().hasElements() || !xData->getDataSequences()[0]->getValues().is() ||
 
 2227                                !xData->getDataSequences()[0]->getValues()->getData().hasElements() )
 
 2237                if (!aThemeOverrideFragmentPath.isEmpty() && pPowerPointImport)
 
 2256    PropertyValue aNewProperty;
 
 2257    aNewProperty.Name = sPropertyName;
 
 2258    aNewProperty.Value = aPropertyValue;
 
 2264    Reference< XPropertySet > xSet( 
mxShape, UNO_QUERY );
 
 2265    Reference< XPropertySetInfo > xSetInfo( xSet->getPropertySetInfo() );
 
 2267    if( 
mxShape.is() && xSet.is() && xSetInfo.is() && xSetInfo->hasPropertyByName( aGrabBagPropName ) )
 
 2269        Sequence< PropertyValue > aGrabBag;
 
 2270        xSet->getPropertyValue( aGrabBagPropName ) >>= aGrabBag;
 
 2272        sal_Int32 
length = aGrabBag.getLength();
 
 2273        aGrabBag.realloc( length + 1 );
 
 2274        aGrabBag.getArray()[
length] = pProperty;
 
 2276        xSet->setPropertyValue( aGrabBagPropName, 
Any( aGrabBag ) );
 
 2285    if( !(
mxShape.is() && xSet.is() && xSetInfo.is() && xSetInfo->hasPropertyByName( aGrabBagPropName )) )
 
 2290    xSet->getPropertyValue( aGrabBagPropName ) >>= aGrabBag;
 
 2292    std::vector<PropertyValue> aVec;
 
 2297        [](
const PropertyValue& rProp) {
 
 2298            PropertyValue aProp;
 
 2299            aProp.Name = rProp.Name;
 
 2300            aProp.Value = rProp.Value;
 
 2317    if( pTheme != 
nullptr )
 
 2330    if ( pParentShapeFillProps != 
nullptr)
 
 2332            aFillProperties.
assignUsed( *pParentShapeFillProps );
 
 2334    return aFillProperties;
 
 2346    if( pTheme != 
nullptr )
 
 2358    return aLineProperties;
 
 2369    if( pTheme != 
nullptr )
 
 2374                aEffectProperties.
assignUsed( *pEffectProps );
 
 2381    return aEffectProperties;
 
 2386    uno::Sequence< uno::Sequence< uno::Any > > xRelListTemp;
 
 2387    sal_Int32 counter = 0;
 
 2395            xRelListTemp.realloc( xImageRels->size() );
 
 2396            auto pxRelListTemp = xRelListTemp.getArray();
 
 2397            for (
auto const& imageRel : *xImageRels)
 
 2399                uno::Sequence< uno::Any > diagramRelTuple (3);
 
 2400                auto pdiagramRelTuple = diagramRelTuple.getArray();
 
 2402                OUString sRelId = imageRel.second.maId;
 
 2404                pdiagramRelTuple[0] <<= sRelId;
 
 2405                OUString sTarget = xImageRels->getFragmentPathFromRelId( sRelId );
 
 2407                uno::Reference< io::XInputStream > xImageInputStrm( rFilter.
openInputStream( sTarget ), uno::UNO_SET_THROW );
 
 2411                    pdiagramRelTuple[1] <<= dataSeq;
 
 2414                pdiagramRelTuple[2] <<= sTarget.copy( sTarget.lastIndexOf(
".") );
 
 2416                pxRelListTemp[counter] = diagramRelTuple;
 
 2419            xRelListTemp.realloc(counter);
 
 2423    return xRelListTemp;
 
 2428    auto pFillProperties = std::make_shared<FillProperties>();
 
geometry::RealPoint2D maPosition
 
geometry::RealSize2D maSize
 
PropertiesInfo aProperties
 
constexpr OUStringLiteral sServiceName
 
constexpr OUStringLiteral sDocumentService
 
static OutputDevice * GetDefaultDevice()
 
ErrCode ImportGraphic(Graphic &rGraphic, const INetURLObject &rPath, sal_uInt16 nFormat=GRFILTER_FORMAT_DONTKNOW, sal_uInt16 *pDeterminedFormat=nullptr, GraphicFilterImportFlags nImportFlags=GraphicFilterImportFlags::NONE)
 
css::uno::Reference< css::graphic::XGraphic > GetXGraphic() const
 
LanguageType getLanguageType(bool bResolveSystem=true) const
 
const css::lang::Locale & getLocale(bool bResolveSystem=true) const
 
static sal_Int16 getScriptType(LanguageType nLang)
 
static SdrObject * getSdrObjectFromXShape(const css::uno::Reference< css::uno::XInterface > &xInt)
 
virtual void NbcSetLogicRect(const tools::Rectangle &rRect)
 
void SetMergedItem(const SfxPoolItem &rItem)
 
virtual const tools::Rectangle & GetLogicRect() const
 
constexpr tools::Long Width() const
 
sal_uInt64 Seek(sal_uInt64 nPos)
 
static SvtFilterOptions & Get()
 
bool IsSmartArt2Shape() const
 
bool decompose(B2DTuple &rScale, B2DTuple &rTranslate, double &rRotate, double &rShearX) const
 
void set(sal_uInt16 nRow, sal_uInt16 nColumn, double fValue)
 
void rotate(double fRadiant)
 
void translate(double fX, double fY)
 
double get(sal_uInt16 nRow, sal_uInt16 nColumn) const
 
void scale(double fX, double fY)
 
void insert(sal_uInt32 nIndex, const basegfx::B2DPoint &rPoint, sal_uInt32 nCount=1)
 
basegfx::B2DPoint const & getB2DPoint(sal_uInt32 nIndex) const
 
void transform(const basegfx::B2DHomMatrix &rMatrix)
 
Provides helper functions for colors, device measurement conversion, graphics, and graphic objects ha...
 
css::uno::Reference< css::graphic::XGraphic > importEmbeddedGraphic(const OUString &rStreamName, const WmfExternal *pExtHeader=nullptr) const
Imports a graphic from the storage stream with the passed path and name.
 
css::uno::Reference< css::awt::XBitmap > getFillBitmap(OUString const &rGraphicName)
 
void assignUsed(const PropertyMap &rPropMap)
Inserts all properties contained in the passed property map.
 
void erase(sal_Int32 nPropId)
 
css::uno::Any getProperty(sal_Int32 nPropId)
 
bool hasProperty(sal_Int32 nPropId) const
Returns true, if the map contains a property with the passed identifier.
 
static const OUString & getPropertyName(sal_Int32 nPropId)
Returns the name of the passed property identifier.
 
css::uno::Sequence< css::beans::PropertyValue > makePropertyValueSequence() const
Returns a sequence of property values, filled with all contained properties.
 
bool setProperty(sal_Int32 nPropId, Type &&rValue)
Sets the specified property to the passed value.
 
A wrapper for a UNO property set.
 
void setProperties(const css::uno::Sequence< OUString > &rPropNames, const css::uno::Sequence< css::uno::Any > &rValues)
Puts the passed properties into the property set.
 
bool setAnyProperty(sal_Int32 nPropId, const css::uno::Any &rValue)
Puts the passed any into the property set.
 
bool importBinaryData(StreamDataSequence &orDataSeq, const OUString &rStreamName)
Imports the raw binary data from the specified stream.
 
utl::MediaDescriptor & getMediaDescriptor() const
Returns the media descriptor.
 
const css::uno::Reference< css::frame::XModel > & getModel() const
Returns the document model (always existing).
 
css::uno::Reference< css::io::XInputStream > openInputStream(const OUString &rStreamName) const
Opens and returns the specified input stream from the base storage.
 
::oox::ole::OleObjectHelper & getOleObjectHelper() const
Returns a helper for the handling of OLE objects.
 
GraphicHelper & getGraphicHelper() const
Returns a helper for the handling of graphics and graphic objects.
 
ModelObjectHelper & getModelObjectHelper() const
Returns a helper with containers for various named drawing objects for the imported document.
 
const css::uno::Reference< css::uno::XComponentContext > & getComponentContext() const
Returns the component context passed in the filter constructor (always existing).
 
virtual ::oox::vml::Drawing * getVmlDrawing()=0
Has to be implemented by each filter to return the collection of VML shapes.
 
RelationsRef importRelations(const OUString &rFragmentPath)
Imports the relations fragment associated with the specified fragment.
 
NamedShapePairs * getDiagramFontHeights()
 
virtual ::oox::drawingml::chart::ChartConverter * getChartConverter()=0
Has to be implemented by each filter, returns a filter-specific chart converter object,...
 
bool importFragment(const rtl::Reference< FragmentHandler > &rxHandler)
Imports a fragment using the passed fragment handler, which contains the full path to the fragment st...
 
virtual void useInternalChartDataTable(bool)
Helper to switch chart data table - specifically for xlsx imports.
 
bool isMSO2007Document() const
 
bool isPlaceHolder() const
Returns true, if the color is a placeholder color in theme style lists.
 
const OUString & getSchemeColorName() const
Returns the scheme name from the a:schemeClr element for interoperability purposes.
 
sal_Int16 getTransparency() const
Returns the transparency of the color (0 = opaque, 100 = full transparent).
 
void setSchemeClr(sal_Int32 nToken)
Sets a scheme color from the a:schemeClr element.
 
void clearTransformations()
Removes all color transformations.
 
bool isUsed() const
Returns true, if the color is initialized.
 
const css::uno::Sequence< css::beans::PropertyValue > & getTransformations() const
Returns the unaltered list of transformations for interoperability purposes.
 
::Color getColor(const GraphicHelper &rGraphicHelper, ::Color nPhClr=API_RGB_TRANSPARENT) const
Returns the final RGB color value.
 
bool setProperty(ShapeProperty ePropId, const Type &rValue)
Sets the specified shape property to the passed value.
 
bool setAnyProperty(ShapeProperty ePropId, const css::uno::Any &rValue)
Sets the specified shape property to the passed value.
 
bool mbLockedCanvas
Is this shape part of a locked canvas?
 
ChartShapeInfo & setChartType(bool bEmbedShapes)
 
void setTextBox(bool bTextBox)
 
FrameType meFrameType
Type for graphic frame shapes.
 
const OUString & getInternalName() const
 
FillProperties getActualFillProperties(const Theme *pTheme, const FillProperties *pParentShapeFillProps) const
 
void putPropertyToGrabBag(const OUString &sPropertyName, const css::uno::Any &aPropertyValue)
 
void setServiceName(const char *pServiceName)
 
const ShapeStyleRef * getShapeStyleRef(sal_Int32 nRefType) const
 
svx::diagram::IDiagramHelper * mpDiagramHelper
 
PropertyMap maShapeProperties
 
PropertyMap & getShapeProperties()
 
LinePropertiesPtr mpShapeRefLinePropPtr
 
void keepDiagramDrawing(::oox::core::XmlFilterBase &rFilterBase, const OUString &rFragmentPath)
 
css::uno::Sequence< css::beans::PropertyValue > maDiagramDoms
 
void applyShapeReference(const Shape &rReferencedShape, bool bUseText=true)
 
void putPropertiesToGrabBag(const css::uno::Sequence< css::beans::PropertyValue > &aProperties)
 
void propagateDiagramHelper()
 
LineProperties & getLineProperties()
 
css::uno::Reference< css::drawing::XShape > renderDiagramToGraphic(::oox::core::XmlFilterBase const &rFilterBase)
 
PropertyMap maDefaultShapeProperties
 
const css::awt::Size & getSize() const
 
css::uno::Sequence< css::uno::Sequence< css::uno::Any > > resolveRelationshipsOfTypeFromOfficeDoc(core::XmlFilterBase &rFilter, const OUString &sFragment, std::u16string_view sType)
 
GraphicPropertiesPtr mpGraphicPropertiesPtr
 
void cloneFillProperties()
Changes reference semantics to value semantics for fill properties.
 
void setWPGChild(bool bWPG)
 
OUString finalizeServiceName(::oox::core::XmlFilterBase &rFilter, const OUString &rServiceName, const css::awt::Rectangle &rShapeRect)
 
bool mbTextBox
This shape has a textbox.
 
ShapeStyleRefMap maShapeStyleRefs
 
EffectProperties & getEffectProperties() const
 
void setMasterTextListStyle(const TextListStylePtr &pMasterTextListStyle)
 
const LinkedTxbxAttr & getLinkedTxbxAttributes() const
 
Shape3DProperties & get3DProperties()
 
void convertSmartArtToMetafile(::oox::core::XmlFilterBase const &rFilterBase)
 
void setLockedCanvas(bool bLockedCanvas)
 
FillPropertiesPtr mpShapeRefFillPropPtr
 
EffectProperties getActualEffectProperties(const Theme *pTheme) const
 
@ FRAMETYPE_GENERIC
Generic shape, no special type.
 
@ FRAMETYPE_TABLE
A table embedded in a shape.
 
@ FRAMETYPE_OLEOBJECT
OLE object embedded in a shape.
 
@ FRAMETYPE_CHART
Chart embedded in a shape.
 
@ FRAMETYPE_DIAGRAM
Complex diagram drawing shape.
 
Shape(const char *pServiceType=nullptr, bool bDefaultHeight=true)
 
void addChildren(::oox::core::XmlFilterBase &rFilterBase, Shape &rMaster, const Theme *pTheme, const css::uno::Reference< css::drawing::XShapes > &rxShapes, ShapeIdMap *pShapeMap, const basegfx::B2DHomMatrix &aTransformation)
 
ChartShapeInfoRef mxChartShapeInfo
Additional data for chart shapes.
 
css::awt::Point maPosition
 
TextListStylePtr mpMasterTextListStyle
 
table::TablePropertiesPtr mpTablePropertiesPtr
 
table::TablePropertiesPtr const & getTableProperties()
 
void keepDiagramCompatibilityInfo()
 
FillPropertiesPtr mpFillPropertiesPtr
 
CustomShapePropertiesPtr mpCustomShapePropertiesPtr
 
OleObjectInfoRef mxOleObjectInfo
Additional data for OLE objects.
 
FillProperties & getFillProperties()
 
void prepareDiagramHelper(const std::shared_ptr< Diagram > &rDiagramPtr, const std::shared_ptr<::oox::drawingml::Theme > &rTheme)
 
void setDefaults(bool bHeight)
 
bool mbWps
Is this a wps shape?
 
virtual void finalizeXShape(::oox::core::XmlFilterBase &rFilter, const css::uno::Reference< css::drawing::XShapes > &rxShapes)
 
void migrateDiagramHelperToNewShape(const ShapePtr &pTarget)
 
std::vector< ShapePtr > maChildren
 
EffectPropertiesPtr mpShapeRefEffectPropPtr
 
const TextBodyPtr & getTextBody() const
 
bool isLinkedTxbx() const
 
css::uno::Reference< css::drawing::XShape > const & createAndInsert(::oox::core::XmlFilterBase &rFilterBase, const OUString &rServiceName, const Theme *pTheme, const css::uno::Reference< css::drawing::XShapes > &rxShapes, bool bClearText, bool bDoNotInsertEmptyTextBody, basegfx::B2DHomMatrix &aTransformation, const FillProperties &rShapeOrParentShapeFillProps, oox::drawingml::ShapePtr pParentGroupShape=nullptr)
 
void addShape(::oox::core::XmlFilterBase &rFilterBase, const Theme *pTheme, const css::uno::Reference< css::drawing::XShapes > &rxShapes, const basegfx::B2DHomMatrix &aTransformation, const FillProperties &rShapeOrParentShapeFillProps, ShapeIdMap *pShapeMap=nullptr, oox::drawingml::ShapePtr pParentGroupShape=nullptr)
 
sal_Int32 mnDiagramRotation
 
::oox::vml::OleObjectInfo & setOleObjectType()
 
css::uno::Reference< css::drawing::XShape > mxShape
 
std::vector< OUString > maConnectorAdjustmentList
 
void setTextBody(const TextBodyPtr &pTextBody)
 
LineProperties getActualLineProperties(const Theme *pTheme) const
 
bool getFontData(OUString &rFontName, sal_Int16 &rnFontPitch, sal_Int16 &rnFontFamily, const ::oox::core::XmlFilterBase &rFilter) const
Returns the font name, pitch, and family; tries to resolve theme placeholder names,...
 
const EffectProperties * getEffectStyle(sal_Int32 nIndex) const
 
const FillProperties * getFillStyle(sal_Int32 nIndex) const
Returns the fill properties of the passed one-based themed style index.
 
const LineProperties * getLineStyle(sal_Int32 nIndex) const
Returns the line properties of the passed one-based themed style index.
 
const TextCharacterProperties * getFontStyle(sal_Int32 nSchemeType) const
Returns theme font properties by scheme type (major/minor).
 
void convertFromModel(::oox::core::XmlFilterBase &rFilter, ChartSpaceModel &rChartModel, const css::uno::Reference< css::chart2::XChartDocument > &rxChartDoc, const css::uno::Reference< css::drawing::XShapes > &rxExternalPage, const css::awt::Point &rChartPos, const css::awt::Size &rChartSize)
Converts the passed OOXML chart model to the passed chart2 document.
 
Handler for a chart fragment (c:chartSpace root element).
 
bool importOleObject(PropertyMap &rPropMap, const OleObjectInfo &rOleObject, const css::awt::Size &rObjSize)
 
const SlidePersistPtr & getActualSlidePersist() const
 
Represents the collection of VML shapes for a complete draw page.
 
#define TOOLS_WARN_EXCEPTION(area, stream)
 
#define GRFILTER_FORMAT_NOTFOUND
 
#define SAL_WARN(area, stream)
 
#define SAL_INFO(area, stream)
 
void putCustomShapeIntoTextPathMode(const css::uno::Reference< css::drawing::XShape > &xShape, const oox::drawingml::CustomShapePropertiesPtr &pCustomShapePropertiesPtr, const OUString &sMSPresetType, const bool bFromWordArt)
Changes the EnhancedCustomShapeGeometry of xShape shape so, that it becomes a LO Fontwork shape corre...
 
OUString GetFontworkType(std::u16string_view rMsoType)
 
tools::Long const nBorder
 
bool hasProperty(const OUString &_rName, const Reference< XPropertySet > &_rxSet)
 
css::uno::Sequence< T > concatSequences(const css::uno::Sequence< T > &rS1, const Ss &... rSn)
 
css::uno::Sequence< DstElementType > containerToSequence(const SrcType &i_Container)
 
css::uno::Sequence< css::beans::PropertyValue > InitPropertySequence(::std::initializer_list< ::std::pair< OUString, css::uno::Any > > vInit)
 
css::beans::PropertyValue makePropertyValue(const OUString &rName, T &&rValue)
 
std::shared_ptr< T > make_shared(Args &&... args)
 
constexpr Point convert(const Point &rPoint, o3tl::Length eFrom, o3tl::Length eTo)
 
constexpr T saturating_add(T a, T b)
 
std::shared_ptr< Relations > RelationsRef
 
std::map< OUString, ShapePairs > NamedShapePairs
 
std::shared_ptr< TableProperties > TablePropertiesPtr
 
float GetFontHeight(sal_Int32 nHeight)
 
static SdrTextHorzAdjust lcl_convertAdjust(ParagraphAdjust eAdjust)
 
std::shared_ptr< Shape > ShapePtr
 
sal_Int32 convertEmuToHmm(sal_Int64 nValue)
Converts the passed 64-bit integer value from EMUs to 1/100 mm.
 
std::shared_ptr< Theme > ThemePtr
 
::std::map< OUString, ShapePtr > ShapeIdMap
 
static void lcl_copyCharPropsToShape(const uno::Reference< drawing::XShape > &xShape, const TextBodyPtr &pTextBody, const ::oox::core::XmlFilterBase &rFilter)
 
std::shared_ptr< TextListStyle > TextListStylePtr
 
std::shared_ptr< TextBody > TextBodyPtr
 
css::uno::Sequence< sal_Int8 > StreamDataSequence
 
const ::Color API_RGB_TRANSPARENT(ColorTransparency, 0xffffffff)
Transparent color for API calls.
 
Reference< document::XActionLockable > m_xLockable
 
#define STREAM_SEEK_TO_BEGIN
 
UNDERLYING_TYPE get() const
 
Additional information for a chart embedded in a drawing shape.
 
std::optional< sal_Int64 > moGlowRad
 
EffectGlowProperties maGlow
 
EffectSoftEdgeProperties maSoftEdge
 
std::vector< std::unique_ptr< Effect > > m_Effects
Stores all effect properties, including those not supported by core yet.
 
void assignUsed(const EffectProperties &rSourceProps)
Overwrites all members that are explicitly set in rSourceProps.
 
EffectShadowProperties maShadow
 
void pushToPropMap(PropertyMap &rPropMap, const GraphicHelper &rGraphicHelper) const
Writes the properties to the passed property map.
 
std::optional< sal_Int64 > moShadowDir
 
std::optional< sal_Int64 > moRad
 
GradientFillProperties maGradientProps
Whether the background is used as fill type.
 
void pushToPropMap(ShapePropertyMap &rPropMap, const GraphicHelper &rGraphicHelper, sal_Int32 nShapeRotation=0, ::Color nPhClr=API_RGB_TRANSPARENT, const css::awt::Size &rSize={}, sal_Int16 nPhClrTheme=-1, bool bFlipH=false, bool bFlipV=false, bool bIsCustomShape=false) const
Writes the properties to the passed property map.
 
void assignUsed(const FillProperties &rSourceProps)
Properties for bitmap fills.
 
Color maFillColor
Fill type (OOXML token).
 
std::optional< sal_Int32 > moFillType
 
css::uno::Sequence< css::beans::PropertyValue > getLightRigAttributes()
 
css::uno::Sequence< css::beans::PropertyValue > getShape3DAttributes(const GraphicHelper &rGraphicHelper, ::Color rPhClr)
 
RotationProperties maCameraRotation
 
css::uno::Sequence< css::beans::PropertyValue > getCameraAttributes()
 
GradientStopMap maGradientStops
 
void assignUsed(const LineProperties &rSourceProps)
Line joint type (OOXML token).
 
FillProperties maLineFill
End line arrow style.
 
sal_Int32 getLineWidth() const
Calculates the line width attribute from the internal state of the object.
 
std::optional< sal_Int32 > moLineWidth
User-defined line dash style.
 
void pushToPropMap(ShapePropertyMap &rPropMap, const GraphicHelper &rGraphicHelper, ::Color nPhClr=API_RGB_TRANSPARENT, sal_Int16 nPhClrTheme=-1) const
Writes the properties to the passed property map.
 
css::drawing::LineStyle getLineStyle() const
Calculates the line style attribute from the internal state of the object.
 
css::drawing::LineCap getLineCap() const
Calculates the line cap attribute from the internal state of the object.
 
css::drawing::LineJoint getLineJoint() const
Calculates the line joint attribute from the internal state of the object.
 
std::optional< sal_Int32 > mnRevolution
 
TextFont maAsianThemeFont
 
TextFont maLatinThemeFont
 
std::optional< OUString > moLang
 
std::optional< bool > moItalic
 
void assignUsed(const TextCharacterProperties &rSourceProps)
Overwrites all members that are explicitly set in rSourceProps.
 
TextFont maComplexThemeFont
 
std::optional< sal_Int32 > moHeight
 
FillProperties maFillProperties
 
std::optional< bool > moBold
 
std::optional< LineProperties > moTextOutlineProperties
 
Contains information about an OLE object embedded in a draw page.
 
SVXCORE_DLLPUBLIC Degree100 NormAngle36000(Degree100 a)
 
constexpr OUStringLiteral UNO_NAME_TEXT_LOWERDIST
 
constexpr OUStringLiteral UNO_NAME_TEXT_UPPERDIST
 
constexpr OUStringLiteral UNO_NAME_HYPERLINK
 
constexpr OUStringLiteral UNO_NAME_LINESTYLE
 
constexpr OUStringLiteral UNO_NAME_CHAR_POSTURE
 
constexpr OUStringLiteral UNO_NAME_TEXT_VERTADJUST
 
constexpr OUStringLiteral UNO_NAME_TEXT_LEFTDIST
 
constexpr OUStringLiteral UNO_NAME_TEXT_AUTOGROWHEIGHT
 
constexpr OUStringLiteral UNO_NAME_TEXT_AUTOGROWWIDTH
 
constexpr OUStringLiteral UNO_NAME_CHAR_HEIGHT
 
constexpr OUStringLiteral UNO_NAME_MISC_OBJ_INTEROPGRABBAG
 
constexpr OUStringLiteral UNO_NAME_TEXT_RIGHTDIST
 
constexpr OUStringLiteral UNO_NAME_CHAR_WEIGHT
 
constexpr OUStringLiteral PROP_FillTransparence
 
constexpr OUStringLiteral PROP_TextWordWrap
 
constexpr OUStringLiteral PROP_Shadow
 
constexpr OUStringLiteral PROP_RightBorder
 
constexpr OUStringLiteral PROP_RotateAngle
 
constexpr OUStringLiteral PROP_TextLeftDistance
 
constexpr OUStringLiteral PROP_ShadowXDistance
 
constexpr OUStringLiteral PROP_HoriOrientPosition
 
constexpr OUStringLiteral PROP_CharHeight
 
constexpr OUStringLiteral PROP_LineColor
 
constexpr OUStringLiteral PROP_TextUpperDistance
 
constexpr OUStringLiteral PROP_BackColor
 
constexpr OUStringLiteral PROP_FillColor
 
constexpr OUStringLiteral PROP_BackColorTransparency
 
constexpr OUStringLiteral PROP_TextContourFrame
 
constexpr OUStringLiteral PROP_CharColor
 
constexpr OUStringLiteral PROP_FillBitmapName
 
constexpr OUStringLiteral PROP_LeftBorder
 
constexpr OUStringLiteral PROP_GraphicCrop
 
constexpr OUStringLiteral PROP_ShadowFormat
 
constexpr OUStringLiteral PROP_BackGraphic
 
constexpr OUStringLiteral PROP_TextLowerDistance
 
constexpr OUStringLiteral PROP_TextAutoGrowHeight
 
constexpr OUStringLiteral PROP_ParaAdjust
 
constexpr OUStringLiteral PROP_TextRightDistance
 
constexpr OUStringLiteral PROP_TopBorder
 
constexpr OUStringLiteral PROP_TextVerticalAdjust
 
constexpr OUStringLiteral PROP_VertOrientPosition
 
constexpr OUStringLiteral PROP_ShadowColor
 
constexpr OUStringLiteral PROP_ShadowYDistance
 
constexpr OUStringLiteral PROP_BottomBorder