24 #include <svx/svxids.hrc>
45 #include <dialmgr.hxx>
55 #include <officecfg/Office/Common.hxx>
56 #include <strings.hrc>
57 #include <twolines.hrc>
63 #include <osl/diagnose.h>
72 SID_ATTR_CHAR_FONT, SID_ATTR_CHAR_WEIGHT,
73 SID_ATTR_CHAR_FONTHEIGHT, SID_ATTR_CHAR_FONTHEIGHT,
74 SID_ATTR_CHAR_COLOR, SID_ATTR_CHAR_COLOR,
75 SID_ATTR_CHAR_LANGUAGE, SID_ATTR_CHAR_LANGUAGE,
76 SID_ATTR_CHAR_CJK_FONT, SID_ATTR_CHAR_CJK_WEIGHT,
77 SID_ATTR_CHAR_CTL_FONT, SID_ATTR_CHAR_CTL_WEIGHT
81 SID_ATTR_CHAR_SHADOWED, SID_ATTR_CHAR_UNDERLINE,
82 SID_ATTR_CHAR_COLOR, SID_ATTR_CHAR_COLOR,
83 SID_ATTR_CHAR_CASEMAP, SID_ATTR_CHAR_CASEMAP,
84 SID_ATTR_FLASH, SID_ATTR_FLASH,
85 SID_ATTR_CHAR_EMPHASISMARK, SID_ATTR_CHAR_EMPHASISMARK,
86 SID_ATTR_CHAR_RELIEF, SID_ATTR_CHAR_RELIEF,
87 SID_ATTR_CHAR_HIDDEN, SID_ATTR_CHAR_HIDDEN,
88 SID_ATTR_CHAR_OVERLINE, SID_ATTR_CHAR_OVERLINE
92 SID_ATTR_CHAR_KERNING, SID_ATTR_CHAR_KERNING,
93 SID_ATTR_CHAR_ESCAPEMENT, SID_ATTR_CHAR_ESCAPEMENT,
94 SID_ATTR_CHAR_AUTOKERN, SID_ATTR_CHAR_AUTOKERN,
95 SID_ATTR_CHAR_ROTATED, SID_ATTR_CHAR_SCALEWIDTH,
96 SID_ATTR_CHAR_WIDTH_FIT_TO_LINE, SID_ATTR_CHAR_WIDTH_FIT_TO_LINE
100 SID_ATTR_CHAR_TWO_LINES, SID_ATTR_CHAR_TWO_LINES
136 :
SfxTabPage(pPage, pController, rUIXMLDescription, rID, &rItemset)
137 , m_bPreviewBackgroundToCharacter(
false )
152 sal_uInt16 nWhich =
GetWhich( SID_ATTR_CHAR_SCALEWIDTH );
180 : m_nExtraEntryPos(
std::numeric_limits<
int>::
max())
181 , m_bInSearchMode(
false)
191 :
SvxCharBasePage(pPage, pController,
"cui/ui/charnamepage.ui",
"CharNamePage", rInSet)
194 , m_xWestern(m_xBuilder->weld_notebook(
"nbWestern"))
195 , m_xWestFontNameFT(m_xBuilder->weld_label(
"lbWestFontname"))
196 , m_xWestFontStyleFT(m_xBuilder->weld_label(
"lbWestStyle"))
197 , m_xWestFontStyleLB(new
FontStyleBox(m_xBuilder->weld_combo_box(
"cbWestStyle")))
198 , m_xWestFontSizeFT(m_xBuilder->weld_label(
"lbWestSize"))
199 , m_xWestFontSizeLB(new
FontSizeBox(m_xBuilder->weld_combo_box(
"cbWestSize")))
200 , m_xWestFontLanguageFT(m_xBuilder->weld_label(
"lbWestLanguage"))
201 , m_xWestFontLanguageLB(new
SvxLanguageBox(m_xBuilder->weld_combo_box(
"cbWestLanguage")))
202 , m_xWestFontFeaturesButton(m_xBuilder->weld_button(
"btnWestFeatures"))
203 , m_xWestFontTypeFT(m_xBuilder->weld_label(
"lbWestFontinfo"))
204 , m_xCJK_CTL(m_xBuilder->weld_notebook(
"nbCJKCTL"))
206 , m_xEastFontNameFT(m_xBuilder->weld_label(
"lbCJKFontname"))
207 , m_xEastFontStyleFT(m_xBuilder->weld_label(
"lbCJKStyle"))
208 , m_xEastFontStyleLB(new
FontStyleBox(m_xBuilder->weld_combo_box(
"cbCJKStyle")))
209 , m_xEastFontSizeFT(m_xBuilder->weld_label(
"lbCJKSize"))
210 , m_xEastFontSizeLB(new
FontSizeBox(m_xBuilder->weld_combo_box(
"cbCJKSize")))
211 , m_xEastFontLanguageFT(m_xBuilder->weld_label(
"lbCJKLanguage"))
212 , m_xEastFontLanguageLB(new
SvxLanguageBox(m_xBuilder->weld_combo_box(
"cbCJKLanguage")))
213 , m_xEastFontFeaturesButton(m_xBuilder->weld_button(
"btnCJKFeatures"))
214 , m_xEastFontTypeFT(m_xBuilder->weld_label(
"lbCJKFontinfo"))
216 , m_xCTLFontNameFT(m_xBuilder->weld_label(
"lbCTLFontname"))
218 , m_xCTLFontStyleFT(m_xBuilder->weld_label(
"lbCTLStyle"))
219 , m_xCTLFontStyleLB(new
FontStyleBox(m_xBuilder->weld_combo_box(
"cbCTLStyle")))
220 , m_xCTLFontSizeFT(m_xBuilder->weld_label(
"lbCTLSize"))
221 , m_xCTLFontSizeLB(new
FontSizeBox(m_xBuilder->weld_combo_box(
"cbCTLSize")))
222 , m_xCTLFontLanguageFT(m_xBuilder->weld_label(
"lbCTLLanguage"))
223 , m_xCTLFontLanguageLB(new
SvxLanguageBox(m_xBuilder->weld_combo_box(
"cbCTLLanguage")))
224 , m_xCTLFontFeaturesButton(m_xBuilder->weld_button(
"btnCTLFeatures"))
225 , m_xCTLFontTypeFT(m_xBuilder->weld_label(
"lbCTLFontinfo"))
235 std::unique_ptr<weld::EntryTreeView> xWestFontName = m_xBuilder->weld_entry_tree_view(
"gdWestern",
"edWestFontName",
"trWestFontName");
236 std::unique_ptr<weld::EntryTreeView> xCJKFontName = m_xBuilder->weld_entry_tree_view(
"gdCJK",
"edCJKFontName",
"trCJKFontName");
237 std::unique_ptr<weld::EntryTreeView> xCTLFontName = m_xBuilder->weld_entry_tree_view(
"gdCTL",
"edCTLFontName",
"trCTLFontName");
240 xWestFontName->set_height_request_by_rows(7);
241 xCJKFontName->set_height_request_by_rows(7);
242 xCTLFontName->set_height_request_by_rows(7);
251 bool bShowNonWestern = bShowCJK || bShowCTL;
252 if (!bShowNonWestern)
257 else if (!bShowCJK)
m_xCJK_CTL->remove_page(
"nbCJK");
258 else if (!bShowCTL)
m_xCJK_CTL->remove_page(
"nbCTL");
268 OUString sFontFamilyString(
CuiResId(RID_CUISTR_CHARNAME_FONT));
270 OUString sFontFamilyString(
CuiResId(RID_CUISTR_CHARNAME_FAMILY));
277 OUString sFontStyleString(
CuiResId(RID_CUISTR_CHARNAME_TYPEFACE));
279 OUString sFontStyleString(
CuiResId(RID_CUISTR_CHARNAME_STYLE));
291 int nVisibleChars = 15;
353 if ( pItem !=
nullptr )
356 "Where is the font list?");
366 return m_pImpl->m_pFontList.get();
379 sal_uInt16 _nFontWhich,
380 sal_uInt16 _nFontHeightWhich)
382 Size aSize = _rFont.GetFontSize();
386 bool bFontAvailable = _pFontList->
IsAvailable( sFontName );
393 if ( eState >= SfxItemState::DEFAULT )
433 _rFont.SetPitch( aFontMetrics.
GetPitch() );
434 _rFont.SetCharSet( aFontMetrics.
GetCharSet() );
435 _rFont.SetWeight( aFontMetrics.
GetWeight() );
436 _rFont.SetItalic( aFontMetrics.
GetItalic() );
454 pFontList,
GetWhich(SID_ATTR_CHAR_FONT),
455 GetWhich(SID_ATTR_CHAR_FONTHEIGHT));
461 pFontList,
GetWhich(SID_ATTR_CHAR_CJK_FONT),
462 GetWhich(SID_ATTR_CHAR_CJK_FONTHEIGHT));
466 FontMetric aCTLFontMetric = calcFontMetrics(rCTLFont,
469 GetWhich(SID_ATTR_CHAR_CTL_FONTHEIGHT));
496 SAL_WARN(
"cui.tabpages",
"invalid font name box" );
530 SAL_WARN(
"cui.tabpages",
"invalid font name box" );
534 pStyleBox->
Fill(sFontName, pFontList);
536 if ( !
m_pImpl->m_bInSearchMode )
541 OUString aEntry =
m_pImpl->m_aNoStyleText;
542 const char sS[] =
"%1";
543 aEntry = aEntry.replaceFirst( sS, pFontList->
GetBoldStr() );
546 aEntry =
m_pImpl->m_aNoStyleText;
547 aEntry = aEntry.replaceFirst( sS, pFontList->
GetItalicStr() );
572 SAL_WARN(
"cui.tabpages",
"invalid font name box" );
576 pSizeBox->
Fill( pFontList );
585 std::vector<weld::ComboBoxEntry> aVector;
586 aVector.reserve(nFontCount);
587 for (sal_uInt16 i = 0;
i < nFontCount; ++
i)
605 sal_uInt16 nWhich = 0;
617 nWhich =
GetWhich( SID_ATTR_CHAR_FONT );
628 nWhich =
GetWhich( SID_ATTR_CHAR_CJK_FONT );
639 nWhich =
GetWhich( SID_ATTR_CHAR_CTL_FONT );
644 FillFontNames(*pNameBox, *pFontList);
649 if ( eState >= SfxItemState::DEFAULT )
651 pFontItem =
static_cast<const SvxFontItem*
>(&( rSet.
Get( nWhich ) ));
667 bool bStyleAvailable =
true;
673 case Asian : nWhich =
GetWhich( SID_ATTR_CHAR_CJK_POSTURE );
break;
674 case Ctl : nWhich =
GetWhich( SID_ATTR_CHAR_CTL_POSTURE );
break;
678 if ( eState >= SfxItemState::DEFAULT )
681 eItalic = rItem.GetValue();
684 bStyleAvailable = bStyleAvailable && (eState >= SfxItemState::DONTCARE);
689 case Asian : nWhich =
GetWhich( SID_ATTR_CHAR_CJK_WEIGHT );
break;
690 case Ctl : nWhich =
GetWhich( SID_ATTR_CHAR_CTL_WEIGHT );
break;
694 if ( eState >= SfxItemState::DEFAULT )
697 eWeight = rItem.GetValue();
701 bStyleAvailable = bStyleAvailable && (eState >= SfxItemState::DONTCARE);
704 if ( bStyle && pFontItem )
709 else if ( !
m_pImpl->m_bInSearchMode || !bStyle )
715 FontMetric aFontMetric = pFontList->
Get( OUString(), eWeight, eItalic );
718 if (!bStyleAvailable)
728 case Asian : nWhich =
GetWhich( SID_ATTR_CHAR_CJK_FONTHEIGHT );
break;
729 case Ctl : nWhich =
GetWhich( SID_ATTR_CHAR_CTL_FONTHEIGHT );
break;
740 bool bPtRel = MapUnit::MapPoint == rItem.
GetPropUnit();
750 else if ( eState >= SfxItemState::DEFAULT )
759 if ( eState <= SfxItemState::DISABLED )
769 case Asian : nWhich =
GetWhich( SID_ATTR_CHAR_CJK_LANGUAGE );
break;
770 case Ctl : nWhich =
GetWhich( SID_ATTR_CHAR_CTL_LANGUAGE );
break;
777 case SfxItemState::UNKNOWN:
782 case SfxItemState::DISABLED:
787 case SfxItemState::DEFAULT:
788 case SfxItemState::SET:
797 case SfxItemState::DONTCARE:
828 bool bModified =
false;
834 sal_uInt16 nWhich = 0;
835 sal_uInt16 nSlot = 0;
844 nSlot = SID_ATTR_CHAR_FONT;
852 nSlot = SID_ATTR_CHAR_CJK_FONT;
860 nSlot = SID_ATTR_CHAR_CTL_FONT;
871 bool bChanged =
true;
875 int nEntryPos = pStyleBox->
find_text(aStyleBoxText);
876 if (nEntryPos >=
m_pImpl->m_nExtraEntryPos)
877 aStyleBoxText.clear();
878 FontMetric aInfo( pFontList->
Get( rFontName, aStyleBoxText ) );
879 SvxFontItem aFontItem( aInfo.GetFamilyType(), aInfo.GetFamilyName(), aInfo.GetStyleName(),
880 aInfo.GetPitch(), aInfo.GetCharSet(), nWhich );
894 if ( !bChanged && pExampleSet &&
895 pExampleSet->
GetItemState( nWhich,
false, &pItem ) == SfxItemState::SET &&
899 if ( bChanged && !rFontName.isEmpty() )
901 rSet.
Put( aFontItem );
904 else if ( SfxItemState::DEFAULT == rOldSet.
GetItemState( nWhich,
false ) )
911 case Western : nSlot = SID_ATTR_CHAR_WEIGHT;
break;
912 case Asian : nSlot = SID_ATTR_CHAR_CJK_WEIGHT;
break;
913 case Ctl : nSlot = SID_ATTR_CHAR_CTL_WEIGHT;
break;
917 if ( nEntryPos >=
m_pImpl->m_nExtraEntryPos )
926 if ( rItem.GetValue() == aWeightItem.GetValue() )
934 if (
m_pImpl->m_bInSearchMode && bChanged &&
939 if ( !bChanged && pExampleSet &&
940 pExampleSet->
GetItemState( nWhich,
false, &pItem ) == SfxItemState::SET &&
944 if ( nEntryPos >=
m_pImpl->m_nExtraEntryPos )
945 bChanged = ( nEntryPos ==
m_pImpl->m_nExtraEntryPos );
949 if ( bChanged && !aText.isEmpty() )
951 rSet.
Put( aWeightItem );
954 else if ( SfxItemState::DEFAULT == rOldSet.
GetItemState( nWhich,
false ) )
960 case Western : nSlot = SID_ATTR_CHAR_POSTURE;
break;
961 case Asian : nSlot = SID_ATTR_CHAR_CJK_POSTURE;
break;
962 case Ctl : nSlot = SID_ATTR_CHAR_CTL_POSTURE;
break;
966 if ( nEntryPos >=
m_pImpl->m_nExtraEntryPos )
975 if ( rItem.GetValue() == aPostureItem.GetValue() )
983 if (
m_pImpl->m_bInSearchMode && bChanged &&
988 if ( !bChanged && pExampleSet &&
989 pExampleSet->
GetItemState( nWhich,
false, &pItem ) == SfxItemState::SET &&
993 if ( nEntryPos >=
m_pImpl->m_nExtraEntryPos )
994 bChanged = ( nEntryPos == (
m_pImpl->m_nExtraEntryPos + 1 ) );
996 if ( bChanged && !aText.isEmpty() )
998 rSet.
Put( aPostureItem );
1001 else if ( SfxItemState::DEFAULT == rOldSet.
GetItemState( nWhich,
false ) )
1014 case Western : nSlot = SID_ATTR_CHAR_FONTHEIGHT;
break;
1015 case Asian : nSlot = SID_ATTR_CHAR_CJK_FONTHEIGHT;
break;
1016 case Ctl : nSlot = SID_ATTR_CHAR_CTL_FONTHEIGHT;
break;
1020 bChanged = ( nSize != nSavedSize );
1022 if ( !bChanged && pExampleSet &&
1023 pExampleSet->
GetItemState( nWhich,
false, &pItem ) == SfxItemState::SET )
1025 float fSize =
static_cast<float>(nSize) / 10;
1027 if ( static_cast<const SvxFontHeightItem*>(pItem)->GetHeight() !=
static_cast<sal_uInt32
>(nVal) )
1031 if ( bChanged || !pOldHeight ||
1032 bRel != ( MapUnit::MapRelative != pOldHeight->
GetPropUnit() || 100 != pOldHeight->
GetProp() ) )
1043 aHeight.
SetHeight( rOldItem.
GetHeight(),
static_cast<sal_uInt16
>( nSize / 10 ), MapUnit::MapPoint, eUnit );
1046 rSet.
Put( aHeight );
1050 float fSize =
static_cast<float>(nSize) / 10;
1055 else if ( SfxItemState::DEFAULT == rOldSet.
GetItemState( nWhich,
false ) )
1061 case Western : nSlot = SID_ATTR_CHAR_LANGUAGE;
break;
1062 case Asian : nSlot = SID_ATTR_CHAR_CJK_LANGUAGE;
break;
1063 case Ctl : nSlot = SID_ATTR_CHAR_CTL_LANGUAGE;
break;
1096 if (nLangPos == -1 || eLangType == rItem.GetValue())
1103 if (bChanged && nLangPos != -1)
1108 else if ( SfxItemState::DEFAULT == rOldSet.
GetItemState( nWhich,
false ) )
1116 UpdatePreview_Impl();
1121 FontModifyHdl_Impl(rBox);
1129 if (&rButton == m_xWestFontFeaturesButton.get())
1131 pNameBox = m_xWestFontNameLB.get();
1132 sFontName = GetPreviewFont().GetFamilyName();
1134 else if (&rButton == m_xEastFontFeaturesButton.get())
1136 pNameBox = m_xEastFontNameLB.get();
1137 sFontName = GetPreviewCJKFont().GetFamilyName();
1139 else if (&rButton == m_xCTLFontFeaturesButton.get())
1141 pNameBox = m_xCTLFontNameLB.get();
1142 sFontName = GetPreviewCTLFont().GetFamilyName();
1145 if (!sFontName.isEmpty() && pNameBox)
1151 UpdatePreview_Impl();
1158 m_pImpl->m_aUpdateIdle.Start();
1179 return DeactivateRC::LeavePage;
1184 return std::make_unique<SvxCharNamePage>(pPage, pController, *rSet );
1241 _pFontSizeLB->
EnablePtRelativeMode( sal::static_int_cast< short >(-(nCurHeight - 20)), (9999 - nCurHeight) );
1255 m_pImpl->m_bInSearchMode =
true;
1281 sal_uInt32 nFlags=pFlagItem->GetValue();
1294 :
SvxCharBasePage(pPage, pController,
"cui/ui/effectspage.ui",
"EffectsPage", rInSet)
1295 , m_bOrigFontColor(
false)
1296 , m_bNewFontColor(
false)
1297 , m_bEnableNoneFontColor(
false)
1298 , m_xFontColorFT(m_xBuilder->weld_label(
"fontcolorft"))
1299 , m_xFontColorLB(new
ColorListBox(m_xBuilder->weld_menu_button(
"fontcolorlb"),
1301 , m_xFontTransparencyFT(m_xBuilder->weld_label(
"fonttransparencyft"))
1302 , m_xFontTransparencyMtr(
1303 m_xBuilder->weld_metric_spin_button(
"fonttransparencymtr", FieldUnit::PERCENT))
1304 , m_xEffectsFT(m_xBuilder->weld_label(
"effectsft"))
1305 , m_xEffectsLB(m_xBuilder->weld_combo_box(
"effectslb"))
1306 , m_xReliefFT(m_xBuilder->weld_label(
"reliefft"))
1307 , m_xReliefLB(m_xBuilder->weld_combo_box(
"relieflb"))
1308 , m_xOutlineBtn(m_xBuilder->weld_check_button(
"outlinecb"))
1309 , m_xShadowBtn(m_xBuilder->weld_check_button(
"shadowcb"))
1310 , m_xHiddenBtn(m_xBuilder->weld_check_button(
"hiddencb"))
1311 , m_xOverlineLB(m_xBuilder->weld_combo_box(
"overlinelb"))
1312 , m_xOverlineColorFT(m_xBuilder->weld_label(
"overlinecolorft"))
1313 , m_xOverlineColorLB(
new ColorListBox(m_xBuilder->weld_menu_button(
"overlinecolorlb"),
1314 [
this]{
return GetDialogController()->getDialog(); }))
1315 , m_xStrikeoutLB(m_xBuilder->weld_combo_box(
"strikeoutlb"))
1316 , m_xUnderlineLB(m_xBuilder->weld_combo_box(
"underlinelb"))
1317 , m_xUnderlineColorFT(m_xBuilder->weld_label(
"underlinecolorft"))
1318 , m_xUnderlineColorLB(
new ColorListBox(m_xBuilder->weld_menu_button(
"underlinecolorlb"),
1319 [
this]{
return GetDialogController()->getDialog(); }))
1320 , m_xIndividualWordsBtn(m_xBuilder->weld_check_button(
"individualwordscb"))
1321 , m_xEmphasisFT(m_xBuilder->weld_label(
"emphasisft"))
1322 , m_xEmphasisLB(m_xBuilder->weld_combo_box(
"emphasislb"))
1323 , m_xPositionFT(m_xBuilder->weld_label(
"positionft"))
1324 , m_xPositionLB(m_xBuilder->weld_combo_box(
"positionlb"))
1325 , m_xA11yWarningFT(m_xBuilder->weld_label(
"a11ywarning"))
1327 m_xPreviewWin.reset(
new weld::CustomWeld(*m_xBuilder,
"preview", m_aPreviewWin));
1329 m_xPreviewWin->hide();
1331 m_xFontColorLB->SetSlotId(SID_ATTR_CHAR_COLOR);
1332 m_xOverlineColorLB->SetSlotId(SID_ATTR_CHAR_COLOR);
1333 m_xUnderlineColorLB->SetSlotId(SID_ATTR_CHAR_COLOR);
1358 if ( !pHtmlModeItem)
1362 pHtmlModeItem = pShell->
GetItem( SID_HTML_MODE );
1412 m_xA11yWarningFT->set_visible(officecfg::Office::Common::Accessibility::IsAutomaticFontColor::get());
1422 rFont.SetColor(rSelectedColor);
1423 rCJKFont.SetColor(rSelectedColor);
1424 rCTLFont.SetColor(rSelectedColor);
1430 rFont.SetUnderline( eUnderline );
1431 rCJKFont.SetUnderline( eUnderline );
1432 rCTLFont.SetUnderline( eUnderline );
1434 rFont.SetOverline( eOverline );
1435 rCJKFont.SetOverline( eOverline );
1436 rCTLFont.SetOverline( eOverline );
1438 rFont.SetStrikeout( eStrikeout );
1439 rCJKFont.SetStrikeout( eStrikeout );
1440 rCTLFont.SetStrikeout( eStrikeout );
1443 if (nEmphasis != -1)
1447 eMark |= bUnder ? FontEmphasisMark::PosBelow : FontEmphasisMark::PosAbove;
1448 rFont.SetEmphasisMark( eMark );
1449 rCJKFont.SetEmphasisMark( eMark );
1450 rCTLFont.SetEmphasisMark( eMark );
1456 rFont.SetRelief( static_cast<FontRelief>(nRelief) );
1457 rCJKFont.SetRelief( static_cast<FontRelief>(nRelief) );
1458 rCTLFont.SetRelief( static_cast<FontRelief>(nRelief) );
1462 rCJKFont.SetOutline( rFont.IsOutline() );
1463 rCTLFont.SetOutline( rFont.IsOutline() );
1466 rCJKFont.SetShadow( rFont.IsShadow() );
1467 rCTLFont.SetShadow( rFont.IsShadow() );
1476 rCTLFont.
SetCaseMap( eCaps == SvxCaseMap::SmallCaps ? SvxCaseMap::NotMapped : eCaps );
1480 rFont.SetWordLineMode( bWordLine );
1481 rCJKFont.SetWordLineMode( bWordLine );
1482 rCTLFont.SetWordLineMode( bWordLine );
1489 if ( SvxCaseMap::End > eCaseMap )
1491 sal::static_int_cast< sal_Int32 >( eCaseMap ) );
1503 sal_uInt16 nWhich =
GetWhich( SID_ATTR_CHAR_COLOR );
1509 case SfxItemState::UNKNOWN:
1514 case SfxItemState::DISABLED:
1519 case SfxItemState::DONTCARE:
1526 case SfxItemState::DEFAULT:
1527 case SfxItemState::SET:
1535 rFont.SetColor(aColor);
1536 rCJKFont.SetColor(aColor);
1537 rCTLFont.SetColor(aColor);
1542 Color aRGBColor = aColor;
1551 double fTransparency = (255 - aColor.
GetAlpha()) * 100.0 / 255;
1553 FieldUnit::PERCENT);
1566 sal_uInt16 nWhich =
GetWhich( SID_ATTR_CHAR_COLOR );
1578 double fTransparency
1603 else if ( SfxItemState::DEFAULT == rOldSet.
GetItemState( nWhich,
false ) )
1611 SelectHdl_Impl(&rBox);
1619 bool bEnable = nEPos > 0;
1632 bool bUEnable = nUPos > 0;
1637 bool bOEnable = nOPos > 0;
1649 m_aIndividualWordsState.ButtonToggled(rToggle);
1650 UpdatePreview_Impl();
1651 UpdatePreview_Impl();
1656 if (m_xFontColorLB.get() == &rBox)
1657 m_bNewFontColor =
true;
1658 UpdatePreview_Impl();
1663 m_bNewFontColor =
true;
1670 return DeactivateRC::LeavePage;
1675 return std::make_unique<SvxCharEffectsPage>( pPage, pController, *rSet );
1684 bool bEnable =
false;
1687 sal_uInt16 nWhich =
GetWhich( SID_ATTR_CHAR_UNDERLINE );
1695 if ( eState >= SfxItemState::DONTCARE )
1697 if ( eState == SfxItemState::DONTCARE )
1703 rFont.SetUnderline( eUnderline );
1704 rCJKFont.SetUnderline( eUnderline );
1705 rCTLFont.SetUnderline( eUnderline );
1727 nWhich =
GetWhich( SID_ATTR_CHAR_OVERLINE );
1735 if ( eState >= SfxItemState::DONTCARE )
1737 if ( eState == SfxItemState::DONTCARE )
1743 rFont.SetOverline( eOverline );
1744 rCJKFont.SetOverline( eOverline );
1745 rCTLFont.SetOverline( eOverline );
1767 nWhich =
GetWhich( SID_ATTR_CHAR_STRIKEOUT );
1775 if ( eState >= SfxItemState::DONTCARE )
1777 if ( eState == SfxItemState::DONTCARE )
1783 rFont.SetStrikeout( eStrikeout );
1784 rCJKFont.SetStrikeout( eStrikeout );
1785 rCTLFont.SetStrikeout( eStrikeout );
1800 nWhich =
GetWhich( SID_ATTR_CHAR_WORDLINEMODE );
1805 case SfxItemState::UNKNOWN:
1810 case SfxItemState::DISABLED:
1815 case SfxItemState::DONTCARE:
1820 case SfxItemState::DEFAULT:
1821 case SfxItemState::SET:
1824 rFont.SetWordLineMode( rItem.GetValue() );
1825 rCJKFont.SetWordLineMode( rItem.GetValue() );
1826 rCTLFont.SetWordLineMode( rItem.GetValue() );
1836 nWhich =
GetWhich( SID_ATTR_CHAR_EMPHASISMARK );
1839 if ( eState >= SfxItemState::DEFAULT )
1843 rFont.SetEmphasisMark( eMark );
1844 rCJKFont.SetEmphasisMark( eMark );
1845 rCTLFont.SetEmphasisMark( eMark );
1849 int nEntryData = ( eMark == FontEmphasisMark::PosAbove )
1857 else if ( eState == SfxItemState::DONTCARE )
1859 else if ( eState == SfxItemState::UNKNOWN )
1878 nWhich =
GetWhich( SID_ATTR_CHAR_CASEMAP );
1882 case SfxItemState::UNKNOWN:
1887 case SfxItemState::DISABLED:
1892 case SfxItemState::DONTCARE:
1896 case SfxItemState::DEFAULT:
1897 case SfxItemState::SET:
1900 eCaseMap = rItem.GetValue();
1907 nWhich =
GetWhich(SID_ATTR_CHAR_RELIEF);
1911 case SfxItemState::UNKNOWN:
1916 case SfxItemState::DISABLED:
1921 case SfxItemState::DONTCARE:
1925 case SfxItemState::DEFAULT:
1926 case SfxItemState::SET:
1929 m_xReliefLB->set_active(static_cast<sal_Int32>(rItem.GetValue()));
1936 nWhich =
GetWhich( SID_ATTR_CHAR_CONTOUR );
1940 case SfxItemState::UNKNOWN:
1945 case SfxItemState::DISABLED:
1950 case SfxItemState::DONTCARE:
1955 case SfxItemState::DEFAULT:
1956 case SfxItemState::SET:
1960 m_xOutlineBtn->set_state(static_cast<TriState>(rItem.GetValue()));
1966 nWhich =
GetWhich( SID_ATTR_CHAR_SHADOWED );
1971 case SfxItemState::UNKNOWN:
1976 case SfxItemState::DISABLED:
1981 case SfxItemState::DONTCARE:
1986 case SfxItemState::DEFAULT:
1987 case SfxItemState::SET:
1991 m_xShadowBtn->set_state( static_cast<TriState>(rItem.GetValue()) );
1997 nWhich =
GetWhich( SID_ATTR_CHAR_HIDDEN );
2002 case SfxItemState::UNKNOWN:
2007 case SfxItemState::DISABLED:
2012 case SfxItemState::DONTCARE:
2017 case SfxItemState::DEFAULT:
2018 case SfxItemState::SET:
2022 m_xHiddenBtn->set_state(static_cast<TriState>(rItem.GetValue()));
2039 m_aHiddenState.ButtonToggled(rToggle);
2044 m_aOutlineState.ButtonToggled(rToggle);
2045 UpdatePreview_Impl();
2050 m_aShadowState.ButtonToggled(rToggle);
2051 UpdatePreview_Impl();
2074 bool bModified =
false;
2075 bool bChanged =
true;
2078 sal_uInt16 nWhich =
GetWhich( SID_ATTR_CHAR_UNDERLINE );
2079 pOld =
GetOldItem( *rSet, SID_ATTR_CHAR_UNDERLINE );
2089 bool bAllowChg =
nPos != -1 &&
2090 SfxItemState::DEFAULT > rOldSet.
GetItemState( nWhich );
2093 if ( rItem.GetValue() == eUnder &&
2103 rSet->
Put( aNewItem );
2106 else if ( SfxItemState::DEFAULT == rOldSet.
GetItemState( nWhich,
false ) )
2112 nWhich =
GetWhich( SID_ATTR_CHAR_OVERLINE );
2113 pOld =
GetOldItem( *rSet, SID_ATTR_CHAR_OVERLINE );
2123 bool bAllowChg =
nPos != -1 &&
2124 SfxItemState::DEFAULT > rOldSet.
GetItemState( nWhich );
2127 if ( rItem.GetValue() == eOver &&
2137 rSet->
Put( aNewItem );
2140 else if ( SfxItemState::DEFAULT == rOldSet.
GetItemState( nWhich,
false ) )
2146 nWhich =
GetWhich( SID_ATTR_CHAR_STRIKEOUT );
2147 pOld =
GetOldItem( *rSet, SID_ATTR_CHAR_STRIKEOUT );
2157 bool bAllowChg =
nPos != -1 &&
2158 SfxItemState::DEFAULT > rOldSet.
GetItemState( nWhich );
2162 || (rItem.GetValue() == eStrike && !bAllowChg) )
2171 else if ( SfxItemState::DEFAULT == rOldSet.
GetItemState( nWhich,
false ) )
2178 nWhich =
GetWhich( SID_ATTR_CHAR_WORDLINEMODE );
2179 pOld =
GetOldItem( *rSet, SID_ATTR_CHAR_WORDLINEMODE );
2190 if ( !bChanged && pExampleSet && pExampleSet->
GetItemState( nWhich,
false, &pItem ) == SfxItemState::SET &&
2199 else if ( SfxItemState::DEFAULT == rOldSet.
GetItemState( nWhich,
false ) )
2205 nWhich =
GetWhich( SID_ATTR_CHAR_EMPHASISMARK );
2206 pOld =
GetOldItem( *rSet, SID_ATTR_CHAR_EMPHASISMARK );
2214 ? FontEmphasisMark::PosBelow : FontEmphasisMark::PosAbove;
2219 if( rOldSet.
GetItemState( nWhich ) != SfxItemState::DONTCARE )
2227 if (rOldSet.
GetItemState( nWhich ) == SfxItemState::DONTCARE &&
2238 else if ( SfxItemState::DEFAULT == rOldSet.
GetItemState( nWhich,
false ) )
2244 nWhich =
GetWhich( SID_ATTR_CHAR_CASEMAP );
2245 pOld =
GetOldItem( *rSet, SID_ATTR_CHAR_CASEMAP );
2247 bool bChecked =
false;
2251 eCaseMap =
static_cast<SvxCaseMap>(nCapsPos);
2261 bool bAllowChg =
nPos != -1 &&
2262 SfxItemState::DEFAULT > rOldSet.
GetItemState( nWhich );
2265 if ( rItem.GetValue() == eCaseMap && !bAllowChg )
2269 if ( bChanged && bChecked )
2274 else if ( SfxItemState::DEFAULT == rOldSet.
GetItemState( nWhich,
false ) )
2280 nWhich =
GetWhich(SID_ATTR_CHAR_RELIEF);
2289 nWhich =
GetWhich( SID_ATTR_CHAR_CONTOUR );
2290 pOld =
GetOldItem( *rSet, SID_ATTR_CHAR_CONTOUR );
2300 if ( !bChanged && pExampleSet && pExampleSet->
GetItemState( nWhich,
false, &pItem ) == SfxItemState::SET &&
2309 else if ( SfxItemState::DEFAULT == rOldSet.
GetItemState( nWhich,
false ) )
2315 nWhich =
GetWhich( SID_ATTR_CHAR_SHADOWED );
2316 pOld =
GetOldItem( *rSet, SID_ATTR_CHAR_SHADOWED );
2326 if ( !bChanged && pExampleSet && pExampleSet->
GetItemState( nWhich,
false, &pItem ) == SfxItemState::SET &&
2335 else if ( SfxItemState::DEFAULT == rOldSet.
GetItemState( nWhich,
false ) )
2341 nWhich =
GetWhich( SID_ATTR_CHAR_HIDDEN );
2342 pOld =
GetOldItem( *rSet, SID_ATTR_CHAR_HIDDEN );
2353 if ( !bChanged && pExampleSet && pExampleSet->
GetItemState( nWhich,
false, &pItem ) == SfxItemState::SET &&
2362 else if ( SfxItemState::DEFAULT == rOldSet.
GetItemState( nWhich,
false ) )
2383 if (pDisableCtlItem)
2389 sal_uInt32 nFlags=pFlagItem->GetValue();
2404 :
SvxCharBasePage(pPage, pController,
"cui/ui/positionpage.ui",
"PositionPage", rInSet)
2407 , m_nScaleWidthItemSetVal(100)
2408 , m_nScaleWidthInitialVal(100)
2411 , m_xHighPosBtn(m_xBuilder->weld_radio_button(
"superscript"))
2412 , m_xNormalPosBtn(m_xBuilder->weld_radio_button(
"normal"))
2413 , m_xLowPosBtn(m_xBuilder->weld_radio_button(
"subscript"))
2414 , m_xHighLowFT(m_xBuilder->weld_label(
"raiselower"))
2415 , m_xHighLowMF(m_xBuilder->weld_metric_spin_button(
"raiselowersb",
FieldUnit::
PERCENT))
2416 , m_xHighLowRB(m_xBuilder->weld_check_button(
"automatic"))
2417 , m_xFontSizeFT(m_xBuilder->weld_label(
"relativefontsize"))
2418 , m_xFontSizeMF(m_xBuilder->weld_metric_spin_button(
"fontsizesb",
FieldUnit::
PERCENT))
2419 , m_xRotationContainer(m_xBuilder->weld_widget(
"rotationcontainer"))
2420 , m_xScalingFT(m_xBuilder->weld_label(
"scale"))
2421 , m_xScalingAndRotationFT(m_xBuilder->weld_label(
"rotateandscale"))
2422 , m_x0degRB(m_xBuilder->weld_radio_button(
"0deg"))
2423 , m_x90degRB(m_xBuilder->weld_radio_button(
"90deg"))
2424 , m_x270degRB(m_xBuilder->weld_radio_button(
"270deg"))
2425 , m_xFitToLineCB(m_xBuilder->weld_check_button(
"fittoline"))
2426 , m_xScaleWidthMF(m_xBuilder->weld_metric_spin_button(
"scalewidthsb",
FieldUnit::
PERCENT))
2427 , m_xKerningMF(m_xBuilder->weld_metric_spin_button(
"kerningsb",
FieldUnit::
POINT))
2428 , m_xPairKerningBtn(m_xBuilder->weld_check_button(
"pairkerning"))
2484 if ( SvxEscapement::Superscript == nEsc )
2489 else if ( SvxEscapement::Subscript == nEsc )
2495 short nFac = aEscItm.
GetEsc() < 0 ? -1 : 1;
2500 if ( SvxEscapement::Off == nEsc )
2531 if (m_xHighPosBtn->get_active())
2532 nEsc = SvxEscapement::Superscript;
2533 else if (m_xLowPosBtn->get_active())
2534 nEsc = SvxEscapement::Subscript;
2536 SetEscapement_Impl( nEsc );
2541 bool bEnable =
false;
2542 if (m_x90degRB->get_active() || m_x270degRB->get_active())
2545 OSL_ENSURE(m_x0degRB->get_active(),
"unexpected button");
2546 m_xFitToLineCB->set_sensitive(bEnable);
2552 short nEsc =
static_cast<short>(
m_xHighLowMF->get_value(FieldUnit::PERCENT));
2561 m_xHighLowFT->set_sensitive(
false);
2562 m_xHighLowMF->set_sensitive(
false);
2565 PositionHdl_Impl(m_xHighPosBtn->get_active() ? *m_xHighPosBtn
2566 : m_xLowPosBtn->get_active() ? *m_xLowPosBtn
2567 : *m_xNormalPosBtn);
2572 sal_uInt16 nVal = m_nScaleWidthInitialVal;
2573 if (m_xFitToLineCB->get_active())
2574 nVal = m_nScaleWidthItemSetVal;
2575 m_xScaleWidthMF->set_value(nVal, FieldUnit::PERCENT);
2576 m_aPreviewWin.SetFontWidthScale( nVal );
2584 tools::Long nKern =
static_cast<short>(m_xKerningMF->denormalize(nVal));
2586 SvxFont& rFont = GetPreviewFont();
2587 SvxFont& rCJKFont = GetPreviewCJKFont();
2588 SvxFont& rCTLFont = GetPreviewCTLFont();
2593 m_aPreviewWin.Invalidate();
2598 bool bHigh = m_xHighPosBtn->get_active();
2599 bool bLow = m_xLowPosBtn->get_active();
2600 DBG_ASSERT( bHigh || bLow,
"normal position is not valid" );
2602 if (m_xHighLowMF.get() == &rField)
2605 m_nSubEsc =
static_cast<short>(m_xHighLowMF->get_value(FieldUnit::PERCENT)) * -1;
2607 m_nSuperEsc =
static_cast<short>(m_xHighLowMF->get_value(FieldUnit::PERCENT));
2609 else if (m_xFontSizeMF.get() == &rField)
2612 m_nSubProp =
static_cast<sal_uInt8>(m_xFontSizeMF->get_value(FieldUnit::PERCENT));
2614 m_nSuperProp =
static_cast<sal_uInt8>(m_xFontSizeMF->get_value(FieldUnit::PERCENT));
2617 FontModifyHdl_Impl();
2622 m_aPreviewWin.SetFontWidthScale(sal_uInt16(m_xScaleWidthMF->get_value(FieldUnit::PERCENT)));
2629 return DeactivateRC::LeavePage;
2634 return std::make_unique<SvxCharPositionPage>(pPage, pController, *rSet);
2641 if ( !sUser.isEmpty() )
2654 if (m_nSuperEsc < m_xHighLowMF->get_min(FieldUnit::PERCENT) ||
m_nSuperEsc >
m_xHighLowMF->get_max(FieldUnit::PERCENT))
2658 if (m_nSuperProp < m_xFontSizeMF->get_min(FieldUnit::PERCENT) ||
m_nSuperProp >
m_xFontSizeMF->get_max(FieldUnit::PERCENT))
2660 if (m_nSubProp < m_xFontSizeMF->get_min(FieldUnit::PERCENT) ||
m_nSubProp >
m_xFontSizeMF->get_max(FieldUnit::PERCENT))
2683 sal_uInt16 nWhich =
GetWhich( SID_ATTR_CHAR_ESCAPEMENT );
2685 if ( rSet->
GetItemState( nWhich ) >= SfxItemState::DEFAULT )
2699 bool bAutomatic(
false);
2707 nEsc = .8 * (100 - nEscProp);
2717 nEsc = .2 * -(100 - nEscProp);
2754 nWhich =
GetWhich( SID_ATTR_CHAR_KERNING );
2756 if ( rSet->
GetItemState( nWhich ) >= SfxItemState::DEFAULT )
2779 nWhich =
GetWhich( SID_ATTR_CHAR_AUTOKERN );
2781 if ( rSet->
GetItemState( nWhich ) >= SfxItemState::DEFAULT )
2790 nWhich =
GetWhich( SID_ATTR_CHAR_SCALEWIDTH );
2791 if ( rSet->
GetItemState( nWhich ) >= SfxItemState::DEFAULT )
2800 if ( rSet->
GetItemState( SID_ATTR_CHAR_WIDTH_FIT_TO_LINE ) >= SfxItemState::DEFAULT )
2804 nWhich =
GetWhich( SID_ATTR_CHAR_ROTATED );
2806 if( SfxItemState::UNKNOWN == eState )
2818 if( eState >= SfxItemState::DEFAULT )
2835 if( eState == SfxItemState::DONTCARE )
2850 SID_ATTR_CHAR_WIDTH_FIT_TO_LINE ))
2875 bool bModified =
false, bChanged =
true;
2876 sal_uInt16 nWhich =
GetWhich( SID_ATTR_CHAR_ESCAPEMENT );
2889 nEsc *= (bHigh ? 1 : -1);
2916 else if ( SfxItemState::DEFAULT == rOldSet.
GetItemState( nWhich,
false ) )
2922 nWhich =
GetWhich( SID_ATTR_CHAR_KERNING );
2923 pOld =
GetOldItem( *rSet, SID_ATTR_CHAR_KERNING );
2929 nKerning =
static_cast<short>(
m_xKerningMF->denormalize( nVal ));
2935 if ( (eOldKernState >= SfxItemState::DEFAULT ||
m_xKerningMF->get_text().isEmpty()) && rItem.GetValue() == nKerning )
2944 else if ( SfxItemState::DEFAULT == eOldKernState )
2948 nWhich =
GetWhich( SID_ATTR_CHAR_AUTOKERN );
2955 else if ( SfxItemState::DEFAULT == rOldSet.
GetItemState( nWhich,
false ) )
2959 nWhich =
GetWhich( SID_ATTR_CHAR_SCALEWIDTH );
2965 else if ( SfxItemState::DEFAULT == rOldSet.
GetItemState( nWhich,
false ) )
2969 nWhich =
GetWhich( SID_ATTR_CHAR_ROTATED );
2970 if (
m_x0degRB->get_state_changed_from_saved() ||
2971 m_x90degRB->get_state_changed_from_saved() ||
2979 aItem.SetTopToBottom();
2983 else if ( SfxItemState::DEFAULT == rOldSet.
GetItemState( nWhich,
false ) )
2992 static const OUStringLiteral cTok(
u";" );
2994 OUString sUser = OUString::number(
m_nSuperEsc ) + cTok +
3007 sal_uInt32 nFlags=pFlagItem->
GetValue();
3016 :
SvxCharBasePage(pPage, pController,
"cui/ui/twolinespage.ui",
"TwoLinesPage", rInSet)
3017 , m_nStartBracketPosition( 0 )
3018 , m_nEndBracketPosition( 0 )
3019 , m_xTwoLinesBtn(m_xBuilder->weld_check_button(
"twolines"))
3020 , m_xEnclosingFrame(m_xBuilder->weld_widget(
"enclosing"))
3021 , m_xStartBracketLB(m_xBuilder->weld_tree_view(
"startbracket"))
3022 , m_xEndBracketLB(m_xBuilder->weld_tree_view(
"endbracket"))
3024 for (
size_t i = 0;
i < std::size(TWOLINE_OPEN); ++
i)
3026 for (
size_t i = 0; i < std::size(TWOLINE_CLOSE); ++i)
3054 rFont.SetFontSize(
Size( 0, 220 ) );
3055 rCJKFont.SetFontSize(
Size( 0, 220 ) );
3056 rCTLFont.SetFontSize(
Size( 0, 220 ) );
3085 bool bFound =
false;
3088 if (pBox->
get_id(
i).toInt32() != CHRDLG_ENCLOSE_SPECIAL_CHAR)
3091 if (cChar == cBracket)
3116 bool bChecked = m_xTwoLinesBtn->get_active();
3117 m_xEnclosingFrame->set_sensitive(bChecked);
3118 UpdatePreview_Impl();
3123 int nPos = rBox.get_selected_index();
3124 if (rBox.
get_id(nPos).toInt32() == CHRDLG_ENCLOSE_SPECIAL_CHAR)
3125 SelectCharacter( &rBox );
3128 bool bStart = &rBox == m_xStartBracketLB.get();
3130 m_nStartBracketPosition = nPos;
3132 m_nEndBracketPosition = nPos;
3134 UpdatePreview_Impl();
3146 return DeactivateRC::LeavePage;
3151 return std::make_unique<SvxCharTwoLinesPage>(pPage, pController, *rSet);
3157 sal_uInt16 nWhich =
GetWhich( SID_ATTR_CHAR_TWO_LINES );
3160 if ( eState >= SfxItemState::DONTCARE )
3179 bool bModified =
false, bChanged =
true;
3180 sal_uInt16 nWhich =
GetWhich( SID_ATTR_CHAR_TWO_LINES );
3201 else if ( SfxItemState::DEFAULT == rOldSet.
GetItemState( nWhich,
false ) )
3223 sal_uInt32 nFlags=pFlagItem->
GetValue();
void SetFamily(FontFamily)
sal_uInt16 m_nScaleWidthInitialVal
#define LINK(Instance, Class, Member)
bool IsAvailable(std::u16string_view rName) const
virtual ~SvxCharEffectsPage() override
std::unique_ptr< weld::CheckButton > m_xFitToLineCB
std::unique_ptr< weld::Label > m_xWestFontLanguageFT
std::unique_ptr< FontSizeBox > m_xEastFontSizeLB
std::unique_ptr< FontStyleBox > m_xCTLFontStyleLB
bool IsRelativeMode() const
void SetPropr(const sal_uInt8 nNewPropr)
std::unique_ptr< weld::RadioButton > m_xHighPosBtn
std::unique_ptr< SvxCharNamePage_Impl > m_pImpl
void SetBracket(sal_Unicode cBracket, bool bStart)
std::unique_ptr< weld::RadioButton > m_xNormalPosBtn
std::unique_ptr< weld::ComboBox > m_xStrikeoutLB
void SetFontSize(const Size &)
sal_uInt8 GetAlpha() const
void SetAlpha(sal_uInt8 nAlpha)
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
OUString const & get_saved_value() const
const OUString & GetFamilyName() const
std::unique_ptr< weld::CheckButton > m_xHiddenBtn
IMPL_LINK_NOARG(SvxCharNamePage, UpdateHdl_Impl, Timer *, void)
void SetUserData(const OUString &rString)
void FillSizeBox_Impl(const weld::Widget &rBox)
void setWidth(tools::Long nWidth)
static constexpr auto Items
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
std::unique_ptr< weld::Button > m_xWestFontFeaturesButton
virtual void FillUserData() override
std::unique_ptr< weld::ComboBox > m_xWestFontNameLB
sal_Unicode GetStartBracket() const
const OUString & GetStyleName() const
SAL_WARN_UNUSED_RESULT Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
std::unique_ptr< weld::MetricSpinButton > m_xFontSizeMF
Idle m_aUpdateIdle cui SvxCharNamePage_Impl m_aUpdateIdle
bool IsTransparent() const
virtual short run() override
OUString const & getResultFontName() const
LanguageType get_active_id() const
bool FillItemSetColor_Impl(SfxItemSet &rSet)
void SetColor(const Color &rCol)
SvxCharPositionPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
void set_active_text(const OUString &rText)
const FontList * GetFontList() const
#define DISABLE_HIDE_LANGUAGE
bool get_value_changed_from_saved() const
std::unique_ptr< weld::Label > m_xWestFontStyleFT
sal_uInt8 & GetProportionalHeight()
void EnableFeatureButton(const weld::Widget &rNameBox)
SvxFont & GetPreviewFont()
std::unique_ptr< weld::Widget > m_xRotationContainer
constexpr::Color COL_AUTO(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
SvxFontPrevWindow m_aPreviewWin
std::unique_ptr< weld::Label > m_xEmphasisFT
constexpr Point convert(const Point &rPoint, o3tl::Length eFrom, o3tl::Length eTo)
const wchar_t *typedef int(__stdcall *DllNativeUnregProc)(int
void set_value(int nValue)
constexpr OUStringLiteral PERCENT(u"Percent")
virtual void Reset(const SfxItemSet *rSet) override
std::unique_ptr< weld::Label > m_xFontColorFT
std::unique_ptr< weld::ComboBox > m_xEffectsLB
std::unique_ptr< weld::Label > m_xCTLFontStyleFT
std::unique_ptr< weld::Label > m_xEastFontNameFT
void SetPtRelative(bool bPtRel)
sal_uInt16 GetValue() const
virtual int find_text(const OUString &rStr) const =0
void SetHeight(sal_uInt32 nNewHeight, const sal_uInt16 nNewProp=100, MapUnit eUnit=MapUnit::MapRelative)
virtual void ChangesApplied() override
void InvalidateItem(sal_uInt16 nWhich)
tools::Long ItemToControl(tools::Long nIn, MapUnit eItem, FieldUnit eCtrl)
std::basic_string_view< charT, traits > getToken(std::basic_string_view< charT, traits > sv, charT delimiter, std::size_t &position)
std::unique_ptr< weld::Label > m_xWestFontNameFT
std::unique_ptr< weld::Label > m_xWestFontSizeFT
Language for western text.
bool IsBottomToTop() const
std::unique_ptr< weld::ComboBox > m_xReliefLB
EditedAndValid GetEditedAndValid() const
void SetCharSet(rtl_TextEncoding)
static SfxObjectShell * Current()
#define DFLT_ESC_AUTO_SUB
virtual void Reset(const SfxItemSet *rSet) override
bool IsCTLFontEnabled() const
void Fill(const FontList *pList)
virtual int get_active() const =0
void set_sensitive(bool bSensitive)
void SetThemeIndex(sal_Int16 nIndex)
virtual void ActivatePage(const SfxItemSet &rSet) override
FontPitch GetPitch() const
void SetCaseMap_Impl(SvxCaseMap eCaseMap)
OUString get_active_text() const
virtual void ChangesApplied() override
bool m_bPreviewBackgroundToCharacter
weld::TriStateEnabled m_aShadowState
std::unique_ptr< weld::CheckButton > m_xShadowBtn
std::unique_ptr< weld::Label > m_xCTLFontTypeFT
void FontModifyHdl_Impl(const weld::Widget &)
FontFamily GetFamily() const
FontFamily GetFamilyType()
void FillStyleBox_Impl(const weld::Widget &rBox)
std::unique_ptr< FontStyleBox > m_xEastFontStyleLB
void SelectHdl_Impl(const weld::ComboBox *)
static OutputDevice * GetDefaultDevice()
virtual MapUnit GetMetric(sal_uInt16 nWhich) const
std::unique_ptr< weld::CheckButton > m_xIndividualWordsBtn
SvxFont & GetPreviewCTLFont()
#define CHRDLG_POSITION_UNDER
virtual ~SvxCharPositionPage() override
const Color & GetColor() const
std::unique_ptr< weld::CheckButton > m_xOutlineBtn
Degree10 GetValue() const
std::unique_ptr< weld::Label > m_xOverlineColorFT
sal_Unicode GetEndBracket() const
void append_text(const OUString &rStr)
std::unique_ptr< weld::RadioButton > m_x0degRB
std::unique_ptr< SvxLanguageBox > m_xEastFontLanguageLB
void SetTextLineColor(const Color &rColor)
ScopedVclPtrInstance< VirtualDevice > m_xVDev
rtl_TextEncoding GetCharSet() const
std::unique_ptr< SvxLanguageBox > m_xWestFontLanguageLB
void SetExchangeSupport()
void SetFixKerning(const short nNewKern)
std::unique_ptr< weld::ComboBox > m_xPositionLB
std::unique_ptr< weld::Label > m_xWestFontTypeFT
virtual int n_children() const =0
virtual void PageCreated(const SfxAllItemSet &aSet) override
const OUString & GetBoldStr() const
virtual ~SvxCharNamePage() override
#define SVX_PREVIEW_CHARACTER
FontMetric Get(const OUString &rName, const OUString &rStyleName) const
const OUString & GetUserData() const
virtual OUString get_id(int pos) const =0
void SetRelative(bool bRelative)
#define DFLT_ESC_AUTO_SUPER
FontEmphasisMark GetEmphasisMark() const
IMPL_LINK(SvxCharNamePage, FontModifyComboBoxHdl_Impl, weld::ComboBox &, rBox, void)
std::unique_ptr< weld::CheckButton > m_xHighLowRB
bool get_active_id_changed_from_saved() const
bool FillItemSet_Impl(SfxItemSet &rSet, LanguageGroup eLangGrp)
std::unique_ptr< weld::Label > m_xEastFontLanguageFT
std::vector< vcl::font::Feature > getFontFeatureList(OUString const &rFontName, VirtualDevice &rVDev)
void SetEscapement_Impl(SvxEscapement nEsc)
void DisableControls(sal_uInt16 nDisable)
SvxThemeColor & GetThemeColor()
const OUString & GetStyleName(FontWeight eWeight, FontItalic eItalic) const
std::unique_ptr< weld::CustomWeld > m_xPreviewWin
B2IRange fround(const B2DRange &rRange)
virtual ~SvxCharBasePage() override
sal_uInt16 GetProp() const
void FontModifyHdl_Impl()
std::unique_ptr< weld::CheckButton > m_xTwoLinesBtn
virtual bool FillItemSet(SfxItemSet *rSet) override
void SetPitch(FontPitch ePitch)
SvxFont & GetPreviewCJKFont()
const OUString & GetStyleName() const
LanguageType get_saved_active_id() const
const SfxItemSet & GetItemSet() const
virtual void Reset(const SfxItemSet *rSet) override
virtual tools::Long GetValue() const override
std::unique_ptr< weld::Label > m_xHighLowFT
const FontMetric & GetFontName(size_t nFont) const
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
std::unique_ptr< weld::Label > m_xUnderlineColorFT
OUString CuiResId(TranslateId aKey)
const SfxPoolItem * GetItem(sal_uInt16 nSlotId) const
const SfxPoolItem * GetOldItem(const SfxItemSet &rSet, sal_uInt16 nSlot, bool bDeep=true)
weld::TriStateEnabled m_aIndividualWordsState
std::unique_ptr< weld::Label > m_xCTLFontLanguageFT
void set_active_text(const OUString &rStr)
static const WhichRangesContainer pPositionRanges
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
const SfxItemSet * GetParent() const
void SetFamilyName(const OUString &rFamilyName)
std::unique_ptr< weld::Label > m_xEastFontStyleFT
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
#define DBG_ASSERT(sCon, aError)
std::unique_ptr< weld::Label > m_xEffectsFT
std::unique_ptr< FontStyleBox > m_xWestFontStyleLB
void set_sensitive(bool bSensitive)
virtual void ActivatePage(const SfxItemSet &rSet) override
virtual void insert_vector(const std::vector< weld::ComboBoxEntry > &rItems, bool bKeepExisting)=0
sal_uInt16 m_nEndBracketPosition
SvxCharTwoLinesPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
void SetPrevFontEscapement(sal_uInt8 nProp, sal_uInt8 nEscProp, short nEsc)
static const WhichRangesContainer pEffectsRanges
std::unique_ptr< weld::CheckButton > m_xPairKerningBtn
virtual bool FillItemSet(SfxItemSet *rSet) override
std::unique_ptr< SvxLanguageBox > m_xCTLFontLanguageLB
sal_uInt16 m_nStartBracketPosition
std::unique_ptr< weld::Label > m_xEastFontSizeFT
std::unique_ptr< ColorListBox > m_xFontColorLB
#define LANGUAGE_DONTKNOW
const Size & GetFontSize() const
bool IsAsianTypographyEnabled()
virtual void PageCreated(const SfxAllItemSet &aSet) override
tools::Long CalcToUnit(float nIn, MapUnit eUnit)
virtual OUString get_text(int row, int col=-1) const =0
void EnableNoneFontColor()
virtual void set_active(int pos)=0
SvxCharBasePage(weld::Container *pPage, weld::DialogController *pController, const OUString &rUIXMLDescription, const OString &rID, const SfxItemSet &rAttrSet)
sal_Int32 toInt32(std::u16string_view str, sal_Int16 radix=10)
std::unique_ptr< weld::Notebook > m_xWestern
void set_active_id(const LanguageType eLangType)
std::unique_ptr< weld::ComboBox > m_xEastFontNameLB
virtual void ActivatePage(const SfxItemSet &rSet) override
SfxItemPool * GetPool() const
const SfxItemSet * GetDialogExampleSet() const
std::unique_ptr< weld::ComboBox > m_xUnderlineLB
virtual void Reset(const SfxItemSet *rSet) override
void SetTwoLines(bool bSet)
virtual void PageCreated(const SfxAllItemSet &aSet) override
void set_active_or_entry_text(const OUString &rText)
void EnableRelativeMode()
virtual short run() override
static const WhichRangesContainer pNameRanges
size_t GetFontNameCount() const
std::unique_ptr< weld::RadioButton > m_x90degRB
std::unique_ptr< weld::Label > m_xReliefFT
void ResetColor_Impl(const SfxItemSet &rSet)
const OUString & GetFamilyName() const
bool m_bEnableNoneFontColor
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
void SetCaseMap(const SvxCaseMap eNew)
void set_active(int nPos)
virtual void select(int pos)=0
std::unique_ptr< weld::Label > m_xEastFontTypeFT
weld::Window * GetFrameWeld() const
void SetStyleName(const OUString &rStyleName)
sal_Int32 SaveEditedAsEntry()
static bool StateToAttr(TriState aState)
sal_uInt32 GetHeight() const
void SetBrackets(sal_Unicode cStart, sal_Unicode cEnd)
void EnableRelativeMode(sal_uInt16 nMin, sal_uInt16 nMax, sal_uInt16 nStep=5)
std::unique_ptr< FontSizeBox > m_xWestFontSizeLB
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
virtual void ChangesApplied() override
std::unique_ptr< weld::RadioButton > m_x270degRB
void set_sensitive(bool bSensitive)
void SetLumOff(sal_Int16 nLumOff)
void SetLumMod(sal_Int16 nLumMod)
void UpdatePreview_Impl(sal_uInt8 nProp, sal_uInt8 nEscProp, short nEsc)
std::unique_ptr< weld::TreeView > m_xEndBracketLB
void SetPrevFontWidthScale(const SfxItemSet &rSet)
static const WhichRangesContainer pTwoLinesRanges
void UpdatePreview_Impl()
tools::Long CalcToPoint(tools::Long nIn, MapUnit eUnit, sal_uInt16 nFactor)
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
const OUString & GetItalicStr() const
std::unique_ptr< weld::MetricSpinButton > m_xHighLowMF
virtual ~SvxCharTwoLinesPage() override
bool IsTopToBottom() const
int find_text(const OUString &rStr) const
void DisableControls(sal_uInt16 nDisable)
SfxOkDialogController * GetDialogController() const
std::unique_ptr< weld::Notebook > m_xCJK_CTL
void DisableFontSelection()
int get_saved_value() const
void UpdatePreview_Impl()
virtual OUString get_id(int pos) const =0
std::unique_ptr< weld::Label > m_xCTLFontNameFT
std::unique_ptr< weld::MetricSpinButton > m_xKerningMF
#define CHRDLG_POSITION_OVER
weld::TriStateEnabled m_aOutlineState
std::unique_ptr< weld::Label > m_xCTLFontSizeFT
void setHeight(tools::Long nHeight)
void SelectCharacter(weld::TreeView *pBox)
void SetProprRel(const sal_uInt8 nNewPropr)
sal_uInt32 GetValue() const
void SetFromItemSet(const SfxItemSet &rSet, bool bPreviewBackgroundToCharacter)
std::unique_ptr< weld::TreeView > m_xStartBracketLB
void Reset_Impl(const SfxItemSet &rSet, LanguageGroup eLangGrp)
void Fill(std::u16string_view rName, const FontList *pList)
virtual bool FillItemSet(SfxItemSet *rSet) override
#define SAL_WARN(area, stream)
void AutoCorrectFontColor()
std::unique_ptr< FontSizeBox > m_xCTLFontSizeLB
The main purpose of this dialog is to enable the use of characters that are not easily accessible fro...
std::unique_ptr< weld::Button > m_xEastFontFeaturesButton
std::unique_ptr< ColorListBox > m_xUnderlineColorLB
void SetPriority(TaskPriority ePriority)
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
void SetFontList(const SvxFontListItem &rItem)
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
std::unique_ptr< FontList > m_pFontList
const FontList * GetFontList() const
sal_uInt16 m_nScaleWidthItemSetVal
constexpr OUStringLiteral first
OUString GetFontMapText(const FontMetric &rFontMetric) const
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
std::unique_ptr< weld::MetricSpinButton > m_xFontTransparencyMtr
virtual bool FillItemSet(SfxItemSet *rSet) override
#define SVX_ENABLE_CHAR_TRANSPARENCY
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
bool IsPtRelative() const
std::unique_ptr< weld::Label > m_xScalingFT
void SetEscapement(const short nNewEsc)
std::unique_ptr< weld::ComboBox > m_xOverlineLB
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
std::unique_ptr< weld::Label > m_xScalingAndRotationFT
OUString const & get_saved_value() const
std::unique_ptr< weld::MetricSpinButton > m_xScaleWidthMF
std::unique_ptr< weld::Label > m_xFontSizeFT
virtual void set_entry_text(const OUString &rStr)=0
std::unique_ptr< weld::RadioButton > m_xLowPosBtn
#define SVX_RELATIVE_MODE
std::unique_ptr< ColorListBox > m_xOverlineColorLB
OUString get_active_text() const
MapUnit GetPropUnit() const
std::unique_ptr< weld::Button > m_xCTLFontFeaturesButton
std::unique_ptr< weld::ComboBox > m_xEmphasisLB
SvxCharEffectsPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
virtual void PageCreated(const SfxAllItemSet &aSet) override
std::unique_ptr< FontList > Clone() const
void SetFontWidthScale(sal_uInt16 nScaleInPercent)
weld::TriStateEnabled m_aHiddenState
std::unique_ptr< weld::Label > m_xA11yWarningFT
rtl_TextEncoding GetCharSet() const
void EnablePtRelativeMode(short nMin, short nMax, short nStep=10)
const Color & GetValue() const
sal_uInt16 GetWhich(sal_uInt16 nSlot, bool bDeep=true) const
void append_text(const OUString &rStr)
virtual OUString get_active_text() const =0
std::unique_ptr< weld::Label > m_xFontTransparencyFT
void UpdatePreview_Impl()
bool m_bDetectedRangeSegmentation false
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
void SetOverlineColor(const Color &rColor)
std::unique_ptr< weld::Label > m_xPositionFT
std::unique_ptr< weld::ComboBox > m_xCTLFontNameLB
SvxCharNamePage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)