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
3a2010c7
Kaydet (Commit)
3a2010c7
authored
Tem 14, 2014
tarafından
Tomaž Vajngerl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#79673 revert to old NPC for MacOSX only
Change-Id: I83cfa2f11e76e03b919216e8dd04d1121ea6afd8
üst
adf0d7b1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
63 additions
and
2 deletions
+63
-2
txtfrm.hxx
sw/source/core/inc/txtfrm.hxx
+12
-0
frmpaint.cxx
sw/source/core/text/frmpaint.cxx
+2
-1
inftxt.cxx
sw/source/core/text/inftxt.cxx
+19
-1
porrst.cxx
sw/source/core/text/porrst.cxx
+5
-0
fntcache.cxx
sw/source/core/txtnode/fntcache.cxx
+25
-0
No files found.
sw/source/core/inc/txtfrm.hxx
Dosyayı görüntüle @
3a2010c7
...
@@ -45,7 +45,19 @@ class SwScriptInfo;
...
@@ -45,7 +45,19 @@ class SwScriptInfo;
class
SwViewOption
;
class
SwViewOption
;
class
SwWrongList
;
class
SwWrongList
;
// LEGACY_NON_PRINTING_CHARACTER_COLOR_FUNCTIONALITY
// Old handling of non printing character color - color is the same as current color
// Because of problems drawing glyphs on correct position in OSX, this functionallity is
// disabled on OSX. See fdo#79673 for details.
#ifdef MACOSX
#define LEGACY_NON_PRINTING_CHARACTER_COLOR_FUNCTIONALITY
#else
#undef LEGACY_NON_PRINTING_CHARACTER_COLOR_FUNCTIONALITY
#endif
#ifndef LEGACY_NON_PRINTING_CHARACTER_COLOR_FUNCTIONALITY
#define NON_PRINTING_CHARACTER_COLOR RGB_COLORDATA( 0x6A, 0xBE, 0xD3 )
#define NON_PRINTING_CHARACTER_COLOR RGB_COLORDATA( 0x6A, 0xBE, 0xD3 )
#endif
/// Represents the visualization of a paragraph.
/// Represents the visualization of a paragraph.
class
SwTxtFrm
:
public
SwCntntFrm
class
SwTxtFrm
:
public
SwCntntFrm
...
...
sw/source/core/text/frmpaint.cxx
Dosyayı görüntüle @
3a2010c7
...
@@ -562,8 +562,9 @@ bool SwTxtFrm::PaintEmpty( const SwRect &rRect, bool bCheck ) const
...
@@ -562,8 +562,9 @@ bool SwTxtFrm::PaintEmpty( const SwRect &rRect, bool bCheck ) const
aDrawInf
.
SetFrm
(
this
);
aDrawInf
.
SetFrm
(
this
);
aDrawInf
.
SetFont
(
pFnt
);
aDrawInf
.
SetFont
(
pFnt
);
aDrawInf
.
SetSnapToGrid
(
false
);
aDrawInf
.
SetSnapToGrid
(
false
);
#ifndef LEGACY_NON_PRINTING_CHARACTER_COLOR_FUNCTIONALITY
pFnt
->
SetColor
(
NON_PRINTING_CHARACTER_COLOR
);
pFnt
->
SetColor
(
NON_PRINTING_CHARACTER_COLOR
);
#endif
pFnt
->
_DrawText
(
aDrawInf
);
pFnt
->
_DrawText
(
aDrawInf
);
}
}
delete
pClip
;
delete
pClip
;
...
...
sw/source/core/text/inftxt.cxx
Dosyayı görüntüle @
3a2010c7
...
@@ -891,6 +891,16 @@ static void lcl_DrawSpecial( const SwTxtPaintInfo& rInf, const SwLinePortion& rP
...
@@ -891,6 +891,16 @@ static void lcl_DrawSpecial( const SwTxtPaintInfo& rInf, const SwLinePortion& rP
((
SwTxtPaintInfo
&
)
rInf
).
SetPos
(
aOldPos
);
((
SwTxtPaintInfo
&
)
rInf
).
SetPos
(
aOldPos
);
}
}
#ifdef LEGACY_NON_PRINTING_CHARACTER_COLOR_FUNCTIONALITY
static
void
lcl_DrawSpecial
(
const
SwTxtPaintInfo
&
rInf
,
const
SwLinePortion
&
rPor
,
SwRect
&
rRect
,
sal_Unicode
cChar
,
sal_uInt8
nOptions
)
{
const
SwFont
*
pOldFnt
=
rInf
.
GetFont
();
Color
aColor
=
pOldFnt
->
GetColor
();
lcl_DrawSpecial
(
rInf
,
rPor
,
rRect
,
aColor
,
cChar
,
nOptions
);
}
#endif
void
SwTxtPaintInfo
::
DrawRect
(
const
SwRect
&
rRect
,
bool
bNoGraphic
,
void
SwTxtPaintInfo
::
DrawRect
(
const
SwRect
&
rRect
,
bool
bNoGraphic
,
bool
bRetouche
)
const
bool
bRetouche
)
const
{
{
...
@@ -951,7 +961,11 @@ void SwTxtPaintInfo::DrawTab( const SwLinePortion &rPor ) const
...
@@ -951,7 +961,11 @@ void SwTxtPaintInfo::DrawTab( const SwLinePortion &rPor ) const
const
sal_Unicode
cChar
=
GetTxtFrm
()
->
IsRightToLeft
()
?
CHAR_TAB_RTL
:
CHAR_TAB
;
const
sal_Unicode
cChar
=
GetTxtFrm
()
->
IsRightToLeft
()
?
CHAR_TAB_RTL
:
CHAR_TAB
;
const
sal_uInt8
nOptions
=
DRAW_SPECIAL_OPTIONS_CENTER
|
DRAW_SPECIAL_OPTIONS_ROTATE
;
const
sal_uInt8
nOptions
=
DRAW_SPECIAL_OPTIONS_CENTER
|
DRAW_SPECIAL_OPTIONS_ROTATE
;
lcl_DrawSpecial
(
*
this
,
rPor
,
aRect
,
Color
(
0x6a
,
0xbe
,
0xd3
),
cChar
,
nOptions
);
#ifdef LEGACY_NON_PRINTING_CHARACTER_COLOR_FUNCTIONALITY
lcl_DrawSpecial
(
*
this
,
rPor
,
aRect
,
cChar
,
nOptions
);
#else
lcl_DrawSpecial
(
*
this
,
rPor
,
aRect
,
NON_PRINTING_CHARACTER_COLOR
,
cChar
,
nOptions
);
#endif
}
}
}
}
...
@@ -971,7 +985,11 @@ void SwTxtPaintInfo::DrawLineBreak( const SwLinePortion &rPor ) const
...
@@ -971,7 +985,11 @@ void SwTxtPaintInfo::DrawLineBreak( const SwLinePortion &rPor ) const
CHAR_LINEBREAK_RTL
:
CHAR_LINEBREAK
;
CHAR_LINEBREAK_RTL
:
CHAR_LINEBREAK
;
const
sal_uInt8
nOptions
=
0
;
const
sal_uInt8
nOptions
=
0
;
#ifdef LEGACY_NON_PRINTING_CHARACTER_COLOR_FUNCTIONALITY
lcl_DrawSpecial
(
*
this
,
rPor
,
aRect
,
cChar
,
nOptions
);
#else
lcl_DrawSpecial
(
*
this
,
rPor
,
aRect
,
Color
(
NON_PRINTING_CHARACTER_COLOR
),
cChar
,
nOptions
);
lcl_DrawSpecial
(
*
this
,
rPor
,
aRect
,
Color
(
NON_PRINTING_CHARACTER_COLOR
),
cChar
,
nOptions
);
#endif
}
}
((
SwLinePortion
&
)
rPor
).
Width
(
nOldWidth
);
((
SwLinePortion
&
)
rPor
).
Width
(
nOldWidth
);
...
...
sw/source/core/text/porrst.cxx
Dosyayı görüntüle @
3a2010c7
...
@@ -61,7 +61,12 @@ void SwTmpEndPortion::Paint( const SwTxtPaintInfo &rInf ) const
...
@@ -61,7 +61,12 @@ void SwTmpEndPortion::Paint( const SwTxtPaintInfo &rInf ) const
{
{
if
(
rInf
.
OnWin
()
&&
rInf
.
GetOpt
().
IsParagraph
()
)
if
(
rInf
.
OnWin
()
&&
rInf
.
GetOpt
().
IsParagraph
()
)
{
{
#ifdef LEGACY_NON_PRINTING_CHARACTER_COLOR_FUNCTIONALITY
const
OUString
aTmp
(
CH_PAR
);
rInf
.
DrawText
(
aTmp
,
*
this
);
#else
rInf
.
DrawSpecial
(
*
this
,
CH_PAR
,
Color
(
NON_PRINTING_CHARACTER_COLOR
)
);
rInf
.
DrawSpecial
(
*
this
,
CH_PAR
,
Color
(
NON_PRINTING_CHARACTER_COLOR
)
);
#endif
}
}
}
}
...
...
sw/source/core/txtnode/fntcache.cxx
Dosyayı görüntüle @
3a2010c7
...
@@ -1353,7 +1353,11 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
...
@@ -1353,7 +1353,11 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
{
{
const
OUString
*
pStr
=
&
rInf
.
GetText
();
const
OUString
*
pStr
=
&
rInf
.
GetText
();
OUString
aStr
;
OUString
aStr
;
#ifndef LEGACY_NON_PRINTING_CHARACTER_COLOR_FUNCTIONALITY
OUString
aBulletOverlay
;
OUString
aBulletOverlay
;
#endif
bool
bBullet
=
rInf
.
GetBullet
();
bool
bBullet
=
rInf
.
GetBullet
();
if
(
bSymbol
)
if
(
bSymbol
)
bBullet
=
false
;
bBullet
=
false
;
...
@@ -1479,9 +1483,26 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
...
@@ -1479,9 +1483,26 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
aStr
=
rInf
.
GetText
().
copy
(
nCopyStart
,
nCopyLen
);
aStr
=
rInf
.
GetText
().
copy
(
nCopyStart
,
nCopyLen
);
pStr
=
&
aStr
;
pStr
=
&
aStr
;
#ifdef LEGACY_NON_PRINTING_CHARACTER_COLOR_FUNCTIONALITY
for
(
sal_Int32
i
=
0
;
i
<
aStr
.
getLength
();
++
i
)
{
if
(
CH_BLANK
==
aStr
[
i
])
{
/* fdo#72488 Hack: try to see if the space is zero width
* and don't bother with inserting a bullet in this case.
*/
if
((
i
+
nCopyStart
+
1
>=
rInf
.
GetLen
())
||
pKernArray
[
i
+
nCopyStart
]
!=
pKernArray
[
i
+
nCopyStart
+
1
])
{
aStr
=
aStr
.
replaceAt
(
i
,
1
,
OUString
(
CH_BULLET
));
}
}
}
#else
aBulletOverlay
=
rInf
.
GetText
().
copy
(
nCopyStart
,
nCopyLen
);
aBulletOverlay
=
rInf
.
GetText
().
copy
(
nCopyStart
,
nCopyLen
);
for
(
sal_Int32
i
=
0
;
i
<
aBulletOverlay
.
getLength
();
++
i
)
for
(
sal_Int32
i
=
0
;
i
<
aBulletOverlay
.
getLength
();
++
i
)
{
if
(
CH_BLANK
==
aBulletOverlay
[
i
]
)
if
(
CH_BLANK
==
aBulletOverlay
[
i
]
)
{
{
/* fdo#72488 Hack: try to see if the space is zero width
/* fdo#72488 Hack: try to see if the space is zero width
...
@@ -1501,6 +1522,8 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
...
@@ -1501,6 +1522,8 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
{
{
aBulletOverlay
=
aBulletOverlay
.
replaceAt
(
i
,
1
,
OUString
(
CH_BLANK
));
aBulletOverlay
=
aBulletOverlay
.
replaceAt
(
i
,
1
,
OUString
(
CH_BLANK
));
}
}
}
#endif
}
}
sal_Int32
nCnt
=
rInf
.
GetText
().
getLength
();
sal_Int32
nCnt
=
rInf
.
GetText
().
getLength
();
...
@@ -1724,6 +1747,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
...
@@ -1724,6 +1747,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
rInf
.
GetOut
().
DrawTextArray
(
aPos
,
*
pStr
,
pKernArray
+
nOffs
,
rInf
.
GetOut
().
DrawTextArray
(
aPos
,
*
pStr
,
pKernArray
+
nOffs
,
nTmpIdx
+
nOffs
,
nLen
-
nOffs
);
nTmpIdx
+
nOffs
,
nLen
-
nOffs
);
#ifndef LEGACY_NON_PRINTING_CHARACTER_COLOR_FUNCTIONALITY
if
(
bBullet
)
if
(
bBullet
)
{
{
rInf
.
GetOut
().
Push
();
rInf
.
GetOut
().
Push
();
...
@@ -1747,6 +1771,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
...
@@ -1747,6 +1771,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
pTmpFont
->
SetStrikeout
(
aPreviousStrikeout
);
pTmpFont
->
SetStrikeout
(
aPreviousStrikeout
);
rInf
.
GetOut
().
Pop
();
rInf
.
GetOut
().
Pop
();
}
}
#endif
}
}
}
}
delete
[]
pScrArray
;
delete
[]
pScrArray
;
...
...
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