LibreOffice Module svx (master)  1
unoshap4.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 <com/sun/star/util/XModifiable.hpp>
21 #include <com/sun/star/embed/XEmbeddedObject.hpp>
22 #include <com/sun/star/embed/XLinkageSupport.hpp>
23 #include <com/sun/star/embed/NoVisualAreaSizeException.hpp>
24 #include <com/sun/star/embed/Aspects.hpp>
25 #include <com/sun/star/task/XInteractionHandler.hpp>
26 #include <com/sun/star/ucb/CommandFailedException.hpp>
27 #include <com/sun/star/ucb/ContentCreationException.hpp>
28 
29 #include <svx/svdoole2.hxx>
30 #include <svx/svdomedia.hxx>
31 #include <svx/svdpool.hxx>
32 #include <comphelper/classids.hxx>
36 #include <cppuhelper/exc_hlp.hxx>
37 
39 
40 #include <sot/exchange.hxx>
41 
42 #include <svx/svdmodel.hxx>
43 #include "shapeimpl.hxx"
44 
45 #include <svx/unoshprp.hxx>
46 
47 #include <vcl/gdimtf.hxx>
48 #include <vcl/wmf.hxx>
49 #include <svtools/embedhlp.hxx>
50 #include <sal/log.hxx>
51 #include <tools/debug.hxx>
52 #include <tools/globname.hxx>
53 #include <tools/stream.hxx>
54 
55 #include <config_features.h>
56 
57 
58 using namespace ::cppu;
59 using namespace ::com::sun::star;
60 using namespace ::com::sun::star::uno;
61 using namespace ::com::sun::star::lang;
62 using namespace ::com::sun::star::container;
63 using namespace ::com::sun::star::beans;
64 
65 
67 : SvxShapeText( pObject, getSvxMapProvider().GetMap(SVXMAP_OLE2),
68  getSvxMapProvider().GetPropertySet(SVXMAP_OLE2,SdrObject::GetGlobalDrawObjectItemPool()) )
69 {
70 }
71 
72 SvxOle2Shape::SvxOle2Shape(SdrObject* pObject, const SfxItemPropertyMapEntry* pPropertyMap, const SvxItemPropertySet* pPropertySet)
73 : SvxShapeText( pObject, pPropertyMap, pPropertySet )
74 {
75 }
76 
78 {
79 }
80 
81 //XPropertySet
82 bool SvxOle2Shape::setPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, const css::uno::Any& rValue )
83 {
84  switch( pProperty->nWID )
85  {
87  {
88  // TODO/LATER: seems to make no sense for iconified object
89 
90  awt::Rectangle aVisArea;
91  if( !(rValue >>= aVisArea))
92  break;
93  if( auto pOle2Obj = dynamic_cast<SdrOle2Obj* >(GetSdrObject()) )
94  {
95  Size aTmp( aVisArea.X + aVisArea.Width, aVisArea.Y + aVisArea.Height );
96  uno::Reference < embed::XEmbeddedObject > xObj = pOle2Obj->GetObjRef();
97  if( xObj.is() )
98  {
99  try
100  {
101  // the API handles with MapUnit::Map100thMM map mode
102  MapUnit aObjUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( embed::Aspects::MSOLE_CONTENT ) );
103  aTmp = OutputDevice::LogicToLogic(aTmp, MapMode(MapUnit::Map100thMM), MapMode(aObjUnit));
104  xObj->setVisualAreaSize( embed::Aspects::MSOLE_CONTENT, awt::Size( aTmp.Width(), aTmp.Height() ) );
105  }
106  catch( uno::Exception& )
107  {
108  OSL_FAIL( "Couldn't set the visual area for the object!" );
109  }
110  }
111 
112  return true;
113  }
114  break;
115  }
116  case OWN_ATTR_OLE_ASPECT:
117  {
118  sal_Int64 nAspect = 0;
119  if( rValue >>= nAspect )
120  {
121  static_cast<SdrOle2Obj*>(GetSdrObject())->SetAspect( nAspect );
122  return true;
123  }
124  break;
125  }
126  case OWN_ATTR_CLSID:
127  {
128  OUString aCLSID;
129  if( rValue >>= aCLSID )
130  {
131  // init an OLE object with a global name
132  SvGlobalName aClassName;
133  if( aClassName.MakeId( aCLSID ) )
134  {
135  if( createObject( aClassName ) )
136  return true;
137  }
138  }
139  break;
140  }
141  case OWN_ATTR_THUMBNAIL:
142  {
143  uno::Reference< graphic::XGraphic > xGraphic( rValue, uno::UNO_QUERY );
144  if( xGraphic.is() )
145  {
146  const Graphic aGraphic(xGraphic);
147  static_cast<SdrOle2Obj*>(GetSdrObject())->SetGraphic(aGraphic);
148  return true;
149  }
150  break;
151  }
153  {
154  uno::Reference< graphic::XGraphic > xGraphic( rValue, uno::UNO_QUERY );
155  if( xGraphic.is() )
156  {
157  SdrOle2Obj* pOle = dynamic_cast< SdrOle2Obj* >( GetSdrObject() );
158  if( pOle )
159  {
160  GraphicObject aGrafObj( xGraphic );
161  const Graphic& aGraphic( aGrafObj.GetGraphic() );
162  pOle->SetGraphicToObj( aGraphic );
163  }
164  return true;
165  }
166  break;
167  }
169  {
170  OUString aPersistName;
171  if( rValue >>= aPersistName )
172  {
173  SdrOle2Obj *pOle;
174 #if OSL_DEBUG_LEVEL > 0
175  pOle = dynamic_cast<SdrOle2Obj*>(GetSdrObject());
176  assert(pOle);
177 #else
178  pOle = static_cast<SdrOle2Obj*>(GetSdrObject());
179 #endif
180  pOle->SetPersistName( aPersistName );
181  return true;
182  }
183  break;
184  }
186  {
187  OUString aLinkURL;
188  if( rValue >>= aLinkURL )
189  {
190  createLink( aLinkURL );
191  return true;
192  }
193  break;
194  }
195  default:
196  return SvxShapeText::setPropertyValueImpl( rName, pProperty, rValue );
197  }
198 
199  throw IllegalArgumentException();
200 }
201 
202 bool SvxOle2Shape::getPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, css::uno::Any& rValue )
203 {
204  switch( pProperty->nWID )
205  {
206  case OWN_ATTR_CLSID:
207  {
208  OUString aCLSID;
209  GetClassName_Impl(aCLSID);
210  rValue <<= aCLSID;
211  break;
212  }
213 
215  {
216  OUString sCLSID;
217  rValue <<= SotExchange::IsInternal( GetClassName_Impl(sCLSID) );
218  break;
219  }
220 
221  case OWN_ATTR_METAFILE:
222  {
223  SdrOle2Obj* pObj = dynamic_cast<SdrOle2Obj*>(GetSdrObject());
224  if( pObj )
225  {
226  const Graphic* pGraphic = pObj->GetGraphic();
227  if( pGraphic )
228  {
229  bool bIsWMF = false;
230  if ( pGraphic->IsGfxLink() )
231  {
232  GfxLink aLnk = pGraphic->GetGfxLink();
233  if ( aLnk.GetType() == GfxLinkType::NativeWmf )
234  {
235  bIsWMF = true;
236  uno::Sequence<sal_Int8> aSeq(reinterpret_cast<sal_Int8 const *>(aLnk.GetData()), static_cast<sal_Int32>(aLnk.GetDataSize()));
237  rValue <<= aSeq;
238  }
239  }
240  if ( !bIsWMF )
241  {
242  // #i119735# just use GetGDIMetaFile, it will create a buffered version of contained bitmap now automatically
243  GDIMetaFile aMtf(pObj->GetGraphic()->GetGDIMetaFile());
244  SvMemoryStream aDestStrm( 65535, 65535 );
245  ConvertGDIMetaFileToWMF( aMtf, aDestStrm, nullptr, false );
246  const uno::Sequence<sal_Int8> aSeq(
247  static_cast< const sal_Int8* >(aDestStrm.GetData()),
248  aDestStrm.GetEndOfData());
249  rValue <<= aSeq;
250  }
251  }
252  }
253  else
254  {
255  rValue = GetBitmap( true );
256  }
257  break;
258  }
259 
261  {
262  awt::Rectangle aVisArea;
263  if( dynamic_cast<const SdrOle2Obj* >(GetSdrObject()) != nullptr)
264  {
265  MapMode aMapMode( MapUnit::Map100thMM ); // the API uses this map mode
266  Size aTmp = static_cast<SdrOle2Obj*>(GetSdrObject())->GetOrigObjSize( &aMapMode ); // get the size in the requested map mode
267  aVisArea = awt::Rectangle( 0, 0, aTmp.Width(), aTmp.Height() );
268  }
269 
270  rValue <<= aVisArea;
271  break;
272  }
273 
274  case OWN_ATTR_OLESIZE:
275  {
276  Size aTmp( static_cast<SdrOle2Obj*>(GetSdrObject())->GetOrigObjSize() );
277  rValue <<= awt::Size( aTmp.Width(), aTmp.Height() );
278  break;
279  }
280 
281  case OWN_ATTR_OLE_ASPECT:
282  {
283  rValue <<= static_cast<SdrOle2Obj*>(GetSdrObject())->GetAspect();
284  break;
285  }
286 
287  case OWN_ATTR_OLEMODEL:
290  {
291  SdrOle2Obj* pObj = dynamic_cast<SdrOle2Obj*>( GetSdrObject() );
292  if( pObj )
293  {
294  uno::Reference < embed::XEmbeddedObject > xObj( pObj->GetObjRef() );
295  if ( xObj.is()
297  {
298  // Discussed with CL fue to the before GetPaintingPageView
299  // usage. Removed it, former fallback is used now
300  if ( pProperty->nWID == OWN_ATTR_OLEMODEL || pProperty->nWID == OWN_ATTR_OLE_EMBEDDED_OBJECT )
301  {
302  const bool bSuccess(pObj->AddOwnLightClient());
303  SAL_WARN_IF(!bSuccess, "svx.svdraw", "An object without client is provided!");
304  }
305 
306  if ( pProperty->nWID == OWN_ATTR_OLEMODEL )
307  rValue <<= pObj->GetObjRef()->getComponent();
308  else
309  rValue <<= xObj;
310  }
311  }
312  break;
313  }
314 
316  {
317  uno::Reference< graphic::XGraphic > xGraphic;
318  const Graphic* pGraphic = static_cast<SdrOle2Obj*>( GetSdrObject() )->GetGraphic();
319  if( pGraphic )
320  xGraphic = pGraphic->GetXGraphic();
321  rValue <<= xGraphic;
322  break;
323  }
324 
325  case OWN_ATTR_THUMBNAIL:
326  {
327  uno::Reference< graphic::XGraphic > xGraphic;
328  const Graphic* pGraphic = static_cast<SdrOle2Obj*>( GetSdrObject() )->GetGraphic();
329  if( pGraphic )
330  xGraphic = pGraphic->GetXGraphic();
331  rValue <<= xGraphic;
332  break;
333  }
335  {
336  OUString aPersistName;
337  SdrOle2Obj* pOle = dynamic_cast< SdrOle2Obj* >( GetSdrObject() );
338 
339  if( pOle )
340  {
341  aPersistName = pOle->GetPersistName();
342  if( !aPersistName.isEmpty() )
343  {
344  ::comphelper::IEmbeddedHelper* pPersist(GetSdrObject()->getSdrModelFromSdrObject().GetPersist());
345  if( (nullptr == pPersist) || !pPersist->getEmbeddedObjectContainer().HasEmbeddedObject( pOle->GetPersistName() ) )
346  aPersistName.clear();
347  }
348  }
349 
350  rValue <<= aPersistName;
351  break;
352  }
354  {
355  OUString aLinkURL;
356  SdrOle2Obj* pOle = dynamic_cast< SdrOle2Obj* >( GetSdrObject() );
357 
358  if( pOle )
359  {
360  uno::Reference< embed::XLinkageSupport > xLink( pOle->GetObjRef(), uno::UNO_QUERY );
361  if ( xLink.is() && xLink->isLink() )
362  aLinkURL = xLink->getLinkURL();
363  }
364 
365  rValue <<= aLinkURL;
366  break;
367  }
368  default:
369  return SvxShapeText::getPropertyValueImpl( rName, pProperty, rValue );
370  }
371 
372  return true;
373 }
374 
375 bool SvxOle2Shape::createObject( const SvGlobalName &aClassName )
376 {
378 
379  SdrOle2Obj* pOle2Obj = dynamic_cast< SdrOle2Obj* >( GetSdrObject() );
380  if ( !pOle2Obj || !pOle2Obj->IsEmpty() )
381  return false;
382 
383  // create storage and inplace object
385  OUString aPersistName;
386  OUString aTmpStr;
388  aPersistName = aTmpStr;
389 
390  uno::Sequence<beans::PropertyValue> objArgs( comphelper::InitPropertySequence({
391  { "DefaultParentBaseURL", Any(pPersist->getDocumentBaseURL()) }
392  }));
393  //TODO/LATER: how to cope with creation failure?!
394  uno::Reference<embed::XEmbeddedObject> xObj(
396  aClassName.GetByteSequence(), objArgs, aPersistName));
397  if( xObj.is() )
398  {
399  tools::Rectangle aRect = pOle2Obj->GetLogicRect();
400  if ( aRect.GetWidth() == 101 && aRect.GetHeight() == 101 )
401  {
402  // TODO/LATER: is it possible that this method is used to create an iconified object?
403  // default size
404  try
405  {
406  awt::Size aSz = xObj->getVisualAreaSize( pOle2Obj->GetAspect() );
407  aRect.SetSize( Size( aSz.Width, aSz.Height ) );
408  }
409  catch( embed::NoVisualAreaSizeException& )
410  {}
411  pOle2Obj->SetLogicRect( aRect );
412  }
413  else
414  {
415  awt::Size aSz;
416  Size aSize = aRect.GetSize();
417  aSz.Width = aSize.Width();
418  aSz.Height = aSize.Height();
419  if (aSz.Width != 0 || aSz.Height != 0)
420  {
421  //HACK: can aSz legally be empty?
422  xObj->setVisualAreaSize( pOle2Obj->GetAspect(), aSz );
423  }
424  }
425 
426  // connect the object after the visual area is set
427  aTmpStr = aPersistName;
429 
430  // the object is inserted during setting of PersistName property usually
431  if( pOle2Obj->IsEmpty() )
432  pOle2Obj->SetObjRef( xObj );
433  }
434 
435  return xObj.is();
436 }
437 
438 void SvxOle2Shape::createLink( const OUString& aLinkURL )
439 {
441 
442  SdrOle2Obj* pOle2Obj = dynamic_cast< SdrOle2Obj* >( GetSdrObject() );
443  if ( !pOle2Obj || !pOle2Obj->IsEmpty() )
444  return;
445 
446  OUString aPersistName;
447 
449 
450  uno::Sequence< beans::PropertyValue > aMediaDescr{ comphelper::makePropertyValue("URL",
451  aLinkURL) };
452 
453  uno::Reference< task::XInteractionHandler > xInteraction = pPersist->getInteractionHandler();
454  if ( xInteraction.is() )
455  {
456  aMediaDescr.realloc( 2 );
457  auto pMediaDescr = aMediaDescr.getArray();
458  pMediaDescr[1].Name = "InteractionHandler";
459  pMediaDescr[1].Value <<= xInteraction;
460  }
461 
462  //TODO/LATER: how to cope with creation failure?!
463  uno::Reference< embed::XEmbeddedObject > xObj =
464  pPersist->getEmbeddedObjectContainer().InsertEmbeddedLink( aMediaDescr , aPersistName );
465 
466  if( !xObj.is() )
467  return;
468 
469  tools::Rectangle aRect = pOle2Obj->GetLogicRect();
470  if ( aRect.GetWidth() == 101 && aRect.GetHeight() == 101 )
471  {
472  // default size
473  try
474  {
475  awt::Size aSz = xObj->getVisualAreaSize( pOle2Obj->GetAspect() );
476  aRect.SetSize( Size( aSz.Width, aSz.Height ) );
477  }
478  catch( embed::NoVisualAreaSizeException& )
479  {}
480  pOle2Obj->SetLogicRect( aRect );
481  }
482  else
483  {
484  awt::Size aSz;
485  Size aSize = pOle2Obj->GetLogicRect().GetSize();
486  aSz.Width = aSize.Width();
487  aSz.Height = aSize.Height();
488  xObj->setVisualAreaSize( pOle2Obj->GetAspect(), aSz );
489  }
490 
491  // connect the object after the visual area is set
493 
494  // the object is inserted during setting of PersistName property usually
495  if ( pOle2Obj->IsEmpty() )
496  pOle2Obj->SetObjRef( xObj );
497 }
498 
500 {
502  if( pPersist && !pPersist->isEnableSetModified() )
503  {
504  SdrOle2Obj* pOle = dynamic_cast< SdrOle2Obj* >( GetSdrObject() );
505  if( pOle && !pOle->IsEmpty() )
506  {
507  uno::Reference < util::XModifiable > xMod( pOle->GetObjRef(), uno::UNO_QUERY );
508  if( xMod.is() )
509  // TODO/MBA: what's this?!
510  xMod->setModified( false );
511  }
512  }
513 }
514 
516 {
518  SvGlobalName aClassName;
519  SdrOle2Obj* pOle2Obj = dynamic_cast< SdrOle2Obj* >( GetSdrObject() );
520 
521  if( pOle2Obj )
522  {
523  rHexCLSID.clear();
524 
525  if( pOle2Obj->IsEmpty() )
526  {
528  if( pPersist )
529  {
530  uno::Reference < embed::XEmbeddedObject > xObj =
532  if ( xObj.is() )
533  {
534  aClassName = SvGlobalName( xObj->getClassID() );
535  rHexCLSID = aClassName.GetHexName();
536  }
537  }
538  }
539 
540  if (rHexCLSID.isEmpty())
541  {
542  const uno::Reference < embed::XEmbeddedObject >& xObj( pOle2Obj->GetObjRef() );
543  if ( xObj.is() )
544  {
545  aClassName = SvGlobalName( xObj->getClassID() );
546  rHexCLSID = aClassName.GetHexName();
547  }
548  }
549  }
550 
551  return aClassName;
552 }
553 
555  : SvxOle2Shape( pObject, getSvxMapProvider().GetMap(SVXMAP_APPLET), getSvxMapProvider().GetPropertySet(SVXMAP_APPLET, SdrObject::GetGlobalDrawObjectItemPool()) )
556 {
557  SetShapeType( "com.sun.star.drawing.AppletShape" );
558 }
559 
561 {
562 }
563 
564 void SvxAppletShape::Create( SdrObject* pNewObj, SvxDrawPage* pNewPage )
565 {
566  SvxShape::Create( pNewObj, pNewPage );
567  const SvGlobalName aAppletClassId( SO3_APPLET_CLASSID );
568  createObject(aAppletClassId);
569  SetShapeType( "com.sun.star.drawing.AppletShape" );
570 }
571 
572 void SAL_CALL SvxAppletShape::setPropertyValue( const OUString& aPropertyName, const css::uno::Any& rValue )
573 {
574  SvxShape::setPropertyValue( aPropertyName, rValue );
576 }
577 
578 void SAL_CALL SvxAppletShape::setPropertyValues( const css::uno::Sequence< OUString >& aPropertyNames, const css::uno::Sequence< css::uno::Any >& rValues )
579 {
580  SvxShape::setPropertyValues( aPropertyNames, rValues );
582 }
583 
584 bool SvxAppletShape::setPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, const css::uno::Any& rValue )
585 {
586  if( (pProperty->nWID >= OWN_ATTR_APPLET_DOCBASE) && (pProperty->nWID <= OWN_ATTR_APPLET_ISSCRIPT) )
587  {
588  if ( svt::EmbeddedObjectRef::TryRunningState( static_cast<SdrOle2Obj*>(GetSdrObject())->GetObjRef() ) )
589  {
590  uno::Reference < beans::XPropertySet > xSet( static_cast<SdrOle2Obj*>(GetSdrObject())->GetObjRef()->getComponent(), uno::UNO_QUERY );
591  if( xSet.is() )
592  {
593  // allow exceptions to pass through
594  xSet->setPropertyValue( rName, rValue );
595  }
596  }
597  return true;
598  }
599  else
600  {
601  return SvxOle2Shape::setPropertyValueImpl( rName, pProperty, rValue );
602  }
603 }
604 
605 bool SvxAppletShape::getPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, css::uno::Any& rValue )
606 {
607  if( (pProperty->nWID >= OWN_ATTR_APPLET_DOCBASE) && (pProperty->nWID <= OWN_ATTR_APPLET_ISSCRIPT) )
608  {
609  if ( svt::EmbeddedObjectRef::TryRunningState( static_cast<SdrOle2Obj*>(GetSdrObject())->GetObjRef() ) )
610  {
611  uno::Reference < beans::XPropertySet > xSet( static_cast<SdrOle2Obj*>(GetSdrObject())->GetObjRef()->getComponent(), uno::UNO_QUERY );
612  if( xSet.is() )
613  {
614  rValue = xSet->getPropertyValue( rName );
615  }
616  }
617  return true;
618  }
619  else
620  {
621  return SvxOle2Shape::getPropertyValueImpl( rName, pProperty, rValue );
622  }
623 }
624 
626  : SvxOle2Shape( pObject, getSvxMapProvider().GetMap(SVXMAP_PLUGIN), getSvxMapProvider().GetPropertySet(SVXMAP_PLUGIN, SdrObject::GetGlobalDrawObjectItemPool()) )
627 {
628  SetShapeType( "com.sun.star.drawing.PluginShape" );
629 }
630 
632 {
633 }
634 
635 void SvxPluginShape::Create( SdrObject* pNewObj, SvxDrawPage* pNewPage )
636 {
637  SvxShape::Create( pNewObj, pNewPage );
638  const SvGlobalName aPluginClassId( SO3_PLUGIN_CLASSID );
639  createObject(aPluginClassId);
640  SetShapeType( "com.sun.star.drawing.PluginShape" );
641 }
642 
643 void SAL_CALL SvxPluginShape::setPropertyValue( const OUString& aPropertyName, const css::uno::Any& rValue )
644 {
645  SvxShape::setPropertyValue( aPropertyName, rValue );
647 }
648 
649 void SAL_CALL SvxPluginShape::setPropertyValues( const css::uno::Sequence< OUString >& aPropertyNames, const css::uno::Sequence< css::uno::Any >& rValues )
650 {
651  SvxShape::setPropertyValues( aPropertyNames, rValues );
653 }
654 
655 bool SvxPluginShape::setPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, const css::uno::Any& rValue )
656 {
657  if( (pProperty->nWID >= OWN_ATTR_PLUGIN_MIMETYPE) && (pProperty->nWID <= OWN_ATTR_PLUGIN_COMMANDS) )
658  {
659  if( svt::EmbeddedObjectRef::TryRunningState( static_cast<SdrOle2Obj*>(GetSdrObject())->GetObjRef() ) )
660  {
661  uno::Reference < beans::XPropertySet > xSet( static_cast<SdrOle2Obj*>(GetSdrObject())->GetObjRef()->getComponent(), uno::UNO_QUERY );
662  if( xSet.is() )
663  {
664  // allow exceptions to pass through
665  xSet->setPropertyValue( rName, rValue );
666  }
667  }
668  return true;
669  }
670  else
671  {
672  return SvxOle2Shape::setPropertyValueImpl( rName, pProperty, rValue );
673  }
674 }
675 
676 bool SvxPluginShape::getPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, css::uno::Any& rValue )
677 {
678  if( (pProperty->nWID >= OWN_ATTR_PLUGIN_MIMETYPE) && (pProperty->nWID <= OWN_ATTR_PLUGIN_COMMANDS) )
679  {
680  if( svt::EmbeddedObjectRef::TryRunningState( static_cast<SdrOle2Obj*>(GetSdrObject())->GetObjRef() ) )
681  {
682  uno::Reference < beans::XPropertySet > xSet( static_cast<SdrOle2Obj*>(GetSdrObject())->GetObjRef()->getComponent(), uno::UNO_QUERY );
683  if( xSet.is() )
684  {
685  rValue = xSet->getPropertyValue( rName );
686  }
687  }
688  return true;
689  }
690  else
691  {
692  return SvxOle2Shape::getPropertyValueImpl( rName, pProperty, rValue );
693  }
694 }
695 
696 
698 : SvxOle2Shape( pObject, getSvxMapProvider().GetMap(SVXMAP_FRAME), getSvxMapProvider().GetPropertySet(SVXMAP_FRAME, SdrObject::GetGlobalDrawObjectItemPool()) )
699 {
700  SetShapeType( "com.sun.star.drawing.FrameShape" );
701 }
702 
704 {
705 }
706 
707 void SvxFrameShape::Create( SdrObject* pNewObj, SvxDrawPage* pNewPage )
708 {
709  SvxShape::Create( pNewObj, pNewPage );
710  const SvGlobalName aIFrameClassId( SO3_IFRAME_CLASSID );
711  createObject(aIFrameClassId);
712  SetShapeType( "com.sun.star.drawing.FrameShape" );
713 }
714 
715 void SAL_CALL SvxFrameShape::setPropertyValue( const OUString& aPropertyName, const css::uno::Any& rValue )
716 {
717  SvxShape::setPropertyValue( aPropertyName, rValue );
719 }
720 
721 void SAL_CALL SvxFrameShape::setPropertyValues( const css::uno::Sequence< OUString >& aPropertyNames, const css::uno::Sequence< css::uno::Any >& rValues )
722 {
723  SvxShape::setPropertyValues( aPropertyNames, rValues );
725 }
726 
727 bool SvxFrameShape::setPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, const css::uno::Any& rValue )
728 {
729  if( (pProperty->nWID >= OWN_ATTR_FRAME_URL) && (pProperty->nWID <= OWN_ATTR_FRAME_MARGIN_HEIGHT) )
730  {
731  if( svt::EmbeddedObjectRef::TryRunningState( static_cast<SdrOle2Obj*>(GetSdrObject())->GetObjRef() ) )
732  {
733  uno::Reference < beans::XPropertySet > xSet( static_cast<SdrOle2Obj*>(GetSdrObject())->GetObjRef()->getComponent(), uno::UNO_QUERY );
734  if( xSet.is() )
735  {
736  // allow exceptions to pass through
737  xSet->setPropertyValue( rName, rValue );
738  }
739  }
740  return true;
741  }
742  else
743  {
744  return SvxOle2Shape::setPropertyValueImpl( rName, pProperty, rValue );
745  }
746 }
747 
748 bool SvxFrameShape::getPropertyValueImpl(const OUString& rName, const SfxItemPropertyMapEntry* pProperty,
749  css::uno::Any& rValue)
750 {
751  if( (pProperty->nWID >= OWN_ATTR_FRAME_URL) && (pProperty->nWID <= OWN_ATTR_FRAME_MARGIN_HEIGHT) )
752  {
753  if( svt::EmbeddedObjectRef::TryRunningState( static_cast<SdrOle2Obj*>(GetSdrObject())->GetObjRef() ) )
754  {
755  uno::Reference < beans::XPropertySet > xSet( static_cast<SdrOle2Obj*>(GetSdrObject())->GetObjRef()->getComponent(), uno::UNO_QUERY );
756  if( xSet.is() )
757  {
758  rValue = xSet->getPropertyValue( rName );
759  }
760  }
761  return true;
762  }
763  else
764  {
765  return SvxOle2Shape::getPropertyValueImpl( rName, pProperty, rValue );
766  }
767 }
768 SvxMediaShape::SvxMediaShape(SdrObject* pObj, OUString const & referer)
769 : SvxShape( pObj, getSvxMapProvider().GetMap(SVXMAP_MEDIA), getSvxMapProvider().GetPropertySet(SVXMAP_MEDIA, SdrObject::GetGlobalDrawObjectItemPool()) ),
770  referer_(referer)
771 {
772  SetShapeType( "com.sun.star.drawing.MediaShape" );
773 }
774 
775 
777 {
778 }
779 
780 
781 bool SvxMediaShape::setPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, const css::uno::Any& rValue )
782 {
783  if( ((pProperty->nWID >= OWN_ATTR_MEDIA_URL) && (pProperty->nWID <= OWN_ATTR_MEDIA_ZOOM))
784  || (pProperty->nWID == OWN_ATTR_MEDIA_STREAM)
785  || (pProperty->nWID == OWN_ATTR_MEDIA_MIMETYPE)
786  || (pProperty->nWID == OWN_ATTR_VALUE_GRAPHIC))
787  {
788 #if HAVE_FEATURE_AVMEDIA
789  SdrMediaObj* pMedia = static_cast< SdrMediaObj* >( GetSdrObject() );
790  ::avmedia::MediaItem aItem;
791  bool bOk = false;
792 #endif
793 
794  switch( pProperty->nWID )
795  {
796  case OWN_ATTR_MEDIA_URL:
797 #if HAVE_FEATURE_AVMEDIA
798  {
799  OUString aURL;
800  if( rValue >>= aURL )
801  {
802  bOk = true;
803  aItem.setURL( aURL, "", referer_ );
804  }
805  }
806 #endif
807  break;
808 
809  case OWN_ATTR_MEDIA_LOOP:
810 #if HAVE_FEATURE_AVMEDIA
811  {
812  bool bLoop;
813 
814  if( rValue >>= bLoop )
815  {
816  bOk = true;
817  aItem.setLoop( bLoop );
818  }
819  }
820 #endif
821  break;
822 
823  case OWN_ATTR_MEDIA_MUTE:
824 #if HAVE_FEATURE_AVMEDIA
825  {
826  bool bMute;
827 
828  if( rValue >>= bMute )
829  {
830  bOk = true;
831  aItem.setMute( bMute );
832  }
833  }
834 #endif
835  break;
836 
838 #if HAVE_FEATURE_AVMEDIA
839  {
840  sal_Int16 nVolumeDB = sal_Int16();
841 
842  if( rValue >>= nVolumeDB )
843  {
844  bOk = true;
845  aItem.setVolumeDB( nVolumeDB );
846  }
847  }
848 #endif
849  break;
850 
851  case OWN_ATTR_MEDIA_ZOOM:
852 #if HAVE_FEATURE_AVMEDIA
853  {
854  css::media::ZoomLevel eLevel;
855 
856  if( rValue >>= eLevel )
857  {
858  bOk = true;
859  aItem.setZoom( eLevel );
860  }
861  }
862 #endif
863  break;
864 
866 #if HAVE_FEATURE_AVMEDIA
867  {
868  OUString sMimeType;
869  if( rValue >>= sMimeType )
870  {
871  bOk = true;
872  aItem.setMimeType( sMimeType );
873  }
874  }
875 #endif
876  break;
877 
879 #if HAVE_FEATURE_AVMEDIA
880  {
881  uno::Reference<graphic::XGraphic> xGraphic(rValue, uno::UNO_QUERY);
882  if (xGraphic.is())
883  {
884  bOk = true;
885  aItem.setGraphic(Graphic(xGraphic));
886  }
887  }
888 #endif
889  break;
890 
892 #if HAVE_FEATURE_AVMEDIA
893  try
894  {
895  uno::Reference<io::XInputStream> xStream;
896  if (rValue >>= xStream)
897  {
898  pMedia->SetInputStream(xStream);
899  }
900  }
901  catch (const css::ucb::ContentCreationException&)
902  {
903  css::uno::Any exc = cppu::getCaughtException();
904  throw css::lang::WrappedTargetException(
905  "ContentCreationException Setting InputStream!",
906  static_cast<OWeakObject *>(this),
907  exc);
908  }
909  catch (const css::ucb::CommandFailedException&)
910  {
911  css::uno::Any anyEx = cppu::getCaughtException();
912  throw css::lang::WrappedTargetException(
913  "CommandFailedException Setting InputStream!",
914  static_cast<OWeakObject *>(this),
915  anyEx);
916  }
917 #endif
918  break;
919 
920  default:
921  OSL_FAIL("SvxMediaShape::setPropertyValueImpl(), unknown argument!");
922  }
923 
924 #if HAVE_FEATURE_AVMEDIA
925  if( bOk )
926  {
927  pMedia->setMediaProperties( aItem );
928  return true;
929  }
930 #endif
931  }
932  else
933  {
934  return SvxShape::setPropertyValueImpl( rName, pProperty, rValue );
935  }
936 
937  throw IllegalArgumentException();
938 }
939 
940 
941 bool SvxMediaShape::getPropertyValueImpl( const OUString& rName, const SfxItemPropertyMapEntry* pProperty, css::uno::Any& rValue )
942 {
943  if ( ((pProperty->nWID >= OWN_ATTR_MEDIA_URL) &&
944  (pProperty->nWID <= OWN_ATTR_MEDIA_ZOOM))
945  || (pProperty->nWID == OWN_ATTR_MEDIA_STREAM)
946  || (pProperty->nWID == OWN_ATTR_MEDIA_TEMPFILEURL)
947  || (pProperty->nWID == OWN_ATTR_MEDIA_MIMETYPE)
948  || (pProperty->nWID == OWN_ATTR_FALLBACK_GRAPHIC)
949  || (pProperty->nWID == OWN_ATTR_VALUE_GRAPHIC))
950  {
951  SdrMediaObj* pMedia = static_cast< SdrMediaObj* >( GetSdrObject() );
952 #if HAVE_FEATURE_AVMEDIA
953  const ::avmedia::MediaItem aItem( pMedia->getMediaProperties() );
954 #endif
955 
956  switch( pProperty->nWID )
957  {
958  case OWN_ATTR_MEDIA_URL:
959 #if HAVE_FEATURE_AVMEDIA
960  rValue <<= aItem.getURL();
961 #endif
962  break;
963 
964  case OWN_ATTR_MEDIA_LOOP:
965 #if HAVE_FEATURE_AVMEDIA
966  rValue <<= aItem.isLoop();
967 #endif
968  break;
969 
970  case OWN_ATTR_MEDIA_MUTE:
971 #if HAVE_FEATURE_AVMEDIA
972  rValue <<= aItem.isMute();
973 #endif
974  break;
975 
977 #if HAVE_FEATURE_AVMEDIA
978  rValue <<= aItem.getVolumeDB();
979 #endif
980  break;
981 
982  case OWN_ATTR_MEDIA_ZOOM:
983 #if HAVE_FEATURE_AVMEDIA
984  rValue <<= aItem.getZoom();
985 #endif
986  break;
987 
989  try
990  {
991  rValue <<= pMedia->GetInputStream();
992  }
993  catch (const css::ucb::ContentCreationException&)
994  {
995  css::uno::Any anyEx = cppu::getCaughtException();
996  throw css::lang::WrappedTargetException(
997  "ContentCreationException Getting InputStream!",
998  static_cast < OWeakObject * > ( this ), anyEx );
999  }
1000  catch (const css::ucb::CommandFailedException&)
1001  {
1002  css::uno::Any anyEx = cppu::getCaughtException();
1003  throw css::lang::WrappedTargetException(
1004  "CommandFailedException Getting InputStream!",
1005  static_cast < OWeakObject * > ( this ), anyEx );
1006  }
1007 
1008  break;
1009 
1011 #if HAVE_FEATURE_AVMEDIA
1012  rValue <<= aItem.getTempURL();
1013 #endif
1014  break;
1015 
1017 #if HAVE_FEATURE_AVMEDIA
1018  rValue <<= aItem.getMimeType();
1019 #endif
1020  break;
1021 
1023 #if HAVE_FEATURE_AVMEDIA
1024  {
1025  Graphic aGraphic = aItem.getGraphic();
1026  if (!aGraphic.IsNone())
1027  {
1028  rValue <<= aGraphic.GetXGraphic();
1029  }
1030  }
1031 #endif
1032  break;
1033 
1035  rValue <<= pMedia->getSnapshot();
1036  break;
1037 
1038  default:
1039  OSL_FAIL("SvxMediaShape::getPropertyValueImpl(), unknown property!");
1040  }
1041  return true;
1042  }
1043  else
1044  {
1045  return SvxShape::getPropertyValueImpl( rName, pProperty, rValue );
1046  }
1047 }
1048 
1049 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual ~SvxFrameShape() noexcept override
Definition: unoshap4.cxx:703
virtual bool setPropertyValueImpl(const OUString &rName, const SfxItemPropertyMapEntry *pProperty, const css::uno::Any &rValue) override
Definition: unoshap4.cxx:584
#define OWN_ATTR_MEDIA_STREAM
Definition: unoshprp.hxx:180
css::uno::Reference< css::embed::XEmbeddedObject > CreateEmbeddedObject(const css::uno::Sequence< sal_Int8 > &, OUString &, OUString const *pBaseURL=nullptr)
virtual bool getPropertyValueImpl(const OUString &rName, const SfxItemPropertyMapEntry *pProperty, css::uno::Any &rValue) override
Definition: unoshape.cxx:3962
virtual bool getPropertyValueImpl(const OUString &rName, const SfxItemPropertyMapEntry *pProperty, css::uno::Any &rValue) override
Definition: unoshap4.cxx:941
virtual bool setPropertyValueImpl(const OUString &rName, const SfxItemPropertyMapEntry *pProperty, const css::uno::Any &rValue) override
Definition: unoshap4.cxx:655
URL aURL
virtual bool isEnableSetModified() const =0
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
Definition: unoshap4.cxx:643
virtual ~SvxMediaShape() noexcept override
Definition: unoshap4.cxx:776
bool setVolumeDB(sal_Int16 nDB)
#define OWN_ATTR_FALLBACK_GRAPHIC
Definition: unoshprp.hxx:184
#define OWN_ATTR_OLE_ASPECT
Definition: unoshprp.hxx:164
bool setURL(const OUString &rURL, const OUString &rTempURL, const OUString &rReferer)
#define OWN_ATTR_METAFILE
Definition: unoshprp.hxx:96
css::uno::Reference< css::embed::XEmbeddedObject > const & GetObjRef() const
Definition: svdoole2.cxx:1787
SAL_WARN_UNUSED_RESULT Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
#define OWN_ATTR_FRAME_URL
Definition: unoshprp.hxx:130
bool IsNone() const
void SetPersistName(const OUString &rPersistName)
Definition: svdoole2.cxx:1345
virtual bool getPropertyValueImpl(const OUString &rName, const SfxItemPropertyMapEntry *pProperty, css::uno::Any &rValue)
Definition: unoshape.cxx:2553
virtual bool getPropertyValueImpl(const OUString &rName, const SfxItemPropertyMapEntry *pProperty, css::uno::Any &rValue) override
Definition: unoshap4.cxx:202
#define SO3_IFRAME_CLASSID
css::beans::PropertyValue makePropertyValue(const OUString &rName, T &&rValue)
bool ConvertGDIMetaFileToWMF(const GDIMetaFile &rMTF, SvStream &rTargetStream, FilterConfigItem const *pConfigItem, bool bPlaceable)
#define OWN_ATTR_VALUE_GRAPHIC
Definition: unoshprp.hxx:161
css::uno::Sequence< sal_Int8 > GetByteSequence() const
virtual OUString getDocumentBaseURL() const =0
#define OWN_ATTR_FRAME_MARGIN_HEIGHT
Definition: unoshprp.hxx:135
bool HasEmbeddedObject(const OUString &)
virtual void SAL_CALL setPropertyValues(const css::uno::Sequence< OUString > &aPropertyNames, const css::uno::Sequence< css::uno::Any > &aValues) override
Definition: unoshap4.cxx:578
css::uno::Reference< css::embed::XEmbeddedObject > InsertEmbeddedLink(const css::uno::Sequence< css::beans::PropertyValue > &, OUString &)
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
Definition: unoshape.cxx:1542
virtual bool getPropertyValueImpl(const OUString &rName, const SfxItemPropertyMapEntry *pProperty, css::uno::Any &rValue) override
Definition: unoshap4.cxx:605
#define OWN_ATTR_OLESIZE
Definition: unoshprp.hxx:101
#define OWN_ATTR_MEDIA_VOLUMEDB
Definition: unoshprp.hxx:157
virtual bool setPropertyValueImpl(const OUString &rName, const SfxItemPropertyMapEntry *pProperty, const css::uno::Any &rValue) override
Definition: unoshap4.cxx:82
bool IsGfxLink() const
SvxMediaShape(SdrObject *pObj, OUString const &referer)
Definition: unoshap4.cxx:768
virtual void Create(SdrObject *pNewOpj, SvxDrawPage *pNewPage) override
Definition: unoshap4.cxx:707
void SetObjRef(const css::uno::Reference< css::embed::XEmbeddedObject > &rNewObjRef)
Definition: svdoole2.cxx:1294
#define OWN_ATTR_MEDIA_TEMPFILEURL
Definition: unoshprp.hxx:181
constexpr tools::Long Width() const
#define OWN_ATTR_OLE_LINKURL
Definition: unoshprp.hxx:174
Reference< XInputStream > xStream
virtual void Create(SdrObject *pNewOpj, SvxDrawPage *pNewPage)
Definition: unoshape.cxx:382
Any SAL_CALL getCaughtException()
virtual bool getPropertyValueImpl(const OUString &rName, const SfxItemPropertyMapEntry *pProperty, css::uno::Any &rValue) override
Definition: unoshap4.cxx:676
const ::avmedia::MediaItem & getMediaProperties() const
Definition: svdomedia.cxx:253
virtual EmbeddedObjectContainer & getEmbeddedObjectContainer() const =0
bool setGraphic(const Graphic &rGraphic)
constexpr tools::Long GetWidth() const
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
Definition: unoshap4.cxx:572
const GDIMetaFile & GetGDIMetaFile() const
#define OWN_ATTR_CLSID
Definition: unoshprp.hxx:105
bool setMimeType(const OUString &rMimeType)
#define SVXMAP_PLUGIN
Definition: unoprov.hxx:68
css::uno::Sequence< css::beans::PropertyValue > InitPropertySequence(::std::initializer_list< ::std::pair< OUString, css::uno::Any > > vInit)
#define OWN_ATTR_PLUGIN_COMMANDS
Definition: unoshprp.hxx:129
bool createObject(const SvGlobalName &aClassName)
Definition: unoshap4.cxx:375
void SetShapeType(const OUString &ShapeType)
Definition: unoshape.hxx:207
void SetGraphicToObj(const Graphic &aGraphic)
Definition: svdoole2.cxx:1816
#define SVXMAP_FRAME
Definition: unoprov.hxx:69
static bool IsInternal(const SvGlobalName &)
#define OWN_ATTR_OLE_EMBEDDED_OBJECT
Definition: unoshprp.hxx:163
#define OWN_ATTR_OLE_EMBEDDED_OBJECT_NONEWCLIENT
Definition: unoshprp.hxx:152
#define OWN_ATTR_MEDIA_LOOP
Definition: unoshprp.hxx:155
virtual bool getPropertyValueImpl(const OUString &rName, const SfxItemPropertyMapEntry *pProperty, css::uno::Any &rValue) override
Definition: unoshap4.cxx:748
OUString GetHexName() const
#define OWN_ATTR_MEDIA_MIMETYPE
Definition: unoshprp.hxx:183
bool MakeId(std::u16string_view rId)
bool setLoop(bool bLoop)
#define OWN_ATTR_OLE_VISAREA
Definition: unoshprp.hxx:147
SdrModel & getSdrModelFromSdrObject() const
Definition: svdobj.cxx:284
virtual void SetLogicRect(const tools::Rectangle &rRect)
Definition: svdobj.cxx:1699
#define SVXMAP_MEDIA
Definition: unoprov.hxx:74
#define SO3_APPLET_CLASSID
#define OWN_ATTR_THUMBNAIL
Definition: unoshprp.hxx:150
bool setZoom(css::media::ZoomLevel eZoom)
void createLink(const OUString &aLinkURL)
Definition: unoshap4.cxx:438
constexpr OUStringLiteral UNO_NAME_OLE2_PERSISTNAME
GfxLink GetGfxLink() const
void resetModifiedState()
Definition: unoshap4.cxx:499
Abstract DrawObject.
Definition: svdobj.hxx:260
#define OWN_ATTR_APPLET_ISSCRIPT
Definition: unoshprp.hxx:126
virtual bool setPropertyValueImpl(const OUString &rName, const SfxItemPropertyMapEntry *pProperty, const css::uno::Any &rValue) override
Definition: unoshap4.cxx:781
#define SVXMAP_OLE2
Definition: unoprov.hxx:67
css::uno::Any GetBitmap(bool bMetaFile=false) const
Definition: unoshape.cxx:625
css::uno::Reference< css::embed::XEmbeddedObject > GetEmbeddedObject(const OUString &, OUString const *pBaseURL=nullptr)
void SetInputStream(css::uno::Reference< css::io::XInputStream > const &)
Definition: svdomedia.cxx:275
virtual css::uno::Reference< css::task::XInteractionHandler > getInteractionHandler() const =0
#define OWN_ATTR_MEDIA_ZOOM
Definition: unoshprp.hxx:158
void SetSize(const Size &)
virtual ~SvxOle2Shape() noexcept override
Definition: unoshap4.cxx:77
constexpr Size GetSize() const
virtual bool setPropertyValueImpl(const OUString &rName, const SfxItemPropertyMapEntry *pProperty, const css::uno::Any &rValue) override
Definition: unoshape.cxx:3939
#define OWN_ATTR_INTERNAL_OLE
Definition: unoshprp.hxx:162
sal_Int64 GetAspect() const
Definition: svdoole2.cxx:808
css::uno::Reference< css::graphic::XGraphic > const & getSnapshot() const
Definition: svdomedia.cxx:149
#define OWN_ATTR_PLUGIN_MIMETYPE
Definition: unoshprp.hxx:127
static MapUnit UnoEmbed2VCLMapUnit(sal_Int32 nUnoEmbedMapUnit)
const Graphic & GetGraphic() const
#define SAL_WARN_IF(condition, area, stream)
constexpr tools::Long Height() const
::comphelper::IEmbeddedHelper * GetPersist() const
Definition: svdmodel.hxx:354
virtual bool setPropertyValueImpl(const OUString &rName, const SfxItemPropertyMapEntry *pProperty, const css::uno::Any &rValue) override
Definition: unoshap4.cxx:727
virtual void SAL_CALL setPropertyValues(const css::uno::Sequence< OUString > &aPropertyNames, const css::uno::Sequence< css::uno::Any > &aValues) override
Definition: unoshap4.cxx:721
virtual void SAL_CALL setPropertyValues(const css::uno::Sequence< OUString > &aPropertyNames, const css::uno::Sequence< css::uno::Any > &aValues) override
Definition: unoshape.cxx:1748
#define SVXMAP_APPLET
Definition: unoprov.hxx:70
virtual void Create(SdrObject *pNewOpj, SvxDrawPage *pNewPage) override
Definition: unoshap4.cxx:635
#define OWN_ATTR_PERSISTNAME
Definition: unoshprp.hxx:151
SdrObject * GetSdrObject() const
Definition: unoshape.hxx:204
const OUString & GetPersistName() const
Definition: svdoole2.cxx:1363
virtual void Create(SdrObject *pNewOpj, SvxDrawPage *pNewPage) override
Definition: unoshap4.cxx:564
#define OWN_ATTR_APPLET_DOCBASE
Definition: unoshprp.hxx:121
Sequence< sal_Int8 > aSeq
bool IsEmpty() const
Definition: svdoole2.cxx:850
#define OWN_ATTR_MEDIA_MUTE
Definition: unoshprp.hxx:156
void setMediaProperties(const ::avmedia::MediaItem &rState)
Definition: svdomedia.cxx:247
SvxAppletShape(SdrObject *pObj)
Definition: unoshap4.cxx:554
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
Definition: unoshap4.cxx:715
bool AddOwnLightClient()
Definition: svdoole2.cxx:1876
OUString referer_
Definition: unoshape.hxx:862
css::uno::Reference< css::graphic::XGraphic > GetXGraphic() const
css::uno::Reference< css::io::XInputStream > GetInputStream() const
Definition: svdomedia.cxx:258
MapUnit
static bool TryRunningState(const css::uno::Reference< css::embed::XEmbeddedObject > &)
#define DBG_TESTSOLARMUTEX()
bool setMute(bool bMute)
SvxFrameShape(SdrObject *pObj)
Definition: unoshap4.cxx:697
SvxUnoPropertyMapProvider & getSvxMapProvider()
Definition: unoprov.cxx:884
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
Definition: unoshape.cxx:1681
virtual ~SvxPluginShape() noexcept override
Definition: unoshap4.cxx:631
#define SO3_PLUGIN_CLASSID
SvxOle2Shape(SdrObject *pObj)
Definition: unoshap4.cxx:66
#define OWN_ATTR_MEDIA_URL
Definition: unoshprp.hxx:153
#define OWN_ATTR_OLEMODEL
Definition: unoshprp.hxx:103
SvxPluginShape(SdrObject *pObj)
Definition: unoshap4.cxx:625
const Graphic * GetGraphic() const
Definition: svdoole2.cxx:1631
virtual bool setPropertyValueImpl(const OUString &rName, const SfxItemPropertyMapEntry *pProperty, const css::uno::Any &rValue)
Definition: unoshape.cxx:2056
virtual void SAL_CALL setPropertyValues(const css::uno::Sequence< OUString > &aPropertyNames, const css::uno::Sequence< css::uno::Any > &aValues) override
Definition: unoshap4.cxx:649
constexpr tools::Long GetHeight() const
virtual const tools::Rectangle & GetLogicRect() const override
Definition: svdotxtr.cxx:69
SvGlobalName GetClassName_Impl(OUString &rHexCLSID)
Definition: unoshap4.cxx:515
virtual ~SvxAppletShape() noexcept override
Definition: unoshap4.cxx:560