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
fff1c3e3
Kaydet (Commit)
fff1c3e3
authored
Eyl 07, 2015
tarafından
Eike Rathke
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
TableRef: move swap to empty names to InvalidateTableColumnNames()
Change-Id: I495377786bd0add1521d37490c8c57d4d30f541e
üst
e6f44f1f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
22 deletions
+14
-22
dbdata.hxx
sc/inc/dbdata.hxx
+1
-1
dbdata.cxx
sc/source/core/tool/dbdata.cxx
+13
-21
No files found.
sc/inc/dbdata.hxx
Dosyayı görüntüle @
fff1c3e3
...
@@ -221,7 +221,7 @@ private:
...
@@ -221,7 +221,7 @@ private:
void
AdjustTableColumnNames
(
UpdateRefMode
eUpdateRefMode
,
SCCOL
nDx
,
SCCOL
nCol1
,
void
AdjustTableColumnNames
(
UpdateRefMode
eUpdateRefMode
,
SCCOL
nDx
,
SCCOL
nCol1
,
SCCOL
nOldCol1
,
SCCOL
nOldCol2
,
SCCOL
nNewCol1
,
SCCOL
nNewCol2
);
SCCOL
nOldCol1
,
SCCOL
nOldCol2
,
SCCOL
nNewCol1
,
SCCOL
nNewCol2
);
void
InvalidateTableColumnNames
();
void
InvalidateTableColumnNames
(
bool
bSwapToEmptyNames
);
};
};
class
SC_DLLPUBLIC
ScDBCollection
class
SC_DLLPUBLIC
ScDBCollection
...
...
sc/source/core/tool/dbdata.cxx
Dosyayı görüntüle @
fff1c3e3
...
@@ -185,11 +185,7 @@ ScDBData& ScDBData::operator= (const ScDBData& rData)
...
@@ -185,11 +185,7 @@ ScDBData& ScDBData::operator= (const ScDBData& rData)
bAutoFilter
=
rData
.
bAutoFilter
;
bAutoFilter
=
rData
.
bAutoFilter
;
if
(
bHeaderRangeDiffers
)
if
(
bHeaderRangeDiffers
)
{
InvalidateTableColumnNames
(
true
);
if
(
!
maTableColumnNames
.
empty
())
::
std
::
vector
<
OUString
>
().
swap
(
maTableColumnNames
);
InvalidateTableColumnNames
();
}
else
else
{
{
maTableColumnNames
=
rData
.
maTableColumnNames
;
maTableColumnNames
=
rData
.
maTableColumnNames
;
...
@@ -320,15 +316,7 @@ void ScDBData::SetArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW
...
@@ -320,15 +316,7 @@ void ScDBData::SetArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW
{
{
bool
bHeaderRangeChange
=
(
nTab
!=
nTable
||
nCol1
!=
nStartCol
||
nCol2
!=
nEndCol
||
nRow1
!=
nStartRow
);
bool
bHeaderRangeChange
=
(
nTab
!=
nTable
||
nCol1
!=
nStartCol
||
nCol2
!=
nEndCol
||
nRow1
!=
nStartRow
);
if
(
bHeaderRangeChange
)
if
(
bHeaderRangeChange
)
{
EndTableColumnNamesListener
();
EndTableColumnNamesListener
();
if
(
!
maTableColumnNames
.
empty
())
{
SAL_WARN
(
"sc.core"
,
"ScDBData::SetArea - invalidating column names/offsets"
);
::
std
::
vector
<
OUString
>
().
swap
(
maTableColumnNames
);
InvalidateTableColumnNames
();
}
}
nTable
=
nTab
;
nTable
=
nTab
;
nStartCol
=
nCol1
;
nStartCol
=
nCol1
;
...
@@ -337,7 +325,13 @@ void ScDBData::SetArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW
...
@@ -337,7 +325,13 @@ void ScDBData::SetArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW
nEndRow
=
nRow2
;
nEndRow
=
nRow2
;
if
(
bHeaderRangeChange
)
if
(
bHeaderRangeChange
)
{
SAL_WARN_IF
(
!
maTableColumnNames
.
empty
(),
"sc.core"
,
"ScDBData::SetArea - invalidating column names/offsets"
);
// Invalidate *after* new area has been set above to add the proper
// header range to dirty list.
InvalidateTableColumnNames
(
true
);
StartTableColumnNamesListener
();
StartTableColumnNamesListener
();
}
}
}
void
ScDBData
::
MoveTo
(
SCTAB
nTab
,
SCCOL
nCol1
,
SCROW
nRow1
,
SCCOL
nCol2
,
SCROW
nRow2
)
void
ScDBData
::
MoveTo
(
SCTAB
nTab
,
SCCOL
nCol1
,
SCROW
nRow1
,
SCCOL
nCol2
,
SCROW
nRow2
)
...
@@ -632,12 +626,8 @@ void ScDBData::ExtendDataArea(ScDocument* pDoc)
...
@@ -632,12 +626,8 @@ void ScDBData::ExtendDataArea(ScDocument* pDoc)
pDoc
->
GetDataArea
(
nTable
,
nStartCol
,
nStartRow
,
nEndCol
,
nEndRow
,
false
,
true
);
pDoc
->
GetDataArea
(
nTable
,
nStartCol
,
nStartRow
,
nEndCol
,
nEndRow
,
false
,
true
);
if
(
nStartCol
!=
nOldCol1
||
nEndCol
!=
nOldCol2
)
if
(
nStartCol
!=
nOldCol1
||
nEndCol
!=
nOldCol2
)
{
{
if
(
!
maTableColumnNames
.
empty
())
SAL_WARN_IF
(
!
maTableColumnNames
.
empty
(),
"sc.core"
,
"ScDBData::ExtendDataArea - invalidating column names/offsets"
);
{
InvalidateTableColumnNames
(
true
);
SAL_WARN
(
"sc.core"
,
"ScDBData::ExtendDataArea - invalidating column names/offsets"
);
::
std
::
vector
<
OUString
>
().
swap
(
maTableColumnNames
);
InvalidateTableColumnNames
();
}
}
}
}
}
...
@@ -709,12 +699,14 @@ void ScDBData::AdjustTableColumnNames( UpdateRefMode eUpdateRefMode, SCCOL nDx,
...
@@ -709,12 +699,14 @@ void ScDBData::AdjustTableColumnNames( UpdateRefMode eUpdateRefMode, SCCOL nDx,
if
(
maTableColumnNames
.
empty
())
if
(
maTableColumnNames
.
empty
())
mbTableColumnNamesDirty
=
true
;
mbTableColumnNamesDirty
=
true
;
if
(
mbTableColumnNamesDirty
)
if
(
mbTableColumnNamesDirty
)
InvalidateTableColumnNames
(
);
InvalidateTableColumnNames
(
false
);
// preserve new column names array
}
}
void
ScDBData
::
InvalidateTableColumnNames
()
void
ScDBData
::
InvalidateTableColumnNames
(
bool
bSwapToEmptyNames
)
{
{
mbTableColumnNamesDirty
=
true
;
mbTableColumnNamesDirty
=
true
;
if
(
bSwapToEmptyNames
&&
!
maTableColumnNames
.
empty
())
::
std
::
vector
<
OUString
>
().
swap
(
maTableColumnNames
);
if
(
mpContainer
)
if
(
mpContainer
)
{
{
// Add header range to dirty list.
// Add header range to dirty list.
...
...
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