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
14bb2048
Kaydet (Commit)
14bb2048
authored
May 18, 2018
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sw_redlinehide: trivial conversions in frmcrsr.cxx
Change-Id: I15e6fc1eecebab0c497eda66c74633651fa446a6
üst
c1743d46
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
23 deletions
+23
-23
frmcrsr.cxx
sw/source/core/text/frmcrsr.cxx
+23
-23
No files found.
sw/source/core/text/frmcrsr.cxx
Dosyayı görüntüle @
14bb2048
...
...
@@ -65,15 +65,16 @@ SwTextFrame *GetAdjFrameAtPos( SwTextFrame *pFrame, const SwPosition &rPos,
const
bool
bRightMargin
,
const
bool
bNoScroll
=
true
)
{
// RightMargin in the last master line
const
sal_Int32
nOffset
=
rPos
.
nContent
.
GetIndex
(
);
TextFrameIndex
const
nOffset
=
pFrame
->
MapModelToViewPos
(
rPos
);
SwTextFrame
*
pFrameAtPos
=
pFrame
;
if
(
!
bNoScroll
||
pFrame
->
GetFollow
()
)
{
pFrameAtPos
=
pFrame
->
GetFrameAtPos
(
rPos
);
if
(
rPos
<
pFrameAtPos
->
MapViewToModelPos
(
pFrameAtPos
->
GetOfst
()
)
&&
if
(
nOffset
<
pFrameAtPos
->
GetOfst
(
)
&&
!
pFrameAtPos
->
IsFollow
()
)
{
TextFrameIndex
nNew
=
pFrameAtPos
->
MapModelToViewPos
(
rPos
);
assert
(
pFrameAtPos
->
MapModelToViewPos
(
rPos
)
==
nOffset
);
TextFrameIndex
nNew
(
nOffset
);
if
(
nNew
<
TextFrameIndex
(
MIN_OFFSET_STEP
))
nNew
=
TextFrameIndex
(
0
);
else
...
...
@@ -213,7 +214,7 @@ bool SwTextFrame::GetCharRect( SwRect& rOrig, const SwPosition &rPos,
if
(
pFrame
->
IsEmpty
()
||
!
aRectFnSet
.
GetHeight
(
pFrame
->
getFramePrintArea
())
)
{
Point
aPnt1
=
pFrame
->
getFrameArea
().
Pos
()
+
pFrame
->
getFramePrintArea
().
Pos
();
SwTextNode
*
pTextNd
=
const_cast
<
SwTextFrame
*>
(
this
)
->
GetTextNode
(
);
SwTextNode
const
*
const
pTextNd
(
GetTextNodeForParaProps
()
);
short
nFirstOffset
;
pTextNd
->
GetFirstLineOfsWithNum
(
nFirstOffset
);
...
...
@@ -290,7 +291,7 @@ bool SwTextFrame::GetCharRect( SwRect& rOrig, const SwPosition &rPos,
aRectFnSet
.
GetBottom
(
rOrig
)
==
nUpperMaxY
&&
pFrame
->
GetOfst
()
<
nOffset
&&
!
pFrame
->
IsFollow
()
&&
!
bNoScroll
&&
pFrame
->
GetTextNode
()
->
GetText
().
getLength
(
)
!=
nNextOfst
)
TextFrameIndex
(
pFrame
->
GetText
().
getLength
()
)
!=
nNextOfst
)
{
bGoOn
=
sw_ChangeOffset
(
pFrame
,
nNextOfst
);
}
...
...
@@ -571,9 +572,7 @@ bool SwTextFrame::GetCursorOfst_(SwPosition* pPos, const Point& rPoint,
if
(
IsEmpty
()
)
{
SwTextNode
*
pTextNd
=
const_cast
<
SwTextFrame
*>
(
this
)
->
GetTextNode
();
pPos
->
nNode
=
*
pTextNd
;
pPos
->
nContent
.
Assign
(
pTextNd
,
0
);
*
pPos
=
MapViewToModelPos
(
TextFrameIndex
(
0
));
if
(
pCMS
&&
pCMS
->
m_bFieldInfo
)
{
SwTwips
nDiff
=
rPoint
.
X
()
-
getFrameArea
().
Left
()
-
getFramePrintArea
().
Left
();
...
...
@@ -612,15 +611,14 @@ bool SwTextFrame::GetCursorOfst_(SwPosition* pPos, const Point& rPoint,
// In such cases, pPos must not be calculated.
if
(
TextFrameIndex
(
COMPLETE_STRING
)
!=
nOffset
)
{
SwTextNode
*
pTextNd
=
const_cast
<
SwTextFrame
*>
(
this
)
->
GetTextNode
();
*
pPos
=
MapViewToModelPos
(
nOffset
);
if
(
pFillData
)
{
if
(
pTextNd
->
GetText
().
getLength
(
)
>
nOffset
||
if
(
TextFrameIndex
(
GetText
().
getLength
()
)
>
nOffset
||
rPoint
.
Y
()
<
getFrameArea
().
Top
()
)
pFillData
->
bInner
=
true
;
pFillData
->
bFirstLine
=
aLine
.
GetLineNr
()
<
2
;
if
(
pTextNd
->
GetText
().
getLength
())
if
(
GetText
().
getLength
())
{
pFillData
->
bEmpty
=
false
;
pFillData
->
nLineWidth
=
aLine
.
GetCurr
()
->
Width
();
...
...
@@ -1336,10 +1334,9 @@ void SwTextFrame::FillCursorPos( SwFillData& rFill ) const
rFill
.
bColumn
=
true
;
if
(
rFill
.
pPos
)
{
SwTextNode
*
pTextNd
=
const_cast
<
SwTextFrame
*>
(
static_cast
<
const
SwTextFrame
*>
(
pFrame
))
->
GetTextNode
();
rFill
.
pPos
->
nNode
=
*
pTextNd
;
rFill
.
pPos
->
nContent
.
Assign
(
pTextNd
,
pTextNd
->
GetText
().
getLength
());
SwTextFrame
const
*
const
pTextFrame
(
static_cast
<
const
SwTextFrame
*>
(
pFrame
));
*
rFill
.
pPos
=
pTextFrame
->
MapViewToModelPos
(
TextFrameIndex
(
pTextFrame
->
GetText
().
getLength
()));
}
if
(
nNextCol
)
{
...
...
@@ -1354,19 +1351,22 @@ void SwTextFrame::FillCursorPos( SwFillData& rFill ) const
}
}
SwFont
*
pFnt
;
SwTextFormatColl
*
pColl
=
GetTextNode
()
->
GetTextColl
();
SwTwips
nFirst
=
GetTextNode
()
->
GetSwAttrSet
().
GetULSpace
().
GetLower
();
SwTextFormatColl
*
pColl
=
GetTextNode
ForParaProps
()
->
GetTextColl
();
SwTwips
nFirst
=
GetTextNode
ForParaProps
()
->
GetSwAttrSet
().
GetULSpace
().
GetLower
();
SwTwips
nDiff
=
rFill
.
Y
()
-
getFrameArea
().
Bottom
();
if
(
nDiff
<
nFirst
)
nDiff
=
-
1
;
else
pColl
=
&
pColl
->
GetNextTextFormatColl
();
SwAttrSet
aSet
(
const_cast
<
SwDoc
*>
(
GetTextNode
()
->
GetDoc
())
->
GetAttrPool
(),
aTextFormatCollSetRange
);
SwAttrSet
aSet
(
const_cast
<
SwDoc
&>
(
GetDoc
()).
GetAttrPool
(),
aTextFormatCollSetRange
);
const
SwAttrSet
*
pSet
=
&
pColl
->
GetAttrSet
();
SwViewShell
*
pSh
=
getRootFrame
()
->
GetCurrShell
();
if
(
GetTextNode
()
->
HasSwAttrSet
()
)
if
(
GetTextNodeForParaProps
()
->
HasSwAttrSet
()
)
{
aSet
.
Put
(
*
GetTextNode
()
->
GetpSwAttrSet
()
);
// sw_redlinehide: pSet is mostly used for para props, but there are
// accesses to char props via pFnt - why does it use only the node's
// props for this, and not hints?
aSet
.
Put
(
*
GetTextNodeForParaProps
()
->
GetpSwAttrSet
()
);
aSet
.
SetParent
(
pSet
);
pSet
=
&
aSet
;
pFnt
=
new
SwFont
(
pSet
,
GetNode
()
->
getIDocumentSettingAccess
()
);
...
...
@@ -1379,7 +1379,7 @@ void SwTextFrame::FillCursorPos( SwFillData& rFill ) const
}
OutputDevice
*
pOut
=
pSh
->
GetOut
();
if
(
!
pSh
->
GetViewOptions
()
->
getBrowseMode
()
||
pSh
->
GetViewOptions
()
->
IsPrtFormat
()
)
pOut
=
Get
TextNode
()
->
getIDocumentDeviceAccess
().
getReferenceDevice
(
true
);
pOut
=
Get
Doc
().
getIDocumentDeviceAccess
().
getReferenceDevice
(
true
);
pFnt
->
SetFntChg
(
true
);
pFnt
->
ChgPhysFnt
(
pSh
,
*
pOut
);
...
...
@@ -1430,7 +1430,7 @@ void SwTextFrame::FillCursorPos( SwFillData& rFill ) const
rRect
.
Top
(
rRect
.
Top
()
+
nFirst
);
rRect
.
Height
(
nLineHeight
);
SwTwips
nLeft
=
rFill
.
Left
()
+
rLRSpace
.
GetLeft
()
+
GetTextNode
()
->
GetLeftMarginWithNum
();
GetTextNode
ForParaProps
()
->
GetLeftMarginWithNum
();
SwTwips
nRight
=
rFill
.
Right
()
-
rLRSpace
.
GetRight
();
SwTwips
nCenter
=
(
nLeft
+
nRight
)
/
2
;
rRect
.
Left
(
nLeft
);
...
...
@@ -1503,7 +1503,7 @@ void SwTextFrame::FillCursorPos( SwFillData& rFill ) const
else
if
(
rFill
.
X
()
>
nLeft
)
{
SwTwips
nTextLeft
=
rFill
.
Left
()
+
rLRSpace
.
GetTextLeft
()
+
GetTextNode
()
->
GetLeftMarginWithNum
(
true
);
GetTextNodeForParaProps
()
->
GetLeftMarginWithNum
(
true
);
rFill
.
nLineWidth
+=
rFill
.
bFirstLine
?
nLeft
:
nTextLeft
;
SwTwips
nLeftTab
;
SwTwips
nRightTab
=
nLeft
;
...
...
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