summaryrefslogtreecommitdiff
path: root/sw/source/uibase/utlui/uitool.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-02-13 17:41:03 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-02-16 00:35:34 +0100
commit6a3f9de585fc0e8e6191db5210729ae6b3730e7d (patch)
tree5d053ebe13d08608812c2321dd60a6c9c23ffc70 /sw/source/uibase/utlui/uitool.cxx
parent7faa218231b7a807412feada3aa1223b43b5626e (diff)
native dialog initial basis
Change-Id: I392be563e38257390f748c70bb71c67a66778ddd Reviewed-on: https://gerrit.libreoffice.org/49677 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/uibase/utlui/uitool.cxx')
-rw-r--r--sw/source/uibase/utlui/uitool.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/sw/source/uibase/utlui/uitool.cxx b/sw/source/uibase/utlui/uitool.cxx
index 5ff91b633337..c8a8bfd49eca 100644
--- a/sw/source/uibase/utlui/uitool.cxx
+++ b/sw/source/uibase/utlui/uitool.cxx
@@ -22,6 +22,7 @@
#include <osl/diagnose.h>
#include <tools/datetime.hxx>
#include <vcl/svapp.hxx>
+#include <vcl/weld.hxx>
#include <unotools/collatorwrapper.hxx>
#include <svl/urihelper.hxx>
#include <svl/stritem.hxx>
@@ -713,6 +714,19 @@ sal_Int32 InsertStringSorted(const OUString& rEntry, ListBox& rToFill, sal_Int32
return rToFill.InsertEntry(rEntry, nOffset);
}
+void InsertStringSorted(const OUString& rEntry, weld::ComboBoxText& rToFill, int nOffset)
+{
+ CollatorWrapper& rCaseColl = ::GetAppCaseCollator();
+ const int nCount = rToFill.get_count();
+ while (nOffset < nCount)
+ {
+ if (0 < rCaseColl.compareString(rToFill.get_text(nOffset), rEntry))
+ break;
+ ++nOffset;
+ }
+ rToFill.insert_text(nOffset, rEntry);
+}
+
void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, bool bSorted, bool bWithDefault)
{
const sal_Int32 nOffset = rToFill.GetEntryCount() > 0 ? 1 : 0;