summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2010-12-07 17:06:16 -0500
committerKohei Yoshida <kyoshida@novell.com>2010-12-07 22:53:40 -0500
commitfea6a96893876c95a0e9c7026755b615e60fea1f (patch)
treefa56193c6ff59aa2db6e9c49fa17726d400a020e /sc
parent631e8dd99de2da9f5b55fa4bab17b20522118f97 (diff)
Display correct record information in Data Form dialog. (fdo#32196)
I had accidentally removed the part that constructed correct string to display. Recovered it, and modified it to use OUStringBuffer instead of sprintf to construct the string. Signed-off-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/miscdlgs/datafdlg.cxx16
1 files changed, 13 insertions, 3 deletions
diff --git a/sc/source/ui/miscdlgs/datafdlg.cxx b/sc/source/ui/miscdlgs/datafdlg.cxx
index 377213fc0e10..50503e26f8f9 100644
--- a/sc/source/ui/miscdlgs/datafdlg.cxx
+++ b/sc/source/ui/miscdlgs/datafdlg.cxx
@@ -42,8 +42,12 @@
#include "refundo.hxx"
#include "undodat.hxx"
+#include "rtl/ustrbuf.hxx"
+
#define HDL(hdl) LINK( this, ScDataFormDlg, hdl )
+using ::rtl::OUStringBuffer;
+
//zhangyun
ScDataFormDlg::ScDataFormDlg( Window* pParent, ScTabViewShell* pTabViewShellOri) :
ModalDialog ( pParent, ScResId( RID_SCDLG_DATAFORM ) ),
@@ -272,9 +276,15 @@ void ScDataFormDlg::FillCtrls(SCROW /*nCurrentRow*/)
pEdits[i]->SetText(String());
}
}
- char sRecordStr[256];
- if (aCurrentRow<=nEndRow)
- aFixedText.SetText(String::CreateFromAscii(sRecordStr));
+
+ 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(aBuf.makeStringAndClear());
+ }
else
aFixedText.SetText(String::CreateFromAscii("New Record"));