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
7409c8a6
Kaydet (Commit)
7409c8a6
authored
Eyl 13, 2018
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sw_redlinehide_2: view cursor: IsSelOnePara(),IsStartPara(),IsEndPara()
Change-Id: Idb7bdc139e501dfbd7e7d3b2d4598d211fa11591
üst
e2dc30d6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
9 deletions
+54
-9
crsrsh.hxx
sw/inc/crsrsh.hxx
+1
-7
crsrsh.cxx
sw/source/core/crsr/crsrsh.cxx
+53
-2
No files found.
sw/inc/crsrsh.hxx
Dosyayı görüntüle @
7409c8a6
...
...
@@ -502,7 +502,7 @@ public:
bool
ShouldWait
()
const
;
// Check if selection is within one paragraph.
inline
bool
IsSelOnePara
()
const
;
bool
IsSelOnePara
()
const
;
/*
* Returns SRectangle, at which the cursor is located.
...
...
@@ -870,12 +870,6 @@ inline bool SwCursorShell::IsMultiSelection() const
return
m_pCurrentCursor
->
GetNext
()
!=
m_pCurrentCursor
;
}
inline
bool
SwCursorShell
::
IsSelOnePara
()
const
{
return
!
m_pCurrentCursor
->
IsMultiSelection
()
&&
m_pCurrentCursor
->
GetPoint
()
->
nNode
==
m_pCurrentCursor
->
GetMark
()
->
nNode
;
}
inline
const
SwTableNode
*
SwCursorShell
::
IsCursorInTable
()
const
{
return
m_pCurrentCursor
->
GetNode
().
FindTableNode
();
...
...
sw/source/core/crsr/crsrsh.cxx
Dosyayı görüntüle @
7409c8a6
...
...
@@ -1045,11 +1045,62 @@ int SwCursorShell::CompareCursorStackMkCurrPt() const
return
nRet
;
}
bool
SwCursorShell
::
IsSelOnePara
()
const
{
if
(
m_pCurrentCursor
->
IsMultiSelection
())
{
return
false
;
}
if
(
m_pCurrentCursor
->
GetPoint
()
->
nNode
==
m_pCurrentCursor
->
GetMark
()
->
nNode
)
{
return
true
;
}
if
(
GetLayout
()
->
IsHideRedlines
())
{
SwContentFrame
const
*
const
pFrame
(
GetCurrFrame
(
false
));
auto
const
n
(
m_pCurrentCursor
->
GetMark
()
->
nNode
.
GetIndex
());
return
FrameContainsNode
(
*
pFrame
,
n
);
}
return
false
;
}
bool
SwCursorShell
::
IsSttPara
()
const
{
return
m_pCurrentCursor
->
GetPoint
()
->
nContent
==
0
;
}
{
if
(
GetLayout
()
->
IsHideRedlines
())
{
SwTextNode
const
*
const
pNode
(
m_pCurrentCursor
->
GetPoint
()
->
nNode
.
GetNode
().
GetTextNode
());
if
(
pNode
)
{
SwTextFrame
const
*
const
pFrame
(
static_cast
<
SwTextFrame
*>
(
pNode
->
getLayoutFrame
(
GetLayout
())));
if
(
pFrame
)
{
return
pFrame
->
MapModelToViewPos
(
*
m_pCurrentCursor
->
GetPoint
())
==
TextFrameIndex
(
0
);
}
}
}
return
m_pCurrentCursor
->
GetPoint
()
->
nContent
==
0
;
}
bool
SwCursorShell
::
IsEndPara
()
const
{
return
m_pCurrentCursor
->
GetPoint
()
->
nContent
==
m_pCurrentCursor
->
GetContentNode
()
->
Len
();
}
{
if
(
GetLayout
()
->
IsHideRedlines
())
{
SwTextNode
const
*
const
pNode
(
m_pCurrentCursor
->
GetPoint
()
->
nNode
.
GetNode
().
GetTextNode
());
if
(
pNode
)
{
SwTextFrame
const
*
const
pFrame
(
static_cast
<
SwTextFrame
*>
(
pNode
->
getLayoutFrame
(
GetLayout
())));
if
(
pFrame
)
{
return
pFrame
->
MapModelToViewPos
(
*
m_pCurrentCursor
->
GetPoint
())
==
TextFrameIndex
(
pFrame
->
GetText
().
getLength
());
}
}
}
return
m_pCurrentCursor
->
GetPoint
()
->
nContent
==
m_pCurrentCursor
->
GetContentNode
()
->
Len
();
}
bool
SwCursorShell
::
IsEndOfTable
()
const
{
...
...
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