30#include <rtl/textenc.h>
37#include <officecfg/Office/Common.hxx>
38#include <com/sun/star/beans/PropertyValue.hpp>
46#include <svx/svxids.hrc>
47#include <editeng/editids.hrc>
50#include <unicode/uchar.h>
51#include <unicode/utypes.h>
56 css::uno::Reference<css::frame::XFrame> xFrame)
93 , m_aShowChar(m_xVirDev)
94 , m_xOKBtn(
m_xFrame.is() ? m_xBuilder->weld_button(
"insert") : m_xBuilder->weld_button(
"ok"))
95 , m_xFontText(m_xBuilder->weld_label(
"fontft"))
96 , m_xFontLB(m_xBuilder->weld_combo_box(
"fontlb"))
97 , m_xSubsetText(m_xBuilder->weld_label(
"subsetft"))
98 , m_xSubsetLB(m_xBuilder->weld_combo_box(
"subsetlb"))
99 , m_xSearchText(m_xBuilder->weld_entry(
"search"))
100 , m_xHexCodeText(m_xBuilder->weld_entry(
"hexvalue"))
101 , m_xDecimalCodeText(m_xBuilder->weld_entry(
"decimalvalue"))
102 , m_xFavouritesBtn(m_xBuilder->weld_button(
"favbtn"))
103 , m_xCharName(m_xBuilder->weld_label(
"charname"))
104 , m_xRecentGrid(m_xBuilder->weld_widget(
"viewgrid"))
105 , m_xFavGrid(m_xBuilder->weld_widget(
"favgrid"))
106 , m_xShowChar(new
weld::CustomWeld(*m_xBuilder,
"showchar", m_aShowChar))
107 , m_xRecentCharView{
std::make_unique<
weld::CustomWeld>(*m_xBuilder,
"viewchar1", m_aRecentCharView[0]),
108 std::make_unique<
weld::CustomWeld>(*m_xBuilder,
"viewchar2", m_aRecentCharView[1]),
109 std::make_unique<
weld::CustomWeld>(*m_xBuilder,
"viewchar3", m_aRecentCharView[2]),
110 std::make_unique<
weld::CustomWeld>(*m_xBuilder,
"viewchar4", m_aRecentCharView[3]),
111 std::make_unique<
weld::CustomWeld>(*m_xBuilder,
"viewchar5", m_aRecentCharView[4]),
112 std::make_unique<
weld::CustomWeld>(*m_xBuilder,
"viewchar6", m_aRecentCharView[5]),
113 std::make_unique<
weld::CustomWeld>(*m_xBuilder,
"viewchar7", m_aRecentCharView[6]),
114 std::make_unique<
weld::CustomWeld>(*m_xBuilder,
"viewchar8", m_aRecentCharView[7]),
115 std::make_unique<
weld::CustomWeld>(*m_xBuilder,
"viewchar9", m_aRecentCharView[8]),
116 std::make_unique<
weld::CustomWeld>(*m_xBuilder,
"viewchar10", m_aRecentCharView[9]),
117 std::make_unique<
weld::CustomWeld>(*m_xBuilder,
"viewchar11", m_aRecentCharView[10]),
118 std::make_unique<
weld::CustomWeld>(*m_xBuilder,
"viewchar12", m_aRecentCharView[11]),
119 std::make_unique<
weld::CustomWeld>(*m_xBuilder,
"viewchar13", m_aRecentCharView[12]),
120 std::make_unique<
weld::CustomWeld>(*m_xBuilder,
"viewchar14", m_aRecentCharView[13]),
121 std::make_unique<
weld::CustomWeld>(*m_xBuilder,
"viewchar15", m_aRecentCharView[14]),
122 std::make_unique<
weld::CustomWeld>(*m_xBuilder,
"viewchar16", m_aRecentCharView[15])}
123 , m_xFavCharView{
std::make_unique<
weld::CustomWeld>(*m_xBuilder,
"favchar1", m_aFavCharView[0]),
124 std::make_unique<
weld::CustomWeld>(*m_xBuilder,
"favchar2", m_aFavCharView[1]),
125 std::make_unique<
weld::CustomWeld>(*m_xBuilder,
"favchar3", m_aFavCharView[2]),
126 std::make_unique<
weld::CustomWeld>(*m_xBuilder,
"favchar4", m_aFavCharView[3]),
127 std::make_unique<
weld::CustomWeld>(*m_xBuilder,
"favchar5", m_aFavCharView[4]),
128 std::make_unique<
weld::CustomWeld>(*m_xBuilder,
"favchar6", m_aFavCharView[5]),
129 std::make_unique<
weld::CustomWeld>(*m_xBuilder,
"favchar7", m_aFavCharView[6]),
130 std::make_unique<
weld::CustomWeld>(*m_xBuilder,
"favchar8", m_aFavCharView[7]),
131 std::make_unique<
weld::CustomWeld>(*m_xBuilder,
"favchar9", m_aFavCharView[8]),
132 std::make_unique<
weld::CustomWeld>(*m_xBuilder,
"favchar10", m_aFavCharView[9]),
133 std::make_unique<
weld::CustomWeld>(*m_xBuilder,
"favchar11", m_aFavCharView[10]),
134 std::make_unique<
weld::CustomWeld>(*m_xBuilder,
"favchar12", m_aFavCharView[11]),
135 std::make_unique<
weld::CustomWeld>(*m_xBuilder,
"favchar13", m_aFavCharView[12]),
136 std::make_unique<
weld::CustomWeld>(*m_xBuilder,
"favchar14", m_aFavCharView[13]),
137 std::make_unique<
weld::CustomWeld>(*m_xBuilder,
"favchar15", m_aFavCharView[14]),
138 std::make_unique<
weld::CustomWeld>(*m_xBuilder,
"favchar16", m_aFavCharView[15])}
139 , m_xShowSet(new
SvxShowCharSet(m_xBuilder->weld_scrolled_window(
"showscroll", true), m_xVirDev))
140 , m_xShowSetArea(new
weld::CustomWeld(*m_xBuilder,
"showcharset", *m_xShowSet))
141 , m_xSearchSet(new
SvxSearchCharSet(m_xBuilder->weld_scrolled_window(
"searchscroll", true), m_xVirDev))
142 , m_xSearchSetArea(new
weld::CustomWeld(*m_xBuilder,
"searchcharset", *m_xSearchSet))
158 const SfxInt32Item* pCharItem = SfxItemSet::GetItem<SfxInt32Item>(pSet, SID_ATTR_CHAR,
false);
162 const SfxBoolItem* pDisableItem = SfxItemSet::GetItem<SfxBoolItem>(pSet, FN_PARAM_2,
false);
163 if ( pDisableItem && pDisableItem->
GetValue() )
166 const SvxFontItem* pFontItem = SfxItemSet::GetItem<SvxFontItem>(pSet, SID_ATTR_CHAR_FONT,
false);
167 const SfxStringItem* pFontNameItem = SfxItemSet::GetItem<SfxStringItem>(pSet, SID_FONT_NAME,
false);
175 else if ( pFontNameItem )
198 OUString aOUStr( &cChar, 1 );
205 return SfxDialogController::run();
229 const css::uno::Sequence< OUString > rRecentCharList( officecfg::Office::Common::RecentCharacters::RecentCharacterList::get() );
230 for (OUString
const & s : rRecentCharList)
236 const css::uno::Sequence< OUString > rRecentCharFontList( officecfg::Office::Common::RecentCharacters::RecentCharacterFontList::get() );
237 for (OUString
const & s : rRecentCharFontList)
254 const css::uno::Sequence< OUString > rFavCharList( officecfg::Office::Common::FavoriteCharacters::FavoriteCharacterList::get() );
255 for (
const OUString& s : rFavCharList)
261 const css::uno::Sequence< OUString > rFavCharFontList( officecfg::Office::Common::FavoriteCharacters::FavoriteCharacterFontList::get() );
262 for (
const OUString& s : rFavCharFontList)
273static std::pair<std::deque<OUString>::const_iterator, std::deque<OUString>::const_iterator>
274findInPair(std::u16string_view str1,
const std::deque<OUString>& rContainer1,
275 std::u16string_view str2,
const std::deque<OUString>& rContainer2)
277 assert(rContainer1.size() == rContainer2.size());
279 if (
auto it1 = std::find(rContainer1.begin(), rContainer1.end(), str1);
280 it1 != rContainer1.end())
282 auto it2 = rContainer2.begin() + (it1 - rContainer1.begin());
286 return { rContainer1.end(), rContainer2.end() };
289std::pair<std::deque<OUString>::const_iterator, std::deque<OUString>::const_iterator>
295std::pair<std::deque<OUString>::const_iterator, std::deque<OUString>::const_iterator>
328 if(
const auto& [itChar, itChar2] =
getRecentChar(sTitle, rFont);
345 auto aRecentCharListRange = asNonConstRange(aRecentCharList);
347 auto aRecentCharFontListRange = asNonConstRange(aRecentCharFontList);
356 officecfg::Office::Common::RecentCharacters::RecentCharacterList::set(aRecentCharList, batch);
357 officecfg::Office::Common::RecentCharacters::RecentCharacterFontList::set(aRecentCharFontList, batch);
367 if(
const auto& [itChar, itChar2] =
getFavChar(sTitle, rFont);
383 css::uno::Sequence< OUString > aFavCharList(
maFavCharList.size());
384 auto aFavCharListRange = asNonConstRange(aFavCharList);
386 auto aFavCharFontListRange = asNonConstRange(aFavCharFontList);
395 officecfg::Office::Common::FavoriteCharacters::FavoriteCharacterList::set(aFavCharList, batch);
396 officecfg::Office::Common::FavoriteCharacters::FavoriteCharacterFontList::set(aFavCharFontList, batch);
431 if(
const auto& [itChar, itChar2] =
getFavChar(sTitle, rFont);
438 css::uno::Sequence< OUString > aFavCharList(
maFavCharList.size());
439 auto aFavCharListRange = asNonConstRange(aFavCharList);
441 auto aFavCharFontListRange = asNonConstRange(aFavCharFontList);
450 officecfg::Office::Common::FavoriteCharacters::FavoriteCharacterList::set(aFavCharList, batch);
451 officecfg::Office::Common::FavoriteCharacters::FavoriteCharacterFontList::set(aFavCharFontList, batch);
466 std::vector<weld::ComboBoxEntry>
aEntries;
470 OUString aFontName(
m_xVirDev->GetFontMetricFromCollection(
i ).GetFamilyName() );
471 if (aFontName != aLastName)
473 aLastName = aFontName;
474 aEntries.emplace_back(aFontName, OUString::number(
i));
481 bool bFound = (
m_xFontLB->find_text(aDefStr) != -1);
487 OUString aToken = aDefStr.getToken(0,
';',
nIndex);
532 nMaxWidth = std::max(nMaxWidth,
m_xFavouritesBtn->get_preferred_size().Width());
543 OUString aOUStr( &cChar, 1 );
558 for(
int i = 0;
i < 16;
i++)
578 const auto& [itChar, itFont] =
getFavChar(sTitle, rFont);
585 if(sTitle.empty() || rFont.empty())
617 if (
const sal_Int32
nIndex = sFontFamilyName.indexOf(
":");
nIndex != -1)
618 sFontFamilyName = sFontFamilyName.copy(0,
nIndex);
619 if (sFontFamilyName ==
"StarSymbol" &&
m_xFontLB->find_text(sFontFamilyName) == -1)
626 if (
m_xFontLB->find_text(sFontFamilyName) == -1)
629 m_xFontLB->set_active_text(sFontFamilyName);
639 std::vector<weld::ComboBoxEntry>
aEntries;
641 aEntries.emplace_back(subset.GetName());
672 const sal_uInt32 nFont = m_xFontLB->get_active_id().toUInt32();
673 aFont = m_xVirDev->GetFontMetricFromCollection(nFont);
681 m_xShowSet->SetFont( aFont );
682 m_xSearchSet->SetFont( aFont );
683 m_aShowChar.SetFont( aFont );
689 m_xSubsetLB->clear();
691 bool bNeedSubset = (aFont.GetCharSet() != RTL_TEXTENCODING_SYMBOL);
695 pSubsetMap.reset(
new SubsetMap( xFontCharMap ));
698 for (
auto const& subset : pSubsetMap->GetSubsetMap())
700 m_xSubsetLB->append(
weld::toId(&subset), subset.GetName());
704 if (m_xSubsetLB->get_count() <= 1)
708 m_xSubsetText->set_sensitive(bNeedSubset);
709 m_xSubsetLB->set_sensitive(bNeedSubset);
715 SearchUpdateHdl(*m_xSearchText);
716 SearchCharHighlightHdl(m_xSearchSet.get());
720 selectCharByCode(Radix::hexadecimal);
745 UErrorCode errorCode = U_ZERO_ERROR;
749 u_charName(nDecimalValue, U_UNICODE_CHAR_NAME, buffer,
sizeof(buffer), &errorCode);
750 if (U_SUCCESS(errorCode))
751 m_xCharName->set_label(OUString::createFromAscii(buffer));
756 const sal_Int32
nPos = m_xSubsetLB->get_active();
757 const Subset* pSubset = weld::fromId<const Subset*>(m_xSubsetLB->get_active_id());
759 if( pSubset && !isSearchMode)
762 m_xShowSet->SelectCharacter( cFirst );
764 setFavButtonState(OUString(&cFirst, 1), aFont.GetFamilyName());
765 m_xSubsetLB->set_active(
nPos);
767 else if( pSubset && isSearchMode)
769 m_xSearchSet->SelectCharacter( pSubset );
771 const Subset* curSubset =
nullptr;
773 curSubset = pSubsetMap->GetSubsetByUnicode( m_xSearchSet->GetSelectCharacter() );
775 m_xSubsetLB->set_active_text(curSubset->
GetName());
777 m_xSubsetLB->set_active(-1);
779 sal_UCS4 sChar = m_xSearchSet->GetSelectCharacter();
780 setFavButtonState(OUString(&sChar, 1), aFont.GetFamilyName());
786 const OUString& sTitle = rView->GetText();
787 OUString sFont = rView->GetFont().GetFamilyName();
790 if(
const auto& [itChar, itChar2] = getRecentChar(sTitle, sFont);
791 itChar != maRecentCharList.end() && itChar2 != maRecentCharFontList.end() )
793 maRecentCharList.erase( itChar );
794 maRecentCharFontList.erase( itChar2);
797 css::uno::Sequence< OUString > aRecentCharList(maRecentCharList.size());
798 auto aRecentCharListRange = asNonConstRange(aRecentCharList);
799 css::uno::Sequence< OUString > aRecentCharFontList(maRecentCharFontList.size());
800 auto aRecentCharFontListRange = asNonConstRange(aRecentCharFontList);
802 for (
size_t i = 0;
i < maRecentCharList.size(); ++
i)
804 aRecentCharListRange[
i] = maRecentCharList[
i];
805 aRecentCharFontListRange[
i] = maRecentCharFontList[
i];
809 officecfg::Office::Common::RecentCharacters::RecentCharacterList::set(aRecentCharList, batch);
810 officecfg::Office::Common::RecentCharacters::RecentCharacterFontList::set(aRecentCharFontList, batch);
813 updateRecentCharControl();
818 maRecentCharList.clear();
819 maRecentCharFontList.clear();
822 officecfg::Office::Common::RecentCharacters::RecentCharacterList::set({ }, batch);
823 officecfg::Office::Common::RecentCharacters::RecentCharacterFontList::set({ }, batch);
826 updateRecentCharControl();
831 deleteFavCharacterFromList(rView->GetText(), rView->GetFont().GetFamilyName());
832 updateFavCharControl();
837 maFavCharList.clear();
838 maFavCharFontList.clear();
841 officecfg::Office::Common::FavoriteCharacters::FavoriteCharacterList::set({ }, batch);
842 officecfg::Office::Common::FavoriteCharacters::FavoriteCharacterFontList::set({ }, batch);
845 updateFavCharControl();
850 m_xOKBtn->set_sensitive(
false);
855 if (!m_xSearchText->get_text().isEmpty())
857 m_xSearchSet->ClearPreviousData();
858 OUString aKeyword = m_xSearchText->get_text();
860 toggleSearchView(
true);
864 sal_UCS4 sChar = xFontCharMap->GetFirstChar();
865 while(sChar != xFontCharMap->GetLastChar())
867 UErrorCode errorCode = U_ZERO_ERROR;
869 u_charName(sChar, U_UNICODE_CHAR_NAME, buffer,
sizeof(buffer), &errorCode);
870 if (U_SUCCESS(errorCode))
872 OUString
sName = OUString::createFromAscii(buffer);
873 if(!
sName.isEmpty() &&
sName.toAsciiLowerCase().indexOf(aKeyword.toAsciiLowerCase()) >= 0)
874 m_xSearchSet->AppendCharToList(sChar);
876 sChar = xFontCharMap->GetNextChar(sChar);
879 UErrorCode errorCode = U_ZERO_ERROR;
881 u_charName(sChar, U_UNICODE_CHAR_NAME, buffer,
sizeof(buffer), &errorCode);
882 if (U_SUCCESS(errorCode))
884 OUString
sName = OUString::createFromAscii(buffer);
885 if(!
sName.isEmpty() &&
sName.toAsciiLowerCase().indexOf(aKeyword.toAsciiLowerCase()) >= 0)
886 m_xSearchSet->AppendCharToList(sChar);
891 toggleSearchView(
false);
900 m_aShowChar.SetText( rView->GetText() );
901 m_aShowChar.SetFont(rView->GetFont());
902 m_aShowChar.Invalidate();
904 setFavButtonState(rView->GetText(), rView->GetFont().GetFamilyName());
907 OUString charValue = rView->GetText();
909 OUString aHexText = OUString::number(cChar, 16).toAsciiUpperCase();
912 OUString aDecimalText = OUString::number(cChar);
914 m_xHexCodeText->set_text(aHexText);
915 m_xDecimalCodeText->set_text(aDecimalText);
919 m_xOKBtn->set_sensitive(
true);
924 sal_UCS4 cChar = m_xShowSet->GetSelectCharacter();
926 OUString aOUStr( &cChar, 1 );
927 setFavButtonState(aOUStr, aFont.GetFamilyName());
928 insertCharToDoc(aOUStr);
933 sal_UCS4 cChar = m_xSearchSet->GetSelectCharacter();
935 OUString aOUStr( &cChar, 1 );
936 setFavButtonState(aOUStr, aFont.GetFamilyName());
937 insertCharToDoc(aOUStr);
942 m_xOKBtn->set_sensitive(
true);
947 m_xOKBtn->set_sensitive(
true);
952 OUString sChar = m_aShowChar.GetText();
953 insertCharToDoc(sChar);
956 updateRecentCharacterList(sChar, aFont.GetFamilyName());
962 if (m_xFavouritesBtn->get_label().match(
CuiResId(RID_CUISTR_ADD_FAVORITES)))
964 updateFavCharacterList(m_aShowChar.GetText(), m_aShowChar.GetFont().GetFamilyName());
965 setFavButtonState(m_aShowChar.GetText(), m_aShowChar.GetFont().GetFamilyName());
969 deleteFavCharacterFromList(m_aShowChar.GetText(), m_aShowChar.GetFont().GetFamilyName());
970 m_xFavouritesBtn->set_label(
CuiResId(RID_CUISTR_ADD_FAVORITES));
971 m_xFavouritesBtn->set_sensitive(
false);
974 updateFavCharControl();
979 getFavCharacterList();
980 updateFavCharControl();
986 sal_UCS4 cChar = m_xShowSet->GetSelectCharacter();
987 bool bSelect = (cChar > 0);
993 aText = OUString( &cChar, 1 );
995 OUString aHexText = OUString::number(cChar, 16).toAsciiUpperCase();
997 OUString aDecimalText = OUString::number(cChar);
1001 if (!m_xHexCodeText->get_text().equalsIgnoreAsciiCase(aHexText))
1002 m_xHexCodeText->set_text(aHexText);
1003 if (m_xDecimalCodeText->get_text() != aDecimalText)
1004 m_xDecimalCodeText->set_text( aDecimalText );
1006 const Subset* pSubset =
nullptr;
1008 pSubset = pSubsetMap->GetSubsetByUnicode( cChar );
1010 m_xSubsetLB->set_active_text(pSubset->
GetName());
1012 m_xSubsetLB->set_active(-1);
1015 m_aShowChar.SetText( aText );
1016 m_aShowChar.SetFont( aFont );
1017 m_aShowChar.Invalidate();
1019 setFavButtonState(aText, aFont.GetFamilyName());
1025 sal_UCS4 cChar = m_xSearchSet->GetSelectCharacter();
1026 bool bSelect = (cChar > 0);
1031 aText = OUString( &cChar, 1 );
1033 OUString aHexText = OUString::number(cChar, 16).toAsciiUpperCase();
1035 OUString aDecimalText = OUString::number(cChar);
1039 if (!m_xHexCodeText->get_text().equalsIgnoreAsciiCase(aHexText))
1040 m_xHexCodeText->set_text(aHexText);
1041 if (m_xDecimalCodeText->get_text() != aDecimalText)
1042 m_xDecimalCodeText->set_text( aDecimalText );
1044 const Subset* pSubset =
nullptr;
1046 pSubset = pSubsetMap->GetSubsetByUnicode( cChar );
1048 m_xSubsetLB->set_active_text(pSubset->
GetName());
1050 m_xSubsetLB->set_active(-1);
1053 if(m_xSearchSet->HasFocus())
1055 m_aShowChar.SetText( aText );
1056 m_aShowChar.SetFont( aFont );
1057 m_aShowChar.Invalidate();
1059 setFavButtonState(aText, aFont.GetFamilyName());
1065 OUString aCodeString;
1076 sal_UCS4 cChar = aCodeString.toUInt32(
static_cast<sal_Int16
> (radix));
1079 if (xFontCharMap->HasChar(cChar))
1099 selectCharByCode(Radix::decimal);
1104 selectCharByCode(Radix::hexadecimal);
1112 sal_UCS4 cChar = m_xShowSet->GetSelectCharacter();
1114 setFavButtonState(OUString(&cChar, 1), aFont.GetFamilyName());
1115 const Subset* pSubset = pSubsetMap->GetSubsetByUnicode( cChar );
1117 m_xSubsetLB->set_active_text(pSubset->
GetName());
1120 m_xOKBtn->set_sensitive(
true);
1128 sal_UCS4 cChar = m_xSearchSet->GetSelectCharacter();
1130 setFavButtonState(OUString(&cChar, 1), aFont.GetFamilyName());
1131 const Subset* pSubset = pSubsetMap->GetSubsetByUnicode( cChar );
1133 m_xSubsetLB->set_active_text(pSubset->
GetName());
1136 m_xOKBtn->set_sensitive(
true);
1141 : m_xVirDev(rVirDev)
1149 CustomWidgetController::SetDrawingArea(pDrawingArea);
1156 m_xVirDev->LogicToPixel(aFontSize).Height() * 2);
1175 const OUString aText =
GetText();
1181 bool bGotBoundary =
true;
1182 bool bShrankFont =
false;
1187 for (
tools::Long nFontHeight = aFontSize.
Height(); nFontHeight > 0; nFontHeight -= 5)
1191 bGotBoundary =
false;
1198 if (nAvailWidth > nTextWidth)
1203 rRenderContext.
SetFont(aFont);
1215 aBoundRect += aPoint;
1218 int nYLDelta = aBoundRect.
Top();
1221 aPoint.AdjustY( -(nYLDelta - 1) );
1222 else if( nYHDelta <= 0 )
1223 aPoint.AdjustY(nYHDelta - 1 );
1228 aPoint.setX( -aBoundRect.
Left() + (aSize.
Width() - aBoundRect.
GetWidth()) / 2 );
1233 int nXLDelta = aBoundRect.
Left();
1234 int nXHDelta = aSize.
Width() - aBoundRect.
Right();
1236 aPoint.AdjustX( -(nXLDelta - 1) );
1237 else if( nXHDelta <= 0 )
1238 aPoint.AdjustX(nXHDelta - 1 );
1244 rRenderContext.
DrawText(aPoint, aText);
1249 rRenderContext.
SetFont(aOrigFont);
css::uno::Reference< css::lang::XComponent > m_xFrame
SfxApplication * SfxGetpApp()
Reference< XExecutableDialog > m_xDialog
const StyleSettings & GetStyleSettings() const
static const AllSettings & GetSettings()
sal_Int32 GetValue() const
const OUString & GetValue() const
const vcl::Font & GetFont() const
void SetFont(const vcl::Font &rNewFont)
void DrawRect(const tools::Rectangle &rRect)
bool GetTextBoundRect(tools::Rectangle &rRect, const OUString &rStr, sal_Int32 nBase=0, sal_Int32 nIndex=0, sal_Int32 nLen=-1, sal_uLong nLayoutWidth=0, KernArraySpan aDXArray=KernArraySpan(), o3tl::span< const sal_Bool > pKashidaArray={}, const SalLayoutGlyphs *pGlyphs=nullptr) const
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)
const Color & GetLineColor() const
const Color & GetTextColor() const
tools::Long GetTextHeight() const
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 Color & GetFillColor() const
sal_uInt16 GetWhich(sal_uInt16 nSlot, bool bDeep=true) const
SfxItemPool * GetPool() const
constexpr tools::Long Height() const
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
const Color & GetWindowColor() const
const Color & GetDialogTextColor() const
const Color & GetShadowColor() const
const SubsetVec & GetSubsetMap() const
sal_UCS4 GetRangeMin() const
const OUString & GetName() const
vcl::Font const & GetFont() const
void setMouseClickHdl(const Link< SvxCharView *, void > &rLink)
void SetFont(const vcl::Font &rFont)
void SetHasInsert(bool bInsert)
void SetText(const OUString &rText)
void setClearClickHdl(const Link< SvxCharView *, void > &rLink)
void setClearAllClickHdl(const Link< SvxCharView *, void > &rLink)
The main purpose of this dialog is to enable the use of characters that are not easily accessible fro...
void toggleSearchView(bool state)
std::unique_ptr< SvxShowCharSet > m_xShowSet
std::unique_ptr< weld::Label > m_xFontText
std::unique_ptr< weld::Entry > m_xDecimalCodeText
void getFavCharacterList()
SvxCharView m_aFavCharView[16]
std::deque< OUString > maRecentCharFontList
void DisableFontSelection()
ScopedVclPtr< VirtualDevice > m_xVirDev
void updateFavCharacterList(const OUString &rChar, const OUString &rFont)
std::unique_ptr< weld::ComboBox > m_xFontLB
void updateRecentCharControl()
std::pair< std::deque< OUString >::const_iterator, std::deque< OUString >::const_iterator > getRecentChar(std::u16string_view sTitle, std::u16string_view rFont) const
std::unique_ptr< weld::Entry > m_xHexCodeText
virtual short run() override
bool isFavChar(std::u16string_view sTitle, std::u16string_view rFont)
std::deque< OUString > maRecentCharList
std::unique_ptr< weld::Label > m_xCharName
const vcl::Font & GetCharFont() const
void selectCharByCode(Radix radix)
SvxCharView m_aRecentCharView[16]
std::unique_ptr< SvxSearchCharSet > m_xSearchSet
void getRecentCharacterList()
std::unique_ptr< weld::ComboBox > m_xSubsetLB
void setCharName(sal_UCS4 nDecimalValue)
void setFavButtonState(std::u16string_view sTitle, std::u16string_view rFont)
std::unique_ptr< weld::Button > m_xOKBtn
std::unique_ptr< weld::Widget > m_xRecentGrid
std::unique_ptr< weld::Widget > m_xFavGrid
void deleteFavCharacterFromList(std::u16string_view rChar, std::u16string_view rFont)
void insertCharToDoc(const OUString &sChar)
void SetCharFont(const vcl::Font &rFont)
std::deque< OUString > maFavCharList
void updateFavCharControl()
css::uno::Reference< css::frame::XFrame > m_xFrame
void updateRecentCharacterList(const OUString &rChar, const OUString &rFont)
SvxCharacterMap(weld::Widget *pParent, const SfxItemSet *pSet, css::uno::Reference< css::frame::XFrame > xFrame)
std::unique_ptr< weld::Entry > m_xSearchText
std::unique_ptr< weld::Button > m_xFavouritesBtn
std::unique_ptr< SfxAllItemSet > m_xOutputSet
std::deque< OUString > maFavCharFontList
static void fillAllSubsets(weld::ComboBox &rListBox)
std::pair< std::deque< OUString >::const_iterator, std::deque< OUString >::const_iterator > getFavChar(std::u16string_view sTitle, std::u16string_view rFont) const
FontPitch GetPitch() const
const OUString & GetStyleName() const
rtl_TextEncoding GetCharSet() const
const OUString & GetFamilyName() const
static sal_uInt32 & getSelectedChar()
SvxShowText(const VclPtr< VirtualDevice > &rVirDev)
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &) override
Size get_preferred_size() const
void SetFont(const vcl::Font &rFont)
virtual void Resize() override
ScopedVclPtr< VirtualDevice > m_xVirDev
vcl::Font const & GetFont() const
void SetText(const OUString &rText)
OUString const & GetText() const
void SetCentered(bool bCenter)
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea) override
static std::shared_ptr< ConfigurationChanges > create()
void SetFontSize(const Size &)
FontFamily GetFamilyType()
void SetPitch(FontPitch ePitch)
void SetTransparent(bool bTransparent)
const OUString & GetStyleName() const
void SetWeight(FontWeight)
const OUString & GetFamilyName() const
void SetFamily(FontFamily)
void SetCharSet(rtl_TextEncoding)
const Size & GetFontSize() const
void SetAlignment(TextAlign)
void SetFamilyName(const OUString &rFamilyName)
rtl_TextEncoding GetCharSet() const
virtual void insert_vector(const std::vector< weld::ComboBoxEntry > &rItems, bool bKeepExisting)=0
IMPL_LINK(SvxCharacterMap, RecentClearClickHdl, SvxCharView *, rView, void)
IMPL_LINK_NOARG(SvxCharacterMap, FontSelectHdl, weld::ComboBox &, void)
static std::pair< std::deque< OUString >::const_iterator, std::deque< OUString >::const_iterator > findInPair(std::u16string_view str1, const std::deque< OUString > &rContainer1, std::u16string_view str2, const std::deque< OUString > &rContainer2)
OUString CuiResId(TranslateId aKey)
ScXMLEditAttributeMap::Entry const aEntries[]
#define LINK(Instance, Class, Member)
sal_uInt16 GetFontSize(sal_uInt16 nPos)
bool dispatchCommand(const OUString &rCommand, const uno::Reference< css::frame::XFrame > &rFrame, const css::uno::Sequence< css::beans::PropertyValue > &rArguments, const uno::Reference< css::frame::XDispatchResultListener > &rListener)
css::beans::PropertyValue makePropertyValue(const OUString &rName, T &&rValue)
constexpr T & temporary(T &&x)
OUString toId(const void *pValue)
Reference< XFrame > xFrame