[Libreoffice-commits] core.git: 2 commits - include/svx sc/inc sc/source svx/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Dec 5 07:00:00 UTC 2018
include/svx/galmisc.hxx | 3 +--
include/svx/shapeproperty.hxx | 4 +---
sc/inc/shapeuno.hxx | 1 -
sc/source/ui/unoobj/shapeuno.cxx | 26 +-------------------------
svx/source/gallery2/galtheme.cxx | 4 ----
5 files changed, 3 insertions(+), 35 deletions(-)
New commits:
commit 39ea830ef5f060586d4674ffce9915dc352af0fc
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Dec 4 11:14:12 2018 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Dec 5 07:59:49 2018 +0100
remove unused GalleryHintType enum value
Change-Id: If4149e8b4a6e58f89997b150cc81e2e1195be4da
Reviewed-on: https://gerrit.libreoffice.org/64567
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/include/svx/galmisc.hxx b/include/svx/galmisc.hxx
index 2c21b09ae822..d586325cc9a8 100644
--- a/include/svx/galmisc.hxx
+++ b/include/svx/galmisc.hxx
@@ -168,8 +168,7 @@ enum class GalleryHintType
THEME_RENAMED,
THEME_CREATED,
THEME_UPDATEVIEW,
- CLOSE_OBJECT,
- OBJECT_REMOVED,
+ CLOSE_OBJECT
};
class GalleryHint : public SfxHint
diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx
index f782081b30a1..b6118c7bb2d2 100644
--- a/svx/source/gallery2/galtheme.cxx
+++ b/svx/source/gallery2/galtheme.cxx
@@ -82,7 +82,6 @@ GalleryTheme::~GalleryTheme()
for (auto & pEntry : aObjectList)
{
Broadcast( GalleryHint( GalleryHintType::CLOSE_OBJECT, GetName(), pEntry.get() ) );
- Broadcast( GalleryHint( GalleryHintType::OBJECT_REMOVED, GetName(), pEntry.get() ) );
pEntry.reset();
}
aObjectList.clear();
@@ -445,7 +444,6 @@ void GalleryTheme::RemoveObject(sal_uInt32 nPos)
aSvDrawStorageRef->Remove( pEntry->aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
Broadcast( GalleryHint( GalleryHintType::CLOSE_OBJECT, GetName(), pEntry.get() ) );
- Broadcast( GalleryHint( GalleryHintType::OBJECT_REMOVED, GetName(), pEntry.get() ) );
pEntry.reset();
ImplSetModified( true );
@@ -562,7 +560,6 @@ void GalleryTheme::Actualize( const Link<const INetURLObject&, void>& rActualize
if( (*it)->mbDelete )
{
Broadcast( GalleryHint( GalleryHintType::CLOSE_OBJECT, GetName(), it->get() ) );
- Broadcast( GalleryHint( GalleryHintType::OBJECT_REMOVED, GetName(), it->get() ) );
it = aObjectList.erase( it );
}
else
@@ -1350,7 +1347,6 @@ SvStream& GalleryTheme::ReadData( SvStream& rIStm )
{
GalleryObject* pObj = i.get();
Broadcast( GalleryHint( GalleryHintType::CLOSE_OBJECT, GetName(), pObj ) );
- Broadcast( GalleryHint( GalleryHintType::OBJECT_REMOVED, GetName(), pObj ) );
i.reset();
}
aObjectList.clear();
commit 001111f731038fd64c8b29c94614560e38d696ba
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Dec 4 11:03:29 2018 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Dec 5 07:59:37 2018 +0100
remove unused svx::ShapeProperty enum value
Change-Id: Iafc65902ed00206ff80dfc135c1ae767893abeca
Reviewed-on: https://gerrit.libreoffice.org/64566
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/include/svx/shapeproperty.hxx b/include/svx/shapeproperty.hxx
index 56a71fdd3aef..bb0011199447 100644
--- a/include/svx/shapeproperty.hxx
+++ b/include/svx/shapeproperty.hxx
@@ -32,9 +32,7 @@ namespace svx
Position,
Size,
// text doc shape properties
- TextDocAnchor,
- // spreadsheet doc shape properties
- CalcDocAnchor
+ TextDocAnchor
};
}
diff --git a/sc/inc/shapeuno.hxx b/sc/inc/shapeuno.hxx
index e3ce7f2855d8..e4678427c762 100644
--- a/sc/inc/shapeuno.hxx
+++ b/sc/inc/shapeuno.hxx
@@ -70,7 +70,6 @@ private:
css::uno::Reference< css::beans::XPropertySetInfo > mxPropSetInfo;
bool bIsTextShape;
bool bIsNoteCaption;
- bool bInitializedNotifier;
SdrObject* GetSdrObject() const throw();
diff --git a/sc/source/ui/unoobj/shapeuno.cxx b/sc/source/ui/unoobj/shapeuno.cxx
index 49ce7146ccd1..1468ef39e831 100644
--- a/sc/source/ui/unoobj/shapeuno.cxx
+++ b/sc/source/ui/unoobj/shapeuno.cxx
@@ -82,21 +82,11 @@ ScMacroInfo* ScShapeObj_getShapeHyperMacroInfo( const ScShapeObj* pShape, bool b
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 ) :
pShapePropertySet(nullptr),
pShapePropertyState(nullptr),
bIsTextShape(false),
- bIsNoteCaption(false),
- bInitializedNotifier(false)
+ bIsNoteCaption(false)
{
osl_atomic_increment( &m_refCount );
@@ -121,8 +111,6 @@ ScShapeObj::ScShapeObj( uno::Reference<drawing::XShape>& xShape ) :
if ( pObj )
{
bIsNoteCaption = ScDrawLayer::IsNoteCaption( pObj );
- lcl_initializeNotifier( *pObj, *this );
- bInitializedNotifier = true;
}
}
@@ -839,18 +827,6 @@ void SAL_CALL ScShapeObj::addPropertyChangeListener( const OUString& aPropertyNa
GetShapePropertySet();
if (pShapePropertySet)
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,
More information about the Libreoffice-commits
mailing list