[Libreoffice] [PATCH] Changed String to OUString in funcdesc.hxx
Kohei Yoshida
kyoshida at novell.com
Mon Jan 10 17:38:11 PST 2011
On Tue, 2011-01-11 at 00:30 +0100, Soeren Moeller wrote:
> I have now added a function ResId::toString which returns an OUString
> from a ResId to tools/inc/resid.hxx, and changed the old workaround to
> use this function. I also have changed OUString to OUStringBuffer in
> getSignature() and GetParamList(), and modified the operations in
> these functions accordingly.
>
> Attached two patches, one with the changes to the tools tree, the
> other with the changes to the sc tree.
>
> Please review and apply if ok
Hmm... I tried apply your two patches against sc, but they don't apply
cleanly in global.cxx. I took a closer look, and looks like the patches
are missing some changes you've apparently made. Can you double-check
your patches and see if they contain *all* your changes against the
baseline?
For instance, from your 1st patch (the patch attached in your first
email on this thread),
else
{
nLastAdded = i;
- aSig += (String)*(ppDefArgNames[i]);
+ aSig += *(ppDefArgNames[i]);
if ( i != nArgCount-1 )
{
the baseline code doesn't have this line
aSig += (String)*(ppDefArgNames[i]);
which the patch is trying to replace.
Also from the 2nd patch (the patch against sc that was attached in your
last email),
@@ -1169,7 +1169,7 @@ ScFuncRes::ScFuncRes( ResId &aRes, ScFuncDesc* pDesc, bool & rbSuppressed )
}
pDesc->pFuncName = new ::rtl::OUString( ScCompiler::GetNativeSymbol( static_cast<OpCode>( aRes.GetId())));
- pDesc->pFuncDesc = (::rtl::OUString*)(new String(ScResId(1)));
+ pDesc->pFuncDesc = ResId::toString(ScResId(1));
if (nArgs)
{
the baseline code doesn't have this line
pDesc->pFuncName = new ::rtl::OUString( ScCompiler::GetNativeSymbol( static_cast<OpCode>( aRes.GetId())));
either. Also the line below that the patch is trying to remove is not
there either.
So, something weird is definitely going on.
Kohei
--
Kohei Yoshida, LibreOffice hacker, Calc
<kyoshida at novell.com>
More information about the LibreOffice
mailing list