Kaydet (Commit) 9f4f237a authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Noel Grandin

loplugin:unusedmethods svl

Change-Id: If86cc43fda4d138cf7f678d81fa2b35f68f3c03b
Reviewed-on: https://gerrit.libreoffice.org/17162Reviewed-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
Tested-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
üst fcdddbd3
...@@ -124,12 +124,19 @@ static bool startsWith(const std::string& s, const char* other) ...@@ -124,12 +124,19 @@ static bool startsWith(const std::string& s, const char* other)
return s.compare(0, strlen(other), other) == 0; return s.compare(0, strlen(other), other) == 0;
} }
static bool isStandardStuff(const std::string& s) static bool isStandardStuff(const std::string& input)
{ {
std::string s = input;
if (startsWith(s,"class "))
s = s.substr(6);
else if (startsWith(s,"struct "))
s = s.substr(7);
// ignore UNO interface definitions, cannot change those // ignore UNO interface definitions, cannot change those
return startsWith(s, "com::sun::star::") return startsWith(s, "com::sun::star::")
// ignore stuff in the C++ stdlib and boost // ignore stuff in the C++ stdlib and boost
|| startsWith(s, "std::") || startsWith(s, "boost::") || startsWith(s, "class boost::") || startsWith(s, "__gnu_debug::") || startsWith(s, "std::") || startsWith(s, "boost::") || startsWith(s, "class boost::") || startsWith(s, "__gnu_debug::")
// external library
|| startsWith(s, "mdds::")
// can't change our rtl layer // can't change our rtl layer
|| startsWith(s, "rtl::") || startsWith(s, "rtl::")
// ignore anonymous namespace stuff, it is compilation-unit-local and the compiler will detect any // ignore anonymous namespace stuff, it is compilation-unit-local and the compiler will detect any
......
...@@ -57,6 +57,7 @@ exclusionSet = set([ ...@@ -57,6 +57,7 @@ exclusionSet = set([
# instantiated from templates, not sure why it is not being picked up # instantiated from templates, not sure why it is not being picked up
"class basegfx::B2DPolygon OutputDevice::PixelToLogic(const class basegfx::B2DPolygon &,const class MapMode &) const", "class basegfx::B2DPolygon OutputDevice::PixelToLogic(const class basegfx::B2DPolygon &,const class MapMode &) const",
"type-parameter-0-0 * detail::cloner::clone(type-parameter-0-0 *const)", "type-parameter-0-0 * detail::cloner::clone(type-parameter-0-0 *const)",
"const class rtl::OUString writerperfect::DocumentHandlerFor::name()",
# only used by OSX build # only used by OSX build
"void StyleSettings::SetHideDisabledMenuItems(_Bool)", "void StyleSettings::SetHideDisabledMenuItems(_Bool)",
]) ])
...@@ -87,20 +88,38 @@ for clazz in sorted(definitionSet - callSet - exclusionSet): ...@@ -87,20 +88,38 @@ for clazz in sorted(definitionSet - callSet - exclusionSet):
or (clazz.find("::Type()") != -1)): or (clazz.find("::Type()") != -1)):
continue continue
# if this method is const, and there is a non-const variant of it, and the non-const variant is in use, then leave it alone # if this method is const, and there is a non-const variant of it, and the non-const variant is in use, then leave it alone
if (clazz.endswith(" const") if (clazz.startswith("const ") and clazz.endswith(" const")):
and clazz[6:len(clazz)-6] in definitionSet clazz2 = clazz[6:len(clazz)-12]
and clazz[6:len(clazz)-6] in callSet): if (clazz2 in callSet):
continue continue
elif (clazz.endswith(" const")):
clazz2 = clazz[:len(clazz)-6]
if (clazz2 in callSet):
continue
if (clazz.endswith(" const") and clazz.find("::iterator") != -1):
clazz2 = clazz.replace("::const_iterator", "::iterator")
clazz2 = clazz2[:len(clazz)-6] # strip off " const"
if (clazz2 in callSet):
continue
# if this method is non-const, and there is a const variant of it, and the const variant is in use, then leave it alone # if this method is non-const, and there is a const variant of it, and the const variant is in use, then leave it alone
if ((not clazz.endswith(" const")) if ((not clazz.endswith(" const")) and ("const " + clazz + " const") in callSet):
and ("const " + clazz + " const") in definitionSet
and ("const " + clazz + " const") in callSet):
continue continue
if ((not clazz.endswith(" const")) and clazz.find("::iterator") != -1):
clazz2 = clazz.replace("::iterator", "::const_iterator") + " const"
if (clazz2 in callSet):
continue
# There is lots of macro magic going on in /home/noel/libo4/include/sax/fshelper.hxx that should be using C++11 varag templates # There is lots of macro magic going on in /home/noel/libo4/include/sax/fshelper.hxx that should be using C++11 varag templates
if clazz.startswith("void sax_fastparser::FastSerializerHelper::"): if clazz.startswith("void sax_fastparser::FastSerializerHelper::"):
continue continue
# used by Windows build # used by Windows build
if clazz.find("DdeTopic::") != -1 or clazz.find("DdeData::") != -1 or clazz.find("DdeService::") != -1: if (clazz.find("DdeTopic::") != -1
or clazz.find("DdeData::") != -1
or clazz.find("DdeService::") != -1
or clazz.find("DdeTransaction::") != -1
or clazz.find("DdeConnection::") != -1
or clazz.find("DdeLink::") != -1
or clazz.find("DdeItem::") != -1
or clazz.find("DdeGetPutItem::") != -1):
continue continue
print clazz print clazz
......
...@@ -56,13 +56,6 @@ bool SvXMLAttrContainerItem::operator==( const SfxPoolItem& rItem ) const ...@@ -56,13 +56,6 @@ bool SvXMLAttrContainerItem::operator==( const SfxPoolItem& rItem ) const
return *pImpl == *static_cast<const SvXMLAttrContainerItem&>(rItem).pImpl; return *pImpl == *static_cast<const SvXMLAttrContainerItem&>(rItem).pImpl;
} }
int SvXMLAttrContainerItem::Compare( const SfxPoolItem &/*rWith*/ ) const
{
DBG_ASSERT( false, "not yet implemented" );
return 0;
}
bool SvXMLAttrContainerItem::GetPresentation( bool SvXMLAttrContainerItem::GetPresentation(
SfxItemPresentation /*ePresentation*/, SfxItemPresentation /*ePresentation*/,
SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*eCoreMetric*/,
......
...@@ -41,8 +41,6 @@ public: ...@@ -41,8 +41,6 @@ public:
virtual ~SvXMLAttrContainerItem(); virtual ~SvXMLAttrContainerItem();
virtual bool operator==( const SfxPoolItem& ) const SAL_OVERRIDE; virtual bool operator==( const SfxPoolItem& ) const SAL_OVERRIDE;
using SfxPoolItem::Compare;
virtual int Compare( const SfxPoolItem &rWith ) const SAL_OVERRIDE;
virtual bool GetPresentation( virtual bool GetPresentation(
SfxItemPresentation ePresentation, SfxItemPresentation ePresentation,
......
...@@ -42,9 +42,6 @@ public: ...@@ -42,9 +42,6 @@ public:
virtual bool operator ==(const SfxPoolItem & rItem) const SAL_OVERRIDE; virtual bool operator ==(const SfxPoolItem & rItem) const SAL_OVERRIDE;
using SfxPoolItem::Compare;
virtual int Compare(const SfxPoolItem & rWith) const SAL_OVERRIDE;
virtual bool GetPresentation(SfxItemPresentation, virtual bool GetPresentation(SfxItemPresentation,
SfxMapUnit, SfxMapUnit, SfxMapUnit, SfxMapUnit,
OUString & rText, OUString & rText,
...@@ -95,9 +92,6 @@ public: ...@@ -95,9 +92,6 @@ public:
virtual bool operator ==(const SfxPoolItem & rItem) const SAL_OVERRIDE; virtual bool operator ==(const SfxPoolItem & rItem) const SAL_OVERRIDE;
using SfxPoolItem::Compare;
virtual int Compare(const SfxPoolItem & rWith) const SAL_OVERRIDE;
virtual bool GetPresentation(SfxItemPresentation, virtual bool GetPresentation(SfxItemPresentation,
SfxMapUnit, SfxMapUnit, SfxMapUnit, SfxMapUnit,
OUString & rText, OUString & rText,
...@@ -148,9 +142,6 @@ public: ...@@ -148,9 +142,6 @@ public:
virtual bool operator ==(const SfxPoolItem & rItem) const SAL_OVERRIDE; virtual bool operator ==(const SfxPoolItem & rItem) const SAL_OVERRIDE;
using SfxPoolItem::Compare;
virtual int Compare(const SfxPoolItem & rWith) const SAL_OVERRIDE;
virtual bool GetPresentation(SfxItemPresentation, virtual bool GetPresentation(SfxItemPresentation,
SfxMapUnit, SfxMapUnit, SfxMapUnit, SfxMapUnit,
OUString & rText, OUString & rText,
...@@ -201,9 +192,6 @@ public: ...@@ -201,9 +192,6 @@ public:
virtual bool operator ==(const SfxPoolItem & rItem) const SAL_OVERRIDE; virtual bool operator ==(const SfxPoolItem & rItem) const SAL_OVERRIDE;
using SfxPoolItem::Compare;
virtual int Compare(const SfxPoolItem & rWith) const SAL_OVERRIDE;
virtual bool GetPresentation(SfxItemPresentation, virtual bool GetPresentation(SfxItemPresentation,
SfxMapUnit, SfxMapUnit, SfxMapUnit, SfxMapUnit,
OUString & rText, OUString & rText,
......
...@@ -49,8 +49,6 @@ public: ...@@ -49,8 +49,6 @@ public:
void SetValue( const OUString& rNewVal ); void SetValue( const OUString& rNewVal );
using SfxPoolItem::Compare;
virtual bool GetPresentation( SfxItemPresentation ePres, virtual bool GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric, SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric, SfxMapUnit ePresMetric,
......
...@@ -46,8 +46,6 @@ public: ...@@ -46,8 +46,6 @@ public:
virtual bool operator ==(const SfxPoolItem & rItem) const SAL_OVERRIDE; virtual bool operator ==(const SfxPoolItem & rItem) const SAL_OVERRIDE;
virtual int Compare(const SfxPoolItem & rWith) const SAL_OVERRIDE;
virtual bool GetPresentation(SfxItemPresentation, virtual bool GetPresentation(SfxItemPresentation,
SfxMapUnit, SfxMapUnit, SfxMapUnit, SfxMapUnit,
OUString & rText, OUString & rText,
......
...@@ -50,9 +50,6 @@ public: ...@@ -50,9 +50,6 @@ public:
bool OverwriteOwnLockFile(); bool OverwriteOwnLockFile();
void RemoveFile(); void RemoveFile();
// the methods allow to control whether UI interaction regarding the locked document file is allowed
// this is a workaround for automated tests
static void AllowInteraction( bool bAllow ) { m_bAllowInteraction = bAllow; }
static bool IsInteractionAllowed() { return m_bAllowInteraction; } static bool IsInteractionAllowed() { return m_bAllowInteraction; }
}; };
......
...@@ -88,9 +88,6 @@ public: ...@@ -88,9 +88,6 @@ public:
// SfxPoolItem // SfxPoolItem
virtual bool operator ==(const SfxPoolItem & rItem) const SAL_OVERRIDE; virtual bool operator ==(const SfxPoolItem & rItem) const SAL_OVERRIDE;
using SfxPoolItem::Compare;
virtual int Compare(const SfxPoolItem & rWith) const SAL_OVERRIDE;
virtual bool GetPresentation(SfxItemPresentation, virtual bool GetPresentation(SfxItemPresentation,
SfxMapUnit, SfxMapUnit, SfxMapUnit, SfxMapUnit,
OUString & rText, OUString & rText,
......
...@@ -26,8 +26,6 @@ public: ...@@ -26,8 +26,6 @@ public:
virtual bool operator== ( const SfxPoolItem& rItem ) const SAL_OVERRIDE; virtual bool operator== ( const SfxPoolItem& rItem ) const SAL_OVERRIDE;
virtual int Compare( const SfxPoolItem& r ) const SAL_OVERRIDE;
virtual bool GetPresentation( virtual bool GetPresentation(
SfxItemPresentation, SfxMapUnit, SfxMapUnit, SfxItemPresentation, SfxMapUnit, SfxMapUnit,
OUString& rText, const IntlWrapper* pIntlWrapper = NULL ) const SAL_OVERRIDE; OUString& rText, const IntlWrapper* pIntlWrapper = NULL ) const SAL_OVERRIDE;
......
...@@ -59,9 +59,6 @@ public: ...@@ -59,9 +59,6 @@ public:
virtual bool operator ==(const SfxPoolItem & rItem) const SAL_OVERRIDE; virtual bool operator ==(const SfxPoolItem & rItem) const SAL_OVERRIDE;
using SfxPoolItem::Compare;
virtual int Compare(const SfxPoolItem & rWith) const SAL_OVERRIDE;
virtual bool GetPresentation(SfxItemPresentation, virtual bool GetPresentation(SfxItemPresentation,
SfxMapUnit, SfxMapUnit, SfxMapUnit, SfxMapUnit,
OUString & rText, OUString & rText,
......
...@@ -169,7 +169,6 @@ public: ...@@ -169,7 +169,6 @@ public:
virtual bool operator==( const SfxPoolItem& ) const = 0; virtual bool operator==( const SfxPoolItem& ) const = 0;
bool operator!=( const SfxPoolItem& rItem ) const bool operator!=( const SfxPoolItem& rItem ) const
{ return !(*this == rItem); } { return !(*this == rItem); }
virtual int Compare( const SfxPoolItem &rWith ) const;
/** @return true if it has a valid string representation */ /** @return true if it has a valid string representation */
virtual bool GetPresentation( SfxItemPresentation ePresentation, virtual bool GetPresentation( SfxItemPresentation ePresentation,
......
...@@ -75,7 +75,6 @@ class SVL_DLLPUBLIC SfxStyleSheetBase : public comphelper::OWeakTypeObject ...@@ -75,7 +75,6 @@ class SVL_DLLPUBLIC SfxStyleSheetBase : public comphelper::OWeakTypeObject
{ {
private: private:
friend class SfxStyleSheetBasePool; friend class SfxStyleSheetBasePool;
SVL_DLLPRIVATE static SfxStyleSheetBasePool& implGetStaticPool();
protected: protected:
SfxStyleSheetBasePool* pPool; // related pool SfxStyleSheetBasePool* pPool; // related pool
...@@ -218,8 +217,6 @@ public: ...@@ -218,8 +217,6 @@ public:
SfxStyleSheetBasePool( SfxItemPool& ); SfxStyleSheetBasePool( SfxItemPool& );
SfxStyleSheetBasePool( const SfxStyleSheetBasePool& ); SfxStyleSheetBasePool( const SfxStyleSheetBasePool& );
const OUString& GetAppName() const { return aAppName; }
SfxItemPool& GetPool() { return rPool;} SfxItemPool& GetPool() { return rPool;}
const SfxItemPool& GetPool() const { return rPool;} const SfxItemPool& GetPool() const { return rPool;}
......
...@@ -47,9 +47,6 @@ public: ...@@ -47,9 +47,6 @@ public:
virtual bool operator ==(const SfxPoolItem & rItem) const SAL_OVERRIDE; virtual bool operator ==(const SfxPoolItem & rItem) const SAL_OVERRIDE;
using SfxPoolItem::Compare;
virtual int Compare(const SfxPoolItem & rWith) const SAL_OVERRIDE;
virtual bool GetPresentation(SfxItemPresentation, virtual bool GetPresentation(SfxItemPresentation,
SfxMapUnit, SfxMapUnit, SfxMapUnit, SfxMapUnit,
OUString & rText, OUString & rText,
......
...@@ -164,14 +164,6 @@ bool SfxBoolItem::operator ==(const SfxPoolItem & rItem) const ...@@ -164,14 +164,6 @@ bool SfxBoolItem::operator ==(const SfxPoolItem & rItem) const
return m_bValue == static_cast< SfxBoolItem const * >(&rItem)->m_bValue; return m_bValue == static_cast< SfxBoolItem const * >(&rItem)->m_bValue;
} }
// virtual
int SfxBoolItem::Compare(const SfxPoolItem & rWith) const
{
DBG_ASSERT(rWith.ISA(SfxBoolItem), "SfxBoolItem::Compare(): Bad type");
return (m_bValue == static_cast<SfxBoolItem const*>(&rWith)->m_bValue) ?
0 : m_bValue ? -1 : 1;
}
// virtual // virtual
bool SfxBoolItem::GetPresentation(SfxItemPresentation, bool SfxBoolItem::GetPresentation(SfxItemPresentation,
SfxMapUnit, SfxMapUnit, SfxMapUnit, SfxMapUnit,
......
...@@ -32,17 +32,6 @@ bool CntByteItem::operator ==(const SfxPoolItem & rItem) const ...@@ -32,17 +32,6 @@ bool CntByteItem::operator ==(const SfxPoolItem & rItem) const
return m_nValue == (static_cast< const CntByteItem * >(&rItem))->m_nValue; return m_nValue == (static_cast< const CntByteItem * >(&rItem))->m_nValue;
} }
// virtual
int CntByteItem::Compare(const SfxPoolItem & rWith) const
{
DBG_ASSERT(rWith.ISA(CntByteItem), "CntByteItem::Compare(): Bad type");
return (static_cast< const CntByteItem * >(&rWith))->m_nValue < m_nValue ?
-1 :
(static_cast< const CntByteItem * >(&rWith))->m_nValue
== m_nValue ?
0 : 1;
}
// virtual // virtual
bool CntByteItem::GetPresentation(SfxItemPresentation, bool CntByteItem::GetPresentation(SfxItemPresentation,
SfxMapUnit, SfxMapUnit, SfxMapUnit, SfxMapUnit,
...@@ -115,19 +104,6 @@ bool CntUInt16Item::operator ==(const SfxPoolItem & rItem) const ...@@ -115,19 +104,6 @@ bool CntUInt16Item::operator ==(const SfxPoolItem & rItem) const
m_nValue; m_nValue;
} }
// virtual
int CntUInt16Item::Compare(const SfxPoolItem & rWith) const
{
DBG_ASSERT(rWith.ISA(CntUInt16Item),
"CntUInt16Item::Compare(): Bad type");
return (static_cast< const CntUInt16Item * >(&rWith))->m_nValue
< m_nValue ?
-1 :
(static_cast< const CntUInt16Item * >(&rWith))->m_nValue
== m_nValue ?
0 : 1;
}
// virtual // virtual
bool CntUInt16Item::GetPresentation(SfxItemPresentation, bool CntUInt16Item::GetPresentation(SfxItemPresentation,
SfxMapUnit, SfxMapUnit, SfxMapUnit, SfxMapUnit,
...@@ -199,18 +175,6 @@ bool CntInt32Item::operator ==(const SfxPoolItem & rItem) const ...@@ -199,18 +175,6 @@ bool CntInt32Item::operator ==(const SfxPoolItem & rItem) const
m_nValue; m_nValue;
} }
// virtual
int CntInt32Item::Compare(const SfxPoolItem & rWith) const
{
DBG_ASSERT(rWith.ISA(CntInt32Item), "CntInt32Item::Compare(): Bad type");
return (static_cast< const CntInt32Item * >(&rWith))->m_nValue
< m_nValue ?
-1 :
(static_cast< const CntInt32Item * >(&rWith))->m_nValue
== m_nValue ?
0 : 1;
}
// virtual // virtual
bool CntInt32Item::GetPresentation(SfxItemPresentation, bool CntInt32Item::GetPresentation(SfxItemPresentation,
SfxMapUnit, SfxMapUnit, SfxMapUnit, SfxMapUnit,
...@@ -281,19 +245,6 @@ bool CntUInt32Item::operator ==(const SfxPoolItem & rItem) const ...@@ -281,19 +245,6 @@ bool CntUInt32Item::operator ==(const SfxPoolItem & rItem) const
m_nValue; m_nValue;
} }
// virtual
int CntUInt32Item::Compare(const SfxPoolItem & rWith) const
{
DBG_ASSERT(rWith.ISA(CntUInt32Item),
"CntUInt32Item::operator ==(): Bad type");
return (static_cast< const CntUInt32Item * >(&rWith))->m_nValue
< m_nValue ?
-1 :
(static_cast< const CntUInt32Item * >(&rWith))->m_nValue
== m_nValue ?
0 : 1;
}
// virtual // virtual
bool CntUInt32Item::GetPresentation(SfxItemPresentation, bool CntUInt32Item::GetPresentation(SfxItemPresentation,
SfxMapUnit, SfxMapUnit, SfxMapUnit, SfxMapUnit,
......
...@@ -36,17 +36,6 @@ bool CntUnencodedStringItem::operator ==(const SfxPoolItem & rItem) const ...@@ -36,17 +36,6 @@ bool CntUnencodedStringItem::operator ==(const SfxPoolItem & rItem) const
m_aValue; m_aValue;
} }
// virtual
int CntUnencodedStringItem::Compare(SfxPoolItem const & rWith) const
{
OSL_FAIL("CntUnencodedStringItem::Compare(): No international");
DBG_ASSERT(rWith.ISA(CntUnencodedStringItem),
"CntUnencodedStringItem::Compare(): Bad type");
sal_Int32 nCmp = m_aValue.compareTo(
static_cast< CntUnencodedStringItem const * >(&rWith)->m_aValue);
return (nCmp == 0) ? 0 : (nCmp < 0) ? -1 : 1;
}
// virtual // virtual
bool CntUnencodedStringItem::GetPresentation(SfxItemPresentation, SfxMapUnit, bool CntUnencodedStringItem::GetPresentation(SfxItemPresentation, SfxMapUnit,
SfxMapUnit, OUString & rText, SfxMapUnit, OUString & rText,
......
...@@ -33,19 +33,6 @@ bool SfxInt64Item::operator== ( const SfxPoolItem& rItem ) const ...@@ -33,19 +33,6 @@ bool SfxInt64Item::operator== ( const SfxPoolItem& rItem ) const
return mnValue == static_cast<const SfxInt64Item&>(rItem).mnValue; return mnValue == static_cast<const SfxInt64Item&>(rItem).mnValue;
} }
int SfxInt64Item::Compare( const SfxPoolItem& r ) const
{
sal_Int64 nOther = static_cast<const SfxInt64Item&>(r).mnValue;
if (mnValue < nOther)
return -1;
if (mnValue > nOther)
return 1;
return 0;
}
bool SfxInt64Item::GetPresentation( bool SfxInt64Item::GetPresentation(
SfxItemPresentation, SfxMapUnit, SfxMapUnit, OUString& rText, SfxItemPresentation, SfxMapUnit, SfxMapUnit, OUString& rText,
const IntlWrapper* /*pIntlWrapper*/ ) const const IntlWrapper* /*pIntlWrapper*/ ) const
......
...@@ -58,18 +58,6 @@ bool SfxInt16Item::operator ==(const SfxPoolItem & rItem) const ...@@ -58,18 +58,6 @@ bool SfxInt16Item::operator ==(const SfxPoolItem & rItem) const
m_nValue; m_nValue;
} }
// virtual
int SfxInt16Item::Compare(const SfxPoolItem & rWith) const
{
DBG_ASSERT(SfxPoolItem::operator ==(rWith), "unequal type");
return (static_cast< const SfxInt16Item * >(&rWith))->m_nValue
< m_nValue ?
-1 :
(static_cast< const SfxInt16Item * >(&rWith))->m_nValue
== m_nValue ?
0 : 1;
}
// virtual // virtual
bool SfxInt16Item::GetPresentation(SfxItemPresentation, bool SfxInt16Item::GetPresentation(SfxItemPresentation,
SfxMapUnit, SfxMapUnit, SfxMapUnit, SfxMapUnit,
......
...@@ -123,12 +123,6 @@ SfxPoolItem::~SfxPoolItem() ...@@ -123,12 +123,6 @@ SfxPoolItem::~SfxPoolItem()
} }
int SfxPoolItem::Compare( const SfxPoolItem& ) const
{
return 0;
}
bool SfxPoolItem::operator==( const SfxPoolItem& rCmp ) const bool SfxPoolItem::operator==( const SfxPoolItem& rCmp ) const
{ {
return rCmp.Type() == Type(); return rCmp.Type() == Type();
......
...@@ -40,14 +40,6 @@ bool SfxVisibilityItem::operator ==(const SfxPoolItem & rItem) const ...@@ -40,14 +40,6 @@ bool SfxVisibilityItem::operator ==(const SfxPoolItem & rItem) const
m_nValue.bVisible; m_nValue.bVisible;
} }
// virtual
int SfxVisibilityItem::Compare(const SfxPoolItem & rWith) const
{
DBG_ASSERT(rWith.ISA(SfxVisibilityItem), "SfxVisibilityItem::Compare(): Bad type");
return m_nValue.bVisible == static_cast< SfxVisibilityItem const * >(&rWith)->m_nValue.bVisible ?
0 : m_nValue.bVisible ? -1 : 1;
}
// virtual // virtual
bool SfxVisibilityItem::GetPresentation(SfxItemPresentation, bool SfxVisibilityItem::GetPresentation(SfxItemPresentation,
SfxMapUnit, SfxMapUnit, SfxMapUnit, SfxMapUnit,
......
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