22#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
23#include <com/sun/star/lang/ServiceNotRegisteredException.hpp>
24#include <com/sun/star/lang/NoSupportException.hpp>
25#include <com/sun/star/drawing/XShape.hpp>
55#include <com/sun/star/text/textfield/Type.hpp>
63#define QUERYINT( xint ) \
64 if( rType == cppu::UnoType<xint>::get() ) \
65 aAny <<= uno::Reference< xint >(this)
78 virtual css::uno::Reference< css::drawing::XDrawPage > SAL_CALL
insertNewByIndex( sal_Int32 nIndex )
override;
79 virtual void SAL_CALL
remove(
const css::uno::Reference< css::drawing::XDrawPage >& xPage )
override;
82 virtual sal_Int32 SAL_CALL
getCount()
override ;
100 { SvMacroItemId::OnMouseOver,
"OnMouseOver" },
101 { SvMacroItemId::OnMouseOut,
"OnMouseOut" },
102 { SvMacroItemId::NONE,
nullptr }
105 return aMacroDescriptionsImpl;
118 const SdrPage* pPage =
nullptr;
132 aEvent.EventName =
"PageOrderModified";
136 aEvent.EventName =
"ShapeModified";
140 aEvent.EventName =
"ShapeInserted";
144 aEvent.EventName =
"ShapeRemoved";
166css::uno::Reference<css::uno::XInterface>
create(
167 OUString
const & rServiceSpecifier, OUString
const & referer)
169 if( rServiceSpecifier.startsWith(
"com.sun.star.drawing.") )
179 else if (rServiceSpecifier ==
"com.sun.star.document.ImportGraphicStorageHandler")
182 uno::Reference< uno::XInterface> xRet(
static_cast< ::
cppu::OWeakObject*
>( pGraphicHelper.get() ) );
185 else if (rServiceSpecifier ==
"com.sun.star.text.TextColumns")
192 throw lang::ServiceNotRegisteredException(
"unknown service: " + rServiceSpecifier);
201 return create(rServiceSpecifier,
"");
212 if ((ServiceSpecifier ==
"com.sun.star.drawing.GraphicObjectShape"
213 || ServiceSpecifier ==
"com.sun.star.drawing.MediaShape")
214 && Arguments.getLength() == 1 && (Arguments[0] >>= arg))
216 return create(ServiceSpecifier, arg);
218 throw lang::NoSupportException();
228 OSL_ENSURE(
mpDoc,
"No SdrModel in UnoDrawingModel, should not happen");
247 else QUERYINT(lang::XMultiServiceFactory);
248 else QUERYINT(drawing::XDrawPagesSupplier);
249 else QUERYINT(css::ucb::XAnyCompareFactory);
273 return css::uno::Sequence<sal_Int8>();
302 if( !xDrawPages.is() )
313 if( aServiceSpecifier ==
"com.sun.star.drawing.DashTable" )
319 if( aServiceSpecifier ==
"com.sun.star.drawing.GradientTable" )
325 if( aServiceSpecifier ==
"com.sun.star.drawing.HatchTable" )
331 if( aServiceSpecifier ==
"com.sun.star.drawing.BitmapTable" )
337 if( aServiceSpecifier ==
"com.sun.star.drawing.TransparencyGradientTable" )
343 if( aServiceSpecifier ==
"com.sun.star.drawing.MarkerTable" )
349 if( aServiceSpecifier ==
"com.sun.star.text.NumberingRules" )
354 if ( aServiceSpecifier ==
"com.sun.star.image.ImageMapRectangleObject" )
359 if ( aServiceSpecifier ==
"com.sun.star.image.ImageMapCircleObject" )
364 if ( aServiceSpecifier ==
"com.sun.star.image.ImageMapPolygonObject" )
369 if( aServiceSpecifier ==
"com.sun.star.text.TextField.DateTime" )
374 uno::Reference< uno::XInterface > xRet;
376 static const OUStringLiteral aPackagePrefix(
u"com.sun.star.presentation." );
377 if( aServiceSpecifier.startsWith( aPackagePrefix ) )
382 std::u16string_view aTypeName = aServiceSpecifier.subView( aPackagePrefix.getLength() );
446 throw lang::ServiceNotRegisteredException();
451 pShape = xNewShape.get();
457 xRet =
static_cast<uno::XWeak*
>(pShape);
471 uno::Sequence< OUString > aSNS{
472 "com.sun.star.drawing.DashTable",
473 "com.sun.star.drawing.GradientTable",
474 "com.sun.star.drawing.HatchTable",
475 "com.sun.star.drawing.BitmapTable",
476 "com.sun.star.drawing.TransparencyGradientTable",
477 "com.sun.star.drawing.MarkerTable",
478 "com.sun.star.text.NumberingRules",
479 "com.sun.star.image.ImageMapRectangleObject",
480 "com.sun.star.image.ImageMapCircleObject",
481 "com.sun.star.image.ImageMapPolygonObject",
483 "com.sun.star.presentation.TitleTextShape",
484 "com.sun.star.presentation.OutlinerShape",
485 "com.sun.star.presentation.SubtitleShape",
486 "com.sun.star.presentation.GraphicObjectShape",
487 "com.sun.star.presentation.ChartShape",
488 "com.sun.star.presentation.PageShape",
489 "com.sun.star.presentation.OLE2Shape",
490 "com.sun.star.presentation.TableShape",
491 "com.sun.star.presentation.OrgChartShape",
492 "com.sun.star.presentation.NotesShape",
493 "com.sun.star.presentation.HandoutShape"
502 return "SvxUnoDrawingModel";
512 return {
"com.sun.star.drawing.DrawingDocument" };
548 throw lang::IndexOutOfBoundsException();
553 uno::Reference< uno::XInterface > xPage( pPage->
mxUnoPage );
558 xPage =
static_cast<drawing::XDrawPage*
>(
new SvxFmDrawPage( pPage ));
560 xPage =
static_cast<drawing::XDrawPage*
>(
new SvxDrawPage( pPage ));
590 uno::Reference< drawing::XDrawPage > xDrawPage;
602 xDrawPage.set( pPage->getUnoPage(), uno::UNO_QUERY );
613 if( nPageCount <= 1 )
617 SvxDrawPage* pSvxPage = comphelper::getFromUnoTunnel<SvxDrawPage>( xPage );
633 return "SvxUnoDrawPagesAccess";
643 return {
"com.sun.star.drawing.DrawPages" };
664 SvxNumRule aTempRule( SvxNumRuleFlags::NONE, 10,
false );
css::uno::Reference< css::uno::XInterface > SvxXTextColumns_createInstance() noexcept
const SdrPage * GetPage() const
SdrHintKind GetKind() const
const SdrObject * GetObject() const
virtual void InsertPage(SdrPage *pPage, sal_uInt16 nPos=0xFFFF)
const SfxItemPool & GetItemPool() const
virtual void DeletePage(sal_uInt16 nPgNum)
const SdrPage * GetPage(sal_uInt16 nPgNum) const
sal_uInt16 GetPageCount() const
A SdrPage contains exactly one SdrObjList and a description of the physical page dimensions (size / m...
sal_uInt16 GetPageNum() const
css::uno::Reference< css::uno::XInterface > mxUnoPage
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
SfxItemPool * GetSecondaryPool() const
const SfxPoolItem * GetPoolDefaultItem(sal_uInt16 nWhich) const
static rtl::Reference< SvXMLGraphicHelper > Create(const css::uno::Reference< css::embed::XStorage > &rXMLStorage, SvXMLGraphicHelperMode eCreateMode)
SdrPage * GetSdrPage() const
static rtl::Reference< SvxShape > CreateShapeByTypeAndInventor(SdrObjKind nType, SdrInventor nInventor, SdrObject *pObj, SvxDrawPage *pPage=nullptr, OUString const &referer=OUString())
virtual ::com::sun::star::uno::Reference<::com::sun::star::uno::XInterface > SAL_CALL createInstance(const OUString &ServiceSpecifier) override
virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getAvailableServiceNames() override
const SvxNumRule & GetNumRule() const
void SetShapeType(const OUString &ShapeType)
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance(const OUString &aServiceSpecifier) override
static css::uno::Reference< css::uno::XInterface > createTextField(std::u16string_view aServiceSpecifier)
virtual css::uno::Sequence< OUString > SAL_CALL getAvailableServiceNames() override
static bool createEvent(const SdrModel *pDoc, const SdrHint *pSdrHint, css::document::EventObject &aEvent)
fills the given EventObject from the given SdrHint.
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstanceWithArguments(const OUString &ServiceSpecifier, const css::uno::Sequence< css::uno::Any > &Arguments) override
virtual sal_Int32 SAL_CALL getCount() override
virtual sal_Bool SAL_CALL hasElements() override
virtual css::uno::Type SAL_CALL getElementType() override
virtual OUString SAL_CALL getImplementationName() override
SvxUnoDrawPagesAccess(SvxUnoDrawingModel &rMyModel) noexcept
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual void SAL_CALL remove(const css::uno::Reference< css::drawing::XDrawPage > &xPage) override
virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 Index) override
SvxUnoDrawingModel & mrModel
virtual css::uno::Reference< css::drawing::XDrawPage > SAL_CALL insertNewByIndex(sal_Int32 nIndex) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
css::uno::Reference< css::uno::XInterface > mxTransGradientTable
virtual SdrModel & getSdrModelFromUnoModel() const override
abstract SdrModel provider
virtual OUString SAL_CALL getImplementationName() override
css::uno::Sequence< css::uno::Type > maTypeSequence
virtual css::uno::Reference< css::drawing::XDrawPages > SAL_CALL getDrawPages() override
virtual sal_Bool SAL_CALL hasControllersLocked() override
css::uno::Reference< css::uno::XInterface > mxDashTable
virtual ~SvxUnoDrawingModel() noexcept override
css::uno::Reference< css::uno::XInterface > mxHatchTable
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
friend class SvxUnoDrawPagesAccess
css::uno::Reference< css::uno::XInterface > mxMarkerTable
virtual css::uno::Sequence< OUString > SAL_CALL getAvailableServiceNames() override
virtual void SAL_CALL lockControllers() override
SvxUnoDrawingModel(SdrModel *pDoc) noexcept
css::uno::WeakReference< css::drawing::XDrawPages > mxDrawPagesAccess
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance(const OUString &aServiceSpecifier) override
virtual void SAL_CALL unlockControllers() override
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
virtual css::uno::Reference< css::ucb::XAnyCompare > SAL_CALL createAnyCompareByName(const OUString &PropertyName) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
css::uno::Reference< css::uno::XInterface > mxGradientTable
css::uno::Reference< css::uno::XInterface > mxBitmapTable
static css::uno::Sequence< OUString > getServiceNames()
static std::optional< SdrObjKind > getId(const OUString &rCompareString)
css::uno::Type const & get()
constexpr TypedWhichId< SvxNumBulletItem > EE_PARA_NUMBULLET(EE_PARA_START+5)
css::uno::Sequence< T > concatSequences(const css::uno::Sequence< T > &rS1, const Ss &... rSn)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
css::uno::Reference< css::deployment::XPackageRegistry > create(css::uno::Reference< css::deployment::XPackageRegistry > const &xRootRegistry, OUString const &context, OUString const &cachePath, css::uno::Reference< css::uno::XComponentContext > const &xComponentContext)
constexpr bool starts_with(std::basic_string_view< charT, traits > sv, std::basic_string_view< charT, traits > x) noexcept
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
constexpr bool IsInventorE3D(SdrObjKind e)
@ Page
Polyline represented by SdrPathObj.
@ Text
closed free-hand line
@ OLE2
foreign graphic (StarView Graphic)
@ Graphic
OutlineText, special text object for StarDraw.
uno::Reference< uno::XInterface > SvxUnoBitmapTable_createInstance(SdrModel *pModel)
Create a bitmaptable.
uno::Reference< uno::XInterface > SvxUnoDashTable_createInstance(SdrModel *pModel)
Create a gradienttable.
uno::Reference< uno::XInterface > SvxUnoTextCreateTextField(std::u16string_view ServiceSpecifier)
uno::Reference< uno::XInterface > SvxUnoGradientTable_createInstance(SdrModel *pModel)
Create a gradienttable.
uno::Reference< uno::XInterface > SvxUnoHatchTable_createInstance(SdrModel *pModel)
Create a hatchtable.
SVT_DLLPUBLIC css::uno::Reference< css::uno::XInterface > SvUnoImageMapCircleObject_createInstance(const SvEventDescription *pSupportedMacroItems)
SVT_DLLPUBLIC css::uno::Reference< css::uno::XInterface > SvUnoImageMapPolygonObject_createInstance(const SvEventDescription *pSupportedMacroItems)
SVT_DLLPUBLIC css::uno::Reference< css::uno::XInterface > SvUnoImageMapRectangleObject_createInstance(const SvEventDescription *pSupportedMacroItems)
static const SvEventDescription * ImplGetSupportedMacroItems()
css::uno::Reference< css::container::XIndexReplace > SvxCreateNumRule(SdrModel *pModel)
uno::Reference< uno::XInterface > SvxUnoMarkerTable_createInstance(SdrModel *pModel)
Create a hatchtable.
Reference< XAnyCompare > SvxCreateNumRuleCompare() noexcept
rtl::Reference< SvxShape > CreateSvxShapeByTypeAndInventor(SdrObjKind nType, SdrInventor nInventor, OUString const &referer)
Creates a StarOffice API wrapper with the given type and inventor Deprecated: This will be replaced w...
uno::Reference< uno::XInterface > SvxUnoTransGradientTable_createInstance(SdrModel *pModel)
Create a hatchtable.