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>
This commit is contained in:
parent
7de4c6b95d
commit
899522378b
6 changed files with 24 additions and 24 deletions
|
@ -38,7 +38,7 @@ class SmSym
|
|||
{
|
||||
private:
|
||||
SmFace m_aFace;
|
||||
OUString m_aName;
|
||||
OUString m_aUiName;
|
||||
OUString m_aExportName;
|
||||
OUString m_aSetName;
|
||||
sal_UCS4 m_cChar;
|
||||
|
@ -54,7 +54,7 @@ public:
|
|||
|
||||
const vcl::Font& GetFace(const SmFormat* pFormat = nullptr) const;
|
||||
sal_UCS4 GetCharacter() const { return m_cChar; }
|
||||
const OUString& GetName() const { return m_aName; }
|
||||
const OUString& GetUiName() const { return m_aUiName; }
|
||||
|
||||
bool IsPredefined() const { return m_bPredefined; }
|
||||
const OUString& GetSymbolSetName() const { return m_aSetName; }
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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());
|
||||
|
|
Loading…
Reference in a new issue