21 #include <com/sun/star/embed/Aspects.hpp>
25 #include <officecfg/Office/Common.hxx>
27 #include <com/sun/star/drawing/XShape.hpp>
60 #include <drawdoc.hxx>
72 #include <com/sun/star/i18n/XBreakIterator.hpp>
73 #include <com/sun/star/lang/XServiceInfo.hpp>
81 #include <com/sun/star/beans/XPropertySet.hpp>
82 #include <com/sun/star/form/XFormComponent.hpp>
87 #include <sfx2/sfxsids.hrc>
95 using ::editeng::SvxBorderLine;
99 using ::com::sun::star::beans::XPropertySet;
100 using ::com::sun::star::drawing::XShape;
104 bool bRelUrl =
false;
105 SfxMedium * pMedium = rWrt.GetWriter().GetMedia();
116 SfxMedium * pMedium = rWrt.GetWriter().GetMedia();
128 return sDocUrl.copy(0, sDocUrl.lastIndexOf(
'/') + 1);
133 OUString aDosName(
INetURLObject( rUrl ).getFSysPath( FSysStyle::Dos ) );
140 OUString aTmpName( aDosName );
150 else if (aDosName.startsWith(
"./"))
152 aDosName = aDosName.copy(2);
156 while (aDosName.startsWith(
"../"))
159 aDosName = aDosName.copy(3);
168 if ( !pINetFormatArg )
return;
171 0xD0, 0xC9, 0xEA, 0x79, 0xF9, 0xBA, 0xCE, 0x11, 0x8C, 0x82, 0x00, 0xAA, 0x00, 0x4B, 0xA9, 0x0B };
172 const sal_uInt8 aGuidUrlMoniker[ 16 ] = {
173 0xE0, 0xC9, 0xEA, 0x79, 0xF9, 0xBA, 0xCE, 0x11, 0x8C, 0x82, 0x00, 0xAA, 0x00, 0x4B, 0xA9, 0x0B };
175 const sal_uInt8 aGuidFileMoniker[ 16 ] = {
176 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 };
178 0xFF, 0xFF, 0xAD, 0xDE, 0x00, 0x00, 0x00, 0x00,
179 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
180 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
183 constexpr sal_uInt32 WW8_HLINK_BODY = 0x00000001;
184 constexpr sal_uInt32 WW8_HLINK_ABS = 0x00000002;
186 constexpr sal_uInt32 WW8_HLINK_MARK = 0x00000008;
187 constexpr sal_uInt32 WW8_HLINK_FRAME = 0x00000080;
190 OUString tmpTextMark;
192 OUString rUrl = pINetFormatArg->
GetURL();
194 sal_uInt32 nFlags = 0;
200 if (!rTarFrame.isEmpty())
207 nFlags |= WW8_HLINK_FRAME;
211 if (eProtocol == INetProtocol::File || (eProtocol == INetProtocol::NotValid && rUrl[0] !=
'#'))
215 OUString aFileName( BuildFileName( nLevel, bRel, rUrl ));
218 nFlags |= WW8_HLINK_ABS;
220 nFlags |= WW8_HLINK_BODY;
222 tmpStrm.
WriteBytes(aGuidFileMoniker,
sizeof(aGuidFileMoniker));
226 tmpStrm.
WriteBytes(aGuidFileTail,
sizeof(aGuidFileTail));
234 else if( eProtocol != INetProtocol::NotValid )
236 tmpStrm.
WriteBytes(aGuidUrlMoniker,
sizeof(aGuidUrlMoniker));
240 nFlags |= WW8_HLINK_BODY | WW8_HLINK_ABS;
242 else if (rUrl[0] ==
'#' )
244 OUString aTextMark(rUrl.copy( 1 ));
245 aTextMark = aTextMark.replaceFirst(
".",
"!");
246 tmpTextMark = aTextMark;
249 if (tmpTextMark.isEmpty() && aUrlObj.
HasMark())
251 tmpTextMark = aUrlObj.
GetMark();
254 if (!tmpTextMark.isEmpty())
259 nFlags |= WW8_HLINK_MARK;
269 std::unique_ptr<sal_uInt8[]> pBuffer(
new sal_uInt8[ nLen ] );
278 if (!pINetFormat || pINetFormat->
GetURL().isEmpty())
282 WriteHyperlinkWithinFly( aStrm, pINetFormat );
285 OUString aNamestr = pINetFormat->
GetName();
286 if (!aNamestr.isEmpty())
312 class CompareDrawObjs
318 explicit CompareDrawObjs(
const WW8Export& rWrt) : wrt(rWrt) {};
321 sal_uLong aSort = lcl_getSdrOrderNumber(wrt, a);
322 sal_uLong bSort = lcl_getSdrOrderNumber(wrt, b);
323 return aSort < bSort;
331 void lcl_makeZOrderArray(
const WW8Export& rWrt,
332 std::vector<DrawObj> &rSrcArr,
333 std::vector<DrawObj*> &rDstArr)
336 rDstArr.reserve(rSrcArr.size());
339 rDstArr.push_back( &i );
341 std::sort(rDstArr.begin(), rDstArr.end(), CompareDrawObjs(rWrt));
357 uno::Reference< awt::XControlModel > xControlModel =
359 uno::Reference< lang::XServiceInfo > xInfo(xControlModel,
361 uno::Reference<beans::XPropertySet> xPropSet(xControlModel, uno::UNO_QUERY);
365 if (xInfo->supportsService(
"com.sun.star.form.component.ComboBox"))
367 DoComboBox(xPropSet);
377 uno::Sequence<OUString> aListItems;
378 xPropSet->getPropertyValue(
"StringItemList") >>= aListItems;
379 if (aListItems.hasElements())
381 uno::Any aTmp = xPropSet->getPropertyValue(
"DefaultText");
382 auto pStr = o3tl::tryAccess<OUString>(aTmp);
389 uno::Any aTmp = xPropSet->getPropertyValue(
"Name");
390 auto pStr = o3tl::tryAccess<OUString>(aTmp);
400 uno::Any aTmp = xPropSet->getPropertyValue(
"HelpText");
401 auto pStr = o3tl::tryAccess<OUString>(aTmp);
405 catch(
const uno::Exception& )
411 uno::Any aTmp = xPropSet->getPropertyValue(
"Name");
412 auto pStr = o3tl::tryAccess<OUString>(aTmp);
417 DoComboBox(sName, sHelp, sToolTip, sSelected, aListItems);
421 const OUString &rHelp,
422 const OUString &rToolTip,
423 const OUString &rSelected,
424 const uno::Sequence<OUString> &rListItems)
429 sal_uInt64 nDataStt = m_pDataStrm->Tell();
430 m_pChpPlc->AppendFkpEntry( Strm().Tell() );
444 m_pChpPlc->AppendFkpEntry(Strm().Tell(),
sizeof(aArr1), aArr1);
456 sal_uInt32 nListItems = rListItems.getLength();
458 for (sal_uInt32 i = 0;
i < nListItems;
i++)
460 if (i < 0x20 && rSelected == rListItems[i])
461 aFFData.
setResult(::sal::static_int_cast<sal_uInt8>(i));
465 aFFData.
Write(m_pDataStrm);
473 sal_uInt64 nDataStt = m_pDataStrm->Tell();
474 m_pChpPlc->AppendFkpEntry( Strm().Tell() );
487 m_pChpPlc->AppendFkpEntry(Strm().Tell(),
488 sizeof( aArr1 ), aArr1 );
496 aFFData.
Write(m_pDataStrm);
500 const OUString fieldStr( pField->
ExpandField(
true,
nullptr) );
508 pDataAdr = aArr2 + 2;
510 m_pChpPlc->AppendFkpEntry(Strm().Tell(),
511 sizeof( aArr2 ), aArr2 );
525 sal_Int16 eHoriOri, sal_Int16 eHoriRel,
SwTwips nPageLeft,
531 if (eHoriRel == text::RelOrientation::PAGE_FRAME)
533 rLeft = nPageSize - rLeft;
537 (eHoriRel == text::RelOrientation::PAGE_PRINT_AREA) ||
538 (eHoriRel == text::RelOrientation::FRAME) ||
539 (eHoriRel == text::RelOrientation::PRINT_AREA)
542 rLeft = nPageSize - nPageLeft - nPageRight - rLeft;
552 sal_Int16 eHoriOri, sal_Int16 eHoriRel,
SwTwips nPageLeft,
558 if (eHoriRel == text::RelOrientation::PAGE_FRAME)
560 rLeft = nPageSize + rLeft;
564 (eHoriRel == text::RelOrientation::PAGE_PRINT_AREA) ||
565 (eHoriRel == text::RelOrientation::FRAME) ||
566 (eHoriRel == text::RelOrientation::PRINT_AREA)
569 rLeft = nPageSize - nPageLeft - nPageRight + rLeft;
583 SwTwips nWidth = rRight - rLeft;
585 SwTwips nPageSize = CurrentPageWidth(nPageLeft, nPageRight);
608 rRight = rLeft + nWidth;
613 if (8 > rWrt.
m_pFib->m_nVersion)
618 if (maDrawObjs.empty())
623 WW8_CP nCpOffs = GetCpOffset(rFib);
625 for (
const auto& rDrawObj : maDrawObjs)
631 for (
const auto& rDrawObj : maDrawObjs)
634 const ww8::Frame &rFrameFormat = rDrawObj.maContent;
643 const bool bPosConverted =
647 bool bHasHeightWidthSwapped(
false);
653 if( aLayRect.IsEmpty() )
661 if ( aSizeRect.Width() > aLayRect.Width() )
662 aLayRect.
Width( aSizeRect.Width() );
664 aRect = aLayRect.SVRect();
669 OSL_ENSURE(pObj,
"Where is the SDR-Object?");
677 if ( bAllowSwap && (( nAngle > 4500_deg100 && nAngle <= 13500_deg100 ) || ( nAngle > 22500_deg100 && nAngle <= 31500_deg100 )) )
683 bHasHeightWidthSwapped =
true;
697 aRect -= rDrawObj.maParentPos;
703 if (eOri == text::RelOrientation::CHAR || eOri == text::RelOrientation::TEXT_LINE)
704 aObjPos.setY( -rVOr.
GetPos() );
706 aObjPos.setY( rVOr.
GetPos() );
709 aObjPos.setX( rHOr.
GetPos() );
713 sal_Int32 nThick = rDrawObj.mnThick;
735 if (nTop == 0 && !rFrameFormat.
IsInline() &&
757 if(bHasHeightWidthSwapped)
759 nXOff = (nSnapWidth - nLogicHeight + 1) / 2;
760 nYOff = (nSnapHeight - nLogicWidth + 1) / 2;
764 nXOff = (nSnapWidth - nLogicWidth + 1) / 2;
765 nYOff = (nSnapHeight - nLogicHeight + 1) / 2;
790 sal_uInt16 nContour = rSurr.
IsContour() ? 0x0080 : 0x0040;
791 css::text::WrapTextMode eSurround = rSurr.
GetSurround();
800 eSurround = css::text::WrapTextMode_THROUGH;
804 case css::text::WrapTextMode_NONE:
807 case css::text::WrapTextMode_THROUGH:
810 case css::text::WrapTextMode_PARALLEL:
811 nFlags |= 0x0000 | nContour;
813 case css::text::WrapTextMode_DYNAMIC:
814 nFlags |= 0x0600 | nContour;
816 case css::text::WrapTextMode_LEFT:
817 nFlags |= 0x0200 | nContour;
819 case css::text::WrapTextMode_RIGHT:
820 nFlags |= 0x0400 | nContour;
823 OSL_ENSURE(
false,
"Unsupported surround type for export");
849 sal_uInt32 nLen)
const
861 sal_uInt32 nLen)
const
873 const Point& rNdTopLeft )
893 maDrawObjs.push_back(aObj);
909 bool bRet = WriteGenericText( rWrt, m_nTyp, rccp );
926 m_aShapeIds.push_back( nShapeId );
928 m_aSpareFormats.push_back(
nullptr);
935 m_aShapeIds.push_back( nShapeId );
936 m_aSpareFormats.push_back(pFormat);
965 const Point& rNdTopLeft)
967 OSL_ENSURE(!m_pEscher,
"the EscherStream was already written!");
972 pDrwO = m_pHFSdrObjs.get();
974 pDrwO = m_pSdrObjs.get();
982 WW8_CP nCP = Fc2Cp(Strm().Tell());
983 bool bSuccess = pDrwO->
Append(*
this, nCP, rFrameFormat, rNdTopLeft);
984 OSL_ENSURE(bSuccess,
"Couldn't export a graphical element!");
990 0x03, 0x6a, 0, 0, 0, 0,
997 m_pChpPlc->AppendFkpEntry( Strm().Tell() );
999 m_pChpPlc->AppendFkpEntry( Strm().Tell(),
sizeof( aSpec8 ), aSpec8 );
1003 OutGrf(rFrameFormat);
1012 :
MSWordAttrIter( rWr ), m_pEditObj(&rEditObj), m_pEditPool(nullptr), mnTyp(nTyp)
1050 sal_Int32
nPos = rTextAtr.nStart;
1051 if( nPos >= nStartPos && nPos <= nMinPos )
1057 nPos = rTextAtr.nEnd;
1058 if( nPos >= nStartPos && nPos < nMinPos )
1077 rtl_TextEncoding eChrSet =
static_cast<const SvxFontItem&
>(rItem).GetCharSet();
1083 std::vector<const EECharAttrib*>::iterator it =
1097 if (
auto pURL = dynamic_cast< const SvxURLField *>( pField ))
1103 const OUString &rStr = pURL->GetRepresentation();
1118 std::set<sal_uInt16> aUsedRunWhichs;
1121 if (nSwPos >= rTextAtr.nStart && nSwPos < rTextAtr.nEnd)
1123 sal_uInt16 nWhich = rTextAtr.pAttr->Which();
1124 aUsedRunWhichs.insert(nWhich);
1127 if( nSwPos < rTextAtr.nStart )
1133 if (m_aTextAtrArr.empty())
1145 for(
const auto& rTextAtr : m_aTextAtrArr)
1147 if (nSwPos >= rTextAtr.nStart && nSwPos < rTextAtr.nEnd)
1149 sal_uInt16 nWhich = rTextAtr.pAttr->Which();
1161 const sal_uInt16 nSlotId = pSrcPool->
GetSlotId(nWhich);
1162 if (nSlotId && nWhich != nSlotId)
1164 nWhich = rDstPool.
GetWhich(nSlotId);
1165 if (nWhich && nWhich != nSlotId &&
1170 std::unique_ptr<SfxPoolItem> pI(rTextAtr.pAttr->Clone());
1171 pI->SetWhich( nWhich );
1182 if( nSwPos < rTextAtr.nStart )
1195 return (nSwPos >= rTextAtr.nStart && nSwPos < rTextAtr.nEnd) &&
1216 return rTextAtr.pAttr;
1232 OSL_ENSURE(nWhich,
"Impossible, catastrophic failure imminent");
1233 pRet = &aSet.Get(nWhich);
1247 for (sal_uInt16 nEEWhich = aWhichIter.
FirstWhich(); nEEWhich; nEEWhich = aWhichIter.
NextWhich())
1249 if (SfxItemState::SET != rSet.
GetItemState(nEEWhich,
false))
1262 if (rDrawItem != rStandardItem)
1263 rSet.
Put(rDrawItem);
1288 sal_uInt16 nWhich = pItem->
Which();
1289 if (pWhichsToIgnore && pWhichsToIgnore->find(nWhich) != pWhichsToIgnore->end())
1292 sal_uInt16 nSlotId = pSrcPool->
GetSlotId(nWhich);
1294 if ( nSlotId && nWhich != nSlotId &&
1295 0 != ( nWhich = pDstPool->GetWhich( nSlotId ) ) &&
1296 nWhich != nSlotId &&
1301 std::unique_ptr<SfxPoolItem> pI(pItem->
Clone());
1302 pI->SetWhich( nWhich );
1306 }
while ((pItem = aIter.
NextItem()));
1336 bool bAnyWrite =
false;
1342 for( sal_Int32
n = 0;
n < nPara; ++
n )
1347 OSL_ENSURE(
m_pO->empty(),
" pO is not empty at start of line" );
1350 sal_Int32 nCurrentPos = 0;
1351 const sal_Int32 nEnd =
aStr.getLength();
1354 bool bIsRTLPara =
false;
1358 bIsRTLPara = SvxFrameDirection::Horizontal_RL_TB == nDir;
1364 bool bTextAtr = aAttrIter.
IsTextAttr( nCurrentPos );
1370 if( nNextAttr == nEnd && !bTextAtr )
1374 aAttrIter.
OutAttr( nCurrentPos );
1391 if( nNextAttr == nEnd && bTextAtr )
1393 nCurrentPos = nNextAttr;
1396 while( nCurrentPos < nEnd );
1398 OSL_ENSURE(
m_pO->empty(),
" pO is not empty at start of line" );
1400 m_pO->push_back( bNul );
1401 m_pO->push_back( bNul );
1412 bAnyWrite = 0 != nPara;
1456 OSL_ENSURE( !
m_pEscher,
"Who did not deleted the pointer?" );
1458 pEscherStrm->
SetEndian(SvStreamEndian::LITTLE);
1472 m_pFib->m_fcDggInfo = nStart;
1481 if(
SvStream* pPicStrm = static_cast< SwEscherExGlobal& >( *mxGlobal ).GetPictureStream() )
1484 sal_Int32 nEndPos = rWrt.
Strm().
Tell();
1485 mxGlobal->SetNewBlipStreamOffset( nEndPos );
1487 pPicStrm->Seek( 0 );
1506 mxPicStrm = std::make_shared<SvMemoryStream>();
1507 mxPicStrm->SetEndian(SvStreamEndian::LITTLE);
1548 nFlags |= ShapeFlag::FlipH;
1551 nFlags |= ShapeFlag::FlipV;
1554 nFlags |= ShapeFlag::FlipH | ShapeFlag::FlipV;
1568 if ( !aUniqueId.isEmpty() )
1570 sal_uInt32 nBlibId =
mxGlobal->GetBlibID( *(
mxGlobal->QueryPictureStream()), aGraphicObject );
1585 std::shared_ptr<SvxBrushItem> aBrush(std::make_shared<SvxBrushItem>(aTmpColor,
RES_BACKGROUND));
1588 aBrush.reset(pRet->
Clone());
1600 sal_Int32 nBorderThick=0;
1603 OSL_ENSURE(pGrfNd,
"No SwGrfNode ?, suspicious");
1605 return nBorderThick;
1611 AddMirrorFlags(ShapeFlag::HaveAnchor | ShapeFlag::HaveShapeProperty, rMirror),
1635 OString aUniqueId = aGraphicObject.GetUniqueID();
1637 if (!aUniqueId.isEmpty())
1655 return nBorderThick;
1662 sal_Int32 nContrast = 0;
1663 sal_Int16 nBrightness = 0;
1667 nContrast = pItem->GetValue();
1672 nBrightness = pItem->GetValue();
1678 if (nMode == GraphicDrawMode::Watermark)
1688 if (nBrightness > 100)
1691 if (nContrast < -100)
1693 nMode = GraphicDrawMode::Standard;
1697 sal_uInt32 nPictureMode;
1698 if (nMode == GraphicDrawMode::Greys)
1699 nPictureMode = 0x40004;
1700 else if (nMode == GraphicDrawMode::Mono)
1701 nPictureMode = 0x60006;
1709 if (nContrast == 100)
1710 nContrast = 0x10000;
1711 else if (nContrast < 100)
1713 nContrast *= 0x10000;
1716 else if (nContrast < 200)
1717 nContrast = (100 * 0x10000) / (200-nContrast);
1719 nContrast = 0x7fffffff;
1723 if (nBrightness != 0)
1726 sal_Int32 nCropL = 0;
1727 sal_Int32 nCropR = 0;
1728 sal_Int32 nCropT = 0;
1729 sal_Int32 nCropB = 0;
1732 nCropL += pCropItem->GetLeft();
1733 nCropR += pCropItem->GetRight();
1734 nCropT += pCropItem->GetTop();
1735 nCropB += pCropItem->GetBottom();
1741 nCropL -= pBoxItem->GetDistance( SvxBoxItemLine::LEFT );
1742 nCropR -= pBoxItem->GetDistance( SvxBoxItemLine::RIGHT );
1743 nCropT -= pBoxItem->GetDistance( SvxBoxItemLine::TOP );
1744 nCropB -= pBoxItem->GetDistance( SvxBoxItemLine::BOTTOM );
1774 sal_Int32 nBorderThick = 0;
1781 uno::Reference < embed::XEmbeddedObject > xObj(rOLENd.GetOLEObj().GetOleRef());
1786 awt::Rectangle aRect;
1787 bool bRectIsSet =
false;
1790 if ( xObj.is() && nAspect != embed::Aspects::MSOLE_ICON )
1794 awt::Size aSize = xObj->getVisualAreaSize( nAspect );
1795 aRect.Width = aSize.Width;
1796 aRect.Height = aSize.Height;
1799 catch(
const uno::Exception& )
1808 #ifdef OLE_PREVIEW_AS_EMF
1809 const Graphic* pGraphic = rOLENd.GetGraphic();
1814 const SwMirrorGrf &rMirror = rOLENd.GetSwAttrSet().GetMirrorGrf();
1816 AddMirrorFlags(ShapeFlag::HaveAnchor | ShapeFlag::HaveShapeProperty | ShapeFlag::OLEShape, rMirror),
1817 pGraphic ? *pGraphic :
Graphic(), *pSdrObj, nShapeId, bRectIsSet ? &aRect :
nullptr );
1828 return nBorderThick;
1834 bool bSetOpacity =
false;
1835 sal_uInt32 nOpaque = 0;
1838 OString aUniqueId = pGraphicObject->GetUniqueID();
1839 if (!aUniqueId.isEmpty())
1846 nOpaque = 255 - pGraphicObject->GetAttr().GetAlpha();
1868 nOpaque = (nOpaque * 100) / 0xFE;
1869 nOpaque = ((100 - nOpaque) << 16) / 100;
1878 bool bFirstLine =
true;
1886 const SvxBorderLine* pLine;
1890 pLine = pItem->GetLine(
n );
1891 if(
nullptr != pLine )
1895 sal_uInt32 nLineColor =
GetColor(pLine->GetColor());
1898 nLineColor ^ 0xffffff );
1901 if( pLine->isDouble() )
1904 nLineWidth = pLine->GetWidth();
1905 if( pLine->GetInWidth() == pLine->GetOutWidth() )
1907 else if( pLine->GetInWidth() < pLine->GetOutWidth() )
1916 nLineWidth = pLine->GetWidth();
1924 switch (pLine->GetBorderLineStyle())
1926 case SvxBorderLineStyle::DASHED:
1929 case SvxBorderLineStyle::DOTTED:
1932 case SvxBorderLineStyle::SOLID:
1942 eStyle,eShapeType,nLineWidth);
1946 pItem->GetDistance( n ) ));
1969 constexpr sal_uInt32 nShadowType = 131074;
1971 Color nColor = pSI->GetColor();
1978 if( (eLocation!=SvxShadowLocation::NONE) && (pSI->GetWidth()!=0) )
1982 case SvxShadowLocation::TopLeft:
1988 case SvxShadowLocation::TopRight:
1993 case SvxShadowLocation::BottomLeft:
1998 case SvxShadowLocation::BottomRight:
2015 const bool bIsThrough = rFormat.
GetSurround().
GetValue() == css::text::WrapTextMode_THROUGH;
2019 if (bIsInHeader || bIsThrough)
2090 if (pPolyPoly && pPolyPoly->
Count())
2094 aPolyDump.
SetEndian(SvStreamEndian::LITTLE);
2096 sal_uInt16 nLen = aPoly.
GetSize();
2100 for (sal_uInt16 nI = 0; nI < nLen; ++nI)
2118 MapUnit eMap = MapUnit::MapTwip;
2123 eMap = pModel->GetScaleUnit();
2141 sal_Int32 nMSVal = (nVal / 65536) * nMax;
2142 nMSVal += (nVal * 65536) / nMax;
2147 sal_Int32
const nDiv = (nVal / sal_Int32(nMax)) - 1;
2148 sal_uInt32 nMSVal = (sal_uInt32(nDiv) << 16) & 0xffff0000;
2149 nMSVal += (nVal * 65536) / sal_Int32(nMax) + (-nDiv * 65536);
2163 if(
SvStream* pPicStrm = static_cast< SwEscherExGlobal& >( *mxGlobal ).GetPictureStream() )
2166 sal_Int32 nEndPos = pPicStrm->Tell();
2181 sal_uInt16 nColorCount = 4;
2197 if (!pSdrObjs->
size())
2219 sal_uInt32 nShapeId=0;
2220 for (
auto& pObj : aSorted)
2222 sal_Int32 nBorderThick=0;
2223 OSL_ENSURE(pObj,
"impossible");
2248 #if OSL_DEBUG_LEVEL > 0
2250 OSL_ENSURE(
false,
"Where is the SDR-Object?" );
2268 if( nSecondShapeId )
2273 ShapeFlag::HaveAnchor | ShapeFlag::HaveShapeProperty | ShapeFlag::Background,
2296 aPropOpt.
Commit( *pStrm );
2322 template<
typename OrientType>
2323 void lcl_SetRelationOrient(OrientType& rOrient,
const sw::WW8AnchorConv eConv,
const std::function<
void()>& fDefault)
2329 rOrient.SetRelationOrient(text::RelOrientation::PAGE_PRINT_AREA);
2332 rOrient.SetRelationOrient(text::RelOrientation::PAGE_FRAME);
2335 rOrient.SetRelationOrient(text::RelOrientation::FRAME);
2338 rOrient.SetRelationOrient(text::RelOrientation::CHAR);
2341 rOrient.SetRelationOrient(text::RelOrientation::TEXT_LINE);
2379 if ( (RndStdIds::FLY_AS_CHAR == eAnchor) || (RndStdIds::FLY_AT_FLY == eAnchor) )
2392 bool bConvDueToAnchoredAtColBreakPara(
false );
2393 if ( ( (eAnchor == RndStdIds::FLY_AT_PARA) || (eAnchor == RndStdIds::FLY_AT_CHAR) ) &&
2400 if (rBreak.
GetBreak() == SvxBreak::ColumnBefore)
2402 bConvDueToAnchoredAtColBreakPara =
true;
2412 bool bConvDueToOrientation(
false );
2415 bConvDueToOrientation = eHOri == text::HoriOrientation::LEFT || eHOri == text::HoriOrientation::RIGHT ||
2416 eHOri == text::HoriOrientation::INSIDE || eHOri == text::HoriOrientation::OUTSIDE ||
2417 ( eHOri != text::HoriOrientation::CENTER && _iorHoriOri.
IsPosToggle() );
2421 if ( bConvDueToAnchoredAtColBreakPara )
2426 && _iorHoriOri.
GetHoriOrient() == text::HoriOrientation::RIGHT )
2429 _iorHoriOri.
SetHoriOrient( text::HoriOrientation::OUTSIDE );
2435 case text::RelOrientation::PAGE_FRAME:
2436 case text::RelOrientation::PAGE_PRINT_AREA:
2438 if ( bConvDueToOrientation || bFollowTextFlow )
2442 case text::RelOrientation::PAGE_LEFT:
2443 case text::RelOrientation::PAGE_RIGHT:
2449 case text::RelOrientation::FRAME:
2451 if ( bConvDueToOrientation )
2455 case text::RelOrientation::PRINT_AREA:
2456 case text::RelOrientation::FRAME_LEFT:
2457 case text::RelOrientation::FRAME_RIGHT:
2463 case text::RelOrientation::CHAR:
2465 if ( bConvDueToOrientation )
2470 OSL_FAIL(
"<WinwordAnchoring::ConvertPosition(..)> - unknown horizontal relation" );
2479 bool bConvDueToOrientation(
false );
2482 bConvDueToOrientation = ( eVOri == text::VertOrientation::TOP ||
2483 eVOri == text::VertOrientation::BOTTOM ||
2484 eVOri == text::VertOrientation::CHAR_TOP ||
2485 eVOri == text::VertOrientation::CHAR_BOTTOM ||
2486 eVOri == text::VertOrientation::CHAR_CENTER ||
2487 eVOri == text::VertOrientation::LINE_TOP ||
2488 eVOri == text::VertOrientation::LINE_BOTTOM ||
2489 eVOri == text::VertOrientation::LINE_CENTER );
2493 if ( bConvDueToAnchoredAtColBreakPara )
2501 case text::RelOrientation::PAGE_FRAME:
2502 case text::RelOrientation::PAGE_PRINT_AREA:
2504 if ( bConvDueToOrientation || bFollowTextFlow )
2508 case text::RelOrientation::FRAME:
2510 if ( bConvDueToOrientation ||
2511 _iorVertOri.
GetVertOrient() == text::VertOrientation::CENTER )
2517 case text::RelOrientation::PRINT_AREA:
2523 case text::RelOrientation::CHAR:
2529 case text::RelOrientation::TEXT_LINE:
2531 if ( bConvDueToOrientation ||
2538 case text::RelOrientation::PAGE_LEFT:
2539 case text::RelOrientation::PAGE_RIGHT:
2540 case text::RelOrientation::FRAME_LEFT:
2541 case text::RelOrientation::FRAME_RIGHT:
2543 OSL_FAIL(
"<WinwordAnchoring::ConvertPosition(..)> - unknown vertical relation" );
2572 mbInline = (eAnchor == RndStdIds::FLY_AS_CHAR);
2586 const bool bPosConverted =
ConvertPosition( rHoriOri, rVertOri, rFormat );
2601 case text::HoriOrientation::LEFT:
2604 case text::HoriOrientation::CENTER:
2607 case text::HoriOrientation::RIGHT:
2610 case text::HoriOrientation::INSIDE:
2613 case text::HoriOrientation::OUTSIDE:
2622 const bool bVertSwap = !bPosConverted &&
2623 ( (eVRel == text::RelOrientation::CHAR) ||
2624 (eVRel == text::RelOrientation::TEXT_LINE) );
2631 case text::VertOrientation::TOP:
2632 case text::VertOrientation::LINE_TOP:
2633 case text::VertOrientation::CHAR_TOP:
2636 case text::VertOrientation::CENTER:
2637 case text::VertOrientation::LINE_CENTER:
2640 case text::VertOrientation::BOTTOM:
2641 case text::VertOrientation::LINE_BOTTOM:
2642 case text::VertOrientation::CHAR_BOTTOM:
2650 case text::RelOrientation::PAGE_PRINT_AREA:
2653 case text::RelOrientation::PAGE_FRAME:
2654 case text::RelOrientation::PAGE_LEFT:
2655 case text::RelOrientation::PAGE_RIGHT:
2658 case text::RelOrientation::FRAME:
2659 case text::RelOrientation::FRAME_LEFT:
2660 case text::RelOrientation::FRAME_RIGHT:
2661 if (eAnchor == RndStdIds::FLY_AT_PAGE)
2666 case text::RelOrientation::PRINT_AREA:
2667 if (eAnchor == RndStdIds::FLY_AT_PAGE)
2672 case text::RelOrientation::CHAR:
2675 case text::RelOrientation::TEXT_LINE:
2682 case text::RelOrientation::PAGE_PRINT_AREA:
2685 case text::RelOrientation::PAGE_FRAME:
2688 case text::RelOrientation::PRINT_AREA:
2689 if (eAnchor == RndStdIds::FLY_AT_PAGE)
2694 case text::RelOrientation::FRAME:
2695 if (eAnchor == RndStdIds::FLY_AT_PAGE)
2700 case text::RelOrientation::CHAR:
2701 case text::RelOrientation::TEXT_LINE:
2702 case text::RelOrientation::PAGE_LEFT:
2703 case text::RelOrientation::PAGE_RIGHT:
2704 case text::RelOrientation::FRAME_LEFT:
2705 case text::RelOrientation::FRAME_RIGHT:
2729 sal_Int32 nBorderThick = 0;
2749 sal_uInt16 nOff = 0;
2761 if( USHRT_MAX == nTextId )
2773 if( USHRT_MAX == nTextId )
2775 sal_uInt32 nPrevShapeId =
2793 if( bBrowseMode && rFormat.
GetDoc())
2808 return nBorderThick;
2814 auto aIter = std::find_if(rPVec.begin(), rPVec.end(),
2815 [&rFormat, nHdFtIndex](
const DrawObj* pObj) {
2816 OSL_ENSURE(pObj,
"Impossible");
2821 if (aIter != rPVec.end())
2822 return static_cast< sal_uInt16 >(aIter - rPVec.begin());
2832 sal_Int32 nBorderThick=0;
2851 OSL_ENSURE(
false,
"unknown direction type");
2853 case SvxFrameDirection::Horizontal_LR_TB:
2856 case SvxFrameDirection::Horizontal_RL_TB:
2859 case SvxFrameDirection::Vertical_LR_TB:
2860 case SvxFrameDirection::Vertical_RL_TB:
2863 case SvxFrameDirection::Vertical_LR_BT:
2877 return nBorderThick;
2882 sal_uInt32 nShapeId,
const awt::Rectangle* pVisArea )
2897 SetPicId(rObj, nShapeId, rPropOpt);
2911 OSL_ENSURE(pModel && pDevice,
"no model or device");
2915 SdrView aExchange(*pModel, pDevice);
2919 ShapeFlag::HaveAnchor | ShapeFlag::HaveShapeProperty | ShapeFlag::OLEShape, aGraphic,
2920 *pSdrObj, nShapeId,
nullptr );
2935 ::lcl_makeZOrderArray(rWrt, rSrcArr, rDstArr);
2943 bool bNeedsShapeId =
false;
2949 bNeedsShapeId =
true;
2961 sal_uInt16
nPos =
FindPos(rFormat, nHdFtIndex, rpVec);
2962 sal_uInt32 nShapeId;
2963 if (USHRT_MAX != nPos)
2978 const uno::Reference< drawing::XShape>& xXShapeRef, sal_uInt32 nShapeId )
2991 ::ole::MSConvertOCXControls( pDSh ? pDSh->GetModel() : nullptr ), m_pPaM( pP ), mnObjectId(0)
2999 css::uno::Reference< css::drawing::XShape > *pShapeRef,
3000 bool bFloatingCtrl )
3002 uno::Reference< form::XFormComponent > xFComp;
3004 if ( bRes && xFComp.is() )
3014 const uno::Reference< awt::XControlModel >& xControlModel =
3032 OUString sStorageName =
"_" + OUString::number( static_cast<sal_Int64>( nObjId ));
3044 0x03, 0x6a, 0xFF, 0xFF, 0xFF, 0xFF,
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
#define ESCHER_DgContainer
SwNodeOffset min(const SwNodeOffset &a, const SwNodeOffset &b)
virtual void RegisterWithFib(WW8Fib &rFib, sal_uInt32 nStart, sal_uInt32 nLen) const override
Exporter of the binary Word file formats.
void OutAttr(sal_Int32 nSwPos)
virtual AttributeOutputBase & AttrOutput() const =0
Access to the attribute output class.
constexpr TypedWhichId< SfxInt16Item > RES_CHRATR_BIDIRTL(44)
sal_Int32 WhereNext() const
const sw::BroadcastingModify * m_pOutFormatNode
SwNoTextNode * GetNoTextNodeFromSwFrameFormat(const SwFrameFormat &rFormat)
Get the SwNoTextNode associated with a SwFrameFormat if here is one.
sal_Int64 GetAspect() const
static ShapeFlag AddMirrorFlags(ShapeFlag nFlags, const SwMirrorGrf &rMirror)
Represents the style of a paragraph.
unsigned int GetHdFtIndex() const
sal_uInt8 GetAlpha() const
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
void OutSwString(const OUString &, sal_Int32 nStt, sal_Int32 nLen)
bool RTLGraphicsHack(SwTwips &rLeft, SwTwips nWidth, sal_Int16 eHoriOri, sal_Int16 eHoriRel, SwTwips nPageLeft, SwTwips nPageRight, SwTwips nPageSize)
void OutEEField(const SfxPoolItem &rHt)
std::unique_ptr< WW8_WrPlcField > m_pFieldHFTextBxs
virtual AttributeOutputBase & AttrOutput() const override
memory leak #i120098#, to hold the reference to unnamed SotStorage obj
sal_uInt32 GetSdrOrdNum(const SwFrameFormat &rFormat) const
#define ESCHER_Prop_dyWrapDistBottom
constexpr sal_uInt16 EE_FEATURE_TAB(EE_FEATURE_START+0)
SvStream & WriteUInt16(sal_uInt16 nUInt16)
SwOLENode * GetOLENode()
Inline methods from Node.hxx.
void WriteStringAsPara(const OUString &rText)
#define ESCHER_Prop_pictureId
rtl_TextEncoding GetNodeCharSet() const
#define ESCHER_Prop_pictureActive
const EditTextObject * m_pEditObj
#define ESCHER_Prop_dyTextTop
SvStream & WriteInt32(sal_Int32 nInt32)
#define ESCHER_Prop_cropFromBottom
std::vector< sal_uLong > aFollowShpIds
WW8_WrPlcTextBoxes * pTextBxs
virtual SfxPoolItem * Clone(SfxItemPool *pPool=nullptr) const =0
void OutParaAttr(bool bCharAttr, const std::set< sal_uInt16 > *pWhichsToIgnore=nullptr)
#define ESCHER_Prop_pictureBrightness
std::shared_ptr< SvStream > mxPicStrm
#define ESCHER_Prop_lineWidth
void WriteOCXControl(const SwFrameFormat &rFormat, sal_uInt32 nShapeId)
std::unique_ptr< sal_Int32[]> pData
static sal_uInt16 FindPos(const SwFrameFormat &rFormat, unsigned int nHdFtIndex, DrawObjPointerVector &rPVec)
void SetShapeDetails(sal_uInt32 nId, sal_Int32 nThick)
std::vector< sal_uInt8 > bytes
virtual Size GetTwipSize() const =0
constexpr::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
static SdrObject * getSdrObjectFromXShape(const css::uno::Reference< css::uno::XInterface > &xInt)
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_FONTSIZE(8)
void SetCharSet(const EECharAttrib &rTextAttr, bool bStart)
void Commit(SvStream &rSt, sal_uInt16 nVersion=3, sal_uInt16 nRecType=ESCHER_OPT)
constexpr Point convert(const Point &rPoint, o3tl::Length eFrom, o3tl::Length eTo)
bool MiserableFormFieldExportHack(const SwFrameFormat &rFrameFormat)
static sal_Int32 GetEscherLineMatch(MSO_LineStyle eStyle, MSO_SPT eShapeType, sal_Int32 &rThick)
constexpr sal_uInt16 RES_FRMATR_END(133)
sal_uInt32 AddSdrObject(const SdrObject &rObj, bool ooxmlExport=false)
size_t GetObjCount() const
const GraphicObject * GetGraphicObject(OUString const &referer=OUString()) const
#define ESCHER_ClientAnchor
#define ESCHER_Prop_lineStyle
std::vector< rtl_TextEncoding > m_aChrSetArr
virtual sal_Int32 WriteFlyFrameAttr(const SwFrameFormat &rFormat, MSO_SPT eShapeType, EscherPropertyContainer &rPropOpt) override
#define ESCHER_Prop_cropFromLeft
const SfxPoolItem * pAttr
virtual bool CollapseScriptsforWordOk(sal_uInt16 nScript, sal_uInt16 nWhich)=0
Guess the script (asian/western).
bool IsLinkedFile() const
css::uno::Reference< css::frame::XModel2 > mxModel
sal_uInt64 Seek(sal_uInt64 nPos)
virtual WW8_CP GetCpOffset(const WW8Fib &rFib) const override
constexpr TypedWhichId< SvxFormatBreakItem > RES_BREAK(94)
static void WriteString8(SvStream &rStrm, std::u16string_view rStr, bool bAddZero, rtl_TextEncoding eCodeSet)
#define ESCHER_Prop_txflTextFlow
void setResult(sal_uInt8 nResult)
SvxFrameDirection GetTextDirection(const SwPosition &rPos, const Point *pPt=nullptr) const
sal_Int32 WriteOLEFlyFrame(const SwFrameFormat &rFormat, sal_uInt32 nShapeId)
void addListboxEntry(const OUString &rEntry)
constexpr TypedWhichId< SwContrastGrf > RES_GRFATR_CONTRAST(137)
void SetAnchoring(const SwFrameFormat &rFormat)
WW8_CP Fc2Cp(sal_uLong nFc) const
virtual void AddShape(sal_uInt32 nShpInstance, ShapeFlag nFlagIds, sal_uInt32 nShapeID=0)
Of course Writer needs its own rectangles.
std::unique_ptr< WW8_WrPlcField > m_pFieldTextBxs
void Set_UInt32(sal_uInt8 *&p, sal_uInt32 n)
std::shared_ptr< T > make_shared(Args &&...args)
void AppendFlyInFlys(const ww8::Frame &rFrameFormat, const Point &rNdTopLeft)
DrawObjVector & GetObjArr()
virtual SdrObjKind GetObjIdentifier() const
virtual SvxBrushItem * Clone(SfxItemPool *pPool=nullptr) const override
Used to export formatted text associated to drawings.
const sal_uInt32 nInlineHack
bool IsTextEditActive() const
virtual void WriteFrameExtraData(const SwFrameFormat &rFormat) override
std::vector< EECharAttrib > m_aTextAtrArr
EmbeddedObjectRef * pObject
std::shared_ptr< EscherExGlobal > mxGlobal
const SfxItemSet * GetCurItemSet() const
Getter for pISet.
#define ESCHER_ClientTextbox
css::chart::ChartAxisLabelPosition ePos
OUString FieldString(ww::eField eIndex)
std::shared_ptr< SvxBrushItem > TrueFrameBgBrush(const SwFrameFormat &rFlyFormat) const
bool ReadOCXStorage(tools::SvRef< SotStorage > const &rSrc1, css::uno::Reference< css::form::XFormComponent > &rxFormComp)
const SwFrameFormats * GetSpzFrameFormats() const
static bool WriteOCXStream(const css::uno::Reference< css::frame::XModel > &rxModel, tools::SvRef< SotStorage > const &rSrc1, const css::uno::Reference< css::awt::XControlModel > &rControlModel, const css::awt::Size &rSize, OUString &rName)
constexpr TypedWhichId< SwLuminanceGrf > RES_GRFATR_LUMINANCE(136)
constexpr TypedWhichId< SvxFrameDirectionItem > EE_PARA_WRITINGDIR(EE_PARA_START+0)
virtual WW8_CP GetCpOffset(const WW8Fib &) const override
sal_Int32 m_nCurrentSwPos
constexpr TypedWhichId< SwFlyFrameFormat > RES_FLYFRMFMT(156)
virtual void SetPicId(const SdrObject &rSdrObj, sal_uInt32 nShapeId, EscherPropertyContainer &rPropOpt) override
std::unique_ptr< WW8Fib > m_pFib
File Information Block.
virtual void SetPicId(const SdrObject &, sal_uInt32, EscherPropertyContainer &)
IDocumentDrawModelAccess const & getIDocumentDrawModelAccess() const
virtual sal_uInt32 GenerateShapeId()
std::unique_ptr< HdFtPlcDrawObj > m_pHFSdrObjs
virtual const tools::Rectangle & GetSnapRect() const
constexpr auto convertTwipToMm100(N n)
static OutputDevice * GetDefaultDevice()
static bool ConvertPosition(SwFormatHoriOrient &_iorHoriOri, SwFormatVertOrient &_iorVertOri, const SwFrameFormat &_rFrameFormat)
method to perform conversion of positioning attributes with the help of corresponding layout informat...
#define ESCHER_Prop_dxWrapDistLeft
SvStream & GetStream() const
virtual sal_uInt32 QueryTextID(const css::uno::Reference< css::drawing::XShape > &, sal_uInt32) override
const SfxPoolItem * NextItem()
void WritePlc(WW8Export &rWrt) const
#define ESCHER_Prop_wzName
virtual sal_Int32 WriteFlyFrameAttr(const SwFrameFormat &rFormat, MSO_SPT eShapeType, EscherPropertyContainer &rPropOpt)
SotStorage * OpenSotStorage(const OUString &rEleName, StreamMode=StreamMode::STD_READWRITE, bool transacted=true)
virtual void OutputField(const SwField *pField, ww::eField eFieldType, const OUString &rFieldCmd, FieldFlags nMode=FieldFlags::All) override
Write the field.
constexpr sal_uInt16 RES_PARATR_BEGIN(RES_TXTATR_END)
constexpr TypedWhichId< SvxFieldItem > EE_FEATURE_FIELD(EE_FEATURE_NOTCONV+1)
SwNodeType GetNodeType() const
MSWordExportBase & m_rExport
void Flush(SvStream *pPicStreamMergeBSE=nullptr)
static Graphic GetObjGraphic(const SdrObject &rSdrObject)
OString GetUniqueID() const
IDocumentStylePoolAccess const & getIDocumentStylePoolAccess() const
void WriteHyperlinkWithinFly(SvMemoryStream &rStrm, const SwFormatURL *pINetFormatArg)
SwBasicEscherEx(SvStream *pStrm, WW8Export &rWrt)
SwMSConvertControls(SfxObjectShell const *pDSh, SwPaM *pP)
#define DFF_msofbtUDefProp
const SvxBrushItem * GetCurrentPageBgBrush() const
sal_Int32 SearchNext(sal_Int32 nStartPos)
void SetClientData(EscherExClientRecord_Base *p)
void Width(tools::Long nNew)
bool Append(WW8Export const &, WW8_CP nCp, const ww8::Frame &rFormat, const Point &rNdTopLeft)
sal_uInt32 RGBToBGR(::Color nColour)
SvStream & WriteUInt32(sal_uInt32 nUInt32)
const Graphic * GetGraphic(OUString const &referer=OUString()) const
virtual const SfxItemSet & GetParaAttribs(sal_Int32 nPara) const =0
virtual void RawText(const OUString &rText, rtl_TextEncoding eCharSet)=0
Output text (without markup).
void WriteChar(sal_Unicode c) override
bool GetFileFilterNms(OUString *pFileNm, OUString *pFilterNm) const
sal_uInt64 remainingSize()
void WriteBrushAttr(const SvxBrushItem &rBrush, EscherPropertyContainer &rPropOpt)
SdrLayerID GetInvisibleHellId() const
static sal_Int32 ToFract16(sal_Int32 nVal, sal_uInt32 nMax)
#define ESCHER_Prop_fillOpacity
void OutputItem(const SfxPoolItem &rHt)
Call the right virtual function according to the type of the item.
OUString BuildFileName(sal_uInt16 &rnLevel, bool &rbRel, const OUString &rUrl)
void WriteGrfBullet(const Graphic &)
OUString GetBasePath() const
sal_uInt32 AddDummyShape()
SvStream * QueryPictureStream()
sal_Int32 m_lcbPlcfspaMom
const SwFrameFormat & GetFrameFormat() const
Get the writer SwFrameFormat that this object describes.
#define ESCHER_Prop_dyTextBottom
#define ESCHER_Prop_cropFromTop
SvxFrameDirection mnDirection
virtual SdrLayerID GetInvisibleHellId() const =0
#define ESCHER_Prop_fNoLineDrawDash
void ExportControl(WW8Export &rWrt, const SdrUnoObj &rFormObj)
static void WriteString16(SvStream &rStrm, const OUString &rStr, bool bAddZero)
#define ESCHER_Prop_lineDashing
const Color & GetColor() const
constexpr OUStringLiteral INET_FILE_SCHEME
#define DFF_Prop_shadowOffsetX
Fraction conversionFract(o3tl::Length from, o3tl::Length to)
PaM is Point and Mark: a selection of the document model.
#define ESCHER_Prop_lineBackColor
#define ESCHER_ShpInst_TextBox
std::unique_ptr< WW8_WrPlcPn > m_pPapPlc
const EditTextObject & GetTextObject() const
tools::Polygon CorrectWordWrapPolygonForExport(const tools::PolyPolygon &rPolyPoly, const SwNoTextNode *pNd, bool bCorrectCrop)
Undo all scaling / move tricks of the wrap polygon done during import.
void setName(const OUString &rName)
#define ESCHER_Prop_pictureContrast
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
void SetCurItemSet(const SfxItemSet *pS)
Setter for pISet.
EscherExHostAppData aHostData
#define DFF_Prop_shadowOffsetY
virtual const SfxPoolItem * HasTextItem(sal_uInt16 nWhich) const override
const SwPageDesc & GetPageDesc(const size_t i) const
#define STREAM_SEEK_TO_BEGIN
#define ESCHER_Prop_dxWrapDistRight
virtual void WritePictures() override
std::unique_ptr< WW8_WrPlcTextBoxes > m_pHFTextBxs
constexpr TypedWhichId< SwFormatURL > RES_URL(111)
ESCHER_BlipFlagLinkToFile
rtl_TextEncoding m_eNdChrSet
constexpr TypedWhichId< SwCropGrf > RES_GRFATR_CROPGRF(134)
sal_uInt16 GetPos(const void *p) const
virtual void RegisterWithFib(WW8Fib &rFib, sal_uInt32 nStart, sal_uInt32 nLen) const override
#define DFF_Prop_shadowColor
const OUString & GetValue() const
virtual OUString GetText(sal_Int32 nPara) const =0
static void WriteShort(SvStream &rStrm, sal_Int16 nVal)
const Fraction & X() const
const SdrPage * GetPage(sal_uInt16 nPgNum) const
sal_uInt32 mnGroupShapeBooleanProperties
virtual const SwDrawModel * GetDrawModel() const =0
Draw Model and id accessors.
std::size_t WriteBytes(const void *pData, std::size_t nSize)
sal_Int32 DrawModelToEmu(sal_Int32 nVal) const
static OUString GetRelURL(std::u16string_view rTheBaseURIRef, OUString const &rTheAbsURIRef, EncodeMechanism eEncodeMechanism=EncodeMechanism::WasEncoded, DecodeMechanism eDecodeMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8, FSysStyle eStyle=FSysStyle::Detect)
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
void MiserableRTLFrameFormatHack(SwTwips &rLeft, SwTwips &rRight, const ww8::Frame &rFrameFormat)
Nasty swap for bidi if necessary.
void WriteData(EscherEx &rEx) const override
void DoComboBox(css::uno::Reference< css::beans::XPropertySet > const &xPropSet)
sal_uInt32 GetOrdNum() const
SfxItemSet * GetItemSet() const
Layout frame for SwNoTextNode, i.e. graphics and OLE nodes (including charts).
virtual void WriteCR(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner=ww8::WW8TableNodeInfoInner::Pointer_t()) override
void setType(sal_uInt8 nType)
#define DFF_Prop_pWrapPolygonVertices
Marks a node in the document model.
sal_uInt32 GetFlyShapeId(const SwFrameFormat &rFormat, unsigned int nHdFtIndex, DrawObjPointerVector &rPVec)
SwWW8Writer & GetWriter() const
sal_uInt16 GetSlotId(sal_uInt16 nWhich) const
sal_Int32 WriteFlyFrame(const DrawObj &rObj, sal_uInt32 &rShapeId, DrawObjPointerVector &rPVec)
bool WriteText(WW8Export &rWrt)
void Write(SvStream *pDataStrm)
#define ESCHER_Prop_dyWrapDistTop
SvStream & WriteStream(SvStream &rStream)
const SfxItemPool * m_pEditPool
sal_uInt16 TransformWhichBetweenPools(const SfxItemPool &rDestPool, const SfxItemPool &rSrcPool, sal_uInt16 nWhich)
Map an ID valid in one SfxItemPool to its equivalent in another.
#define ESCHER_Prop_cropFromRight
std::unique_ptr< MainTextPlcDrawObj > m_pSdrObjs
sal_Int32 m_lcbPlcfspaHdr
#define ESCHER_Prop_pibName
#define ESCHER_Prop_fillBlip
virtual SdrInventor GetObjInventor() const
#define ESCHER_Prop_shadowColor
Degree100 NormAngle36000(Degree100 a)
sal_uInt32 GetGroupLevel() const
void setStatus(const OUString &rStatus)
virtual SdrLayerID GetHellId() const =0
#define ESCHER_Prop_fillBackColor
#define ESCHER_Prop_hspNext
virtual SdrLayerID GetLayer() const
void setHelp(const OUString &rHelp)
const SwNodeIndex * GetContentIdx() const
virtual ~SwEscherEx() override
std::size_t ReadBytes(void *pData, std::size_t nSize)
#define ESCHER_Prop_dxTextLeft
constexpr sal_uInt16 RES_UNKNOWNATR_BEGIN(RES_BOXATR_END)
css::uno::Reference< css::i18n::XBreakIterator > const & GetBreakIter() const
#define ESCHER_Prop_fillColor
const SwMirrorGrf & GetMirrorGrf(bool=true) const
#define ESCHER_DggContainer
virtual const std::vector< sal_uInt32 > * GetShapeIdArr() const override
SwFrameFormat & GetMaster()
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
SwTextNode is a paragraph in the document model.
bool IsFlyFrameFormatInHeader(const SwFrameFormat &rFormat)
#define ESCHER_SpContainer
#define ESCHER_Prop_fBackground
OUString ExpandField(bool bCached, SwRootFrame const *pLayout) const
expand the field.
static void WriteGrfAttr(const SwNoTextNode &rNd, const SwFrameFormat &rFormat, EscherPropertyContainer &rPropOpt)
SotStorage & GetStorage() const
void Append(const SdrObject &rObj, sal_uInt32 nShapeId)
FrPair GetMapFactor(MapUnit eS, MapUnit eD)
constexpr sal_uInt16 RES_TXTATR_END(RES_TXTATR_NOEND_END)
virtual void CloseContainer()
#define ESCHER_ShpInst_PictureFrame
constexpr sal_uInt16 RES_CHRATR_BEGIN(HINT_BEGIN)
constexpr TypedWhichId< SvxBrushItem > RES_BACKGROUND(105)
void MakeZOrderArrAndFollowIds(std::vector< DrawObj > &rSrcArr, DrawObjPointerVector &rDstArr)
sal_Int32 GetDenominator() const
::ucbhelper::Content m_aContent
void AddAtom(sal_uInt32 nAtomSitze, sal_uInt16 nRecType, int nRecVersion=0, int nRecInstance=0)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
sal_uInt16 GetWhich(sal_uInt16 nSlot, bool bDeep=true) const
#define ESCHER_ShpInst_Rectangle
virtual OutlinerParaObject * GetOutlinerParaObject() const override
Make exporting a Writer Frame easy.
virtual void WriteFrameExtraData(const SwFrameFormat &)
#define ESCHER_Prop_lineColor
#define ESCHER_Prop_fNoFillHitTest
virtual sal_Int32 GetParagraphCount() const =0
bool IsTextAttr(sal_Int32 nSwPos)
virtual void OpenContainer(sal_uInt16 nEscherContainer, int nRecInstance=0)
virtual void WritePictures()
std::vector< const EECharAttrib * > m_aChrTextAtrArr
void SetEndian(SvStreamEndian SvStreamEndian)
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_WHITE
INetProtocol GetProtocol() const
MSWord_SdrAttrIter(const MSWord_SdrAttrIter &)=delete
if(aStr!=aBuf) UpdateName_Impl(m_xFollowLb.get()
constexpr TypedWhichId< SwDrawModeGrf > RES_GRFATR_DRAWMODE(144)
#define ESCHER_Prop_fillType
virtual SwTextFormatColl * GetTextCollFromPool(sal_uInt16 nId, bool bRegardLanguage=true)=0
Return "Auto-Collection with ID.
virtual sal_uInt32 EnterGroup(const OUString &rShapeName, const tools::Rectangle *pBoundRect)
static bool RTLDrawingsHack(SwTwips &rLeft, sal_Int16 eHoriOri, sal_Int16 eHoriRel, SwTwips nPageLeft, SwTwips nPageRight, SwTwips nPageSize)
void WriteSdrTextObj(const SdrTextObj &rObj, sal_uInt8 nTyp)
#define DFF_Prop_fshadowObscured
virtual bool EndURL(bool isAtEndOfParagraph)=0
Output URL end.
void AddOpt(sal_uInt16 nPropID, bool bBlib, sal_uInt32 nSizeReduction, SvMemoryStream &rStream)
FIB - the File Information Block.
void WriteEmptyFlyFrame(const SwFrameFormat &rFormat, sal_uInt32 nShapeId)
sal_Int32 GetNumerator() const
constexpr TypedWhichId< SvxLRSpaceItem > RES_LR_SPACE(91)
constexpr TypedWhichId< SvxFontItem > EE_CHAR_FONTINFO(EE_CHAR_START+1)
std::unique_ptr< WW8_WrPlcTextBoxes > m_pTextBxs
SvStream & WriteChar(char nChar)
virtual void GetCharAttribs(sal_Int32 nPara, std::vector< EECharAttrib > &rLst) const =0
virtual bool get(DocumentSettingId id) const =0
Return the specified document setting.
static void InsUInt16(ww::bytes &rO, sal_uInt16 n)
virtual ~SwEscherExGlobal() override
constexpr TypedWhichId< SvxBoxItem > RES_BOX(106)
void PreWriteHyperlinkWithinFly(const SwFrameFormat &rFormat, EscherPropertyContainer &rPropOpt)
const SwAttrSet & GetSwAttrSet() const
Does node has already its own auto-attributes? Access to SwAttrSet.
virtual void CallSwClientNotify(const SfxHint &rHint) const override
virtual bool StartURL(const OUString &rUrl, const OUString &rTarget)=0
Output URL start.
const css::uno::Reference< css::awt::XControlModel > & GetUnoControlModel() const
std::optional< OutlinerParaObject > CreateEditOutlinerParaObject() const
virtual SvStream * ImplQueryPictureStream() override
Override to create a new memory stream for picture data.
#define ESCHER_SplitMenuColors
bool m_bFontSizeWritten
Is font size written already as part of the current character properties?
SwEscherEx(SvStream *pStrm, WW8Export &rWW8Wrt)
sal_Int32 WriteGrfFlyFrame(const SwFrameFormat &rFormat, sal_uInt32 nShapeId)
SdrLayerID GetHellLayerId() const
Base class for WW8Export and DocxExport.
OUString GetMark(DecodeMechanism eMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
virtual Degree100 GetRotateAngle() const
virtual const tools::Rectangle & GetLogicRect() const
WinwordAnchoring aWinwordAnchoring
bool IsInline() const
Is this frame inline (as character)
bool ReadOCXStream(tools::SvRef< SotStorage > const &rSrc1, css::uno::Reference< css::drawing::XShape > *pShapeRef, bool bFloatingCtrl=false)
void WriteOutliner(const OutlinerParaObject &rOutliner, sal_uInt8 nTyp)
WriterSource GetWriterType() const
Get the type of frame that this wraps.
virtual const SfxPoolItem & GetItem(sal_uInt16 nWhich) const override
rtl_TextEncoding GetNextCharSet() const
void SetItemsThatDifferFromStandard(bool bCharAttr, SfxItemSet &rSet)
std::vector< DrawObj * > DrawObjPointerVector
sal_uInt16 GetSetWhichFromSwDocWhich(const SfxItemSet &rSet, const SwDoc &rDoc, sal_uInt16 nWhich)
Map a SwDoc WhichId to the equivalent Id for a given SfxItemSet.
#define ESCHER_Prop_fPrint
virtual ~SwBasicEscherEx() override
virtual void DoFormText(const SwInputField *pField) override
static sal_uInt32 GetColor(const sal_uInt32 nColor)
const SfxPoolItem & GetAttr(sal_uInt16 nWhich, bool bInParent=true) const
SS for PoolItems: hard attributation.
bool GetOpt(sal_uInt16 nPropertyID, sal_uInt32 &rPropValue) const
void WriteOLEPicture(EscherPropertyContainer &rPropOpt, ShapeFlag nShapeFlags, const Graphic &rGraphic, const SdrObject &rObj, sal_uInt32 nShapeId, const css::awt::Rectangle *pVisArea)
void SetHellLayerId(SdrLayerID nId)
std::unique_ptr< ww::bytes > m_pO
Buffer.
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
#define ESCHER_Prop_pibFlags
The class MSWordAttrIter is a helper class to build the Fkp.chpx.
static void WriteLong(SvStream &rStrm, sal_Int32 nVal)
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_CJK_FONTSIZE(23)
const SwPosition & GetPosition() const
Get the position this frame is anchored at.
virtual void WriteChar(sal_Unicode c)=0
void NextPara(sal_Int32 nPar)
constexpr TypedWhichId< SvxULSpaceItem > RES_UL_SPACE(92)
std::unique_ptr< WW8_WrPlcPn > m_pChpPlc
SvxFrameDirection TrueFrameDirection(const SwFrameFormat &rFlyFormat) const
Right to left?
const Graphic & GetGrf(bool bWait=false) const
static void InsAsString16(ww::bytes &rO, const OUString &rStr)
constexpr TypedWhichId< SvxShadowItem > RES_SHADOW(107)
sal_Int32 WriteTextFlyFrame(const DrawObj &rObj, sal_uInt32 nShapeId, sal_uInt32 nTextBox, DrawObjPointerVector &rPVec)
const Size & GetSize() const
const SfxPoolItem * GetCurItem() const
#define ESCHER_Prop_lTxid
const SwAttrPool & GetAttrPool() const
#define ESCHER_ClientData
constexpr OUStringLiteral aObjectPool
#define ESCHER_Prop_pihlShape
const SvxFieldData * GetField() const
virtual const tools::Rectangle & GetLogicRect() const override
#define ESCHER_Prop_dxTextRight