summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/ui/dbgui/scuiasciiopt.cxx6
-rw-r--r--sc/source/ui/inc/scuiasciiopt.hxx2
2 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/ui/dbgui/scuiasciiopt.cxx b/sc/source/ui/dbgui/scuiasciiopt.cxx
index aeb718be4d08..db98865ca7f0 100644
--- a/sc/source/ui/dbgui/scuiasciiopt.cxx
+++ b/sc/source/ui/dbgui/scuiasciiopt.cxx
@@ -531,7 +531,7 @@ ScImportAsciiDlg::~ScImportAsciiDlg()
void ScImportAsciiDlg::dispose()
{
- delete[] mpRowPosArray;
+ mpRowPosArray.reset();
pFtCharSet.clear();
pLbCharSet.clear();
pFtCustomLang.clear();
@@ -568,11 +568,11 @@ bool ScImportAsciiDlg::GetLine( sal_uLong nLine, OUString &rText, sal_Unicode& r
bool bFixed = pRbFixed->IsChecked();
if (!mpRowPosArray)
- mpRowPosArray = new sal_uLong[ASCIIDLG_MAXROWS + 2];
+ mpRowPosArray.reset( new sal_uLong[ASCIIDLG_MAXROWS + 2] );
if (!mnRowPosCount) // complete re-fresh
{
- memset( mpRowPosArray, 0, sizeof(mpRowPosArray[0]) * (ASCIIDLG_MAXROWS+2));
+ memset( mpRowPosArray.get(), 0, sizeof(mpRowPosArray[0]) * (ASCIIDLG_MAXROWS+2));
Seek(0);
mpDatStream->StartReadingUnicodeText( mpDatStream->GetStreamCharSet() );
diff --git a/sc/source/ui/inc/scuiasciiopt.hxx b/sc/source/ui/inc/scuiasciiopt.hxx
index c65fb81c3cec..49fa4b1b69b3 100644
--- a/sc/source/ui/inc/scuiasciiopt.hxx
+++ b/sc/source/ui/inc/scuiasciiopt.hxx
@@ -41,7 +41,7 @@ class ScImportAsciiDlg : public ModalDialog
{
SvStream* mpDatStream;
sal_uLong mnStreamPos;
- sal_uLong* mpRowPosArray;
+ std::unique_ptr<sal_uLong[]> mpRowPosArray;
sal_uLong mnRowPosCount;
OUString maPreviewLine[ CSV_PREVIEW_LINES ];