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