From ab314659448e3a1f6f3aaf9e9e7408cfcb4f0c7e Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Tue, 1 Oct 2013 02:43:37 +0200 Subject: fix Mac OSX build --- xmloff/source/style/impastpl.cxx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'xmloff') diff --git a/xmloff/source/style/impastpl.cxx b/xmloff/source/style/impastpl.cxx index c41b5dc92cb3..e52e00df2db5 100644 --- a/xmloff/source/style/impastpl.cxx +++ b/xmloff/source/style/impastpl.cxx @@ -594,6 +594,15 @@ struct AutoStylePoolExport AutoStylePoolExport() : mpParent(NULL), mpProperties(NULL) {} }; +struct StyleComparator +{ + bool operator() (const AutoStylePoolExport& a, const AutoStylePoolExport& b) + { + return (a.mpProperties->GetName() < b.mpProperties->GetName() || + (a.mpProperties->GetName() == b.mpProperties->GetName() && *a.mpParent < *b.mpParent)); + } +}; + } void SvXMLAutoStylePoolP_Impl::exportXML( @@ -653,15 +662,8 @@ void SvXMLAutoStylePoolP_Impl::exportXML( if (bHack) { - struct { - bool operator() (AutoStylePoolExport a, AutoStylePoolExport b) - { - return (a.mpProperties->GetName() < b.mpProperties->GetName() || - (a.mpProperties->GetName() == b.mpProperties->GetName() && *a.mpParent < *b.mpParent)); - } - } aComparator; - std::sort(aExpStyles.begin(), aExpStyles.end(), aComparator); + std::sort(aExpStyles.begin(), aExpStyles.end(), StyleComparator()); for (size_t i = 0; i < nCount; i++) { -- cgit