summaryrefslogtreecommitdiff
path: root/sc/source/filter/xml/XMLStylesExportHelper.cxx
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-01-25 21:19:20 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-01-26 00:49:15 +0100
commitab121cf8540dc26b4877022b11e2ea50a4fd9b5e (patch)
treead2accafd0695d90e58e35427e25509582844947 /sc/source/filter/xml/XMLStylesExportHelper.cxx
parentafc4864e2677b66182785f873d838081b2e331a4 (diff)
don't use a pointer here
Change-Id: If7e7785e032d7d95764e8325870655e276cfda8f
Diffstat (limited to 'sc/source/filter/xml/XMLStylesExportHelper.cxx')
-rw-r--r--sc/source/filter/xml/XMLStylesExportHelper.cxx20
1 files changed, 6 insertions, 14 deletions
diff --git a/sc/source/filter/xml/XMLStylesExportHelper.cxx b/sc/source/filter/xml/XMLStylesExportHelper.cxx
index 6e80aa8ea951..5e5c2161ac1b 100644
--- a/sc/source/filter/xml/XMLStylesExportHelper.cxx
+++ b/sc/source/filter/xml/XMLStylesExportHelper.cxx
@@ -477,12 +477,12 @@ void ScMyDefaultStyles::FillDefaultStyles(const sal_Int32 nTable,
ScMyDefaultStyleList* pDefaults;
if (bRow)
{
- pDefaults = pRowDefaults;
+ pDefaults = &maRowDefaults;
nLast = nLastRow;
}
else
{
- pDefaults = pColDefaults;
+ pDefaults = &maColDefaults;
nLast = nLastCol;
}
bool bPrevAutoStyle(false);
@@ -561,22 +561,14 @@ void ScMyDefaultStyles::FillDefaultStyles(const sal_Int32 nTable,
const sal_Int32 nLastRow, const sal_Int32 nLastCol,
const ScFormatRangeStyles* pCellStyles, ScDocument* pDoc)
{
- delete pRowDefaults;
- pRowDefaults = new ScMyDefaultStyleList(nLastRow + 1);
+ maRowDefaults.clear();
+ maRowDefaults.resize(nLastRow + 1);
FillDefaultStyles(nTable, nLastRow, nLastCol, pCellStyles, pDoc, true);
- delete pColDefaults;
- pColDefaults = new ScMyDefaultStyleList(nLastCol + 1);
+ maColDefaults.clear();
+ maColDefaults.resize(nLastCol + 1);
FillDefaultStyles(nTable, nLastRow, nLastCol, pCellStyles, pDoc, false);
}
-ScMyDefaultStyles::~ScMyDefaultStyles()
-{
- if (pRowDefaults)
- delete pRowDefaults;
- if (pColDefaults)
- delete pColDefaults;
-}
-
ScMyRowFormatRange::ScMyRowFormatRange()
: nStartColumn(0),
nRepeatColumns(0),