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
81a22db4
Kaydet (Commit)
81a22db4
authored
Şub 24, 2011
tarafından
Nigel Hawkins
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Remove use of SvLongs in itrform2.[ch]xx
üst
098e422d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
15 deletions
+11
-15
itrform2.cxx
sw/source/core/text/itrform2.cxx
+8
-13
itrform2.hxx
sw/source/core/text/itrform2.hxx
+3
-2
No files found.
sw/source/core/text/itrform2.cxx
Dosyayı görüntüle @
81a22db4
...
@@ -1511,21 +1511,18 @@ xub_StrLen SwTxtFormatter::FormatLine( const xub_StrLen nStartPos )
...
@@ -1511,21 +1511,18 @@ xub_StrLen SwTxtFormatter::FormatLine( const xub_StrLen nStartPos )
// before and after the BuildPortions call
// before and after the BuildPortions call
const
sal_Bool
bOptimizeRepaint
=
AllowRepaintOpt
();
const
sal_Bool
bOptimizeRepaint
=
AllowRepaintOpt
();
const
xub_StrLen
nOldLineEnd
=
nStartPos
+
pCurr
->
GetLen
();
const
xub_StrLen
nOldLineEnd
=
nStartPos
+
pCurr
->
GetLen
();
SvLongs
*
pFlyStart
=
0
;
std
::
vector
<
long
>
flyStarts
;
// these are the conditions for a fly position comparison
// these are the conditions for a fly position comparison
if
(
bOptimizeRepaint
&&
pCurr
->
IsFly
()
)
if
(
bOptimizeRepaint
&&
pCurr
->
IsFly
()
)
{
{
pFlyStart
=
new
SvLongs
;
SwLinePortion
*
pPor
=
pCurr
->
GetFirstPortion
();
SwLinePortion
*
pPor
=
pCurr
->
GetFirstPortion
();
long
nPOfst
=
0
;
long
nPOfst
=
0
;
USHORT
nCnt
=
0
;
while
(
pPor
)
while
(
pPor
)
{
{
if
(
pPor
->
IsFlyPortion
()
)
if
(
pPor
->
IsFlyPortion
()
)
// insert start value of fly portion
// insert start value of fly portion
pFlyStart
->
Insert
(
nPOfst
,
nCnt
++
);
flyStarts
.
push_back
(
nPOfst
);
nPOfst
+=
pPor
->
Width
();
nPOfst
+=
pPor
->
Width
();
pPor
=
pPor
->
GetPortion
();
pPor
=
pPor
->
GetPortion
();
...
@@ -1616,9 +1613,8 @@ xub_StrLen SwTxtFormatter::FormatLine( const xub_StrLen nStartPos )
...
@@ -1616,9 +1613,8 @@ xub_StrLen SwTxtFormatter::FormatLine( const xub_StrLen nStartPos )
// calculate optimal repaint rectangle
// calculate optimal repaint rectangle
if
(
bOptimizeRepaint
)
if
(
bOptimizeRepaint
)
{
{
GetInfo
().
SetPaintOfst
(
CalcOptRepaint
(
nOldLineEnd
,
pFlyStart
)
);
GetInfo
().
SetPaintOfst
(
CalcOptRepaint
(
nOldLineEnd
,
flyStarts
)
);
if
(
pFlyStart
)
flyStarts
.
clear
();
delete
pFlyStart
;
}
}
else
else
// Special case: We do not allow an optimitation of the repaint
// Special case: We do not allow an optimitation of the repaint
...
@@ -2016,7 +2012,7 @@ sal_Bool SwTxtFormatter::AllowRepaintOpt() const
...
@@ -2016,7 +2012,7 @@ sal_Bool SwTxtFormatter::AllowRepaintOpt() const
* calculates an optimal repaint offset for the current line
* calculates an optimal repaint offset for the current line
*************************************************************************/
*************************************************************************/
long
SwTxtFormatter
::
CalcOptRepaint
(
xub_StrLen
nOldLineEnd
,
long
SwTxtFormatter
::
CalcOptRepaint
(
xub_StrLen
nOldLineEnd
,
const
SvLongs
*
pFlyStart
)
const
std
::
vector
<
long
>
&
rFlyStarts
)
{
{
if
(
GetInfo
().
GetIdx
()
<
GetInfo
().
GetReformatStart
()
)
if
(
GetInfo
().
GetIdx
()
<
GetInfo
().
GetReformatStart
()
)
// the reformat position is behind our new line, that means
// the reformat position is behind our new line, that means
...
@@ -2027,7 +2023,7 @@ long SwTxtFormatter::CalcOptRepaint( xub_StrLen nOldLineEnd,
...
@@ -2027,7 +2023,7 @@ long SwTxtFormatter::CalcOptRepaint( xub_StrLen nOldLineEnd,
// in case we do not have any fly in our line, our repaint position
// in case we do not have any fly in our line, our repaint position
// is the changed position - 1
// is the changed position - 1
if
(
!
pFlyStart
&&
!
pCurr
->
IsFly
()
)
if
(
rFlyStarts
.
empty
()
&&
!
pCurr
->
IsFly
()
)
{
{
// this is the maximum repaint offset determined during formatting
// this is the maximum repaint offset determined during formatting
// for example: the beginning of the first right tab stop
// for example: the beginning of the first right tab stop
...
@@ -2105,9 +2101,8 @@ long SwTxtFormatter::CalcOptRepaint( xub_StrLen nOldLineEnd,
...
@@ -2105,9 +2101,8 @@ long SwTxtFormatter::CalcOptRepaint( xub_StrLen nOldLineEnd,
if
(
pPor
->
IsFlyPortion
()
)
if
(
pPor
->
IsFlyPortion
()
)
{
{
// compare start of fly with former start of fly
// compare start of fly with former start of fly
if
(
pFlyStart
&&
if
(
nCnt
<
rFlyStarts
.
size
()
&&
nCnt
<
pFlyStart
->
Count
()
&&
nX
==
rFlyStarts
[
nCnt
]
&&
nX
==
(
*
pFlyStart
)[
nCnt
]
&&
nIdx
<
nReformat
nIdx
<
nReformat
)
)
// found fix position, nothing has changed left from nX
// found fix position, nothing has changed left from nX
...
...
sw/source/core/text/itrform2.hxx
Dosyayı görüntüle @
81a22db4
...
@@ -29,6 +29,8 @@
...
@@ -29,6 +29,8 @@
#define _ITRFORM2_HXX
#define _ITRFORM2_HXX
#include "itrpaint.hxx"
#include "itrpaint.hxx"
#include <vector>
class
SwFlyCntPortion
;
class
SwFlyCntPortion
;
class
SwInterHyphInfo
;
class
SwInterHyphInfo
;
class
SwDropPortion
;
class
SwDropPortion
;
...
@@ -39,7 +41,6 @@ class SwErgoSumPortion;
...
@@ -39,7 +41,6 @@ class SwErgoSumPortion;
class
SwExpandPortion
;
class
SwExpandPortion
;
class
SwMultiPortion
;
class
SwMultiPortion
;
class
SwFtnPortion
;
class
SwFtnPortion
;
class
SvLongs
;
/*************************************************************************
/*************************************************************************
* class SwTxtFormatter
* class SwTxtFormatter
...
@@ -102,7 +103,7 @@ class SwTxtFormatter : public SwTxtPainter
...
@@ -102,7 +103,7 @@ class SwTxtFormatter : public SwTxtPainter
sal_Bool
AllowRepaintOpt
()
const
;
sal_Bool
AllowRepaintOpt
()
const
;
// calculates and sets the optimized repaint offset
// calculates and sets the optimized repaint offset
long
CalcOptRepaint
(
xub_StrLen
nOldLineEnd
,
const
SvLongs
*
pFlyStart
);
long
CalcOptRepaint
(
xub_StrLen
nOldLineEnd
,
const
std
::
vector
<
long
>
&
rFlyStarts
);
// wird von FormatLine gerufen.
// wird von FormatLine gerufen.
void
FormatReset
(
SwTxtFormatInfo
&
rInf
);
void
FormatReset
(
SwTxtFormatInfo
&
rInf
);
...
...
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