summaryrefslogtreecommitdiff
path: root/sc/source/core/data
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/core/data')
-rw-r--r--sc/source/core/data/conditio.cxx22
-rw-r--r--sc/source/core/data/table2.cxx9
2 files changed, 28 insertions, 3 deletions
diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx
index 26f561a44fa1..6cc4f1bb022b 100644
--- a/sc/source/core/data/conditio.cxx
+++ b/sc/source/core/data/conditio.cxx
@@ -1960,6 +1960,16 @@ void ScConditionalFormat::UpdateReference( sc::RefUpdateContext& rCxt, bool bCop
maRanges.UpdateReference(rCxt.meMode, pDoc, rCxt.maRange, rCxt.mnColDelta, rCxt.mnRowDelta, rCxt.mnTabDelta);
}
+void ScConditionalFormat::InsertRow(SCTAB nTab, SCCOL nColStart, SCCOL nColEnd, SCROW nRowPos, SCSIZE nSize)
+{
+ maRanges.InsertRow(nTab, nColStart, nColEnd, nRowPos, nSize);
+}
+
+void ScConditionalFormat::InsertCol(SCTAB nTab, SCROW nRowStart, SCROW nRowEnd, SCCOL nColPos, SCSIZE nSize)
+{
+ maRanges.InsertCol(nTab, nRowStart, nRowEnd, nColPos, nSize);
+}
+
void ScConditionalFormat::UpdateInsertTab( sc::RefUpdateInsertTabContext& rCxt )
{
for (CondFormatContainer::iterator it = maEntries.begin(); it != maEntries.end(); ++it)
@@ -2168,6 +2178,18 @@ void ScConditionalFormatList::UpdateReference( sc::RefUpdateContext& rCxt )
}
}
+void ScConditionalFormatList::InsertRow(SCTAB nTab, SCCOL nColStart, SCCOL nColEnd, SCROW nRowPos, SCSIZE nSize)
+{
+ for(iterator it = begin(), itEnd = end(); it != itEnd; ++it)
+ it->InsertRow(nTab, nColStart, nColEnd, nRowPos, nSize);
+}
+
+void ScConditionalFormatList::InsertCol(SCTAB nTab, SCROW nRowStart, SCROW nRowEnd, SCCOL nColPos, SCSIZE nSize)
+{
+ for(iterator it = begin(), itEnd = end(); it != itEnd; ++it)
+ it->InsertCol(nTab, nRowStart, nRowEnd, nColPos, nSize);
+}
+
void ScConditionalFormatList::UpdateInsertTab( sc::RefUpdateInsertTabContext& rCxt )
{
for (iterator it = begin(); it != end(); ++it)
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index da3d42317669..7bd7ac6b035b 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -218,6 +218,8 @@ void ScTable::InsertRow( SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCSIZE
aNotes.ReleaseNote( nCol, nRow);
}
+ mpCondFormatList->InsertRow(nTab, nStartCol, nEndCol, nStartRow, nSize);
+
InvalidatePageBreaks();
if (IsStreamValid())
@@ -425,10 +427,9 @@ void ScTable::InsertCol(
if (nStartCol>0) // copy old attributes
{
- sal_uInt16 nWhichArray[3];
+ sal_uInt16 nWhichArray[2];
nWhichArray[0] = ATTR_MERGE;
- nWhichArray[1] = ATTR_CONDITIONAL;
- nWhichArray[2] = 0;
+ nWhichArray[1] = 0;
sc::CopyToDocContext aCxt(*pDocument);
for (SCSIZE i=0; i<nSize; i++)
@@ -441,6 +442,8 @@ void ScTable::InsertCol(
}
}
+ mpCondFormatList->InsertCol(nTab, nStartRow, nEndRow, nStartCol, nSize);
+
InvalidatePageBreaks();
if (IsStreamValid())