1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #include <config_wasm_strip.h>
23 #include <vcl/commandevent.hxx>
24 #include <vcl/event.hxx>
25 #include <vcl/fontcharmap.hxx>
26 #include <vcl/svapp.hxx>
27 #include <vcl/settings.hxx>
28 #include <vcl/virdev.hxx>
30 #include <svx/ucsubset.hxx>
33 #include <svx/strings.hrc>
35 #include <svx/charmap.hxx>
36 #include <svx/dialmgr.hxx>
38 #include <charmapacc.hxx>
39 #include <uiobject.hxx>
41 #include <com/sun/star/accessibility/AccessibleEventId.hpp>
42 #include <com/sun/star/accessibility/AccessibleStateType.hpp>
43 #include <com/sun/star/datatransfer/clipboard/XFlushableClipboard.hpp>
44 #include <com/sun/star/datatransfer/clipboard/SystemClipboard.hpp>
45 #include <officecfg/Office/Common.hxx>
46 #include <comphelper/processfactory.hxx>
47 #include <unicode/uchar.h>
48 #include <vcl/textview.hxx>
49 #include <rtl/ustrbuf.hxx>
51 using namespace ::com::sun::star::accessibility
;
52 using namespace ::com::sun::star::uno
;
53 using namespace ::com::sun::star
;
55 sal_uInt32
& SvxShowCharSet::getSelectedChar()
57 static sal_uInt32 cSelectedChar
= ' '; // keeps selected character over app lifetime
61 FactoryFunction
SvxShowCharSet::GetUITestFactory() const
63 return SvxShowCharSetUIObject::create
;
66 SvxShowCharSet::SvxShowCharSet(std::unique_ptr
<weld::ScrolledWindow
> pScrolledWindow
, const VclPtr
<VirtualDevice
>& rVirDev
)
68 , mxScrollArea(std::move(pScrolledWindow
))
72 , mbRecalculateFont(true)
73 , mbUpdateForeground(true)
74 , mbUpdateBackground(true)
79 void SvxShowCharSet::SetDrawingArea(weld::DrawingArea
* pDrawingArea
)
81 CustomWidgetController::SetDrawingArea(pDrawingArea
);
83 Size
aSize(COLUMN_COUNT
* pDrawingArea
->get_approximate_digit_width() * 5.25,
84 ROW_COUNT
* pDrawingArea
->get_text_height() * 2);
86 nX
= aSize
.Width() / COLUMN_COUNT
;
87 nY
= aSize
.Height() / ROW_COUNT
;
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,
94 void SvxShowCharSet::init()
96 nSelectedIndex
= -1; // TODO: move into init list when it is no longer static
100 mxScrollArea
->connect_vadjustment_changed(LINK(this, SvxShowCharSet
, VscrollHdl
));
101 getFavCharacterList();
102 // other settings depend on selected font => see RecalculateFont
107 void SvxShowCharSet::Resize()
109 mbRecalculateFont
= true;
112 void SvxShowCharSet::GetFocus()
114 SelectIndex(nSelectedIndex
, true);
117 void SvxShowCharSet::LoseFocus()
119 SelectIndex(nSelectedIndex
);
122 bool SvxShowCharSet::MouseButtonDown(const MouseEvent
& rMEvt
)
124 if ( rMEvt
.IsLeft() )
126 if ( rMEvt
.GetClicks() == 1 )
132 int nIndex
= PixelToMapIndex( rMEvt
.GetPosPixel() );
133 // Fire the focus event
134 SelectIndex( nIndex
, true);
137 if ( !(rMEvt
.GetClicks() % 2) )
138 aDoubleClkHdl
.Call( this );
143 return CustomWidgetController::MouseButtonDown(rMEvt
);
146 bool SvxShowCharSet::MouseButtonUp(const MouseEvent
& rMEvt
)
148 if ( bDrag
&& rMEvt
.IsLeft() )
150 // released mouse over character map
151 if ( tools::Rectangle(Point(), GetOutputSizePixel()).Contains(rMEvt
.GetPosPixel()))
152 aSelectHdl
.Call( this );
160 bool SvxShowCharSet::MouseMove(const MouseEvent
& rMEvt
)
162 if ( rMEvt
.IsLeft() && bDrag
)
164 Point aPos
= rMEvt
.GetPosPixel();
165 Size aSize
= GetOutputSizePixel();
169 else if ( aPos
.X() > aSize
.Width()-5 )
170 aPos
.setX( aSize
.Width()-5 );
173 else if ( aPos
.Y() > aSize
.Height()-5 )
174 aPos
.setY( aSize
.Height()-5 );
176 int nIndex
= PixelToMapIndex( aPos
);
177 // Fire the focus event.
178 SelectIndex( nIndex
, true );
184 bool SvxShowCharSet::Command(const CommandEvent
& rCEvt
)
186 if (rCEvt
.GetCommand() == CommandEventId::ContextMenu
)
189 if (rCEvt
.IsMouseEvent())
191 aPosition
= rCEvt
.GetMousePosPixel();
192 int nIndex
= PixelToMapIndex(aPosition
);
193 // Fire the focus event
194 SelectIndex(nIndex
, true);
198 svx::SvxShowCharSetItem
* pItem
= ImplGetItem(nSelectedIndex
);
202 // position context menu at centre of currently selected item
203 aPosition
= MapIndexToPixel(nSelectedIndex
);
204 aPosition
.AdjustX(pItem
->maRect
.GetWidth() / 2);
205 aPosition
.AdjustY(pItem
->maRect
.GetHeight() / 2);
207 createContextMenu(aPosition
);
210 return weld::CustomWidgetController::Command(rCEvt
);
213 sal_uInt16
SvxShowCharSet::GetRowPos(sal_uInt16 _nPos
)
215 return _nPos
/ COLUMN_COUNT
;
218 void SvxShowCharSet::getFavCharacterList()
220 maFavCharList
.clear();
221 maFavCharFontList
.clear();
222 //retrieve recent character list
223 css::uno::Sequence
< OUString
> rFavCharList( officecfg::Office::Common::FavoriteCharacters::FavoriteCharacterList::get() );
224 comphelper::sequenceToContainer(maFavCharList
, rFavCharList
);
226 //retrieve recent character font list
227 css::uno::Sequence
< OUString
> rFavCharFontList( officecfg::Office::Common::FavoriteCharacters::FavoriteCharacterFontList::get() );
228 comphelper::sequenceToContainer(maFavCharFontList
, rFavCharFontList
);
231 bool SvxShowCharSet::isFavChar(std::u16string_view sTitle
, std::u16string_view rFont
)
233 assert(maFavCharList
.size() == maFavCharFontList
.size());
234 for (size_t i
= 0; i
< maFavCharList
.size(); i
++)
236 if (maFavCharList
[i
] == sTitle
&& maFavCharFontList
[i
] == rFont
)
242 void SvxShowCharSet::createContextMenu(const Point
& rPosition
)
244 std::unique_ptr
<weld::Builder
> xBuilder(Application::CreateBuilder(GetDrawingArea(), "svx/ui/charsetmenu.ui"));
245 std::unique_ptr
<weld::Menu
> xItemMenu(xBuilder
->weld_menu("charsetmenu"));
247 sal_UCS4 cChar
= GetSelectCharacter();
248 OUString
aOUStr( &cChar
, 1 );
249 if (isFavChar(aOUStr
, mxVirDev
->GetFont().GetFamilyName()) || maFavCharList
.size() >= 16)
250 xItemMenu
->set_visible("add", false);
252 xItemMenu
->set_visible("remove", false);
254 ContextMenuSelect(xItemMenu
->popup_at_rect(GetDrawingArea(), tools::Rectangle(rPosition
, Size(1,1))));
259 void SvxShowCharSet::ContextMenuSelect(std::u16string_view rIdent
)
261 sal_UCS4 cChar
= GetSelectCharacter();
262 OUString
aOUStr(&cChar
, 1);
264 if (rIdent
== u
"insert")
265 aDoubleClkHdl
.Call(this);
266 else if (rIdent
== u
"add" || rIdent
== u
"remove")
268 updateFavCharacterList(aOUStr
, mxVirDev
->GetFont().GetFamilyName());
269 aFavClickHdl
.Call(this);
271 else if (rIdent
== u
"copy")
272 CopyToClipboard(aOUStr
);
275 void SvxShowCharSet::CopyToClipboard(const OUString
& rOUStr
)
277 css::uno::Reference
<css::datatransfer::clipboard::XClipboard
> xClipboard
=
278 css::datatransfer::clipboard::SystemClipboard::create(comphelper::getProcessComponentContext());
280 if (!xClipboard
.is())
283 rtl::Reference
<TETextDataObject
> pDataObj
= new TETextDataObject(rOUStr
);
287 xClipboard
->setContents( pDataObj
, nullptr );
289 css::uno::Reference
<css::datatransfer::clipboard::XFlushableClipboard
> xFlushableClipboard(xClipboard
, css::uno::UNO_QUERY
);
290 if( xFlushableClipboard
.is() )
291 xFlushableClipboard
->flushClipboard();
293 catch( const css::uno::Exception
& )
298 void SvxShowCharSet::updateFavCharacterList(const OUString
& sTitle
, const OUString
& rFont
)
300 if (isFavChar(sTitle
, rFont
))
302 assert(maFavCharList
.size() == maFavCharFontList
.size());
303 auto fontIt
= maFavCharFontList
.begin();
304 for (auto charIt
= maFavCharList
.begin(); charIt
!= maFavCharList
.end(); charIt
++)
306 if (*charIt
== sTitle
&& *fontIt
== rFont
)
308 maFavCharList
.erase(charIt
);
309 maFavCharFontList
.erase(fontIt
);
317 if (maFavCharList
.size() == 16)
319 maFavCharList
.pop_back();
320 maFavCharFontList
.pop_back();
323 maFavCharList
.push_back(sTitle
);
324 maFavCharFontList
.push_back(rFont
);
327 css::uno::Sequence
< OUString
> aFavCharList(maFavCharList
.size());
328 auto aFavCharListRange
= asNonConstRange(aFavCharList
);
329 css::uno::Sequence
< OUString
> aFavCharFontList(maFavCharFontList
.size());
330 auto aFavCharFontListRange
= asNonConstRange(aFavCharFontList
);
332 for (size_t i
= 0; i
< maFavCharList
.size(); ++i
)
334 aFavCharListRange
[i
] = maFavCharList
[i
];
335 aFavCharFontListRange
[i
] = maFavCharFontList
[i
];
338 std::shared_ptr
<comphelper::ConfigurationChanges
> batch(comphelper::ConfigurationChanges::create());
339 officecfg::Office::Common::FavoriteCharacters::FavoriteCharacterList::set(aFavCharList
, batch
);
340 officecfg::Office::Common::FavoriteCharacters::FavoriteCharacterFontList::set(aFavCharFontList
, batch
);
344 sal_uInt16
SvxShowCharSet::GetColumnPos(sal_uInt16 _nPos
)
346 return _nPos
% COLUMN_COUNT
;
349 int SvxShowCharSet::FirstInView() const
351 return mxScrollArea
->vadjustment_get_value() * COLUMN_COUNT
;
354 int SvxShowCharSet::LastInView() const
356 sal_uInt32 nIndex
= FirstInView();
357 nIndex
+= ROW_COUNT
* COLUMN_COUNT
- 1;
358 sal_uInt32 nCompare
= mxFontCharMap
->GetCharCount() - 1;
359 if (nIndex
> nCompare
)
364 Point
SvxShowCharSet::MapIndexToPixel( int nIndex
) const
366 const int nBase
= FirstInView();
367 int x
= ((nIndex
- nBase
) % COLUMN_COUNT
) * nX
;
368 int y
= ((nIndex
- nBase
) / COLUMN_COUNT
) * nY
;
369 return Point( x
+ m_nXGap
, y
+ m_nYGap
);
373 int SvxShowCharSet::PixelToMapIndex( const Point
& point
) const
375 int nBase
= FirstInView();
377 int x
= nX
== 0 ? 0 : (point
.X() - m_nXGap
)/nX
;
379 int y
= nY
== 0 ? 0 : (point
.Y() - m_nYGap
)/nY
;
380 return (nBase
+ x
+ y
* COLUMN_COUNT
);
383 bool SvxShowCharSet::KeyInput(const KeyEvent
& rKEvt
)
385 vcl::KeyCode aCode
= rKEvt
.GetKeyCode();
387 if (aCode
.GetModifier())
392 int tmpSelected
= nSelectedIndex
;
394 switch (aCode
.GetCode())
397 m_aReturnKeypressHdl
.Call(this);
400 aDoubleClkHdl
.Call(this);
409 tmpSelected
-= COLUMN_COUNT
;
412 tmpSelected
+= COLUMN_COUNT
;
415 tmpSelected
-= ROW_COUNT
* COLUMN_COUNT
;
418 tmpSelected
+= ROW_COUNT
* COLUMN_COUNT
;
424 tmpSelected
= mxFontCharMap
->GetCharCount() - 1;
426 case KEY_TAB
: // some fonts have a character at these unicode control codes
428 tmpSelected
= - 1; // mark as invalid
433 sal_UCS4 cChar
= rKEvt
.GetCharCode();
434 sal_UCS4 cNext
= mxFontCharMap
->GetNextChar(cChar
- 1);
435 tmpSelected
= mxFontCharMap
->GetIndexFromChar(cNext
);
436 if (tmpSelected
< 0 || (cChar
!= cNext
))
438 tmpSelected
= - 1; // mark as invalid
445 if ( tmpSelected
>= 0 )
447 SelectIndex( tmpSelected
, true );
448 aPreSelectHdl
.Call( this );
454 void SvxShowCharSet::Paint(vcl::RenderContext
& rRenderContext
, const tools::Rectangle
&)
456 InitSettings(rRenderContext
);
457 RecalculateFont(rRenderContext
);
458 DrawChars_Impl(rRenderContext
, FirstInView(), LastInView());
461 void SvxShowCharSet::SetFont( const vcl::Font
& rFont
)
464 mbRecalculateFont
= true;
468 void SvxShowCharSet::DeSelect()
473 // stretch a grid rectangle if it's at the edge to fill unused space
474 tools::Rectangle
SvxShowCharSet::getGridRectangle(const Point
&rPointUL
, const Size
&rOutputSize
) const
476 tools::Long x
= rPointUL
.X() - 1;
477 tools::Long y
= rPointUL
.Y() - 1;
478 Point
aPointUL(x
+1, y
+1);
479 Size
aGridSize(nX
-1, nY
-1);
481 tools::Long nXDistFromLeft
= x
- m_nXGap
;
482 if (nXDistFromLeft
<= 1)
485 aGridSize
.AdjustWidth(m_nXGap
+ nXDistFromLeft
);
487 tools::Long nXDistFromRight
= rOutputSize
.Width() - m_nXGap
- nX
- x
;
488 if (nXDistFromRight
<= 1)
489 aGridSize
.AdjustWidth(m_nXGap
+ nXDistFromRight
);
491 tools::Long nXDistFromTop
= y
- m_nYGap
;
492 if (nXDistFromTop
<= 1)
495 aGridSize
.AdjustHeight(m_nYGap
+ nXDistFromTop
);
497 tools::Long nXDistFromBottom
= rOutputSize
.Height() - m_nYGap
- nY
- y
;
498 if (nXDistFromBottom
<= 1)
499 aGridSize
.AdjustHeight(m_nYGap
+ nXDistFromBottom
);
501 return tools::Rectangle(aPointUL
, aGridSize
);
504 void SvxShowCharSet::DrawChars_Impl(vcl::RenderContext
& rRenderContext
, int n1
, int n2
)
506 if (n1
> LastInView() || n2
< FirstInView())
509 Size
aOutputSize(GetOutputSizePixel());
511 const StyleSettings
& rStyleSettings
= Application::GetSettings().GetStyleSettings();
512 const Color
aWindowTextColor(rStyleSettings
.GetFieldTextColor());
513 Color
aHighlightColor(rStyleSettings
.GetHighlightColor());
514 Color
aHighlightTextColor(rStyleSettings
.GetHighlightTextColor());
515 Color
aFaceColor(rStyleSettings
.GetFaceColor());
516 Color
aLightColor(rStyleSettings
.GetLightColor());
517 Color
aShadowColor(rStyleSettings
.GetShadowColor());
520 rRenderContext
.SetLineColor(aShadowColor
);
521 for (i
= 1; i
< COLUMN_COUNT
; ++i
)
523 rRenderContext
.DrawLine(Point(nX
* i
+ m_nXGap
, 0),
524 Point(nX
* i
+ m_nXGap
, aOutputSize
.Height()));
526 for (i
= 1; i
< ROW_COUNT
; ++i
)
528 rRenderContext
.DrawLine(Point(0, nY
* i
+ m_nYGap
),
529 Point(aOutputSize
.Width(), nY
* i
+ m_nYGap
));
532 int nTextHeight
= rRenderContext
.GetTextHeight();
533 tools::Rectangle aBoundRect
;
534 for (i
= n1
; i
<= n2
; ++i
)
536 Point pix
= MapIndexToPixel(i
);
540 sal_UCS4 nChar
= mxFontCharMap
->GetCharFromIndex(i
);
541 OUString
aCharStr(&nChar
, 1);
542 int nTextWidth
= rRenderContext
.GetTextWidth(aCharStr
);
543 int tx
= x
+ (nX
- nTextWidth
+ 1) / 2;
544 int ty
= y
+ (nY
- nTextHeight
+ 1) / 2;
545 Point
aPointTxTy(tx
, ty
);
547 // adjust position before it gets out of bounds
548 if (rRenderContext
.GetTextBoundRect(aBoundRect
, aCharStr
) && !aBoundRect
.IsEmpty())
550 // zero advance width => use ink width to center glyph
553 aPointTxTy
.setX( x
- aBoundRect
.Left() + (nX
- aBoundRect
.GetWidth() + 1) / 2 );
556 aBoundRect
+= aPointTxTy
;
558 // shift back vertically if needed
559 int nYLDelta
= aBoundRect
.Top() - y
;
560 int nYHDelta
= (y
+ nY
) - aBoundRect
.Bottom();
562 aPointTxTy
.AdjustY( -(nYLDelta
- 1) );
563 else if (nYHDelta
<= 0)
564 aPointTxTy
.AdjustY(nYHDelta
- 1 );
566 // shift back horizontally if needed
567 int nXLDelta
= aBoundRect
.Left() - x
;
568 int nXHDelta
= (x
+ nX
) - aBoundRect
.Right();
570 aPointTxTy
.AdjustX( -(nXLDelta
- 1) );
571 else if (nXHDelta
<= 0)
572 aPointTxTy
.AdjustX(nXHDelta
- 1 );
575 // tdf#109214 - highlight the favorite characters
576 if (isFavChar(aCharStr
, mxVirDev
->GetFont().GetFamilyName()))
578 const Color aLineCol
= rRenderContext
.GetLineColor();
579 rRenderContext
.SetLineColor(aHighlightColor
);
580 rRenderContext
.SetFillColor(COL_TRANSPARENT
);
582 rRenderContext
.DrawRect(tools::Rectangle(Point(x
- 1, y
- 1), Size(nX
+ 3, nY
+ 3)), 1, 1);
584 rRenderContext
.DrawRect(tools::Rectangle(Point(x
, y
), Size(nX
+ 1, nY
+ 1)), 1, 1);
585 rRenderContext
.SetLineColor(aLineCol
);
588 Color aTextCol
= rRenderContext
.GetTextColor();
589 if (i
!= nSelectedIndex
)
591 rRenderContext
.SetTextColor(aWindowTextColor
);
592 rRenderContext
.DrawText(aPointTxTy
, aCharStr
);
596 Color aLineCol
= rRenderContext
.GetLineColor();
597 Color aFillCol
= rRenderContext
.GetFillColor();
598 rRenderContext
.SetLineColor();
599 Point
aPointUL(x
+ 1, y
+ 1);
602 rRenderContext
.SetFillColor(aHighlightColor
);
603 rRenderContext
.DrawRect(getGridRectangle(aPointUL
, aOutputSize
));
605 rRenderContext
.SetTextColor(aHighlightTextColor
);
606 rRenderContext
.DrawText(aPointTxTy
, aCharStr
);
610 rRenderContext
.SetFillColor(aFaceColor
);
611 rRenderContext
.DrawRect(getGridRectangle(aPointUL
, aOutputSize
));
613 rRenderContext
.SetLineColor(aLightColor
);
614 rRenderContext
.DrawLine(aPointUL
, Point(x
+ nX
- 1, y
+ 1));
615 rRenderContext
.DrawLine(aPointUL
, Point(x
+ 1, y
+ nY
- 1));
617 rRenderContext
.SetLineColor(aShadowColor
);
618 rRenderContext
.DrawLine(Point(x
+ 1, y
+ nY
- 1), Point(x
+ nX
- 1, y
+ nY
- 1));
619 rRenderContext
.DrawLine(Point(x
+ nX
- 1, y
+ nY
- 1), Point(x
+ nX
- 1, y
+ 1));
621 rRenderContext
.DrawText(aPointTxTy
, aCharStr
);
623 rRenderContext
.SetLineColor(aLineCol
);
624 rRenderContext
.SetFillColor(aFillCol
);
626 rRenderContext
.SetTextColor(aTextCol
);
629 // tdf#141319 - mark empty/unused cells
630 if (n2
- n1
< ROW_COUNT
* COLUMN_COUNT
)
632 rRenderContext
.SetFillColor(rStyleSettings
.GetDisableColor());
633 for (i
= n2
- n1
+ 1; i
< ROW_COUNT
* COLUMN_COUNT
; i
++)
635 rRenderContext
.DrawRect(
636 tools::Rectangle(MapIndexToPixel(i
+ n1
), Size(nX
+ 2, nY
+ 2)));
642 void SvxShowCharSet::InitSettings(vcl::RenderContext
& rRenderContext
)
644 const StyleSettings
& rStyleSettings
= rRenderContext
.GetSettings().GetStyleSettings();
646 if (mbUpdateForeground
)
648 rRenderContext
.SetTextColor(rStyleSettings
.GetDialogTextColor());
649 mbUpdateForeground
= false;
652 if (mbUpdateBackground
)
654 rRenderContext
.SetBackground(rStyleSettings
.GetWindowColor());
655 rRenderContext
.Erase();
656 mbUpdateBackground
= false;
659 vcl::Font
aFont(maFont
);
660 aFont
.SetWeight(WEIGHT_LIGHT
);
661 aFont
.SetAlignment(ALIGN_TOP
);
662 aFont
.SetFontSize(maFontSize
);
663 aFont
.SetTransparent(true);
664 rRenderContext
.SetFont(aFont
);
667 sal_UCS4
SvxShowCharSet::GetSelectCharacter() const
669 if( nSelectedIndex
>= 0 )
670 getSelectedChar() = mxFontCharMap
->GetCharFromIndex( nSelectedIndex
);
671 return getSelectedChar();
675 void SvxShowCharSet::RecalculateFont(vcl::RenderContext
& rRenderContext
)
677 if (!mbRecalculateFont
)
680 // save last selected unicode
681 if (nSelectedIndex
>= 0)
682 getSelectedChar() = mxFontCharMap
->GetCharFromIndex(nSelectedIndex
);
684 Size
aSize(GetOutputSizePixel());
686 vcl::Font aFont
= maFont
;
687 aFont
.SetWeight(WEIGHT_LIGHT
);
688 aFont
.SetAlignment(ALIGN_TOP
);
689 int nFontHeight
= (aSize
.Height() - 5) * 2 / (3 * ROW_COUNT
);
690 maFontSize
= rRenderContext
.PixelToLogic(Size(0, nFontHeight
));
691 aFont
.SetFontSize(maFontSize
);
692 aFont
.SetTransparent(true);
693 rRenderContext
.SetFont(aFont
);
694 rRenderContext
.GetFontCharMap(mxFontCharMap
);
696 getFavCharacterList();
698 nX
= aSize
.Width() / COLUMN_COUNT
;
699 nY
= aSize
.Height() / ROW_COUNT
;
701 const int nLastRow
= (mxFontCharMap
->GetCharCount() - 1 + COLUMN_COUNT
) / COLUMN_COUNT
;
702 mxScrollArea
->vadjustment_configure(mxScrollArea
->vadjustment_get_value(), 0, nLastRow
, 1, ROW_COUNT
- 1, ROW_COUNT
);
704 // restore last selected unicode
705 int nMapIndex
= mxFontCharMap
->GetIndexFromChar(getSelectedChar());
706 if (nMapIndex
!= nSelectedIndex
)
707 SelectIndex(nMapIndex
);
709 // rearrange CharSet element in sync with nX- and nY-multiples
710 Size
aDrawSize(nX
* COLUMN_COUNT
, nY
* ROW_COUNT
);
711 m_nXGap
= (aSize
.Width() - aDrawSize
.Width()) / 2;
712 m_nYGap
= (aSize
.Height() - aDrawSize
.Height()) / 2;
714 mbRecalculateFont
= false;
717 void SvxShowCharSet::SelectIndex(int nNewIndex
, bool bFocus
)
719 if (!mxFontCharMap
.is())
720 RecalculateFont(*mxVirDev
);
724 // need to scroll see closest unicode
725 sal_uInt32 cPrev
= mxFontCharMap
->GetPrevChar( getSelectedChar() );
726 int nMapIndex
= mxFontCharMap
->GetIndexFromChar( cPrev
);
727 int nNewPos
= nMapIndex
/ COLUMN_COUNT
;
728 mxScrollArea
->vadjustment_set_value(nNewPos
);
729 nSelectedIndex
= bFocus
? nMapIndex
+1 : -1;
732 else if( nNewIndex
< FirstInView() )
734 // need to scroll up to see selected item
735 int nOldPos
= mxScrollArea
->vadjustment_get_value();
736 int nDelta
= (FirstInView() - nNewIndex
+ COLUMN_COUNT
-1) / COLUMN_COUNT
;
737 mxScrollArea
->vadjustment_set_value(nOldPos
- nDelta
);
738 nSelectedIndex
= nNewIndex
;
741 else if( nNewIndex
> LastInView() )
743 // need to scroll down to see selected item
744 int nOldPos
= mxScrollArea
->vadjustment_get_value();
745 int nDelta
= (nNewIndex
- LastInView() + COLUMN_COUNT
) / COLUMN_COUNT
;
746 mxScrollArea
->vadjustment_set_value(nOldPos
+ nDelta
);
747 if( nNewIndex
< mxFontCharMap
->GetCharCount() )
749 nSelectedIndex
= nNewIndex
;
752 else if (nOldPos
!= mxScrollArea
->vadjustment_get_value())
759 nSelectedIndex
= nNewIndex
;
763 if( nSelectedIndex
>= 0 )
765 getSelectedChar() = mxFontCharMap
->GetCharFromIndex( nSelectedIndex
);
766 #if !ENABLE_WASM_STRIP_ACCESSIBILITY
767 if( m_xAccessible
.is() )
769 svx::SvxShowCharSetItem
* pItem
= ImplGetItem(nSelectedIndex
);
770 // Don't fire the focus event.
772 m_xAccessible
->fireEvent( AccessibleEventId::ACTIVE_DESCENDANT_CHANGED
, Any(), Any(pItem
->GetAccessible()) ); // this call assures that m_pItem is set
774 m_xAccessible
->fireEvent( AccessibleEventId::ACTIVE_DESCENDANT_CHANGED_NOFOCUS
, Any(), Any(pItem
->GetAccessible()) ); // this call assures that m_pItem is set
776 assert(pItem
->m_xItem
.is() && "No accessible created!");
777 Any aOldAny
, aNewAny
;
778 aNewAny
<<= AccessibleStateType::FOCUSED
;
779 // Don't fire the focus event.
781 pItem
->m_xItem
->fireEvent( AccessibleEventId::STATE_CHANGED
, aOldAny
, aNewAny
);
783 aNewAny
<<= AccessibleStateType::SELECTED
;
784 pItem
->m_xItem
->fireEvent( AccessibleEventId::STATE_CHANGED
, aOldAny
, aNewAny
);
786 aSelectHdl
.Call(this);
789 aHighHdl
.Call( this );
792 void SvxShowCharSet::OutputIndex( int nNewIndex
)
794 SelectIndex( nNewIndex
, true );
795 aSelectHdl
.Call( this );
799 void SvxShowCharSet::SelectCharacter( sal_UCS4 cNew
)
801 if ( !mxFontCharMap
.is() )
802 RecalculateFont(*mxVirDev
);
804 // get next available char of current font
805 sal_UCS4 cNext
= mxFontCharMap
->GetNextChar( (cNew
> 0) ? cNew
- 1 : cNew
);
807 int nMapIndex
= mxFontCharMap
->GetIndexFromChar( cNext
);
808 SelectIndex( nMapIndex
);
809 // move selected item to top row if not in focus
810 mxScrollArea
->vadjustment_set_value(nMapIndex
/ COLUMN_COUNT
);
814 IMPL_LINK_NOARG(SvxShowCharSet
, VscrollHdl
, weld::ScrolledWindow
&, void)
816 if( nSelectedIndex
< FirstInView() )
818 SelectIndex( FirstInView() + (nSelectedIndex
% COLUMN_COUNT
) );
820 else if( nSelectedIndex
> LastInView() )
822 #if !ENABLE_WASM_STRIP_ACCESSIBILITY
823 if( m_xAccessible
.is() )
825 css::uno::Any aOldAny
, aNewAny
;
826 int nLast
= LastInView();
827 for ( ; nLast
!= nSelectedIndex
; ++nLast
)
829 aOldAny
<<= ImplGetItem(nLast
)->GetAccessible();
830 m_xAccessible
->fireEvent( AccessibleEventId::CHILD
, aOldAny
, aNewAny
);
834 SelectIndex( (LastInView() - COLUMN_COUNT
+ 1) + (nSelectedIndex
% COLUMN_COUNT
) );
840 SvxShowCharSet::~SvxShowCharSet()
842 #if !ENABLE_WASM_STRIP_ACCESSIBILITY
843 if (m_xAccessible
.is())
846 m_xAccessible
->clearCharSetControl();
847 m_xAccessible
.clear();
852 css::uno::Reference
< XAccessible
> SvxShowCharSet::CreateAccessible()
854 #if !ENABLE_WASM_STRIP_ACCESSIBILITY
855 OSL_ENSURE(!m_xAccessible
.is(),"Accessible already created!");
856 m_xAccessible
= new svx::SvxShowCharSetAcc(this);
858 return m_xAccessible
;
861 svx::SvxShowCharSetItem
* SvxShowCharSet::ImplGetItem( int _nPos
)
863 ItemsMap::iterator aFind
= m_aItems
.find(_nPos
);
864 if ( aFind
== m_aItems
.end() )
866 #if !ENABLE_WASM_STRIP_ACCESSIBILITY
867 OSL_ENSURE(m_xAccessible
.is(), "Who wants to create a child of my table without a parent?");
869 auto xItem
= std::make_shared
<svx::SvxShowCharSetItem
>(*this,
870 m_xAccessible
.get(), sal::static_int_cast
< sal_uInt16
>(_nPos
));
871 aFind
= m_aItems
.emplace(_nPos
, xItem
).first
;
873 buf
.appendUtf32( mxFontCharMap
->GetCharFromIndex( _nPos
) );
874 aFind
->second
->maText
= buf
.makeStringAndClear();
875 Point pix
= MapIndexToPixel( _nPos
);
876 aFind
->second
->maRect
= tools::Rectangle( Point( pix
.X() + 1, pix
.Y() + 1 ), Size(nX
-1,nY
-1) );
879 return aFind
->second
.get();
882 sal_Int32
SvxShowCharSet::getMaxCharCount() const
884 return mxFontCharMap
->GetCharCount();
887 FontCharMapRef
const & SvxShowCharSet::GetFontCharMap()
889 RecalculateFont(*mxVirDev
);
890 return mxFontCharMap
;
893 // TODO: should be moved into Font Attributes stuff
894 // we let it mature here though because it is currently the only use
896 SubsetMap::SubsetMap( const FontCharMapRef
& rxFontCharMap
)
899 ApplyCharMap(rxFontCharMap
);
902 const SubsetVec
& SubsetMap::GetSubsetMap() const
907 const Subset
* SubsetMap::GetSubsetByUnicode( sal_UCS4 cChar
) const
909 for (auto const& subset
: maSubsets
)
910 if( (subset
.GetRangeMin() <= cChar
) && (cChar
<= subset
.GetRangeMax()) )
915 inline Subset::Subset(sal_UCS4 nMin
, sal_UCS4 nMax
, OUString aName
)
916 : mnRangeMin(nMin
), mnRangeMax(nMax
), maRangeName(std::move(aName
))
920 void SubsetMap::InitList()
922 static SubsetVec s_aAllSubsets
= []()
924 SubsetVec aAllSubsets
;
925 //I wish icu had a way to give me the block ranges
926 for (int i
= UBLOCK_BASIC_LATIN
; i
< UBLOCK_COUNT
; ++i
)
928 UBlockCode eBlock
= static_cast<UBlockCode
>(i
);
931 case UBLOCK_NO_BLOCK
:
932 case UBLOCK_INVALID_CODE
:
934 case UBLOCK_HIGH_SURROGATES
:
935 case UBLOCK_HIGH_PRIVATE_USE_SURROGATES
:
936 case UBLOCK_LOW_SURROGATES
:
938 case UBLOCK_BASIC_LATIN
:
939 aAllSubsets
.emplace_back( 0x0000, 0x007F, SvxResId(RID_SUBSETSTR_BASIC_LATIN
) );
941 case UBLOCK_LATIN_1_SUPPLEMENT
:
942 aAllSubsets
.emplace_back( 0x0080, 0x00FF, SvxResId(RID_SUBSETSTR_LATIN_1
) );
944 case UBLOCK_LATIN_EXTENDED_A
:
945 aAllSubsets
.emplace_back( 0x0100, 0x017F, SvxResId(RID_SUBSETSTR_LATIN_EXTENDED_A
) );
947 case UBLOCK_LATIN_EXTENDED_B
:
948 aAllSubsets
.emplace_back( 0x0180, 0x024F, SvxResId(RID_SUBSETSTR_LATIN_EXTENDED_B
) );
950 case UBLOCK_IPA_EXTENSIONS
:
951 aAllSubsets
.emplace_back( 0x0250, 0x02AF, SvxResId(RID_SUBSETSTR_IPA_EXTENSIONS
) );
953 case UBLOCK_SPACING_MODIFIER_LETTERS
:
954 aAllSubsets
.emplace_back( 0x02B0, 0x02FF, SvxResId(RID_SUBSETSTR_SPACING_MODIFIERS
) );
956 case UBLOCK_COMBINING_DIACRITICAL_MARKS
:
957 aAllSubsets
.emplace_back( 0x0300, 0x036F, SvxResId(RID_SUBSETSTR_COMB_DIACRITICAL
) );
960 aAllSubsets
.emplace_back( 0x0370, 0x03FF, SvxResId(RID_SUBSETSTR_BASIC_GREEK
) );
962 case UBLOCK_CYRILLIC
:
963 aAllSubsets
.emplace_back( 0x0400, 0x04FF, SvxResId(RID_SUBSETSTR_CYRILLIC
) );
965 case UBLOCK_ARMENIAN
:
966 aAllSubsets
.emplace_back( 0x0530, 0x058F, SvxResId(RID_SUBSETSTR_ARMENIAN
) );
969 aAllSubsets
.emplace_back( 0x0590, 0x05FF, SvxResId(RID_SUBSETSTR_BASIC_HEBREW
) );
972 aAllSubsets
.emplace_back( 0x0600, 0x065F, SvxResId(RID_SUBSETSTR_BASIC_ARABIC
) );
975 aAllSubsets
.emplace_back( 0x0700, 0x074F, SvxResId(RID_SUBSETSTR_SYRIAC
) );
978 aAllSubsets
.emplace_back( 0x0780, 0x07BF, SvxResId(RID_SUBSETSTR_THAANA
) );
980 case UBLOCK_DEVANAGARI
:
981 aAllSubsets
.emplace_back( 0x0900, 0x097F, SvxResId(RID_SUBSETSTR_DEVANAGARI
) );
984 aAllSubsets
.emplace_back( 0x0980, 0x09FF, SvxResId(RID_SUBSETSTR_BENGALI
) );
986 case UBLOCK_GURMUKHI
:
987 aAllSubsets
.emplace_back( 0x0A00, 0x0A7F, SvxResId(RID_SUBSETSTR_GURMUKHI
) );
989 case UBLOCK_GUJARATI
:
990 aAllSubsets
.emplace_back( 0x0A80, 0x0AFF, SvxResId(RID_SUBSETSTR_GUJARATI
) );
993 aAllSubsets
.emplace_back( 0x0B00, 0x0B7F, SvxResId(RID_SUBSETSTR_ODIA
) );
996 aAllSubsets
.emplace_back( 0x0B80, 0x0BFF, SvxResId(RID_SUBSETSTR_TAMIL
) );
999 aAllSubsets
.emplace_back( 0x0C00, 0x0C7F, SvxResId(RID_SUBSETSTR_TELUGU
) );
1001 case UBLOCK_KANNADA
:
1002 aAllSubsets
.emplace_back( 0x0C80, 0x0CFF, SvxResId(RID_SUBSETSTR_KANNADA
) );
1004 case UBLOCK_MALAYALAM
:
1005 aAllSubsets
.emplace_back( 0x0D00, 0x0D7F, SvxResId(RID_SUBSETSTR_MALAYALAM
) );
1007 case UBLOCK_SINHALA
:
1008 aAllSubsets
.emplace_back( 0x0D80, 0x0DFF, SvxResId(RID_SUBSETSTR_SINHALA
) );
1011 aAllSubsets
.emplace_back( 0x0E00, 0x0E7F, SvxResId(RID_SUBSETSTR_THAI
) );
1014 aAllSubsets
.emplace_back( 0x0E80, 0x0EFF, SvxResId(RID_SUBSETSTR_LAO
) );
1016 case UBLOCK_TIBETAN
:
1017 aAllSubsets
.emplace_back( 0x0F00, 0x0FBF, SvxResId(RID_SUBSETSTR_TIBETAN
) );
1019 case UBLOCK_MYANMAR
:
1020 aAllSubsets
.emplace_back( 0x1000, 0x109F, SvxResId(RID_SUBSETSTR_MYANMAR
) );
1022 case UBLOCK_GEORGIAN
:
1023 aAllSubsets
.emplace_back( 0x10A0, 0x10FF, SvxResId(RID_SUBSETSTR_BASIC_GEORGIAN
) );
1025 case UBLOCK_HANGUL_JAMO
:
1026 aAllSubsets
.emplace_back( 0x1100, 0x11FF, SvxResId(RID_SUBSETSTR_HANGUL_JAMO
) );
1028 case UBLOCK_ETHIOPIC
:
1029 aAllSubsets
.emplace_back( 0x1200, 0x137F, SvxResId(RID_SUBSETSTR_ETHIOPIC
) );
1031 case UBLOCK_CHEROKEE
:
1032 aAllSubsets
.emplace_back( 0x13A0, 0x13FF, SvxResId(RID_SUBSETSTR_CHEROKEE
) );
1034 case UBLOCK_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS
:
1035 aAllSubsets
.emplace_back( 0x1400, 0x167F, SvxResId(RID_SUBSETSTR_CANADIAN_ABORIGINAL
) );
1038 aAllSubsets
.emplace_back( 0x1680, 0x169F, SvxResId(RID_SUBSETSTR_OGHAM
) );
1041 aAllSubsets
.emplace_back( 0x16A0, 0x16F0, SvxResId(RID_SUBSETSTR_RUNIC
) );
1044 aAllSubsets
.emplace_back( 0x1780, 0x17FF, SvxResId(RID_SUBSETSTR_KHMER
) );
1046 case UBLOCK_MONGOLIAN
:
1047 aAllSubsets
.emplace_back( 0x1800, 0x18AF, SvxResId(RID_SUBSETSTR_MONGOLIAN
) );
1049 case UBLOCK_LATIN_EXTENDED_ADDITIONAL
:
1050 aAllSubsets
.emplace_back( 0x1E00, 0x1EFF, SvxResId(RID_SUBSETSTR_LATIN_EXTENDED_ADDS
) );
1052 case UBLOCK_GREEK_EXTENDED
:
1053 aAllSubsets
.emplace_back( 0x1F00, 0x1FFF, SvxResId(RID_SUBSETSTR_GREEK_EXTENDED
) );
1055 case UBLOCK_GENERAL_PUNCTUATION
:
1056 aAllSubsets
.emplace_back( 0x2000, 0x206F, SvxResId(RID_SUBSETSTR_GENERAL_PUNCTUATION
) );
1058 case UBLOCK_SUPERSCRIPTS_AND_SUBSCRIPTS
:
1059 aAllSubsets
.emplace_back( 0x2070, 0x209F, SvxResId(RID_SUBSETSTR_SUB_SUPER_SCRIPTS
) );
1061 case UBLOCK_CURRENCY_SYMBOLS
:
1062 aAllSubsets
.emplace_back( 0x20A0, 0x20CF, SvxResId(RID_SUBSETSTR_CURRENCY_SYMBOLS
) );
1064 case UBLOCK_COMBINING_MARKS_FOR_SYMBOLS
:
1065 aAllSubsets
.emplace_back( 0x20D0, 0x20FF, SvxResId(RID_SUBSETSTR_COMB_DIACRITIC_SYMS
) );
1067 case UBLOCK_LETTERLIKE_SYMBOLS
:
1068 aAllSubsets
.emplace_back( 0x2100, 0x214F, SvxResId(RID_SUBSETSTR_LETTERLIKE_SYMBOLS
) );
1070 case UBLOCK_NUMBER_FORMS
:
1071 aAllSubsets
.emplace_back( 0x2150, 0x218F, SvxResId(RID_SUBSETSTR_NUMBER_FORMS
) );
1074 aAllSubsets
.emplace_back( 0x2190, 0x21FF, SvxResId(RID_SUBSETSTR_ARROWS
) );
1076 case UBLOCK_MATHEMATICAL_OPERATORS
:
1077 aAllSubsets
.emplace_back( 0x2200, 0x22FF, SvxResId(RID_SUBSETSTR_MATH_OPERATORS
) );
1079 case UBLOCK_MISCELLANEOUS_TECHNICAL
:
1080 aAllSubsets
.emplace_back( 0x2300, 0x23FF, SvxResId(RID_SUBSETSTR_MISC_TECHNICAL
) );
1082 case UBLOCK_CONTROL_PICTURES
:
1083 aAllSubsets
.emplace_back( 0x2400, 0x243F, SvxResId(RID_SUBSETSTR_CONTROL_PICTURES
) );
1085 case UBLOCK_OPTICAL_CHARACTER_RECOGNITION
:
1086 aAllSubsets
.emplace_back( 0x2440, 0x245F, SvxResId(RID_SUBSETSTR_OPTICAL_CHAR_REC
) );
1088 case UBLOCK_ENCLOSED_ALPHANUMERICS
:
1089 aAllSubsets
.emplace_back( 0x2460, 0x24FF, SvxResId(RID_SUBSETSTR_ENCLOSED_ALPHANUM
) );
1091 case UBLOCK_BOX_DRAWING
:
1092 aAllSubsets
.emplace_back( 0x2500, 0x257F, SvxResId(RID_SUBSETSTR_BOX_DRAWING
) );
1094 case UBLOCK_BLOCK_ELEMENTS
:
1095 aAllSubsets
.emplace_back( 0x2580, 0x259F, SvxResId(RID_SUBSETSTR_BLOCK_ELEMENTS
) );
1097 case UBLOCK_GEOMETRIC_SHAPES
:
1098 aAllSubsets
.emplace_back( 0x25A0, 0x25FF, SvxResId(RID_SUBSETSTR_GEOMETRIC_SHAPES
) );
1100 case UBLOCK_MISCELLANEOUS_SYMBOLS
:
1101 aAllSubsets
.emplace_back( 0x2600, 0x26FF, SvxResId(RID_SUBSETSTR_MISC_DINGBATS
) );
1103 case UBLOCK_DINGBATS
:
1104 aAllSubsets
.emplace_back( 0x2700, 0x27BF, SvxResId(RID_SUBSETSTR_DINGBATS
) );
1106 case UBLOCK_BRAILLE_PATTERNS
:
1107 aAllSubsets
.emplace_back( 0x2800, 0x28FF, SvxResId(RID_SUBSETSTR_BRAILLE_PATTERNS
) );
1109 case UBLOCK_CJK_RADICALS_SUPPLEMENT
:
1110 aAllSubsets
.emplace_back( 0x2E80, 0x2EFF, SvxResId(RID_SUBSETSTR_CJK_RADICAL_SUPPL
) );
1112 case UBLOCK_KANGXI_RADICALS
:
1113 aAllSubsets
.emplace_back( 0x2F00, 0x2FDF, SvxResId(RID_SUBSETSTR_KANGXI_RADICALS
) );
1115 case UBLOCK_IDEOGRAPHIC_DESCRIPTION_CHARACTERS
:
1116 aAllSubsets
.emplace_back( 0x2FF0, 0x2FFF, SvxResId(RID_SUBSETSTR_IDEO_DESC_CHARS
) );
1118 case UBLOCK_CJK_SYMBOLS_AND_PUNCTUATION
:
1119 aAllSubsets
.emplace_back( 0x3000, 0x303F, SvxResId(RID_SUBSETSTR_CJK_SYMS_PUNCTUATION
) );
1121 case UBLOCK_HIRAGANA
:
1122 aAllSubsets
.emplace_back( 0x3040, 0x309F, SvxResId(RID_SUBSETSTR_HIRAGANA
) );
1124 case UBLOCK_KATAKANA
:
1125 aAllSubsets
.emplace_back( 0x30A0, 0x30FF, SvxResId(RID_SUBSETSTR_KATAKANA
) );
1127 case UBLOCK_BOPOMOFO
:
1128 aAllSubsets
.emplace_back( 0x3100, 0x312F, SvxResId(RID_SUBSETSTR_BOPOMOFO
) );
1130 case UBLOCK_HANGUL_COMPATIBILITY_JAMO
:
1131 aAllSubsets
.emplace_back( 0x3130, 0x318F, SvxResId(RID_SUBSETSTR_HANGUL_COMPAT_JAMO
) );
1134 aAllSubsets
.emplace_back( 0x3190, 0x319F, SvxResId(RID_SUBSETSTR_KANBUN
) );
1136 case UBLOCK_BOPOMOFO_EXTENDED
:
1137 aAllSubsets
.emplace_back( 0x31A0, 0x31BF, SvxResId(RID_SUBSETSTR_BOPOMOFO_EXTENDED
) );
1139 case UBLOCK_ENCLOSED_CJK_LETTERS_AND_MONTHS
:
1140 aAllSubsets
.emplace_back( 0x3200, 0x32FF, SvxResId(RID_SUBSETSTR_ENCLOSED_CJK_LETTERS
) );
1142 case UBLOCK_CJK_COMPATIBILITY
:
1143 aAllSubsets
.emplace_back( 0x3300, 0x33FF, SvxResId(RID_SUBSETSTR_CJK_COMPATIBILITY
) );
1145 case UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A
:
1146 aAllSubsets
.emplace_back( 0x3400, 0x4DBF, SvxResId(RID_SUBSETSTR_CJK_EXT_A_UNIFIED_IDGRAPH
) );
1148 case UBLOCK_CJK_UNIFIED_IDEOGRAPHS
:
1149 aAllSubsets
.emplace_back( 0x4E00, 0x9FA5, SvxResId(RID_SUBSETSTR_CJK_UNIFIED_IDGRAPH
) );
1151 case UBLOCK_YI_SYLLABLES
:
1152 aAllSubsets
.emplace_back( 0xA000, 0xA48F, SvxResId(RID_SUBSETSTR_YI_SYLLABLES
) );
1154 case UBLOCK_YI_RADICALS
:
1155 aAllSubsets
.emplace_back( 0xA490, 0xA4CF, SvxResId(RID_SUBSETSTR_YI_RADICALS
) );
1157 case UBLOCK_HANGUL_SYLLABLES
:
1158 aAllSubsets
.emplace_back( 0xAC00, 0xD7AF, SvxResId(RID_SUBSETSTR_HANGUL
) );
1160 case UBLOCK_PRIVATE_USE_AREA
:
1161 aAllSubsets
.emplace_back( 0xE000, 0xF8FF, SvxResId(RID_SUBSETSTR_PRIVATE_USE_AREA
) );
1163 case UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS
:
1164 aAllSubsets
.emplace_back( 0xF900, 0xFAFF, SvxResId(RID_SUBSETSTR_CJK_COMPAT_IDGRAPHS
) );
1166 case UBLOCK_ALPHABETIC_PRESENTATION_FORMS
:
1167 aAllSubsets
.emplace_back( 0xFB00, 0xFB4F, SvxResId(RID_SUBSETSTR_ALPHA_PRESENTATION
) );
1169 case UBLOCK_ARABIC_PRESENTATION_FORMS_A
:
1170 aAllSubsets
.emplace_back( 0xFB50, 0xFDFF, SvxResId(RID_SUBSETSTR_ARABIC_PRESENT_A
) );
1172 case UBLOCK_COMBINING_HALF_MARKS
:
1173 aAllSubsets
.emplace_back( 0xFE20, 0xFE2F, SvxResId(RID_SUBSETSTR_COMBINING_HALF_MARKS
) );
1175 case UBLOCK_CJK_COMPATIBILITY_FORMS
:
1176 aAllSubsets
.emplace_back( 0xFE30, 0xFE4F, SvxResId(RID_SUBSETSTR_CJK_COMPAT_FORMS
) );
1178 case UBLOCK_SMALL_FORM_VARIANTS
:
1179 aAllSubsets
.emplace_back( 0xFE50, 0xFE6F, SvxResId(RID_SUBSETSTR_SMALL_FORM_VARIANTS
) );
1181 case UBLOCK_ARABIC_PRESENTATION_FORMS_B
:
1182 aAllSubsets
.emplace_back( 0xFE70, 0xFEFF, SvxResId(RID_SUBSETSTR_ARABIC_PRESENT_B
) );
1184 case UBLOCK_SPECIALS
:
1185 aAllSubsets
.emplace_back( 0xFFF0, 0xFFFF, SvxResId(RID_SUBSETSTR_SPECIALS
) );
1187 case UBLOCK_HALFWIDTH_AND_FULLWIDTH_FORMS
:
1188 aAllSubsets
.emplace_back( 0xFF00, 0xFFEF, SvxResId(RID_SUBSETSTR_HALFW_FULLW_FORMS
) );
1190 case UBLOCK_OLD_ITALIC
:
1191 aAllSubsets
.emplace_back( 0x10300, 0x1032F, SvxResId(RID_SUBSETSTR_OLD_ITALIC
) );
1194 aAllSubsets
.emplace_back( 0x10330, 0x1034F, SvxResId(RID_SUBSETSTR_GOTHIC
) );
1196 case UBLOCK_DESERET
:
1197 aAllSubsets
.emplace_back( 0x10400, 0x1044F, SvxResId(RID_SUBSETSTR_DESERET
) );
1199 case UBLOCK_BYZANTINE_MUSICAL_SYMBOLS
:
1200 aAllSubsets
.emplace_back( 0x1D000, 0x1D0FF, SvxResId(RID_SUBSETSTR_BYZANTINE_MUSICAL_SYMBOLS
) );
1202 case UBLOCK_MUSICAL_SYMBOLS
:
1203 aAllSubsets
.emplace_back( 0x1D100, 0x1D1FF, SvxResId(RID_SUBSETSTR_MUSICAL_SYMBOLS
) );
1205 case UBLOCK_MATHEMATICAL_ALPHANUMERIC_SYMBOLS
:
1206 aAllSubsets
.emplace_back( 0x1D400, 0x1D7FF, SvxResId(RID_SUBSETSTR_MATHEMATICAL_ALPHANUMERIC_SYMBOLS
) );
1208 case UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B
:
1209 aAllSubsets
.emplace_back( 0x20000, 0x2A6DF, SvxResId(RID_SUBSETSTR_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B
) );
1211 case UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT
:
1212 aAllSubsets
.emplace_back( 0x2F800, 0x2FA1F, SvxResId(RID_SUBSETSTR_CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT
) );
1215 aAllSubsets
.emplace_back( 0xE0000, 0xE007F, SvxResId(RID_SUBSETSTR_TAGS
) );
1217 case UBLOCK_CYRILLIC_SUPPLEMENTARY
:
1218 aAllSubsets
.emplace_back( 0x0500, 0x052F, SvxResId(RID_SUBSETSTR_CYRILLIC_SUPPLEMENTARY
) );
1220 case UBLOCK_TAGALOG
:
1221 aAllSubsets
.emplace_back( 0x1700, 0x171F, SvxResId(RID_SUBSETSTR_TAGALOG
) );
1223 case UBLOCK_HANUNOO
:
1224 aAllSubsets
.emplace_back( 0x1720, 0x173F, SvxResId(RID_SUBSETSTR_HANUNOO
) );
1227 aAllSubsets
.emplace_back( 0x1740, 0x175F, SvxResId(RID_SUBSETSTR_BUHID
) );
1229 case UBLOCK_TAGBANWA
:
1230 aAllSubsets
.emplace_back( 0x1760, 0x177F, SvxResId(RID_SUBSETSTR_TAGBANWA
) );
1232 case UBLOCK_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A
:
1233 aAllSubsets
.emplace_back( 0x27C0, 0x27EF, SvxResId(RID_SUBSETSTR_MISC_MATH_SYMS_A
) );
1235 case UBLOCK_SUPPLEMENTAL_ARROWS_A
:
1236 aAllSubsets
.emplace_back( 0x27F0, 0x27FF, SvxResId(RID_SUBSETSTR_SUPPL_ARROWS_A
) );
1238 case UBLOCK_SUPPLEMENTAL_ARROWS_B
:
1239 aAllSubsets
.emplace_back( 0x2900, 0x297F, SvxResId(RID_SUBSETSTR_SUPPL_ARROWS_B
) );
1241 case UBLOCK_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B
:
1242 aAllSubsets
.emplace_back( 0x2980, 0x29FF, SvxResId(RID_SUBSETSTR_MISC_MATH_SYMS_B
) );
1244 case UBLOCK_SUPPLEMENTAL_MATHEMATICAL_OPERATORS
:
1245 aAllSubsets
.emplace_back( 0x2A00, 0x2AFF, SvxResId(RID_SUBSETSTR_MISC_MATH_SYMS_B
) );
1247 case UBLOCK_KATAKANA_PHONETIC_EXTENSIONS
:
1248 aAllSubsets
.emplace_back( 0x31F0, 0x31FF, SvxResId(RID_SUBSETSTR_KATAKANA_PHONETIC
) );
1250 case UBLOCK_VARIATION_SELECTORS
:
1251 aAllSubsets
.emplace_back( 0xFE00, 0xFE0F, SvxResId(RID_SUBSETSTR_VARIATION_SELECTORS
) );
1253 case UBLOCK_SUPPLEMENTARY_PRIVATE_USE_AREA_A
:
1254 aAllSubsets
.emplace_back( 0xF0000, 0xFFFFF, SvxResId(RID_SUBSETSTR_SUPPLEMENTARY_PRIVATE_USE_AREA_A
) );
1256 case UBLOCK_SUPPLEMENTARY_PRIVATE_USE_AREA_B
:
1257 aAllSubsets
.emplace_back( 0x100000, 0x10FFFF, SvxResId(RID_SUBSETSTR_SUPPLEMENTARY_PRIVATE_USE_AREA_B
) );
1260 aAllSubsets
.emplace_back( 0x1900, 0x194F, SvxResId(RID_SUBSETSTR_LIMBU
) );
1263 aAllSubsets
.emplace_back( 0x1950, 0x197F, SvxResId(RID_SUBSETSTR_TAI_LE
) );
1265 case UBLOCK_KHMER_SYMBOLS
:
1266 aAllSubsets
.emplace_back( 0x19E0, 0x19FF, SvxResId(RID_SUBSETSTR_KHMER_SYMBOLS
) );
1268 case UBLOCK_PHONETIC_EXTENSIONS
:
1269 aAllSubsets
.emplace_back( 0x1D00, 0x1D7F, SvxResId(RID_SUBSETSTR_PHONETIC_EXTENSIONS
) );
1271 case UBLOCK_MISCELLANEOUS_SYMBOLS_AND_ARROWS
:
1272 aAllSubsets
.emplace_back( 0x2B00, 0x2BFF, SvxResId(RID_SUBSETSTR_MISCELLANEOUS_SYMBOLS_AND_ARROWS
) );
1274 case UBLOCK_YIJING_HEXAGRAM_SYMBOLS
:
1275 aAllSubsets
.emplace_back( 0x4DC0, 0x4DFF, SvxResId(RID_SUBSETSTR_YIJING_HEXAGRAM_SYMBOLS
) );
1277 case UBLOCK_LINEAR_B_SYLLABARY
:
1278 aAllSubsets
.emplace_back( 0x10000, 0x1007F, SvxResId(RID_SUBSETSTR_LINEAR_B_SYLLABARY
) );
1280 case UBLOCK_LINEAR_B_IDEOGRAMS
:
1281 aAllSubsets
.emplace_back( 0x10080, 0x100FF, SvxResId(RID_SUBSETSTR_LINEAR_B_IDEOGRAMS
) );
1283 case UBLOCK_AEGEAN_NUMBERS
:
1284 aAllSubsets
.emplace_back( 0x10100, 0x1013F, SvxResId(RID_SUBSETSTR_AEGEAN_NUMBERS
) );
1286 case UBLOCK_UGARITIC
:
1287 aAllSubsets
.emplace_back( 0x10380, 0x1039F, SvxResId(RID_SUBSETSTR_UGARITIC
) );
1289 case UBLOCK_SHAVIAN
:
1290 aAllSubsets
.emplace_back( 0x10450, 0x1047F, SvxResId(RID_SUBSETSTR_SHAVIAN
) );
1292 case UBLOCK_OSMANYA
:
1293 aAllSubsets
.emplace_back( 0x10480, 0x104AF, SvxResId(RID_SUBSETSTR_OSMANYA
) );
1295 case UBLOCK_CYPRIOT_SYLLABARY
:
1296 aAllSubsets
.emplace_back( 0x10800, 0x1083F, SvxResId(RID_SUBSETSTR_CYPRIOT_SYLLABARY
) );
1298 case UBLOCK_TAI_XUAN_JING_SYMBOLS
:
1299 aAllSubsets
.emplace_back( 0x1D300, 0x1D35F, SvxResId(RID_SUBSETSTR_TAI_XUAN_JING_SYMBOLS
) );
1301 case UBLOCK_VARIATION_SELECTORS_SUPPLEMENT
:
1302 aAllSubsets
.emplace_back( 0xE0100, 0xE01EF, SvxResId(RID_SUBSETSTR_VARIATION_SELECTORS_SUPPLEMENT
) );
1304 case UBLOCK_ANCIENT_GREEK_MUSICAL_NOTATION
:
1305 aAllSubsets
.emplace_back(0x1D200, 0x1D24F, SvxResId(RID_SUBSETSTR_ANCIENT_GREEK_MUSICAL_NOTATION
) );
1307 case UBLOCK_ANCIENT_GREEK_NUMBERS
:
1308 aAllSubsets
.emplace_back(0x10140, 0x1018F , SvxResId(RID_SUBSETSTR_ANCIENT_GREEK_NUMBERS
) );
1310 case UBLOCK_ARABIC_SUPPLEMENT
:
1311 aAllSubsets
.emplace_back(0x0750, 0x077F , SvxResId(RID_SUBSETSTR_ARABIC_SUPPLEMENT
) );
1313 case UBLOCK_BUGINESE
:
1314 aAllSubsets
.emplace_back(0x1A00, 0x1A1F , SvxResId(RID_SUBSETSTR_BUGINESE
) );
1316 case UBLOCK_CJK_STROKES
:
1317 aAllSubsets
.emplace_back( 0x31C0, 0x31EF, SvxResId(RID_SUBSETSTR_CJK_STROKES
) );
1319 case UBLOCK_COMBINING_DIACRITICAL_MARKS_SUPPLEMENT
:
1320 aAllSubsets
.emplace_back( 0x1DC0, 0x1DFF , SvxResId(RID_SUBSETSTR_COMBINING_DIACRITICAL_MARKS_SUPPLEMENT
) );
1323 aAllSubsets
.emplace_back( 0x2C80, 0x2CFF , SvxResId(RID_SUBSETSTR_COPTIC
) );
1325 case UBLOCK_ETHIOPIC_EXTENDED
:
1326 aAllSubsets
.emplace_back( 0x2D80, 0x2DDF , SvxResId(RID_SUBSETSTR_ETHIOPIC_EXTENDED
) );
1328 case UBLOCK_ETHIOPIC_SUPPLEMENT
:
1329 aAllSubsets
.emplace_back( 0x1380, 0x139F, SvxResId(RID_SUBSETSTR_ETHIOPIC_SUPPLEMENT
) );
1331 case UBLOCK_GEORGIAN_SUPPLEMENT
:
1332 aAllSubsets
.emplace_back( 0x2D00, 0x2D2F, SvxResId(RID_SUBSETSTR_GEORGIAN_SUPPLEMENT
) );
1334 case UBLOCK_GLAGOLITIC
:
1335 aAllSubsets
.emplace_back( 0x2C00, 0x2C5F, SvxResId(RID_SUBSETSTR_GLAGOLITIC
) );
1337 case UBLOCK_KHAROSHTHI
:
1338 aAllSubsets
.emplace_back( 0x10A00, 0x10A5F, SvxResId(RID_SUBSETSTR_KHAROSHTHI
) );
1340 case UBLOCK_MODIFIER_TONE_LETTERS
:
1341 aAllSubsets
.emplace_back( 0xA700, 0xA71F, SvxResId(RID_SUBSETSTR_MODIFIER_TONE_LETTERS
) );
1343 case UBLOCK_NEW_TAI_LUE
:
1344 aAllSubsets
.emplace_back( 0x1980, 0x19DF, SvxResId(RID_SUBSETSTR_NEW_TAI_LUE
) );
1346 case UBLOCK_OLD_PERSIAN
:
1347 aAllSubsets
.emplace_back( 0x103A0, 0x103DF, SvxResId(RID_SUBSETSTR_OLD_PERSIAN
) );
1349 case UBLOCK_PHONETIC_EXTENSIONS_SUPPLEMENT
:
1350 aAllSubsets
.emplace_back( 0x1D80, 0x1DBF, SvxResId(RID_SUBSETSTR_PHONETIC_EXTENSIONS_SUPPLEMENT
) );
1352 case UBLOCK_SUPPLEMENTAL_PUNCTUATION
:
1353 aAllSubsets
.emplace_back( 0x2E00, 0x2E7F, SvxResId(RID_SUBSETSTR_SUPPLEMENTAL_PUNCTUATION
) );
1355 case UBLOCK_SYLOTI_NAGRI
:
1356 aAllSubsets
.emplace_back( 0xA800, 0xA82F, SvxResId(RID_SUBSETSTR_SYLOTI_NAGRI
) );
1358 case UBLOCK_TIFINAGH
:
1359 aAllSubsets
.emplace_back( 0x2D30, 0x2D7F, SvxResId(RID_SUBSETSTR_TIFINAGH
) );
1361 case UBLOCK_VERTICAL_FORMS
:
1362 aAllSubsets
.emplace_back( 0xFE10, 0xFE1F, SvxResId(RID_SUBSETSTR_VERTICAL_FORMS
) );
1365 aAllSubsets
.emplace_back( 0x07C0, 0x07FF, SvxResId(RID_SUBSETSTR_NKO
) );
1367 case UBLOCK_BALINESE
:
1368 aAllSubsets
.emplace_back( 0x1B00, 0x1B7F, SvxResId(RID_SUBSETSTR_BALINESE
) );
1370 case UBLOCK_LATIN_EXTENDED_C
:
1371 aAllSubsets
.emplace_back( 0x2C60, 0x2C7F, SvxResId(RID_SUBSETSTR_LATIN_EXTENDED_C
) );
1373 case UBLOCK_LATIN_EXTENDED_D
:
1374 aAllSubsets
.emplace_back( 0xA720, 0xA7FF, SvxResId(RID_SUBSETSTR_LATIN_EXTENDED_D
) );
1376 case UBLOCK_PHAGS_PA
:
1377 aAllSubsets
.emplace_back( 0xA840, 0xA87F, SvxResId(RID_SUBSETSTR_PHAGS_PA
) );
1379 case UBLOCK_PHOENICIAN
:
1380 aAllSubsets
.emplace_back( 0x10900, 0x1091F, SvxResId(RID_SUBSETSTR_PHOENICIAN
) );
1382 case UBLOCK_CUNEIFORM
:
1383 aAllSubsets
.emplace_back( 0x12000, 0x123FF, SvxResId(RID_SUBSETSTR_CUNEIFORM
) );
1385 case UBLOCK_CUNEIFORM_NUMBERS_AND_PUNCTUATION
:
1386 aAllSubsets
.emplace_back( 0x12400, 0x1247F, SvxResId(RID_SUBSETSTR_CUNEIFORM_NUMBERS_AND_PUNCTUATION
) );
1388 case UBLOCK_COUNTING_ROD_NUMERALS
:
1389 aAllSubsets
.emplace_back( 0x1D360, 0x1D37F, SvxResId(RID_SUBSETSTR_COUNTING_ROD_NUMERALS
) );
1391 case UBLOCK_SUNDANESE
:
1392 aAllSubsets
.emplace_back( 0x1B80, 0x1BBF, SvxResId(RID_SUBSETSTR_SUNDANESE
) );
1395 aAllSubsets
.emplace_back( 0x1C00, 0x1C4F, SvxResId(RID_SUBSETSTR_LEPCHA
) );
1397 case UBLOCK_OL_CHIKI
:
1398 aAllSubsets
.emplace_back( 0x1C50, 0x1C7F, SvxResId(RID_SUBSETSTR_OL_CHIKI
) );
1400 case UBLOCK_CYRILLIC_EXTENDED_A
:
1401 aAllSubsets
.emplace_back( 0x2DE0, 0x2DFF, SvxResId(RID_SUBSETSTR_CYRILLIC_EXTENDED_A
) );
1404 aAllSubsets
.emplace_back( 0xA500, 0xA63F, SvxResId(RID_SUBSETSTR_VAI
) );
1406 case UBLOCK_CYRILLIC_EXTENDED_B
:
1407 aAllSubsets
.emplace_back( 0xA640, 0xA69F, SvxResId(RID_SUBSETSTR_CYRILLIC_EXTENDED_B
) );
1409 case UBLOCK_SAURASHTRA
:
1410 aAllSubsets
.emplace_back( 0xA880, 0xA8DF, SvxResId(RID_SUBSETSTR_SAURASHTRA
) );
1412 case UBLOCK_KAYAH_LI
:
1413 aAllSubsets
.emplace_back( 0xA900, 0xA92F, SvxResId(RID_SUBSETSTR_KAYAH_LI
) );
1416 aAllSubsets
.emplace_back( 0xA930, 0xA95F, SvxResId(RID_SUBSETSTR_REJANG
) );
1419 aAllSubsets
.emplace_back( 0xAA00, 0xAA5F, SvxResId(RID_SUBSETSTR_CHAM
) );
1421 case UBLOCK_ANCIENT_SYMBOLS
:
1422 aAllSubsets
.emplace_back( 0x10190, 0x101CF, SvxResId(RID_SUBSETSTR_ANCIENT_SYMBOLS
) );
1424 case UBLOCK_PHAISTOS_DISC
:
1425 aAllSubsets
.emplace_back( 0x101D0, 0x101FF, SvxResId(RID_SUBSETSTR_PHAISTOS_DISC
) );
1428 aAllSubsets
.emplace_back( 0x10280, 0x1029F, SvxResId(RID_SUBSETSTR_LYCIAN
) );
1431 aAllSubsets
.emplace_back( 0x102A0, 0x102DF, SvxResId(RID_SUBSETSTR_CARIAN
) );
1434 aAllSubsets
.emplace_back( 0x10920, 0x1093F, SvxResId(RID_SUBSETSTR_LYDIAN
) );
1436 case UBLOCK_MAHJONG_TILES
:
1437 aAllSubsets
.emplace_back( 0x1F000, 0x1F02F, SvxResId(RID_SUBSETSTR_MAHJONG_TILES
) );
1439 case UBLOCK_DOMINO_TILES
:
1440 aAllSubsets
.emplace_back( 0x1F030, 0x1F09F, SvxResId(RID_SUBSETSTR_DOMINO_TILES
) );
1442 case UBLOCK_SAMARITAN
:
1443 aAllSubsets
.emplace_back( 0x0800, 0x083F, SvxResId(RID_SUBSETSTR_SAMARITAN
) );
1445 case UBLOCK_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_EXTENDED
:
1446 aAllSubsets
.emplace_back( 0x18B0, 0x18FF, SvxResId(RID_SUBSETSTR_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_EXTENDED
) );
1448 case UBLOCK_TAI_THAM
:
1449 aAllSubsets
.emplace_back( 0x1A20, 0x1AAF, SvxResId(RID_SUBSETSTR_TAI_THAM
) );
1451 case UBLOCK_VEDIC_EXTENSIONS
:
1452 aAllSubsets
.emplace_back( 0x1CD0, 0x1CFF, SvxResId(RID_SUBSETSTR_VEDIC_EXTENSIONS
) );
1455 aAllSubsets
.emplace_back( 0xA4D0, 0xA4FF, SvxResId(RID_SUBSETSTR_LISU
) );
1458 aAllSubsets
.emplace_back( 0xA6A0, 0xA6FF, SvxResId(RID_SUBSETSTR_BAMUM
) );
1460 case UBLOCK_COMMON_INDIC_NUMBER_FORMS
:
1461 aAllSubsets
.emplace_back( 0xA830, 0xA83F, SvxResId(RID_SUBSETSTR_COMMON_INDIC_NUMBER_FORMS
) );
1463 case UBLOCK_DEVANAGARI_EXTENDED
:
1464 aAllSubsets
.emplace_back( 0xA8E0, 0xA8FF, SvxResId(RID_SUBSETSTR_DEVANAGARI_EXTENDED
) );
1466 case UBLOCK_HANGUL_JAMO_EXTENDED_A
:
1467 aAllSubsets
.emplace_back( 0xA960, 0xA97F, SvxResId(RID_SUBSETSTR_HANGUL_JAMO_EXTENDED_A
) );
1469 case UBLOCK_JAVANESE
:
1470 aAllSubsets
.emplace_back( 0xA980, 0xA9DF, SvxResId(RID_SUBSETSTR_JAVANESE
) );
1472 case UBLOCK_MYANMAR_EXTENDED_A
:
1473 aAllSubsets
.emplace_back( 0xAA60, 0xAA7F, SvxResId(RID_SUBSETSTR_MYANMAR_EXTENDED_A
) );
1475 case UBLOCK_TAI_VIET
:
1476 aAllSubsets
.emplace_back( 0xAA80, 0xAADF, SvxResId(RID_SUBSETSTR_TAI_VIET
) );
1478 case UBLOCK_MEETEI_MAYEK
:
1479 aAllSubsets
.emplace_back( 0xABC0, 0xABFF, SvxResId(RID_SUBSETSTR_MEETEI_MAYEK
) );
1481 case UBLOCK_HANGUL_JAMO_EXTENDED_B
:
1482 aAllSubsets
.emplace_back( 0xD7B0, 0xD7FF, SvxResId(RID_SUBSETSTR_HANGUL_JAMO_EXTENDED_B
) );
1484 case UBLOCK_IMPERIAL_ARAMAIC
:
1485 aAllSubsets
.emplace_back( 0x10840, 0x1085F, SvxResId(RID_SUBSETSTR_IMPERIAL_ARAMAIC
) );
1487 case UBLOCK_OLD_SOUTH_ARABIAN
:
1488 aAllSubsets
.emplace_back( 0x10A60, 0x10A7F, SvxResId(RID_SUBSETSTR_OLD_SOUTH_ARABIAN
) );
1490 case UBLOCK_AVESTAN
:
1491 aAllSubsets
.emplace_back( 0x10B00, 0x10B3F, SvxResId(RID_SUBSETSTR_AVESTAN
) );
1493 case UBLOCK_INSCRIPTIONAL_PARTHIAN
:
1494 aAllSubsets
.emplace_back( 0x10B40, 0x10B5F, SvxResId(RID_SUBSETSTR_INSCRIPTIONAL_PARTHIAN
) );
1496 case UBLOCK_INSCRIPTIONAL_PAHLAVI
:
1497 aAllSubsets
.emplace_back( 0x10B60, 0x10B7F, SvxResId(RID_SUBSETSTR_INSCRIPTIONAL_PAHLAVI
) );
1499 case UBLOCK_OLD_TURKIC
:
1500 aAllSubsets
.emplace_back( 0x10C00, 0x10C4F, SvxResId(RID_SUBSETSTR_OLD_TURKIC
) );
1502 case UBLOCK_RUMI_NUMERAL_SYMBOLS
:
1503 aAllSubsets
.emplace_back( 0x10E60, 0x10E7F, SvxResId(RID_SUBSETSTR_RUMI_NUMERAL_SYMBOLS
) );
1506 aAllSubsets
.emplace_back( 0x11080, 0x110CF, SvxResId(RID_SUBSETSTR_KAITHI
) );
1508 case UBLOCK_EGYPTIAN_HIEROGLYPHS
:
1509 aAllSubsets
.emplace_back( 0x13000, 0x1342F, SvxResId(RID_SUBSETSTR_EGYPTIAN_HIEROGLYPHS
) );
1511 case UBLOCK_ENCLOSED_ALPHANUMERIC_SUPPLEMENT
:
1512 aAllSubsets
.emplace_back( 0x1F100, 0x1F1FF, SvxResId(RID_SUBSETSTR_ENCLOSED_ALPHANUMERIC_SUPPLEMENT
) );
1514 case UBLOCK_ENCLOSED_IDEOGRAPHIC_SUPPLEMENT
:
1515 aAllSubsets
.emplace_back( 0x1F200, 0x1F2FF, SvxResId(RID_SUBSETSTR_ENCLOSED_IDEOGRAPHIC_SUPPLEMENT
) );
1517 case UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_C
:
1518 aAllSubsets
.emplace_back( 0x2A700, 0x2B73F, SvxResId(RID_SUBSETSTR_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_C
) );
1520 case UBLOCK_MANDAIC
:
1521 aAllSubsets
.emplace_back( 0x0840, 0x085F, SvxResId(RID_SUBSETSTR_MANDAIC
) );
1524 aAllSubsets
.emplace_back( 0x1BC0, 0x1BFF, SvxResId(RID_SUBSETSTR_BATAK
) );
1526 case UBLOCK_ETHIOPIC_EXTENDED_A
:
1527 aAllSubsets
.emplace_back( 0xAB00, 0xAB2F, SvxResId(RID_SUBSETSTR_ETHIOPIC_EXTENDED_A
) );
1530 aAllSubsets
.emplace_back( 0x11000, 0x1107F, SvxResId(RID_SUBSETSTR_BRAHMI
) );
1532 case UBLOCK_BAMUM_SUPPLEMENT
:
1533 aAllSubsets
.emplace_back( 0x16800, 0x16A3F, SvxResId(RID_SUBSETSTR_BAMUM_SUPPLEMENT
) );
1535 case UBLOCK_KANA_SUPPLEMENT
:
1536 aAllSubsets
.emplace_back( 0x1B000, 0x1B0FF, SvxResId(RID_SUBSETSTR_KANA_SUPPLEMENT
) );
1538 case UBLOCK_PLAYING_CARDS
:
1539 aAllSubsets
.emplace_back( 0x1F0A0, 0x1F0FF, SvxResId(RID_SUBSETSTR_PLAYING_CARDS
) );
1541 case UBLOCK_MISCELLANEOUS_SYMBOLS_AND_PICTOGRAPHS
:
1542 aAllSubsets
.emplace_back( 0x1F300, 0x1F5FF, SvxResId(RID_SUBSETSTR_MISCELLANEOUS_SYMBOLS_AND_PICTOGRAPHS
) );
1544 case UBLOCK_EMOTICONS
:
1545 aAllSubsets
.emplace_back( 0x1F600, 0x1F64F, SvxResId(RID_SUBSETSTR_EMOTICONS
) );
1547 case UBLOCK_TRANSPORT_AND_MAP_SYMBOLS
:
1548 aAllSubsets
.emplace_back( 0x1F680, 0x1F6FF, SvxResId(RID_SUBSETSTR_TRANSPORT_AND_MAP_SYMBOLS
) );
1550 case UBLOCK_ALCHEMICAL_SYMBOLS
:
1551 aAllSubsets
.emplace_back( 0x1F700, 0x1F77F, SvxResId(RID_SUBSETSTR_ALCHEMICAL_SYMBOLS
) );
1553 case UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D
:
1554 aAllSubsets
.emplace_back( 0x2B740, 0x2B81F, SvxResId(RID_SUBSETSTR_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D
) );
1556 // Note ICU version 49 (NOT 4.9), so the MAJOR_NUM is two digits.
1557 #if U_ICU_VERSION_MAJOR_NUM >= 49
1558 case UBLOCK_ARABIC_EXTENDED_A
:
1559 aAllSubsets
.emplace_back( 0x08A0, 0x08FF, SvxResId(RID_SUBSETSTR_ARABIC_EXTENDED_A
) );
1561 case UBLOCK_ARABIC_MATHEMATICAL_ALPHABETIC_SYMBOLS
:
1562 aAllSubsets
.emplace_back( 0x1EE00, 0x1EEFF, SvxResId(RID_SUBSETSTR_ARABIC_MATHEMATICAL_ALPHABETIC_SYMBOLS
) );
1565 aAllSubsets
.emplace_back( 0x11100, 0x1114F, SvxResId(RID_SUBSETSTR_CHAKMA
) );
1567 case UBLOCK_MEETEI_MAYEK_EXTENSIONS
:
1568 aAllSubsets
.emplace_back( 0xAAE0, 0xAAFF, SvxResId(RID_SUBSETSTR_MEETEI_MAYEK_EXTENSIONS
) );
1570 case UBLOCK_MEROITIC_CURSIVE
:
1571 aAllSubsets
.emplace_back( 0x109A0, 0x109FF, SvxResId(RID_SUBSETSTR_MEROITIC_CURSIVE
) );
1573 case UBLOCK_MEROITIC_HIEROGLYPHS
:
1574 aAllSubsets
.emplace_back( 0x10980, 0x1099F, SvxResId(RID_SUBSETSTR_MEROITIC_HIEROGLYPHS
) );
1577 aAllSubsets
.emplace_back( 0x16F00, 0x16F9F, SvxResId(RID_SUBSETSTR_MIAO
) );
1579 case UBLOCK_SHARADA
:
1580 aAllSubsets
.emplace_back( 0x11180, 0x111DF, SvxResId(RID_SUBSETSTR_SHARADA
) );
1582 case UBLOCK_SORA_SOMPENG
:
1583 aAllSubsets
.emplace_back( 0x110D0, 0x110FF, SvxResId(RID_SUBSETSTR_SORA_SOMPENG
) );
1585 case UBLOCK_SUNDANESE_SUPPLEMENT
:
1586 aAllSubsets
.emplace_back( 0x1CC0, 0x1CCF, SvxResId(RID_SUBSETSTR_SUNDANESE_SUPPLEMENT
) );
1589 aAllSubsets
.emplace_back( 0x11680, 0x116CF, SvxResId(RID_SUBSETSTR_TAKRI
) );
1592 #if U_ICU_VERSION_MAJOR_NUM >= 54
1593 case UBLOCK_BASSA_VAH
:
1594 aAllSubsets
.emplace_back( 0x16AD0, 0x16AFF, SvxResId(RID_SUBSETSTR_BASSA_VAH
) );
1596 case UBLOCK_CAUCASIAN_ALBANIAN
:
1597 aAllSubsets
.emplace_back( 0x10530, 0x1056F, SvxResId(RID_SUBSETSTR_CAUCASIAN_ALBANIAN
) );
1599 case UBLOCK_COPTIC_EPACT_NUMBERS
:
1600 aAllSubsets
.emplace_back( 0x102E0, 0x102FF, SvxResId(RID_SUBSETSTR_COPTIC_EPACT_NUMBERS
) );
1602 case UBLOCK_COMBINING_DIACRITICAL_MARKS_EXTENDED
:
1603 aAllSubsets
.emplace_back( 0x1AB0, 0x1AFF, SvxResId(RID_SUBSETSTR_COMBINING_DIACRITICAL_MARKS_EXTENDED
) );
1605 case UBLOCK_DUPLOYAN
:
1606 aAllSubsets
.emplace_back( 0x1BC00, 0x1BC9F, SvxResId(RID_SUBSETSTR_DUPLOYAN
) );
1608 case UBLOCK_ELBASAN
:
1609 aAllSubsets
.emplace_back( 0x10500, 0x1052F, SvxResId(RID_SUBSETSTR_ELBASAN
) );
1611 case UBLOCK_GEOMETRIC_SHAPES_EXTENDED
:
1612 aAllSubsets
.emplace_back( 0x1F780, 0x1F7FF, SvxResId(RID_SUBSETSTR_GEOMETRIC_SHAPES_EXTENDED
) );
1614 case UBLOCK_GRANTHA
:
1615 aAllSubsets
.emplace_back( 0x11300, 0x1137F, SvxResId(RID_SUBSETSTR_GRANTHA
) );
1618 aAllSubsets
.emplace_back( 0x11200, 0x1124F, SvxResId(RID_SUBSETSTR_KHOJKI
) );
1620 case UBLOCK_KHUDAWADI
:
1621 aAllSubsets
.emplace_back( 0x112B0, 0x112FF, SvxResId(RID_SUBSETSTR_KHUDAWADI
) );
1623 case UBLOCK_LATIN_EXTENDED_E
:
1624 aAllSubsets
.emplace_back( 0xAB30, 0xAB6F, SvxResId(RID_SUBSETSTR_LATIN_EXTENDED_E
) );
1626 case UBLOCK_LINEAR_A
:
1627 aAllSubsets
.emplace_back( 0x10600, 0x1077F, SvxResId(RID_SUBSETSTR_LINEAR_A
) );
1629 case UBLOCK_MAHAJANI
:
1630 aAllSubsets
.emplace_back( 0x11150, 0x1117F, SvxResId(RID_SUBSETSTR_MAHAJANI
) );
1632 case UBLOCK_MANICHAEAN
:
1633 aAllSubsets
.emplace_back( 0x10AC0, 0x10AFF, SvxResId(RID_SUBSETSTR_MANICHAEAN
) );
1635 case UBLOCK_MENDE_KIKAKUI
:
1636 aAllSubsets
.emplace_back( 0x1E800, 0x1E8DF, SvxResId(RID_SUBSETSTR_MENDE_KIKAKUI
) );
1639 aAllSubsets
.emplace_back( 0x11600, 0x1165F, SvxResId(RID_SUBSETSTR_MODI
) );
1642 aAllSubsets
.emplace_back( 0x16A40, 0x16A6F, SvxResId(RID_SUBSETSTR_MRO
) );
1644 case UBLOCK_MYANMAR_EXTENDED_B
:
1645 aAllSubsets
.emplace_back( 0xA9E0, 0xA9FF, SvxResId(RID_SUBSETSTR_MYANMAR_EXTENDED_B
) );
1647 case UBLOCK_NABATAEAN
:
1648 aAllSubsets
.emplace_back( 0x10880, 0x108AF, SvxResId(RID_SUBSETSTR_NABATAEAN
) );
1650 case UBLOCK_OLD_NORTH_ARABIAN
:
1651 aAllSubsets
.emplace_back( 0x10A80, 0x10A9F, SvxResId(RID_SUBSETSTR_OLD_NORTH_ARABIAN
) );
1653 case UBLOCK_OLD_PERMIC
:
1654 aAllSubsets
.emplace_back( 0x10350, 0x1037F, SvxResId(RID_SUBSETSTR_OLD_PERMIC
) );
1656 case UBLOCK_ORNAMENTAL_DINGBATS
:
1657 aAllSubsets
.emplace_back( 0x1F650, 0x1F67F, SvxResId(RID_SUBSETSTR_ORNAMENTAL_DINGBATS
) );
1659 case UBLOCK_PAHAWH_HMONG
:
1660 aAllSubsets
.emplace_back( 0x16B00, 0x16B8F, SvxResId(RID_SUBSETSTR_PAHAWH_HMONG
) );
1662 case UBLOCK_PALMYRENE
:
1663 aAllSubsets
.emplace_back( 0x10860, 0x1087F, SvxResId(RID_SUBSETSTR_PALMYRENE
) );
1665 case UBLOCK_PAU_CIN_HAU
:
1666 aAllSubsets
.emplace_back( 0x11AC0, 0x11AFF, SvxResId(RID_SUBSETSTR_PAU_CIN_HAU
) );
1668 case UBLOCK_PSALTER_PAHLAVI
:
1669 aAllSubsets
.emplace_back( 0x10B80, 0x10BAF, SvxResId(RID_SUBSETSTR_PSALTER_PAHLAVI
) );
1671 case UBLOCK_SHORTHAND_FORMAT_CONTROLS
:
1672 aAllSubsets
.emplace_back( 0x1BCA0, 0x1BCAF, SvxResId(RID_SUBSETSTR_SHORTHAND_FORMAT_CONTROLS
) );
1674 case UBLOCK_SIDDHAM
:
1675 aAllSubsets
.emplace_back( 0x11580, 0x115FF, SvxResId(RID_SUBSETSTR_SIDDHAM
) );
1677 case UBLOCK_SINHALA_ARCHAIC_NUMBERS
:
1678 aAllSubsets
.emplace_back( 0x111E0, 0x111FF, SvxResId(RID_SUBSETSTR_SINHALA_ARCHAIC_NUMBERS
) );
1680 case UBLOCK_SUPPLEMENTAL_ARROWS_C
:
1681 aAllSubsets
.emplace_back( 0x1F800, 0x1F8FF, SvxResId(RID_SUBSETSTR_SUPPLEMENTAL_ARROWS_C
) );
1683 case UBLOCK_TIRHUTA
:
1684 aAllSubsets
.emplace_back( 0x11480, 0x114DF, SvxResId(RID_SUBSETSTR_TIRHUTA
) );
1686 case UBLOCK_WARANG_CITI
:
1687 aAllSubsets
.emplace_back( 0x118A0, 0x118FF, SvxResId(RID_SUBSETSTR_WARANG_CITI
) );
1690 #if U_ICU_VERSION_MAJOR_NUM >= 56
1692 aAllSubsets
.emplace_back( 0x11700, 0x1173F, SvxResId(RID_SUBSETSTR_AHOM
) );
1694 case UBLOCK_ANATOLIAN_HIEROGLYPHS
:
1695 aAllSubsets
.emplace_back( 0x14400, 0x1467F, SvxResId(RID_SUBSETSTR_ANATOLIAN_HIEROGLYPHS
) );
1697 case UBLOCK_CHEROKEE_SUPPLEMENT
:
1698 aAllSubsets
.emplace_back( 0xAB70, 0xABBF, SvxResId(RID_SUBSETSTR_CHEROKEE_SUPPLEMENT
) );
1700 case UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_E
:
1701 aAllSubsets
.emplace_back( 0x2B820, 0x2CEAF, SvxResId(RID_SUBSETSTR_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_E
) );
1703 case UBLOCK_EARLY_DYNASTIC_CUNEIFORM
:
1704 aAllSubsets
.emplace_back( 0x12480, 0x1254F, SvxResId(RID_SUBSETSTR_EARLY_DYNASTIC_CUNEIFORM
) );
1707 aAllSubsets
.emplace_back( 0x108E0, 0x108FF, SvxResId(RID_SUBSETSTR_HATRAN
) );
1709 case UBLOCK_MULTANI
:
1710 aAllSubsets
.emplace_back( 0x11280, 0x112AF, SvxResId(RID_SUBSETSTR_MULTANI
) );
1712 case UBLOCK_OLD_HUNGARIAN
:
1713 aAllSubsets
.emplace_back( 0x10C80, 0x10CFF, SvxResId(RID_SUBSETSTR_OLD_HUNGARIAN
) );
1715 case UBLOCK_SUPPLEMENTAL_SYMBOLS_AND_PICTOGRAPHS
:
1716 aAllSubsets
.emplace_back( 0x1F900, 0x1F9FF, SvxResId(RID_SUBSETSTR_SUPPLEMENTAL_SYMBOLS_AND_PICTOGRAPHS
) );
1718 case UBLOCK_SUTTON_SIGNWRITING
:
1719 aAllSubsets
.emplace_back( 0x1D800, 0x1DAAF, SvxResId(RID_SUBSETSTR_SUTTON_SIGNWRITING
) );
1722 #if (U_ICU_VERSION_MAJOR_NUM >= 58)
1724 aAllSubsets
.emplace_back( 0x1E900, 0x1E95F, SvxResId(RID_SUBSETSTR_ADLAM
) );
1726 case UBLOCK_BHAIKSUKI
:
1727 aAllSubsets
.emplace_back( 0x11C00, 0x11C6F, SvxResId(RID_SUBSETSTR_BHAIKSUKI
) );
1729 case UBLOCK_CYRILLIC_EXTENDED_C
:
1730 aAllSubsets
.emplace_back( 0x1C80, 0x1C8F, SvxResId(RID_SUBSETSTR_CYRILLIC_EXTENDED_C
) );
1732 case UBLOCK_GLAGOLITIC_SUPPLEMENT
:
1733 aAllSubsets
.emplace_back( 0x1E000, 0x1E02F, SvxResId(RID_SUBSETSTR_GLAGOLITIC_SUPPLEMENT
) );
1735 case UBLOCK_IDEOGRAPHIC_SYMBOLS_AND_PUNCTUATION
:
1736 aAllSubsets
.emplace_back( 0x16FE0, 0x16FFF, SvxResId(RID_SUBSETSTR_IDEOGRAPHIC_SYMBOLS_AND_PUNCTUATION
) );
1738 case UBLOCK_MARCHEN
:
1739 aAllSubsets
.emplace_back( 0x11C70, 0x11CBF, SvxResId(RID_SUBSETSTR_MARCHEN
) );
1741 case UBLOCK_MONGOLIAN_SUPPLEMENT
:
1742 aAllSubsets
.emplace_back( 0x11660, 0x1167F, SvxResId(RID_SUBSETSTR_MONGOLIAN_SUPPLEMENT
) );
1745 aAllSubsets
.emplace_back( 0x11400, 0x1147F, SvxResId(RID_SUBSETSTR_NEWA
) );
1748 aAllSubsets
.emplace_back( 0x104B0, 0x104FF, SvxResId(RID_SUBSETSTR_OSAGE
) );
1751 aAllSubsets
.emplace_back( 0x17000, 0x187FF, SvxResId(RID_SUBSETSTR_TANGUT
) );
1753 case UBLOCK_TANGUT_COMPONENTS
:
1754 aAllSubsets
.emplace_back( 0x18800, 0x18AFF, SvxResId(RID_SUBSETSTR_TANGUT_COMPONENTS
) );
1757 #if (U_ICU_VERSION_MAJOR_NUM >= 60)
1758 case UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_F
:
1759 aAllSubsets
.emplace_back( 0x2CEB0, 0x2EBE0, SvxResId(RID_SUBSETSTR_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_F
) );
1761 case UBLOCK_KANA_EXTENDED_A
:
1762 aAllSubsets
.emplace_back( 0x1B100, 0x1B12F, SvxResId(RID_SUBSETSTR_KANA_EXTENDED_A
) );
1764 case UBLOCK_MASARAM_GONDI
:
1765 aAllSubsets
.emplace_back( 0x11D00, 0x11D5F, SvxResId(RID_SUBSETSTR_MASARAM_GONDI
) );
1768 aAllSubsets
.emplace_back( 0x1B170, 0x1B2FF, SvxResId(RID_SUBSETSTR_NUSHU
) );
1770 case UBLOCK_SOYOMBO
:
1771 aAllSubsets
.emplace_back( 0x11A50, 0x11AAF, SvxResId(RID_SUBSETSTR_SOYOMBO
) );
1773 case UBLOCK_SYRIAC_SUPPLEMENT
:
1774 aAllSubsets
.emplace_back( 0x0860, 0x086f, SvxResId(RID_SUBSETSTR_SYRIAC_SUPPLEMENT
) );
1776 case UBLOCK_ZANABAZAR_SQUARE
:
1777 aAllSubsets
.emplace_back( 0x11A00, 0x11A4F, SvxResId(RID_SUBSETSTR_ZANABAZAR_SQUARE
) );
1780 #if (U_ICU_VERSION_MAJOR_NUM >= 62)
1781 case UBLOCK_CHESS_SYMBOLS
:
1782 aAllSubsets
.emplace_back( 0x1FA00, 0x1FA6F, SvxResId(RID_SUBSETSTR_CHESS_SYMBOLS
) );
1785 aAllSubsets
.emplace_back( 0x11800, 0x1184F, SvxResId(RID_SUBSETSTR_DOGRA
) );
1787 case UBLOCK_GEORGIAN_EXTENDED
:
1788 aAllSubsets
.emplace_back( 0x1C90, 0x1CBF, SvxResId(RID_SUBSETSTR_GEORGIAN_EXTENDED
) );
1790 case UBLOCK_GUNJALA_GONDI
:
1791 aAllSubsets
.emplace_back( 0x11D60, 0x11DAF, SvxResId(RID_SUBSETSTR_GUNJALA_GONDI
) );
1793 case UBLOCK_HANIFI_ROHINGYA
:
1794 aAllSubsets
.emplace_back( 0x10D00, 0x10D3F, SvxResId(RID_SUBSETSTR_HANIFI_ROHINGYA
) );
1796 case UBLOCK_INDIC_SIYAQ_NUMBERS
:
1797 aAllSubsets
.emplace_back( 0x1EC70, 0x1ECBF, SvxResId(RID_SUBSETSTR_INDIC_SIYAQ_NUMBERS
) );
1799 case UBLOCK_MAKASAR
:
1800 aAllSubsets
.emplace_back( 0x11EE0, 0x11EFF, SvxResId(RID_SUBSETSTR_MAKASAR
) );
1802 case UBLOCK_MAYAN_NUMERALS
:
1803 aAllSubsets
.emplace_back( 0x1D2E0, 0x1D2FF, SvxResId(RID_SUBSETSTR_MAYAN_NUMERALS
) );
1805 case UBLOCK_MEDEFAIDRIN
:
1806 aAllSubsets
.emplace_back( 0x16E40, 0x16E9F, SvxResId(RID_SUBSETSTR_MEDEFAIDRIN
) );
1808 case UBLOCK_OLD_SOGDIAN
:
1809 aAllSubsets
.emplace_back( 0x10F00, 0x10F2F, SvxResId(RID_SUBSETSTR_OLD_SOGDIAN
) );
1811 case UBLOCK_SOGDIAN
:
1812 aAllSubsets
.emplace_back( 0x10F30, 0x10F6F, SvxResId(RID_SUBSETSTR_SOGDIAN
) );
1815 #if (U_ICU_VERSION_MAJOR_NUM >= 64)
1816 case UBLOCK_EGYPTIAN_HIEROGLYPH_FORMAT_CONTROLS
:
1817 aAllSubsets
.emplace_back( 0x13430, 0x1343F, SvxResId(RID_SUBSETSTR_EGYPTIAN_HIEROGLYPH_FORMAT_CONTROLS
) );
1819 case UBLOCK_ELYMAIC
:
1820 aAllSubsets
.emplace_back( 0x10FE0, 0x10FFF, SvxResId(RID_SUBSETSTR_ELYMAIC
) );
1822 case UBLOCK_NANDINAGARI
:
1823 aAllSubsets
.emplace_back( 0x119A0, 0x119FF, SvxResId(RID_SUBSETSTR_NANDINAGARI
) );
1825 case UBLOCK_NYIAKENG_PUACHUE_HMONG
:
1826 aAllSubsets
.emplace_back( 0x1E100, 0x1E14F, SvxResId(RID_SUBSETSTR_NYIAKENG_PUACHUE_HMONG
) );
1828 case UBLOCK_OTTOMAN_SIYAQ_NUMBERS
:
1829 aAllSubsets
.emplace_back( 0x1ED00, 0x1ED4F, SvxResId(RID_SUBSETSTR_OTTOMAN_SIYAQ_NUMBERS
) );
1831 case UBLOCK_SMALL_KANA_EXTENSION
:
1832 aAllSubsets
.emplace_back( 0x1B130, 0x1B16F, SvxResId(RID_SUBSETSTR_SMALL_KANA_EXTENSION
) );
1834 case UBLOCK_SYMBOLS_AND_PICTOGRAPHS_EXTENDED_A
:
1835 aAllSubsets
.emplace_back( 0x1FA70, 0x1FAFF, SvxResId(RID_SUBSETSTR_SYMBOLS_AND_PICTOGRAPHS_EXTENDED_A
) );
1837 case UBLOCK_TAMIL_SUPPLEMENT
:
1838 aAllSubsets
.emplace_back( 0x11FC0, 0x11FFF, SvxResId(RID_SUBSETSTR_TAMIL_SUPPLEMENT
) );
1841 aAllSubsets
.emplace_back( 0x1E2C0, 0x1E2FF, SvxResId(RID_SUBSETSTR_WANCHO
) );
1844 #if (U_ICU_VERSION_MAJOR_NUM >= 66)
1845 case UBLOCK_CHORASMIAN
:
1846 aAllSubsets
.emplace_back( 0x10FB0, 0x10FDF, SvxResId(RID_SUBSETSTR_CHORASMIAN
) );
1848 case UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_G
:
1849 aAllSubsets
.emplace_back( 0x30000, 0x3134F, SvxResId(RID_SUBSETSTR_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_G
) );
1851 case UBLOCK_DIVES_AKURU
:
1852 aAllSubsets
.emplace_back( 0x11900, 0x1195F, SvxResId(RID_SUBSETSTR_DIVES_AKURU
) );
1854 case UBLOCK_KHITAN_SMALL_SCRIPT
:
1855 aAllSubsets
.emplace_back( 0x18B00, 0x18CFF, SvxResId(RID_SUBSETSTR_KHITAN_SMALL_SCRIPT
) );
1857 case UBLOCK_LISU_SUPPLEMENT
:
1858 aAllSubsets
.emplace_back( 0x11FB0, 0x11FBF, SvxResId(RID_SUBSETSTR_LISU_SUPPLEMENT
) );
1860 case UBLOCK_SYMBOLS_FOR_LEGACY_COMPUTING
:
1861 aAllSubsets
.emplace_back( 0x1FB00, 0x1FBFF, SvxResId(RID_SUBSETSTR_SYMBOLS_FOR_LEGACY_COMPUTING
) );
1863 case UBLOCK_TANGUT_SUPPLEMENT
:
1864 aAllSubsets
.emplace_back( 0x18D00, 0x18D7F, SvxResId(RID_SUBSETSTR_TANGUT_SUPPLEMENT
) );
1867 aAllSubsets
.emplace_back( 0x10E80, 0x10EBF, SvxResId(RID_SUBSETSTR_YEZIDI
) );
1870 #if (U_ICU_VERSION_MAJOR_NUM >= 70)
1871 case UBLOCK_ARABIC_EXTENDED_B
:
1872 aAllSubsets
.emplace_back( 0x0870, 0x089F, SvxResId(RID_SUBSETSTR_ARABIC_EXTENDED_B
) );
1874 case UBLOCK_CYPRO_MINOAN
:
1875 aAllSubsets
.emplace_back( 0x12F90, 0x12FFF, SvxResId(RID_SUBSETSTR_CYPRO_MINOAN
) );
1877 case UBLOCK_ETHIOPIC_EXTENDED_B
:
1878 aAllSubsets
.emplace_back( 0x1E7E0, 0x1E7FF, SvxResId(RID_SUBSETSTR_ETHIOPIC_EXTENDED_B
) );
1880 case UBLOCK_KANA_EXTENDED_B
:
1881 aAllSubsets
.emplace_back( 0x1AFF0, 0x1AFFF, SvxResId(RID_SUBSETSTR_KANA_EXTENDED_B
) );
1883 case UBLOCK_LATIN_EXTENDED_F
:
1884 aAllSubsets
.emplace_back( 0x10780, 0x107BF, SvxResId(RID_SUBSETSTR_LATIN_EXTENDED_F
) );
1886 case UBLOCK_LATIN_EXTENDED_G
:
1887 aAllSubsets
.emplace_back( 0x1DF00, 0x1DFFF, SvxResId(RID_SUBSETSTR_LATIN_EXTENDED_G
) );
1889 case UBLOCK_OLD_UYGHUR
:
1890 aAllSubsets
.emplace_back( 0x10F70, 0x10FAF, SvxResId(RID_SUBSETSTR_OLD_UYGHUR
) );
1893 aAllSubsets
.emplace_back( 0x16A70, 0x16ACF, SvxResId(RID_SUBSETSTR_TANGSA
) );
1896 aAllSubsets
.emplace_back( 0x1E290, 0x1E2BF, SvxResId(RID_SUBSETSTR_TOTO
) );
1898 case UBLOCK_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_EXTENDED_A
:
1899 aAllSubsets
.emplace_back( 0x11AB0, 0x11ABF, SvxResId(RID_SUBSETSTR_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_EXTENDED_A
) );
1901 case UBLOCK_VITHKUQI
:
1902 aAllSubsets
.emplace_back( 0x10570, 0x105BF, SvxResId(RID_SUBSETSTR_VITHKUQI
) );
1904 case UBLOCK_ZNAMENNY_MUSICAL_NOTATION
:
1905 aAllSubsets
.emplace_back( 0x1CF00, 0x1CFCF, SvxResId(RID_SUBSETSTR_ZNAMENNY_MUSICAL_NOTATION
) );
1908 #if (U_ICU_VERSION_MAJOR_NUM >= 72)
1909 case UBLOCK_ARABIC_EXTENDED_C
:
1910 aAllSubsets
.emplace_back( 0x10EC0, 0x10EFF, SvxResId(RID_SUBSETSTR_ARABIC_EXTENDED_C
) );
1912 case UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_H
:
1913 aAllSubsets
.emplace_back( 0x31350, 0x323AF, SvxResId(RID_SUBSETSTR_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_H
) );
1915 case UBLOCK_CYRILLIC_EXTENDED_D
:
1916 aAllSubsets
.emplace_back( 0x1E030, 0x1E08F, SvxResId(RID_SUBSETSTR_CYRILLIC_EXTENDED_D
) );
1918 case UBLOCK_DEVANAGARI_EXTENDED_A
:
1919 aAllSubsets
.emplace_back( 0x11B00, 0x11B5F, SvxResId(RID_SUBSETSTR_DEVANAGARI_EXTENDED_A
) );
1921 case UBLOCK_KAKTOVIK_NUMERALS
:
1922 aAllSubsets
.emplace_back( 0x1D2C0, 0x1D2DF, SvxResId(RID_SUBSETSTR_KAKTOVIK_NUMERALS
) );
1925 aAllSubsets
.emplace_back( 0x11F00, 0x11F5F, SvxResId(RID_SUBSETSTR_KAWI
) );
1927 case UBLOCK_NAG_MUNDARI
:
1928 aAllSubsets
.emplace_back( 0x1E4D0, 0x1E4FF, SvxResId(RID_SUBSETSTR_NAG_MUNDARI
) );
1933 #if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG
1934 if (eBlock
!= UBLOCK_NO_BLOCK
&&
1935 eBlock
!= UBLOCK_INVALID_CODE
&&
1936 eBlock
!= UBLOCK_COUNT
&&
1937 eBlock
!= UBLOCK_HIGH_SURROGATES
&&
1938 eBlock
!= UBLOCK_HIGH_PRIVATE_USE_SURROGATES
&&
1939 eBlock
!= UBLOCK_LOW_SURROGATES
)
1942 UBlockCode eBlockStart
= ublock_getCode(aAllSubsets
.back().GetRangeMin());
1943 UBlockCode eBlockEnd
= ublock_getCode(aAllSubsets
.back().GetRangeMax());
1944 assert(eBlockStart
== eBlockEnd
&& eBlockStart
== eBlock
);
1949 std::stable_sort(aAllSubsets
.begin(), aAllSubsets
.end());
1953 maSubsets
= s_aAllSubsets
;
1956 void SubsetMap::ApplyCharMap( const FontCharMapRef
& rxFontCharMap
)
1958 if( !rxFontCharMap
.is() )
1961 // remove subsets that are not matched in any range
1962 maSubsets
.erase(std::remove_if(maSubsets
.begin(), maSubsets
.end(),
1963 [&rxFontCharMap
](const Subset
& rSubset
) {
1964 sal_uInt32 cMin
= rSubset
.GetRangeMin();
1965 sal_uInt32 cMax
= rSubset
.GetRangeMax();
1966 int nCount
= rxFontCharMap
->CountCharsInRange( cMin
, cMax
);
1972 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */