Kaydet (Commit) e4b2e9fa authored tarafından Caolán McNamara's avatar Caolán McNamara

remove intermediate Strings on res loading

Change-Id: I5ae2f445bb2c0e3fa3dd42f972dae54dfee42cc8
üst 9a0d753b
......@@ -509,7 +509,7 @@ SmElementsDockingWindow::SmElementsDockingWindow(SfxBindings* pInputBindings, Sf
for (sal_uInt16 i = 0; i < sizeof(aCategories) / sizeof(sal_uInt16) ; i++)
{
maElementListBox.InsertEntry(OUString(SmResId(aCategories[i])));
maElementListBox.InsertEntry(SM_RESSTR(aCategories[i]));
}
maElementListBox.SetSelectHdl(LINK(this, SmElementsDockingWindow, ElementSelectedHandle));
......@@ -520,7 +520,7 @@ SmElementsDockingWindow::SmElementsDockingWindow(SfxBindings* pInputBindings, Sf
maElementsControl.SetTextColor( Color( COL_BLACK ) );
maElementsControl.SetSelectHdl(LINK(this, SmElementsDockingWindow, SelectClickHdl));
maElementListBox.SelectEntry(OUString(SmResId(RID_CATEGORY_UNARY_BINARY_OPERATORS)));
maElementListBox.SelectEntry(SM_RESSTR(RID_CATEGORY_UNARY_BINARY_OPERATORS));
maElementsControl.setElementSetId(RID_CATEGORY_UNARY_BINARY_OPERATORS);
FreeResource();
......@@ -555,7 +555,7 @@ IMPL_LINK( SmElementsDockingWindow, ElementSelectedHandle, ListBox*, pList)
for (sal_uInt16 i = 0; i < sizeof(aCategories) / sizeof(sal_uInt16) ; i++)
{
sal_uInt16 aCurrentCategory = aCategories[i];
OUString aCurrentCategoryString = OUString(SmResId(aCurrentCategory));
OUString aCurrentCategoryString = SM_RESSTR(aCurrentCategory);
if (aCurrentCategoryString == pList->GetSelectEntry())
{
maElementsControl.setElementSetId(aCurrentCategory);
......
......@@ -1406,15 +1406,15 @@ void SmDocShell::FillClass(SvGlobalName* pClassName,
{
*pClassName = SvGlobalName(SO3_SM_CLASSID_60);
*pFormat = SOT_FORMATSTR_ID_STARMATH_60;
*pFullTypeName = OUString(SmResId(STR_MATH_DOCUMENT_FULLTYPE_CURRENT));
*pShortTypeName = OUString(SmResId(RID_DOCUMENTSTR));
*pFullTypeName = SM_RESSTR(STR_MATH_DOCUMENT_FULLTYPE_CURRENT);
*pShortTypeName = SM_RESSTR(RID_DOCUMENTSTR);
}
else if (nFileFormat == SOFFICE_FILEFORMAT_8 )
{
*pClassName = SvGlobalName(SO3_SM_CLASSID_60);
*pFormat = bTemplate ? SOT_FORMATSTR_ID_STARMATH_8_TEMPLATE : SOT_FORMATSTR_ID_STARMATH_8;
*pFullTypeName = OUString(SmResId(STR_MATH_DOCUMENT_FULLTYPE_CURRENT));
*pShortTypeName = OUString(SmResId(RID_DOCUMENTSTR));
*pFullTypeName = SM_RESSTR(STR_MATH_DOCUMENT_FULLTYPE_CURRENT);
*pShortTypeName = SM_RESSTR(RID_DOCUMENTSTR);
}
}
......
......@@ -2873,7 +2873,7 @@ static bool lcl_IsFromGreekSymbolSet( const OUString &rTokenText )
bool bRes = false;
// valid symbol name needs to have a '%' at pos 0 and at least an additonal char
if (rTokenText.getLength() > 2 && rTokenText.getStr()[0] == (sal_Unicode)'%')
if (rTokenText.getLength() > 2 && rTokenText[0] == (sal_Unicode)'%')
{
OUString aName( rTokenText.copy(1) );
SmSym *pSymbol = SM_MOD()->GetSymbolManager().GetSymbolByName( aName );
......
......@@ -2531,7 +2531,7 @@ size_t SmParser::AddError(SmParseError Type, SmNode *pNode)
pErrDesc->Type = Type;
pErrDesc->pNode = pNode;
pErrDesc->Text = String(SmResId(RID_ERR_IDENT));
pErrDesc->Text = SM_RESSTR(RID_ERR_IDENT);
sal_uInt16 nRID;
switch (Type)
......
......@@ -97,7 +97,7 @@ namespace accessibility
// SvxTextForwarder
sal_Int32 GetParagraphCount() const { return 1; }
sal_uInt16 GetTextLen( sal_Int32 /*nParagraph*/ ) const { return 0; }
OUString GetText( const ESelection& /*rSel*/ ) const { return String(); }
OUString GetText( const ESelection& /*rSel*/ ) const { return OUString(); }
SfxItemSet GetAttribs( const ESelection& /*rSel*/, sal_Bool /*bOnlyHardAttrib*/ = 0 ) const
{
// AW: Very dangerous: The former implementation used a SfxItemPool created on the
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment