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
bce2c9d4
Kaydet (Commit)
bce2c9d4
authored
Eyl 03, 2014
tarafından
Matteo Casalin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Reduce scope and avoid casts at each call-place
Change-Id: Iade7f5e174b74ea156c0e0bafc5c7c72e4b86dbd
üst
6f8a2666
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
13 deletions
+14
-13
guess.cxx
sw/source/core/text/guess.cxx
+3
-3
inftxt.hxx
sw/source/core/text/inftxt.hxx
+7
-6
itradj.cxx
sw/source/core/text/itradj.cxx
+4
-4
No files found.
sw/source/core/text/guess.cxx
Dosyayı görüntüle @
bce2c9d4
...
@@ -136,7 +136,7 @@ bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
...
@@ -136,7 +136,7 @@ bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
// save maximum width for later use
// save maximum width for later use
if
(
nMaxSizeDiff
)
if
(
nMaxSizeDiff
)
rInf
.
SetMaxWidthDiff
(
(
sal_uLong
)
&
rPor
,
nMaxSizeDiff
);
rInf
.
SetMaxWidthDiff
(
&
rPor
,
nMaxSizeDiff
);
nBreakWidth
+=
nLeftRightBorderSpace
;
nBreakWidth
+=
nLeftRightBorderSpace
;
...
@@ -188,7 +188,7 @@ bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
...
@@ -188,7 +188,7 @@ bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
// save maximum width for later use
// save maximum width for later use
if
(
nMaxSizeDiff
)
if
(
nMaxSizeDiff
)
rInf
.
SetMaxWidthDiff
(
(
sal_uLong
)
&
rPor
,
nMaxSizeDiff
);
rInf
.
SetMaxWidthDiff
(
&
rPor
,
nMaxSizeDiff
);
nBreakWidth
+=
nLeftRightBorderSpace
;
nBreakWidth
+=
nLeftRightBorderSpace
;
...
@@ -508,7 +508,7 @@ bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
...
@@ -508,7 +508,7 @@ bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
// save maximum width for later use
// save maximum width for later use
if
(
nMaxSizeDiff
)
if
(
nMaxSizeDiff
)
rInf
.
SetMaxWidthDiff
(
(
sal_uLong
)
&
rPor
,
nMaxSizeDiff
);
rInf
.
SetMaxWidthDiff
(
&
rPor
,
nMaxSizeDiff
);
nBreakWidth
+=
nItalic
+
nLeftRightBorderSpace
;
nBreakWidth
+=
nItalic
+
nLeftRightBorderSpace
;
}
}
...
...
sw/source/core/text/inftxt.hxx
Dosyayı görüntüle @
bce2c9d4
...
@@ -140,10 +140,11 @@ public:
...
@@ -140,10 +140,11 @@ public:
friend
SvStream
&
WriteSwTxtInfo
(
SvStream
&
rOS
,
const
SwTxtInfo
&
rInf
);
friend
SvStream
&
WriteSwTxtInfo
(
SvStream
&
rOS
,
const
SwTxtInfo
&
rInf
);
};
};
typedef
::
std
::
map
<
sal_uLong
,
sal_IntPtr
>
SwTxtPortionMap
;
class
SwTxtSizeInfo
:
public
SwTxtInfo
class
SwTxtSizeInfo
:
public
SwTxtInfo
{
{
private
:
typedef
::
std
::
map
<
sal_uIntPtr
,
sal_uInt16
>
SwTxtPortionMap
;
protected
:
protected
:
// during formatting, a small database is built, mapping portion pointers
// during formatting, a small database is built, mapping portion pointers
// to their maximum size (used for kana compression)
// to their maximum size (used for kana compression)
...
@@ -337,13 +338,13 @@ public:
...
@@ -337,13 +338,13 @@ public:
// space among compressed kanas.
// space among compressed kanas.
// During formatting, the maximum values of compressable portions are
// During formatting, the maximum values of compressable portions are
// stored in m_aMaxWidth and discarded after a line has been formatted.
// stored in m_aMaxWidth and discarded after a line has been formatted.
inline
void
SetMaxWidthDiff
(
sal_uLong
nKey
,
sal_uInt16
nVal
)
inline
void
SetMaxWidthDiff
(
const
void
*
nKey
,
sal_uInt16
nVal
)
{
{
m_aMaxWidth
.
insert
(
::
std
::
make_pair
(
nKey
,
nVal
)
);
m_aMaxWidth
.
insert
(
::
std
::
make_pair
(
reinterpret_cast
<
sal_uIntPtr
>
(
nKey
)
,
nVal
)
);
};
};
inline
sal_uInt16
GetMaxWidthDiff
(
sal_uLong
nKey
)
inline
sal_uInt16
GetMaxWidthDiff
(
const
void
*
nKey
)
{
{
SwTxtPortionMap
::
iterator
it
=
m_aMaxWidth
.
find
(
nKey
);
SwTxtPortionMap
::
iterator
it
=
m_aMaxWidth
.
find
(
reinterpret_cast
<
sal_uIntPtr
>
(
nKey
)
);
if
(
it
!=
m_aMaxWidth
.
end
()
)
if
(
it
!=
m_aMaxWidth
.
end
()
)
return
it
->
second
;
return
it
->
second
;
...
...
sw/source/core/text/itradj.cxx
Dosyayı görüntüle @
bce2c9d4
...
@@ -421,11 +421,11 @@ SwTwips SwTxtAdjuster::CalcKanaAdj( SwLineLayout* pCurrent )
...
@@ -421,11 +421,11 @@ SwTwips SwTxtAdjuster::CalcKanaAdj( SwLineLayout* pCurrent )
{
{
// get maximum portion width from info structure, calculated
// get maximum portion width from info structure, calculated
// during text formatting
// during text formatting
sal_uInt16
nMaxWidthDiff
=
GetInfo
().
GetMaxWidthDiff
(
(
sal_uLong
)
pPos
);
sal_uInt16
nMaxWidthDiff
=
GetInfo
().
GetMaxWidthDiff
(
pPos
);
// check, if information is stored under other key
// check, if information is stored under other key
if
(
!
nMaxWidthDiff
&&
pPos
==
pCurrent
->
GetFirstPortion
()
)
if
(
!
nMaxWidthDiff
&&
pPos
==
pCurrent
->
GetFirstPortion
()
)
nMaxWidthDiff
=
GetInfo
().
GetMaxWidthDiff
(
(
sal_uLong
)
pCurrent
);
nMaxWidthDiff
=
GetInfo
().
GetMaxWidthDiff
(
pCurrent
);
// calculate difference between portion width and max. width
// calculate difference between portion width and max. width
nKanaDiffSum
+=
nMaxWidthDiff
;
nKanaDiffSum
+=
nMaxWidthDiff
;
...
@@ -501,11 +501,11 @@ SwTwips SwTxtAdjuster::CalcKanaAdj( SwLineLayout* pCurrent )
...
@@ -501,11 +501,11 @@ SwTwips SwTxtAdjuster::CalcKanaAdj( SwLineLayout* pCurrent )
// get maximum portion width from info structure, calculated
// get maximum portion width from info structure, calculated
// during text formatting
// during text formatting
sal_uInt16
nMaxWidthDiff
=
GetInfo
().
GetMaxWidthDiff
(
(
sal_uLong
)
pPos
);
sal_uInt16
nMaxWidthDiff
=
GetInfo
().
GetMaxWidthDiff
(
pPos
);
// check, if information is stored under other key
// check, if information is stored under other key
if
(
!
nMaxWidthDiff
&&
pPos
==
pCurrent
->
GetFirstPortion
()
)
if
(
!
nMaxWidthDiff
&&
pPos
==
pCurrent
->
GetFirstPortion
()
)
nMaxWidthDiff
=
GetInfo
().
GetMaxWidthDiff
(
(
sal_uLong
)
pCurrent
);
nMaxWidthDiff
=
GetInfo
().
GetMaxWidthDiff
(
pCurrent
);
nKanaDiffSum
+=
nMaxWidthDiff
;
nKanaDiffSum
+=
nMaxWidthDiff
;
pPos
->
Width
(
nMinWidth
+
pPos
->
Width
(
nMinWidth
+
(
(
10000
-
nCompress
)
*
nMaxWidthDiff
)
/
10000
);
(
(
10000
-
nCompress
)
*
nMaxWidthDiff
)
/
10000
);
...
...
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