LibreOffice Module svx (master) 1
charmap.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#include <config_wasm_strip.h>
21
22#include <utility>
23#include <vcl/event.hxx>
24#include <vcl/fontcharmap.hxx>
25#include <vcl/svapp.hxx>
26#include <vcl/settings.hxx>
27#include <vcl/virdev.hxx>
28
29#include <svx/ucsubset.hxx>
30
31
32#include <svx/strings.hrc>
33
34#include <svx/charmap.hxx>
35#include <svx/dialmgr.hxx>
36
37#include <charmapacc.hxx>
38#include <uiobject.hxx>
39
40#include <com/sun/star/accessibility/AccessibleEventId.hpp>
41#include <com/sun/star/accessibility/AccessibleStateType.hpp>
42#include <com/sun/star/datatransfer/clipboard/XFlushableClipboard.hpp>
43#include <com/sun/star/datatransfer/clipboard/SystemClipboard.hpp>
44#include <officecfg/Office/Common.hxx>
46#include <unicode/uchar.h>
47#include <vcl/textview.hxx>
48#include <rtl/ustrbuf.hxx>
49
50using namespace ::com::sun::star::accessibility;
51using namespace ::com::sun::star::uno;
52using namespace ::com::sun::star;
53
55{
56 static sal_uInt32 cSelectedChar = ' '; // keeps selected character over app lifetime
57 return cSelectedChar;
58}
59
61{
63}
64
65SvxShowCharSet::SvxShowCharSet(std::unique_ptr<weld::ScrolledWindow> pScrolledWindow, const VclPtr<VirtualDevice>& rVirDev)
66 : mxVirDev(rVirDev)
67 , mxScrollArea(std::move(pScrolledWindow))
68 , nX(0)
69 , nY(0)
70 , maFontSize(0, 0)
71 , maPosition(0,0)
72 , mbRecalculateFont(true)
73 , mbUpdateForeground(true)
74 , mbUpdateBackground(true)
75{
76 init();
77}
78
80{
81 CustomWidgetController::SetDrawingArea(pDrawingArea);
82
83 Size aSize(COLUMN_COUNT * pDrawingArea->get_approximate_digit_width() * 5.25,
84 ROW_COUNT * pDrawingArea->get_text_height() * 2);
85
86 nX = aSize.Width() / COLUMN_COUNT;
87 nY = aSize.Height() / ROW_COUNT;
88
89 // tdf#121232 set a size request that will result in a 0 m_nXGap by default
90 mxScrollArea->set_size_request(COLUMN_COUNT * nX + mxScrollArea->get_scroll_thickness() + 2,
91 ROW_COUNT * nY);
92}
93
95{
96 nSelectedIndex = -1; // TODO: move into init list when it is no longer static
97 m_nXGap = 0;
98 m_nYGap = 0;
99
100 mxScrollArea->connect_vadjustment_changed(LINK(this, SvxShowCharSet, VscrollHdl));
102 // other settings depend on selected font => see RecalculateFont
103
104 bDrag = false;
105}
106
108{
109 mbRecalculateFont = true;
110}
111
113{
115}
116
118{
120}
121
123{
124 if ( rMEvt.IsLeft() )
125 {
126 if ( rMEvt.GetClicks() == 1 )
127 {
128 GrabFocus();
129 bDrag = true;
130 CaptureMouse();
131
132 int nIndex = PixelToMapIndex( rMEvt.GetPosPixel() );
133 // Fire the focus event
134 SelectIndex( nIndex, true);
135 }
136
137 if ( !(rMEvt.GetClicks() % 2) )
138 aDoubleClkHdl.Call( this );
139 }
140
141 if (rMEvt.IsRight())
142 {
143 Point aPosition (rMEvt.GetPosPixel());
144 maPosition = aPosition;
145 int nIndex = PixelToMapIndex( rMEvt.GetPosPixel() );
146 // Fire the focus event
147 SelectIndex( nIndex, true);
149 }
150
151 return true;
152}
153
155{
156 if ( bDrag && rMEvt.IsLeft() )
157 {
158 // released mouse over character map
159 if ( tools::Rectangle(Point(), GetOutputSizePixel()).Contains(rMEvt.GetPosPixel()))
160 aSelectHdl.Call( this );
161 ReleaseMouse();
162 bDrag = false;
163 }
164
165 return true;
166}
167
169{
170 if ( rMEvt.IsLeft() && bDrag )
171 {
172 Point aPos = rMEvt.GetPosPixel();
173 Size aSize = GetOutputSizePixel();
174
175 if ( aPos.X() < 0 )
176 aPos.setX( 0 );
177 else if ( aPos.X() > aSize.Width()-5 )
178 aPos.setX( aSize.Width()-5 );
179 if ( aPos.Y() < 0 )
180 aPos.setY( 0 );
181 else if ( aPos.Y() > aSize.Height()-5 )
182 aPos.setY( aSize.Height()-5 );
183
184 int nIndex = PixelToMapIndex( aPos );
185 // Fire the focus event.
186 SelectIndex( nIndex, true );
187 }
188
189 return true;
190}
191
192sal_uInt16 SvxShowCharSet::GetRowPos(sal_uInt16 _nPos)
193{
194 return _nPos / COLUMN_COUNT ;
195}
196
198{
199 maFavCharList.clear();
200 maFavCharFontList.clear();
201 //retrieve recent character list
202 css::uno::Sequence< OUString > rFavCharList( officecfg::Office::Common::FavoriteCharacters::FavoriteCharacterList::get() );
204
205 //retrieve recent character font list
206 css::uno::Sequence< OUString > rFavCharFontList( officecfg::Office::Common::FavoriteCharacters::FavoriteCharacterFontList::get() );
208}
209
210bool SvxShowCharSet::isFavChar(const OUString& sTitle, const OUString& rFont)
211{
212 auto isFavCharTitleExists = std::any_of(maFavCharList.begin(),
213 maFavCharList.end(),
214 [sTitle] (const OUString & a) { return a == sTitle; });
215
216 auto isFavCharFontExists = std::any_of(maFavCharFontList.begin(),
217 maFavCharFontList.end(),
218 [rFont] (const OUString & a) { return a == rFont; });
219
220 // if Fav char to be added is already in list, return true
221 return isFavCharTitleExists && isFavCharFontExists;
222}
223
225{
226 std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetDrawingArea(), "svx/ui/charsetmenu.ui"));
227 std::unique_ptr<weld::Menu> xItemMenu(xBuilder->weld_menu("charsetmenu"));
228
230 OUString aOUStr( &cChar, 1 );
231 if (isFavChar(aOUStr, mxVirDev->GetFont().GetFamilyName()) || maFavCharList.size() >= 16)
232 xItemMenu->set_visible("add", false);
233 else
234 xItemMenu->set_visible("remove", false);
235
236 ContextMenuSelect(xItemMenu->popup_at_rect(GetDrawingArea(), tools::Rectangle(maPosition, Size(1,1))));
237 GrabFocus();
238 Invalidate();
239}
240
241void SvxShowCharSet::ContextMenuSelect(std::string_view rIdent)
242{
244 OUString aOUStr(&cChar, 1);
245
246 if (rIdent == "insert")
247 aDoubleClkHdl.Call(this);
248 else if (rIdent == "add" || rIdent == "remove")
249 {
250 updateFavCharacterList(aOUStr, mxVirDev->GetFont().GetFamilyName());
251 aFavClickHdl.Call(this);
252 }
253 else if (rIdent == "copy")
254 CopyToClipboard(aOUStr);
255}
256
257void SvxShowCharSet::CopyToClipboard(const OUString& rOUStr)
258{
259 css::uno::Reference<css::datatransfer::clipboard::XClipboard> xClipboard =
260 css::datatransfer::clipboard::SystemClipboard::create(comphelper::getProcessComponentContext());
261
262 if (!xClipboard.is())
263 return;
264
265 rtl::Reference<TETextDataObject> pDataObj = new TETextDataObject(rOUStr);
266
267 try
268 {
269 xClipboard->setContents( pDataObj, nullptr );
270
271 css::uno::Reference<css::datatransfer::clipboard::XFlushableClipboard> xFlushableClipboard(xClipboard, css::uno::UNO_QUERY);
272 if( xFlushableClipboard.is() )
273 xFlushableClipboard->flushClipboard();
274 }
275 catch( const css::uno::Exception& )
276 {
277 }
278}
279
280void SvxShowCharSet::updateFavCharacterList(const OUString& sTitle, const OUString& rFont)
281{
282 if(isFavChar(sTitle, rFont))
283 {
284 auto itChar = std::find(maFavCharList.begin(), maFavCharList.end(), sTitle);
285 auto itChar2 = std::find(maFavCharFontList.begin(), maFavCharFontList.end(), rFont);
286
287 // if Fav char to be added is already in list, remove it
288 if( itChar != maFavCharList.end() && itChar2 != maFavCharFontList.end() )
289 {
290 maFavCharList.erase( itChar );
291 maFavCharFontList.erase( itChar2);
292 }
293
294 css::uno::Sequence< OUString > aFavCharList(maFavCharList.size());
295 auto aFavCharListRange = asNonConstRange(aFavCharList);
296 css::uno::Sequence< OUString > aFavCharFontList(maFavCharFontList.size());
297 auto aFavCharFontListRange = asNonConstRange(aFavCharFontList);
298
299 for (size_t i = 0; i < maFavCharList.size(); ++i)
300 {
301 aFavCharListRange[i] = maFavCharList[i];
302 aFavCharFontListRange[i] = maFavCharFontList[i];
303 }
304
305 std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create());
306 officecfg::Office::Common::FavoriteCharacters::FavoriteCharacterList::set(aFavCharList, batch);
307 officecfg::Office::Common::FavoriteCharacters::FavoriteCharacterFontList::set(aFavCharFontList, batch);
308 batch->commit();
309 return;
310 }
311
312 auto itChar = std::find(maFavCharList.begin(), maFavCharList.end(), sTitle);
313 auto itChar2 = std::find(maFavCharFontList.begin(), maFavCharFontList.end(), rFont);
314
315 // if Fav char to be added is already in list, remove it
316 if( itChar != maFavCharList.end() && itChar2 != maFavCharFontList.end() )
317 {
318 maFavCharList.erase( itChar );
319 maFavCharFontList.erase( itChar2);
320 }
321
322 if (maFavCharList.size() == 16)
323 {
324 maFavCharList.pop_back();
325 maFavCharFontList.pop_back();
326 }
327
328 maFavCharList.push_back(sTitle);
329 maFavCharFontList.push_back(rFont);
330
331 css::uno::Sequence< OUString > aFavCharList(maFavCharList.size());
332 auto aFavCharListRange = asNonConstRange(aFavCharList);
333 css::uno::Sequence< OUString > aFavCharFontList(maFavCharFontList.size());
334 auto aFavCharFontListRange = asNonConstRange(aFavCharFontList);
335
336 for (size_t i = 0; i < maFavCharList.size(); ++i)
337 {
338 aFavCharListRange[i] = maFavCharList[i];
339 aFavCharFontListRange[i] = maFavCharFontList[i];
340 }
341
342 std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create());
343 officecfg::Office::Common::FavoriteCharacters::FavoriteCharacterList::set(aFavCharList, batch);
344 officecfg::Office::Common::FavoriteCharacters::FavoriteCharacterFontList::set(aFavCharFontList, batch);
345 batch->commit();
346}
347
348sal_uInt16 SvxShowCharSet::GetColumnPos(sal_uInt16 _nPos)
349{
350 return _nPos % COLUMN_COUNT ;
351}
352
354{
355 return mxScrollArea->vadjustment_get_value() * COLUMN_COUNT;
356}
357
359{
360 sal_uInt32 nIndex = FirstInView();
362 sal_uInt32 nCompare = mxFontCharMap->GetCharCount() - 1;
363 if (nIndex > nCompare)
364 nIndex = nCompare;
365 return nIndex;
366}
367
369{
370 const int nBase = FirstInView();
371 int x = ((nIndex - nBase) % COLUMN_COUNT) * nX;
372 int y = ((nIndex - nBase) / COLUMN_COUNT) * nY;
373 return Point( x + m_nXGap, y + m_nYGap );
374}
375
376
377int SvxShowCharSet::PixelToMapIndex( const Point& point) const
378{
379 int nBase = FirstInView();
380 assert(nX != 0);
381 int x = nX == 0 ? 0 : (point.X() - m_nXGap)/nX;
382 assert(nY != 0);
383 int y = nY == 0 ? 0 : (point.Y() - m_nYGap)/nY;
384 return (nBase + x + y * COLUMN_COUNT);
385}
386
388{
389 vcl::KeyCode aCode = rKEvt.GetKeyCode();
390
391 if (aCode.GetModifier())
392 return false;
393
394 bool bRet = true;
395
396 int tmpSelected = nSelectedIndex;
397
398 switch (aCode.GetCode())
399 {
400 case KEY_SPACE:
401 aSelectHdl.Call( this );
402 break;
403 case KEY_LEFT:
404 --tmpSelected;
405 break;
406 case KEY_RIGHT:
407 ++tmpSelected;
408 break;
409 case KEY_UP:
410 tmpSelected -= COLUMN_COUNT;
411 break;
412 case KEY_DOWN:
413 tmpSelected += COLUMN_COUNT;
414 break;
415 case KEY_PAGEUP:
416 tmpSelected -= ROW_COUNT * COLUMN_COUNT;
417 break;
418 case KEY_PAGEDOWN:
419 tmpSelected += ROW_COUNT * COLUMN_COUNT;
420 break;
421 case KEY_HOME:
422 tmpSelected = 0;
423 break;
424 case KEY_END:
425 tmpSelected = mxFontCharMap->GetCharCount() - 1;
426 break;
427 case KEY_TAB: // some fonts have a character at these unicode control codes
428 case KEY_ESCAPE:
429 case KEY_RETURN:
430 tmpSelected = - 1; // mark as invalid
431 bRet = false;
432 break;
433 default:
434 {
435 sal_UCS4 cChar = rKEvt.GetCharCode();
436 sal_UCS4 cNext = mxFontCharMap->GetNextChar(cChar - 1);
437 tmpSelected = mxFontCharMap->GetIndexFromChar(cNext);
438 if (tmpSelected < 0 || (cChar != cNext))
439 {
440 tmpSelected = - 1; // mark as invalid
441 bRet = false;
442 }
443 break;
444 }
445 }
446
447 if ( tmpSelected >= 0 )
448 {
449 SelectIndex( tmpSelected, true );
450 aPreSelectHdl.Call( this );
451 }
452
453 return bRet;
454}
455
457{
458 InitSettings(rRenderContext);
459 RecalculateFont(rRenderContext);
460 DrawChars_Impl(rRenderContext, FirstInView(), LastInView());
461}
462
464{
465 maFont = rFont;
466 mbRecalculateFont = true;
467 Invalidate();
468}
469
471{
472 Invalidate();
473}
474
475// stretch a grid rectangle if it's at the edge to fill unused space
476tools::Rectangle SvxShowCharSet::getGridRectangle(const Point &rPointUL, const Size &rOutputSize) const
477{
478 tools::Long x = rPointUL.X() - 1;
479 tools::Long y = rPointUL.Y() - 1;
480 Point aPointUL(x+1, y+1);
481 Size aGridSize(nX-1, nY-1);
482
483 tools::Long nXDistFromLeft = x - m_nXGap;
484 if (nXDistFromLeft <= 1)
485 {
486 aPointUL.setX( 1 );
487 aGridSize.AdjustWidth(m_nXGap + nXDistFromLeft );
488 }
489 tools::Long nXDistFromRight = rOutputSize.Width() - m_nXGap - nX - x;
490 if (nXDistFromRight <= 1)
491 aGridSize.AdjustWidth(m_nXGap + nXDistFromRight );
492
493 tools::Long nXDistFromTop = y - m_nYGap;
494 if (nXDistFromTop <= 1)
495 {
496 aPointUL.setY( 1 );
497 aGridSize.AdjustHeight(m_nYGap + nXDistFromTop );
498 }
499 tools::Long nXDistFromBottom = rOutputSize.Height() - m_nYGap - nY - y;
500 if (nXDistFromBottom <= 1)
501 aGridSize.AdjustHeight(m_nYGap + nXDistFromBottom );
502
503 return tools::Rectangle(aPointUL, aGridSize);
504}
505
506void SvxShowCharSet::DrawChars_Impl(vcl::RenderContext& rRenderContext, int n1, int n2)
507{
508 if (n1 > LastInView() || n2 < FirstInView())
509 return;
510
511 Size aOutputSize(GetOutputSizePixel());
512
513 const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
514 const Color aWindowTextColor(rStyleSettings.GetFieldTextColor());
515 Color aHighlightColor(rStyleSettings.GetHighlightColor());
516 Color aHighlightTextColor(rStyleSettings.GetHighlightTextColor());
517 Color aFaceColor(rStyleSettings.GetFaceColor());
518 Color aLightColor(rStyleSettings.GetLightColor());
519 Color aShadowColor(rStyleSettings.GetShadowColor());
520
521 int i;
522 rRenderContext.SetLineColor(aShadowColor);
523 for (i = 1; i < COLUMN_COUNT; ++i)
524 {
525 rRenderContext.DrawLine(Point(nX * i + m_nXGap, 0),
526 Point(nX * i + m_nXGap, aOutputSize.Height()));
527 }
528 for (i = 1; i < ROW_COUNT; ++i)
529 {
530 rRenderContext.DrawLine(Point(0, nY * i + m_nYGap),
531 Point(aOutputSize.Width(), nY * i + m_nYGap));
532 }
533
534 int nTextHeight = rRenderContext.GetTextHeight();
535 tools::Rectangle aBoundRect;
536 for (i = n1; i <= n2; ++i)
537 {
538 Point pix = MapIndexToPixel(i);
539 int x = pix.X();
540 int y = pix.Y();
541
542 sal_UCS4 nChar = mxFontCharMap->GetCharFromIndex(i);
543 OUString aCharStr(&nChar, 1);
544 int nTextWidth = rRenderContext.GetTextWidth(aCharStr);
545 int tx = x + (nX - nTextWidth + 1) / 2;
546 int ty = y + (nY - nTextHeight + 1) / 2;
547 Point aPointTxTy(tx, ty);
548
549 // adjust position before it gets out of bounds
550 if (rRenderContext.GetTextBoundRect(aBoundRect, aCharStr) && !aBoundRect.IsEmpty())
551 {
552 // zero advance width => use ink width to center glyph
553 if (!nTextWidth)
554 {
555 aPointTxTy.setX( x - aBoundRect.Left() + (nX - aBoundRect.GetWidth() + 1) / 2 );
556 }
557
558 aBoundRect += aPointTxTy;
559
560 // shift back vertically if needed
561 int nYLDelta = aBoundRect.Top() - y;
562 int nYHDelta = (y + nY) - aBoundRect.Bottom();
563 if (nYLDelta <= 0)
564 aPointTxTy.AdjustY( -(nYLDelta - 1) );
565 else if (nYHDelta <= 0)
566 aPointTxTy.AdjustY(nYHDelta - 1 );
567
568 // shift back horizontally if needed
569 int nXLDelta = aBoundRect.Left() - x;
570 int nXHDelta = (x + nX) - aBoundRect.Right();
571 if (nXLDelta <= 0)
572 aPointTxTy.AdjustX( -(nXLDelta - 1) );
573 else if (nXHDelta <= 0)
574 aPointTxTy.AdjustX(nXHDelta - 1 );
575 }
576
577 // tdf#109214 - highlight the favorite characters
578 if (isFavChar(aCharStr, mxVirDev->GetFont().GetFamilyName()))
579 {
580 const Color aLineCol = rRenderContext.GetLineColor();
581 rRenderContext.SetLineColor(aHighlightColor);
582 rRenderContext.SetFillColor(COL_TRANSPARENT);
583 // Outer border
584 rRenderContext.DrawRect(tools::Rectangle(Point(x - 1, y - 1), Size(nX + 3, nY + 3)));
585 // Inner border
586 rRenderContext.DrawRect(tools::Rectangle(Point(x, y), Size(nX + 1, nY + 1)));
587 rRenderContext.SetLineColor(aLineCol);
588 }
589
590 Color aTextCol = rRenderContext.GetTextColor();
591 if (i != nSelectedIndex)
592 {
593 rRenderContext.SetTextColor(aWindowTextColor);
594 rRenderContext.DrawText(aPointTxTy, aCharStr);
595 }
596 else
597 {
598 Color aLineCol = rRenderContext.GetLineColor();
599 Color aFillCol = rRenderContext.GetFillColor();
600 rRenderContext.SetLineColor();
601 Point aPointUL(x + 1, y + 1);
602 if (HasFocus())
603 {
604 rRenderContext.SetFillColor(aHighlightColor);
605 rRenderContext.DrawRect(getGridRectangle(aPointUL, aOutputSize));
606
607 rRenderContext.SetTextColor(aHighlightTextColor);
608 rRenderContext.DrawText(aPointTxTy, aCharStr);
609 }
610 else
611 {
612 rRenderContext.SetFillColor(aFaceColor);
613 rRenderContext.DrawRect(getGridRectangle(aPointUL, aOutputSize));
614
615 rRenderContext.SetLineColor(aLightColor);
616 rRenderContext.DrawLine(aPointUL, Point(x + nX - 1, y + 1));
617 rRenderContext.DrawLine(aPointUL, Point(x + 1, y + nY - 1));
618
619 rRenderContext.SetLineColor(aShadowColor);
620 rRenderContext.DrawLine(Point(x + 1, y + nY - 1), Point(x + nX - 1, y + nY - 1));
621 rRenderContext.DrawLine(Point(x + nX - 1, y + nY - 1), Point(x + nX - 1, y + 1));
622
623 rRenderContext.DrawText(aPointTxTy, aCharStr);
624 }
625 rRenderContext.SetLineColor(aLineCol);
626 rRenderContext.SetFillColor(aFillCol);
627 }
628 rRenderContext.SetTextColor(aTextCol);
629 }
630}
631
632
634{
635 const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
636
638 {
639 rRenderContext.SetTextColor(rStyleSettings.GetDialogTextColor());
640 mbUpdateForeground = false;
641 }
642
644 {
645 rRenderContext.SetBackground(rStyleSettings.GetWindowColor());
646 rRenderContext.Erase();
647 mbUpdateBackground = false;
648 }
649
650 vcl::Font aFont(maFont);
651 aFont.SetWeight(WEIGHT_LIGHT);
652 aFont.SetAlignment(ALIGN_TOP);
653 aFont.SetFontSize(maFontSize);
654 aFont.SetTransparent(true);
655 rRenderContext.SetFont(aFont);
656}
657
659{
660 if( nSelectedIndex >= 0 )
661 getSelectedChar() = mxFontCharMap->GetCharFromIndex( nSelectedIndex );
662 return getSelectedChar();
663}
664
665
667{
669 return;
670
671 // save last selected unicode
672 if (nSelectedIndex >= 0)
673 getSelectedChar() = mxFontCharMap->GetCharFromIndex(nSelectedIndex);
674
675 Size aSize(GetOutputSizePixel());
676
677 vcl::Font aFont = maFont;
678 aFont.SetWeight(WEIGHT_LIGHT);
679 aFont.SetAlignment(ALIGN_TOP);
680 int nFontHeight = (aSize.Height() - 5) * 2 / (3 * ROW_COUNT);
681 maFontSize = rRenderContext.PixelToLogic(Size(0, nFontHeight));
682 aFont.SetFontSize(maFontSize);
683 aFont.SetTransparent(true);
684 rRenderContext.SetFont(aFont);
685 rRenderContext.GetFontCharMap(mxFontCharMap);
687
688 nX = aSize.Width() / COLUMN_COUNT;
689 nY = aSize.Height() / ROW_COUNT;
690
691 const int nLastRow = (mxFontCharMap->GetCharCount() - 1 + COLUMN_COUNT) / COLUMN_COUNT;
692 mxScrollArea->vadjustment_configure(mxScrollArea->vadjustment_get_value(), 0, nLastRow, 1, ROW_COUNT - 1, ROW_COUNT);
693
694 // restore last selected unicode
695 int nMapIndex = mxFontCharMap->GetIndexFromChar(getSelectedChar());
696 if (nMapIndex != nSelectedIndex)
697 SelectIndex(nMapIndex);
698
699 // rearrange CharSet element in sync with nX- and nY-multiples
700 Size aDrawSize(nX * COLUMN_COUNT, nY * ROW_COUNT);
701 m_nXGap = (aSize.Width() - aDrawSize.Width()) / 2;
702 m_nYGap = (aSize.Height() - aDrawSize.Height()) / 2;
703
704 mbRecalculateFont = false;
705}
706
707void SvxShowCharSet::SelectIndex(int nNewIndex, bool bFocus)
708{
709 if (!mxFontCharMap.is())
711
712 if( nNewIndex < 0 )
713 {
714 // need to scroll see closest unicode
715 sal_uInt32 cPrev = mxFontCharMap->GetPrevChar( getSelectedChar() );
716 int nMapIndex = mxFontCharMap->GetIndexFromChar( cPrev );
717 int nNewPos = nMapIndex / COLUMN_COUNT;
718 mxScrollArea->vadjustment_set_value(nNewPos);
719 nSelectedIndex = bFocus ? nMapIndex+1 : -1;
720 Invalidate();
721 }
722 else if( nNewIndex < FirstInView() )
723 {
724 // need to scroll up to see selected item
725 int nOldPos = mxScrollArea->vadjustment_get_value();
726 int nDelta = (FirstInView() - nNewIndex + COLUMN_COUNT-1) / COLUMN_COUNT;
727 mxScrollArea->vadjustment_set_value(nOldPos - nDelta);
728 nSelectedIndex = nNewIndex;
729 Invalidate();
730 }
731 else if( nNewIndex > LastInView() )
732 {
733 // need to scroll down to see selected item
734 int nOldPos = mxScrollArea->vadjustment_get_value();
735 int nDelta = (nNewIndex - LastInView() + COLUMN_COUNT) / COLUMN_COUNT;
736 mxScrollArea->vadjustment_set_value(nOldPos + nDelta);
737 if( nNewIndex < mxFontCharMap->GetCharCount() )
738 {
739 nSelectedIndex = nNewIndex;
740 Invalidate();
741 }
742 else if (nOldPos != mxScrollArea->vadjustment_get_value())
743 {
744 Invalidate();
745 }
746 }
747 else
748 {
749 nSelectedIndex = nNewIndex;
750 Invalidate();
751 }
752
753 if( nSelectedIndex >= 0 )
754 {
755 getSelectedChar() = mxFontCharMap->GetCharFromIndex( nSelectedIndex );
756#if !ENABLE_WASM_STRIP_ACCESSIBILITY
757 if( m_xAccessible.is() )
758 {
760 // Don't fire the focus event.
761 if ( bFocus )
762 m_xAccessible->fireEvent( AccessibleEventId::ACTIVE_DESCENDANT_CHANGED, Any(), Any(pItem->GetAccessible()) ); // this call assures that m_pItem is set
763 else
764 m_xAccessible->fireEvent( AccessibleEventId::ACTIVE_DESCENDANT_CHANGED_NOFOCUS, Any(), Any(pItem->GetAccessible()) ); // this call assures that m_pItem is set
765
766 assert(pItem->m_xItem.is() && "No accessible created!");
767 Any aOldAny, aNewAny;
768 aNewAny <<= AccessibleStateType::FOCUSED;
769 // Don't fire the focus event.
770 if ( bFocus )
771 pItem->m_xItem->fireEvent( AccessibleEventId::STATE_CHANGED, aOldAny, aNewAny );
772
773 aNewAny <<= AccessibleStateType::SELECTED;
774 pItem->m_xItem->fireEvent( AccessibleEventId::STATE_CHANGED, aOldAny, aNewAny );
775 }
776#endif
777 }
778 aHighHdl.Call( this );
779}
780
781void SvxShowCharSet::OutputIndex( int nNewIndex )
782{
783 SelectIndex( nNewIndex, true );
784 aSelectHdl.Call( this );
785}
786
787
789{
790 if ( !mxFontCharMap.is() )
792
793 // get next available char of current font
794 sal_UCS4 cNext = mxFontCharMap->GetNextChar( (cNew > 0) ? cNew - 1 : cNew );
795
796 int nMapIndex = mxFontCharMap->GetIndexFromChar( cNext );
797 SelectIndex( nMapIndex );
798 // move selected item to top row if not in focus
799 mxScrollArea->vadjustment_set_value(nMapIndex / COLUMN_COUNT);
800 Invalidate();
801}
802
804{
805 if( nSelectedIndex < FirstInView() )
806 {
807 SelectIndex( FirstInView() + (nSelectedIndex % COLUMN_COUNT) );
808 }
809 else if( nSelectedIndex > LastInView() )
810 {
811#if !ENABLE_WASM_STRIP_ACCESSIBILITY
812 if( m_xAccessible.is() )
813 {
814 css::uno::Any aOldAny, aNewAny;
815 int nLast = LastInView();
816 for ( ; nLast != nSelectedIndex; ++nLast)
817 {
818 aOldAny <<= ImplGetItem(nLast)->GetAccessible();
819 m_xAccessible ->fireEvent( AccessibleEventId::CHILD, aOldAny, aNewAny );
820 }
821 }
822#endif
823 SelectIndex( (LastInView() - COLUMN_COUNT + 1) + (nSelectedIndex % COLUMN_COUNT) );
824 }
825
826 Invalidate();
827}
828
830{
831#if !ENABLE_WASM_STRIP_ACCESSIBILITY
832 if (m_xAccessible.is())
833 {
834 m_aItems.clear();
835 m_xAccessible->clearCharSetControl();
836 m_xAccessible.clear();
837 }
838#endif
839}
840
841css::uno::Reference< XAccessible > SvxShowCharSet::CreateAccessible()
842{
843#if !ENABLE_WASM_STRIP_ACCESSIBILITY
844 OSL_ENSURE(!m_xAccessible.is(),"Accessible already created!");
846#endif
847 return m_xAccessible;
848}
849
851{
852 ItemsMap::iterator aFind = m_aItems.find(_nPos);
853 if ( aFind == m_aItems.end() )
854 {
855#if !ENABLE_WASM_STRIP_ACCESSIBILITY
856 OSL_ENSURE(m_xAccessible.is(), "Who wants to create a child of my table without a parent?");
857#endif
858 auto xItem = std::make_shared<svx::SvxShowCharSetItem>(*this,
859 m_xAccessible.get(), sal::static_int_cast< sal_uInt16 >(_nPos));
860 aFind = m_aItems.emplace(_nPos, xItem).first;
861 OUStringBuffer buf;
862 buf.appendUtf32( mxFontCharMap->GetCharFromIndex( _nPos ) );
863 aFind->second->maText = buf.makeStringAndClear();
864 Point pix = MapIndexToPixel( _nPos );
865 aFind->second->maRect = tools::Rectangle( Point( pix.X() + 1, pix.Y() + 1 ), Size(nX-1,nY-1) );
866 }
867
868 return aFind->second.get();
869}
870
872{
873 return mxFontCharMap->GetCharCount();
874}
875
877{
879 return mxFontCharMap;
880}
881
882// TODO: should be moved into Font Attributes stuff
883// we let it mature here though because it is currently the only use
884
886{
887 InitList();
888 ApplyCharMap(rxFontCharMap);
889}
890
892{
893 return maSubsets;
894}
895
897{
898 for (auto const& subset : maSubsets)
899 if( (subset.GetRangeMin() <= cChar) && (cChar <= subset.GetRangeMax()) )
900 return &subset;
901 return nullptr;
902}
903
904inline Subset::Subset(sal_UCS4 nMin, sal_UCS4 nMax, OUString aName)
905: mnRangeMin(nMin), mnRangeMax(nMax), maRangeName(std::move(aName))
906{
907}
908
910{
911 static SubsetVec s_aAllSubsets = []()
912 {
913 SubsetVec aAllSubsets;
914 //I wish icu had a way to give me the block ranges
915 for (int i = UBLOCK_BASIC_LATIN; i < UBLOCK_COUNT; ++i)
916 {
917 UBlockCode eBlock = static_cast<UBlockCode>(i);
918 switch (eBlock)
919 {
920 case UBLOCK_NO_BLOCK:
921 case UBLOCK_INVALID_CODE:
922 case UBLOCK_COUNT:
923 case UBLOCK_HIGH_SURROGATES:
924 case UBLOCK_HIGH_PRIVATE_USE_SURROGATES:
925 case UBLOCK_LOW_SURROGATES:
926 break;
927 case UBLOCK_BASIC_LATIN:
928 aAllSubsets.emplace_back( 0x0000, 0x007F, SvxResId(RID_SUBSETSTR_BASIC_LATIN) );
929 break;
930 case UBLOCK_LATIN_1_SUPPLEMENT:
931 aAllSubsets.emplace_back( 0x0080, 0x00FF, SvxResId(RID_SUBSETSTR_LATIN_1) );
932 break;
933 case UBLOCK_LATIN_EXTENDED_A:
934 aAllSubsets.emplace_back( 0x0100, 0x017F, SvxResId(RID_SUBSETSTR_LATIN_EXTENDED_A) );
935 break;
936 case UBLOCK_LATIN_EXTENDED_B:
937 aAllSubsets.emplace_back( 0x0180, 0x024F, SvxResId(RID_SUBSETSTR_LATIN_EXTENDED_B) );
938 break;
939 case UBLOCK_IPA_EXTENSIONS:
940 aAllSubsets.emplace_back( 0x0250, 0x02AF, SvxResId(RID_SUBSETSTR_IPA_EXTENSIONS) );
941 break;
942 case UBLOCK_SPACING_MODIFIER_LETTERS:
943 aAllSubsets.emplace_back( 0x02B0, 0x02FF, SvxResId(RID_SUBSETSTR_SPACING_MODIFIERS) );
944 break;
945 case UBLOCK_COMBINING_DIACRITICAL_MARKS:
946 aAllSubsets.emplace_back( 0x0300, 0x036F, SvxResId(RID_SUBSETSTR_COMB_DIACRITICAL) );
947 break;
948 case UBLOCK_GREEK:
949 aAllSubsets.emplace_back( 0x0370, 0x03FF, SvxResId(RID_SUBSETSTR_BASIC_GREEK) );
950 break;
951 case UBLOCK_CYRILLIC:
952 aAllSubsets.emplace_back( 0x0400, 0x04FF, SvxResId(RID_SUBSETSTR_CYRILLIC) );
953 break;
954 case UBLOCK_ARMENIAN:
955 aAllSubsets.emplace_back( 0x0530, 0x058F, SvxResId(RID_SUBSETSTR_ARMENIAN) );
956 break;
957 case UBLOCK_HEBREW:
958 aAllSubsets.emplace_back( 0x0590, 0x05FF, SvxResId(RID_SUBSETSTR_BASIC_HEBREW) );
959 break;
960 case UBLOCK_ARABIC:
961 aAllSubsets.emplace_back( 0x0600, 0x065F, SvxResId(RID_SUBSETSTR_BASIC_ARABIC) );
962 break;
963 case UBLOCK_SYRIAC:
964 aAllSubsets.emplace_back( 0x0700, 0x074F, SvxResId(RID_SUBSETSTR_SYRIAC) );
965 break;
966 case UBLOCK_THAANA:
967 aAllSubsets.emplace_back( 0x0780, 0x07BF, SvxResId(RID_SUBSETSTR_THAANA) );
968 break;
969 case UBLOCK_DEVANAGARI:
970 aAllSubsets.emplace_back( 0x0900, 0x097F, SvxResId(RID_SUBSETSTR_DEVANAGARI) );
971 break;
972 case UBLOCK_BENGALI:
973 aAllSubsets.emplace_back( 0x0980, 0x09FF, SvxResId(RID_SUBSETSTR_BENGALI) );
974 break;
975 case UBLOCK_GURMUKHI:
976 aAllSubsets.emplace_back( 0x0A00, 0x0A7F, SvxResId(RID_SUBSETSTR_GURMUKHI) );
977 break;
978 case UBLOCK_GUJARATI:
979 aAllSubsets.emplace_back( 0x0A80, 0x0AFF, SvxResId(RID_SUBSETSTR_GUJARATI) );
980 break;
981 case UBLOCK_ORIYA:
982 aAllSubsets.emplace_back( 0x0B00, 0x0B7F, SvxResId(RID_SUBSETSTR_ODIA) );
983 break;
984 case UBLOCK_TAMIL:
985 aAllSubsets.emplace_back( 0x0B80, 0x0BFF, SvxResId(RID_SUBSETSTR_TAMIL) );
986 break;
987 case UBLOCK_TELUGU:
988 aAllSubsets.emplace_back( 0x0C00, 0x0C7F, SvxResId(RID_SUBSETSTR_TELUGU) );
989 break;
990 case UBLOCK_KANNADA:
991 aAllSubsets.emplace_back( 0x0C80, 0x0CFF, SvxResId(RID_SUBSETSTR_KANNADA) );
992 break;
993 case UBLOCK_MALAYALAM:
994 aAllSubsets.emplace_back( 0x0D00, 0x0D7F, SvxResId(RID_SUBSETSTR_MALAYALAM) );
995 break;
996 case UBLOCK_SINHALA:
997 aAllSubsets.emplace_back( 0x0D80, 0x0DFF, SvxResId(RID_SUBSETSTR_SINHALA) );
998 break;
999 case UBLOCK_THAI:
1000 aAllSubsets.emplace_back( 0x0E00, 0x0E7F, SvxResId(RID_SUBSETSTR_THAI) );
1001 break;
1002 case UBLOCK_LAO:
1003 aAllSubsets.emplace_back( 0x0E80, 0x0EFF, SvxResId(RID_SUBSETSTR_LAO) );
1004 break;
1005 case UBLOCK_TIBETAN:
1006 aAllSubsets.emplace_back( 0x0F00, 0x0FBF, SvxResId(RID_SUBSETSTR_TIBETAN) );
1007 break;
1008 case UBLOCK_MYANMAR:
1009 aAllSubsets.emplace_back( 0x1000, 0x109F, SvxResId(RID_SUBSETSTR_MYANMAR) );
1010 break;
1011 case UBLOCK_GEORGIAN:
1012 aAllSubsets.emplace_back( 0x10A0, 0x10FF, SvxResId(RID_SUBSETSTR_BASIC_GEORGIAN) );
1013 break;
1014 case UBLOCK_HANGUL_JAMO:
1015 aAllSubsets.emplace_back( 0x1100, 0x11FF, SvxResId(RID_SUBSETSTR_HANGUL_JAMO) );
1016 break;
1017 case UBLOCK_ETHIOPIC:
1018 aAllSubsets.emplace_back( 0x1200, 0x137F, SvxResId(RID_SUBSETSTR_ETHIOPIC) );
1019 break;
1020 case UBLOCK_CHEROKEE:
1021 aAllSubsets.emplace_back( 0x13A0, 0x13FF, SvxResId(RID_SUBSETSTR_CHEROKEE) );
1022 break;
1023 case UBLOCK_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS:
1024 aAllSubsets.emplace_back( 0x1400, 0x167F, SvxResId(RID_SUBSETSTR_CANADIAN_ABORIGINAL) );
1025 break;
1026 case UBLOCK_OGHAM:
1027 aAllSubsets.emplace_back( 0x1680, 0x169F, SvxResId(RID_SUBSETSTR_OGHAM) );
1028 break;
1029 case UBLOCK_RUNIC:
1030 aAllSubsets.emplace_back( 0x16A0, 0x16F0, SvxResId(RID_SUBSETSTR_RUNIC) );
1031 break;
1032 case UBLOCK_KHMER:
1033 aAllSubsets.emplace_back( 0x1780, 0x17FF, SvxResId(RID_SUBSETSTR_KHMER) );
1034 break;
1035 case UBLOCK_MONGOLIAN:
1036 aAllSubsets.emplace_back( 0x1800, 0x18AF, SvxResId(RID_SUBSETSTR_MONGOLIAN) );
1037 break;
1038 case UBLOCK_LATIN_EXTENDED_ADDITIONAL:
1039 aAllSubsets.emplace_back( 0x1E00, 0x1EFF, SvxResId(RID_SUBSETSTR_LATIN_EXTENDED_ADDS) );
1040 break;
1041 case UBLOCK_GREEK_EXTENDED:
1042 aAllSubsets.emplace_back( 0x1F00, 0x1FFF, SvxResId(RID_SUBSETSTR_GREEK_EXTENDED) );
1043 break;
1044 case UBLOCK_GENERAL_PUNCTUATION:
1045 aAllSubsets.emplace_back( 0x2000, 0x206F, SvxResId(RID_SUBSETSTR_GENERAL_PUNCTUATION) );
1046 break;
1047 case UBLOCK_SUPERSCRIPTS_AND_SUBSCRIPTS:
1048 aAllSubsets.emplace_back( 0x2070, 0x209F, SvxResId(RID_SUBSETSTR_SUB_SUPER_SCRIPTS) );
1049 break;
1050 case UBLOCK_CURRENCY_SYMBOLS:
1051 aAllSubsets.emplace_back( 0x20A0, 0x20CF, SvxResId(RID_SUBSETSTR_CURRENCY_SYMBOLS) );
1052 break;
1053 case UBLOCK_COMBINING_MARKS_FOR_SYMBOLS:
1054 aAllSubsets.emplace_back( 0x20D0, 0x20FF, SvxResId(RID_SUBSETSTR_COMB_DIACRITIC_SYMS) );
1055 break;
1056 case UBLOCK_LETTERLIKE_SYMBOLS:
1057 aAllSubsets.emplace_back( 0x2100, 0x214F, SvxResId(RID_SUBSETSTR_LETTERLIKE_SYMBOLS) );
1058 break;
1059 case UBLOCK_NUMBER_FORMS:
1060 aAllSubsets.emplace_back( 0x2150, 0x218F, SvxResId(RID_SUBSETSTR_NUMBER_FORMS) );
1061 break;
1062 case UBLOCK_ARROWS:
1063 aAllSubsets.emplace_back( 0x2190, 0x21FF, SvxResId(RID_SUBSETSTR_ARROWS) );
1064 break;
1065 case UBLOCK_MATHEMATICAL_OPERATORS:
1066 aAllSubsets.emplace_back( 0x2200, 0x22FF, SvxResId(RID_SUBSETSTR_MATH_OPERATORS) );
1067 break;
1068 case UBLOCK_MISCELLANEOUS_TECHNICAL:
1069 aAllSubsets.emplace_back( 0x2300, 0x23FF, SvxResId(RID_SUBSETSTR_MISC_TECHNICAL) );
1070 break;
1071 case UBLOCK_CONTROL_PICTURES:
1072 aAllSubsets.emplace_back( 0x2400, 0x243F, SvxResId(RID_SUBSETSTR_CONTROL_PICTURES) );
1073 break;
1074 case UBLOCK_OPTICAL_CHARACTER_RECOGNITION:
1075 aAllSubsets.emplace_back( 0x2440, 0x245F, SvxResId(RID_SUBSETSTR_OPTICAL_CHAR_REC) );
1076 break;
1077 case UBLOCK_ENCLOSED_ALPHANUMERICS:
1078 aAllSubsets.emplace_back( 0x2460, 0x24FF, SvxResId(RID_SUBSETSTR_ENCLOSED_ALPHANUM) );
1079 break;
1080 case UBLOCK_BOX_DRAWING:
1081 aAllSubsets.emplace_back( 0x2500, 0x257F, SvxResId(RID_SUBSETSTR_BOX_DRAWING) );
1082 break;
1083 case UBLOCK_BLOCK_ELEMENTS:
1084 aAllSubsets.emplace_back( 0x2580, 0x259F, SvxResId(RID_SUBSETSTR_BLOCK_ELEMENTS) );
1085 break;
1086 case UBLOCK_GEOMETRIC_SHAPES:
1087 aAllSubsets.emplace_back( 0x25A0, 0x25FF, SvxResId(RID_SUBSETSTR_GEOMETRIC_SHAPES) );
1088 break;
1089 case UBLOCK_MISCELLANEOUS_SYMBOLS:
1090 aAllSubsets.emplace_back( 0x2600, 0x26FF, SvxResId(RID_SUBSETSTR_MISC_DINGBATS) );
1091 break;
1092 case UBLOCK_DINGBATS:
1093 aAllSubsets.emplace_back( 0x2700, 0x27BF, SvxResId(RID_SUBSETSTR_DINGBATS) );
1094 break;
1095 case UBLOCK_BRAILLE_PATTERNS:
1096 aAllSubsets.emplace_back( 0x2800, 0x28FF, SvxResId(RID_SUBSETSTR_BRAILLE_PATTERNS) );
1097 break;
1098 case UBLOCK_CJK_RADICALS_SUPPLEMENT:
1099 aAllSubsets.emplace_back( 0x2E80, 0x2EFF, SvxResId(RID_SUBSETSTR_CJK_RADICAL_SUPPL) );
1100 break;
1101 case UBLOCK_KANGXI_RADICALS:
1102 aAllSubsets.emplace_back( 0x2F00, 0x2FDF, SvxResId(RID_SUBSETSTR_KANGXI_RADICALS) );
1103 break;
1104 case UBLOCK_IDEOGRAPHIC_DESCRIPTION_CHARACTERS:
1105 aAllSubsets.emplace_back( 0x2FF0, 0x2FFF, SvxResId(RID_SUBSETSTR_IDEO_DESC_CHARS) );
1106 break;
1107 case UBLOCK_CJK_SYMBOLS_AND_PUNCTUATION:
1108 aAllSubsets.emplace_back( 0x3000, 0x303F, SvxResId(RID_SUBSETSTR_CJK_SYMS_PUNCTUATION) );
1109 break;
1110 case UBLOCK_HIRAGANA:
1111 aAllSubsets.emplace_back( 0x3040, 0x309F, SvxResId(RID_SUBSETSTR_HIRAGANA) );
1112 break;
1113 case UBLOCK_KATAKANA:
1114 aAllSubsets.emplace_back( 0x30A0, 0x30FF, SvxResId(RID_SUBSETSTR_KATAKANA) );
1115 break;
1116 case UBLOCK_BOPOMOFO:
1117 aAllSubsets.emplace_back( 0x3100, 0x312F, SvxResId(RID_SUBSETSTR_BOPOMOFO) );
1118 break;
1119 case UBLOCK_HANGUL_COMPATIBILITY_JAMO:
1120 aAllSubsets.emplace_back( 0x3130, 0x318F, SvxResId(RID_SUBSETSTR_HANGUL_COMPAT_JAMO) );
1121 break;
1122 case UBLOCK_KANBUN:
1123 aAllSubsets.emplace_back( 0x3190, 0x319F, SvxResId(RID_SUBSETSTR_KANBUN) );
1124 break;
1125 case UBLOCK_BOPOMOFO_EXTENDED:
1126 aAllSubsets.emplace_back( 0x31A0, 0x31BF, SvxResId(RID_SUBSETSTR_BOPOMOFO_EXTENDED) );
1127 break;
1128 case UBLOCK_ENCLOSED_CJK_LETTERS_AND_MONTHS:
1129 aAllSubsets.emplace_back( 0x3200, 0x32FF, SvxResId(RID_SUBSETSTR_ENCLOSED_CJK_LETTERS) );
1130 break;
1131 case UBLOCK_CJK_COMPATIBILITY:
1132 aAllSubsets.emplace_back( 0x3300, 0x33FF, SvxResId(RID_SUBSETSTR_CJK_COMPATIBILITY) );
1133 break;
1134 case UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A:
1135 aAllSubsets.emplace_back( 0x3400, 0x4DBF, SvxResId(RID_SUBSETSTR_CJK_EXT_A_UNIFIED_IDGRAPH) );
1136 break;
1137 case UBLOCK_CJK_UNIFIED_IDEOGRAPHS:
1138 aAllSubsets.emplace_back( 0x4E00, 0x9FA5, SvxResId(RID_SUBSETSTR_CJK_UNIFIED_IDGRAPH) );
1139 break;
1140 case UBLOCK_YI_SYLLABLES:
1141 aAllSubsets.emplace_back( 0xA000, 0xA48F, SvxResId(RID_SUBSETSTR_YI_SYLLABLES) );
1142 break;
1143 case UBLOCK_YI_RADICALS:
1144 aAllSubsets.emplace_back( 0xA490, 0xA4CF, SvxResId(RID_SUBSETSTR_YI_RADICALS) );
1145 break;
1146 case UBLOCK_HANGUL_SYLLABLES:
1147 aAllSubsets.emplace_back( 0xAC00, 0xD7AF, SvxResId(RID_SUBSETSTR_HANGUL) );
1148 break;
1149 case UBLOCK_PRIVATE_USE_AREA:
1150 aAllSubsets.emplace_back( 0xE000, 0xF8FF, SvxResId(RID_SUBSETSTR_PRIVATE_USE_AREA) );
1151 break;
1152 case UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS:
1153 aAllSubsets.emplace_back( 0xF900, 0xFAFF, SvxResId(RID_SUBSETSTR_CJK_COMPAT_IDGRAPHS) );
1154 break;
1155 case UBLOCK_ALPHABETIC_PRESENTATION_FORMS:
1156 aAllSubsets.emplace_back( 0xFB00, 0xFB4F, SvxResId(RID_SUBSETSTR_ALPHA_PRESENTATION) );
1157 break;
1158 case UBLOCK_ARABIC_PRESENTATION_FORMS_A:
1159 aAllSubsets.emplace_back( 0xFB50, 0xFDFF, SvxResId(RID_SUBSETSTR_ARABIC_PRESENT_A) );
1160 break;
1161 case UBLOCK_COMBINING_HALF_MARKS:
1162 aAllSubsets.emplace_back( 0xFE20, 0xFE2F, SvxResId(RID_SUBSETSTR_COMBINING_HALF_MARKS) );
1163 break;
1164 case UBLOCK_CJK_COMPATIBILITY_FORMS:
1165 aAllSubsets.emplace_back( 0xFE30, 0xFE4F, SvxResId(RID_SUBSETSTR_CJK_COMPAT_FORMS) );
1166 break;
1167 case UBLOCK_SMALL_FORM_VARIANTS:
1168 aAllSubsets.emplace_back( 0xFE50, 0xFE6F, SvxResId(RID_SUBSETSTR_SMALL_FORM_VARIANTS) );
1169 break;
1170 case UBLOCK_ARABIC_PRESENTATION_FORMS_B:
1171 aAllSubsets.emplace_back( 0xFE70, 0xFEFF, SvxResId(RID_SUBSETSTR_ARABIC_PRESENT_B) );
1172 break;
1173 case UBLOCK_SPECIALS:
1174 aAllSubsets.emplace_back( 0xFFF0, 0xFFFF, SvxResId(RID_SUBSETSTR_SPECIALS) );
1175 break;
1176 case UBLOCK_HALFWIDTH_AND_FULLWIDTH_FORMS:
1177 aAllSubsets.emplace_back( 0xFF00, 0xFFEF, SvxResId(RID_SUBSETSTR_HALFW_FULLW_FORMS) );
1178 break;
1179 case UBLOCK_OLD_ITALIC:
1180 aAllSubsets.emplace_back( 0x10300, 0x1032F, SvxResId(RID_SUBSETSTR_OLD_ITALIC) );
1181 break;
1182 case UBLOCK_GOTHIC:
1183 aAllSubsets.emplace_back( 0x10330, 0x1034F, SvxResId(RID_SUBSETSTR_GOTHIC) );
1184 break;
1185 case UBLOCK_DESERET:
1186 aAllSubsets.emplace_back( 0x10400, 0x1044F, SvxResId(RID_SUBSETSTR_DESERET) );
1187 break;
1188 case UBLOCK_BYZANTINE_MUSICAL_SYMBOLS:
1189 aAllSubsets.emplace_back( 0x1D000, 0x1D0FF, SvxResId(RID_SUBSETSTR_BYZANTINE_MUSICAL_SYMBOLS) );
1190 break;
1191 case UBLOCK_MUSICAL_SYMBOLS:
1192 aAllSubsets.emplace_back( 0x1D100, 0x1D1FF, SvxResId(RID_SUBSETSTR_MUSICAL_SYMBOLS) );
1193 break;
1194 case UBLOCK_MATHEMATICAL_ALPHANUMERIC_SYMBOLS:
1195 aAllSubsets.emplace_back( 0x1D400, 0x1D7FF, SvxResId(RID_SUBSETSTR_MATHEMATICAL_ALPHANUMERIC_SYMBOLS) );
1196 break;
1197 case UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B:
1198 aAllSubsets.emplace_back( 0x20000, 0x2A6DF, SvxResId(RID_SUBSETSTR_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B) );
1199 break;
1200 case UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT:
1201 aAllSubsets.emplace_back( 0x2F800, 0x2FA1F, SvxResId(RID_SUBSETSTR_CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT) );
1202 break;
1203 case UBLOCK_TAGS:
1204 aAllSubsets.emplace_back( 0xE0000, 0xE007F, SvxResId(RID_SUBSETSTR_TAGS) );
1205 break;
1206 case UBLOCK_CYRILLIC_SUPPLEMENTARY:
1207 aAllSubsets.emplace_back( 0x0500, 0x052F, SvxResId(RID_SUBSETSTR_CYRILLIC_SUPPLEMENTARY) );
1208 break;
1209 case UBLOCK_TAGALOG:
1210 aAllSubsets.emplace_back( 0x1700, 0x171F, SvxResId(RID_SUBSETSTR_TAGALOG) );
1211 break;
1212 case UBLOCK_HANUNOO:
1213 aAllSubsets.emplace_back( 0x1720, 0x173F, SvxResId(RID_SUBSETSTR_HANUNOO) );
1214 break;
1215 case UBLOCK_BUHID:
1216 aAllSubsets.emplace_back( 0x1740, 0x175F, SvxResId(RID_SUBSETSTR_BUHID) );
1217 break;
1218 case UBLOCK_TAGBANWA:
1219 aAllSubsets.emplace_back( 0x1760, 0x177F, SvxResId(RID_SUBSETSTR_TAGBANWA) );
1220 break;
1221 case UBLOCK_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A:
1222 aAllSubsets.emplace_back( 0x27C0, 0x27EF, SvxResId(RID_SUBSETSTR_MISC_MATH_SYMS_A) );
1223 break;
1224 case UBLOCK_SUPPLEMENTAL_ARROWS_A:
1225 aAllSubsets.emplace_back( 0x27F0, 0x27FF, SvxResId(RID_SUBSETSTR_SUPPL_ARROWS_A) );
1226 break;
1227 case UBLOCK_SUPPLEMENTAL_ARROWS_B:
1228 aAllSubsets.emplace_back( 0x2900, 0x297F, SvxResId(RID_SUBSETSTR_SUPPL_ARROWS_B) );
1229 break;
1230 case UBLOCK_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B:
1231 aAllSubsets.emplace_back( 0x2980, 0x29FF, SvxResId(RID_SUBSETSTR_MISC_MATH_SYMS_B) );
1232 break;
1233 case UBLOCK_SUPPLEMENTAL_MATHEMATICAL_OPERATORS:
1234 aAllSubsets.emplace_back( 0x2A00, 0x2AFF, SvxResId(RID_SUBSETSTR_MISC_MATH_SYMS_B) );
1235 break;
1236 case UBLOCK_KATAKANA_PHONETIC_EXTENSIONS:
1237 aAllSubsets.emplace_back( 0x31F0, 0x31FF, SvxResId(RID_SUBSETSTR_KATAKANA_PHONETIC) );
1238 break;
1239 case UBLOCK_VARIATION_SELECTORS:
1240 aAllSubsets.emplace_back( 0xFE00, 0xFE0F, SvxResId(RID_SUBSETSTR_VARIATION_SELECTORS) );
1241 break;
1242 case UBLOCK_SUPPLEMENTARY_PRIVATE_USE_AREA_A:
1243 aAllSubsets.emplace_back( 0xF0000, 0xFFFFF, SvxResId(RID_SUBSETSTR_SUPPLEMENTARY_PRIVATE_USE_AREA_A) );
1244 break;
1245 case UBLOCK_SUPPLEMENTARY_PRIVATE_USE_AREA_B:
1246 aAllSubsets.emplace_back( 0x100000, 0x10FFFF, SvxResId(RID_SUBSETSTR_SUPPLEMENTARY_PRIVATE_USE_AREA_B) );
1247 break;
1248 case UBLOCK_LIMBU:
1249 aAllSubsets.emplace_back( 0x1900, 0x194F, SvxResId(RID_SUBSETSTR_LIMBU) );
1250 break;
1251 case UBLOCK_TAI_LE:
1252 aAllSubsets.emplace_back( 0x1950, 0x197F, SvxResId(RID_SUBSETSTR_TAI_LE) );
1253 break;
1254 case UBLOCK_KHMER_SYMBOLS:
1255 aAllSubsets.emplace_back( 0x19E0, 0x19FF, SvxResId(RID_SUBSETSTR_KHMER_SYMBOLS) );
1256 break;
1257 case UBLOCK_PHONETIC_EXTENSIONS:
1258 aAllSubsets.emplace_back( 0x1D00, 0x1D7F, SvxResId(RID_SUBSETSTR_PHONETIC_EXTENSIONS) );
1259 break;
1260 case UBLOCK_MISCELLANEOUS_SYMBOLS_AND_ARROWS:
1261 aAllSubsets.emplace_back( 0x2B00, 0x2BFF, SvxResId(RID_SUBSETSTR_MISCELLANEOUS_SYMBOLS_AND_ARROWS) );
1262 break;
1263 case UBLOCK_YIJING_HEXAGRAM_SYMBOLS:
1264 aAllSubsets.emplace_back( 0x4DC0, 0x4DFF, SvxResId(RID_SUBSETSTR_YIJING_HEXAGRAM_SYMBOLS) );
1265 break;
1266 case UBLOCK_LINEAR_B_SYLLABARY:
1267 aAllSubsets.emplace_back( 0x10000, 0x1007F, SvxResId(RID_SUBSETSTR_LINEAR_B_SYLLABARY) );
1268 break;
1269 case UBLOCK_LINEAR_B_IDEOGRAMS:
1270 aAllSubsets.emplace_back( 0x10080, 0x100FF, SvxResId(RID_SUBSETSTR_LINEAR_B_IDEOGRAMS) );
1271 break;
1272 case UBLOCK_AEGEAN_NUMBERS:
1273 aAllSubsets.emplace_back( 0x10100, 0x1013F, SvxResId(RID_SUBSETSTR_AEGEAN_NUMBERS) );
1274 break;
1275 case UBLOCK_UGARITIC:
1276 aAllSubsets.emplace_back( 0x10380, 0x1039F, SvxResId(RID_SUBSETSTR_UGARITIC) );
1277 break;
1278 case UBLOCK_SHAVIAN:
1279 aAllSubsets.emplace_back( 0x10450, 0x1047F, SvxResId(RID_SUBSETSTR_SHAVIAN) );
1280 break;
1281 case UBLOCK_OSMANYA:
1282 aAllSubsets.emplace_back( 0x10480, 0x104AF, SvxResId(RID_SUBSETSTR_OSMANYA) );
1283 break;
1284 case UBLOCK_CYPRIOT_SYLLABARY:
1285 aAllSubsets.emplace_back( 0x10800, 0x1083F, SvxResId(RID_SUBSETSTR_CYPRIOT_SYLLABARY) );
1286 break;
1287 case UBLOCK_TAI_XUAN_JING_SYMBOLS:
1288 aAllSubsets.emplace_back( 0x1D300, 0x1D35F, SvxResId(RID_SUBSETSTR_TAI_XUAN_JING_SYMBOLS) );
1289 break;
1290 case UBLOCK_VARIATION_SELECTORS_SUPPLEMENT:
1291 aAllSubsets.emplace_back( 0xE0100, 0xE01EF, SvxResId(RID_SUBSETSTR_VARIATION_SELECTORS_SUPPLEMENT) );
1292 break;
1293 case UBLOCK_ANCIENT_GREEK_MUSICAL_NOTATION:
1294 aAllSubsets.emplace_back(0x1D200, 0x1D24F, SvxResId(RID_SUBSETSTR_ANCIENT_GREEK_MUSICAL_NOTATION) );
1295 break;
1296 case UBLOCK_ANCIENT_GREEK_NUMBERS:
1297 aAllSubsets.emplace_back(0x10140, 0x1018F , SvxResId(RID_SUBSETSTR_ANCIENT_GREEK_NUMBERS) );
1298 break;
1299 case UBLOCK_ARABIC_SUPPLEMENT:
1300 aAllSubsets.emplace_back(0x0750, 0x077F , SvxResId(RID_SUBSETSTR_ARABIC_SUPPLEMENT) );
1301 break;
1302 case UBLOCK_BUGINESE:
1303 aAllSubsets.emplace_back(0x1A00, 0x1A1F , SvxResId(RID_SUBSETSTR_BUGINESE) );
1304 break;
1305 case UBLOCK_CJK_STROKES:
1306 aAllSubsets.emplace_back( 0x31C0, 0x31EF, SvxResId(RID_SUBSETSTR_CJK_STROKES) );
1307 break;
1308 case UBLOCK_COMBINING_DIACRITICAL_MARKS_SUPPLEMENT:
1309 aAllSubsets.emplace_back( 0x1DC0, 0x1DFF , SvxResId(RID_SUBSETSTR_COMBINING_DIACRITICAL_MARKS_SUPPLEMENT) );
1310 break;
1311 case UBLOCK_COPTIC:
1312 aAllSubsets.emplace_back( 0x2C80, 0x2CFF , SvxResId(RID_SUBSETSTR_COPTIC) );
1313 break;
1314 case UBLOCK_ETHIOPIC_EXTENDED:
1315 aAllSubsets.emplace_back( 0x2D80, 0x2DDF , SvxResId(RID_SUBSETSTR_ETHIOPIC_EXTENDED) );
1316 break;
1317 case UBLOCK_ETHIOPIC_SUPPLEMENT:
1318 aAllSubsets.emplace_back( 0x1380, 0x139F, SvxResId(RID_SUBSETSTR_ETHIOPIC_SUPPLEMENT) );
1319 break;
1320 case UBLOCK_GEORGIAN_SUPPLEMENT:
1321 aAllSubsets.emplace_back( 0x2D00, 0x2D2F, SvxResId(RID_SUBSETSTR_GEORGIAN_SUPPLEMENT) );
1322 break;
1323 case UBLOCK_GLAGOLITIC:
1324 aAllSubsets.emplace_back( 0x2C00, 0x2C5F, SvxResId(RID_SUBSETSTR_GLAGOLITIC) );
1325 break;
1326 case UBLOCK_KHAROSHTHI:
1327 aAllSubsets.emplace_back( 0x10A00, 0x10A5F, SvxResId(RID_SUBSETSTR_KHAROSHTHI) );
1328 break;
1329 case UBLOCK_MODIFIER_TONE_LETTERS:
1330 aAllSubsets.emplace_back( 0xA700, 0xA71F, SvxResId(RID_SUBSETSTR_MODIFIER_TONE_LETTERS) );
1331 break;
1332 case UBLOCK_NEW_TAI_LUE:
1333 aAllSubsets.emplace_back( 0x1980, 0x19DF, SvxResId(RID_SUBSETSTR_NEW_TAI_LUE) );
1334 break;
1335 case UBLOCK_OLD_PERSIAN:
1336 aAllSubsets.emplace_back( 0x103A0, 0x103DF, SvxResId(RID_SUBSETSTR_OLD_PERSIAN) );
1337 break;
1338 case UBLOCK_PHONETIC_EXTENSIONS_SUPPLEMENT:
1339 aAllSubsets.emplace_back( 0x1D80, 0x1DBF, SvxResId(RID_SUBSETSTR_PHONETIC_EXTENSIONS_SUPPLEMENT) );
1340 break;
1341 case UBLOCK_SUPPLEMENTAL_PUNCTUATION:
1342 aAllSubsets.emplace_back( 0x2E00, 0x2E7F, SvxResId(RID_SUBSETSTR_SUPPLEMENTAL_PUNCTUATION) );
1343 break;
1344 case UBLOCK_SYLOTI_NAGRI:
1345 aAllSubsets.emplace_back( 0xA800, 0xA82F, SvxResId(RID_SUBSETSTR_SYLOTI_NAGRI) );
1346 break;
1347 case UBLOCK_TIFINAGH:
1348 aAllSubsets.emplace_back( 0x2D30, 0x2D7F, SvxResId(RID_SUBSETSTR_TIFINAGH) );
1349 break;
1350 case UBLOCK_VERTICAL_FORMS:
1351 aAllSubsets.emplace_back( 0xFE10, 0xFE1F, SvxResId(RID_SUBSETSTR_VERTICAL_FORMS) );
1352 break;
1353 case UBLOCK_NKO:
1354 aAllSubsets.emplace_back( 0x07C0, 0x07FF, SvxResId(RID_SUBSETSTR_NKO) );
1355 break;
1356 case UBLOCK_BALINESE:
1357 aAllSubsets.emplace_back( 0x1B00, 0x1B7F, SvxResId(RID_SUBSETSTR_BALINESE) );
1358 break;
1359 case UBLOCK_LATIN_EXTENDED_C:
1360 aAllSubsets.emplace_back( 0x2C60, 0x2C7F, SvxResId(RID_SUBSETSTR_LATIN_EXTENDED_C) );
1361 break;
1362 case UBLOCK_LATIN_EXTENDED_D:
1363 aAllSubsets.emplace_back( 0xA720, 0xA7FF, SvxResId(RID_SUBSETSTR_LATIN_EXTENDED_D) );
1364 break;
1365 case UBLOCK_PHAGS_PA:
1366 aAllSubsets.emplace_back( 0xA840, 0xA87F, SvxResId(RID_SUBSETSTR_PHAGS_PA) );
1367 break;
1368 case UBLOCK_PHOENICIAN:
1369 aAllSubsets.emplace_back( 0x10900, 0x1091F, SvxResId(RID_SUBSETSTR_PHOENICIAN) );
1370 break;
1371 case UBLOCK_CUNEIFORM:
1372 aAllSubsets.emplace_back( 0x12000, 0x123FF, SvxResId(RID_SUBSETSTR_CUNEIFORM) );
1373 break;
1374 case UBLOCK_CUNEIFORM_NUMBERS_AND_PUNCTUATION:
1375 aAllSubsets.emplace_back( 0x12400, 0x1247F, SvxResId(RID_SUBSETSTR_CUNEIFORM_NUMBERS_AND_PUNCTUATION) );
1376 break;
1377 case UBLOCK_COUNTING_ROD_NUMERALS:
1378 aAllSubsets.emplace_back( 0x1D360, 0x1D37F, SvxResId(RID_SUBSETSTR_COUNTING_ROD_NUMERALS) );
1379 break;
1380 case UBLOCK_SUNDANESE:
1381 aAllSubsets.emplace_back( 0x1B80, 0x1BBF, SvxResId(RID_SUBSETSTR_SUNDANESE) );
1382 break;
1383 case UBLOCK_LEPCHA:
1384 aAllSubsets.emplace_back( 0x1C00, 0x1C4F, SvxResId(RID_SUBSETSTR_LEPCHA) );
1385 break;
1386 case UBLOCK_OL_CHIKI:
1387 aAllSubsets.emplace_back( 0x1C50, 0x1C7F, SvxResId(RID_SUBSETSTR_OL_CHIKI) );
1388 break;
1389 case UBLOCK_CYRILLIC_EXTENDED_A:
1390 aAllSubsets.emplace_back( 0x2DE0, 0x2DFF, SvxResId(RID_SUBSETSTR_CYRILLIC_EXTENDED_A) );
1391 break;
1392 case UBLOCK_VAI:
1393 aAllSubsets.emplace_back( 0xA500, 0xA63F, SvxResId(RID_SUBSETSTR_VAI) );
1394 break;
1395 case UBLOCK_CYRILLIC_EXTENDED_B:
1396 aAllSubsets.emplace_back( 0xA640, 0xA69F, SvxResId(RID_SUBSETSTR_CYRILLIC_EXTENDED_B) );
1397 break;
1398 case UBLOCK_SAURASHTRA:
1399 aAllSubsets.emplace_back( 0xA880, 0xA8DF, SvxResId(RID_SUBSETSTR_SAURASHTRA) );
1400 break;
1401 case UBLOCK_KAYAH_LI:
1402 aAllSubsets.emplace_back( 0xA900, 0xA92F, SvxResId(RID_SUBSETSTR_KAYAH_LI) );
1403 break;
1404 case UBLOCK_REJANG:
1405 aAllSubsets.emplace_back( 0xA930, 0xA95F, SvxResId(RID_SUBSETSTR_REJANG) );
1406 break;
1407 case UBLOCK_CHAM:
1408 aAllSubsets.emplace_back( 0xAA00, 0xAA5F, SvxResId(RID_SUBSETSTR_CHAM) );
1409 break;
1410 case UBLOCK_ANCIENT_SYMBOLS:
1411 aAllSubsets.emplace_back( 0x10190, 0x101CF, SvxResId(RID_SUBSETSTR_ANCIENT_SYMBOLS) );
1412 break;
1413 case UBLOCK_PHAISTOS_DISC:
1414 aAllSubsets.emplace_back( 0x101D0, 0x101FF, SvxResId(RID_SUBSETSTR_PHAISTOS_DISC) );
1415 break;
1416 case UBLOCK_LYCIAN:
1417 aAllSubsets.emplace_back( 0x10280, 0x1029F, SvxResId(RID_SUBSETSTR_LYCIAN) );
1418 break;
1419 case UBLOCK_CARIAN:
1420 aAllSubsets.emplace_back( 0x102A0, 0x102DF, SvxResId(RID_SUBSETSTR_CARIAN) );
1421 break;
1422 case UBLOCK_LYDIAN:
1423 aAllSubsets.emplace_back( 0x10920, 0x1093F, SvxResId(RID_SUBSETSTR_LYDIAN) );
1424 break;
1425 case UBLOCK_MAHJONG_TILES:
1426 aAllSubsets.emplace_back( 0x1F000, 0x1F02F, SvxResId(RID_SUBSETSTR_MAHJONG_TILES) );
1427 break;
1428 case UBLOCK_DOMINO_TILES:
1429 aAllSubsets.emplace_back( 0x1F030, 0x1F09F, SvxResId(RID_SUBSETSTR_DOMINO_TILES) );
1430 break;
1431 case UBLOCK_SAMARITAN:
1432 aAllSubsets.emplace_back( 0x0800, 0x083F, SvxResId(RID_SUBSETSTR_SAMARITAN) );
1433 break;
1434 case UBLOCK_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_EXTENDED:
1435 aAllSubsets.emplace_back( 0x18B0, 0x18FF, SvxResId(RID_SUBSETSTR_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_EXTENDED) );
1436 break;
1437 case UBLOCK_TAI_THAM:
1438 aAllSubsets.emplace_back( 0x1A20, 0x1AAF, SvxResId(RID_SUBSETSTR_TAI_THAM) );
1439 break;
1440 case UBLOCK_VEDIC_EXTENSIONS:
1441 aAllSubsets.emplace_back( 0x1CD0, 0x1CFF, SvxResId(RID_SUBSETSTR_VEDIC_EXTENSIONS) );
1442 break;
1443 case UBLOCK_LISU:
1444 aAllSubsets.emplace_back( 0xA4D0, 0xA4FF, SvxResId(RID_SUBSETSTR_LISU) );
1445 break;
1446 case UBLOCK_BAMUM:
1447 aAllSubsets.emplace_back( 0xA6A0, 0xA6FF, SvxResId(RID_SUBSETSTR_BAMUM) );
1448 break;
1449 case UBLOCK_COMMON_INDIC_NUMBER_FORMS:
1450 aAllSubsets.emplace_back( 0xA830, 0xA83F, SvxResId(RID_SUBSETSTR_COMMON_INDIC_NUMBER_FORMS) );
1451 break;
1452 case UBLOCK_DEVANAGARI_EXTENDED:
1453 aAllSubsets.emplace_back( 0xA8E0, 0xA8FF, SvxResId(RID_SUBSETSTR_DEVANAGARI_EXTENDED) );
1454 break;
1455 case UBLOCK_HANGUL_JAMO_EXTENDED_A:
1456 aAllSubsets.emplace_back( 0xA960, 0xA97F, SvxResId(RID_SUBSETSTR_HANGUL_JAMO_EXTENDED_A) );
1457 break;
1458 case UBLOCK_JAVANESE:
1459 aAllSubsets.emplace_back( 0xA980, 0xA9DF, SvxResId(RID_SUBSETSTR_JAVANESE) );
1460 break;
1461 case UBLOCK_MYANMAR_EXTENDED_A:
1462 aAllSubsets.emplace_back( 0xAA60, 0xAA7F, SvxResId(RID_SUBSETSTR_MYANMAR_EXTENDED_A) );
1463 break;
1464 case UBLOCK_TAI_VIET:
1465 aAllSubsets.emplace_back( 0xAA80, 0xAADF, SvxResId(RID_SUBSETSTR_TAI_VIET) );
1466 break;
1467 case UBLOCK_MEETEI_MAYEK:
1468 aAllSubsets.emplace_back( 0xABC0, 0xABFF, SvxResId(RID_SUBSETSTR_MEETEI_MAYEK) );
1469 break;
1470 case UBLOCK_HANGUL_JAMO_EXTENDED_B:
1471 aAllSubsets.emplace_back( 0xD7B0, 0xD7FF, SvxResId(RID_SUBSETSTR_HANGUL_JAMO_EXTENDED_B) );
1472 break;
1473 case UBLOCK_IMPERIAL_ARAMAIC:
1474 aAllSubsets.emplace_back( 0x10840, 0x1085F, SvxResId(RID_SUBSETSTR_IMPERIAL_ARAMAIC) );
1475 break;
1476 case UBLOCK_OLD_SOUTH_ARABIAN:
1477 aAllSubsets.emplace_back( 0x10A60, 0x10A7F, SvxResId(RID_SUBSETSTR_OLD_SOUTH_ARABIAN) );
1478 break;
1479 case UBLOCK_AVESTAN:
1480 aAllSubsets.emplace_back( 0x10B00, 0x10B3F, SvxResId(RID_SUBSETSTR_AVESTAN) );
1481 break;
1482 case UBLOCK_INSCRIPTIONAL_PARTHIAN:
1483 aAllSubsets.emplace_back( 0x10B40, 0x10B5F, SvxResId(RID_SUBSETSTR_INSCRIPTIONAL_PARTHIAN) );
1484 break;
1485 case UBLOCK_INSCRIPTIONAL_PAHLAVI:
1486 aAllSubsets.emplace_back( 0x10B60, 0x10B7F, SvxResId(RID_SUBSETSTR_INSCRIPTIONAL_PAHLAVI) );
1487 break;
1488 case UBLOCK_OLD_TURKIC:
1489 aAllSubsets.emplace_back( 0x10C00, 0x10C4F, SvxResId(RID_SUBSETSTR_OLD_TURKIC) );
1490 break;
1491 case UBLOCK_RUMI_NUMERAL_SYMBOLS:
1492 aAllSubsets.emplace_back( 0x10E60, 0x10E7F, SvxResId(RID_SUBSETSTR_RUMI_NUMERAL_SYMBOLS) );
1493 break;
1494 case UBLOCK_KAITHI:
1495 aAllSubsets.emplace_back( 0x11080, 0x110CF, SvxResId(RID_SUBSETSTR_KAITHI) );
1496 break;
1497 case UBLOCK_EGYPTIAN_HIEROGLYPHS:
1498 aAllSubsets.emplace_back( 0x13000, 0x1342F, SvxResId(RID_SUBSETSTR_EGYPTIAN_HIEROGLYPHS) );
1499 break;
1500 case UBLOCK_ENCLOSED_ALPHANUMERIC_SUPPLEMENT:
1501 aAllSubsets.emplace_back( 0x1F100, 0x1F1FF, SvxResId(RID_SUBSETSTR_ENCLOSED_ALPHANUMERIC_SUPPLEMENT) );
1502 break;
1503 case UBLOCK_ENCLOSED_IDEOGRAPHIC_SUPPLEMENT:
1504 aAllSubsets.emplace_back( 0x1F200, 0x1F2FF, SvxResId(RID_SUBSETSTR_ENCLOSED_IDEOGRAPHIC_SUPPLEMENT) );
1505 break;
1506 case UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_C:
1507 aAllSubsets.emplace_back( 0x2A700, 0x2B73F, SvxResId(RID_SUBSETSTR_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_C) );
1508 break;
1509 case UBLOCK_MANDAIC:
1510 aAllSubsets.emplace_back( 0x0840, 0x085F, SvxResId(RID_SUBSETSTR_MANDAIC) );
1511 break;
1512 case UBLOCK_BATAK:
1513 aAllSubsets.emplace_back( 0x1BC0, 0x1BFF, SvxResId(RID_SUBSETSTR_BATAK) );
1514 break;
1515 case UBLOCK_ETHIOPIC_EXTENDED_A:
1516 aAllSubsets.emplace_back( 0xAB00, 0xAB2F, SvxResId(RID_SUBSETSTR_ETHIOPIC_EXTENDED_A) );
1517 break;
1518 case UBLOCK_BRAHMI:
1519 aAllSubsets.emplace_back( 0x11000, 0x1107F, SvxResId(RID_SUBSETSTR_BRAHMI) );
1520 break;
1521 case UBLOCK_BAMUM_SUPPLEMENT:
1522 aAllSubsets.emplace_back( 0x16800, 0x16A3F, SvxResId(RID_SUBSETSTR_BAMUM_SUPPLEMENT) );
1523 break;
1524 case UBLOCK_KANA_SUPPLEMENT:
1525 aAllSubsets.emplace_back( 0x1B000, 0x1B0FF, SvxResId(RID_SUBSETSTR_KANA_SUPPLEMENT) );
1526 break;
1527 case UBLOCK_PLAYING_CARDS:
1528 aAllSubsets.emplace_back( 0x1F0A0, 0x1F0FF, SvxResId(RID_SUBSETSTR_PLAYING_CARDS) );
1529 break;
1530 case UBLOCK_MISCELLANEOUS_SYMBOLS_AND_PICTOGRAPHS:
1531 aAllSubsets.emplace_back( 0x1F300, 0x1F5FF, SvxResId(RID_SUBSETSTR_MISCELLANEOUS_SYMBOLS_AND_PICTOGRAPHS) );
1532 break;
1533 case UBLOCK_EMOTICONS:
1534 aAllSubsets.emplace_back( 0x1F600, 0x1F64F, SvxResId(RID_SUBSETSTR_EMOTICONS) );
1535 break;
1536 case UBLOCK_TRANSPORT_AND_MAP_SYMBOLS:
1537 aAllSubsets.emplace_back( 0x1F680, 0x1F6FF, SvxResId(RID_SUBSETSTR_TRANSPORT_AND_MAP_SYMBOLS) );
1538 break;
1539 case UBLOCK_ALCHEMICAL_SYMBOLS:
1540 aAllSubsets.emplace_back( 0x1F700, 0x1F77F, SvxResId(RID_SUBSETSTR_ALCHEMICAL_SYMBOLS) );
1541 break;
1542 case UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D:
1543 aAllSubsets.emplace_back( 0x2B740, 0x2B81F, SvxResId(RID_SUBSETSTR_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D) );
1544 break;
1545// Note ICU version 49 (NOT 4.9), so the MAJOR_NUM is two digits.
1546#if U_ICU_VERSION_MAJOR_NUM >= 49
1547 case UBLOCK_ARABIC_EXTENDED_A:
1548 aAllSubsets.emplace_back( 0x08A0, 0x08FF, SvxResId(RID_SUBSETSTR_ARABIC_EXTENDED_A) );
1549 break;
1550 case UBLOCK_ARABIC_MATHEMATICAL_ALPHABETIC_SYMBOLS:
1551 aAllSubsets.emplace_back( 0x1EE00, 0x1EEFF, SvxResId(RID_SUBSETSTR_ARABIC_MATHEMATICAL_ALPHABETIC_SYMBOLS) );
1552 break;
1553 case UBLOCK_CHAKMA:
1554 aAllSubsets.emplace_back( 0x11100, 0x1114F, SvxResId(RID_SUBSETSTR_CHAKMA) );
1555 break;
1556 case UBLOCK_MEETEI_MAYEK_EXTENSIONS:
1557 aAllSubsets.emplace_back( 0xAAE0, 0xAAFF, SvxResId(RID_SUBSETSTR_MEETEI_MAYEK_EXTENSIONS) );
1558 break;
1559 case UBLOCK_MEROITIC_CURSIVE:
1560 aAllSubsets.emplace_back( 0x109A0, 0x109FF, SvxResId(RID_SUBSETSTR_MEROITIC_CURSIVE) );
1561 break;
1562 case UBLOCK_MEROITIC_HIEROGLYPHS:
1563 aAllSubsets.emplace_back( 0x10980, 0x1099F, SvxResId(RID_SUBSETSTR_MEROITIC_HIEROGLYPHS) );
1564 break;
1565 case UBLOCK_MIAO:
1566 aAllSubsets.emplace_back( 0x16F00, 0x16F9F, SvxResId(RID_SUBSETSTR_MIAO) );
1567 break;
1568 case UBLOCK_SHARADA:
1569 aAllSubsets.emplace_back( 0x11180, 0x111DF, SvxResId(RID_SUBSETSTR_SHARADA) );
1570 break;
1571 case UBLOCK_SORA_SOMPENG:
1572 aAllSubsets.emplace_back( 0x110D0, 0x110FF, SvxResId(RID_SUBSETSTR_SORA_SOMPENG) );
1573 break;
1574 case UBLOCK_SUNDANESE_SUPPLEMENT:
1575 aAllSubsets.emplace_back( 0x1CC0, 0x1CCF, SvxResId(RID_SUBSETSTR_SUNDANESE_SUPPLEMENT) );
1576 break;
1577 case UBLOCK_TAKRI:
1578 aAllSubsets.emplace_back( 0x11680, 0x116CF, SvxResId(RID_SUBSETSTR_TAKRI) );
1579 break;
1580#endif
1581#if U_ICU_VERSION_MAJOR_NUM >= 54
1582 case UBLOCK_BASSA_VAH:
1583 aAllSubsets.emplace_back( 0x16AD0, 0x16AFF, SvxResId(RID_SUBSETSTR_BASSA_VAH) );
1584 break;
1585 case UBLOCK_CAUCASIAN_ALBANIAN:
1586 aAllSubsets.emplace_back( 0x10530, 0x1056F, SvxResId(RID_SUBSETSTR_CAUCASIAN_ALBANIAN) );
1587 break;
1588 case UBLOCK_COPTIC_EPACT_NUMBERS:
1589 aAllSubsets.emplace_back( 0x102E0, 0x102FF, SvxResId(RID_SUBSETSTR_COPTIC_EPACT_NUMBERS) );
1590 break;
1591 case UBLOCK_COMBINING_DIACRITICAL_MARKS_EXTENDED:
1592 aAllSubsets.emplace_back( 0x1AB0, 0x1AFF, SvxResId(RID_SUBSETSTR_COMBINING_DIACRITICAL_MARKS_EXTENDED) );
1593 break;
1594 case UBLOCK_DUPLOYAN:
1595 aAllSubsets.emplace_back( 0x1BC00, 0x1BC9F, SvxResId(RID_SUBSETSTR_DUPLOYAN) );
1596 break;
1597 case UBLOCK_ELBASAN:
1598 aAllSubsets.emplace_back( 0x10500, 0x1052F, SvxResId(RID_SUBSETSTR_ELBASAN) );
1599 break;
1600 case UBLOCK_GEOMETRIC_SHAPES_EXTENDED:
1601 aAllSubsets.emplace_back( 0x1F780, 0x1F7FF, SvxResId(RID_SUBSETSTR_GEOMETRIC_SHAPES_EXTENDED) );
1602 break;
1603 case UBLOCK_GRANTHA:
1604 aAllSubsets.emplace_back( 0x11300, 0x1137F, SvxResId(RID_SUBSETSTR_GRANTHA) );
1605 break;
1606 case UBLOCK_KHOJKI:
1607 aAllSubsets.emplace_back( 0x11200, 0x1124F, SvxResId(RID_SUBSETSTR_KHOJKI) );
1608 break;
1609 case UBLOCK_KHUDAWADI:
1610 aAllSubsets.emplace_back( 0x112B0, 0x112FF, SvxResId(RID_SUBSETSTR_KHUDAWADI) );
1611 break;
1612 case UBLOCK_LATIN_EXTENDED_E:
1613 aAllSubsets.emplace_back( 0xAB30, 0xAB6F, SvxResId(RID_SUBSETSTR_LATIN_EXTENDED_E) );
1614 break;
1615 case UBLOCK_LINEAR_A:
1616 aAllSubsets.emplace_back( 0x10600, 0x1077F, SvxResId(RID_SUBSETSTR_LINEAR_A) );
1617 break;
1618 case UBLOCK_MAHAJANI:
1619 aAllSubsets.emplace_back( 0x11150, 0x1117F, SvxResId(RID_SUBSETSTR_MAHAJANI) );
1620 break;
1621 case UBLOCK_MANICHAEAN:
1622 aAllSubsets.emplace_back( 0x10AC0, 0x10AFF, SvxResId(RID_SUBSETSTR_MANICHAEAN) );
1623 break;
1624 case UBLOCK_MENDE_KIKAKUI:
1625 aAllSubsets.emplace_back( 0x1E800, 0x1E8DF, SvxResId(RID_SUBSETSTR_MENDE_KIKAKUI) );
1626 break;
1627 case UBLOCK_MODI:
1628 aAllSubsets.emplace_back( 0x11600, 0x1165F, SvxResId(RID_SUBSETSTR_MODI) );
1629 break;
1630 case UBLOCK_MRO:
1631 aAllSubsets.emplace_back( 0x16A40, 0x16A6F, SvxResId(RID_SUBSETSTR_MRO) );
1632 break;
1633 case UBLOCK_MYANMAR_EXTENDED_B:
1634 aAllSubsets.emplace_back( 0xA9E0, 0xA9FF, SvxResId(RID_SUBSETSTR_MYANMAR_EXTENDED_B) );
1635 break;
1636 case UBLOCK_NABATAEAN:
1637 aAllSubsets.emplace_back( 0x10880, 0x108AF, SvxResId(RID_SUBSETSTR_NABATAEAN) );
1638 break;
1639 case UBLOCK_OLD_NORTH_ARABIAN:
1640 aAllSubsets.emplace_back( 0x10A80, 0x10A9F, SvxResId(RID_SUBSETSTR_OLD_NORTH_ARABIAN) );
1641 break;
1642 case UBLOCK_OLD_PERMIC:
1643 aAllSubsets.emplace_back( 0x10350, 0x1037F, SvxResId(RID_SUBSETSTR_OLD_PERMIC) );
1644 break;
1645 case UBLOCK_ORNAMENTAL_DINGBATS:
1646 aAllSubsets.emplace_back( 0x1F650, 0x1F67F, SvxResId(RID_SUBSETSTR_ORNAMENTAL_DINGBATS) );
1647 break;
1648 case UBLOCK_PAHAWH_HMONG:
1649 aAllSubsets.emplace_back( 0x16B00, 0x16B8F, SvxResId(RID_SUBSETSTR_PAHAWH_HMONG) );
1650 break;
1651 case UBLOCK_PALMYRENE:
1652 aAllSubsets.emplace_back( 0x10860, 0x1087F, SvxResId(RID_SUBSETSTR_PALMYRENE) );
1653 break;
1654 case UBLOCK_PAU_CIN_HAU:
1655 aAllSubsets.emplace_back( 0x11AC0, 0x11AFF, SvxResId(RID_SUBSETSTR_PAU_CIN_HAU) );
1656 break;
1657 case UBLOCK_PSALTER_PAHLAVI:
1658 aAllSubsets.emplace_back( 0x10B80, 0x10BAF, SvxResId(RID_SUBSETSTR_PSALTER_PAHLAVI) );
1659 break;
1660 case UBLOCK_SHORTHAND_FORMAT_CONTROLS:
1661 aAllSubsets.emplace_back( 0x1BCA0, 0x1BCAF, SvxResId(RID_SUBSETSTR_SHORTHAND_FORMAT_CONTROLS) );
1662 break;
1663 case UBLOCK_SIDDHAM:
1664 aAllSubsets.emplace_back( 0x11580, 0x115FF, SvxResId(RID_SUBSETSTR_SIDDHAM) );
1665 break;
1666 case UBLOCK_SINHALA_ARCHAIC_NUMBERS:
1667 aAllSubsets.emplace_back( 0x111E0, 0x111FF, SvxResId(RID_SUBSETSTR_SINHALA_ARCHAIC_NUMBERS) );
1668 break;
1669 case UBLOCK_SUPPLEMENTAL_ARROWS_C:
1670 aAllSubsets.emplace_back( 0x1F800, 0x1F8FF, SvxResId(RID_SUBSETSTR_SUPPLEMENTAL_ARROWS_C) );
1671 break;
1672 case UBLOCK_TIRHUTA:
1673 aAllSubsets.emplace_back( 0x11480, 0x114DF, SvxResId(RID_SUBSETSTR_TIRHUTA) );
1674 break;
1675 case UBLOCK_WARANG_CITI:
1676 aAllSubsets.emplace_back( 0x118A0, 0x118FF, SvxResId(RID_SUBSETSTR_WARANG_CITI) );
1677 break;
1678#endif
1679#if U_ICU_VERSION_MAJOR_NUM >= 56
1680 case UBLOCK_AHOM:
1681 aAllSubsets.emplace_back( 0x11700, 0x1173F, SvxResId(RID_SUBSETSTR_AHOM) );
1682 break;
1683 case UBLOCK_ANATOLIAN_HIEROGLYPHS:
1684 aAllSubsets.emplace_back( 0x14400, 0x1467F, SvxResId(RID_SUBSETSTR_ANATOLIAN_HIEROGLYPHS) );
1685 break;
1686 case UBLOCK_CHEROKEE_SUPPLEMENT:
1687 aAllSubsets.emplace_back( 0xAB70, 0xABBF, SvxResId(RID_SUBSETSTR_CHEROKEE_SUPPLEMENT) );
1688 break;
1689 case UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_E:
1690 aAllSubsets.emplace_back( 0x2B820, 0x2CEAF, SvxResId(RID_SUBSETSTR_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_E) );
1691 break;
1692 case UBLOCK_EARLY_DYNASTIC_CUNEIFORM:
1693 aAllSubsets.emplace_back( 0x12480, 0x1254F, SvxResId(RID_SUBSETSTR_EARLY_DYNASTIC_CUNEIFORM) );
1694 break;
1695 case UBLOCK_HATRAN:
1696 aAllSubsets.emplace_back( 0x108E0, 0x108FF, SvxResId(RID_SUBSETSTR_HATRAN) );
1697 break;
1698 case UBLOCK_MULTANI:
1699 aAllSubsets.emplace_back( 0x11280, 0x112AF, SvxResId(RID_SUBSETSTR_MULTANI) );
1700 break;
1701 case UBLOCK_OLD_HUNGARIAN:
1702 aAllSubsets.emplace_back( 0x10C80, 0x10CFF, SvxResId(RID_SUBSETSTR_OLD_HUNGARIAN) );
1703 break;
1704 case UBLOCK_SUPPLEMENTAL_SYMBOLS_AND_PICTOGRAPHS:
1705 aAllSubsets.emplace_back( 0x1F900, 0x1F9FF, SvxResId(RID_SUBSETSTR_SUPPLEMENTAL_SYMBOLS_AND_PICTOGRAPHS) );
1706 break;
1707 case UBLOCK_SUTTON_SIGNWRITING:
1708 aAllSubsets.emplace_back( 0x1D800, 0x1DAAF, SvxResId(RID_SUBSETSTR_SUTTON_SIGNWRITING) );
1709 break;
1710#endif
1711#if (U_ICU_VERSION_MAJOR_NUM >= 58)
1712 case UBLOCK_ADLAM:
1713 aAllSubsets.emplace_back( 0x1E900, 0x1E95F, SvxResId(RID_SUBSETSTR_ADLAM) );
1714 break;
1715 case UBLOCK_BHAIKSUKI:
1716 aAllSubsets.emplace_back( 0x11C00, 0x11C6F, SvxResId(RID_SUBSETSTR_BHAIKSUKI) );
1717 break;
1718 case UBLOCK_CYRILLIC_EXTENDED_C:
1719 aAllSubsets.emplace_back( 0x1C80, 0x1C8F, SvxResId(RID_SUBSETSTR_CYRILLIC_EXTENDED_C) );
1720 break;
1721 case UBLOCK_GLAGOLITIC_SUPPLEMENT:
1722 aAllSubsets.emplace_back( 0x1E000, 0x1E02F, SvxResId(RID_SUBSETSTR_GLAGOLITIC_SUPPLEMENT) );
1723 break;
1724 case UBLOCK_IDEOGRAPHIC_SYMBOLS_AND_PUNCTUATION:
1725 aAllSubsets.emplace_back( 0x16FE0, 0x16FFF, SvxResId(RID_SUBSETSTR_IDEOGRAPHIC_SYMBOLS_AND_PUNCTUATION) );
1726 break;
1727 case UBLOCK_MARCHEN:
1728 aAllSubsets.emplace_back( 0x11C70, 0x11CBF, SvxResId(RID_SUBSETSTR_MARCHEN) );
1729 break;
1730 case UBLOCK_MONGOLIAN_SUPPLEMENT:
1731 aAllSubsets.emplace_back( 0x11660, 0x1167F, SvxResId(RID_SUBSETSTR_MONGOLIAN_SUPPLEMENT) );
1732 break;
1733 case UBLOCK_NEWA:
1734 aAllSubsets.emplace_back( 0x11400, 0x1147F, SvxResId(RID_SUBSETSTR_NEWA) );
1735 break;
1736 case UBLOCK_OSAGE:
1737 aAllSubsets.emplace_back( 0x104B0, 0x104FF, SvxResId(RID_SUBSETSTR_OSAGE) );
1738 break;
1739 case UBLOCK_TANGUT:
1740 aAllSubsets.emplace_back( 0x17000, 0x187FF, SvxResId(RID_SUBSETSTR_TANGUT) );
1741 break;
1742 case UBLOCK_TANGUT_COMPONENTS:
1743 aAllSubsets.emplace_back( 0x18800, 0x18AFF, SvxResId(RID_SUBSETSTR_TANGUT_COMPONENTS) );
1744 break;
1745#endif
1746#if (U_ICU_VERSION_MAJOR_NUM >= 60)
1747 case UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_F:
1748 aAllSubsets.emplace_back( 0x2CEB0, 0x2EBE0, SvxResId(RID_SUBSETSTR_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_F) );
1749 break;
1750 case UBLOCK_KANA_EXTENDED_A:
1751 aAllSubsets.emplace_back( 0x1B100, 0x1B12F, SvxResId(RID_SUBSETSTR_KANA_EXTENDED_A) );
1752 break;
1753 case UBLOCK_MASARAM_GONDI:
1754 aAllSubsets.emplace_back( 0x11D00, 0x11D5F, SvxResId(RID_SUBSETSTR_MASARAM_GONDI) );
1755 break;
1756 case UBLOCK_NUSHU:
1757 aAllSubsets.emplace_back( 0x1B170, 0x1B2FF, SvxResId(RID_SUBSETSTR_NUSHU) );
1758 break;
1759 case UBLOCK_SOYOMBO:
1760 aAllSubsets.emplace_back( 0x11A50, 0x11AAF, SvxResId(RID_SUBSETSTR_SOYOMBO) );
1761 break;
1762 case UBLOCK_SYRIAC_SUPPLEMENT:
1763 aAllSubsets.emplace_back( 0x0860, 0x086f, SvxResId(RID_SUBSETSTR_SYRIAC_SUPPLEMENT) );
1764 break;
1765 case UBLOCK_ZANABAZAR_SQUARE:
1766 aAllSubsets.emplace_back( 0x11A00, 0x11A4F, SvxResId(RID_SUBSETSTR_ZANABAZAR_SQUARE) );
1767 break;
1768#endif
1769#if (U_ICU_VERSION_MAJOR_NUM >= 62)
1770 case UBLOCK_CHESS_SYMBOLS:
1771 aAllSubsets.emplace_back( 0x1FA00, 0x1FA6F, SvxResId(RID_SUBSETSTR_CHESS_SYMBOLS) );
1772 break;
1773 case UBLOCK_DOGRA:
1774 aAllSubsets.emplace_back( 0x11800, 0x1184F, SvxResId(RID_SUBSETSTR_DOGRA) );
1775 break;
1776 case UBLOCK_GEORGIAN_EXTENDED:
1777 aAllSubsets.emplace_back( 0x1C90, 0x1CBF, SvxResId(RID_SUBSETSTR_GEORGIAN_EXTENDED) );
1778 break;
1779 case UBLOCK_GUNJALA_GONDI:
1780 aAllSubsets.emplace_back( 0x11D60, 0x11DAF, SvxResId(RID_SUBSETSTR_GUNJALA_GONDI) );
1781 break;
1782 case UBLOCK_HANIFI_ROHINGYA:
1783 aAllSubsets.emplace_back( 0x10D00, 0x10D3F, SvxResId(RID_SUBSETSTR_HANIFI_ROHINGYA) );
1784 break;
1785 case UBLOCK_INDIC_SIYAQ_NUMBERS:
1786 aAllSubsets.emplace_back( 0x1EC70, 0x1ECBF, SvxResId(RID_SUBSETSTR_INDIC_SIYAQ_NUMBERS) );
1787 break;
1788 case UBLOCK_MAKASAR:
1789 aAllSubsets.emplace_back( 0x11EE0, 0x11EFF, SvxResId(RID_SUBSETSTR_MAKASAR) );
1790 break;
1791 case UBLOCK_MAYAN_NUMERALS:
1792 aAllSubsets.emplace_back( 0x1D2E0, 0x1D2FF, SvxResId(RID_SUBSETSTR_MAYAN_NUMERALS) );
1793 break;
1794 case UBLOCK_MEDEFAIDRIN:
1795 aAllSubsets.emplace_back( 0x16E40, 0x16E9F, SvxResId(RID_SUBSETSTR_MEDEFAIDRIN) );
1796 break;
1797 case UBLOCK_OLD_SOGDIAN:
1798 aAllSubsets.emplace_back( 0x10F00, 0x10F2F, SvxResId(RID_SUBSETSTR_OLD_SOGDIAN) );
1799 break;
1800 case UBLOCK_SOGDIAN:
1801 aAllSubsets.emplace_back( 0x10F30, 0x10F6F, SvxResId(RID_SUBSETSTR_SOGDIAN) );
1802 break;
1803#endif
1804#if (U_ICU_VERSION_MAJOR_NUM >= 64)
1805 case UBLOCK_EGYPTIAN_HIEROGLYPH_FORMAT_CONTROLS:
1806 aAllSubsets.emplace_back( 0x13430, 0x1343F, SvxResId(RID_SUBSETSTR_EGYPTIAN_HIEROGLYPH_FORMAT_CONTROLS) );
1807 break;
1808 case UBLOCK_ELYMAIC:
1809 aAllSubsets.emplace_back( 0x10FE0, 0x10FFF, SvxResId(RID_SUBSETSTR_ELYMAIC) );
1810 break;
1811 case UBLOCK_NANDINAGARI:
1812 aAllSubsets.emplace_back( 0x119A0, 0x119FF, SvxResId(RID_SUBSETSTR_NANDINAGARI) );
1813 break;
1814 case UBLOCK_NYIAKENG_PUACHUE_HMONG:
1815 aAllSubsets.emplace_back( 0x1E100, 0x1E14F, SvxResId(RID_SUBSETSTR_NYIAKENG_PUACHUE_HMONG) );
1816 break;
1817 case UBLOCK_OTTOMAN_SIYAQ_NUMBERS:
1818 aAllSubsets.emplace_back( 0x1ED00, 0x1ED4F, SvxResId(RID_SUBSETSTR_OTTOMAN_SIYAQ_NUMBERS) );
1819 break;
1820 case UBLOCK_SMALL_KANA_EXTENSION:
1821 aAllSubsets.emplace_back( 0x1B130, 0x1B16F, SvxResId(RID_SUBSETSTR_SMALL_KANA_EXTENSION) );
1822 break;
1823 case UBLOCK_SYMBOLS_AND_PICTOGRAPHS_EXTENDED_A:
1824 aAllSubsets.emplace_back( 0x1FA70, 0x1FAFF, SvxResId(RID_SUBSETSTR_SYMBOLS_AND_PICTOGRAPHS_EXTENDED_A) );
1825 break;
1826 case UBLOCK_TAMIL_SUPPLEMENT:
1827 aAllSubsets.emplace_back( 0x11FC0, 0x11FFF, SvxResId(RID_SUBSETSTR_TAMIL_SUPPLEMENT) );
1828 break;
1829 case UBLOCK_WANCHO:
1830 aAllSubsets.emplace_back( 0x1E2C0, 0x1E2FF, SvxResId(RID_SUBSETSTR_WANCHO) );
1831 break;
1832#endif
1833#if (U_ICU_VERSION_MAJOR_NUM >= 66)
1834 case UBLOCK_CHORASMIAN:
1835 aAllSubsets.emplace_back( 0x10FB0, 0x10FDF, SvxResId(RID_SUBSETSTR_CHORASMIAN) );
1836 break;
1837 case UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_G:
1838 aAllSubsets.emplace_back( 0x30000, 0x3134F, SvxResId(RID_SUBSETSTR_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_G) );
1839 break;
1840 case UBLOCK_DIVES_AKURU:
1841 aAllSubsets.emplace_back( 0x11900, 0x1195F, SvxResId(RID_SUBSETSTR_DIVES_AKURU) );
1842 break;
1843 case UBLOCK_KHITAN_SMALL_SCRIPT:
1844 aAllSubsets.emplace_back( 0x18B00, 0x18CFF, SvxResId(RID_SUBSETSTR_KHITAN_SMALL_SCRIPT) );
1845 break;
1846 case UBLOCK_LISU_SUPPLEMENT:
1847 aAllSubsets.emplace_back( 0x11FB0, 0x11FBF, SvxResId(RID_SUBSETSTR_LISU_SUPPLEMENT) );
1848 break;
1849 case UBLOCK_SYMBOLS_FOR_LEGACY_COMPUTING:
1850 aAllSubsets.emplace_back( 0x1FB00, 0x1FBFF, SvxResId(RID_SUBSETSTR_SYMBOLS_FOR_LEGACY_COMPUTING) );
1851 break;
1852 case UBLOCK_TANGUT_SUPPLEMENT:
1853 aAllSubsets.emplace_back( 0x18D00, 0x18D7F, SvxResId(RID_SUBSETSTR_TANGUT_SUPPLEMENT) );
1854 break;
1855 case UBLOCK_YEZIDI:
1856 aAllSubsets.emplace_back( 0x10E80, 0x10EBF, SvxResId(RID_SUBSETSTR_YEZIDI) );
1857 break;
1858#endif
1859#if (U_ICU_VERSION_MAJOR_NUM >= 70)
1860 case UBLOCK_ARABIC_EXTENDED_B:
1861 aAllSubsets.emplace_back( 0x0870, 0x089F, SvxResId(RID_SUBSETSTR_ARABIC_EXTENDED_B) );
1862 break;
1863 case UBLOCK_CYPRO_MINOAN:
1864 aAllSubsets.emplace_back( 0x12F90, 0x12FFF, SvxResId(RID_SUBSETSTR_CYPRO_MINOAN) );
1865 break;
1866 case UBLOCK_ETHIOPIC_EXTENDED_B:
1867 aAllSubsets.emplace_back( 0x1E7E0, 0x1E7FF, SvxResId(RID_SUBSETSTR_ETHIOPIC_EXTENDED_B) );
1868 break;
1869 case UBLOCK_KANA_EXTENDED_B:
1870 aAllSubsets.emplace_back( 0x1AFF0, 0x1AFFF, SvxResId(RID_SUBSETSTR_KANA_EXTENDED_B) );
1871 break;
1872 case UBLOCK_LATIN_EXTENDED_F:
1873 aAllSubsets.emplace_back( 0x10780, 0x107BF, SvxResId(RID_SUBSETSTR_LATIN_EXTENDED_F) );
1874 break;
1875 case UBLOCK_LATIN_EXTENDED_G:
1876 aAllSubsets.emplace_back( 0x1DF00, 0x1DFFF, SvxResId(RID_SUBSETSTR_LATIN_EXTENDED_G) );
1877 break;
1878 case UBLOCK_OLD_UYGHUR:
1879 aAllSubsets.emplace_back( 0x10F70, 0x10FAF, SvxResId(RID_SUBSETSTR_OLD_UYGHUR) );
1880 break;
1881 case UBLOCK_TANGSA:
1882 aAllSubsets.emplace_back( 0x16A70, 0x16ACF, SvxResId(RID_SUBSETSTR_TANGSA) );
1883 break;
1884 case UBLOCK_TOTO:
1885 aAllSubsets.emplace_back( 0x1E290, 0x1E2BF, SvxResId(RID_SUBSETSTR_TOTO) );
1886 break;
1887 case UBLOCK_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_EXTENDED_A:
1888 aAllSubsets.emplace_back( 0x11AB0, 0x11ABF, SvxResId(RID_SUBSETSTR_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_EXTENDED_A) );
1889 break;
1890 case UBLOCK_VITHKUQI:
1891 aAllSubsets.emplace_back( 0x10570, 0x105BF, SvxResId(RID_SUBSETSTR_VITHKUQI) );
1892 break;
1893 case UBLOCK_ZNAMENNY_MUSICAL_NOTATION:
1894 aAllSubsets.emplace_back( 0x1CF00, 0x1CFCF, SvxResId(RID_SUBSETSTR_ZNAMENNY_MUSICAL_NOTATION) );
1895 break;
1896#endif
1897#if (U_ICU_VERSION_MAJOR_NUM >= 72)
1898 case UBLOCK_ARABIC_EXTENDED_C:
1899 aAllSubsets.emplace_back( 0x10EC0, 0x10EFF, SvxResId(RID_SUBSETSTR_ARABIC_EXTENDED_C) );
1900 break;
1901 case UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_H:
1902 aAllSubsets.emplace_back( 0x31350, 0x323AF, SvxResId(RID_SUBSETSTR_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_H) );
1903 break;
1904 case UBLOCK_CYRILLIC_EXTENDED_D:
1905 aAllSubsets.emplace_back( 0x1E030, 0x1E08F, SvxResId(RID_SUBSETSTR_CYRILLIC_EXTENDED_D) );
1906 break;
1907 case UBLOCK_DEVANAGARI_EXTENDED_A:
1908 aAllSubsets.emplace_back( 0x11B00, 0x11B5F, SvxResId(RID_SUBSETSTR_DEVANAGARI_EXTENDED_A) );
1909 break;
1910 case UBLOCK_KAKTOVIK_NUMERALS:
1911 aAllSubsets.emplace_back( 0x1D2C0, 0x1D2DF, SvxResId(RID_SUBSETSTR_KAKTOVIK_NUMERALS) );
1912 break;
1913 case UBLOCK_KAWI:
1914 aAllSubsets.emplace_back( 0x11F00, 0x11F5F, SvxResId(RID_SUBSETSTR_KAWI) );
1915 break;
1916 case UBLOCK_NAG_MUNDARI:
1917 aAllSubsets.emplace_back( 0x1E4D0, 0x1E4FF, SvxResId(RID_SUBSETSTR_NAG_MUNDARI) );
1918 break;
1919#endif
1920 }
1921
1922#if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG
1923 if (eBlock != UBLOCK_NO_BLOCK &&
1924 eBlock != UBLOCK_INVALID_CODE &&
1925 eBlock != UBLOCK_COUNT &&
1926 eBlock != UBLOCK_HIGH_SURROGATES &&
1927 eBlock != UBLOCK_HIGH_PRIVATE_USE_SURROGATES &&
1928 eBlock != UBLOCK_LOW_SURROGATES)
1929
1930 {
1931 UBlockCode eBlockStart = ublock_getCode(aAllSubsets.back().GetRangeMin());
1932 UBlockCode eBlockEnd = ublock_getCode(aAllSubsets.back().GetRangeMax());
1933 assert(eBlockStart == eBlockEnd && eBlockStart == eBlock);
1934 }
1935#endif
1936 }
1937
1938 std::stable_sort(aAllSubsets.begin(), aAllSubsets.end());
1939 return aAllSubsets;
1940 }();
1941
1942 maSubsets = s_aAllSubsets;
1943}
1944
1945void SubsetMap::ApplyCharMap( const FontCharMapRef& rxFontCharMap )
1946{
1947 if( !rxFontCharMap.is() )
1948 return;
1949
1950 // remove subsets that are not matched in any range
1951 maSubsets.erase(std::remove_if(maSubsets.begin(), maSubsets.end(),
1952 [&rxFontCharMap](const Subset& rSubset) {
1953 sal_uInt32 cMin = rSubset.GetRangeMin();
1954 sal_uInt32 cMax = rSubset.GetRangeMax();
1955 int nCount = rxFontCharMap->CountCharsInRange( cMin, cMax );
1956 return nCount <= 0;
1957 }),
1958 maSubsets.end());
1959}
1960
1961/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
geometry::RealPoint2D maPosition
IMPL_LINK_NOARG(SvxShowCharSet, VscrollHdl, weld::ScrolledWindow &, void)
Definition: charmap.cxx:803
#define COLUMN_COUNT
Definition: charmap.hxx:46
#define ROW_COUNT
Definition: charmap.hxx:47
const StyleSettings & GetStyleSettings() const
static const AllSettings & GetSettings()
static std::unique_ptr< weld::Builder > CreateBuilder(weld::Widget *pParent, const OUString &rUIFile, bool bMobile=false, sal_uInt64 nLOKWindowId=0)
sal_Unicode GetCharCode() const
const vcl::KeyCode & GetKeyCode() const
sal_uInt16 GetClicks() const
bool IsRight() const
const Point & GetPosPixel() const
bool IsLeft() const
void SetFont(const vcl::Font &rNewFont)
bool GetTextBoundRect(tools::Rectangle &rRect, const OUString &rStr, sal_Int32 nBase=0, sal_Int32 nIndex=0, sal_Int32 nLen=-1, sal_uLong nLayoutWidth=0, o3tl::span< const sal_Int32 > pDXArray={}, o3tl::span< const sal_Bool > pKashidaArray={}, const SalLayoutGlyphs *pGlyphs=nullptr) const
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
void DrawRect(const tools::Rectangle &rRect)
void DrawLine(const Point &rStartPt, const Point &rEndPt)
void SetLineColor()
tools::Long GetTextWidth(const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, vcl::text::TextLayoutCache const *=nullptr, SalLayoutGlyphs const *const pLayoutCache=nullptr) const
void SetTextColor(const Color &rColor)
bool GetFontCharMap(FontCharMapRef &rxFontCharMap) const
void SetFillColor()
const Color & GetLineColor() const
const Color & GetTextColor() const
tools::Long GetTextHeight() const
void SetBackground()
void DrawText(const Point &rStartPt, const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, std::vector< tools::Rectangle > *pVector=nullptr, OUString *pDisplayText=nullptr, const SalLayoutGlyphs *pLayoutCache=nullptr)
const AllSettings & GetSettings() const
const Color & GetFillColor() const
constexpr tools::Long Height() const
tools::Long AdjustHeight(tools::Long n)
tools::Long AdjustWidth(tools::Long n)
constexpr tools::Long Width() const
const Color & GetWindowColor() const
const Color & GetDialogTextColor() const
const Color & GetFieldTextColor() const
const Color & GetShadowColor() const
const Color & GetLightColor() const
const Color & GetHighlightColor() const
const Color & GetFaceColor() const
const Color & GetHighlightTextColor() const
SubsetVec maSubsets
Definition: ucsubset.hxx:66
const Subset * GetSubsetByUnicode(sal_UCS4) const
Definition: charmap.cxx:896
SVX_DLLPRIVATE void ApplyCharMap(const FontCharMapRef &)
Definition: charmap.cxx:1945
SubsetMap(const FontCharMapRef &)
Definition: charmap.cxx:885
const SubsetVec & GetSubsetMap() const
Definition: charmap.cxx:891
SVX_DLLPRIVATE void InitList()
Definition: charmap.cxx:909
Subset(sal_UCS4 nMin, sal_UCS4 nMax, OUString aName)
Definition: charmap.cxx:904
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
Definition: uiobject.cxx:51
static sal_uInt32 & getSelectedChar()
Definition: charmap.cxx:54
void ContextMenuSelect(std::string_view rIdent)
Definition: charmap.cxx:241
virtual sal_UCS4 GetSelectCharacter() const
Definition: charmap.cxx:658
virtual bool MouseButtonUp(const MouseEvent &rMEvt) override
Definition: charmap.cxx:154
std::deque< OUString > maFavCharFontList
Definition: charmap.hxx:128
bool mbUpdateBackground
Definition: charmap.hxx:145
virtual FactoryFunction GetUITestFactory() const override
Definition: charmap.cxx:60
FontCharMapRef mxFontCharMap
Definition: charmap.hxx:139
virtual ~SvxShowCharSet() override
Definition: charmap.cxx:829
bool mbUpdateForeground
Definition: charmap.hxx:144
virtual void RecalculateFont(vcl::RenderContext &rRenderContext)
Definition: charmap.cxx:666
virtual void GetFocus() override
Definition: charmap.cxx:112
int FirstInView() const
Definition: charmap.cxx:353
VclPtr< VirtualDevice > mxVirDev
Definition: charmap.hxx:58
sal_Int32 nSelectedIndex
Definition: charmap.hxx:137
void InitSettings(vcl::RenderContext &rRenderContext)
Definition: charmap.cxx:633
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
Definition: charmap.cxx:456
void getFavCharacterList()
Definition: charmap.cxx:197
virtual bool MouseButtonDown(const MouseEvent &rMEvt) override
Definition: charmap.cxx:122
static void CopyToClipboard(const OUString &str)
Definition: charmap.cxx:257
Link< SvxShowCharSet *, void > aFavClickHdl
Definition: charmap.hxx:123
Point MapIndexToPixel(int) const
Definition: charmap.cxx:368
FontCharMapRef const & GetFontCharMap()
Definition: charmap.cxx:876
virtual void SelectIndex(int index, bool bFocus=false)
Definition: charmap.cxx:707
Link< SvxShowCharSet *, void > aHighHdl
Definition: charmap.hxx:124
tools::Long nX
Definition: charmap.hxx:131
std::unique_ptr< weld::ScrolledWindow > mxScrollArea
Definition: charmap.hxx:60
vcl::Font maFont
Definition: charmap.hxx:59
Link< SvxShowCharSet *, void > aSelectHdl
Definition: charmap.hxx:122
static sal_uInt16 GetRowPos(sal_uInt16 _nPos)
Definition: charmap.cxx:192
void init()
Definition: charmap.cxx:94
tools::Long nY
Definition: charmap.hxx:132
tools::Long m_nYGap
Definition: charmap.hxx:134
virtual sal_Int32 getMaxCharCount() const
Definition: charmap.cxx:871
bool isFavChar(const OUString &sTitle, const OUString &rFont)
Definition: charmap.cxx:210
virtual void DrawChars_Impl(vcl::RenderContext &rRenderContext, int n1, int n2)
Definition: charmap.cxx:506
void OutputIndex(int index)
Definition: charmap.cxx:781
int PixelToMapIndex(const Point &) const
Definition: charmap.cxx:377
void DeSelect()
Definition: charmap.cxx:470
Link< SvxShowCharSet *, void > aDoubleClkHdl
Definition: charmap.hxx:121
void updateFavCharacterList(const OUString &rChar, const OUString &rFont)
Definition: charmap.cxx:280
virtual bool MouseMove(const MouseEvent &rMEvt) override
Definition: charmap.cxx:168
std::deque< OUString > maFavCharList
Definition: charmap.hxx:127
Link< SvxShowCharSet *, void > aPreSelectHdl
Definition: charmap.hxx:125
bool mbRecalculateFont
Definition: charmap.hxx:143
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override
Definition: charmap.cxx:841
tools::Long m_nXGap
Definition: charmap.hxx:133
Point maPosition
Definition: charmap.hxx:141
ItemsMap m_aItems
Definition: charmap.hxx:120
virtual bool KeyInput(const KeyEvent &) override
Definition: charmap.cxx:387
tools::Rectangle getGridRectangle(const Point &rPointUL, const Size &rOutputSize) const
Definition: charmap.cxx:476
SvxShowCharSet(std::unique_ptr< weld::ScrolledWindow > pScrollArea, const VclPtr< VirtualDevice > &rVirDev)
Definition: charmap.cxx:65
virtual void LoseFocus() override
Definition: charmap.cxx:117
void SelectCharacter(sal_UCS4 cNew)
Definition: charmap.cxx:788
void SetFont(const vcl::Font &rFont)
Definition: charmap.cxx:463
static sal_uInt16 GetColumnPos(sal_uInt16 _nPos)
Definition: charmap.cxx:348
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea) override
Definition: charmap.cxx:79
virtual svx::SvxShowCharSetItem * ImplGetItem(int _nPos)
Definition: charmap.cxx:850
rtl::Reference< svx::SvxShowCharSetAcc > m_xAccessible
Definition: charmap.hxx:130
virtual void Resize() override
Definition: charmap.cxx:107
void createContextMenu()
Definition: charmap.cxx:224
virtual int LastInView() const
Definition: charmap.cxx:358
static std::shared_ptr< ConfigurationChanges > create()
The table implementation of the vcl control.
Definition: charmapacc.hxx:72
constexpr tools::Long GetWidth() const
constexpr tools::Long Top() const
constexpr tools::Long Right() const
constexpr tools::Long Left() const
constexpr tools::Long Bottom() const
constexpr bool IsEmpty() const
bool is() const
void SetFontSize(const Size &)
void SetTransparent(bool bTransparent)
void SetWeight(FontWeight)
void SetAlignment(TextAlign)
sal_uInt16 GetCode() const
sal_uInt16 GetModifier() const
weld::DrawingArea * GetDrawingArea() const
Size const & GetOutputSizePixel() const
virtual int get_text_height() const=0
virtual float get_approximate_digit_width() const=0
constexpr ::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
OUString SvxResId(TranslateId aId)
Definition: dialmgr.cxx:24
float y
float x
ALIGN_TOP
WEIGHT_LIGHT
std::function< std::unique_ptr< UIObject >(vcl::Window *)> FactoryFunction
sal_Int32 nIndex
OUString aName
uno_Any a
constexpr sal_uInt16 KEY_RETURN
constexpr sal_uInt16 KEY_ESCAPE
constexpr sal_uInt16 KEY_HOME
constexpr sal_uInt16 KEY_LEFT
constexpr sal_uInt16 KEY_PAGEDOWN
constexpr sal_uInt16 KEY_TAB
constexpr sal_uInt16 KEY_UP
constexpr sal_uInt16 KEY_RIGHT
constexpr sal_uInt16 KEY_DOWN
constexpr sal_uInt16 KEY_SPACE
constexpr sal_uInt16 KEY_PAGEUP
constexpr sal_uInt16 KEY_END
int n2
int n1
def point()
DstType sequenceToContainer(const css::uno::Sequence< SrcType > &i_Sequence)
Reference< XComponentContext > getProcessComponentContext()
int i
long Long
Simple struct to hold some information about the single items of the table.
Definition: charmapacc.hxx:46
css::uno::Reference< css::accessibility::XAccessible > GetAccessible()
Definition: charmapacc.cxx:58
rtl::Reference< SvxShowCharSetItemAcc > m_xItem
Definition: charmapacc.hxx:51
::std::vector< Subset > SubsetVec
Definition: ucsubset.hxx:55
sal_uInt32 sal_UCS4
sal_Int32 _nPos