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