diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-07-18 12:04:13 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-07-18 15:33:56 +0200 |
commit | 0705c05480401fd46349879ad456ae208cb1180b (patch) | |
tree | 89d8e0e752af3659d1987b58676bd2a90a8fea84 /starmath/source | |
parent | 5c997461bfa0bb40189a96f478cb80e5b4d8a1dc (diff) |
make some single-arg constructors in starmath explicit
Change-Id: I4b9a010a2cf42076b02c80732c8e35686482f9e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170684
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'starmath/source')
-rw-r--r-- | starmath/source/cfgitem.cxx | 2 | ||||
-rw-r--r-- | starmath/source/dialog.cxx | 16 | ||||
-rw-r--r-- | starmath/source/mathml/starmathdatabase.cxx | 10 | ||||
-rw-r--r-- | starmath/source/node.cxx | 2 | ||||
-rw-r--r-- | starmath/source/symbol.cxx | 2 | ||||
-rw-r--r-- | starmath/source/unomodel.cxx | 4 |
6 files changed, 18 insertions, 18 deletions
diff --git a/starmath/source/cfgitem.cxx b/starmath/source/cfgitem.cxx index d8805f44dfd0..abe5fe4901c3 100644 --- a/starmath/source/cfgitem.cxx +++ b/starmath/source/cfgitem.cxx @@ -1042,7 +1042,7 @@ void SmMathConfig::LoadFormat() ++pVal; aFnt.SetFontSize( pFormat->GetBaseSize() ); - pFormat->SetFont( i, aFnt, bUseDefaultFont ); + pFormat->SetFont( i, SmFace(aFnt), bUseDefaultFont ); } OSL_ENSURE( pVal - pValues == nProps, "property mismatch" ); diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx index eafee6070a89..d078264b1d49 100644 --- a/starmath/source/dialog.cxx +++ b/starmath/source/dialog.cxx @@ -640,14 +640,14 @@ void SmFontTypeDialog::WriteTo(SmFormat &rFormat) const pp->GetConfig()->GetFontPickList(FNT_SANS) = *m_xSansFont; pp->GetConfig()->GetFontPickList(FNT_FIXED) = *m_xFixedFont; - rFormat.SetFont( FNT_MATH, m_xMathFont->Get() ); - rFormat.SetFont( FNT_VARIABLE, m_xVariableFont->Get() ); - rFormat.SetFont( FNT_FUNCTION, m_xFunctionFont->Get() ); - rFormat.SetFont( FNT_NUMBER, m_xNumberFont->Get() ); - rFormat.SetFont( FNT_TEXT, m_xTextFont->Get() ); - rFormat.SetFont( FNT_SERIF, m_xSerifFont->Get() ); - rFormat.SetFont( FNT_SANS, m_xSansFont->Get() ); - rFormat.SetFont( FNT_FIXED, m_xFixedFont->Get() ); + rFormat.SetFont( FNT_MATH, SmFace(m_xMathFont->Get()) ); + rFormat.SetFont( FNT_VARIABLE, SmFace(m_xVariableFont->Get()) ); + rFormat.SetFont( FNT_FUNCTION, SmFace(m_xFunctionFont->Get()) ); + rFormat.SetFont( FNT_NUMBER, SmFace(m_xNumberFont->Get()) ); + rFormat.SetFont( FNT_TEXT, SmFace(m_xTextFont->Get()) ); + rFormat.SetFont( FNT_SERIF, SmFace(m_xSerifFont->Get()) ); + rFormat.SetFont( FNT_SANS, SmFace(m_xSansFont->Get()) ); + rFormat.SetFont( FNT_FIXED, SmFace(m_xFixedFont->Get()) ); rFormat.RequestApplyChanges(); } diff --git a/starmath/source/mathml/starmathdatabase.cxx b/starmath/source/mathml/starmathdatabase.cxx index b79b37a3537a..b8d3823bbf5b 100644 --- a/starmath/source/mathml/starmathdatabase.cxx +++ b/starmath/source/mathml/starmathdatabase.cxx @@ -711,10 +711,10 @@ SmColorTokenTableEntry starmathdatabase::Identify_Color_Parser(sal_uInt32 cColor { for (auto i = std::begin(aColorTokenTableParse); i < std::end(aColorTokenTableParse); ++i) if (i->equals(cColor)) - return i; + return SmColorTokenTableEntry(i); for (auto i = std::begin(aColorTokenTableDVIPS); i < std::end(aColorTokenTableDVIPS); ++i) if (i->equals(cColor)) - return i; + return SmColorTokenTableEntry(i); if ((cColor & 0x00FFFFFF) == cColor) return SmColorTokenTableEntry(u""_ustr, TRGB, cColor); else @@ -725,7 +725,7 @@ SmColorTokenTableEntry starmathdatabase::Identify_Color_MATHML(sal_uInt32 cColor { for (auto i = std::begin(aColorTokenTableMATHML); i < std::end(aColorTokenTableMATHML); ++i) if (i->equals(cColor)) - return i; + return SmColorTokenTableEntry(i); if ((cColor & 0x00FFFFFF) == cColor) return SmColorTokenTableEntry(u""_ustr, TRGB, cColor); else @@ -736,7 +736,7 @@ SmColorTokenTableEntry starmathdatabase::Identify_Color_DVIPSNAMES(sal_uInt32 cC { for (auto i = std::begin(aColorTokenTableDVIPS); i < std::end(aColorTokenTableDVIPS); ++i) if (i->equals(cColor)) - return i; + return SmColorTokenTableEntry(i); if ((cColor & 0x00FFFFFF) == cColor) return SmColorTokenTableEntry(u""_ustr, TRGB, cColor); else @@ -771,7 +771,7 @@ SmColorTokenTableEntry starmathdatabase::Identify_ColorName_HTML(std::u16string_ { sal_Int32 matches = o3tl::compareToIgnoreAsciiCase(colorname, i->aIdent); if (matches == 0) - return i; + return SmColorTokenTableEntry(i); if (matches < 0) break; } diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx index 49ef500c2059..022596b4e2d2 100644 --- a/starmath/source/node.cxx +++ b/starmath/source/node.cxx @@ -2196,7 +2196,7 @@ void SmSpecialNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell sal_UCS4 cChar = pSym->GetCharacter(); OUString aTmp( &cChar, 1 ); SetText( aTmp ); - GetFont() = pSym->GetFace(&rFormat); + GetFont() = SmFace(pSym->GetFace(&rFormat)); OUString aSymbolSetName = SmLocalizedSymbolData::GetExportSymbolSetName(pSym->GetSymbolSetName()); if (aSymbolSetName == "Greek") diff --git a/starmath/source/symbol.cxx b/starmath/source/symbol.cxx index bad6484f1be4..9acf161a208c 100644 --- a/starmath/source/symbol.cxx +++ b/starmath/source/symbol.cxx @@ -49,7 +49,7 @@ SmSym::SmSym(const OUString& rName, const vcl::Font& rFont, sal_UCS4 cChar, { m_aUiName = m_aExportName = rName; - m_aFace = rFont; + m_aFace = SmFace(rFont); m_aFace.SetTransparent(true); m_aFace.SetAlignment(ALIGN_BASELINE); diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx index e26b3425861f..04229244b4ed 100644 --- a/starmath/source/unomodel.cxx +++ b/starmath/source/unomodel.cxx @@ -693,14 +693,14 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any* { vcl::Font aNewFont(aFormat.GetFont(nFontDesc)); aNewFont.SetItalic(rFont.GetItalic()); - aFormat.SetFont(nFontDesc, aNewFont); + aFormat.SetFont(nFontDesc, SmFace(aNewFont)); } if (aFormat.GetFont(nFontDesc).GetWeight() != rFont.GetWeight()) { vcl::Font aNewFont(aFormat.GetFont(nFontDesc)); aNewFont.SetWeight(rFont.GetWeight()); - aFormat.SetFont(nFontDesc, aNewFont); + aFormat.SetFont(nFontDesc, SmFace(aNewFont)); } if (aFormat.GetFont(nFontDesc).GetFontSize() != rFont.GetFontSize()) |