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
94c63b86
Kaydet (Commit)
94c63b86
authored
Ock 20, 2012
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Prefer using back() to access the last element.
üst
bd161794
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
11 deletions
+15
-11
column.hxx
sc/inc/column.hxx
+1
-1
column.cxx
sc/source/core/data/column.cxx
+3
-3
column2.cxx
sc/source/core/data/column2.cxx
+1
-1
column3.cxx
sc/source/core/data/column3.cxx
+10
-6
No files found.
sc/inc/column.hxx
Dosyayı görüntüle @
94c63b86
...
@@ -256,7 +256,7 @@ public:
...
@@ -256,7 +256,7 @@ public:
double
GetValue
(
SCROW
nRow
)
const
;
double
GetValue
(
SCROW
nRow
)
const
;
void
GetFormula
(
SCROW
nRow
,
rtl
::
OUString
&
rFormula
)
const
;
void
GetFormula
(
SCROW
nRow
,
rtl
::
OUString
&
rFormula
)
const
;
CellType
GetCellType
(
SCROW
nRow
)
const
;
CellType
GetCellType
(
SCROW
nRow
)
const
;
SCSIZE
GetCellCount
()
const
{
return
maItems
.
size
();
}
SCSIZE
GetCellCount
()
const
;
sal_uInt32
GetWeightedCount
()
const
;
sal_uInt32
GetWeightedCount
()
const
;
sal_uInt32
GetCodeCount
()
const
;
// RPN-Code in formulas
sal_uInt32
GetCodeCount
()
const
;
// RPN-Code in formulas
sal_uInt16
GetErrCode
(
SCROW
nRow
)
const
;
sal_uInt16
GetErrCode
(
SCROW
nRow
)
const
;
...
...
sc/source/core/data/column.cxx
Dosyayı görüntüle @
94c63b86
...
@@ -705,7 +705,7 @@ bool ScColumn::Search( SCROW nRow, SCSIZE& nIndex ) const
...
@@ -705,7 +705,7 @@ bool ScColumn::Search( SCROW nRow, SCSIZE& nIndex ) const
nIndex
=
0
;
nIndex
=
0
;
return
nRow
==
nMinRow
;
return
nRow
==
nMinRow
;
}
}
SCROW
nMaxRow
=
maItems
[
maItems
.
size
()
-
1
]
.
nRow
;
SCROW
nMaxRow
=
maItems
.
back
()
.
nRow
;
if
(
nRow
>=
nMaxRow
)
if
(
nRow
>=
nMaxRow
)
{
{
if
(
nRow
==
nMaxRow
)
if
(
nRow
==
nMaxRow
)
...
@@ -1103,7 +1103,7 @@ void ScColumn::InsertRow( SCROW nStartRow, SCSIZE nSize )
...
@@ -1103,7 +1103,7 @@ void ScColumn::InsertRow( SCROW nStartRow, SCSIZE nSize )
ScHint
aHint
(
SC_HINT_DATACHANGED
,
aAdr
,
NULL
);
// only areas (ScBaseCell* == NULL)
ScHint
aHint
(
SC_HINT_DATACHANGED
,
aAdr
,
NULL
);
// only areas (ScBaseCell* == NULL)
ScAddress
&
rAddress
=
aHint
.
GetAddress
();
ScAddress
&
rAddress
=
aHint
.
GetAddress
();
// for sparse occupation use single broadcasts, not ranges
// for sparse occupation use single broadcasts, not ranges
bool
bSingleBroadcasts
=
(((
maItems
[
maItems
.
size
()
-
1
]
.
nRow
-
maItems
[
i
].
nRow
)
/
bool
bSingleBroadcasts
=
(((
maItems
.
back
()
.
nRow
-
maItems
[
i
].
nRow
)
/
(
maItems
.
size
()
-
i
))
>
1
);
(
maItems
.
size
()
-
i
))
>
1
);
if
(
bSingleBroadcasts
)
if
(
bSingleBroadcasts
)
{
{
...
@@ -1150,7 +1150,7 @@ void ScColumn::InsertRow( SCROW nStartRow, SCSIZE nSize )
...
@@ -1150,7 +1150,7 @@ void ScColumn::InsertRow( SCROW nStartRow, SCSIZE nSize )
}
}
}
}
if
(
!
bCountChanged
)
if
(
!
bCountChanged
)
aRange
.
aEnd
.
SetRow
(
maItems
[
maItems
.
size
()
-
1
]
.
nRow
);
aRange
.
aEnd
.
SetRow
(
maItems
.
back
()
.
nRow
);
pDocument
->
AreaBroadcastInRange
(
aRange
,
aHint
);
pDocument
->
AreaBroadcastInRange
(
aRange
,
aHint
);
}
}
...
...
sc/source/core/data/column2.cxx
Dosyayı görüntüle @
94c63b86
...
@@ -1296,7 +1296,7 @@ SCROW ScColumn::GetFirstDataPos() const
...
@@ -1296,7 +1296,7 @@ SCROW ScColumn::GetFirstDataPos() const
SCROW
ScColumn
::
GetLastDataPos
()
const
SCROW
ScColumn
::
GetLastDataPos
()
const
{
{
if
(
!
maItems
.
empty
()
)
if
(
!
maItems
.
empty
()
)
return
maItems
[
maItems
.
size
()
-
1
]
.
nRow
;
return
maItems
.
back
()
.
nRow
;
else
else
return
0
;
return
0
;
}
}
...
...
sc/source/core/data/column3.cxx
Dosyayı görüntüle @
94c63b86
...
@@ -74,7 +74,7 @@ void ScColumn::Insert( SCROW nRow, ScBaseCell* pNewCell )
...
@@ -74,7 +74,7 @@ void ScColumn::Insert( SCROW nRow, ScBaseCell* pNewCell )
sal_Bool
bIsAppended
=
false
;
sal_Bool
bIsAppended
=
false
;
if
(
!
maItems
.
empty
()
)
if
(
!
maItems
.
empty
()
)
{
{
if
(
maItems
[
maItems
.
size
()
-
1
]
.
nRow
<
nRow
)
if
(
maItems
.
back
()
.
nRow
<
nRow
)
{
{
Append
(
nRow
,
pNewCell
);
Append
(
nRow
,
pNewCell
);
bIsAppended
=
sal_True
;
bIsAppended
=
sal_True
;
...
@@ -149,8 +149,8 @@ void ScColumn::Insert( SCROW nRow, sal_uInt32 nNumberFormat, ScBaseCell* pCell )
...
@@ -149,8 +149,8 @@ void ScColumn::Insert( SCROW nRow, sal_uInt32 nNumberFormat, ScBaseCell* pCell )
void
ScColumn
::
Append
(
SCROW
nRow
,
ScBaseCell
*
pCell
)
void
ScColumn
::
Append
(
SCROW
nRow
,
ScBaseCell
*
pCell
)
{
{
maItems
.
push_back
(
ColEntry
());
maItems
.
push_back
(
ColEntry
());
maItems
[
maItems
.
size
()
-
1
]
.
pCell
=
pCell
;
maItems
.
back
()
.
pCell
=
pCell
;
maItems
[
maItems
.
size
()
-
1
]
.
nRow
=
nRow
;
maItems
.
back
()
.
nRow
=
nRow
;
}
}
...
@@ -260,7 +260,7 @@ void ScColumn::DeleteRow( SCROW nStartRow, SCSIZE nSize )
...
@@ -260,7 +260,7 @@ void ScColumn::DeleteRow( SCROW nStartRow, SCSIZE nSize )
ScHint
aHint
(
SC_HINT_DATACHANGED
,
aAdr
,
NULL
);
// only areas (ScBaseCell* == NULL)
ScHint
aHint
(
SC_HINT_DATACHANGED
,
aAdr
,
NULL
);
// only areas (ScBaseCell* == NULL)
ScAddress
&
rAddress
=
aHint
.
GetAddress
();
ScAddress
&
rAddress
=
aHint
.
GetAddress
();
// for sparse occupation use single broadcasts, not ranges
// for sparse occupation use single broadcasts, not ranges
sal_Bool
bSingleBroadcasts
=
(((
maItems
[
maItems
.
size
()
-
1
]
.
nRow
-
maItems
[
i
].
nRow
)
/
bool
bSingleBroadcasts
=
(((
maItems
.
back
()
.
nRow
-
maItems
[
i
].
nRow
)
/
(
maItems
.
size
()
-
i
))
>
1
);
(
maItems
.
size
()
-
i
))
>
1
);
if
(
bSingleBroadcasts
)
if
(
bSingleBroadcasts
)
{
{
...
@@ -288,7 +288,7 @@ void ScColumn::DeleteRow( SCROW nStartRow, SCSIZE nSize )
...
@@ -288,7 +288,7 @@ void ScColumn::DeleteRow( SCROW nStartRow, SCSIZE nSize )
{
{
rAddress
.
SetRow
(
maItems
[
i
].
nRow
);
rAddress
.
SetRow
(
maItems
[
i
].
nRow
);
ScRange
aRange
(
rAddress
);
ScRange
aRange
(
rAddress
);
aRange
.
aEnd
.
SetRow
(
maItems
[
maItems
.
size
()
-
1
]
.
nRow
);
aRange
.
aEnd
.
SetRow
(
maItems
.
back
()
.
nRow
);
for
(
;
i
<
maItems
.
size
();
i
++
)
for
(
;
i
<
maItems
.
size
();
i
++
)
{
{
SCROW
nNewRow
=
(
maItems
[
i
].
nRow
-=
nSize
);
SCROW
nNewRow
=
(
maItems
[
i
].
nRow
-=
nSize
);
...
@@ -1439,7 +1439,7 @@ bool ScColumn::SetString( SCROW nRow, SCTAB nTabP, const String& rString,
...
@@ -1439,7 +1439,7 @@ bool ScColumn::SetString( SCROW nRow, SCTAB nTabP, const String& rString,
}
}
}
}
if
(
bIsLoading
&&
(
maItems
.
empty
()
||
nRow
>
maItems
[
maItems
.
size
()
-
1
]
.
nRow
)
)
if
(
bIsLoading
&&
(
maItems
.
empty
()
||
nRow
>
maItems
.
back
()
.
nRow
)
)
{
// Search einsparen und ohne Umweg ueber Insert, Listener aufbauen
{
// Search einsparen und ohne Umweg ueber Insert, Listener aufbauen
// und Broadcast kommt eh erst nach dem Laden
// und Broadcast kommt eh erst nach dem Laden
if
(
pNewCell
)
if
(
pNewCell
)
...
@@ -1820,6 +1820,10 @@ CellType ScColumn::GetCellType( SCROW nRow ) const
...
@@ -1820,6 +1820,10 @@ CellType ScColumn::GetCellType( SCROW nRow ) const
return
CELLTYPE_NONE
;
return
CELLTYPE_NONE
;
}
}
SCSIZE
ScColumn
::
GetCellCount
()
const
{
return
maItems
.
size
();
}
sal_uInt16
ScColumn
::
GetErrCode
(
SCROW
nRow
)
const
sal_uInt16
ScColumn
::
GetErrCode
(
SCROW
nRow
)
const
{
{
...
...
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