22#include <initializer_list>
71#include <com/sun/star/beans/PropertyAttribute.hpp>
72#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
73#include <com/sun/star/frame/XModel.hpp>
75#include <com/sun/star/text/TextContentAnchorType.hpp>
77#include <com/sun/star/drawing/PointSequence.hpp>
78#include <com/sun/star/lang/IllegalArgumentException.hpp>
79#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
118 text::WrapInfluenceOnPosition::ONCE_CONCURRENT) )
223 switch ( _nPositionLayoutDir )
225 case text::PositionLayoutDir::PositionInHoriL2R:
226 case text::PositionLayoutDir::PositionInLayoutDirOfAnchor:
233 OSL_FAIL(
"<SwShapeDescriptor_Impl::SetPositionLayoutDir(..)> - invalid attribute value." );
240 const bool _bCreate =
false )
246 text::WrapInfluenceOnPosition::ONCE_CONCURRENT));
259 , m_pPageView(nullptr)
307 return uno::Reference<drawing::XShape>(pObj->
getUnoShape(), uno::UNO_QUERY);
308 for(
const auto & pShape : pPage->
m_vShapes)
310 SvxShape* pSvxShape = pShape->GetSvxShape();
319 return uno::Reference<drawing::XShapeGroup>(
GetShape(pObj), uno::UNO_QUERY);
324 uno::Reference< drawing::XShape > xRet;
347 *pDoc, pFlyFormat).get()), uno::UNO_QUERY);
352 *pDoc, pFlyFormat).get()), uno::UNO_QUERY);
357 OSL_FAIL(
"<SwFmDrawPage::CreateShape(..)> - could not retrieve type. Thus, no shape created." );
369 uno::Reference< XUnoTunnel > xShapeTunnel(xRet, uno::UNO_QUERY);
374 xShapeTunnel =
nullptr;
375 uno::Reference< uno::XInterface > xCreate(xRet, uno::UNO_QUERY);
380 pShape =
new SwXShape(xCreate,
nullptr);
383 const_cast<std::vector<rtl::Reference<SwXShape>
>*>(&
m_vShapes)->push_back(pShape);
384 pShape->m_pPage =
this;
400 switch (pEntry ? pEntry->
nWID : -1)
405 css::uno::Reference<css::util::XTheme> xTheme;
406 if (aValue >>= xTheme)
408 auto& rUnoTheme =
dynamic_cast<UnoTheme&
>(*xTheme);
428 throw beans::UnknownPropertyException(rPropertyName,
static_cast<cppu::OWeakObject*
>(
this));
439 switch (pEntry ? pEntry->
nWID : -1)
443 css::uno::Reference<css::util::XTheme> xTheme;
445 auto pTheme = GetSdrPage()->getSdrPageProperties().GetTheme();
454 const sal_uInt16 nPageNumber(GetSdrPage()->GetPageNum());
455 aAny <<= o3tl::narrowing<sal_Int16>(nPageNumber);
473 throw beans::UnknownPropertyException(rPropertyName,
static_cast<cppu::OWeakObject*
>(
this));
479 const uno::Reference<beans::XPropertyChangeListener> & )
481 OSL_FAIL(
"not implemented");
485 const uno::Reference<beans::XPropertyChangeListener> & )
487 OSL_FAIL(
"not implemented");
491 const uno::Reference<beans::XVetoableChangeListener> & )
493 OSL_FAIL(
"not implemented");
497 const uno::Reference<beans::XVetoableChangeListener> & )
499 OSL_FAIL(
"not implemented");
504 class SwXShapesEnumeration
508 std::vector< css::uno::Any > m_aShapes;
510 virtual ~SwXShapesEnumeration()
override {};
512 explicit SwXShapesEnumeration(
SwFmDrawPage*
const pDrawPage);
515 virtual sal_Bool SAL_CALL hasMoreElements()
override;
516 virtual uno::Any SAL_CALL nextElement()
override;
525SwXShapesEnumeration::SwXShapesEnumeration(
SwFmDrawPage*
const pDrawPage)
529 m_aShapes.reserve(nCount);
530 for(sal_Int32 nIdx = 0; nIdx <
nCount; nIdx++)
532 uno::Reference<drawing::XShape> xShape(pDrawPage->
getByIndex(nIdx), uno::UNO_QUERY);
533 m_aShapes.push_back(
uno::Any(xShape));
537sal_Bool SwXShapesEnumeration::hasMoreElements()
540 return !m_aShapes.empty();
543uno::Any SwXShapesEnumeration::nextElement()
546 if(m_aShapes.empty())
547 throw container::NoSuchElementException();
548 uno::Any aResult = m_aShapes.back();
549 m_aShapes.pop_back();
553OUString SwXShapesEnumeration::getImplementationName()
555 return "SwXShapeEnumeration";
558sal_Bool SwXShapesEnumeration::supportsService(
const OUString& ServiceName)
563uno::Sequence< OUString > SwXShapesEnumeration::getSupportedServiceNames()
565 return { OUString(
"com.sun.star.container.XEnumeration") };
571 return uno::Reference< container::XEnumeration >(
572 new SwXShapesEnumeration(
this));
577 return "SwFmDrawPage";
587 return {
"com.sun.star.drawing.GenericDrawPage" };
594 throw uno::RuntimeException();
605 throw uno::RuntimeException();
607 throw lang::IndexOutOfBoundsException();
621 throw uno::RuntimeException();
631 throw uno::RuntimeException();
632 uno::Reference< lang::XUnoTunnel > xShapeTunnel(xShape, uno::UNO_QUERY);
633 SwXShape* pShape = comphelper::getFromUnoTunnel<SwXShape>(xShapeTunnel);
634 SvxShape* pSvxShape = comphelper::getFromUnoTunnel<SvxShape>(xShapeTunnel);
638 throw uno::RuntimeException(
"illegal object",
655 OSL_ENSURE(pSvxShape,
"Why is here no SvxShape?");
664 bool bOpaque =
false;
686 pHori->
SetPos( nHoriPos );
698 pVert->
SetPos( nVertPos );
733 std::unique_ptr<SwUnoInternalPaM> pInternalPam;
734 uno::Reference< text::XTextRange > xRg;
739 throw uno::RuntimeException();
741 if(RndStdIds::FLY_AT_FLY == aAnchor.
GetAnchorId() &&
742 !pInternalPam->GetPointNode().FindFlyStartNode())
744 aAnchor.
SetType(RndStdIds::FLY_AS_CHAR);
746 else if (RndStdIds::FLY_AT_PAGE == aAnchor.
GetAnchorId()
749 aAnchor.
SetAnchor(pInternalPam->Start());
750 aAnchor.
SetType(RndStdIds::FLY_AT_CHAR);
766 aAnchor.
SetType(RndStdIds::FLY_AT_PAGE);
772 SwPaM* pTemp = pInternalPam.get();
786 if (pFormat->
GetName().isEmpty())
794 pInternalPam.reset();
801 throw uno::RuntimeException();
806 uno::Reference<lang::XComponent> xComp(xTextFrame, uno::UNO_QUERY);
811 uno::Reference<lang::XComponent> xComp(xShape, uno::UNO_QUERY);
815uno::Reference< drawing::XShapeGroup >
SwFmDrawPage::group(
const uno::Reference< drawing::XShapes > & xShapes)
818 if(!
m_pDoc || !xShapes.is())
819 throw uno::RuntimeException();
820 uno::Reference< drawing::XShapeGroup > xRet;
829 pObj))->GetAnchor().GetAnchorId())
831 throw lang::IllegalArgumentException(
832 "Shape must not have 'as character' anchor!",
nullptr, 0);
842 RndStdIds::FLY_AT_PARA,
858 throw uno::RuntimeException();
866 RndStdIds::FLY_AT_PARA,
883 return theSwXShapeUnoTunnelId.
getSeq();
888 if( comphelper::isUnoTunnelId<SwXShape>(rId) )
897 if(
auto xAggTunnel =
o3tl::tryAccess<uno::Reference<lang::XUnoTunnel>>(
901 return (*xAggTunnel)->getSomething(rId);
910 auto pProvider = std::make_unique<svx::PropertyValueProvider>( _rShape,
"AnchorType" );
916 uno::Reference<uno::XInterface> & xShape,
917 SwDoc const*
const pDoc)
922 , m_bDescriptor(true)
930 uno::Any aAgg = xShape->queryInterface(rAggType);
937 "<SwXShape::SwXShape(..)> - no XShape found at <xShapeAgg>" );
949 lcl_addShapePropertyEventFactories( *pObj, *
this );
950 m_pImpl->m_bInitializedPropertyNotifier =
true;
969 OSL_ENSURE( pCurrent,
"SwXShape::AddExistingShapeToFormat: invalid object list element!" );
973 auto pSwShape = comphelper::getFromUnoTunnel<SwXShape>(pCurrent->
getWeakUnoShape());
976 if ( pSwShape->m_bDescriptor )
977 pSwShape->m_bDescriptor =
false;
979 if ( !pSwShape->m_pImpl->m_bInitializedPropertyNotifier )
981 lcl_addShapePropertyEventFactories( *pCurrent, *pSwShape );
982 pSwShape->m_pImpl->m_bInitializedPropertyNotifier =
true;
994 uno::Reference< uno::XInterface > xRef;
1017 aRet = SwXShapeBaseClass::queryInterface(aType);
1024 aRet <<= uno::Reference<XShape>(
this);
1033 uno::Sequence< uno::Type > aRet = SwXShapeBaseClass::getTypes();
1039 uno::Reference< XTypeProvider > xAggProv;
1049 return css::uno::Sequence<sal_Int8>();
1061 if(
auto xPrSet =
o3tl::tryAccess<uno::Reference<beans::XPropertySet>>(
1064 uno::Reference< beans::XPropertySetInfo > xInfo = (*xPrSet)->getPropertySetInfo();
1066 const uno::Sequence<beans::Property> aPropSeq = xInfo->getProperties();
1086 if ( pEntry->
nFlags & beans::PropertyAttribute::READONLY)
1087 throw beans::PropertyVetoException (
"Property is read-only: " + rPropertyName,
static_cast < cppu::OWeakObject *
> (
this ) );
1096 uno::Reference<text::XTextFrame>
xFrame;
1099 SwXFrame* pFrame =
dynamic_cast<SwXFrame*
>(
xFrame.get());
1100 if(pFrame && pFrame->GetFrameFormat() &&
1101 pFrame->GetFrameFormat()->GetDoc() == pDoc)
1107 SwPosition aPos(*pFrame->GetFrameFormat()->GetContent().GetContentIdx());
1109 aAnchor.
SetType(RndStdIds::FLY_AT_FLY);
1110 aItemSet.Put(aAnchor);
1116 throw lang::IllegalArgumentException();
1121 SAL_WARN_IF(!pSvxShape,
"sw.uno",
"No SvxShape found!");
1130 pObj->
SetLayer( *o3tl::doAccess<bool>(aValue)
1146 if (aAnchor.
GetAnchorId() == RndStdIds::FLY_AT_PAGE)
1149 throw lang::IllegalArgumentException();
1152 std::unique_ptr<SwUnoInternalPaM> pInternalPam(
1154 uno::Reference< text::XTextRange > xRg;
1158 throw uno::RuntimeException();
1161 if (aAnchor.
GetAnchorId() == RndStdIds::FLY_AS_CHAR)
1173 assert(pHint &&
"Missing Hint.");
1175 "sw.uno",
"Missing FlyInCnt-Hint." );
1177 "sw.uno",
"Wrong TextFlyCnt-Hint." );
1185 SAL_WARN_IF( !pNd,
"sw.uno",
"Cursor not at TextNode." );
1187 pNd->
InsertItem(aFormat, pInternalPam->GetPoint()
1188 ->GetContentIndex(), 0 );
1194 aAnchor.
SetAnchor( pInternalPam->GetPoint() );
1214 if (aValue.getValueType()
1217 aValue.get<uno::Reference<text::XTextFrame>>());
1219 SAL_WARN(
"sw.uno",
"This is not a TextFrame!" );
1231 sal_Int16 nPositionLayoutDir = 0;
1232 aValue >>= nPositionLayoutDir;
1244 sal_Int32 nAnchor = 0;
1261 SAL_WARN_IF(!pSvxShape,
"sw.uno",
"No SvxShape found!");
1265 sal_Int16 nPercent(100);
1266 aValue >>= nPercent;
1286 && aSet.
Get(
RES_ANCHOR).GetAnchorId() == RndStdIds::FLY_AT_PAGE)
1289 sal_Int16 nRelOrient(text::RelOrientation::PAGE_FRAME);
1290 aValue >>= nRelOrient;
1293 SAL_WARN(
"sw.core",
"SwXShape: fixing invalid horizontal RelOrientation for at-page anchor");
1294 value <<= nRelOrient;
1305 bool bSetAttr =
true;
1314 if( text::TextContentAnchorType_AS_CHARACTER != eNewAnchor &&
1315 (RndStdIds::FLY_AS_CHAR == eOldAnchorId))
1326 assert(pHint &&
"Missing Hint.");
1328 "sw.uno",
"Missing FlyInCnt-Hint." );
1330 "sw.uno",
"Wrong TextFlyCnt-Hint." );
1337 else if( text::TextContentAnchorType_AT_PAGE != eNewAnchor &&
1338 (RndStdIds::FLY_AT_PAGE == eOldAnchorId))
1357 aSet.
Put( aNewAnchor );
1361 if( text::TextContentAnchorType_AS_CHARACTER == eNewAnchor &&
1362 (RndStdIds::FLY_AS_CHAR != eOldAnchorId))
1378 SAL_WARN_IF( !pNd,
"sw.uno",
"Cursor is not in a TextNode." );
1386 aSet.
Put( aNewAnchor );
1412 switch(pEntry->
nWID)
1415 pItem =
m_pImpl->GetAnchor(
true);
1418 pItem =
m_pImpl->GetHOrient(
true);
1421 pItem =
m_pImpl->GetVOrient(
true);
1424 pItem =
m_pImpl->GetLRSpace(
true);
1427 pItem =
m_pImpl->GetULSpace(
true);
1430 pItem =
m_pImpl->GetSurround(
true);
1434 uno::Reference<text::XTextRange>>(aValue))
1436 uno::Reference< text::XTextRange > & rRange =
m_pImpl->GetTextRange();
1441 m_pImpl->SetOpaque(*o3tl::doAccess<bool>(aValue));
1446 pItem =
m_pImpl->GetFollowTextFlow(
true );
1452 pItem =
m_pImpl->GetWrapInfluenceOnObjPos(
true );
1458 sal_Int16 nPositionLayoutDir = 0;
1459 aValue >>= nPositionLayoutDir;
1460 m_pImpl->SetPositionLayoutDir( nPositionLayoutDir );
1473 auto xPrSet = o3tl::tryAccess<uno::Reference<beans::XPropertySet>>(
1476 throw uno::RuntimeException();
1481 awt::Point aKeepedPosition( 0, 0 );
1482 if ( rPropertyName ==
"CaptionPoint" &&
getShapeType() ==
"com.sun.star.drawing.CaptionShape" )
1489 (*xPrSet)->setPropertyValue(rPropertyName, aValue);
1492 (*xPrSet)->setPropertyValue(rPropertyName, aValue);
1502 if ( rPropertyName ==
"CaptionPoint" &&
getShapeType() ==
"com.sun.star.drawing.CaptionShape" )
1524 OSL_ENSURE(pSvxShape,
"No SvxShape found!");
1537 OSL_ENSURE(pSvxShape,
"No SvxShape found!");
1551 if (aAnchor.
GetAnchorId() == RndStdIds::FLY_AT_PAGE)
1567 aRet <<= uno::Reference<text::XTextRange>(xTextRange);
1584 ((pSvxShape && pSvxShape->GetSdrObject()) ? pSvxShape->GetSdrObject()
1594 uno::Reference<text::XTextFrame>
xFrame(xRange, uno::UNO_QUERY);
1641 SAL_WARN_IF(!pSvxShape,
"sw.uno",
"No SvxShape found!");
1675 switch(pEntry->
nWID)
1681 pItem =
m_pImpl->GetHOrient();
1684 pItem =
m_pImpl->GetVOrient();
1687 pItem =
m_pImpl->GetLRSpace();
1690 pItem =
m_pImpl->GetULSpace();
1693 pItem =
m_pImpl->GetSurround();
1696 aRet <<=
m_pImpl->GetTextRange();
1699 aRet <<=
m_pImpl->GetOpaque();
1703 aRet <<= awt::Point();
1709 pItem =
m_pImpl->GetFollowTextFlow();
1715 pItem =
m_pImpl->GetWrapInfluenceOnObjPos();
1728 aRet <<=
m_pImpl->GetPositionLayoutDir();
1757 if ( rPropertyName ==
"Transformation" )
1759 drawing::HomogenMatrix3 aMatrix;
1764 else if ( rPropertyName ==
"StartPosition" )
1766 awt::Point aStartPos;
1771 else if ( rPropertyName ==
"EndPosition" )
1779 else if ( rPropertyName ==
"PolyPolygonBezier" )
1781 drawing::PolyPolygonBezierCoords aPath;
1785 else if (rPropertyName ==
"ZOrder")
1793 bool bConvert =
true;
1796 if (pSvxShape->GetSdrObject() != pObj)
1818 auto xPrSet = o3tl::tryAccess<uno::Reference<beans::XPropertySet>>(aPSet);
1821 throw uno::RuntimeException();
1823 aRet = (*xPrSet)->getPropertyValue( _rPropertyName );
1831 uno::Sequence< OUString > aNames { rPropertyName };
1833 return aStates.getConstArray()[0];
1837 const uno::Sequence< OUString >& aPropertyNames )
1841 uno::Sequence< beans::PropertyState > aRet(aPropertyNames.getLength());
1843 throw uno::RuntimeException();
1846 bool bGroupMember =
false;
1847 bool bFormControl =
false;
1851 bGroupMember =
pObject->getParentSdrObjectFromSdrObject() !=
nullptr;
1852 bFormControl =
pObject->GetObjInventor() == SdrInventor::FmForm;
1854 const OUString* pNames = aPropertyNames.getConstArray();
1855 beans::PropertyState* pRet = aRet.getArray();
1856 uno::Reference< XPropertyState > xShapePrState;
1857 for(sal_Int32 nProperty = 0; nProperty < aPropertyNames.getLength(); nProperty++)
1863 pRet[nProperty] = bFormControl ?
1864 beans::PropertyState_DEFAULT_VALUE : beans::PropertyState_DIRECT_VALUE;
1866 pRet[nProperty] = beans::PropertyState_DIRECT_VALUE;
1868 pRet[nProperty] = beans::PropertyState_DIRECT_VALUE;
1869 else if(bGroupMember)
1870 pRet[nProperty] = beans::PropertyState_DEFAULT_VALUE;
1874 pRet[nProperty] = beans::PropertyState_DIRECT_VALUE;
1881 pRet[nProperty] = beans::PropertyState_DIRECT_VALUE;
1883 pRet[nProperty] = beans::PropertyState_DEFAULT_VALUE;
1890 if(SfxItemState::SET == eItemState)
1891 pRet[nProperty] = beans::PropertyState_DIRECT_VALUE;
1892 else if(SfxItemState::DEFAULT == eItemState)
1893 pRet[nProperty] = beans::PropertyState_DEFAULT_VALUE;
1895 pRet[nProperty] = beans::PropertyState_AMBIGUOUS_VALUE;
1900 switch(pEntry->
nWID)
1906 pItem =
m_pImpl->GetHOrient();
1909 pItem =
m_pImpl->GetVOrient();
1912 pItem =
m_pImpl->GetLRSpace();
1915 pItem =
m_pImpl->GetULSpace();
1918 pItem =
m_pImpl->GetSurround();
1923 pItem =
m_pImpl->GetWrapInfluenceOnObjPos();
1928 pRet[nProperty] = beans::PropertyState_DIRECT_VALUE;
1930 pRet[nProperty] = beans::PropertyState_DEFAULT_VALUE;
1935 if(!xShapePrState.is())
1939 auto ps = o3tl::tryAccess<uno::Reference<XPropertyState>>(
1942 throw uno::RuntimeException();
1943 xShapePrState = *ps;
1945 pRet[nProperty] = xShapePrState->getPropertyState(pNames[nProperty]);
1957 throw uno::RuntimeException();
1962 if ( pEntry->
nFlags & beans::PropertyAttribute::READONLY)
1963 throw uno::RuntimeException(
"Property is read-only: " + rPropertyName,
static_cast < cppu::OWeakObject *
> (
this ) );
1974 switch(pEntry->
nWID)
1988 m_pImpl->RemoveFollowTextFlow();
1994 m_pImpl->RemoveWrapInfluenceOnObjPos();
2004 auto xShapePrState = o3tl::tryAccess<uno::Reference<XPropertyState>>(
2007 throw uno::RuntimeException();
2008 (*xShapePrState)->setPropertyToDefault( rPropertyName );
2019 throw uno::RuntimeException();
2025 throw uno::RuntimeException();
2036 auto xShapePrState = o3tl::tryAccess<uno::Reference<XPropertyState>>(
2039 throw uno::RuntimeException();
2040 (*xShapePrState)->getPropertyDefault( rPropertyName );
2047 const OUString& _propertyName,
2048 const uno::Reference< beans::XPropertyChangeListener > & _listener )
2051 throw uno::RuntimeException(
"no shape aggregate", *
this );
2054 uno::Reference< beans::XPropertySet > xShapeProps;
2056 xShapeProps->addPropertyChangeListener( _propertyName, _listener );
2060 const OUString& _propertyName,
2061 const uno::Reference< beans::XPropertyChangeListener > & _listener)
2064 throw uno::RuntimeException(
"no shape aggregate", *
this );
2067 uno::Reference< beans::XPropertySet > xShapeProps;
2069 xShapeProps->removePropertyChangeListener( _propertyName, _listener );
2074 const uno::Reference< beans::XVetoableChangeListener > & )
2076 OSL_FAIL(
"not implemented");
2081 const uno::Reference< beans::XVetoableChangeListener > & )
2083 OSL_FAIL(
"not implemented");
2092 const SwDoc* pDoc =
nullptr;
2093 if (
auto pRange =
dynamic_cast<SwXTextRange*
>(xTextRange.get()))
2094 pDoc = &pRange->GetDoc();
2095 else if (
auto pText =
dynamic_cast<SwXText*
>(xTextRange.get()))
2096 pDoc = pText->GetDoc();
2097 else if (
auto pCursor =
dynamic_cast<OTextCursorHelper*
>(xTextRange.get()))
2098 pDoc = pCursor->GetDoc();
2099 else if (
auto pPortion =
dynamic_cast<SwXTextPortion*
>(xTextRange.get()))
2100 pDoc = &pPortion->GetCursor().GetDoc();
2101 else if (
auto pParagraph =
dynamic_cast<SwXParagraph*
>(xTextRange.get());
2103 pDoc = &pParagraph->GetTextNode()->GetDoc();
2106 throw uno::RuntimeException();
2112 uno::Reference< drawing::XDrawPageSupplier > xDPS(
xModel, uno::UNO_QUERY);
2115 uno::Reference< drawing::XDrawPage > xDP( xDPS->getDrawPage() );
2119 aPos <<= xTextRange;
2121 uno::Reference< drawing::XShape > xTemp(
static_cast<cppu::OWeakObject*
>(
this), uno::UNO_QUERY );
2130 uno::Reference< text::XTextRange > aRef;
2137 if ((rAnchor.
GetAnchorId() != RndStdIds::FLY_AT_PAGE) ||
2140 if (rAnchor.
GetAnchorId() == RndStdIds::FLY_AT_PARA)
2152 aRef =
m_pImpl->GetTextRange().get();
2169 OSL_ENSURE( !pObj ||
2173 "<SwXShape::dispose(..) - different 'master' drawing objects!!" );
2184 if (rFormatAnchor.
GetAnchorId() == RndStdIds::FLY_AS_CHAR)
2197 uno::Reference<XComponent> xComp;
2211 const uno::Reference< lang::XEventListener > & aListener)
2219 const uno::Reference< lang::XEventListener > & aListener)
2238 uno::Sequence< OUString >
aSeq;
2240 aSeq = pSvxShape->getSupportedServiceNames();
2242 aSeq, std::initializer_list<std::u16string_view>{
u"com.sun.star.drawing.Shape" });
2248 return comphelper::getFromUnoTunnel<SvxShape>(
m_xShapeAgg);
2267 uno::Reference< drawing::XShape > xGroupShape( pTopGroupObj->
getUnoShape(), uno::UNO_QUERY );
2268 aPos = xGroupShape->getPosition();
2277 awt::Point aOffset( 0, 0 );
2279 aOffset.X = ( aMemberObjRect.
Left() - aGroupObjRect.
Left() );
2280 aOffset.Y = ( aMemberObjRect.
Top() - aGroupObjRect.
Top() );
2284 aPos.X += aOffset.X;
2285 aPos.Y += aOffset.Y;
2295 if ( !pTopGroupObj )
2300 bool bApplyPosAtDrawObj(
false);
2301 bool bNoAdjustOfPosProp(
false);
2314 bApplyPosAtDrawObj =
true;
2318 bNoAdjustOfPosProp =
true;
2324 if ( !bNoAdjustOfPosProp )
2328 if ( bApplyPosAtDrawObj )
2330 mxShape->setPosition( aPosition );
2336 awt::Point aNewPos( aPosition );
2347 uno::Reference< drawing::XShape > xGroupShape( pTopGroupObj->
getUnoShape(), uno::UNO_QUERY );
2352 awt::Point aAttrPosInHoriL2R(
2354 xGroupShape->getSize() ) );
2364 auto pSvxGroupShape = comphelper::getFromUnoTunnel<SvxShape>(pTopGroupObj->
getUnoShape());
2365 const awt::Point aGroupPos = pSvxGroupShape->getPosition();
2370 mxShape->setPosition( aNewPos );
2400 return mxShape->getShapeType();
2425 return pTopGroupObj;
2433 awt::Point aAttrPos;
2436 aHoriPos >>= aAttrPos.X;
2438 aVertPos >>= aAttrPos.Y;
2448 aAttrPos.X == 0 && aAttrPos.Y == 0 )
2457 text::TextContentAnchorType eTextAnchorType =
2458 text::TextContentAnchorType_AT_PARAGRAPH;
2461 aAny >>= eTextAnchorType;
2463 if ( eTextAnchorType == text::TextContentAnchorType_AS_CHARACTER )
2476 const awt::Size& rObjSize )
2478 awt::Point aObjPosInHoriL2R( rObjPos );
2484 switch ( eLayoutDir )
2493 aObjPosInHoriL2R.X = -rObjPos.X - rObjSize.Width;
2498 aObjPosInHoriL2R.X = -rObjPos.Y - rObjSize.Width;
2499 aObjPosInHoriL2R.Y = rObjPos.X;
2504 OSL_FAIL(
"<SwXShape::ConvertPositionToHoriL2R(..)> - unsupported layout direction" );
2509 return aObjPosInHoriL2R;
2517 const drawing::HomogenMatrix3& rMatrixInHoriL2R )
2519 drawing::HomogenMatrix3 aMatrix(rMatrixInHoriL2R);
2524 OSL_ENSURE( pSvxShape,
2525 "<SwXShape::ConvertTransformationToLayoutDir(..)> - no SvxShape found!");
2530 "<SwXShape::ConvertTransformationToLayoutDir(..)> - no SdrObject found!");
2537 const awt::Point aObjPos(
2542 const awt::Point aTranslateDiff( aPos.X - aObjPos.X,
2543 aPos.Y - aObjPos.Y );
2545 if ( aTranslateDiff.X != 0 || aTranslateDiff.Y != 0 )
2550 aTempMatrix.
set(0, 0, aMatrix.Line1.Column1 );
2551 aTempMatrix.
set(0, 1, aMatrix.Line1.Column2 );
2552 aTempMatrix.
set(0, 2, aMatrix.Line1.Column3 );
2553 aTempMatrix.
set(1, 0, aMatrix.Line2.Column1 );
2554 aTempMatrix.
set(1, 1, aMatrix.Line2.Column2 );
2555 aTempMatrix.
set(1, 2, aMatrix.Line2.Column3 );
2557 assert( aMatrix.Line3.Column1 == 0 );
2558 assert( aMatrix.Line3.Column2 == 0 );
2559 assert( aMatrix.Line3.Column3 == 1 );
2561 aTempMatrix.
translate( aTranslateDiff.X, aTranslateDiff.Y );
2562 aMatrix.Line1.Column1 = aTempMatrix.
get(0, 0);
2563 aMatrix.Line1.Column2 = aTempMatrix.
get(0, 1);
2564 aMatrix.Line1.Column3 = aTempMatrix.
get(0, 2);
2565 aMatrix.Line2.Column1 = aTempMatrix.
get(1, 0);
2566 aMatrix.Line2.Column2 = aTempMatrix.
get(1, 1);
2567 aMatrix.Line2.Column3 = aTempMatrix.
get(1, 2);
2568 aMatrix.Line3.Column1 = 0;
2569 aMatrix.Line3.Column2 = 0;
2570 aMatrix.Line3.Column3 = 1;
2586 text::TextContentAnchorType eTextAnchorType =
2587 text::TextContentAnchorType_AT_PARAGRAPH;
2590 aAny >>= eTextAnchorType;
2592 if ( eTextAnchorType != text::TextContentAnchorType_AS_CHARACTER )
2595 static constexpr OUStringLiteral aHoriPosPropStr(
u"HoriOrientPosition");
2597 sal_Int32 dCurrX = 0;
2598 aHoriPos >>= dCurrX;
2600 if ( dCurrX != rPosition.X )
2604 static constexpr OUStringLiteral aHoriOrientPropStr(
u"HoriOrient");
2606 sal_Int16 eHoriOrient;
2607 if (aHoriOrient >>= eHoriOrient)
2612 aHoriOrient <<= eHoriOrient;
2617 aHoriPos <<= rPosition.X;
2625 static constexpr OUStringLiteral aVertPosPropStr(
u"VertOrientPosition");
2627 sal_Int32 dCurrY = 0;
2628 aVertPos >>= dCurrY;
2630 if ( dCurrY != rPosition.Y )
2634 static constexpr OUStringLiteral aVertOrientPropStr(
u"VertOrient");
2636 sal_Int16 eVertOrient;
2637 if (aVertOrient >>= eVertOrient)
2642 aVertOrient <<= eVertOrient;
2647 aVertPos <<= rPosition.Y;
2658 const css::awt::Point& aStartOrEndPos )
2660 awt::Point aConvertedPos( aStartOrEndPos );
2663 OSL_ENSURE( pSvxShape,
2664 "<SwXShape::ConvertStartOrEndPosToLayoutDir(..)> - no SvxShape found!");
2669 "<SwXShape::ConvertStartOrEndPosToLayoutDir(..)> - no SdrObject found!");
2676 const awt::Point aObjPos(
2681 const awt::Point aTranslateDiff( aPos.X - aObjPos.X,
2682 aPos.Y - aObjPos.Y );
2684 if ( aTranslateDiff.X != 0 || aTranslateDiff.Y != 0 )
2686 aConvertedPos.X = aConvertedPos.X + aTranslateDiff.X;
2687 aConvertedPos.Y = aConvertedPos.Y + aTranslateDiff.Y;
2692 return aConvertedPos;
2696 const css::drawing::PolyPolygonBezierCoords& aPath )
2698 drawing::PolyPolygonBezierCoords aConvertedPath( aPath );
2701 OSL_ENSURE( pSvxShape,
2702 "<SwXShape::ConvertStartOrEndPosToLayoutDir(..)> - no SvxShape found!");
2707 "<SwXShape::ConvertStartOrEndPosToLayoutDir(..)> - no SdrObject found!");
2714 const awt::Point aObjPos(
2719 const awt::Point aTranslateDiff( aPos.X - aObjPos.X,
2720 aPos.Y - aObjPos.Y );
2722 if ( aTranslateDiff.X != 0 || aTranslateDiff.Y != 0 )
2725 aTranslateDiff.X, aTranslateDiff.Y));
2727 for(drawing::PointSequence& rInnerSequence : asNonConstRange(aConvertedPath.Coordinates))
2729 for(awt::Point& rPoint : asNonConstRange(rInnerSequence))
2732 aNewCoordinatePair *= aMatrix;
2741 return aConvertedPath;
2745 SwDoc const*
const pDoc)
2748#if OSL_DEBUG_LEVEL > 0
2749 uno::Reference<XShapes> xShapes(
m_xShapeAgg, uno::UNO_QUERY);
2750 OSL_ENSURE(xShapes.is(),
"no SvxShape found or shape is not a group shape");
2762 aRet <<= uno::Reference<XShapes>(
this);
2770 SwXShape::acquire();
2775 SwXShape::release();
2783 if(!(pSvxShape && pFormat))
2784 throw uno::RuntimeException();
2786 uno::Reference<XShapes> xShapes;
2794 throw uno::RuntimeException();
2796 xShapes->add(xShape);
2799 uno::Reference<lang::XUnoTunnel> xTunnel(xShape, uno::UNO_QUERY);
2800 SwXShape* pSwShape = comphelper::getFromUnoTunnel<SwXShape>(xTunnel);
2804 SvxShape* pAddShape = comphelper::getFromUnoTunnel<SvxShape>(xTunnel);
2831 uno::Reference<XShapes> xShapes;
2839 throw uno::RuntimeException();
2840 xShapes->remove(xShape);
2846 uno::Reference<XIndexAccess> xAcc;
2854 throw uno::RuntimeException();
2855 return xAcc->getCount();
2861 uno::Reference<XIndexAccess> xAcc;
2869 throw uno::RuntimeException();
2870 return xAcc->getByIndex(
nIndex);
2876 uno::Reference<XIndexAccess> xAcc;
2884 throw uno::RuntimeException();
2885 return xAcc->getElementType();
2891 uno::Reference<XIndexAccess> xAcc;
2899 throw uno::RuntimeException();
2900 return xAcc->hasElements();
constexpr auto convertTwipToMm100(N n)
virtual SwDrawFrameFormat * InsertDrawObj(const SwPaM &rRg, SdrObject &rDrawObj, const SfxItemSet &rFlyAttrSet)=0
Insert a DrawObject.
virtual SdrLayerID GetInvisibleControlsId() const =0
virtual SdrLayerID GetHellId() const =0
virtual SdrLayerID GetInvisibleHellId() const =0
virtual SdrLayerID GetHeavenId() const =0
virtual const SwDrawModel * GetDrawModel() const =0
Draw Model and id accessors.
virtual SdrLayerID GetControlsId() const =0
virtual SdrLayerID GetInvisibleHeavenId() const =0
virtual bool IsVisibleLayerId(SdrLayerID _nLayerId) const =0
method to determine, if a layer ID belongs to the visible ones.
virtual const SwRootFrame * GetCurrentLayout() const =0
virtual void DelLayoutFormat(SwFrameFormat *pFormat)=0
virtual const SwViewShell * GetCurrentViewShell() const =0
Returns the layout set at the document.
constexpr tools::Long Y() const
constexpr tools::Long X() const
size_t GetMarkCount() const
void InsertEntry(const SdrMark &rMark, bool bChkSort=true)
SdrMark * GetMark(size_t nNum) const
SdrObject * GetMarkedSdrObj() const
static SdrObject * getSdrObjectFromXShape(const css::uno::Reference< css::uno::XInterface > &xInt)
SdrObjUserCall * GetUserCall() const
const css::uno::WeakReference< css::drawing::XShape > & getWeakUnoShape() const
const Point & GetAnchorPos() const
void SetRelativeHeight(double nValue)
void SetRelativeHeightRelation(sal_Int16 eValue)
const double * GetRelativeHeight() const
virtual SdrInventor GetObjInventor() const
virtual css::uno::Reference< css::drawing::XShape > getUnoShape()
void SetRelativeWidth(double nValue)
const double * GetRelativeWidth() const
virtual const tools::Rectangle & GetSnapRect() const
virtual const OUString & GetName() const
void SetRelativeWidthRelation(sal_Int16 eValue)
bool IsGroupObject() const
sal_Int16 GetRelativeHeightRelation() const
SdrObject * getParentSdrObjectFromSdrObject() const
virtual SdrLayerID GetLayer() const
virtual void SetLayer(SdrLayerID nLayer)
sal_Int16 GetRelativeWidthRelation() const
void registerProvider(const svx::ShapePropertyProviderId _eProperty, std::unique_ptr< svx::PropertyValueProvider > propProvider)
virtual void SetName(const OUString &rStr, const bool bSetChanged=true)
void SetTheme(std::shared_ptr< model::Theme > const &pTheme)
SdrPageProperties & getSdrPageProperties()
const SfxPoolItem & GetDefaultItem(sal_uInt16 nWhich) const
const SfxItemPropertyMapEntry * getByName(std::u16string_view rName) const
void setPropertyValue(const SfxItemPropertyMapEntry &rEntry, const css::uno::Any &aVal, SfxItemSet &rSet) const
const SfxItemPropertyMap & getPropertyMap() const
void getPropertyValue(const SfxItemPropertyMapEntry &rEntry, const SfxItemSet &rSet, css::uno::Any &rAny) const
css::uno::Reference< css::beans::XPropertySetInfo > const & getPropertySetInfo() const
void SetParent(const SfxItemSet *pNew)
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
css::uno::Reference< css::frame::XModel3 > GetModel() const
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt8 nMemberId)
virtual void SAL_CALL add(const css::uno::Reference< css::drawing::XShape > &xShape) override
virtual sal_Bool SAL_CALL hasElements() override
virtual css::uno::Reference< css::drawing::XShape > CreateShape(SdrObject *pObj) const override
virtual css::awt::Point SAL_CALL getPosition() override
virtual void SAL_CALL setPosition(const css::awt::Point &aPosition) override
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &aListener) override
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
SdrObject * GetSdrObject() const
void SetAttr(const SfxPoolItem &, SwFormat &)
Set attribute in given format.1y If Undo is enabled, the old values is added to the Undo history.
IDocumentContentOperations const & getIDocumentContentOperations() const
IDocumentUndoRedo & GetIDocumentUndoRedo()
OUString GetUniqueShapeName() const
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
SwDrawContact * GroupSelection(SdrView &)
void UnGroupSelection(SdrView &)
bool ChgAnchor(const SdrMarkList &_rMrkList, RndStdIds _eAnchorType, const bool _bSameOnly, const bool _bPosCorr)
const SwAttrPool & GetAttrPool() const
IDocumentDrawModelAccess const & getIDocumentDrawModelAccess() const
SwDocShell * GetDocShell()
new class for re-direct methods calls at a 'virtual' drawing object to its referenced object.
SdrPageView * m_pPageView
virtual sal_Bool SAL_CALL hasElements() override
std::vector< rtl::Reference< SwXShape > > m_vShapes
void InvalidateSwDoc()
Renamed and outlined to detect where it's called.
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
static css::uno::Reference< css::drawing::XShapeGroup > GetShapeGroup(SdrObject *pObj)
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
static css::uno::Reference< css::drawing::XShape > GetShape(SdrObject *pObj)
virtual css::uno::Type SAL_CALL getElementType() override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual css::uno::Reference< css::drawing::XShapeGroup > SAL_CALL group(const css::uno::Reference< css::drawing::XShapes > &xShapes) override
virtual ~SwFmDrawPage() noexcept override
virtual OUString SAL_CALL getImplementationName() override
virtual void SAL_CALL remove(const css::uno::Reference< css::drawing::XShape > &xShape) override
virtual void SAL_CALL ungroup(const css::uno::Reference< css::drawing::XShapeGroup > &aGroup) override
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
SwFmDrawPage(SwDoc *pDoc, SdrPage *pPage)
virtual css::uno::Reference< css::drawing::XShape > CreateShape(SdrObject *pObj) const override
virtual void SAL_CALL add(const css::uno::Reference< css::drawing::XShape > &xShape) override
void RemoveShape(const SwXShape *pShape)
const SfxItemPropertySet * m_pPropertySet
void PreUnGroup(const css::uno::Reference< css::drawing::XShapeGroup > &rShapeGroup)
virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) override
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
const SdrMarkList & PreGroup(const css::uno::Reference< css::drawing::XShapes > &rShapes)
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
virtual sal_Int32 SAL_CALL getCount() override
SdrPageView * GetPageView()
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
const SwNodeIndex * GetContentIdx() const
Marks a node in the document model.
const SwNodes & GetNodes() const
SwNodeOffset GetIndex() const
Base class of the Writer document model elements.
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
bool IsNoTextNode() const
SwNode & GetEndOfContent() const
Regular ContentSection (i.e. the BodyText).
bool IsDocNodes() const
Is the NodesArray the regular one of Doc? (and not the UndoNds, ...) Implementation in doc....
PaM is Point and Mark: a selection of the document model.
SwNode & GetPointNode() const
bool Move(SwMoveFnCollection const &fnMove=fnMoveForward, SwGoInDoc fnGo=GoInContent)
Movement of cursor.
const SwPosition * GetPoint() const
virtual bool GetModelPositionForViewPoint(SwPosition *, Point &, SwCursorMoveState *=nullptr, bool bTestBackground=false) const override
Primary passes the call to the first page.
SwFormatAnchor * GetAnchor(bool bCreate=false)
std::unique_ptr< SwFormatSurround > m_pSurround
std::unique_ptr< SwFormatFollowTextFlow > m_pFollowTextFlow
const bool & GetOpaque() const
SwFormatHoriOrient * GetHOrient(bool bCreate=false)
std::unique_ptr< SwFormatAnchor > m_pAnchor
std::unique_ptr< SvxULSpaceItem > m_pULSpace
bool m_bInitializedPropertyNotifier
SwShapeDescriptor_Impl & operator=(const SwShapeDescriptor_Impl &)=delete
std::unique_ptr< SwFormatHoriOrient > m_pHOrient
SvxLRSpaceItem * GetLRSpace(bool bCreate=false)
SwFormatSurround * GetSurround(bool bCreate=false)
void RemoveFollowTextFlow()
sal_Int16 GetPositionLayoutDir() const
void SetOpaque(bool bSet)
void RemoveWrapInfluenceOnObjPos()
SwFormatFollowTextFlow * GetFollowTextFlow(bool _bCreate=false)
SwFormatWrapInfluenceOnObjPos * GetWrapInfluenceOnObjPos(const bool _bCreate=false)
uno::Reference< text::XTextRange > & GetTextRange()
SvxULSpaceItem * GetULSpace(bool bCreate=false)
SwShapeDescriptor_Impl(const SwShapeDescriptor_Impl &)=delete
SwFormatVertOrient * GetVOrient(bool bCreate=false)
SwShapeDescriptor_Impl(SwDoc const *const pDoc)
void SetPositionLayoutDir(sal_Int16 _nPositionLayoutDir)
std::unique_ptr< SvxLRSpaceItem > m_pLRSpace
std::unique_ptr< SwFormatVertOrient > m_pVOrient
std::unique_ptr< SwFormatWrapInfluenceOnObjPos > m_pWrapInfluenceOnObjPos
uno::Reference< text::XTextRange > m_xTextRange
sal_Int16 mnPositionLayoutDir
A wrapper around SfxPoolItem to store the start position of (usually) a text portion,...
const SwFormatFlyCnt & GetFlyCnt() const
static css::uno::Any getByIndex(SdrPage const *pPage, sal_Int32 nIndex)
Get a shape by index, excluding TextBoxes.
static css::uno::Reference< css::text::XTextFrame > getUnoTextFrame(css::uno::Reference< css::drawing::XShape > const &xShape)
If we have an associated TextFrame, then return its XTextFrame.
static void set(SwFrameFormat *pShape, SdrObject *pObject, css::uno::Reference< css::text::XTextFrame > xNew)
Sets the given textframe as textbox for the given (group member) shape.
static sal_Int32 getCount(const SwDoc &rDoc)
Count number of shapes in the document, excluding TextBoxes.
static void syncProperty(SwFrameFormat *pShape, sal_uInt16 nWID, sal_uInt8 nMemberID, const css::uno::Any &rValue, SdrObject *pObj=nullptr)
Sync property of TextBox with the one of the shape.
static void create(SwFrameFormat *pShape, SdrObject *pObject, bool bCopyText=false)
Create a TextBox for a shape.
static void getProperty(SwFrameFormat const *pShape, sal_uInt16 nWID, sal_uInt8 nMemberID, css::uno::Any &rValue)
Get a property of the underlying TextFrame.
static bool changeAnchor(SwFrameFormat *pShape, SdrObject *pObj)
Sets the anchor of the associated textframe of the given shape, and returns true on success.
static void synchronizeGroupTextBoxProperty(bool pFunc(SwFrameFormat *, SdrObject *), SwFrameFormat *pFormat, SdrObject *pObj)
Calls the method given by pFunc with every textboxes of the group given by pFormat.
static bool isTextBox(const SwFrameFormat *pFormat, sal_uInt16 nType, const SdrObject *pObject=nullptr)
Is the frame format a text box?
static void destroy(const SwFrameFormat *pShape, const SdrObject *pObject)
Destroy a TextBox for a shape.
static sal_Int32 getOrdNum(const SdrObject *pObject)
Get the order of the shape, excluding TextBoxes.
static css::uno::Any queryInterface(const SwFrameFormat *pShape, const css::uno::Type &rType, SdrObject *pObj)
Get interface of a shape's TextBox, if there is any.
SwTextNode is a paragraph in the document model.
void DeleteAttributes(const sal_uInt16 nWhich, const sal_Int32 nStart, const sal_Int32 nEnd=0)
delete all attributes of type nWhich at nStart (opt. end nEnd)
SwTextAttr * InsertItem(SfxPoolItem &rAttr, const sal_Int32 nStart, const sal_Int32 nEnd, const SetAttrMode nMode=SetAttrMode::DEFAULT)
create new text attribute from rAttr and insert it
SwTextAttr * GetTextAttrForCharAt(const sal_Int32 nIndex, const sal_uInt16 nWhich=RES_TXTATR_END) const
get the text attribute at position nIndex which owns the dummy character CH_TXTATR_* at that position...
virtual void SAL_CALL acquire() noexcept override
virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) override
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &aType) override
virtual sal_Bool SAL_CALL hasElements() override
virtual void SAL_CALL add(const css::uno::Reference< css::drawing::XShape > &xShape) override
virtual void SAL_CALL remove(const css::uno::Reference< css::drawing::XShape > &xShape) override
virtual void SAL_CALL release() noexcept override
virtual sal_Int32 SAL_CALL getCount() override
virtual ~SwXGroupShape() override
virtual css::uno::Type SAL_CALL getElementType() override
const SwTextNode * GetTextNode() const
css::uno::Reference< css::uno::XAggregation > m_xShapeAgg
virtual css::uno::Any SAL_CALL getPropertyDefault(const OUString &aPropertyName) override
css::uno::Any _getPropAtAggrObj(const OUString &_rPropertyName)
method to get property from aggregation object
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &aType) override
css::awt::Point GetAttrPosition()
method to determine position according to the positioning attributes
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
virtual css::beans::PropertyState SAL_CALL getPropertyState(const OUString &PropertyName) override
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
std::unique_ptr< SwShapeDescriptor_Impl > m_pImpl
virtual css::awt::Point SAL_CALL getPosition() override
o3tl::span< const SfxItemPropertyMapEntry > m_pPropertyMapEntries
SwShapeDescriptor_Impl * GetDescImpl()
static void AddExistingShapeToFormat(SdrObject const &_rObj)
virtual OUString SAL_CALL getShapeType() override
virtual void SAL_CALL attach(const css::uno::Reference< css::text::XTextRange > &xTextRange) override
virtual OUString SAL_CALL getImplementationName() override
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
SdrObject * GetTopGroupObj(SvxShape *_pSvxShape=nullptr)
method to determine top group object
friend class SwXGroupShape
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &aListener) override
SwXShape(css::uno::Reference< css::uno::XInterface > &xShape, SwDoc const *const pDoc)
virtual sal_Int64 SAL_CALL getSomething(const css::uno::Sequence< sal_Int8 > &aIdentifier) override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
css::uno::Reference< css::drawing::XShape > mxShape
static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId()
const SwFmDrawPage * m_pPage
css::drawing::HomogenMatrix3 ConvertTransformationToLayoutDir(const css::drawing::HomogenMatrix3 &rMatrixInHoriL2R)
method to convert the transformation of the drawing object to the layout direction,...
virtual css::awt::Size SAL_CALL getSize() override
const SfxItemPropertySet * m_pPropSet
virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL getPropertyStates(const css::uno::Sequence< OUString > &aPropertyName) override
virtual void SAL_CALL setPropertyToDefault(const OUString &PropertyName) override
css::uno::Reference< css::beans::XPropertySetInfo > mxPropertySetInfo
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
virtual void SAL_CALL dispose() override
SwFrameFormat * GetFrameFormat() const
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
virtual void SAL_CALL setSize(const css::awt::Size &aSize) override
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
css::awt::Point ConvertStartOrEndPosToLayoutDir(const css::awt::Point &aStartOrEndPos)
method to convert start or end position of the drawing object to the Writer specific position,...
css::drawing::PolyPolygonBezierCoords ConvertPolyPolygonBezierToLayoutDir(const css::drawing::PolyPolygonBezierCoords &aPath)
method to convert PolyPolygonBezier of the drawing object to the Writer specific position,...
css::awt::Point ConvertPositionToHoriL2R(const css::awt::Point &rObjPos, const css::awt::Size &rObjSize)
method to convert the position (translation) of the drawing object to the layout direction horizontal...
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &aListener) override
void AdjustPositionProperties(const css::awt::Point &rPosition)
method to adjust the positioning properties
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual ~SwXShape() override
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getAnchor() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual void SAL_CALL setPosition(const css::awt::Point &aPosition) override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
static rtl::Reference< SwXTextEmbeddedObject > CreateXTextEmbeddedObject(SwDoc &rDoc, SwFrameFormat *pFrameFormat)
static SW_DLLPUBLIC rtl::Reference< SwXTextFrame > CreateXTextFrame(SwDoc &rDoc, SwFrameFormat *pFrameFormat)
static rtl::Reference< SwXTextGraphicObject > CreateXTextGraphicObject(SwDoc &rDoc, SwFrameFormat *pFrameFormat)
void set(sal_uInt16 nRow, sal_uInt16 nColumn, double fValue)
void translate(double fX, double fY)
double get(sal_uInt16 nRow, sal_uInt16 nColumn) const
const css::uno::Sequence< sal_Int8 > & getSeq() const
css::uno::Type const & get()
#define FN_ANCHOR_POSITION
#define FN_SHAPE_TRANSFORMATION_IN_HORI_L2R
#define FN_SHAPE_ENDPOSITION_IN_HORI_L2R
#define FN_SHAPE_STARTPOSITION_IN_HORI_L2R
#define FN_SHAPE_POSITION_LAYOUT_DIR
@ SetOnlyText
stay with the cursor inside text
EmbeddedObjectRef * pObject
constexpr sal_uInt16 RES_FRMATR_BEGIN(RES_PARATR_LIST_END)
constexpr TypedWhichId< SwFormatFrameSize > RES_FRM_SIZE(89)
constexpr TypedWhichId< SwFormatHoriOrient > RES_HORI_ORIENT(109)
constexpr TypedWhichId< SwFormatVertOrient > RES_VERT_ORIENT(108)
constexpr sal_uInt16 RES_FRMATR_END(141)
constexpr TypedWhichId< SvxOpaqueItem > RES_OPAQUE(105)
constexpr TypedWhichId< SwFlyFrameFormat > RES_FLYFRMFMT(162)
constexpr TypedWhichId< SwFormatWrapInfluenceOnObjPos > RES_WRAP_INFLUENCE_ON_OBJPOS(132)
constexpr TypedWhichId< SwDrawFrameFormat > RES_DRAWFRMFMT(165)
constexpr TypedWhichId< SwFormatFlyCnt > RES_TXTATR_FLYCNT(58)
constexpr TypedWhichId< SwFormatAnchor > RES_ANCHOR(110)
constexpr TypedWhichId< SwFormatChain > RES_CHAIN(120)
constexpr TypedWhichId< SwFormatSurround > RES_SURROUND(107)
constexpr TypedWhichId< SwFormatFollowTextFlow > RES_FOLLOW_TEXT_FLOW(130)
constexpr TypedWhichId< SvxLRSpaceItem > RES_LR_SPACE(97)
constexpr TypedWhichId< SvxULSpaceItem > RES_UL_SPACE(98)
Sequence< sal_Int8 > aSeq
#define SAL_WARN_IF(condition, area, stream)
#define SAL_WARN(area, stream)
sal_Int32 GetEnumAsInt32(const css::uno::Any &rVal)
B2DHomMatrix createTranslateB2DHomMatrix(double fTranslateX, double fTranslateY)
B2IRange fround(const B2DRange &rRange)
css::uno::Sequence< T > concatSequences(const css::uno::Sequence< T > &rS1, const Ss &... rSn)
sal_Int64 getSomething_cast(void *p)
css::uno::Sequence< OUString > getSupportedServiceNames()
OUString getImplementationName()
bool enum2int(sal_Int32 &rnEnum, const css::uno::Any &rAny)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
uno::Reference< util::XTheme > createXTheme(std::shared_ptr< model::Theme > const &pTheme)
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
constexpr auto toTwips(N number, Length from)
constexpr T saturating_add(T a, T b)
constexpr T saturating_sub(T a, T b)
std::enable_if<!(detail::IsDerivedReference< T >::value||detail::IsUnoSequenceType< T >::value||std::is_base_of< css::uno::XInterface, T >::value), typenamedetail::Optional< T >::type >::type tryAccess(css::uno::Any const &any)
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
bool XTextRangeToSwPaM(SwUnoInternalPaM &rToFill, const uno::Reference< text::XTextRange > &xTextRange, ::sw::TextRangeMode const eMode)
bool GetAtPageRelOrientation(sal_Int16 &rOrientation, bool const isIgnorePrintArea)
bool GoInDoc(SwPaM &rPam, SwMoveFnCollection const &fnMove)
SwMoveFnCollection const & fnMoveBackward
Marks a position in the document model.
sal_Int32 GetContentIndex() const
void AdjustContent(sal_Int32 nDelta)
Adjust content index, only valid to call this if the position points to a SwContentNode subclass.
Reference< XFrame > xFrame
Reference< XModel > xModel
SVXCORE_DLLPUBLIC E3dScene * DynCastE3dScene(SdrObject *)
::cppu::WeakImplHelper< css::lang::XServiceInfo, css::container::XEnumeration > SwSimpleEnumeration_Base
SwUnoPropertyMapProvider aSwMapProvider
#define WID_PAGE_BACKFULL
#define PROPERTY_MAP_TEXT_PAGE
#define WID_PAGE_USERATTRIBS
#define PROPERTY_MAP_TEXT_SHAPE
#define MID_HORIORIENT_RELATION
#define MID_FRMSIZE_REL_WIDTH_RELATION
#define MID_FRMSIZE_REL_HEIGHT_RELATION
#define MID_ANCHOR_ANCHORFRAME
#define MID_FRMSIZE_REL_WIDTH
#define MID_FRMSIZE_REL_HEIGHT
#define MID_ANCHOR_ANCHORTYPE
#define MID_CHAIN_PREVNAME
#define MID_CHAIN_NEXTNAME
#define MID_TEXT_BOX_CONTENT