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/unoshape.hxx>
52 #include <svx/xmlgrhlp.hxx>
53 
54 #include <com/sun/star/text/textfield/Type.hpp>
55 
56 //-
57 
58 using namespace ::com::sun::star;
59 
60 //-
61 
62 #define QUERYINT( xint ) \
63  if( rType == cppu::UnoType<xint>::get() ) \
64  aAny <<= uno::Reference< xint >(this)
65 
66 //-
67 
68 class SvxUnoDrawPagesAccess : public ::cppu::WeakImplHelper< css::drawing::XDrawPages, css::lang::XServiceInfo >
69 {
70 private:
72 
73 public:
74  explicit SvxUnoDrawPagesAccess( SvxUnoDrawingModel& rMyModel ) throw();
75 
76  // XDrawPages
77  virtual css::uno::Reference< css::drawing::XDrawPage > SAL_CALL insertNewByIndex( sal_Int32 nIndex ) override;
78  virtual void SAL_CALL remove( const css::uno::Reference< css::drawing::XDrawPage >& xPage ) override;
79 
80  // XIndexAccess
81  virtual sal_Int32 SAL_CALL getCount() override ;
82  virtual css::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) override;
83 
84  // XElementAccess
85  virtual css::uno::Type SAL_CALL getElementType() override;
86  virtual sal_Bool SAL_CALL hasElements() override;
87 
88  // XServiceInfo
89  virtual OUString SAL_CALL getImplementationName( ) override;
90  virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
91  virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
92 };
93 //-
94 
96 {
97  static const SvEventDescription aMacroDescriptionsImpl[] =
98  {
99  { SvMacroItemId::OnMouseOver, "OnMouseOver" },
100  { SvMacroItemId::OnMouseOut, "OnMouseOut" },
101  { SvMacroItemId::NONE, nullptr }
102  };
103 
104  return aMacroDescriptionsImpl;
105 }
106 
107 //-
108 
114 bool SvxUnoDrawMSFactory::createEvent( const SdrModel* pDoc, const SdrHint* pSdrHint, css::document::EventObject& aEvent )
115 {
116  const SdrObject* pObj = nullptr;
117  const SdrPage* pPage = nullptr;
118 
119  switch( pSdrHint->GetKind() )
120  {
121 // case SdrHintKind::LayerChange: // layer definition changed
122 // case SdrHintKind::LayerOrderChange: // layer order changed (Insert/Remove/ChangePos)
123 // case HINT_LAYERSETCHG: // layer set changed
124 // case HINT_LAYERSETORDERCHG: // layer set order changed (Insert/Remove/ChangePos)
125 
126 // case HINT_PAGECHG: // page changed
127 // aEvent.EventName = "PageModified";
128 // pPage = pSdrHint->GetPage();
129 // break;
130  case SdrHintKind::PageOrderChange: // draw or master page order changed (Insert/Remove/ChangePos)
131  aEvent.EventName = "PageOrderModified";
132  pPage = pSdrHint->GetPage();
133  break;
134  case SdrHintKind::ObjectChange: // object changed
135  aEvent.EventName = "ShapeModified";
136  pObj = pSdrHint->GetObject();
137  break;
138  case SdrHintKind::ObjectInserted: // add new draw object
139  aEvent.EventName = "ShapeInserted";
140  pObj = pSdrHint->GetObject();
141  break;
142  case SdrHintKind::ObjectRemoved: // removed draw object from list
143  aEvent.EventName = "ShapeRemoved";
144  pObj = pSdrHint->GetObject();
145  break;
146 // SdrHintKind::DefaultTabChange, // default tab width changed
147 // SdrHintKind::SwitchToPage, // #94278# UNDO/REDO at an object evtl. on another page
148 // HINT_OBJLISTCLEAR // Is called before an SdrObjList will be cleared
149  default:
150  return false;
151  }
152 
153  if( pObj )
154  aEvent.Source = const_cast<SdrObject*>(pObj)->getUnoShape();
155  else if( pPage )
156  aEvent.Source = const_cast<SdrPage*>(pPage)->getUnoPage();
157  else
158  aEvent.Source = const_cast<SdrModel*>(pDoc)->getUnoModel();
159 
160  return true;
161 }
162 
163 namespace {
164 
165 css::uno::Reference<css::uno::XInterface> create(
166  OUString const & rServiceSpecifier, OUString const & referer)
167 {
168  if( rServiceSpecifier.startsWith("com.sun.star.drawing.") )
169  {
170  sal_uInt32 nType = UHashMap::getId( rServiceSpecifier );
171  if( nType != UHASHMAP_NOTFOUND )
172  {
173  sal_uInt16 nT = static_cast<sal_uInt16>(nType & ~E3D_INVENTOR_FLAG);
175 
176  return uno::Reference< uno::XInterface >( static_cast<drawing::XShape*>(SvxDrawPage::CreateShapeByTypeAndInventor( nT, nI, nullptr, nullptr, referer )) );
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 
186  uno::Reference< uno::XInterface > xRet( SvxUnoDrawMSFactory::createTextField( rServiceSpecifier ) );
187  if( !xRet.is() )
188  throw lang::ServiceNotRegisteredException("unknown service: " + rServiceSpecifier);
189 
190  return xRet;
191 }
192 
193 }
194 
195 uno::Reference< uno::XInterface > SAL_CALL SvxUnoDrawMSFactory::createInstance( const OUString& rServiceSpecifier )
196 {
197  return create(rServiceSpecifier, "");
198 }
199 
200 uno::Reference< uno::XInterface > SvxUnoDrawMSFactory::createTextField( const OUString& ServiceSpecifier )
201 {
202  return SvxUnoTextCreateTextField( ServiceSpecifier );
203 }
204 
205 uno::Reference< uno::XInterface > SAL_CALL SvxUnoDrawMSFactory::createInstanceWithArguments( const OUString& ServiceSpecifier, const uno::Sequence< css::uno::Any >& Arguments )
206 {
207  OUString arg;
208  if ((ServiceSpecifier == "com.sun.star.drawing.GraphicObjectShape"
209  || ServiceSpecifier == "com.sun.star.drawing.MediaShape")
210  && Arguments.getLength() == 1 && (Arguments[0] >>= arg))
211  {
212  return create(ServiceSpecifier, arg);
213  }
214  throw lang::NoSupportException();
215 }
216 
217 uno::Sequence< OUString > SAL_CALL SvxUnoDrawMSFactory::getAvailableServiceNames()
218 {
219  return UHashMap::getServiceNames();
220 }
221 
223 {
224  OSL_ENSURE(mpDoc, "No SdrModel in UnoDrawingModel, should not happen");
225  return *mpDoc;
226 }
227 
229 : SfxBaseModel(nullptr),
230  SvxFmMSFactory(),
231  css::drawing::XDrawPagesSupplier(),
232  css::lang::XServiceInfo(),
233  css::ucb::XAnyCompareFactory(),
234  mpDoc(pDoc),
235  mxDrawPagesAccess(),
236  mxDashTable(),
237  mxGradientTable(),
238  mxHatchTable(),
239  mxBitmapTable(),
240  mxTransGradientTable(),
241  mxMarkerTable(),
242  maTypeSequence()
243 {
244 }
245 
247 {
248 }
249 
251 {
252  uno::Any aAny;
253 
254  QUERYINT(lang::XServiceInfo);
255  else QUERYINT(lang::XMultiServiceFactory);
256  else QUERYINT(drawing::XDrawPagesSupplier);
257  else QUERYINT(css::ucb::XAnyCompareFactory);
258  else
259  return SfxBaseModel::queryInterface( rType );
260 
261  return aAny;
262 }
263 
264 // XTypeProvider
265 uno::Sequence< uno::Type > SAL_CALL SvxUnoDrawingModel::getTypes( )
266 {
267  if( !maTypeSequence.hasElements() )
268  {
270  uno::Sequence {
275  }
276  return maTypeSequence;
277 }
278 
279 uno::Sequence< sal_Int8 > SAL_CALL SvxUnoDrawingModel::getImplementationId( )
280 {
281  return css::uno::Sequence<sal_Int8>();
282 }
283 
285 {
286  if( mpDoc )
287  mpDoc->setLock(true);
288 }
289 
291 {
292  if( mpDoc && mpDoc->isLocked() )
293  {
294  mpDoc->setLock(false);
295  }
296 }
297 
299 {
300  return mpDoc && mpDoc->isLocked();
301 }
302 
303 // XDrawPagesSupplier
304 uno::Reference< drawing::XDrawPages > SAL_CALL SvxUnoDrawingModel::getDrawPages()
305 {
306  ::SolarMutexGuard aGuard;
307 
308  uno::Reference< drawing::XDrawPages > xDrawPages( mxDrawPagesAccess );
309 
310  if( !xDrawPages.is() )
311  mxDrawPagesAccess = xDrawPages = new SvxUnoDrawPagesAccess(*this);
312 
313  return xDrawPages;
314 }
315 
316 // XMultiServiceFactory ( SvxFmMSFactory )
317 uno::Reference< uno::XInterface > SAL_CALL SvxUnoDrawingModel::createInstance( const OUString& aServiceSpecifier )
318 {
319  ::SolarMutexGuard aGuard;
320 
321  if( aServiceSpecifier == "com.sun.star.drawing.DashTable" )
322  {
323  if( !mxDashTable.is() )
325  return mxDashTable;
326  }
327  if( aServiceSpecifier == "com.sun.star.drawing.GradientTable" )
328  {
329  if( !mxGradientTable.is() )
331  return mxGradientTable;
332  }
333  if( aServiceSpecifier == "com.sun.star.drawing.HatchTable" )
334  {
335  if( !mxHatchTable.is() )
337  return mxHatchTable;
338  }
339  if( aServiceSpecifier == "com.sun.star.drawing.BitmapTable" )
340  {
341  if( !mxBitmapTable.is() )
343  return mxBitmapTable;
344  }
345  if( aServiceSpecifier == "com.sun.star.drawing.TransparencyGradientTable" )
346  {
347  if( !mxTransGradientTable.is() )
349  return mxTransGradientTable;
350  }
351  if( aServiceSpecifier == "com.sun.star.drawing.MarkerTable" )
352  {
353  if( !mxMarkerTable.is() )
355  return mxMarkerTable;
356  }
357  if( aServiceSpecifier == "com.sun.star.text.NumberingRules" )
358  {
359  return uno::Reference< uno::XInterface >( SvxCreateNumRule( mpDoc ), uno::UNO_QUERY );
360  }
361 
362  if ( aServiceSpecifier == "com.sun.star.image.ImageMapRectangleObject" )
363  {
365  }
366 
367  if ( aServiceSpecifier == "com.sun.star.image.ImageMapCircleObject" )
368  {
370  }
371 
372  if ( aServiceSpecifier == "com.sun.star.image.ImageMapPolygonObject" )
373  {
375  }
376 
377  if( aServiceSpecifier == "com.sun.star.text.TextField.DateTime" )
378  {
379  return static_cast<cppu::OWeakObject *>(new SvxUnoTextField(text::textfield::Type::DATE));
380  }
381 
382  uno::Reference< uno::XInterface > xRet;
383 
384  const OUString aPackagePrefix( "com.sun.star.presentation." );
385  if( aServiceSpecifier.startsWith( aPackagePrefix ) )
386  {
387  SvxShape* pShape = nullptr;
388 
389  sal_uInt16 nType = OBJ_TEXT;
390  OUString aTypeName = aServiceSpecifier.copy( aPackagePrefix.getLength() );
391  // create a shape wrapper
392  if( aTypeName.startsWith("TitleTextShape") )
393  {
394  nType = OBJ_TEXT;
395  }
396  else if( aTypeName.startsWith( "OutlinerShape" ) )
397  {
398  nType = OBJ_TEXT;
399  }
400  else if( aTypeName.startsWith( "SubtitleShape" ) )
401  {
402  nType = OBJ_TEXT;
403  }
404  else if( aTypeName.startsWith( "GraphicObjectShape" ) )
405  {
406  nType = OBJ_GRAF;
407  }
408  else if( aTypeName.startsWith( "PageShape" ) )
409  {
410  nType = OBJ_PAGE;
411  }
412  else if( aTypeName.startsWith( "OLE2Shape" ) )
413  {
414  nType = OBJ_OLE2;
415  }
416  else if( aTypeName.startsWith( "ChartShape" ) )
417  {
418  nType = OBJ_OLE2;
419  }
420  else if( aTypeName.startsWith( "OrgChartShape" ) )
421  {
422  nType = OBJ_OLE2;
423  }
424  else if( aTypeName.startsWith( "NotesShape" ) )
425  {
426  nType = OBJ_TEXT;
427  }
428  else if( aTypeName.startsWith( "HandoutShape" ) )
429  {
430  nType = OBJ_PAGE;
431  }
432  else if( aTypeName.startsWith( "FooterShape" ) )
433  {
434  nType = OBJ_TEXT;
435  }
436  else if( aTypeName.startsWith( "HeaderShape" ) )
437  {
438  nType = OBJ_TEXT;
439  }
440  else if( aTypeName.startsWith( "SlideNumberShape" ) )
441  {
442  nType = OBJ_TEXT;
443  }
444  else if( aTypeName.startsWith( "DateTimeShape" ) )
445  {
446  nType = OBJ_TEXT;
447  }
448  else if( aTypeName.startsWith( "TableShape" ) )
449  {
450  nType = OBJ_TABLE;
451  }
452  else
453  {
454  throw lang::ServiceNotRegisteredException();
455  }
456 
457  // create the API wrapper
459 
460  // set shape type
461  if( pShape )
462  pShape->SetShapeType(aServiceSpecifier);
463 
464  xRet = static_cast<uno::XWeak*>(pShape);
465  }
466  else
467  {
468  xRet = SvxFmMSFactory::createInstance( aServiceSpecifier );
469  }
470 
471  return xRet;
472 }
473 
474 uno::Sequence< OUString > SAL_CALL SvxUnoDrawingModel::getAvailableServiceNames()
475 {
476  const uno::Sequence< OUString > aSNS_ORG( SvxFmMSFactory::getAvailableServiceNames() );
477 
478  uno::Sequence< OUString > aSNS( 21 );
479 
480  sal_uInt16 i = 0;
481 
482  aSNS[i++] = "com.sun.star.drawing.DashTable";
483  aSNS[i++] = "com.sun.star.drawing.GradientTable";
484  aSNS[i++] = "com.sun.star.drawing.HatchTable";
485  aSNS[i++] = "com.sun.star.drawing.BitmapTable";
486  aSNS[i++] = "com.sun.star.drawing.TransparencyGradientTable";
487  aSNS[i++] = "com.sun.star.drawing.MarkerTable";
488  aSNS[i++] = "com.sun.star.text.NumberingRules";
489  aSNS[i++] = "com.sun.star.image.ImageMapRectangleObject";
490  aSNS[i++] = "com.sun.star.image.ImageMapCircleObject";
491  aSNS[i++] = "com.sun.star.image.ImageMapPolygonObject";
492 
493  aSNS[i++] = "com.sun.star.presentation.TitleTextShape";
494  aSNS[i++] = "com.sun.star.presentation.OutlinerShape";
495  aSNS[i++] = "com.sun.star.presentation.SubtitleShape";
496  aSNS[i++] = "com.sun.star.presentation.GraphicObjectShape";
497  aSNS[i++] = "com.sun.star.presentation.ChartShape";
498  aSNS[i++] = "com.sun.star.presentation.PageShape";
499  aSNS[i++] = "com.sun.star.presentation.OLE2Shape";
500  aSNS[i++] = "com.sun.star.presentation.TableShape";
501  aSNS[i++] = "com.sun.star.presentation.OrgChartShape";
502  aSNS[i++] = "com.sun.star.presentation.NotesShape";
503  aSNS[i++] = "com.sun.star.presentation.HandoutShape";
504 
505  DBG_ASSERT( i == aSNS.getLength(), "Sequence overrun!" );
506 
507  return comphelper::concatSequences( aSNS_ORG, aSNS );
508 }
509 
510 // lang::XServiceInfo
512 {
513  return "SvxUnoDrawingModel";
514 }
515 
516 sal_Bool SAL_CALL SvxUnoDrawingModel::supportsService( const OUString& ServiceName )
517 {
518  return cppu::supportsService( this, ServiceName );
519 }
520 
521 uno::Sequence< OUString > SAL_CALL SvxUnoDrawingModel::getSupportedServiceNames()
522 {
523  return { "com.sun.star.drawing.DrawingDocument" };
524 }
525 
526 // XAnyCompareFactory
527 uno::Reference< css::ucb::XAnyCompare > SAL_CALL SvxUnoDrawingModel::createAnyCompareByName( const OUString& )
528 {
529  return SvxCreateNumRuleCompare();
530 }
531 
533 : mrModel(rMyModel)
534 {
535 }
536 
537 // XIndexAccess
539 {
540  ::SolarMutexGuard aGuard;
541 
542  sal_Int32 nCount = 0;
543 
544  if( mrModel.mpDoc )
545  nCount = mrModel.mpDoc->GetPageCount();
546 
547  return nCount;
548 }
549 
551 {
552  ::SolarMutexGuard aGuard;
553 
554  uno::Any aAny;
555 
556  if( mrModel.mpDoc )
557  {
558  if( (Index < 0) || (Index >= mrModel.mpDoc->GetPageCount() ) )
559  throw lang::IndexOutOfBoundsException();
560 
561  SdrPage* pPage = mrModel.mpDoc->GetPage( static_cast<sal_uInt16>(Index) );
562  if( pPage )
563  {
564  uno::Reference< uno::XInterface > xPage( pPage->mxUnoPage );
565 
566  if( !xPage.is() )
567  {
568  if( dynamic_cast<FmFormModel*>( mrModel.mpDoc ) )
569  xPage = static_cast<drawing::XDrawPage*>(new SvxFmDrawPage( pPage ));
570  else
571  xPage = static_cast<drawing::XDrawPage*>(new SvxDrawPage( pPage ));
572 
573  pPage->mxUnoPage = xPage;
574  }
575 
576  aAny <<= xPage;
577  }
578  }
579  return aAny;
580 }
581 
582 // XElementAccess
584 {
586 }
587 
589 {
590  return getCount() > 0;
591 }
592 
593 // XDrawPages
594 
595 // create a new page with model at given position
596 // and return corresponding SdDrawPage
597 uno::Reference< drawing::XDrawPage > SAL_CALL SvxUnoDrawPagesAccess::insertNewByIndex( sal_Int32 nIndex )
598 {
599  ::SolarMutexGuard aGuard;
600 
601  uno::Reference< drawing::XDrawPage > xDrawPage;
602 
603  if( mrModel.mpDoc )
604  {
605  SdrPage* pPage;
606 
607  if( auto pFormModel = dynamic_cast<FmFormModel*>( mrModel.mpDoc ) )
608  pPage = new FmFormPage(*pFormModel);
609  else
610  pPage = new SdrPage(*mrModel.mpDoc);
611 
612  mrModel.mpDoc->InsertPage( pPage, static_cast<sal_uInt16>(nIndex) );
613  xDrawPage.set( pPage->getUnoPage(), uno::UNO_QUERY );
614  }
615 
616  return xDrawPage;
617 }
618 
619 void SAL_CALL SvxUnoDrawPagesAccess::remove( const uno::Reference< drawing::XDrawPage >& xPage )
620 {
621  ::SolarMutexGuard aGuard;
622 
623  sal_uInt16 nPageCount = mrModel.mpDoc->GetPageCount();
624  if( nPageCount <= 1 )
625  return;
626 
627  // get pPage from xPage and get Id (nPos)
628  SvxDrawPage* pSvxPage = comphelper::getUnoTunnelImplementation<SvxDrawPage>( xPage );
629  if( pSvxPage )
630  {
631  SdrPage* pPage = pSvxPage->GetSdrPage();
632  if(pPage)
633  {
634  sal_uInt16 nPage = pPage->GetPageNum();
635  mrModel.mpDoc->DeletePage( nPage );
636  }
637  }
638 }
639 
640 // XServiceInfo
641 
643 {
644  return "SvxUnoDrawPagesAccess";
645 }
646 
647 sal_Bool SAL_CALL SvxUnoDrawPagesAccess::supportsService( const OUString& ServiceName )
648 {
649  return cppu::supportsService(this, ServiceName);
650 }
651 
652 uno::Sequence< OUString > SAL_CALL SvxUnoDrawPagesAccess::getSupportedServiceNames( )
653 {
654  return { "com.sun.star.drawing.DrawPages" };
655 }
656 
657 css::uno::Reference< css::container::XIndexReplace > SvxCreateNumRule(SdrModel* pModel)
658 {
659  const SvxNumRule* pDefaultRule = nullptr;
660  if( pModel )
661  {
663  if( pItem )
664  {
665  pDefaultRule = pItem->GetNumRule();
666  }
667  }
668 
669  if( pDefaultRule )
670  {
671  return SvxCreateNumRule( pDefaultRule );
672  }
673  else
674  {
675  SvxNumRule aTempRule( SvxNumRuleFlags::NONE, 10, false );
676  return SvxCreateNumRule( &aTempRule );
677  }
678 }
679 
680 
681 /* 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:511
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:114
SdrHintKind GetKind() const
Definition: svdmodel.hxx:123
virtual void SAL_CALL lockControllers() override
Definition: unomod.cxx:284
#define QUERYINT(xint)
Definition: unomod.cxx:62
friend class SvxUnoDrawPagesAccess
Definition: unomodel.hxx:42
static SvxShape * CreateShapeByTypeAndInventor(sal_uInt16 nType, SdrInventor nInventor, SdrObject *pObj, SvxDrawPage *pPage=nullptr, OUString const &referer=OUString())
Definition: unopage.cxx:612
const SfxPoolItem * GetPoolDefaultItem(sal_uInt16 nWhich) const
uno::Reference< uno::XInterface > SvxUnoMarkerTable_createInstance(SdrModel *pModel)
Create a hatchtable.
Definition: unomtabl.cxx:407
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual void InsertPage(SdrPage *pPage, sal_uInt16 nPos=0xFFFF)
Definition: svdmodel.cxx:1290
Reference< XInterface > SvUnoImageMapRectangleObject_createInstance(const SvEventDescription *pSupportedMacroItems)
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:205
media shape
Definition: svdobjkind.hxx:57
Reference< XAnyCompare > SvxCreateNumRuleCompare()
virtual void SAL_CALL unlockControllers() override
Definition: unomod.cxx:290
static css::uno::Reference< css::uno::XInterface > createTextField(const OUString &aServiceSpecifier)
Definition: unomod.cxx:200
css::uno::Reference< css::container::XIndexReplace > SvxCreateNumRule(SdrModel *pModel)
Definition: unomod.cxx:657
virtual sal_Int32 SAL_CALL getCount() override
Definition: unomod.cxx:538
virtual css::uno::Sequence< OUString > SAL_CALL getAvailableServiceNames() override
Definition: unomod.cxx:217
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:415
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
bool isLocked() const
Definition: svdmodel.hxx:551
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance(const OUString &aServiceSpecifier) override
Definition: unomod.cxx:317
virtual css::uno::Reference< css::drawing::XDrawPages > SAL_CALL getDrawPages() override
Definition: unomod.cxx:304
SvxUnoDrawingModel(SdrModel *pDoc)
Definition: unomod.cxx:228
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:213
virtual void DeletePage(sal_uInt16 nPgNum)
Definition: svdmodel.cxx:1308
virtual void SAL_CALL remove(const css::uno::Reference< css::drawing::XDrawPage > &xPage) override
Definition: unomod.cxx:619
SdrPage * GetSdrPage() const
Definition: unopage.hxx:81
#define DBG_ASSERT(sCon, aError)
css::uno::Reference< css::uno::XInterface > mxMarkerTable
Definition: unomodel.hxx:54
int i
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unomod.cxx:521
SvxNumRule * GetNumRule() const
virtual css::uno::Reference< css::ucb::XAnyCompare > SAL_CALL createAnyCompareByName(const OUString &PropertyName) override
Definition: unomod.cxx:527
virtual css::uno::Type SAL_CALL getElementType() override
Definition: unomod.cxx:583
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:1904
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:516
css::uno::Reference< css::uno::XInterface > mxHatchTable
Definition: unomodel.hxx:51
unsigned char sal_Bool
SvxUnoDrawingModel & mrModel
Definition: unomod.cxx:71
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:652
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: unomod.cxx:647
static css::uno::Sequence< OUString > getServiceNames()
Definition: unoprov.cxx:864
css::uno::Sequence< T > concatSequences(const css::uno::Sequence< T > &rS1, const Ss &...rSn)
Abstract DrawObject.
Definition: svdobj.hxx:260
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:1715
#define E3D_INVENTOR_FLAG
Globals.
Definition: unoprov.hxx:99
static sal_uInt32 getId(const OUString &rCompareString)
Definition: unoprov.cxx:869
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: unomod.cxx:265
virtual OUString SAL_CALL getImplementationName() override
Definition: unomod.cxx:642
static const SvEventDescription * ImplGetSupportedMacroItems()
Definition: unomod.cxx:95
css::uno::Reference< css::uno::XInterface > const & getUnoPage()
Definition: svdpage.cxx:1667
SdrModel * mpDoc
Definition: unomodel.hxx:45
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
Definition: unomod.cxx:250
#define UHASHMAP_NOTFOUND
class UHashMap
Definition: unoprov.hxx:39
uno::Reference< uno::XInterface > SvxUnoDashTable_createInstance(SdrModel *pModel)
Create a gradienttable.
Definition: unodtabl.cxx:78
uno::Reference< uno::XInterface > SvxUnoTextCreateTextField(const OUString &ServiceSpecifier)
QPRO_FUNC_TYPE nType
SvxUnoDrawPagesAccess(SvxUnoDrawingModel &rMyModel)
Definition: unomod.cxx:532
css::uno::Reference< css::uno::XInterface > mxTransGradientTable
Definition: unomodel.hxx:53
virtual sal_Bool SAL_CALL hasControllersLocked() override
Definition: unomod.cxx:298
uno::Reference< uno::XInterface > SvxUnoGradientTable_createInstance(SdrModel *pModel)
Create a gradienttable.
Definition: unogtabl.cxx:74
const SfxItemPool & GetItemPool() const
Definition: svdmodel.hxx:313
const SdrPage * GetPage() const
Definition: svdmodel.hxx:121
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:474
virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 Index) override
Definition: unomod.cxx:550
virtual SdrModel & getSdrModelFromUnoModel() const override
abstract SdrModel provider
Definition: unomod.cxx:222
css::uno::Reference< css::uno::XInterface > mxGradientTable
Definition: unomodel.hxx:50
sal_uInt16 GetPageNum() const
Definition: svdpage.cxx:1501
Reference< XInterface > SvUnoImageMapPolygonObject_createInstance(const SvEventDescription *pSupportedMacroItems)
virtual sal_Bool SAL_CALL hasElements() override
Definition: unomod.cxx:588
periodic cubic Spline (ni)
Definition: svdobjkind.hxx:42
virtual css::uno::Reference< css::drawing::XDrawPage > SAL_CALL insertNewByIndex(sal_Int32 nIndex) override
Definition: unomod.cxx:597
foreign graphic (StarView Graphic)
Definition: svdobjkind.hxx:46
struct _ADOIndex Index
virtual ~SvxUnoDrawingModel() override
Definition: unomod.cxx:246
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Definition: unomod.cxx:279
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:869
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance(const OUString &aServiceSpecifier) override
Definition: unomod.cxx:195
sal_uInt16 GetPageCount() const
Definition: svdmodel.cxx:1916
const SdrObject * GetObject() const
Definition: svdmodel.hxx:122