23 #include <osl/endian.h>
53 #include <editeng/editeng.hxx>
77 #include <drawdoc.hxx>
106 using ::editeng::SvxBorderLine;
114 #if 1 // 1 = use predefined color, 0 = ignore
120 static const Color eColA[] = {
126 COL_BLACK, COL_BLACK, COL_BLACK,
128 COL_BLACK, COL_BLACK, COL_BLACK,
137 if( !( nWC[3] & 0x1 ) &&
138 ( ( nWC[0] == 0 || nWC[0]== 0x80 || nWC[0] == 0xff )
139 && ( nWC[1] == 0 || nWC[1]== 0x80 || nWC[1] == 0xff )
140 && ( nWC[2] == 0 || nWC[2]== 0x80 || nWC[2] == 0xff ) ) ){
142 for (
int i = 2;
i >= 0;
i--)
146 nIdx += ((nWC[i] == 0xff) ? 2 : 1);
157 return Color(u, u, u);
161 return Color(nWC[0], nWC[1], nWC[2]);
166 if (mbIsDisabled || rFixed.empty())
169 pFrameFormat->
SetName(msSeed+OUString::number(++mnImportedGraphicsCount) +
": " + rFixed);
176 if (SVBT16ToUInt16(pHd->
cb) <
sizeof(
WW8_DPHEAD) + nDataSiz)
178 OSL_ENSURE(
false,
"+graphic element: too short?" );
179 m_pStrm->SeekRel(SVBT16ToUInt16(pHd->
cb) -
sizeof(
WW8_DPHEAD));
183 bool bCouldRead =
checkRead(*m_pStrm, pData, nDataSiz);
184 OSL_ENSURE(bCouldRead,
"Short Graphic header");
192 m_nDrawXOfs2 = m_nDrawXOfs;
193 m_nDrawYOfs2 = m_nDrawYOfs;
202 if( SVBT16ToUInt16( rL.
lnps ) == 5 ){
209 if( SVBT16ToUInt16( rL.
lnps ) >= 1
210 && SVBT16ToUInt16(rL.
lnps ) <= 4 ){
212 sal_Int16 nLen = SVBT16ToUInt16( rL.
lnpw );
213 XDash aD( css::drawing::DashStyle_RECT, 1, 2 * nLen, 1, 5 * nLen, 5 * nLen );
214 switch( SVBT16ToUInt16( rL.
lnps ) ){
221 case 4: aD.
SetDots( 2 );
break;
228 if( SVBT16ToUInt16( rSh.
shdwpi ) ){
244 0, 0, 5, 10, 20, 25, 30, 40, 50, 60, 70, 75, 80,
245 90, 50, 50, 50, 50, 50, 50, 33, 33, 33, 33, 33, 33
247 sal_uInt16 nPat = SVBT16ToUInt16(rFill.
flpp);
263 aB.
SetRed( static_cast<sal_uInt8>( ( static_cast<sal_uLong>(aF.
GetRed()) * nPatA[nPat]
264 + static_cast<sal_uLong>(aB.
GetRed()) * ( 100 - nPatA[nPat] ) ) / 100 ) );
265 aB.
SetGreen( static_cast<sal_uInt8>( ( static_cast<sal_uLong>(aF.
GetGreen()) * nPatA[nPat]
266 + static_cast<sal_uLong>(aB.
GetGreen()) * ( 100 - nPatA[nPat] ) ) / 100 ) );
267 aB.
SetBlue( static_cast<sal_uInt8>( ( static_cast<sal_uLong>(aF.
GetBlue()) * nPatA[nPat]
268 + static_cast<sal_uLong>(aB.
GetBlue()) * ( 100 - nPatA[nPat] ) ) / 100 ) );
277 sal_uInt16 aSB = SVBT16ToUInt16( rLe.
aStartBits );
286 sal_uInt16 nSiz = SVBT16ToUInt16( rLt.
lnpw )
287 * ( ( aSB >> 2 & 0x3 ) + ( aSB >> 4 & 0x3 ) );
288 if( nSiz < 220 ) nSiz = 220;
293 sal_uInt16 aEB = SVBT16ToUInt16( rLe.
aEndBits );
294 if( !(aEB & 0x3) )
return;
302 sal_uInt16 nSiz = SVBT16ToUInt16( rLt.
lnpw )
303 * ( ( aEB >> 2 & 0x3 ) + ( aEB >> 4 & 0x3 ) );
304 if( nSiz < 220 ) nSiz = 220;
314 if( !ReadGrafStart( static_cast<void*>(&aLine),
sizeof( aLine ), pHd, rSet ) )
322 rP0.setX( static_cast<sal_Int16>(SVBT16ToUInt16( pHd->
xa )) + m_nDrawXOfs2 );
323 rP0.setY( static_cast<sal_Int16>(SVBT16ToUInt16( pHd->
ya )) + m_nDrawYOfs2 );
325 rP0.AdjustX(static_cast<sal_Int16>(SVBT16ToUInt16( aLine.
xaStart )) );
326 rP0.AdjustY(static_cast<sal_Int16>(SVBT16ToUInt16( aLine.
yaStart )) );
327 rP1.AdjustX(static_cast<sal_Int16>(SVBT16ToUInt16( aLine.
xaEnd )) );
328 rP1.AdjustY(static_cast<sal_Int16>(SVBT16ToUInt16( aLine.
yaEnd )) );
349 if( !ReadGrafStart( static_cast<void*>(&aRect),
sizeof( aRect ), pHd, rSet ) )
352 Point aP0( static_cast<sal_Int16>(SVBT16ToUInt16( pHd->
xa )) + m_nDrawXOfs2,
353 static_cast<sal_Int16>(SVBT16ToUInt16( pHd->
ya )) + m_nDrawYOfs2 );
355 aP1.AdjustX(static_cast<sal_Int16>(SVBT16ToUInt16( pHd->
dxa )) );
356 aP1.AdjustY(static_cast<sal_Int16>(SVBT16ToUInt16( pHd->
dya )) );
372 if( !ReadGrafStart( static_cast<void*>(&aEllipse),
sizeof( aEllipse ), pHd, rSet ) )
375 Point aP0( static_cast<sal_Int16>(SVBT16ToUInt16( pHd->
xa )) + m_nDrawXOfs2,
376 static_cast<sal_Int16>(SVBT16ToUInt16( pHd->
ya )) + m_nDrawYOfs2 );
378 aP1.AdjustX(static_cast<sal_Int16>(SVBT16ToUInt16( pHd->
dxa )) );
379 aP1.AdjustY(static_cast<sal_Int16>(SVBT16ToUInt16( pHd->
dya )) );
396 if( !ReadGrafStart( static_cast<void*>(&aArc),
sizeof( aArc ), pHd, rSet ) )
399 Point aP0( static_cast<sal_Int16>(SVBT16ToUInt16( pHd->
xa )) + m_nDrawXOfs2,
400 static_cast<sal_Int16>(SVBT16ToUInt16( pHd->
ya )) + m_nDrawYOfs2 );
402 aP1.AdjustX(static_cast<sal_Int16>(SVBT16ToUInt16( pHd->
dxa )) * 2 );
403 aP1.AdjustY(static_cast<sal_Int16>(SVBT16ToUInt16( pHd->
dya )) * 2 );
405 short nA[] = { 2, 3, 1, 0 };
406 short nW = nA[ ( ( aArc.
fLeft & 1 ) << 1 ) + ( aArc.
fUp & 1 ) ];
408 aP0.AdjustY( -static_cast<sal_Int16>(SVBT16ToUInt16( pHd->
dya )) );
409 aP1.AdjustY( -static_cast<sal_Int16>(SVBT16ToUInt16( pHd->
dya )) );
412 aP0.AdjustX( -static_cast<sal_Int16>(SVBT16ToUInt16( pHd->
dxa )) );
413 aP1.AdjustX( -static_cast<sal_Int16>(SVBT16ToUInt16( pHd->
dxa )) );
418 SdrCircKind::Section,
433 if( !ReadGrafStart( static_cast<void*>(&aPoly),
sizeof( aPoly ), pHd, rSet ) )
436 sal_uInt16
nCount = SVBT16ToUInt16( aPoly.
aBits1 ) >> 1 & 0x7fff;
437 std::unique_ptr<SVBT16[]> xP(
new SVBT16[nCount * 2]);
439 bool bCouldRead =
checkRead(*m_pStrm, xP.get(), nCount * 4);
440 OSL_ENSURE(bCouldRead,
"Short PolyLine header");
446 for (sal_uInt16
i=0;
i<nCount; ++
i)
448 aPt.setX( SVBT16ToUInt16( xP[
i << 1] ) + m_nDrawXOfs2
449 + static_cast<sal_Int16>(SVBT16ToUInt16( pHd->
xa )) );
450 aPt.setY( SVBT16ToUInt16( xP[(
i << 1 ) + 1] ) + m_nDrawYOfs2
451 + static_cast<sal_Int16>(SVBT16ToUInt16( pHd->
ya )) );
458 (SVBT16ToUInt16(aPoly.
aBits1) & 0x1) ? SdrObjKind::Polygon : SdrObjKind::PolyLine,
473 && (nCpStart >= rDrawEditEngine.
GetTextLen( nSP ) + 1) )
475 nCpStart -= rDrawEditEngine.
GetTextLen( nSP ) + 1;
481 && (nCpEnd > rDrawEditEngine.
GetTextLen( nEP ) + 1) )
483 nCpEnd -= rDrawEditEngine.
GetTextLen( nEP ) + 1;
486 return ESelection( nSP, nCpStart, nEP, nCpEnd );
511 sal_uInt16 nWhich =
i;
514 nSlotId && nWhich != nSlotId &&
515 0 != (nWhich = pEditPool->
GetWhich(nSlotId)) &&
529 sal_Int32 nStartPos = 0;
532 nStartPos = rString.indexOf(0x13, nStartPos);
540 rNewStartCp += rString.getLength()-nStartPos;
541 rString = rString.copy(0, nStartPos);
545 const bool was0x14 = rString[nStopPos]==0x14;
546 rString = rString.replaceAt(nStartPos, nStopPos+1-nStartPos,
u"");
547 rNewStartCp += nStopPos-nStartPos;
552 nStartPos = rString.indexOf(0x15, nStartPos);
555 rString = rString.replaceAt(nStartPos, 1,
u"");
569 explicit Chunk(
tools::Long nStart,
const OUString &rURL)
570 : msURL(rURL), mnStartPos(nStart), mnEndPos(0) {}
572 void SetEndPos(
tools::Long nEnd) { mnEndPos = nEnd; }
573 tools::Long GetStartPos()
const {
return mnStartPos;}
575 const OUString &
GetURL()
const {
return msURL;}
576 void Adjust(sal_Int32 nAdjust)
595 ManTypes eType,
bool bONLYnPicLocFc)
605 m_xPlcxMan = std::make_shared<WW8PLCFMan>(m_xSBase.get(), eType, nStartCp,
true);
607 WW8_CP nStart = m_xPlcxMan->Where();
608 WW8_CP nNext, nStartReplace=0;
610 bool bDoingSymbol =
false;
613 std::optional<SfxItemSet>
pS(m_pDrawEditEngine->GetEmptyItemSet());
616 std::deque<Chunk> aChunks;
619 size_t nCurrentCount = m_xCtrlStck->size();
620 while (nStart < nEndCp)
624 WW8_CP nTextStart = nStart;
625 if (nTextStart < nStartCp)
626 nTextStart = nStartCp;
629 bool bStartAttr = m_xPlcxMan->Get(&aRes);
630 m_nCurrentColl = m_xPlcxMan->GetColl();
635 if ( (68 == aRes.nSprmId) || (0x6A03 == aRes.nSprmId) )
637 Read_PicLoc(aRes.nSprmId, aRes.pMemPos +
638 m_xSprmParser->DistanceToData(aRes.nSprmId), 4);
644 else if ((
eFTN > aRes.nSprmId) || (0x0800 <= aRes.nSprmId))
650 ImportSprm(aRes.pMemPos, aRes.nMemLen, aRes.nSprmId);
651 if (!bDoingSymbol && m_bSymbol)
654 nStartReplace = nTextStart;
655 cReplaceSymbol = m_cSymbol;
660 EndSprm( aRes.nSprmId );
661 if (!m_bSymbol && bDoingSymbol)
663 bDoingSymbol =
false;
666 nTextStart - nStartCp));
668 sal_Int32 nParaCount = m_pDrawEditEngine->GetParagraphCount();
669 bool bBadSelection = aReplaceSel.
nStartPara >= nParaCount || aReplaceSel.
nEndPara >= nParaCount;
671 SAL_WARN_IF(bBadSelection,
"sw.ww8",
"editengine has different amount of text than expected");
675 sal_Int32
nCount = nTextStart - nStartReplace;
676 OUStringBuffer sTemp(nCount);
678 m_pDrawEditEngine->QuickInsertText(sTemp.makeStringAndClear(), aReplaceSel);
683 else if (aRes.nSprmId ==
eFLD)
687 size_t nCount = m_xCtrlStck->size();
688 if (m_aFieldStack.empty() && Read_Field(&aRes))
691 for (
size_t nI = m_xCtrlStck->size(); nI > nCount; --nI)
693 const SfxPoolItem *pItem = ((*m_xCtrlStck)[nI-1]).m_pAttr.get();
694 sal_uInt16 nWhich = pItem->
Which();
701 m_xCtrlStck->DeleteAndDestroy(nI-1);
703 aChunks.emplace_back(nStart, sURL);
708 if (!m_aFieldStack.empty() && End_Field() && !aChunks.empty())
709 aChunks.back().SetEndPos(nStart+1);
714 m_xPlcxMan->advance();
715 nNext = m_xPlcxMan->Where();
717 const WW8_CP nEnd = ( nNext < nEndCp ) ? nNext : nEndCp;
718 if (!bONLYnPicLocFc && nNext != nStart && nEnd >= nStartCp)
725 if (m_xCtrlStck->size() - nCurrentCount)
727 for (
size_t i = nCurrentCount;
i < m_xCtrlStck->size(); ++
i)
729 const SfxPoolItem *pItem = ((*m_xCtrlStck)[
i]).m_pAttr.get();
730 sal_uInt16 nWhich = pItem->
Which();
736 nSlotId && nWhich != nSlotId &&
737 0 != (nWhich = pEditPool->
GetWhich(nSlotId)) &&
747 InsertTxbxStyAttrs(*
pS, m_nCurrentColl);
751 m_pDrawEditEngine->QuickSetAttribs( *
pS,
752 GetESelection(*m_pDrawEditEngine, nTextStart - nStartCp, nEnd - nStartCp ) );
753 pS.emplace(m_pDrawEditEngine->GetEmptyItemSet());
762 for (
size_t nI = m_xCtrlStck->size(); nI > nCurrentCount; --nI)
763 m_xCtrlStck->DeleteAndDestroy(nI-1);
765 auto aEnd = aChunks.end();
766 for (
auto aIter = aChunks.begin(); aIter != aEnd; ++aIter)
769 aIter->GetEndPos()-nStartCp));
770 if (!IsValidSel(*m_pDrawEditEngine, aSel))
772 OUString aString(m_pDrawEditEngine->GetText(aSel));
773 const sal_Int32 nOrigLen = aString.getLength();
778 if (!aIter->GetURL().isEmpty())
782 nChanged = nOrigLen - 1;
786 m_pDrawEditEngine->QuickInsertText(aString, aSel);
787 nChanged = nOrigLen - aString.getLength();
789 for (
auto aIter2 = aIter+1; aIter2 != aEnd; ++aIter2)
790 aIter2->Adjust(nChanged);
801 sal_uInt16 nTxBxS, sal_uInt16 nSequence)
804 WW8PLCFspecial* pT = m_xPlcxMan ? m_xPlcxMan->GetTxbx() :
nullptr;
807 OSL_ENSURE(
false,
"+where's the text graphic (1)?" );
812 bool bCheckTextBoxStory = ( nTxBxS && pT->
GetIMax() >= nTxBxS );
813 if( bCheckTextBoxStory )
818 if (!pT->
Get(rStartCp, pT0) || rStartCp < 0)
820 OSL_ENSURE(
false,
"+where's the text graphic (2)?" );
824 if( bCheckTextBoxStory )
826 bool bReusable = (0 != SVBT16ToUInt16( static_cast<WW8_TXBXS*>(pT0)->fReusable ));
830 if( !pT->
Get( rStartCp, pT0 ) )
832 OSL_ENSURE(
false,
"+where's the text graphic (2a)?" );
835 bReusable = (0 != SVBT16ToUInt16( static_cast<WW8_TXBXS*>(pT0)->fReusable ));
839 if (!pT->
Get(rEndCp, pT0) || rEndCp < 0)
841 OSL_ENSURE(
false,
"+where's the text graphic (3)?" );
846 if( bCheckTextBoxStory )
849 if( USHRT_MAX > nSequence )
854 pT = m_xPlcxMan->GetTxbxBkd();
861 OSL_ENSURE(
false,
"+where's the text graphic (4)" );
865 for (sal_uInt16 iSequence = 0; iSequence < nSequence; ++iSequence)
868 if( (!pT->
Get( rStartCp, pT0 ))
869 || ( nMinStartCp > rStartCp ) )
871 OSL_ENSURE(
false,
"+where's the text graphic (5)?" );
874 if( rStartCp >= nMaxEndCp )
879 if ( (!pT->
Get(rEndCp, pT0)) || (nMaxEndCp < rEndCp-1) )
881 OSL_ENSURE(
false,
"+where's the text graphic (6)?" );
900 m_xWwFib->GetBaseCp(eType, &nOffset);
902 OSL_ENSURE(nStartCp <= nEndCp,
"+where's the graphic text (7)?");
903 if (nStartCp == nEndCp)
905 else if (nStartCp < nEndCp)
908 const sal_Int32 nLen = m_xSBase->WW8ReadString(*m_pStrm, rString,
909 nStartCp + nOffset, nEndCp - nStartCp, GetCurrentCharSet());
910 OSL_ENSURE(nLen,
"+where's the text graphic (8)?");
913 if( rString[nLen-1]==0x0d )
914 rString = rString.copy(0, nLen-1);
916 rString = rString.replace( 0xb, 0xa );
931 OUStringBuffer aNewData(rIn);
932 std::vector<sal_Int32> aDosLineEndDummies;
934 sal_Int32 nStrLen = rIn.getLength();
938 if (rIn[i] ==
'\r' || rIn[i] ==
'\n')
941 if ( (i+1) < nStrLen && ((rIn[i+1] ==
'\r') || (rIn[i+1] ==
'\n')) &&
942 (rIn[i] != rIn[i+1]) )
945 aDosLineEndDummies.push_back(i);
951 rIn = aNewData.makeStringAndClear();
952 return aDosLineEndDummies;
957 for (
auto aIter = rDosLineEndDummies.rbegin(); aIter != rDosLineEndDummies.rend(); ++aIter)
959 sal_Int32 nCharPos(*aIter);
968 sal_Int32 nLen = GetRangeAsDrawingString(rString, nStartCp, nEndCp, eType);
971 if (m_bFuzzing && rString.getLength() > 1024)
973 SAL_WARN(
"sw.ww8",
"Truncating long EditEngine strings when fuzzing for performance");
974 rString = rString.copy(0, 1024);
977 if (!m_pDrawEditEngine)
979 m_pDrawEditEngine.reset(
new EditEngine(
nullptr));
985 OUString sEEString(rString);
987 m_pDrawEditEngine->SetText(sEEString);
988 InsertAttrsAsDrawingAttrs(nStartCp, nStartCp+nLen, eType);
994 if ((eType ==
MAN_AND) && m_pDrawEditEngine->GetTextLen())
997 if (m_pDrawEditEngine->GetText( aFirstChar ) ==
"\x05")
998 m_pDrawEditEngine->QuickDelete(aFirstChar);
1001 std::unique_ptr<EditTextObject> pTemporaryText = m_pDrawEditEngine->CreateTextObject();
1002 pRet.
emplace( std::move(pTemporaryText) );
1005 m_pDrawEditEngine->SetText( OUString() );
1006 m_pDrawEditEngine->SetParaAttribs(0, m_pDrawEditEngine->GetEmptyItemSet());
1012 rString = rString.replaceAll(
"\x01",
"");
1013 rString = rString.replaceAll(
"\x05",
"");
1014 rString = rString.replaceAll(
"\x08",
"");
1015 rString = rString.replaceAll(
"\007\007",
"\007\012");
1016 rString = rString.replace(0x7,
' ');
1024 Size const * pObjSiz, sal_uInt16 nTxBxS, sal_uInt16 nSequence,
tools::Long nPosCp,
1025 SwFrameFormat const * pOldFlyFormat,
bool bMakeSdrGrafObj,
bool& rbEraseTextObj,
1030 sal_uInt64 nOld = m_pStrm->Tell();
1034 rbEraseTextObj =
false;
1038 bool bContainsGraphics =
false;
1039 bool bTextWasRead = GetTxbxTextSttEndCp(nStartCp, nEndCp, nTxBxS, nSequence) &&
1040 GetRangeAsDrawingString(aString, nStartCp, nEndCp, eType) > 0;
1042 if (!m_pDrawEditEngine)
1044 m_pDrawEditEngine.reset(
new EditEngine(
nullptr));
1047 m_pDrawEditEngine->SetPaperSize( *pObjSiz );
1049 if (m_bFuzzing && aString.getLength() > 1024)
1051 SAL_WARN(
"sw.ww8",
"Truncating long EditEngine strings when fuzzing for performance");
1052 aString = aString.copy(0, 1024);
1055 const OUString aOrigString(aString);
1058 WW8_CP nNewStartCp = nStartCp;
1061 if (aString.getLength()!=1)
1063 bContainsGraphics = aString.indexOf(0x1)<0 || aString.indexOf(0x8)<0;
1068 switch( aString[0] )
1071 if (!pbTestTxbxContainsText)
1074 bool bOldEmbeddObj = m_bEmbeddObj;
1077 m_bEmbeddObj =
true;
1085 for(
int nLoop = 0; nLoop < 2; ++nLoop )
1090 if (
nullptr == pParams)
1093 switch( nCurrentId )
1099 Read_Obj(nCurrentId, pParams, 1);
1104 Read_PicLoc(nCurrentId, pParams, 1);
1118 m_bEmbeddObj=bOldEmbeddObj;
1123 if( bMakeSdrGrafObj && pTextObj &&
1130 SdrObject* pNew = ImportOleBase(aGraph);
1135 static_cast<SdrGrafObj*
>(pNew)->SetGraphic(aGraph);
1144 ReplaceObject(pNew, pTextObj->
GetOrdNum());
1147 pFlyFormat = ImportOle();
1152 InsertAttrsAsDrawingAttrs(nNewStartCp, nNewStartCp+1,
1154 pFlyFormat = ImportGraf(bMakeSdrGrafObj ? pTextObj :
nullptr,
1160 if ( (!pbTestTxbxContainsText) && (!m_bObj) )
1161 pFlyFormat = Read_GrafLayer( nPosCp );
1170 if( pFlyFormat && pRecord )
1179 MatchSdrItemsIntoFlySet( pTextObj,
1188 MapWrapIntoFlyFormat(*pRecord, *pFlyFormat);
1191 rbEraseTextObj = (
nullptr != pFlyFormat);
1197 *pnStartCp = nStartCp;
1201 if( pbTestTxbxContainsText )
1202 *pbTestTxbxContainsText = bTextWasRead && ! rbEraseTextObj;
1203 else if( !rbEraseTextObj )
1207 m_pDrawEditEngine->SetText(aOrigString);
1208 InsertAttrsAsDrawingAttrs(nStartCp, nEndCp, eType);
1214 aOp.SetVertical( bVertical );
1224 m_pDrawEditEngine->SetText( OUString() );
1225 m_pDrawEditEngine->SetParaAttribs(0, m_pDrawEditEngine->GetEmptyItemSet());
1228 m_pStrm->Seek( nOld );
1229 if (pbContainsGraphics)
1230 *pbContainsGraphics = bContainsGraphics;
1236 bool bErase, bContainsText;
1237 InsertTxbxText(
nullptr,
nullptr,nTxBxS,USHRT_MAX,0,
nullptr,
false, bErase, &bContainsText,
1238 &rStartCp, &rEndCp );
1239 return bContainsText;
1248 if( !ReadGrafStart( static_cast<void*>(&aTextB),
sizeof( aTextB ), pHd, rSet ) )
1251 Point aP0( static_cast<sal_Int16>(SVBT16ToUInt16( pHd->
xa )) + m_nDrawXOfs2,
1252 static_cast<sal_Int16>(SVBT16ToUInt16( pHd->
ya )) + m_nDrawYOfs2 );
1254 aP1.AdjustX(static_cast<sal_Int16>(SVBT16ToUInt16( pHd->
dxa )) );
1255 aP1.AdjustY(static_cast<sal_Int16>(SVBT16ToUInt16( pHd->
dya )) );
1263 Size aSize( static_cast<sal_Int16>(SVBT16ToUInt16( pHd->
dxa )) ,
1264 static_cast<sal_Int16>(SVBT16ToUInt16( pHd->
dya )) );
1267 bool bContainsGraphics;
1268 InsertTxbxText(pObj, &aSize, 0, 0, 0,
nullptr,
false,
1269 bDummy,
nullptr,&nStartCpFly,&nEndCpFly,&bContainsGraphics);
1287 static const SdrCaptionType aCaptA[] = { SdrCaptionType::Type1, SdrCaptionType::Type2,
1288 SdrCaptionType::Type3, SdrCaptionType::Type4 };
1292 if( !ReadGrafStart( static_cast<void*>(&aCallB),
sizeof( aCallB ), pHd, rSet ) )
1298 SAL_WARN(
"sw.ww8",
"Short CaptionBox header");
1302 std::unique_ptr<SVBT16[]> xP(
new SVBT16[nCount * 2]);
1304 bool bCouldRead =
checkRead(*m_pStrm, xP.get(), nCount * 4);
1307 SAL_WARN(
"sw.ww8",
"Short CaptionBox header");
1312 if( nTyp == 1 && SVBT16ToUInt16( xP[0] ) == SVBT16ToUInt16( xP[2] ) )
1315 Point aP0( static_cast<sal_Int16>(SVBT16ToUInt16( pHd->
xa )) +
1316 static_cast<sal_Int16>(SVBT16ToUInt16( aCallB.
dpheadTxbx.
xa )) + m_nDrawXOfs2,
1317 static_cast<sal_Int16>(SVBT16ToUInt16( pHd->
ya ))
1318 + static_cast<sal_Int16>(SVBT16ToUInt16( aCallB.
dpheadTxbx.
ya )) + m_nDrawYOfs2 );
1320 aP1.AdjustX(static_cast<sal_Int16>(SVBT16ToUInt16( aCallB.
dpheadTxbx.
dxa )) );
1321 aP1.AdjustY(static_cast<sal_Int16>(SVBT16ToUInt16( aCallB.
dpheadTxbx.
dya )) );
1322 Point aP2( static_cast<sal_Int16>(SVBT16ToUInt16( pHd->
xa ))
1324 + m_nDrawXOfs2 + static_cast<sal_Int16>(SVBT16ToUInt16( xP[0] )),
1325 static_cast<sal_Int16>(SVBT16ToUInt16( pHd->
ya ))
1327 + m_nDrawYOfs2 + static_cast<sal_Int16>(SVBT16ToUInt16( xP[1] )) );
1337 static_cast<sal_Int16>(SVBT16ToUInt16( aCallB.
dpheadTxbx.
dya )) );
1338 bool bEraseThisObject;
1340 InsertTxbxText(pObj, &aSize, 0, 0, 0,
nullptr,
false, bEraseThisObject );
1356 if( !ReadGrafStart( static_cast<void*>(&nGrouped),
sizeof( nGrouped ), pHd, rSet ) )
1359 #ifdef OSL_BIGENDIAN
1360 nGrouped = (sal_Int16)OSL_SWAPWORD( nGrouped );
1363 m_nDrawXOfs = m_nDrawXOfs +
static_cast<sal_Int16
>(SVBT16ToUInt16( pHd->
xa ));
1364 m_nDrawYOfs = m_nDrawYOfs +
static_cast<sal_Int16
>(SVBT16ToUInt16( pHd->
ya ));
1368 short nLeft =
static_cast<sal_Int16
>(SVBT16ToUInt16( pHd->
cb )) -
sizeof(
WW8_DPHEAD );
1369 for (
int i = 0; i < nGrouped && nLeft >=
static_cast<short>(
sizeof(
WW8_DPHEAD)); ++
i)
1376 OSL_ENSURE(pSubGroup,
"Why no sublist available?");
1379 pObject->SetMergedItemSetAndBroadcast(aSet);
1383 m_nDrawXOfs = m_nDrawXOfs -
static_cast<sal_Int16
>(SVBT16ToUInt16( pHd->
xa ));
1384 m_nDrawYOfs = m_nDrawYOfs -
static_cast<sal_Int16
>(SVBT16ToUInt16( pHd->
ya ));
1397 OSL_ENSURE(bCouldRead,
"Graphic Primitive header short read" );
1404 if( rLeft >= SVBT16ToUInt16(aHd.
cb) )
1407 switch (SVBT16ToUInt16(aHd.
dpk) & 0xff )
1410 pRet = ReadGroup(&aHd, rSet);
1413 pRet = ReadLine(&aHd, rSet);
1416 pRet = ReadTextBox(&aHd, rSet);
1419 pRet = ReadRect(&aHd, rSet);
1422 pRet = ReadEllipse(&aHd, rSet);
1425 pRet = ReadArc(&aHd, rSet);
1428 pRet = ReadPolyLine(&aHd, rSet);
1431 pRet = ReadCaptionBox(&aHd, rSet);
1434 m_pStrm->SeekRel(SVBT16ToUInt16(aHd.
cb) -
sizeof(
WW8_DPHEAD));
1440 OSL_ENSURE(
false,
"+Grafik-Overlap" );
1442 rLeft = rLeft - SVBT16ToUInt16( aHd.
cb );
1451 if (!rPF.
Get(nStartFc, pF0))
1453 OSL_ENSURE(
false,
"+Where is the graphic (2) ?" );
1457 if( !SVBT32ToUInt32( pF->
fc ) )
1459 OSL_ENSURE(
false,
"+Where is the graphic (3) ?" );
1463 sal_uInt32 nPosFc = SVBT32ToUInt32(pF->
fc);
1468 if (!m_aGrafPosSet.insert(nPosFc).second)
1472 bool bCouldSeek =
checkSeek(*m_pStrm, nPosFc);
1473 OSL_ENSURE(bCouldSeek,
"Invalid graphic offset");
1480 OSL_ENSURE(bCouldRead,
"Short graphic header");
1484 short nLeft = SVBT16ToUInt16( aDo.
cb ) -
sizeof(
WW8_DO );
1485 while (nLeft > static_cast<short>(
sizeof(
WW8_DPHEAD)))
1490 m_xWWZOrder->InsertDrawingObject(
pObject, SVBT16ToUInt16(aDo.
dhgt));
1494 const sal_uInt32 nCntRelTo = 3;
1497 static const sal_Int16 aHoriRelOriTab[nCntRelTo] =
1499 text::RelOrientation::PAGE_PRINT_AREA,
1500 text::RelOrientation::PAGE_FRAME,
1501 text::RelOrientation::FRAME,
1505 static const sal_Int16 aVertRelOriTab[nCntRelTo] =
1507 text::RelOrientation::PAGE_PRINT_AREA,
1508 text::RelOrientation::PAGE_FRAME,
1509 text::RelOrientation::FRAME,
1512 const int nXAlign = aDo.
bx < nCntRelTo ? aDo.
bx : 0;
1513 const int nYAlign = aDo.
by < nCntRelTo ? aDo.
by : 0;
1516 aHoriRelOriTab[ nXAlign ]));
1518 aVertRelOriTab[ nYAlign ]));
1521 pObject->SetMergedItemSet(aSet);
1525 pDrawFrame->PosAttrSet();
1528 AddAutoAnchor(pFrame);
1534 MSO_SPT eShapeType, sal_Int32 &rThick)
1536 sal_Int32 nOutsideThick = 0;
1551 nOutsideThick = eShapeType !=
mso_sptTextBox ? rThick : rThick/2;
1556 nOutsideThick = rThick/6;
1557 rThick = rThick*2/3;
1560 nOutsideThick = rThick*2/3;
1565 nOutsideThick = rThick*3/10;
1566 rThick = rThick*4/5;
1569 nOutsideThick = rThick*4/5;
1575 nOutsideThick = rThick/10;
1576 rThick = rThick*3/5;
1579 nOutsideThick = rThick*3/5;
1585 return nOutsideThick;
1595 sal_Int32 nOutsideThick = 0;
1597 return nOutsideThick;
1601 sal_Int32 nLineThick=rLineThick;
1603 eShapeType, rLineThick);
1615 switch( +eLineStyle )
1619 nIdx = SvxBorderLineStyle::SOLID;
1623 nIdx = SvxBorderLineStyle::DOUBLE;
1626 nIdx = SvxBorderLineStyle::THICKTHIN_SMALLGAP;
1629 nIdx = SvxBorderLineStyle::THINTHICK_SMALLGAP;
1633 nIdx = SvxBorderLineStyle::DOUBLE;
1640 OSL_ENSURE(
false,
"eLineStyle is not (yet) implemented!");
1647 nIdx = SvxBorderLineStyle::DASHED;
1650 nIdx = SvxBorderLineStyle::DOTTED;
1656 if (SvxBorderLineStyle::NONE != nIdx)
1658 SvxBorderLine aLine;
1659 aLine.SetColor( rLineColor );
1661 aLine.SetWidth( nLineThick );
1662 aLine.SetBorderLineStyle(nIdx);
1671 return nOutsideThick;
1674 #define WW8ITEMVALUE(ItemSet,Id,Cast) ItemSet.GetItem<Cast>(Id)->GetValue()
1702 static sal_uInt16
const aDirectMatch[]
1708 for(sal_uInt16
i : aDirectMatch)
1709 if( SfxItemState::SET == rOldSet.
GetItemState(
i,
false, &pPoolItem) )
1711 rFlySet.
Put( *pPoolItem );
1715 bool bSkipResBackground =
false;
1723 while ( pAttrPool && !pAttrPool->
IsInRange(
i) )
1728 if ( SfxItemState::SET == rOldSet.
GetItemState(
i,
false, &pPoolItem) )
1730 rFlySet.
Put( *pPoolItem );
1736 if ( eFill != drawing::FillStyle_NONE )
1737 bSkipResBackground =
true;
1748 sal_Int32 nLineThick = 15, nOutside=0;
1753 if( eState == SfxItemState::SET )
1763 nOutside = MatchSdrBoxIntoFlyBoxItem(aLineColor, eLineStyle,
1764 eDashing, eShapeType, nLineThick, aBox);
1772 rInnerDist.
AdjustLeft( -(aBox.CalcLineWidth( SvxBoxItemLine::LEFT )) );
1773 rInnerDist.
AdjustTop( -(aBox.CalcLineWidth( SvxBoxItemLine::TOP )) );
1774 rInnerDist.
AdjustRight( -(aBox.CalcLineWidth( SvxBoxItemLine::RIGHT )) );
1775 rInnerDist.
AdjustBottom( -(aBox.CalcLineWidth( SvxBoxItemLine::BOTTOM )) );
1778 if( 0 < rInnerDist.
Left() )
1779 aBox.SetDistance( o3tl::narrowing<sal_uInt16>(rInnerDist.
Left()), SvxBoxItemLine::LEFT );
1780 if( 0 < rInnerDist.
Top() )
1781 aBox.SetDistance( o3tl::narrowing<sal_uInt16>(rInnerDist.
Top()), SvxBoxItemLine::TOP );
1782 if( 0 < rInnerDist.
Right() )
1783 aBox.SetDistance( o3tl::narrowing<sal_uInt16>(rInnerDist.
Right()), SvxBoxItemLine::RIGHT );
1784 if( 0 < rInnerDist.
Bottom() )
1785 aBox.SetDistance( o3tl::narrowing<sal_uInt16>(rInnerDist.
Bottom()), SvxBoxItemLine::BOTTOM );
1808 rFlySet.
Put( aNewSize );
1825 rFlySet.
Put( aBox );
1844 if( 0 <= nShdDistX )
1846 if( 0 <= nShdDistY )
1847 eShdPosi = SvxShadowLocation::BottomRight;
1849 eShdPosi = SvxShadowLocation::TopRight;
1853 if( 0 <= nShdDistY )
1854 eShdPosi = SvxShadowLocation::BottomLeft;
1856 eShdPosi = SvxShadowLocation::TopLeft;
1860 rFlySet.
Put( aShadow );
1863 bool bBrushItemOk =
false;
1868 if (!bSkipResBackground && eState == SfxItemState::SET)
1872 nTrans =
sal_uInt8((nRes * 0xFE) / 100);
1874 bBrushItemOk =
true;
1879 if (!bSkipResBackground && pFillStyleItem)
1881 const drawing::FillStyle eFill = pFillStyleItem->GetValue();
1886 case drawing::FillStyle_NONE:
1891 bBrushItemOk =
true;
1894 case drawing::FillStyle_SOLID:
1895 case drawing::FillStyle_GRADIENT:
1897 const Color aColor =
1904 bBrushItemOk =
true;
1907 case drawing::FillStyle_HATCH:
1909 case drawing::FillStyle_BITMAP:
1919 aGrfObj.SetAttr(aAttr);
1924 bBrushItemOk =
true;
1931 rFlySet.
Put(aBrushItem);
1947 if ((nXRelTo == 0) || (nXRelTo == 2))
1955 if ((nXRelTo == 0) || (nXRelTo == 2))
1960 if ((rRecord.
nXAlign == 4) && (nXRelTo == 0))
1966 if ((rRecord.
nXAlign == 5) && (nXRelTo == 0))
1985 if ((nYRelTo == 0) || (nYRelTo == 1))
1993 if ((nYRelTo == 0) || (nYRelTo == 1))
1998 if ((rRecord.
nYAlign == 4) && (nYRelTo == 0))
2009 AdjustLRWrapForWordMargins(rRecord, aLR);
2016 AdjustULWrapForWordMargins(rRecord, aUL);
2072 const Size &rSize = pNd->GetTwipSize();
2082 aPoly.
Move(nMove, 0);
2086 aPoly.
Scale(
double(aHackX),
double(aHackY));
2089 const Size &rOrigSize = pNd->GetGraphic().GetPrefSize();
2092 aPoly.
Scale(
double(aMapPolyX),
double(aMapPolyY));
2096 pNd->SetContour(&aPoly);
2112 sal_Int32
const nIntegral(static_cast<sal_Int32>(nCrop) >> 16);
2114 if (
abs(nIntegral) >= 50)
2116 SAL_INFO(
"sw.ww8",
"ignoring suspiciously large crop: " << nIntegral);
2119 return (nIntegral * nSize) + (((nCrop & 0xffff) * nSize) >> 16);
2131 Size aSz(pGrfNd->GetTwipSize());
2134 sal_uInt64 nHeight = aSz.
Height();
2135 sal_uInt64 nWidth = aSz.Width();
2138 else if (!nHeight && pF)
2163 pGrfNd->SetAttr( aCrop );
2166 bool bFlipH(rRecord.
nFlags & ShapeFlag::FlipH);
2167 bool bFlipV(rRecord.
nFlags & ShapeFlag::FlipV);
2168 if ( bFlipH || bFlipV )
2170 SwMirrorGrf aMirror = pGrfNd->GetSwAttrSet().GetMirrorGrf();
2181 pGrfNd->SetAttr( aMirror );
2195 pGrfNd->SetAttr( aContrast );
2204 pGrfNd->SetAttr( aLuminance );
2216 if ( nGrafMode != GraphicDrawMode::Standard)
2219 pGrfNd->SetAttr( aDrawMode );
2231 if (
auto pFlyFrameFormat = dynamic_cast<SwFlyFrameFormat *>( pFlyFormat ))
2234 pNewObject = pContactObject->
GetMaster();
2243 sal_Int16 eHoriOri, sal_Int16 eHoriRel)
2245 if (!IsRightToLeft())
2248 m_aSectionManager.GetPageLeft(),
2249 m_aSectionManager.GetPageRight(),
2250 m_aSectionManager.GetPageWidth());
2256 bool bCurSectionVertical = m_aSectionManager.CurrentSectionIsVertical();
2273 const sal_uInt32 nCntXAlign = 6;
2274 const sal_uInt32 nCntYAlign = 6;
2276 const sal_uInt32 nCntRelTo = 4;
2278 sal_uInt32 nXAlign = nCntXAlign > rRecord.
nXAlign ? rRecord.
nXAlign : 1;
2279 sal_uInt32 nYAlign = nCntYAlign > rRecord.
nYAlign ? rRecord.
nYAlign : 1;
2285 const bool bXYRelHaveDefaultValues = *rRecord.
nXRelTo == 2 && *rRecord.
nYRelTo == 2;
2286 if (bXYRelHaveDefaultValues && m_nInTable > 0 && !bCurSectionVertical)
2288 if (sal_uInt32(rFSPA.
nby) != rRecord.
nYRelTo)
2295 RndStdIds eAnchor = IsInlineEscherHack() ? RndStdIds::FLY_AS_CHAR : RndStdIds::FLY_AT_CHAR;
2298 aAnchor.
SetAnchor( m_pPaM->GetPoint() );
2299 rFlySet.
Put( aAnchor );
2306 static const sal_Int16 aHoriOriTab[ nCntXAlign ] =
2309 text::HoriOrientation::LEFT,
2310 text::HoriOrientation::CENTER,
2311 text::HoriOrientation::RIGHT,
2314 text::HoriOrientation::LEFT,
2315 text::HoriOrientation::RIGHT
2319 static const sal_Int16 aVertOriTab[ nCntYAlign ] =
2322 text::VertOrientation::TOP,
2323 text::VertOrientation::CENTER,
2324 text::VertOrientation::BOTTOM,
2325 text::VertOrientation::LINE_TOP,
2326 text::VertOrientation::LINE_BOTTOM
2330 static const sal_Int16 aToLineVertOriTab[ nCntYAlign ] =
2333 text::VertOrientation::LINE_BOTTOM,
2334 text::VertOrientation::LINE_CENTER,
2335 text::VertOrientation::LINE_TOP,
2336 text::VertOrientation::LINE_BOTTOM,
2337 text::VertOrientation::LINE_TOP
2341 static const sal_Int16 aHoriRelOriTab[nCntRelTo] =
2343 text::RelOrientation::PAGE_PRINT_AREA,
2344 text::RelOrientation::PAGE_FRAME,
2345 text::RelOrientation::FRAME,
2346 text::RelOrientation::CHAR
2351 static const sal_Int16 aVertRelOriTab[nCntRelTo] =
2353 text::RelOrientation::PAGE_PRINT_AREA,
2354 text::RelOrientation::PAGE_FRAME,
2355 text::RelOrientation::FRAME,
2356 text::RelOrientation::TEXT_LINE
2359 sal_Int16 eHoriOri = aHoriOriTab[ nXAlign ];
2360 sal_Int16 eHoriRel = aHoriRelOriTab[ nXRelTo ];
2363 if (eHoriOri == text::HoriOrientation::LEFT && eHoriRel == text::RelOrientation::PAGE_FRAME)
2367 eHoriRel = text::RelOrientation::PAGE_PRINT_AREA;
2372 else if (eHoriOri == text::HoriOrientation::RIGHT && eHoriRel == text::RelOrientation::PAGE_FRAME)
2376 eHoriRel = text::RelOrientation::PAGE_RIGHT;
2389 if (MiserableRTLGraphicsHack(nLeft, nWidth, eHoriOri,
2402 (eHoriRel == text::RelOrientation::FRAME || eHoriRel == text::RelOrientation::CHAR) &&
2406 eHoriRel = text::RelOrientation::PAGE_PRINT_AREA;
2411 if (eHoriOri == text::HoriOrientation::LEFT)
2413 else if (eHoriOri == text::HoriOrientation::RIGHT)
2418 eVertRel = aVertRelOriTab[ nYRelTo ];
2419 if (bCurSectionVertical && nYRelTo == 2)
2420 eVertRel = text::RelOrientation::PAGE_PRINT_AREA;
2423 if (eVertRel == text::RelOrientation::TEXT_LINE)
2425 eVertOri = aToLineVertOriTab[ nYAlign ];
2429 eVertOri = aVertOriTab[ nYAlign ];
2440 bCurSectionVertical ? eVertOri : eHoriOri,
2441 bCurSectionVertical ? eVertRel : eHoriRel);
2444 rFlySet.
Put(aHoriOri);
2447 !bCurSectionVertical ? eVertOri : eHoriOri,
2448 !bCurSectionVertical ? eVertRel : eHoriRel));
2456 bool bIsObjectLayoutInTableCell =
false;
2460 sal_uInt16 nWWVersion = m_xWwFib->m_nProduct & 0xE000;
2461 if (nWWVersion == 0)
2464 if (m_xWwFib->m_cswNew > 0)
2467 nWWVersion = 0x2000;
2471 switch ( nWWVersion )
2475 bIsObjectLayoutInTableCell =
false;
2476 OSL_ENSURE(nGroupShapeBooleanProperties == 0,
2477 "no explicit object attribute layout in table cell expected." );
2488 bool fUsefLayoutInCell = (nGroupShapeBooleanProperties & 0x80000000) >> 31;
2489 bool fLayoutInCell = (nGroupShapeBooleanProperties & 0x8000) >> 15;
2491 bIsObjectLayoutInTableCell = !fUsefLayoutInCell || fLayoutInCell;
2496 OSL_FAIL(
"unknown version." );
2501 return bIsObjectLayoutInTableCell;
2519 OSL_ENSURE(
false,
"Where is the graphic (1) ?" );
2525 sal_uInt64 nOldPos = m_pStrm->Tell();
2527 m_nDrawXOfs = m_nDrawYOfs = 0;
2528 ReadGrafLayer1(*pPF, nGrafAnchorCp);
2530 m_pStrm->Seek( nOldPos );
2535 pPF->
SeekPos( nGrafAnchorCp );
2539 if (!pPF->
Get(nStartFc, pF0))
2541 OSL_ENSURE(
false,
"+Where is the graphic (2) ?" );
2550 OSL_ENSURE(
false,
"+Where is the graphic (3) ?" );
2554 if (!m_xMSDffManager->GetModel())
2555 m_xMSDffManager->SetModel(m_pDrawModel, 1440);
2569 bool bOk = (m_xMSDffManager->GetShape(aFSFA.
nSpId, pObject, aData) && pObject);
2575 OSL_ENSURE(
false,
"Where is the Shape ?" );
2584 aFSFA.
nXaLeft = aObjSnapRect.Left();
2585 aFSFA.
nYaTop = aObjSnapRect.Top();
2586 aFSFA.
nXaRight = aObjSnapRect.Right();
2587 aFSFA.
nYaBottom = aObjSnapRect.Bottom();
2592 bool bReplaceable =
false;
2596 case SdrObjKind::Graphic:
2597 bReplaceable =
true;
2600 case SdrObjKind::OLE2:
2601 bReplaceable =
true;
2613 css::text::WrapTextMode eSurround = css::text::WrapTextMode_PARALLEL;
2614 bool bContour =
false;
2619 eSurround = css::text::WrapTextMode_PARALLEL;
2622 eSurround = css::text::WrapTextMode_NONE;
2625 eSurround = css::text::WrapTextMode_THROUGH;
2629 eSurround = css::text::WrapTextMode_PARALLEL;
2635 if ((2 == aFSFA.
nwr) || (4 == aFSFA.
nwr))
2641 eSurround = css::text::WrapTextMode_PARALLEL;
2645 eSurround = css::text::WrapTextMode_LEFT;
2649 eSurround = css::text::WrapTextMode_RIGHT;
2653 eSurround = css::text::WrapTextMode_DYNAMIC;
2661 aFlySet.Put( aSur );
2665 OSL_ENSURE(!((aData.
size() != 1) && bReplaceable),
2666 "Replaceable drawing with > 1 entries ?");
2668 if (aData.
size() != 1)
2669 bReplaceable =
false;
2676 OSL_ENSURE(pRecord,
"how did that happen?");
2680 m_xMSDffManager->RemoveFromShapeOrder(pObject);
2685 const bool bLayoutInTableCell =
2690 if (bLayoutInTableCell)
2693 aFlySet.Put( aFollowTextFlow );
2701 m_xMSDffManager->RemoveFromShapeOrder(pObject);
2710 OUString lnName, aObjName, aTarFrame;
2711 for (sal_uInt16
i = 0;
i < nCount;
i++ )
2714 if( pData && pData->
GetInventor() == SdrInventor::ScOrSwDraw
2727 std::unique_ptr<SwFormatURL> pFormatURL(
new SwFormatURL());
2728 pFormatURL->SetURL( lnName,
false );
2729 if (!aObjName.isEmpty())
2730 pFormatURL->SetName(aObjName);
2731 if (!aTarFrame.isEmpty())
2732 pFormatURL->SetTargetFrameName(aTarFrame);
2733 pFormatURL->SetMap(
nullptr);
2734 aFlySet.Put(*pFormatURL);
2743 const bool bMoveToBackground = pRecord->
bDrawHell ||
2744 ((m_bIsHeader || m_bIsFooter) && aFSFA.
nwr == 3);
2745 if ( bMoveToBackground )
2748 OUString aObjName = pObject->
GetName();
2750 bool bDrawObj =
false;
2751 bool bFrame =
false;
2757 pRetFrameFormat = ImportReplaceableDrawables(pObject, pOurNewObject, *pRecord, aFSFA, aFlySet);
2770 RndStdIds eAnchor = ProcessEscherAlign(*pRecord, aFSFA, aFlySet);
2776 = ConvertDrawTextToFly(pObject, pOurNewObject, *pRecord, eAnchor, aFSFA, aFlySet);
2777 if (pRetFrameFormat)
2788 if ( bMoveToBackground )
2793 if (!IsInlineEscherHack())
2797 m_xWWZOrder->InsertEscherObject(pObject, aFSFA.
nSpId, pRecord->
bDrawHell,
2798 m_bIsHeader || m_bIsFooter);
2802 m_xWWZOrder->InsertTextLayerObject(pObject);
2808 eAnchor,
"Not the anchor type requested!");
2813 for (
const auto& it : aData)
2818 pRetFrameFormat = MungeTextIntoDrawBox(
2819 *pRecord, nGrafAnchorCp, pRetFrameFormat);
2827 if (pDrawFrameFormat)
2829 if (!IsInlineEscherHack() && pRetFrameFormat)
2830 MapWrapIntoFlyFormat(*pRecord, *pRetFrameFormat);
2833 if (pRetFrameFormat )
2835 if (!aObjName.isEmpty())
2836 pRetFrameFormat->
SetName( aObjName );
2837 if (pRetFrameFormat->
GetName().isEmpty())
2845 return AddAutoAnchor(pRetFrameFormat);
2858 m_xAnchorStck->AddAnchor(*m_pPaM->GetPoint(), pFormat);
2871 if (
SdrObjGroup* pThisGroup = dynamic_cast<SdrObjGroup*>(rRecord.
pObj))
2878 pThisGroup->GetCurrentBoundRect());
2880 SfxItemSet aSet(m_pDrawModel->GetItemPool());
2887 pSdrTextObj->
NbcSetLayer( pThisGroup->GetLayer() );
2888 pThisGroup->GetSubList()->NbcInsertObject(pSdrTextObj);
2901 const size_t nOrdNum = pSdrTextObj->
GetOrdNum();
2902 bool bEraseThisObject;
2904 nGrafAnchorCp, pRetFrameFormat,
2905 (pSdrTextObj != pTrueObject) || (
nullptr != pGroupObject), bEraseThisObject,
2906 nullptr,
nullptr,
nullptr,
nullptr, &rRecord);
2909 if (bEraseThisObject)
2911 if( pGroupObject || (pSdrTextObj != pTrueObject) )
2917 pGroupObject->GetSubList()->GetObj(nOrdNum) : pTrueObject;
2918 if (pSdrTextObj != pNewObj)
2921 m_xMSDffManager->ExchangeInShapeOrder(pSdrTextObj, 0, pNewObj);
2925 rRecord.
pObj = pNewObj;
2931 m_xMSDffManager->RemoveFromShapeOrder( pSdrTextObj );
2934 m_pDrawPg->RemoveObject( pSdrTextObj->
GetOrdNum() );
2938 pRetFrameFormat =
nullptr;
2940 rRecord.
pObj =
nullptr;
2947 aItemSet(m_pDrawModel->GetItemPool());
2955 return pRetFrameFormat;
2970 if (TxbxChainContainsRealText(rRecord.
aTextId.
nTxBxS, nStartCp, nEndCp))
2984 rFlySet.
Put(aFrameSize);
2995 "Not the anchor type requested!");
2999 rpOurNewObject = CreateContactObject(pRetFrameFormat);
3002 m_xMSDffManager->RemoveFromShapeOrder( rpObject );
3023 m_xMSDffManager->StoreShapeOrder(rF.
nSpId,
3029 if (!rpOurNewObject->IsInserted())
3032 m_xWWZOrder->InsertEscherObject(rpOurNewObject, rF.
nSpId, rRecord.
bDrawHell,
3033 m_bIsHeader || m_bIsFooter);
3043 MoveInsideFly(pRetFrameFormat);
3045 m_xWWZOrder->InsideEscher(rF.
nSpId);
3048 m_bTxbxFlySection =
true;
3049 bool bJoined = ReadText(nStartCp, (nEndCp-nStartCp),
3053 m_xWWZOrder->OutsideEscher();
3055 MoveOutsideFly(pRetFrameFormat, aSave.
GetStartPos(),!bJoined);
3059 StripNegativeAfterIndent(pRetFrameFormat);
3063 return pRetFrameFormat;
3095 ProcessEscherAlign(rRecord, rF, rFlySet);
3110 OUString aObjectName(rpObject->
GetName());
3112 pRetFrameFormat = InsertOle(*static_cast<SdrOle2Obj*>(rpObject), rFlySet, &aGrSet);
3130 *m_pPaM, aGrfName, OUString(),
nullptr,
3131 &rFlySet, &aGrSet,
nullptr);
3139 *m_pPaM, OUString(), OUString(), &rGraph,
3140 &rFlySet, &aGrSet,
nullptr);
3144 if (pRetFrameFormat)
3147 SetAttributesAtGrfNode(rRecord, *pRetFrameFormat, &rF);
3149 m_aGrfNameGenerator.SetUniqueGraphName(pRetFrameFormat, aObjectName);
3153 rpOurNewObject = CreateContactObject(pRetFrameFormat);
3156 m_xMSDffManager->RemoveFromShapeOrder( rpObject );
3159 m_pDrawPg->RemoveObject( rpObject->
GetOrdNum() );
3170 if (!m_bHdFtFootnoteEdn)
3171 m_xMSDffManager->StoreShapeOrder(rF.
nSpId, 0, rpOurNewObject);
3178 m_xWWZOrder->InsertEscherObject(rpOurNewObject, rF.
nSpId, rRecord.
bDrawHell,
3179 m_bIsHeader || m_bIsFooter);
3182 return pRetFrameFormat;
3192 OSL_ENSURE(m_pDrawModel,
"Cannot create DrawModel");
3193 m_pDrawPg = m_pDrawModel->GetPage(0);
3196 m_xMSDffManager->SetModel(m_pDrawModel, 1440);
3204 m_xMSDffManager->GetShapeOrders()));
3209 m_pDrawEditEngine.reset();
3210 m_xWWZOrder.reset();
3216 "Don't use fltanchors with inline frames, slap!");
3222 size_t nCnt =
size();
3223 for (
size_t i=0;
i < nCnt; ++
i)
3227 SetAttrInDoc(aDummy, rEntry);
3228 DeleteAndDestroy(
i--);
static ESelection GetESelection(EditEngine const &rDrawEditEngine, tools::Long nCpStart, tools::Long nCpEnd)
constexpr TypedWhichId< SdrOnOffItem > SDRATTR_TEXT_AUTOGROWHEIGHT(SDRATTR_MISC_FIRST+2)
simple Iterator for SPRMs
virtual void NbcSetOutlinerParaObject(std::optional< OutlinerParaObject > pTextObject) override
constexpr TypedWhichId< SvxFrameDirectionItem > RES_FRAMEDIR(120)
std::optional< OutlinerParaObject > ImportAsOutliner(OUString &rString, WW8_CP nStartCp, WW8_CP nEndCp, ManTypes eType)
tools::Long GetWidth() const
SdrMetricItem makeSdrTextUpperDistItem(tools::Long mnHeight)
constexpr TypedWhichId< SdrGrafGamma100Item > SDRATTR_GRAFGAMMA(SDRATTR_GRAF_FIRST+5)
tools::Long GetIMax() const
bool checkRead(SvStream &rSt, void *pDest, sal_uInt32 nLength)
SwNoTextNode * GetNoTextNodeFromSwFrameFormat(const SwFrameFormat &rFormat)
Get the SwNoTextNode associated with a SwFrameFormat if here is one.
SdrMetricItem makeSdrShadowYDistItem(tools::Long nDist)
constexpr SwTwips MIN_BORDER_DIST
SdrObject * ReadPolyLine(WW8_DPHEAD const *pHd, SfxAllItemSet &rSet)
void append(const basegfx::B2DPoint &rPoint, sal_uInt32 nCount)
static sal_Int32 MatchSdrBoxIntoFlyBoxItem(const Color &rLineColor, MSO_LineStyle eLineStyle, MSO_LineDashing eDashing, MSO_SPT eShapeType, sal_Int32 &rLineWidth, SvxBoxItem &rBox)
void SetRight(const tools::Long nR, const sal_uInt16 nProp=100)
sal_Int32 nDxWrapDistRight
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
void SetAlpha(sal_uInt8 nAlpha)
Marks a position in the document model.
bool RTLGraphicsHack(SwTwips &rLeft, SwTwips nWidth, sal_Int16 eHoriOri, sal_Int16 eHoriRel, SwTwips nPageLeft, SwTwips nPageRight, SwTwips nPageSize)
virtual const tools::Rectangle & GetCurrentBoundRect() const
WW8_DP_POLYLINE dpPolyLine
void SetSprms(const sal_uInt8 *pSprms_, sal_Int32 nLen_)
constexpr sal_uInt16 RES_FLTRATTR_BEGIN(RES_MSG_END)
sal_Int32 GetRangeAsDrawingString(OUString &rString, tools::Long StartCp, tools::Long nEndCp, ManTypes eType)
void SetBlue(sal_uInt8 nBlue)
static void SetFill(SfxItemSet &rSet, WW8_DP_FILL &rFill)
OUString GetUniqueDrawObjectName() const
SdrObject * ReadCaptionBox(WW8_DPHEAD const *pHd, SfxAllItemSet &rSet)
void SetLeft(sal_Int32 nVal)
WW8_DPHEAD dpheadPolyLine
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_LIGHTMAGENTA
const OUString & GetFileName() const
virtual SwFlyFrameFormat * InsertGraphic(const SwPaM &rRg, const OUString &rGrfName, const OUString &rFltName, const Graphic *pGraphic, const SfxItemSet *pFlyAttrSet, const SfxItemSet *pGrfAttrSet, SwFrameFormat *)=0
Insert graphic or formula.
SwDocShell * GetDocShell()
SvxMSDffImportRec * find(const SdrObject *pObj)
static sal_Int32 lcl_ConvertCrop(sal_uInt32 const nCrop, sal_Int32 const nSize)
constexpr TypedWhichId< SwFormatFrameSize > RES_FRM_SIZE(89)
sal_Int32 nDxWrapDistLeft
constexpr::Color COL_RED(0x80, 0x00, 0x00)
std::unique_ptr< sal_Int32[]> pData
void MatchSdrItemsIntoFlySet(SdrObject const *pSdrObj, SfxItemSet &aFlySet, MSO_LineStyle eLineStyle, MSO_LineDashing eDashing, MSO_SPT eShapeType, tools::Rectangle &rInnerDist)
void SetDots(sal_uInt16 nNewDots)
void SetColor(const Color &rNew)
constexpr TypedWhichId< XFillStyleItem > XATTR_FILLSTYLE(XATTR_FILL_FIRST)
sal_uInt16 GetCurrentId() const
static void AdjustLRWrapForWordMargins(const SvxMSDffImportRec &rRecord, SvxLRSpaceItem &rLR)
constexpr TypedWhichId< XLineWidthItem > XATTR_LINEWIDTH(XATTR_LINE_FIRST+2)
#define WW8FL_NO_GRAFLAYER
static sal_Int32 GetEscherLineMatch(MSO_LineStyle eStyle, MSO_SPT eShapeType, sal_Int32 &rThick)
constexpr sal_uInt16 RES_FRMATR_END(133)
const OUString & GetTarFrame() const
void WW8FSPAShadowToReal(const WW8_FSPA_SHADOW &rFSPAS, WW8_FSPA &rPic)
OUString GetUniqueFrameName() const
constexpr TypedWhichId< XLineStyleItem > XATTR_LINESTYLE(XATTR_LINE_FIRST)
bool CanUseRemoteLink(const OUString &rGrfName)
constexpr TypedWhichId< SvxOpaqueItem > RES_OPAQUE(99)
static void MapWrapIntoFlyFormat(const SvxMSDffImportRec &rRecord, SwFrameFormat &rFlyFormat)
constexpr::Color COL_LIGHTGRAY(0xC0, 0xC0, 0xC0)
SdrMetricItem makeSdrTextRightDistItem(tools::Long mnHeight)
SdrMetricItem makeSdrTextLowerDistItem(tools::Long mnHeight)
static void Free(SdrObject *&_rpObject)
virtual SdrObjKind GetObjIdentifier() const
SwNodeOffset abs(const SwNodeOffset &a)
T saturating_sub(T a, T b)
IDocumentContentOperations const & getIDocumentContentOperations() const
virtual void InsertObject(SdrObject *pObj, size_t nPos=SAL_MAX_SIZE)
virtual const tools::Rectangle & GetSnapRect() const override
GraphicType GetGraphicType() const
EmbeddedObjectRef * pObject
virtual SdrObjList * GetSubList() const
const OUString & GetName() const
Make setting a drawing object's layer in a Writer document easy.
SdrOnOffItem makeSdrTextAutoGrowHeightItem(bool bAuto)
void SetRight(sal_Int32 nVal)
const int nWrap100Percent
For custom wrapping.
IDocumentDrawModelAccess const & getIDocumentDrawModelAccess() const
const OUString & GetHlink() const
virtual const tools::Rectangle & GetSnapRect() const
SdrObject * ReadEllipse(WW8_DPHEAD const *pHd, SfxAllItemSet &rSet)
void SetGraphicObject(const GraphicObject &rNewObj)
constexpr::Color COL_MAGENTA(0x80, 0x00, 0x80)
constexpr tools::Long Width() const
constexpr TypedWhichId< SwFormatVertOrient > RES_VERT_ORIENT(102)
static void ResetFrameFormatAttrs(SfxItemSet &rFrameSet)
SwFlyFrameFormat * MakeFlySection(RndStdIds eAnchorType, const SwPosition *pAnchorPos, const SfxItemSet *pSet=nullptr, SwFrameFormat *pParent=nullptr, bool bCalledFromShell=false)
constexpr TypedWhichId< SvxFieldItem > EE_FEATURE_FIELD(EE_FEATURE_NOTCONV+1)
constexpr sal_uInt16 RES_GRFATR_END(150)
constexpr TypedWhichId< SwFormatHoriOrient > RES_HORI_ORIENT(103)
SdrPage * getSdrPageFromSdrObject() const
#define WW8FL_NO_FLY_FOR_TXBX
constexpr::Color COL_CYAN(0x00, 0x80, 0x80)
constexpr sal_uInt16 POOLATTR_BEGIN(HINT_BEGIN)
static void lcl_StripFields(OUString &rString, WW8_CP &rNewStartCp)
static void SetStdAttr(SfxItemSet &rSet, WW8_DP_LINETYPE &rL, WW8_DP_SHADOW const &rSh)
constexpr TypedWhichId< XColorItem > SDRATTR_SHADOWCOLOR(SDRATTR_SHADOW_FIRST+1)
void SetMergedItemSet(const SfxItemSet &rSet, bool bClearAllItems=false)
void InsertTxbxText(SdrTextObj *pTextObj, Size const *pObjSiz, sal_uInt16 nTxBxS, sal_uInt16 nSequence, tools::Long nPosCp, SwFrameFormat const *pFlyFormat, bool bMakeSdrGrafObj, bool &rbEraseTextObj, bool *pbTestTxbxContainsText=nullptr, tools::Long *pnStartCp=nullptr, tools::Long *pnEndCp=nullptr, bool *pbContainsGraphics=nullptr, SvxMSDffImportRec const *pRecord=nullptr)
SwNodeOffset GetIndex() const
SdrOnOffItem makeSdrTextAutoGrowWidthItem(bool bAuto)
void InsertTxbxStyAttrs(SfxItemSet &rS, sal_uInt16 nColl)
constexpr TypedWhichId< SdrOnOffItem > SDRATTR_SHADOW(SDRATTR_SHADOW_FIRST+0)
sal_uInt8 GetBlue() const
sal_Int32 GetTextLen() const
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_LIGHTRED
void SetColor(const Color &rCol)
void SetLower(const sal_uInt16 nL, const sal_uInt16 nProp=100)
constexpr TypedWhichId< SwFormatINetFormat > RES_TXTATR_INETFMT(51)
constexpr OUStringLiteral aData
#define SAL_N_ELEMENTS(arr)
void SetOutlinerMode(OutlinerMode nNew)
virtual void GetSprms(WW8PLCFxDesc *p) override
SwFrameFormat * Read_GrafLayer(tools::Long nGrafAnchorCp)
void SendObjectToHeaven(SdrObject &rObject) const
Make Object lives in the top layer.
const Color & GetColor() const
MSO_LineDashing eLineDashing
bool IsInRange(sal_uInt16 nWhich) const
void SetAttributesAtGrfNode(const SvxMSDffImportRec &rRecord, const SwFrameFormat &rFlyFormat, WW8_FSPA const *pF)
virtual void SetLayer(SdrLayerID nLayer)
bool checkSeek(SvStream &rSt, sal_uInt64 nOffset)
void SetUniqueGraphName(SwFrameFormat *pFrameFormat, std::u16string_view rFixedPart)
constexpr TypedWhichId< XFillTransparenceItem > XATTR_FILLTRANSPARENCE(XATTR_FILL_FIRST+5)
SwFrameFormat * MungeTextIntoDrawBox(SvxMSDffImportRec &rRecord, tools::Long nGrafAnchorCp, SwFrameFormat *pRetFrameFormat)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
constexpr TypedWhichId< SdrGrafLuminanceItem > SDRATTR_GRAFLUMINANCE(SDRATTR_GRAF_FIRST+3)
void SetAlpha(sal_uInt8 cAlpha)
void SetDistance(double nNewDistance)
constexpr TypedWhichId< XFillBitmapItem > XATTR_FILLBITMAP(XATTR_FILL_FIRST+4)
among others for fields, that is, the same number of attr as positions, if Ctor-Param bNoEnd = false ...
SwTwips MakeSafePositioningValue(SwTwips nIn)
Clips a value to MAX/MIN 16bit value to make it safe for use as a position value to give to writer...
void SetValue(EnumT nTheValue)
bool TxbxChainContainsRealText(sal_uInt16 nTxBxS, tools::Long &rStartCp, tools::Long &rEndCp)
bool GetTxbxTextSttEndCp(WW8_CP &rStartCp, WW8_CP &rEndCp, sal_uInt16 nTxBxS, sal_uInt16 nSequence)
void emplace(Args &&...args)
SVL_DLLPUBLIC Link< OUString *, bool > const & GetMaybeFileHdl()
const Graphic & GetGraphic() const
SwFrameFormat * AddAutoAnchor(SwFrameFormat *pFormat)
constexpr sal_uInt16 XATTR_START
static void SetLineEndAttr(SfxItemSet &rSet, WW8_DP_LINEEND const &rLe, WW8_DP_LINETYPE const &rLt)
SdrObject * ReadRect(WW8_DPHEAD const *pHd, SfxAllItemSet &rSet)
virtual const SwDrawModel * GetDrawModel() const =0
Draw Model and id accessors.
void SetMergedItemSetAndBroadcast(const SfxItemSet &rSet, bool bClearAllItems=false)
void SetRed(sal_uInt8 nRed)
void MatchEscherMirrorIntoFlySet(const SvxMSDffImportRec &rRecord, SfxItemSet &rFlySet)
static const int RELTO_DEFAULT
constexpr TypedWhichId< SdrGrafModeItem > SDRATTR_GRAFMODE(SDRATTR_GRAF_FIRST+8)
void SetTop(sal_Int32 nVal)
sal_uInt32 GetOrdNum() const
constexpr TypedWhichId< SdrMetricItem > SDRATTR_SHADOWYDIST(SDRATTR_SHADOW_FIRST+3)
void Restore(SwWW8ImplReader *pRdr)
Layout frame for SwNoTextNode, i.e. graphics and OLE nodes (including charts).
virtual void SetLogicRect(const tools::Rectangle &rRect)
static Color WW8TransCol(SVBT32 nWC)
Marks a node in the document model.
const sal_uInt16 LN_CObjLocation
sal_Int32 indexOfAny(std::u16string_view rIn, sal_Unicode const *const pChars, sal_Int32 const nPos)
bool SeekPos(tools::Long nPos)
sal_uInt16 GetSlotId(sal_uInt16 nWhich) const
constexpr sal_uInt16 XATTR_END
void SetDocShell(SwDocShell *pDSh)
tools::Long GetHeight() const
std::unique_ptr< SfxPoolItem > CloneSetWhich(sal_uInt16 nNewWhich) const
SfxItemPool * GetPool() const
Frame cannot be moved in Var-direction.
bool ReadGrafStart(void *pData, short nDataSiz, WW8_DPHEAD const *pHd, SfxAllItemSet &rSet)
sal_Int32 GetParagraphCount() const
constexpr sal_uInt16 POOLATTR_END(RES_UNKNOWNATR_END)
static void removePositions(EditEngine &rDrawEditEngine, const std::vector< sal_Int32 > &rDosLineEndDummies)
SdrMetricItem makeSdrTextLeftDistItem(tools::Long mnHeight)
virtual SdrLayerID GetLayer() const
bool Get(WW8_CP &rStart, void *&rpValue) const
const SwNodeIndex * GetContentIdx() const
static void AdjustULWrapForWordMargins(const SvxMSDffImportRec &rRecord, SvxULSpaceItem &rUL)
void SetGraphicPos(SvxGraphicPosition eNew)
SfxItemPool * GetSecondaryPool() const
sal_uInt8 GetGreen() const
bool IsLinkedGraphic() const
void GetPCDSprms(WW8PLCFxDesc &rDesc)
SdrObject * ReadTextBox(WW8_DPHEAD const *pHd, SfxAllItemSet &rSet)
virtual OUString GetURL() const override
constexpr TypedWhichId< XFillColorItem > XATTR_FILLCOLOR(XATTR_FILL_FIRST+1)
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
constexpr TypedWhichId< SdrMetricItem > SDRATTR_SHADOWXDIST(SDRATTR_SHADOW_FIRST+2)
void setClosed(bool bNew)
void SetDashes(sal_uInt16 nNewDashes)
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_LIGHTCYAN
std::optional< sal_uInt32 > nYRelTo
virtual SwDrawFrameFormat * InsertDrawObj(const SwPaM &rRg, SdrObject &rDrawObj, const SfxItemSet &rFlyAttrSet)=0
Insert a DrawObject.
virtual bool IsVerticalWriting() const
constexpr sal_uInt16 RES_FLTRATTR_END(197)
sal_Int32 nDyWrapDistBottom
constexpr TypedWhichId< SvxBrushItem > RES_BACKGROUND(105)
void SetLeft(const tools::Long nL, const sal_uInt16 nProp=100)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
sal_uInt16 GetWhich(sal_uInt16 nSlot, bool bDeep=true) const
#define SAL_WARN_IF(condition, area, stream)
#define WW8ITEMVALUE(ItemSet, Id, Cast)
constexpr tools::Long Height() const
void SetWidth(sal_uInt16 nNew)
constexpr::Color COL_GREEN(0x00, 0x80, 0x00)
SdrMetricItem makeSdrShadowXDistItem(tools::Long nDist)
constexpr sal_uInt16 RES_GRFATR_BEGIN(RES_FRMATR_END)
void SetIdx(tools::Long nI)
void SetGreen(sal_uInt8 nGreen)
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_WHITE
#define SAL_INFO(area, stream)
RndStdIds ProcessEscherAlign(SvxMSDffImportRec &rRecord, WW8_FSPA &rFSPA, SfxItemSet &rFlySet)
const SfxItemSet & GetMergedItemSet() const
void SetLocation(SvxShadowLocation eNew)
void SetProgressState(tools::Long nPosition, SwDocShell const *pDocShell)
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_BROWN
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_LIGHTGREEN
SfxItemPool * GetMasterPool() const
SdrObjUserData * GetUserData(sal_uInt16 nNum) const
virtual SwDrawModel * GetOrCreateDrawModel()=0
iterator for Piece Table Exceptions of Fkps works on CPs (high-level)
bool IsObjectLayoutInTableCell(const sal_uInt32 nGroupShapeBooleanProperties) const
void InsertAttrsAsDrawingAttrs(WW8_CP nStartCp, WW8_CP nEndCp, ManTypes eType, bool bONLYnPicLocFc=false)
const sal_uInt8 * GetCurrentParams() const
sal_Int32 nCropFromBottom
void QuickDelete(const ESelection &rSel)
constexpr TypedWhichId< XFillBmpTileItem > XATTR_FILLBMP_TILE(XATTR_FILL_FIRST+7)
SdrObject * CreateContactObject(SwFrameFormat *pFlyFormat)
SwFlyFrameFormat * ImportReplaceableDrawables(SdrObject *&rpObject, SdrObject *&rpOurNewObject, SvxMSDffImportRec &rRecord, WW8_FSPA &rF, SfxItemSet &rFlySet)
SdrObject * ReadGrafPrimitive(short &rLeft, SfxAllItemSet &rSet)
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_BLACK
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_YELLOW
constexpr TypedWhichId< SvxLRSpaceItem > RES_LR_SPACE(91)
SdrOnOffItem makeSdrShadowItem(bool bShadow)
sal_uInt16 GetUserDataCount() const
constexpr TypedWhichId< SvxBoxItem > RES_BOX(106)
SdrObject * getParentSdrObjectFromSdrObject() const
void SetDashLen(double nNewDashLen)
const sal_Int32 & GetShapeId() const
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_LIGHTBLUE
void DelFrameFormat(SwFrameFormat *pFormat, bool bBroadcast=false)
SdrObject * ReadArc(WW8_DPHEAD const *pHd, SfxAllItemSet &rSet)
constexpr TypedWhichId< SdrGrafContrastItem > SDRATTR_GRAFCONTRAST(SDRATTR_GRAF_FIRST+4)
#define SAL_WARN(area, stream)
SdrObject * ReadLine(WW8_DPHEAD const *pHd, SfxAllItemSet &rSet)
void SendObjectToHell(SdrObject &rObject) const
Make Object live in the bottom drawing layer.
virtual Degree100 GetRotateAngle() const
constexpr::Color COL_BLUE(0x00, 0x00, 0x80)
void ReadGrafLayer1(WW8PLCFspecial &rPF, tools::Long nGrafAnchorCp)
std::optional< sal_uInt32 > nXRelTo
virtual void NbcSetSnapRect(const tools::Rectangle &rRect) override
std::optional< tools::Polygon > pWrapPolygon
SwFlyFrameFormat * ConvertDrawTextToFly(SdrObject *&rpObject, SdrObject *&rpOurNewObject, const SvxMSDffImportRec &rRecord, RndStdIds eAnchor, const WW8_FSPA &rF, SfxItemSet &rFlySet)
const SwPosition & GetStartPos() const
Frame is variable in Var-direction.
sal_uInt32 nGroupShapeBooleanProperties
SdrObject * ReadGroup(WW8_DPHEAD const *pHd, SfxAllItemSet &rSet)
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
SdrInventor GetInventor() const
void SetUpper(const sal_uInt16 nU, const sal_uInt16 nProp=100)
constexpr TypedWhichId< XLineColorItem > XATTR_LINECOLOR(XATTR_LINE_FIRST+3)
void AddAnchor(const SwPosition &rPos, SwFrameFormat *pFormat)
static std::vector< sal_Int32 > replaceDosLineEndsButPreserveLength(OUString &rIn)
const sal_uInt8 * pMemPos
constexpr sal_uInt16 RES_FRMATR_BEGIN(RES_PARATR_LIST_END)
const OUString & GetName() const
constexpr TypedWhichId< SvxULSpaceItem > RES_UL_SPACE(92)
virtual void SetVerticalWriting(bool bVertical)
constexpr TypedWhichId< SvxShadowItem > RES_SHADOW(107)
void SetBottom(sal_Int32 nVal)
const sal_uInt8 * GetSprms() const
const SwAttrPool & GetAttrPool() const
void SetLine(const editeng::SvxBorderLine *pNew, SvxBoxItemLine nLine)
SVL_DLLPUBLIC OUString SmartRel2Abs(INetURLObject const &rTheBaseURIRef, OUString const &rTheRelURIRef, Link< OUString *, bool > const &rMaybeFileHdl=Link< OUString *, bool >(), bool bCheckFileExists=true, bool bIgnoreFragment=false, INetURLObject::EncodeMechanism eEncodeMechanism=INetURLObject::EncodeMechanism::WasEncoded, INetURLObject::DecodeMechanism eDecodeMechanism=INetURLObject::DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8, FSysStyle eStyle=FSysStyle::Detect)
virtual void NbcSetLayer(SdrLayerID nLayer)
OStringBuffer & padToLength(OStringBuffer &rBuffer, sal_Int32 nLength, char cFill= '\0')
bool MiserableRTLGraphicsHack(SwTwips &rLeft, SwTwips nWidth, sal_Int16 eHoriOri, sal_Int16 eHoriRel)