37#include <com/sun/star/awt/FontFamily.hpp>
38#include <com/sun/star/awt/FontPitch.hpp>
39#include <com/sun/star/awt/Rectangle.hpp>
40#include <com/sun/star/awt/FontDescriptor.hpp>
41#include <com/sun/star/frame/XModel.hpp>
42#include <com/sun/star/style/TabStop.hpp>
43#include <com/sun/star/drawing/CircleKind.hpp>
44#include <com/sun/star/drawing/FillStyle.hpp>
45#include <com/sun/star/drawing/XShapes.hpp>
46#include <com/sun/star/beans/XPropertyState.hpp>
47#include <com/sun/star/drawing/XControlShape.hpp>
48#include <com/sun/star/embed/Aspects.hpp>
50#include <com/sun/star/text/XSimpleText.hpp>
51#include <com/sun/star/task/XStatusIndicator.hpp>
52#include <com/sun/star/table/XTable.hpp>
53#include <com/sun/star/table/XMergeableCell.hpp>
54#include <com/sun/star/table/BorderLine.hpp>
55#include <com/sun/star/table/XColumnRowRange.hpp>
56#include <com/sun/star/table/XCellRange.hpp>
63#define SYMBOL_CHARSET 2
70#define FF_DECORATIVE 0x50
72#define DEFAULT_PITCH 0x00
73#define FIXED_PITCH 0x01
75PPTExBulletProvider::PPTExBulletProvider()
80PPTExBulletProvider::~PPTExBulletProvider()
84sal_uInt16 PPTExBulletProvider::GetId(
Graphic const & rGraphic,
Size& rGraphicSize )
86 sal_uInt16 nRetValue = 0xffff;
90 Graphic aMappedGraphic, aGraphic(rGraphic);
92 Size aPrefSize( aGraphic.GetPrefSize() );
93 BitmapEx aBmpEx( aGraphic.GetBitmapEx() );
95 if ( rGraphicSize.
Width() && rGraphicSize.
Height() )
97 if (aPrefSize.IsEmpty())
99 aBmpEx.Scale(aPrefSize);
103 double fQ1 =
static_cast<double>(aPrefSize.Width()) /
static_cast<double>(aPrefSize.Height());
104 double fQ2 =
static_cast<double>(rGraphicSize.
Width()) /
static_cast<double>(rGraphicSize.
Height());
110 else if ( fQ1 < fQ2 )
113 if ( ( fXScale != 1.0 ) || ( fYScale != 1.0 ) )
115 aBmpEx.Scale( fXScale, fYScale );
116 rGraphicSize =
Size(
static_cast<sal_Int32
>(
static_cast<double>(rGraphicSize.
Width()) / fXScale + 0.5 ),
117 static_cast<sal_Int32
>(
static_cast<double>(rGraphicSize.
Height()) / fYScale + 0.5 ) );
119 aMappedGraphic =
Graphic( aBmpEx );
120 aGraphicObject.SetGraphic(aMappedGraphic);
124 sal_uInt32
nId = pGraphicProv->GetBlibID(aBuExPictureStream, aGraphicObject);
126 if ( nId && ( nId < 0x10000 ) )
127 nRetValue =
static_cast<sal_uInt16
>(
nId) - 1;
134 sal_uInt32 nSize = 28;
151 sal_uInt32 nSize = 111;
158 sal_Int32 nScaling = 85;
159 sal_Int32 nMasterCoordinate = 0xdda;
160 sal_Int32 nXOrigin = -780;
161 sal_Int32 nYOrigin = -84;
163 sal_Int32 nPosition1 = 0x870;
164 sal_Int32 nPosition2 = 0xb40;
170 nMasterCoordinate = 0xf0c;
200 sal_uInt32 nSize = 68;
218 sal_uInt32 nPictureStreamSize, nOutlineStreamSize, nSize = 8;
220 nPictureStreamSize = aBuExPictureStream.Tell();
221 if ( nPictureStreamSize )
222 nSize += nPictureStreamSize + 8;
224 nOutlineStreamSize = aBuExOutlineStream.Tell();
225 if ( nOutlineStreamSize )
226 nSize += nOutlineStreamSize + 8;
231 if ( nPictureStreamSize )
234 pStrm->
WriteBytes(aBuExPictureStream.GetData(), nPictureStreamSize);
236 if ( nOutlineStreamSize )
239 pStrm->
WriteBytes(aBuExOutlineStream.GetData(), nOutlineStreamSize);
247 sal_uInt32 nSize = 8 + 8 + 14;
255 if ( pStrm && pBinTagStrm )
257 sal_uInt32 nLen = pBinTagStrm->
Tell();
267 pStrm->
SeekRel( - (
static_cast<sal_Int32
>(nSize) - 4 ) );
276 sal_uInt32 nSize = 0;
277 if ( aBuExPictureStream.Tell() || aBuExOutlineStream.Tell() || pBinTagStrm )
287 pStrm->
SeekRel( - (
static_cast<sal_Int32
>(nSize) - 4 ) );
297 sal_uInt32 nSize = 8;
311 pStrm->
SeekRel( - (
static_cast<sal_Int32
>(nSize) - 4 ) );
340 std::u16string_view aStringVer0, std::u16string_view aStringVer1, std::u16string_view aStringVer2, std::u16string_view aStringVer3 )
344 OUString sBookmarkURL( rBookmarkURL );
350 if ( !aRelUrl.isEmpty() )
351 sBookmarkURL = aRelUrl;
358 sal_uInt32 nHyperSize, nHyperStart =
mpExEmbed->Tell();
362 .WriteUInt32( nHyperId );
369 nHyperSize =
mpExEmbed->Tell() - nHyperStart;
370 mpExEmbed->SeekRel( - (
static_cast<sal_Int32
>(nHyperSize) + 4 ) );
390 for ( nLev = 0; nLev < 5; nLev++ )
397 sal_uInt32 nExEmbedSize =
mpExEmbed->TellEnd();
404 + aTxMasterStyleAtomStrm.
Tell()
407 sal_uInt32 nBytesToInsert = nEnvironment + 8;
410 nBytesToInsert += nExEmbedSize + 8 + 12;
413 nBytesToInsert +=
mpPptEscherEx->DrawingGroupContainerSize();
423 mpStrm->WriteUInt16( 0xf )
425 .WriteUInt32( nExEmbedSize + 12 )
449 sal_Int32 nFontLen = pDesc->
Name.getLength();
452 for ( sal_Int32
n = 0;
n < 32;
n++ )
456 nUniCode = pDesc->
Name[
n];
457 mpStrm->WriteUInt16( nUniCode );
464 if ( pDesc->
CharSet == RTL_TEXTENCODING_SYMBOL )
469 case css::awt::FontFamily::ROMAN :
473 case css::awt::FontFamily::SWISS :
477 case css::awt::FontFamily::MODERN :
481 case css::awt::FontFamily::SCRIPT:
485 case css::awt::FontFamily::DECORATIVE:
493 switch( pDesc->
Pitch )
495 case css::awt::FontPitch::FIXED:
503 mpStrm->WriteUChar( lfCharSet )
504 .WriteUChar( lfClipPrecision )
505 .WriteUChar( lfQuality )
506 .WriteUChar( lfPitchAndFamily );
516 mpStrm->WriteBytes(aTxMasterStyleAtomStrm.
GetData(), aTxMasterStyleAtomStrm.
Tell());
534 const css::uno::Reference< css::beans::XPropertySet > & rXPropSet,
535 const OUString& rString,
536 bool bTestPropertyAvailability )
538 bool bRetValue =
true;
539 if ( bTestPropertyAvailability )
544 css::uno::Reference< css::beans::XPropertySetInfo > aXPropSetInfo( rXPropSet->getPropertySetInfo() );
545 if ( aXPropSetInfo.is() )
546 bRetValue = aXPropSetInfo->hasPropertyByName( rString );
548 catch( css::uno::Exception& )
557 rAny = rXPropSet->getPropertyValue( rString );
558 if ( !rAny.hasValue() )
561 catch( css::uno::Exception& )
570 const css::uno::Reference< css::beans::XPropertySet > & rXPropSet,
571 const OUString& rPropertyName )
573 css::beans::PropertyState eRetValue = css::beans::PropertyState_AMBIGUOUS_VALUE;
576 css::uno::Reference< css::beans::XPropertyState > aXPropState( rXPropSet, css::uno::UNO_QUERY );
577 if ( aXPropState.is() )
578 eRetValue = aXPropState->getPropertyState( rPropertyName );
580 catch( css::uno::Exception& )
599 ePropState = css::beans::PropertyState_AMBIGUOUS_VALUE;
600 bool bRetValue =
true;
602 css::uno::Reference< css::beans::XPropertySetInfo >
603 aXPropSetInfo(
mXPropSet->getPropertySetInfo() );
604 if ( !aXPropSetInfo.is() )
610 if ( !
mAny.hasValue() )
612 else if ( bGetPropertyState )
615 ePropState = css::beans::PropertyState_DIRECT_VALUE;
617 catch( css::uno::Exception& )
626 bool bFirstParagraph =
true;
627 sal_uInt32 nCharCount;
629 sal_Int16 nLineSpacing;
632 for ( sal_uInt32
i = 0;
i < rTextObj.
ParagraphCount(); ++
i, bFirstParagraph = false )
638 if ( ( pPara->
meTextAdjust == css::beans::PropertyState_DIRECT_VALUE ) ||
644 sal_Int16 nNormalSpacing = 100;
649 nNormalSpacing =
static_cast<sal_Int16
>( fN + 0.5 );
653 nLineSpacing = nNormalSpacing;
658 if ( nLineSpacing > 0 )
661 nLineSpacing =
static_cast<sal_Int16
>(
static_cast<double>(nLineSpacing) * pDesc->
Scaling + 0.5 );
666 nLineSpacing = nNormalSpacing;
670 if ( ( pPara->
meLineSpacing == css::beans::PropertyState_DIRECT_VALUE ) ||
674 if ( ( pPara->
meLineSpacingTop == css::beans::PropertyState_DIRECT_VALUE ) ||
680 if ( ( pPara->
meForbiddenRules == css::beans::PropertyState_DIRECT_VALUE ) ||
686 if ( ( pPara->
meBiDi == css::beans::PropertyState_DIRECT_VALUE ) ||
725 if ( nBulletColor == sal_uInt32(
COL_AUTO) )
727 bool bIsDark =
false;
731 nBulletColor = bIsDark ? 0xffffff : 0x000000;
733 nBulletColor &= 0xffffff;
734 nBulletColor |= 0xfe000000;
751 sal_uInt16 nAsianSettings = 0;
771 for ( std::vector<std::unique_ptr<PortionObj> >::const_iterator it = pPara->
begin(); it != pPara->
end(); ++it )
778 if ( nCharColor == sal_uInt32(
COL_AUTO) )
780 bool bIsDark =
false;
784 nCharColor = bIsDark ? 0xffffff : 0x000000;
787 nCharColor &= 0xffffff;
791 if ( nCharAttr & 0x200 )
793 sal_uInt32 nBackgroundColor = 0xffffff;
796 nCharColor = 0xffffff;
799 css::drawing::FillStyle aFS( css::drawing::FillStyle_NONE );
804 case css::drawing::FillStyle_GRADIENT :
812 case css::drawing::FillStyle_SOLID :
818 case css::drawing::FillStyle_NONE :
820 css::uno::Any aBackAny;
821 css::drawing::FillStyle aBackFS( css::drawing::FillStyle_NONE );
823 aBackAny >>= aBackFS;
826 case css::drawing::FillStyle_GRADIENT :
834 case css::drawing::FillStyle_SOLID :
849 sal_Int32 nB = nBackgroundColor & 0xff;
850 nB +=
static_cast<sal_uInt8>( nBackgroundColor >> 8 );
851 nB +=
static_cast<sal_uInt8>( nBackgroundColor >> 16 );
853 if ( nB < 0x60 || ( nBackgroundColor != nCharColor ) )
863 if( aGroupedShape.is() )
865 css::uno::Reference< css::beans::XPropertySet > aPropSetOfNextShape
866 ( aGroupedShape, css::uno::UNO_QUERY );
867 if ( aPropSetOfNextShape.is() )
870 "FillColor",
true ) )
882 nCharColor |= 0xfe000000;
883 if ( nInstance == 4 )
901 nCharAttr |= (
i & 0x3f ) << 10;
903 if ( ( rPortion.
meFontName == css::beans::PropertyState_DIRECT_VALUE ) ||
909 if ( ( rPortion.
meCharHeight == css::beans::PropertyState_DIRECT_VALUE ) ||
912 if ( ( rPortion.
meCharColor == css::beans::PropertyState_DIRECT_VALUE ) ||
915 if ( ( rPortion.
meCharEscapement == css::beans::PropertyState_DIRECT_VALUE ) ||
919 sal_uInt32 nCharCount = rPortion.
Count();
966 double fCos = cos( basegfx::deg2rad<100>(
mnAngle) );
967 double fSin = sin( basegfx::deg2rad<100>(
mnAngle) );
972 double fXDiff = fCos * fWidthHalf + fSin * (-fHeightHalf);
973 double fYDiff = - ( fSin * fWidthHalf - fCos * ( -fHeightHalf ) );
975 maRect.
Move(
static_cast<sal_Int32
>( -( fWidthHalf - fXDiff ) ),
static_cast<sal_Int32
>( - ( fHeightHalf + fYDiff ) ) );
986 css::awt::Point aTopLeft(
static_cast<sal_Int32
>(
maRect.
Left() + fWidthHalf - fHeightHalf ),
static_cast<sal_Int32
>(
maRect.
Top() + fHeightHalf - fWidthHalf ) );
989 const Size aNewSize(nRotatedWidth, nRotatedHeight);
1003 if ( pPara->
empty() )
1010 nLineSpacing =
static_cast<sal_Int16
>(
static_cast<double>(nLineSpacing) * pDesc->
Scaling + 0.5 );
1012 if ( ( nLineSpacing > 0 ) && ( nLineSpacing < 100 ) )
1014 double fCharHeight = convertPointToMm100<double>(rPortion.
mnCharHeight);
1015 fCharHeight *= 100 - nLineSpacing;
1018 sal_uInt32 nUpperDistance = 0;
1020 nUpperDistance +=
static_cast< sal_uInt32
>( fCharHeight * 360.0 );
1044 aTextObj.
Write( &rOut );
1046 if ( pPropOpt &&
mType !=
"drawing.Table" )
1049 sal_uInt32 nSize,
nPos = rOut.
Tell();
1055 rOut.
SeekRel( - (
static_cast<sal_Int32
>(nSize) - 4 ) );
1062 for ( std::vector<std::unique_ptr<PortionObj> >::const_iterator it = pPara->
begin(); it != pPara->
end(); ++it )
1088 sal_uInt32 nPageIndex = 0;
1090 OUString aFile( pFieldEntry->
aFieldUrl );
1091 OUString aTarget( pFieldEntry->
aFieldUrl );
1095 else if ( INetProtocol::Smb == aUrl.
GetProtocol() )
1099 aFile = aFile.replaceAll(
"/",
"\\" );
1102 else if ( pFieldEntry->
aFieldUrl.startsWith(
"#") )
1105 aPage = aPage.copy( 1 );
1107 std::vector<OUString>::const_iterator pIter = std::find(
1113 aPageUrl = OUString::number(256 + nPageIndex) +
1115 OUString::number(nPageIndex + 1) +
1117 OUString::number(nPageIndex + 1);
1120 sal_uInt32 nHyperId(0);
1121 if ( !aPageUrl.isEmpty() )
1172 sal_uInt32 nParaFlags = 0x1f;
1173 sal_Int16 nMask, nNumberingRule[ 10 ];
1174 const sal_uInt32 nTabs = pPara->
maTabStop.getLength();
1175 const auto& rTabStops = pPara->
maTabStop;
1182 nMask = 1 << pPara->
nDepth;
1183 if ( nParaFlags & nMask )
1185 nParaFlags &=~ nMask;
1189 nParaFlags |= nMask << 16;
1191 nNumberingRule[ ( pPara->
nDepth << 1 ) + 1 ] =
static_cast<sal_Int16
>(pPara->
nBulletOfs);
1198 sal_Int32 nDefaultTabSizeSrc = 2011;
1199 const uno::Reference< beans::XPropertySet > xPropSet(
mXModel, uno::UNO_QUERY );
1200 if ( xPropSet.is() )
1204 sal_Int32 nTabStop( 0 );
1205 if (
mAny >>= nTabStop )
1206 nDefaultTabSizeSrc = nTabStop;
1209 const sal_uInt32 nDefaultTabSize =
MapSize( awt::Size( nDefaultTabSizeSrc, 1 ) ).Width;
1210 sal_uInt32 nDefaultTabs = std::abs(
maRect.
GetWidth() ) / nDefaultTabSize;
1213 if (
static_cast<sal_Int32
>(nDefaultTabs) < 0 )
1216 sal_uInt32 nTabCount = nTabs + nDefaultTabs;
1217 sal_uInt32
i, nTextRulerAtomFlags = 0;
1220 nTextRulerAtomFlags |= 4;
1222 nTextRulerAtomFlags |= ( ( nParaFlags << 3 ) | ( nParaFlags << 8 ) );
1224 if ( nTextRulerAtomFlags )
1230 pRuleOut = pTextRule->
pOut.get();
1233 sal_uInt32 nRulePos = pRuleOut->
Tell();
1236 if ( nTextRulerAtomFlags & 4 )
1239 for (
const css::style::TabStop& rTabStop : rTabStops )
1243 switch ( rTabStop.Alignment )
1245 case css::style::TabAlign_DECIMAL :
nType = 3;
break;
1246 case css::style::TabAlign_RIGHT :
nType = 2;
break;
1247 case css::style::TabAlign_CENTER :
nType = 1;
break;
1249 case css::style::TabAlign_LEFT :
1256 sal_uInt32 nWidth = 1;
1259 nWidth *= nDefaultTabSize;
1260 for (
i = 0;
i < nDefaultTabs;
i++, nWidth += nDefaultTabSize )
1263 for (
i = 0;
i < 5;
i++ )
1265 if ( nTextRulerAtomFlags & ( 8 <<
i ) )
1267 if ( nTextRulerAtomFlags & ( 256 <<
i ) )
1268 pRuleOut->
WriteInt16( nNumberingRule[ (
i << 1 ) + 1 ] );
1270 sal_uInt32 nBufSize = pRuleOut->
Tell() - nRulePos;
1271 pRuleOut->
SeekRel( - (
static_cast<sal_Int32
>(nBufSize) - 4 ) );
1273 pRuleOut->
SeekRel( nBufSize - 8 );
1282 sal_uInt32 nNumberingType = 0, nPos2 = rExtBuStr.
Tell();
1289 sal_uInt32 nBulletFlags = 0;
1290 sal_uInt16 nBulletId = pBulletPara->
nBulletId;
1294 nBulletFlags = 0x800000;
1296 nBulletFlags = 0x3000000;
1300 if ( nBulletFlags & 0x800000 )
1302 if ( nBulletFlags & 0x1000000 )
1332 if ( nBulletFlags & 0x2000000 )
1336 sal_uInt32 nBulletSize = ( rExtBuStr.
Tell() - nPos2 ) - 8;
1337 rExtBuStr.
SeekRel( - (
static_cast<sal_Int32
>(nBulletSize) + 4 ) );
1339 rExtBuStr.
SeekRel( nBulletSize );
1344 sal_uInt32 nSoundRef = 0;
1345 sal_uInt32 nHyperLinkID = 0;
1377 if ( bMediaClickAction )
1381 case css::presentation::ClickAction_STOPPRESENTATION :
1384 case css::presentation::ClickAction_LASTPAGE :
1387 case css::presentation::ClickAction_FIRSTPAGE :
1390 case css::presentation::ClickAction_PREVPAGE :
1393 case css::presentation::ClickAction_NEXTPAGE :
1399 case css::presentation::ClickAction_SOUND :
1405 case css::presentation::ClickAction_PROGRAM :
1419 case css::presentation::ClickAction_BOOKMARK :
1423 OUString aBookmark( *o3tl::doAccess<OUString>(
mAny) );
1427 if ( rSlideName == aBookmark )
1433 OUString aHyperString = OUString::number(256 +
nIndex) +
1435 OUString::number(
nIndex + 1) +
1437 OUString::number(
nIndex + 1);
1446 case css::presentation::ClickAction_DOCUMENT :
1450 OUString aBookmark( *o3tl::doAccess<OUString>(
mAny) );
1451 if ( !aBookmark.isEmpty() )
1456 OUString aBookmarkFile( aBookmark );
1460 nHyperLinkID =
ImplInsertBookmarkURL( aBookmark, sal_uInt32(2 | ( 1U << 31 )), aBookmarkFile, aBookmark,
u"",
u"" );
1466 case css::presentation::ClickAction_INVISIBLE :
1467 case css::presentation::ClickAction_VERB :
1468 case css::presentation::ClickAction_VANISH :
1469 case css::presentation::ClickAction_MACRO :
1474 sal_uInt32 nContainerSize = 24;
1476 nContainerSize += ( aFile.getLength() * 2 ) + 8;
1489 sal_Int32 nLen = aFile.getLength();
1491 for ( sal_Int32
i = 0;
i < nLen;
i++ )
1501 css::presentation::AnimationEffect& eEffect,
1502 css::presentation::AnimationEffect& eTextEffect,
1509 eEffect = css::presentation::AnimationEffect_NONE;
1512 aAny >>= eTextEffect;
1514 eTextEffect = css::presentation::AnimationEffect_NONE;
1520 bool bHasEffect = ( ( eEffect != css::presentation::AnimationEffect_NONE )
1521 || ( eTextEffect != css::presentation::AnimationEffect_NONE )
1527 const sal_uInt32 nStyleInstance,
const sal_uInt8 nPlaceHolderId )
1530 if ( bRet && bMasterPage )
1535 ShapeFlag::HaveAnchor | ShapeFlag::HaveShapeProperty, nPresShapeID );
1545 sal_uInt32 nLineFlags = 0x90001;
1547 nLineFlags |= 0x10001;
1563 .WriteUChar( nPlaceHolderId )
1568 if ( aClientTextBox.
Tell() )
1571 .WriteUInt32( aClientTextBox.
Tell() );
1608 sal_uInt32 nGroups, nShapes, nShapeCount, nPer, nLastPer, nIndices, nOlePictureId;
1609 css::awt::Point aTextRefPoint;
1614 nIndices = nLastPer = nShapeCount = 0;
1616 bool bIsTitlePossible =
true;
1618 sal_uInt32 nOutlinerCount = 0;
1619 sal_uInt32 nPrevTextStyle = 0;
1623 bool bAdditionalText =
false;
1625 bool bSecOutl =
false;
1626 sal_uInt32 nPObjects = 0;
1628 std::unique_ptr<SvMemoryStream> pClientTextBox;
1629 std::unique_ptr<SvMemoryStream> pClientData;
1635 nPer = ( 5 * nShapeCount ) / nShapes;
1636 if ( nPer != nLastPer )
1654 bool bMediaClickAction =
false;
1655 css::presentation::AnimationEffect eAe;
1656 css::presentation::AnimationEffect eTe;
1659 css::presentation::ClickAction eCa = css::presentation::ClickAction_NONE;
1663 bool bGroup =
mType ==
"drawing.Group";
1664 bool bOpenBezier =
mType ==
"drawing.OpenBezier";
1665 bool bClosedBezier =
mType ==
"drawing.ClosedBezier";
1666 bool bPolyPolygon =
mType ==
"drawing.PolyPolygon";
1667 bool bPolyLine =
mType ==
"drawing.PolyLine";
1668 OUString aGraphicPropertyName(
"Graphic");
1670 const css::awt::Size aSize100thmm(
mXShape->getSize() );
1671 const css::awt::Point aPoint100thmm(
mXShape->getPosition() );
1677 css::uno::Reference< css::container::XIndexAccess >
1678 aXIndexAccess(
mXShape, css::uno::UNO_QUERY );
1681 std::unique_ptr<SvMemoryStream> pTmp;
1682 if ( eCa != css::presentation::ClickAction_NONE )
1693 bool bIsFontwork =
false;
1694 bool bIsHatching =
false;
1697 aAny >>= bIsFontwork;
1700 css::drawing::FillStyle eFS;
1702 bIsHatching = eFS == css::drawing::FillStyle_HATCH;
1703 if (
mType ==
"drawing.Custom" && eFS == drawing::FillStyle_BITMAP)
1706 OUString sCustomShapeType;
1708 mXShape, nMirrorFlags, sCustomShapeType);
1713 mType =
"drawing.GraphicObject";
1714 aGraphicPropertyName =
"Bitmap";
1718 if ( bIsHatching || bIsFontwork || (
mType ==
"drawing.Measure" ) || (
mType ==
"drawing.Caption" ) )
1722 auto aRect = o3tl::doAccess<css::awt::Rectangle>(
mAny);
1724 maSize =
MapSize( css::awt::Size( aRect->Width, aRect->Height ) );
1727 mType =
"drawing.dontknow";
1735 if (
mType ==
"drawing.Custom" )
1739 OUString sCustomShapeType;
1741 if ( sCustomShapeType ==
"col-502ad400" || sCustomShapeType ==
"col-60da8460" )
1744 ShapeFlag::HaveAnchor | ShapeFlag::HaveShapeProperty,
1763 nMirrorFlags | ShapeFlag::HaveAnchor | ShapeFlag::HaveShapeProperty,
1777 else if (
mType ==
"drawing.Rectangle" )
1779 sal_Int32 nRadius = 0;
1784 nRadius =
MapSize( css::awt::Size( nRadius, 0 ) ).Width;
1789 ShapeFlag::HaveAnchor | ShapeFlag::HaveShapeProperty,
1800 nRadius = ( 0x2a30 * nRadius ) /
nLength;
1809 ShapeFlag::HaveAnchor | ShapeFlag::HaveShapeProperty,
1819 else if (
mType ==
"drawing.Ellipse" )
1821 css::drawing::CircleKind eCircleKind( css::drawing::CircleKind_FULL );
1825 mAny >>= eCircleKind;
1826 switch ( eCircleKind )
1828 case css::drawing::CircleKind_SECTION :
1830 ePolyKind = PolyStyle::Pie;
1833 case css::drawing::CircleKind_ARC :
1835 ePolyKind = PolyStyle::Arc;
1839 case css::drawing::CircleKind_CUT :
1841 ePolyKind = PolyStyle::Chord;
1846 eCircleKind = css::drawing::CircleKind_FULL;
1849 if ( eCircleKind == css::drawing::CircleKind_FULL )
1853 ShapeFlag::HaveAnchor | ShapeFlag::HaveShapeProperty,
1864 sal_Int32 nStartAngle, nEndAngle;
1867 nStartAngle = *o3tl::doAccess<sal_Int32>(
mAny);
1870 nEndAngle = *o3tl::doAccess<sal_Int32>(
mAny);
1871 css::awt::Point aPoint(
mXShape->getPosition() );
1872 css::awt::Size aSize(
mXShape->getSize() );
1873 css::awt::Point aStart, aEnd, aCenter;
1875 aStart.X =
static_cast<sal_Int32
>( cos( basegfx::deg2rad<100>(nStartAngle) ) * 100.0 );
1876 aStart.Y = -
static_cast<sal_Int32
>( sin( basegfx::deg2rad<100>(nStartAngle) ) * 100.0 );
1877 aEnd.X =
static_cast<sal_Int32
>( cos( basegfx::deg2rad<100>(nEndAngle) ) * 100.0 );
1878 aEnd.Y = -
static_cast<sal_Int32
>( sin( basegfx::deg2rad<100>(nEndAngle) ) * 100.0 );
1879 aCenter.X = aPoint.X + ( aSize.Width / 2 );
1880 aCenter.Y = aPoint.Y + ( aSize.Height / 2 );
1881 aStart.X += aCenter.X;
1882 aStart.Y += aCenter.Y;
1883 aEnd.X += aCenter.X;
1884 aEnd.Y += aCenter.Y;
1886 bool bNeedText =
true;
1896 bAdditionalText =
true;
1903 ShapeFlag::HaveAnchor | ShapeFlag::HaveShapeProperty,
1905 css::awt::Rectangle aNewRect;
1906 switch ( ePolyKind )
1908 case PolyStyle::Pie :
1909 case PolyStyle::Chord :
1916 case PolyStyle::Arc :
1933 else if (
mType ==
"drawing.Control" )
1935 css::uno::Reference< css::drawing::XControlShape > aXControlShape(
mXShape, css::uno::UNO_QUERY );
1936 if ( !aXControlShape.is() )
1938 css::uno::Reference< css::awt::XControlModel > aXControlModel( aXControlShape->getControl() );
1939 if ( !aXControlModel.is() )
1942 sal_Int64 nAspect = css::embed::Aspects::MSOLE_CONTENT;
1946 css::uno::Reference< css::beans::XPropertySet > xShapeProps(
mXShape, css::uno::UNO_QUERY_THROW );
1947 xShapeProps->getPropertyValue(
"Aspect") >>= nAspect;
1949 catch( css::uno::Exception& )
1955 sal_uInt32 nSize, nOldPos =
mpExEmbed->Tell();
1957 sal_uInt32
nPageId = nPageNumber;
1958 if ( ePageType ==
MASTER )
1966 pEntry->xControlModel = aXControlModel;
1974 .WriteUInt32( nAspect )
1979 .WriteUInt32( 0x0012de00 );
1981 css::awt::Size aSize;
1982 OUString aControlName;
1986 OUString aUserName( xTemp->GetUserName() );
1987 OUString aOleIdentifier;
1988 if ( !aUserName.isEmpty() )
1992 StreamMode::READ | StreamMode::NOCREATE | StreamMode::SHARE_DENYALL );
1993 sal_uInt32
const nStreamLen = xCompObj->remainingSize();
1995 sal_Int32 nWinVersion, nVal, nStringLen;
1997 .ReadInt16( nByteOrder )
1998 .ReadInt32( nWinVersion )
2000 xCompObj->SeekRel( 16 );
2001 xCompObj->ReadInt32( nStringLen );
2002 if ( ( xCompObj->Tell() + nStringLen ) < nStreamLen )
2004 xCompObj->SeekRel( nStringLen );
2005 xCompObj->ReadInt32( nStringLen );
2006 if ( ( xCompObj->Tell() + nStringLen ) < nStreamLen )
2008 xCompObj->SeekRel( nStringLen );
2009 xCompObj->ReadInt32( nStringLen );
2010 if ( ( nStringLen > 1 ) && ( ( xCompObj->Tell() + nStringLen ) < nStreamLen ) )
2013 aOleIdentifier = OStringToOUString(aTemp, RTL_TEXTENCODING_MS_1252);
2030 ShapeFlag const nSpFlags = ShapeFlag::HaveShapeProperty | ShapeFlag::HaveAnchor | ShapeFlag::OLEShape;
2040 if ( !aControlName.isEmpty() )
2045 else if (
mType ==
"drawing.Connector" )
2049 css::awt::Rectangle aNewRect;
2063 else if (
mType ==
"drawing.Measure" )
2067 else if (
mType ==
"drawing.Line" )
2069 css::awt::Rectangle aNewRect;
2078 bAdditionalText =
true;
2083 ShapeFlag nFlags = ShapeFlag::HaveAnchor | ShapeFlag::HaveShapeProperty;
2086 nFlags |= ShapeFlag::FlipV;
2088 nFlags |= ShapeFlag::FlipH;
2095 else if ( bPolyPolygon )
2102 bAdditionalText =
true;
2107 ShapeFlag::HaveAnchor | ShapeFlag::HaveShapeProperty,
2109 css::awt::Rectangle aNewRect;
2117 else if ( bPolyLine )
2124 bAdditionalText =
true;
2129 ShapeFlag::HaveAnchor | ShapeFlag::HaveShapeProperty,
2131 css::awt::Rectangle aNewRect;
2139 else if ( bOpenBezier )
2146 bAdditionalText =
true;
2151 ShapeFlag::HaveAnchor | ShapeFlag::HaveShapeProperty,
2153 css::awt::Rectangle aNewRect;
2161 else if ( bClosedBezier )
2168 bAdditionalText =
true;
2173 ShapeFlag::HaveAnchor | ShapeFlag::HaveShapeProperty,
2175 css::awt::Rectangle aNewRect;
2183 else if ( (
mType ==
"drawing.GraphicObject" ) || (
mType ==
"presentation.GraphicObject" ) )
2211 ShapeFlag::HaveAnchor | ShapeFlag::HaveShapeProperty,
2230 ShapeFlag::HaveAnchor | ShapeFlag::HaveShapeProperty,
2241 else if ( (
mType ==
"drawing.Text" ) || (
mType ==
"presentation.Notes" ) )
2252 else if (
mType ==
"presentation.TitleText" )
2266 bIsTitlePossible =
false;
2270 if ( ePageType ==
MASTER )
2274 OUString aUString(
mXText->getString() );
2280 ShapeFlag::HaveAnchor | ShapeFlag::HaveShapeProperty,
2291 sal_uInt32 nLineFlags = 0x90001;
2293 nLineFlags |= 0x10001;
2315 nChar = pString[
i ];
2318 mpStrm->WriteUInt16( nChar );
2335 ShapeFlag::HaveAnchor | ShapeFlag::HaveMaster,
2344 sal_uInt32 nNoLineDrawDash = 0;
2346 nNoLineDrawDash |= 0x10001;
2356 mType =
"drawing.Text";
2360 else if ( (
mType ==
"presentation.Outliner" ) || (
mType ==
"presentation.Subtitle" ) )
2371 if ( ePageType ==
MASTER )
2379 ShapeFlag::HaveAnchor | ShapeFlag::HaveShapeProperty,
2390 sal_uInt32 nLineFlags = 0x90001;
2392 nLineFlags |= 0x10001;
2404 .WriteUChar( PlaceHolderID )
2410 if (
mType ==
"presentation.Subtitle")
2421 .WriteUInt16( pPara->
nDepth );
2438 ShapeFlag::HaveAnchor | ShapeFlag::HaveMaster,
2447 sal_uInt32 nNoLineDrawDash = 0;
2449 nNoLineDrawDash |= 0x10001;
2459 if (ePageType ==
MASTER )
2466 mType =
"drawing.Text";
2470 else if ( (
mType ==
"drawing.Page" ) || (
mType ==
"presentation.Page" ) )
2481 else if (
mType ==
"drawing.Frame" )
2485 else if ( (
mType ==
"drawing.OLE2" ) || (
mType ==
"presentation.OLE2" )
2486 || (
mType ==
"presentation.Chart" ) || (
mType ==
"presentation.Calc" )
2487 || (
mType ==
"presentation.OrgChart" ) )
2494 ShapeFlag::HaveAnchor | ShapeFlag::HaveMaster,
2507 sal_uInt32 nSize, nOldPos =
mpExEmbed->Tell();
2525 sal_Int64 nAspect = css::embed::Aspects::MSOLE_CONTENT;
2529 css::uno::Reference< css::beans::XPropertySet > xShapeProps(
mXShape, css::uno::UNO_QUERY_THROW );
2530 xShapeProps->getPropertyValue(
"Aspect") >>= nAspect;
2532 catch( css::uno::Exception& )
2537 .WriteUInt32( nAspect )
2542 .WriteUInt32( 0x0012b600 );
2550 ShapeFlag nSpFlags = ShapeFlag::HaveAnchor | ShapeFlag::HaveShapeProperty;
2551 if ( nOlePictureId )
2552 nSpFlags |= ShapeFlag::OLEShape;
2556 if ( nOlePictureId )
2560 else if (
mType ==
"presentation.Header" )
2567 mType =
"drawing.Text";
2571 else if (
mType ==
"presentation.Footer" )
2578 mType =
"drawing.Text";
2582 else if (
mType ==
"presentation.DateTime" )
2589 mType =
"drawing.Text";
2593 else if (
mType ==
"presentation.SlideNumber" )
2600 mType =
"drawing.Text";
2604 else if ( (
mType.getLength() > 9) && (
mType[8] ==
'3') && (
mType[9] ==
'D') )
2612 ShapeFlag::HaveAnchor | ShapeFlag::HaveShapeProperty,
2618 else if (
mType ==
"drawing.Media" )
2623 ShapeFlag::HaveAnchor | ShapeFlag::HaveShapeProperty,
2631 if ( (aAny >>= aMediaURL ) && !aMediaURL.isEmpty() )
2639 sal_uInt32 nSize, nStart =
mpExEmbed->Tell();
2643 .WriteUInt32( nRefId );
2651 .WriteUInt32( nRefId )
2653 .WriteUInt16( 0x435 );
2655 sal_uInt16
i, nStringLen =
static_cast<sal_uInt16
>(aMediaURL.getLength());
2657 for (
i = 0;
i < nStringLen;
i++ )
2663 mpExEmbed->SeekRel( - (
static_cast<sal_Int32
>(nSize) + 4 ) );
2672 pClientData->WriteUInt16( 0 )
2675 .WriteUInt32( nRefId );
2678 pClientData->WriteUInt16( 0 )
2691 else if ( (
mType ==
"drawing.Table") || (
mType ==
"presentation.Table") )
2693 if ( eCa != css::presentation::ClickAction_NONE )
2701 else if (
mType ==
"drawing.dontknow" )
2706 ShapeFlag::HaveAnchor | ShapeFlag::HaveShapeProperty,
2716 bool bClientData = ( bEffect || ( eCa != css::presentation::ClickAction_NONE ) ||
2717 nPlaceHolderAtom || nOlePictureId );
2720 if ( nPlaceHolderAtom )
2722 sal_Int32 nPlacementID = -1;
2724 nPlacementID = nIndices++;
2727 switch ( nPlaceHolderAtom )
2731 if ( nPlaceHolderAtom < 19 )
2739 nPlacementID = nIndices++;
2746 .WriteInt32( nPlacementID )
2747 .WriteUChar( nPlaceHolderAtom )
2751 if ( nOlePictureId )
2757 .WriteUInt32( nOlePictureId );
2760 if ( bEffect && !pClientData )
2765 if ( eCa != css::presentation::ClickAction_NONE )
2774 if ( !pClientTextBox )
2779 if ( ( ePageType ==
NORMAL ) && !bMasterPage )
2786 else if (
mType ==
"presentation.Subtitle" )
2801 pClientTextBox->WriteBytes(
pOut->GetData(),
pOut->Tell());
2802 aTextRule.
pOut.reset();
2804 if ( aExtBu.
Tell() )
2825 if ( !pClientTextBox )
2830 if ( aExtBu.
Tell() )
2837 else if ( nPlaceHolderAtom >= 19 )
2839 if ( !pClientTextBox )
2862 .WriteUInt32( pClientData->Tell() );
2864 mpStrm->WriteBytes(pClientData->GetData(), pClientData->Tell());
2865 pClientData.reset();
2867 if ( pClientTextBox )
2870 .WriteUInt32( pClientTextBox->Tell() );
2872 mpStrm->WriteBytes(pClientTextBox->GetData(), pClientTextBox->Tell());
2873 pClientTextBox.reset();
2879 if ( bAdditionalText )
2881 bAdditionalText =
false;
2887 ? *o3tl::doAccess<sal_Int32>(aAny)
2892 if (
mType ==
"drawing.Line" )
2896 Point(
static_cast<sal_Int32
>( aTextRefPoint.X + fDist ), aTextRefPoint.Y - 1 ) );
2921 if ( !pClientTextBox )
2935 .WriteUInt32( pClientTextBox->Tell() );
2937 mpStrm->WriteBytes(pClientTextBox->GetData(), pClientTextBox->Tell());
2938 pClientTextBox.reset();
2972 ShapeFlag::HaveAnchor | ShapeFlag::HaveShapeProperty | ShapeFlag::Child,
2978 sal_uInt32 nBorderColor = pCellBorder->
maCellBorder.Color & 0xff00;
2987 mpStrm ->WriteInt32( nX1 )
3000 std::vector< std::pair< sal_Int32, sal_Int32 > >& aColumns,
3001 uno::Reference< table::XMergeableCell >
const & xCell )
3003 sal_Int32 nRight = aColumns[ nColumn ].first + aColumns[ nColumn ].second;
3004 for ( sal_Int32 nColumnSpan = 1; nColumnSpan < xCell->getColumnSpan(); nColumnSpan++ )
3006 sal_uInt32 nC = nColumnSpan + nColumn;
3007 if ( nC < aColumns.size() )
3008 nRight += aColumns[ nC ].second;
3010 nRight = rect.
Right();
3017 std::vector< std::pair< sal_Int32, sal_Int32 > >& aRows,
3018 uno::Reference< table::XMergeableCell >
const & xCell )
3020 sal_Int32 nBottom = aRows[nRow].first + aRows[nRow].second;
3021 for ( sal_Int32 nRowSpan = 1; nRowSpan < xCell->getRowSpan(); nRowSpan++ )
3023 sal_uInt32 nR = nRowSpan + nRow;
3024 if ( nR < aRows.size() )
3025 nBottom += aRows[ nR ].second;
3034 sal_Int32 nLen = aString.size();
3039 for ( sal_Int32
i = 0;
i < nLen;
i++ )
3051 ContainerGuard(
PptEscherEx* pPptEscherEx, sal_uInt16 nRecord)
3052 : m_pPptEscherEx(pPptEscherEx)
3069 uno::Reference< table::XTable > xTable;
3070 if (
mXPropSet->getPropertyValue(
"Model" ) >>= xTable )
3072 uno::Reference< table::XColumnRowRange > xColumnRowRange( xTable, uno::UNO_QUERY_THROW );
3073 uno::Reference< container::XIndexAccess > xColumns( xColumnRowRange->getColumns(), uno::UNO_QUERY_THROW );
3074 uno::Reference< container::XIndexAccess > xRows( xColumnRowRange->getRows(), uno::UNO_QUERY_THROW );
3075 sal_uInt16 nRowCount =
static_cast< sal_uInt16
>( xRows->getCount() );
3076 sal_uInt16 nColumnCount =
static_cast< sal_uInt16
>( xColumns->getCount() );
3078 std::vector< std::pair< sal_Int32, sal_Int32 > > aColumns;
3079 std::vector< std::pair< sal_Int32, sal_Int32 > > aRows;
3081 awt::Point aPosition(
MapPoint( rXShape->getPosition() ) );
3082 sal_Int32 nPosition = aPosition.X;
3083 for ( sal_Int32
x = 0;
x < nColumnCount;
x++ )
3085 uno::Reference< beans::XPropertySet > xPropSet( xColumns->getByIndex(
x ), uno::UNO_QUERY_THROW );
3086 awt::Size aS( 0, 0 );
3087 xPropSet->getPropertyValue(
"Width" ) >>= aS.Width;
3088 awt::Size aM(
MapSize( aS ) );
3089 aColumns.emplace_back( nPosition, aM.Width );
3090 nPosition += aM.Width;
3091 if (
x == nColumnCount - 1 && nPosition !=
maRect.
Right() )
3095 nPosition = aPosition.Y;
3096 for ( sal_Int32
y = 0;
y < nRowCount;
y++ )
3098 uno::Reference< beans::XPropertySet > xPropSet( xRows->getByIndex(
y ), uno::UNO_QUERY_THROW );
3099 awt::Size aS( 0, 0 );
3100 xPropSet->getPropertyValue(
"Height" ) >>= aS.Height;
3101 awt::Size aM(
MapSize( aS ) );
3102 aRows.emplace_back( nPosition, aM.Height );
3103 nPosition += aM.Height;
3118 aSolverContainer.
AddShape( rXShape, nShapeId );
3126 for(
const auto& rRow : aRows )
3139 xSpContainer.reset();
3141 uno::Reference< table::XCellRange > xCellRange( xTable, uno::UNO_QUERY_THROW );
3142 for( sal_Int32 nRow = 0; nRow < xRows->getCount(); nRow++ )
3144 for( sal_Int32 nColumn = 0; nColumn < xColumns->getCount(); nColumn++ )
3146 uno::Reference< table::XMergeableCell > xCell( xCellRange->getCellByPosition( nColumn, nRow ), uno::UNO_QUERY_THROW );
3147 if ( !xCell->isMerged() )
3149 sal_Int32 nLeft = aColumns[ nColumn ].first;
3150 sal_Int32 nTop = aRows[ nRow ].first;
3155 mXPropSet.set( xCell, uno::UNO_QUERY_THROW );
3156 mXText.set( xCell, uno::UNO_QUERY_THROW );
3166 ShapeFlag::HaveAnchor | ShapeFlag::HaveShapeProperty | ShapeFlag::Child,
3180 if ( aExtBu.
Tell() )
3185 .WriteUInt32( aClientData.
Tell() );
3192 mpStrm ->WriteInt32( nLeft )
3194 .WriteInt32( nRight )
3195 .WriteInt32( nBottom );
3198 .WriteUInt32( aClientTextBox.
Tell() );
3201 xCellContainer.reset();
3207 for( sal_Int32 nLine = 0; nLine < ( xRows->getCount() + 1 ); nLine++ )
3209 for( sal_Int32 nColumn = 0; nColumn < xColumns->getCount(); nColumn++ )
3212 aCellBorder.
mnPos = aColumns[ nColumn ].first;
3215 if ( nLine < xRows->getCount() )
3217 uno::Reference< table::XMergeableCell > xCell( xCellRange->getCellByPosition( nColumn, nLine ), uno::UNO_QUERY_THROW );
3218 if ( !xCell->isMerged() )
3220 uno::Reference< beans::XPropertySet > xPropSet2( xCell, uno::UNO_QUERY_THROW );
3221 table::BorderLine aBorderLine;
3222 if ( xPropSet2->getPropertyValue(
"TopBorder" ) >>= aBorderLine )
3226 aRows[ nLine ].first, nRight, aRows[ nLine ].first );
3232 if (( nLine && !bTop ) || (nLine == xRows->getCount()))
3234 sal_Int32 nRow = nLine;
3238 uno::Reference< table::XMergeableCell > xCell( xCellRange->getCellByPosition( nColumn, nRow - 1 ), uno::UNO_QUERY_THROW );
3239 if ( !xCell->isMerged() )
3243 if ( nBottom == ( aRows[ nLine-1 ].
first + aRows[ nLine-1 ].second ) )
3245 uno::Reference< table::XMergeableCell > xCellOwn( xCellRange->getCellByPosition( nColumn, nRow - 1 ), uno::UNO_QUERY_THROW );
3246 uno::Reference< beans::XPropertySet > xPropSet2( xCellOwn, uno::UNO_QUERY_THROW );
3247 table::BorderLine aBorderLine;
3248 if ( xPropSet2->getPropertyValue(
"BottomBorder" ) >>= aBorderLine )
3251 nBottom, nRight, nBottom);
3263 for( sal_Int32 nLine = 0; nLine < ( xColumns->getCount() + 1 ); nLine++ )
3265 for( sal_Int32 nRow = 0; nRow < xRows->getCount(); nRow++ )
3269 aCellBorder.
mnPos = aRows[ nRow].first;
3271 if ( nLine < xColumns->getCount() )
3273 uno::Reference< table::XMergeableCell > xCell( xCellRange->getCellByPosition( nLine, nRow ), uno::UNO_QUERY_THROW );
3274 if (!xCell->isMerged() )
3276 uno::Reference< beans::XPropertySet > xCellSet( xCell, uno::UNO_QUERY_THROW );
3277 table::BorderLine aBorderLine;
3278 if ( xCellSet->getPropertyValue(
"LeftBorder" ) >>= aBorderLine )
3282 aColumns[nLine].first, nBottom );
3285 if ( ( nLine && !bLeft )||(nLine == xColumns->getCount()))
3287 sal_Int32 nColumn = nLine;
3290 uno::Reference< table::XMergeableCell > xCell( xCellRange->getCellByPosition( nColumn - 1, nRow ), uno::UNO_QUERY_THROW );
3291 if (!xCell->isMerged() )
3295 if ( nRight == (aColumns[nLine-1].
first + aColumns[nLine-1].second) )
3297 uno::Reference< table::XMergeableCell > xCellOwn( xCellRange->getCellByPosition( nColumn - 1, nRow ), uno::UNO_QUERY_THROW );
3298 uno::Reference< beans::XPropertySet > xCellSet( xCellOwn, uno::UNO_QUERY_THROW );
3299 table::BorderLine aBorderLine;
3300 if ( xCellSet->getPropertyValue(
"RightBorder" ) >>= aBorderLine )
3314 xSpgrContainer.reset();
3317 catch( uno::Exception& )
3324 sal_uInt32 nSize,
nPos = pStrm->
Tell();
3329 pStrm->
SeekRel( - (
static_cast<sal_Int32
>(nSize) - 4 ) );
3336 sal_uInt32 nCharactersLeft(
Count() );
3337 if ( nCharactersLeft < 1 )
3344 for ( std::vector<std::unique_ptr<PortionObj> >::const_iterator it = pPtr->
begin(); nCharactersLeft && it != pPtr->
end(); ++it )
3347 sal_Int32 nPortionSize = rPortion.
mnTextSize >= nCharactersLeft ? nCharactersLeft : rPortion.
mnTextSize;
3348 sal_Int32
const nFlags = 7;
3349 nCharactersLeft -= nPortionSize;
3357 if ( nCharactersLeft )
constexpr auto convertMm100ToMasterUnit(N n)
static sal_uInt32 GetColor(const sal_uInt32 nColor)
bool CreateGraphicProperties(const css::uno::Reference< css::drawing::XShape > &rXShape, const GraphicObject &rGraphicObj)
void CreateShapeProperties(const css::uno::Reference< css::drawing::XShape > &rXShape)
bool CreateBlipPropertiesforOLEControl(const css::uno::Reference< css::beans::XPropertySet > &rXPropSet, const css::uno::Reference< css::drawing::XShape > &rXShape)
static MSO_SPT GetCustomShapeType(const css::uno::Reference< css::drawing::XShape > &rXShape, ShapeFlag &nMirrorFlags, OUString &rShapeType, bool bOOXML=false)
void CreateShadowProperties(const css::uno::Reference< css::beans::XPropertySet > &)
bool CreateOLEGraphicProperties(const css::uno::Reference< css::drawing::XShape > &rXOleObject)
bool CreateMediaGraphicProperties(const css::uno::Reference< css::drawing::XShape > &rXMediaObject)
void AddOpt(sal_uInt16 nPropID, bool bBlib, sal_uInt32 nSizeReduction, SvMemoryStream &rStream)
bool CreatePolygonProperties(const css::uno::Reference< css::beans::XPropertySet > &rXPropSet, sal_uInt32 nFlags, bool bBezier, css::awt::Rectangle &rGeoRect, tools::Polygon const *pPolygon=nullptr)
void CreateGradientProperties(const css::awt::Gradient &rGradient)
bool CreateConnectorProperties(const css::uno::Reference< css::drawing::XShape > &rXShape, EscherSolverContainer &rSolver, css::awt::Rectangle &rGeoRect, sal_uInt16 &rShapeType, ShapeFlag &rShapeFlags)
void CreateLineProperties(const css::uno::Reference< css::beans::XPropertySet > &, bool bEdge)
bool GetOpt(sal_uInt16 nPropertyID, sal_uInt32 &rPropValue) const
void CreateTextProperties(const css::uno::Reference< css::beans::XPropertySet > &, sal_uInt32 nText, const bool bIsCustomShape=false, const bool bIsTextFrame=true)
void CreateFillProperties(const css::uno::Reference< css::beans::XPropertySet > &, bool bEdge, bool bTransparentGradient=false)
void CreateCustomShapeProperties(const MSO_SPT eShapeType, const css::uno::Reference< css::drawing::XShape > &)
void Commit(SvStream &rSt, sal_uInt16 nVersion=3, sal_uInt16 nRecType=ESCHER_OPT)
void AddShape(const css::uno::Reference< css::drawing::XShape > &, sal_uInt32 nId)
const FontCollectionEntry * GetById(sal_uInt32 nId)
sal_uInt32 GetId(FontCollectionEntry &rFontDescriptor)
sal_uInt32 GetCount() const
bool EnterGroup(css::uno::Reference< css::container::XIndexAccess > const &rIndex)
sal_uInt32 GetGroupsClosed()
sal_uInt32 GetCurrentGroupIndex() const
sal_Int32 GetCurrentGroupLevel() const
void ResetGroupTable(sal_uInt32 nCount)
const css::uno::Reference< css::container::XIndexAccess > & GetCurrentGroupAccess() const
static OUString decode(std::u16string_view rText, DecodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
OUString GetMainURL(DecodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
OUString PathToFileName() const
static OUString GetRelURL(std::u16string_view rTheBaseURIRef, OUString const &rTheAbsURIRef, EncodeMechanism eEncodeMechanism=EncodeMechanism::WasEncoded, DecodeMechanism eDecodeMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8, FSysStyle eStyle=FSysStyle::Detect)
INetProtocol GetProtocol() const
LanguageType getLanguageType(bool bResolveSystem=true) const
LanguageTag & makeFallback()
std::unique_ptr< PPTExCharSheet > mpCharSheet[PPTEX_STYLESHEETENTRIES]
std::unique_ptr< PPTExParaSheet > mpParaSheet[PPTEX_STYLESHEETENTRIES]
bool IsHardAttribute(sal_uInt32 nInstance, sal_uInt32 nLevel, PPTExTextAttr eAttr, sal_uInt32 nValue)
static sal_uInt32 SizeOfTxCFStyleAtom()
PPTExParaSheet & GetParaSheet(int nInstance)
void WriteTxCFStyleAtom(SvStream &rSt)
css::uno::Reference< css::drawing::XShapes > mXShapes
::tools::Rectangle MapRectangle(const css::awt::Rectangle &)
css::awt::Point MapPoint(const css::awt::Point &)
PPTExStyleSheet * mpStyleSheet
css::uno::Reference< css::beans::XPropertySet > mXPagePropSet
css::uno::Reference< css::task::XStatusIndicator > mXStatusIndicator
FontCollection maFontCollection
::tools::Rectangle maRect
css::awt::Size MapSize(const css::awt::Size &)
css::uno::Reference< css::frame::XModel > mXModel
css::uno::Reference< css::beans::XPropertySet > mXBackgroundPropSet
css::awt::Point maPosition
bool GetShapeByIndex(sal_uInt32 nIndex, bool bGroup)
css::uno::Reference< css::drawing::XShape > mXShape
std::vector< std::unique_ptr< PPTExOleObjEntry > > maExOleObj
void ImplCreateTextShape(EscherPropertyContainer &, EscherSolverContainer &, bool bFill)
sal_uInt32 mnStatMaxValue
sal_uInt32 ImplProgBinaryTag(SvStream *pOutStrm)
sal_uInt32 ImplProgBinaryTagContainer(SvStream *pOutStrm, SvMemoryStream *pBinTag)
sal_uInt32 ImplDocumentListContainer(SvStream *pOutStrm)
css::uno::Reference< css::text::XSimpleText > mXText
sal_uInt32 mnPagesWritten
bool ImplCreatePresentationPlaceholder(const bool bMaster, const sal_uInt32 StyleInstance, const sal_uInt8 PlaceHolderId)
sal_uInt32 ImplVBAInfoContainer(SvStream *pOutStrm)
void ImplWriteParagraphs(SvStream &rOutStrm, TextObj &rTextObj)
bool mbFontIndependentLineSpacing
tools::SvRef< SotStorageStream > mpStrm
void ImplWritePortions(SvStream &rOutStrm, TextObj &rTextObj)
void ImplCreateTable(css::uno::Reference< css::drawing::XShape > const &rXShape, EscherSolverContainer &aSolverContainer, EscherPropertyContainer &aPropOpt)
void ImplAdjustFirstLineLineSpacing(TextObj &rTextObj, EscherPropertyContainer &rPropOpt)
sal_uInt32 mnLatestStatValue
std::vector< EPPTHyperlink > maHyperlink
void ImplWritePage(const PHLayout &rLayout, EscherSolverContainer &rSolver, PageType ePageType, bool bMaster, int nPageNumber=0)
void ImplWriteTextStyleAtom(SvStream &rOut, int nTextInstance, sal_uInt32 nAtomInstance, TextRuleEntry *pTextRule, SvStream &rExtBu, EscherPropertyContainer *)
sal_uInt32 ImplProgTagContainer(SvStream *pOutStrm, SvMemoryStream *pBinTag=nullptr)
static bool ImplGetEffect(const css::uno::Reference< css::beans::XPropertySet > &, css::presentation::AnimationEffect &eEffect, css::presentation::AnimationEffect &eTextEffect, bool &bHasSound)
ppt::ExSoundCollection maSoundCollection
std::vector< OUString > maSlideNameList
sal_uInt32 mnShapeMasterBody
void ImplWriteExtParaHeader(SvMemoryStream &rSt, sal_uInt32 nRef, sal_uInt32 nInstance, sal_uInt32 nSlideId)
static sal_uInt32 ImplOutlineViewInfoContainer(SvStream *pOutStrm)
sal_uInt32 ImplInsertBookmarkURL(const OUString &rBookmark, const sal_uInt32 nType, std::u16string_view aStringVer0, std::u16string_view aStringVer1, std::u16string_view aStringVer2, std::u16string_view aStringVer3)
std::unique_ptr< PptEscherEx > mpPptEscherEx
sal_uInt32 mnShapeMasterTitle
static sal_uInt32 ImplSlideViewInfoContainer(sal_uInt32 nInstance, SvStream *pOutStrm)
static void WriteCString(SvStream &, std::u16string_view, sal_uInt32 nInstance=0)
void ImplCreateShape(sal_uInt32 nType, ShapeFlag nFlags, EscherSolverContainer &)
void ImplFlipBoundingBox(EscherPropertyContainer &rPropOpt)
sal_uInt32 ImplMasterSlideListContainer(SvStream *pOutStrm)
void ImplWriteClickAction(SvStream &rSt, css::presentation::ClickAction eAction, bool bMediaClickAction)
bool ImplCreateCellBorder(const CellBorder *pCellBorder, sal_Int32 nX1, sal_Int32 nY1, sal_Int32 nX2, sal_Int32 nY2)
std::unique_ptr< SvMemoryStream > mpExEmbed
tools::SvRef< SotStorageStream > mpPicStrm
bool ImplGetText()
Loads and converts text from shape, value is stored in mnTextSize.
css::beans::PropertyState meLineSpacingBottom
sal_Int16 mnLineSpacingBottom
std::vector< std::unique_ptr< PortionObj > >::const_iterator begin() const
bool mbParagraphPunctation
css::beans::PropertyState meBiDi
css::beans::PropertyState meLineSpacingTop
sal_uInt32 CharacterCount() const
css::uno::Sequence< css::style::TabStop > maTabStop
css::beans::PropertyState meForbiddenRules
sal_Int16 mnLineSpacingTop
const PortionObj & front() const
void Write(SvStream *pStrm)
css::beans::PropertyState meParagraphPunctation
std::vector< std::unique_ptr< PortionObj > >::const_iterator end() const
css::beans::PropertyState meTextAdjust
css::beans::PropertyState meLineSpacing
std::unique_ptr< FieldEntry > mpFieldEntry
css::beans::PropertyState meCharColor
css::beans::PropertyState meCharEscapement
css::beans::PropertyState meAsianOrComplexFont
css::lang::Locale meCharLocale
css::beans::PropertyState meCharHeight
css::beans::PropertyState meFontName
sal_Int16 mnCharEscapement
sal_uInt16 mnAsianOrComplexFont
void CloseContainer() override
void OpenContainer(sal_uInt16 n_EscherContainer, int nRecInstance=0) override
bool ImplGetPropertyValue(const OUString &rString, bool bGetPropertyState)
css::beans::PropertyState ePropState
css::uno::Reference< css::beans::XPropertyState > mXPropState
css::uno::Reference< css::beans::XPropertySet > mXPropSet
static bool GetPropertyValue(css::uno::Any &rAny, const css::uno::Reference< css::beans::XPropertySet > &, const OUString &rPropertyName, bool bTestPropertyAvailability=false)
static css::beans::PropertyState GetPropertyState(const css::uno::Reference< css::beans::XPropertySet > &, const OUString &rPropertyName)
bool ImplGetPropertyValue(const OUString &rString)
static SdrObject * getSdrObjectFromXShape(const css::uno::Reference< css::uno::XInterface > &xInt)
virtual const tools::Rectangle & GetCurrentBoundRect() const
bool IsNotVisibleAsMaster() const
constexpr tools::Long Height() const
constexpr tools::Long Width() const
SvStream & WriteInt32(sal_Int32 nInt32)
std::size_t WriteBytes(const void *pData, std::size_t nSize)
SvStream & WriteInt16(sal_Int16 nInt16)
SvStream & WriteUChar(unsigned char nChar)
SvStream & WriteUInt16(sal_uInt16 nUInt16)
SvStream & WriteUInt32(sal_uInt32 nUInt32)
sal_uInt64 SeekRel(sal_Int64 nPos)
void Write(SvStream *pStrm)
void WriteTextSpecInfo(SvStream *pStrm)
sal_uInt32 ParagraphCount() const
ParagraphObj * GetParagraph(int idx)
bool HasExtendedBullets() const
static bool WriteOCXStream(const css::uno::Reference< css::frame::XModel > &rxModel, tools::SvRef< SotStorage > const &rSrc1, const css::uno::Reference< css::awt::XControlModel > &rControlModel, const css::awt::Size &rSize, OUString &rName)
sal_uInt32 GetId(const OUString &)
sal_uInt32 GetSize() const
void Write(SvStream &rSt) const
constexpr ::Color COL_AUTO(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
#define EPP_TEXTSTYLE_BODY
#define EPP_TEXTSTYLE_TEXT
#define EPP_Persist_VBAInfoAtom
#define EPP_TEXTSTYLE_NORMAL
#define EPP_Persist_ExObj
#define EPP_TEXTSTYLE_TITLE
#define EPP_Persist_Document
#define EPP_Persist_CurrentPos
#define EPP_MAINMASTER_PERSIST_KEY
@ CharAttr_AsianOrComplexFont
#define EPP_SlidePersistAtom
#define EPP_BaseTextPropAtom
#define EPP_InteractiveInfoAtom
#define EPP_TEXTTYPE_CenterBody
#define EPP_SlideViewInfo
#define EPP_ExControlAtom
#define EPP_InteractiveInfo
#define EPP_OutlineViewInfo
#define EPP_ExHyperlinkAtom
#define EPP_SlideNumberMCAtom
#define EPP_TEXTTYPE_Body
#define EPP_TEXTTYPE_Notes
#define EPP_TxMasterStyleAtom
#define EPP_PLACEHOLDER_NONE
#define EPP_TxSIStyleAtom
#define EPP_TxInteractiveInfoAtom
#define EPP_GenericDateMCAtom
#define EPP_PLACEHOLDER_MASTERSLIDENUMBER
#define EPP_SlideViewInfoAtom
#define EPP_TEXTTYPE_Title
#define EPP_SrKinsokuAtom
#define EPP_DateTimeMCAtom
#define EPP_StyleTextPropAtom
#define EPP_FontEnityAtom
#define EPP_PLACEHOLDER_MASTERNOTESSLIDEIMAGE
#define EPP_ExObjListAtom
#define EPP_TEXTTYPE_Other
#define EPP_TextSpecInfoAtom
#define EPP_PLACEHOLDER_MASTERTITLE
#define EPP_PLACEHOLDER_MASTERNOTESBODYIMAGE
#define EPP_PST_ExtendedPresRuleContainer
#define EPP_PST_ExtendedBuGraContainer
#define EPP_PLACEHOLDER_MASTERHEADER
#define EPP_TextCharsAtom
#define EPP_PLACEHOLDER_NOTESSLIDEIMAGE
#define EPP_PLACEHOLDER_MASTERSUBTITLE
#define EPP_SlideListWithText
#define EPP_ProgBinaryTag
#define EPP_OEPlaceholderAtom
#define EPP_PLACEHOLDER_MASTERBODY
#define EPP_PLACEHOLDER_NOTESBODY
#define EPP_BinaryTagData
#define EPP_PLACEHOLDER_MASTERDATE
#define EPP_TextHeaderAtom
#define EPP_TextRulerAtom
#define EPP_TEXTTYPE_HalfBody
#define EPP_PLACEHOLDER_MASTERFOOTER
#define EPP_FontCollection
#define EPP_PST_ExtendedParagraphAtom
static sal_Int32 GetCellRight(sal_Int32 nColumn, ::tools::Rectangle const &rect, std::vector< std::pair< sal_Int32, sal_Int32 > > &aColumns, uno::Reference< table::XMergeableCell > const &xCell)
static sal_Int32 GetCellBottom(sal_Int32 nRow, ::tools::Rectangle const &rect, std::vector< std::pair< sal_Int32, sal_Int32 > > &aRows, uno::Reference< table::XMergeableCell > const &xCell)
#define ESCHER_Prop_pictureActive
#define ESCHER_CREATEPOLYGON_LINE
#define ESCHER_Prop_lineColor
#define ESCHER_ShpInst_RoundRectangle
#define ESCHER_Prop_shapePath
#define ESCHER_Prop_hspMaster
#define ESCHER_Prop_LockAgainstGrouping
#define ESCHER_Prop_fNoFillHitTest
#define ESCHER_ClientData
#define ESCHER_ShpInst_HostControl
#define ESCHER_Prop_fshadowObscured
#define ESCHER_Prop_FitTextToShape
#define ESCHER_Prop_fNoLineDrawDash
#define ESCHER_Prop_wzName
#define ESCHER_ChildAnchor
#define ESCHER_Prop_AnchorText
#define ESCHER_Prop_shadowColor
#define ESCHER_Prop_WrapText
#define ESCHER_CREATEPOLYGON_POLYLINE
#define ESCHER_ShpInst_TextBox
#define ESCHER_ShpInst_Min
#define ESCHER_Prop_tableRowProperties
#define ESCHER_Prop_Rotation
#define ESCHER_ShpInst_NotPrimitive
#define ESCHER_ClientAnchor
#define ESCHER_Prop_lineWidth
#define ESCHER_SpgrContainer
#define ESCHER_Prop_dyTextTop
#define ESCHER_Prop_fillBackColor
#define ESCHER_ShpInst_Ellipse
#define ESCHER_Prop_fc3DLightFace
#define ESCHER_Prop_pictureId
EscherGraphicProviderFlags
#define ESCHER_Prop_lTxid
#define ESCHER_ShpInst_Rectangle
#define ESCHER_Prop_adjustValue
#define ESCHER_CREATEPOLYGON_POLYPOLYGON
#define ESCHER_SpContainer
#define ESCHER_ClientTextbox
#define ESCHER_Prop_fillColor
#define ESCHER_ShpInst_Line
#define ESCHER_Prop_tableProperties
#define ESCHER_ShpInst_PictureFrame
constexpr OUStringLiteral first
TOOLS_DLLPUBLIC OString read_uInt8s_ToOString(SvStream &rStrm, std::size_t nUnits)
#define STREAM_SEEK_TO_END
table::BorderLine maCellBorder
sal_uInt32 nFieldStartPos
bool bSecOutlinerPossible
sal_uInt8 nUsedObjectPlaceHolder
sal_uInt8 nTypeOfOutliner
PPTExParaLevel maParaLevel[5]
SvxNumType nNumberingType
css::awt::FontDescriptor aFontDesc
sal_uInt32 nMappedNumType
bool bExtendedBulletsUsed
sal_Int16 nBulletRealSize
std::unique_ptr< SvMemoryStream > pOut
SVX_NUM_FULL_WIDTH_ARABIC
SVX_NUM_CHARS_LOWER_LETTER_N
SVX_NUM_CHARS_LOWER_LETTER
SVX_NUM_CHARS_UPPER_LETTER
SVX_NUM_NUMBER_UPPER_ZH_TW
SVX_NUM_CHARS_UPPER_LETTER_N