20#include <com/sun/star/embed/Aspects.hpp>
21#include <com/sun/star/embed/XEmbeddedObject.hpp>
31#include <osl/file.hxx>
34#include <rtl/math.hxx>
64#include <com/sun/star/drawing/Position3D.hpp>
65#include <com/sun/star/drawing/Direction3D.hpp>
140#include <com/sun/star/drawing/ShadeMode.hpp>
146#include <com/sun/star/drawing/EnhancedCustomShapeParameterPair.hpp>
147#include <com/sun/star/drawing/EnhancedCustomShapeParameterType.hpp>
148#include <com/sun/star/drawing/EnhancedCustomShapeSegment.hpp>
149#include <com/sun/star/drawing/EnhancedCustomShapeGluePointType.hpp>
150#include <com/sun/star/drawing/EnhancedCustomShapeSegmentCommand.hpp>
151#include <com/sun/star/drawing/EnhancedCustomShapeTextFrame.hpp>
152#include <com/sun/star/drawing/EnhancedCustomShapeAdjustmentValue.hpp>
153#include <com/sun/star/drawing/EnhancedCustomShapeTextPathMode.hpp>
154#include <com/sun/star/drawing/EnhancedCustomShapeMetalType.hpp>
155#include <com/sun/star/beans/PropertyValues.hpp>
156#include <com/sun/star/beans/XPropertySetInfo.hpp>
157#include <com/sun/star/beans/XPropertySet.hpp>
158#include <com/sun/star/drawing/ProjectionMode.hpp>
160#include <rtl/ustring.hxx>
167using namespace beans ;
168using namespace drawing ;
169using namespace container ;
177enum class OfficeArtBlipRecInstance : sal_uInt32
189struct SvxMSDffBLIPInfo
192 explicit SvxMSDffBLIPInfo(sal_uInt32 nFPos)
217 if(
nFormat == SotClipboardFormatId::GDIMETAFILE &&
pMtf )
222 "x-scale in the Mtf is wrong" );
224 "y-scale in the Mtf is wrong" );
226 "origin-shift in the Mtf is wrong" );
228 if( MapUnit::Map100thMM != nMU )
235 pMtf->SetPrefMapMode(
MapMode(MapUnit::Map100thMM));
236 pMtf->SetPrefSize( aS );
242 OSL_FAIL(
"unknown format" );
244 sal_uInt64 nEndPos = rStm.
Tell();
247 rStm.
Seek( nEndPos );
253 , mbRotateGranientFillWithAngle(false)
261 sal_uInt64 nOldPos = rStCtrl.
Tell();
274 rStCtrl.
Seek( nOldPos );
277#ifdef DBG_CUSTOMSHAPE
283 sal_uInt64 nFilePos = rIn.Tell();
301#ifdef DBG_CUSTOMSHAPE
305 if( osl::FileBase::getFileURLFromSystemPath( OUString(
"d:\\ashape.dbg"), aURLStr ) == osl::FileBase::E_None )
315 xOut->WriteLine(
"" );
316 OString aString(
"ShapeId: " + OString::number(nShapeId));
317 xOut->WriteLine(aString);
321 if ( IsProperty(
i ) )
325 xOut->WriteLine(aString);
329 for (
i = 320;
i < 383;
i++ )
333 if ( IsProperty(
i ) )
335 if ( SeekToContent(
i, rIn ) )
340 xOut->WriteLine(
"" );
341 OStringBuffer aDesc(
"Property:" + OString::number(
i) +
342 " Size:" + OString::number(nLen));
343 xOut->WriteLine(aDesc.makeStringAndClear());
344 sal_Int16 nNumElem, nNumElemMem, nNumSize;
345 rIn >> nNumElem >> nNumElemMem >> nNumSize;
346 aDesc.append(
"Entries: " + OString::number(nNumElem) +
347 " Size:" + OString::number(nNumSize));
348 xOut->WriteLine(aDesc.makeStringAndClear());
350 nNumSize = ( ( -nNumSize ) >> 2 );
356 for ( sal_uInt32 j = 0; nLen && ( j < ( nNumSize >> 1 ) ); j++ )
358 for ( sal_uInt32 k = 0; k < 2; k++ )
364 if ( ( nVal >> 4 ) > 9 )
365 *xOut << (
sal_uInt8)( ( nVal >> 4 ) +
'A' - 10 );
367 *xOut << (
sal_uInt8)( ( nVal >> 4 ) +
'0' );
369 if ( ( nVal & 0xf ) > 9 )
370 *xOut << (
sal_uInt8)( ( nVal & 0xf ) +
'A' - 10 );
372 *xOut << (
sal_uInt8)( ( nVal & 0xf ) +
'0' );
377 *xOut << (char)(
' ' );
379 xOut->WriteLine( OString() );
385 OString aString(
"Property" + OString::number(
i) +
387 xOut->WriteLine(aString);
396 rIn.Seek( nFilePos );
405 nAngle =
Degree100((
static_cast<sal_Int16
>( nContent >> 16) * 100L ) + ( ( ( nContent & 0x0000ffff) * 100L ) >> 16 ));
445 while ( rIn.
good() && ( rIn.
Tell() < nEndPos ) )
453 rContainer.
aCList.push_back( std::move(pRule) );
464 for (
i = 0, nCnt = rSolver.
aCList.size();
i < nCnt;
i++ )
469 for (
int nN = 0; nN < 2; nN++ )
489 Reference< XShape > aXShape( pO->
getUnoShape(), UNO_QUERY );
496 if( nInventor == SdrInventor::Default )
498 bool bValidGluePoint =
false;
502 case SdrObjKind::Group :
503 case SdrObjKind::Graphic :
504 case SdrObjKind::Rectangle :
505 case SdrObjKind::Text :
506 case SdrObjKind::Page :
507 case SdrObjKind::TitleText :
508 case SdrObjKind::OutlineText :
536 bValidGluePoint =
true;
539 case SdrObjKind::Polygon :
540 case SdrObjKind::PolyLine :
541 case SdrObjKind::Line :
542 case SdrObjKind::PathLine :
543 case SdrObjKind::PathFill :
544 case SdrObjKind::FreehandLine :
545 case SdrObjKind::FreehandFill :
546 case SdrObjKind::PathPoly :
547 case SdrObjKind::PathPolyLine :
553 bValidGluePoint =
true;
554 nId =
static_cast<sal_Int32
>((*pList)[
static_cast<sal_uInt16
>(nC)].
GetId() + 3 );
558 bool bNotFound =
true;
561 sal_uInt16 k, j, nPolySize = aPolyPoly.Count();
565 if ( aBoundRect.GetWidth() && aBoundRect.GetHeight() )
567 sal_uInt32 nPointCount = 0;
568 for ( k = 0; bNotFound && ( k < nPolySize ); k++ )
571 for ( j = 0; bNotFound && ( j < rPolygon.
GetSize() ); j++ )
574 if ( eFlags == PolyFlags::Normal )
576 if ( nC == nPointCount )
579 double fXRel = rPoint.
X() - aBoundRect.Left();
580 double fYRel = rPoint.
Y() - aBoundRect.Top();
581 sal_Int32 nWidth = aBoundRect.GetWidth();
584 sal_Int32 nHeight= aBoundRect.GetHeight();
587 fXRel /=
static_cast<double>(nWidth);
589 fYRel /=
static_cast<double>(nHeight);
591 aGluePoint.
SetPos(
Point(
static_cast<sal_Int32
>(fXRel),
static_cast<sal_Int32
>(fYRel) ) );
593 aGluePoint.
SetAlign( SdrAlign::VERT_TOP | SdrAlign::HORZ_LEFT );
594 aGluePoint.
SetEscDir( SdrEscapeDirection::SMART );
595 nId =
static_cast<sal_Int32
>((*pList)[ pList->
Insert( aGluePoint ) ].GetId() + 3 );
606 bValidGluePoint =
true;
613 case SdrObjKind::CustomShape :
617 static constexpr OUStringLiteral sPath( u
"Path" );
618 sal_Int16 nGluePointType = EnhancedCustomShapeGluePointType::SEGMENTS;
619 css::uno::Any* pAny = aGeometryItem.GetPropertyValueByName( sPath,
"GluePointType" );
621 *pAny >>= nGluePointType;
625 pAny = aGeometryItem.GetPropertyValueByName(
"Type" );
627 *pAny >>= sShapeType;
631 if ( nGluePointType == EnhancedCustomShapeGluePointType::CUSTOM )
633 if ( pList && ( pList->
GetCount() > nC ) )
635 bValidGluePoint =
true;
636 nId =
static_cast<sal_Int32
>((*pList)[
static_cast<sal_uInt16
>(nC)].
GetId() + 3 );
639 else if ( nGluePointType == EnhancedCustomShapeGluePointType::RECT )
667 bValidGluePoint =
true;
669 else if ( nGluePointType == EnhancedCustomShapeGluePointType::SEGMENTS )
672 css::uno::Sequence< css::drawing::EnhancedCustomShapeSegment >
aSegments;
673 pAny = aGeometryItem.GetPropertyValueByName( sPath,
"Segments" );
674 if ( pAny && (*pAny >>= aSegments) )
677 for ( sal_Int32 k = 1; nC && ( k <
aSegments.getLength() ); k++ )
679 sal_Int16 j, nCnt2 =
aSegments[ k ].Count;
682 for ( j = 0; nC && ( j < nCnt2 ); j++ )
684 switch( aSegments[ k ].Command )
686 case EnhancedCustomShapeSegmentCommand::ENDSUBPATH :
687 case EnhancedCustomShapeSegmentCommand::CLOSESUBPATH :
688 case EnhancedCustomShapeSegmentCommand::LINETO :
689 case EnhancedCustomShapeSegmentCommand::MOVETO :
695 case EnhancedCustomShapeSegmentCommand::ELLIPTICALQUADRANTX :
696 case EnhancedCustomShapeSegmentCommand::ELLIPTICALQUADRANTY :
699 case EnhancedCustomShapeSegmentCommand::CURVETO :
706 case EnhancedCustomShapeSegmentCommand::ANGLEELLIPSETO :
707 case EnhancedCustomShapeSegmentCommand::ANGLEELLIPSE :
713 case EnhancedCustomShapeSegmentCommand::ARCTO :
714 case EnhancedCustomShapeSegmentCommand::ARC :
715 case EnhancedCustomShapeSegmentCommand::CLOCKWISEARCTO :
716 case EnhancedCustomShapeSegmentCommand::CLOCKWISEARC :
727 pAny = aGeometryItem.GetPropertyValueByName( sPath,
"Coordinates" );
730 css::uno::Sequence< css::drawing::EnhancedCustomShapeParameterPair > aCoordinates;
731 *pAny >>= aCoordinates;
735 css::drawing::EnhancedCustomShapeParameterPair& rPara = aCoordinates.getArray()[ nPt ];
736 sal_Int32 nX = 0, nY = 0;
737 if ( ( rPara.First.Value >>= nX ) && ( rPara.Second.Value >>= nY ) )
739 static constexpr OUStringLiteral sGluePoints( u
"GluePoints" );
740 css::uno::Sequence< css::drawing::EnhancedCustomShapeParameterPair > aGluePoints;
741 pAny = aGeometryItem.GetPropertyValueByName( sPath, sGluePoints );
743 *pAny >>= aGluePoints;
744 sal_Int32 nGluePoints = aGluePoints.getLength();
745 aGluePoints.realloc( nGluePoints + 1 );
746 auto pGluePoints = aGluePoints.getArray();
750 aProp.Name = sGluePoints;
751 aProp.Value <<= aGluePoints;
752 aGeometryItem.SetPropertyValue( sPath, aProp );
753 bValidGluePoint =
true;
756 if ( pLst->
GetCount() > nGluePoints )
757 nId =
static_cast<sal_Int32
>((*pLst)[
static_cast<sal_uInt16
>(nGluePoints) ].
GetId() + 3 );
766 if ( bValidGluePoint )
768 Reference< XPropertySet > xPropSet( aXConnector, UNO_QUERY );
800 const sal_uInt32 eLineWidth,
const sal_uInt32 eLineLength,
801 sal_Int32& rnArrowWidth,
bool& rbArrowCenter,
802 OUString& rsArrowName,
bool bScaleArrow )
807 sal_Int32 nLineWidthCritical = bScaleArrow ? 40 : 70;
810 double fLengthMul, fWidthMul;
811 sal_Int32 nLineNumber;
812 switch( eLineLength )
827 rbArrowCenter =
false;
828 OUStringBuffer aArrowName;
839 aArrowName.append(
"msArrowEnd ");
845 switch( eLineLength )
868 aArrowName.append(
"msArrowOpenEnd ");
880 aArrowName.append(
"msArrowStealthEnd ");
892 rbArrowCenter =
true;
893 aArrowName.append(
"msArrowDiamondEnd ");
900 Point(
static_cast<sal_Int32
>( fWidthMul * fLineWidth * 0.50 ), 0 ),
901 static_cast<sal_Int32
>( fWidthMul * fLineWidth * 0.50 ),
902 static_cast<sal_Int32
>( fLengthMul * fLineWidth * 0.50 ),
903 0_deg100, 36000_deg100 ).getB2DPolygon() );
904 rbArrowCenter =
true;
905 aArrowName.append(
"msArrowOvalEnd ");
910 aArrowName.append(nLineNumber);
911 rsArrowName = aArrowName.makeStringAndClear();
912 rnArrowWidth =
static_cast<sal_Int32
>( fLineWidth * fWidthMul );
926 if ( nLineFlags & 8 )
969 sal_uInt16 nDots = 1;
971 sal_uInt32 nDotLen = 300;
972 sal_uInt16 nDashes = 0;
973 sal_uInt32 nDashLen = 0;
974 sal_uInt32 nDistance = 300;
975 switch ( eLineDashing )
1049 rSet.
Put(
XLineDashItem( OUString(),
XDash( css::drawing::DashStyle_RECTRELATIVE, nDots, nDotLen, nDashes, nDashLen, nDistance ) ) );
1056 nTrans = (nTrans * 100) / 65536;
1058 sal_uInt16(100 - ::rtl::math::round(nTrans))));
1069 css::drawing::LineJoint eXLineJoint( css::drawing::LineJoint_MITER );
1071 eXLineJoint = css::drawing::LineJoint_BEVEL;
1073 eXLineJoint = css::drawing::LineJoint_ROUND;
1076 if ( nLineFlags & 0x10 )
1078 bool bScaleArrows = rManager.pSdrModel->GetScaleUnit() == MapUnit::MapTwip;
1088 sal_Int32 nArrowWidth;
1090 OUString aArrowName;
1106 sal_Int32 nArrowWidth;
1108 OUString aArrowName;
1128 ShadeColor(
const Color& rC,
double fR ) : aColor( rC ), fDist( fR ) {};
1138 sal_uInt16
i = 0, nNumElem = 0;
1142 sal_uInt16 nNumElemReserved = 0, nSize = 0;
1145 bOk = rIn.
remainingSize() / (2*
sizeof(sal_Int32)) >= nNumElem;
1149 for ( ;
i < nNumElem;
i++ )
1151 sal_Int32 nColor(0);
1159 if ( rShadeColors.empty() )
1171 if (aBitmapSizePixel.
IsEmpty() || aBitmapSizePixel.
Width() > 1024 || aBitmapSizePixel.
Height() > 1024)
1183 double fX =
static_cast< double >( nX ) / aBitmapSizePixel.
Width();
1184 double fY =
static_cast< double >( nY ) / aBitmapSizePixel.
Height();
1204 if ( fX > ( 1 - fY ) )
1220 if ( ( 1 - fX ) > fY )
1233 if ( ( 1 - fX ) > ( 1 - fY ) )
1249 Color aColorA = rShadeColors.front().aColor;
1251 Color aColorB( aColorA );
1252 for (
const auto& rShadeColor : rShadeColors )
1254 if ( fA <= rShadeColor.fDist && rShadeColor.fDist <= fDist )
1256 fA = rShadeColor.fDist;
1257 aColorA = rShadeColor.aColor;
1259 if ( fDist < rShadeColor.fDist && rShadeColor.fDist <= fB )
1261 fB = rShadeColor.fDist;
1262 aColorB = rShadeColor.aColor;
1266 double fD1 = fB - fA;
1269 fRed += ( ( ( fDist - fA ) * ( aColorB.
GetRed() - aColorA.
GetRed() ) ) / fD1 );
1270 fGreen += ( ( ( fDist - fA ) * ( aColorB.
GetGreen() - aColorA.
GetGreen() ) ) / fD1 );
1271 fBlue += ( ( ( fDist - fA ) * ( aColorB.
GetBlue() - aColorA.
GetBlue() ) ) / fD1 );
1273 sal_Int16 nRed =
static_cast< sal_Int16
>( fRed + 0.5 );
1274 sal_Int16 nGreen =
static_cast< sal_Int16
>( fGreen + 0.5 );
1275 sal_Int16 nBlue =
static_cast< sal_Int16
>( fBlue + 0.5 );
1296 bool bRotateWithShape =
true;
1300 const_cast< SvxMSDffManager&
>( rManager ).maShapeRecords.Current()->SeekToBegOfRecord( rIn );
1304 bRotateWithShape = ( nSecFillProperties & 0x0020 );
1307 if ( bRotateWithShape )
1310 aBitmapEx.
Rotate( to<Degree10>(nFix16Angle), rShadeColors[ 0 ].aColor );
1314 nMirrorFlags |= BmpMirrorFlags::Vertical;
1316 nMirrorFlags |= BmpMirrorFlags::Horizontal;
1317 if ( nMirrorFlags != BmpMirrorFlags::NONE )
1318 aBitmapEx.
Mirror( nMirrorFlags );
1330 std::vector< ShadeColor > aShadeColors;
1335 nFillFlags &= ~0x10;
1338 if ( nFillFlags & 0x10 )
1341 drawing::FillStyle eXFill = drawing::FillStyle_NONE;
1342 switch( eMSO_FillType )
1345 eXFill = drawing::FillStyle_SOLID;
1350 eXFill = drawing::FillStyle_BITMAP;
1358 eXFill = drawing::FillStyle_GRADIENT;
1360 eXFill = drawing::FillStyle_BITMAP;
1367 eXFill = drawing::FillStyle_GRADIENT;
1374 double dTrans = 1.0;
1375 double dBackTrans = 1.0;
1379 if ( eXFill != drawing::FillStyle_GRADIENT )
1381 dTrans = dTrans * 100;
1383 sal_uInt16(100 - ::rtl::math::round(dTrans))));
1390 if ( ( eMSO_FillType ==
mso_fillShadeCenter ) && ( eXFill == drawing::FillStyle_BITMAP ) )
1394 else if ( eXFill == drawing::FillStyle_GRADIENT )
1398 else if ( eXFill == drawing::FillStyle_BITMAP )
1432 Scanline pScanlineRead = pRead->GetScanline(
y );
1436 if (pRead->HasPalette())
1437 aReadColor = pRead->GetPaletteColor(pRead->GetIndexFromData(pScanlineRead,
x));
1439 aReadColor = pRead->GetPixelFromData(pScanlineRead,
x);
1441 if (aReadColor ==
Color(0))
1476 bool bVerticalText =
false;
1493 bVerticalText =
true;
1499 if ( ( nFontDirection == 1 ) || ( nFontDirection == 3 ) )
1500 bVerticalText = !bVerticalText;
1502 if ( bVerticalText )
1509 switch( eTextAnchor )
1531 switch ( eTextAnchor )
1553 switch( eTextAnchor )
1575 switch ( eTextAnchor )
1607 sal_uInt32 nAdjustmentsWhichNeedsToBeConverted = 0;
1612 typedef std::vector< beans::PropertyValue > PropVec;
1616 PropertyValue aProp;
1621 aProp.Name =
"Type";
1623 aPropVec.push_back( aProp );
1629 sal_Int32 nCoordWidth = 21600;
1630 sal_Int32 nCoordHeight= 21600;
1633 css::awt::Rectangle aViewBox;
1638 aProp.Name =
"ViewBox";
1639 aProp.Value <<= aViewBox;
1640 aPropVec.push_back( aProp );
1647 sal_Int32 nTextRotateAngle = 0;
1651 nTextRotateAngle += 90;
1657 nTextRotateAngle -= 180;
1664 nTextRotateAngle -= 180;
1669 if ( nTextRotateAngle )
1671 double fTextRotateAngle = nTextRotateAngle;
1672 aProp.Name =
"TextRotateAngle";
1673 aProp.Value <<= fTextRotateAngle;
1674 aPropVec.push_back( aProp );
1683 PropVec aExtrusionPropVec;
1686 aProp.Name =
"Extrusion";
1687 aProp.Value <<= bExtrusionOn;
1688 aExtrusionPropVec.push_back( aProp );
1693 double fBrightness = 20000.0;
1700 fBrightness /= 655.36;
1701 aProp.Name =
"Brightness";
1702 aProp.Value <<= fBrightness;
1703 aExtrusionPropVec.push_back( aProp );
1710 double fDepth = fBackDepth + fForeDepth;
1711 double fFraction = fDepth != 0.0 ? fForeDepth / fDepth : 0;
1712 EnhancedCustomShapeParameterPair aDepthParaPair;
1713 aDepthParaPair.First.Value <<= fDepth;
1714 aDepthParaPair.First.Type = EnhancedCustomShapeParameterType::NORMAL;
1715 aDepthParaPair.Second.Value <<= fFraction;
1716 aDepthParaPair.Second.Type = EnhancedCustomShapeParameterType::NORMAL;
1717 aProp.Name =
"Depth";
1718 aProp.Value <<= aDepthParaPair;
1719 aExtrusionPropVec.push_back( aProp );
1723 double fDiffusion = 100;
1727 fDiffusion /= 655.36;
1729 aProp.Name =
"Diffusion";
1730 aProp.Value <<= fDiffusion;
1731 aExtrusionPropVec.push_back( aProp );
1736 aProp.Name =
"NumberOfLineSegments";
1738 aExtrusionPropVec.push_back( aProp );
1742 aProp.Name =
"LightFace";
1743 aProp.Value <<= bExtrusionLightFace;
1744 aExtrusionPropVec.push_back( aProp );
1747 aProp.Name =
"FirstLightHarsh";
1748 aProp.Value <<= bExtrusionFirstLightHarsh;
1749 aExtrusionPropVec.push_back( aProp );
1752 aProp.Name =
"SecondLightHarsh";
1753 aProp.Value <<= bExtrusionSecondLightHarsh;
1754 aExtrusionPropVec.push_back( aProp );
1759 double fFirstLightLevel = 38000.0;
1765 fFirstLightLevel /= 655.36;
1766 aProp.Name =
"FirstLightLevel";
1767 aProp.Value <<= fFirstLightLevel;
1768 aExtrusionPropVec.push_back( aProp );
1773 double fSecondLightLevel = 38000.0;
1779 fSecondLightLevel /= 655.36;
1780 aProp.Name =
"SecondLightLevel";
1781 aProp.Value <<= fSecondLightLevel;
1782 aExtrusionPropVec.push_back( aProp );
1790 css::drawing::Direction3D aExtrusionFirstLightDirection( fLightX, fLightY, fLightZ );
1791 aProp.Name =
"FirstLightDirection";
1792 aProp.Value <<= aExtrusionFirstLightDirection;
1793 aExtrusionPropVec.push_back( aProp );
1801 css::drawing::Direction3D aExtrusionSecondLightDirection( fLight2X, fLight2Y, fLight2Z );
1802 aProp.Name =
"SecondLightDirection";
1803 aProp.Value <<= aExtrusionSecondLightDirection;
1804 aExtrusionPropVec.push_back( aProp );
1809 aProp.Name =
"Metal";
1810 aProp.Value <<= bExtrusionMetal;
1811 aExtrusionPropVec.push_back( aProp );
1812 aProp.Name =
"MetalType";
1813 aProp.Value <<= css::drawing::EnhancedCustomShapeMetalType::MetalMSCompatible;
1814 aExtrusionPropVec.push_back(aProp);
1820 css::drawing::ShadeMode eExtrusionShadeMode( css::drawing::ShadeMode_FLAT );
1822 eExtrusionShadeMode = css::drawing::ShadeMode_DRAFT;
1824 aProp.Name =
"ShadeMode";
1825 aProp.Value <<= eExtrusionShadeMode;
1826 aExtrusionPropVec.push_back( aProp );
1833 EnhancedCustomShapeParameterPair aRotateAnglePair;
1834 aRotateAnglePair.First.Value <<= fAngleX;
1835 aRotateAnglePair.First.Type = EnhancedCustomShapeParameterType::NORMAL;
1836 aRotateAnglePair.Second.Value <<= fAngleY;
1837 aRotateAnglePair.Second.Type = EnhancedCustomShapeParameterType::NORMAL;
1838 aProp.Name =
"RotateAngle";
1839 aProp.Value <<= aRotateAnglePair;
1840 aExtrusionPropVec.push_back( aProp );
1850 css::drawing::Direction3D aRotationCenter(
1855 aProp.Name =
"RotationCenter";
1856 aProp.Value <<= aRotationCenter;
1857 aExtrusionPropVec.push_back( aProp );
1866 aProp.Name =
"Shininess";
1867 aProp.Value <<= fShininess;
1868 aExtrusionPropVec.push_back( aProp );
1874 double fSkewAngle = -135.0;
1877 double fSkewAmount = 50.0;
1882 fSkewAngle /= 65536.0;
1884 EnhancedCustomShapeParameterPair aSkewPair;
1885 aSkewPair.First.Value <<= fSkewAmount;
1886 aSkewPair.First.Type = EnhancedCustomShapeParameterType::NORMAL;
1887 aSkewPair.Second.Value <<= fSkewAngle;
1888 aSkewPair.Second.Type = EnhancedCustomShapeParameterType::NORMAL;
1889 aProp.Name =
"Skew";
1890 aProp.Value <<= aSkewPair;
1891 aExtrusionPropVec.push_back( aProp );
1898 fSpecularity /= 655.36;
1899 aProp.Name =
"Specularity";
1900 aProp.Value <<= fSpecularity;
1901 aExtrusionPropVec.push_back( aProp );
1905 aProp.Name =
"ProjectionMode";
1906 aProp.Value <<= eProjectionMode;
1907 aExtrusionPropVec.push_back( aProp );
1912 double fViewX = 1250000.0 / 360.0;
1913 double fViewY = -1250000.0 / 360.0;;
1914 double fViewZ = 9000000.0 / 360.0;
1921 css::drawing::Position3D aExtrusionViewPoint( fViewX, fViewY, fViewZ );
1922 aProp.Name =
"ViewPoint";
1923 aProp.Value <<= aExtrusionViewPoint;
1924 aExtrusionPropVec.push_back( aProp );
1933 EnhancedCustomShapeParameterPair aOriginPair;
1934 aOriginPair.First.Value <<= fOriginX;
1935 aOriginPair.First.Type = EnhancedCustomShapeParameterType::NORMAL;
1936 aOriginPair.Second.Value <<= fOriginY;
1937 aOriginPair.Second.Type = EnhancedCustomShapeParameterType::NORMAL;
1938 aProp.Name =
"Origin";
1939 aProp.Value <<= aOriginPair;
1940 aExtrusionPropVec.push_back( aProp );
1944 aProp.Name =
"Color";
1945 aProp.Value <<= bExtrusionColor;
1946 aExtrusionPropVec.push_back( aProp );
1951 aProp.Name =
"Extrusion";
1953 aPropVec.push_back( aProp );
1961 sal_uInt16 nNumElem = 0;
1965 sal_uInt16 nNumElemMem = 0;
1966 sal_uInt16 nElemSize = 8;
1969 if ( nNumElem <= 128 )
1971 uno::Sequence< OUString > aEquations( nNumElem );
1972 for (
auto& rEquation : asNonConstRange(aEquations) )
1974 sal_Int16 nP1(0), nP2(0), nP3(0);
1975 sal_uInt16 nFlags(0);
1980 aProp.Name =
"Equations";
1981 aProp.Value <<= aEquations;
1982 aPropVec.push_back( aProp );
1991 sal_uInt16 nNumElem = 0;
1992 sal_uInt16 nElemSize = 36;
1996 sal_uInt16 nNumElemMem = 0;
1999 bool bImport =
false;
2000 if (nElemSize == 36)
2007 uno::Sequence< beans::PropertyValues > aHandles( nNumElem );
2008 auto aHandlesRange = asNonConstRange(aHandles);
2009 for (sal_uInt32
i = 0;
i < nNumElem; ++
i)
2011 PropVec aHandlePropVec;
2012 sal_uInt32 nFlagsTmp(0);
2013 sal_Int32 nPositionX(0), nPositionY(0), nCenterX(0), nCenterY(0), nRangeXMin(0), nRangeXMax(0), nRangeYMin(0), nRangeYMax(0);
2024 if ( nPositionX == 2 )
2025 nPositionX = nCoordWidth / 2;
2026 if ( nPositionY == 2 )
2027 nPositionY = nCoordHeight / 2;
2028 EnhancedCustomShapeParameterPair aPosition;
2031 aProp.Name =
"Position";
2032 aProp.Value <<= aPosition;
2033 aHandlePropVec.push_back( aProp );
2035 if ( nFlags & SvxMSDffHandleFlags::MIRRORED_X )
2037 aProp.Name =
"MirroredX";
2038 aProp.Value <<=
true;
2039 aHandlePropVec.push_back( aProp );
2041 if ( nFlags & SvxMSDffHandleFlags::MIRRORED_Y )
2043 aProp.Name =
"MirroredY";
2044 aProp.Value <<=
true;
2045 aHandlePropVec.push_back( aProp );
2047 if ( nFlags & SvxMSDffHandleFlags::SWITCHED )
2049 aProp.Name =
"Switched";
2050 aProp.Value <<=
true;
2051 aHandlePropVec.push_back( aProp );
2053 if ( nFlags & SvxMSDffHandleFlags::POLAR )
2055 if ( nCenterX == 2 )
2056 nCenterX = nCoordWidth / 2;
2057 if ( nCenterY == 2 )
2058 nCenterY = nCoordHeight / 2;
2059 if ((nPositionY >= 0x256 || nPositionY <= 0x107) &&
i <
sizeof(sal_uInt32) * 8)
2060 nAdjustmentsWhichNeedsToBeConverted |= ( 1U <<
i );
2061 EnhancedCustomShapeParameterPair aPolar;
2064 aProp.Name =
"Polar";
2065 aProp.Value <<= aPolar;
2066 aHandlePropVec.push_back( aProp );
2068 if ( nFlags & SvxMSDffHandleFlags::MAP )
2070 if ( nCenterX == 2 )
2071 nCenterX = nCoordWidth / 2;
2072 if ( nCenterY == 2 )
2073 nCenterY = nCoordHeight / 2;
2074 EnhancedCustomShapeParameterPair
aMap;
2078 aProp.Value <<=
aMap;
2079 aHandlePropVec.push_back( aProp );
2081 if ( nFlags & SvxMSDffHandleFlags::RANGE )
2083 if (
static_cast<sal_uInt32
>(nRangeXMin) != 0x80000000 )
2085 if ( nRangeXMin == 2 )
2086 nRangeXMin = nCoordWidth / 2;
2087 EnhancedCustomShapeParameter aRangeXMinimum;
2089 bool( nFlags & SvxMSDffHandleFlags::RANGE_X_MIN_IS_SPECIAL ),
true );
2090 aProp.Name =
"RangeXMinimum";
2091 aProp.Value <<= aRangeXMinimum;
2092 aHandlePropVec.push_back( aProp );
2094 if (
static_cast<sal_uInt32
>(nRangeXMax) != 0x7fffffff )
2096 if ( nRangeXMax == 2 )
2097 nRangeXMax = nCoordWidth / 2;
2098 EnhancedCustomShapeParameter aRangeXMaximum;
2100 bool( nFlags & SvxMSDffHandleFlags::RANGE_X_MAX_IS_SPECIAL ),
false );
2101 aProp.Name =
"RangeXMaximum";
2102 aProp.Value <<= aRangeXMaximum;
2103 aHandlePropVec.push_back( aProp );
2105 if (
static_cast<sal_uInt32
>(nRangeYMin) != 0x80000000 )
2107 if ( nRangeYMin == 2 )
2108 nRangeYMin = nCoordHeight / 2;
2109 EnhancedCustomShapeParameter aRangeYMinimum;
2111 bool( nFlags & SvxMSDffHandleFlags::RANGE_Y_MIN_IS_SPECIAL ),
true );
2112 aProp.Name =
"RangeYMinimum";
2113 aProp.Value <<= aRangeYMinimum;
2114 aHandlePropVec.push_back( aProp );
2116 if (
static_cast<sal_uInt32
>(nRangeYMax) != 0x7fffffff )
2118 if ( nRangeYMax == 2 )
2119 nRangeYMax = nCoordHeight / 2;
2120 EnhancedCustomShapeParameter aRangeYMaximum;
2122 bool( nFlags & SvxMSDffHandleFlags::RANGE_Y_MAX_IS_SPECIAL ),
false );
2123 aProp.Name =
"RangeYMaximum";
2124 aProp.Value <<= aRangeYMaximum;
2125 aHandlePropVec.push_back( aProp );
2128 if ( nFlags & SvxMSDffHandleFlags::RADIUS_RANGE )
2130 if (
static_cast<sal_uInt32
>(nRangeXMin) != 0x7fffffff )
2132 if ( nRangeXMin == 2 )
2133 nRangeXMin = nCoordWidth / 2;
2134 EnhancedCustomShapeParameter aRadiusRangeMinimum;
2136 bool( nFlags & SvxMSDffHandleFlags::RANGE_X_MIN_IS_SPECIAL ),
true );
2137 aProp.Name =
"RadiusRangeMinimum";
2138 aProp.Value <<= aRadiusRangeMinimum;
2139 aHandlePropVec.push_back( aProp );
2141 if (
static_cast<sal_uInt32
>(nRangeXMax) != 0x80000000 )
2143 if ( nRangeXMax == 2 )
2144 nRangeXMax = nCoordWidth / 2;
2145 EnhancedCustomShapeParameter aRadiusRangeMaximum;
2147 bool( nFlags & SvxMSDffHandleFlags::RANGE_X_MAX_IS_SPECIAL ),
false );
2148 aProp.Name =
"RadiusRangeMaximum";
2149 aProp.Value <<= aRadiusRangeMaximum;
2150 aHandlePropVec.push_back( aProp );
2153 if ( !aHandlePropVec.empty() )
2159 aProp.Name =
"Handles";
2160 aProp.Value <<= aHandles;
2161 aPropVec.push_back( aProp );
2167 if ( pDefCustomShape && pDefCustomShape->
nHandles && pDefCustomShape->
pHandles )
2169 sal_uInt32
i, nCnt = pDefCustomShape->
nHandles;
2171 for (
i = 0;
i < nCnt;
i++,
pData++ )
2173 if (
pData->nFlags & SvxMSDffHandleFlags::POLAR )
2175 if ( (
pData->nPositionY >= 0x256 ) || (
pData->nPositionY <= 0x107 ) )
2176 nAdjustmentsWhichNeedsToBeConverted |= ( 1U <<
i );
2185 PropVec aPathPropVec;
2191 aProp.Name =
"ExtrusionAllowed";
2192 aProp.Value <<= bExtrusionAllowed;
2193 aPathPropVec.push_back( aProp );
2199 aProp.Name =
"ConcentricGradientFillAllowed";
2200 aProp.Value <<= bConcentricGradientFillAllowed;
2201 aPathPropVec.push_back( aProp );
2207 aProp.Name =
"TextPathAllowed";
2208 aProp.Value <<= bTextPathAllowed;
2209 aPathPropVec.push_back( aProp );
2214 css::uno::Sequence< css::drawing::EnhancedCustomShapeParameterPair > aCoordinates;
2215 sal_uInt16 nNumElemVert = 0;
2216 sal_uInt16 nElemSizeVert = 8;
2220 sal_uInt16 nNumElemMemVert = 0;
2224 if (nElemSizeVert == 0xFFF0)
2228 bool bImport = nElemSizeVert && (rIn.
remainingSize() / nElemSizeVert >= nNumElemVert);
2231 aCoordinates.realloc( nNumElemVert );
2232 for (
auto& rCoordinate : asNonConstRange(aCoordinates))
2234 sal_Int32 nX(0), nY(0);
2236 if ( nElemSizeVert == 8 )
2248 sal_uInt16 nTmpA(0), nTmpB(0);
2256 sal_Int16 nTmpA(0), nTmpB(0);
2267 aProp.Name =
"Coordinates";
2268 aProp.Value <<= aCoordinates;
2269 aPathPropVec.push_back( aProp );
2274 css::uno::Sequence< css::drawing::EnhancedCustomShapeSegment >
aSegments;
2276 sal_uInt16 nNumElemSeg = 0;
2280 sal_uInt16 nNumElemMemSeg = 0;
2281 sal_uInt16 nElemSizeSeg = 2;
2284 sal_uInt64 nMaxEntriesPossible = rIn.
remainingSize() /
sizeof(sal_uInt16);
2285 if (nNumElemSeg > nMaxEntriesPossible)
2287 SAL_WARN(
"filter.ms",
"NumElem list is longer than remaining bytes, ppt or parser is wrong");
2288 nNumElemSeg = nMaxEntriesPossible;
2293 for (
auto& rSegment : asNonConstRange(
aSegments))
2298 sal_Int16 nCnt =
static_cast<sal_Int16
>( nTmp & 0x1fff );
2299 switch( nTmp >> 13 )
2302 nCommand = EnhancedCustomShapeSegmentCommand::LINETO;
2303 if ( !nCnt ) nCnt = 1;
2306 nCommand = EnhancedCustomShapeSegmentCommand::CURVETO;
2307 if ( !nCnt ) nCnt = 1;
2310 nCommand = EnhancedCustomShapeSegmentCommand::MOVETO;
2311 if ( !nCnt ) nCnt = 1;
2314 nCommand = EnhancedCustomShapeSegmentCommand::CLOSESUBPATH;
2318 nCommand = EnhancedCustomShapeSegmentCommand::ENDSUBPATH;
2324 switch ( ( nTmp >> 8 ) & 0x1f )
2331 nCommand = EnhancedCustomShapeSegmentCommand::LINETO;
2338 nCommand = EnhancedCustomShapeSegmentCommand::ANGLEELLIPSETO;
2339 nCnt = ( nTmp & 0xff ) / 3;
2344 nCommand = EnhancedCustomShapeSegmentCommand::ANGLEELLIPSE;
2345 nCnt = ( nTmp & 0xff ) / 3;
2350 nCommand = EnhancedCustomShapeSegmentCommand::ARCTO;
2351 nCnt = ( nTmp & 0xff ) >> 2;
2356 nCommand = EnhancedCustomShapeSegmentCommand::ARC;
2357 nCnt = ( nTmp & 0xff ) >> 2;
2362 nCommand = EnhancedCustomShapeSegmentCommand::CLOCKWISEARCTO;
2363 nCnt = ( nTmp & 0xff ) >> 2;
2368 nCommand = EnhancedCustomShapeSegmentCommand::CLOCKWISEARC;
2369 nCnt = ( nTmp & 0xff ) >> 2;
2374 nCommand = EnhancedCustomShapeSegmentCommand::ELLIPTICALQUADRANTX;
2380 nCommand = EnhancedCustomShapeSegmentCommand::ELLIPTICALQUADRANTY;
2384 case 0xa: nCommand = EnhancedCustomShapeSegmentCommand::NOFILL; nCnt = 0;
break;
2385 case 0xb: nCommand = EnhancedCustomShapeSegmentCommand::NOSTROKE; nCnt = 0;
break;
2392 nCnt =
static_cast<sal_Int16
>(nTmp);
2393 rSegment.Command = nCommand;
2394 rSegment.Count = nCnt;
2397 aProp.Name =
"Segments";
2399 aPathPropVec.push_back( aProp );
2405 aProp.Name =
"StretchX";
2406 aProp.Value <<= nStretchX;
2407 aPathPropVec.push_back( aProp );
2413 aProp.Name =
"StretchY";
2414 aProp.Value <<= nStretchY;
2415 aPathPropVec.push_back( aProp );
2420 sal_uInt16 nNumElem = 0;
2421 sal_uInt16 nElemSize = 16;
2425 sal_uInt16 nNumElemMem = 0;
2428 bool bImport =
false;
2429 if (nElemSize == 16)
2436 css::uno::Sequence< css::drawing::EnhancedCustomShapeTextFrame > aTextFrames( nNumElem );
2437 for (
auto& rTextFrame : asNonConstRange(aTextFrames))
2439 sal_Int32 nLeft(0), nTop(0), nRight(0), nBottom(0);
2451 aProp.Name =
"TextFrames";
2452 aProp.Value <<= aTextFrames;
2453 aPathPropVec.push_back( aProp );
2459 css::uno::Sequence< css::drawing::EnhancedCustomShapeParameterPair > aGluePoints;
2460 sal_uInt16 nNumElemVert = 0;
2461 sal_uInt16 nElemSizeVert = 8;
2465 sal_uInt16 nNumElemMemVert = 0;
2469 if (nElemSizeVert == 0xFFF0)
2474 bool bImport = nElemSizeVert && (rIn.
remainingSize() / nElemSizeVert >= nNumElemVert);
2477 aGluePoints.realloc( nNumElemVert );
2478 for (
auto& rGluePoint : asNonConstRange(aGluePoints))
2480 sal_Int32 nX(0), nY(0);
2481 if ( nElemSizeVert == 8 )
2488 sal_Int16 nTmpA(0), nTmpB(0);
2500 aProp.Name =
"GluePoints";
2501 aProp.Value <<= aGluePoints;
2502 aPathPropVec.push_back( aProp );
2507 aProp.Name =
"GluePointType";
2508 aProp.Value <<= nGluePointType;
2509 aPathPropVec.push_back( aProp );
2512 if ( !aPathPropVec.empty() )
2514 aProp.Name =
"Path";
2516 aPropVec.push_back( aProp );
2525 PropVec aTextPathPropVec;
2528 aProp.Name =
"TextPath";
2529 aProp.Value <<= bTextPathOn;
2530 aTextPathPropVec.push_back( aProp );
2535 bool bTextPathFitShape;
2540 bTextPathFitShape =
true;
2547 bTextPathFitShape =
false;
2552 EnhancedCustomShapeTextPathMode eTextPathMode( EnhancedCustomShapeTextPathMode_NORMAL );
2553 if ( bTextPathFitShape )
2554 eTextPathMode = EnhancedCustomShapeTextPathMode_SHAPE;
2555 else if ( bTextPathFitPath )
2556 eTextPathMode = EnhancedCustomShapeTextPathMode_PATH;
2557 aProp.Name =
"TextPathMode";
2558 aProp.Value <<= eTextPathMode;
2559 aTextPathPropVec.push_back( aProp );
2563 aProp.Name =
"ScaleX";
2564 aProp.Value <<= bTextPathScaleX;
2565 aTextPathPropVec.push_back( aProp );
2568 aProp.Name =
"SameLetterHeights";
2569 aProp.Value <<= bSameLetterHeight;
2570 aTextPathPropVec.push_back( aProp );
2573 aProp.Name =
"TextPath";
2575 aPropVec.push_back( aProp );
2586 if ( nAdjustmentValues )
2588 uno::Sequence< css::drawing::EnhancedCustomShapeAdjustmentValue > aAdjustmentSeq( nAdjustmentValues );
2589 auto pAdjustmentSeq = aAdjustmentSeq.getArray();
2590 while( --nAdjustmentValues >= 0 )
2593 beans::PropertyState ePropertyState = beans::PropertyState_DEFAULT_VALUE;
2597 ePropertyState = beans::PropertyState_DIRECT_VALUE;
2603 pAdjustmentSeq[ nAdjustmentValues ].Value <<= fValue;
2606 pAdjustmentSeq[ nAdjustmentValues ].Value <<=
nValue;
2607 pAdjustmentSeq[ nAdjustmentValues ].State = ePropertyState;
2610 aProp.Name =
"AdjustmentValues";
2611 aProp.Value <<= aAdjustmentSeq;
2612 aPropVec.push_back( aProp );
2629 bool bNonZeroShadowOffset =
false;
2634 if ( nFontAttributes & 0x20 )
2636 if ( nFontAttributes & 0x10 )
2638 if ( nFontAttributes & 0x08 )
2640 if ( nFontAttributes & 0x40 )
2644 if ( nFontAttributes & 0x01 )
2662 bNonZeroShadowOffset = ( nVal > 0 );
2669 bNonZeroShadowOffset = ( nVal > 0 );
2695 static bool bCheckShadow(
false);
2709 nLineFlags &= ~0x08;
2712 nFillFlags &= ~0x10;
2713 if ( nFillFlags & 0x10 )
2716 switch( eMSO_FillType )
2757 if ( rObjData.
bOpt2 )
2765 css::uno::Sequence< sal_Int8 > aXMLDataSeq( nLen );
2766 rIn.
ReadBytes(aXMLDataSeq.getArray(), nLen);
2767 css::uno::Reference< css::io::XInputStream > xInputStream
2768 ( new ::comphelper::SequenceInputStream( aXMLDataSeq ) );
2771 css::uno::Reference< css::uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
2772 css::uno::Reference< css::embed::XStorage > xStorage
2775 if ( xStorage.is() )
2777 css::uno::Reference< css::embed::XStorage >
2778 xStorageDRS( xStorage->openStorageElement(
"drs", css::embed::ElementModes::SEEKABLEREAD ) );
2779 if ( xStorageDRS.is() )
2781 css::uno::Reference< css::io::XStream > xShapeXMLStream( xStorageDRS->openStreamElement(
"shapexml.xml", css::embed::ElementModes::SEEKABLEREAD ) );
2782 if ( xShapeXMLStream.is() )
2784 css::uno::Reference< css::io::XInputStream > xShapeXMLInputStream( xShapeXMLStream->getInputStream() );
2785 if ( xShapeXMLInputStream.is() )
2787 css::uno::Sequence< sal_Int8 >
aSeq;
2788 sal_Int32 nBytesRead = xShapeXMLInputStream->readBytes(
aSeq, 0x7fffffff );
2793 bRotateTextWithShape =
true;
2794 const char* pArry =
reinterpret_cast< char*
>(
aSeq.getArray() );
2795 const char*
const pUpright =
"upright=";
2796 const char* pEnd = pArry + nBytesRead;
2797 const char* pPtr = pArry;
2798 while( ( pPtr + 12 ) < pEnd )
2800 if ( !memcmp( pUpright, pPtr, 8 ) )
2802 bRotateTextWithShape = ( pPtr[ 9 ] !=
'1' ) && ( pPtr[ 9 ] !=
't' );
2814 catch( css::uno::Exception& )
2820 if ( bRotateTextWithShape )
2823 const css::uno::Any* pAny;
2825 static constexpr OUStringLiteral sTextRotateAngle(
u"TextRotateAngle" );
2827 double fExtraTextRotateAngle = 0.0;
2829 *pAny >>= fExtraTextRotateAngle;
2834 fExtraTextRotateAngle -= 180.0;
2836 css::beans::PropertyValue aTextRotateAngle;
2837 aTextRotateAngle.Name = sTextRotateAngle;
2838 aTextRotateAngle.Value <<= fExtraTextRotateAngle;
2849 sal_Int32 nChgColors = 0;
2851 if(nAngleFix16 >= 0)
2857 while ( nAngle >= 3600_deg10 ) nAngle -= 3600_deg10;
2858 while ( nAngle < 0_deg10 ) nAngle += 3600_deg10;
2868 while ( nAngle >= 3600_deg10 ) nAngle -= 3600_deg10;
2869 while ( nAngle < 0_deg10 ) nAngle += 3600_deg10;
2871 css::awt::GradientStyle eGrad = css::awt::GradientStyle_LINEAR;
2876 else if ( nFocus < 0 )
2882 if( nFocus > 40 && nFocus < 60 )
2884 eGrad = css::awt::GradientStyle_AXIAL;
2889 sal_uInt16 nFocusX =
static_cast<sal_uInt16
>(nFocus);
2890 sal_uInt16 nFocusY =
static_cast<sal_uInt16
>(nFocus);
2892 switch( eMSO_FillType )
2896 eGrad = css::awt::GradientStyle_RECT;
2897 nFocusY = nFocusX = 50;
2903 eGrad = css::awt::GradientStyle_RECT;
2919 Color aZwi( aCol1 );
2923 std::swap( dTrans, dBackTrans );
2929 eGrad, nAngle, nFocusX, nFocusY );
2935 if ( dTrans < 1.0 || dBackTrans < 1.0 )
2939 aCol1 =
Color(nStartCol, nStartCol, nStartCol);
2940 aCol2 =
Color(nEndCol, nEndCol, nEndCol);
2944 eGrad, nAngle, nFocusX, nFocusY );
2959 pList->
pNext.reset(
this );
2982 sal_uInt64 nOldPos = rIn.
Tell();
2996 while (rIn.
good() && ( ( rIn.
Tell() + 8 ) <= nStOfs ))
3003 if (!bSeekSucceeded)
3006 rIn.
Seek( nOldPos );
3041 if ( nC < pCList->
nCount )
3121 while ( pHd != pBreak )
3144 std::shared_ptr<SvxMSDffShapeInfo>
const& lhs,
3145 std::shared_ptr<SvxMSDffShapeInfo>
const& rhs)
const
3147 return lhs->nShapeId < rhs->nShapeId;
3151 std::shared_ptr<SvxMSDffShapeInfo>
const& lhs,
3152 std::shared_ptr<SvxMSDffShapeInfo>
const& rhs)
const
3154 return lhs->nTxBxComp < rhs->nTxBxComp;
3163 SAL_WARN(
"filter.ms",
"Cannot scale value: " << rVal);
3169 SAL_WARN(
"filter.ms",
"Cannot scale value: " << rVal);
3221 if( pModel && (0 < nApplicationScale) )
3285 sal_uInt64 nOldPos = rSt.
Tell();
3286 sal_uInt32 nSec = (
nId >> 10 ) - 1;
3292 sal_uInt64 nOfs = it->second;
3297 while (rSt.
good() && rSt.
Tell() < nEscherF002End)
3302 if ( aEscherObjListHd.
nRecVer != 0xf )
3313 sal_uInt32 nShapeId(0);
3315 if (
nId == nShapeId )
3330 rSt.
Seek( nOldPos );
3338 sal_uInt64 nOldFPos = rSt.
Tell();
3353 if ( pRecHd !=
nullptr )
3373 while ( rSt.
good() && rSt.
Tell() < nMaxFilePos && !bRet );
3375 rSt.
Seek( nOldFPos );
3430 if ( ( nColorCode & 0xfe000000 ) == 0xfe000000 )
3431 nColorCode &= 0x00ffffff;
3435 if ( ( nColorCode & 0xf8000000 ) == 0 )
3438 nColorCode |= 0x8000000;
3449 if ( ( nColorCode & 0xfe000000 ) == 0xfe000000 )
3450 nColorCode &= 0x00ffffff;
3459 if( ( nUpper & 0x08 ) || ( ( nUpper & 0x10 ) == 0 ) )
3462 if ( !
GetColorFromPalette( ( nUpper & 8 ) ?
static_cast<sal_uInt16
>(nColorCode) : nUpper, aColor ) )
3464 switch( nContentProperty )
3484 sal_uInt16 nParameter = sal_uInt16(( nColorCode >> 16 ) & 0x00ff);
3485 sal_uInt16 nFunctionBits =
static_cast<sal_uInt16
>( ( nColorCode & 0x00000f00 ) >> 8 );
3486 sal_uInt16 nAdditionalFlags =
static_cast<sal_uInt16
>( ( nColorCode & 0x0000f000) >> 8 );
3487 sal_uInt16 nColorIndex = sal_uInt16(nColorCode & 0x00ff);
3488 sal_uInt32 nPropColor = 0;
3490 sal_uInt16 nCProp = 0;
3492 switch ( nColorIndex )
3578 if ( nCProp && ( nPropColor & 0x10000000 ) == 0 )
3581 if( nAdditionalFlags & 0x80 )
3584 aColor =
Color( nZwi, nZwi, nZwi );
3586 switch( nFunctionBits )
3590 aColor.
SetRed( sal::static_int_cast< sal_uInt8 >( ( nParameter * aColor.
GetRed() ) >> 8 ) );
3591 aColor.
SetGreen( sal::static_int_cast< sal_uInt8 >( ( nParameter * aColor.
GetGreen() ) >> 8 ) );
3592 aColor.
SetBlue( sal::static_int_cast< sal_uInt8 >( ( nParameter * aColor.
GetBlue() ) >> 8 ) );
3597 sal_uInt16 nInvParameter = ( 0x00ff - nParameter ) * 0xff;
3598 aColor.
SetRed( sal::static_int_cast< sal_uInt8 >( ( nInvParameter + ( nParameter * aColor.
GetRed() ) ) >> 8 ) );
3599 aColor.
SetGreen( sal::static_int_cast< sal_uInt8 >( ( nInvParameter + ( nParameter * aColor.
GetGreen() ) ) >> 8 ) );
3600 aColor.
SetBlue( sal::static_int_cast< sal_uInt8 >( ( nInvParameter + ( nParameter * aColor.
GetBlue() ) ) >> 8 ) );
3605 sal_Int16 nR =
static_cast<sal_Int16
>(aColor.
GetRed()) +
static_cast<sal_Int16
>(nParameter);
3606 sal_Int16 nG =
static_cast<sal_Int16
>(aColor.
GetGreen()) +
static_cast<sal_Int16
>(nParameter);
3607 sal_Int16 nB =
static_cast<sal_Int16
>(aColor.
GetBlue()) +
static_cast<sal_Int16
>(nParameter);
3619 sal_Int16 nR =
static_cast<sal_Int16
>(aColor.
GetRed()) -
static_cast<sal_Int16
>(nParameter);
3620 sal_Int16 nG =
static_cast<sal_Int16
>(aColor.
GetGreen()) -
static_cast<sal_Int16
>(nParameter);
3621 sal_Int16 nB =
static_cast<sal_Int16
>(aColor.
GetBlue()) -
static_cast<sal_Int16
>(nParameter);
3633 sal_Int16 nR =
static_cast<sal_Int16
>(nParameter) -
static_cast<sal_Int16
>(aColor.
GetRed());
3634 sal_Int16 nG =
static_cast<sal_Int16
>(nParameter) -
static_cast<sal_Int16
>(aColor.
GetGreen());
3635 sal_Int16 nB =
static_cast<sal_Int16
>(nParameter) -
static_cast<sal_Int16
>(aColor.
GetBlue());
3647 aColor.
SetRed( aColor.
GetRed() < nParameter ? 0x00 : 0xff );
3653 if ( nAdditionalFlags & 0x40 )
3656 if ( nAdditionalFlags & 0x20 )
3660 else if ( ( nUpper & 4 ) && ( ( nColorCode & 0xfffff8 ) == 0 ) )
3688 sal_uInt32 nBytes = aHd.
nRecLen;
3712 rOutliner.Init( OutlinerMode::TextObject );
3714 bool bOldUpdateMode = rOutliner.SetUpdateLayout(
false );
3717 sal_Int32 nParaIndex = 0;
3718 sal_Int32 nParaSize;
3720 const sal_Unicode* pEnd = rText.getStr() + rText.getLength();
3722 while( pBuf < pEnd )
3726 for ( nParaSize = 0; pBuf < pEnd; )
3731 if ( ( pBuf < pEnd ) && ( *pBuf == 0xd ) )
3735 else if ( nChar == 0xd )
3737 if ( ( pBuf < pEnd ) && ( *pBuf == 0xa ) )
3744 ESelection aSelection( nParaIndex, 0, nParaIndex, 0 );
3745 OUString aParagraph( pCurrent, nParaSize );
3746 if ( !nParaIndex && aParagraph.isEmpty() )
3748 rOutliner.Insert( aParagraph, nParaIndex );
3749 rOutliner.SetParaAttribs( nParaIndex, rOutliner.GetEmptyItemSet() );
3751 SfxItemSet aParagraphAttribs( rOutliner.GetEmptyItemSet() );
3755 rOutliner.QuickSetAttribs( aParagraphAttribs, aSelection );
3760 rOutliner.SetUpdateLayout( bOldUpdateMode );
3769 sal_uInt32 nLen,
bool bUniCode)
3787 if (aPrefMapMode == aWanted)
3790 if (aPrefMapMode.
GetMapUnit() == MapUnit::MapPixel)
3812 if( !(nCropTop || nCropBottom || nCropLeft || nCropRight) )
3818 sal_uInt32 nTop( 0 ), nBottom( 0 ), nLeft( 0 ), nRight( 0 );
3832 fFactor =
static_cast<double>(nCropTop) / 65536.0;
3833 nTop =
static_cast<sal_uInt32
>( (
static_cast<double>( aCropSize.
Height() + 1 ) * fFactor ) + 0.5 );
3837 fFactor =
static_cast<double>(nCropBottom) / 65536.0;
3838 nBottom =
static_cast<sal_uInt32
>( (
static_cast<double>( aCropSize.
Height() + 1 ) * fFactor ) + 0.5 );
3842 fFactor =
static_cast<double>(nCropLeft) / 65536.0;
3843 nLeft =
static_cast<sal_uInt32
>( (
static_cast<double>( aCropSize.
Width() + 1 ) * fFactor ) + 0.5 );
3847 fFactor =
static_cast<double>(nCropRight) / 65536.0;
3848 nRight =
static_cast<sal_uInt32
>( (
static_cast<double>( aCropSize.
Width() + 1 ) * fFactor ) + 0.5 );
3851 pSet->
Put( SdrGrafCropItem( nLeft, nTop, nRight, nBottom ) );
3855 aCropBitmap.
Crop( aCropRect );
3856 rGraf = aCropBitmap;
3863 OUString aLinkFileName;
3868 bool bGrfRead =
false,
3881 bGrfRead =
GetBLIP( nBlipId, aGraf, &aVisArea );
3900 nSkipBLIPLen + 4 + nSkipShapePos + 4 + nSkipBLIP;
3922 if ( aGraf.
GetType() == GraphicType::Bitmap )
3940 if ( nContrast > 0x10000 )
3942 double fX = nContrast;
3946 nContrast =
static_cast<sal_Int32
>(fX);
3948 nContrast = -nContrast;
3949 nContrast = (nContrast-50)*2;
3951 else if ( nContrast == 0x10000 )
3955 if (o3tl::checked_multiply<sal_Int32>(nContrast, 101, nContrast))
3957 SAL_WARN(
"filter.ms",
"bad Contrast value:" << nContrast);
3962 nContrast /= 0x10000;
3971 case 4 : eDrawMode = GraphicDrawMode::Greys;
break;
3972 case 6 : eDrawMode = GraphicDrawMode::Mono;
break;
3978 if (( nContrast == -70 ) && ( nBrightness == 70 ))
3982 eDrawMode = GraphicDrawMode::Watermark;
3988 if ( nContrast || nBrightness || ( nGamma != 0x10000 ) || ( eDrawMode != GraphicDrawMode::Standard ) )
3994 bool needsConversion = nContrast != 0 && nBrightness != 0;
4001 if ( nGamma != 0x10000 )
4003 if ( eDrawMode != GraphicDrawMode::Standard )
4008 if ( eDrawMode == GraphicDrawMode::Watermark )
4012 eDrawMode = GraphicDrawMode::Standard;
4016 case GraphicType::Bitmap :
4019 if ( nBrightness || nContrast || ( nGamma != 0x10000 ) )
4020 aBitmapEx.
Adjust( nBrightness,
static_cast<sal_Int16
>(nContrast), 0, 0, 0,
static_cast<double>(nGamma) / 0x10000,
false,
true );
4021 if ( eDrawMode == GraphicDrawMode::Greys )
4022 aBitmapEx.
Convert( BmpConversion::N8BitGreys );
4023 else if ( eDrawMode == GraphicDrawMode::Mono )
4024 aBitmapEx.
Convert( BmpConversion::N1BitThreshold );
4030 case GraphicType::GdiMetafile :
4033 if ( nBrightness || nContrast || ( nGamma != 0x10000 ) )
4034 aGdiMetaFile.
Adjust( nBrightness,
static_cast<sal_Int16
>(nContrast), 0, 0, 0,
static_cast<double>(nGamma) / 0x10000,
false,
true );
4035 if ( eDrawMode == GraphicDrawMode::Greys )
4036 aGdiMetaFile.
Convert( MtfConversion::N8BitGreys );
4037 else if ( eDrawMode == GraphicDrawMode::Mono )
4038 aGdiMetaFile.
Convert( MtfConversion::N1BitThreshold );
4039 aGraf = aGdiMetaFile;
4059 static_cast<SdrGrafObj*
>(pRet.get())->SetGraphic( aGraf );
4061 if( bLinkGrf && !bGrfRead )
4067 if( osl::FileBase::getFileURLFromSystemPath( aFileName, aValidURL ) == osl::FileBase::E_None )
4070 if( aAbsURL.
GetProtocol() != INetProtocol::NotValid )
4075 aLinkFileName = aFileName;
4080 if ( bGrfRead && !aVisArea.
IsEmpty() )
4081 pRet->SetBLIPSizeRectangle( aVisArea );
4083 if (pRet->GetName().isEmpty())
4089 aURL.SetSmartURL( aFileName );
4090 pRet->SetName(
aURL.getBase() );
4093 pRet->SetName( aFileName );
4096 pRet->NbcSetLogicRect( rObjData.
aBoundRect );
4100 if( aLinkFileName.getLength() )
4102 pGrafObj->SetGraphicLink( aLinkFileName );
4103 Graphic aGraphic(pGrafObj->GetGraphic());
4107 if ( bLinkGrf && !bGrfRead )
4109 Graphic aGraf(pGrafObj->GetGraphic());
4126 pRet =
ImportGroup( aObjHd, rSt, rClientData, rClientRect, rGlobalChildRect, nCalledByGroup, pShapeId );
4130 pRet =
ImportShape( aObjHd, rSt, rClientData, rClientRect, rGlobalChildRect, nCalledByGroup, pShapeId );
4138 int nCalledByGroup, sal_Int32* pShapeId )
4155 xRet =
ImportObj(rSt, rClientData, rClientRect, rGlobalChildRect, nCalledByGroup + 1, pShapeId);
4165 if ( !nCalledByGroup || rGlobalChildRect.
IsEmpty() )
4168 aGlobalChildRect = rGlobalChildRect;
4170 if ( ( nGroupRotateAngle > 4500_deg100 && nGroupRotateAngle <= 13500_deg100 )
4171 || ( nGroupRotateAngle > 22500_deg100 && nGroupRotateAngle <= 31500_deg100 ) )
4173 sal_Int32 nHalfWidth = ( aClientRect.
GetWidth() + 1 ) >> 1;
4174 sal_Int32 nHalfHeight = ( aClientRect.
GetHeight() + 1 ) >> 1;
4175 Point aTopLeft( aClientRect.
Left() + nHalfWidth - nHalfHeight,
4176 aClientRect.
Top() + nHalfHeight - nHalfWidth );
4179 Size aNewSize(nRotatedWidth, nRotatedHeight);
4181 aClientRect = aNewRect;
4196 GetGroupAnchors( aRecHd2, rSt, aGroupClientAnchor, aGroupChildAnchor, aClientRect, aGlobalChildRect );
4211 FreeObj(rClientData, pTmp.get());
4230 FreeObj(rClientData, pTmp.get());
4237 if ( nGroupRotateAngle )
4238 xRet->NbcRotate( aClientRect.
Center(), nGroupRotateAngle );
4241 Point aLeft( aClientRect.
Left(), ( aClientRect.
Top() + aClientRect.
Bottom() ) >> 1 );
4242 Point aRight( aLeft.
X() + 1000, aLeft.
Y() );
4243 xRet->NbcMirror( aLeft, aRight );
4247 Point aTop( ( aClientRect.
Left() + aClientRect.
Right() ) >> 1, aClientRect.
Top() );
4248 Point aBottom( aTop.
X(), aTop.
Y() + 1000 );
4249 xRet->NbcMirror( aTop, aBottom );
4264 int nCalledByGroup, sal_Int32* pShapeId )
4272 DffObjData aObjData( rHd, rClientRect, nCalledByGroup );
4280 while( 5 < nBytesLeft )
4286 sal_uInt32 nUDData(0);
4318 if ( aObjData.
bOpt )
4335 if ( aObjData.
bOpt2 )
4345 sal_Int32 l(0), o(0), r(0),
u(0);
4352 sal_Int32 nWidth, nHeight;
4356 double fXScale =
static_cast<double>(rClientRect.
GetWidth()) /
static_cast<double>(rGlobalChildRect.
GetWidth());
4357 double fYScale =
static_cast<double>(rClientRect.
GetHeight()) /
static_cast<double>(rGlobalChildRect.
GetHeight());
4358 double fl = ( ( l - rGlobalChildRect.
Left() ) * fXScale ) + rClientRect.
Left();
4359 double fo = ( ( o - rGlobalChildRect.
Top() ) * fYScale ) + rClientRect.
Top();
4360 double fWidth = nWidth * fXScale;
4361 double fHeight = nHeight * fYScale;
4384 if ( ( nAngle > 4500_deg100 && nAngle <= 13500_deg100 ) || ( nAngle > 22500_deg100 && nAngle <= 31500_deg100 ) )
4424 xRet->SetMergedItemSet(aSet);
4437 xRet->SetMergedItemSet(aSet);
4449 bool bIsFontwork = ( ngtextFStrikethrough & 0x4000 ) != 0;
4454 OUString aObjectText;
4463 aSet.
Put(
SvxFontItem( aLatin.GetFamily(), aFontName, aLatin.GetStyleName(),
4465 aSet.
Put(
SvxFontItem( aLatin.GetFamily(), aFontName, aLatin.GetStyleName(),
4467 aSet.
Put(
SvxFontItem( aLatin.GetFamily(), aFontName, aLatin.GetStyleName(),
4482 static_cast<SdrObjCustomShape*
>(xRet.get())->SetVerticalWriting( ( ngtextFStrikethrough & 0x2000 ) != 0 );
4493 switch( eGeoTextAlign )
4506 drawing::TextFitToSizeType eFTS = drawing::TextFitToSizeType_NONE;
4508 eFTS = drawing::TextFitToSizeType_ALLLINES;
4514 if ( nTextWidth != 100 )
4517 if ( ngtextFStrikethrough & 0x1000 )
4538 pDevice->SetFont( aFont );
4540 auto nTextWidth = pDevice->GetTextWidth( aObjectText );
4543 && aObjName.match(
"PowerPlusWaterMarkObject" ) )
4545 double fRatio =
static_cast<double>(pDevice->GetTextHeight()) / nTextWidth;
4549 if ( nPaddingY > 0 )
4554 xRet->SetMergedItemSet( aSet );
4565 rOutliner.SetStyleSheetPool(
static_cast< SfxStyleSheetPool*
>(xRet->getSdrModelFromSdrObject().GetStyleSheetPool()));
4566 bool bOldUpdateMode = rOutliner.SetUpdateLayout(
false );
4567 rOutliner.SetText( *pParaObj );
4569 pVirDev->SetMapMode(
MapMode(MapUnit::Map100thMM));
4570 sal_Int32
i, nParagraphs = rOutliner.GetParagraphCount();
4573 bool bCreateNewParaObject =
false;
4574 for (
i = 0;
i < nParagraphs;
i++ )
4576 OUString aString(rOutliner.GetText(rOutliner.GetParagraph(
i)));
4577 bool bIsRTL = pVirDev->GetTextIsRTL(aString, 0, aString.getLength());
4580 SfxItemSet aSet2( rOutliner.GetParaAttribs(
i ) );
4582 rOutliner.SetParaAttribs(
i, aSet2 );
4583 bCreateNewParaObject =
true;
4586 if ( bCreateNewParaObject )
4589 rOutliner.Init( OutlinerMode::TextObject );
4590 static_cast<SdrObjCustomShape*
>(xRet.get())->NbcSetOutlinerParaObject( std::move(pNewText) );
4594 rOutliner.SetUpdateLayout( bOldUpdateMode );
4604 static constexpr OUStringLiteral sAdjustmentValues(
u"AdjustmentValues" );
4605 static constexpr OUStringLiteral sViewBox(
u"ViewBox" );
4606 static constexpr OUStringLiteral sPath(
u"Path" );
4608 PropertyValue aPropVal;
4612 double fStartAngle(-90.0);
4613 double fEndAngle(0.0);
4614 css::uno::Sequence< css::drawing::EnhancedCustomShapeAdjustmentValue > seqAdjustmentValues;
4616 if (pAny && (*pAny >>= seqAdjustmentValues) && seqAdjustmentValues.getLength() > 1)
4618 auto pseqAdjustmentValues = seqAdjustmentValues.getArray();
4619 if (seqAdjustmentValues[0].
State == css::beans::PropertyState_DEFAULT_VALUE)
4621 pseqAdjustmentValues[0].Value <<= -90.0;
4622 pseqAdjustmentValues[0].State = com::sun::star::beans::PropertyState_DIRECT_VALUE;
4624 if (seqAdjustmentValues[1].
State == css::beans::PropertyState_DEFAULT_VALUE)
4626 pseqAdjustmentValues[1].Value <<= 0.0;
4627 pseqAdjustmentValues[1].State = com::sun::star::beans::PropertyState_DIRECT_VALUE;
4629 seqAdjustmentValues[0].Value >>= fStartAngle;
4630 seqAdjustmentValues[1].Value >>= fEndAngle;
4631 aPropVal.Name = sAdjustmentValues;
4632 aPropVal.Value <<= seqAdjustmentValues;
4643 css::uno::Sequence< css::drawing::EnhancedCustomShapeParameterPair> seqCoordinates;
4645 if (pAny && (*pAny >>= seqCoordinates) && (seqCoordinates.getLength() >= 2))
4648 = *o3tl::doAccess<sal_Int32>(seqCoordinates[0].
First.Value);
4650 = *o3tl::doAccess<sal_Int32>(seqCoordinates[0].Second.Value);
4652 = *o3tl::doAccess<sal_Int32>(seqCoordinates[1].
First.Value);
4654 = *o3tl::doAccess<sal_Int32>(seqCoordinates[1].Second.Value);
4663 css::awt::Rectangle aImportedViewBox;
4664 if (pAny && (*pAny >>= aImportedViewBox))
4668 aImportedViewBox.X + aImportedViewBox.Width,
4669 aImportedViewBox.Y + aImportedViewBox.Height);
4683 aTempPie.
append(aCenter);
4693 if (bIsImportPPT || aPieRect_MS.
getWidth() == 0 || aPieRect_MS.
getHeight() == 0)
4699 double fX((aPieRect_MS.
getMinX() - aEllipseRect_MS.
getMinX()) / 2.0);
4700 double fY((aPieRect_MS.
getMinY() - aEllipseRect_MS.
getMinY()) / 2.0);
4701 css::awt::Rectangle aViewBox_LO;
4702 aViewBox_LO.X =
static_cast<sal_Int32
>(fX);
4703 aViewBox_LO.Y =
static_cast<sal_Int32
>(fY);
4704 aViewBox_LO.Width =
static_cast<sal_Int32
>(aPieRect_MS.
getWidth() / 2.0);
4705 aViewBox_LO.Height =
static_cast<sal_Int32
>(aPieRect_MS.
getHeight() / 2.0);
4706 aPropVal.Name = sViewBox;
4707 aPropVal.Value <<= aViewBox_LO;
4717 double fLogicXOfs(0.0);
4718 double fLogicYOfs(0.0);
4721 double fLogicEllipseWidth(0.0);
4722 double fLogicEllipseHeight(0.0);
4726 double fXScale = fLogicPieWidth / aPieRect_MS.
getWidth();
4728 fLogicXOfs = (aPieRect_MS.
getMaxX() - aEllipseRect_MS.
getMaxX()) * fXScale;
4730 fLogicXOfs = (aEllipseRect_MS.
getMinX() - aPieRect_MS.
getMinX()) * fXScale;
4731 fLogicEllipseWidth = aEllipseRect_MS.
getWidth() * fXScale;
4735 double fYScale = fLogicPieHeight / aPieRect_MS.
getHeight();
4737 fLogicYOfs = (aPieRect_MS.
getMaxY() - aEllipseRect_MS.
getMaxY()) * fYScale;
4739 fLogicYOfs = (aEllipseRect_MS.
getMinY() - aPieRect_MS.
getMinY()) * fYScale;
4740 fLogicEllipseHeight = aEllipseRect_MS.
getHeight() * fYScale;
4743 Point(aOldBoundRect.
Left() +
static_cast<sal_Int32
>(fLogicXOfs),
4744 aOldBoundRect.
Top() +
static_cast<sal_Int32
>(fLogicYOfs)),
4745 Size(
static_cast<sal_Int32
>(fLogicEllipseWidth),
4746 static_cast<sal_Int32
>(fLogicEllipseHeight)));
4751 double fTextFrameScaleX = 0.0;
4752 double fTextFrameScaleY = 0.0;
4754 fTextFrameScaleX = 21600.0 / aEllipseRect_MS.
getWidth();
4756 fTextFrameScaleY = 21600.0 / aEllipseRect_MS.
getHeight();
4758 sal_Int32 nLeft =
static_cast<sal_Int32
>((aPieRect_MS.
getMinX() - aEllipseRect_MS.
getMinX()) * fTextFrameScaleX );
4759 sal_Int32 nTop =
static_cast<sal_Int32
>((aPieRect_MS.
getMinY() - aEllipseRect_MS.
getMinY()) * fTextFrameScaleY );
4760 sal_Int32 nRight =
static_cast<sal_Int32
>((aPieRect_MS.
getMaxX() - aEllipseRect_MS.
getMinX()) * fTextFrameScaleX );
4761 sal_Int32 nBottom=
static_cast<sal_Int32
>((aPieRect_MS.
getMaxY() - aEllipseRect_MS.
getMinY()) * fTextFrameScaleY );
4762 css::uno::Sequence< css::drawing::EnhancedCustomShapeTextFrame > aTextFrame( 1 );
4763 auto pTextFrame = aTextFrame.getArray();
4768 PropertyValue aProp;
4769 aProp.Name =
"TextFrames";
4770 aProp.Value <<= aTextFrame;
4778 nAngle = 36000_deg100 - nAngle;
4782 double ss = sin(
a );
4783 double cc = cos(
a );
4804 aPropVal.Name =
"Type";
4805 aPropVal.Value <<= OUString(
"mso-spt100" );
4818 if( nObjectRotation )
4825 Point aBottom( aTop.
X(), aTop.
Y() + 1000 );
4826 xRet->NbcMirror( aTop, aBottom );
4833 Point aRight( aLeft.
X() + 1000, aLeft.
Y() );
4834 xRet->NbcMirror( aLeft, aRight );
4841 xRet->SetMergedItemSet(aSet);
4846 static_cast<SdrEdgeObj*
>(xRet.get())->ConnectToNode(
true,
nullptr);
4847 static_cast<SdrEdgeObj*
>(xRet.get())->ConnectToNode(
false,
nullptr);
4853 if ( nObjectRotation )
4864 nObjectRotation = 0_deg100;
4870 sal_Int32
n = aPoint1.
X();
4871 aPoint1.
setX( aPoint2.
X() );
4879 sal_Int32
n = aPoint1.
Y();
4880 aPoint1.
setY( aPoint2.
Y() );
4887 xRet->NbcSetPoint(aPoint1, 0);
4888 xRet->NbcSetPoint(aPoint2, 1);
4890 sal_Int32 n1HorzDist, n1VertDist, n2HorzDist, n2VertDist;
4891 n1HorzDist = n1VertDist = n2HorzDist = n2VertDist = 0;
4892 switch( eConnectorStyle )
4897 n1HorzDist = n1VertDist = n2HorzDist = n2VertDist = 630;
4912 static_cast<SdrEdgeObj*
>(xRet.get())->SetEdgeTrackPath( aPoly );
4913 xRet->SetMergedItemSet(aSet);
4917 xRet->SetMergedItemSet(aSet);
4925 if( nObjectRotation )
4932 Point aBottom( aTop.
X(), aTop.
Y() + 1000 );
4933 xRet->NbcMirror(aTop, aBottom);
4940 Point aRight( aLeft.
X() + 1000, aLeft.
Y() );
4941 xRet->NbcMirror(aLeft, aRight);
4951 if( !aObjName.isEmpty() )
4952 xRet->SetName(aObjName);
4955 xRet =
ProcessObj(rSt, aObjData, rClientData, aTextRect, xRet.get());
4960 const bool bVisible = ( ( nGroupProperties & 2 ) == 0 );
4965 xRet->SetPrintable(
false);
4970 xRet->SetPrintable( ( nGroupProperties & 1 ) != 0 );
4978 xRet->SetDescription(aAltText);
4986 auto xHdClone = std::make_shared<DffRecordHeader>(aObjData.
rSpHd);
5000 return aChildAnchor;
5002 bool bIsClientRectRead =
false;
5024 sal_Int32 l(0),
t(0), r(0), b(0);
5025 if ( aShapeAtom.
nRecLen == 16 )
5031 sal_Int16 ls(0), ts(0), rs(0), bs(0);
5042 if ( bIsClientRectRead )
5045 aChildAnchor.
Union( aChild );
5050 bIsClientRectRead =
true;
5057 sal_Int32 l(0), o(0), r(0),
u(0);
5064 aChildAnchor.
Union( aChild );
5074 return aChildAnchor;
5103 sal_Int32 l(0), o(0), r(0),
u(0);
5117 double fXScale =
static_cast<double>(rClientRect.
GetWidth()) /
static_cast<double>(rGlobalChildRect.
GetWidth());
5118 double fYScale =
static_cast<double>(rClientRect.
GetHeight()) /
static_cast<double>(rGlobalChildRect.
GetHeight());
5119 double fl = ( ( l - rGlobalChildRect.
Left() ) * fXScale ) + rClientRect.
Left();
5120 double fo = ( ( o - rGlobalChildRect.
Top() ) * fYScale ) + rClientRect.
Top();
5123 rGroupClientAnchor =
tools::Rectangle(
Point(
static_cast<sal_Int32
>(fl),
static_cast<sal_Int32
>(fo) ),
Size(
static_cast<sal_Int32
>( fWidth + 1 ),
static_cast<sal_Int32
>( fHeight + 1 ) ) );
5128 rGroupChildAnchor.
Union( aChild );
5150 auto aRet =
m_Records.insert(std::move(pImpRec));
5151 bool bSuccess = aRet.second;
5164 pRecord->pObj =
nullptr;
5174 for (
size_t i = 0;
i < nObjCount; ++
i)
5198 bool bDeleteImpRec =
true;
5200 bool bDeleteTextImpRec =
false;
5231 while( 5 < nBytesLeft )
5237 sal_uInt32 nUDData(0);
5241 case 0x038F: pImpRec->
nXAlign = nUDData;
break;
5245 case 0x0391: pImpRec->
nYAlign = nUDData;
break;
5316 bool bVerticalText =
false;
5323 nTextRotationAngle = 9000_deg100;
5327 nTextRotationAngle = 27000_deg100;
5330 bVerticalText =
true;
5333 bVerticalText =
true;
5334 nTextRotationAngle = 9000_deg100;
5342 if (nTextRotationAngle)
5344 switch (nTextRotationAngle.
get())
5352 sal_Int32 nOldTextLeft = nTextLeft;
5353 sal_Int32 nOldTextRight = nTextRight;
5354 sal_Int32 nOldTextTop = nTextTop;
5355 sal_Int32 nOldTextBottom = nTextBottom;
5357 nTextLeft = nOldTextBottom;
5358 nTextRight = nOldTextTop;
5359 nTextTop = nOldTextLeft;
5360 nTextBottom = nOldTextRight;
5369 sal_Int32 nOldTextLeft = nTextLeft;
5370 sal_Int32 nOldTextRight = nTextRight;
5371 sal_Int32 nOldTextTop = nTextTop;
5372 sal_Int32 nOldTextBottom = nTextBottom;
5374 nTextLeft = nOldTextTop;
5375 nTextRight = nOldTextBottom;
5376 nTextTop = nOldTextRight;
5377 nTextBottom = nOldTextLeft;
5388 bDeleteTextImpRec =
true;
5394 aNewRect.
AdjustRight( -(nTextLeft + nTextRight) );
5400 auto const pTmpRec = std::make_shared<SvxMSDffShapeInfo>(0, pImpRec->
nShapeId);
5402 SvxMSDffShapeInfos_ById::const_iterator
const it =
5414 bool bFitText =
false;
5462 bool bTVASet(
false);
5463 bool bTHASet(
false);
5465 switch( eTextAnchor )
5512 pTextObj->SetMergedItemSet(aSet);
5515 pTextObj->SetVerticalWriting(
true);
5517 if (nTextRotationAngle)
5525 pTextObj->SdrAttrObj::NbcRotate(aPivot, nTextRotationAngle);
5533 sin(
a ), cos(
a ) );
5538 pObj = pTextObj.get();
5542 if( pTextObj.get() != pObj.get() )
5545 pGroup->GetSubList()->NbcInsertObject( pObj.get() );
5546 pGroup->GetSubList()->NbcInsertObject( pTextObj.get() );
5547 if (pOrgObj == pObj)
5551 pObj = pGroup.get();
5569 if( SfxItemState::DEFAULT == eState )
5571 pObj->SetMergedItemSet(aSet);
5588 pTextImpRec->
aTextId.
nTxBxS =
static_cast<sal_uInt16
>( nTextId >> 16 );
5605 sal_uInt16 nNumElemVert(0), nNumElemMemVert(0), nElemSizeVert(8);
5609 if (nElemSizeVert == 0xFFF0)
5613 bool bOk = nElemSizeVert && (rSt.
remainingSize() / nElemSizeVert >= nNumElemVert);
5617 for (sal_uInt16
i = 0;
i < nNumElemVert; ++
i)
5619 sal_Int32 nX(0), nY(0);
5620 if (nElemSizeVert == 8)
5624 sal_Int16 nSmallX(0), nSmallY(0);
5664 pImpRec->
pObj = pOrgObj.get();
5665 rImportData.
insert(std::unique_ptr<SvxMSDffImportRec>(pImpRec));
5666 bDeleteImpRec =
false;
5667 if (pImpRec == pTextImpRec)
5668 bDeleteTextImpRec =
false;
5671 if( pTextObj && (pOrgObj != pTextObj) )
5675 pTextImpRec->
pObj = pTextObj.get();
5676 rImportData.
insert(std::unique_ptr<SvxMSDffImportRec>(pTextImpRec));
5677 bDeleteTextImpRec =
false;
5678 if (pTextImpRec == pImpRec)
5679 bDeleteImpRec =
false;
5697 if (bDeleteTextImpRec)
5717 if (pOrder->nShapeId ==
nId)
5719 pOrder->nTxBxComp = nTxBx;
5721 pOrder->pFly = pFly;
5733 if (pOrder->pObj == pOldObject)
5735 pOrder->pFly =
nullptr;
5737 pOrder->nTxBxComp = nTxBx;
5749 pOrder->pObj =
nullptr;
5750 pOrder->pFly =
nullptr;
5751 pOrder->nTxBxComp = 0;
5761 sal_uInt32 nOffsDgg_,
5765 Color mnDefaultColor_,
5771 nOffsDgg( nOffsDgg_ ),
5772 nBLIPCount( USHRT_MAX ),
5775 maBaseURL(
std::move( aBaseURL )),
5777 rStCtrl( rStCtrl_ ),
5778 pStData( pStData_ ),
5779 pStData2( pStData2_ ),
5780 nSvxMSDffSettings( 0 ),
5781 nSvxMSDffOLEConvFlags( 0 ),
5782 mnDefaultColor( mnDefaultColor_),
5783 mbSkipImages (bSkipImages)
5785 SetModel( pSdrModel_, nApplicationScale );
5815 nBLIPCount( USHRT_MAX ),
5817 maBaseURL(
std::move( aBaseURL )),
5819 rStCtrl( rStCtrl_ ),
5821 pStData2( nullptr ),
5822 nSvxMSDffSettings( 0 ),
5823 nSvxMSDffOLEConvFlags( 0 ),
5860 sal_uInt64 nFilePos = rSt.
Tell();
5892 sal_uInt32 nCurMaxShapeId;
5901 const std::size_t nFIDCLsize =
sizeof(sal_uInt32) * 2;
5906 "filter.ms",
"FIDCL list longer than remaining bytes, ppt or parser is wrong");
5912 sal_uInt32 cspidCur;
5927 sal_uInt32 nChain = std::numeric_limits<sal_uInt32>::max();
5928 bool bSetReplaceFALSE =
false;
5929 for (SvxMSDffShapeInfos_ByTxBxComp::iterator iter =
5934 std::shared_ptr<SvxMSDffShapeInfo>
const pObj = *iter;
5935 if( pObj->nTxBxComp )
5941 if( nChain != pObj->nTxBxComp )
5945 nChain = pObj->nTxBxComp;
5946 bSetReplaceFALSE = !pObj->bReplaceByFly;
5948 else if( !pObj->bReplaceByFly )
5951 bSetReplaceFALSE =
true;
5953 for (SvxMSDffShapeInfos_ByTxBxComp::iterator itemp = mark;
5954 itemp != iter; ++itemp)
5956 (*itemp)->bReplaceByFly =
false;
5960 if( bSetReplaceFALSE )
5962 pObj->bReplaceByFly =
false;
5966 pObj->nTxBxComp = pObj->nTxBxComp & 0xFFFF0000;
5990 sal_uInt16 nInst(0);
6007 sal_uInt16 nDrawingContainerId = 1;
6028 ++nDrawingContainerId;
6043 sal_uInt32 nLenBStoreCont = 0, nLenFBSE = 0;
6060 while (bOk && nRead < nLenDgg);
6062 if (!bOk || !nLenBStoreCont)
6072 sal_uInt32 nBLIPLen = 0, nBLIPPos = 0;
6083 bOk = ( nSkipBLIPLen + 4 + nSkipBLIPPos + 4 <= nLenFBSE );
6093 nLength -= nSkipBLIPLen+ 4 + nSkipBLIPPos + 4;
6101 if( (!nBLIPPos) && (nBLIPLen < nLenFBSE) )
6102 nBLIPPos = rSt.
Tell() + 4;
6117 while( nRead < nLenBStoreCont );
6125 sal_uInt16 nDrawingContainerId )
6148 rSt,
nLength, std::numeric_limits<sal_uInt64>::max(), nDrawingContainerId))
6158 while( nReadDg < nLenDg );
6162 sal_uInt32 nLenShapeGroupCont,
6164 sal_uInt16 nDrawingContainerId )
6167 sal_uInt64 nStartShapeGroupCont = rSt.
Tell();
6170 bool bFirst = !bPatriarch;
6198 while( nReadSpGrCont < nLenShapeGroupCont );
6200 rSt.
Seek( nStartShapeGroupCont + nLenShapeGroupCont );
6205 sal_uInt32 nLenShapeCont,
6206 sal_uInt64 nPosGroup,
6207 sal_uInt16 nDrawingContainerId )
6210 sal_uInt64 nStartShapeCont = rSt.
Tell();
6215 sal_uInt32 nLenShapePropTbl = 0;
6219 sal_uInt64 nStartOffs = (std::numeric_limits<sal_uInt64>::max() > nPosGroup) ?
6225 bool bCanBeReplaced = nPosGroup >= std::numeric_limits<sal_uInt64>::max();
6240 eShapeType =
static_cast<MSO_SPT>(nInst);
6251 auto nStartShapePropTbl = rSt.
Tell();
6254 sal_uInt16 nPropId(0);
6255 sal_uInt32 nPropVal(0);
6274 bCanBeReplaced =
false;
6281 bCanBeReplaced =
false;
6293 bCanBeReplaced =
false;
6298 bCanBeReplaced =
false;
6302 if( ( 0x20002000 & nPropVal ) == 0x20002000 )
6303 bCanBeReplaced =
false;
6307 if( ( 0x00080008 & nPropVal ) == 0x00080008 )
6308 bCanBeReplaced =
false;
6318 if( 0x4000 == ( nPropId & 0xC000 ) )
6321 nPropRead = nLenShapePropTbl;
6323 else if( 0x8000 & nPropId )
6333 while (rSt.
good() && nPropRead < nLenShapePropTbl);
6334 rSt.
Seek( nStartShapePropTbl + nLenShapePropTbl );
6335 nReadSpCont += nLenShapePropTbl;
6344 nDrawingContainerId;
6346 "<SvxMSDffManager::GetShapeContainerData(..)> - internal drawing container Id could not be correctly merged into DFF_msofbtClientTextbox value." );
6352 SAL_WARN(
"filter.ms",
"remaining record longer than available data, ppt or parser is wrong");
6358 while( nReadSpCont < nLenShapeCont );
6384 rSt.
Seek( nStartShapeCont + nLenShapeCont );
6397 auto const pTmpRec = std::make_shared<SvxMSDffShapeInfo>(0,
nId);
6399 SvxMSDffShapeInfos_ById::const_iterator
const it =
6411 sal_uInt64
const nFilePos((*it)->nFilePos);
6412 bool bSeeked = (nFilePos ==
rStCtrl.
Seek(nFilePos));
6424 return bool( rpShape );
6445 rGraphic = iter->second;
6446 if (rGraphic.
GetType() != GraphicType::NONE)
6455 sal_uInt16 nIdx = sal_uInt16( nIdx_ );
6471 SvxMSDffBLIPInfo& rInfo = (*m_pBLIPInfos)[ nIdx-1 ];
6516 sal_uInt64 nOldPos = rBLIPStream.
Tell();
6522 sal_uInt16 nInst, nFbt( 0 );
6527 bool bMtfBLIP =
false;
6528 bool bZCodecCompression =
false;
6530 sal_uLong nSkip = (nInst & 0x0001) ? 32 : 16;
6531 const OfficeArtBlipRecInstance aRecInstanse = OfficeArtBlipRecInstance(nInst & 0xFFFE);
6532 switch (aRecInstanse)
6538 rBLIPStream.
SeekRel(nSkip + 20);
6541 sal_Int32 width(0), height(0);
6556 bMtfBLIP = bZCodecCompression =
true;
6559 case OfficeArtBlipRecInstance::JPEG_RGB:
6560 case OfficeArtBlipRecInstance::JPEG_CMYK:
6563 case OfficeArtBlipRecInstance::TIFF:
6569 SvStream* pGrStream = &rBLIPStream;
6570 std::unique_ptr<SvMemoryStream> xOut;
6571 if( bZCodecCompression )
6574 ZCodec aZCodec( 0x8000, 0x8000 );
6579 xOut->SetResizeOffset( 0 );
6581 pGrStream = xOut.get();
6584#ifdef DEBUG_FILTER_MSDFFIMP
6586 static sal_Int32 nGrfCount;
6588 OUString aFileName =
"dbggfx" + OUString::number(nGrfCount++);
6589 switch (aRecInstanse)
6592 aFileName +=
".wmf";
6595 aFileName +=
".emf";
6598 aFileName +=
".pct";
6600 case OfficeArtBlipRecInstance::JPEG_RGB:
6601 case OfficeArtBlipRecInstance::JPEG_CMYK:
6602 aFileName +=
".jpg";
6605 aFileName +=
".png";
6608 aFileName +=
".bmp";
6610 case OfficeArtBlipRecInstance::TIFF:
6611 aFileName +=
".tif";
6621 aURL.removeSegment();
6622 aURL.removeFinalSlash();
6623 aURL.Append( aFileName );
6627 SAL_INFO(
"filter.ms",
"dumping " << aURLStr);
6633 if ( bZCodecCompression )
6635 pDbgOut->WriteBytes(xOut->GetData(), xOut->TellEnd());
6640 sal_Int32 nDbgLen =
nLength - nSkip;
6643 std::vector<char>
aData(nDbgLen);
6645 pDbgOut->WriteBytes(
aData.data(), nDbgLen);
6655 if(
ReadDIB(aNew, *pGrStream,
false) )
6667 sal_uInt64 maxSize = pGrStream == &rBLIPStream ?
nLength : 0;
6693 if ( ( aMtfSize100.
Width() >= 1000 ) && ( aMtfSize100.
Height() >= 1000 ) )
6698 if( aOldSize.
Width() && ( aOldSize.
Width() != aMtfSize100.
Width() ) &&
6701 aMtf.
Scale(
static_cast<double>(aMtfSize100.
Width()) / aOldSize.
Width(),
6702 static_cast<double>(aMtfSize100.
Height()) / aOldSize.
Height() );
6714 rBLIPStream.
Seek( nOldPos );
6721 sal_uInt8& rVer, sal_uInt16& rInst, sal_uInt16& rFbt, sal_uInt32& rLength)
6725 rVer = sal::static_int_cast< sal_uInt8 >(nTmp & 15);
6735 std::unique_ptr<
char[]>& rpBuff, sal_uInt32& rBuffLen )
6739 rBuffLen = std::min(rStData.
remainingSize(),
static_cast<sal_uInt64
>(nDatLen));
6740 rpBuff.reset(
new char[rBuffLen] );
6741 rBuffLen = rStData.
ReadBytes(rpBuff.get(), rBuffLen);
6746 std::unique_ptr<
char[]>& rpBuff, sal_uInt32& rBuffLen )
6750 rBuffLen = std::min(rStData.
remainingSize(),
static_cast<sal_uInt64
>(nDatLen));
6751 rpBuff.reset(
new char[rBuffLen] );
6752 rBuffLen = rStData.
ReadBytes(rpBuff.get(), rBuffLen);
6780 OUString sStorageName;
6783 uno::Reference < embed::XStorage > xDstStg;
6796 embed::Aspects::MSOLE_CONTENT,
6805 xStm->SetBufferSize( 8192 );
6813 MapMode aMMDst( MapUnit::Map100thMM );
6819 aEle.
Write( *xStm );
6821 xStm->SetBufferSize( 0 );
6829 const char* pSvrName;
6830 const char* pDspName;
6837 { 0x000212F0,
"MSWordArt",
"Microsoft Word Art" },
6838 { 0x000212F0,
"MSWordArt.2",
"Microsoft Word Art 2.0" },
6841 { 0x00030000,
"ExcelWorksheet",
"Microsoft Excel Worksheet" },
6842 { 0x00030001,
"ExcelChart",
"Microsoft Excel Chart" },
6843 { 0x00030002,
"ExcelMacrosheet",
"Microsoft Excel Macro" },
6844 { 0x00030003,
"WordDocument",
"Microsoft Word Document" },
6845 { 0x00030004,
"MSPowerPoint",
"Microsoft PowerPoint" },
6846 { 0x00030005,
"MSPowerPointSho",
"Microsoft PowerPoint Slide Show"},
6847 { 0x00030006,
"MSGraph",
"Microsoft Graph" },
6848 { 0x00030007,
"MSDraw",
"Microsoft Draw" },
6849 { 0x00030008,
"Note-It",
"Microsoft Note-It" },
6850 { 0x00030009,
"WordArt",
"Microsoft Word Art" },
6851 { 0x0003000a,
"PBrush",
"Microsoft PaintBrush Picture" },
6852 { 0x0003000b,
"Equation",
"Microsoft Equation Editor" },
6853 { 0x0003000c,
"Package",
"Package" },
6854 { 0x0003000d,
"SoundRec",
"Sound" },
6855 { 0x0003000e,
"MPlayer",
"Media Player" },
6857 { 0x0003000f,
"ServerDemo",
"OLE 1.0 Server Demo" },
6858 { 0x00030010,
"Srtest",
"OLE 1.0 Test Demo" },
6859 { 0x00030011,
"SrtInv",
"OLE 1.0 Inv Demo" },
6860 { 0x00030012,
"OleDemo",
"OLE 1.0 Demo" },
6863 { 0x00030013,
"CoromandelIntegra",
"Coromandel Integra" },
6864 { 0x00030014,
"CoromandelObjServer",
"Coromandel Object Server" },
6867 { 0x00030015,
"StanfordGraphics",
"Stanford Graphics" },
6870 { 0x00030016,
"DGraphCHART",
"DeltaPoint Graph Chart" },
6871 { 0x00030017,
"DGraphDATA",
"DeltaPoint Graph Data" },
6874 { 0x00030018,
"PhotoPaint",
"Corel PhotoPaint" },
6875 { 0x00030019,
"CShow",
"Corel Show" },
6876 { 0x0003001a,
"CorelChart",
"Corel Chart" },
6877 { 0x0003001b,
"CDraw",
"Corel Draw" },
6880 { 0x0003001c,
"HJWIN1.0",
"Inset Systems" },
6883 { 0x0003001d,
"ObjMakerOLE",
"MarkV Systems Object Maker" },
6886 { 0x0003001e,
"FYI",
"IdentiTech FYI" },
6887 { 0x0003001f,
"FYIView",
"IdentiTech FYI Viewer" },
6890 { 0x00030020,
"Stickynote",
"Inventa Sticky Note" },
6893 { 0x00030021,
"ShapewareVISIO10",
"Shapeware Visio 1.0" },
6894 { 0x00030022,
"ImportServer",
"Spaheware Import Server" },
6897 { 0x00030023,
"SrvrTest",
"OLE 1.0 Server Test" },
6900 { 0x00030025,
"Cltest",
"OLE 1.0 Client Test" },
6903 { 0x00030026,
"MS_ClipArt_Gallery",
"Microsoft ClipArt Gallery" },
6905 { 0x00030027,
"MSProject",
"Microsoft Project" },
6908 { 0x00030028,
"MSWorksChart",
"Microsoft Works Chart" },
6911 { 0x00030029,
"MSWorksSpreadsheet",
"Microsoft Works Spreadsheet" },
6914 { 0x0003002A,
"MinSvr",
"AFX Mini Server" },
6915 { 0x0003002B,
"HierarchyList",
"AFX Hierarchy List" },
6916 { 0x0003002C,
"BibRef",
"AFX BibRef" },
6917 { 0x0003002D,
"MinSvrMI",
"AFX Mini Server MI" },
6918 { 0x0003002E,
"TestServ",
"AFX Test Server" },
6921 { 0x0003002F,
"AmiProDocument",
"Ami Pro Document" },
6924 { 0x00030030,
"WPGraphics",
"WordPerfect Presentation" },
6925 { 0x00030031,
"WPCharts",
"WordPerfect Chart" },
6928 { 0x00030032,
"Charisma",
"MicroGrafx Charisma" },
6929 { 0x00030033,
"Charisma_30",
"MicroGrafx Charisma 3.0" },
6930 { 0x00030034,
"CharPres_30",
"MicroGrafx Charisma 3.0 Pres" },
6932 { 0x00030035,
"Draw",
"MicroGrafx Draw" },
6934 { 0x00030036,
"Designer_40",
"MicroGrafx Designer 4.0" },
6937 { 0x00043AD2,
"FontWork",
"Star FontWork" },
6945 bool bMtfRead =
false;
6947 StreamMode::WRITE| StreamMode::SHARE_DENYALL );
6948 if( xOle10Stm->GetError() )
6954 sal_uInt32 nBytesRead = 0;
6957 sal_uInt32
nType(0);
6958 sal_uInt32 nRecType(0);
6959 sal_uInt32 nStrLen(0);
6966 if( 0x10000L > nStrLen )
6968 std::unique_ptr<char[]> pBuf(
new char[ nStrLen ]);
6970 aSvrName = OUString( pBuf.get(),
static_cast<sal_uInt16
>(nStrLen)-1, osl_getThreadTextEncoding() );
6977 sal_uInt32 nDataLen(0);
6980 nBytesRead += 6 *
sizeof( sal_uInt32 ) + nStrLen + nDataLen;
6982 if (rStm.
good() && nReadLen > nBytesRead && nDataLen)
6984 if( xOle10Stm.
is() )
6990 xOle10Stm->WriteUInt32( nDataLen );
6991 xOle10Stm->WriteBytes(
pData.get(), nDataLen);
6996 for( pIds =
aClsIDs; pIds->nId; pIds++ )
6998 if( aSvrName == OUString::createFromAscii(pIds->pSvrName) )
7006 rDest->SetClass(
SvGlobalName( pIds->nId, 0, 0, 0xc0,0,0,0,0,0,0,0x46 ), nCbFmt,
7007 OUString::createFromAscii( pIds->pDspName ) );
7015 else if( nRecType == 5 && !pMtf )
7033 }
while (rStm.
good() && nReadLen >= nBytesRead);
7035 if( !bMtfRead && pMtf )
7070 return "StarOffice XML (Writer)";
7076 return "StarOffice XML (Calc)";
7082 return "StarOffice XML (Impress)";
7088 return "StarOffice XML (Draw)";
7094 return "StarOffice XML (Math)";
7100 return "StarOffice XML (Chart)";
7111 = rSrcStg.
OpenSotStream(
"package_stream", StreamMode::STD_READ);
7112 xStr->ReadStream(rMemStream);
7116 SotStorage& rSrcStg,
const uno::Reference < embed::XStorage >& rDestStorage,
7120 uno::Reference < embed::XEmbeddedObject > xObj;
7125 sStarName = OUString::createFromAscii(
pName );
7126 else if ( nConvertFlags )
7128 static struct ObjImpType
7131 const char* pFactoryNm;
7135 sal_uInt8 b8, b9, b10, b11, b12, b13, b14, b15;
7151 0, 0, 0, 0, 0, 0, 0, 0 }
7154 for(
const ObjImpType* pArr =
aArr; pArr->nFlag; ++pArr )
7156 if( nConvertFlags & pArr->nFlag )
7159 pArr->b8, pArr->b9, pArr->b10, pArr->b11,
7160 pArr->b12, pArr->b13, pArr->b14, pArr->b15 );
7162 if ( aStgNm == aTypeName )
7164 sStarName = OUString::createFromAscii( pArr->pFactoryNm );
7171 if ( sStarName.getLength() )
7174 std::shared_ptr<const SfxFilter> pFilter;
7195#ifdef DEBUG_FILTER_MSFILTER
7197 static sal_Int32 nOleCount(0);
7198 OUString aTmpName(
"/tmp/embedded_stream_");
7199 aTmpName += OUString::number(nOleCount++);
7201 SvFileStream aTmpStream(aTmpName,StreamMode::READ|StreamMode::WRITE|StreamMode::TRUNC);
7202 xMemStream->Seek(0);
7206 if (
pName || pFilter )
7211 OUString aFilterName;
7213 aFilterName = pFilter->GetName();
7217 uno::Sequence<beans::PropertyValue> aMedium(aFilterName.isEmpty() ? 3 : 4);
7218 auto pMedium = aMedium.getArray();
7219 pMedium[0].Name =
"InputStream";
7220 uno::Reference < io::XInputStream >
xStream = new ::utl::OSeekableInputStreamWrapper( aMemStream );
7222 pMedium[1].Name =
"URL";
7223 pMedium[1].Value <<= OUString(
"private:stream" );
7224 pMedium[2].Name =
"DocumentBaseURL";
7225 pMedium[2].Value <<= rBaseURL;
7227 if ( !aFilterName.isEmpty() )
7229 pMedium[3].Name =
"FilterName";
7230 pMedium[3].Value <<= aFilterName;
7233 OUString
aName( aDstStgName );
7239 if( !aFilterName.isEmpty() )
7242 aMedium.realloc( 2 );
7259 if( !
pName && ( sStarName ==
"swriter" || sStarName ==
"scalc" ) )
7262 sal_Int64 nViewAspect = embed::Aspects::MSOLE_CONTENT;
7277 aSize.Width = aSz.
Width();
7278 aSize.Height = aSz.
Height();
7279 xObj->setVisualAreaSize( nViewAspect, aSize );
7282 else if ( sStarName ==
"smath" )
7296 const OUString& rStorageName,
7298 const uno::Reference < embed::XStorage >& xDestStorage,
7304 sal_uInt32 nConvertFlags,
7305 sal_Int64 nRecommendedAspect,
7306 OUString
const& rBaseURL)
7308 sal_Int64 nAspect = nRecommendedAspect;
7310 if( rSrcStorage.
is() && xDestStorage.is() && rStorageName.getLength() )
7316 bool bValidStorage =
false;
7326 bValidStorage = xSrcTst.
is() &&
sizeof( aTestA ) ==
7327 xSrcTst->ReadBytes(aTestA,
sizeof(aTestA));
7328 if( !bValidStorage )
7331 xSrcTst = xObjStg->OpenSotStream(
"\1Ole" );
7332 bValidStorage = xSrcTst.
is() &&
sizeof(aTestA) ==
7333 xSrcTst->ReadBytes(aTestA,
sizeof(aTestA));
7339 if ( nAspect != embed::Aspects::MSOLE_ICON )
7347 "\3ObjInfo", StreamMode::STD_READ );
7348 if ( xObjInfoSrc.
is() && !xObjInfoSrc->GetError() )
7351 xObjInfoSrc->ReadUChar( nByte );
7352 if ( ( nByte >> 4 ) & embed::Aspects::MSOLE_ICON )
7353 nAspect = embed::Aspects::MSOLE_ICON;
7358 nConvertFlags, *xObjStg, xDestStorage, rGrf,
7359 rVisArea, rBaseURL));
7379 bValidStorage =
false;
7390 if ( xObjStor.
is() )
7393 xSrcStor->CopyTo( xObjStor.
get() );
7395 if( !xObjStor->GetError() )
7398 if( xObjStor->GetError() )
7400 rError = xObjStor->GetError();
7401 bValidStorage =
false;
7403 else if( !xObjStor.
is() )
7404 bValidStorage =
false;
7407 else if( pDataStrm )
7409 sal_uInt32 nLen(0), nDummy(0);
7415 bValidStorage =
false;
7423 bValidStorage =
ConvertToOle2( *pDataStrm, nLen, &aMtf, xObjStor );
7430 uno::Reference < embed::XEmbeddedObject > xObj = aCnt.
GetEmbeddedObject( aDstStgName );
7439 if ( nAspect != embed::Aspects::MSOLE_ICON )
7450 aAwtSz.Width = aSz.
Width();
7451 aAwtSz.Height = aSz.
Height();
7455 aAwtSz.Width = rVisArea.
GetWidth();
7459 xObj->setVisualAreaSize( nAspect, aAwtSz );
7462 catch(
const uno::Exception& )
7464 OSL_FAIL(
"Could not set visual area of the object!" );
7486 const OUString& rPropName )
7488 bool bRetValue =
false;
7491 uno::Reference< beans::XPropertySetInfo >
7492 aXPropSetInfo( rXPropSet->getPropertySetInfo() );
7493 if ( aXPropSetInfo.is() )
7494 bRetValue = aXPropSetInfo->hasPropertyByName( rPropName );
7496 catch(
const uno::Exception& )
7504 rXPropSet->setPropertyValue( rPropName, rAny );
7507 catch(
const uno::Exception& )
7516 : nClientAnchorLen( 0 ),
7517 nClientDataLen( 0 ),
7520 nGroupShapeBooleanProperties(0),
7524 nDxTextRight( 144 ),
7525 nDyTextBottom( 72 ),
7526 nDxWrapDistLeft( 0 ),
7527 nDyWrapDistTop( 0 ),
7528 nDxWrapDistRight( 0 ),
7529 nDyWrapDistBottom(0 ),
7531 nCropFromBottom( 0 ),
7533 nCropFromRight( 0 ),
7537 relativeHorizontalWidth( -1 ),
7538 isHorizontalRule( false )
7552 : pObj( rCopy.pObj ),
7553 nXAlign( rCopy.nXAlign ),
7554 nXRelTo( rCopy.nXRelTo ),
7555 nYAlign( rCopy.nYAlign ),
7556 nYRelTo( rCopy.nYRelTo ),
7557 nGroupShapeBooleanProperties(rCopy.nGroupShapeBooleanProperties),
7558 nFlags( rCopy.nFlags ),
7559 nDxTextLeft( rCopy.nDxTextLeft ),
7560 nDyTextTop( rCopy.nDyTextTop ),
7561 nDxTextRight( rCopy.nDxTextRight ),
7562 nDyTextBottom( rCopy.nDyTextBottom ),
7563 nDxWrapDistLeft( rCopy.nDxWrapDistLeft ),
7564 nDyWrapDistTop( rCopy.nDyWrapDistTop ),
7565 nDxWrapDistRight( rCopy.nDxWrapDistRight ),
7566 nDyWrapDistBottom(rCopy.nDyWrapDistBottom ),
7567 nCropFromTop( rCopy.nCropFromTop ),
7568 nCropFromBottom( rCopy.nCropFromBottom ),
7569 nCropFromLeft( rCopy.nCropFromLeft ),
7570 nCropFromRight( rCopy.nCropFromRight ),
7571 aTextId( rCopy.aTextId ),
7572 nNextShapeId( rCopy.nNextShapeId ),
7573 nShapeId( rCopy.nShapeId ),
7574 eShapeType( rCopy.eShapeType ),
7575 relativeHorizontalWidth( rCopy.relativeHorizontalWidth ),
7576 isHorizontalRule( rCopy.isHorizontalRule )
7624 [&pShape](
const SvxMSDffShapeIdContainer::value_type& rEntry) { return rEntry.second == pShape; });
7636 : aParentRect(rParentRect)
SVXCORE_DLLPUBLIC sal_Int16 GetCustomShapeConnectionTypeDefault(MSO_SPT eSpType)
SVXCORE_DLLPUBLIC bool IsCustomShapeFilledByDefault(MSO_SPT eSpType)
SVXCORE_DLLPUBLIC bool IsCustomShapeStrokedByDefault(MSO_SPT eSpType)
SVXCORE_DLLPUBLIC const mso_CustomShape * GetCustomShapeContent(MSO_SPT eSpType)
const StyleSettings & GetStyleSettings() const
static OUString GetAppFileName()
static OutputDevice * GetDefaultDevice()
static const AllSettings & GetSettings()
bool Convert(BmpConversion eConversion)
bool Rotate(Degree10 nAngle10, const Color &rFillColor)
bool Mirror(BmpMirrorFlags nMirrorFlags)
Bitmap GetBitmap(Color aTransparentReplaceColor) const
void CombineMaskOr(Color maskColor, sal_uInt8 nTol)
bool Crop(const tools::Rectangle &rRectPixel)
bool Adjust(short nLuminancePercent, short nContrastPercent, short nChannelRPercent, short nChannelGPercent, short nChannelBPercent, double fGamma=1.0, bool bInvert=false, bool msoBrightness=false)
const Size & GetSizePixel() const
Size GetSizePixel() const
vcl::PixelFormat getPixelFormat() const
sal_uInt8 GetLuminance() const
sal_uInt8 GetBlue() const
void SetGreen(sal_uInt8 nGreen)
void SetRed(sal_uInt8 nRed)
basegfx::BColor getBColor() const
sal_uInt8 GetGreen() const
void SetBlue(sal_uInt8 nBlue)
sal_uInt32 GetPropertyValue(sal_uInt32 nId, sal_uInt32 nDefault) const
bool IsProperty(sal_uInt32 nRecType) const
friend SvStream & ReadDffPropSet(SvStream &rIn, DffPropSet &rPropSet)
static sal_uLong SanitizeEndPos(SvStream &rIn, sal_uLong nEndRecPos)
bool IsHardAttribute(sal_uInt32 nId) const
OUString GetPropertyString(sal_uInt32 nId, SvStream &rStrm) const
Returns a string property.
bool SeekToContent(sal_uInt32 nRecType, SvStream &rSt) const
void InitializePropSet(sal_uInt16 nPropSetType) const
void ReadPropSet(SvStream &rIn, SvxMSDffClientData *pClientData) const
std::unique_ptr< DffPropSet > pDefaultPropSet
void SetDefaultPropSet(SvStream &rIn, sal_uInt32 nOffDgg) const
void ApplyCustomShapeTextAttributes(SfxItemSet &rSet) const
DffPropertyReader(const SvxMSDffManager &rManager)
void ApplyAttributes(SvStream &rIn, SfxItemSet &rSet) const
void ApplyFillAttributes(SvStream &rIn, SfxItemSet &rSet, const DffObjData &rObjData) const
void ImportGradientColor(SfxItemSet &aSet, sal_uInt32 eMSO_FillType, double dTrans, double dBackTrans) const
const SvxMSDffManager & rManager
void ApplyLineAttributes(SfxItemSet &rSet, const MSO_SPT eShapeType) const
void CheckAndCorrectExcelTextRotation(SvStream &rIn, SfxItemSet &rSet, DffObjData const &rObjData) const
bool mbRotateGranientFillWithAngle
static Degree100 Fix16ToAngle(sal_Int32 nAngle)
void ApplyCustomShapeGeometryAttributes(SvStream &rIn, SfxItemSet &rSet, const DffObjData &rObjData) const
DffRecordHeader * GetRecordHeader(sal_uInt16 nRecType, DffSeekToContentMode eMode=SEEK_FROM_BEGINNING)
void Consume(SvStream &rIn, sal_uInt32 nStOfs=0)
DffRecordHeader * Current()
bool SeekToContent(SvStream &rIn, sal_uInt16 nRecType, DffSeekToContentMode eMode=SEEK_FROM_BEGINNING)
DffRecordHeader * First()
static void SetEnhancedCustomShapeParameter(css::drawing::EnhancedCustomShapeParameter &rParameter, const sal_Int32 nValue)
tools::Rectangle GetTextRect() const
static OUString GetEquation(const sal_uInt16 nFlags, sal_Int32 nPara1, sal_Int32 nPara2, sal_Int32 nPara3)
static void SetEnhancedCustomShapeHandleParameter(css::drawing::EnhancedCustomShapeParameter &rParameter, const sal_Int32 nPara, const bool bIsSpecialValue, bool bHorz)
static tools::PolyPolygon GetPolyPolygon(const css::uno::Reference< css::drawing::XShape > &rXShape)
const Fraction & X() const
sal_Int32 GetNumerator() const
sal_Int32 GetDenominator() const
static ErrCode Import(SvStream &rIStm, Graphic &rGraphic, ConvertDataFormat nFormat=ConvertDataFormat::Unknown)
Graphic ImportUnloadedGraphic(SvStream &rIStream, sal_uInt64 sizeLimit=0, const Size *pSizeHint=nullptr)
static GraphicFilter & GetGraphicFilter()
ErrCode ImportGraphic(Graphic &rGraphic, const INetURLObject &rPath, sal_uInt16 nFormat=GRFILTER_FORMAT_DONTKNOW, sal_uInt16 *pDeterminedFormat=nullptr, GraphicFilterImportFlags nImportFlags=GraphicFilterImportFlags::NONE)
const GDIMetaFile & GetGDIMetaFile() const
GraphicType GetType() const
BitmapEx GetBitmapEx(const GraphicConversionParameters &rParameters=GraphicConversionParameters()) const
MapMode GetPrefMapMode() const
void setOriginURL(OUString const &rOriginURL)
OUString GetMainURL(DecodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
bool GetNewAbsURL(OUString const &rTheRelURIRef, INetURLObject *pTheAbsURIRef) const
INetProtocol GetProtocol() const
void SetAdviseFlags(sal_uLong nAdv)
std::unique_ptr< GDIMetaFile > pMtf
void Write(SvStream &rStm)
SotClipboardFormatId nFormat
void SetAspect(sal_uInt16 nAsp)
void SetMtf(const GDIMetaFile &rMtf)
void SetSize(const Size &rSize)
MapUnit GetMapUnit() const
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
SAL_WARN_UNUSED_RESULT Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
constexpr tools::Long Y() const
void setX(tools::Long nX)
void setY(tools::Long nY)
tools::Long AdjustY(tools::Long nVertMove)
tools::Long AdjustX(tools::Long nHorzMove)
constexpr tools::Long X() const
void SetPropertyValue(const css::beans::PropertyValue &rPropVal)
css::uno::Any * GetPropertyValueByName(const OUString &rPropName)
void ClearPropertyValue(const OUString &rPropertyName)
sal_uInt16 Insert(const SdrGluePoint &rGP)
sal_uInt16 GetCount() const
void SetPercent(bool bOn)
void SetEscDir(SdrEscapeDirection nNewEsc)
void SetPos(const Point &rNewPos)
void SetAlign(SdrAlign nAlg)
MapUnit GetScaleUnit() const
const SfxItemPool & GetItemPool() const
basegfx::B2DPolyPolygon GetLineGeometry(const bool bBezierAllowed) const
virtual SdrObjList * GetSubList() const override
SdrObject * GetObj(size_t nNum) const
size_t GetObjCount() const
virtual void NbcInsertObject(SdrObject *pObj, size_t nPos=SAL_MAX_SIZE)
const SfxPoolItem & GetMergedItem(const sal_uInt16 nWhich) const
virtual SdrGluePointList * ForceGluePointList()
void SetOutlinerParaObject(std::optional< OutlinerParaObject > pTextObject)
void BroadcastObjectChange() const
void SetStyleSheet(SfxStyleSheet *pNewStyleSheet, bool bDontRemoveHardAttr)
virtual SdrInventor GetObjInventor() const
virtual css::uno::Reference< css::drawing::XShape > getUnoShape()
SfxStyleSheet * GetStyleSheet() const
virtual void SetChanged()
virtual SdrObjKind GetObjIdentifier() const
SdrOutliner & ImpGetDrawOutliner() const
virtual bool IsVerticalWriting() const
std::shared_ptr< const SfxFilter > GetFilter4EA(const OUString &rEA, SfxFilterFlags nMust=SfxFilterFlags::IMPORT, SfxFilterFlags nDont=SFX_FILTER_NOTINSTALLED) const
static OUString GetTypeFromStorage(const SotStorage &rStg)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
constexpr tools::Long getHeight() const
constexpr tools::Long Height() const
constexpr tools::Long getWidth() const
void setWidth(tools::Long nWidth)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
static SotClipboardFormatId RegisterFormatName(const OUString &rName)
sal_Int32 GetVersion() const
bool CopyTo(SotStorage *pDestStg)
tools::SvRef< SotStorageStream > OpenSotStream(const OUString &rEleName, StreamMode=StreamMode::STD_READWRITE)
SvGlobalName GetClassName()
static SotStorage * OpenOLEStorage(css::uno::Reference< css::embed::XStorage > const &xStorage, OUString const &rEleName, StreamMode=StreamMode::STD_READWRITE)
const Color & GetWindowColor() const
const Color & GetShadowColor() const
const Color & GetMenuColor() const
const Color & GetLabelTextColor() const
const Color & GetDeactiveColor() const
const Color & GetWindowTextColor() const
const Color & GetHighlightColor() const
const Color & GetFaceColor() const
const Color & GetMenuTextColor() const
const Color & GetHighlightTextColor() const
const Color & GetButtonTextColor() const
virtual void ResetError()
SvStream & WriteInt32(sal_Int32 nInt32)
virtual sal_uInt64 TellEnd()
SvStream & ReadInt16(sal_Int16 &rInt16)
SvStream & WriteUInt32(sal_uInt32 nUInt32)
SvStream & ReadUInt32(sal_uInt32 &rUInt32)
sal_uInt64 Seek(sal_uInt64 nPos)
SvStream & ReadInt32(sal_Int32 &rInt32)
std::size_t ReadBytes(void *pData, std::size_t nSize)
sal_uInt64 SeekRel(sal_Int64 nPos)
SvStream & ReadUInt16(sal_uInt16 &rUInt16)
sal_uInt64 remainingSize()
SvStream & WriteStream(SvStream &rStream)
virtual void NotifyFreeObj(SdrObject *pObj)=0
block of parameters for import/export for a single call of ImportObjAtCurrentStreamPos()
void insert(std::unique_ptr< SvxMSDffImportRec > pImpRec)
SvxMSDffImportData(const tools::Rectangle &rParentRect)
MSDffImportRecords m_Records
Shape pointer, Shape ids and private data.
tools::Rectangle aParentRect
Rectangle of the surrounding groups, which might have been provided externally.
std::map< const SdrObject *, SvxMSDffImportRec * > m_ObjToRecMap
virtual void NotifyFreeObj(SdrObject *pObj) override
SvxMSDffImportRec * find(const SdrObject *pObj)
virtual ~SvxMSDffImportData() override
abstract base class for Escher imports
rtl::Reference< SdrObject > ImportGroup(const DffRecordHeader &rHd, SvStream &rSt, SvxMSDffClientData &rData, tools::Rectangle &rClientRect, const tools::Rectangle &rGlobalChildRect, int nCalledByGroup, sal_Int32 *pShapeId)
virtual ~SvxMSDffManager()
virtual rtl::Reference< SdrObject > ImportOLE(sal_uInt32 nOLEId, const Graphic &rGraf, const tools::Rectangle &rBoundRect, const tools::Rectangle &rVisArea, const int _nCalledByGroup) const
DffRecordManager maShapeRecords
void RemoveFromShapeOrder(SdrObject const *pObject) const
sal_Int32 ScalePoint(sal_Int32 nVal) const
bool GetShapeGroupContainerData(SvStream &rSt, sal_uInt32 nLenShapeGroupCont, bool bPatriarch, sal_uInt16 nDrawingContainerId)
static rtl::Reference< SdrOle2Obj > CreateSdrOLEFromStorage(SdrModel &rSdrModel, const OUString &rStorageName, tools::SvRef< SotStorage > const &rSrcStorage, const css::uno::Reference< css::embed::XStorage > &xDestStg, const Graphic &rGraf, const tools::Rectangle &rBoundRect, const tools::Rectangle &rVisArea, SvStream *pDataStrrm, ErrCode &rError, sal_uInt32 nConvertFlags, sal_Int64 nAspect, OUString const &rBaseURL)
void InitSvxMSDffManager(sal_uInt32 nOffsDgg_, SvStream *pStData_, sal_uInt32 nSvxMSDffOLEConvFlags)
sal_uInt32 nSvxMSDffOLEConvFlags
static void ReadObjText(const OUString &rText, SdrObject *pObj)
void GetFidclData(sal_uInt32 nOffsDgg)
void Scale(sal_Int32 &rVal) const
SvxMSDffManager(SvStream &rStCtrl, OUString aBaseURL, sal_uInt32 nOffsDgg, SvStream *pStData, SdrModel *pSdrModel_, tools::Long nApplicationScale, Color mnDefaultColor_, SvStream *pStData2_=nullptr, bool bSkipImages=false)
constructor
tools::Rectangle GetGlobalChildAnchor(const DffRecordHeader &rHd, SvStream &rSt, tools::Rectangle &aClientRect)
std::unique_ptr< SvxMSDffBLIPInfos > m_pBLIPInfos
virtual rtl::Reference< SdrObject > ProcessObj(SvStream &rSt, DffObjData &rData, SvxMSDffClientData &rClientData, tools::Rectangle &rTextRect, SdrObject *pObj)
virtual bool ShapeHasText(sal_uLong nShapeId, sal_uLong nFilePos) const
Prevent that (rounded) rectangles with wrapped text will always be converted into SdrRectObj( SdrObjK...
static bool ConvertToOle2(SvStream &rStm, sal_uInt32 nLen, const GDIMetaFile *, const tools::SvRef< SotStorage > &rDest)
void GetDrawingGroupContainerData(SvStream &rSt, sal_uInt32 nLenDgg)
static OUString GetFilterNameFromClassID(const SvGlobalName &aGlobName)
Determines an ODF filter name (if there is one) for aGlobName.
virtual bool GetColorFromPalette(sal_uInt16 nNum, Color &rColor) const
static void ProcessClientData(SvStream &rStData, sal_uInt32 nDatLen, std::unique_ptr< char[]> &rpBuff, sal_uInt32 &rBuffLen)
rtl::Reference< SdrObject > ImportGraphic(SvStream &, SfxItemSet &, const DffObjData &)
void StoreShapeOrder(sal_uLong nId, sal_uLong nTxBx, SdrObject *pObject, SwFlyFrameFormat *pFly=nullptr) const
bool GetBLIP(sal_uLong nIdx, Graphic &rData, tools::Rectangle *pVisArea=nullptr)
Request for a specific BLIP.
static void SolveSolver(const SvxMSDffSolverContainer &rSolver)
Create connections between shapes.
static bool ReadCommonRecordHeader(SvStream &rSt, sal_uInt8 &rVer, sal_uInt16 &rInst, sal_uInt16 &rFbt, sal_uInt32 &rLength)
void GetCtrlData(sal_uInt32 nOffsDgg)
virtual bool SeekToShape(SvStream &rSt, SvxMSDffClientData *pClientData, sal_uInt32 nId) const
void GetGroupAnchors(const DffRecordHeader &rHd, SvStream &rSt, tools::Rectangle &rGroupClientAnchor, tools::Rectangle &rGroupChildAnchor, const tools::Rectangle &rClientRect, const tools::Rectangle &rGlobalChildRect)
virtual bool GetOLEStorageName(sal_uInt32 nOLEId, OUString &rStorageName, tools::SvRef< SotStorage > &rSrcStorage, css::uno::Reference< css::embed::XStorage > &xDestStg) const
void removeShapeId(SdrObject const *pShape)
std::unique_ptr< SvxMSDffShapeInfos_ById > m_xShapeInfosById
std::vector< FIDCL > maFidcls
friend class DffPropertyReader
rtl::Reference< SdrObject > ImportShape(const DffRecordHeader &rHd, SvStream &rSt, SvxMSDffClientData &rData, tools::Rectangle &rClientRect, const tools::Rectangle &rGlobalChildRect, int nCalledByGroup, sal_Int32 *pShapeId)
sal_uInt32 ScalePt(sal_uInt32 nPt) const
static bool SetPropValue(const css::uno::Any &rAny, const css::uno::Reference< css::beans::XPropertySet > &rXPropSet, const OUString &rPropertyName)
bool GetShapeContainerData(SvStream &rSt, sal_uInt32 nLenShapeCont, sal_uInt64 nPosGroup, sal_uInt16 nDrawingContainerId)
static bool GetBLIPDirect(SvStream &rBLIPStream, Graphic &rData, tools::Rectangle *pVisArea=nullptr)
read a BLIP out of an already positioned stream
Color MSO_CLR_ToColor(sal_uInt32 nColorCode, sal_uInt16 nContextProperty=DFF_Prop_lineColor) const
SdrObject * getShapeForId(sal_Int32 nShapeId)
static void ExtractOwnStream(SotStorage &rSrcStg, SvMemoryStream &rMemStream)
Extracts ODF data from rSrcStg.
void SetDgContainer(SvStream &rSt)
void CheckTxBxStoryChain()
void ExchangeInShapeOrder(SdrObject const *pOldObject, sal_uLong nTxBx, SdrObject *pObject) const
sal_uInt32 GetSvxMSDffSettings() const
SvxMSDffShapeIdContainer maShapeIdContainer
stores a reference to an imported SdrObject with its shape id if it has one
virtual void ProcessClientAnchor2(SvStream &rStData, DffRecordHeader &rHd, DffObjData &)
bool SeekToRec2(sal_uInt16 nRecId1, sal_uInt16 nRecId2, sal_uLong nMaxFilePos) const
static css::uno::Reference< css::embed::XEmbeddedObject > CheckForConvertToSOObj(sal_uInt32 nConvertFlags, SotStorage &rSrcStg, const css::uno::Reference< css::embed::XStorage > &xDestStg, const Graphic &rGrf, const tools::Rectangle &rVisArea, OUString const &rBaseURL)
SdrModel * GetModel() const
void ScaleEmu(sal_Int32 &rVal) const
void insertShapeId(sal_Int32 nShapeId, SdrObject *pShape)
void FreeObj(SvxMSDffClientData &rData, SdrObject *pObj)
static void ProcessClientAnchor(SvStream &rStData, sal_uInt32 nDatLen, std::unique_ptr< char[]> &rpBuff, sal_uInt32 &rBuffLen)
rtl::Reference< SdrObject > ImportObj(SvStream &rSt, SvxMSDffClientData &rData, tools::Rectangle &rClientRect, const tools::Rectangle &rGlobalChildRect, int nCalledByGroup, sal_Int32 *pShapeId)
SvxMSDffShapeOrders m_aShapeOrders
std::unique_ptr< DffPropertyReader > pSecPropSet
ShapeFlag nGroupShapeFlags
OffsetMap maDgOffsetTable
array of fileoffsets
static bool SeekToRec(SvStream &rSt, sal_uInt16 nRecId, sal_uLong nMaxFilePos, DffRecordHeader *pRecHd=nullptr, sal_uLong nSkipCount=0)
virtual SdrObject * FinalizeObj(DffObjData &rData, SdrObject *pObj)
Object finalization, used by the Excel filter to correctly compute the object anchoring after nested ...
void GetDrawingContainerData(SvStream &rSt, sal_uInt32 nLenDg, sal_uInt16 nDrawingContainerId)
static OUString MSDFFReadZString(SvStream &rIn, sal_uInt32 nMaxLen, bool bUniCode)
Color MSO_TEXT_CLR_ToColor(sal_uInt32 nColorCode) const
std::unique_ptr< SvxMSDffShapeInfos_ByTxBxComp > m_xShapeInfosByTxBxComp
void SetModel(SdrModel *pModel, tools::Long nApplicationScale)
void NotifyFreeObj(SvxMSDffClientData &rData, SdrObject *pObj)
static bool MakeContentStream(SotStorage *pStor, const GDIMetaFile &)
std::unordered_map< sal_uInt32, Graphic > aEscherBlipCache
std::vector< std::pair< DffObjData, std::shared_ptr< DffRecordHeader > > > maPendingGroupData
When importing Excel files, cell anchor computations for non-page-anchored groups must be done after ...
bool GetShape(sal_uLong nId, rtl::Reference< SdrObject > &rpData, SvxMSDffImportData &rData)
static MapUnit UnoEmbed2VCLMapUnit(sal_Int32 nUnoEmbedMapUnit)
static VclPtr< reference_type > Create(Arg &&... arg)
tools::Long Decompress(SvStream &rIStm, SvStream &rOStm)
tools::Long EndCompression()
void BeginCompression(int nCompressLevel=ZCODEC_DEFAULT_COMPRESSION, bool gzLib=false)
void append(const basegfx::B2DPoint &rPoint, sal_uInt32 nCount)
B2DRange const & getB2DRange() const
void setClosed(bool bNew)
B2DPoint getCenter() const
void SetEndIntens(sal_uInt16 nNewIntens)
void SetStartIntens(sal_uInt16 nNewIntens)
css::uno::Reference< css::embed::XEmbeddedObject > GetEmbeddedObject(const OUString &, OUString const *pBaseURL=nullptr)
bool InsertEmbeddedObject(const css::uno::Reference< css::embed::XEmbeddedObject > &, OUString &)
static css::uno::Reference< css::embed::XStorage > GetStorageOfFormatFromInputStream(const OUString &aFormat, const css::uno::Reference< css::io::XInputStream > &xStream, const css::uno::Reference< css::uno::XComponentContext > &rxContext=css::uno::Reference< css::uno::XComponentContext >(), bool bRepairStorage=false)
#define SO3_SDRAW_OLE_EMBED_CLASSID_60
#define MSO_PPT8_SLIDE_CLASSID
#define SO3_SIMPRESS_OLE_EMBED_CLASSID_60
#define MSO_EQUATION3_CLASSID
#define SO3_SW_OLE_EMBED_CLASSID_8
#define SO3_SW_OLE_EMBED_CLASSID_60
#define MSO_EQUATION2_CLASSID
#define SO3_SCH_OLE_EMBED_CLASSID_60
#define SO3_SM_OLE_EMBED_CLASSID_60
#define MSO_EXCEL8_CLASSID
#define MSO_EXCEL5_CLASSID
#define SO3_SC_OLE_EMBED_CLASSID_60
#define SO3_SM_OLE_EMBED_CLASSID_8
#define MSO_EXCEL8_CHART_CLASSID
#define SO3_SDRAW_OLE_EMBED_CLASSID_8
#define SO3_SCH_OLE_EMBED_CLASSID_8
#define SO3_SC_OLE_EMBED_CLASSID_8
#define SO3_SIMPRESS_OLE_EMBED_CLASSID_8
void SetGraphic(const Graphic &rGraphic, const OUString &rMediaType)
static std::unique_ptr< SvStream > CreateStream(const OUString &rFileName, StreamMode eOpenMode, css::uno::Reference< css::awt::XWindow > xParentWin=nullptr)
void SetFontSize(const Size &)
void SetFamilyName(const OUString &rFamilyName)
void SetPixel(tools::Long nY, tools::Long nX, Color nColor)
tools::Long Height() const
tools::Long Width() const
constexpr ::Color COL_WHITE(0xFF, 0xFF, 0xFF)
constexpr ::Color COL_BLACK(0x00, 0x00, 0x00)
#define DBG_ASSERT(sCon, aError)
SvStream & ReadDffPropSet(SvStream &rIn, DffPropSet &rRec)
virtual sal_uInt32 GetId() const override
constexpr TypedWhichId< SvxKerningItem > EE_CHAR_KERNING(EE_CHAR_START+12)
constexpr TypedWhichId< SvxFontItem > EE_CHAR_FONTINFO_CJK(EE_CHAR_START+17)
constexpr TypedWhichId< SfxBoolItem > EE_PARA_BULLETSTATE(EE_PARA_START+9)
constexpr TypedWhichId< SvxUnderlineItem > EE_CHAR_UNDERLINE(EE_CHAR_START+5)
constexpr TypedWhichId< SvxFontHeightItem > EE_CHAR_FONTHEIGHT(EE_CHAR_START+2)
constexpr TypedWhichId< SvxShadowedItem > EE_CHAR_SHADOW(EE_CHAR_START+9)
constexpr TypedWhichId< SvxWeightItem > EE_CHAR_WEIGHT(EE_CHAR_START+4)
constexpr TypedWhichId< SvxCrossedOutItem > EE_CHAR_STRIKEOUT(EE_CHAR_START+6)
constexpr TypedWhichId< SvxPostureItem > EE_CHAR_ITALIC(EE_CHAR_START+7)
constexpr TypedWhichId< SvxFrameDirectionItem > EE_PARA_WRITINGDIR(EE_PARA_START+0)
constexpr TypedWhichId< SvxFontItem > EE_CHAR_FONTINFO_CTL(EE_CHAR_START+18)
constexpr TypedWhichId< SvxCharScaleWidthItem > EE_CHAR_FONTWIDTH(EE_CHAR_START+3)
constexpr TypedWhichId< SvxFontItem > EE_CHAR_FONTINFO(EE_CHAR_START+1)
EmbeddedObjectRef * pObject
#define ERRCODE_IO_PENDING
#define ERRCODE_GRFILTER_OPENERROR
Sequence< sal_Int8 > aSeq
#define SAL_WARN_IF(condition, area, stream)
#define SAL_WARN(area, stream)
#define SAL_INFO(area, stream)
std::unique_ptr< sal_Int32[]> pData
#define DFF_Prop_pictureGamma
#define DFF_PST_TextCharsAtom
#define DFF_Prop_fc3DFillHarsh
#define DFF_Prop_fillAngle
#define DFF_Prop_cropFromLeft
#define DFF_Prop_dxWrapDistRight
#define DFF_Prop_gtextFStretch
#define DFF_Prop_lineWidth
#define DFF_Prop_pibFlags
#define DFF_Prop_cdirFont
#define DFF_Prop_c3DOriginY
#define DFF_Prop_dyWrapDistBottom
#define DFF_Prop_shadowOffsetY
#define DFF_Prop_c3DOriginX
#define DFF_Prop_fillOpacity
#define DFF_msofbtClientTextbox
#define DFF_Prop_lineEndArrowWidth
#define DFF_msofbtChildAnchor
mso_syscolorHighlightText
mso_syscolorInfoBackground
mso_syscolorButtonHighlight
mso_syscolorInactiveCaption
mso_syscolorActiveCaption
mso_syscolorInactiveCaptionText
const sal_uInt32 nMaxLegalDffRecordLength
#define DFF_Prop_txflTextFlow
#define DFF_Prop_fillToBottom
#define DFF_Prop_FitTextToShape
#define DFF_Prop_gtextUNICODE
#define DFF_Prop_lineDashing
#define DFF_Prop_c3DExtrusionColor
#define DFF_Prop_pFormulas
#define DFF_Prop_c3DTolerance
#define DFF_Prop_pSegmentInfo
#define DFF_Prop_stretchPointX
#define DFF_Prop_lineStartArrowLength
#define DFF_Prop_c3DXViewpoint
#define DFF_Prop_c3DDiffuseAmt
#define DFF_Prop_fshadowObscured
#define DFF_Prop_WrapText
#define DFF_Prop_fillShadeColors
#define DFF_Prop_fNoFillHitTest
#define DFF_Prop_lineEndArrowLength
#define DFF_Prop_lineOpacity
#define DFF_Prop_geoRight
#define DFF_Prop_c3DRotationCenterY
#define DFF_Prop_c3DFillZ
#define DFF_Prop_anchorText
#define DFF_Prop_gtextSize
#define DFF_msofbtClientAnchor
#define DFF_Prop_Rotation
#define DFF_Prop_fGtextOK
#define DFF_Prop_fNoLineDrawDash
#define DFF_msofbtClientData
#define DFF_Prop_dxWrapDistLeft
mso_lineLongDashDotDotGEL
#define DFF_Prop_dxTextRight
#define DFF_Prop_dyTextTop
#define DFF_Prop_c3DShininess
#define DFF_Prop_lineJoinStyle
#define DFF_Prop_c3DYRotationAngle
#define DFF_Prop_connectorPoints
#define DFF_Prop_c3DExtrudeBackward
#define DFF_COMMON_RECORD_HEADER_SIZE
#define DFF_Prop_cropFromTop
#define DFF_Prop_c3DRenderMode
#define DFF_Prop_gtextFont
#define DFF_Prop_lineBackColor
#define DFF_Prop_c3DSkewAmount
#define DFF_Prop_lineStartArrowWidth
#define DFF_msofbtBstoreContainer
#define DFF_Prop_fFillShadeShapeOK
#define DFF_Prop_c3DYViewpoint
#define DFF_Prop_pictureActive
#define DFF_Prop_stretchPointY
#define DFF_Prop_dyTextBottom
#define DFF_Prop_c3DAmbientIntensity
#define DFF_Prop_cropFromRight
#define DFF_Prop_c3DFillIntensity
#define DFF_Prop_shadowOpacity
#define DFF_Prop_pictureBrightness
#define DFF_Prop_adjustValue
#define DFF_Prop_lineColor
#define DFF_Prop_pictureTransparent
#define DFF_Prop_fillBlip
#define DFF_Prop_dxTextLeft
#define DFF_Prop_metroBlob
#define DFF_Prop_c3DRotationCenterZ
#define DFF_Prop_gtextFBold
#define DFF_PST_TextBytesAtom
#define DFF_Prop_lineEndCapStyle
#define DFF_Prop_pictureContrast
#define DFF_Prop_connectorType
#define DFF_msofbtDgContainer
#define DFF_msofbtDggContainer
mso_sptStraightConnector1
#define DFF_Prop_wzDescription
#define DFF_Prop_geoBottom
#define DFF_msofbtSolverContainer
#define DFF_Prop_gtextFItalic
#define DFF_PSFLAG_CONTAINER
#define DFF_Prop_lineStyle
#define DFF_Prop_fc3DLightFace
#define DFF_Prop_gtextFStrikethrough
#define DFF_Prop_shadowType
#define DFF_msofbtSpContainer
#define DFF_Prop_adjust10Value
#define DFF_Prop_fillWidth
#define DFF_Prop_c3DRotationCenterX
#define DFF_Prop_cropFromBottom
#define DFF_Prop_c3DXRotationAngle
#define DFF_Prop_pVertices
#define DFF_Prop_fillHeight
#define DFF_Prop_c3DFillX
#define DFF_Prop_c3DSkewAngle
#define DFF_Prop_gtextAlign
#define DFF_Prop_pWrapPolygonVertices
#define DFF_Prop_dyWrapDistTop
#define DFF_Prop_gtextSpacing
#define DFF_Prop_c3DKeyIntensity
#define DFF_Prop_hspMaster
#define DFF_msofbtSpgrContainer
#define DFF_Prop_shadowOffsetX
#define DFF_Prop_fillType
#define DFF_Prop_c3DZViewpoint
#define DFF_Prop_fillToRight
#define DFF_Prop_lineStartArrowhead
#define DFF_Prop_fillBackOpacity
#define DFF_Prop_c3DExtrudeForward
#define DFF_msofbtUDefProp
#define DFF_Prop_fillColor
#define DFF_Prop_fillBackColor
#define DFF_Prop_fillFocus
#define DFF_Prop_lineEndArrowhead
mso_anchorBottomCenteredBaseline
mso_anchorTopCenteredBaseline
#define DFF_Prop_pictureId
#define DFF_Prop_shadowColor
#define DFF_msofbtConnectorRule
#define DFF_Prop_c3DSpecularAmt
#define DFF_Prop_c3DFillY
#define DFF_Prop_textRectangles
constexpr OUStringLiteral MSO_OLE_Obj
static void ApplyRectangularGradientAsBitmap(const SvxMSDffManager &rManager, SvStream &rIn, SfxItemSet &rSet, const std::vector< ShadeColor > &rShadeColors, const DffObjData &rObjData, Degree100 nFix16Angle)
static SvStream & operator>>(SvStream &rIn, SvxMSDffConnectorRule &rRule)
static basegfx::B2DPolyPolygon GetLineArrow(const sal_Int32 nLineWidth, const sal_uInt32 eLineEnd, const sal_uInt32 eLineWidth, const sal_uInt32 eLineLength, sal_Int32 &rnArrowWidth, bool &rbArrowCenter, OUString &rsArrowName, bool bScaleArrow)
static void GetShadeColors(const SvxMSDffManager &rManager, const DffPropertyReader &rProperties, SvStream &rIn, std::vector< ShadeColor > &rShadeColors)
static sal_uInt32 nMSOleObjCntr
SvStream & ReadSvxMSDffSolverContainer(SvStream &rIn, SvxMSDffSolverContainer &rContainer)
static const char * GetInternalServerName_Impl(const SvGlobalName &aGlobName)
static void lcl_ApplyCropping(const DffPropSet &rPropSet, SfxItemSet *pSet, Graphic &rGraf)
static Size lcl_GetPrefSize(const Graphic &rGraf, const MapMode &aWanted)
#define SVXMSDFF_SETTINGS_IMPORT_PPT
constexpr OUStringLiteral SVEXT_PERSIST_STREAM
@ SEEK_FROM_CURRENT_AND_RESTART
#define OLE_EXCEL_2_STARCALC
::std::multiset< std::shared_ptr< SvxMSDffShapeInfo >, CompareSvxMSDffShapeInfoByTxBxComp > SvxMSDffShapeInfos_ByTxBxComp
#define DFF_RECORD_MANAGER_BUF_SIZE
#define SVXMSDFF_SETTINGS_CROP_BITMAPS
#define OLE_MATHTYPE_2_STARMATH
#define OLE_WINWORD_2_STARWRITER
#define OLE_POWERPOINT_2_STARIMPRESS
#define SVXMSDFF_SETTINGS_IMPORT_EXCEL
::std::set< std::shared_ptr< SvxMSDffShapeInfo >, CompareSvxMSDffShapeInfoById > SvxMSDffShapeInfos_ById
SVXCORE_DLLPUBLIC MSO_SPT Get(const OUString &)
constexpr OUStringLiteral aData
css::uno::Any GetPropertyValue(SwPaM &rPaM, const SfxItemPropertySet &rPropSet, std::u16string_view rPropertyName)
B2DPolygon createPolygonFromEllipseSegment(const B2DPoint &rCenter, double fRadiusX, double fRadiusY, double fStart, double fEnd)
constexpr double deg2rad(double v)
Shape IDs per cluster in DGG atom.
OString stripEnd(const OString &rIn, char c)
css::uno::Sequence< DstElementType > containerToSequence(const SrcType &i_Container)
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
std::enable_if< std::is_signed< T >::value, T >::type saturating_toggle_sign(T a)
constexpr T saturating_sub(T a, T b)
std::enable_if< std::is_signed< T >::value, bool >::type checked_sub(T a, T b, T &result)
BitmapEx CreateFromData(sal_uInt8 const *pData, sal_Int32 nWidth, sal_Int32 nHeight, sal_Int32 nStride, sal_Int8 nBitCount, bool bReversColors, bool bReverseAlpha)
HashMap_OWString_Interface aMap
SdrOnOffItem makeSdrTextWordWrapItem(bool bAuto)
XColorItem makeSdrShadowColorItem(const Color &rTheColor)
SdrOnOffItem makeSdrShadowItem(bool bShadow)
SdrPercentItem makeSdrShadowTransparenceItem(sal_uInt16 nTransp)
SdrMetricItem makeSdrShadowXDistItem(tools::Long nDist)
SdrMetricItem makeSdrShadowYDistItem(tools::Long nDist)
SdrOnOffItem makeSdrTextAutoGrowHeightItem(bool bAuto)
SdrOnOffItem makeSdrTextAutoGrowWidthItem(bool bAuto)
SdrOnOffItem makeSdrTextContourFrameItem(bool bOn)
SdrMetricItem makeSdrTextUpperDistItem(tools::Long mnHeight)
SdrMetricItem makeSdrTextRightDistItem(tools::Long mnHeight)
SdrMetricItem makeSdrTextLowerDistItem(tools::Long mnHeight)
SdrMetricItem makeSdrTextLeftDistItem(tools::Long mnHeight)
SdrMetricItem makeSdrTextMinFrameHeightItem(tools::Long mnHeight)
SdrMetricItem makeSdrTextMinFrameWidthItem(tools::Long mnWidth)
constexpr OUStringLiteral OFOPXML_STORAGE_FORMAT_STRING
SOT_DLLPUBLIC void WriteClipboardFormat(SvStream &rStm, SotClipboardFormatId nFormat)
#define STREAM_SEEK_TO_END
TOOLS_DLLPUBLIC OUString read_uInt16s_ToOUString(SvStream &rStrm, std::size_t nUnits)
#define STREAM_SEEK_TO_BEGIN
OUString read_uInt8s_ToOUString(SvStream &rStrm, std::size_t nUnits, rtl_TextEncoding eEnc)
TOOLS_DLLPUBLIC bool checkSeek(SvStream &rSt, sal_uInt64 nOffset)
bool operator()(std::shared_ptr< SvxMSDffShapeInfo > const &lhs, std::shared_ptr< SvxMSDffShapeInfo > const &rhs) const
bool operator()(std::shared_ptr< SvxMSDffShapeInfo > const &lhs, std::shared_ptr< SvxMSDffShapeInfo > const &rhs) const
const DffRecordHeader & rSpHd
tools::Rectangle aChildAnchor
tools::Rectangle aBoundRect
bool bRotateTextWithShape
std::unique_ptr< DffRecordList > pNext
DffRecordHeader mHd[DFF_RECORD_MANAGER_BUF_SIZE]
DffRecordList(DffRecordList *pList)
the following will be sorted by the order of their appearance:
SdrObject * pAObj
pPtr of object (corresponding to shape A)
ShapeFlag nSpFlagsA
SpFlags of shape A (the original mirror flags must be known when solving the Solver Container)
sal_uInt32 nShapeC
SPID of connector shape.
SdrObject * pBObj
pPtr of object (corresponding to shape B)
ShapeFlag nSpFlagsB
SpFlags of shape B.
sal_uInt32 ncptiB
Connection site Index of shape B.
sal_uInt32 nShapeA
SPID of shape A.
sal_uInt32 ncptiA
Connection site Index of shape A.
SdrObject * pCObj
pPtr of connector object
sal_uInt32 nShapeB
SPID of shape B.
sal_uInt32 nGroupShapeBooleanProperties
std::optional< sal_uInt32 > nXRelTo
sal_Int32 nDxWrapDistLeft
sal_Int32 nCropFromBottom
std::optional< tools::Polygon > pWrapPolygon
sal_Int32 nDxTextLeft
distance of text box from surrounding shape
sal_uInt32 nClientAnchorLen
int relativeHorizontalWidth
in 0.1% or -1 for none
sal_uInt32 nClientDataLen
std::unique_ptr< char[]> pClientDataBuffer
sal_uLong nNextShapeId
for linked text boxes
rtl::Reference< SdrObject > pObj
std::unique_ptr< char[]> pClientAnchorBuffer
std::optional< sal_uInt32 > nYRelTo
MSO_LineDashing eLineDashing
sal_Int32 nDxWrapDistRight
sal_Int32 nDyWrapDistBottom
MSO_LineStyle eLineStyle
border types
MSDffTxId aTextId
identifier for text boxes
bool bReplaceByFly
shape can be replaced by a frame in Writer
sal_uInt32 nShapeId
shape id, used in PLCF SPA and in mso_fbtSp (FSP)
SvxMSDffSolverContainer()
::std::vector< std::unique_ptr< SvxMSDffConnectorRule > > aCList
~SvxMSDffSolverContainer()
SvxMSDffHandle * pHandles
UNDERLYING_TYPE get() const
constexpr TypedWhichId< SdrCustomShapeGeometryItem > SDRATTR_CUSTOMSHAPE_GEOMETRY(SDRATTR_CUSTOMSHAPE_FIRST+2)
SVXCORE_DLLPUBLIC SdrTextObj * DynCastSdrTextObj(SdrObject *)
void RotatePoint(Point &rPnt, const Point &rRef, double sn, double cs)
SVXCORE_DLLPUBLIC FrPair GetMapFactor(MapUnit eS, MapUnit eD)
SVXCORE_DLLPUBLIC Degree100 NormAngle36000(Degree100 a)
SVXCORE_DLLPUBLIC tools::Long BigMulDiv(tools::Long nVal, tools::Long nMul, tools::Long nDiv)
void GetDefaultFonts(SvxFontItem &rLatin, SvxFontItem &rAsian, SvxFontItem &rComplex)
VCL_DLLPUBLIC bool WriteWindowMetafileBits(SvStream &rStream, const GDIMetaFile &rMTF)
std::vector< ISegmentProgressBarRef > aSegments
constexpr TypedWhichId< XFillColorItem > XATTR_FILLCOLOR(XATTR_FILL_FIRST+1)