summaryrefslogtreecommitdiff
path: root/basctl/source/basicide/basobj2.cxx
diff options
context:
space:
mode:
authorAndreas Heinisch <andreas.heinisch@yahoo.de>2019-06-25 14:28:07 +0200
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2019-07-05 11:41:44 +0200
commitff7e327e9e537ea129464a1de5a01bf32c1b9fd3 (patch)
treea2dbac41a06a9c7184e9575f84ee3f4d50b69af9 /basctl/source/basicide/basobj2.cxx
parent151eae314358f9ee0df017cb89fbc8c87c969cdb (diff)
tdf#93476 Sort Macro library list after creating/importing a macro
Added sorting to modules, dialogs and libraries using locale Change-Id: Ie9dcadc593beb13417f38b83958a8aeeb77698ee Reviewed-on: https://gerrit.libreoffice.org/74692 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'basctl/source/basicide/basobj2.cxx')
-rwxr-xr-x[-rw-r--r--]basctl/source/basicide/basobj2.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/basctl/source/basicide/basobj2.cxx b/basctl/source/basicide/basobj2.cxx
index 1f627d0fd7ec..29c1ff6d5598 100644..100755
--- a/basctl/source/basicide/basobj2.cxx
+++ b/basctl/source/basicide/basobj2.cxx
@@ -27,10 +27,13 @@
#include <com/sun/star/document/XScriptInvocationContext.hpp>
#include <basic/sbmeth.hxx>
+#include <comphelper/processfactory.hxx>
+#include <comphelper/string.hxx>
#include <framework/documentundoguard.hxx>
#include <sal/log.hxx>
#include <tools/diagnose_ex.h>
#include <unotools/moduleoptions.hxx>
+#include <vcl/settings.hxx>
#include <vcl/svapp.hxx>
#include <vcl/weld.hxx>
@@ -90,7 +93,10 @@ bool IsValidSbxName( const OUString& rName )
static bool StringCompareLessThan( const OUString& rStr1, const OUString& rStr2 )
{
- return rStr1.compareToIgnoreAsciiCase( rStr2 ) < 0;
+ auto const sort = comphelper::string::NaturalStringSorter(
+ comphelper::getProcessComponentContext(),
+ Application::GetSettings().GetUILanguageTag().getLocale());
+ return sort.compare(rStr1, rStr2) < 0;
}
Sequence< OUString > GetMergedLibraryNames( const Reference< script::XLibraryContainer >& xModLibContainer, const Reference< script::XLibraryContainer >& xDlgLibContainer )