41#include <starmath.hrc>
54void lclGetSettingColors(
Color& rBackgroundColor,
Color& rTextColor)
83 static sal_uInt16 GetCount() {
return 4; }
84 const OUString& GetStyleName(
const vcl::Font& rFont)
const;
85 const OUString& GetStyleName(sal_uInt16 nIdx)
const;
90SmFontStyles::SmFontStyles()
91 : aNormal(
SmResId(RID_FONTREGULAR))
93 , aItalic(
SmResId(RID_FONTITALIC))
97 aBoldItalic += aItalic;
100const OUString& SmFontStyles::GetStyleName(
const vcl::Font& rFont)
const
103 bool bBold =
IsBold( rFont ),
106 if (bBold && bItalic)
115const OUString& SmFontStyles::GetStyleName( sal_uInt16 nIdx )
const
120 assert( nIdx < GetCount() );
123 case 0 :
return aNormal;
124 case 1 :
return aItalic;
125 case 2 :
return aBold;
126 default:
return aBoldItalic;
132 static const SmFontStyles aImpl;
141 if (!rStyleName.empty())
145 for (
i = 0;
i < SmFontStyles::GetCount(); ++
i)
146 if (rStyleName == rStyles.GetStyleName(
i))
148 assert(
i < SmFontStyles::GetCount() &&
"style-name unknown");
158 m_xZoom->set_sensitive(m_xSizeZoomed->get_active());
162 :
SfxTabPage(pPage, pController,
"modules/smath/ui/smathsettings.ui",
"SmathSettings", &rOptions)
163 , m_xTitle(m_xBuilder->weld_check_button(
"title"))
164 , m_xText(m_xBuilder->weld_check_button(
"text"))
165 ,
m_xFrame(m_xBuilder->weld_check_button(
"frame"))
166 , m_xSizeNormal(m_xBuilder->weld_radio_button(
"sizenormal"))
167 , m_xSizeScaled(m_xBuilder->weld_radio_button(
"sizescaled"))
168 , m_xSizeZoomed(m_xBuilder->weld_radio_button(
"sizezoomed"))
170 , m_xNoRightSpaces(m_xBuilder->weld_check_button(
"norightspaces"))
171 , m_xSaveOnlyUsedSymbols(m_xBuilder->weld_check_button(
"saveonlyusedsymbols"))
172 , m_xAutoCloseBrackets(m_xBuilder->weld_check_button(
"autoclosebrackets"))
173 , m_xSmZoom(m_xBuilder->weld_metric_spin_button(
"smzoom",
FieldUnit::
PERCENT))
186 pEdit->UpdateStatus();
191 sal_uInt16 nPrintSize;
211 pEdit->UpdateStatus();
226 m_xZoom->set_value(
rSet->
Get(SID_PRINTZOOM).GetValue(), FieldUnit::PERCENT);
229 m_xSmZoom->set_value(
rSet->
Get(SID_SMEDITWINDOWZOOM).GetValue(), FieldUnit::PERCENT);
239 return std::make_unique<SmPrintOptionsTabPage>(pPage, pController,
rSet);
246 lclGetSettingColors(aBackColor, aTextColor);
265 CustomWidgetController::SetDrawingArea(pDrawingArea);
278 maFont.SetFamilyName(rComboBox.get_active_text());
279 m_aShowFont.SetFont(maFont);
284 if (m_xBoldCheckBox->get_active())
289 if (m_xItalicCheckBox->get_active())
294 m_aShowFont.SetFont(maFont);
308 : GenericDialogController(pParent,
"modules/smath/ui/fontdialog.ui",
"FontDialog")
309 , m_xFontBox(m_xBuilder->weld_entry_tree_view(
"fontgrid",
"font",
"fonts"))
310 , m_xAttrFrame(m_xBuilder->weld_widget(
"attrframe"))
311 , m_xBoldCheckBox(m_xBuilder->weld_check_button(
"bold"))
312 , m_xItalicCheckBox(m_xBuilder->weld_check_button(
"italic"))
313 , m_xShowFont(new
weld::CustomWeld(*m_xBuilder,
"preview", m_aShowFont))
320 FontList aFontList( pFntListDevice );
360 : MessageDialogController(pParent,
"modules/smath/ui/savedefaultsdialog.ui",
361 "SaveDefaultsDialog")
370 SaveDefaultsQuery aQuery(
m_xDialog.get());
381 : GenericDialogController(pParent,
"modules/smath/ui/fontsizedialog.ui",
"FontSizeDialog")
382 , m_xBaseSize(m_xBuilder->weld_metric_spin_button(
"spinB_baseSize",
FieldUnit::
POINT))
383 , m_xTextSize(m_xBuilder->weld_metric_spin_button(
"spinB_text",
FieldUnit::
PERCENT))
384 , m_xIndexSize(m_xBuilder->weld_metric_spin_button(
"spinB_index",
FieldUnit::
PERCENT))
385 , m_xFunctionSize(m_xBuilder->weld_metric_spin_button(
"spinB_function",
FieldUnit::
PERCENT))
386 , m_xOperatorSize(m_xBuilder->weld_metric_spin_button(
"spinB_operator",
FieldUnit::
PERCENT))
387 , m_xBorderSize(m_xBuilder->weld_metric_spin_button(
"spinB_limit",
FieldUnit::
PERCENT))
388 , m_xDefaultButton(m_xBuilder->weld_button(
"default"))
432 bool bHideCheckboxes =
false;
433 if (rIdent ==
"variables")
434 pActiveListBox = m_xVariableFont.get();
435 else if (rIdent ==
"functions")
436 pActiveListBox = m_xFunctionFont.get();
437 else if (rIdent ==
"numbers")
438 pActiveListBox = m_xNumberFont.get();
439 else if (rIdent ==
"text")
440 pActiveListBox = m_xTextFont.get();
441 else if (rIdent ==
"serif")
443 pActiveListBox = m_xSerifFont.get();
444 bHideCheckboxes =
true;
446 else if (rIdent ==
"sansserif")
448 pActiveListBox = m_xSansFont.get();
449 bHideCheckboxes =
true;
451 else if (rIdent ==
"fixedwidth")
453 pActiveListBox = m_xFixedFont.get();
454 bHideCheckboxes =
true;
457 pActiveListBox =
nullptr;
463 pActiveListBox->
WriteTo(aFontDialog);
465 pActiveListBox->
ReadFrom(aFontDialog);
471 SaveDefaultsQuery aQuery(
m_xDialog.get());
482 : GenericDialogController(pParent,
"modules/smath/ui/fonttypedialog.ui",
"FontsDialog")
483 , pFontListDev(pFntListDevice)
484 , m_xVariableFont(new
SmFontPickListBox(m_xBuilder->weld_combo_box(
"variableCB")))
485 , m_xFunctionFont(new
SmFontPickListBox(m_xBuilder->weld_combo_box(
"functionCB")))
491 , m_xMenuButton(m_xBuilder->weld_menu_button(
"modify"))
492 , m_xDefaultButton(m_xBuilder->weld_button(
"default"))
553 sal_uInt16 nMin, nMax;
563 {{ 0, 200 }, { 0, 200 }, { 0, 100 }, { 0, 0 }},
565 {{ 0, 100 }, { 0, 100 }, { 0, 0 }, { 0, 0 }},
567 {{ 0, 100 }, { 0, 100 }, { 0, 0 }, { 0, 0 }},
569 {{ 0, 100 }, { 1, 100 }, { 0, 0 }, { 0, 0 }},
571 {{ 0, 100 }, { 0, 100 }, { 0, 0 }, { 0, 0 }},
573 {{ 0, 100 }, { 0, 100 }, { 0, 0 }, { 0, 100 }},
575 {{ 0, 300 }, { 0, 300 }, { 0, 0 }, { 0, 0 }},
577 {{ 0, 100 }, { 0, 100 }, { 0, 0 }, { 0, 0 }},
579 {{ 0, 100 }, { 0, 100 }, { 0, 0 }, { 0, 0 }},
581 {{ 0, 10000 }, { 0, 10000 }, { 0, 10000 }, { 0, 10000 }}
587 std::unique_ptr<weld::Label> xTitle(rBuilder.
weld_label(OUString::number(nCategoryIdx)+
"title"));
590 Name = xTitle->get_label();
592 for (
int i = 0;
i < 4; ++
i)
594 std::unique_ptr<weld::Label> xLabel(rBuilder.
weld_label(OUString::number(nCategoryIdx)+
"label"+OUString::number(
i+1)));
607 const FieldMinMax& rMinMax =
pMinMaxData[ nCategoryIdx-1 ][
i];
621 if (!m_xCategories[nActiveCategory])
626 if (&rControl == &m_xMetricField1->get_widget())
628 else if (&rControl == &m_xMetricField2->get_widget())
630 else if (&rControl == &m_xMetricField3->get_widget())
632 else if (&rControl == &m_xMetricField4->get_widget())
637 m_pCurrentImage->hide();
638 m_pCurrentImage = m_xCategories[nActiveCategory]->GetGraphic(
i);
639 m_pCurrentImage->show();
644 assert(rId.startsWith(
"menuitem"));
645 SetCategory(rId.replaceFirst(
"menuitem",
"").toInt32() - 1);
650 SaveDefaultsQuery aQuery(
m_xDialog.get());
662 if (&rCheckBox == m_xCheckBox1.get())
664 bool bChecked = m_xCheckBox1->get_active();
665 m_xFixedText4->set_sensitive( bChecked );
666 m_xMetricField4->set_sensitive( bChecked );
672 assert(nCategory <
NOCATEGORIES &&
"Sm: wrong category number in SmDistanceDialog");
676 assert(
NOCATEGORIES == 10 &&
"Sm : array doesn't fit into the number of categories");
677 static constexpr OUStringLiteral
EMPTY(
u"");
678 static constexpr rtl::OUStringConstExpr aCatMf2Hid[10][4] =
693 std::pair<weld::Label*, weld::MetricSpinButton*>
const aWin[4] =
721 for (sal_uInt16
i = 0;
i < 4;
i++)
728 bActive = !aCatMf2Hid[nCategory][
i].asView().empty();
740 eUnit = FieldUnit::PERCENT;
745 eUnit = FieldUnit::MM_100TH;
763 bActive = nCategory == 5;
775 m_xMenuButton->set_item_active(
"menuitem" + OUString::number(nCategory + 1),
true);
784 : GenericDialogController(pParent,
"modules/smath/ui/spacingdialog.ui",
"SpacingDialog")
785 ,
m_xFrame(m_xBuilder->weld_frame(
"template"))
786 , m_xFixedText1(m_xBuilder->weld_label(
"label1"))
787 , m_xMetricField1(m_xBuilder->weld_metric_spin_button(
"spinbutton1",
FieldUnit::
CM))
788 , m_xFixedText2(m_xBuilder->weld_label(
"label2"))
789 , m_xMetricField2(m_xBuilder->weld_metric_spin_button(
"spinbutton2",
FieldUnit::
CM))
790 , m_xFixedText3(m_xBuilder->weld_label(
"label3"))
791 , m_xMetricField3(m_xBuilder->weld_metric_spin_button(
"spinbutton3",
FieldUnit::
CM))
792 , m_xCheckBox1(m_xBuilder->weld_check_button(
"checkbutton"))
793 , m_xFixedText4(m_xBuilder->weld_label(
"label4"))
794 , m_xMetricField4(m_xBuilder->weld_metric_spin_button(
"spinbutton4",
FieldUnit::
CM))
795 , m_xMenuButton(m_xBuilder->weld_menu_button(
"category"))
796 , m_xDefaultButton(m_xBuilder->weld_button(
"default"))
797 , m_xBitmap(m_xBuilder->weld_widget(
"image"))
798 , m_pCurrentImage(m_xBitmap.
get())
895 SaveDefaultsQuery aQuery(
m_xDialog.get());
906 : GenericDialogController(pParent,
"modules/smath/ui/alignmentdialog.ui",
"AlignmentDialog")
907 , m_xLeft(m_xBuilder->weld_radio_button(
"left"))
908 , m_xCenter(m_xBuilder->weld_radio_button(
"center"))
909 , m_xRight(m_xBuilder->weld_radio_button(
"right"))
910 , m_xDefaultButton(m_xBuilder->weld_button(
"default"))
954 , m_xScrolledWindow(
std::move(pScrolledWindow))
966 CustomWidgetController::Resize();
977 Color aBackgroundColor;
979 lclGetSettingColors(aBackgroundColor, aTextColor);
993 for (
size_t i =
v;
i < nSymbols ;
i++)
1002 rRenderContext.
SetFont(aFont);
1008 OUString aText(&cChar, 1);
1026 rRenderContext.
Pop();
1172 Color aBackgroundColor;
1174 lclGetSettingColors(aBackgroundColor, aTextColor);
1177 rRenderContext.
Erase();
1181 rRenderContext.
SetFont(aFont);
1183 const OUString &rText =
GetText();
1206 OUString aText(&cChar, 1);
1221 for (
const auto& rSymbolSetName : aSymbolSetNames)
1227 SelectSymbolSet(m_xSymbolSets->get_active_text());
1232 SelectSymbol(m_xSymbolSetDisplay->GetSelectSymbol());
1240 const OUString aSymSetName (m_xSymbolSets->get_active_text()),
1241 aSymName (m_xSymbolName->get_label());
1248 OUString aOldSymbolSet (m_xSymbolSets->get_active_text());
1250 sal_uInt16 nSymPos = m_xSymbolSetDisplay->GetSelectSymbol();
1253 if (aDialog.
run() ==
RET_OK && rSymbolMgr.IsModified())
1260 if (!SelectSymbolSet(aOldSymbolSet) && m_xSymbolSets->get_count() > 0)
1261 SelectSymbolSet(m_xSymbolSets->get_text(0));
1265 assert(aSymSetName == aSymSetName);
1266 aSymbolSet = rSymbolMgr.GetSymbolSet( aSymbolSetName );
1267 m_xSymbolSetDisplay->SetSymbolSet( aSymbolSet );
1270 if (nSymPos >= aSymbolSet.size())
1271 nSymPos =
static_cast< sal_uInt16
>(aSymbolSet.size()) - 1;
1272 SelectSymbol( nSymPos );
1277 SymbolDblClickHdl();
1282 SymbolDblClickHdl();
1293 const SmSym *pSym = GetSymbol();
1296 OUString aText =
"%" + pSym->
GetName() +
" ";
1298 rViewSh.GetViewFrame().GetDispatcher()->ExecuteList(
1299 SID_INSERTSPECIAL, SfxCallMode::RECORD,
1306 : GenericDialogController(pParent,
"modules/smath/ui/catalogdialog.ui",
"CatalogDialog")
1307 , rViewSh(rViewShell)
1309 , pFontListDev(pFntListDevice)
1310 , m_xSymbolSets(m_xBuilder->weld_combo_box(
"symbolset"))
1311 , m_xSymbolSetDisplay(new
SmShowSymbolSet(m_xBuilder->weld_scrolled_window(
"scrolledwindow", true)))
1312 , m_xSymbolSetDisplayArea(new
weld::CustomWeld(*m_xBuilder,
"symbolsetdisplay", *m_xSymbolSetDisplay))
1313 , m_xSymbolName(m_xBuilder->weld_label(
"symbolname"))
1314 , m_xSymbolDisplay(new
weld::CustomWeld(*m_xBuilder,
"preview", m_aSymbolDisplay))
1315 , m_xGetBtn(m_xBuilder->weld_button(
"ok"))
1316 , m_xEditBtn(m_xBuilder->weld_button(
"edit"))
1356 return pSym1->GetCharacter() < pSym2->GetCharacter();
1359 const bool bEmptySymbolSet =
aSymbolSet.empty();
1361 if (!bEmptySymbolSet)
1374 const SmSym *pSym =
nullptr;
1387 return bValid ?
aSymbolSet[ nSymbolNo ] :
nullptr;
1392 const OUString &rText =
GetText();
1393 if (rText.isEmpty())
1414 if (!aText.isEmpty())
1418 rRenderContext.
SetFont(aFont);
1445 OUString aText(&cChar, 1);
1461 for (
const SmSym*
i : aSymSet)
1474 for (
const auto& rSymbolSetName : aSymbolSetNames)
1499 OUString aText(
m_xFonts->get_active_text());
1500 if (!aText.isEmpty())
1504 for (sal_uInt16
i = 0;
i < SmFontStyles::GetCount(); ++
i)
1505 m_xStyles->append_text(rStyles.GetStyleName(
i));
1507 assert(
m_xStyles->get_count() > 0 &&
"Sm : no styles available");
1521 assert(&rComboBox == m_xOldSymbols.get() &&
"Sm : wrong argument");
1522 SelectSymbol(*m_xOldSymbols, m_xOldSymbols->get_active_text(),
false);
1528 assert(&rComboBox == m_xOldSymbolSets.get() &&
"Sm : wrong argument");
1529 SelectSymbolSet(*m_xOldSymbolSets, m_xOldSymbolSets->get_active_text(),
false);
1535 int nStartPos, nEndPos;
1536 rComboBox.get_entry_selection_bounds(nStartPos, nEndPos);
1538 if (&rComboBox == m_xSymbols.get())
1539 SelectSymbol(*m_xSymbols, m_xSymbols->get_active_text(),
false);
1540 else if (&rComboBox == m_xSymbolSets.get())
1541 SelectSymbolSet(*m_xSymbolSets, m_xSymbolSets->get_active_text(),
false);
1542 else if (&rComboBox == m_xOldSymbols.get())
1544 SelectSymbol(*m_xOldSymbols, m_xOldSymbols->get_active_text(),
true);
1545 else if (&rComboBox == m_xOldSymbolSets.get())
1547 SelectSymbolSet(*m_xOldSymbolSets, m_xOldSymbolSets->get_active_text(),
true);
1548 else if (&rComboBox == m_xStyles.get())
1550 SelectStyle(m_xStyles->get_active_text(),
true);
1552 SAL_WARN(
"starmath",
"wrong combobox argument");
1554 rComboBox.select_entry_region(nStartPos, nEndPos);
1562 assert(&rListBox == m_xFonts.get() &&
"Sm : wrong argument");
1569 int nPos = m_xFontsSubsetLB->get_active();
1572 const Subset* pSubset = weld::fromId<const Subset*>(m_xFontsSubsetLB->get_active_id());
1575 m_xCharsetDisplay->SelectCharacter( pSubset->
GetRangeMin() );
1583 assert(&rComboBox == m_xStyles.get() &&
"Sm : wrong argument");
1585 SelectStyle(m_xStyles->get_active_text());
1590 sal_UCS4 cChar = m_xCharsetDisplay->GetSelectCharacter();
1594 const Subset* pSubset = m_xSubsetMap->GetSubsetByUnicode(cChar);
1596 m_xFontsSubsetLB->set_active_text(pSubset->
GetName());
1598 m_xFontsSubsetLB->set_active(-1);
1601 m_aSymbolDisplay.SetSymbol(cChar, m_xCharsetDisplay->GetFont());
1606 const OUString aHex(OUString::number(cChar, 16).toAsciiUpperCase());
1607 const OUString aPattern( (aHex.getLength() > 4) ? OUString(
"Ux000000") : OUString(
"Ux0000") );
1608 OUString aUnicodePos = aPattern.subView( 0, aPattern.getLength() - aHex.getLength() ) +
1610 m_xSymbols->set_entry_text(aUnicodePos);
1611 m_xSymbolName->set_label(aUnicodePos);
1617 assert(&rButton == m_xAddBtn.get() &&
"Sm : wrong argument");
1618 assert(rButton.get_sensitive() &&
"Sm : requirements met ??");
1621 const SmSym aNewSymbol(m_xSymbols->get_active_text(), m_xCharsetDisplay->GetFont(),
1622 m_xCharsetDisplay->GetSelectCharacter(), m_xSymbolSets->get_active_text());
1624 m_aSymbolMgrCopy.AddOrReplaceSymbol( aNewSymbol );
1627 m_aSymbolDisplay.SetSymbol( &aNewSymbol );
1628 m_xSymbolName->set_label(aNewSymbol.
GetName());
1632 FillSymbolSets(*m_xOldSymbolSets,
false);
1633 FillSymbolSets(*m_xSymbolSets,
false);
1634 FillSymbols(*m_xOldSymbols,
false);
1635 FillSymbols(*m_xSymbols,
false);
1643 assert(&rButton == m_xChangeBtn.get() &&
"Sm : wrong argument");
1644 assert(m_xChangeBtn->get_sensitive() &&
"Sm : requirements met ??");
1649 const SmSym aNewSymbol(m_xSymbols->get_active_text(), m_xCharsetDisplay->GetFont(),
1650 m_xCharsetDisplay->GetSelectCharacter(), m_xSymbolSets->get_active_text());
1653 const bool bNameChanged = m_xOldSymbols->get_active_text() != m_xSymbols->get_active_text();
1655 m_aSymbolMgrCopy.RemoveSymbol(m_xOldSymbols->get_active_text());
1656 m_aSymbolMgrCopy.AddOrReplaceSymbol( aNewSymbol,
true );
1660 SetOrigSymbol(
nullptr, OUString());
1663 m_aSymbolDisplay.SetSymbol(&aNewSymbol);
1664 m_xSymbolName->set_label(aNewSymbol.
GetName());
1668 FillSymbolSets(*m_xOldSymbolSets,
false);
1669 FillSymbolSets(*m_xSymbolSets,
false);
1670 FillSymbols(*m_xOldSymbols,
false);
1671 FillSymbols(*m_xSymbols,
false);
1679 assert(&rButton == m_xDeleteBtn.get() &&
"Sm : wrong argument");
1680 assert(m_xDeleteBtn->get_sensitive() &&
"Sm : requirements met ??");
1684 m_aSymbolMgrCopy.RemoveSymbol(m_xOrigSymbol->GetName());
1687 SetOrigSymbol(
nullptr, OUString());
1690 FillSymbolSets(*m_xOldSymbolSets,
false);
1691 FillSymbolSets(*m_xSymbolSets,
false);
1692 FillSymbols(*m_xOldSymbols ,
false);
1693 FillSymbols(*m_xSymbols ,
false);
1704 OUString aTmpSymbolName(
m_xSymbols->get_active_text()),
1707 if (!aTmpSymbolName.isEmpty() && !aTmpSymbolSetName.isEmpty())
1714 &&
m_xFonts->get_active_text().equalsIgnoreAsciiCase(
1716 &&
m_xStyles->get_active_text().equalsIgnoreAsciiCase(
1736 : GenericDialogController(pParent,
"modules/smath/ui/symdefinedialog.ui",
"EditSymbols")
1738 , m_rSymbolMgr(rMgr)
1739 , m_xFontList(new
FontList(pFntListDevice))
1740 , m_xOldSymbols(m_xBuilder->weld_combo_box(
"oldSymbols"))
1741 , m_xOldSymbolSets(m_xBuilder->weld_combo_box(
"oldSymbolSets"))
1742 , m_xSymbols(m_xBuilder->weld_combo_box(
"symbols"))
1743 , m_xSymbolSets(m_xBuilder->weld_combo_box(
"symbolSets"))
1744 , m_xFonts(m_xBuilder->weld_combo_box(
"fonts"))
1745 , m_xFontsSubsetLB(m_xBuilder->weld_combo_box(
"fontsSubsetLB"))
1746 , m_xStyles(m_xBuilder->weld_combo_box(
"styles"))
1747 , m_xOldSymbolName(m_xBuilder->weld_label(
"oldSymbolName"))
1748 , m_xOldSymbolSetName(m_xBuilder->weld_label(
"oldSymbolSetName"))
1749 , m_xSymbolName(m_xBuilder->weld_label(
"symbolName"))
1750 , m_xSymbolSetName(m_xBuilder->weld_label(
"symbolSetName"))
1751 , m_xAddBtn(m_xBuilder->weld_button(
"add"))
1752 , m_xChangeBtn(m_xBuilder->weld_button(
"modify"))
1753 , m_xDeleteBtn(m_xBuilder->weld_button(
"delete"))
1754 , m_xOldSymbolDisplay(new
weld::CustomWeld(*m_xBuilder,
"oldSymbolDisplay", m_aOldSymbolDisplay))
1755 , m_xSymbolDisplay(new
weld::CustomWeld(*m_xBuilder,
"symbolDisplay", m_aSymbolDisplay))
1756 , m_xCharsetDisplay(new
SvxShowCharSet(m_xBuilder->weld_scrolled_window(
"showscroll", true), m_xVirDev))
1757 , m_xCharsetDisplayArea(new
weld::CustomWeld(*m_xBuilder,
"charsetDisplay", *m_xCharsetDisplay))
1792 short nResult = GenericDialogController::run();
1826 std::u16string_view rSymbolSetName,
bool bDeleteText)
1843 else if (bDeleteText)
1859 OUString aTmpOldSymbolName;
1871 const OUString &rSymbolSetName)
1883 aSymName = pSymbol->
GetName();
1884 aSymSetName = rSymbolSetName;
1898 const OUString &rSymbolName,
bool bDeleteText)
1903 OUString aNormName = rSymbolName.replaceAll(
" ",
"");
1943 else if (bDeleteText)
1949 const SmSym *pOldSymbol =
nullptr;
1950 OUString aTmpOldSymbolSetName;
css::uno::Reference< css::lang::XComponent > m_xFrame
Reference< XExecutableDialog > m_xDialog
const StyleSettings & GetStyleSettings() const
static const AllSettings & GetSettings()
size_t GetFontNameCount() const
const FontMetric & GetFontName(size_t nFont) const
const vcl::KeyCode & GetKeyCode() const
sal_uInt16 GetClicks() const
const Point & GetPosPixel() const
Size GetOutputSize() const
const vcl::Font & GetFont() const
float GetDPIScaleFactor() const
void SetFont(const vcl::Font &rNewFont)
void DrawRect(const tools::Rectangle &rRect)
void Invert(const tools::Rectangle &rRect, InvertFlags nFlags=InvertFlags::NONE)
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)
SAL_WARN_UNUSED_RESULT Point LogicToPixel(const Point &rLogicPt) const
const Color & GetTextColor() const
void Push(vcl::PushFlags nFlags=vcl::PushFlags::ALL)
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
constexpr tools::Long Y() const
tools::Long AdjustY(tools::Long nVertMove)
tools::Long AdjustX(tools::Long nHorzMove)
constexpr tools::Long X() const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
constexpr tools::Long Height() const
tools::Long AdjustHeight(tools::Long n)
tools::Long AdjustWidth(tools::Long n)
constexpr tools::Long Width() const
std::unique_ptr< weld::Button > m_xDefaultButton
SmAlignDialog(weld::Window *pParent)
std::unique_ptr< weld::RadioButton > m_xCenter
void WriteTo(SmFormat &rFormat) const
std::unique_ptr< weld::RadioButton > m_xLeft
std::unique_ptr< weld::RadioButton > m_xRight
void ReadFrom(const SmFormat &rFormat)
virtual ~SmAlignDialog() override
void SetValue(sal_uInt16 Index, sal_uInt16 nVal)
sal_uInt16 GetMinimum(sal_uInt16 Index)
std::unique_ptr< weld::Widget > Graphics[4]
const OUString & GetString(sal_uInt16 Index) const
sal_uInt16 GetValue(sal_uInt16 Index) const
SmCategoryDesc(weld::Builder &rBuilder, sal_uInt16 nCategoryIdx)
sal_uInt16 GetMaximum(sal_uInt16 Index)
std::unique_ptr< weld::Label > m_xFixedText3
std::unique_ptr< weld::MenuButton > m_xMenuButton
virtual ~SmDistanceDialog() override
std::unique_ptr< weld::MetricSpinButton > m_xMetricField1
std::unique_ptr< weld::CheckButton > m_xCheckBox1
std::unique_ptr< weld::Frame > m_xFrame
std::unique_ptr< weld::Label > m_xFixedText1
std::unique_ptr< weld::MetricSpinButton > m_xMetricField2
SmDistanceDialog(weld::Window *pParent)
std::unique_ptr< weld::MetricSpinButton > m_xMetricField4
std::unique_ptr< weld::Label > m_xFixedText4
void ReadFrom(const SmFormat &rFormat)
std::unique_ptr< weld::MetricSpinButton > m_xMetricField3
void SetCategory(sal_uInt16 Category)
void WriteTo(SmFormat &rFormat)
std::unique_ptr< SmCategoryDesc > m_xCategories[NOCATEGORIES]
std::unique_ptr< weld::Button > m_xDefaultButton
std::unique_ptr< weld::Label > m_xFixedText2
sal_uInt16 nActiveCategory
SmFontDialog(weld::Window *pParent, OutputDevice *pFntListDevice, bool bHideCheckboxes)
std::unique_ptr< weld::CheckButton > m_xItalicCheckBox
void SetFont(const vcl::Font &rFont)
std::unique_ptr< weld::EntryTreeView > m_xFontBox
std::unique_ptr< weld::Widget > m_xAttrFrame
std::unique_ptr< weld::CheckButton > m_xBoldCheckBox
virtual ~SmFontDialog() override
void ReadFrom(const SmFontDialog &rDialog)
void WriteTo(SmFontDialog &rDialog) const
SmFontSizeDialog(weld::Window *pParent)
virtual ~SmFontSizeDialog() override
void ReadFrom(const SmFormat &rFormat)
std::unique_ptr< weld::Button > m_xDefaultButton
std::unique_ptr< weld::MetricSpinButton > m_xTextSize
std::unique_ptr< weld::MetricSpinButton > m_xBaseSize
std::unique_ptr< weld::MetricSpinButton > m_xOperatorSize
void WriteTo(SmFormat &rFormat) const
std::unique_ptr< weld::MetricSpinButton > m_xBorderSize
std::unique_ptr< weld::MetricSpinButton > m_xIndexSize
std::unique_ptr< weld::MetricSpinButton > m_xFunctionSize
virtual ~SmFontTypeDialog() override
std::unique_ptr< SmFontPickListBox > m_xVariableFont
std::unique_ptr< SmFontPickListBox > m_xSerifFont
std::unique_ptr< SmFontPickListBox > m_xFixedFont
std::unique_ptr< SmFontPickListBox > m_xFunctionFont
std::unique_ptr< weld::Button > m_xDefaultButton
std::unique_ptr< weld::MenuButton > m_xMenuButton
std::unique_ptr< SmFontPickListBox > m_xTextFont
SmFontTypeDialog(weld::Window *pParent, OutputDevice *pFntListDevice)
std::unique_ptr< SmFontPickListBox > m_xSansFont
void ReadFrom(const SmFormat &rFormat)
void WriteTo(SmFormat &rFormat) const
std::unique_ptr< SmFontPickListBox > m_xNumberFont
const SmFormat & GetStandardFormat() const
SmFontPickList & GetFontPickList(sal_uInt16 nIdent)
void SetStandardFormat(const SmFormat &rFormat, bool bSaveFontFormatList=false)
SmMathConfig * GetConfig()
virtual ~SmPrintOptionsTabPage() override
virtual bool FillItemSet(SfxItemSet *rSet) override
SmPrintOptionsTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rOptions)
std::unique_ptr< weld::RadioButton > m_xSizeScaled
std::unique_ptr< weld::MetricSpinButton > m_xSmZoom
std::unique_ptr< weld::CheckButton > m_xNoRightSpaces
std::unique_ptr< weld::MetricSpinButton > m_xZoom
std::unique_ptr< weld::RadioButton > m_xSizeNormal
std::unique_ptr< weld::CheckButton > m_xText
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
std::unique_ptr< weld::CheckButton > m_xAutoCloseBrackets
std::unique_ptr< weld::CheckButton > m_xTitle
virtual void Reset(const SfxItemSet *rSet) override
std::unique_ptr< weld::CheckButton > m_xSaveOnlyUsedSymbols
std::unique_ptr< weld::RadioButton > m_xSizeZoomed
std::unique_ptr< weld::CheckButton > m_xFrame
const OUString & GetText() const
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &) override
void SetSymbol(const SmSym *pSym)
const vcl::Font & GetFont() const
void SetFont(const vcl::Font &rFont)
void SetText(const OUString &rText)
virtual void Resize() override
void SetFont(const vcl::Font &rFont)
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &) override
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea) override
void SetSymbolSet(const SymbolPtrVec_t &rSymbolSet)
void calccols(const vcl::RenderContext &rRenderContext)
virtual bool MouseButtonDown(const MouseEvent &rMEvt) override
virtual bool KeyInput(const KeyEvent &rKEvt) override
Point OffsetPoint(const Point &rPoint) const
SymbolPtrVec_t aSymbolSet
void SelectSymbol(sal_uInt16 nSymbol)
std::unique_ptr< weld::ScrolledWindow > m_xScrolledWindow
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
SmShowSymbolSet(std::unique_ptr< weld::ScrolledWindow > pScrolledWindow)
Link< SmShowSymbolSet &, void > aSelectHdlLink
virtual void Resize() override
Link< SmShowSymbolSet &, void > aDblClickHdlLink
virtual bool MouseButtonDown(const MouseEvent &rMEvt) override
void SetText(const OUString &rText)
Link< SmShowSymbol &, void > aDblClickHdlLink
void SetSymbol(const SmSym *pSymbol)
void setFontSize(vcl::Font &rFont) const
const OUString & GetText() const
const vcl::Font & GetFont() const
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &) override
void SetFont(const vcl::Font &rFont)
void SetDblClickHdl(const Link< SmShowSymbol &, void > &rLink)
SmSym * GetSymbol(const weld::ComboBox &rComboBox)
std::unique_ptr< weld::ComboBox > m_xOldSymbols
std::unique_ptr< SvxShowCharSet > m_xCharsetDisplay
std::unique_ptr< weld::Button > m_xAddBtn
std::unique_ptr< weld::ComboBox > m_xFontsSubsetLB
virtual ~SmSymDefineDialog() override
bool SelectFont(const OUString &rFontName, bool bApplyFont)
std::unique_ptr< weld::Label > m_xSymbolSetName
void SetFont(const OUString &rFontName, std::u16string_view rStyleName)
std::unique_ptr< FontList > m_xFontList
SmSymbolManager & m_rSymbolMgr
std::unique_ptr< weld::ComboBox > m_xSymbolSets
bool SelectStyle(const OUString &rStyleName, bool bApplyFont)
bool SelectSymbolSet(weld::ComboBox &rComboBox, std::u16string_view rSymbolSetName, bool bDeleteText)
bool SelectSymbol(weld::ComboBox &rComboBox, const OUString &rSymbolName, bool bDeleteText)
std::unique_ptr< weld::Button > m_xDeleteBtn
std::unique_ptr< weld::ComboBox > m_xSymbols
void SelectOldSymbol(const OUString &rSymbolName)
std::unique_ptr< SubsetMap > m_xSubsetMap
std::unique_ptr< weld::Label > m_xOldSymbolSetName
void SetSymbolSetManager(const SmSymbolManager &rMgr)
void FillSymbols(weld::ComboBox &rComboBox, bool bDeleteText=true)
std::unique_ptr< weld::ComboBox > m_xOldSymbolSets
std::unique_ptr< weld::ComboBox > m_xFonts
SmShowChar m_aSymbolDisplay
std::unique_ptr< weld::Button > m_xChangeBtn
std::unique_ptr< weld::Label > m_xOldSymbolName
void SelectOldSymbolSet(std::u16string_view rSymbolSetName)
virtual short run() override
SmSymDefineDialog(weld::Window *pParent, OutputDevice *pFntListDevice, SmSymbolManager &rMgr)
std::unique_ptr< SmSym > m_xOrigSymbol
void FillSymbolSets(weld::ComboBox &rComboBox, bool bDeleteText=true)
std::unique_ptr< weld::Label > m_xSymbolName
SmShowChar m_aOldSymbolDisplay
void SetOrigSymbol(const SmSym *pSymbol, const OUString &rSymbolSetName)
SmSymbolManager m_aSymbolMgrCopy
std::unique_ptr< weld::ComboBox > m_xStyles
void SelectChar(sal_Unicode cChar)
const OUString & GetSymbolSetName() const
const OUString & GetName() const
sal_UCS4 GetCharacter() const
const vcl::Font & GetFace() const
SmShowSymbol m_aSymbolDisplay
SmSymbolDialog(weld::Window *pParent, OutputDevice *pFntListDevice, SmSymbolManager &rSymbolMgr, SmViewShell &rViewShell)
virtual ~SmSymbolDialog() override
const SmSym * GetSymbol() const
void SelectSymbol(sal_uInt16 nSymbolPos)
std::unique_ptr< weld::Button > m_xGetBtn
SymbolPtrVec_t aSymbolSet
std::unique_ptr< weld::ComboBox > m_xSymbolSets
SmSymbolManager & rSymbolMgr
std::unique_ptr< weld::Button > m_xEditBtn
bool SelectSymbolSet(const OUString &rSymbolSetName)
std::unique_ptr< SmShowSymbolSet > m_xSymbolSetDisplay
std::unique_ptr< weld::Label > m_xSymbolName
SymbolPtrVec_t GetSymbolSet(std::u16string_view rSymbolSetName)
SmSym * GetSymbolByName(const OUString &rSymbolName)
std::set< OUString > GetSymbolSetNames() const
void SetModified(bool bModify)
const Color & GetWindowColor() const
const Color & GetDialogTextColor() const
const Color & GetFieldTextColor() const
bool GetHighContrastMode() const
const Color & GetFieldColor() const
const Color & GetLabelTextColor() const
const Color & GetFaceColor() const
sal_UCS4 GetRangeMin() const
const OUString & GetName() const
void SetFontSize(const Size &)
void SetPitch(FontPitch ePitch)
void SetTransparent(bool bTransparent)
void SetItalic(FontItalic)
void SetWeight(FontWeight)
const OUString & GetFamilyName() const
void SetFamily(FontFamily)
void SetCharSet(rtl_TextEncoding)
void SetAlignment(TextAlign)
sal_uInt16 GetCode() const
virtual std::unique_ptr< Label > weld_label(const OUString &id)=0
virtual std::unique_ptr< Widget > weld_widget(const OUString &id)=0
virtual int find_text(const OUString &rStr) const=0
virtual OUString get_active_text() const=0
virtual void set_entry_text(const OUString &rStr)=0
virtual void set_active(int pos)=0
void append_text(const OUString &rStr)
virtual OutputDevice & get_ref_device()=0
std::shared_ptr< weld::Dialog > m_xDialog
std::unique_ptr< weld::Builder > m_xBuilder
virtual void set_label(const OUString &rText)=0
const FieldMinMax pMinMaxData[10][4]
static const SmFontStyles & GetFontStyles()
IMPL_LINK(SmFontDialog, FontSelectHdl, weld::ComboBox &, rComboBox, void)
void SetFontStyle(std::u16string_view rStyleName, vcl::Font &rFont)
IMPL_LINK_NOARG(SmPrintOptionsTabPage, SizeButtonClickHdl, weld::Toggleable &, void)
virtual OUString GetName() const override
constexpr OUStringLiteral HID_SMA_UPPERLIMIT_DIST
constexpr OUStringLiteral HID_SMA_BRACKET_EXCHEIGHT2
constexpr OUStringLiteral HID_SMA_LOWERLIMIT_DIST
constexpr OUStringLiteral HID_SMA_MATRIXCOL_DIST
constexpr OUStringLiteral HID_SMA_BRACKET_DIST
constexpr OUStringLiteral HID_SMA_INTERATTRIBUT_DIST
constexpr OUStringLiteral HID_SMA_LINE_DIST
constexpr OUStringLiteral HID_SMA_OPERATOR_DIST
constexpr OUStringLiteral HID_SMA_LEFTBORDER_DIST
constexpr OUStringLiteral HID_SMA_NUMERATOR_DIST
constexpr OUStringLiteral HID_SMA_BRACKET_EXCHEIGHT
constexpr OUStringLiteral HID_SMA_ROOT_DIST
constexpr OUStringLiteral HID_SMA_FRACLINE_LINEWIDTH
constexpr OUStringLiteral HID_SMA_DEFAULT_DIST
constexpr OUStringLiteral HID_SMA_FRACLINE_EXCWIDTH
constexpr OUStringLiteral HID_SMA_ATTRIBUT_DIST
constexpr OUStringLiteral HID_SMA_OPERATOR_EXCHEIGHT
constexpr OUStringLiteral HID_SMA_LOWERBORDER_DIST
constexpr OUStringLiteral HID_SMA_UPPERBORDER_DIST
constexpr OUStringLiteral HID_SMA_SUP_DIST
constexpr OUStringLiteral HID_SMA_DENOMINATOR_DIST
constexpr OUStringLiteral HID_SMA_RIGHTBORDER_DIST
constexpr OUStringLiteral HID_SMA_MATRIXROW_DIST
constexpr OUStringLiteral HID_SMA_SUB_DIST
constexpr sal_uInt16 KEY_HOME
constexpr sal_uInt16 KEY_LEFT
constexpr sal_uInt16 KEY_PAGEDOWN
constexpr sal_uInt16 KEY_UP
constexpr sal_uInt16 KEY_RIGHT
constexpr sal_uInt16 KEY_DOWN
constexpr sal_uInt16 KEY_PAGEUP
constexpr sal_uInt16 KEY_END
#define LINK(Instance, Class, Member)
#define SAL_WARN(area, stream)
OString strip(const OString &rIn, char c)
constexpr Point convert(const Point &rPoint, o3tl::Length eFrom, o3tl::Length eTo)
constexpr T & temporary(T &&x)
constexpr OUStringLiteral EMPTY
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
OUString toId(const void *pValue)
OUString SmResId(TranslateId aId)
std::vector< const SmSym * > SymbolPtrVec_t
#define SYMBOL_NONE
This stuff is used to work with charname.
bool IsItalic(const vcl::Font &rFont)
bool IsBold(const vcl::Font &rFont)
SmViewShell * SmGetActiveView()
! Since this method is based on the current focus it is somewhat ! unreliable and may return unexpect...
o3tl::Length SmO3tlLengthUnit()
constexpr OUStringLiteral PERCENT(u"Percent")
HFONT SelectFont(HDC hDC, HFONT hFont)