diff options
author | Khaled Hosny <khaled@libreoffice.org> | 2023-09-21 12:37:17 +0300 |
---|---|---|
committer | خالد حسني <khaled@libreoffice.org> | 2023-09-21 13:19:28 +0200 |
commit | 899522378bfb754af757c1a4a0f6bce699ac8721 (patch) | |
tree | 8f9bfa2b72aed794d43dd48029dd1ba2cc55121d /starmath/source | |
parent | 7de4c6b95da7d187c403ee478786bb74467c1eb5 (diff) |
starmath: Rename SmSym::GetName() -> GetUiName()
To make it obvious this is the UI (localized) name.
Change-Id: Id0dbffeaa9c331ce90dee3e7fbc88f93fab1b654
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157138
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
Diffstat (limited to 'starmath/source')
-rw-r--r-- | starmath/source/cfgitem.cxx | 2 | ||||
-rw-r--r-- | starmath/source/dialog.cxx | 18 | ||||
-rw-r--r-- | starmath/source/parse5.cxx | 2 | ||||
-rw-r--r-- | starmath/source/symbol.cxx | 18 | ||||
-rw-r--r-- | starmath/source/unomodel.cxx | 4 |
5 files changed, 22 insertions, 22 deletions
diff --git a/starmath/source/cfgitem.cxx b/starmath/source/cfgitem.cxx index 8906474c9f35..5287b05e018d 100644 --- a/starmath/source/cfgitem.cxx +++ b/starmath/source/cfgitem.cxx @@ -740,7 +740,7 @@ void SmMathConfig::StripFontFormatList( const std::vector< SmSym > &rSymbols ) SmFontFormatList aUsedList; for (i = 0; i < rSymbols.size(); ++i) { - OSL_ENSURE( rSymbols[i].GetName().getLength() > 0, "non named symbol" ); + OSL_ENSURE( !rSymbols[i].GetUiName().isEmpty(), "non named symbol" ); aUsedList.GetFontFormatId( SmFontFormat( rSymbols[i].GetFace() ) , true ); } const SmFormat & rStdFmt = GetStandardFormat(); diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx index c5e38f6cb684..f06cb60bc929 100644 --- a/starmath/source/dialog.cxx +++ b/starmath/source/dialog.cxx @@ -1325,7 +1325,7 @@ IMPL_LINK_NOARG(SmSymbolDialog, GetClickHdl, weld::Button&, void) const SmSym *pSym = GetSymbol(); if (pSym) { - OUString aText = "%" + pSym->GetName() + " "; + OUString aText = "%" + pSym->GetUiName() + " "; rViewSh.GetViewFrame().GetDispatcher()->ExecuteList( SID_INSERTSPECIAL, SfxCallMode::RECORD, @@ -1409,7 +1409,7 @@ void SmSymbolDialog::SelectSymbol(sal_uInt16 nSymbolNo) m_xSymbolSetDisplay->SelectSymbol(nSymbolNo); m_aSymbolDisplay.SetSymbol(pSym); - m_xSymbolName->set_label(pSym ? pSym->GetName() : OUString()); + m_xSymbolName->set_label(pSym ? pSym->GetUiName() : OUString()); } const SmSym* SmSymbolDialog::GetSymbol() const @@ -1491,7 +1491,7 @@ void SmSymDefineDialog::FillSymbols(weld::ComboBox& rComboBox, bool bDeleteText) weld::ComboBox& rBox = &rComboBox == m_xOldSymbols.get() ? *m_xOldSymbolSets : *m_xSymbolSets; SymbolPtrVec_t aSymSet(m_aSymbolMgrCopy.GetSymbolSet(rBox.get_active_text())); for (const SmSym* i : aSymSet) - rComboBox.append_text(i->GetName()); + rComboBox.append_text(i->GetUiName()); } void SmSymDefineDialog::FillSymbolSets(weld::ComboBox& rComboBox, bool bDeleteText) @@ -1657,7 +1657,7 @@ IMPL_LINK( SmSymDefineDialog, AddClickHdl, weld::Button&, rButton, void ) // update display of new symbol m_aSymbolDisplay.SetSymbol( &aNewSymbol ); - m_xSymbolName->set_label(aNewSymbol.GetName()); + m_xSymbolName->set_label(aNewSymbol.GetUiName()); m_xSymbolSetName->set_label(aNewSymbol.GetSymbolSetName()); // update list box entries @@ -1693,7 +1693,7 @@ IMPL_LINK( SmSymDefineDialog, ChangeClickHdl, weld::Button&, rButton, void ) // update display of new symbol m_aSymbolDisplay.SetSymbol(&aNewSymbol); - m_xSymbolName->set_label(aNewSymbol.GetName()); + m_xSymbolName->set_label(aNewSymbol.GetUiName()); m_xSymbolSetName->set_label(aNewSymbol.GetSymbolSetName()); // update list box entries @@ -1713,7 +1713,7 @@ IMPL_LINK(SmSymDefineDialog, DeleteClickHdl, weld::Button&, rButton, void) if (m_xOrigSymbol) { - m_aSymbolMgrCopy.RemoveSymbol(m_xOrigSymbol->GetName()); + m_aSymbolMgrCopy.RemoveSymbol(m_xOrigSymbol->GetUiName()); // clear display for original symbol SetOrigSymbol(nullptr, OUString()); @@ -1742,7 +1742,7 @@ void SmSymDefineDialog::UpdateButtons() //! (Font-, Style- and SymbolSet name comparison is not case sensitive) bool bEqual = m_xOrigSymbol && aTmpSymbolSetName.equalsIgnoreAsciiCase(m_xOldSymbolSetName->get_label()) - && aTmpSymbolName == m_xOrigSymbol->GetName() + && aTmpSymbolName == m_xOrigSymbol->GetUiName() && m_xFonts->get_active_text().equalsIgnoreAsciiCase( m_xOrigSymbol->GetFace().GetFamilyName()) && m_xStyles->get_active_text().equalsIgnoreAsciiCase( @@ -1912,7 +1912,7 @@ void SmSymDefineDialog::SetOrigSymbol(const SmSym *pSymbol, // set new symbol m_xOrigSymbol.reset(new SmSym(*pSymbol)); - aSymName = pSymbol->GetName(); + aSymName = pSymbol->GetUiName(); aSymSetName = rSymbolSetName; m_aOldSymbolDisplay.SetSymbol( pSymbol ); } @@ -1966,7 +1966,7 @@ bool SmSymDefineDialog::SelectSymbol(weld::ComboBox& rComboBox, // since SelectChar will also set the unicode point as text in the // symbols box, we have to set the symbol name again to get that one displayed - m_xSymbols->set_entry_text(pSymbol->GetName()); + m_xSymbols->set_entry_text(pSymbol->GetUiName()); } } diff --git a/starmath/source/parse5.cxx b/starmath/source/parse5.cxx index 27c2471e7418..935d2ba30c68 100644 --- a/starmath/source/parse5.cxx +++ b/starmath/source/parse5.cxx @@ -2637,7 +2637,7 @@ std::unique_ptr<SmSpecialNode> SmParser5::DoSpecial() = SM_MOD()->GetSymbolManager().GetSymbolByExportName(rName.subView(1)); if (pSym) { - aNewName = pSym->GetName(); + aNewName = pSym->GetUiName(); bReplace = true; } } diff --git a/starmath/source/symbol.cxx b/starmath/source/symbol.cxx index 5f81d0151d9a..b4309dad586f 100644 --- a/starmath/source/symbol.cxx +++ b/starmath/source/symbol.cxx @@ -27,12 +27,12 @@ SmSym::SmSym() : - m_aName(OUString("unknown")), + m_aUiName(OUString("unknown")), m_aSetName(OUString("unknown")), m_cChar('\0'), m_bPredefined(false) { - m_aExportName = m_aName; + m_aExportName = m_aUiName; m_aFace.SetTransparent(true); m_aFace.SetAlignment(ALIGN_BASELINE); } @@ -47,7 +47,7 @@ SmSym::SmSym(const SmSym& rSymbol) SmSym::SmSym(const OUString& rName, const vcl::Font& rFont, sal_UCS4 cChar, const OUString& rSet, bool bIsPredefined) { - m_aName = m_aExportName = rName; + m_aUiName = m_aExportName = rName; m_aFace = rFont; m_aFace.SetTransparent(true); @@ -61,7 +61,7 @@ SmSym::SmSym(const OUString& rName, const vcl::Font& rFont, sal_UCS4 cChar, SmSym& SmSym::operator = (const SmSym& rSymbol) { - m_aName = rSymbol.m_aName; + m_aUiName = rSymbol.m_aUiName; m_aExportName = rSymbol.m_aExportName; m_cChar = rSymbol.m_cChar; m_aFace = rSymbol.m_aFace; @@ -76,7 +76,7 @@ SmSym& SmSym::operator = (const SmSym& rSymbol) bool SmSym::IsEqualInUI( const SmSym& rSymbol ) const { - return m_aName == rSymbol.m_aName && + return m_aUiName == rSymbol.m_aUiName && m_aFace == rSymbol.m_aFace && m_cChar == rSymbol.m_cChar; } @@ -170,7 +170,7 @@ bool SmSymbolManager::AddOrReplaceSymbol( const SmSym &rSymbol, bool bForceChang { bool bAdded = false; - const OUString& aSymbolName( rSymbol.GetName() ); + const OUString& aSymbolName( rSymbol.GetUiName() ); if (!aSymbolName.isEmpty() && !rSymbol.GetSymbolSetName().isEmpty()) { const SmSym *pFound = GetSymbolByUiName( aSymbolName ); @@ -248,8 +248,8 @@ void SmSymbolManager::Load() for (size_t i = 0; i < nSymbolCount; ++i) { const SmSym &rSym = aSymbols[i]; - OSL_ENSURE( !rSym.GetName().isEmpty(), "symbol without name!" ); - if (!rSym.GetName().isEmpty()) + OSL_ENSURE( !rSym.GetUiName().isEmpty(), "symbol without name!" ); + if (!rSym.GetUiName().isEmpty()) AddOrReplaceSymbol( rSym ); } m_bModified = true; @@ -272,7 +272,7 @@ void SmSymbolManager::Load() vcl::Font aFont( rSym.GetFace() ); OSL_ENSURE( aFont.GetItalic() == ITALIC_NONE, "expected Font with ITALIC_NONE, failed." ); aFont.SetItalic( ITALIC_NORMAL ); - OUString aSymbolName = "i" + rSym.GetName(); + OUString aSymbolName = "i" + rSym.GetUiName(); SmSym aSymbol( aSymbolName, aFont, rSym.GetCharacter(), aSymbolSetName, true /*bIsPredefined*/ ); aSymbol.SetExportName("i" + rSym.GetExportName()); diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx index 0f3d5b4464e0..8348287f9350 100644 --- a/starmath/source/unomodel.cxx +++ b/starmath/source/unomodel.cxx @@ -867,7 +867,7 @@ void SmModel::_getPropertyValues( const PropertyMapEntry **ppEntries, Any *pValu { if (pSymbol && !pSymbol->IsPredefined() && (!bUsedSymbolsOnly || - rUsedSymbols.find( pSymbol->GetName() ) != rUsedSymbols.end())) + rUsedSymbols.find( pSymbol->GetUiName() ) != rUsedSymbols.end())) aVector.push_back ( pSymbol ); } Sequence < SymbolDescriptor > aSequence ( aVector.size() ); @@ -875,7 +875,7 @@ void SmModel::_getPropertyValues( const PropertyMapEntry **ppEntries, Any *pValu for (const SmSym* pSymbol : aVector) { - pDescriptor->sName = pSymbol->GetName(); + pDescriptor->sName = pSymbol->GetUiName(); pDescriptor->sExportName = pSymbol->GetExportName(); pDescriptor->sSymbolSet = pSymbol->GetSymbolSetName(); pDescriptor->nCharacter = static_cast < sal_Int32 > (pSymbol->GetCharacter()); |