22#include <osl/endian.h>
33#include <com/sun/star/embed/Aspects.hpp>
34#include <com/sun/star/embed/XEmbeddedObject.hpp>
35#include <com/sun/star/frame/XModel.hpp>
36#include <com/sun/star/office/XAnnotation.hpp>
37#include <com/sun/star/office/XAnnotationAccess.hpp>
38#include <com/sun/star/text/XText.hpp>
39#include <com/sun/star/geometry/RealPoint2D.hpp>
40#include <com/sun/star/util/DateTime.hpp>
41#include <com/sun/star/drawing/BitmapMode.hpp>
75#include <editeng/editids.hrc>
104#include <com/sun/star/container/XIndexContainer.hpp>
105#include <com/sun/star/drawing/XControlShape.hpp>
106#include <com/sun/star/form/XFormComponent.hpp>
107#include <com/sun/star/beans/XPropertySet.hpp>
108#include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
109#include <com/sun/star/drawing/XMasterPagesSupplier.hpp>
110#include <com/sun/star/awt/Size.hpp>
111#include <com/sun/star/drawing/FillStyle.hpp>
112#include <com/sun/star/drawing/TextVerticalAdjust.hpp>
115#include <com/sun/star/awt/Gradient.hpp>
116#include <com/sun/star/table/XMergeableCellRange.hpp>
117#include <com/sun/star/table/BorderLine2.hpp>
118#include <com/sun/star/table/BorderLineStyle.hpp>
119#include <com/sun/star/lang/XMultiServiceFactory.hpp>
128#include <rtl/strbuf.hxx>
133#define PPT_COLSCHEME (0x08000000)
134#define PPT_COLSCHEME_HINTERGRUND (0x08000000)
135#define PPT_COLSCHEME_TEXT_UND_ZEILEN (0x08000001)
136#define PPT_COLSCHEME_TITELTEXT (0x08000003)
137#define PPT_COLSCHEME_A_UND_HYPERLINK (0x08000006)
139#define ANSI_CHARSET 0
140#define SYMBOL_CHARSET 2
145#define FF_MODERN 0x30
146#define FF_SCRIPT 0x40
147#define FF_DECORATIVE 0x50
149#define DEFAULT_PITCH 0x00
150#define FIXED_PITCH 0x01
151#define VARIABLE_PITCH 0x02
155using namespace beans ;
156using namespace drawing ;
157using namespace container ;
158using namespace table ;
161 rDocStream ( rDocStrm ),
173 sal_uInt16 nUserNameLen(0), nPad;
265 sal_Int32 nSlideX(0), nSlideY(0), nNoticeX(0), nNoticeY(0), nDummy;
266 sal_uInt16 nSlidePageFormat(0);
267 sal_Int8 nEmbeddedTrueType(0), nTitlePlaceHoldersOmitted(0), nRightToLeft(0), nShowComments(0);
286 const sal_Int32 nNoteClamp = 65536;
310 static_assert(
sizeof(rAtom.
aPlaceholderId) == 8,
"wrong size of serialized array");
393 rAtom.
eCharSet = RTL_TEXTENCODING_SYMBOL;
396 rAtom.
eCharSet = RTL_TEXTENCODING_MS_1252;
400 rAtom.
eCharSet = osl_getThreadTextEncoding();
402 switch ( lfPitchAndFamily & 0xf0 )
429 switch ( lfPitchAndFamily & 0x0f )
442 for (
i = 0;
i < 32;
i++ )
448 cData[
i ] = ( nTemp >> 8 ) | ( nTemp << 8 );
451 rAtom.
aName = OUString(cData,
i);
460 sal_Int16 lastViewType = 0;
493 nSlidePersistStartOffset( 0 ),
494 nSlidePersistEndOffset ( 0 ),
495 nBackgroundOffset ( 0 ),
496 nDrawingDgId ( 0xffffffff ),
498 bNotesMaster ( false ),
499 bHandoutMaster ( false ),
500 bStarDrawFiller ( false )
502 HeaderFooterOfs[ 0 ] = HeaderFooterOfs[ 1 ] = HeaderFooterOfs[ 2 ] = HeaderFooterOfs[ 3 ] = 0;
512 rImportParam ( rParam )
559 return &(*m_xFonts)[ nNum ];
570 sal_Int32 l,
t, r, b;
577 sal_Int16 ls, ts, rs, bs;
586 SAL_WARN(
"filter.ms",
"ProcessClientAnchor2: short read");
599 if ( rGraphic.
GetType() != GraphicType::GdiMetafile )
602 sal_uInt16 nX, nGlobalColorsCount, nFillColorsCount;
611 if ( ( nGlobalColorsCount > 64 ) || ( nFillColorsCount > 64 ) )
614 if (
static_cast<sal_uInt32
>( ( nGlobalColorsCount + nFillColorsCount ) * 44 + 12 ) != nRecLen )
617 sal_uInt32 OriginalGlobalColors[ 64 ];
618 sal_uInt32 NewGlobalColors[ 64 ];
620 sal_uInt32
i, j, nGlobalColorsChanged, nFillColorsChanged;
621 nGlobalColorsChanged = nFillColorsChanged = 0;
623 sal_uInt32* pCurrentOriginal = OriginalGlobalColors;
624 sal_uInt32* pCurrentNew = NewGlobalColors;
625 sal_uInt32* pCount = &nGlobalColorsChanged;
626 i = nGlobalColorsCount;
628 for ( j = 0; j < 2; j++ )
638 sal_uInt32 nColor = 0;
655 nColor = nRed | ( nGreen << 8 ) | ( nBlue << 16 );
656 *pCurrentNew++ = nColor;
663 nColor = nRed | ( nGreen << 8 ) | ( nBlue << 16 );
664 *pCurrentOriginal++ = nColor;
669 pCount = &nFillColorsChanged;
670 i = nFillColorsCount;
672 if ( !(nGlobalColorsChanged || nFillColorsChanged) )
675 std::unique_ptr<Color[]> pSearchColors(
new Color[ nGlobalColorsChanged ]);
676 std::unique_ptr<Color[]> pReplaceColors(
new Color[ nGlobalColorsChanged ]);
678 for ( j = 0; j < nGlobalColorsChanged; j++ )
680 sal_uInt32 nSearch = OriginalGlobalColors[ j ];
681 sal_uInt32 nReplace = NewGlobalColors[ j ];
683 pSearchColors[ j ].SetRed(
static_cast<sal_uInt8>(nSearch) );
684 pSearchColors[ j ].SetGreen(
static_cast<sal_uInt8>( nSearch >> 8 ) );
685 pSearchColors[ j ].SetBlue(
static_cast<sal_uInt8>( nSearch >> 16 ) );
687 pReplaceColors[ j ].SetRed(
static_cast<sal_uInt8>(nReplace) );
688 pReplaceColors[ j ].SetGreen(
static_cast<sal_uInt8>( nReplace >> 8 ) );
689 pReplaceColors[ j ].SetBlue(
static_cast<sal_uInt8>( nReplace >> 16 ) );
692 aGdiMetaFile.
ReplaceColors( pSearchColors.get(), pReplaceColors.get(),
693 nGlobalColorsChanged );
694 rGraphic = aGdiMetaFile;
700 if (nEndRecPos > nStreamLen)
702 SAL_WARN(
"filter.ms",
"Parsing error: " << nStreamLen <<
703 " max end pos, but " << nEndRecPos <<
" claimed, truncating");
704 nEndRecPos = nStreamLen;
715 if (pPtr->pAObj == pObj)
716 pPtr->pAObj =
nullptr;
717 if (pPtr->pBObj == pObj)
718 pPtr->pBObj =
nullptr;
719 if (pPtr->pCObj == pObj)
720 pPtr->pCObj =
nullptr;
734 pOriginalObj->
SetMergedItem( SdrTextFixedCellHeightItem(
true ) );
748 sal_Int16 nHeaderFooterInstance = -1;
760 if ( nHeaderFooterInstance == -1 )
774 if ( ! ( nHeaderFooterInstance & 0xfffc ) )
782 if (
auto pSdrGrafObj =
dynamic_cast<SdrGrafObj*
>(pRet.get()) )
783 if ( pSdrGrafObj->HasGDIMetaFile() )
785 Graphic aGraphic( pSdrGrafObj->GetGraphic() );
787 pSdrGrafObj->SetGraphic( aGraphic );
814 bool bVerticalText =
false;
824 nTextRotationAngle += 9000_deg100;
829 bVerticalText = !bVerticalText;
837 if ( ( nFontDirection == 1 ) || ( nFontDirection == 3 ) )
839 bVerticalText = !bVerticalText;
841 const bool bFail = o3tl::checked_multiply<sal_Int32>(nFontDirection, 9000, nFontDirection);
843 nTextRotationAngle -=
Degree100(nFontDirection);
845 SAL_WARN(
"filter.ms",
"Parsing error: bad fontdirection: " << nFontDirection);
850 if ( bDeleteSource &&
dynamic_cast<const SdrGrafObj*
>(pRet.get()) ==
nullptr
851 &&
dynamic_cast<const SdrObjGroup*
>(pRet.get()) ==
nullptr
852 &&
dynamic_cast<const SdrOle2Obj*
>(pRet.get()) ==
nullptr )
867 sal_Int32 nMinFrameWidth = 0;
868 sal_Int32 nMinFrameHeight = 0;
869 bool bAutoGrowWidth, bAutoGrowHeight;
885 switch( eTextAnchor )
906 switch ( eTextAnchor )
916 switch (nTextFlags & nMask)
930 nMinFrameWidth = rTextRect.
GetWidth() - ( nTextLeft + nTextRight );
940 switch( eTextAnchor )
961 switch ( eTextAnchor )
971 switch (nTextFlags & nMask)
985 nMinFrameHeight = rTextRect.
GetHeight() - ( nTextTop + nTextBottom );
993 eTextKind = SdrObjKind::TitleText;
999 eTextKind = SdrObjKind::Text;
1013 switch ( nDestinationInstance )
1033 bool bAutoFit =
false;
1049 eTextKind = SdrObjKind::Rectangle;
1056 if (
dynamic_cast<const SdrObjCustomShape*
>(pRet.get()) !=
nullptr && ( eTextKind == SdrObjKind::Rectangle ) )
1058 bAutoGrowHeight = bFitShapeToText;
1059 bAutoGrowWidth = !bWordWrap;
1071 eTextKind != SdrObjKind::Rectangle ? eTextKind : SdrObjKind::Text);
1075 pTObj->SetMergedItemSet( aSet );
1078 pTObj->SetMergedItem(
XLineStyleItem( drawing::LineStyle_NONE ) );
1079 pTObj->SetMergedItem(
XFillStyleItem( drawing::FillStyle_NONE ) );
1081 if ( bVerticalText )
1083 bAutoGrowWidth = bFitShapeToText;
1084 bAutoGrowHeight =
false;
1088 bAutoGrowWidth =
false;
1093 bAutoGrowHeight = bFitShapeToText;
1100 if (bAutoFit && !bAutoGrowHeight && !bAutoGrowWidth)
1119 if ( nMinFrameHeight < 0 )
1120 nMinFrameHeight = 0;
1124 if ( nMinFrameWidth < 0 )
1134 pTObj->SetMergedItem( SdrTextFixedCellHeightItem(
true ) );
1137 pTObj->SetSnapRect( rTextRect );
1148 if (
dynamic_cast<const SdrObjCustomShape*
>(pTObj.get()) ==
nullptr && !bFitShapeToText && !bWordWrap )
1153 if ( bVerticalText )
1179 nAngle += nTextRotationAngle;
1185 pTObj->Rotate( rTextRect.
Center(), 18000_deg100, 0.0, -1.0 );
1188 nAngle = 36000_deg100 - nAngle;
1195 pGroup->GetSubList()->NbcInsertObject( pRet.get() );
1196 pGroup->GetSubList()->NbcInsertObject( pTObj.get() );
1213 if ( nTableProperties & 3 )
1217 sal_Int16
i, nReadRowCount = 0;
1219 if (nReadRowCount > 0)
1221 const size_t nMinRecordSize = 4;
1222 const size_t nMaxRecords = rSt.
remainingSize() / nMinRecordSize;
1225 if (nRowCount > nMaxRecords)
1227 SAL_WARN(
"filter.ms",
"Parsing error: " << nMaxRecords <<
1228 " max possible entries, but " << nRowCount <<
" claimed, truncating");
1229 nRowCount = nMaxRecords;
1233 std::unique_ptr<sal_uInt32[]> pTableArry(
new sal_uInt32[ nRowCount + 2 ]);
1234 pTableArry[ 0 ] = nTableProperties;
1235 pTableArry[ 1 ] = nRowCount;
1236 for (
decltype(nRowCount) nRow = 0; nRow < nRowCount; ++nRow)
1255 if ( rObjData.
nShapeId == pPtr->nShapeC )
1256 pPtr->pCObj = pRet.get();
1260 if ( pOriginalObj &&
dynamic_cast< const SdrObjGroup*
>(pRet.get()) !=
nullptr )
1267 if ( pPartObj == pOriginalObj )
1269 pConnectObj = pPartObj;
1274 if ( rObjData.
nShapeId == pPtr->nShapeA )
1276 pPtr->pAObj = pConnectObj;
1277 pPtr->nSpFlagsA = rObjData.
nSpFlags;
1279 if ( rObjData.
nShapeId == pPtr->nShapeB )
1281 pPtr->pBObj = pConnectObj;
1282 pPtr->nSpFlagsB = rObjData.
nSpFlags;
1292 sal_uInt32 nSec = ( rObjData.
nShapeId >> 10 ) - 1;
1311 m_nPersistPtrCnt ( 0 ),
1312 m_pDefaultSheet ( nullptr ),
1313 m_nCurrentPageNum ( 0 ),
1314 m_nDocStreamPos ( 0 ),
1315 m_nPageColorsNum ( 0xFFFF ),
1336 for ( pHd = aPptRecManager.
Last(); pHd; pHd = aPptRecManager.
Prev() )
1370 while( nCurrentEditAtomStrmPos )
1384 sal_uInt32 nCnt = nOfs;
1397 OSL_FAIL(
"SdrPowerPointImport::Ctor(): Invalid Entry in Persist-Directory!");
1403 if (
m_bOk && nCnt > 0 )
1405 OSL_FAIL(
"SdrPowerPointImport::Ctor(): Not all entries of Persist-Directory read!");
1412 if (nCurrentEditAtomStrmPos &&
checkSeek(
rStCtrl, nCurrentEditAtomStrmPos))
1426 OSL_FAIL(
"SdrPowerPointImport::Ctor(): m_aUserEditAtom.nDocumentRef invalid!");
1435 OSL_FAIL(
"SdrPowerPointImport::Ctor(): m_nDocStreamPos >= nStreamLen!");
1480 if ( !aTxSIStyle.
bValid )
1484 OSL_FAIL(
"SdrTextSpecInfoAtomInterpreter::Ctor(): parsing error, this document needs to be analysed (SJ)" );
1501 pE->bHandoutMaster =
true;
1503 pE->bStarDrawFiller =
true;
1511 sal_uInt16 nRealPageNum = 0;
1515 bool notePresentationSwap =
false;
1516 for (sal_uInt16 nPageListNum = 0;
1517 pSlideListWithTextHd && nPageListNum < 3; ++nPageListNum)
1521 sal_uInt32 nSlideListWithTextHdEndOffset = pSlideListWithTextHd->
GetRecEndFilePos();
1522 nRealPageNum = nPageListNum;
1525 if ( pPreviousPersist )
1531 if (nPageListNum == 1 && pE2->nSlidePersistStartOffset < nPSTList)
1533 notePresentationSwap =
true;
1535 if (notePresentationSwap)
1537 if (nPageListNum == 1) nRealPageNum = 2;
1538 else if (nPageListNum == 2) nRealPageNum = 1;
1542 pPreviousPersist = pE2.get();
1549 if ( pPreviousPersist )
1558 pE2->bStarDrawFiller =
true;
1563 sal_uInt16 nMasterPage;
1565 for ( nMasterPage = 0; nMasterPage < nMasterPages; nMasterPage++ )
1568 pE2->bNotesMaster =
true;
1569 pE2->bStarDrawFiller =
true;
1573 pE2->bStarDrawFiller =
false;
1579 for (sal_uInt16 nPageListNum = 0; nPageListNum < 3; ++nPageListNum)
1582 for (
size_t nPageNum = 0; nPageNum < pPageList->
size(); nPageNum++ )
1626 if ( aTxSIStyle.
bValid && !aTxSIStyle.
aList.empty() )
1627 aTxSI = aTxSIStyle.
aList[ 0 ];
1629 rE2.
xStyleSheet = std::make_unique<PPTStyleSheet>(aSlideHd,
rStCtrl, *
this, aTxPFStyle, aTxSI);
1636 OSL_FAIL(
"SdrPowerPointImport::Ctor(): could not get SlideColorScheme! (SJ)" );
1641 OSL_FAIL(
"SdrPowerPointImport::Ctor(): Persist entry is flawed! (SJ)");
1647 if ( pHeadersFootersHd )
1660 (*m_pMasterPages)[
i ].xHeaderFooterEntry.reset(
new HeaderFooterEntry(aNotesMaster));
1681 css::uno::Reference< css::drawing::XShape > *pShapeRef )
1684 uno::Reference< form::XFormComponent > xFComp;
1697 const css::uno::Reference< css::form::XFormComponent > &rFComp,
1698 const css::awt::Size& rSize,
1699 css::uno::Reference< css::drawing::XShape > *pShape,
1702 bool bRetValue =
false;
1705 css::uno::Reference< css::drawing::XShape > xShape;
1707 const css::uno::Reference< css::container::XIndexContainer > & rFormComps =
1712 rFormComps->insertByIndex( rFormComps->getCount(), aTmp );
1714 const css::uno::Reference< css::lang::XMultiServiceFactory > & rServiceFactory =
1716 if( rServiceFactory.is() )
1718 css::uno::Reference< css::uno::XInterface > xCreate = rServiceFactory
1719 ->createInstance(
"com.sun.star.drawing.ControlShape" );
1722 xShape.set(xCreate, css::uno::UNO_QUERY);
1725 xShape->setSize(rSize);
1727 css::uno::Reference< css::drawing::XControlShape > xControlShape( xShape,
1728 css::uno::UNO_QUERY );
1729 css::uno::Reference< css::awt::XControlModel > xControlModel( rFComp,
1730 css::uno::UNO_QUERY );
1731 if ( xControlShape.is() && xControlModel.is() )
1733 xControlShape->setControl( xControlModel );
1753 css::uno::Reference< css::drawing::XDrawPages > xDrawPages;
1759 css::uno::Reference< css::drawing::XDrawPagesSupplier >
1760 xDrawPagesSupplier(
mxModel, css::uno::UNO_QUERY);
1761 if ( xDrawPagesSupplier.is() )
1762 xDrawPages = xDrawPagesSupplier->getDrawPages();
1768 css::uno::Reference< css::drawing::XMasterPagesSupplier >
1769 xMasterPagesSupplier(
mxModel, css::uno::UNO_QUERY);
1770 if ( xMasterPagesSupplier.is() )
1771 xDrawPages = xMasterPagesSupplier->getMasterPages();
1775 if ( xDrawPages.is() && xDrawPages->getCount() )
1777 xDrawPages->getCount();
1778 css::uno::Any aAny( xDrawPages->getByIndex( xDrawPages->getCount() - 1 ) );
1785 sal_uInt32 nOldPos = rInput.
Tell();
1786 std::unique_ptr<char[]> pBuf(
new char[ nInputSize ]);
1787 rInput.
ReadBytes(pBuf.get(), nInputSize);
1788 ZCodec aZCodec( 0x8000, 0x8000 );
1790 SvMemoryStream aSource( pBuf.get(), nInputSize, StreamMode::READ );
1793 rInput.
Seek( nOldPos );
1834 if ( rOe.nId != nOLEId )
1842 sal_uInt32 nLen = aHd.
nRecLen - 4;
1843 if (
static_cast<sal_Int32
>(nLen) > 0 )
1845 bool bSuccess =
false;
1860 if ( xObjStor.
is() && !xObjStor->GetError() )
1864 xObjStor->SetClass(
SvGlobalName( pObjStor->GetClassId() ), pObjStor->GetFormat(), pObjStor->GetUserName() );
1870 bool bGetItAsOle = (
sizeof(aTestA) == xSrcTst->ReadBytes(aTestA,
sizeof(aTestA)));
1873 xSrcTst = xObjStor->OpenSotStream(
"Contents", StreamMode::READWRITE | StreamMode::NOCREATE );
1874 bGetItAsOle = (xSrcTst.
is() &&
1875 sizeof(aTestA) == xSrcTst->ReadBytes(aTestA,
sizeof(aTestA)));
1882 uno::Reference < embed::XStorage > xDestStorage( rOe.pShell->GetStorage() );
1883 uno::Reference < embed::XEmbeddedObject > xObj =
1887 rOe.pShell->getEmbeddedObjectContainer().InsertEmbeddedObject( xObj, aNm );
1902 uno::Reference< frame::XModel >
xModel( rOe.pShell->GetModel() );
1904 css::uno::Reference< css::drawing::XShape > xShape;
1905 if ( aPPTConvertOCXControls.
ReadOCXStream( xObjStor, &xShape ) )
1911 aNm = rOe.pShell->getEmbeddedObjectContainer().CreateUniqueObjectName();
1914 const css::uno::Reference < css::embed::XStorage >& rStorage = rOe.pShell->GetStorage();
1920 xObjStor->CopyTo(
xTarget.get());
1927 uno::Reference < embed::XEmbeddedObject > xObj =
1928 rOe.pShell->getEmbeddedObjectContainer().GetEmbeddedObject( aNm );
1931 if ( rOe.nAspect != embed::Aspects::MSOLE_ICON )
1943 aSz.Width = aSize.
Width();
1944 aSz.Height = aSize.
Height();
1945 xObj->setVisualAreaSize( rOe.nAspect, aSz );
1950 xObj->setVisualAreaSize( rOe.nAspect, aSize );
1981 std::unique_ptr<SvMemoryStream> pRet;
1991 sal_uInt32 nLen = aHd.
nRecLen - 4;
1992 if (
static_cast<sal_Int32
>(nLen) > 0 )
1996 ZCodec aZCodec( 0x8000, 0x8000 );
2018 if ( nFilterOptions & 1 )
2029 sal_uInt32 nPersistPtr, nIDoNotKnow1, nIDoNotKnow2;
2035 std::unique_ptr<SvMemoryStream> pBas =
ImportExOleObjStg( nPersistPtr, nOleId );
2040 if ( xSource.
is() && xDest.
is() )
2044 StreamMode::READWRITE | StreamMode::NOCREATE | StreamMode::SHARE_DENYALL );
2045 if( xSubStorage.
is() && (
ERRCODE_NONE == xSubStorage->GetError() ) )
2051 xSource->FillInfoList( &aList );
2052 SvStorageInfoList::size_type
i;
2054 bool bCopied =
true;
2055 for (
i = 0;
i < aList.size();
i++ )
2063 uno::Reference < embed::XStorage > xDoc( pShell->
GetStorage() );
2073 if ( xOriginal.
is() && ( xOriginal->GetError() ==
ERRCODE_NONE ) )
2080 xOriginal->WriteUInt32( nIDoNotKnow1 )
2081 .WriteUInt32( nIDoNotKnow2 );
2083 sal_uInt32 nToCopy, nBufSize;
2085 std::unique_ptr<sal_uInt8[]> pBuf(
new sal_uInt8[ 0x40000 ]);
2088 nBufSize = ( nToCopy >= 0x40000 ) ? 0x40000 : nToCopy;
2090 xOriginal->WriteBytes(pBuf.get(), nBufSize);
2091 nToCopy -= nBufSize;
2117 for (
i = 0;
i < 2;
i++ )
2166 sal_uInt16 nCount2 = 0;
2184 if ( aFontAtom.
aName.equalsIgnoreAsciiCase(
"Wingdings" ) ||
2185 aFontAtom.
aName.equalsIgnoreAsciiCase(
"Wingdings 2" ) ||
2186 aFontAtom.
aName.equalsIgnoreAsciiCase(
"Wingdings 3" ) ||
2187 aFontAtom.
aName.equalsIgnoreAsciiCase(
"Monotype Sorts" ) ||
2188 aFontAtom.
aName.equalsIgnoreAsciiCase(
"Monotype Sorts 2" ) ||
2189 aFontAtom.
aName.equalsIgnoreAsciiCase(
"Webdings" ) ||
2190 aFontAtom.
aName.equalsIgnoreAsciiCase(
"StarBats" ) ||
2191 aFontAtom.
aName.equalsIgnoreAsciiCase(
"StarMath" ) ||
2192 aFontAtom.
aName.equalsIgnoreAsciiCase(
"ZapfDingbats" ) )
2194 aFontAtom.
eCharSet = RTL_TEXTENCODING_SYMBOL;
2232 if ( !
ApplyTextObj( pTextObj, pText, pPage,
nullptr,
nullptr ) )
2242 if ( pTextObj->
Count() )
2246 bool bUndoEnabled = rOutliner.IsUndoEnabled();
2247 rOutliner.EnableUndo(
false);
2250 rOutliner.Init( OutlinerMode::TitleObject );
2252 bool bOldUpdateMode = rOutliner.SetUpdateLayout(
false );
2255 if ( rOutliner.GetStyleSheet( 0 ) != pSheet )
2256 rOutliner.SetStyleSheet( 0, pSheet );
2261 sal_uInt32 nTextSize = pPara->GetTextSize();
2262 if ( ! ( nTextSize & 0xffff0000 ) )
2265 std::unique_ptr<sal_Unicode[]> pParaText(
new sal_Unicode[ nTextSize ]);
2266 sal_Int32 nCurrentIndex = 0;
2267 for ( pPortion = pPara->First(); pPortion; pPortion = pPara->Next() )
2270 pParaText[ nCurrentIndex++ ] =
' ';
2273 sal_Int32 nCharacters = pPortion->
Count();
2275 sal_Unicode* pDest = pParaText.get() + nCurrentIndex;
2280 if ( pFontEnityAtom && ( pFontEnityAtom->
eCharSet == RTL_TEXTENCODING_SYMBOL ) )
2283 for (sal_Int32
i = 0;
i < nCharacters;
i++ )
2285 nUnicode = pSource[
i ];
2286 if ( ! ( nUnicode & 0xff00 ) )
2288 pDest[
i ] = nUnicode;
2292 memcpy( pDest, pSource, nCharacters << 1 );
2293 nCurrentIndex += nCharacters;
2297 SfxStyleSheet*
pS = ppStyleSheetAry ? ppStyleSheetAry[ pPara->mxParaSet->mnDepth ] : pSheet;
2299 ESelection aSelection( nParaIndex, 0, nParaIndex, 0 );
2300 rOutliner.Insert( OUString(), nParaIndex, pPara->mxParaSet->mnDepth );
2301 rOutliner.QuickInsertText( OUString(pParaText.get(), nCurrentIndex), aSelection );
2302 rOutliner.SetParaAttribs( nParaIndex, rOutliner.GetEmptyItemSet() );
2304 rOutliner.SetStyleSheet( nParaIndex,
pS );
2306 for ( pPortion = pPara->First(); pPortion; pPortion = pPara->Next() )
2308 SfxItemSet aPortionAttribs( rOutliner.GetEmptyItemSet() );
2309 std::unique_ptr<SvxFieldItem> pFieldItem(pPortion->
GetTextField());
2312 rOutliner.QuickInsertField( *pFieldItem,
ESelection( nParaIndex, aSelection.
nEndPos, nParaIndex, aSelection.
nEndPos + 1 ) );
2320 for ( pF = pPtr; pPtr < pMax; pPtr++ )
2327 sal::static_int_cast< sal_uInt16 >(
2330 rOutliner.QuickInsertLineBreak(
ESelection( nParaIndex, aSelection.
nEndPos, nParaIndex, aSelection.
nEndPos + 1 ) );
2336 aSelection.
nEndPos = sal::static_int_cast< sal_uInt16 >(
2340 rOutliner.QuickSetAttribs( aPortionAttribs, aSelection );
2343 std::optional< sal_Int16 > oStartNumbering;
2344 SfxItemSet aParagraphAttribs( rOutliner.GetEmptyItemSet() );
2345 pPara->ApplyTo( aParagraphAttribs, oStartNumbering, *
this, nDestinationInstance );
2347 sal_uInt32 nIsBullet2 = 0;
2359 rOutliner.QuickSetAttribs( aParagraphAttribs, aSelection );
2364 rOutliner.SetUpdateLayout( bOldUpdateMode );
2365 rOutliner.EnableUndo(bUndoEnabled);
2394 bool bRetValue =
false;
2395 sal_uInt32 nOldPos = rSt.
Tell();
2410 sal_uInt32
i = rContentHd.
nRecLen >> 1;
2414 n =
static_cast<sal_uInt16
>(
i - 6 );
2416 sal_Int32 nV = aSuf.toInt32();
2417 if ( ( nV ==
nVersion ) && ( aPre ==
"___PPT" ) )
2437 rSt.
Seek( nOldPos );
2444 if ( pList && m_nCurrentPageNum < pList->
size() )
2453 if ( pList && ( m_nCurrentPageNum < pList->
size() ) )
2475 return pList->
size();
2486 bool bHasMasterPage =
true;
2487 sal_uInt16 nMasterIndex = 0;
2490 nMasterIndex = nPageNum;
2496 bHasMasterPage =
false;
2498 if ( bHasMasterPage )
2501 if ( pPageList && nMasterIndex < pPageList->
size() )
2508 pMasterPersist = &(*pPageList)[ nMasterIndex ];
2526 bool bInch =
IsInch( eMap );
2551 sal_uInt16 nSlideFlags = 0;
2553 if ( pPageList && ( m_nCurrentPageNum < pPageList->
size() ) )
2558 if ( ! ( nSlideFlags & 2 ) )
2561 if ( nSlideFlags & 2 )
2574 if ( nMasterNum < pPageList2->
size() )
2575 pMasterPersist = &(*pPageList2)[ nMasterNum ];
2578 if ( pMasterPersist )
2584 sal_uInt16 nNextMaster =
m_pMasterPages->FindPage(nOrigMasterId);
2587 pMasterPersist = &(*pPageList2)[ nNextMaster ];
2590 SAL_WARN(
"filter.ms",
"loop in atom chain");
2609 if (!bRet && pClientData)
2619 if ( pPageList && ( nMasterNum < pPageList->
size() ) )
2621 assert( !pPageList->
is_null( nMasterNum ) );
2625 sal_uInt32 nCurrent(0);
2631 sal_uInt32 nStreamPos = rSt.
Tell();
2635 sal_uInt32 nShapePos = 0;
2654 rSt.
Seek( nShapePos );
2659 rSt.
Seek( nStreamPos );
2687 util::DateTime aDateTime;
2688 sal_Int32 nPosX = 0;
2689 sal_Int32 nPosY = 0;
2705 case 0 : sAuthor = aString;
break;
2706 case 1 : sText = aString;
break;
2707 case 2 : sInitials = aString;
break;
2714 sal_uInt16 millisec = 0;
2734 Point aPosition( nPosX, nPosY );
2735 rMan.
Scale( aPosition );
2739 uno::Reference< office::XAnnotationAccess > xAnnotationAccess( pPage->
getUnoPage(), UNO_QUERY_THROW );
2740 uno::Reference< office::XAnnotation > xAnnotation( xAnnotationAccess->createAndInsertAnnotation() );
2741 xAnnotation->setPosition( geometry::RealPoint2D( aPosition.
X() / 100.0, aPosition.
Y() / 100.0 ) );
2742 xAnnotation->setAuthor( sAuthor );
2743 xAnnotation->setDateTime( aDateTime );
2744 xAnnotation->setInitials( sInitials );
2745 uno::Reference< text::XText > xText( xAnnotation->getTextRange() );
2746 xText->setString( sText );
2748 catch(
const uno::Exception& )
2813 switch ( aEscherObjListHd.
nRecType )
2825 while( (
pE->aSlideAtom.nFlags & 4 ) &&
pE->aSlideAtom.nMasterId )
2827 auto nOrigMasterId =
pE->aSlideAtom.nMasterId;
2828 sal_uInt16 nNextMaster =
m_pMasterPages->FindPage(nOrigMasterId);
2832 pE = &(*pPageList)[ nNextMaster ];
2833 if (
pE->aSlideAtom.nMasterId == nOrigMasterId)
2835 SAL_WARN(
"filter.ms",
"loop in atom chain");
2839 if (
pE->nBackgroundOffset )
2855 sal_uInt32 nSpFlags;
2880 switch ( aEscherObjListHd.
nRecType )
2933 if (!rSlidePersist.
pBObj)
2942 pObject->SetMergedItemSet(aNewSet);
2948 if ( rSlidePersist.
pBObj )
2959 if (pPtr->pAObj == rSlidePersist.
pBObj.get())
2960 pPtr->pAObj =
nullptr;
2961 if (pPtr->pBObj == rSlidePersist.
pBObj.get())
2962 pPtr->pBObj =
nullptr;
2963 if (pPtr->pCObj == rSlidePersist.
pBObj.get())
2964 pPtr->pCObj =
nullptr;
2967 rSlidePersist.
pBObj.clear();
2985 if ( pPageList && m_nCurrentPageNum < pPageList->
size() )
2997 bNote = ( nPageNum & 1 ) == 0;
3004 if ( pPageList && nPageNum < pPageList->
size() )
3005 return (*pPageList)[ nPageNum ].aSlideAtom.nMasterId;
3012 if ( pPageList && nPageNum < pPageList->
size() )
3013 return (*pPageList)[ nPageNum ].aSlideAtom.nNotesId;
3028 sal_uInt16 nIdx = 0;
3044 std::optional<SfxItemSet> pSet;
3096 pRet->SetMergedItemSet(*pSet);
3097 pRet->SetMarkProtect(
true );
3098 pRet->SetMoveProtect(
true );
3099 pRet->SetResizeProtect(
true );
3104 pMasterPersist ( pMPE ),
3123 sal_uInt32 nMask = 0;
3124 switch ( nInstance )
3126 case 0 : nMask = 0x010000;
break;
3127 case 1 : nMask = 0x100000;
break;
3128 case 2 : nMask = 0x200000;
break;
3129 case 3 : nMask = 0x080000;
break;
3131 return (
nAtom & nMask );
3140 sal_uInt32 nRet = 0;
3184 nInstance ( nInst ),
3185 aBuGra (
std::move( aGraphic )) {}
3188: mnExtParagraphMask( 0 )
3193, mnExtCharacterMask( 0 )
3200 rLevel.
mbSet =
true;
3218 bool bRetValue =
false;
3228 for (std::unique_ptr<PPTBuGraEntry>
const &
i :
aBuGraList)
3246 sal_uInt32 nOldPos = rSt.
Tell();
3284 if (
aBuGraList[ nBuGraCount - 1 ]->nInstance < nInstance )
3288 for (
n = 0;
n < nBuGraCount;
n++ )
3295 if (
n < nBuGraCount ) {
3302 else OSL_FAIL(
"PPTExParaProv::PPTExParaProv - bullet graphic is not valid (SJ)" );
3306 else OSL_FAIL(
"PPTExParaProv::PPTExParaProv - unknown atom interpreting the PPT_PST_ExtendedBuGraContainer (SJ)" );
3319 OSL_FAIL(
"PPTExParaProv::PPTExParaProv - unknown atom reading ppt2000 num rules (SJ)" );
3349 sal_uInt16 nDepth = 0,
i = 0;
3360 OSL_FAIL(
"PPTExParaProv::PPTExParaProv - error reading PPT_PST_ExtendedParagraphMasterAtom (SJ)" );
3364 else OSL_FAIL(
"PPTExParaProv::PPTExParaProv - instance out of range (SJ)" );
3369 OSL_FAIL(
"PPTExParaProv::PPTExParaProv - unknown atom, assuming PPT_PST_ExtendedParagraphMasterAtom (SJ)" );
3382 rSt.
Seek( nOldPos );
3397 , pExtParaProv(
std::move(pParaProv))
3407 std::optional< sal_Int16 >& rStartNumbering, sal_uInt32 nFontHeight,
PPTParagraphObj const * pPara )
3411 sal_uInt32 nBuFlags = 0;
3412 sal_uInt16 nHasAnm = 0;
3413 sal_uInt32 nAnmScheme = 0xFFFF0003;
3414 sal_uInt16 nBuBlip = 0xffff;
3422 nBuFlags = pPara->
mxParaSet->mnExtParagraphMask;
3425 if ( nBuFlags & 0x00800000 )
3427 if ( nBuFlags & 0x01000000 )
3428 nAnmScheme = pPara->
mxParaSet->mnAnmScheme;
3429 if ( nBuFlags & 0x02000000 )
3431 bHardAttribute =
true;
3435 if ( ( nBuFlags & 0x03800000 ) != 0x03800000 )
3447 if ( (!( nBuFlags & 0x00800000)) && ( nMaBuFlags & 0x00800000 ) )
3449 if (!( nBuFlags & 0x02000000))
3452 if ( (!( nBuFlags & 0x01000000)) && ( nMaBuFlags & 0x01000000 ) )
3454 if ( (!( nBuFlags & 0x02000000)) && ( nMaBuFlags & 0x02000000 ) )
3456 nBuFlags |= nMaBuFlags;
3461 if ( nBuBlip != 0xffff )
3464 if ( pParaProv && pParaProv->
GetGraphic( nBuBlip, aGraphic ) )
3468 sal_uInt32 nHeight =
static_cast<sal_uInt32
>(
static_cast<double>(nFontHeight) * 0.2540 *
nBulletHeight + 0.5 );
3472 nWidth = ( nHeight * aPrefSize.
Width() ) / aPrefSize.
Height();
3481 switch(
static_cast< sal_uInt16
>( nAnmScheme ) )
3643 rStartNumbering = std::optional< sal_Int16 >( nAnmScheme >> 16 );
3644 sal_Int16 nBuStart = *rStartNumbering;
3647 if ( ( nBuFlags & 0x02000000 ) && ( nBuStart != -1 ))
3649 rNumberFormat.
SetStart(
static_cast<sal_uInt16
>(nBuStart) );
3652 return bHardAttribute;
3671 std::optional< sal_Int16 > oStartNumbering;
3686 sal_uInt32 nFont = rCharLevel.
mnFont;
3688 if ( pFontEnityAtom )
3704 TSS_Type nDestinationInstance, std::optional< sal_Int16 >& rStartNumbering )
3706 sal_uInt32 nHardCount = 0;
3718 sal_uInt32 nFontHeight = 24;
3724 pParaObj->
mnInstance, nDestinationInstance, rStartNumbering, nFontHeight, pParaObj ) ? 1 : 0;
3746 if ( pFontEnityAtom )
3761 return nHardCount != 0;
3770 rtl_TextEncoding eCharSet( pAtom->
eCharSet );
3779 sal_uInt16 nBuChar =
static_cast<sal_uInt16
>(
nBulletChar);
3780 if ( aFont.
GetCharSet() == RTL_TEXTENCODING_SYMBOL )
3798 sal_uInt16 nFontHeight(0);
3799 switch ( nInstance )
3827 nDepth.mnAsianOrComplexFont = 0xffff;
3828 nDepth.mnFontHeight = nFontHeight;
3829 nDepth.mnFontColor = nColor;
3831 nDepth.mnEscapement = 0;
3838 sal_uInt32 nCMask(0);
3842 if ( nCMask & 0x0000FFFF )
3844 sal_uInt16 nBitAttr(0);
3862 if( ! (
maCharLevel[ nLevel ].mnFontColor & 0xff000000 ) )
3867 if ( nCMask & 0x00100000 )
3875 OSL_FAIL(
"PPTCharSheet::Read - unknown attribute, send me this document (SJ)" );
3884 sal_uInt16 nBuFlags = 0;
3885 sal_uInt32 nBulletColor = 0x8000000;
3886 sal_uInt16 nUpperDist = 0;
3888 switch ( nInstance )
3910 i.mnBuFlags = nBuFlags;
3911 i.mnBulletChar = 0x2022;
3913 i.mnBulletHeight = 100;
3914 i.mnBulletColor = nBulletColor;
3918 i.mnUpperDist = nUpperDist;
3921 i.mnDefaultTab = 0x240;
3922 i.mnAsianLineBreak = 0;
3932 , sal_uInt32 nLevel,
bool bFirst )
3935 sal_uInt32 nPMask(0);
3938 sal_uInt16 nMask16 =
static_cast<sal_uInt16
>(nPMask) & 0xf;
3941 sal_uInt16 nVal16(0);
3947 if ( nPMask & 0x0080 )
3949 if ( nPMask & 0x0010 )
3951 if ( nPMask & 0x0040 )
3953 sal_uInt16 nVal16(0);
3957 if ( nPMask & 0x0020 )
3959 sal_uInt32 nVal32(0);
3965 if ( nPMask & 0xF00 )
3968 sal_uInt16 nVal16(0);
3972 if ( nPMask & 0x1000 )
3974 if ( nPMask & 0x2000 )
3976 if ( nPMask & 0x4000 )
3978 if ( nPMask & 0x8000 )
3980 if ( nPMask & 0x10000 )
3982 if ( nPMask & 0x20000 )
3984 if ( nPMask & 0x200000 )
3992 for (sal_uInt16
i = 0;
i < nVal16; ++
i)
3995 if ( nPMask & 0x40000 )
4000 if ( nPMask & 0x80000 )
4002 if ( nPMask & 0x100000 )
4007 if ( nPMask & 0x800 )
4009 sal_uInt16 nVal16(0);
4013 if ( nPMask & 0x1000 )
4015 if ( nPMask & 0x2000 )
4017 if ( nPMask & 0x4000 )
4019 if ( nPMask & 0x8000 )
4024 if ( nPMask & 0x100 )
4026 if ( nPMask & 0x200 )
4031 if ( nPMask & 0x400 )
4033 if ( nPMask & 0x10000 )
4038 if ( nPMask & 0xe0000 )
4040 sal_uInt16 nFlagsToModifyMask =
static_cast<sal_uInt16
>( ( nPMask >> 17 ) & 7 );
4041 sal_uInt16 nVal16(0);
4044 nVal16 &= nFlagsToModifyMask;
4050 if ( nPMask & 0x100000 )
4058 for (sal_uInt16
i = 0;
i < nVal16; ++
i)
4061 if ( nPMask & 0x200000 )
4073 OSL_FAIL(
"PPTParaSheet::Read - unknown attribute, send me this document (SJ)" );
4085 if (
maParaLevel[ nLevel ].mnBulletHeight > 0x7fff )
4088 nBulletRelSize = nFontHeight ? ((-nBulletRelSize) * 100 ) / nFontHeight : 100;
4089 if ( nBulletRelSize < 0 )
4090 nBulletRelSize = 100;
4100 maTxSI ( rTextSpecInfo )
4102 sal_uInt32 nOldFilePos = rIn.
Tell();
4123 bool bFoundTxMasterStyleAtom04 =
false;
4130 while (rIn.
Tell() < nEndRecPos)
4135 sal_uInt16 nLevelCnt(0);
4138 sal_uInt16 nLev = 0;
4140 bFoundTxMasterStyleAtom04 =
true;
4184 while (rIn.
Tell() < nEndRecPos)
4206 switch ( nInstance )
4236 sal_uInt16 nLevelCnt(0);
4240 OSL_FAIL(
"PPTStyleSheet::Ppt-TextStylesheet has more than 5 levels! (SJ)" );
4243 sal_uInt16 nLev = 0;
4260 sal_uInt16 nDontKnow;
4263 mpParaSheet[ nInstance ]->Read( rManager, rIn, nLev, bFirst );
4265 mpParaSheet[ nInstance ]->UpdateBulletRelSize( nLev,
mpCharSheet[ nInstance ]->maCharLevel[ nLev ].mnFontHeight );
4277 aMsg.append(
"\n reading too many bytes:" +
4282 aMsg.append(
"\n reading too few bytes:" +
4285 if (aMsg.getLength())
4287 aMsg.insert(0,
"PptStyleSheet::operator>>[]");
4288 OSL_FAIL(aMsg.getStr());
4292 SAL_WARN(
"filter.ms",
"SJ: Wrong number of bytes read during import of PPT style");
4320 if ( !bFoundTxMasterStyleAtom04 )
4328 while (rIn.
Tell() < nEnvEndRecPos)
4333 sal_uInt16 nLevelCnt;
4336 sal_uInt16 nLev = 0;
4377 rIn.
Seek( nOldFilePos );
4382 sal_uInt16 nLevels, nDepth = 0;
4390 eNumRuleType = SvxNumRuleType::NUMBERING;
4394 eNumRuleType = SvxNumRuleType::NUMBERING;
4400 eNumRuleType = SvxNumRuleType::PRESENTATION_NUMBERING;
4407 eNumRuleType = SvxNumRuleType::NUMBERING;
4410 SvxNumRule aRule( SvxNumRuleFlags::BULLET_REL_SIZE | SvxNumRuleFlags::BULLET_COLOR,
4411 nLevels,
false, eNumRuleType );
4412 for ( sal_uInt16
nCount = 0; nDepth < nLevels;
nCount++ )
4419 aRule.
SetLevel( nDepth++, aNumberFormat );
4422 for ( ;nDepth < nLevels; nDepth++ )
4423 aRule.
SetLevel( nDepth, aNumberFormat );
4441 : mnOriginalTextPos(0)
4459 if (
this != &rParaPropSet )
4468 : mnOriginalTextPos(0)
4469 , mnParagraph(nParagraph)
4478 : mpImplPPTCharPropSet( rCharPropSet.mpImplPPTCharPropSet )
4494 : mpImplPPTCharPropSet(rCharPropSet.mpImplPPTCharPropSet)
4513 if (
this != &rCharPropSet )
4547 , nDefaultTab(0x240)
4570 if ( nFileOfs == 0xffffffff )
4573 sal_uInt32 nOldPos = rIn.
Tell();
4577 rIn.
Seek( nFileOfs );
4588 bool bRecordOk =
true;
4590 sal_Int16 nTCount(0);
4603 const size_t nMaxPossibleRecords = rIn.
remainingSize() / (2*
sizeof(sal_uInt16));
4604 const sal_uInt16 nTabCount(nTCount);
4606 bRecordOk = nTabCount <= nMaxPossibleRecords;
4608 if (nTCount && bRecordOk)
4612 for (
i = 0;
i < nTCount;
i++ )
4622 for (
i = 0;
i < 5;
i++ )
4643 rIn.
Seek( nOldPos );
4656 if ( ! ( ( nLevel < 5 ) && (
mxImplRuler->nFlags & ( 8 << nLevel ) ) ) )
4664 if ( ! ( ( nLevel < 5 ) && (
mxImplRuler->nFlags & ( 256 << nLevel ) ) ) )
4672 if (
this != &rRuler )
4685 bForbiddenRules ( false ),
4686 bHangingPunctuation ( false ),
4687 bLatinTextWrap ( false )
4696 sal_uInt16 nDummy16;
4701 if ( nFlags & 0xf && ( rIn.
Tell() < nRecEndPos ) )
4703 if ( nFlags & 0x80 && ( rIn.
Tell() < nRecEndPos ) )
4705 if ( nFlags & 0x10 && ( rIn.
Tell() < nRecEndPos ) )
4707 if ( nFlags & 0x40 && ( rIn.
Tell() < nRecEndPos ) )
4709 if ( nFlags & 0x0020 && ( rIn.
Tell() < nRecEndPos ) )
4711 if ( nFlags & 0x800 && ( rIn.
Tell() < nRecEndPos ) )
4713 if ( nFlags & 0x400 && ( rIn.
Tell() < nRecEndPos ) )
4715 if ( nFlags & 0x200 && ( rIn.
Tell() < nRecEndPos ) )
4717 if ( nFlags & 0x100 && ( rIn.
Tell() < nRecEndPos ) )
4719 if ( nFlags & 0x1000 && ( rIn.
Tell() < nRecEndPos ) )
4721 if ( nFlags & 0x2000 && ( rIn.
Tell() < nRecEndPos ) )
4723 if ( nFlags & 0x4000 && ( rIn.
Tell() < nRecEndPos ) )
4725 if ( nFlags & 0x8000 && ( rIn.
Tell() < nRecEndPos ) )
4727 if ( nFlags & 0x10000 && ( rIn.
Tell() < nRecEndPos ) )
4729 if ( nFlags & 0xe0000 && ( rIn.
Tell() < nRecEndPos ) )
4732 if ( nFlags & 0x20000 )
4734 if ( nFlags & 0x40000 )
4736 if ( nFlags & 0x80000 )
4740 sal_uInt32 nMask = 0x100000;
4741 while ( nFlags && nMask && ( rIn.
Tell() < nRecEndPos ) )
4743 if ( nFlags & nMask )
4755 nCharIdx ( _nCharIdx ),
4772 sal_uInt32 nCharIdx = 0;
4776 while (rIn.
Tell() < nEndRecPos && rIn.
good())
4780 sal_uInt32 nCharCount(0);
4782 nCharIdx += nCharCount;
4785 sal_uInt32 nFlags(0);
4789 if ( pTextSpecDefault )
4796 for (sal_uInt32
i = 1; nFlags &&
i ;
i <<= 1)
4798 sal_uInt16 nLang = 0;
4799 switch( nFlags &
i )
4825 aList.push_back( aEntry );
4859 Init(rIn, rTextHeader, rRuler, rExtParaHd, nInstance);
4864 sal_uInt32& nCharCount,
bool& bTextPropAtom )
4866 sal_uInt32 nMask = 0;
4867 sal_uInt32 nCharReadCnt = 0;
4868 sal_uInt16 nDummy16;
4870 sal_uInt16 nStringLen = aString.getLength();
4875 bTextPropAtom =
true;
4876 while ( nCharReadCnt <= nStringLen )
4880 if ( bTextPropAtom )
4886 std::min(sal_uInt16(8),
4893 sal_uInt16 nBulFlg = 0;
4902 if ( nMask & 0x0080 )
4910 if ( nMask & 0x0010 )
4918 if ( nMask & 0x0040 )
4928 if ( nMask & 0x0020 )
4939 nHiByte = nVal32 >> 24;
4945 if ( nMask & 0x0800 )
4957 if ( nMask & 0x1000 )
4965 if ( nMask & 0x2000 )
4973 if ( nMask & 0x4000 )
4981 if ( nMask & 0x100 )
4993 if ( nMask & 0x400 )
5005 if ( nMask & 0x8000 )
5013 if ( nMask & 0x100000 )
5015 sal_uInt16
i, nDistance, nAlignment, nNumberOfTabStops = 0;
5023 const size_t nMinRecordSize = 4;
5024 const size_t nMaxRecords = rIn.
remainingSize() / nMinRecordSize;
5025 if (nNumberOfTabStops > nMaxRecords)
5027 SAL_WARN(
"filter.ms",
"Parsing error: " << nMaxRecords <<
5028 " max possible entries, but " << nNumberOfTabStops <<
" claimed, truncating");
5029 nNumberOfTabStops = nMaxRecords;
5031 for (
i = 0;
i < nNumberOfTabStops; ++
i)
5038 if ( nMask & 0x10000 )
5046 if ( nMask & 0xe0000 )
5057 if (nMask & 0x20000)
5059 if (nMask & 0x40000)
5061 if (nMask & 0x80000)
5066 if ( nMask & 0x200000 )
5076 nCharCount = nStringLen;
5086 if ( ( nCharCount > nStringLen ) || ( nStringLen < nCharReadCnt + nCharCount ) )
5088 bTextPropAtom =
false;
5089 nCharCount = nStringLen - nCharReadCnt;
5094 aParaPropSet = aTmpPPTParaPropSet;
5095 OSL_FAIL(
"SJ:PPTStyleTextPropReader::could not get this PPT_PST_StyleTextPropAtom by reading the paragraph attributes" );
5103 const sal_Unicode* pDat = aString.getStr() + nCharReadCnt;
5106 if ( pDat[
nCount ] == 0xd )
5114 nCharReadCnt += nCharCount + 1;
5119 sal_uInt32& nCharCount, sal_uInt32 nCharReadCnt,
5120 bool& bTextPropAtom, sal_uInt32 nExtParaPos,
5121 const std::vector< StyleTextProp9 >& aStyleTextProp9,
5122 sal_uInt32& nExtParaFlags, sal_uInt16& nBuBlip,
5123 sal_uInt16& nHasAnm, sal_uInt32& nAnmScheme )
5125 sal_uInt16 nStringLen = aString.size();
5127 sal_uInt16 nDummy16;
5129 nCharCount = (rIn.
good()) ? nDummy16 : 0;
5132 sal_Int32 nCharsToRead = nStringLen - ( nCharReadCnt + nCharCount );
5133 if ( nCharsToRead < 0 )
5135 nCharCount = nStringLen - nCharReadCnt;
5136 if ( nCharsToRead < -1 )
5138 bTextPropAtom =
false;
5139 OSL_FAIL(
"SJ:PPTStyleTextPropReader::could not get this PPT_PST_StyleTextPropAtom by reading the character attributes" );
5145 sal_uInt32 nMask(0);
5147 if (
static_cast<sal_uInt16
>(nMask) )
5149 aSet.
mnAttrSet |=
static_cast<sal_uInt16
>(nMask);
5152 if ( nMask & 0x10000 )
5157 if ( nMask & 0x200000 )
5162 if ( nMask & 0x400000 )
5167 if ( nMask & 0x800000 )
5172 if ( nMask & 0x20000 )
5177 if ( nMask & 0x40000 )
5181 if ( !( nVal & 0xff000000 ) )
5186 if ( nMask & 0x80000 )
5194 sal_uInt32 nExtBuInd = nMask & 0x3c00;
5196 nExtBuInd = ( aSet.
mnFlags & 0x3c00 ) >> 10;
5197 if ( nExtBuInd < aStyleTextProp9.size() )
5199 nExtParaFlags = aStyleTextProp9[ nExtBuInd ].mnExtParagraphMask;
5200 nBuBlip = aStyleTextProp9[ nExtBuInd ].mnBuBlip;
5201 nHasAnm = aStyleTextProp9[ nExtBuInd ].mnHasAnm;
5202 nAnmScheme = aStyleTextProp9[ nExtBuInd ].mnAnmScheme;
5209 sal_uInt32 nOldPos = rIn.
Tell();
5212 std::vector< StyleTextProp9 > aStyleTextProp9;
5220 aStyleTextProp9.emplace_back();
5221 aStyleTextProp9.back().Read( rIn );
5223 rIn.
Seek( nOldPos );
5229 sal_uInt32 nMaxLen = aTextHd.
nRecLen;
5230 if ( nMaxLen >= 0xFFFF )
5235 std::vector<sal_Unicode>
aBuf(( nMaxLen >> 1 ) + 1);
5236 void* pDest =
aBuf.data();
5237 auto nRead = rIn.
ReadBytes(pDest, nMaxLen);
5238 if (nRead != nMaxLen)
5239 memset(
static_cast<char*
>(pDest) + nRead, 0, nMaxLen - nRead);
5248 for (
i = 0;
i < nMaxLen;
i++ )
5251 *pPtr++ = ( nTemp << 8 ) | ( nTemp >> 8 );
5256 for (
i = 0;
i < nMaxLen; pPtr++,
i++ )
5261 if ( ( nChar & 0xff00 ) == 0xf000 )
5263 else if ( nChar == 0xd )
5272 aString = OUString(
aBuf.data(),
i);
5276 std::unique_ptr<char[]> pBuf(
new char[ nMaxLen + 1 ]);
5277 nMaxLen = rIn.
ReadBytes(pBuf.get(), nMaxLen);
5278 pBuf[ nMaxLen ] = 0;
5279 char* pPtr = pBuf.get();
5294 sal_Int32 nLen = pPtr - pBuf.get();
5296 aString = OUString( pBuf.get(), nLen, RTL_TEXTENCODING_MS_1252 );
5301 sal_uInt32 nCharCount;
5302 bool bTextPropAtom =
false;
5303 ReadParaProps( rIn, rTextHeader, aString, rRuler, nCharCount, bTextPropAtom );
5305 if ( bTextPropAtom )
5312 sal_uInt32 nExtParaFlags = 0, nAnmScheme = 0;
5313 sal_uInt16 nBuBlip = 0xffff, nHasAnm = 0;
5315 bTextPropAtom, nExtParaPos, aStyleTextProp9, nExtParaFlags,
5316 nBuBlip, nHasAnm, nAnmScheme );
5318 aCharPropList.push_back(std::make_unique<PPTCharPropSet>(aCharPropSet, 0));
5322 if ( !aString.isEmpty() )
5324 sal_uInt32 nCharCount;
5325 bool bTextPropAtom =
false;
5327 ReadParaProps( rIn, rTextHeader, aString, rRuler, nCharCount, bTextPropAtom );
5329 bool bEmptyParaPossible =
true;
5330 sal_uInt32 nCharReadCnt = 0;
5331 sal_uInt32 nCurrentPara = 0;
5334 sal_uInt32 nStringLen = aString.getLength();
5336 while ( nCharReadCnt < nStringLen )
5338 sal_uInt32 nExtParaFlags = 0, nLatestParaUpdate = 0xffffffff, nAnmScheme = 0;
5339 sal_uInt16 nBuBlip = 0xffff, nHasAnm = 0;
5342 if ( bTextPropAtom )
5344 ReadCharProps( rIn, aCharPropSet, aString, nCharCount, nCharReadCnt,
5345 bTextPropAtom, nExtParaPos, aStyleTextProp9, nExtParaFlags,
5346 nBuBlip, nHasAnm, nAnmScheme );
5351 nCharCount = nStringLen;
5356 if ( nExtParaPos && ( nLatestParaUpdate != nCurrentPara ) && ( nCurrentPara <
aParaPropList.size() ) )
5359 pPropSet->
mxParaSet->mnExtParagraphMask = nExtParaFlags;
5360 if ( nExtParaFlags & 0x800000 )
5361 pPropSet->
mxParaSet->mnBuBlip = nBuBlip;
5362 if ( nExtParaFlags & 0x01000000 )
5363 pPropSet->
mxParaSet->mnAnmScheme = nAnmScheme;
5364 if ( nExtParaFlags & 0x02000000 )
5365 pPropSet->
mxParaSet->mnHasAnm = nHasAnm;
5366 nLatestParaUpdate = nCurrentPara;
5369 if ( nCurrentSpecMarker && ( ( nCurrentSpecMarker & 0xffff ) < ( nCharReadCnt + nCharCount ) ) )
5373 nLen = ( nCurrentSpecMarker & 0xffff ) - nCharReadCnt;
5375 aCharPropSet.
maString = aString.copy( nCharReadCnt, nLen );
5376 else if ( bEmptyParaPossible )
5378 if ( nLen || bEmptyParaPossible )
5380 std::make_unique<PPTCharPropSet>(aCharPropSet, nCurrentPara));
5383 nCharReadCnt += nLen;
5385 bEmptyParaPossible =
true;
5389 if ( ( nCurrentSpecMarker & 0xffff ) != nCharReadCnt )
5391 nLen = ( nCurrentSpecMarker & 0xffff ) - nCharReadCnt;
5392 aCharPropSet.
maString = aString.copy(nCharReadCnt, nLen);
5394 std::make_unique<PPTCharPropSet>(aCharPropSet, nCurrentPara));
5396 nCharReadCnt += nLen;
5399 pCPropSet->
maString = aString.copy(nCharReadCnt, 1);
5405 bEmptyParaPossible =
false;
5412 aCharPropSet.
maString = OUString();
5415 sal_Int32 nStrLen = nCharCount;
5416 sal_Int32 nMaxStrLen = aString.getLength() - nCharReadCnt;
5417 if (nStrLen > nMaxStrLen)
5418 nStrLen = nMaxStrLen;
5419 aCharPropSet.
maString = aString.copy(nCharReadCnt, nStrLen);
5422 std::make_unique<PPTCharPropSet>(aCharPropSet, nCurrentPara));
5423 nCharReadCnt += nCharCount;
5424 bEmptyParaPossible =
false;
5437 rIn.
Seek( nOldPos );
5446 mrStyleSheet ( rStyleSheet ),
5447 mnInstance ( nInstance ),
5454 mrStyleSheet ( rStyleSheet ),
5455 mnInstance ( nInstance ),
5462 mrStyleSheet ( rPortionObj.mrStyleSheet ),
5463 mnInstance ( rPortionObj.mnInstance ),
5474 sal_uInt32 nMask = 1 << nAttr;
5479 if ( bIsHardAttribute )
5507 OSL_FAIL(
"SJ:PPTPortionObj::GetAttrib ( hard attribute does not exist )" );
5516 bIsHardAttribute =
true;
5517 else if ( nDestinationInstance !=
mnInstance )
5528 rRetValue = ( rCharLevel.
mnFlags & nMask ) ? 1 : 0;
5531 sal_uInt32 nTmp = ( pCharLevel->
mnFlags & nMask ) ? 1 : 0;
5532 if ( rRetValue != nTmp )
5533 bIsHardAttribute =
true;
5539 rRetValue = rCharLevel.
mnFont;
5540 if ( pCharLevel && ( rRetValue != pCharLevel->
mnFont ) )
5541 bIsHardAttribute =
true;
5548 bIsHardAttribute =
true;
5554 if ( pCharLevel && ( rRetValue != pCharLevel->
mnFontHeight ) )
5555 bIsHardAttribute =
true;
5561 if ( pCharLevel && ( rRetValue != pCharLevel->
mnFontColor ) )
5562 bIsHardAttribute =
true;
5568 if ( pCharLevel && ( rRetValue != pCharLevel->
mnEscapement ) )
5569 bIsHardAttribute =
true;
5573 OSL_FAIL(
"SJ:PPTPortionObj::GetAttrib ( attribute does not exist )" );
5576 return bIsHardAttribute;
5581 ApplyTo(
rSet, rManager, nDestinationInstance,
nullptr );
5608 sal_uInt32 nAsianFontId = 0xffff;
5611 if ( nAsianFontId != 0xffff )
5614 if ( pFontEnityAtom )
5626 if ( pFontEnityAtom )
5631 if ( RTL_TEXTENCODING_SYMBOL == pFontEnityAtom->
eCharSet )
5640 sal_uInt32 nHeight = rManager.
ScalePoint( nVal );
5679 if ( aSize.
Width () > 64 )
5681 if ( aSize.
Height() > 64 )
5691 if( pAcc->HasPalette() )
5695 Scanline pScanline = pAcc->GetScanline( nY );
5698 const BitmapColor& rCol = pAcc->GetPaletteColor( pAcc->GetIndexFromData( pScanline, nX ) );
5699 nRt+=rCol.GetRed(); nGn+=rCol.GetGreen(); nBl+=rCol.GetBlue();
5707 Scanline pScanline = pAcc->GetScanline( nY );
5710 const BitmapColor aCol( pAcc->GetPixelFromData( pScanline, nX ) );
5711 nRt+=aCol.GetRed(); nGn+=aCol.GetGreen(); nBl+=aCol.GetBlue();
5734 if ( pFillStyleItem )
5736 drawing::FillStyle eFillStyle = pFillStyleItem->GetValue();
5737 switch( eFillStyle )
5739 case drawing::FillStyle_SOLID :
5742 if ( pFillColorItem )
5746 case drawing::FillStyle_GRADIENT :
5749 if ( pGradientItem )
5753 case drawing::FillStyle_HATCH :
5754 case drawing::FillStyle_BITMAP :
5777 else if ( nVal & 0x0f000000 )
5781 if ( aColorInSheet != aCol )
5788 sal_uInt16 nEsc = 0;
5793 nEsc =
static_cast<sal_Int16
>(nVal);
5816 sal_uInt16 sanitizeForMaxPPTLevels(sal_uInt16 nDepth)
5820 SAL_WARN(
"filter.ms",
"Para Style Sheet depth " << nDepth <<
" but " <<
nMaxPPTLevels - 1 <<
" is max possible");
5829 mrStyleSheet ( rStyleSheet ),
5830 mnInstance ( nInstance ),
5831 mnCurrentObject ( 0 )
5833 mxParaSet->mnDepth = sanitizeForMaxPPTLevels(nDepth);
5837 size_t const nCurParaPos,
size_t& rnCurCharPos,
5843 mrStyleSheet ( rStyleSheet ),
5844 mnInstance ( nInstance ),
5845 mnCurrentObject ( 0 )
5850 sal_uInt32
const nCurrentParagraph =
5853 rPropReader.
aCharPropList[rnCurCharPos]->mnParagraph == nCurrentParagraph;
5858 std::unique_ptr<PPTPortionObj> pPPTPortion(
new PPTPortionObj(
5859 *pCharPropSet, rStyleSheet, nInstance,
mxParaSet->mnDepth));
5871 std::make_unique<PPTPortionObj>(rPPTPortion));
5876 if ( nBulletRelSize <= 0x7fff )
5879 sal_uInt16 nFontHeight = 0;
5893 nBulletRelSize = nFontHeight ? ((-
static_cast<sal_Int16
>(nBulletRelSize)) * 100 ) / nFontHeight : 100;
5898 sal_uInt32 nMask = 1 << nAttr;
5903 OSL_FAIL(
"SJ:PPTParagraphObj::GetAttrib - attribute does not exist" );
5907 bool bIsHardAttribute = ( (
mxParaSet->mnAttrSet & nMask ) != 0 );
5909 sal_uInt16 nDepth = sanitizeForMaxPPTLevels(
mxParaSet->mnDepth);
5911 if ( bIsHardAttribute )
5915 bool bHardBulletColor;
5921 if ( bHardBulletColor )
5978 bIsHardAttribute =
true;
5979 else if ( nDestinationInstance !=
mnInstance )
5989 bIsHardAttribute =
true;
5996 OSL_FAIL(
"SJ:PPTParagraphObj::GetAttrib - this attribute does not make sense" );
6001 if ( pParaLevel && ( rRetValue != pParaLevel->
mnBulletChar ) )
6002 bIsHardAttribute =
true;
6015 if ( pParaLevel && ( rRetValue != pParaLevel->
mnBulletFont ) )
6016 bIsHardAttribute =
true;
6029 bIsHardAttribute =
true;
6038 bIsHardAttribute =
true;
6043 bool bHardBulletColor;
6048 if ( bHardBulletColor )
6051 if ( pParaLevel && ( rRetValue != pParaLevel->
mnBulletColor ) )
6052 bIsHardAttribute =
true;
6065 bIsHardAttribute =
true;
6075 bIsHardAttribute =
true;
6083 if ( pParaLevel && ( rRetValue != pParaLevel->
mnAdjust ) )
6084 bIsHardAttribute =
true;
6090 if ( pParaLevel && ( rRetValue != pParaLevel->
mnLineFeed ) )
6091 bIsHardAttribute =
true;
6097 if ( pParaLevel && ( rRetValue != pParaLevel->
mnUpperDist ) )
6098 bIsHardAttribute =
true;
6104 if ( pParaLevel && ( rRetValue != pParaLevel->
mnLowerDist ) )
6105 bIsHardAttribute =
true;
6111 if ( pParaLevel && ( rRetValue != pParaLevel->
mnTextOfs ) )
6112 bIsHardAttribute =
true;
6118 if ( pParaLevel && ( rRetValue != pParaLevel->
mnBulletOfs ) )
6119 bIsHardAttribute =
true;
6125 if ( pParaLevel && ( rRetValue != pParaLevel->
mnDefaultTab ) )
6126 bIsHardAttribute =
true;
6132 if ( pParaLevel && ( rRetValue != (
static_cast<sal_uInt32
>(pParaLevel->
mnAsianLineBreak) & 1 ) ) )
6133 bIsHardAttribute =
true;
6139 if ( pParaLevel && ( rRetValue != ( (
static_cast<sal_uInt32
>(pParaLevel->
mnAsianLineBreak) >> 1 ) & 1 ) ) )
6140 bIsHardAttribute =
true;
6146 if ( pParaLevel && ( rRetValue != ( (
static_cast<sal_uInt32
>(pParaLevel->
mnAsianLineBreak) >> 2 ) & 1 ) ) )
6147 bIsHardAttribute =
true;
6152 rRetValue = rParaLevel.
mnBiDi;
6153 if ( pParaLevel && ( rRetValue != pParaLevel->
mnBiDi ) )
6154 bIsHardAttribute =
true;
6159 return bIsHardAttribute;
6165 sal_uInt32 nVal, nUpperDist, nLowerDist;
6171 if ( pNumBulletItem )
6174 if (
GetNumberFormat( rManager, aNumberFormat,
this, nDestinationInstance, rStartNumbering ) )
6191 sal_uInt16
n = sanitizeForMaxPPTLevels(
i);
6205 rSet.
Put( aNewNumBulletItem );
6210 sal_uInt32 nIsBullet2, _nTextOfs, _nBulletOfs;
6228 static SvxAdjust const aAdj[ 4 ] = { SvxAdjust::Left, SvxAdjust::Center, SvxAdjust::Right, SvxAdjust::Block };
6244 nVal2 =
static_cast<sal_Int16
>(nVal);
6245 sal_uInt32 nFont = sal_uInt32();
6247 bIsHardAttribute =
true;
6249 if ( bIsHardAttribute )
6251 SdrTextFixedCellHeightItem aHeightItem(
true);
6261 sal_uInt16 nPropLineSpace =
static_cast<sal_uInt16
>(nVal2);
6271 if ( ( nUpperDist > 0 ) || ( nLowerDist > 0 ) )
6275 sal_uInt32 nFontHeight = 0;
6278 if (
static_cast<sal_Int16
>(nUpperDist) > 0 )
6279 nUpperDist = -
static_cast<sal_Int16
>( ( nFontHeight * nUpperDist * 100 ) / 1000 );
6280 if (
static_cast<sal_Int16
>(nLowerDist) > 0 )
6281 nLowerDist = -
static_cast<sal_Int16
>( ( nFontHeight * nLowerDist * 100 ) / 1000 );
6283 bIsHardAttribute =
true;
6285 if ( bIsHardAttribute )
6288 nVal2 =
static_cast<sal_Int16
>(nUpperDist);
6294 aULSpaceItem.
SetPropUpper(
static_cast<sal_uInt16
>(nUpperDist) == 100 ? 101 :
static_cast<sal_uInt16
>(nUpperDist) );
6296 nVal2 =
static_cast<sal_Int16
>(nLowerDist);
6302 aULSpaceItem.
SetPropLower(
static_cast<sal_uInt16
>(nLowerDist) == 100 ? 101 :
static_cast<sal_uInt16
>(nLowerDist) );
6307 sal_uInt32
i, nDefaultTab, nTab, nTextOfs2 = 0;
6308 sal_uInt32 nLatestManTab = 0;
6322 case 1 : eTabAdjust = SvxTabAdjust::Center;
break;
6323 case 2 : eTabAdjust = SvxTabAdjust::Right;
break;
6324 case 3 : eTabAdjust = SvxTabAdjust::Decimal;
break;
6325 default : eTabAdjust = SvxTabAdjust::Left;
6329 nLatestManTab = nTab;
6331 if ( nIsBullet2 == 0 )
6335 nTab = std::max( nTextOfs2, nLatestManTab );
6336 nTab /= nDefaultTab;
6337 nTab = nDefaultTab * ( 1 + nTab );
6338 for (
i = 0; (
i < 20 ) && ( nTab < 0x1b00 );
i++ )
6341 nTab += nDefaultTab;
6349 sal_uInt32
nCount, nRetValue = 0;
6384 eDateFormat = SvxDateFormat::AppDefault;
6385 eTimeFormat = SvxTimeFormat::AppDefault;
6391 eDateFormat = SvxDateFormat::A;
6394 eDateFormat = SvxDateFormat::F;
6398 eDateFormat = SvxDateFormat::D;
6402 eDateFormat = SvxDateFormat::C;
6405 eDateFormat = SvxDateFormat::A;
6408 eTimeFormat = SvxTimeFormat::HH24_MM;
6411 eDateFormat = SvxDateFormat::A;
6414 eTimeFormat = SvxTimeFormat::HH12_MM;
6417 eTimeFormat = SvxTimeFormat::HH24_MM_SS;
6420 eTimeFormat = SvxTimeFormat::HH12_MM_SS;
6430 if ( eDateFormat != SvxDateFormat::AppDefault )
6432 if ( eTimeFormat != SvxTimeFormat::AppDefault )
6436 xField2 = std::move(xFieldItem);
6438 xField1 = std::move(xFieldItem);
6460 if ( !(( pObjData ==
nullptr ) || ( pObjData->
bShapeType )) )
6473 sal_uInt32 nOldPos = rIn.
Tell();
6481 rIn.
Seek( nOldPos );
6493 bool bStatus =
true;
6497 sal_uInt32 nTextRulerAtomOfs = 0;
6512 nTextRulerAtomOfs = rIn.
Tell();
6514 nTextRulerAtomOfs = 0xffffffff;
6532 if ( !aExtParaHd.nRecType )
6534 sal_uInt32 nOldPos = rIn.
Tell();
6545 sal_uInt32 nTmpSlideId(0), nTmpRef;
6549 if ( ( nTmpSlideId == nSlideId ) && ( pHd->
nRecInstance == nRefNum ) )
6556 aExtParaHd = aPresRuleHd;
6560 pHd = pExtParaProv->
6563 if ( pHd == pFirst )
6566 rIn.
Seek( nOldPos );
6573 if ( (!
pE) || (!
pE->nSlidePersistStartOffset) || (
pE->aPersistAtom.nSlideId != nSlideId ) )
6577 auto nOffset(
pE->nSlidePersistStartOffset);
6578 bStatus = (nOffset == rIn.
Seek(nOffset));
6582 while (bStatus && rIn.
Tell() < nEndRecPos)
6596 if ( rIn.
Tell() >
pE->nSlidePersistEndOffset )
6608 while (rIn.
Tell() < nEndRecPos)
6639 sal_uInt32 nFilePos = rIn.
Tell();
6651 aTextRulerInterpreter, aExtParaHd, nInstance );
6668 sal_uInt32 nCharIdx = rSpecInfo.
nCharIdx;
6671 for ( ; nI < aStyleTextPropReader.
aCharPropList.size(); ++nI)
6680 if (pSet->
maString.getLength() <= 1)
6683 sal_Int32 nNewLen = nIndexOfNextPortion - nCharIdx;
6686 sal_Int32 nOldLen = pSet->
maString.getLength() - nNewLen;
6691 pSet->
maString = aString.copy(0, nOldLen);
6692 pNew->
maString = aString.copy(nOldLen, nNewLen);
6703 OSL_FAIL(
"SdrTextSpecInfoAtomInterpreter::Ctor(): parsing error, this document needs to be analysed (SJ)" );
6710 rIn.
Seek( nFilePos );
6711 ::std::vector< std::unique_ptr<PPTFieldEntry> > FieldList;
6713 while (rIn.
Tell() < nEndRecPos)
6716 sal_uInt16 nVal = 0;
6717 std::unique_ptr<PPTFieldEntry> xEntry;
6726 xEntry->SetDateTime( nVal & 0xff );
6795 OUStringBuffer
aStr;
6796 bool inquote =
false;
6797 for (
int nLen = 0; nLen < 64; ++nLen)
6808 xEntry->xString =
aStr.makeStringAndClear();
6820 aStr.append(OUStringChar(
n));
6824 if (!xEntry->xString)
6858 sal_uInt32 nStartPos, nEndPos;
6864 xEntry->nPos =
static_cast<sal_uInt16
>(nStartPos);
6865 xEntry->nTextRangeEnd =
static_cast<sal_uInt16
>(nEndPos);
6866 OUString aTarget( rHyperlink.
aTarget );
6886 auto it = std::find_if(FieldList.begin(), FieldList.end(),
6887 [&xEntry](
const std::unique_ptr<PPTFieldEntry>& rxField) {
6888 return rxField->nPos < xEntry->nPos; });
6889 if ( it != FieldList.end() ) {
6890 FieldList.insert(it, std::move(xEntry));
6892 FieldList.push_back( std::move(xEntry));
6896 if ( !FieldList.empty() )
6898 auto FE = FieldList.begin();
6901 sal_Int32
i = nParagraphs - 1;
6902 sal_Int32
n = aCharPropList.size() - 1;
6906 while( ( FE < FieldList.end() ) && (
n >= 0 ) && (
i >= 0 ) )
6909 OUString aString( pSet->
maString );
6910 sal_uInt32
nCount = aString.getLength();
6912 while ( ( FE < FieldList.end() ) &&
nCount-- )
6915 FE = std::find_if(FE, FieldList.end(),
6916 [&
nPos](
const std::unique_ptr<PPTFieldEntry>& rxField) {return rxField->nPos <= nPos;});
6917 if (FE == FieldList.end())
6920 if ( (*FE)->nPos ==
nPos )
6922 if ( aString[
nCount] == 0x2a )
6924 sal_uInt32 nBehind = aString.getLength() - (
nCount + 1 );
6930 aCharPropList.emplace( aCharPropList.begin() +
n + 1, pNewCPS );
6932 if ( (*FE)->xField2 )
6936 aCharPropList.emplace( aCharPropList.begin() +
n + 1, pNewCPS );
6940 aCharPropList.emplace( aCharPropList.begin() +
n + 1, pNewCPS );
6946 aCharPropList.emplace( aCharPropList.begin() +
n++, pNewCPS );
6948 if ( (*FE)->xField1 )
6952 else if ( (*FE)->xString )
6957 if ( (*FE)->nTextRangeEnd )
6959 sal_uInt32 nHyperLen = (*FE)->nTextRangeEnd -
nPos;
6968 sal_uInt32 nIdx =
n;
6969 sal_Int32 nHyperLenLeft = nHyperLen;
6971 while ( ( aCharPropList.size() > nIdx ) && nHyperLenLeft )
6977 sal_Int32 nNextStringLen = pCurrent->
maString.getLength();
6979 DBG_ASSERT( (*FE)->xField1,
"missing field!" );
6980 if (!(*FE)->xField1)
7000 else if ( nNextStringLen )
7002 if ( nNextStringLen <= nHyperLenLeft )
7005 nHyperLenLeft -= nNextStringLen;
7007 if ( nHyperLenLeft )
7011 if ( aCharPropList.size() > ( nIdx + 1 ) )
7022 pNewCPS->
maString = pCurrent->
maString.copy( nHyperLenLeft,( nNextStringLen - nHyperLenLeft ) );
7023 aCharPropList.emplace( aCharPropList.begin() + nIdx + 1, pNewCPS );
7024 OUString aRepresentation = pCurrent->
maString.copy( 0, nHyperLenLeft );
7033 (*FE)->xField1.reset();
7038 aCharPropList.emplace( aCharPropList.begin() +
n, pBefCPS );
7051 for (
size_t nCurCharPos = 0, nCurPos = 0;
7057 aStyleTextPropReader, nCurPos, nCurCharPos,
7059 nInstance, aTextRulerInterpreter ) );
7061 sal_uInt32 nParaAdjust, nFlags = 0;
7064 switch ( nParaAdjust )
7104 return &
mxImplTextObj->mrPersistEntry.pBObj->GetMergedItemSet();
7111 if (
this != &rTextObj )
7120 auto pSdrPathObj =
dynamic_cast< const SdrPathObj*
>(pObj);
7121 return pSdrPathObj && pSdrPathObj->
IsLine() && pSdrPathObj->GetPointCount() == 2;
7125 sal_Int32& nTableIndex, sal_Int32& nRow, sal_Int32& nRowCount, sal_Int32& nColumn, sal_Int32& nColumnCount )
7128 bool bCellObject = ( aSnapRect.
GetWidth() > 1 ) && ( aSnapRect.
GetHeight() > 1 );
7131 auto aRowIter = rRows.
find( aSnapRect.
Top() );
7132 auto aColumnIter = rColumns.
find( aSnapRect.
Left() );
7133 if ( ( aRowIter == rRows.
end() ) || ( aColumnIter == rColumns.
end() ) )
7134 bCellObject =
false;
7138 nRow = std::distance( rRows.
begin(), aRowIter );
7139 while( ++aRowIter != rRows.
end() )
7141 if ( *aRowIter >= aSnapRect.
Bottom() )
7146 nColumn = std::distance( rColumns.
begin(), aColumnIter );
7147 while( ++aColumnIter != rColumns.
end() )
7149 if ( *aColumnIter >= aSnapRect.
Right() )
7153 nTableIndex = nRow * rColumns.
size() + nColumn;
7159#define LinePositionLeft 0x01000000
7160#define LinePositionTop 0x02000000
7161#define LinePositionRight 0x04000000
7162#define LinePositionBottom 0x08000000
7163#define LinePositionTLBR 0x10000000
7164#define LinePositionBLTR 0x20000000
7170 auto aRow = rRows.
find( rSnapRect.
Top() );
7171 if ( aRow == rRows.
end() )
7174 sal_Int32 nRow = std::distance( rRows.
begin(), aRow );
7175 while( ( aRow != rRows.
end() ) && ((*aRow) < rSnapRect.
Bottom() ) )
7191 auto aColumn = rColumns.
find( rSnapRect.
Left() );
7192 if ( aColumn == rColumns.
end() )
7195 sal_Int32 nColumn = std::distance( rColumns.
begin(), aColumn );
7196 while( ( aColumn != rColumns.
end() ) && ((*aColumn) < rSnapRect.
Right() ) )
7212 if ( aSnapRect.
Left() == aSnapRect.
Right() )
7214 auto aColumn = rColumns.
find( aSnapRect.
Left() );
7215 if ( ( aColumn != rColumns.
end() ) || ( aSnapRect.
Left() == rGroupSnap.
Right() ) )
7217 sal_Int32 nColumn, nFlags;
7218 if ( aColumn != rColumns.
end() )
7220 nColumn = std::distance( rColumns.
begin(), aColumn );
7222 if ( aColumn != rColumns.
begin() )
7227 nColumn = rColumns.
size();
7230 GetRowPositions( aSnapRect, rRows, rColumns, rPositions, nColumn, nFlags );
7233 else if ( aSnapRect.
Top() == aSnapRect.
Bottom() )
7235 auto aRow = rRows.
find( aSnapRect.
Top() );
7236 if ( ( aRow != rRows.
end() ) || ( aSnapRect.
Top() == rGroupSnap.
Bottom() ) )
7238 sal_Int32 nRow, nFlags;
7239 if ( aRow != rRows.
end() )
7241 nRow = std::distance( rRows.
begin(), aRow );
7243 if ( aRow != rRows.
begin() )
7248 nRow = rRows.
size();
7256 sal_uInt32 nPosition = 0;
7259 if ( aPt1.
X() < aPt2.
X() )
7264 auto aRow = rRows.
find( std::min(aPt1.
Y(), aPt2.
Y() ) );
7265 auto aColumn = rColumns.
find( std::min(aPt1.
X(), aPt2.
X() ) );
7266 if ( ( aRow != rRows.
end() ) && ( aColumn != rColumns.
end() ) )
7268 nPosition |= ( std::distance( rRows.
begin(), aRow ) * rColumns.
size() ) + std::distance( rColumns.
begin(), aColumn );
7269 rPositions.push_back( nPosition );
7276 if ( rRows.
size() > 1 )
7277 xTableRows->insertByIndex( 0, rRows.
size() - 1 );
7279 auto aIter = rRows.
begin();
7280 sal_Int32 nLastPosition( *aIter );
7281 for ( sal_Int32
n = 0;
n < xTableRows->getCount();
n++ )
7284 if ( ++aIter != rRows.
end() )
7286 if (o3tl::checked_sub<sal_Int32>(*aIter, nLastPosition, nHeight))
7287 throw lang::IllegalArgumentException();
7288 nLastPosition = *aIter;
7292 if (o3tl::checked_sub<sal_Int32>(nTableBottom, nLastPosition, nHeight))
7293 throw lang::IllegalArgumentException();
7296 Reference< XPropertySet > xPropSet( xTableRows->getByIndex(
n ), UNO_QUERY_THROW );
7297 xPropSet->setPropertyValue(
"Height",
Any( nHeight ) );
7303 if ( rColumns.
size() > 1 )
7304 xTableColumns->insertByIndex( 0, rColumns.
size() - 1 );
7306 auto aIter = rColumns.
begin();
7307 sal_Int32 nLastPosition( *aIter );
7308 for ( sal_Int32
n = 0;
n < xTableColumns->getCount();
n++ )
7311 if ( ++aIter != rColumns.
end() )
7313 if (o3tl::checked_sub<sal_Int32>(*aIter, nLastPosition, nWidth))
7314 throw lang::IllegalArgumentException();
7315 nLastPosition = *aIter;
7319 if (o3tl::checked_sub<sal_Int32>(nTableRight, nLastPosition, nWidth))
7320 throw lang::IllegalArgumentException();
7323 Reference< XPropertySet > xPropSet( xTableColumns->getByIndex(
n ), UNO_QUERY_THROW );
7324 xPropSet->setPropertyValue(
"Width",
Any( nWidth ) );
7328static void MergeCells(
const Reference< XTable >& xTable, sal_Int32 nCol, sal_Int32 nRow, sal_Int32 nColSpan, sal_Int32 nRowSpan )
7330 DBG_ASSERT( (nColSpan > 1) || (nRowSpan > 1),
"nonsense parameter!!" );
7331 DBG_ASSERT( (nCol >= 0) && (nCol < xTable->getColumnCount()) && (nRow >= 0) && (nRow < xTable->getRowCount()),
"the cell does not exists!!" );
7332 DBG_ASSERT( (nColSpan >= 1) && ((nCol + nColSpan - 1) < xTable->getColumnCount()),
"nColSpan botch!" );
7333 DBG_ASSERT( (nRowSpan >= 1) && ((nRow + nRowSpan - 1) < xTable->getRowCount()),
"nRowSpan botch!" );
7335 if( xTable.is() )
try
7337 Reference< XMergeableCellRange > xRange( xTable->createCursorByRange( xTable->getCellRangeByPosition( nCol, nRow,nCol + nColSpan - 1, nRow + nRowSpan - 1 ) ), UNO_QUERY_THROW );
7338 if( xRange->isMergeable() )
7351 Reference< XPropertySet > xPropSet( xCell, UNO_QUERY_THROW );
7357 xPropSet->setPropertyValue(
"TextUpperDistance",
Any( nUpperDist ) );
7358 xPropSet->setPropertyValue(
"TextRightDistance",
Any( nRightDist ) );
7359 xPropSet->setPropertyValue(
"TextLeftDistance",
Any( nLeftDist ) );
7360 xPropSet->setPropertyValue(
"TextLowerDistance",
Any( nLowerDist ) );
7363 drawing::TextVerticalAdjust eVA( drawing::TextVerticalAdjust_TOP );
7365 eVA = drawing::TextVerticalAdjust_CENTER;
7367 eVA = drawing::TextVerticalAdjust_BOTTOM;
7368 xPropSet->setPropertyValue(
"TextVerticalAdjust",
Any( eVA ) );
7373 xPropSet->setPropertyValue(
"TextHorizontalAdjust" ,
Any( eHA ) );
7374 if ( eDirection == SvxFrameDirection::Vertical_RL_TB )
7376 xPropSet->setPropertyValue(
"TextWritingMode" ,
Any( css::text::WritingMode_TB_RL ) );
7379 css::drawing::FillStyle eFS( css::drawing::FillStyle_NONE );
7380 switch( eFillStyle )
7382 case drawing::FillStyle_SOLID :
7384 eFS = css::drawing::FillStyle_SOLID;
7386 xPropSet->setPropertyValue(
"FillColor",
Any( aFillColor ) );
7389 case drawing::FillStyle_GRADIENT :
7391 eFS = css::drawing::FillStyle_GRADIENT;
7394 css::awt::Gradient aGradient;
7396 aGradient.StartColor =
static_cast<sal_Int32
>(
Color(aBGradient.
GetColorStops().front().getStopColor()));
7397 aGradient.EndColor =
static_cast<sal_Int32
>(
Color(aBGradient.
GetColorStops().back().getStopColor()));
7398 aGradient.Angle =
static_cast<short>(aBGradient.
GetAngle());
7399 aGradient.Border = aBGradient.
GetBorder();
7404 aGradient.StepCount = aBGradient.
GetSteps();
7406 xPropSet->setPropertyValue(
"FillGradient",
Any( aGradient ) );
7409 case drawing::FillStyle_HATCH :
7410 eFS = css::drawing::FillStyle_HATCH;
7412 case drawing::FillStyle_BITMAP :
7414 eFS = css::drawing::FillStyle_BITMAP;
7418 uno::Reference<awt::XBitmap> xBitmap(xGraphic, uno::UNO_QUERY);
7419 xPropSet->setPropertyValue(
"FillBitmap",
uno::Any(xBitmap));
7423 if( rTileItem.GetValue() )
7424 xPropSet->setPropertyValue(
"FillBitmapMode",
uno::Any(drawing::BitmapMode_REPEAT));
7425 else if( rStretchItem.GetValue() )
7426 xPropSet->setPropertyValue(
"FillBitmapMode",
uno::Any(drawing::BitmapMode_STRETCH));
7428 xPropSet->setPropertyValue(
"FillBitmapMode",
uno::Any(drawing::BitmapMode_NO_REPEAT));
7432 case drawing::FillStyle_NONE :
7433 eFS = css::drawing::FillStyle_NONE;
7437 xPropSet->setPropertyValue(
"FillStyle",
Any( eFS ) );
7438 if ( eFillStyle != drawing::FillStyle_NONE )
7441 xPropSet->setPropertyValue(
"FillTransparence",
Any( nFillTransparence ) );
7454 css::table::BorderLine2 aBorderLine;
7455 switch( eLineStyle )
7457 case drawing::LineStyle_DASH :
7458 case drawing::LineStyle_SOLID :
7461 aBorderLine.Color = sal_Int32(aLineColor);
7464 aBorderLine.LineWidth =
static_cast< sal_Int16
>(
nLineWidth );
7465 aBorderLine.LineStyle = eLineStyle == drawing::LineStyle_SOLID ? table::BorderLineStyle::SOLID : table::BorderLineStyle::DASHED;
7469 case drawing::LineStyle_NONE :
7471 aBorderLine.LineWidth = 0;
7472 aBorderLine.LineStyle = table::BorderLineStyle::NONE;
7476 for (
auto const& vPos : vPositions)
7478 sal_Int32 nPosition = vPos & 0xffffff;
7479 sal_Int32 nFlags = vPos &~0xffffff;
7480 sal_Int32 nRow = nPosition / nColumns;
7481 sal_Int32 nColumn = nPosition - ( nRow * nColumns );
7482 Reference< XCell > xCell( xTable->getCellByPosition( nColumn, nRow ) );
7483 Reference< XPropertySet > xPropSet( xCell, UNO_QUERY_THROW );
7486 xPropSet->setPropertyValue(
"LeftBorder",
Any( aBorderLine ) );
7488 xPropSet->setPropertyValue(
"TopBorder",
Any( aBorderLine ) );
7490 xPropSet->setPropertyValue(
"RightBorder",
Any( aBorderLine ) );
7492 xPropSet->setPropertyValue(
"BottomBorder",
Any( aBorderLine ) );
7494 xPropSet->setPropertyValue(
"DiagonalTLBR",
Any(
true ) );
7496 xPropSet->setPropertyValue(
"DiagonalBLTR",
Any(
true ) );
7505 SdrObject* pGroup,
const sal_uInt32* pTableArry,
7511 sal_uInt32 nRows = pTableArry[ 1 ];
7526 SdrObjListIter aGroupIter( pSubList, SdrIterMode::DeepNoGroups,
false );
7527 while( aGroupIter.
IsMore() )
7543 Reference< XTable > xTable( pTable->getTable() );
7550 sal_Int32 nCellCount = aRows.
size() * aColumns.
size();
7551 std::unique_ptr<sal_Int32[]> pMergedCellIndexTable(
new sal_Int32[ nCellCount ]);
7552 for ( sal_Int32
i = 0;
i < nCellCount;
i++ )
7553 pMergedCellIndexTable[
i ] =
i;
7556 while( aGroupIter.
IsMore() )
7561 sal_Int32 nTableIndex = 0;
7563 sal_Int32 nRowCount = 0;
7564 sal_Int32 nColumn = 0;
7565 sal_Int32 nColumnCount = 0;
7566 if (
GetCellPosition( pObj, aRows, aColumns, nTableIndex, nRow, nRowCount, nColumn, nColumnCount ) )
7568 Reference< XCell > xCell( xTable->getCellByPosition( nColumn, nRow ) );
7572 if ( ( nRowCount > 1 ) || ( nColumnCount > 1 ) )
7574 MergeCells( xTable, nColumn, nRow, nColumnCount, nRowCount );
7575 for ( sal_Int32 nRowIter = 0; nRowIter < nRowCount; nRowIter++ )
7577 for ( sal_Int32 nColumnIter = 0; nColumnIter < nColumnCount; nColumnIter++ )
7579 pMergedCellIndexTable[ ( ( nRow + nRowIter ) * aColumns.
size() ) + nColumn + nColumnIter ] = nTableIndex;
7588 SdrText* pSdrText = pTable->getText( nTableIndex );
7596 while( aGroupIter.
IsMore() )
7601 std::vector< sal_Int32 > vPositions;
7605 for (
auto & vPos : vPositions)
7607 sal_Int32 nOldPosition = vPos & 0xffff;
7608 sal_Int32 nOldFlags = vPos & 0xffff0000;
7609 sal_Int32 nNewPosition = pMergedCellIndexTable[ nOldPosition ] | nOldFlags;
7610 vPos = nNewPosition;
7615 pMergedCellIndexTable.reset();
7619 if ( pSolverContainer )
7621 for (
auto & pPtr : pSolverContainer->
aCList)
7624 if ( pPtr->pAObj == pGroup )
7625 pPtr->pAObj =
nullptr;
7626 if ( pPtr->pBObj == pGroup )
7627 pPtr->pBObj =
nullptr;
7634 if ( pPtr->pAObj == pPartObj )
7635 pPtr->pAObj =
nullptr;
7636 if ( pPtr->pBObj == pPartObj )
7637 pPtr->pBObj =
nullptr;
7645 if ( pPtr->pAObj == pGroup )
7646 pPtr->pAObj = pTable.get();
7647 if ( pPtr->pBObj == pGroup )
7648 pPtr->pBObj = pTable.get();
7651 pTable->uno_unlock();
7662 std::replace(rBackgroundColoredObjects.begin(), rBackgroundColoredObjects.end(), pPartObj, pRet.get());
7667 pTable->uno_unlock();
7676 bool bVerticalText =
false;
7685 bVerticalText = !bVerticalText;
7691 return bVerticalText;
7712 switch( eTextAnchor )
7733 switch ( eTextAnchor )
7741 if ( ( nTextFlags & nMask ) != nMask )
7764 switch( eTextAnchor )
7786 switch ( eTextAnchor )
7794 if ( ( nTextFlags & nMask ) != nMask )
constexpr auto convertMasterUnitToMm100(N n)
static OutputDevice * GetDefaultDevice()
Bitmap GetBitmap(Color aTransparentReplaceColor) const
Size GetSizePixel() const
sal_uInt8 GetBlue() const
void SetGreen(sal_uInt8 nGreen)
void SetRed(sal_uInt8 nRed)
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 SeekToContent(sal_uInt32 nRecType, SvStream &rSt) const
void ReadPropSet(SvStream &rIn, SvxMSDffClientData *pClientData) const
void ApplyAttributes(SvStream &rIn, SfxItemSet &rSet) const
static Degree100 Fix16ToAngle(sal_Int32 nAngle)
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)
sal_Int32 GetNumerator() const
sal_Int32 GetDenominator() const
const Graphic & GetGraphic() const
css::uno::Reference< css::graphic::XGraphic > GetXGraphic() const
const GDIMetaFile & GetGDIMetaFile() const
GraphicType GetType() const
BitmapEx GetBitmapEx(const GraphicConversionParameters &rParameters=GraphicConversionParameters()) const
MapMode GetPrefMapMode() const
SAL_WARN_UNUSED_RESULT Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
bool IsFontAvailable(std::u16string_view rFontName) const
const SdrPowerPointImport * mpPPTImporter
virtual void GetDrawPage() override
virtual bool InsertControl(const css::uno::Reference< css::form::XFormComponent > &rFComp, const css::awt::Size &rSize, css::uno::Reference< css::drawing::XShape > *pShape, bool bFloatingCtrl) override
bool ReadOCXStream(tools::SvRef< SotStorage > &rSrc1, css::uno::Reference< css::drawing::XShape > *pShapeRef)
DffRecordManager aExtendedPresRules
::std::vector< std::unique_ptr< PPTBuGraEntry > > aBuGraList
bool GetGraphic(sal_uInt32 nInstance, Graphic &rGraphic) const
o3tl::enumarray< TSS_Type, PPTExtParaSheet > aExtParaSheet
PPTExtParaProv(SdrPowerPointImport &rManager, SvStream &rSt, const DffRecordHeader *pMainMasterHd)
void AppendPortion(PPTPortionObj &rPortion)
const PPTStyleSheet & mrStyleSheet
PPTParagraphObj(PPTParagraphObj const &)=delete
void ApplyTo(SfxItemSet &rSet, std::optional< sal_Int16 > &rStartNumbering, SdrPowerPointImport const &rManager, TSS_Type nInstanceInSheet)
bool GetAttrib(sal_uInt32 nAttr, sal_uInt32 &nVal, TSS_Type nInstanceInSheet)
void UpdateBulletRelSize(sal_uInt32 &nBulletRelSize) const
::std::vector< std::unique_ptr< PPTPortionObj > > m_PortionList
sal_uInt32 mnCurrentObject
SvxFieldItem * GetTextField()
const PPTStyleSheet & mrStyleSheet
void ApplyTo(SfxItemSet &rSet, SdrPowerPointImport &rManager, TSS_Type nInstanceInSheet)
bool GetAttrib(sal_uInt32 nAttr, sal_uInt32 &nVal, TSS_Type nInstanceInSheet) const
PPTTextObj(SvStream &rSt, SdrPowerPointImport &, PptSlidePersistEntry &, DffObjData const *)
void SetVertical(bool bVertical)
PPTParagraphObj * First()
const std::optional< PptOEPlaceholderAtom > & GetOEPlaceHolderAtom() const
sal_uInt32 GetCurrentIndex() const
rtl::Reference< ImplPPTTextObj > mxImplTextObj
sal_uInt32 GetTextFlags() const
void SetDestinationInstance(TSS_Type nInstance)
const SfxItemSet * GetBackground() const
TSS_Type GetInstance() const
PPTTextObj & operator=(const PPTTextObj &rTextObj)
TSS_Type GetDestinationInstance() const
void SetInstance(TSS_Type nInstance)
constexpr tools::Long Y() const
constexpr tools::Long X() const
bool is_null(size_t nIdx) const
void push_back(std::unique_ptr< PptSlidePersistEntry > pEntry)
sal_uInt16 FindPage(sal_uInt32 nId) const
virtual const PptSlideLayoutAtom * GetSlideLayoutAtom() const
std::optional< std::vector< PptFontEntityAtom > > m_xFonts
virtual SdrObject * ReadObjText(PPTTextObj *pTextObj, SdrObject *pObj, SdPageCapsule pPage) const
virtual rtl::Reference< SdrObject > ProcessObj(SvStream &rSt, DffObjData &rData, SvxMSDffClientData &rClientData, tools::Rectangle &rTextRect, SdrObject *pObj) override
SdrEscherImport(PowerPointImportParam &, const OUString &rBaseURL)
virtual bool GetColorFromPalette(sal_uInt16 nNum, Color &rColor) const override
virtual bool SeekToShape(SvStream &rSt, SvxMSDffClientData *pClientData, sal_uInt32 nId) const override
bool ReadString(OUString &rStr) const
DffRecordManager aDocRecManager
void RecolorGraphic(SvStream &rSt, sal_uInt32 nRecLen, Graphic &rGraph)
void ImportHeaderFooterContainer(DffRecordHeader const &rHeader, HeaderFooterEntry &rEntry)
virtual void ProcessClientAnchor2(SvStream &rSt, DffRecordHeader &rHd, DffObjData &rObj) override
PowerPointImportParam & rImportParam
virtual ~SdrEscherImport() override
::std::vector< PPTOleEntry > aOleObjectList
const PptFontEntityAtom * GetFontEnityAtom(sal_uInt32 nNum) const
MapUnit GetScaleUnit() const
virtual rtl::Reference< SdrPage > AllocPage(bool bMasterPage)
const SfxItemPool & GetItemPool() const
const SdrPage * GetPage(sal_uInt16 nPgNum) const
sal_uInt16 GetPageCount() const
virtual SdrObjList * GetSubList() const override
virtual void NbcInsertObject(SdrObject *pObj, size_t nPos=SAL_MAX_SIZE)
static SdrObject * getSdrObjectFromXShape(const css::uno::Reference< css::uno::XInterface > &xInt)
const SfxPoolItem & GetMergedItem(const sal_uInt16 nWhich) const
void SetOutlinerParaObject(std::optional< OutlinerParaObject > pTextObject)
virtual SdrInventor GetObjInventor() const
virtual OutlinerParaObject * GetOutlinerParaObject() const
virtual const tools::Rectangle & GetSnapRect() const
void SetMergedItem(const SfxPoolItem &rItem)
void PutItemSet(const SfxItemSet &rSet)
void ClearItem(const sal_uInt16 nWhich=0)
css::uno::Reference< css::uno::XInterface > const & getUnoPage()
sal_Int32 GetUpperBorder() const
sal_Int32 GetRightBorder() const
sal_Int32 GetLeftBorder() const
SdrPageProperties & getSdrPageProperties()
sal_Int32 GetLowerBorder() const
tools::Long GetHeight() const
tools::Long GetWidth() const
std::unique_ptr< PptSlidePersistList > m_pSlidePages
sal_uInt16 GetMasterPageIndex(sal_uInt16 nPageNum, PptPageKind ePageKind=PPT_SLIDEPAGE) const
virtual bool GetColorFromPalette(sal_uInt16 nNum, Color &rColor) const override
sal_uLong m_nDocStreamPos
virtual SdrObject * ApplyTextObj(PPTTextObj *pTextObj, SdrTextObj *pText, SdPageCapsule pPage, SfxStyleSheet *, SfxStyleSheet **) const
void ApplyTextAnchorAttributes(PPTTextObj const &rTextObj, SfxItemSet &rSet) const
sal_uInt16 GetPageCount(PptPageKind eKind=PPT_SLIDEPAGE) const
sal_uInt16 m_nCurrentPageNum
::std::vector< SdHyperlinkEntry > m_aHyperList
rtl::Reference< SdrPage > MakeBlankPage(bool bMaster) const
virtual rtl::Reference< SdrObject > ImportOLE(sal_uInt32 nOLEId, const Graphic &rGraf, const tools::Rectangle &rBoundRect, const tools::Rectangle &rVisArea, const int _nCalledByGroup) const override
const PPTStyleSheet * m_pPPTStyleSheet
bool SeekToCurrentPage(DffRecordHeader *pRecHd) const
void ImportPage(SdrPage *pPage, const PptSlidePersistEntry *pMasterPersist)
PptSlidePersistList * GetPageList(PptPageKind ePageKind) const
virtual ~SdrPowerPointImport() override
void SeekOle(SfxObjectShell *pShell, sal_uInt32 nFilterOptions)
const PPTStyleSheet * m_pDefaultSheet
std::unique_ptr< sal_uInt32[]> m_pPersistPtr
virtual bool SeekToShape(SvStream &rSt, SvxMSDffClientData *pClientData, sal_uInt32 nId) const override
PptUserEditAtom m_aUserEditAtom
static bool SeekToContentOfProgTag(sal_Int32 nVersion, SvStream &rSt, const DffRecordHeader &rProgTagBinaryDataHd, DffRecordHeader &rContentHd)
PptColorSchemeAtom m_aPageColors
virtual const PptSlideLayoutAtom * GetSlideLayoutAtom() const override
sal_uInt16 m_nPageColorsNum
sal_uInt32 GetCurrentPageId()
std::unique_ptr< SvMemoryStream > ImportExOleObjStg(sal_uInt32 nPersistPtr, sal_uInt32 &nOleId) const
sal_uInt32 GetMasterPageId(sal_uInt16 nPageNum, PptPageKind ePageKind) const
rtl::Reference< SdrObject > ImportPageBackgroundObject(const SdrPage &rPage, sal_uInt32 &nBgFileOffset)
static SdrOutliner * GetDrawOutliner(SdrTextObj const *pSdrText)
PptPageKind m_eCurrentPageKind
std::unique_ptr< PptSlidePersistList > m_pNotePages
virtual bool ReadFormControl(tools::SvRef< SotStorage > &rSrc1, css::uno::Reference< css::form::XFormComponent > &rFormComp) const =0
PptPageKind m_ePageColorsKind
rtl::Reference< SdrObject > CreateTable(SdrObject *pGroupObject, const sal_uInt32 *pTableArry, SvxMSDffSolverContainer *pSolverContainer, std::vector< rtl::Reference< SdrObject > > &rBackgroundColoredObjects)
void SetPageNum(sal_uInt16 nPageNum, PptPageKind=PPT_SLIDEPAGE)
bool SeekToDocument(DffRecordHeader *pRecHd) const
bool IsVerticalText() const
bool ReadFontCollection()
sal_uInt32 m_nPersistPtrCnt
sal_uInt32 GetNotesPageId(sal_uInt16 nPageNum) const
std::unique_ptr< PptSlidePersistList > m_pMasterPages
bool IsNoteOrHandout(sal_uInt16 nPageNum) const
virtual SdrObject * ReadObjText(PPTTextObj *pTextObj, SdrObject *pObj, SdPageCapsule pPage) const override
bool HasMasterPage(sal_uInt16 nPageNum, PptPageKind ePageKind=PPT_SLIDEPAGE) const
SdrPowerPointImport(PowerPointImportParam &, const OUString &rBaseURL)
SdrOutliner & ImpGetDrawOutliner() const
virtual const Size & GetTextSize() const
virtual SdrObjKind GetObjIdentifier() const override
virtual void SetOutlinerParaObject(std::optional< OutlinerParaObject > pTextObject)
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
css::uno::Reference< css::embed::XStorage > const & GetStorage()
constexpr tools::Long Height() const
tools::Long AdjustHeight(tools::Long n)
void setWidth(tools::Long nWidth)
tools::Long AdjustWidth(tools::Long n)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
static SotStorage * OpenOLEStorage(css::uno::Reference< css::embed::XStorage > const &xStorage, OUString const &rEleName, StreamMode=StreamMode::STD_READWRITE)
const OUString & GetName() const
virtual sal_uInt64 TellEnd()
SvStream & ReadInt16(sal_Int16 &rInt16)
SvStream & ReadUInt32(sal_uInt32 &rUInt32)
SvStream & ReadUtf16(sal_Unicode &rUtf16)
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 & ReadSChar(signed char &rChar)
SvStream & ReadUInt16(sal_uInt16 &rUInt16)
sal_uInt64 remainingSize()
SvStream & ReadUChar(unsigned char &rChar)
static OUString GetMSBasicStorageName()
void SetTextFirstLineOffsetValue(const short nValue)
void SetTextLeft(const tools::Long nL, const sal_uInt16 nProp=100)
void SetPropLineSpace(const sal_uInt16 nProp)
void SetInterLineSpaceRule(SvxInterLineSpaceRule e)
void SetLineSpaceRule(SvxLineSpaceRule e)
void SetLineHeight(const sal_uInt16 nHeight)
const css::uno::Reference< css::container::XIndexContainer > & GetFormComps()
css::uno::Reference< css::frame::XModel > mxModel
const css::uno::Reference< css::lang::XMultiServiceFactory > & GetServiceFactory()
css::uno::Reference< css::drawing::XDrawPage > xDrawPage
abstract base class for Escher imports
DffRecordManager maShapeRecords
sal_Int32 ScalePoint(sal_Int32 nVal) const
sal_uInt32 nSvxMSDffOLEConvFlags
void Scale(sal_Int32 &rVal) 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.
virtual bool SeekToShape(SvStream &rSt, SvxMSDffClientData *pClientData, sal_uInt32 nId) const
void removeShapeId(SdrObject const *pShape)
std::vector< FIDCL > maFidcls
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
void SetDgContainer(SvStream &rSt)
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)
void ScaleEmu(sal_Int32 &rVal) const
void insertShapeId(sal_Int32 nShapeId, SdrObject *pShape)
rtl::Reference< SdrObject > ImportObj(SvStream &rSt, SvxMSDffClientData &rData, tools::Rectangle &rClientRect, const tools::Rectangle &rGlobalChildRect, int nCalledByGroup, sal_Int32 *pShapeId)
static bool SeekToRec(SvStream &rSt, sal_uInt16 nRecId, sal_uLong nMaxFilePos, DffRecordHeader *pRecHd=nullptr, sal_uLong nSkipCount=0)
static OUString MSDFFReadZString(SvStream &rIn, sal_uInt32 nMaxLen, bool bUniCode)
Color MSO_TEXT_CLR_ToColor(sal_uInt32 nColorCode) const
const SvxNumRule & GetNumRule() const
sal_uInt16 GetLevelCount() const
const SvxNumberFormat & GetLevel(sal_uInt16 nLevel) const
void SetLevel(sal_uInt16 nLevel, const SvxNumberFormat &rFmt, bool bIsValid=true)
void SetNumberingType(SvxNumType nSet)
SvxNumType GetNumberingType() const
bool Insert(const SvxTabStop &rTab)
void SetLower(const sal_uInt16 nL, const sal_uInt16 nProp=100)
void SetPropUpper(const sal_uInt16 nU)
void SetUpper(const sal_uInt16 nU, const sal_uInt16 nProp=100)
void SetPropLower(const sal_uInt16 nL)
void SetUpperValue(const sal_uInt16 nU)
void SetLowerValue(const sal_uInt16 nL)
const OUString & GetURL() const
static MapUnit UnoEmbed2VCLMapUnit(sal_Int32 nUnoEmbedMapUnit)
const Color & GetColorValue() const
const GraphicObject & GetGraphicObject() const
const basegfx::BGradient & GetGradientValue() const
tools::Long Decompress(SvStream &rIStm, SvStream &rOStm)
tools::Long EndCompression()
void BeginCompression(int nCompressLevel=ZCODEC_DEFAULT_COMPRESSION, bool gzLib=false)
sal_uInt16 GetBorder() const
sal_uInt16 GetStartIntens() const
sal_uInt16 GetSteps() const
sal_uInt16 GetXOffset() const
const basegfx::BColorStops & GetColorStops() const
sal_uInt16 GetEndIntens() const
Degree10 GetAngle() const
css::awt::GradientStyle GetGradientStyle() const
sal_uInt16 GetYOffset() const
const_iterator begin() const
const_iterator find(const Value &x) const
const_iterator end() const
std::pair< const_iterator, bool > insert(Value &&x)
void SetGraphic(const Graphic &rGraphic, const OUString &rMediaType)
SvStream * GetStream(StreamMode eMode)
void SetPitch(FontPitch ePitch)
void SetColor(const Color &)
void SetFontHeight(tools::Long nHeight)
void SetFamily(FontFamily)
void SetCharSet(rtl_TextEncoding)
void SetFamilyName(const OUString &rFamilyName)
rtl_TextEncoding GetCharSet() const
constexpr ::Color COL_WHITE(0xFF, 0xFF, 0xFF)
constexpr ::Color COL_BLACK(0x00, 0x00, 0x00)
#define DBG_ASSERT(sCon, aError)
#define DBG_UNHANDLED_EXCEPTION(...)
constexpr TypedWhichId< SvxHangingPunctuationItem > EE_PARA_HANGINGPUNCTUATION(EE_PARA_START+2)
constexpr TypedWhichId< SvxFontItem > EE_CHAR_FONTINFO_CJK(EE_CHAR_START+17)
constexpr TypedWhichId< SvxFieldItem > EE_FEATURE_FIELD(EE_FEATURE_NOTCONV+1)
constexpr TypedWhichId< SfxBoolItem > EE_PARA_BULLETSTATE(EE_PARA_START+9)
constexpr TypedWhichId< SvxTabStopItem > EE_PARA_TABS(EE_PARA_START+17)
constexpr TypedWhichId< SvxUnderlineItem > EE_CHAR_UNDERLINE(EE_CHAR_START+5)
constexpr TypedWhichId< SvxAdjustItem > EE_PARA_JUST(EE_PARA_START+16)
constexpr TypedWhichId< SvxFontHeightItem > EE_CHAR_FONTHEIGHT(EE_CHAR_START+2)
constexpr TypedWhichId< SvxShadowedItem > EE_CHAR_SHADOW(EE_CHAR_START+9)
constexpr TypedWhichId< SvxULSpaceItem > EE_PARA_ULSPACE(EE_PARA_START+14)
constexpr TypedWhichId< SvxLanguageItem > EE_CHAR_LANGUAGE_CTL(EE_CHAR_START+16)
constexpr TypedWhichId< SvxWeightItem > EE_CHAR_WEIGHT(EE_CHAR_START+4)
constexpr TypedWhichId< SvxLRSpaceItem > EE_PARA_LRSPACE(EE_PARA_START+13)
constexpr TypedWhichId< SvxColorItem > EE_CHAR_COLOR(EE_CHAR_START+0)
constexpr TypedWhichId< SvxWeightItem > EE_CHAR_WEIGHT_CTL(EE_CHAR_START+22)
constexpr TypedWhichId< SvxCrossedOutItem > EE_CHAR_STRIKEOUT(EE_CHAR_START+6)
constexpr TypedWhichId< SvxForbiddenRuleItem > EE_PARA_FORBIDDENRULES(EE_PARA_START+3)
constexpr TypedWhichId< SvxPostureItem > EE_CHAR_ITALIC(EE_CHAR_START+7)
constexpr TypedWhichId< SvxLineSpacingItem > EE_PARA_SBL(EE_PARA_START+15)
constexpr TypedWhichId< SvxEscapementItem > EE_CHAR_ESCAPEMENT(EE_CHAR_START+10)
constexpr TypedWhichId< SfxInt16Item > EE_PARA_OUTLLEVEL(EE_PARA_START+11)
constexpr TypedWhichId< SvxFontHeightItem > EE_CHAR_FONTHEIGHT_CTL(EE_CHAR_START+20)
constexpr TypedWhichId< SvxWeightItem > EE_CHAR_WEIGHT_CJK(EE_CHAR_START+21)
constexpr TypedWhichId< SvxLanguageItem > EE_CHAR_LANGUAGE_CJK(EE_CHAR_START+15)
constexpr TypedWhichId< SvxFrameDirectionItem > EE_PARA_WRITINGDIR(EE_PARA_START+0)
constexpr TypedWhichId< SvxPostureItem > EE_CHAR_ITALIC_CJK(EE_CHAR_START+23)
constexpr TypedWhichId< SvxFontItem > EE_CHAR_FONTINFO_CTL(EE_CHAR_START+18)
constexpr TypedWhichId< SvxPostureItem > EE_CHAR_ITALIC_CTL(EE_CHAR_START+24)
constexpr TypedWhichId< SvxLanguageItem > EE_CHAR_LANGUAGE(EE_CHAR_START+14)
constexpr TypedWhichId< SvxNumBulletItem > EE_PARA_NUMBULLET(EE_PARA_START+5)
constexpr TypedWhichId< SvxCharReliefItem > EE_CHAR_RELIEF(EE_CHAR_START+26)
constexpr TypedWhichId< SvxFontHeightItem > EE_CHAR_FONTHEIGHT_CJK(EE_CHAR_START+19)
constexpr TypedWhichId< SvxFontItem > EE_CHAR_FONTINFO(EE_CHAR_START+1)
EmbeddedObjectRef * pObject
Reference< XInterface > xTarget
#define LANGUAGE_PROCESS_OR_USER_DEFAULT
sal_Int32 nFirstLineOffset
#define SAL_WARN(area, stream)
if(aStr !=aBuf) UpdateName_Impl(m_xFollowLb.get()
#define DFF_Prop_tableProperties
#define DFF_Prop_cdirFont
#define DFF_msofbtClientTextbox
#define DFF_Prop_txflTextFlow
#define DFF_Prop_FitTextToShape
#define DFF_Prop_WrapText
#define DFF_Prop_fNoFillHitTest
#define DFF_Prop_anchorText
#define DFF_Prop_Rotation
#define DFF_msofbtClientData
#define DFF_Prop_dxTextRight
#define DFF_Prop_dyTextTop
#define DFF_COMMON_RECORD_HEADER_SIZE
#define DFF_Prop_dyTextBottom
#define DFF_Prop_tableRowProperties
#define DFF_Prop_fillBlip
#define DFF_Prop_dxTextLeft
#define DFF_msofbtDgContainer
#define DFF_PST_ExOleObjStg
#define DFF_msofbtSolverContainer
#define DFF_PSFLAG_CONTAINER
#define DFF_msofbtSpContainer
#define DFF_Prop_hspMaster
#define DFF_msofbtSpgrContainer
#define DFF_Prop_fillType
#define DFF_msofbtUDefProp
#define DFF_Prop_fillColor
#define DFF_Prop_fillBackColor
mso_anchorBottomCenteredBaseline
mso_anchorTopCenteredBaseline
SvStream & ReadSvxMSDffSolverContainer(SvStream &rIn, SvxMSDffSolverContainer &rContainer)
@ SEEK_FROM_CURRENT_AND_RESTART
Shape IDs per cluster in DGG atom.
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
SwNodeOffset min(const SwNodeOffset &a, const SwNodeOffset &b)
const wchar_t *typedef int(__stdcall *DllNativeUnregProc)(int
SdrOnOffItem makeSdrTextWordWrapItem(bool bAuto)
SdrOnOffItem makeSdrTextAutoGrowHeightItem(bool bAuto)
SdrOnOffItem makeSdrTextAutoGrowWidthItem(bool bAuto)
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)
std::vector< SvStorageInfo > SvStorageInfoList
TOOLS_DLLPUBLIC OUString read_uInt16s_ToOUString(SvStream &rStrm, std::size_t nUnits)
TOOLS_DLLPUBLIC bool checkSeek(SvStream &rSt, sal_uInt64 nOffset)
const DffRecordHeader & rSpHd
tools::Rectangle aChildAnchor
tools::Rectangle aBoundRect
sal_uInt16 mnANSITypeface
sal_uInt16 mnAsianOrComplexFont
PPTBuGraEntry(Graphic aGraphic, sal_uInt32 nInstance)
sal_uInt16 mnAsianOrComplexFont
sal_uInt32 mnHylinkOrigColor
void SetColor(sal_uInt32 nColor)
std::unique_ptr< SvxFieldItem > mpFieldItem
friend class PPTPortionObj
PPTCharPropSet & operator=(const PPTCharPropSet &rCharPropSet)
PPTCharPropSet(sal_uInt32 nParagraph)
void SetFont(sal_uInt16 nFont)
o3tl::cow_wrapper< ImplPPTCharPropSet > mpImplPPTCharPropSet
sal_uInt32 mnOriginalTextPos
LanguageType mnLanguage[3]
bool mbHardHylinkOrigColor
PPTCharLevel maCharLevel[nMaxPPTLevels]
void Read(SvStream &rIn, sal_uInt32 nLevel)
PPTCharSheet(TSS_Type nInstance)
sal_uInt32 mnExtParagraphMask
sal_uInt32 mnExtCharacterMask
std::unique_ptr< SvxFieldItem > xField2
std::unique_ptr< SvxFieldItem > xField1
void SetDateTime(sal_uInt32 nType)
static void GetDateTime(const sal_uInt32 nVal, SvxDateFormat &eDateFormat, SvxTimeFormat &eTimeFormat)
sal_uInt16 mnBulletHeight
sal_uInt16 mnAsianLineBreak
PPTParaPropSet & operator=(const PPTParaPropSet &rParaPropSet)
rtl::Reference< ImplPPTParaPropSet > mxParaSet
sal_uInt32 mnOriginalTextPos
void Read(SdrPowerPointImport const &rMan, SvStream &rIn, sal_uInt32 nLevel, bool bFirst)
PPTParaSheet(TSS_Type nInstance)
PPTParaLevel maParaLevel[nMaxPPTLevels]
void UpdateBulletRelSize(sal_uInt32 nLevel, sal_uInt16 nFontHeight)
virtual ~PPTRuler() override
PPTStyleSheet(const DffRecordHeader &rSlideHd, SvStream &rSt, SdrPowerPointImport &, const PPTTextParagraphStyleAtomInterpreter &, const PPTTextSpecInfo &)
o3tl::enumarray< TSS_Type, std::unique_ptr< PPTParaSheet > > mpParaSheet
o3tl::enumarray< TSS_Type, std::unique_ptr< PPTCharSheet > > mpCharSheet
o3tl::enumarray< TSS_Type, std::unique_ptr< SvxNumBulletItem > > mpNumBulletItem
std::vector< std::unique_ptr< PPTCharPropSet > > aCharPropList
std::vector< std::unique_ptr< PPTParaPropSet > > aParaPropList
void ReadParaProps(SvStream &rIn, const DffRecordHeader &rTextHeader, const OUString &aString, PPTTextRulerInterpreter const &rRuler, sal_uInt32 &nCharCount, bool &bTextPropAtom)
PPTStyleTextPropReader(SvStream &rIn, const DffRecordHeader &rClientTextBoxHd, PPTTextRulerInterpreter const &rInterpreter, const DffRecordHeader &rExtParaHd, TSS_Type nTextInstance)
std::vector< sal_uInt32 > aSpecMarkerList
~PPTStyleTextPropReader()
void Init(SvStream &rIn, const DffRecordHeader &rClientTextBoxHd, PPTTextRulerInterpreter const &rInterpreter, const DffRecordHeader &rExtParaHd, TSS_Type nTextInstance)
static void ReadCharProps(SvStream &rIn, PPTCharPropSet &aCharPropSet, std::u16string_view aString, sal_uInt32 &nCharCount, sal_uInt32 nCharReadCnt, bool &bTextPropAtom, sal_uInt32 nExtParaPos, const std::vector< StyleTextProp9 > &aStyleTextProp9, sal_uInt32 &nExtParaFlags, sal_uInt16 &nBuBlip, sal_uInt16 &nHasAnm, sal_uInt32 &nAnmScheme)
PPTTextParagraphStyleAtomInterpreter()
bool Read(SvStream &rIn, const DffRecordHeader &rRecHd)
~PPTTextRulerInterpreter()
bool GetDefaultTab(sal_uInt16 &nValue) const
PPTTextRulerInterpreter & operator=(const PPTTextRulerInterpreter &rRuler)
sal_uInt16 GetTabOffsetByIndex(sal_uInt16 nIndex) const
bool GetBulletOfs(sal_uInt32 nLevel, sal_uInt16 &nValue) const
sal_uInt16 GetTabCount() const
sal_uInt16 GetTabStyleByIndex(sal_uInt16 nIndex) const
PPTTextRulerInterpreter()
bool GetTextOfs(sal_uInt32 nLevel, sal_uInt16 &nValue) const
rtl::Reference< PPTRuler > mxImplRuler
~PPTTextSpecInfoAtomInterpreter()
::std::vector< PPTTextSpecInfo > aList
PPTTextSpecInfoAtomInterpreter()
bool Read(SvStream &rIn, const DffRecordHeader &rRecHd, sal_uInt16 nRecordType, const PPTTextSpecInfo *pTextSpecDefault=nullptr)
LanguageType nLanguage[3]
PPTTextSpecInfo(sal_uInt32 nCharIdx)
PowerPointImportParam(SvStream &rDocStream)
PptCurrentUserAtom aCurrentUserAtom
Color GetColor(sal_uInt16 nNum) const
sal_uInt16 nDocFileVersion
sal_uInt32 nCurrentUserEdit
sal_uInt32 nNotesMasterPersist
Size const & GetSlidesPageSize() const
PptPageFormat eSlidesPageFormat
sal_uInt32 nHandoutMasterPersist
Size const & GetNotesPageSize() const
bool bTitlePlaceholdersOmitted
sal_uInt16 n1stPageNumber
sal_uInt8 lfClipPrecision
rtl_TextEncoding eCharSet
sal_uInt32 nExHyperlinkId
sal_uInt8 nPlaceholderSize
PptPlaceholder nPlaceholderId
PptSlideLayoutAtom aLayout
PptPlaceholder aPlaceholderId[8]
PptSlidePersistAtom aPersistAtom
std::unique_ptr< PPTStyleSheet > xStyleSheet
sal_uInt32 HeaderFooterOfs[4]
std::unique_ptr< SvxMSDffSolverContainer > xSolverContainer
sal_uInt32 nSlidePersistEndOffset
PptColorSchemeAtom aColorScheme
rtl::Reference< SdrObject > pBObj
std::unique_ptr< HeaderFooterEntry > xHeaderFooterEntry
std::unique_ptr< sal_uInt32[]> pPresentationObjects
sal_uInt32 nOffsetLastEdit
sal_uInt32 nMaxPersistWritten
PptViewTypeEnum eLastViewType
sal_uInt32 nOffsetPersistDirectory
std::unique_ptr< sal_uInt32[]> pTableRowProperties
PptSlidePersistEntry & rPersistEntry
::std::vector< rtl::Reference< SdrObject > > aBackgroundColoredObjects
virtual void NotifyFreeObj(SdrObject *pObj) override
sal_uInt32 mnSpecialInfoMask
sal_uInt32 mnExtParagraphMask
sal_uInt32 mnExtCharacterMask
::std::vector< std::unique_ptr< SvxMSDffConnectorRule > > aCList
Reference< XModel > xModel
constexpr TypedWhichId< SdrMetricItem > SDRATTR_TEXT_LEFTDIST(SDRATTR_MISC_FIRST+4)
constexpr TypedWhichId< SdrTextFixedCellHeightItem > SDRATTR_TEXT_USEFIXEDCELLHEIGHT(SDRATTR_MISC_FIRST+23)
constexpr TypedWhichId< SdrTextHorzAdjustItem > SDRATTR_TEXT_HORZADJUST(SDRATTR_MISC_FIRST+13)
constexpr TypedWhichId< SdrTextVertAdjustItem > SDRATTR_TEXT_VERTADJUST(SDRATTR_MISC_FIRST+8)
constexpr TypedWhichId< SdrMetricItem > SDRATTR_TEXT_RIGHTDIST(SDRATTR_MISC_FIRST+5)
constexpr TypedWhichId< SdrMetricItem > SDRATTR_TEXT_LOWERDIST(SDRATTR_MISC_FIRST+7)
constexpr TypedWhichId< SdrMetricItem > SDRATTR_TEXT_UPPERDIST(SDRATTR_MISC_FIRST+6)
SvStream & ReadPptSlideLayoutAtom(SvStream &rIn, PptSlideLayoutAtom &rAtom)
static bool SdrPowerPointOLEDecompress(SvStream &rOutput, SvStream &rInput, sal_uInt32 nInputSize)
SvStream & ReadPptExOleObjAtom(SvStream &rIn, PptExOleObjAtom &rAtom)
SvStream & ReadPptNotesAtom(SvStream &rIn, PptNotesAtom &rAtom)
#define PPT_COLSCHEME_TITELTEXT
static void MergeCells(const Reference< XTable > &xTable, sal_Int32 nCol, sal_Int32 nRow, sal_Int32 nColSpan, sal_Int32 nRowSpan)
SvStream & ReadPptUserEditAtom(SvStream &rIn, PptUserEditAtom &rAtom)
#define LinePositionRight
static bool IsLine(const SdrObject *pObj)
static void CreateTableColumns(const Reference< XTableColumns > &xTableColumns, const o3tl::sorted_vector< sal_Int32 > &rColumns, sal_Int32 nTableRight)
#define PPT_COLSCHEME_A_UND_HYPERLINK
SvStream & ReadPptOEPlaceholderAtom(SvStream &rIn, PptOEPlaceholderAtom &rAtom)
#define LinePositionBottom
static void ApplyCellLineAttributes(const SdrObject *pLine, Reference< XTable > const &xTable, const std::vector< sal_Int32 > &vPositions, sal_Int32 nColumns)
static bool GetCellPosition(const SdrObject *pObj, const o3tl::sorted_vector< sal_Int32 > &rRows, const o3tl::sorted_vector< sal_Int32 > &rColumns, sal_Int32 &nTableIndex, sal_Int32 &nRow, sal_Int32 &nRowCount, sal_Int32 &nColumn, sal_Int32 &nColumnCount)
SvStream & ReadPptSlideAtom(SvStream &rIn, PptSlideAtom &rAtom)
SvStream & ReadPptCurrentUserAtom(SvStream &rIn, PptCurrentUserAtom &rAtom)
bool ReadPptInteractiveInfoAtom(SvStream &rIn, PptInteractiveInfoAtom &rAtom)
static void GetColumnPositions(const tools::Rectangle &rSnapRect, const o3tl::sorted_vector< sal_Int32 > &rColumns, std::vector< sal_Int32 > &rPositions, sal_Int32 nRow, sal_Int32 nFlags)
#define PPT_COLSCHEME_TEXT_UND_ZEILEN
static void GetRowPositions(const tools::Rectangle &rSnapRect, const o3tl::sorted_vector< sal_Int32 > &rRows, const o3tl::sorted_vector< sal_Int32 > &rColumns, std::vector< sal_Int32 > &rPositions, sal_Int32 nColumn, sal_Int32 nFlags)
#define PPT_COLSCHEME_HINTERGRUND
SvStream & ReadPptFontEntityAtom(SvStream &rIn, PptFontEntityAtom &rAtom)
SvStream & ReadPptColorSchemeAtom(SvStream &rIn, PptColorSchemeAtom &rAtom)
static void CreateTableRows(const Reference< XTableRows > &xTableRows, const o3tl::sorted_vector< sal_Int32 > &rRows, sal_Int32 nTableBottom)
SvStream & ReadPPTExtParaLevel(SvStream &rIn, PPTExtParaLevel &rLevel)
static void ApplyCellAttributes(const SdrObject *pObj, Reference< XCell > const &xCell)
static void GetLinePositions(const SdrObject *pObj, const o3tl::sorted_vector< sal_Int32 > &rRows, const o3tl::sorted_vector< sal_Int32 > &rColumns, std::vector< sal_Int32 > &rPositions, const tools::Rectangle &rGroupSnap)
SvStream & ReadPptDocumentAtom(SvStream &rIn, PptDocumentAtom &rAtom)
static void ImportComment10(SvxMSDffManager const &rMan, SvStream &rStCtrl, SdrPage *pPage, DffRecordHeader const &rComment10Hd)
SvStream & ReadPptSlidePersistAtom(SvStream &rIn, PptSlidePersistAtom &rAtom)
#define PPT_ParaAttr_BuHardFont
#define PPT_CharAttr_FontColor
#define PPT_PST_TxPFStyleAtom
#define PPT_CharAttr_Strikeout
#define PPT_PST_UserEditAtom
#define PPT_PST_TextDefaults9Atom
#define PPT_PST_OEPlaceholderAtom
#define PPT_PST_ExtendedBuGraContainer
#define PPT_ParaAttr_DefaultTab
#define PPT_CharAttr_Symbol
#define PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_RIGHT
#define PPT_PST_CommentAtom10
#define PPT_PST_SlideNumberMCAtom
#define PPT_PST_TxSIStyleAtom
#define PPT_ParaAttr_UpperDist
#define PPT_PST_NotesAtom
#define PPT_PST_PresentationAdvisorFlags9Atom
#define PPT_PST_TextHeaderAtom
#define PPT_PST_DocToolbarStates10Atom
#define PPT_PST_SrKinsoku
#define PPT_PST_StyleTextPropAtom
#define PPT_ParaAttr_BuHardColor
#define PPT_PST_RecolorInfoAtom
#define PPT_ParaAttr_Adjust
#define PPT_ParaAttr_BiDi
#define PPT_CharAttr_Shadow
#define PPT_ParaAttr_BulletOfs
#define PPT_PST_ExtendedParagraphHeaderAtom
#define PPT_PST_SlidePersistAtom
#define PPT_PST_ExOleObjAtom
#define PPT_ParaAttr_AsianLB_1
#define PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_LEFT
#define PPT_ParaAttr_BulletChar
#define PPT_PST_FooterMCAtom
#define PPT_ParaAttr_LowerDist
#define PPT_PST_GridSpacing10Atom
#define PPT_PST_HeadersFootersAtom
#define PPT_PST_HeaderMCAtom
#define PPT_PST_InteractiveInfo
#define PPT_PST_TextRulerAtom
#define PPT_CharAttr_Embossed
#define PPT_PST_HtmlDocInfo9Atom
#define PPT_PST_MasterText
#define PPT_PST_PersistPtrIncrementalBlock
#define PPT_PST_ExControl
#define PPT_PST_SlideAtom
#define PPT_PST_InteractiveInfoAtom
#define PPT_PST_TxInteractiveInfoAtom
#define PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_CENTER
#define PPT_PST_ExObjList
#define PPT_ParaAttr_BulletFont
#define PPT_PST_SlideTime10Atom
#define PPT_PST_PPDrawing
#define PPT_PST_SlideListWithText
#define PPT_PST_TextSpecInfoAtom
#define PPT_PST_CurrentUserAtom
#define PPT_PST_ExtendedBuGraAtom
#define PPT_PST_HashCodeAtom
#define PPT_PST_SlideFlags10Atom
#define PPT_CharAttr_Font
#define PPT_PST_DocumentAtom
#define PPT_CharAttr_Italic
#define PPT_PST_ExtendedPresRuleContainer
#define PPT_ParaAttr_AsianLB_3
#define PPT_PST_ColorSchemeAtom
#define PPT_PST_BuildList
#define PPT_PST_CommentIndex10
#define PPT_CharAttr_FontHeight
#define PPT_ParaAttr_BulletColor
#define PPT_PST_BinaryTagData
#define PPT_PST_HeadersFooters
#define PPT_PST_DateTimeMCAtom
#define PPT_PST_GenericDateMCAtom
#define PPT_PST_TextBytesAtom
#define PPT_PST_TxMasterStyleAtom
#define PPT_ParaAttr_BuHardHeight
#define PPT_ParaAttr_BulletHeight
#define PPT_ParaAttr_LineFeed
#define PPT_ParaAttr_BulletOn
#define PPT_CharAttr_Escapement
#define PPT_PST_FontCollection
#define PPT_PST_ProgBinaryTag
#define PPT_PST_ExtendedParagraphMasterAtom
#define PPT_PST_RTFDateTimeMCAtom
#define PPTSLIDEPERSIST_ENTRY_NOTFOUND
#define PPT_CharAttr_AsianOrComplexFont
#define PPT_CharAttr_Bold
#define PPT_PST_Comment10
#define PPT_PST_TextCharsAtom
#define PPT_IMPORTFLAGS_NO_TEXT_ASSERT
#define PPT_PST_VBAInfoAtom
#define PPT_STYLESHEETENTRIES
#define PPT_TEXTOBJ_FLAGS_PARA_ALIGNMENT_USED_BLOCK
#define PPT_PST_OutlineTextRefAtom
#define PPT_ParaAttr_TextOfs
#define PPT_PST_ExtendedParagraphAtom
#define PPT_PST_Environment
#define PPT_CharAttr_Underline
#define PPT_PST_FontEntityAtom
#define PPT_CharAttr_ANSITypeface
#define PPT_ParaAttr_AsianLB_2
SVXCORE_DLLPUBLIC SdrTextObj * DynCastSdrTextObj(SdrObject *)
SVXCORE_DLLPUBLIC FrPair GetMapFactor(MapUnit eS, MapUnit eD)
SVXCORE_DLLPUBLIC tools::Long BigMulDiv(tools::Long nVal, tools::Long nMul, tools::Long nDiv)
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
constexpr TypedWhichId< XFillColorItem > XATTR_FILLCOLOR(XATTR_FILL_FIRST+1)
constexpr TypedWhichId< XFillTransparenceItem > XATTR_FILLTRANSPARENCE(XATTR_FILL_FIRST+5)
constexpr TypedWhichId< XLineColorItem > XATTR_LINECOLOR(XATTR_LINE_FIRST+3)
constexpr TypedWhichId< XLineWidthItem > XATTR_LINEWIDTH(XATTR_LINE_FIRST+2)
constexpr TypedWhichId< XFillBmpStretchItem > XATTR_FILLBMP_STRETCH(XATTR_FILL_FIRST+16)
constexpr TypedWhichId< XFillBmpTileItem > XATTR_FILLBMP_TILE(XATTR_FILL_FIRST+7)
constexpr TypedWhichId< XFillBitmapItem > XATTR_FILLBITMAP(XATTR_FILL_FIRST+4)
constexpr TypedWhichId< XLineStyleItem > XATTR_LINESTYLE(XATTR_LINE_FIRST)
constexpr TypedWhichId< XFillStyleItem > XATTR_FILLSTYLE(XATTR_FILL_FIRST)
constexpr TypedWhichId< XFillGradientItem > XATTR_FILLGRADIENT(XATTR_FILL_FIRST+2)