diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/inc/swcont.hxx | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/sw/source/uibase/inc/swcont.hxx b/sw/source/uibase/inc/swcont.hxx index c36fb85ebd03..836e0dbdfc1e 100644 --- a/sw/source/uibase/inc/swcont.hxx +++ b/sw/source/uibase/inc/swcont.hxx @@ -21,6 +21,7 @@ #define INCLUDED_SW_SOURCE_UIBASE_INC_SWCONT_HXX #include <rtl/ustring.hxx> +#include <vcl/lstbox.hxx> class SwContentType; @@ -72,18 +73,18 @@ public: virtual bool IsProtect() const; const SwContentType* GetParent() const {return pParent;} const OUString& GetName() const {return sContentName;} - bool operator==(const SwContent& /*rCont*/) const - { - // they're never equal, otherwise they'd fall out of the array - return false; - } - bool operator<(const SwContent& rCont) const - { - // at first sort by position and then by name - return nYPosition != rCont.nYPosition ? - nYPosition < rCont.nYPosition : - sContentName < rCont.sContentName; - } + bool operator==(const SwContent& /*rCont*/) const + { + // they're never equal, otherwise they'd fall out of the array + return false; + } + bool operator<(const SwContent& rCont) const + { + // at first sort by position and then by name + if (nYPosition != rCont.nYPosition) + return nYPosition < rCont.nYPosition; + return ListBox::NaturalSortCompare(sContentName, rCont.sContentName) < 0; + } long GetYPos() const {return nYPosition;} |