Kaydet (Commit) 001111f7 authored tarafından Noel Grandin's avatar Noel Grandin

remove unused svx::ShapeProperty enum value

Change-Id: Iafc65902ed00206ff80dfc135c1ae767893abeca
Reviewed-on: https://gerrit.libreoffice.org/64566
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst a04e615e
...@@ -32,9 +32,7 @@ namespace svx ...@@ -32,9 +32,7 @@ namespace svx
Position, Position,
Size, Size,
// text doc shape properties // text doc shape properties
TextDocAnchor, TextDocAnchor
// spreadsheet doc shape properties
CalcDocAnchor
}; };
} }
......
...@@ -70,7 +70,6 @@ private: ...@@ -70,7 +70,6 @@ private:
css::uno::Reference< css::beans::XPropertySetInfo > mxPropSetInfo; css::uno::Reference< css::beans::XPropertySetInfo > mxPropSetInfo;
bool bIsTextShape; bool bIsTextShape;
bool bIsNoteCaption; bool bIsNoteCaption;
bool bInitializedNotifier;
SdrObject* GetSdrObject() const throw(); SdrObject* GetSdrObject() const throw();
......
...@@ -82,21 +82,11 @@ ScMacroInfo* ScShapeObj_getShapeHyperMacroInfo( const ScShapeObj* pShape, bool b ...@@ -82,21 +82,11 @@ ScMacroInfo* ScShapeObj_getShapeHyperMacroInfo( const ScShapeObj* pShape, bool b
return nullptr; return nullptr;
} }
namespace
{
void lcl_initializeNotifier( SdrObject& _rSdrObj, ::cppu::OWeakObject& _rShape )
{
std::shared_ptr<svx::IPropertyValueProvider> pProvider( new svx::PropertyValueProvider( _rShape, "Anchor" ) );
_rSdrObj.getShapePropertyChangeNotifier().registerProvider( svx::ShapeProperty::CalcDocAnchor, pProvider );
}
}
ScShapeObj::ScShapeObj( uno::Reference<drawing::XShape>& xShape ) : ScShapeObj::ScShapeObj( uno::Reference<drawing::XShape>& xShape ) :
pShapePropertySet(nullptr), pShapePropertySet(nullptr),
pShapePropertyState(nullptr), pShapePropertyState(nullptr),
bIsTextShape(false), bIsTextShape(false),
bIsNoteCaption(false), bIsNoteCaption(false)
bInitializedNotifier(false)
{ {
osl_atomic_increment( &m_refCount ); osl_atomic_increment( &m_refCount );
...@@ -121,8 +111,6 @@ ScShapeObj::ScShapeObj( uno::Reference<drawing::XShape>& xShape ) : ...@@ -121,8 +111,6 @@ ScShapeObj::ScShapeObj( uno::Reference<drawing::XShape>& xShape ) :
if ( pObj ) if ( pObj )
{ {
bIsNoteCaption = ScDrawLayer::IsNoteCaption( pObj ); bIsNoteCaption = ScDrawLayer::IsNoteCaption( pObj );
lcl_initializeNotifier( *pObj, *this );
bInitializedNotifier = true;
} }
} }
...@@ -839,18 +827,6 @@ void SAL_CALL ScShapeObj::addPropertyChangeListener( const OUString& aPropertyNa ...@@ -839,18 +827,6 @@ void SAL_CALL ScShapeObj::addPropertyChangeListener( const OUString& aPropertyNa
GetShapePropertySet(); GetShapePropertySet();
if (pShapePropertySet) if (pShapePropertySet)
pShapePropertySet->addPropertyChangeListener( aPropertyName, aListener ); pShapePropertySet->addPropertyChangeListener( aPropertyName, aListener );
if ( !bInitializedNotifier )
{
// here's the latest chance to initialize the property notification at the SdrObject
// (in the ctor, where we also attempt to do this, we do not necessarily have
// and SdrObject, yet)
SdrObject* pObj = GetSdrObject();
OSL_ENSURE( pObj, "ScShapeObj::addPropertyChangeListener: no SdrObject -> no property change notification!" );
if ( pObj )
lcl_initializeNotifier( *pObj, *this );
bInitializedNotifier = true;
}
} }
void SAL_CALL ScShapeObj::removePropertyChangeListener( const OUString& aPropertyName, void SAL_CALL ScShapeObj::removePropertyChangeListener( const OUString& aPropertyName,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment