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
21087baf
Kaydet (Commit)
21087baf
authored
Mar 09, 2015
tarafından
Tomaž Vajngerl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
GridWindow: use unique_ptr for filter box and float
Change-Id: Iaf203682e6d3b18d8b25c6ee2755710615fe5f08
üst
6a2f0cec
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
85 additions
and
81 deletions
+85
-81
gridwin.hxx
sc/source/ui/inc/gridwin.hxx
+2
-2
gridwin.cxx
sc/source/ui/view/gridwin.cxx
+83
-79
No files found.
sc/source/ui/inc/gridwin.hxx
Dosyayı görüntüle @
21087baf
...
@@ -137,8 +137,8 @@ class ScGridWindow : public vcl::Window, public DropTargetHelper, public DragSou
...
@@ -137,8 +137,8 @@ class ScGridWindow : public vcl::Window, public DropTargetHelper, public DragSou
ScNoteMarker
*
pNoteMarker
;
ScNoteMarker
*
pNoteMarker
;
ScFilterListBox
*
pFilterBox
;
std
::
unique_ptr
<
ScFilterListBox
>
m
pFilterBox
;
FloatingWindow
*
pFilterFloat
;
std
::
unique_ptr
<
FloatingWindow
>
m
pFilterFloat
;
boost
::
scoped_ptr
<
ScCheckListMenuWindow
>
mpAutoFilterPopup
;
boost
::
scoped_ptr
<
ScCheckListMenuWindow
>
mpAutoFilterPopup
;
boost
::
scoped_ptr
<
ScCheckListMenuWindow
>
mpDPFieldPopup
;
boost
::
scoped_ptr
<
ScCheckListMenuWindow
>
mpDPFieldPopup
;
boost
::
scoped_ptr
<
ScDPFieldButton
>
mpFilterButton
;
boost
::
scoped_ptr
<
ScDPFieldButton
>
mpFilterButton
;
...
...
sc/source/ui/view/gridwin.cxx
Dosyayı görüntüle @
21087baf
...
@@ -441,8 +441,8 @@ ScGridWindow::ScGridWindow( vcl::Window* pParent, ScViewData* pData, ScSplitPos
...
@@ -441,8 +441,8 @@ ScGridWindow::ScGridWindow( vcl::Window* pParent, ScViewData* pData, ScSplitPos
pViewData
(
pData
),
pViewData
(
pData
),
eWhich
(
eWhichPos
),
eWhich
(
eWhichPos
),
pNoteMarker
(
NULL
),
pNoteMarker
(
NULL
),
pFilterBox
(
NULL
),
mpFilterBox
(
),
pFilterFloat
(
NULL
),
mpFilterFloat
(
),
mpAutoFilterPopup
(
NULL
),
mpAutoFilterPopup
(
NULL
),
mpDPFieldPopup
(
NULL
),
mpDPFieldPopup
(
NULL
),
mpFilterButton
(
NULL
),
mpFilterButton
(
NULL
),
...
@@ -523,8 +523,6 @@ ScGridWindow::~ScGridWindow()
...
@@ -523,8 +523,6 @@ ScGridWindow::~ScGridWindow()
// #114409#
// #114409#
ImpDestroyOverlayObjects
();
ImpDestroyOverlayObjects
();
delete
pFilterBox
;
delete
pFilterFloat
;
delete
pNoteMarker
;
delete
pNoteMarker
;
}
}
...
@@ -535,13 +533,12 @@ void ScGridWindow::ClickExtern()
...
@@ -535,13 +533,12 @@ void ScGridWindow::ClickExtern()
// #i81298# don't delete the filter box when called from its select handler
// #i81298# don't delete the filter box when called from its select handler
// (possible through row header size update)
// (possible through row header size update)
// #i84277# when initializing the filter box, a Basic error can deactivate the view
// #i84277# when initializing the filter box, a Basic error can deactivate the view
if
(
pFilterBox
&&
(
pFilterBox
->
IsInSelect
()
||
pFilterBox
->
IsInInit
()
)
)
if
(
mpFilterBox
&&
(
mpFilterBox
->
IsInSelect
()
||
mpFilterBox
->
IsInInit
())
)
{
{
break
;
break
;
}
}
mpFilterBox
.
reset
();
DELETEZ
(
pFilterBox
);
mpFilterFloat
.
reset
();
DELETEZ
(
pFilterFloat
);
}
}
while
(
false
);
while
(
false
);
...
@@ -554,8 +551,8 @@ void ScGridWindow::ClickExtern()
...
@@ -554,8 +551,8 @@ void ScGridWindow::ClickExtern()
IMPL_LINK_NOARG
(
ScGridWindow
,
PopupModeEndHdl
)
IMPL_LINK_NOARG
(
ScGridWindow
,
PopupModeEndHdl
)
{
{
if
(
pFilterBox
)
if
(
m
pFilterBox
)
pFilterBox
->
SetCancelled
();
// nicht mehr auswaehlen
m
pFilterBox
->
SetCancelled
();
// nicht mehr auswaehlen
GrabFocus
();
GrabFocus
();
return
0
;
return
0
;
}
}
...
@@ -938,8 +935,8 @@ void ScGridWindow::LaunchDPFieldMenu( SCCOL nCol, SCROW nRow )
...
@@ -938,8 +935,8 @@ void ScGridWindow::LaunchDPFieldMenu( SCCOL nCol, SCROW nRow )
void
ScGridWindow
::
DoScenarioMenu
(
const
ScRange
&
rScenRange
)
void
ScGridWindow
::
DoScenarioMenu
(
const
ScRange
&
rScenRange
)
{
{
delete
pFilterBox
;
mpFilterBox
.
reset
()
;
delete
pFilterFloat
;
mpFilterFloat
.
reset
()
;
SCCOL
nCol
=
rScenRange
.
aEnd
.
Col
();
// Zelle unterhalb des Buttons
SCCOL
nCol
=
rScenRange
.
aEnd
.
Col
();
// Zelle unterhalb des Buttons
SCROW
nRow
=
rScenRange
.
aStart
.
Row
();
SCROW
nRow
=
rScenRange
.
aStart
.
Row
();
...
@@ -969,17 +966,19 @@ void ScGridWindow::DoScenarioMenu( const ScRange& rScenRange )
...
@@ -969,17 +966,19 @@ void ScGridWindow::DoScenarioMenu( const ScRange& rScenRange )
// Die ListBox direkt unter der schwarzen Linie auf dem Zellgitter
// Die ListBox direkt unter der schwarzen Linie auf dem Zellgitter
// (wenn die Linie verdeckt wird, sieht es komisch aus...)
// (wenn die Linie verdeckt wird, sieht es komisch aus...)
pFilterFloat
=
new
ScFilterFloatingWindow
(
this
,
WinBits
(
WB_BORDER
)
);
// nicht resizable etc.
mpFilterFloat
.
reset
(
new
ScFilterFloatingWindow
(
this
,
WinBits
(
WB_BORDER
)));
pFilterFloat
->
SetPopupModeEndHdl
(
LINK
(
this
,
ScGridWindow
,
PopupModeEndHdl
)
);
m
pFilterFloat
->
SetPopupModeEndHdl
(
LINK
(
this
,
ScGridWindow
,
PopupModeEndHdl
)
);
pFilterBox
=
new
ScFilterListBox
(
pFilterFloat
,
this
,
nCol
,
nRow
,
SC_FILTERBOX_SCENARIO
);
mpFilterBox
.
reset
(
new
ScFilterListBox
(
mpFilterFloat
.
get
(),
this
,
nCol
,
nRow
,
SC_FILTERBOX_SCENARIO
)
);
if
(
bLayoutRTL
)
if
(
bLayoutRTL
)
pFilterBox
->
EnableMirroring
();
m
pFilterBox
->
EnableMirroring
();
nSizeX
+=
1
;
nSizeX
+=
1
;
{
{
vcl
::
Font
aOldFont
=
GetFont
();
SetFont
(
pFilterBox
->
GetFont
()
);
vcl
::
Font
aOldFont
=
GetFont
();
MapMode
aOldMode
=
GetMapMode
();
SetMapMode
(
MAP_PIXEL
);
SetFont
(
mpFilterBox
->
GetFont
());
MapMode
aOldMode
=
GetMapMode
();
SetMapMode
(
MAP_PIXEL
);
nHeight
=
GetTextHeight
();
nHeight
=
GetTextHeight
();
nHeight
*=
SC_FILTERLISTBOX_LINES
;
nHeight
*=
SC_FILTERLISTBOX_LINES
;
...
@@ -992,9 +991,9 @@ void ScGridWindow::DoScenarioMenu( const ScRange& rScenRange )
...
@@ -992,9 +991,9 @@ void ScGridWindow::DoScenarioMenu( const ScRange& rScenRange )
// ParentSize Abfrage fehlt
// ParentSize Abfrage fehlt
Size
aSize
(
nSizeX
,
nHeight
);
Size
aSize
(
nSizeX
,
nHeight
);
pFilterBox
->
SetSizePixel
(
aSize
);
m
pFilterBox
->
SetSizePixel
(
aSize
);
pFilterBox
->
Show
();
// Show muss vor SetUpdateMode kommen !!!
m
pFilterBox
->
Show
();
// Show muss vor SetUpdateMode kommen !!!
pFilterBox
->
SetUpdateMode
(
false
);
m
pFilterBox
->
SetUpdateMode
(
false
);
// SetOutputSizePixel/StartPopupMode erst unten, wenn die Groesse feststeht
// SetOutputSizePixel/StartPopupMode erst unten, wenn die Groesse feststeht
...
@@ -1010,10 +1009,10 @@ void ScGridWindow::DoScenarioMenu( const ScRange& rScenRange )
...
@@ -1010,10 +1009,10 @@ void ScGridWindow::DoScenarioMenu( const ScRange& rScenRange )
if
(
pDoc
->
HasScenarioRange
(
i
,
rScenRange
))
if
(
pDoc
->
HasScenarioRange
(
i
,
rScenRange
))
if
(
pDoc
->
GetName
(
i
,
aTabName
))
if
(
pDoc
->
GetName
(
i
,
aTabName
))
{
{
pFilterBox
->
InsertEntry
(
aTabName
);
mpFilterBox
->
InsertEntry
(
aTabName
);
if
(
pDoc
->
IsActiveScenario
(
i
))
if
(
pDoc
->
IsActiveScenario
(
i
))
aCurrent
=
aTabName
;
aCurrent
=
aTabName
;
long
nTextWidth
=
pFilterBox
->
GetTextWidth
(
aTabName
);
long
nTextWidth
=
mpFilterBox
->
GetTextWidth
(
aTabName
);
if
(
nTextWidth
>
nMaxText
)
if
(
nTextWidth
>
nMaxText
)
nMaxText
=
nTextWidth
;
nMaxText
=
nTextWidth
;
++
nEntryCount
;
++
nEntryCount
;
...
@@ -1029,8 +1028,8 @@ void ScGridWindow::DoScenarioMenu( const ScRange& rScenRange )
...
@@ -1029,8 +1028,8 @@ void ScGridWindow::DoScenarioMenu( const ScRange& rScenRange )
{
{
long
nDiff
=
nMaxText
-
nSizeX
;
long
nDiff
=
nMaxText
-
nSizeX
;
aSize
=
Size
(
nMaxText
,
nHeight
);
aSize
=
Size
(
nMaxText
,
nHeight
);
pFilterBox
->
SetSizePixel
(
aSize
);
mpFilterBox
->
SetSizePixel
(
aSize
);
pFilterFloat
->
SetOutputSizePixel
(
aSize
);
mpFilterFloat
->
SetOutputSizePixel
(
aSize
);
if
(
!
bLayoutRTL
)
if
(
!
bLayoutRTL
)
{
{
...
@@ -1042,23 +1041,26 @@ void ScGridWindow::DoScenarioMenu( const ScRange& rScenRange )
...
@@ -1042,23 +1041,26 @@ void ScGridWindow::DoScenarioMenu( const ScRange& rScenRange )
}
}
}
}
pFilterFloat
->
SetOutputSizePixel
(
aSize
);
m
pFilterFloat
->
SetOutputSizePixel
(
aSize
);
pFilterFloat
->
StartPopupMode
(
aCellRect
,
FLOATWIN_POPUPMODE_DOWN
|
FLOATWIN_POPUPMODE_GRABFOCUS
);
m
pFilterFloat
->
StartPopupMode
(
aCellRect
,
FLOATWIN_POPUPMODE_DOWN
|
FLOATWIN_POPUPMODE_GRABFOCUS
);
pFilterBox
->
SetUpdateMode
(
true
);
m
pFilterBox
->
SetUpdateMode
(
true
);
pFilterBox
->
GrabFocus
();
m
pFilterBox
->
GrabFocus
();
sal_Int32
nPos
=
LISTBOX_ENTRY_NOTFOUND
;
sal_Int32
nPos
=
LISTBOX_ENTRY_NOTFOUND
;
if
(
!
aCurrent
.
isEmpty
())
if
(
!
aCurrent
.
isEmpty
())
{
{
nPos
=
pFilterBox
->
GetEntryPos
(
aCurrent
);
nPos
=
m
pFilterBox
->
GetEntryPos
(
aCurrent
);
}
}
if
(
LISTBOX_ENTRY_NOTFOUND
==
nPos
&&
pFilterBox
->
GetEntryCount
()
>
0
)
if
(
LISTBOX_ENTRY_NOTFOUND
==
nPos
&&
mpFilterBox
->
GetEntryCount
()
>
0
)
{
nPos
=
0
;
nPos
=
0
;
}
if
(
LISTBOX_ENTRY_NOTFOUND
!=
nPos
)
if
(
LISTBOX_ENTRY_NOTFOUND
!=
nPos
)
pFilterBox
->
SelectEntryPos
(
nPos
);
{
mpFilterBox
->
SelectEntryPos
(
nPos
);
pFilterBox
->
EndInit
();
}
mpFilterBox
->
EndInit
();
// Szenario-Auswahl kommt aus MouseButtonDown:
// Szenario-Auswahl kommt aus MouseButtonDown:
// der naechste MouseMove auf die Filterbox ist wie ein ButtonDown
// der naechste MouseMove auf die Filterbox ist wie ein ButtonDown
...
@@ -1069,8 +1071,8 @@ void ScGridWindow::DoScenarioMenu( const ScRange& rScenRange )
...
@@ -1069,8 +1071,8 @@ void ScGridWindow::DoScenarioMenu( const ScRange& rScenRange )
void
ScGridWindow
::
LaunchDataSelectMenu
(
SCCOL
nCol
,
SCROW
nRow
,
bool
bDataSelect
)
void
ScGridWindow
::
LaunchDataSelectMenu
(
SCCOL
nCol
,
SCROW
nRow
,
bool
bDataSelect
)
{
{
delete
pFilterBox
;
mpFilterBox
.
reset
()
;
delete
pFilterFloat
;
mpFilterFloat
.
reset
()
;
sal_uInt16
i
;
sal_uInt16
i
;
ScDocument
*
pDoc
=
pViewData
->
GetDocument
();
ScDocument
*
pDoc
=
pViewData
->
GetDocument
();
...
@@ -1090,19 +1092,21 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow, bool bDataSelec
...
@@ -1090,19 +1092,21 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow, bool bDataSelec
aPos
.
X
()
-=
1
;
aPos
.
X
()
-=
1
;
aPos
.
Y
()
+=
nSizeY
-
1
;
aPos
.
Y
()
+=
nSizeY
-
1
;
pFilterFloat
=
new
ScFilterFloatingWindow
(
this
,
WinBits
(
WB_BORDER
)
);
// nicht resizable etc.
mpFilterFloat
.
reset
(
new
ScFilterFloatingWindow
(
this
,
WinBits
(
WB_BORDER
)));
pFilterFloat
->
SetPopupModeEndHdl
(
LINK
(
this
,
ScGridWindow
,
PopupModeEndHdl
)
);
mpFilterFloat
->
SetPopupModeEndHdl
(
LINK
(
this
,
ScGridWindow
,
PopupModeEndHdl
)
);
pFilterBox
=
new
ScFilterListBox
(
ScFilterBoxMode
eFilterMode
=
bDataSelect
?
SC_FILTERBOX_DATASELECT
:
SC_FILTERBOX_FILTER
;
pFilterFloat
,
this
,
nCol
,
nRow
,
bDataSelect
?
SC_FILTERBOX_DATASELECT
:
SC_FILTERBOX_FILTER
);
mpFilterBox
.
reset
(
new
ScFilterListBox
(
mpFilterFloat
.
get
(),
this
,
nCol
,
nRow
,
eFilterMode
)
);
// Fix for bug fdo#44925
// Fix for bug fdo#44925
if
(
Application
::
GetSettings
().
GetLayoutRTL
()
!=
bLayoutRTL
)
if
(
Application
::
GetSettings
().
GetLayoutRTL
()
!=
bLayoutRTL
)
pFilterBox
->
EnableMirroring
();
m
pFilterBox
->
EnableMirroring
();
nSizeX
+=
1
;
nSizeX
+=
1
;
{
{
vcl
::
Font
aOldFont
=
GetFont
();
SetFont
(
pFilterBox
->
GetFont
()
);
vcl
::
Font
aOldFont
=
GetFont
();
MapMode
aOldMode
=
GetMapMode
();
SetMapMode
(
MAP_PIXEL
);
SetFont
(
mpFilterBox
->
GetFont
());
MapMode
aOldMode
=
GetMapMode
();
SetMapMode
(
MAP_PIXEL
);
nHeight
=
GetTextHeight
();
nHeight
=
GetTextHeight
();
nHeight
*=
SC_FILTERLISTBOX_LINES
;
nHeight
*=
SC_FILTERLISTBOX_LINES
;
...
@@ -1126,7 +1130,7 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow, bool bDataSelec
...
@@ -1126,7 +1130,7 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow, bool bDataSelec
{
{
//! wird der Titel ueberhaupt ausgewertet ???
//! wird der Titel ueberhaupt ausgewertet ???
OUString
aString
=
pDoc
->
GetString
(
nCol
,
nRow
,
nTab
);
OUString
aString
=
pDoc
->
GetString
(
nCol
,
nRow
,
nTab
);
pFilterBox
->
SetText
(
aString
);
mpFilterBox
->
SetText
(
aString
);
long
nMaxText
=
0
;
long
nMaxText
=
0
;
...
@@ -1136,17 +1140,17 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow, bool bDataSelec
...
@@ -1136,17 +1140,17 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow, bool bDataSelec
for
(
i
=
0
;
i
<
nDefCount
;
i
++
)
for
(
i
=
0
;
i
<
nDefCount
;
i
++
)
{
{
OUString
aEntry
(
static_cast
<
ScResId
>
(
nDefIDs
[
i
])
);
OUString
aEntry
(
static_cast
<
ScResId
>
(
nDefIDs
[
i
])
);
pFilterBox
->
InsertEntry
(
aEntry
);
mpFilterBox
->
InsertEntry
(
aEntry
);
long
nTextWidth
=
pFilterBox
->
GetTextWidth
(
aEntry
);
long
nTextWidth
=
mpFilterBox
->
GetTextWidth
(
aEntry
);
if
(
nTextWidth
>
nMaxText
)
if
(
nTextWidth
>
nMaxText
)
nMaxText
=
nTextWidth
;
nMaxText
=
nTextWidth
;
}
}
pFilterBox
->
SetSeparatorPos
(
nDefCount
-
1
);
mpFilterBox
->
SetSeparatorPos
(
nDefCount
-
1
);
// get list entries
// get list entries
bool
bHasDates
=
false
;
bool
bHasDates
=
false
;
pDoc
->
GetFilterEntries
(
nCol
,
nRow
,
nTab
,
true
,
aStrings
,
bHasDates
);
pDoc
->
GetFilterEntries
(
nCol
,
nRow
,
nTab
,
true
,
aStrings
,
bHasDates
);
pFilterBox
->
SetListHasDates
(
bHasDates
);
m
pFilterBox
->
SetListHasDates
(
bHasDates
);
// check widths of numerical entries (string entries are not included)
// check widths of numerical entries (string entries are not included)
// so all numbers are completely visible
// so all numbers are completely visible
...
@@ -1155,7 +1159,7 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow, bool bDataSelec
...
@@ -1155,7 +1159,7 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow, bool bDataSelec
{
{
if
(
!
it
->
IsStrData
())
// only numerical entries
if
(
!
it
->
IsStrData
())
// only numerical entries
{
{
long
nTextWidth
=
pFilterBox
->
GetTextWidth
(
it
->
GetString
());
long
nTextWidth
=
m
pFilterBox
->
GetTextWidth
(
it
->
GetString
());
if
(
nTextWidth
>
nMaxText
)
if
(
nTextWidth
>
nMaxText
)
nMaxText
=
nTextWidth
;
nMaxText
=
nTextWidth
;
}
}
...
@@ -1185,12 +1189,12 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow, bool bDataSelec
...
@@ -1185,12 +1189,12 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow, bool bDataSelec
if
(
aPos
.
Y
()
+
aSize
.
Height
()
>
aParentSize
.
Height
()
)
if
(
aPos
.
Y
()
+
aSize
.
Height
()
>
aParentSize
.
Height
()
)
aPos
.
Y
()
=
aParentSize
.
Height
()
-
aSize
.
Height
();
aPos
.
Y
()
=
aParentSize
.
Height
()
-
aSize
.
Height
();
pFilterBox
->
SetSizePixel
(
aSize
);
mpFilterBox
->
SetSizePixel
(
aSize
);
pFilterBox
->
Show
();
// Show muss vor SetUpdateMode kommen !!!
m
pFilterBox
->
Show
();
// Show muss vor SetUpdateMode kommen !!!
pFilterBox
->
SetUpdateMode
(
false
);
m
pFilterBox
->
SetUpdateMode
(
false
);
pFilterFloat
->
SetOutputSizePixel
(
aSize
);
mpFilterFloat
->
SetOutputSizePixel
(
aSize
);
pFilterFloat
->
StartPopupMode
(
aCellRect
,
FLOATWIN_POPUPMODE_DOWN
|
FLOATWIN_POPUPMODE_GRABFOCUS
);
mpFilterFloat
->
StartPopupMode
(
aCellRect
,
FLOATWIN_POPUPMODE_DOWN
|
FLOATWIN_POPUPMODE_GRABFOCUS
);
// Listbox fuellen
// Listbox fuellen
bool
bWait
=
aStrings
.
size
()
>
100
;
bool
bWait
=
aStrings
.
size
()
>
100
;
...
@@ -1200,12 +1204,12 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow, bool bDataSelec
...
@@ -1200,12 +1204,12 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow, bool bDataSelec
std
::
vector
<
ScTypedStrData
>::
const_iterator
it
=
aStrings
.
begin
(),
itEnd
=
aStrings
.
end
();
std
::
vector
<
ScTypedStrData
>::
const_iterator
it
=
aStrings
.
begin
(),
itEnd
=
aStrings
.
end
();
for
(;
it
!=
itEnd
;
++
it
)
for
(;
it
!=
itEnd
;
++
it
)
pFilterBox
->
InsertEntry
(
it
->
GetString
());
m
pFilterBox
->
InsertEntry
(
it
->
GetString
());
if
(
bWait
)
if
(
bWait
)
LeaveWait
();
LeaveWait
();
pFilterBox
->
SetUpdateMode
(
true
);
m
pFilterBox
->
SetUpdateMode
(
true
);
}
}
sal_Int32
nSelPos
=
LISTBOX_ENTRY_NOTFOUND
;
sal_Int32
nSelPos
=
LISTBOX_ENTRY_NOTFOUND
;
...
@@ -1236,7 +1240,7 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow, bool bDataSelec
...
@@ -1236,7 +1240,7 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow, bool bDataSelec
{
{
if
(
!
aQueryStr
.
isEmpty
())
if
(
!
aQueryStr
.
isEmpty
())
{
{
nSelPos
=
pFilterBox
->
GetEntryPos
(
aQueryStr
);
nSelPos
=
m
pFilterBox
->
GetEntryPos
(
aQueryStr
);
}
}
}
}
else
if
(
rEntry
.
eOp
==
SC_TOPVAL
&&
aQueryStr
==
"10"
)
else
if
(
rEntry
.
eOp
==
SC_TOPVAL
&&
aQueryStr
==
"10"
)
...
@@ -1296,30 +1300,30 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow, bool bDataSelec
...
@@ -1296,30 +1300,30 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow, bool bDataSelec
}
}
// neu (309): irgendwas muss immer selektiert sein:
// neu (309): irgendwas muss immer selektiert sein:
if
(
LISTBOX_ENTRY_NOTFOUND
==
nSelPos
&&
pFilterBox
->
GetEntryCount
()
>
0
&&
!
bDataSelect
)
if
(
LISTBOX_ENTRY_NOTFOUND
==
nSelPos
&&
m
pFilterBox
->
GetEntryCount
()
>
0
&&
!
bDataSelect
)
nSelPos
=
0
;
nSelPos
=
0
;
// keine leere Auswahl-Liste anzeigen:
// keine leere Auswahl-Liste anzeigen:
if
(
bEmpty
)
if
(
bEmpty
)
{
{
DELETEZ
(
pFilterBox
);
// war nix
mpFilterBox
.
reset
();
DELETEZ
(
pFilterFloat
);
mpFilterFloat
.
reset
(
);
}
}
else
else
{
{
pFilterBox
->
GrabFocus
();
m
pFilterBox
->
GrabFocus
();
// Select erst nach GrabFocus, damit das Focus-Rechteck richtig landet
// Select erst nach GrabFocus, damit das Focus-Rechteck richtig landet
if
(
LISTBOX_ENTRY_NOTFOUND
!=
nSelPos
)
if
(
LISTBOX_ENTRY_NOTFOUND
!=
nSelPos
)
pFilterBox
->
SelectEntryPos
(
nSelPos
);
mpFilterBox
->
SelectEntryPos
(
nSelPos
);
else
else
{
{
if
(
bDataSelect
)
if
(
bDataSelect
)
pFilterBox
->
SetNoSelection
();
m
pFilterBox
->
SetNoSelection
();
}
}
pFilterBox
->
EndInit
();
m
pFilterBox
->
EndInit
();
if
(
!
bDataSelect
)
if
(
!
bDataSelect
)
{
{
...
@@ -1334,20 +1338,20 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow, bool bDataSelec
...
@@ -1334,20 +1338,20 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow, bool bDataSelec
void
ScGridWindow
::
FilterSelect
(
sal_uLong
nSel
)
void
ScGridWindow
::
FilterSelect
(
sal_uLong
nSel
)
{
{
OUString
aString
=
pFilterBox
->
GetEntry
(
static_cast
<
sal_Int32
>
(
nSel
)
);
OUString
aString
=
mpFilterBox
->
GetEntry
(
static_cast
<
sal_Int32
>
(
nSel
)
);
SCCOL
nCol
=
pFilterBox
->
GetCol
();
SCCOL
nCol
=
m
pFilterBox
->
GetCol
();
SCROW
nRow
=
pFilterBox
->
GetRow
();
SCROW
nRow
=
m
pFilterBox
->
GetRow
();
switch
(
pFilterBox
->
GetMode
()
)
switch
(
mpFilterBox
->
GetMode
()
)
{
{
case
SC_FILTERBOX_DATASELECT
:
case
SC_FILTERBOX_DATASELECT
:
ExecDataSelect
(
nCol
,
nRow
,
aString
);
ExecDataSelect
(
nCol
,
nRow
,
aString
);
break
;
break
;
case
SC_FILTERBOX_FILTER
:
case
SC_FILTERBOX_FILTER
:
ExecFilter
(
nSel
,
nCol
,
nRow
,
aString
,
pFilterBox
->
HasDates
()
);
ExecFilter
(
nSel
,
nCol
,
nRow
,
aString
,
mpFilterBox
->
HasDates
()
);
break
;
break
;
case
SC_FILTERBOX_SCENARIO
:
case
SC_FILTERBOX_SCENARIO
:
pViewData
->
GetView
()
->
UseScenario
(
aString
);
pViewData
->
GetView
()
->
UseScenario
(
aString
);
break
;
break
;
case
SC_FILTERBOX_PAGEFIELD
:
case
SC_FILTERBOX_PAGEFIELD
:
// first entry is "all"
// first entry is "all"
...
@@ -1355,8 +1359,8 @@ void ScGridWindow::FilterSelect( sal_uLong nSel )
...
@@ -1355,8 +1359,8 @@ void ScGridWindow::FilterSelect( sal_uLong nSel )
break
;
break
;
}
}
if
(
pFilterFloat
)
if
(
m
pFilterFloat
)
pFilterFloat
->
EndPopupMode
();
m
pFilterFloat
->
EndPopupMode
();
GrabFocus
();
// unter OS/2 stimmt der Focus sonst nicht
GrabFocus
();
// unter OS/2 stimmt der Focus sonst nicht
}
}
...
@@ -2485,15 +2489,15 @@ void ScGridWindow::MouseMove( const MouseEvent& rMEvt )
...
@@ -2485,15 +2489,15 @@ void ScGridWindow::MouseMove( const MouseEvent& rMEvt )
return
;
return
;
}
}
if
(
nMouseStatus
==
SC_GM_FILTER
&&
pFilterBox
)
if
(
nMouseStatus
==
SC_GM_FILTER
&&
m
pFilterBox
)
{
{
Point
aRelPos
=
pFilterBox
->
ScreenToOutputPixel
(
OutputToScreenPixel
(
rMEvt
.
GetPosPixel
()
)
);
Point
aRelPos
=
m
pFilterBox
->
ScreenToOutputPixel
(
OutputToScreenPixel
(
rMEvt
.
GetPosPixel
()
)
);
if
(
Rectangle
(
Point
(),
pFilterBox
->
GetOutputSizePixel
()).
IsInside
(
aRelPos
)
)
if
(
Rectangle
(
Point
(),
m
pFilterBox
->
GetOutputSizePixel
()).
IsInside
(
aRelPos
)
)
{
{
nButtonDown
=
0
;
nButtonDown
=
0
;
nMouseStatus
=
SC_GM_NONE
;
nMouseStatus
=
SC_GM_NONE
;
ReleaseMouse
();
ReleaseMouse
();
pFilterBox
->
MouseButtonDown
(
MouseEvent
(
aRelPos
,
1
,
MouseEventModifiers
::
SIMPLECLICK
,
MOUSE_LEFT
)
);
m
pFilterBox
->
MouseButtonDown
(
MouseEvent
(
aRelPos
,
1
,
MouseEventModifiers
::
SIMPLECLICK
,
MOUSE_LEFT
)
);
return
;
return
;
}
}
}
}
...
@@ -2780,7 +2784,7 @@ void ScGridWindow::Tracking( const TrackingEvent& rTEvt )
...
@@ -2780,7 +2784,7 @@ void ScGridWindow::Tracking( const TrackingEvent& rTEvt )
void
ScGridWindow
::
StartDrag
(
sal_Int8
/* nAction */
,
const
Point
&
rPosPixel
)
void
ScGridWindow
::
StartDrag
(
sal_Int8
/* nAction */
,
const
Point
&
rPosPixel
)
{
{
if
(
pFilterBox
||
nPagebreakMouse
)
if
(
mpFilterBox
||
nPagebreakMouse
)
return
;
return
;
HideNoteMarker
();
HideNoteMarker
();
...
...
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