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