22#include <com/sun/star/awt/Size.hpp>
23#include <com/sun/star/container/XNamed.hpp>
24#include <com/sun/star/drawing/ColorMode.hpp>
25#include <com/sun/star/drawing/PointSequenceSequence.hpp>
26#include <com/sun/star/drawing/XShape.hpp>
27#include <com/sun/star/drawing/LineStyle.hpp>
28#include <com/sun/star/graphic/XGraphic.hpp>
29#include <com/sun/star/graphic/GraphicProvider.hpp>
30#include <com/sun/star/graphic/XGraphicProvider.hpp>
31#include <com/sun/star/io/BufferSizeExceededException.hpp>
32#include <com/sun/star/io/XInputStream.hpp>
33#include <com/sun/star/lang/XMultiServiceFactory.hpp>
34#include <com/sun/star/lang/XServiceInfo.hpp>
35#include <com/sun/star/table/BorderLine2.hpp>
36#include <com/sun/star/text/GraphicCrop.hpp>
37#include <com/sun/star/text/HoriOrientation.hpp>
38#include <com/sun/star/text/RelOrientation.hpp>
39#include <com/sun/star/text/TextContentAnchorType.hpp>
40#include <com/sun/star/text/VertOrientation.hpp>
41#include <com/sun/star/text/WrapTextMode.hpp>
42#include <com/sun/star/text/XTextContent.hpp>
43#include <com/sun/star/uno/XComponentContext.hpp>
44#include <com/sun/star/table/ShadowFormat.hpp>
52#include <rtl/ustrbuf.hxx>
54#include <rtl/math.hxx>
65#include <ooxml/resourceids.hxx>
91bool isTopGroupObj(
const uno::Reference<drawing::XShape>& xShape)
97 if (
pObject->getParentSdrObjectFromSdrObject())
100 return pObject->IsGroupObject();
109class XInputStreamHelper :
public cppu::WeakImplHelper<io::XInputStream>
115 XInputStreamHelper(
const sal_uInt8* buf,
size_t len);
117 virtual ::sal_Int32 SAL_CALL readBytes( uno::Sequence< ::sal_Int8 >& aData, ::sal_Int32 nBytesToRead )
override;
118 virtual ::sal_Int32 SAL_CALL readSomeBytes( uno::Sequence< ::sal_Int8 >& aData, ::sal_Int32 nMaxBytesToRead )
override;
119 virtual void SAL_CALL skipBytes( ::sal_Int32 nBytesToSkip )
override;
120 virtual ::sal_Int32 SAL_CALL available( )
override;
121 virtual void SAL_CALL closeInput( )
override;
126XInputStreamHelper::XInputStreamHelper(
const sal_uInt8* buf,
size_t len) :
133sal_Int32 XInputStreamHelper::readBytes( uno::Sequence<sal_Int8>& aData, sal_Int32 nBytesToRead )
135 return readSomeBytes( aData, nBytesToRead );
138sal_Int32 XInputStreamHelper::readSomeBytes( uno::Sequence<sal_Int8>& aData, sal_Int32 nMaxBytesToRead )
141 if( nMaxBytesToRead > 0 )
146 nRet = nMaxBytesToRead;
147 aData.realloc( nRet );
159void XInputStreamHelper::skipBytes( sal_Int32 nBytesToSkip )
161 if( nBytesToSkip < 0 || m_nPosition + nBytesToSkip >
m_nLength)
162 throw io::BufferSizeExceededException();
167sal_Int32 XInputStreamHelper::available( )
173void XInputStreamHelper::closeInput( )
179struct GraphicBorderLine
184 GraphicBorderLine() :
218 bool m_bPageToggle =
false;
224 bool m_bAllowOverlap =
true;
232 sal_Int32 m_nLeftMarginOrig = 0;
246 static constexpr sal_Int32 nFillColor = 0xffffffff;
250 GraphicBorderLine m_aBorders[4];
257 bool m_bDecorative =
false;
276 std::pair<OUString, OUString>& rPositionOffsets,
277 std::pair<OUString, OUString>& rAligns,
278 std::queue<OUString>& rPositivePercentages)
280 ,m_bXSizeValid(false)
282 ,m_bYSizeValid(false)
283 ,m_rGraphicImportType(rImportType)
284 ,m_rDomainMapper( rDMapper )
287 ,m_bUseSimplePos(false)
289 ,m_nHoriOrient(
text::HoriOrientation::
NONE )
290 ,m_nHoriRelation(
text::RelOrientation::
FRAME )
291 ,m_nVertOrient(
text::VertOrientation::
NONE )
292 ,m_nVertRelation(
text::RelOrientation::
FRAME )
293 ,m_nWrap(
text::WrapTextMode_NONE)
294 ,m_bLayoutInCell(true)
295 ,m_bCompatForcedLayoutInCell(false)
296 ,m_bOpaque( !rDMapper.IsInHeaderFooter() )
299 ,m_bContourOutside(true)
305 ,m_nShadowXDistance(0)
306 ,m_nShadowYDistance(0)
308 ,m_nShadowTransparence(0)
311 ,m_eColorMode( drawing::ColorMode_STANDARD )
313 ,m_bSizeProtected(false)
314 ,m_bPositionProtected(false)
316 ,m_nShapeOptionType(0)
317 ,m_rPositionOffsets(rPositionOffsets)
319 ,m_rPositivePercentages(rPositivePercentages)
326 m_bXSizeValid =
true;
336 return m_bXSizeValid;
342 m_bYSizeValid =
true;
352 return m_bYSizeValid;
389 sal_Int32 nZOrder = m_zOrder;
404 pZOrderHelper->
addItem(xGraphicObjectProperties, nZOrder);
424 catch(
const uno::Exception& )
434 if (!m_sHyperlinkURL.isEmpty())
436 xShapeProps->setPropertyValue(
445 if (m_oEffectExtentLeft)
446 aEffectExtent[
"l"] <<= *m_oEffectExtentLeft;
447 if (m_oEffectExtentTop)
448 aEffectExtent[
"t"] <<= *m_oEffectExtentTop;
449 if (m_oEffectExtentRight)
450 aEffectExtent[
"r"] <<= *m_oEffectExtentRight;
451 if (m_oEffectExtentBottom)
452 aEffectExtent[
"b"] <<= *m_oEffectExtentBottom;
453 if (!aEffectExtent.
empty())
455 return m_aInteropGrabBag;
463 std::pair<OUString, OUString>& rPositionOffsets,
464 std::pair<OUString, OUString>& rAligns,
465 std::queue<OUString>& rPositivePercentages)
471, m_xTextFactory(
std::move(xTextFactory))
481 return (com::sun::star::awt::Point(
m_pImpl->m_nLeftPosition,
m_pImpl->m_nTopPosition));
486 return m_pImpl->m_bLayoutInCell;
493 case NS_ooxml::LN_Value_wordprocessingDrawing_ST_WrapText_bothSides:
494 m_pImpl->m_nWrap = text::WrapTextMode_PARALLEL;
496 case NS_ooxml::LN_Value_wordprocessingDrawing_ST_WrapText_left:
497 m_pImpl->m_nWrap = text::WrapTextMode_LEFT;
499 case NS_ooxml::LN_Value_wordprocessingDrawing_ST_WrapText_right:
500 m_pImpl->m_nWrap = text::WrapTextMode_RIGHT;
502 case NS_ooxml::LN_Value_wordprocessingDrawing_ST_WrapText_largest:
503 m_pImpl->m_nWrap = text::WrapTextMode_DYNAMIC;
511 beans::PropertyValue aProperty;
512 aProperty.Name = sPropertyName;
513 aProperty.Value = aPropertyValue;
524 OUString aGrabBagPropName;
526 if (xServiceInfo->supportsService(
"com.sun.star.text.TextFrame"))
527 aGrabBagPropName =
"FrameInteropGrabBag";
529 aGrabBagPropName =
"InteropGrabBag";
531 if (xSetInfo->hasPropertyByName(aGrabBagPropName))
535 xSet->getPropertyValue(aGrabBagPropName) >>= aTmp;
537 aGrabBag.push_back(aProperty);
556 while (aIterator.
IsMore())
560 const sal_uInt16 nRot = nRotateAngle.
get();
561 if ((3 < nRot && nRot < 8997) || (9003 < nRot && nRot < 17997)
562 || (18003 < nRot && nRot < 26997) || (27003 < nRot && nRot < 35997))
572 sal_Int16 nAngleDeg = (nMSOAngle / 60000) % 180;
573 if (nAngleDeg < 45 || nAngleDeg >= 135)
577 (
double(
m_pImpl->getXSize()) -
double(
m_pImpl->getYSize())) / 2.0,
579 if (
m_pImpl->m_oEffectExtentLeft)
580 *
m_pImpl->m_oEffectExtentLeft += nDiff;
581 if (
m_pImpl->m_oEffectExtentRight)
582 *
m_pImpl->m_oEffectExtentRight += nDiff;
583 if (
m_pImpl->m_oEffectExtentTop)
584 *
m_pImpl->m_oEffectExtentTop -= nDiff;
585 if (
m_pImpl->m_oEffectExtentBottom)
586 *
m_pImpl->m_oEffectExtentBottom -= nDiff;
590 const sal_Int32 nMSOAngle)
595 sal_Int16 nAngleDeg = (nMSOAngle / 60000) % 180;
596 if (nAngleDeg >= 45 && nAngleDeg < 135)
599 sal_Int32 aTemp = rSize.Width - rSize.Height;
600 rLeftTop.X += aTemp / 2;
601 rLeftTop.Y -= aTemp / 2;
602 std::swap(rSize.Width, rSize.Height);
609 sal_Int32 nEffectExtent = (
m_pImpl->m_oEffectExtentLeft)
612 rLeftTop.X -= nEffectExtent;
613 rSize.Width += nEffectExtent;
614 nEffectExtent = (
m_pImpl->m_oEffectExtentRight)
617 rSize.Width += nEffectExtent;
618 nEffectExtent = (
m_pImpl->m_oEffectExtentTop)
621 rLeftTop.Y -= nEffectExtent;
622 rSize.Height += nEffectExtent;
623 nEffectExtent = (
m_pImpl->m_oEffectExtentBottom)
626 rSize.Height += nEffectExtent;
631 sal_Int32 nIntValue = rValue.
getInt();
634 case NS_ooxml::LN_OfficeArtExtension_Decorative_val:
637 case NS_ooxml::LN_CT_Hyperlink_URL:
640 case NS_ooxml::LN_blip:
645 pProperties->resolve(*
this);
649 case NS_ooxml::LN_payload :
653 pPictureData->resolve(*
this);
658 case NS_ooxml::LN_CT_Border_sz:
661 case NS_ooxml::LN_CT_Border_val:
664 case NS_ooxml::LN_CT_Border_space:
666 case NS_ooxml::LN_CT_Border_shadow:
669 case NS_ooxml::LN_CT_Border_frame:
671 case NS_ooxml::LN_CT_PositiveSize2D_cx:
672 case NS_ooxml::LN_CT_PositiveSize2D_cy:
681 if( nName == NS_ooxml::LN_CT_PositiveSize2D_cx )
687 case NS_ooxml::LN_CT_EffectExtent_l:
688 m_pImpl->m_oEffectExtentLeft = nIntValue;
690 case NS_ooxml::LN_CT_EffectExtent_t:
691 m_pImpl->m_oEffectExtentTop = nIntValue;
693 case NS_ooxml::LN_CT_EffectExtent_r:
694 m_pImpl->m_oEffectExtentRight = nIntValue;
696 case NS_ooxml::LN_CT_EffectExtent_b:
697 m_pImpl->m_oEffectExtentBottom = nIntValue;
699 case NS_ooxml::LN_CT_NonVisualDrawingProps_id:
702 case NS_ooxml::LN_CT_NonVisualDrawingProps_name:
706 case NS_ooxml::LN_CT_NonVisualDrawingProps_descr:
710 case NS_ooxml::LN_CT_NonVisualDrawingProps_title:
714 case NS_ooxml::LN_CT_NonVisualDrawingProps_hidden:
715 m_pImpl->m_bHidden = (nIntValue == 1);
717 case NS_ooxml::LN_CT_GraphicalObjectFrameLocking_noChangeAspect:
720 case NS_ooxml::LN_CT_GraphicalObjectFrameLocking_noMove:
721 m_pImpl->m_bPositionProtected =
true;
723 case NS_ooxml::LN_CT_GraphicalObjectFrameLocking_noResize:
724 m_pImpl->m_bSizeProtected =
true;
726 case NS_ooxml::LN_CT_Anchor_distT:
727 case NS_ooxml::LN_CT_Anchor_distB:
728 case NS_ooxml::LN_CT_Anchor_distL:
729 case NS_ooxml::LN_CT_Anchor_distR:
731 m_pImpl->m_nShapeOptionType = nName;
735 case NS_ooxml::LN_CT_Anchor_simplePos_attr:
736 m_pImpl->m_bUseSimplePos = nIntValue > 0;
738 case NS_ooxml::LN_CT_Anchor_relativeHeight:
741 case NS_ooxml::LN_CT_Anchor_behindDoc:
748 case NS_ooxml::LN_CT_Anchor_locked:
750 case NS_ooxml::LN_CT_Anchor_layoutInCell:
752 m_pImpl->m_bCompatForcedLayoutInCell = !nIntValue
753 &&
m_pImpl->m_rDomainMapper.GetSettingsTable()->GetWordCompatibilityMode() > 14
754 &&
m_pImpl->m_rDomainMapper.IsInTable();
755 m_pImpl->m_bLayoutInCell =
m_pImpl->m_bCompatForcedLayoutInCell || nIntValue;
757 case NS_ooxml::LN_CT_Anchor_hidden:
759 case NS_ooxml::LN_CT_Anchor_allowOverlap:
760 m_pImpl->m_bAllowOverlap = nIntValue != 0;
762 case NS_ooxml::LN_CT_Anchor_wp14_anchorId:
763 case NS_ooxml::LN_CT_Inline_wp14_anchorId:
765 OUStringBuffer
aBuffer = OUString::number(nIntValue, 16);
766 OUStringBuffer aString;
768 aString.append(
aBuffer.getStr());
769 m_pImpl->m_sAnchorId = aString.makeStringAndClear().toAsciiUpperCase();
772 case NS_ooxml::LN_CT_Point2D_x:
774 m_pImpl->m_nHoriRelation = text::RelOrientation::PAGE_FRAME;
777 case NS_ooxml::LN_CT_Point2D_y:
779 m_pImpl->m_nVertRelation = text::RelOrientation::PAGE_FRAME;
782 case NS_ooxml::LN_CT_WrapTight_wrapText:
784 m_pImpl->m_bContourOutside =
true;
789 case NS_ooxml::LN_CT_WrapThrough_wrapText:
791 m_pImpl->m_bContourOutside =
false;
796 case NS_ooxml::LN_CT_WrapSquare_wrapText:
799 case NS_ooxml::LN_shape:
802 rValue.
getAny( ) >>= xShape;
806 bool bUseShape =
true;
810 ( xShape, uno::UNO_QUERY_THROW );
813 xShapeProps->getPropertyValue(
"Graphic") >>= xGraphic;
815 sal_Int32 nRotation = 0;
816 xShapeProps->getPropertyValue(
"RotateAngle") >>= nRotation;
818 css::beans::PropertyValues aGrabBag;
819 xShapeProps->getPropertyValue(
"InteropGrabBag") >>= aGrabBag;
822 bool bContainsEffects = std::any_of(std::cbegin(aGrabBag), std::cend(aGrabBag), [](
const auto& rProp) {
823 return rProp.Name ==
"EffectProperties"
824 || rProp.Name ==
"3DEffectProperties"
825 || rProp.Name ==
"ArtisticEffectProperties";
828 xShapeProps->getPropertyValue(
"Shadow") >>=
m_pImpl->m_bShadow;
831 xShapeProps->getPropertyValue(
"ShadowXDistance") >>=
m_pImpl->m_nShadowXDistance;
832 xShapeProps->getPropertyValue(
"ShadowYDistance") >>=
m_pImpl->m_nShadowYDistance;
833 xShapeProps->getPropertyValue(
"ShadowColor") >>=
m_pImpl->m_nShadowColor;
834 xShapeProps->getPropertyValue(
"ShadowTransparence") >>=
m_pImpl->m_nShadowTransparence;
837 xShapeProps->getPropertyValue(
"GraphicColorMode") >>=
m_pImpl->m_eColorMode;
838 xShapeProps->getPropertyValue(
"AdjustLuminance") >>=
m_pImpl->m_nBrightness;
839 xShapeProps->getPropertyValue(
"AdjustContrast") >>=
m_pImpl->m_nContrast;
842 if ( nRotation == 0 && !bContainsEffects )
852 awt::Size aSize = xShape->getSize( );
853 xGraphProps->setPropertyValue(
"Height",
855 xGraphProps->setPropertyValue(
"Width",
858 text::GraphicCrop aGraphicCrop( 0, 0, 0, 0 );
860 uno::Any aAny = xSourceGraphProps->getPropertyValue(
"GraphicCrop");
861 if(aAny >>= aGraphicCrop) {
862 xGraphProps->setPropertyValue(
"GraphicCrop",
868 xShapeComponent->dispose( );
871 catch(
const beans::UnknownPropertyException & )
885 xShapeProps->setPropertyValue
888 (text::TextContentAnchorType_AS_CHARACTER));
892 xShapeProps->setPropertyValue(
"Opaque",
uno::Any(
true));
899 bool bKeepRotation =
false;
900 if (!xServiceInfo->supportsService(
"com.sun.star.text.TextFrame"))
902 bKeepRotation =
true;
903 xShapeProps->setPropertyValue
906 (
m_pImpl->m_rDomainMapper.GetCurrentTextRange()));
909 awt::Size aSize(
m_xShape->getSize());
926 sal_Int32 nOOXAngle(0);
927 aInteropGrabBag.
getValue(
"mso-rotation-angle") >>= nOOXAngle;
932 const bool bIsDiagram(
nullptr != pDiagramCandidate && pDiagramCandidate->
isDiagram());
935 bool bIsLockedCanvas(
false);
936 aInteropGrabBag.
getValue(
"LockedCanvas") >>= bIsLockedCanvas;
937 const bool bIsGroupOrLine = (xServiceInfo->supportsService(
"com.sun.star.drawing.GroupShape")
938 && !bIsDiagram && !bIsLockedCanvas)
939 || xServiceInfo->supportsService(
"com.sun.star.drawing.LineShape");
945 aSize.Width =
m_pImpl->getXSize();
947 aSize.Height =
m_pImpl->getYSize();
962 xShapeProps->setPropertyValue(
"RotateAngle",
uno::Any(nRotation.
get()));
967 if (!
m_pImpl->m_sAnchorId.isEmpty())
973 awt::Size aImportSize(
m_xShape->getSize());
975 aImportSize.Width =
m_pImpl->getXSize();
977 aImportSize.Height =
m_pImpl->getYSize();
979 double fCentrumX = aImportPosition.X + aImportSize.Width / 2.0;
980 double fCentrumY = aImportPosition.Y + aImportSize.Height / 2.0;
986 awt::Size aLOSize(
m_xShape->getSize());
987 if (bIsGroupOrLine && !(
m_pImpl->mpWrapPolygon))
1000 m_pImpl->m_nLeftPosition = fCentrumX - aLOSize.Width / 2.0;
1001 m_pImpl->m_nTopPosition = fCentrumY - aLOSize.Height / 2.0;
1014 if (
m_pImpl->m_rDomainMapper.GetSettingsTable()->GetWordCompatibilityMode() < 14
1015 && xServiceInfo->supportsService(
"com.sun.star.drawing.GraphicObjectShape")
1027 sal_Int32 nEffectExtent = (
m_pImpl->m_oEffectExtentLeft)
1030 m_pImpl->m_nLeftMargin += nEffectExtent;
1031 nEffectExtent = (
m_pImpl->m_oEffectExtentRight)
1033 m_pImpl->m_nRightMargin += nEffectExtent;
1034 nEffectExtent = (
m_pImpl->m_oEffectExtentTop)
1036 m_pImpl->m_nTopMargin += nEffectExtent;
1037 nEffectExtent = (
m_pImpl->m_oEffectExtentBottom)
1039 m_pImpl->m_nBottomMargin += nEffectExtent;
1046 awt::Point aMSOBaseLeftTop = aImportPosition;
1047 awt::Size aMSOBaseSize = aImportSize;
1052 awt::Rectangle aLOSnapRect;
1054 aLOSnapRect.X =
m_pImpl->m_nLeftPosition;
1055 aLOSnapRect.Y =
m_pImpl->m_nTopPosition;
1056 aLOSnapRect.Width = aLOSize.Width;
1057 aLOSnapRect.Height = aLOSize.Height;
1067 m_pImpl->m_nLeftMargin += aLOSnapRect.X - aMSOBaseLeftTop.X;
1068 m_pImpl->m_nRightMargin += aMSOBaseLeftTop.X + aMSOBaseSize.Width
1069 - (aLOSnapRect.X + aLOSnapRect.Width);
1070 m_pImpl->m_nTopMargin += aLOSnapRect.Y - aMSOBaseLeftTop.Y;
1071 m_pImpl->m_nBottomMargin += aMSOBaseLeftTop.Y + aMSOBaseSize.Height
1072 - (aLOSnapRect.Y + aLOSnapRect.Height);
1077 else if ((
m_pImpl->m_nWrap == text::WrapTextMode_PARALLEL
1078 ||
m_pImpl->m_nWrap == text::WrapTextMode_DYNAMIC
1079 ||
m_pImpl->m_nWrap == text::WrapTextMode_LEFT
1080 ||
m_pImpl->m_nWrap == text::WrapTextMode_RIGHT
1081 ||
m_pImpl->m_nWrap == text::WrapTextMode_NONE)
1082 && !(
m_pImpl->mpWrapPolygon) && !bIsDiagram)
1088 awt::Point aMSOBaseLeftTop = aImportPosition;
1089 awt::Size aMSOBaseSize = aImportSize;
1094 awt::Rectangle aLOBoundRect;
1096 aLOBoundRect.X =
m_pImpl->m_nLeftPosition;
1097 aLOBoundRect.Y =
m_pImpl->m_nTopPosition;
1098 aLOBoundRect.Width = aLOSize.Width;
1099 aLOBoundRect.Height = aLOSize.Height;
1109 m_pImpl->m_nLeftMargin += aLOBoundRect.X - aMSOBaseLeftTop.X;
1110 m_pImpl->m_nRightMargin += aMSOBaseLeftTop.X + aMSOBaseSize.Width
1111 - (aLOBoundRect.X + aLOBoundRect.Width);
1112 m_pImpl->m_nTopMargin += aLOBoundRect.Y - aMSOBaseLeftTop.Y;
1113 m_pImpl->m_nBottomMargin += aMSOBaseLeftTop.Y + aMSOBaseSize.Height
1114 - (aLOBoundRect.Y + aLOBoundRect.Height);
1116 else if (
m_pImpl->mpWrapPolygon && !bIsDiagram)
1125 const drawing::PointSequenceSequence aWrapPolygon
1126 =
m_pImpl->mpWrapPolygon->getPointSequenceSequence();
1133 aImportSize.Width / 21600.0, aImportSize.Height / 21600.0);
1140 aImportSize.Width / 2.0, aImportSize.Height / 2.0,
1141 basegfx::deg2rad<60000>(nOOXAngle));
1157 -aImportPosition.X, -aImportPosition.Y);
1168 basegfx::deg2rad<60000>(nOOXAngle));
1177 const double fTopDiff = aShapeRange.
getMinY() - aB2DWrapRange.
getMinY();
1182 const double fBottomDiff = aB2DWrapRange.
getMaxY() - aShapeRange.
getMaxY();
1187 const double fLeftDiff = aShapeRange.
getMinX() - aB2DWrapRange.
getMinX();
1192 const double fRightDiff = aB2DWrapRange.
getMaxX() - aShapeRange.
getMaxX();
1197 m_pImpl->m_aInteropGrabBag[
"AnchorDistDiff"]
1201 if (
m_pImpl->m_nLeftMargin < 0)
1203 if (
m_pImpl->m_nRightMargin < 0)
1206 else if (!bIsDiagram)
1211 if (
m_pImpl->m_oEffectExtentLeft)
1216 if (
m_pImpl->m_oEffectExtentTop)
1221 if (
m_pImpl->m_oEffectExtentRight)
1226 if (
m_pImpl->m_oEffectExtentBottom)
1235 if (
m_pImpl->m_nTopMargin < 0)
1237 if (
m_pImpl->m_nBottomMargin < 0)
1251 m_pImpl->m_bLayoutInCell =
false;
1255 text::TextContentAnchorType eAnchorType = text::TextContentAnchorType_AT_CHARACTER;
1259 xShapeProps->setPropertyValue(
"Visible",
uno::Any(
false));
1260 xShapeProps->setPropertyValue(
"Printable",
uno::Any(
false));
1264 bool bTextBox =
false;
1265 xShapeProps->getPropertyValue(
"TextBox") >>= bTextBox;
1272 if (
m_pImpl->m_bLayoutInCell && bTextBox)
1273 m_pImpl->m_bLayoutInCell = !
m_pImpl->m_bCompatForcedLayoutInCell;
1275 xShapeProps->setPropertyValue(
"AnchorType",
uno::Any(eAnchorType));
1277 if (
m_pImpl->m_nVertRelation == text::RelOrientation::TEXT_LINE)
1282 awt::Point aPoint = xShape->getPosition();
1284 xShape->setPosition(aPoint);
1287 if (
m_pImpl->m_bLayoutInCell && bTextBox &&
m_pImpl->m_rDomainMapper.IsInTable()
1288 &&
m_pImpl->m_nHoriRelation == text::RelOrientation::PAGE_FRAME)
1290 if(
m_pImpl->m_rDomainMapper.IsInTable())
1294 m_pImpl->applyPosition(xShapeProps);
1297 if (xServiceInfo->supportsService(
"com.sun.star.drawing.GroupShape") ||
1298 xServiceInfo->supportsService(
"com.sun.star.drawing.GraphicObjectShape"))
1306 sal_Int32 nRotation = 0;
1307 if (xServiceInfo->supportsService(
"com.sun.star.drawing.GraphicObjectShape"))
1309 xShapeProps->getPropertyValue(
"RotateAngle") >>= nRotation;
1312 xShapeProps->setPropertyValue(
"RotateAngle",
uno::Any(sal_Int32(0)));
1320 ||
m_pImpl->m_nHoriRelation != text::RelOrientation::PAGE_FRAME
1321 ||
m_pImpl->m_nVertRelation != text::RelOrientation::PAGE_FRAME)
1326 xShapeProps->setPropertyValue(
"RotateAngle",
uno::Any(nRotation));
1330 m_pImpl->applyRelativePosition(xShapeProps,
true);
1332 xShapeProps->setPropertyValue(
"SurroundContour",
uno::Any(
m_pImpl->m_bContour));
1333 xShapeProps->setPropertyValue(
"ContourOutside",
uno::Any(
m_pImpl->m_bContourOutside));
1334 m_pImpl->applyMargins(xShapeProps);
1335 xShapeProps->setPropertyValue(
"Opaque",
uno::Any(
m_pImpl->m_bOpaque));
1336 xShapeProps->setPropertyValue(
"Surround",
uno::Any(
static_cast<sal_Int32
>(
m_pImpl->m_nWrap)));
1337 m_pImpl->applyZOrder(xShapeProps);
1338 m_pImpl->applyName(xShapeProps);
1339 m_pImpl->applyHyperlink(xShapeProps, bUseShape);
1340 xShapeProps->setPropertyValue(
"AllowOverlap",
1351 m_pImpl->applyMargins(xShapeProps);
1352 m_pImpl->applyZOrder(xShapeProps);
1353 m_pImpl->applyName(xShapeProps);
1361 case NS_ooxml::LN_CT_Inline_distT:
1364 case NS_ooxml::LN_CT_Inline_distB:
1367 case NS_ooxml::LN_CT_Inline_distL:
1370 case NS_ooxml::LN_CT_Inline_distR:
1373 case NS_ooxml::LN_CT_GraphicalObjectData_uri:
1377 case NS_ooxml::LN_CT_SizeRelH_relativeFrom:
1381 case NS_ooxml::LN_ST_SizeRelFromH_margin:
1388 case NS_ooxml::LN_ST_SizeRelFromH_leftMargin:
1389 case NS_ooxml::LN_ST_SizeRelFromH_outsideMargin:
1396 xPropertySet->setPropertyValue(
"RelativeWidthRelation",
uno::Any(text::RelOrientation::PAGE_LEFT));
1399 case NS_ooxml::LN_ST_SizeRelFromH_rightMargin:
1400 case NS_ooxml::LN_ST_SizeRelFromH_insideMargin:
1405 xPropertySet->setPropertyValue(
"RelativeWidthRelation",
uno::Any(text::RelOrientation::PAGE_RIGHT));
1408 case NS_ooxml::LN_ST_SizeRelFromH_page:
1412 xPropertySet->setPropertyValue(
"RelativeWidthRelation",
uno::Any(text::RelOrientation::PAGE_FRAME));
1416 SAL_WARN(
"writerfilter",
"GraphicImport::lcl_attribute: unhandled NS_ooxml::LN_CT_SizeRelH_relativeFrom value: " << nIntValue);
1421 case NS_ooxml::LN_CT_SizeRelV_relativeFrom:
1425 case NS_ooxml::LN_ST_SizeRelFromV_margin:
1432 case NS_ooxml::LN_ST_SizeRelFromV_page:
1436 xPropertySet->setPropertyValue(
"RelativeHeightRelation",
uno::Any(text::RelOrientation::PAGE_FRAME));
1439 case NS_ooxml::LN_ST_SizeRelFromV_topMargin:
1443 xPropertySet->setPropertyValue(
"RelativeHeightRelation",
uno::Any(text::RelOrientation::PAGE_PRINT_AREA));
1446 case NS_ooxml::LN_ST_SizeRelFromV_bottomMargin:
1450 xPropertySet->setPropertyValue(
"RelativeHeightRelation",
uno::Any(text::RelOrientation::PAGE_PRINT_AREA_BOTTOM));
1454 SAL_WARN(
"writerfilter",
"GraphicImport::lcl_attribute: unhandled NS_ooxml::LN_CT_SizeRelV_relativeFrom value: " << nIntValue);
1475 xResult.set(
m_xShape, uno::UNO_QUERY_THROW);
1484 sal_Int32 nIntValue = rValue.
getInt();
1485 switch(
m_pImpl->m_nShapeOptionType )
1487 case NS_ooxml::LN_CT_Anchor_distL:
1488 m_pImpl->m_nLeftMargin = nIntValue / 360;
1491 case NS_ooxml::LN_CT_Anchor_distT:
1493 m_pImpl->m_nTopMargin = nIntValue / 360;
1495 case NS_ooxml::LN_CT_Anchor_distR:
1497 m_pImpl->m_nRightMargin = nIntValue / 360;
1499 case NS_ooxml::LN_CT_Anchor_distB:
1501 m_pImpl->m_nBottomMargin = nIntValue / 360;
1504 OSL_FAIL(
"shape option unsupported?");
1511 sal_uInt32 nSprmId = rSprm.
getId();
1515 case NS_ooxml::LN_CT_Inline_extent:
1516 case NS_ooxml::LN_CT_Inline_effectExtent:
1517 case NS_ooxml::LN_CT_Inline_docPr:
1518 case NS_ooxml::LN_CT_Inline_cNvGraphicFramePr:
1519 case NS_ooxml::LN_CT_NonVisualGraphicFrameProperties_graphicFrameLocks:
1520 case NS_ooxml::LN_CT_Inline_a_graphic:
1521 case NS_ooxml::LN_CT_Anchor_simplePos_elem:
1522 case NS_ooxml::LN_CT_Anchor_extent:
1523 case NS_ooxml::LN_CT_Anchor_effectExtent:
1524 case NS_ooxml::LN_EG_WrapType_wrapSquare:
1525 case NS_ooxml::LN_EG_WrapType_wrapTight:
1526 case NS_ooxml::LN_EG_WrapType_wrapThrough:
1527 case NS_ooxml::LN_CT_Anchor_docPr:
1528 case NS_ooxml::LN_CT_NonVisualDrawingProps_extLst:
1529 case NS_ooxml::LN_CT_Anchor_cNvGraphicFramePr:
1530 case NS_ooxml::LN_CT_Anchor_a_graphic:
1531 case NS_ooxml::LN_CT_WrapPath_start:
1532 case NS_ooxml::LN_CT_WrapPath_lineTo:
1533 case NS_ooxml::LN_graphic_graphic:
1534 case NS_ooxml::LN_pic_pic:
1535 case NS_ooxml::LN_dgm_relIds:
1536 case NS_ooxml::LN_lc_lockedCanvas:
1537 case NS_ooxml::LN_c_chart:
1538 case NS_ooxml::LN_wps_wsp:
1539 case NS_ooxml::LN_wpg_wgp:
1540 case NS_ooxml::LN_sizeRelH_sizeRelH:
1541 case NS_ooxml::LN_sizeRelV_sizeRelV:
1542 case NS_ooxml::LN_hlinkClick_hlinkClick:
1547 pProperties->resolve(*
this);
1551 if (nSprmId == NS_ooxml::LN_EG_WrapType_wrapTight)
1552 m_pImpl->m_aInteropGrabBag[
"EG_WrapType"] <<= OUString(
"wrapTight");
1553 else if (nSprmId == NS_ooxml::LN_EG_WrapType_wrapThrough)
1554 m_pImpl->m_aInteropGrabBag[
"EG_WrapType"] <<= OUString(
"wrapThrough");
1558 case NS_ooxml::LN_EG_WrapType_wrapSquare:
1559 case NS_ooxml::LN_EG_WrapType_wrapThrough:
1560 case NS_ooxml::LN_EG_WrapType_wrapTight:
1563 if (
m_pImpl->m_bBehindDoc &&
m_pImpl->m_rDomainMapper.GetSettingsTable()->GetWordCompatibilityMode() > 14)
1571 case NS_ooxml::LN_CT_WrapTight_wrapPolygon:
1572 case NS_ooxml::LN_CT_WrapThrough_wrapPolygon:
1581 m_pImpl->m_aInteropGrabBag[
"CT_WrapPath"] <<=
m_pImpl->mpWrapPolygon->getPointSequenceSequence();
1584 case NS_ooxml::LN_CT_Anchor_positionH:
1587 auto pHandler = std::make_shared<PositionHandler>(
m_pImpl->m_rPositionOffsets,
m_pImpl->m_rAligns );
1591 pProperties->resolve( *pHandler );
1592 if( !
m_pImpl->m_bUseSimplePos )
1594 m_pImpl->m_nHoriRelation = pHandler->relation();
1595 m_pImpl->m_bPageToggle = pHandler->GetPageToggle();
1596 m_pImpl->m_nHoriOrient = pHandler->orientation();
1597 m_pImpl->m_nLeftPosition = pHandler->position();
1601 if (
m_pImpl->m_nHoriOrient == text::HoriOrientation::LEFT)
1603 if (
m_pImpl->m_nHoriRelation == text::RelOrientation::PAGE_PRINT_AREA)
1612 case NS_ooxml::LN_CT_Anchor_positionV:
1615 auto pHandler = std::make_shared<PositionHandler>(
m_pImpl->m_rPositionOffsets,
m_pImpl->m_rAligns);
1619 pProperties->resolve( *pHandler );
1620 if( !
m_pImpl->m_bUseSimplePos )
1622 m_pImpl->m_nVertRelation = pHandler->relation();
1623 m_pImpl->m_nVertOrient = pHandler->orientation();
1624 m_pImpl->m_nTopPosition = pHandler->position();
1629 case NS_ooxml::LN_CT_SizeRelH_pctWidth:
1630 case NS_ooxml::LN_CT_SizeRelV_pctHeight:
1631 if (
m_pImpl->m_rPositivePercentages.empty())
1638 if (nPositivePercentage)
1641 OUString aProperty = nSprmId == NS_ooxml::LN_CT_SizeRelH_pctWidth ? OUString(
"RelativeWidth") : OUString(
"RelativeHeight");
1643 sal_Int32 nTextPreRotateAngle = 0;
1645 if (xPropertySet->getPropertySetInfo()->hasPropertyByName(
1646 "CustomShapeGeometry"))
1648 aAny = xPropertySet->getPropertyValue(
"CustomShapeGeometry");
1651 auto it = aCustomShapeGeometry.
find(
"TextPreRotateAngle");
1652 if (it != aCustomShapeGeometry.
end())
1654 nTextPreRotateAngle = it->second.get<sal_Int32>();
1656 if (nTextPreRotateAngle == 0)
1658 xPropertySet->setPropertyValue(aProperty,
1666 m_pImpl->m_rPositivePercentages.pop();
1668 case NS_ooxml::LN_EG_WrapType_wrapNone:
1670 m_pImpl->m_nWrap = text::WrapTextMode_THROUGH;
1679 case NS_ooxml::LN_EG_WrapType_wrapTopAndBottom:
1681 if (
m_pImpl->m_bBehindDoc &&
m_pImpl->m_rDomainMapper.GetSettingsTable()->GetWordCompatibilityMode() > 14)
1683 m_pImpl->m_nWrap = text::WrapTextMode_NONE;
1685 case NS_ooxml::LN_CT_GraphicalObject_graphicData:
1694 case NS_ooxml::LN_CT_NonVisualDrawingProps_a_hlinkClick:
1698 pProperties->resolve( *
this );
1702 SAL_WARN(
"writerfilter",
"GraphicImport::lcl_sprm: unhandled token: " << nSprmId);
1720 m_xTextFactory->createInstance(
"com.sun.star.text.TextGraphicObject"),
1721 uno::UNO_QUERY_THROW);
1725 text::TextContentAnchorType_AT_CHARACTER :
1726 text::TextContentAnchorType_AS_CHARACTER ));
1727 xGraphicObject.set( xGraphicObjectProperties, uno::UNO_QUERY_THROW );
1730 table::BorderLine2 aBorderLine;
1731 GraphicBorderLine& rBorderLine =
m_pImpl->m_aBorders[0];
1732 if (rBorderLine.isEmpty() && xShapeProps.is() && xShapeProps->getPropertyValue(
"LineStyle").get<drawing::LineStyle>() != drawing::LineStyle_NONE)
1737 aBorderLine.Color = xShapeProps->getPropertyValue(
"LineColor").get<sal_Int32>();
1738 aBorderLine.LineWidth = xShapeProps->getPropertyValue(
"LineWidth").get<sal_Int32>();
1742 aBorderLine.Color = 0;
1743 aBorderLine.InnerLineWidth = 0;
1744 aBorderLine.OuterLineWidth =
static_cast<sal_Int16
>(rBorderLine.nLineWidth);
1745 aBorderLine.LineDistance = 0;
1755 for(
PropertyIds const & rBorderProp : aBorderProps)
1762 table::ShadowFormat aShadow;
1763 sal_uInt32 nShadowColor =
m_pImpl->m_nShadowColor & 0x00FFFFFF;
1764 sal_Int32 nShadowWidth = (
abs(
m_pImpl->m_nShadowXDistance)
1767 aShadow.ShadowWidth = nShadowWidth;
1768 sal_uInt8 nShadowTransparence = float(
m_pImpl->m_nShadowTransparence) * 2.55;
1769 nShadowColor |= (nShadowTransparence << 24);
1770 aShadow.Color = nShadowColor;
1772 if (
m_pImpl->m_nShadowXDistance > 0)
1774 if (
m_pImpl->m_nShadowYDistance > 0)
1775 aShadow.Location = table::ShadowLocation_BOTTOM_RIGHT;
1777 aShadow.Location = table::ShadowLocation_TOP_RIGHT;
1781 if (
m_pImpl->m_nShadowYDistance > 0)
1782 aShadow.Location = table::ShadowLocation_BOTTOM_LEFT;
1784 aShadow.Location = table::ShadowLocation_TOP_LEFT;
1791 if(
m_pImpl->m_bPositionProtected )
1794 if(
m_pImpl->m_bSizeProtected )
1799 sal_Int32 nWidth = -
m_pImpl->m_nLeftPosition;
1803 if( (
m_pImpl->m_nHoriOrient == text::HoriOrientation::LEFT &&
1804 (
m_pImpl->m_nHoriRelation == text::RelOrientation::PAGE_PRINT_AREA ||
1806 (
m_pImpl->m_nHoriOrient == text::HoriOrientation::INSIDE &&
1807 m_pImpl->m_nHoriRelation == text::RelOrientation::PAGE_PRINT_AREA ))
1809 if((
m_pImpl->m_nHoriOrient == text::HoriOrientation::RIGHT &&
1810 (
m_pImpl->m_nHoriRelation == text::RelOrientation::PAGE_PRINT_AREA ||
1812 (
m_pImpl->m_nHoriOrient == text::HoriOrientation::INSIDE &&
1813 m_pImpl->m_nHoriRelation == text::RelOrientation::PAGE_PRINT_AREA ))
1816 if(
m_pImpl->m_nVertOrient == text::VertOrientation::TOP &&
1817 (
m_pImpl->m_nVertRelation == text::RelOrientation::PAGE_PRINT_AREA ||
1818 m_pImpl->m_nVertRelation == text::RelOrientation::PAGE_FRAME))
1820 if(
m_pImpl->m_nVertOrient == text::VertOrientation::BOTTOM &&
1821 (
m_pImpl->m_nVertRelation == text::RelOrientation::PAGE_PRINT_AREA ||
1822 m_pImpl->m_nVertRelation == text::RelOrientation::PAGE_FRAME))
1824 if(
m_pImpl->m_nVertOrient == text::VertOrientation::BOTTOM &&
1825 m_pImpl->m_nVertRelation == text::RelOrientation::PAGE_PRINT_AREA )
1828 if(
m_pImpl->m_nHoriOrient == text::HoriOrientation::INSIDE &&
1829 m_pImpl->m_nHoriRelation == text::RelOrientation::PAGE_FRAME )
1833 m_pImpl->m_nHoriRelation = text::RelOrientation::PAGE_PRINT_AREA;
1834 m_pImpl->m_nLeftPosition = - nWidth;
1836 else if(
m_pImpl->m_nHoriOrient == text::HoriOrientation::OUTSIDE &&
1837 m_pImpl->m_nHoriRelation == text::RelOrientation::PAGE_FRAME )
1841 m_pImpl->m_nHoriRelation = text::RelOrientation::PAGE_RIGHT;
1845 m_pImpl->applyPosition(xGraphicObjectProperties);
1846 m_pImpl->applyRelativePosition(xGraphicObjectProperties);
1853 if(
m_pImpl->m_rDomainMapper.IsInTable())
1864 m_pImpl->applyMargins(xGraphicObjectProperties);
1871 if(
m_pImpl->m_eColorMode != drawing::ColorMode_STANDARD)
1878 uno::Any( GraphicImport_Impl::nFillColor ));
1879 m_pImpl->applyZOrder(xGraphicObjectProperties);
1887 awt::Size aGraphicSize;
1890 if (aGraphicSize.Width && aGraphicSize.Height)
1892 pCorrected =
m_pImpl->mpWrapPolygon->correctWordWrapPolygon(aGraphicSize);
1897 if (aGraphicSize.Width && aGraphicSize.Height)
1899 pCorrected =
m_pImpl->mpWrapPolygon->correctWordWrapPolygonPixel(aGraphicSize);
1903 text::GraphicCrop aGraphicCrop;
1904 xShapeProps->getPropertyValue(
"GraphicCrop") >>= aGraphicCrop;
1905 if (aGraphicCrop.Top != 0 || aGraphicCrop.Bottom != 0 || aGraphicCrop.Left != 0
1906 || aGraphicCrop.Right != 0)
1910 pCorrected = pCorrected->correctCrop(aGraphicSize, aGraphicCrop);
1915 aContourPolyPolygon <<= pCorrected->getPointSequenceSequence();
1917 aContourPolyPolygon);
1921 xGraphicObjectProperties->setPropertyValue(
"Opaque",
uno::Any(
true));
1932 m_pImpl->applyMargins(xGraphicObjectProperties);
1933 m_pImpl->applyName(xGraphicObjectProperties);
1934 m_pImpl->applyHyperlink(xGraphicObjectProperties,
false);
1938 bool bMirrored =
false;
1939 xShapeProps->getPropertyValue(
"IsMirrored") >>= bMirrored;
1942 xGraphicObjectProperties->setPropertyValue(
"HoriMirroredOnEvenPages",
1944 xGraphicObjectProperties->setPropertyValue(
"HoriMirroredOnOddPages",
1949 catch(
const uno::Exception& )
1953 return xGraphicObject;
1966 m_xGraphicObject = createGraphicObject(xGraphic, xPropertySet);
1970void GraphicImport::lcl_startSectionGroup()
1975void GraphicImport::lcl_endSectionGroup()
1980void GraphicImport::lcl_startParagraphGroup()
1985void GraphicImport::lcl_endParagraphGroup()
1990void GraphicImport::lcl_startCharacterGroup()
1995void GraphicImport::lcl_endCharacterGroup()
2028void GraphicImport::lcl_endShape( )
2032bool GraphicImport::IsGraphic()
const
2037sal_Int32 GraphicImport::GetLeftMarginOrig()
const
2039 return m_pImpl->m_nLeftMarginOrig;
const sal_uInt8 * m_pBuffer
const sal_Int32 m_nLength
static SdrObject * getSdrObjectFromXShape(const css::uno::Reference< css::uno::XInterface > &xInt)
virtual Degree100 GetRotateAngle() const
virtual basegfx::B2DPolyPolygon TakeXorPoly() const
virtual SdrObjList * GetSubList() const
virtual const tools::Rectangle & GetCurrentBoundRect() const
virtual const tools::Rectangle & GetSnapRect() const
bool IsGroupObject() const
void transform(const basegfx::B2DHomMatrix &rMatrix)
B2DRange getB2DRange() const
BASEGFX_DLLPUBLIC void transform(const B2DHomMatrix &rMatrix)
iterator find(const OUString &rKey)
css::uno::Any getValue(const OUString &sKey) const
css::uno::Sequence< css::beans::PropertyValue > getAsConstPropertyValueList() const
void update(const SequenceAsHashMap &rSource)
virtual void resolve(T &rHandler)=0
Resolves the reference.
An SPRM: Section, Paragraph and Run Modifier.
virtual sal_uInt32 getId() const =0
Returns id of the SPRM.
virtual writerfilter::Reference< Properties >::Pointer_t getProps()=0
Returns reference to properties contained in the SPRM.
static TagLogger & getInstance()
void element(const std::string &name)
virtual writerfilter::Reference< Properties >::Pointer_t getProperties()=0
Returns properties of this value.
virtual writerfilter::Reference< BinaryObj >::Pointer_t getBinary()=0
Returns binary object of this value.
virtual int getInt() const =0
Returns integer representation of the value.
virtual OUString getString() const =0
Returns string representation of the value.
virtual css::uno::Any getAny() const =0
Returns representation of the value as uno::Any.
GraphicZOrderHelper * graphicZOrderHelper()
bool IsInHeaderFooter() const
DomainMapper & m_rDomainMapper
sal_Int32 m_nLeftPosition
std::pair< OUString, OUString > & m_rAligns
comphelper::SequenceAsHashMap const & getInteropGrabBag()
Getter for m_aInteropGrabBag, but also merges in the values from other members if they are set.
bool m_bCompatForcedLayoutInCell
void applyRelativePosition(const uno::Reference< beans::XPropertySet > &xGraphicObjectProperties, bool bRelativeOnly=false) const
void applyZOrder(uno::Reference< beans::XPropertySet > const &xGraphicObjectProperties) const
sal_Int32 m_nShapeOptionType
sal_Int32 m_nBottomMargin
GraphicImportType & m_rGraphicImportType
void setYSize(sal_Int32 _nYSize)
std::queue< OUString > & m_rPositivePercentages
sal_Int32 m_nShadowTransparence
text::WrapTextMode m_nWrap
sal_uInt32 getYSize() const
GraphicImport_Impl(GraphicImportType &rImportType, DomainMapper &rDMapper, std::pair< OUString, OUString > &rPositionOffsets, std::pair< OUString, OUString > &rAligns, std::queue< OUString > &rPositivePercentages)
std::pair< OUString, OUString > & m_rPositionOffsets
sal_Int32 m_nShadowYDistance
sal_Int32 m_nShadowXDistance
void applyPosition(const uno::Reference< beans::XPropertySet > &xGraphicObjectProperties) const
std::optional< sal_Int32 > m_oEffectExtentBottom
std::optional< sal_Int32 > m_oEffectExtentTop
WrapPolygon::Pointer_t mpWrapPolygon
bool isXSizeValid() const
void applyName(uno::Reference< beans::XPropertySet > const &xGraphicObjectProperties) const
drawing::ColorMode m_eColorMode
sal_uInt32 getXSize() const
bool isYSizeValid() const
std::optional< sal_Int32 > m_oEffectExtentLeft
OUString m_sAlternativeText
std::optional< sal_Int32 > m_oEffectExtentRight
comphelper::SequenceAsHashMap m_aInteropGrabBag
sal_Int16 m_nVertRelation
sal_Int16 m_nHoriRelation
void applyHyperlink(uno::Reference< beans::XPropertySet > const &xShapeProps, bool bIsShape)
bool m_bPositionProtected
void setXSize(sal_Int32 _nXSize)
void applyMargins(const uno::Reference< beans::XPropertySet > &xGraphicObjectProperties) const
virtual ~GraphicImport() override
std::unique_ptr< GraphicImport_Impl > m_pImpl
virtual void lcl_attribute(Id Name, Value &val) override
css::uno::Reference< css::text::XTextContent > m_xGraphicObject
css::uno::Reference< css::text::XTextContent > GetGraphicObject()
bool GetLayoutInCell() const
void putPropertyToFrameGrabBag(const OUString &sPropertyName, const css::uno::Any &aPropertyValue)
void handleWrapTextValue(sal_uInt32 nVal)
void lcl_expandRectangleByEffectExtent(css::awt::Point &rLeftTop, css::awt::Size &rSize)
void ProcessShapeOptions(Value const &val)
css::uno::Reference< css::drawing::XShape > m_xShape
void lcl_correctWord2007EffectExtent(const sal_Int32 nMSOAngle)
css::uno::Reference< css::text::XTextContent > createGraphicObject(css::uno::Reference< css::graphic::XGraphic > const &rxGraphic, css::uno::Reference< css::beans::XPropertySet > const &xShapeProps)
com::sun::star::awt::Point GetGraphicObjectPosition() const
virtual void lcl_sprm(Sprm &sprm) override
sal_Int32 findZOrder(sal_Int32 relativeHeight, bool bOldStyle=false)
void addItem(css::uno::Reference< css::beans::XPropertySet > const &props, sal_Int32 relativeHeight)
const WrapPolygon::Pointer_t & getPolygon() const
#define TOOLS_WARN_EXCEPTION(area, stream)
Reference< XComponentContext > const m_xComponentContext
EmbeddedObjectRef * pObject
#define SAL_WARN(area, stream)
std::unique_ptr< sal_Int32[]> pData
constexpr OUStringLiteral aData
B2DHomMatrix createRotateAroundPoint(double fPointX, double fPointY, double fRadiant)
B2DHomMatrix createScaleB2DHomMatrix(double fScaleX, double fScaleY)
B2DPolyPolygon UnoPointSequenceSequenceToB2DPolyPolygon(const css::drawing::PointSequenceSequence &rPointSequenceSequenceSource)
B2DHomMatrix createTranslateB2DHomMatrix(double fTranslateX, double fTranslateY)
B2DHomMatrix createRotateB2DHomMatrix(double fRadiant)
B2IRange fround(const B2DRange &rRange)
OStringBuffer & padToLength(OStringBuffer &rBuffer, sal_Int32 nLength, char cFill='\0')
DstType sequenceToContainer(const css::uno::Sequence< SrcType > &i_Sequence)
css::uno::Sequence< DstElementType > containerToSequence(const SrcType &i_Container)
css::beans::PropertyValue makePropertyValue(const OUString &rName, T &&rValue)
constexpr Point convert(const Point &rPoint, o3tl::Length eFrom, o3tl::Length eTo)
sal_Int32 convertEmuToHmm(sal_Int64 nValue)
const sal_Int32 PER_PERCENT
sal_Int32 convertTwipToMM100(sal_Int32 _t)
static bool lcl_bHasGroupSlantedChild(const SdrObject *pObj)
OUString getPropertyName(PropertyIds eId)
static void lcl_doMSOWidthHeightSwap(awt::Point &rLeftTop, awt::Size &rSize, const sal_Int32 nMSOAngle)
@ PROP_VERT_ORIENT_POSITION
@ PROP_GRAPHIC_COLOR_MODE
@ PROP_HORI_ORIENT_POSITION
@ PROP_HORI_ORIENT_RELATION
@ PROP_POSITION_PROTECTED
@ PROP_CONTOUR_POLY_POLYGON
@ PROP_VERT_ORIENT_RELATION
void resolveSprmProps(Properties &rHandler, Sprm &rSprm)
@ IMPORT_AS_DETECTED_ANCHOR
@ IMPORT_AS_DETECTED_INLINE
SwNodeOffset abs(const SwNodeOffset &a)
UNDERLYING_TYPE get() const
SVXCORE_DLLPUBLIC Degree100 NormAngle36000(Degree100 a)
std::unique_ptr< char[]> aBuffer