Kaydet (Commit) 2ebd79b3 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:constantfunction: svl

Change-Id: I6504e354cfb381cc00ea837f959e2e18e5fc596c
üst 02cb0ba6
...@@ -105,8 +105,6 @@ class SVL_DLLPUBLIC SfxItemPropertySet ...@@ -105,8 +105,6 @@ class SVL_DLLPUBLIC SfxItemPropertySet
{ {
SfxItemPropertyMap m_aMap; SfxItemPropertyMap m_aMap;
mutable com::sun::star::uno::Reference<com::sun::star::beans::XPropertySetInfo> m_xInfo; mutable com::sun::star::uno::Reference<com::sun::star::beans::XPropertySetInfo> m_xInfo;
protected:
bool FillItem(SfxItemSet& rSet, sal_uInt16 nWhich, bool bGetProperty) const;
public: public:
SfxItemPropertySet( const SfxItemPropertyMapEntry *pMap ) : SfxItemPropertySet( const SfxItemPropertyMapEntry *pMap ) :
......
...@@ -94,7 +94,7 @@ public: ...@@ -94,7 +94,7 @@ public:
SvStream& Read( SvStream &, sal_uInt16 nVersion = SVX_MACROTBL_AKTVERSION ); SvStream& Read( SvStream &, sal_uInt16 nVersion = SVX_MACROTBL_AKTVERSION );
SvStream& Write( SvStream & ) const; SvStream& Write( SvStream & ) const;
sal_uInt16 GetVersion() const { return SVX_MACROTBL_AKTVERSION; } static sal_uInt16 GetVersion() { return SVX_MACROTBL_AKTVERSION; }
SvxMacroTable::iterator begin() { return aSvxMacroTable.begin(); } SvxMacroTable::iterator begin() { return aSvxMacroTable.begin(); }
SvxMacroTable::const_iterator begin() const { return aSvxMacroTable.begin(); } SvxMacroTable::const_iterator begin() const { return aSvxMacroTable.begin(); }
......
...@@ -62,11 +62,6 @@ public: ...@@ -62,11 +62,6 @@ public:
void SetNumberFormatter(SvNumberFormatter* pNew); void SetNumberFormatter(SvNumberFormatter* pNew);
SvNumberFormatter* GetNumberFormatter() const; SvNumberFormatter* GetNumberFormatter() const;
// override to adapt attributes in the document
void NumberFormatDeleted(sal_uInt32 nKey);
// override to possibly format something anew
void SettingsChanged();
// XNumberFormatsSupplier // XNumberFormatsSupplier
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL
getNumberFormatSettings() getNumberFormatSettings()
......
...@@ -173,11 +173,6 @@ SfxItemPropertySet::~SfxItemPropertySet() ...@@ -173,11 +173,6 @@ SfxItemPropertySet::~SfxItemPropertySet()
{ {
} }
bool SfxItemPropertySet::FillItem(SfxItemSet&, sal_uInt16, bool) const
{
return false;
}
void SfxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry& rEntry, void SfxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry& rEntry,
const SfxItemSet& rSet, Any& rAny ) const const SfxItemSet& rSet, Any& rAny ) const
throw(RuntimeException) throw(RuntimeException)
...@@ -195,12 +190,7 @@ void SfxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry& rEn ...@@ -195,12 +190,7 @@ void SfxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry& rEn
else else
{ {
SfxItemSet aSet(*rSet.GetPool(), rEntry.nWID, rEntry.nWID); SfxItemSet aSet(*rSet.GetPool(), rEntry.nWID, rEntry.nWID);
if(FillItem(aSet, rEntry.nWID, true)) if(0 == (rEntry.nFlags & PropertyAttribute::MAYBEVOID))
{
const SfxPoolItem& rItem = aSet.Get(rEntry.nWID);
rItem.QueryValue( rAny, rEntry.nMemberId );
}
else if(0 == (rEntry.nFlags & PropertyAttribute::MAYBEVOID))
throw RuntimeException( throw RuntimeException(
"Property not found in ItemSet but not MAYBEVOID?", 0); "Property not found in ItemSet but not MAYBEVOID?", 0);
} }
...@@ -251,11 +241,6 @@ void SfxItemPropertySet::setPropertyValue( const SfxItemPropertySimpleEntry& rEn ...@@ -251,11 +241,6 @@ void SfxItemPropertySet::setPropertyValue( const SfxItemPropertySimpleEntry& rEn
if(eState < SfxItemState::DEFAULT) if(eState < SfxItemState::DEFAULT)
{ {
SfxItemSet aSet(*rSet.GetPool(), rEntry.nWID, rEntry.nWID); SfxItemSet aSet(*rSet.GetPool(), rEntry.nWID, rEntry.nWID);
if(FillItem(aSet, rEntry.nWID, false))
{
const SfxPoolItem &rItem = aSet.Get(rEntry.nWID);
pNewItem.reset(rItem.Clone());
}
} }
if(!pNewItem && pItem) if(!pNewItem && pItem)
{ {
......
...@@ -279,7 +279,7 @@ void SvxMacroItem::SetMacro( sal_uInt16 nEvent, const SvxMacro& rMacro ) ...@@ -279,7 +279,7 @@ void SvxMacroItem::SetMacro( sal_uInt16 nEvent, const SvxMacro& rMacro )
sal_uInt16 SvxMacroItem::GetVersion( sal_uInt16 nFileFormatVersion ) const sal_uInt16 SvxMacroItem::GetVersion( sal_uInt16 nFileFormatVersion ) const
{ {
return SOFFICE_FILEFORMAT_31 == nFileFormatVersion return SOFFICE_FILEFORMAT_31 == nFileFormatVersion
? 0 : aMacroTable.GetVersion(); ? 0 : SvxMacroTableDtor::GetVersion();
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -123,7 +123,7 @@ class INetURLHistory_Impl: private boost::noncopyable ...@@ -123,7 +123,7 @@ class INetURLHistory_Impl: private boost::noncopyable
*/ */
void initialize (void); void initialize (void);
sal_uInt16 capacity (void) const static sal_uInt16 capacity()
{ {
return (sal_uInt16)(INETHIST_SIZE_LIMIT); return (sal_uInt16)(INETHIST_SIZE_LIMIT);
} }
......
...@@ -536,7 +536,6 @@ void SAL_CALL SvNumberFormatsObj::removeByKey( sal_Int32 nKey ) throw(uno::Runti ...@@ -536,7 +536,6 @@ void SAL_CALL SvNumberFormatsObj::removeByKey( sal_Int32 nKey ) throw(uno::Runti
if (pFormatter) if (pFormatter)
{ {
pFormatter->DeleteEntry(nKey); pFormatter->DeleteEntry(nKey);
rSupplier.NumberFormatDeleted(nKey); // Notification for the Document
} }
} }
...@@ -994,8 +993,6 @@ void SAL_CALL SvNumberFormatSettingsObj::setPropertyValue( const OUString& aProp ...@@ -994,8 +993,6 @@ void SAL_CALL SvNumberFormatSettingsObj::setPropertyValue( const OUString& aProp
} }
else else
throw beans::UnknownPropertyException(); throw beans::UnknownPropertyException();
rSupplier.SettingsChanged();
} }
else else
throw uno::RuntimeException(); throw uno::RuntimeException();
......
...@@ -70,16 +70,6 @@ void SvNumberFormatsSupplierObj::SetNumberFormatter(SvNumberFormatter* pNew) ...@@ -70,16 +70,6 @@ void SvNumberFormatsSupplierObj::SetNumberFormatter(SvNumberFormatter* pNew)
pImpl->pFormatter = pNew; pImpl->pFormatter = pNew;
} }
void SvNumberFormatsSupplierObj::NumberFormatDeleted(sal_uInt32)
{
// Base implementation; does nothing
}
void SvNumberFormatsSupplierObj::SettingsChanged()
{
// Base implementation; does nothing
}
// XNumberFormatsSupplier // XNumberFormatsSupplier
uno::Reference<beans::XPropertySet> SAL_CALL SvNumberFormatsSupplierObj::getNumberFormatSettings() uno::Reference<beans::XPropertySet> SAL_CALL SvNumberFormatsSupplierObj::getNumberFormatSettings()
......
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