LibreOffice Module svx (master)  1
unomod.cxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #include <sal/config.h>
21 
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>
26 #include <vcl/svapp.hxx>
27 #include <svl/itempool.hxx>
28 #include <svtools/unoevent.hxx>
29 #include <comphelper/sequence.hxx>
30 #include <o3tl/string_view.hxx>
32 
33 #include <cppuhelper/implbase.hxx>
34 #include <svx/unofill.hxx>
35 #include <editeng/unonrule.hxx>
36 #include <svtools/unoimap.hxx>
37 #include <sfx2/event.hxx>
38 #include <svx/fmdpage.hxx>
39 #include <svx/fmmodel.hxx>
40 #include <svx/fmpage.hxx>
41 #include <svx/unoapi.hxx>
42 
43 #include <svx/svdmodel.hxx>
44 #include <svx/unoprov.hxx>
45 #include <svx/unopage.hxx>
46 #include <editeng/unofield.hxx>
47 #include <svx/unomod.hxx>
48 #include <svx/unomodel.hxx>
49 #include <svx/svdobj.hxx>
50 #include <svx/svdpage.hxx>
51 #include <svx/SvxXTextColumns.hxx>
52 #include <svx/unoshape.hxx>
53 #include <svx/xmlgrhlp.hxx>
54 
55 #include <com/sun/star/text/textfield/Type.hpp>
56 
57 //-
58 
59 using namespace ::com::sun::star;
60 
61 //-
62 
63 #define QUERYINT( xint ) \
64  if( rType == cppu::UnoType<xint>::get() ) \
65  aAny <<= uno::Reference< xint >(this)
66 
67 //-
68 
69 class SvxUnoDrawPagesAccess : public ::cppu::WeakImplHelper< css::drawing::XDrawPages, css::lang::XServiceInfo >
70 {
71 private:
73 
74 public:
75  explicit SvxUnoDrawPagesAccess( SvxUnoDrawingModel& rMyModel ) noexcept;
76 
77  // XDrawPages
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;
80 
81  // XIndexAccess
82  virtual sal_Int32 SAL_CALL getCount() override ;
83  virtual css::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) override;
84 
85  // XElementAccess
86  virtual css::uno::Type SAL_CALL getElementType() override;
87  virtual sal_Bool SAL_CALL hasElements() override;
88 
89  // XServiceInfo
90  virtual OUString SAL_CALL getImplementationName( ) override;
91  virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
92  virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
93 };
94 //-
95 
97 {
98  static const SvEventDescription aMacroDescriptionsImpl[] =
99  {
100  { SvMacroItemId::OnMouseOver, "OnMouseOver" },
101  { SvMacroItemId::OnMouseOut, "OnMouseOut" },
102  { SvMacroItemId::NONE, nullptr }
103  };
104 
105  return aMacroDescriptionsImpl;
106 }
107 
108 //-
109 
115 bool SvxUnoDrawMSFactory::createEvent( const SdrModel* pDoc, const SdrHint* pSdrHint, css::document::EventObject& aEvent )
116 {
117  const SdrObject* pObj = nullptr;
118  const SdrPage* pPage = nullptr;
119 
120  switch( pSdrHint->GetKind() )
121  {
122 // case SdrHintKind::LayerChange: // layer definition changed
123 // case SdrHintKind::LayerOrderChange: // layer order changed (Insert/Remove/ChangePos)
124 // case HINT_LAYERSETCHG: // layer set changed
125 // case HINT_LAYERSETORDERCHG: // layer set order changed (Insert/Remove/ChangePos)
126 
127 // case HINT_PAGECHG: // page changed
128 // aEvent.EventName = "PageModified";
129 // pPage = pSdrHint->GetPage();
130 // break;
131  case SdrHintKind::PageOrderChange: // draw or master page order changed (Insert/Remove/ChangePos)
132  aEvent.EventName = "PageOrderModified";
133  pPage = pSdrHint->GetPage();
134  break;
135  case SdrHintKind::ObjectChange: // object changed
136  aEvent.EventName = "ShapeModified";
137  pObj = pSdrHint->GetObject();
138  break;
139  case SdrHintKind::ObjectInserted: // add new draw object
140  aEvent.EventName = "ShapeInserted";
141  pObj = pSdrHint->GetObject();
142  break;
143  case SdrHintKind::ObjectRemoved: // removed draw object from list
144  aEvent.EventName = "ShapeRemoved";
145  pObj = pSdrHint->GetObject();
146  break;
147 // SdrHintKind::DefaultTabChange, // default tab width changed
148 // SdrHintKind::SwitchToPage, // #94278# UNDO/REDO at an object evtl. on another page
149 // HINT_OBJLISTCLEAR // Is called before an SdrObjList will be cleared
150  default:
151  return false;
152  }
153 
154  if( pObj )
155  aEvent.Source = const_cast<SdrObject*>(pObj)->getUnoShape();
156  else if( pPage )
157  aEvent.Source = const_cast<SdrPage*>(pPage)->getUnoPage();
158  else
159  aEvent.Source = const_cast<SdrModel*>(pDoc)->getUnoModel();
160 
161  return true;
162 }
163 
164 namespace {
165 
166 css::uno::Reference<css::uno::XInterface> create(
167  OUString const & rServiceSpecifier, OUString const & referer)
168 {
169  if( rServiceSpecifier.startsWith("com.sun.star.drawing.") )
170  {
171  std::optional<SdrObjKind> nType = UHashMap::getId( rServiceSpecifier );
172  if( nType )
173  {
175 
176  return uno::Reference< uno::XInterface >( static_cast<drawing::XShape*>(SvxDrawPage::CreateShapeByTypeAndInventor( *nType, nI, nullptr, nullptr, referer ).get()) );
177  }
178  }
179  else if (rServiceSpecifier == "com.sun.star.document.ImportGraphicStorageHandler")
180  {
182  uno::Reference< uno::XInterface> xRet( static_cast< ::cppu::OWeakObject* >( pGraphicHelper.get() ) );
183  return xRet;
184  }
185  else if (rServiceSpecifier == "com.sun.star.text.TextColumns")
186  {
188  }
189 
190  uno::Reference< uno::XInterface > xRet( SvxUnoDrawMSFactory::createTextField( rServiceSpecifier ) );
191  if( !xRet.is() )
192  throw lang::ServiceNotRegisteredException("unknown service: " + rServiceSpecifier);
193 
194  return xRet;
195 }
196 
197 }
198 
199 uno::Reference< uno::XInterface > SAL_CALL SvxUnoDrawMSFactory::createInstance( const OUString& rServiceSpecifier )
200 {
201  return create(rServiceSpecifier, "");
202 }
203 
204 uno::Reference< uno::XInterface > SvxUnoDrawMSFactory::createTextField( std::u16string_view ServiceSpecifier )
205 {
206  return SvxUnoTextCreateTextField( ServiceSpecifier );
207 }
208 
209 uno::Reference< uno::XInterface > SAL_CALL SvxUnoDrawMSFactory::createInstanceWithArguments( const OUString& ServiceSpecifier, const uno::Sequence< css::uno::Any >& Arguments )
210 {
211  OUString arg;
212  if ((ServiceSpecifier == "com.sun.star.drawing.GraphicObjectShape"
213  || ServiceSpecifier == "com.sun.star.drawing.MediaShape")
214  && Arguments.getLength() == 1 && (Arguments[0] >>= arg))
215  {
216  return create(ServiceSpecifier, arg);
217  }
218  throw lang::NoSupportException();
219 }
220 
221 uno::Sequence< OUString > SAL_CALL SvxUnoDrawMSFactory::getAvailableServiceNames()
222 {
223  return UHashMap::getServiceNames();
224 }
225 
227 {
228  OSL_ENSURE(mpDoc, "No SdrModel in UnoDrawingModel, should not happen");
229  return *mpDoc;
230 }
231 
233 : SfxBaseModel(nullptr),
234  mpDoc(pDoc)
235 {
236 }
237 
239 {
240 }
241 
243 {
244  uno::Any aAny;
245 
246  QUERYINT(lang::XServiceInfo);
247  else QUERYINT(lang::XMultiServiceFactory);
248  else QUERYINT(drawing::XDrawPagesSupplier);
249  else QUERYINT(css::ucb::XAnyCompareFactory);
250  else
251  return SfxBaseModel::queryInterface( rType );
252 
253  return aAny;
254 }
255 
256 // XTypeProvider
257 uno::Sequence< uno::Type > SAL_CALL SvxUnoDrawingModel::getTypes( )
258 {
259  if( !maTypeSequence.hasElements() )
260  {
262  uno::Sequence {
267  }
268  return maTypeSequence;
269 }
270 
271 uno::Sequence< sal_Int8 > SAL_CALL SvxUnoDrawingModel::getImplementationId( )
272 {
273  return css::uno::Sequence<sal_Int8>();
274 }
275 
277 {
278  if( mpDoc )
279  mpDoc->setLock(true);
280 }
281 
283 {
284  if( mpDoc && mpDoc->isLocked() )
285  {
286  mpDoc->setLock(false);
287  }
288 }
289 
291 {
292  return mpDoc && mpDoc->isLocked();
293 }
294 
295 // XDrawPagesSupplier
296 uno::Reference< drawing::XDrawPages > SAL_CALL SvxUnoDrawingModel::getDrawPages()
297 {
298  ::SolarMutexGuard aGuard;
299 
300  uno::Reference< drawing::XDrawPages > xDrawPages( mxDrawPagesAccess );
301 
302  if( !xDrawPages.is() )
303  mxDrawPagesAccess = xDrawPages = new SvxUnoDrawPagesAccess(*this);
304 
305  return xDrawPages;
306 }
307 
308 // XMultiServiceFactory ( SvxFmMSFactory )
309 uno::Reference< uno::XInterface > SAL_CALL SvxUnoDrawingModel::createInstance( const OUString& aServiceSpecifier )
310 {
311  ::SolarMutexGuard aGuard;
312 
313  if( aServiceSpecifier == "com.sun.star.drawing.DashTable" )
314  {
315  if( !mxDashTable.is() )
317  return mxDashTable;
318  }
319  if( aServiceSpecifier == "com.sun.star.drawing.GradientTable" )
320  {
321  if( !mxGradientTable.is() )
323  return mxGradientTable;
324  }
325  if( aServiceSpecifier == "com.sun.star.drawing.HatchTable" )
326  {
327  if( !mxHatchTable.is() )
329  return mxHatchTable;
330  }
331  if( aServiceSpecifier == "com.sun.star.drawing.BitmapTable" )
332  {
333  if( !mxBitmapTable.is() )
335  return mxBitmapTable;
336  }
337  if( aServiceSpecifier == "com.sun.star.drawing.TransparencyGradientTable" )
338  {
339  if( !mxTransGradientTable.is() )
341  return mxTransGradientTable;
342  }
343  if( aServiceSpecifier == "com.sun.star.drawing.MarkerTable" )
344  {
345  if( !mxMarkerTable.is() )
347  return mxMarkerTable;
348  }
349  if( aServiceSpecifier == "com.sun.star.text.NumberingRules" )
350  {
351  return uno::Reference< uno::XInterface >( SvxCreateNumRule( mpDoc ), uno::UNO_QUERY );
352  }
353 
354  if ( aServiceSpecifier == "com.sun.star.image.ImageMapRectangleObject" )
355  {
357  }
358 
359  if ( aServiceSpecifier == "com.sun.star.image.ImageMapCircleObject" )
360  {
362  }
363 
364  if ( aServiceSpecifier == "com.sun.star.image.ImageMapPolygonObject" )
365  {
367  }
368 
369  if( aServiceSpecifier == "com.sun.star.text.TextField.DateTime" )
370  {
371  return static_cast<cppu::OWeakObject *>(new SvxUnoTextField(text::textfield::Type::DATE));
372  }
373 
374  uno::Reference< uno::XInterface > xRet;
375 
376  static const OUStringLiteral aPackagePrefix( u"com.sun.star.presentation." );
377  if( aServiceSpecifier.startsWith( aPackagePrefix ) )
378  {
379  SvxShape* pShape = nullptr;
380 
382  std::u16string_view aTypeName = aServiceSpecifier.subView( aPackagePrefix.getLength() );
383  // create a shape wrapper
384  if( o3tl::starts_with(aTypeName, u"TitleTextShape") )
385  {
386  nType = SdrObjKind::Text;
387  }
388  else if( o3tl::starts_with(aTypeName, u"OutlinerShape" ) )
389  {
390  nType = SdrObjKind::Text;
391  }
392  else if( o3tl::starts_with(aTypeName, u"SubtitleShape" ) )
393  {
394  nType = SdrObjKind::Text;
395  }
396  else if( o3tl::starts_with(aTypeName, u"GraphicObjectShape" ) )
397  {
398  nType = SdrObjKind::Graphic;
399  }
400  else if( o3tl::starts_with(aTypeName, u"PageShape" ) )
401  {
402  nType = SdrObjKind::Page;
403  }
404  else if( o3tl::starts_with(aTypeName, u"OLE2Shape" ) )
405  {
406  nType = SdrObjKind::OLE2;
407  }
408  else if( o3tl::starts_with(aTypeName, u"ChartShape" ) )
409  {
410  nType = SdrObjKind::OLE2;
411  }
412  else if( o3tl::starts_with(aTypeName, u"OrgChartShape" ) )
413  {
414  nType = SdrObjKind::OLE2;
415  }
416  else if( o3tl::starts_with(aTypeName, u"NotesShape" ) )
417  {
418  nType = SdrObjKind::Text;
419  }
420  else if( o3tl::starts_with(aTypeName, u"HandoutShape" ) )
421  {
422  nType = SdrObjKind::Page;
423  }
424  else if( o3tl::starts_with(aTypeName, u"FooterShape" ) )
425  {
426  nType = SdrObjKind::Text;
427  }
428  else if( o3tl::starts_with(aTypeName, u"HeaderShape" ) )
429  {
430  nType = SdrObjKind::Text;
431  }
432  else if( o3tl::starts_with(aTypeName, u"SlideNumberShape" ) )
433  {
434  nType = SdrObjKind::Text;
435  }
436  else if( o3tl::starts_with(aTypeName, u"DateTimeShape" ) )
437  {
438  nType = SdrObjKind::Text;
439  }
440  else if( o3tl::starts_with(aTypeName, u"TableShape" ) )
441  {
442  nType = SdrObjKind::Table;
443  }
444  else
445  {
446  throw lang::ServiceNotRegisteredException();
447  }
448 
449  // create the API wrapper
451  pShape = xNewShape.get();
452 
453  // set shape type
454  if( pShape )
455  pShape->SetShapeType(aServiceSpecifier);
456 
457  xRet = static_cast<uno::XWeak*>(pShape);
458  }
459  else
460  {
461  xRet = SvxFmMSFactory::createInstance( aServiceSpecifier );
462  }
463 
464  return xRet;
465 }
466 
467 uno::Sequence< OUString > SAL_CALL SvxUnoDrawingModel::getAvailableServiceNames()
468 {
469  const uno::Sequence< OUString > aSNS_ORG( SvxFmMSFactory::getAvailableServiceNames() );
470 
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",
482 
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"
494  };
495 
496  return comphelper::concatSequences( aSNS_ORG, aSNS );
497 }
498 
499 // lang::XServiceInfo
501 {
502  return "SvxUnoDrawingModel";
503 }
504 
505 sal_Bool SAL_CALL SvxUnoDrawingModel::supportsService( const OUString& ServiceName )
506 {
507  return cppu::supportsService( this, ServiceName );
508 }
509 
510 uno::Sequence< OUString > SAL_CALL SvxUnoDrawingModel::getSupportedServiceNames()
511 {
512  return { "com.sun.star.drawing.DrawingDocument" };
513 }
514 
515 // XAnyCompareFactory
516 uno::Reference< css::ucb::XAnyCompare > SAL_CALL SvxUnoDrawingModel::createAnyCompareByName( const OUString& )
517 {
518  return SvxCreateNumRuleCompare();
519 }
520 
522 : mrModel(rMyModel)
523 {
524 }
525 
526 // XIndexAccess
528 {
529  ::SolarMutexGuard aGuard;
530 
531  sal_Int32 nCount = 0;
532 
533  if( mrModel.mpDoc )
534  nCount = mrModel.mpDoc->GetPageCount();
535 
536  return nCount;
537 }
538 
540 {
541  ::SolarMutexGuard aGuard;
542 
543  uno::Any aAny;
544 
545  if( mrModel.mpDoc )
546  {
547  if( (Index < 0) || (Index >= mrModel.mpDoc->GetPageCount() ) )
548  throw lang::IndexOutOfBoundsException();
549 
550  SdrPage* pPage = mrModel.mpDoc->GetPage( static_cast<sal_uInt16>(Index) );
551  if( pPage )
552  {
553  uno::Reference< uno::XInterface > xPage( pPage->mxUnoPage );
554 
555  if( !xPage.is() )
556  {
557  if( dynamic_cast<FmFormModel*>( mrModel.mpDoc ) )
558  xPage = static_cast<drawing::XDrawPage*>(new SvxFmDrawPage( pPage ));
559  else
560  xPage = static_cast<drawing::XDrawPage*>(new SvxDrawPage( pPage ));
561 
562  pPage->mxUnoPage = xPage;
563  }
564 
565  aAny <<= xPage;
566  }
567  }
568  return aAny;
569 }
570 
571 // XElementAccess
573 {
575 }
576 
578 {
579  return getCount() > 0;
580 }
581 
582 // XDrawPages
583 
584 // create a new page with model at given position
585 // and return corresponding SdDrawPage
586 uno::Reference< drawing::XDrawPage > SAL_CALL SvxUnoDrawPagesAccess::insertNewByIndex( sal_Int32 nIndex )
587 {
588  ::SolarMutexGuard aGuard;
589 
590  uno::Reference< drawing::XDrawPage > xDrawPage;
591 
592  if( mrModel.mpDoc )
593  {
595 
596  if( auto pFormModel = dynamic_cast<FmFormModel*>( mrModel.mpDoc ) )
597  pPage = new FmFormPage(*pFormModel);
598  else
599  pPage = new SdrPage(*mrModel.mpDoc);
600 
601  mrModel.mpDoc->InsertPage( pPage.get(), static_cast<sal_uInt16>(nIndex) );
602  xDrawPage.set( pPage->getUnoPage(), uno::UNO_QUERY );
603  }
604 
605  return xDrawPage;
606 }
607 
608 void SAL_CALL SvxUnoDrawPagesAccess::remove( const uno::Reference< drawing::XDrawPage >& xPage )
609 {
610  ::SolarMutexGuard aGuard;
611 
612  sal_uInt16 nPageCount = mrModel.mpDoc->GetPageCount();
613  if( nPageCount <= 1 )
614  return;
615 
616  // get pPage from xPage and get Id (nPos)
617  SvxDrawPage* pSvxPage = comphelper::getFromUnoTunnel<SvxDrawPage>( xPage );
618  if( pSvxPage )
619  {
620  SdrPage* pPage = pSvxPage->GetSdrPage();
621  if(pPage)
622  {
623  sal_uInt16 nPage = pPage->GetPageNum();
624  mrModel.mpDoc->DeletePage( nPage );
625  }
626  }
627 }
628 
629 // XServiceInfo
630 
632 {
633  return "SvxUnoDrawPagesAccess";
634 }
635 
636 sal_Bool SAL_CALL SvxUnoDrawPagesAccess::supportsService( const OUString& ServiceName )
637 {
638  return cppu::supportsService(this, ServiceName);
639 }
640 
641 uno::Sequence< OUString > SAL_CALL SvxUnoDrawPagesAccess::getSupportedServiceNames( )
642 {
643  return { "com.sun.star.drawing.DrawPages" };
644 }
645 
646 css::uno::Reference< css::container::XIndexReplace > SvxCreateNumRule(SdrModel* pModel)
647 {
648  const SvxNumRule* pDefaultRule = nullptr;
649  if( pModel )
650  {
652  if( pItem )
653  {
654  pDefaultRule = &pItem->GetNumRule();
655  }
656  }
657 
658  if( pDefaultRule )
659  {
660  return SvxCreateNumRule( *pDefaultRule );
661  }
662  else
663  {
664  SvxNumRule aTempRule( SvxNumRuleFlags::NONE, 10, false );
665  return SvxCreateNumRule( aTempRule );
666  }
667 }
668 
669 
670 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
css::uno::Reference< css::uno::XInterface > mxDashTable
Definition: unomodel.hxx:49
virtual OUString SAL_CALL getImplementationName() override
Definition: unomod.cxx:500
css::uno::WeakReference< css::drawing::XDrawPages > mxDrawPagesAccess
Definition: unomodel.hxx:47
static bool createEvent(const SdrModel *pDoc, const SdrHint *pSdrHint, css::document::EventObject &aEvent)
fills the given EventObject from the given SdrHint.
Definition: unomod.cxx:115
SdrHintKind GetKind() const
Definition: svdmodel.hxx:132
virtual void SAL_CALL lockControllers() override
Definition: unomod.cxx:276
#define QUERYINT(xint)
Definition: unomod.cxx:63
friend class SvxUnoDrawPagesAccess
Definition: unomodel.hxx:42
media shape
const SfxPoolItem * GetPoolDefaultItem(sal_uInt16 nWhich) const
uno::Reference< uno::XInterface > SvxUnoMarkerTable_createInstance(SdrModel *pModel)
Create a hatchtable.
Definition: unomtabl.cxx:417
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual void InsertPage(SdrPage *pPage, sal_uInt16 nPos=0xFFFF)
Definition: svdmodel.cxx:1183
Reference< XInterface > SvUnoImageMapRectangleObject_createInstance(const SvEventDescription *pSupportedMacroItems)
periodic cubic Spline (ni)
Reference< XInterface > SvUnoImageMapCircleObject_createInstance(const SvEventDescription *pSupportedMacroItems)
SdrInventor
Definition: svdobj.hxx:100
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstanceWithArguments(const OUString &ServiceSpecifier, const css::uno::Sequence< css::uno::Any > &Arguments) override
Definition: unomod.cxx:209
virtual ~SvxUnoDrawingModel() noexcept override
Definition: unomod.cxx:238
css::uno::Reference< css::uno::XInterface > SvxXTextColumns_createInstance() noexcept
virtual void SAL_CALL unlockControllers() override
Definition: unomod.cxx:282
constexpr bool starts_with(std::basic_string_view< charT, traits > sv, std::basic_string_view< charT, traits > x) noexcept
SdrObjKind
Definition: svdobjkind.hxx:24
css::uno::Reference< css::container::XIndexReplace > SvxCreateNumRule(SdrModel *pModel)
Definition: unomod.cxx:646
virtual sal_Int32 SAL_CALL getCount() override
Definition: unomod.cxx:527
virtual css::uno::Sequence< OUString > SAL_CALL getAvailableServiceNames() override
Definition: unomod.cxx:221
uno::Reference< uno::XInterface > SvxUnoHatchTable_createInstance(SdrModel *pModel)
Create a hatchtable.
Definition: unohtabl.cxx:80
int nCount
css::uno::Reference< css::uno::XInterface > mxUnoPage
Definition: svdpage.hxx:424
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
constexpr bool IsInventorE3D(SdrObjKind e)
Definition: svdobjkind.hxx:149
bool isLocked() const
Definition: svdmodel.hxx:558
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance(const OUString &aServiceSpecifier) override
Definition: unomod.cxx:309
virtual css::uno::Reference< css::drawing::XDrawPages > SAL_CALL getDrawPages() override
Definition: unomod.cxx:296
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
Reference< deployment::XPackageRegistry > create(Reference< deployment::XPackageRegistry > const &xRootRegistry, OUString const &context, OUString const &cachePath, Reference< XComponentContext > const &xComponentContext)
css::uno::Sequence< css::uno::Type > maTypeSequence
Definition: unomodel.hxx:56
void SetShapeType(const OUString &ShapeType)
Definition: unoshape.hxx:207
virtual void DeletePage(sal_uInt16 nPgNum)
Definition: svdmodel.cxx:1203
foreign graphic (StarView Graphic)
virtual void SAL_CALL remove(const css::uno::Reference< css::drawing::XDrawPage > &xPage) override
Definition: unomod.cxx:608
SdrPage * GetSdrPage() const
Definition: unopage.hxx:77
css::uno::Reference< css::uno::XInterface > mxMarkerTable
Definition: unomodel.hxx:54
const SvxNumRule & GetNumRule() const
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unomod.cxx:510
virtual css::uno::Reference< css::ucb::XAnyCompare > SAL_CALL createAnyCompareByName(const OUString &PropertyName) override
Definition: unomod.cxx:516
virtual css::uno::Type SAL_CALL getElementType() override
Definition: unomod.cxx:572
css::uno::Reference< css::uno::XInterface > mxBitmapTable
Definition: unomodel.hxx:52
const SdrPage * GetPage(sal_uInt16 nPgNum) const
Definition: svdmodel.cxx:1798
uno::Reference< uno::XInterface > SvxUnoTransGradientTable_createInstance(SdrModel *pModel)
Create a hatchtable.
Definition: unottabl.cxx:80
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: unomod.cxx:505
float u
css::uno::Reference< css::uno::XInterface > mxHatchTable
Definition: unomodel.hxx:51
unsigned char sal_Bool
SvxUnoDrawingModel & mrModel
Definition: unomod.cxx:72
css::uno::Type const & get()
uno::Reference< uno::XInterface > SvxUnoBitmapTable_createInstance(SdrModel *pModel)
Create a bitmaptable.
Definition: unobtabl.cxx:97
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unomod.cxx:641
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: unomod.cxx:636
static css::uno::Sequence< OUString > getServiceNames()
Definition: unoprov.cxx:869
css::uno::Sequence< T > concatSequences(const css::uno::Sequence< T > &rS1, const Ss &...rSn)
Abstract DrawObject.
Definition: svdobj.hxx:260
Polyline represented by SdrPathObj.
virtual ::com::sun::star::uno::Reference<::com::sun::star::uno::XInterface > SAL_CALL createInstance(const OUString &ServiceSpecifier) override
Definition: fmdmod.cxx:34
static rtl::Reference< SvxShape > CreateShapeByTypeAndInventor(SdrObjKind nType, SdrInventor nInventor, SdrObject *pObj, SvxDrawPage *pPage=nullptr, OUString const &referer=OUString())
Definition: unopage.cxx:608
virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getAvailableServiceNames() override
Definition: fmdmod.cxx:59
SfxItemPool * GetSecondaryPool() const
void setLock(bool bLock)
Definition: svdmodel.cxx:1612
static css::uno::Reference< css::uno::XInterface > createTextField(std::u16string_view aServiceSpecifier)
Definition: unomod.cxx:204
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: unomod.cxx:257
virtual OUString SAL_CALL getImplementationName() override
Definition: unomod.cxx:631
ChartModel & mrModel
static const SvEventDescription * ImplGetSupportedMacroItems()
Definition: unomod.cxx:96
Reference< XAnyCompare > SvxCreateNumRuleCompare() noexcept
SdrModel * mpDoc
Definition: unomodel.hxx:45
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
Definition: unomod.cxx:242
uno::Reference< uno::XInterface > SvxUnoDashTable_createInstance(SdrModel *pModel)
Create a gradienttable.
Definition: unodtabl.cxx:78
QPRO_FUNC_TYPE nType
SvxUnoDrawingModel(SdrModel *pDoc) noexcept
Definition: unomod.cxx:232
css::uno::Reference< css::uno::XInterface > mxTransGradientTable
Definition: unomodel.hxx:53
virtual sal_Bool SAL_CALL hasControllersLocked() override
Definition: unomod.cxx:290
uno::Reference< uno::XInterface > SvxUnoGradientTable_createInstance(SdrModel *pModel)
Create a gradienttable.
Definition: unogtabl.cxx:74
const SfxItemPool & GetItemPool() const
Definition: svdmodel.hxx:317
const SdrPage * GetPage() const
Definition: svdmodel.hxx:130
A SdrPage contains exactly one SdrObjList and a description of the physical page dimensions (size / m...
Definition: svdpage.hxx:373
constexpr TypedWhichId< SvxNumBulletItem > EE_PARA_NUMBULLET(EE_PARA_START+5)
static rtl::Reference< SvXMLGraphicHelper > Create(const css::uno::Reference< css::embed::XStorage > &rXMLStorage, SvXMLGraphicHelperMode eCreateMode)
virtual css::uno::Sequence< OUString > SAL_CALL getAvailableServiceNames() override
Definition: unomod.cxx:467
static std::optional< SdrObjKind > getId(const OUString &rCompareString)
Definition: unoprov.cxx:874
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...
Definition: unopage.cxx:864
virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 Index) override
Definition: unomod.cxx:539
virtual SdrModel & getSdrModelFromUnoModel() const override
abstract SdrModel provider
Definition: unomod.cxx:226
css::uno::Reference< css::uno::XInterface > mxGradientTable
Definition: unomodel.hxx:50
sal_uInt16 GetPageNum() const
Definition: svdpage.cxx:1596
Reference< XInterface > SvUnoImageMapPolygonObject_createInstance(const SvEventDescription *pSupportedMacroItems)
virtual sal_Bool SAL_CALL hasElements() override
Definition: unomod.cxx:577
SvxUnoDrawPagesAccess(SvxUnoDrawingModel &rMyModel) noexcept
Definition: unomod.cxx:521
virtual css::uno::Reference< css::drawing::XDrawPage > SAL_CALL insertNewByIndex(sal_Int32 nIndex) override
Definition: unomod.cxx:586
struct _ADOIndex Index
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Definition: unomod.cxx:271
uno::Reference< uno::XInterface > SvxUnoTextCreateTextField(std::u16string_view ServiceSpecifier)
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance(const OUString &aServiceSpecifier) override
Definition: unomod.cxx:199
sal_uInt16 GetPageCount() const
Definition: svdmodel.cxx:1808
OutlineText, special text object for StarDraw.
const SdrObject * GetObject() const
Definition: svdmodel.hxx:131