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>
31 #include <tools/debug.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  sal_uInt32 nType = UHashMap::getId( rServiceSpecifier );
172  if( nType != UHASHMAP_NOTFOUND )
173  {
174  sal_uInt16 nT = static_cast<sal_uInt16>(nType & ~E3D_INVENTOR_FLAG);
176 
177  return uno::Reference< uno::XInterface >( static_cast<drawing::XShape*>(SvxDrawPage::CreateShapeByTypeAndInventor( nT, nI, nullptr, nullptr, referer ).get()) );
178  }
179  }
180  else if (rServiceSpecifier == "com.sun.star.document.ImportGraphicStorageHandler")
181  {
183  uno::Reference< uno::XInterface> xRet( static_cast< ::cppu::OWeakObject* >( pGraphicHelper.get() ) );
184  return xRet;
185  }
186  else if (rServiceSpecifier == "com.sun.star.text.TextColumns")
187  {
189  }
190 
191  uno::Reference< uno::XInterface > xRet( SvxUnoDrawMSFactory::createTextField( rServiceSpecifier ) );
192  if( !xRet.is() )
193  throw lang::ServiceNotRegisteredException("unknown service: " + rServiceSpecifier);
194 
195  return xRet;
196 }
197 
198 }
199 
200 uno::Reference< uno::XInterface > SAL_CALL SvxUnoDrawMSFactory::createInstance( const OUString& rServiceSpecifier )
201 {
202  return create(rServiceSpecifier, "");
203 }
204 
205 uno::Reference< uno::XInterface > SvxUnoDrawMSFactory::createTextField( std::u16string_view ServiceSpecifier )
206 {
207  return SvxUnoTextCreateTextField( ServiceSpecifier );
208 }
209 
210 uno::Reference< uno::XInterface > SAL_CALL SvxUnoDrawMSFactory::createInstanceWithArguments( const OUString& ServiceSpecifier, const uno::Sequence< css::uno::Any >& Arguments )
211 {
212  OUString arg;
213  if ((ServiceSpecifier == "com.sun.star.drawing.GraphicObjectShape"
214  || ServiceSpecifier == "com.sun.star.drawing.MediaShape")
215  && Arguments.getLength() == 1 && (Arguments[0] >>= arg))
216  {
217  return create(ServiceSpecifier, arg);
218  }
219  throw lang::NoSupportException();
220 }
221 
222 uno::Sequence< OUString > SAL_CALL SvxUnoDrawMSFactory::getAvailableServiceNames()
223 {
224  return UHashMap::getServiceNames();
225 }
226 
228 {
229  OSL_ENSURE(mpDoc, "No SdrModel in UnoDrawingModel, should not happen");
230  return *mpDoc;
231 }
232 
234 : SfxBaseModel(nullptr),
235  mpDoc(pDoc)
236 {
237 }
238 
240 {
241 }
242 
244 {
245  uno::Any aAny;
246 
247  QUERYINT(lang::XServiceInfo);
248  else QUERYINT(lang::XMultiServiceFactory);
249  else QUERYINT(drawing::XDrawPagesSupplier);
250  else QUERYINT(css::ucb::XAnyCompareFactory);
251  else
252  return SfxBaseModel::queryInterface( rType );
253 
254  return aAny;
255 }
256 
257 // XTypeProvider
258 uno::Sequence< uno::Type > SAL_CALL SvxUnoDrawingModel::getTypes( )
259 {
260  if( !maTypeSequence.hasElements() )
261  {
263  uno::Sequence {
268  }
269  return maTypeSequence;
270 }
271 
272 uno::Sequence< sal_Int8 > SAL_CALL SvxUnoDrawingModel::getImplementationId( )
273 {
274  return css::uno::Sequence<sal_Int8>();
275 }
276 
278 {
279  if( mpDoc )
280  mpDoc->setLock(true);
281 }
282 
284 {
285  if( mpDoc && mpDoc->isLocked() )
286  {
287  mpDoc->setLock(false);
288  }
289 }
290 
292 {
293  return mpDoc && mpDoc->isLocked();
294 }
295 
296 // XDrawPagesSupplier
297 uno::Reference< drawing::XDrawPages > SAL_CALL SvxUnoDrawingModel::getDrawPages()
298 {
299  ::SolarMutexGuard aGuard;
300 
301  uno::Reference< drawing::XDrawPages > xDrawPages( mxDrawPagesAccess );
302 
303  if( !xDrawPages.is() )
304  mxDrawPagesAccess = xDrawPages = new SvxUnoDrawPagesAccess(*this);
305 
306  return xDrawPages;
307 }
308 
309 // XMultiServiceFactory ( SvxFmMSFactory )
310 uno::Reference< uno::XInterface > SAL_CALL SvxUnoDrawingModel::createInstance( const OUString& aServiceSpecifier )
311 {
312  ::SolarMutexGuard aGuard;
313 
314  if( aServiceSpecifier == "com.sun.star.drawing.DashTable" )
315  {
316  if( !mxDashTable.is() )
318  return mxDashTable;
319  }
320  if( aServiceSpecifier == "com.sun.star.drawing.GradientTable" )
321  {
322  if( !mxGradientTable.is() )
324  return mxGradientTable;
325  }
326  if( aServiceSpecifier == "com.sun.star.drawing.HatchTable" )
327  {
328  if( !mxHatchTable.is() )
330  return mxHatchTable;
331  }
332  if( aServiceSpecifier == "com.sun.star.drawing.BitmapTable" )
333  {
334  if( !mxBitmapTable.is() )
336  return mxBitmapTable;
337  }
338  if( aServiceSpecifier == "com.sun.star.drawing.TransparencyGradientTable" )
339  {
340  if( !mxTransGradientTable.is() )
342  return mxTransGradientTable;
343  }
344  if( aServiceSpecifier == "com.sun.star.drawing.MarkerTable" )
345  {
346  if( !mxMarkerTable.is() )
348  return mxMarkerTable;
349  }
350  if( aServiceSpecifier == "com.sun.star.text.NumberingRules" )
351  {
352  return uno::Reference< uno::XInterface >( SvxCreateNumRule( mpDoc ), uno::UNO_QUERY );
353  }
354 
355  if ( aServiceSpecifier == "com.sun.star.image.ImageMapRectangleObject" )
356  {
358  }
359 
360  if ( aServiceSpecifier == "com.sun.star.image.ImageMapCircleObject" )
361  {
363  }
364 
365  if ( aServiceSpecifier == "com.sun.star.image.ImageMapPolygonObject" )
366  {
368  }
369 
370  if( aServiceSpecifier == "com.sun.star.text.TextField.DateTime" )
371  {
372  return static_cast<cppu::OWeakObject *>(new SvxUnoTextField(text::textfield::Type::DATE));
373  }
374 
375  uno::Reference< uno::XInterface > xRet;
376 
377  static const OUStringLiteral aPackagePrefix( u"com.sun.star.presentation." );
378  if( aServiceSpecifier.startsWith( aPackagePrefix ) )
379  {
380  SvxShape* pShape = nullptr;
381 
382  sal_uInt16 nType = OBJ_TEXT;
383  OUString aTypeName = aServiceSpecifier.copy( aPackagePrefix.getLength() );
384  // create a shape wrapper
385  if( aTypeName.startsWith("TitleTextShape") )
386  {
387  nType = OBJ_TEXT;
388  }
389  else if( aTypeName.startsWith( "OutlinerShape" ) )
390  {
391  nType = OBJ_TEXT;
392  }
393  else if( aTypeName.startsWith( "SubtitleShape" ) )
394  {
395  nType = OBJ_TEXT;
396  }
397  else if( aTypeName.startsWith( "GraphicObjectShape" ) )
398  {
399  nType = OBJ_GRAF;
400  }
401  else if( aTypeName.startsWith( "PageShape" ) )
402  {
403  nType = OBJ_PAGE;
404  }
405  else if( aTypeName.startsWith( "OLE2Shape" ) )
406  {
407  nType = OBJ_OLE2;
408  }
409  else if( aTypeName.startsWith( "ChartShape" ) )
410  {
411  nType = OBJ_OLE2;
412  }
413  else if( aTypeName.startsWith( "OrgChartShape" ) )
414  {
415  nType = OBJ_OLE2;
416  }
417  else if( aTypeName.startsWith( "NotesShape" ) )
418  {
419  nType = OBJ_TEXT;
420  }
421  else if( aTypeName.startsWith( "HandoutShape" ) )
422  {
423  nType = OBJ_PAGE;
424  }
425  else if( aTypeName.startsWith( "FooterShape" ) )
426  {
427  nType = OBJ_TEXT;
428  }
429  else if( aTypeName.startsWith( "HeaderShape" ) )
430  {
431  nType = OBJ_TEXT;
432  }
433  else if( aTypeName.startsWith( "SlideNumberShape" ) )
434  {
435  nType = OBJ_TEXT;
436  }
437  else if( aTypeName.startsWith( "DateTimeShape" ) )
438  {
439  nType = OBJ_TEXT;
440  }
441  else if( aTypeName.startsWith( "TableShape" ) )
442  {
443  nType = OBJ_TABLE;
444  }
445  else
446  {
447  throw lang::ServiceNotRegisteredException();
448  }
449 
450  // create the API wrapper
452  pShape = xNewShape.get();
453 
454  // set shape type
455  if( pShape )
456  pShape->SetShapeType(aServiceSpecifier);
457 
458  xRet = static_cast<uno::XWeak*>(pShape);
459  }
460  else
461  {
462  xRet = SvxFmMSFactory::createInstance( aServiceSpecifier );
463  }
464 
465  return xRet;
466 }
467 
468 uno::Sequence< OUString > SAL_CALL SvxUnoDrawingModel::getAvailableServiceNames()
469 {
470  const uno::Sequence< OUString > aSNS_ORG( SvxFmMSFactory::getAvailableServiceNames() );
471 
472  uno::Sequence< OUString > aSNS( 21 );
473 
474  sal_uInt16 i = 0;
475 
476  aSNS[i++] = "com.sun.star.drawing.DashTable";
477  aSNS[i++] = "com.sun.star.drawing.GradientTable";
478  aSNS[i++] = "com.sun.star.drawing.HatchTable";
479  aSNS[i++] = "com.sun.star.drawing.BitmapTable";
480  aSNS[i++] = "com.sun.star.drawing.TransparencyGradientTable";
481  aSNS[i++] = "com.sun.star.drawing.MarkerTable";
482  aSNS[i++] = "com.sun.star.text.NumberingRules";
483  aSNS[i++] = "com.sun.star.image.ImageMapRectangleObject";
484  aSNS[i++] = "com.sun.star.image.ImageMapCircleObject";
485  aSNS[i++] = "com.sun.star.image.ImageMapPolygonObject";
486 
487  aSNS[i++] = "com.sun.star.presentation.TitleTextShape";
488  aSNS[i++] = "com.sun.star.presentation.OutlinerShape";
489  aSNS[i++] = "com.sun.star.presentation.SubtitleShape";
490  aSNS[i++] = "com.sun.star.presentation.GraphicObjectShape";
491  aSNS[i++] = "com.sun.star.presentation.ChartShape";
492  aSNS[i++] = "com.sun.star.presentation.PageShape";
493  aSNS[i++] = "com.sun.star.presentation.OLE2Shape";
494  aSNS[i++] = "com.sun.star.presentation.TableShape";
495  aSNS[i++] = "com.sun.star.presentation.OrgChartShape";
496  aSNS[i++] = "com.sun.star.presentation.NotesShape";
497  aSNS[i++] = "com.sun.star.presentation.HandoutShape";
498 
499  DBG_ASSERT( i == aSNS.getLength(), "Sequence overrun!" );
500 
501  return comphelper::concatSequences( aSNS_ORG, aSNS );
502 }
503 
504 // lang::XServiceInfo
506 {
507  return "SvxUnoDrawingModel";
508 }
509 
510 sal_Bool SAL_CALL SvxUnoDrawingModel::supportsService( const OUString& ServiceName )
511 {
512  return cppu::supportsService( this, ServiceName );
513 }
514 
515 uno::Sequence< OUString > SAL_CALL SvxUnoDrawingModel::getSupportedServiceNames()
516 {
517  return { "com.sun.star.drawing.DrawingDocument" };
518 }
519 
520 // XAnyCompareFactory
521 uno::Reference< css::ucb::XAnyCompare > SAL_CALL SvxUnoDrawingModel::createAnyCompareByName( const OUString& )
522 {
523  return SvxCreateNumRuleCompare();
524 }
525 
527 : mrModel(rMyModel)
528 {
529 }
530 
531 // XIndexAccess
533 {
534  ::SolarMutexGuard aGuard;
535 
536  sal_Int32 nCount = 0;
537 
538  if( mrModel.mpDoc )
539  nCount = mrModel.mpDoc->GetPageCount();
540 
541  return nCount;
542 }
543 
545 {
546  ::SolarMutexGuard aGuard;
547 
548  uno::Any aAny;
549 
550  if( mrModel.mpDoc )
551  {
552  if( (Index < 0) || (Index >= mrModel.mpDoc->GetPageCount() ) )
553  throw lang::IndexOutOfBoundsException();
554 
555  SdrPage* pPage = mrModel.mpDoc->GetPage( static_cast<sal_uInt16>(Index) );
556  if( pPage )
557  {
558  uno::Reference< uno::XInterface > xPage( pPage->mxUnoPage );
559 
560  if( !xPage.is() )
561  {
562  if( dynamic_cast<FmFormModel*>( mrModel.mpDoc ) )
563  xPage = static_cast<drawing::XDrawPage*>(new SvxFmDrawPage( pPage ));
564  else
565  xPage = static_cast<drawing::XDrawPage*>(new SvxDrawPage( pPage ));
566 
567  pPage->mxUnoPage = xPage;
568  }
569 
570  aAny <<= xPage;
571  }
572  }
573  return aAny;
574 }
575 
576 // XElementAccess
578 {
580 }
581 
583 {
584  return getCount() > 0;
585 }
586 
587 // XDrawPages
588 
589 // create a new page with model at given position
590 // and return corresponding SdDrawPage
591 uno::Reference< drawing::XDrawPage > SAL_CALL SvxUnoDrawPagesAccess::insertNewByIndex( sal_Int32 nIndex )
592 {
593  ::SolarMutexGuard aGuard;
594 
595  uno::Reference< drawing::XDrawPage > xDrawPage;
596 
597  if( mrModel.mpDoc )
598  {
600 
601  if( auto pFormModel = dynamic_cast<FmFormModel*>( mrModel.mpDoc ) )
602  pPage = new FmFormPage(*pFormModel);
603  else
604  pPage = new SdrPage(*mrModel.mpDoc);
605 
606  mrModel.mpDoc->InsertPage( pPage.get(), static_cast<sal_uInt16>(nIndex) );
607  xDrawPage.set( pPage->getUnoPage(), uno::UNO_QUERY );
608  }
609 
610  return xDrawPage;
611 }
612 
613 void SAL_CALL SvxUnoDrawPagesAccess::remove( const uno::Reference< drawing::XDrawPage >& xPage )
614 {
615  ::SolarMutexGuard aGuard;
616 
617  sal_uInt16 nPageCount = mrModel.mpDoc->GetPageCount();
618  if( nPageCount <= 1 )
619  return;
620 
621  // get pPage from xPage and get Id (nPos)
622  SvxDrawPage* pSvxPage = comphelper::getFromUnoTunnel<SvxDrawPage>( xPage );
623  if( pSvxPage )
624  {
625  SdrPage* pPage = pSvxPage->GetSdrPage();
626  if(pPage)
627  {
628  sal_uInt16 nPage = pPage->GetPageNum();
629  mrModel.mpDoc->DeletePage( nPage );
630  }
631  }
632 }
633 
634 // XServiceInfo
635 
637 {
638  return "SvxUnoDrawPagesAccess";
639 }
640 
641 sal_Bool SAL_CALL SvxUnoDrawPagesAccess::supportsService( const OUString& ServiceName )
642 {
643  return cppu::supportsService(this, ServiceName);
644 }
645 
646 uno::Sequence< OUString > SAL_CALL SvxUnoDrawPagesAccess::getSupportedServiceNames( )
647 {
648  return { "com.sun.star.drawing.DrawPages" };
649 }
650 
651 css::uno::Reference< css::container::XIndexReplace > SvxCreateNumRule(SdrModel* pModel)
652 {
653  const SvxNumRule* pDefaultRule = nullptr;
654  if( pModel )
655  {
657  if( pItem )
658  {
659  pDefaultRule = &pItem->GetNumRule();
660  }
661  }
662 
663  if( pDefaultRule )
664  {
665  return SvxCreateNumRule( *pDefaultRule );
666  }
667  else
668  {
669  SvxNumRule aTempRule( SvxNumRuleFlags::NONE, 10, false );
670  return SvxCreateNumRule( aTempRule );
671  }
672 }
673 
674 
675 /* 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:505
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:127
virtual void SAL_CALL lockControllers() override
Definition: unomod.cxx:277
#define QUERYINT(xint)
Definition: unomod.cxx:63
friend class SvxUnoDrawPagesAccess
Definition: unomodel.hxx:42
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:1181
Reference< XInterface > SvUnoImageMapRectangleObject_createInstance(const SvEventDescription *pSupportedMacroItems)
Reference< XInterface > SvUnoImageMapCircleObject_createInstance(const SvEventDescription *pSupportedMacroItems)
static rtl::Reference< SvxShape > CreateShapeByTypeAndInventor(sal_uInt16 nType, SdrInventor nInventor, SdrObject *pObj, SvxDrawPage *pPage=nullptr, OUString const &referer=OUString())
Definition: unopage.cxx:607
SdrInventor
Definition: svdobj.hxx:99
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:210
virtual ~SvxUnoDrawingModel() noexcept override
Definition: unomod.cxx:239
media shape
Definition: svdobjkind.hxx:57
css::uno::Reference< css::uno::XInterface > SvxXTextColumns_createInstance() noexcept
virtual void SAL_CALL unlockControllers() override
Definition: unomod.cxx:283
css::uno::Reference< css::container::XIndexReplace > SvxCreateNumRule(SdrModel *pModel)
Definition: unomod.cxx:651
virtual sal_Int32 SAL_CALL getCount() override
Definition: unomod.cxx:532
virtual css::uno::Sequence< OUString > SAL_CALL getAvailableServiceNames() override
Definition: unomod.cxx:222
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:416
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
bool isLocked() const
Definition: svdmodel.hxx:549
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance(const OUString &aServiceSpecifier) override
Definition: unomod.cxx:310
virtual css::uno::Reference< css::drawing::XDrawPages > SAL_CALL getDrawPages() override
Definition: unomod.cxx:297
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
Polyline represented by SdrPathObj.
Definition: svdobjkind.hxx:51
void SetShapeType(const OUString &ShapeType)
Definition: unoshape.hxx:212
virtual void DeletePage(sal_uInt16 nPgNum)
Definition: svdmodel.cxx:1201
virtual void SAL_CALL remove(const css::uno::Reference< css::drawing::XDrawPage > &xPage) override
Definition: unomod.cxx:613
SdrPage * GetSdrPage() const
Definition: unopage.hxx:77
#define DBG_ASSERT(sCon, aError)
css::uno::Reference< css::uno::XInterface > mxMarkerTable
Definition: unomodel.hxx:54
int i
const SvxNumRule & GetNumRule() const
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unomod.cxx:515
virtual css::uno::Reference< css::ucb::XAnyCompare > SAL_CALL createAnyCompareByName(const OUString &PropertyName) override
Definition: unomod.cxx:521
virtual css::uno::Type SAL_CALL getElementType() override
Definition: unomod.cxx:577
css::uno::Reference< css::uno::XInterface > mxBitmapTable
Definition: unomodel.hxx:52
OutlineText, special text object for StarDraw.
Definition: svdobjkind.hxx:45
const SdrPage * GetPage(sal_uInt16 nPgNum) const
Definition: svdmodel.cxx:1795
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:510
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:646
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: unomod.cxx:641
static css::uno::Sequence< OUString > getServiceNames()
Definition: unoprov.cxx:865
css::uno::Sequence< T > concatSequences(const css::uno::Sequence< T > &rS1, const Ss &...rSn)
Abstract DrawObject.
Definition: svdobj.hxx:259
virtual ::com::sun::star::uno::Reference<::com::sun::star::uno::XInterface > SAL_CALL createInstance(const OUString &ServiceSpecifier) override
Definition: fmdmod.cxx:36
virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getAvailableServiceNames() override
Definition: fmdmod.cxx:61
SfxItemPool * GetSecondaryPool() const
void setLock(bool bLock)
Definition: svdmodel.cxx:1606
#define E3D_INVENTOR_FLAG
Globals.
Definition: unoprov.hxx:99
static css::uno::Reference< css::uno::XInterface > createTextField(std::u16string_view aServiceSpecifier)
Definition: unomod.cxx:205
static sal_uInt32 getId(const OUString &rCompareString)
Definition: unoprov.cxx:870
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: unomod.cxx:258
virtual OUString SAL_CALL getImplementationName() override
Definition: unomod.cxx:636
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:243
#define UHASHMAP_NOTFOUND
class UHashMap
Definition: unoprov.hxx:39
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:233
css::uno::Reference< css::uno::XInterface > mxTransGradientTable
Definition: unomodel.hxx:53
virtual sal_Bool SAL_CALL hasControllersLocked() override
Definition: unomod.cxx:291
uno::Reference< uno::XInterface > SvxUnoGradientTable_createInstance(SdrModel *pModel)
Create a gradienttable.
Definition: unogtabl.cxx:74
const SfxItemPool & GetItemPool() const
Definition: svdmodel.hxx:311
const SdrPage * GetPage() const
Definition: svdmodel.hxx:125
A SdrPage contains exactly one SdrObjList and a description of the physical page dimensions (size / m...
Definition: svdpage.hxx:365
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:468
virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 Index) override
Definition: unomod.cxx:544
virtual SdrModel & getSdrModelFromUnoModel() const override
abstract SdrModel provider
Definition: unomod.cxx:227
css::uno::Reference< css::uno::XInterface > mxGradientTable
Definition: unomodel.hxx:50
sal_uInt16 GetPageNum() const
Definition: svdpage.cxx:1576
Reference< XInterface > SvUnoImageMapPolygonObject_createInstance(const SvEventDescription *pSupportedMacroItems)
virtual sal_Bool SAL_CALL hasElements() override
Definition: unomod.cxx:582
periodic cubic Spline (ni)
Definition: svdobjkind.hxx:42
SvxUnoDrawPagesAccess(SvxUnoDrawingModel &rMyModel) noexcept
Definition: unomod.cxx:526
virtual css::uno::Reference< css::drawing::XDrawPage > SAL_CALL insertNewByIndex(sal_Int32 nIndex) override
Definition: unomod.cxx:591
foreign graphic (StarView Graphic)
Definition: svdobjkind.hxx:46
struct _ADOIndex Index
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Definition: unomod.cxx:272
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:200
sal_uInt16 GetPageCount() const
Definition: svdmodel.cxx:1805
rtl::Reference< SvxShape > CreateSvxShapeByTypeAndInventor(sal_uInt16 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
const SdrObject * GetObject() const
Definition: svdmodel.hxx:126