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);
409 std::unique_ptr<model::Theme> pTheme(
new model::Theme(rUnoTheme.getTheme()));
429 throw beans::UnknownPropertyException(rPropertyName,
static_cast<cppu::OWeakObject*
>(
this));
440 switch (pEntry ? pEntry->
nWID : -1)
444 css::uno::Reference<css::util::XTheme> xTheme;
446 auto const& pTheme = GetSdrPage()->getSdrPageProperties().GetTheme();
455 const sal_uInt16 nPageNumber(GetSdrPage()->GetPageNum());
456 aAny <<= o3tl::narrowing<sal_Int16>(nPageNumber);
474 throw beans::UnknownPropertyException(rPropertyName,
static_cast<cppu::OWeakObject*
>(
this));
480 const uno::Reference<beans::XPropertyChangeListener> & )
482 OSL_FAIL(
"not implemented");
486 const uno::Reference<beans::XPropertyChangeListener> & )
488 OSL_FAIL(
"not implemented");
492 const uno::Reference<beans::XVetoableChangeListener> & )
494 OSL_FAIL(
"not implemented");
498 const uno::Reference<beans::XVetoableChangeListener> & )
500 OSL_FAIL(
"not implemented");
505 class SwXShapesEnumeration
509 std::vector< css::uno::Any > m_aShapes;
511 virtual ~SwXShapesEnumeration()
override {};
513 explicit SwXShapesEnumeration(
SwFmDrawPage*
const pDrawPage);
516 virtual sal_Bool SAL_CALL hasMoreElements()
override;
517 virtual uno::Any SAL_CALL nextElement()
override;
526SwXShapesEnumeration::SwXShapesEnumeration(
SwFmDrawPage*
const pDrawPage)
530 m_aShapes.reserve(nCount);
531 for(sal_Int32 nIdx = 0; nIdx <
nCount; nIdx++)
533 uno::Reference<drawing::XShape> xShape(pDrawPage->
getByIndex(nIdx), uno::UNO_QUERY);
534 m_aShapes.push_back(
uno::Any(xShape));
538sal_Bool SwXShapesEnumeration::hasMoreElements()
541 return !m_aShapes.empty();
544uno::Any SwXShapesEnumeration::nextElement()
547 if(m_aShapes.empty())
548 throw container::NoSuchElementException();
549 uno::Any aResult = m_aShapes.back();
550 m_aShapes.pop_back();
554OUString SwXShapesEnumeration::getImplementationName()
556 return "SwXShapeEnumeration";
559sal_Bool SwXShapesEnumeration::supportsService(
const OUString& ServiceName)
564uno::Sequence< OUString > SwXShapesEnumeration::getSupportedServiceNames()
566 return { OUString(
"com.sun.star.container.XEnumeration") };
572 return uno::Reference< container::XEnumeration >(
573 new SwXShapesEnumeration(
this));
578 return "SwFmDrawPage";
588 return {
"com.sun.star.drawing.GenericDrawPage" };
595 throw uno::RuntimeException();
606 throw uno::RuntimeException();
608 throw lang::IndexOutOfBoundsException();
622 throw uno::RuntimeException();
632 throw uno::RuntimeException();
633 uno::Reference< lang::XUnoTunnel > xShapeTunnel(xShape, uno::UNO_QUERY);
634 SwXShape* pShape = comphelper::getFromUnoTunnel<SwXShape>(xShapeTunnel);
635 SvxShape* pSvxShape = comphelper::getFromUnoTunnel<SvxShape>(xShapeTunnel);
639 throw uno::RuntimeException(
"illegal object",
656 OSL_ENSURE(pSvxShape,
"Why is here no SvxShape?");
665 bool bOpaque =
false;
687 pHori->
SetPos( nHoriPos );
699 pVert->
SetPos( nVertPos );
734 std::unique_ptr<SwUnoInternalPaM> pInternalPam;
735 uno::Reference< text::XTextRange > xRg;
740 throw uno::RuntimeException();
742 if(RndStdIds::FLY_AT_FLY == aAnchor.
GetAnchorId() &&
743 !pInternalPam->GetPointNode().FindFlyStartNode())
745 aAnchor.
SetType(RndStdIds::FLY_AS_CHAR);
747 else if (RndStdIds::FLY_AT_PAGE == aAnchor.
GetAnchorId()
750 aAnchor.
SetAnchor(pInternalPam->Start());
751 aAnchor.
SetType(RndStdIds::FLY_AT_CHAR);
767 aAnchor.
SetType(RndStdIds::FLY_AT_PAGE);
773 SwPaM* pTemp = pInternalPam.get();
787 if (pFormat->
GetName().isEmpty())
796 pInternalPam.reset();
803 throw uno::RuntimeException();
808 uno::Reference<lang::XComponent> xComp(xTextFrame, uno::UNO_QUERY);
813 uno::Reference<lang::XComponent> xComp(xShape, uno::UNO_QUERY);
817uno::Reference< drawing::XShapeGroup >
SwFmDrawPage::group(
const uno::Reference< drawing::XShapes > & xShapes)
820 if(!
m_pDoc || !xShapes.is())
821 throw uno::RuntimeException();
822 uno::Reference< drawing::XShapeGroup > xRet;
831 pObj))->GetAnchor().GetAnchorId())
833 throw lang::IllegalArgumentException(
834 "Shape must not have 'as character' anchor!",
nullptr, 0);
844 RndStdIds::FLY_AT_PARA,
860 throw uno::RuntimeException();
868 RndStdIds::FLY_AT_PARA,
885 return theSwXShapeUnoTunnelId.
getSeq();
890 if( comphelper::isUnoTunnelId<SwXShape>(rId) )
899 if(
auto xAggTunnel =
o3tl::tryAccess<uno::Reference<lang::XUnoTunnel>>(
903 return (*xAggTunnel)->getSomething(rId);
912 auto pProvider = std::make_unique<svx::PropertyValueProvider>( _rShape,
"AnchorType" );
918 uno::Reference<uno::XInterface> & xShape,
919 SwDoc const*
const pDoc)
925 , m_bDescriptor(true)
933 uno::Any aAgg = xShape->queryInterface(rAggType);
940 "<SwXShape::SwXShape(..)> - no XShape found at <xShapeAgg>" );
956 lcl_addShapePropertyEventFactories( *pObj, *
this );
957 m_pImpl->m_bInitializedPropertyNotifier =
true;
968 OSL_ENSURE( pCurrent,
"SwXShape::AddExistingShapeToFormat: invalid object list element!" );
972 auto pSwShape = comphelper::getFromUnoTunnel<SwXShape>(pCurrent->
getWeakUnoShape());
975 if ( pSwShape->m_bDescriptor )
979 pSwShape->SetFrameFormat(pFormat);
980 pSwShape->m_bDescriptor =
false;
983 if ( !pSwShape->m_pImpl->m_bInitializedPropertyNotifier )
985 lcl_addShapePropertyEventFactories( *pCurrent, *pSwShape );
986 pSwShape->m_pImpl->m_bInitializedPropertyNotifier =
true;
998 uno::Reference< uno::XInterface > xRef;
1022 aRet = SwXShapeBaseClass::queryInterface(aType);
1029 aRet <<= uno::Reference<XShape>(
this);
1038 uno::Sequence< uno::Type > aRet = SwXShapeBaseClass::getTypes();
1044 uno::Reference< XTypeProvider > xAggProv;
1054 return css::uno::Sequence<sal_Int8>();
1066 if(
auto xPrSet =
o3tl::tryAccess<uno::Reference<beans::XPropertySet>>(
1069 uno::Reference< beans::XPropertySetInfo > xInfo = (*xPrSet)->getPropertySetInfo();
1071 const uno::Sequence<beans::Property> aPropSeq = xInfo->getProperties();
1091 if ( pEntry->
nFlags & beans::PropertyAttribute::READONLY)
1092 throw beans::PropertyVetoException (
"Property is read-only: " + rPropertyName,
static_cast < cppu::OWeakObject *
> (
this ) );
1101 uno::Reference<text::XTextFrame>
xFrame;
1104 SwXFrame* pFrame =
dynamic_cast<SwXFrame*
>(
xFrame.get());
1105 if(pFrame && pFrame->GetFrameFormat() &&
1106 pFrame->GetFrameFormat()->GetDoc() == pDoc)
1112 SwPosition aPos(*pFrame->GetFrameFormat()->GetContent().GetContentIdx());
1114 aAnchor.
SetType(RndStdIds::FLY_AT_FLY);
1115 aItemSet.Put(aAnchor);
1121 throw lang::IllegalArgumentException();
1126 SAL_WARN_IF(!pSvxShape,
"sw.uno",
"No SvxShape found!");
1135 pObj->
SetLayer( *o3tl::doAccess<bool>(aValue)
1151 if (aAnchor.
GetAnchorId() == RndStdIds::FLY_AT_PAGE)
1154 throw lang::IllegalArgumentException();
1157 std::unique_ptr<SwUnoInternalPaM> pInternalPam(
1159 uno::Reference< text::XTextRange > xRg;
1163 throw uno::RuntimeException();
1166 if (aAnchor.
GetAnchorId() == RndStdIds::FLY_AS_CHAR)
1178 assert(pHint &&
"Missing Hint.");
1180 "sw.uno",
"Missing FlyInCnt-Hint." );
1182 "sw.uno",
"Wrong TextFlyCnt-Hint." );
1190 SAL_WARN_IF( !pNd,
"sw.uno",
"Cursor not at TextNode." );
1192 pNd->
InsertItem(aFormat, pInternalPam->GetPoint()
1193 ->GetContentIndex(), 0 );
1199 aAnchor.
SetAnchor( pInternalPam->GetPoint() );
1219 if (aValue.getValueType()
1222 aValue.get<uno::Reference<text::XTextFrame>>());
1224 SAL_WARN(
"sw.uno",
"This is not a TextFrame!" );
1236 sal_Int16 nPositionLayoutDir = 0;
1237 aValue >>= nPositionLayoutDir;
1249 sal_Int32 nAnchor = 0;
1266 SAL_WARN_IF(!pSvxShape,
"sw.uno",
"No SvxShape found!");
1270 sal_Int16 nPercent(100);
1271 aValue >>= nPercent;
1291 && aSet.
Get(
RES_ANCHOR).GetAnchorId() == RndStdIds::FLY_AT_PAGE)
1294 sal_Int16 nRelOrient(text::RelOrientation::PAGE_FRAME);
1295 aValue >>= nRelOrient;
1298 SAL_WARN(
"sw.core",
"SwXShape: fixing invalid horizontal RelOrientation for at-page anchor");
1299 value <<= nRelOrient;
1310 bool bSetAttr =
true;
1319 if( text::TextContentAnchorType_AS_CHARACTER != eNewAnchor &&
1320 (RndStdIds::FLY_AS_CHAR == eOldAnchorId))
1331 assert(pHint &&
"Missing Hint.");
1333 "sw.uno",
"Missing FlyInCnt-Hint." );
1335 "sw.uno",
"Wrong TextFlyCnt-Hint." );
1342 else if( text::TextContentAnchorType_AT_PAGE != eNewAnchor &&
1343 (RndStdIds::FLY_AT_PAGE == eOldAnchorId))
1362 aSet.
Put( aNewAnchor );
1366 if( text::TextContentAnchorType_AS_CHARACTER == eNewAnchor &&
1367 (RndStdIds::FLY_AS_CHAR != eOldAnchorId))
1383 SAL_WARN_IF( !pNd,
"sw.uno",
"Cursor is not in a TextNode." );
1391 aSet.
Put( aNewAnchor );
1417 switch(pEntry->
nWID)
1420 pItem =
m_pImpl->GetAnchor(
true);
1423 pItem =
m_pImpl->GetHOrient(
true);
1426 pItem =
m_pImpl->GetVOrient(
true);
1429 pItem =
m_pImpl->GetLRSpace(
true);
1432 pItem =
m_pImpl->GetULSpace(
true);
1435 pItem =
m_pImpl->GetSurround(
true);
1439 uno::Reference<text::XTextRange>>(aValue))
1441 uno::Reference< text::XTextRange > & rRange =
m_pImpl->GetTextRange();
1446 m_pImpl->SetOpaque(*o3tl::doAccess<bool>(aValue));
1451 pItem =
m_pImpl->GetFollowTextFlow(
true );
1457 pItem =
m_pImpl->GetWrapInfluenceOnObjPos(
true );
1463 sal_Int16 nPositionLayoutDir = 0;
1464 aValue >>= nPositionLayoutDir;
1465 m_pImpl->SetPositionLayoutDir( nPositionLayoutDir );
1478 auto xPrSet = o3tl::tryAccess<uno::Reference<beans::XPropertySet>>(
1481 throw uno::RuntimeException();
1486 awt::Point aKeepedPosition( 0, 0 );
1487 if ( rPropertyName ==
"CaptionPoint" &&
getShapeType() ==
"com.sun.star.drawing.CaptionShape" )
1494 (*xPrSet)->setPropertyValue(rPropertyName, aValue);
1497 (*xPrSet)->setPropertyValue(rPropertyName, aValue);
1507 if ( rPropertyName ==
"CaptionPoint" &&
getShapeType() ==
"com.sun.star.drawing.CaptionShape" )
1529 OSL_ENSURE(pSvxShape,
"No SvxShape found!");
1542 OSL_ENSURE(pSvxShape,
"No SvxShape found!");
1556 if (aAnchor.
GetAnchorId() == RndStdIds::FLY_AT_PAGE)
1572 aRet <<= uno::Reference<text::XTextRange>(xTextRange);
1589 ((pSvxShape && pSvxShape->GetSdrObject()) ? pSvxShape->GetSdrObject()
1599 uno::Reference<text::XTextFrame>
xFrame(xRange, uno::UNO_QUERY);
1646 SAL_WARN_IF(!pSvxShape,
"sw.uno",
"No SvxShape found!");
1680 switch(pEntry->
nWID)
1686 pItem =
m_pImpl->GetHOrient();
1689 pItem =
m_pImpl->GetVOrient();
1692 pItem =
m_pImpl->GetLRSpace();
1695 pItem =
m_pImpl->GetULSpace();
1698 pItem =
m_pImpl->GetSurround();
1701 aRet <<=
m_pImpl->GetTextRange();
1704 aRet <<=
m_pImpl->GetOpaque();
1708 aRet <<= awt::Point();
1714 pItem =
m_pImpl->GetFollowTextFlow();
1720 pItem =
m_pImpl->GetWrapInfluenceOnObjPos();
1733 aRet <<=
m_pImpl->GetPositionLayoutDir();
1762 if ( rPropertyName ==
"Transformation" )
1764 drawing::HomogenMatrix3 aMatrix;
1769 else if ( rPropertyName ==
"StartPosition" )
1771 awt::Point aStartPos;
1776 else if ( rPropertyName ==
"EndPosition" )
1784 else if ( rPropertyName ==
"PolyPolygonBezier" )
1786 drawing::PolyPolygonBezierCoords aPath;
1790 else if (rPropertyName ==
"ZOrder")
1798 bool bConvert =
true;
1801 if (pSvxShape->GetSdrObject() != pObj)
1823 auto xPrSet = o3tl::tryAccess<uno::Reference<beans::XPropertySet>>(aPSet);
1826 throw uno::RuntimeException();
1828 aRet = (*xPrSet)->getPropertyValue( _rPropertyName );
1836 uno::Sequence< OUString > aNames { rPropertyName };
1838 return aStates.getConstArray()[0];
1842 const uno::Sequence< OUString >& aPropertyNames )
1846 uno::Sequence< beans::PropertyState > aRet(aPropertyNames.getLength());
1848 throw uno::RuntimeException();
1851 bool bGroupMember =
false;
1852 bool bFormControl =
false;
1856 bGroupMember =
pObject->getParentSdrObjectFromSdrObject() !=
nullptr;
1857 bFormControl =
pObject->GetObjInventor() == SdrInventor::FmForm;
1859 const OUString* pNames = aPropertyNames.getConstArray();
1860 beans::PropertyState* pRet = aRet.getArray();
1861 uno::Reference< XPropertyState > xShapePrState;
1862 for(sal_Int32 nProperty = 0; nProperty < aPropertyNames.getLength(); nProperty++)
1868 pRet[nProperty] = bFormControl ?
1869 beans::PropertyState_DEFAULT_VALUE : beans::PropertyState_DIRECT_VALUE;
1871 pRet[nProperty] = beans::PropertyState_DIRECT_VALUE;
1873 pRet[nProperty] = beans::PropertyState_DIRECT_VALUE;
1874 else if(bGroupMember)
1875 pRet[nProperty] = beans::PropertyState_DEFAULT_VALUE;
1879 pRet[nProperty] = beans::PropertyState_DIRECT_VALUE;
1886 pRet[nProperty] = beans::PropertyState_DIRECT_VALUE;
1888 pRet[nProperty] = beans::PropertyState_DEFAULT_VALUE;
1895 if(SfxItemState::SET == eItemState)
1896 pRet[nProperty] = beans::PropertyState_DIRECT_VALUE;
1897 else if(SfxItemState::DEFAULT == eItemState)
1898 pRet[nProperty] = beans::PropertyState_DEFAULT_VALUE;
1900 pRet[nProperty] = beans::PropertyState_AMBIGUOUS_VALUE;
1905 switch(pEntry->
nWID)
1911 pItem =
m_pImpl->GetHOrient();
1914 pItem =
m_pImpl->GetVOrient();
1917 pItem =
m_pImpl->GetLRSpace();
1920 pItem =
m_pImpl->GetULSpace();
1923 pItem =
m_pImpl->GetSurround();
1928 pItem =
m_pImpl->GetWrapInfluenceOnObjPos();
1933 pRet[nProperty] = beans::PropertyState_DIRECT_VALUE;
1935 pRet[nProperty] = beans::PropertyState_DEFAULT_VALUE;
1940 if(!xShapePrState.is())
1944 auto ps = o3tl::tryAccess<uno::Reference<XPropertyState>>(
1947 throw uno::RuntimeException();
1948 xShapePrState = *ps;
1950 pRet[nProperty] = xShapePrState->getPropertyState(pNames[nProperty]);
1962 throw uno::RuntimeException();
1967 if ( pEntry->
nFlags & beans::PropertyAttribute::READONLY)
1968 throw uno::RuntimeException(
"Property is read-only: " + rPropertyName,
static_cast < cppu::OWeakObject *
> (
this ) );
1979 switch(pEntry->
nWID)
1993 m_pImpl->RemoveFollowTextFlow();
1999 m_pImpl->RemoveWrapInfluenceOnObjPos();
2009 auto xShapePrState = o3tl::tryAccess<uno::Reference<XPropertyState>>(
2012 throw uno::RuntimeException();
2013 (*xShapePrState)->setPropertyToDefault( rPropertyName );
2024 throw uno::RuntimeException();
2030 throw uno::RuntimeException();
2041 auto xShapePrState = o3tl::tryAccess<uno::Reference<XPropertyState>>(
2044 throw uno::RuntimeException();
2045 (*xShapePrState)->getPropertyDefault( rPropertyName );
2052 const OUString& _propertyName,
2053 const uno::Reference< beans::XPropertyChangeListener > & _listener )
2056 throw uno::RuntimeException(
"no shape aggregate", *
this );
2059 uno::Reference< beans::XPropertySet > xShapeProps;
2061 xShapeProps->addPropertyChangeListener( _propertyName, _listener );
2065 const OUString& _propertyName,
2066 const uno::Reference< beans::XPropertyChangeListener > & _listener)
2069 throw uno::RuntimeException(
"no shape aggregate", *
this );
2072 uno::Reference< beans::XPropertySet > xShapeProps;
2074 xShapeProps->removePropertyChangeListener( _propertyName, _listener );
2079 const uno::Reference< beans::XVetoableChangeListener > & )
2081 OSL_FAIL(
"not implemented");
2086 const uno::Reference< beans::XVetoableChangeListener > & )
2088 OSL_FAIL(
"not implemented");
2093 if(rHint.
GetId() == SfxHintId::Dying)
2106 const SwDoc* pDoc =
nullptr;
2107 if (
auto pRange =
dynamic_cast<SwXTextRange*
>(xTextRange.get()))
2108 pDoc = &pRange->GetDoc();
2109 else if (
auto pText =
dynamic_cast<SwXText*
>(xTextRange.get()))
2110 pDoc = pText->GetDoc();
2111 else if (
auto pCursor =
dynamic_cast<OTextCursorHelper*
>(xTextRange.get()))
2112 pDoc = pCursor->GetDoc();
2113 else if (
auto pPortion =
dynamic_cast<SwXTextPortion*
>(xTextRange.get()))
2114 pDoc = &pPortion->GetCursor().GetDoc();
2115 else if (
auto pParagraph =
dynamic_cast<SwXParagraph*
>(xTextRange.get());
2117 pDoc = &pParagraph->GetTextNode()->GetDoc();
2120 throw uno::RuntimeException();
2126 uno::Reference< drawing::XDrawPageSupplier > xDPS(
xModel, uno::UNO_QUERY);
2129 uno::Reference< drawing::XDrawPage > xDP( xDPS->getDrawPage() );
2133 aPos <<= xTextRange;
2135 uno::Reference< drawing::XShape > xTemp(
static_cast<cppu::OWeakObject*
>(
this), uno::UNO_QUERY );
2144 uno::Reference< text::XTextRange > aRef;
2151 if ((rAnchor.
GetAnchorId() != RndStdIds::FLY_AT_PAGE) ||
2154 if (rAnchor.
GetAnchorId() == RndStdIds::FLY_AT_PARA)
2166 aRef =
m_pImpl->GetTextRange().get();
2183 OSL_ENSURE( !pObj ||
2187 "<SwXShape::dispose(..) - different 'master' drawing objects!!" );
2198 if (rFormatAnchor.
GetAnchorId() == RndStdIds::FLY_AS_CHAR)
2211 uno::Reference<XComponent> xComp;
2225 const uno::Reference< lang::XEventListener > & aListener)
2233 const uno::Reference< lang::XEventListener > & aListener)
2252 uno::Sequence< OUString >
aSeq;
2254 aSeq = pSvxShape->getSupportedServiceNames();
2256 aSeq, std::initializer_list<std::u16string_view>{
u"com.sun.star.drawing.Shape" });
2262 return comphelper::getFromUnoTunnel<SvxShape>(
m_xShapeAgg);
2281 uno::Reference< drawing::XShape > xGroupShape( pTopGroupObj->
getUnoShape(), uno::UNO_QUERY );
2282 aPos = xGroupShape->getPosition();
2291 awt::Point aOffset( 0, 0 );
2293 aOffset.X = ( aMemberObjRect.
Left() - aGroupObjRect.
Left() );
2294 aOffset.Y = ( aMemberObjRect.
Top() - aGroupObjRect.
Top() );
2298 aPos.X += aOffset.X;
2299 aPos.Y += aOffset.Y;
2309 if ( !pTopGroupObj )
2314 bool bApplyPosAtDrawObj(
false);
2315 bool bNoAdjustOfPosProp(
false);
2328 bApplyPosAtDrawObj =
true;
2332 bNoAdjustOfPosProp =
true;
2338 if ( !bNoAdjustOfPosProp )
2342 if ( bApplyPosAtDrawObj )
2344 mxShape->setPosition( aPosition );
2350 awt::Point aNewPos( aPosition );
2361 uno::Reference< drawing::XShape > xGroupShape( pTopGroupObj->
getUnoShape(), uno::UNO_QUERY );
2366 awt::Point aAttrPosInHoriL2R(
2368 xGroupShape->getSize() ) );
2378 auto pSvxGroupShape = comphelper::getFromUnoTunnel<SvxShape>(pTopGroupObj->
getUnoShape());
2379 const awt::Point aGroupPos = pSvxGroupShape->getPosition();
2384 mxShape->setPosition( aNewPos );
2414 return mxShape->getShapeType();
2439 return pTopGroupObj;
2447 awt::Point aAttrPos;
2450 aHoriPos >>= aAttrPos.X;
2452 aVertPos >>= aAttrPos.Y;
2462 aAttrPos.X == 0 && aAttrPos.Y == 0 )
2471 text::TextContentAnchorType eTextAnchorType =
2472 text::TextContentAnchorType_AT_PARAGRAPH;
2475 aAny >>= eTextAnchorType;
2477 if ( eTextAnchorType == text::TextContentAnchorType_AS_CHARACTER )
2490 const awt::Size& rObjSize )
2492 awt::Point aObjPosInHoriL2R( rObjPos );
2498 switch ( eLayoutDir )
2507 aObjPosInHoriL2R.X = -rObjPos.X - rObjSize.Width;
2512 aObjPosInHoriL2R.X = -rObjPos.Y - rObjSize.Width;
2513 aObjPosInHoriL2R.Y = rObjPos.X;
2518 OSL_FAIL(
"<SwXShape::ConvertPositionToHoriL2R(..)> - unsupported layout direction" );
2523 return aObjPosInHoriL2R;
2531 const drawing::HomogenMatrix3& rMatrixInHoriL2R )
2533 drawing::HomogenMatrix3 aMatrix(rMatrixInHoriL2R);
2538 OSL_ENSURE( pSvxShape,
2539 "<SwXShape::ConvertTransformationToLayoutDir(..)> - no SvxShape found!");
2544 "<SwXShape::ConvertTransformationToLayoutDir(..)> - no SdrObject found!");
2551 const awt::Point aObjPos(
2556 const awt::Point aTranslateDiff( aPos.X - aObjPos.X,
2557 aPos.Y - aObjPos.Y );
2559 if ( aTranslateDiff.X != 0 || aTranslateDiff.Y != 0 )
2564 aTempMatrix.
set(0, 0, aMatrix.Line1.Column1 );
2565 aTempMatrix.
set(0, 1, aMatrix.Line1.Column2 );
2566 aTempMatrix.
set(0, 2, aMatrix.Line1.Column3 );
2567 aTempMatrix.
set(1, 0, aMatrix.Line2.Column1 );
2568 aTempMatrix.
set(1, 1, aMatrix.Line2.Column2 );
2569 aTempMatrix.
set(1, 2, aMatrix.Line2.Column3 );
2570 aTempMatrix.
set(2, 0, aMatrix.Line3.Column1 );
2571 aTempMatrix.
set(2, 1, aMatrix.Line3.Column2 );
2572 aTempMatrix.
set(2, 2, aMatrix.Line3.Column3 );
2574 aTempMatrix.
translate( aTranslateDiff.X, aTranslateDiff.Y );
2575 aMatrix.Line1.Column1 = aTempMatrix.
get(0, 0);
2576 aMatrix.Line1.Column2 = aTempMatrix.
get(0, 1);
2577 aMatrix.Line1.Column3 = aTempMatrix.
get(0, 2);
2578 aMatrix.Line2.Column1 = aTempMatrix.
get(1, 0);
2579 aMatrix.Line2.Column2 = aTempMatrix.
get(1, 1);
2580 aMatrix.Line2.Column3 = aTempMatrix.
get(1, 2);
2581 aMatrix.Line3.Column1 = aTempMatrix.
get(2, 0);
2582 aMatrix.Line3.Column2 = aTempMatrix.
get(2, 1);
2583 aMatrix.Line3.Column3 = aTempMatrix.
get(2, 2);
2599 text::TextContentAnchorType eTextAnchorType =
2600 text::TextContentAnchorType_AT_PARAGRAPH;
2603 aAny >>= eTextAnchorType;
2605 if ( eTextAnchorType != text::TextContentAnchorType_AS_CHARACTER )
2608 static const OUStringLiteral aHoriPosPropStr(
u"HoriOrientPosition");
2610 sal_Int32 dCurrX = 0;
2611 aHoriPos >>= dCurrX;
2613 if ( dCurrX != rPosition.X )
2617 static const OUStringLiteral aHoriOrientPropStr(
u"HoriOrient");
2619 sal_Int16 eHoriOrient;
2620 if (aHoriOrient >>= eHoriOrient)
2625 aHoriOrient <<= eHoriOrient;
2630 aHoriPos <<= rPosition.X;
2638 static const OUStringLiteral aVertPosPropStr(
u"VertOrientPosition");
2640 sal_Int32 dCurrY = 0;
2641 aVertPos >>= dCurrY;
2643 if ( dCurrY != rPosition.Y )
2647 static const OUStringLiteral aVertOrientPropStr(
u"VertOrient");
2649 sal_Int16 eVertOrient;
2650 if (aVertOrient >>= eVertOrient)
2655 aVertOrient <<= eVertOrient;
2660 aVertPos <<= rPosition.Y;
2671 const css::awt::Point& aStartOrEndPos )
2673 awt::Point aConvertedPos( aStartOrEndPos );
2676 OSL_ENSURE( pSvxShape,
2677 "<SwXShape::ConvertStartOrEndPosToLayoutDir(..)> - no SvxShape found!");
2682 "<SwXShape::ConvertStartOrEndPosToLayoutDir(..)> - no SdrObject found!");
2689 const awt::Point aObjPos(
2694 const awt::Point aTranslateDiff( aPos.X - aObjPos.X,
2695 aPos.Y - aObjPos.Y );
2697 if ( aTranslateDiff.X != 0 || aTranslateDiff.Y != 0 )
2699 aConvertedPos.X = aConvertedPos.X + aTranslateDiff.X;
2700 aConvertedPos.Y = aConvertedPos.Y + aTranslateDiff.Y;
2705 return aConvertedPos;
2709 const css::drawing::PolyPolygonBezierCoords& aPath )
2711 drawing::PolyPolygonBezierCoords aConvertedPath( aPath );
2714 OSL_ENSURE( pSvxShape,
2715 "<SwXShape::ConvertStartOrEndPosToLayoutDir(..)> - no SvxShape found!");
2720 "<SwXShape::ConvertStartOrEndPosToLayoutDir(..)> - no SdrObject found!");
2727 const awt::Point aObjPos(
2732 const awt::Point aTranslateDiff( aPos.X - aObjPos.X,
2733 aPos.Y - aObjPos.Y );
2735 if ( aTranslateDiff.X != 0 || aTranslateDiff.Y != 0 )
2738 aTranslateDiff.X, aTranslateDiff.Y));
2740 for(drawing::PointSequence& rInnerSequence : asNonConstRange(aConvertedPath.Coordinates))
2742 for(awt::Point& rPoint : asNonConstRange(rInnerSequence))
2745 aNewCoordinatePair *= aMatrix;
2754 return aConvertedPath;
2758 SwDoc const*
const pDoc)
2761#if OSL_DEBUG_LEVEL > 0
2762 uno::Reference<XShapes> xShapes(
m_xShapeAgg, uno::UNO_QUERY);
2763 OSL_ENSURE(xShapes.is(),
"no SvxShape found or shape is not a group shape");
2775 aRet <<= uno::Reference<XShapes>(
this);
2783 SwXShape::acquire();
2788 SwXShape::release();
2796 if(!(pSvxShape && pFormat))
2797 throw uno::RuntimeException();
2799 uno::Reference<XShapes> xShapes;
2807 throw uno::RuntimeException();
2809 xShapes->add(xShape);
2812 uno::Reference<lang::XUnoTunnel> xTunnel(xShape, uno::UNO_QUERY);
2813 SwXShape* pSwShape = comphelper::getFromUnoTunnel<SwXShape>(xTunnel);
2817 SvxShape* pAddShape = comphelper::getFromUnoTunnel<SvxShape>(xTunnel);
2850 uno::Reference<XShapes> xShapes;
2858 throw uno::RuntimeException();
2859 xShapes->remove(xShape);
2865 uno::Reference<XIndexAccess> xAcc;
2873 throw uno::RuntimeException();
2874 return xAcc->getCount();
2880 uno::Reference<XIndexAccess> xAcc;
2888 throw uno::RuntimeException();
2889 return xAcc->getByIndex(
nIndex);
2895 uno::Reference<XIndexAccess> xAcc;
2903 throw uno::RuntimeException();
2904 return xAcc->getElementType();
2910 uno::Reference<XIndexAccess> xAcc;
2918 throw uno::RuntimeException();
2919 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.
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::unique_ptr< model::Theme > 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
void SetFrameFormat(SwFrameFormat *pFormat)
SwFrameFormat * m_pFormat
SwShapeDescriptor_Impl * GetDescImpl()
static void AddExistingShapeToFormat(SdrObject const &_rObj)
virtual OUString SAL_CALL getShapeType() override
virtual void Notify(const SfxHint &) 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)
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