11 #include <com/sun/star/beans/XPropertySet.hpp>
12 #include <com/sun/star/drawing/PointSequenceSequence.hpp>
19 #include <oox/token/namespaces.hxx>
42 uno::Sequence<beans::PropertyValue> lclGetProperty(
const uno::Reference<drawing::XShape>& rShape,
43 const OUString& rPropName)
45 uno::Sequence<beans::PropertyValue> aResult;
46 uno::Reference<beans::XPropertySet> xPropertySet(rShape, uno::UNO_QUERY);
47 uno::Reference<beans::XPropertySetInfo> xPropSetInfo;
49 if (!xPropertySet.is())
52 xPropSetInfo = xPropertySet->getPropertySetInfo();
53 if (xPropSetInfo.is() && xPropSetInfo->hasPropertyByName(rPropName))
55 xPropertySet->getPropertyValue(rPropName) >>= aResult;
60 OUString lclGetAnchorIdFromGrabBag(
const SdrObject* pObj)
63 uno::Reference<drawing::XShape> xShape(const_cast<SdrObject*>(pObj)->getUnoShape(),
65 OUString aGrabBagName;
66 uno::Reference<lang::XServiceInfo> xServiceInfo(xShape, uno::UNO_QUERY);
67 if (xServiceInfo->supportsService(
"com.sun.star.text.TextFrame"))
68 aGrabBagName =
"FrameInteropGrabBag";
70 aGrabBagName =
"InteropGrabBag";
71 uno::Sequence<beans::PropertyValue> propList = lclGetProperty(xShape, aGrabBagName);
73 = std::find_if(propList.begin(), propList.end(),
74 [](
const beans::PropertyValue& rProp) {
return rProp.Name ==
"AnchorId"; });
75 if (pProp != propList.end())
76 pProp->Value >>= aResult;
80 void lclMovePositionWithRotation(awt::Point& aPos,
const Size& rSize,
Degree100 nRotation100)
85 if (nRotation100 == 0_deg100)
87 sal_Int64 nRotation = nRotation100.
get();
89 nRotation = (36000 + nRotation) % 36000;
90 if (nRotation % 18000 == 0)
92 while (nRotation > 9000)
93 nRotation = (18000 - (nRotation % 18000));
95 double fVal =
static_cast<double>(nRotation) * F_PI18000;
96 double fCos = cos(fVal);
97 double fSin = sin(fVal);
99 double nWidthHalf =
static_cast<double>(rSize.
Width()) / 2;
100 double nHeightHalf =
static_cast<double>(rSize.
Height()) / 2;
102 double nXDiff = fSin * nHeightHalf + fCos * nWidthHalf - nWidthHalf;
103 double nYDiff = fSin * nWidthHalf + fCos * nHeightHalf - nHeightHalf;
110 bool IsAnchorTypeInsideParagraph(
const ww8::Frame* pFrame)
113 return rAnchor.
GetAnchorId() != RndStdIds::FLY_AT_PAGE;
158 , m_pSerializer(
std::move(pSerializer))
159 , m_pDrawingML(pDrawingML)
160 , m_pFlyFrameSize(nullptr)
161 , m_bTextFrameSyntax(false)
162 , m_bDMLTextFrameSyntax(false)
163 , m_bDrawingOpen(false)
164 , m_bParagraphSdtOpen(false)
165 , m_bParagraphHasDrawing(false)
166 , m_pFlyWrapAttrList(nullptr)
167 , m_pBodyPrAttrList(nullptr)
168 , m_bDMLAndVMLDrawingOpen(false)
179 m_pSerializer = pSerializer;
194 m_bDMLTextFrameSyntax = bDMLTextFrameSyntax;
201 m_pFlyAttrList = pFlyAttrList;
209 m_pTextboxAttrList = pTextboxAttrList;
229 m_bDMLAndVMLDrawingOpen = bDMLAndVMLDrawingOpen;
236 m_bParagraphHasDrawing = bParagraphHasDrawing;
248 m_pFlyWrapAttrList = pFlyWrapAttrList;
255 m_pBodyPrAttrList = pBodyPrAttrList;
273 m_nDMLandVMLTextFrameRotation = nDMLandVMLTextFrameRotation;
281 :
m_pImpl(
std::make_unique<
Impl>(rExport, pSerializer, pDrawingML))
289 m_pImpl->setSerializer(pSerializer);
300 return m_pImpl->getFlyAttrList();
305 return m_pImpl->getTextboxAttrList();
314 m_pImpl->setParagraphSdtOpen(bParagraphSdtOpen);
323 m_pImpl->setParagraphHasDrawing(bParagraphHasDrawing);
328 return m_pImpl->getFlyFillAttrList();
333 return m_pImpl->getBodyPrAttrList();
338 return m_pImpl->getDashLineStyleAttr();
343 m_pImpl->setFlyWrapAttrList(pAttrList);
349 m_pImpl->setParagraphHasDrawing(
true);
350 m_pImpl->getSerializer()->startElementNS(XML_w, XML_drawing);
359 if (
m_pImpl->getFlyFrameGraphic())
370 sal_Int32 nLeftExt = 0;
371 sal_Int32 nRightExt = 0;
372 sal_Int32 nTopExt = 0;
373 sal_Int32 nBottomExt = 0;
374 if (aShadowItem.
GetLocation() != SvxShadowLocation::NONE)
376 sal_Int32 nShadowWidth(TwipsToEMU(aShadowItem.
GetWidth()));
379 case SvxShadowLocation::TopLeft:
380 nTopExt = nLeftExt = nShadowWidth;
382 case SvxShadowLocation::TopRight:
383 nTopExt = nRightExt = nShadowWidth;
385 case SvxShadowLocation::BottomLeft:
386 nBottomExt = nLeftExt = nShadowWidth;
388 case SvxShadowLocation::BottomRight:
389 nBottomExt = nRightExt = nShadowWidth;
391 case SvxShadowLocation::NONE:
392 case SvxShadowLocation::End:
402 auto it = aGrabBag.
find(
"CT_EffectExtent");
403 if (it != aGrabBag.
end())
406 for (
const std::pair<const OUString, uno::Any>& rDirection : aEffectExtent)
408 if (rDirection.first ==
"l" && rDirection.second.has<sal_Int32>())
409 nLeftExt = rDirection.second.get<sal_Int32>();
410 else if (rDirection.first ==
"t" && rDirection.second.has<sal_Int32>())
411 nTopExt = rDirection.second.get<sal_Int32>();
412 else if (rDirection.first ==
"r" && rDirection.second.has<sal_Int32>())
413 nRightExt = rDirection.second.get<sal_Int32>();
414 else if (rDirection.first ==
"b" && rDirection.second.has<sal_Int32>())
415 nBottomExt = rDirection.second.get<sal_Int32>();
424 bool bOpaque = pFrameFormat->
GetOpaque().GetValue();
432 bOpaque = pObj->GetLayer()
440 if (pObj->GetObjIdentifier() !=
OBJ_LINE)
442 nRotation = pObj->GetRotateAngle();
443 lclMovePositionWithRotation(aPos, rSize, nRotation);
446 attrList->
add(XML_behindDoc, bOpaque ?
"0" :
"1");
450 sal_Int64 nTopExtDist = nRotation ? 0 : nTopExt;
451 sal_Int64 nDistT = std::max(static_cast<sal_Int64>(0),
452 TwipsToEMU(aULSpaceItem.
GetUpper()) - nTopExtDist);
453 attrList->
add(XML_distT, OString::number(nDistT).getStr());
454 sal_Int64 nBottomExtDist = nRotation ? 0 : nBottomExt;
455 sal_Int64 nDistB = std::max(static_cast<sal_Int64>(0),
456 TwipsToEMU(aULSpaceItem.
GetLower()) - nBottomExtDist);
457 attrList->
add(XML_distB, OString::number(nDistB).getStr());
458 sal_Int64 nLeftExtDist = nRotation ? 0 : nLeftExt;
459 sal_Int64 nDistL = std::max(static_cast<sal_Int64>(0),
460 TwipsToEMU(aLRSpaceItem.
GetLeft()) - nLeftExtDist);
461 attrList->
add(XML_distL, OString::number(nDistL).getStr());
462 sal_Int64 nRightExtDist = nRotation ? 0 : nRightExt;
463 sal_Int64 nDistR = std::max(static_cast<sal_Int64>(0),
464 TwipsToEMU(aLRSpaceItem.
GetRight()) - nRightExtDist);
465 attrList->
add(XML_distR, OString::number(nDistR).getStr());
466 attrList->
add(XML_simplePos,
"0");
467 attrList->
add(XML_locked,
"0");
468 bool bLclInTabCell =
true;
471 uno::Reference<drawing::XShape> xShape((const_cast<SdrObject*>(pObj)->getUnoShape()),
473 uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY);
474 if (xShapeProps.is())
475 xShapeProps->getPropertyValue(
"IsFollowingTextFlow") >>= bLclInTabCell;
478 attrList->
add(XML_layoutInCell,
"1");
480 attrList->
add(XML_layoutInCell,
"0");
482 attrList->
add(XML_allowOverlap, bAllowOverlap ?
"1" :
"0");
485 attrList->
add(XML_relativeHeight, OString::number(pObj->GetOrdNum() + 2));
488 attrList->
add(XML_relativeHeight,
"0");
491 OUString sAnchorId = lclGetAnchorIdFromGrabBag(pObj);
492 if (!sAnchorId.isEmpty())
493 attrList->
addNS(XML_wp14, XML_anchorId,
497 m_pImpl->getSerializer()->startElementNS(XML_wp, XML_anchor, xAttrList);
498 m_pImpl->getSerializer()->singleElementNS(XML_wp, XML_simplePos, XML_x,
"0", XML_y,
500 const char* relativeFromH;
501 const char* relativeFromV;
502 const char* alignH =
nullptr;
503 const char* alignV =
nullptr;
506 case text::RelOrientation::PAGE_PRINT_AREA:
507 relativeFromV =
"margin";
509 case text::RelOrientation::PAGE_PRINT_AREA_TOP:
510 relativeFromV =
"topMargin";
512 case text::RelOrientation::PAGE_PRINT_AREA_BOTTOM:
513 relativeFromV =
"bottomMargin";
515 case text::RelOrientation::PAGE_FRAME:
516 relativeFromV =
"page";
518 case text::RelOrientation::FRAME:
519 relativeFromV =
"paragraph";
521 case text::RelOrientation::TEXT_LINE:
523 relativeFromV =
"line";
528 case text::VertOrientation::TOP:
529 case text::VertOrientation::CHAR_TOP:
530 case text::VertOrientation::LINE_TOP:
532 == text::RelOrientation::TEXT_LINE)
537 case text::VertOrientation::BOTTOM:
538 case text::VertOrientation::CHAR_BOTTOM:
539 case text::VertOrientation::LINE_BOTTOM:
541 == text::RelOrientation::TEXT_LINE)
546 case text::VertOrientation::CENTER:
547 case text::VertOrientation::CHAR_CENTER:
548 case text::VertOrientation::LINE_CENTER:
556 case text::RelOrientation::PAGE_PRINT_AREA:
557 relativeFromH =
"margin";
559 case text::RelOrientation::PAGE_FRAME:
560 relativeFromH =
"page";
562 case text::RelOrientation::CHAR:
563 relativeFromH =
"character";
565 case text::RelOrientation::PAGE_RIGHT:
566 relativeFromH =
"rightMargin";
568 case text::RelOrientation::PAGE_LEFT:
569 relativeFromH =
"leftMargin";
571 case text::RelOrientation::FRAME:
573 relativeFromH =
"column";
578 case text::HoriOrientation::LEFT:
581 case text::HoriOrientation::RIGHT:
584 case text::HoriOrientation::CENTER:
587 case text::HoriOrientation::INSIDE:
590 case text::HoriOrientation::OUTSIDE:
596 m_pImpl->getSerializer()->startElementNS(XML_wp, XML_positionH, XML_relativeFrom,
605 if (alignH !=
nullptr)
607 m_pImpl->getSerializer()->startElementNS(XML_wp, XML_align);
608 m_pImpl->getSerializer()->write(alignH);
609 m_pImpl->getSerializer()->endElementNS(XML_wp, XML_align);
613 m_pImpl->getSerializer()->startElementNS(XML_wp, XML_posOffset);
614 sal_Int64 nPosXEMU = TwipsToEMU(aPos.X);
627 if (nPosXEMU > MAX_INTEGER_VALUE)
629 nPosXEMU = MAX_INTEGER_VALUE;
631 else if (nPosXEMU < MIN_INTEGER_VALUE)
633 nPosXEMU = MIN_INTEGER_VALUE;
635 m_pImpl->getSerializer()->write(nPosXEMU);
636 m_pImpl->getSerializer()->endElementNS(XML_wp, XML_posOffset);
638 m_pImpl->getSerializer()->endElementNS(XML_wp, XML_positionH);
639 m_pImpl->getSerializer()->startElementNS(XML_wp, XML_positionV, XML_relativeFrom,
642 sal_Int64 nPosYEMU = TwipsToEMU(aPos.Y);
649 && (strcmp(relativeFromV,
"line") == 0 || strcmp(relativeFromV,
"paragraph") == 0)
650 && (!alignV || strcmp(alignV,
"top") == 0))
656 if (alignV !=
nullptr)
658 m_pImpl->getSerializer()->startElementNS(XML_wp, XML_align);
659 m_pImpl->getSerializer()->write(alignV);
660 m_pImpl->getSerializer()->endElementNS(XML_wp, XML_align);
664 m_pImpl->getSerializer()->startElementNS(XML_wp, XML_posOffset);
665 if (nPosYEMU > MAX_INTEGER_VALUE)
667 nPosYEMU = MAX_INTEGER_VALUE;
669 else if (nPosYEMU < MIN_INTEGER_VALUE)
671 nPosYEMU = MIN_INTEGER_VALUE;
673 m_pImpl->getSerializer()->write(nPosYEMU);
674 m_pImpl->getSerializer()->endElementNS(XML_wp, XML_posOffset);
676 m_pImpl->getSerializer()->endElementNS(XML_wp, XML_positionV);
682 aAttrList->
add(XML_distT, OString::number(TwipsToEMU(aULSpaceItem.
GetUpper())).getStr());
683 aAttrList->
add(XML_distB, OString::number(TwipsToEMU(aULSpaceItem.
GetLower())).getStr());
684 aAttrList->
add(XML_distL, OString::number(TwipsToEMU(aLRSpaceItem.
GetLeft())).getStr());
685 aAttrList->
add(XML_distR, OString::number(TwipsToEMU(aLRSpaceItem.
GetRight())).getStr());
689 OUString sAnchorId = lclGetAnchorIdFromGrabBag(pObj);
690 if (!sAnchorId.isEmpty())
691 aAttrList->
addNS(XML_wp14, XML_anchorId,
694 m_pImpl->getSerializer()->startElementNS(XML_wp, XML_inline, aAttrList);
718 OString aWidth(OString::number(std::min(cx, sal_uInt64(
SAL_MAX_INT32))));
721 OString aHeight(OString::number(std::min(cy, sal_uInt64(
SAL_MAX_INT32))));
723 m_pImpl->getSerializer()->singleElementNS(XML_wp, XML_extent, XML_cx, aWidth, XML_cy, aHeight);
726 m_pImpl->getSerializer()->singleElementNS(
727 XML_wp, XML_effectExtent, XML_l, OString::number(nLeftExt), XML_t, OString::number(nTopExt),
728 XML_r, OString::number(nRightExt), XML_b, OString::number(nBottomExt));
731 sal_Int32 nWrapToken = 0;
737 auto it = aGrabBag.
find(
"EG_WrapType");
738 if (it != aGrabBag.
end())
740 auto sType = it->second.get<OUString>();
741 if (
sType ==
"wrapTight")
742 nWrapToken = XML_wrapTight;
743 else if (
sType ==
"wrapThrough")
744 nWrapToken = XML_wrapThrough;
747 "DocxSdrExport::startDMLAnchorInline: unexpected EG_WrapType value");
749 m_pImpl->getSerializer()->startElementNS(XML_wp, nWrapToken, XML_wrapText,
"bothSides");
751 it = aGrabBag.
find(
"CT_WrapPath");
752 if (it != aGrabBag.
end())
754 m_pImpl->getSerializer()->startElementNS(XML_wp, XML_wrapPolygon, XML_edited,
"0");
755 auto aSeqSeq = it->second.get<drawing::PointSequenceSequence>();
757 for (
auto i = aPoints.begin();
i != aPoints.end(); ++
i)
759 awt::Point& rPoint = *
i;
760 m_pImpl->getSerializer()->singleElementNS(
761 XML_wp, (
i == aPoints.begin() ? XML_start : XML_lineTo), XML_x,
762 OString::number(rPoint.X), XML_y, OString::number(rPoint.Y));
764 m_pImpl->getSerializer()->endElementNS(XML_wp, XML_wrapPolygon);
767 m_pImpl->getSerializer()->endElementNS(XML_wp, nWrapToken);
777 if (pPolyPoly && pPolyPoly->
Count())
779 nWrapToken = XML_wrapTight;
780 m_pImpl->getSerializer()->startElementNS(XML_wp, nWrapToken, XML_wrapText,
783 m_pImpl->getSerializer()->startElementNS(XML_wp, XML_wrapPolygon, XML_edited,
"0");
785 *pPolyPoly, pNd,
true);
786 for (sal_uInt16
i = 0;
i < aPoly.
GetSize(); ++
i)
787 m_pImpl->getSerializer()->singleElementNS(
788 XML_wp, (
i == 0 ? XML_start : XML_lineTo), XML_x,
789 OString::number(aPoly[
i].
X()), XML_y, OString::number(aPoly[
i].
Y()));
790 m_pImpl->getSerializer()->endElementNS(XML_wp, XML_wrapPolygon);
792 m_pImpl->getSerializer()->endElementNS(XML_wp, nWrapToken);
798 if (!isAnchor || nWrapToken)
803 case css::text::WrapTextMode_NONE:
804 m_pImpl->getSerializer()->singleElementNS(XML_wp, XML_wrapTopAndBottom);
806 case css::text::WrapTextMode_THROUGH:
807 m_pImpl->getSerializer()->singleElementNS(XML_wp, XML_wrapNone);
809 case css::text::WrapTextMode_PARALLEL:
810 m_pImpl->getSerializer()->singleElementNS(XML_wp, XML_wrapSquare, XML_wrapText,
813 case css::text::WrapTextMode_DYNAMIC:
815 m_pImpl->getSerializer()->singleElementNS(XML_wp, XML_wrapSquare, XML_wrapText,
824 if (
m_pImpl->getFlyFrameGraphic())
832 m_pImpl->getSerializer()->endElementNS(XML_wp, isAnchor ? XML_anchor : XML_inline);
834 m_pImpl->getSerializer()->endElementNS(XML_w, XML_drawing);
835 m_pImpl->setDrawingOpen(
false);
840 m_pImpl->getSerializer()->startElementNS(XML_w, XML_pict);
848 std::unique_ptr<sax_fastparser::FastAttributeList> pAttrList(
850 m_pImpl->getExport().VMLExporter().AddSdrObject(
853 m_pImpl->getSerializer()->endElementNS(XML_w, XML_pict);
858 uno::Sequence<beans::PropertyValue> propList = lclGetProperty(xShape,
"InteropGrabBag");
863 return std::any_of(propList.begin(), propList.end(), [](
const beans::PropertyValue& rProp) {
864 return rProp.Name ==
"LockedCanvas";
871 uno::Reference<drawing::XShape> xShape(const_cast<SdrObject*>(pSdrObject)->getUnoShape(),
872 uno::UNO_QUERY_THROW);
876 m_pImpl->getExport().DocxAttrOutput().GetSdtEndBefore(pSdrObject);
884 pDocPrAttrList->
add(XML_id, OString::number(nAnchorId).getStr());
885 pDocPrAttrList->
add(XML_name,
887 if (!pSdrObject->
GetTitle().isEmpty())
888 pDocPrAttrList->
add(XML_title,
891 pDocPrAttrList->
add(XML_descr,
896 pDocPrAttrList->
add(XML_hidden, OString::number(1).getStr());
898 pFS->singleElementNS(XML_wp, XML_docPr, xDocPrAttrListRef);
900 uno::Reference<lang::XServiceInfo> xServiceInfo(xShape, uno::UNO_QUERY_THROW);
901 const char* pNamespace =
"http://schemas.microsoft.com/office/word/2010/wordprocessingShape";
902 if (xServiceInfo->supportsService(
"com.sun.star.drawing.GroupShape"))
903 pNamespace =
"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup";
904 else if (xServiceInfo->supportsService(
"com.sun.star.drawing.GraphicObjectShape"))
905 pNamespace =
"http://schemas.openxmlformats.org/drawingml/2006/picture";
906 pFS->startElementNS(XML_a, XML_graphic,
FSNS(XML_xmlns, XML_a),
907 m_pImpl->getExport().GetFilter().getNamespaceURL(OOX_NS(dml)));
908 pFS->startElementNS(XML_a, XML_graphicData, XML_uri, pNamespace);
913 XML_lc, XML_lockedCanvas,
FSNS(XML_xmlns, XML_lc),
914 m_pImpl->getExport().GetFilter().getNamespaceURL(OOX_NS(dmlLockedCanvas)));
916 m_pImpl->getExport().OutputDML(xShape);
919 pFS->endElementNS(XML_lc, XML_lockedCanvas);
920 pFS->endElementNS(XML_a, XML_graphicData);
921 pFS->endElementNS(XML_a, XML_graphic);
930 case text::RelOrientation::FRAME:
933 case text::RelOrientation::PAGE_LEFT:
935 sValue =
"outsideMargin";
937 sValue =
"leftMargin";
939 case text::RelOrientation::PAGE_RIGHT:
941 sValue =
"insideMargin";
943 sValue =
"rightMargin";
945 case text::RelOrientation::PAGE_FRAME:
950 pFS->startElementNS(XML_wp14, XML_sizeRelH, XML_relativeFrom, sValue);
951 pFS->startElementNS(XML_wp14, XML_pctWidth);
954 pFS->endElementNS(XML_wp14, XML_pctWidth);
955 pFS->endElementNS(XML_wp14, XML_sizeRelH);
962 case text::RelOrientation::FRAME:
965 case text::RelOrientation::PAGE_PRINT_AREA:
966 sValue =
"topMargin";
968 case text::RelOrientation::PAGE_PRINT_AREA_BOTTOM:
969 sValue =
"bottomMargin";
971 case text::RelOrientation::PAGE_FRAME:
976 pFS->startElementNS(XML_wp14, XML_sizeRelV, XML_relativeFrom, sValue);
977 pFS->startElementNS(XML_wp14, XML_pctHeight);
980 pFS->endElementNS(XML_wp14, XML_pctHeight);
981 pFS->endElementNS(XML_wp14, XML_sizeRelV);
990 if (aShadowItem.
GetLocation() == SvxShadowLocation::NONE)
993 OString aShadowWidth(OString::number(
double(aShadowItem.
GetWidth()) / 20) +
"pt");
997 case SvxShadowLocation::TopLeft:
998 aOffset =
"-" + aShadowWidth +
",-" + aShadowWidth;
1000 case SvxShadowLocation::TopRight:
1001 aOffset = aShadowWidth +
",-" + aShadowWidth;
1003 case SvxShadowLocation::BottomLeft:
1004 aOffset =
"-" + aShadowWidth +
"," + aShadowWidth;
1006 case SvxShadowLocation::BottomRight:
1007 aOffset = aShadowWidth +
"," + aShadowWidth;
1009 case SvxShadowLocation::NONE:
1010 case SvxShadowLocation::End:
1013 if (aOffset.isEmpty())
1017 m_pSerializer->singleElementNS(XML_v, XML_shadow, XML_on,
"t", XML_color,
"#" + aShadowColor,
1018 XML_offset, aOffset);
1023 uno::Reference<lang::XServiceInfo> xServiceInfo(xShape, uno::UNO_QUERY_THROW);
1024 if (xServiceInfo->supportsService(
"com.sun.star.drawing.PolyPolygonShape")
1025 || xServiceInfo->supportsService(
"com.sun.star.drawing.PolyLineShape"))
1029 if (xServiceInfo->supportsService(
"com.sun.star.drawing.GraphicObjectShape"))
1031 uno::Reference<beans::XPropertySet> xShapeProperties(xShape, uno::UNO_QUERY);
1032 bool bIsSignatureLineShape =
false;
1033 xShapeProperties->getPropertyValue(
"IsSignatureLine") >>= bIsSignatureLineShape;
1034 if (bIsSignatureLineShape)
1044 bool bDMLAndVMLDrawingOpen =
m_pImpl->getDMLAndVMLDrawingOpen();
1045 m_pImpl->setDMLAndVMLDrawingOpen(
true);
1048 OUString sShapeType;
1049 ShapeFlag nMirrorFlags = ShapeFlag::NONE;
1050 uno::Reference<drawing::XShape> xShape(const_cast<SdrObject*>(sdrObj)->getUnoShape(),
1051 uno::UNO_QUERY_THROW);
1061 m_pImpl->getSerializer()->startElementNS(XML_mc, XML_AlternateContent);
1063 auto pObjGroup =
dynamic_cast<const SdrObjGroup*
>(sdrObj);
1064 m_pImpl->getSerializer()->startElementNS(XML_mc, XML_Choice, XML_Requires,
1065 (pObjGroup ?
"wpg" :
"wps"));
1067 m_pImpl->getSerializer()->endElementNS(XML_mc, XML_Choice);
1069 m_pImpl->getSerializer()->startElementNS(XML_mc, XML_Fallback);
1071 m_pImpl->getSerializer()->endElementNS(XML_mc, XML_Fallback);
1073 m_pImpl->getSerializer()->endElementNS(XML_mc, XML_AlternateContent);
1078 m_pImpl->setDMLAndVMLDrawingOpen(bDMLAndVMLDrawingOpen);
1086 sal_Int32 nAlphaPercent = float(rColor.
GetAlpha()) / 2.55;
1098 if (aShadowItem.
GetLocation() == SvxShadowLocation::NONE)
1103 = sqrt(static_cast<double>(aShadowItem.
GetWidth()) * aShadowItem.
GetWidth() * 2.0);
1104 OString aShadowDist(OString::number(TwipsToEMU(nShadowDist)));
1107 sal_uInt32 nShadowDir = 0;
1110 case SvxShadowLocation::TopLeft:
1111 nShadowDir = 13500000;
1113 case SvxShadowLocation::TopRight:
1114 nShadowDir = 18900000;
1116 case SvxShadowLocation::BottomLeft:
1117 nShadowDir = 8100000;
1119 case SvxShadowLocation::BottomRight:
1120 nShadowDir = 2700000;
1122 case SvxShadowLocation::NONE:
1123 case SvxShadowLocation::End:
1126 OString aShadowDir(OString::number(nShadowDir));
1128 m_pImpl->getSerializer()->startElementNS(XML_a, XML_effectLst);
1129 m_pImpl->getSerializer()->startElementNS(XML_a, XML_outerShdw, XML_dist, aShadowDist, XML_dir,
1131 if (aShadowAlpha.isEmpty())
1132 m_pImpl->getSerializer()->singleElementNS(XML_a, XML_srgbClr, XML_val, aShadowColor);
1135 m_pImpl->getSerializer()->startElementNS(XML_a, XML_srgbClr, XML_val, aShadowColor);
1136 m_pImpl->getSerializer()->singleElementNS(XML_a, XML_alpha, XML_val, aShadowAlpha);
1137 m_pImpl->getSerializer()->endElementNS(XML_a, XML_srgbClr);
1139 m_pImpl->getSerializer()->endElementNS(XML_a, XML_outerShdw);
1140 m_pImpl->getSerializer()->endElementNS(XML_a, XML_effectLst);
1146 uno::Reference<drawing::XShape> xShape(const_cast<SdrObject*>(sdrObject)->getUnoShape(),
1153 m_pImpl->getDrawingML()->WriteDiagram(xShape, nDiagramId);
1172 m_pImpl->getExport().WriteText();
1181 pBorderLine = rBox.
GetTop();
1204 OString sWidth(OString::number(TwipsToEMU(fConverted)));
1205 pFS->startElementNS(XML_a, XML_ln, XML_w, sWidth);
1207 pFS->startElementNS(XML_a, XML_solidFill);
1209 pFS->singleElementNS(XML_a, XML_srgbClr, XML_val, sColor);
1210 pFS->endElementNS(XML_a, XML_solidFill);
1213 pFS->singleElementNS(XML_a, XML_prstDash, XML_val,
"dash");
1215 pFS->endElementNS(XML_a, XML_ln);
1221 bool bDMLAndVMLDrawingOpen =
m_pImpl->getDMLAndVMLDrawingOpen();
1222 m_pImpl->setDMLAndVMLDrawingOpen(IsAnchorTypeInsideParagraph(pParentFrame));
1238 uno::Reference<drawing::XShape> xShape;
1241 xShape.set(const_cast<SdrObject*>(pSdrObj)->getUnoShape(), uno::UNO_QUERY);
1242 uno::Reference<beans::XPropertySet> xPropertySet(xShape, uno::UNO_QUERY);
1243 uno::Reference<beans::XPropertySetInfo> xPropSetInfo;
1244 if (xPropertySet.is())
1245 xPropSetInfo = xPropertySet->getPropertySetInfo();
1249 drawing::TextVerticalAdjust eAdjust = drawing::TextVerticalAdjust_TOP;
1250 if (xPropSetInfo.is() && xPropSetInfo->hasPropertyByName(
"TextVerticalAdjust"))
1251 xPropertySet->getPropertyValue(
"TextVerticalAdjust") >>= eAdjust;
1252 m_pImpl->getBodyPrAttrList()->add(XML_anchor,
1262 pDocPrAttrList->
add(XML_id, OString::number(nAnchorId).getStr());
1263 pDocPrAttrList->
add(
1266 pFS->singleElementNS(XML_wp, XML_docPr, xDocPrAttrListRef);
1268 pFS->startElementNS(XML_a, XML_graphic,
FSNS(XML_xmlns, XML_a),
1269 m_pImpl->getExport().GetFilter().getNamespaceURL(OOX_NS(dml)));
1270 pFS->startElementNS(XML_a, XML_graphicData, XML_uri,
1271 "http://schemas.microsoft.com/office/word/2010/wordprocessingShape");
1272 pFS->startElementNS(XML_wps, XML_wsp);
1273 pFS->singleElementNS(XML_wps, XML_cNvSpPr, XML_txBox,
"1");
1276 m_pImpl->setDMLandVMLTextFrameRotation(0_deg100);
1277 if (xPropSetInfo.is() && xPropSetInfo->hasPropertyByName(
"FrameInteropGrabBag"))
1279 uno::Sequence<beans::PropertyValue> propList;
1280 xPropertySet->getPropertyValue(
"FrameInteropGrabBag") >>= propList;
1281 auto pProp = std::find_if(propList.begin(), propList.end(),
1282 [](
const beans::PropertyValue& rProp) {
1283 return rProp.Name ==
"mso-rotation-angle";
1285 if (pProp != propList.end())
1286 aRotation = pProp->
Value;
1289 if (aRotation >>= nTmp)
1291 OString sRotation(OString::number(
1294 pFS->startElementNS(XML_wps, XML_spPr);
1295 if (
m_pImpl->getDMLandVMLTextFrameRotation())
1297 pFS->startElementNS(XML_a, XML_xfrm, XML_rot, sRotation);
1301 pFS->startElementNS(XML_a, XML_xfrm);
1303 pFS->singleElementNS(XML_a, XML_off, XML_x,
"0", XML_y,
"0");
1304 OString aWidth(OString::number(TwipsToEMU(aSize.Width())));
1305 OString aHeight(OString::number(TwipsToEMU(aSize.Height())));
1306 pFS->singleElementNS(XML_a, XML_ext, XML_cx, aWidth, XML_cy, aHeight);
1307 pFS->endElementNS(XML_a, XML_xfrm);
1308 OUString shapeType =
"rect";
1309 if (xPropSetInfo.is() && xPropSetInfo->hasPropertyByName(
"FrameInteropGrabBag"))
1311 uno::Sequence<beans::PropertyValue> propList;
1312 xPropertySet->getPropertyValue(
"FrameInteropGrabBag") >>= propList;
1313 auto pProp = std::find_if(propList.begin(), propList.end(),
1314 [](
const beans::PropertyValue& rProp) {
1315 return rProp.Name ==
"mso-orig-shape-type";
1317 if (pProp != propList.end())
1318 pProp->Value >>= shapeType;
1321 if (shapeType.isEmpty())
1324 pFS->singleElementNS(XML_a, XML_prstGeom, XML_prst, shapeType);
1325 m_pImpl->setDMLTextFrameSyntax(
true);
1327 m_pImpl->setDMLTextFrameSyntax(
false);
1329 pFS->endElementNS(XML_wps, XML_spPr);
1333 if (!
m_pImpl->getExport().m_bLinkedTextboxesHelperInitialized)
1336 for (
auto& rEntry :
m_pImpl->getExport().m_aLinkedTextboxesHelper)
1339 if (rEntry.second.sPrevChain.isEmpty() && !rEntry.second.sNextChain.isEmpty())
1343 rEntry.second.nId = ++
m_pImpl->getExport().m_nLinkedTextboxesChainId;
1344 rEntry.second.nSeq = nSeq;
1346 OUString sCheckForBrokenChains = rEntry.first;
1349 auto followChainIter
1350 =
m_pImpl->getExport().m_aLinkedTextboxesHelper.find(rEntry.second.sNextChain);
1351 while (followChainIter !=
m_pImpl->getExport().m_aLinkedTextboxesHelper.end())
1355 if (followChainIter->second.sPrevChain != sCheckForBrokenChains)
1358 followChainIter->second.nId =
m_pImpl->getExport().m_nLinkedTextboxesChainId;
1359 followChainIter->second.nSeq = ++nSeq;
1362 if (followChainIter->second.sNextChain.isEmpty())
1365 sCheckForBrokenChains = followChainIter->first;
1366 followChainIter =
m_pImpl->getExport().m_aLinkedTextboxesHelper.find(
1367 followChainIter->second.sNextChain);
1371 m_pImpl->getExport().m_bLinkedTextboxesHelperInitialized =
true;
1374 m_pImpl->getExport().m_pParentFrame =
nullptr;
1375 bool skipTxBxContent =
false;
1376 bool isTxbxLinked =
false;
1378 OUString sLinkChainName;
1379 if (xPropSetInfo.is())
1381 if (xPropSetInfo->hasPropertyByName(
"LinkDisplayName"))
1382 xPropertySet->getPropertyValue(
"LinkDisplayName") >>= sLinkChainName;
1383 else if (xPropSetInfo->hasPropertyByName(
"ChainName"))
1384 xPropertySet->getPropertyValue(
"ChainName") >>= sLinkChainName;
1388 auto linkedTextboxesIter =
m_pImpl->getExport().m_aLinkedTextboxesHelper.find(sLinkChainName);
1389 if (linkedTextboxesIter !=
m_pImpl->getExport().m_aLinkedTextboxesHelper.end())
1391 if ((linkedTextboxesIter->second.nId != 0) && (linkedTextboxesIter->second.nSeq != 0))
1394 pFS->singleElementNS(XML_wps, XML_linkedTxbx, XML_id,
1395 OString::number(linkedTextboxesIter->second.nId), XML_seq,
1396 OString::number(linkedTextboxesIter->second.nSeq));
1401 skipTxBxContent =
true;
1403 else if ((linkedTextboxesIter->second.nId != 0) && (linkedTextboxesIter->second.nSeq == 0))
1408 pFS->startElementNS(XML_wps, XML_txbx, XML_id,
1409 OString::number(linkedTextboxesIter->second.nId));
1410 isTxbxLinked =
true;
1414 if (!skipTxBxContent)
1417 pFS->startElementNS(XML_wps, XML_txbx);
1419 pFS->startElementNS(XML_w, XML_txbxContent);
1422 if (rDirection.GetValue() == SvxFrameDirection::Vertical_RL_TB)
1423 m_pImpl->getBodyPrAttrList()->add(XML_vert,
"eaVert");
1424 else if (rDirection.GetValue() == SvxFrameDirection::Vertical_LR_BT)
1425 m_pImpl->getBodyPrAttrList()->add(XML_vert,
"vert270");
1430 m_pImpl->getExport().WriteText();
1431 if (
m_pImpl->getParagraphSdtOpen())
1433 m_pImpl->getExport().DocxAttrOutput().EndParaSdtBlock();
1434 m_pImpl->setParagraphSdtOpen(
false);
1438 pFS->endElementNS(XML_w, XML_txbxContent);
1439 pFS->endElementNS(XML_wps, XML_txbx);
1445 if (
m_pImpl->getBodyPrAttrList())
1447 if (!
m_pImpl->getBodyPrAttrList()->hasAttribute(XML_lIns))
1448 m_pImpl->getBodyPrAttrList()->add(XML_lIns, OString::number(0));
1449 if (!
m_pImpl->getBodyPrAttrList()->hasAttribute(XML_tIns))
1450 m_pImpl->getBodyPrAttrList()->add(XML_tIns, OString::number(0));
1451 if (!
m_pImpl->getBodyPrAttrList()->hasAttribute(XML_rIns))
1452 m_pImpl->getBodyPrAttrList()->add(XML_rIns, OString::number(0));
1453 if (!
m_pImpl->getBodyPrAttrList()->hasAttribute(XML_bIns))
1454 m_pImpl->getBodyPrAttrList()->add(XML_bIns, OString::number(0));
1458 m_pImpl->setBodyPrAttrList(
nullptr);
1461 pFS->startElementNS(XML_wps, XML_bodyPr, xBodyPrAttrList);
1464 pFS->singleElementNS(
1467 pFS->endElementNS(XML_wps, XML_bodyPr);
1469 pFS->endElementNS(XML_wps, XML_wsp);
1470 pFS->endElementNS(XML_a, XML_graphicData);
1471 pFS->endElementNS(XML_a, XML_graphic);
1477 pFS->startElementNS(XML_wp14, XML_sizeRelH, XML_relativeFrom,
1481 pFS->startElementNS(XML_wp14, XML_pctWidth);
1483 pFS->endElementNS(XML_wp14, XML_pctWidth);
1484 pFS->endElementNS(XML_wp14, XML_sizeRelH);
1489 pFS->startElementNS(
1490 XML_wp14, XML_sizeRelV, XML_relativeFrom,
1493 pFS->startElementNS(XML_wp14, XML_pctHeight);
1495 pFS->endElementNS(XML_wp14, XML_pctHeight);
1496 pFS->endElementNS(XML_wp14, XML_sizeRelV);
1501 m_pImpl->setDMLAndVMLDrawingOpen(bDMLAndVMLDrawingOpen);
1506 bool bDMLAndVMLDrawingOpen =
m_pImpl->getDMLAndVMLDrawingOpen();
1507 m_pImpl->setDMLAndVMLDrawingOpen(IsAnchorTypeInsideParagraph(pParentFrame));
1522 m_pImpl->setFlyFrameSize(&aSize);
1524 m_pImpl->setTextFrameSyntax(
true);
1527 m_pImpl->getTextFrameStyle() =
"position:absolute";
1530 OString sRotation(OString::number(
m_pImpl->getDMLandVMLTextFrameRotation().get() / -100));
1533 .getTextFrameStyle()
1534 .append(
";rotation:")
1538 m_pImpl->getFlyAttrList()->add(XML_style,
m_pImpl->getTextFrameStyle().makeStringAndClear());
1541 if (pObject !=
nullptr)
1543 OUString sAnchorId = lclGetAnchorIdFromGrabBag(pObject);
1544 if (!sAnchorId.isEmpty())
1545 m_pImpl->getFlyAttrList()->addNS(XML_w14, XML_anchorId,
1549 m_pImpl->getFlyAttrList().clear();
1551 m_pImpl->getTextboxAttrList().clear();
1552 m_pImpl->setTextFrameSyntax(
false);
1553 m_pImpl->setFlyFrameSize(
nullptr);
1554 m_pImpl->getExport().m_pParentFrame =
nullptr;
1558 pFS->startElementNS(XML_w, XML_pict);
1559 pFS->startElementNS(XML_v, XML_rect, xFlyAttrList);
1560 m_pImpl->textFrameShadow(rFrameFormat);
1561 if (
m_pImpl->getFlyFillAttrList().is())
1564 m_pImpl->getFlyFillAttrList().get());
1565 m_pImpl->getFlyFillAttrList().clear();
1566 pFS->singleElementNS(XML_v, XML_fill, xFlyFillAttrList);
1568 if (
m_pImpl->getDashLineStyleAttr().is())
1571 m_pImpl->getDashLineStyleAttr().get());
1572 m_pImpl->getDashLineStyleAttr().clear();
1573 pFS->singleElementNS(XML_v, XML_stroke, xDashLineStyleAttr);
1575 pFS->startElementNS(XML_v, XML_textbox, xTextboxAttrList);
1577 pFS->startElementNS(XML_w, XML_txbxContent);
1581 m_pImpl->getExport().WriteText();
1582 if (
m_pImpl->getParagraphSdtOpen())
1584 m_pImpl->getExport().DocxAttrOutput().EndParaSdtBlock();
1585 m_pImpl->setParagraphSdtOpen(
false);
1588 pFS->endElementNS(XML_w, XML_txbxContent);
1591 pFS->endElementNS(XML_v, XML_textbox);
1593 if (
m_pImpl->getFlyWrapAttrList())
1596 m_pImpl->setFlyWrapAttrList(
nullptr);
1597 pFS->singleElementNS(XML_w10, XML_wrap, xFlyWrapAttrList);
1600 pFS->endElementNS(XML_v, XML_rect);
1601 pFS->endElementNS(XML_w, XML_pict);
1604 m_pImpl->setDMLAndVMLDrawingOpen(bDMLAndVMLDrawingOpen);
bool getTextFrameSyntax() const
void writeDMLAndVMLDrawing(const SdrObject *sdrObj, const SwFrameFormat &rFrameFormat, int nAnchorId)
Writes shape in both DML and VML format.
sax_fastparser::FastAttributeList * getFlyWrapAttrList() const
Helper class, so that the DocxExport::RestoreData() call will always happen.
SwNoTextNode * GetNoTextNodeFromSwFrameFormat(const SwFrameFormat &rFormat)
Get the SwNoTextNode associated with a SwFrameFormat if here is one.
static bool lcl_isLockedCanvas(const uno::Reference< drawing::XShape > &xShape)
sax_fastparser::FastAttributeList * m_pFlyWrapAttrList
bool getParagraphHasDrawing() const
bool IsDrawingOpen() const
sal_uInt8 GetAlpha() const
sal_uInt16 GetLower() const
const Size * m_pFlyFrameSize
static FastAttributeList * createAttrList()
double ConvertBorderWidthToWord(SvxBorderLineStyle, double)
std::unique_ptr< Impl > m_pImpl
TextVerticalAdjust GetTextVerticalAdjust(sal_Int32 nToken)
const sal_Int32 PER_PERCENT
void endDMLAnchorInline(const SwFrameFormat *pFrameFormat)
bool IsTransparent() const
css::uno::Reference< css::xml::sax::XFastAttributeList > XFastAttributeListRef
oox::drawingml::DrawingML * m_pDrawingML
bool getDMLTextFrameSyntax() const
rtl::Reference< sax_fastparser::FastAttributeList > & getFlyAttrList()
sal_Int32 ExportRotateClockwisify(Degree100 input)
tools::Long GetRight() const
virtual void SaveData(sal_uLong nStt, sal_uLong nEnd)
Remember some of the members so that we can recurse in WriteText().
void writeDMLEffectLst(const SwFrameFormat &rFrameFormat)
OUString GetDescription() const
void addNS(sal_Int32 nNamespaceToken, sal_Int32 nToken, const OString &rValue)
const SwFormatAnchor & GetAnchor(bool=true) const
tools::Long GetWidth() const
Holds data used by DocxSdrExport only.
void setFlyAttrList(const rtl::Reference< sax_fastparser::FastAttributeList > &pFlyAttrList)
bool IsParagraphHasDrawing() const
const editeng::SvxBorderLine * GetRight() const
The class that does all the actual DOCX export-related work.
sax_fastparser::FastAttributeList * getBodyPrAttrList()
Attributes of , used during DML export of text frames.
EmbeddedObjectRef * pObject
bool getParagraphSdtOpen() const
void startDMLAnchorInline(const SwFrameFormat *pFrameFormat, const Size &rSize)
UseOnPage GetUseOn() const
rtl::Reference< sax_fastparser::FastAttributeList > & getFlyFillAttrList()
void writeDiagram(const SdrObject *sdrObject, const SwFrameFormat &rFrameFormat, int nDiagramId)
Writes a diagram (smartart).
void setDMLAndVMLDrawingOpen(bool bDMLAndVMLDrawingOpen)
static bool isTextBox(const SwFrameFormat &rFrameFormat)
Is this a standalone TextFrame, or used as a TextBox of a shape?
IDocumentDrawModelAccess const & getIDocumentDrawModelAccess() const
void writeDMLTextFrame(ww8::Frame const *pParentFrame, int nAnchorId, bool bTextBoxOnly=false)
Writes text frame in DML format.
virtual const tools::Rectangle & GetSnapRect() const
DstType sequenceToContainer(const css::uno::Sequence< SrcType > &i_Sequence)
bool getDMLAndVMLDrawingOpen() const
SvxShadowLocation GetLocation() const
bool getDMLTextFrameSyntax() const
Degree100 & getDMLandVMLTextFrameRotation()
oox::drawingml::DrawingML * getDrawingML() const
sal_uLong GetIndex() const
static bool isTextBox(const SwFrameFormat *pFormat, sal_uInt16 nType)
Is the frame format a text box?
Degree100 m_nDMLandVMLTextFrameRotation
List of TextBoxes in this document: they are exported as part of their shape, never alone...
bool m_bParagraphHasDrawing
const Size * getFlyFrameSize() const
bool HasTextBoxContent(sal_uInt32 nShapeType)
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
DocxSdrExport(DocxExport &rExport, const sax_fastparser::FSHelperPtr &pSerializer, oox::drawingml::DrawingML *pDrawingML)
void setParagraphSdtOpen(bool bParagraphSdtOpen)
const SwFrameFormat & GetFrameFormat() const
Get the writer SwFrameFormat that this object describes.
Impl(DocxExport &rExport, sax_fastparser::FSHelperPtr pSerializer, oox::drawingml::DrawingML *pDrawingML)
virtual SdrLayerID GetInvisibleHellId() const =0
const sax_fastparser::FSHelperPtr & getSerializer() const
void setParagraphHasDrawing(bool bParagraphHasDrawing)
const Color & GetColor() const
rtl::Reference< sax_fastparser::FastAttributeList > & getTextboxAttrList()
Attributes of the next v:textbox element.
const editeng::SvxBorderLine * GetTop() 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.
UNDERLYING_TYPE get() const
rtl::Reference< sax_fastparser::FastAttributeList > m_pTextboxAttrList
void setFlyWrapAttrList(sax_fastparser::FastAttributeList *pFlyWrapAttrList)
virtual void RestoreData()
Restore what was saved in SaveData().
const editeng::SvxBorderLine * GetLeft() const
rtl::Reference< sax_fastparser::FastAttributeList > & getFlyAttrList()
OStringBuffer & getTextFrameStyle()
void setFlyFrameSize(const Size *pFlyFrameSize)
const SwPageDesc & GetPageDesc(const size_t i) const
const Color & GetColor() const
ExportDataSaveRestore(DocxExport &rExport, sal_uLong nStt, sal_uLong nEnd, ww8::Frame const *pParentFrame)
bool getDrawingOpen() const
void setSerializer(const sax_fastparser::FSHelperPtr &pSerializer)
tools::Long GetLeft() const
const ww8::Frame * m_pParentFrame
tools::Long Width() const
OUString GetTitle() const
bool getTextFrameSyntax() const
OStringBuffer & getTextFrameStyle()
bool m_bDMLTextFrameSyntax
OString ConvertColor(const Color &rColor)
Marks a node in the document model.
void setDMLandVMLTextFrameRotation(Degree100 nDMLandVMLTextFrameRotation)
bool IsDMLAndVMLDrawingOpen() const
rtl::Reference< sax_fastparser::FastAttributeList > & getFlyFillAttrList()
std::shared_ptr< FastSerializerHelper > FSHelperPtr
void textFrameShadow(const SwFrameFormat &rFrameFormat)
Writes wp wrapper code around an SdrObject, which itself is written using drawingML syntax...
rtl::Reference< sax_fastparser::FastAttributeList > m_pFlyAttrList
void setFlyWrapAttrList(sax_fastparser::FastAttributeList *pAttrList)
const double * GetRelativeWidth() const
sax_fastparser::FSHelperPtr m_pSerializer
sal_Int16 GetRelativeWidthRelation() const
sax_fastparser::FastAttributeList * m_pBodyPrAttrList
virtual SdrLayerID GetHellId() const =0
const SwNodeIndex * GetContentIdx() const
void add(const FastAttributeList &)
void setParagraphSdtOpen(bool bParagraphSdtOpen)
Set if paragraph sdt open in the current drawing.
rtl::Reference< sax_fastparser::FastAttributeList > m_pDashLineStyleAttr
sal_uLong EndOfSectionIndex() const
void writeVMLTextFrame(ww8::Frame const *pParentFrame, bool bTextBoxOnly=false)
Writes text frame in VML format.
rtl::Reference< sax_fastparser::FastAttributeList > & getDashLineStyle()
void setBodyPrAttrList(sax_fastparser::FastAttributeList *pBodyPrAttrList)
iterator find(const OUString &rKey)
void writeDMLDrawing(const SdrObject *pSdrObject, const SwFrameFormat *pFrameFormat, int nAnchorId)
Writes a drawing as DML.
Make exporting a Writer Frame easy.
rtl::Reference< sax_fastparser::FastAttributeList > m_pFlyFillAttrList
Flag for checking drawing in a paragraph.
void writeOnlyTextOfFrame(ww8::Frame const *pParentFrame)
Writes text from Textbox for
void setTextFrameSyntax(bool bTextFrameSyntax)
void setTextboxAttrList(const rtl::Reference< sax_fastparser::FastAttributeList > &pTextboxAttrList)
const Size & GetSize() const
The Size of the contained element.
void writeBoxItemLine(const SvxBoxItem &rBox)
Writes the drawingML
markup of a box item.
tools::Long Height() const
sax_fastparser::FastAttributeList * getBodyPrAttrList() const
void setDMLTextFrameSyntax(bool bDMLTextFrameSyntax)
constexpr sal_Int32 FSNS(sal_Int32 namespc, sal_Int32 element)
constexpr TypedWhichId< SwFlyFrameFormat > RES_FLYFRMFMT(154)
void setSerializer(const sax_fastparser::FSHelperPtr &pSerializer)
void writeVMLDrawing(const SdrObject *sdrObj, const SwFrameFormat &rFrameFormat)
Writes a drawing as VML data.
SvxBorderLineStyle GetBorderLineStyle() const
static bool isSupportedDMLShape(const uno::Reference< drawing::XShape > &xShape)
rtl::Reference< sax_fastparser::FastAttributeList > & getTextboxAttrList()
sal_Int16 GetRelativeHeightRelation() const
#define SAL_WARN(area, stream)
virtual const tools::Rectangle & GetLogicRect() const
bool getFlyFrameGraphic() const
OStringBuffer m_aTextFrameStyle
Frame is variable in Var-direction.
bool m_bDMLAndVMLDrawingOpen
void setDrawingOpen(bool bDrawingOpen)
void setParagraphHasDrawing(bool bParagraphHasDrawing)
const editeng::SvxBorderLine * GetBottom() const
const Size * getFlyFrameSize() const
When exporting fly frames, this holds the real size of the frame.
static MSO_SPT GetCustomShapeType(const css::uno::Reference< css::drawing::XShape > &rXShape, ShapeFlag &nMirrorFlags, OUString &rShapeType, bool bOOXML=false)
std::unique_ptr< FastAttributeList > SurroundToVMLWrap(SwFormatSurround const &rSurround)
const double * GetRelativeHeight() const
rtl::Reference< sax_fastparser::FastAttributeList > & getDashLineStyleAttr()
sal_uInt16 GetUpper() const
DocxExport & getExport() const
sal_uInt16 GetWidth() const
static OString lcl_TransparencyToDrawingMlAlpha(const Color &rColor)