On Tue, Dec 7, 2010 at 4:45 PM, Kohei Yoshida <kyoshida@novell.com> wrote:
I've attached a patch awaiting peer-review.
https://bugs.freedesktop.org/show_bug.cgi?id=32196
The change is simple and innocuous enough that I would almost commit it
without review, but I'd like someone to take a quick look and give me a
go.
Shouldn't you test if you need it _before_ actually constructing it ?
iow:
- char sRecordStr[256];
if (aCurrentRow<=nEndRow)
+ {
+ OUStringBuffer aBuf;
+ aBuf.append(static_cast<sal_Int32>(aCurrentRow - nStartRow));
+ aBuf.appendAscii(" / ");
+ aBuf.append(static_cast<sal_Int32>(nEndRow - nStartRow));
- aFixedText.SetText(String::CreateFromAscii(sRecordStr));
+ aFixedText.SetText(aBuf.makeStringAndClear());
+ }
else
aFixedText.SetText(String::CreateFromAscii("New Record"));
instead of
- char sRecordStr[256];
+ OUStringBuffer aBuf;
+ aBuf.append(static_cast<sal_Int32>(aCurrentRow - nStartRow));
+ aBuf.appendAscii(" / ");
+ aBuf.append(static_cast<sal_Int32>(nEndRow - nStartRow));
if (aCurrentRow<=nEndRow)
- aFixedText.SetText(String::CreateFromAscii(sRecordStr));
+ aFixedText.SetText(aBuf.makeStringAndClear());
else
aFixedText.SetText(String::CreateFromAscii("New Record"));
???
Norbert
Thanks,
Kohei
--
Kohei Yoshida, LibreOffice hacker, Calc
<kyoshida@novell.com>
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.