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
7e056939
Kaydet (Commit)
7e056939
authored
Nis 08, 2015
tarafından
Jan Holesovsky
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sc tiled editing: Double click in the cell selects the entire cell.
Change-Id: Ib537d5e4a0c7c9ed6a6b2520512d32da6c651188
üst
9c0788f5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
23 deletions
+51
-23
gridwin.cxx
sc/source/ui/view/gridwin.cxx
+51
-23
No files found.
sc/source/ui/view/gridwin.cxx
Dosyayı görüntüle @
7e056939
...
...
@@ -1694,6 +1694,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt, MouseEventSta
bool
bFormulaMode
=
pScMod
->
IsFormulaMode
();
// naechster Klick -> Referenz
bool
bEditMode
=
pViewData
->
HasEditView
(
eWhich
);
// auch bei Mode==SC_INPUT_TYPE
bool
bDouble
=
(
rMEvt
.
GetClicks
()
==
2
);
bool
bIsTiledRendering
=
pViewData
->
GetDocument
()
->
GetDrawLayer
()
->
isTiledRendering
();
// DeactivateIP passiert nur noch bei MarkListHasChanged
...
...
@@ -1703,6 +1704,36 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt, MouseEventSta
if
(
!
nButtonDown
||
!
bDouble
)
// single (first) click is always valid
nButtonDown
=
rMEvt
.
GetButtons
();
// set nButtonDown first, so StopMarking works
// special handling of empty cells with tiled rendering - with double
// click, the entire cell is selected
if
(
bIsTiledRendering
&&
bDouble
)
{
Point
aPos
=
rMEvt
.
GetPosPixel
();
SCsCOL
nPosX
;
SCsROW
nPosY
;
SCTAB
nTab
=
pViewData
->
GetTabNo
();
pViewData
->
GetPosFromPixel
(
aPos
.
X
(),
aPos
.
Y
(),
eWhich
,
nPosX
,
nPosY
);
ScRefCellValue
aCell
;
aCell
.
assign
(
*
pViewData
->
GetDocument
(),
ScAddress
(
nPosX
,
nPosY
,
nTab
));
if
(
aCell
.
isEmpty
())
{
// stop editing
ScTabViewShell
*
pViewShell
=
pViewData
->
GetViewShell
();
pViewShell
->
UpdateInputLine
();
pViewShell
->
UpdateInputHandler
();
// select the given cell
ScTabView
*
pTabView
=
pViewData
->
GetView
();
pTabView
->
SetCursor
(
nPosX
,
nPosY
);
pTabView
->
DoneBlockMode
();
pTabView
->
InitBlockMode
(
nPosX
,
nPosY
,
nTab
,
true
);
pTabView
->
MarkCursor
(
nPosX
,
nPosY
,
nTab
);
pTabView
->
SelectionChanged
();
return
;
}
}
if
(
(
bEditMode
&&
pViewData
->
GetActivePart
()
==
eWhich
)
||
!
bFormulaMode
)
GrabFocus
();
...
...
@@ -1825,7 +1856,9 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt, MouseEventSta
}
}
if
(
!
bFormulaMode
&&
!
bEditMode
&&
rMEvt
.
IsLeft
())
// in the tiled rendering case, single clicks into drawing objects take
// precedence over bEditMode
if
(((
!
bFormulaMode
&&
!
bEditMode
)
||
bIsTiledRendering
)
&&
rMEvt
.
IsLeft
())
{
if
(
!
bCrossPointer
&&
DrawMouseButtonDown
(
rMEvt
)
)
{
...
...
@@ -1837,17 +1870,6 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt, MouseEventSta
// TestMouse schon oben passiert
}
// In the tiled rendering case, select shapes
if
(
rMEvt
.
IsLeft
()
&&
pViewData
->
GetDocument
()
->
GetDrawLayer
()
->
isTiledRendering
())
{
if
(
!
bCrossPointer
&&
DrawMouseButtonDown
(
rMEvt
)
)
{
return
;
}
pViewData
->
GetViewShell
()
->
SetDrawShell
(
false
);
}
Point
aPos
=
rMEvt
.
GetPosPixel
();
SCsCOL
nPosX
;
SCsROW
nPosY
;
...
...
@@ -1927,10 +1949,6 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt, MouseEventSta
}
else
nMouseStatus
=
SC_GM_TABDOWN
;
// In the tiled rendering case, fake mouse status to double click
if
(
nMouseStatus
==
SC_GM_TABDOWN
&&
pDoc
->
GetDrawLayer
()
->
isTiledRendering
()
)
nMouseStatus
=
SC_GM_DBLDOWN
;
}
// Links in Edit-Zellen
...
...
@@ -2215,9 +2233,12 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
pView
->
ResetBrushDocument
();
// invalidates pBrushDoc pointer
}
// In the tiled rendering case, change double click to single click (only left button)
bool
bDouble
=
(
pDoc
->
GetDrawLayer
()
->
isTiledRendering
()
&&
rMEvt
.
IsLeft
()
)
||
(
rMEvt
.
GetClicks
()
==
2
&&
rMEvt
.
IsLeft
()
);
if
(
bDouble
&&
!
bRefMode
&&
nMouseStatus
==
SC_GM_DBLDOWN
&&
!
pScMod
->
IsRefDialogOpen
()
)
// double click (only left button)
// in the tiled rendering case, single click works this way too
bool
bIsTiledRendering
=
pViewData
->
GetDocument
()
->
GetDrawLayer
()
->
isTiledRendering
();
bool
bDouble
=
(
rMEvt
.
GetClicks
()
==
2
&&
rMEvt
.
IsLeft
()
);
if
((
bDouble
||
bIsTiledRendering
)
&&
!
bRefMode
&&
(
nMouseStatus
==
SC_GM_DBLDOWN
||
bIsTiledRendering
)
&&
!
pScMod
->
IsRefDialogOpen
())
{
// data pilot table
Point
aPos
=
rMEvt
.
GetPosPixel
();
...
...
@@ -2282,6 +2303,16 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
if
(
bEditAllowed
)
{
// don't forward the event to an empty cell, causes deselection in
// case we used the double-click to select the empty cell
if
(
bIsTiledRendering
)
{
ScRefCellValue
aCell
;
aCell
.
assign
(
*
pViewData
->
GetDocument
(),
ScAddress
(
nPosX
,
nPosY
,
nTab
));
if
(
aCell
.
isEmpty
())
return
;
}
// edit cell contents
pViewData
->
GetViewShell
()
->
UpdateInputHandler
();
pScMod
->
SetInputMode
(
SC_INPUT_TABLE
);
...
...
@@ -2765,10 +2796,7 @@ void ScGridWindow::Tracking( const TrackingEvent& rTEvt )
MouseEvent
aUpEvt
(
rMEvt
.
GetPosPixel
(),
rMEvt
.
GetClicks
(),
rMEvt
.
GetMode
(),
nButtonDown
,
rMEvt
.
GetModifier
()
);
// In the tiled rendering case, do not spawn fake mouse up
if
(
!
pViewData
->
GetDocument
()
->
GetDrawLayer
()
->
isTiledRendering
())
MouseButtonUp
(
aUpEvt
);
MouseButtonUp
(
aUpEvt
);
}
else
MouseMove
(
rMEvt
);
...
...
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