Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
5d9e062a
Kaydet (Commit)
5d9e062a
authored
Eyl 05, 2013
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
increase conditional format range during inserting rows/cols, fdo#67783
Change-Id: Ib74667fb958aa9bbbcae3a0289b3cbd6edf8fb37
üst
dcc05d40
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
101 additions
and
3 deletions
+101
-3
conditio.hxx
sc/inc/conditio.hxx
+8
-0
rangelst.hxx
sc/inc/rangelst.hxx
+3
-0
conditio.cxx
sc/source/core/data/conditio.cxx
+22
-0
table2.cxx
sc/source/core/data/table2.cxx
+6
-3
rangelst.cxx
sc/source/core/tool/rangelst.cxx
+62
-0
No files found.
sc/inc/conditio.hxx
Dosyayı görüntüle @
5d9e062a
...
...
@@ -413,6 +413,10 @@ public:
void
UpdateInsertTab
(
sc
::
RefUpdateInsertTabContext
&
rCxt
);
void
UpdateDeleteTab
(
sc
::
RefUpdateDeleteTabContext
&
rCxt
);
void
UpdateMoveTab
(
sc
::
RefUpdateMoveTabContext
&
rCxt
);
void
InsertRow
(
SCTAB
nTab
,
SCCOL
nColStart
,
SCCOL
nColEnd
,
SCROW
nRowStart
,
SCSIZE
nSize
);
void
InsertCol
(
SCTAB
nTab
,
SCROW
nRowStart
,
SCROW
nRowEnd
,
SCCOL
nColStart
,
SCSIZE
nSize
);
void
DeleteArea
(
SCCOL
nCol1
,
SCROW
nRow1
,
SCCOL
nCol2
,
SCROW
nRow2
);
void
RenameCellStyle
(
const
OUString
&
rOld
,
const
OUString
&
rNew
);
...
...
@@ -478,6 +482,10 @@ public:
void
UpdateInsertTab
(
sc
::
RefUpdateInsertTabContext
&
rCxt
);
void
UpdateDeleteTab
(
sc
::
RefUpdateDeleteTabContext
&
rCxt
);
void
UpdateMoveTab
(
sc
::
RefUpdateMoveTabContext
&
rCxt
);
void
InsertRow
(
SCTAB
nTab
,
SCCOL
nColStart
,
SCCOL
nColEnd
,
SCROW
nRowStart
,
SCSIZE
nSize
);
void
InsertCol
(
SCTAB
nTab
,
SCROW
nRowStart
,
SCROW
nRowEnd
,
SCCOL
nColStart
,
SCSIZE
nSize
);
void
RenameCellStyle
(
const
OUString
&
rOld
,
const
OUString
&
rNew
);
void
DeleteArea
(
SCCOL
nCol1
,
SCROW
nRow1
,
SCCOL
nCol2
,
SCROW
nRow2
);
...
...
sc/inc/rangelst.hxx
Dosyayı görüntüle @
5d9e062a
...
...
@@ -59,6 +59,9 @@ public:
SCsTAB
nDz
);
void
InsertRow
(
SCTAB
nTab
,
SCCOL
nColStart
,
SCCOL
nColEnd
,
SCROW
nRowPos
,
SCSIZE
nSize
);
void
InsertCol
(
SCTAB
nTab
,
SCROW
nRowStart
,
SCROW
nRowEnd
,
SCCOL
nColPos
,
SCSIZE
nSize
);
/** For now this method assumes that nTab1 == nTab2
* The algorithm will be much more complicated if nTab1 != nTab2
*/
...
...
sc/source/core/data/conditio.cxx
Dosyayı görüntüle @
5d9e062a
...
...
@@ -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
)
...
...
sc/source/core/data/table2.cxx
Dosyayı görüntüle @
5d9e062a
...
...
@@ -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
())
...
...
sc/source/core/tool/rangelst.cxx
Dosyayı görüntüle @
5d9e062a
...
...
@@ -459,6 +459,68 @@ bool ScRangeList::UpdateReference(
return
bChanged
;
}
void
ScRangeList
::
InsertRow
(
SCTAB
nTab
,
SCCOL
nColStart
,
SCCOL
nColEnd
,
SCROW
nRowPos
,
SCSIZE
nSize
)
{
std
::
vector
<
ScRange
>
aNewRanges
;
for
(
iterator
it
=
maRanges
.
begin
(),
itEnd
=
maRanges
.
end
();
it
!=
itEnd
;
++
it
)
{
ScRange
*
pRange
=
*
it
;
if
(
pRange
->
aStart
.
Tab
()
<=
nTab
&&
pRange
->
aEnd
.
Tab
()
>=
nTab
)
{
if
(
pRange
->
aEnd
.
Row
()
==
nRowPos
-
1
&&
(
nColStart
<=
pRange
->
aEnd
.
Col
()
||
nColEnd
>=
pRange
->
aStart
.
Col
()))
{
SCCOL
nNewRangeStartCol
=
std
::
max
<
SCCOL
>
(
nColStart
,
pRange
->
aStart
.
Col
());
SCCOL
nNewRangeEndCol
=
std
::
min
<
SCCOL
>
(
nColEnd
,
pRange
->
aEnd
.
Col
());
SCROW
nNewRangeStartRow
=
pRange
->
aEnd
.
Row
()
+
1
;
SCROW
nNewRangeEndRow
=
nRowPos
+
nSize
-
1
;
aNewRanges
.
push_back
(
ScRange
(
nNewRangeStartCol
,
nNewRangeStartRow
,
nTab
,
nNewRangeEndCol
,
nNewRangeEndRow
,
nTab
));
}
}
}
for
(
std
::
vector
<
ScRange
>::
const_iterator
it
=
aNewRanges
.
begin
(),
itEnd
=
aNewRanges
.
end
();
it
!=
itEnd
;
++
it
)
{
if
(
!
it
->
IsValid
())
continue
;
Join
(
*
it
);
}
}
void
ScRangeList
::
InsertCol
(
SCTAB
nTab
,
SCROW
nRowStart
,
SCROW
nRowEnd
,
SCCOL
nColPos
,
SCSIZE
nSize
)
{
std
::
vector
<
ScRange
>
aNewRanges
;
for
(
iterator
it
=
maRanges
.
begin
(),
itEnd
=
maRanges
.
end
();
it
!=
itEnd
;
++
it
)
{
ScRange
*
pRange
=
*
it
;
if
(
pRange
->
aStart
.
Tab
()
<=
nTab
&&
pRange
->
aEnd
.
Tab
()
>=
nTab
)
{
if
(
pRange
->
aEnd
.
Col
()
==
nColPos
-
1
&&
(
nRowStart
<=
pRange
->
aEnd
.
Row
()
||
nRowEnd
>=
pRange
->
aStart
.
Row
()))
{
SCROW
nNewRangeStartRow
=
std
::
max
<
SCROW
>
(
nRowStart
,
pRange
->
aStart
.
Row
());
SCROW
nNewRangeEndRow
=
std
::
min
<
SCROW
>
(
nRowEnd
,
pRange
->
aEnd
.
Row
());
SCCOL
nNewRangeStartCol
=
pRange
->
aEnd
.
Col
()
+
1
;
SCCOL
nNewRangeEndCol
=
nColPos
+
nSize
-
1
;
aNewRanges
.
push_back
(
ScRange
(
nNewRangeStartCol
,
nNewRangeStartRow
,
nTab
,
nNewRangeEndCol
,
nNewRangeEndRow
,
nTab
));
}
}
}
for
(
std
::
vector
<
ScRange
>::
const_iterator
it
=
aNewRanges
.
begin
(),
itEnd
=
aNewRanges
.
end
();
it
!=
itEnd
;
++
it
)
{
if
(
!
it
->
IsValid
())
continue
;
Join
(
*
it
);
}
}
namespace
{
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment