diff options
-rw-r--r-- | sc/source/ui/miscdlgs/datafdlg.cxx | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/sc/source/ui/miscdlgs/datafdlg.cxx b/sc/source/ui/miscdlgs/datafdlg.cxx index 377213fc0..50503e26f 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")); |