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
f1d86fc7
Kaydet (Commit)
f1d86fc7
authored
May 15, 2015
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
lokdocview: implement desktop style click+move selection creation
Change-Id: I69663c0801bc95b8876c8dcbdf68d7a99fec4fb3
üst
3de68db1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
7 deletions
+18
-7
lokdocview.cxx
libreofficekit/source/gtk/lokdocview.cxx
+18
-7
No files found.
libreofficekit/source/gtk/lokdocview.cxx
Dosyayı görüntüle @
f1d86fc7
...
...
@@ -103,6 +103,9 @@ struct LOKDocView_Impl
bool
m_bInDragGraphicHandles
[
8
];
///@}
/// If text selection is adjusted -> then mouse up event is a NOP.
bool
m_bTextSelectionAdjusted
;
/// Callback data, allocated in lok_docview_callback_worker(), released in lok_docview_callback().
struct
CallbackData
{
...
...
@@ -222,8 +225,8 @@ LOKDocView_Impl::LOKDocView_Impl(LOKDocView* pDocView)
m_pHandleEnd
(
0
),
m_aHandleEndRect
({
0
,
0
,
0
,
0
}),
m_bInDragEndHandle
(
false
),
m_
pGraphicHandle
(
0
)
m_pGraphicHandle
(
0
),
m_
bTextSelectionAdjusted
(
false
)
{
memset
(
&
m_aGraphicHandleRects
,
0
,
sizeof
(
m_aGraphicHandleRects
));
memset
(
&
m_bInDragGraphicHandles
,
0
,
sizeof
(
m_bInDragGraphicHandles
));
...
...
@@ -415,16 +418,20 @@ gboolean LOKDocView_Impl::signalButtonImpl(GdkEventButton* pEvent)
if
((
pEvent
->
time
-
m_nLastButtonPressTime
)
<
250
)
nCount
++
;
m_nLastButtonPressTime
=
pEvent
->
time
;
m_bTextSelectionAdjusted
=
false
;
m_pDocument
->
pClass
->
postMouseEvent
(
m_pDocument
,
LOK_MOUSEEVENT_MOUSEBUTTONDOWN
,
pixelToTwip
(
pEvent
->
x
),
pixelToTwip
(
pEvent
->
y
),
nCount
);
break
;
}
case
GDK_BUTTON_RELEASE
:
{
int
nCount
=
1
;
if
((
pEvent
->
time
-
m_nLastButtonReleaseTime
)
<
250
)
nCount
++
;
m_nLastButtonReleaseTime
=
pEvent
->
time
;
m_pDocument
->
pClass
->
postMouseEvent
(
m_pDocument
,
LOK_MOUSEEVENT_MOUSEBUTTONUP
,
pixelToTwip
(
pEvent
->
x
),
pixelToTwip
(
pEvent
->
y
),
nCount
);
if
(
!
m_bTextSelectionAdjusted
)
{
int
nCount
=
1
;
if
((
pEvent
->
time
-
m_nLastButtonReleaseTime
)
<
250
)
nCount
++
;
m_nLastButtonReleaseTime
=
pEvent
->
time
;
m_pDocument
->
pClass
->
postMouseEvent
(
m_pDocument
,
LOK_MOUSEEVENT_MOUSEBUTTONUP
,
pixelToTwip
(
pEvent
->
x
),
pixelToTwip
(
pEvent
->
y
),
nCount
);
}
break
;
}
default
:
...
...
@@ -505,6 +512,10 @@ gboolean LOKDocView_Impl::signalMotionImpl(GdkEventButton* pEvent)
return
FALSE
;
}
// Otherwise adjust the text selection, as on the desktop.
m_pDocument
->
pClass
->
setTextSelection
(
m_pDocument
,
LOK_SETTEXTSELECTION_END
,
pixelToTwip
(
pEvent
->
x
),
pixelToTwip
(
pEvent
->
y
));
m_bTextSelectionAdjusted
=
true
;
return
FALSE
;
}
...
...
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