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
290a851b
Kaydet (Commit)
290a851b
authored
Nis 11, 2012
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
ScTable::FillAuto should work with hidden rows/columsn now too
üst
a6a0ea2f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
94 additions
and
94 deletions
+94
-94
table4.cxx
sc/source/core/data/table4.cxx
+94
-94
No files found.
sc/source/core/data/table4.cxx
Dosyayı görüntüle @
290a851b
...
@@ -536,7 +536,7 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
...
@@ -536,7 +536,7 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
sal_uLong
nIMin
=
nIStart
;
sal_uLong
nIMin
=
nIStart
;
sal_uLong
nIMax
=
nIEnd
;
sal_uLong
nIMax
=
nIEnd
;
PutInOrder
(
nIMin
,
nIMax
);
PutInOrder
(
nIMin
,
nIMax
);
bool
bHasFiltered
=
IsDataFiltered
(
aFillRange
.
aStart
.
Col
(),
aFillRange
.
aStart
.
Row
(),
aFillRange
.
aEnd
.
Col
(),
aFillRange
.
aEnd
.
Row
()
);
bool
bHasFiltered
=
IsDataFiltered
(
aFillRange
);
if
(
!
bHasFiltered
)
if
(
!
bHasFiltered
)
{
{
...
@@ -569,52 +569,52 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
...
@@ -569,52 +569,52 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
rInner
=
nIStart
;
rInner
=
nIStart
;
while
(
true
)
// #i53728# with "for (;;)" old solaris/x86 compiler mis-optimizes
while
(
true
)
// #i53728# with "for (;;)" old solaris/x86 compiler mis-optimizes
{
{
if
(
bGetPattern
)
if
(
!
ColHidden
(
nCol
)
&&
!
RowHidden
(
nRow
)
)
{
{
delete
pNewPattern
;
if
(
bGetPattern
)
if
(
bVertical
)
// rInner&:=nRow, rOuter&:=nCol
pSrcPattern
=
aCol
[
nCol
].
GetPattern
(
static_cast
<
SCROW
>
(
nAtSrc
));
else
// rInner&:=nCol, rOuter&:=nRow
pSrcPattern
=
aCol
[
nAtSrc
].
GetPattern
(
static_cast
<
SCROW
>
(
nRow
));
bGetPattern
=
false
;
pStyleSheet
=
pSrcPattern
->
GetStyleSheet
();
// Merge/Mergeflag nicht uebernehmen,
const
SfxItemSet
&
rSet
=
pSrcPattern
->
GetItemSet
();
if
(
rSet
.
GetItemState
(
ATTR_MERGE
,
false
)
==
SFX_ITEM_SET
||
rSet
.
GetItemState
(
ATTR_MERGE_FLAG
,
false
)
==
SFX_ITEM_SET
)
{
{
pNewPattern
=
new
ScPatternAttr
(
*
pSrcPattern
);
delete
pNewPattern
;
SfxItemSet
&
rNewSet
=
pNewPattern
->
GetItemSet
();
if
(
bVertical
)
// rInner&:=nRow, rOuter&:=nCol
rNewSet
.
ClearItem
(
ATTR_MERGE
);
pSrcPattern
=
aCol
[
nCol
].
GetPattern
(
static_cast
<
SCROW
>
(
nAtSrc
));
rNewSet
.
ClearItem
(
ATTR_MERGE_FLAG
);
else
// rInner&:=nCol, rOuter&:=nRow
pSrcPattern
=
aCol
[
nAtSrc
].
GetPattern
(
static_cast
<
SCROW
>
(
nRow
));
bGetPattern
=
false
;
pStyleSheet
=
pSrcPattern
->
GetStyleSheet
();
// Merge/Mergeflag nicht uebernehmen,
const
SfxItemSet
&
rSet
=
pSrcPattern
->
GetItemSet
();
if
(
rSet
.
GetItemState
(
ATTR_MERGE
,
false
)
==
SFX_ITEM_SET
||
rSet
.
GetItemState
(
ATTR_MERGE_FLAG
,
false
)
==
SFX_ITEM_SET
)
{
pNewPattern
=
new
ScPatternAttr
(
*
pSrcPattern
);
SfxItemSet
&
rNewSet
=
pNewPattern
->
GetItemSet
();
rNewSet
.
ClearItem
(
ATTR_MERGE
);
rNewSet
.
ClearItem
(
ATTR_MERGE_FLAG
);
}
else
pNewPattern
=
NULL
;
}
}
else
pNewPattern
=
NULL
;
}
if
(
bVertical
&&
nISrcStart
==
nISrcEnd
&&
!
bHasFiltered
)
if
(
bVertical
&&
nISrcStart
==
nISrcEnd
&&
!
bHasFiltered
)
{
// Attribute komplett am Stueck setzen
if
(
pNewPattern
||
pSrcPattern
!=
pDocument
->
GetDefPattern
())
{
{
// Default steht schon da (DeleteArea)
// Attribute komplett am Stueck setzen
SCROW
nY1
=
static_cast
<
SCROW
>
(
Min
(
nIStart
,
nIEnd
));
if
(
pNewPattern
||
pSrcPattern
!=
pDocument
->
GetDefPattern
())
SCROW
nY2
=
static_cast
<
SCROW
>
(
Max
(
nIStart
,
nIEnd
));
{
if
(
pStyleSheet
)
// Default steht schon da (DeleteArea)
aCol
[
nCol
].
ApplyStyleArea
(
nY1
,
nY2
,
*
pStyleSheet
);
SCROW
nY1
=
static_cast
<
SCROW
>
(
Min
(
nIStart
,
nIEnd
));
if
(
pNewPattern
)
SCROW
nY2
=
static_cast
<
SCROW
>
(
Max
(
nIStart
,
nIEnd
));
aCol
[
nCol
].
ApplyPatternArea
(
nY1
,
nY2
,
*
pNewPattern
);
if
(
pStyleSheet
)
else
aCol
[
nCol
].
ApplyStyleArea
(
nY1
,
nY2
,
*
pStyleSheet
);
aCol
[
nCol
].
ApplyPatternArea
(
nY1
,
nY2
,
*
pSrcPattern
);
if
(
pNewPattern
)
aCol
[
nCol
].
ApplyPatternArea
(
nY1
,
nY2
,
*
pNewPattern
);
else
aCol
[
nCol
].
ApplyPatternArea
(
nY1
,
nY2
,
*
pSrcPattern
);
}
break
;
// Schleife abbrechen
}
}
break
;
// Schleife abbrechen
}
if
(
!
RowFiltered
(
nRow
))
{
if
(
bHasFiltered
)
if
(
bHasFiltered
)
DeleteArea
(
static_cast
<
SCCOL
>
(
nCol
),
static_cast
<
SCROW
>
(
nRow
),
DeleteArea
(
static_cast
<
SCCOL
>
(
nCol
),
static_cast
<
SCROW
>
(
nRow
),
static_cast
<
SCCOL
>
(
nCol
),
static_cast
<
SCROW
>
(
nRow
),
IDF_AUTOFILL
);
static_cast
<
SCCOL
>
(
nCol
),
static_cast
<
SCROW
>
(
nRow
),
IDF_AUTOFILL
);
if
(
pSrcPattern
!=
aCol
[
nCol
].
GetPattern
(
static_cast
<
SCROW
>
(
nRow
)
)
)
if
(
pSrcPattern
!=
aCol
[
nCol
].
GetPattern
(
static_cast
<
SCROW
>
(
nRow
)
)
)
{
{
...
@@ -693,17 +693,20 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
...
@@ -693,17 +693,20 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
rInner
=
nIStart
;
rInner
=
nIStart
;
while
(
true
)
// #i53728# with "for (;;)" old solaris/x86 compiler mis-optimizes
while
(
true
)
// #i53728# with "for (;;)" old solaris/x86 compiler mis-optimizes
{
{
if
(
bPositive
)
if
(
!
ColHidden
(
nCol
)
&&
!
RowHidden
(
nRow
)
)
{
{
++
nListIndex
;
if
(
bPositive
)
if
(
nListIndex
>=
nListCount
)
nListIndex
=
0
;
{
}
++
nListIndex
;
else
if
(
nListIndex
>=
nListCount
)
nListIndex
=
0
;
{
}
if
(
nListIndex
==
0
)
nListIndex
=
nListCount
;
else
--
nListIndex
;
{
if
(
nListIndex
==
0
)
nListIndex
=
nListCount
;
--
nListIndex
;
}
aCol
[
nCol
].
Insert
(
static_cast
<
SCROW
>
(
nRow
),
new
ScStringCell
(
pListData
->
GetSubStr
(
nListIndex
)));
}
}
aCol
[
nCol
].
Insert
(
static_cast
<
SCROW
>
(
nRow
),
new
ScStringCell
(
pListData
->
GetSubStr
(
nListIndex
)));
if
(
rInner
==
nIEnd
)
break
;
if
(
rInner
==
nIEnd
)
break
;
if
(
bPositive
)
++
rInner
;
else
--
rInner
;
if
(
bPositive
)
++
rInner
;
else
--
rInner
;
...
@@ -718,7 +721,7 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
...
@@ -718,7 +721,7 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
{
{
sal_uLong
nSource
=
nISrcStart
;
sal_uLong
nSource
=
nISrcStart
;
double
nDelta
;
double
nDelta
;
if
(
(
nScFillModeMouseModifier
&
KEY_MOD1
)
||
bHasFiltered
)
if
(
(
nScFillModeMouseModifier
&
KEY_MOD1
)
)
nDelta
=
0.0
;
nDelta
=
0.0
;
else
if
(
bPositive
)
else
if
(
bPositive
)
nDelta
=
1.0
;
nDelta
=
1.0
;
...
@@ -735,56 +738,53 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
...
@@ -735,56 +738,53 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
ScBaseCell
*
pSrcCell
=
NULL
;
ScBaseCell
*
pSrcCell
=
NULL
;
CellType
eCellType
=
CELLTYPE_NONE
;
CellType
eCellType
=
CELLTYPE_NONE
;
bool
bIsOrdinalSuffix
=
false
;
bool
bIsOrdinalSuffix
=
false
;
bool
bRowFiltered
=
false
;
rInner
=
nIStart
;
rInner
=
nIStart
;
while
(
true
)
// #i53728# with "for (;;)" old solaris/x86 compiler mis-optimizes
while
(
true
)
// #i53728# with "for (;;)" old solaris/x86 compiler mis-optimizes
{
{
if
(
bGetCell
)
if
(
!
ColHidden
(
nCol
)
&&
!
RowHidden
(
nRow
)
)
{
{
if
(
bVertical
)
// rInner&:=nRow, rOuter&:=nCol
if
(
bGetCell
)
pSrcCell
=
aCol
[
nCol
].
GetCell
(
static_cast
<
SCROW
>
(
nSource
)
);
else
// rInner&:=nCol, rOuter&:=nRow
pSrcCell
=
aCol
[
nSource
].
GetCell
(
static_cast
<
SCROW
>
(
nRow
)
);
bGetCell
=
false
;
if
(
pSrcCell
)
{
{
eCellType
=
pSrcCell
->
GetCellType
();
if
(
bVertical
)
// rInner&:=nRow, rOuter&:=nCol
switch
(
eCellType
)
pSrcCell
=
aCol
[
nCol
].
GetCell
(
static_cast
<
SCROW
>
(
nSource
)
);
else
// rInner&:=nCol, rOuter&:=nRow
pSrcCell
=
aCol
[
nSource
].
GetCell
(
static_cast
<
SCROW
>
(
nRow
)
);
bGetCell
=
false
;
if
(
pSrcCell
)
{
{
case
CELLTYPE_VALUE
:
eCellType
=
pSrcCell
->
GetCellType
();
nVal
=
((
ScValueCell
*
)
pSrcCell
)
->
GetValue
();
switch
(
eCellType
)
break
;
case
CELLTYPE_STRING
:
case
CELLTYPE_EDIT
:
if
(
eCellType
==
CELLTYPE_STRING
)
aValue
=
((
ScStringCell
*
)
pSrcCell
)
->
GetString
();
else
aValue
=
((
ScEditCell
*
)
pSrcCell
)
->
GetString
();
if
(
!
(
nScFillModeMouseModifier
&
KEY_MOD1
)
&&
!
bHasFiltered
)
{
nCellDigits
=
0
;
// look at each source cell individually
nHeadNoneTail
=
lcl_DecompValueString
(
aValue
,
nStringValue
,
&
nCellDigits
);
bIsOrdinalSuffix
=
aValue
.
Equals
(
ScGlobal
::
GetOrdinalSuffix
(
nStringValue
));
}
break
;
default
:
{
{
// added to avoid warnings
case
CELLTYPE_VALUE
:
nVal
=
((
ScValueCell
*
)
pSrcCell
)
->
GetValue
();
break
;
case
CELLTYPE_STRING
:
case
CELLTYPE_EDIT
:
if
(
eCellType
==
CELLTYPE_STRING
)
aValue
=
((
ScStringCell
*
)
pSrcCell
)
->
GetString
();
else
aValue
=
((
ScEditCell
*
)
pSrcCell
)
->
GetString
();
if
(
!
(
nScFillModeMouseModifier
&
KEY_MOD1
)
&&
!
bHasFiltered
)
{
nCellDigits
=
0
;
// look at each source cell individually
nHeadNoneTail
=
lcl_DecompValueString
(
aValue
,
nStringValue
,
&
nCellDigits
);
bIsOrdinalSuffix
=
aValue
.
Equals
(
ScGlobal
::
GetOrdinalSuffix
(
nStringValue
));
}
break
;
default
:
{
// added to avoid warnings
}
}
}
}
}
else
eCellType
=
CELLTYPE_NONE
;
}
}
else
eCellType
=
CELLTYPE_NONE
;
}
bRowFiltered
=
RowHidden
(
nRow
);
if
(
!
bRowFiltered
)
{
switch
(
eCellType
)
switch
(
eCellType
)
{
{
case
CELLTYPE_VALUE
:
case
CELLTYPE_VALUE
:
...
@@ -823,11 +823,11 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
...
@@ -823,11 +823,11 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
case
CELLTYPE_STRING
:
case
CELLTYPE_STRING
:
case
CELLTYPE_EDIT
:
case
CELLTYPE_EDIT
:
aCol
[
nCol
].
Insert
(
aDestPos
.
Row
(),
pSrcCell
->
Clone
(
*
pDocument
)
);
aCol
[
nCol
].
Insert
(
aDestPos
.
Row
(),
pSrcCell
->
Clone
(
*
pDocument
)
);
break
;
break
;
default
:
default
:
{
{
// added to avoid warnings
// added to avoid warnings
}
}
}
}
}
}
break
;
break
;
...
@@ -840,9 +840,9 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
...
@@ -840,9 +840,9 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
nMaxFormCnt
=
nFormulaCounter
-
nActFormCnt
;
nMaxFormCnt
=
nFormulaCounter
-
nActFormCnt
;
break
;
break
;
default
:
default
:
{
{
// added to avoid warnings
// added to avoid warnings
}
}
}
}
if
(
nSource
==
nISrcEnd
)
if
(
nSource
==
nISrcEnd
)
...
@@ -852,7 +852,7 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
...
@@ -852,7 +852,7 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
nSource
=
nISrcStart
;
nSource
=
nISrcStart
;
bGetCell
=
true
;
bGetCell
=
true
;
}
}
if
(
!
(
nScFillModeMouseModifier
&
KEY_MOD1
)
&&
!
bHasFiltered
)
if
(
!
(
nScFillModeMouseModifier
&
KEY_MOD1
)
)
{
{
if
(
bPositive
)
if
(
bPositive
)
nDelta
+=
1.0
;
nDelta
+=
1.0
;
...
...
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