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
ee34a78b
Kaydet (Commit)
ee34a78b
authored
May 07, 2012
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
use correct content for returned ScDBData, fdo#49531
Change-Id: I Ied7fff3162c98ffdb4b7e57d3c45516b403f9a68
üst
071e5ae9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
38 deletions
+34
-38
tpsort.cxx
sc/source/ui/dbgui/tpsort.cxx
+34
-36
tpsort.hxx
sc/source/ui/inc/tpsort.hxx
+0
-2
No files found.
sc/source/ui/dbgui/tpsort.cxx
Dosyayı görüntüle @
ee34a78b
...
...
@@ -114,7 +114,6 @@ ScTabPageSortFields::ScTabPageSortFields( Window* pParent,
rSortData
(
((
const
ScSortItem
&
)
rArgSet
.
Get
(
nWhichSort
)).
GetSortData
()
),
aNewSortData
(
rSortData
),
nFieldCount
(
0
),
nSortKeyCount
(
DEFSORT
),
nCurrentOffset
(
0
),
...
...
@@ -143,15 +142,6 @@ void ScTabPageSortFields::Init()
OSL_ENSURE
(
pViewData
,
"ViewData not found!"
);
// Create local copy of ScParam
aNewSortData
=
rSortData
;
if
(
pDlg
)
{
const
SfxItemSet
*
pExample
=
pDlg
->
GetExampleSet
();
const
SfxPoolItem
*
pItem
;
if
(
pExample
&&
pExample
->
GetItemState
(
nWhichSort
,
sal_True
,
&
pItem
)
==
SFX_ITEM_SET
)
aNewSortData
=
static_cast
<
const
ScSortItem
*>
(
pItem
)
->
GetSortData
();
}
// Connect handlers and widgets
nFieldArr
.
push_back
(
0
);
...
...
@@ -194,23 +184,23 @@ SfxTabPage* ScTabPageSortFields::Create( Window* pParent,
void
ScTabPageSortFields
::
Reset
(
const
SfxItemSet
&
/* rArgSet */
)
{
bSortByRows
=
aNew
SortData
.
bByRow
;
bHasHeader
=
aNew
SortData
.
bHasHeader
;
bSortByRows
=
r
SortData
.
bByRow
;
bHasHeader
=
r
SortData
.
bHasHeader
;
if
(
aLbSort1
.
GetEntryCount
()
==
0
)
FillFieldLists
(
0
);
// ListBox selection:
if
(
aNew
SortData
.
maKeyState
[
0
].
bDoSort
)
if
(
r
SortData
.
maKeyState
[
0
].
bDoSort
)
{
for
(
sal_uInt16
i
=
0
;
i
<
nSortKeyCount
;
i
++
)
{
if
(
aNew
SortData
.
maKeyState
[
i
].
bDoSort
)
if
(
r
SortData
.
maKeyState
[
i
].
bDoSort
)
{
aLbSortArr
[
i
]
->
SelectEntryPos
(
GetFieldSelPos
(
aNew
SortData
.
maKeyState
[
i
].
nField
)
);
r
SortData
.
maKeyState
[
i
].
nField
)
);
(
aNew
SortData
.
maKeyState
[
i
].
bAscending
)
(
r
SortData
.
maKeyState
[
i
].
bAscending
)
?
aBtnUp
[
i
]
->
Check
()
:
aBtnDown
[
i
]
->
Check
();
}
...
...
@@ -233,12 +223,12 @@ void ScTabPageSortFields::Reset( const SfxItemSet& /* rArgSet */ )
{
SCCOL
nCol
=
pViewData
->
GetCurX
();
if
(
nCol
<
aNew
SortData
.
nCol1
)
nCol
=
aNew
SortData
.
nCol1
;
else
if
(
nCol
>
aNew
SortData
.
nCol2
)
nCol
=
aNew
SortData
.
nCol2
;
if
(
nCol
<
r
SortData
.
nCol1
)
nCol
=
r
SortData
.
nCol1
;
else
if
(
nCol
>
r
SortData
.
nCol2
)
nCol
=
r
SortData
.
nCol2
;
sal_uInt16
nSort1Pos
=
nCol
-
aNew
SortData
.
nCol1
+
1
;
sal_uInt16
nSort1Pos
=
nCol
-
r
SortData
.
nCol1
+
1
;
aLbSortArr
[
0
]
->
SelectEntryPos
(
nSort1Pos
);
for
(
sal_uInt16
i
=
1
;
i
<
nSortKeyCount
;
i
++
)
...
...
@@ -264,6 +254,15 @@ void ScTabPageSortFields::Reset( const SfxItemSet& /* rArgSet */ )
sal_Bool
ScTabPageSortFields
::
FillItemSet
(
SfxItemSet
&
rArgSet
)
{
ScSortParam
aNewSortData
=
rSortData
;
if
(
pDlg
)
{
const
SfxItemSet
*
pExample
=
pDlg
->
GetExampleSet
();
const
SfxPoolItem
*
pItem
;
if
(
pExample
&&
pExample
->
GetItemState
(
nWhichSort
,
sal_True
,
&
pItem
)
==
SFX_ITEM_SET
)
aNewSortData
=
static_cast
<
const
ScSortItem
*>
(
pItem
)
->
GetSortData
();
}
std
::
vector
<
sal_uInt16
>
nSortPos
;
for
(
sal_uInt16
i
=
0
;
i
<
nSortKeyCount
;
i
++
)
...
...
@@ -541,7 +540,6 @@ ScTabPageSortOptions::ScTabPageSortOptions( Window* pParent,
nWhichSort
(
rArgSet
.
GetPool
()
->
GetWhich
(
SID_SORT
)
),
rSortData
(
((
const
ScSortItem
&
)
rArgSet
.
Get
(
nWhichSort
)).
GetSortData
()
),
aNewSortData
(
rSortData
),
pViewData
(
NULL
),
pDoc
(
NULL
),
pDlg
(
(
ScSortDlg
*
)(
GetParent
()
?
GetParent
()
->
GetParent
()
:
0
)
),
...
...
@@ -598,16 +596,6 @@ void ScTabPageSortOptions::Init()
OSL_ENSURE
(
pViewData
,
"ViewData not found! :-/"
);
// Create local copy of ScParam
aNewSortData
=
rSortData
;
if
(
pDlg
)
{
const
SfxItemSet
*
pExample
=
pDlg
->
GetExampleSet
();
const
SfxPoolItem
*
pItem
;
if
(
pExample
&&
pExample
->
GetItemState
(
nWhichSort
,
sal_True
,
&
pItem
)
==
SFX_ITEM_SET
)
aNewSortData
=
static_cast
<
const
ScSortItem
*>
(
pItem
)
->
GetSortData
();
}
if
(
pViewData
&&
pDoc
)
{
...
...
@@ -639,17 +627,17 @@ void ScTabPageSortOptions::Init()
// Check whether the field that is passed on is a database field:
ScAddress
aScAddress
(
aNewSortData
.
nCol1
,
aNew
SortData
.
nRow1
,
nCurTab
);
ScAddress
aScAddress
(
rSortData
.
nCol1
,
r
SortData
.
nRow1
,
nCurTab
);
ScRange
(
aScAddress
,
ScAddress
(
aNewSortData
.
nCol2
,
aNew
SortData
.
nRow2
,
nCurTab
)
ScAddress
(
rSortData
.
nCol2
,
r
SortData
.
nRow2
,
nCurTab
)
).
Format
(
theArea
,
SCR_ABS
,
pDoc
,
eConv
);
if
(
pDBColl
)
{
ScDBData
*
pDBData
=
pDBColl
->
GetDBAtArea
(
nCurTab
,
aNewSortData
.
nCol1
,
aNew
SortData
.
nRow1
,
aNewSortData
.
nCol2
,
aNew
SortData
.
nRow2
);
rSortData
.
nCol1
,
r
SortData
.
nRow1
,
rSortData
.
nCol2
,
r
SortData
.
nRow2
);
if
(
pDBData
)
{
theDbName
=
pDBData
->
GetName
();
...
...
@@ -755,6 +743,16 @@ void ScTabPageSortOptions::Reset( const SfxItemSet& /* rArgSet */ )
sal_Bool
ScTabPageSortOptions
::
FillItemSet
(
SfxItemSet
&
rArgSet
)
{
// Create local copy of ScParam
ScSortParam
aNewSortData
=
rSortData
;
if
(
pDlg
)
{
const
SfxItemSet
*
pExample
=
pDlg
->
GetExampleSet
();
const
SfxPoolItem
*
pItem
;
if
(
pExample
&&
pExample
->
GetItemState
(
nWhichSort
,
sal_True
,
&
pItem
)
==
SFX_ITEM_SET
)
aNewSortData
=
static_cast
<
const
ScSortItem
*>
(
pItem
)
->
GetSortData
();
}
aNewSortData
.
bByRow
=
aBtnTopDown
.
IsChecked
();
aNewSortData
.
bHasHeader
=
aBtnHeader
.
IsChecked
();
aNewSortData
.
bCaseSens
=
aBtnCase
.
IsChecked
();
...
...
sc/source/ui/inc/tpsort.hxx
Dosyayı görüntüle @
ee34a78b
...
...
@@ -99,7 +99,6 @@ private:
ScSortDlg
*
pDlg
;
ScViewData
*
pViewData
;
const
ScSortParam
&
rSortData
;
ScSortParam
aNewSortData
;
std
::
vector
<
SCCOLROW
>
nFieldArr
;
sal_uInt16
nFieldCount
;
sal_uInt16
nSortKeyCount
;
...
...
@@ -188,7 +187,6 @@ private:
const
sal_uInt16
nWhichSort
;
const
ScSortParam
&
rSortData
;
ScSortParam
aNewSortData
;
ScViewData
*
pViewData
;
ScDocument
*
pDoc
;
ScSortDlg
*
pDlg
;
...
...
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