Kaydet (Commit) ceb7ea50 authored tarafından Jason Hulme's avatar Jason Hulme Kaydeden (comit) Andras Timar

fdo#78920: Number %NUMBERSTRING in tooltip

Fixed string in Bullets and Numbering and changed sidebar to use the same set of strings.

Change-Id: Ib8a103e203cf66c979216175d4047bca518290ce
Reviewed-on: https://gerrit.libreoffice.org/9492Reviewed-by: 's avatarAndras Timar <andras.timar@collabora.com>
Tested-by: 's avatarAndras Timar <andras.timar@collabora.com>
üst 73e4257e
......@@ -53,8 +53,8 @@ String RID_SVXSTR_BULLET_DESCRIPTION_7
};
String RID_SVXSTR_SINGLENUM_DESCRIPTION_0
{
//Text [en-US] = "Number 1) 2) 3)";
Text [en-US] = "Number %NUMBERINGSAMPLE";
Text [en-US] = "Number 1) 2) 3)";
//Text [en-US] = "Number %NUMBERINGSAMPLE";
};
String RID_SVXSTR_SINGLENUM_DESCRIPTION_1
{
......
......@@ -1351,42 +1351,7 @@ void NumberingTypeMgr::Init()
pNumEntry->nIndex = i + 1;
pNumEntry->nIndexDefault = i;
pNumEntry->pNumSetting = pNew;
//SetItemText( i + 1, SVX_RESSTR( RID_SVXSTR_SINGLENUM_DESCRIPTIONS + i ));
{
OUString sText;
//const OUString sValue(C2U("Value"));
Reference<XNumberingFormatter> xFormatter(xDefNum, UNO_QUERY);
if(xFormatter.is() && aNumberings.getLength() > i)
{
for (sal_uInt16 j=0;j<3;j++)
{
Sequence<PropertyValue> aLevel = aNumberings.getConstArray()[i];
try
{
aLevel.realloc(aLevel.getLength() + 1);
PropertyValue& rValue = aLevel.getArray()[aLevel.getLength() - 1];
rValue.Name = "Value";
rValue.Value <<= (sal_Int32)(j + 1);
if (j!=0)
sText += " ";
sText += xFormatter->makeNumberingString( aLevel, aLocale );
}
catch (const Exception&)
{
OSL_ENSURE(false, "Exception in DefaultNumberingProvider::makeNumberingString");
}
}
}
OUString aStrFromRES(SVX_RESSTR( RID_SVXSTR_SINGLENUM_DESCRIPTIONS));
aStrFromRES = aStrFromRES.replaceFirst("%NUMBERINGSAMPLE",sText);
pNumEntry->sDescription = aStrFromRES;
}
//End modification
//pNumEntry->sDescription = SVX_RESSTR( RID_SVXSTR_SINGLENUM_DESCRIPTION_0 + i );
pNumEntry->sDescription = SVX_RESSTR( RID_SVXSTR_SINGLENUM_DESCRIPTIONS + i );
pNumberSettingsArr->push_back(boost::shared_ptr<NumberSettings_Impl>(pNumEntry));
}
}
......
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