diff options
Diffstat (limited to 'svx/source/unodraw')
-rw-r--r-- | svx/source/unodraw/shapeimpl.hxx | 5 | ||||
-rw-r--r-- | svx/source/unodraw/unoshap4.cxx | 23 |
2 files changed, 25 insertions, 3 deletions
diff --git a/svx/source/unodraw/shapeimpl.hxx b/svx/source/unodraw/shapeimpl.hxx index a1a4e6963020..4381094d380a 100644 --- a/svx/source/unodraw/shapeimpl.hxx +++ b/svx/source/unodraw/shapeimpl.hxx @@ -64,8 +64,11 @@ public: virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage ) override; }; + class SvxFrameShape : public SvxOle2Shape { +private: + OUString m_sInitialFrameURL; protected: // override these for special property handling in subcasses. Return true if property is handled virtual bool setPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const css::uno::Any& rValue ) override; @@ -82,6 +85,8 @@ public: virtual void SAL_CALL setPropertyValues( const css::uno::Sequence< OUString >& aPropertyNames, const css::uno::Sequence< css::uno::Any >& aValues ) override; virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage ) override; + + virtual OUString GetAndClearInitialFrameURL() override; }; diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx index 658cb2c8fd6c..e6bbe51ee1e0 100644 --- a/svx/source/unodraw/unoshap4.cxx +++ b/svx/source/unodraw/unoshap4.cxx @@ -174,7 +174,7 @@ bool SvxOle2Shape::setPropertyValueImpl( const OUString& rName, const SfxItemPro #else pOle = static_cast<SdrOle2Obj*>(GetSdrObject()); #endif - pOle->SetPersistName( aPersistName ); + pOle->SetPersistName( aPersistName, this ); return true; } break; @@ -495,10 +495,11 @@ void SvxOle2Shape::createLink( const OUString& aLinkURL ) void SvxOle2Shape::resetModifiedState() { - ::comphelper::IEmbeddedHelper* pPersist = GetSdrObject()->getSdrModelFromSdrObject().GetPersist(); + SdrObject* pObject = GetSdrObject(); + ::comphelper::IEmbeddedHelper* pPersist = pObject ? pObject->getSdrModelFromSdrObject().GetPersist() : nullptr; if( pPersist && !pPersist->isEnableSetModified() ) { - SdrOle2Obj* pOle = dynamic_cast< SdrOle2Obj* >( GetSdrObject() ); + SdrOle2Obj* pOle = dynamic_cast< SdrOle2Obj* >(pObject); if( pOle && !pOle->IsEmpty() ) { uno::Reference < util::XModifiable > xMod( pOle->GetObjRef(), uno::UNO_QUERY ); @@ -548,6 +549,11 @@ SvGlobalName SvxOle2Shape::GetClassName_Impl(OUString& rHexCLSID) return aClassName; } +OUString SvxOle2Shape::GetAndClearInitialFrameURL() +{ + return OUString(); +} + SvxAppletShape::SvxAppletShape(SdrObject* pObject) : SvxOle2Shape( pObject, getSvxMapProvider().GetMap(SVXMAP_APPLET), getSvxMapProvider().GetPropertySet(SVXMAP_APPLET, SdrObject::GetGlobalDrawObjectItemPool()) ) { @@ -701,8 +707,19 @@ SvxFrameShape::~SvxFrameShape() throw() { } +OUString SvxFrameShape::GetAndClearInitialFrameURL() +{ + OUString sRet(m_sInitialFrameURL); + m_sInitialFrameURL.clear(); + return sRet; +} + void SvxFrameShape::Create( SdrObject* pNewObj, SvxDrawPage* pNewPage ) { + uno::Reference<beans::XPropertySet> xSet(static_cast<OWeakObject *>(this), uno::UNO_QUERY); + if (xSet) + xSet->getPropertyValue("FrameURL") >>= m_sInitialFrameURL; + SvxShape::Create( pNewObj, pNewPage ); const SvGlobalName aIFrameClassId( SO3_IFRAME_CLASSID ); createObject(aIFrameClassId); |