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
987356e2
Kaydet (Commit)
987356e2
authored
Eyl 05, 2013
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert include/editeng/svxfont.hxx from String to OUString
Change-Id: Ibee55393373d4b8bc9e17effc2f2bdf862c17cc9
üst
af40ffdc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
47 deletions
+47
-47
svxfont.cxx
editeng/source/items/svxfont.cxx
+32
-32
svxfont.hxx
include/editeng/svxfont.hxx
+15
-15
No files found.
editeng/source/items/svxfont.cxx
Dosyayı görüntüle @
987356e2
...
...
@@ -349,8 +349,8 @@ Font SvxFont::ChgPhysFont( OutputDevice *pOut ) const
}
Size
SvxFont
::
GetPhysTxtSize
(
const
OutputDevice
*
pOut
,
const
Xub
String
&
rTxt
,
const
xub_StrLen
nIdx
,
const
xub_StrLen
nLen
)
const
Size
SvxFont
::
GetPhysTxtSize
(
const
OutputDevice
*
pOut
,
const
OU
String
&
rTxt
,
const
sal_Int32
nIdx
,
const
sal_Int32
nLen
)
const
{
if
(
!
IsCaseMap
()
&&
!
IsKern
()
)
return
Size
(
pOut
->
GetTextWidth
(
rTxt
,
nIdx
,
nLen
),
...
...
@@ -363,8 +363,8 @@ Size SvxFont::GetPhysTxtSize( const OutputDevice *pOut, const XubString &rTxt,
else
{
// #108210#
const
Xub
String
aNewText
=
CalcCaseMap
(
rTxt
);
sal_Bool
bCaseMapLengthDiffers
(
aNewText
.
Len
()
!=
rTxt
.
Len
());
const
OU
String
aNewText
=
CalcCaseMap
(
rTxt
);
sal_Bool
bCaseMapLengthDiffers
(
aNewText
.
getLength
()
!=
rTxt
.
getLength
());
sal_Int32
nWidth
(
0L
);
if
(
bCaseMapLengthDiffers
)
...
...
@@ -389,7 +389,7 @@ Size SvxFont::GetPhysTxtSize( const OutputDevice *pOut, const XubString &rTxt,
return
aTxtSize
;
}
Size
SvxFont
::
GetPhysTxtSize
(
const
OutputDevice
*
pOut
,
const
Xub
String
&
rTxt
)
Size
SvxFont
::
GetPhysTxtSize
(
const
OutputDevice
*
pOut
,
const
OU
String
&
rTxt
)
{
if
(
!
IsCaseMap
()
&&
!
IsKern
()
)
return
Size
(
pOut
->
GetTextWidth
(
rTxt
),
pOut
->
GetTextHeight
()
);
...
...
@@ -401,14 +401,14 @@ Size SvxFont::GetPhysTxtSize( const OutputDevice *pOut, const XubString &rTxt )
else
aTxtSize
.
setWidth
(
pOut
->
GetTextWidth
(
CalcCaseMap
(
rTxt
)
)
);
if
(
IsKern
()
&&
(
rTxt
.
Len
()
>
1
)
)
aTxtSize
.
Width
()
+=
(
(
rTxt
.
Len
()
-
1
)
*
long
(
nKern
)
);
if
(
IsKern
()
&&
(
rTxt
.
getLength
()
>
1
)
)
aTxtSize
.
Width
()
+=
(
(
rTxt
.
getLength
()
-
1
)
*
long
(
nKern
)
);
return
aTxtSize
;
}
Size
SvxFont
::
QuickGetTextSize
(
const
OutputDevice
*
pOut
,
const
Xub
String
&
rTxt
,
const
sal_
uInt16
nIdx
,
const
sal_uInt16
nLen
,
sal_Int32
*
pDXArray
)
const
Size
SvxFont
::
QuickGetTextSize
(
const
OutputDevice
*
pOut
,
const
OU
String
&
rTxt
,
const
sal_
Int32
nIdx
,
const
sal_Int32
nLen
,
sal_Int32
*
pDXArray
)
const
{
if
(
!
IsCaseMap
()
&&
!
IsKern
()
)
return
Size
(
pOut
->
GetTextArray
(
rTxt
,
pDXArray
,
nIdx
,
nLen
),
...
...
@@ -438,15 +438,15 @@ Size SvxFont::QuickGetTextSize( const OutputDevice *pOut, const XubString &rTxt,
}
Size
SvxFont
::
GetTxtSize
(
const
OutputDevice
*
pOut
,
const
Xub
String
&
rTxt
,
const
xub_StrLen
nIdx
,
const
xub_StrLen
nLen
)
const
Size
SvxFont
::
GetTxtSize
(
const
OutputDevice
*
pOut
,
const
OU
String
&
rTxt
,
const
sal_Int32
nIdx
,
const
sal_Int32
nLen
)
const
{
xub_StrLen
nTmp
=
nLen
;
if
(
nTmp
==
S
TRING_LEN
)
// already initialized?
nTmp
=
rTxt
.
Len
();
sal_Int32
nTmp
=
nLen
;
if
(
nTmp
==
S
AL_MAX_INT32
)
// already initialized?
nTmp
=
rTxt
.
getLength
();
Font
aOldFont
(
ChgPhysFont
((
OutputDevice
*
)
pOut
)
);
Size
aTxtSize
;
if
(
IsCapital
()
&&
rTxt
.
Len
()
)
if
(
IsCapital
()
&&
!
rTxt
.
isEmpty
()
)
{
aTxtSize
=
GetCapitalSize
(
pOut
,
rTxt
,
nIdx
,
nTmp
);
}
...
...
@@ -457,8 +457,8 @@ Size SvxFont::GetTxtSize( const OutputDevice *pOut, const XubString &rTxt,
void
SvxFont
::
QuickDrawText
(
OutputDevice
*
pOut
,
const
Point
&
rPos
,
const
Xub
String
&
rTxt
,
const
xub_StrLen
nIdx
,
const
xub_StrLen
nLen
,
const
sal_Int32
*
pDXArray
)
const
const
Point
&
rPos
,
const
OU
String
&
rTxt
,
const
sal_Int32
nIdx
,
const
sal_Int32
nLen
,
const
sal_Int32
*
pDXArray
)
const
{
// Font has to be selected in OutputDevice...
if
(
!
IsCaseMap
()
&&
!
IsCapital
()
&&
!
IsKern
()
&&
!
IsEsc
()
)
...
...
@@ -509,15 +509,15 @@ void SvxFont::QuickDrawText( OutputDevice *pOut,
void
SvxFont
::
DrawPrev
(
OutputDevice
*
pOut
,
Printer
*
pPrinter
,
const
Point
&
rPos
,
const
Xub
String
&
rTxt
,
const
xub_StrLen
nIdx
,
const
xub_StrLen
nLen
)
const
const
Point
&
rPos
,
const
OU
String
&
rTxt
,
const
sal_Int32
nIdx
,
const
sal_Int32
nLen
)
const
{
if
(
!
nLen
||
!
rTxt
.
Len
()
)
if
(
!
nLen
||
rTxt
.
isEmpty
()
)
return
;
xub_StrLen
nTmp
=
nLen
;
sal_Int32
nTmp
=
nLen
;
if
(
nTmp
==
S
TRING_LEN
)
// already initialized?
nTmp
=
rTxt
.
Len
();
if
(
nTmp
==
S
AL_MAX_INT32
)
// already initialized?
nTmp
=
rTxt
.
getLength
();
Point
aPos
(
rPos
);
if
(
nEsc
)
...
...
@@ -546,17 +546,17 @@ void SvxFont::DrawPrev( OutputDevice *pOut, Printer* pPrinter,
else
{
// #108210#
const
Xub
String
aNewText
=
CalcCaseMap
(
rTxt
);
sal_Bool
bCaseMapLengthDiffers
(
aNewText
.
Len
()
!=
rTxt
.
Len
());
const
OU
String
aNewText
=
CalcCaseMap
(
rTxt
);
sal_Bool
bCaseMapLengthDiffers
(
aNewText
.
getLength
()
!=
rTxt
.
getLength
());
if
(
bCaseMapLengthDiffers
)
{
// If strings differ work preparing the necessary snippet to address that
// potential difference
const
XubString
aSnippet
(
rTxt
,
nIdx
,
nTmp
);
Xub
String
_aNewText
=
CalcCaseMap
(
aSnippet
);
const
OUString
aSnippet
(
rTxt
.
copy
(
nIdx
,
nTmp
)
);
OU
String
_aNewText
=
CalcCaseMap
(
aSnippet
);
pOut
->
DrawStretchText
(
aPos
,
aSize
.
Width
(),
_aNewText
,
0
,
_aNewText
.
Len
()
);
pOut
->
DrawStretchText
(
aPos
,
aSize
.
Width
(),
_aNewText
,
0
,
_aNewText
.
getLength
()
);
}
else
{
...
...
@@ -632,8 +632,8 @@ void SvxDoGetCapitalSize::Do( const XubString &_rTxt, const xub_StrLen _nIdx,
aTxtSize
.
Width
()
+=
(
_nLen
*
long
(
nKern
)
);
}
Size
SvxFont
::
GetCapitalSize
(
const
OutputDevice
*
pOut
,
const
Xub
String
&
rTxt
,
const
xub_StrLen
nIdx
,
const
xub_StrLen
nLen
)
const
Size
SvxFont
::
GetCapitalSize
(
const
OutputDevice
*
pOut
,
const
OU
String
&
rTxt
,
const
sal_Int32
nIdx
,
const
sal_Int32
nLen
)
const
{
// Start:
SvxDoGetCapitalSize
aDo
(
(
SvxFont
*
)
this
,
pOut
,
rTxt
,
nIdx
,
nLen
,
nKern
);
...
...
@@ -743,8 +743,8 @@ void SvxDoDrawCapital::Do( const XubString &_rTxt, const xub_StrLen _nIdx,
*************************************************************************/
void
SvxFont
::
DrawCapital
(
OutputDevice
*
pOut
,
const
Point
&
rPos
,
const
Xub
String
&
rTxt
,
const
xub_StrLen
nIdx
,
const
xub_StrLen
nLen
)
const
const
Point
&
rPos
,
const
OU
String
&
rTxt
,
const
sal_Int32
nIdx
,
const
sal_Int32
nLen
)
const
{
SvxDoDrawCapital
aDo
(
(
SvxFont
*
)
this
,
pOut
,
rTxt
,
nIdx
,
nLen
,
rPos
,
nKern
);
DoOnCapitals
(
aDo
);
...
...
include/editeng/svxfont.hxx
Dosyayı görüntüle @
987356e2
...
...
@@ -80,28 +80,28 @@ public:
void
SetPhysFont
(
OutputDevice
*
pOut
)
const
;
Font
ChgPhysFont
(
OutputDevice
*
pOut
)
const
;
Size
GetCapitalSize
(
const
OutputDevice
*
pOut
,
const
String
&
rTxt
,
const
sal_
uInt16
nIdx
,
const
sal_uInt16
nLen
)
const
;
void
DrawCapital
(
OutputDevice
*
pOut
,
const
Point
&
rPos
,
const
String
&
rTxt
,
const
sal_
uInt16
nIdx
,
const
sal_uInt16
nLen
)
const
;
Size
GetCapitalSize
(
const
OutputDevice
*
pOut
,
const
OU
String
&
rTxt
,
const
sal_
Int32
nIdx
,
const
sal_Int32
nLen
)
const
;
void
DrawCapital
(
OutputDevice
*
pOut
,
const
Point
&
rPos
,
const
OU
String
&
rTxt
,
const
sal_
Int32
nIdx
,
const
sal_Int32
nLen
)
const
;
Size
GetPhysTxtSize
(
const
OutputDevice
*
pOut
,
const
String
&
rTxt
,
const
sal_
uInt16
nIdx
,
const
sal_uInt16
nLen
)
const
;
Size
GetPhysTxtSize
(
const
OutputDevice
*
pOut
,
const
OU
String
&
rTxt
,
const
sal_
Int32
nIdx
,
const
sal_Int32
nLen
)
const
;
Size
GetPhysTxtSize
(
const
OutputDevice
*
pOut
,
const
String
&
rTxt
);
Size
GetPhysTxtSize
(
const
OutputDevice
*
pOut
,
const
OU
String
&
rTxt
);
Size
GetTxtSize
(
const
OutputDevice
*
pOut
,
const
String
&
rTxt
,
const
sal_
uInt16
nIdx
=
0
,
const
sal_uInt16
nLen
=
STRING_LEN
)
const
;
Size
GetTxtSize
(
const
OutputDevice
*
pOut
,
const
OU
String
&
rTxt
,
const
sal_
Int32
nIdx
=
0
,
const
sal_Int32
nLen
=
SAL_MAX_INT32
)
const
;
void
QuickDrawText
(
OutputDevice
*
pOut
,
const
Point
&
rPos
,
const
String
&
rTxt
,
const
sal_
uInt16
nIdx
=
0
,
const
sal_uInt16
nLen
=
STRING_LEN
,
const
sal_Int32
*
pDXArray
=
NULL
)
const
;
void
QuickDrawText
(
OutputDevice
*
pOut
,
const
Point
&
rPos
,
const
OU
String
&
rTxt
,
const
sal_
Int32
nIdx
=
0
,
const
sal_Int32
nLen
=
SAL_MAX_INT32
,
const
sal_Int32
*
pDXArray
=
NULL
)
const
;
Size
QuickGetTextSize
(
const
OutputDevice
*
pOut
,
const
String
&
rTxt
,
const
sal_
uInt16
nIdx
,
const
sal_uInt16
nLen
,
sal_Int32
*
pDXArray
=
NULL
)
const
;
Size
QuickGetTextSize
(
const
OutputDevice
*
pOut
,
const
OU
String
&
rTxt
,
const
sal_
Int32
nIdx
,
const
sal_Int32
nLen
,
sal_Int32
*
pDXArray
=
NULL
)
const
;
void
DrawPrev
(
OutputDevice
*
pOut
,
Printer
*
pPrinter
,
const
Point
&
rPos
,
const
String
&
rTxt
,
const
sal_
uInt16
nIdx
=
0
,
const
sal_uInt16
nLen
=
STRING_LEN
)
const
;
const
Point
&
rPos
,
const
OU
String
&
rTxt
,
const
sal_
Int32
nIdx
=
0
,
const
sal_Int32
nLen
=
SAL_MAX_INT32
)
const
;
static
void
DrawArrow
(
OutputDevice
&
rOut
,
const
Rectangle
&
rRect
,
const
Size
&
rSize
,
const
Color
&
rCol
,
sal_Bool
bLeft
);
...
...
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