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