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")
183 else if (rServiceSpecifier ==
"com.sun.star.text.TextColumns")
190 throw lang::ServiceNotRegisteredException(
"unknown service: " + rServiceSpecifier);
199 return create(rServiceSpecifier,
"");
210 if ((ServiceSpecifier ==
"com.sun.star.drawing.GraphicObjectShape"
211 || ServiceSpecifier ==
"com.sun.star.drawing.MediaShape")
212 && Arguments.getLength() == 1 && (Arguments[0] >>= arg))
214 return create(ServiceSpecifier, arg);
216 throw lang::NoSupportException();
226 OSL_ENSURE(
mpDoc,
"No SdrModel in UnoDrawingModel, should not happen");
245 else QUERYINT(lang::XMultiServiceFactory);
246 else QUERYINT(drawing::XDrawPagesSupplier);
247 else QUERYINT(css::ucb::XAnyCompareFactory);
271 return css::uno::Sequence<sal_Int8>();
300 if( !xDrawPages.is() )
311 if( aServiceSpecifier ==
"com.sun.star.drawing.DashTable" )
317 if( aServiceSpecifier ==
"com.sun.star.drawing.GradientTable" )
323 if( aServiceSpecifier ==
"com.sun.star.drawing.HatchTable" )
329 if( aServiceSpecifier ==
"com.sun.star.drawing.BitmapTable" )
335 if( aServiceSpecifier ==
"com.sun.star.drawing.TransparencyGradientTable" )
341 if( aServiceSpecifier ==
"com.sun.star.drawing.MarkerTable" )
347 if( aServiceSpecifier ==
"com.sun.star.text.NumberingRules" )
352 if ( aServiceSpecifier ==
"com.sun.star.image.ImageMapRectangleObject" )
357 if ( aServiceSpecifier ==
"com.sun.star.image.ImageMapCircleObject" )
362 if ( aServiceSpecifier ==
"com.sun.star.image.ImageMapPolygonObject" )
367 if( aServiceSpecifier ==
"com.sun.star.text.TextField.DateTime" )
369 return cppu::getXWeak(
new SvxUnoTextField(text::textfield::Type::DATE));
372 uno::Reference< uno::XInterface > xRet;
374 static constexpr OUStringLiteral aPackagePrefix(
u"com.sun.star.presentation." );
375 if( aServiceSpecifier.startsWith( aPackagePrefix ) )
380 std::u16string_view aTypeName = aServiceSpecifier.subView( aPackagePrefix.getLength() );
444 throw lang::ServiceNotRegisteredException();
449 pShape = xNewShape.get();
455 xRet = cppu::getXWeak(pShape);
469 uno::Sequence< OUString > aSNS{
470 "com.sun.star.drawing.DashTable",
471 "com.sun.star.drawing.GradientTable",
472 "com.sun.star.drawing.HatchTable",
473 "com.sun.star.drawing.BitmapTable",
474 "com.sun.star.drawing.TransparencyGradientTable",
475 "com.sun.star.drawing.MarkerTable",
476 "com.sun.star.text.NumberingRules",
477 "com.sun.star.image.ImageMapRectangleObject",
478 "com.sun.star.image.ImageMapCircleObject",
479 "com.sun.star.image.ImageMapPolygonObject",
481 "com.sun.star.presentation.TitleTextShape",
482 "com.sun.star.presentation.OutlinerShape",
483 "com.sun.star.presentation.SubtitleShape",
484 "com.sun.star.presentation.GraphicObjectShape",
485 "com.sun.star.presentation.ChartShape",
486 "com.sun.star.presentation.PageShape",
487 "com.sun.star.presentation.OLE2Shape",
488 "com.sun.star.presentation.TableShape",
489 "com.sun.star.presentation.OrgChartShape",
490 "com.sun.star.presentation.NotesShape",
491 "com.sun.star.presentation.HandoutShape"
500 return "SvxUnoDrawingModel";
510 return {
"com.sun.star.drawing.DrawingDocument" };
546 throw lang::IndexOutOfBoundsException();
551 uno::Reference< uno::XInterface > xPage( pPage->
mxUnoPage );
556 xPage =
static_cast<drawing::XDrawPage*
>(
new SvxFmDrawPage( pPage ));
558 xPage =
static_cast<drawing::XDrawPage*
>(
new SvxDrawPage( pPage ));
588 uno::Reference< drawing::XDrawPage > xDrawPage;
600 xDrawPage.set( pPage->getUnoPage(), uno::UNO_QUERY );
611 if( nPageCount <= 1 )
615 SvxDrawPage* pSvxPage = comphelper::getFromUnoTunnel<SvxDrawPage>( xPage );
631 return "SvxUnoDrawPagesAccess";
641 return {
"com.sun.star.drawing.DrawPages" };
662 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.