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
8fcc5df7
Kaydet (Commit)
8fcc5df7
authored
Agu 07, 2013
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert vcl/source/filter/wmf/winmtf.hxx from String to OUString
Change-Id: I4c670e53f83af7a0d99ec4135cb614d30811a3b8
üst
924c2177
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
25 deletions
+26
-25
enhwmf.cxx
vcl/source/filter/wmf/enhwmf.cxx
+12
-11
winmtf.cxx
vcl/source/filter/wmf/winmtf.cxx
+5
-5
winmtf.hxx
vcl/source/filter/wmf/winmtf.hxx
+2
-2
winwmf.cxx
vcl/source/filter/wmf/winwmf.cxx
+7
-7
No files found.
vcl/source/filter/wmf/enhwmf.cxx
Dosyayı görüntüle @
8fcc5df7
...
...
@@ -1193,7 +1193,8 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
case
EMR_EXTTEXTOUTW
:
{
sal_Int32
nLeft
,
nTop
,
nRight
,
nBottom
,
ptlReferenceX
,
ptlReferenceY
,
nGfxMode
,
nXScale
,
nYScale
;
sal_uInt32
nCurPos
,
nLen
,
nOffString
,
nOptions
,
offDx
;
sal_uInt32
nCurPos
,
nOffString
,
nOptions
,
offDx
;
sal_Int32
nLen
;
sal_Int32
*
pDX
=
NULL
;
nCurPos
=
pWMF
->
Tell
()
-
8
;
...
...
@@ -1211,7 +1212,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
DBG_ASSERT
(
(
nOptions
&
(
ETO_PDY
|
ETO_GLYPH_INDEX
)
)
==
0
,
"SJ: ETO_PDY || ETO_GLYPH_INDEX in EMF"
);
Point
aPos
(
ptlReferenceX
,
ptlReferenceY
);
if
(
nLen
&&
(
nLen
<
SAL_MAX_UINT32
/
sizeof
(
sal_Int32
)
)
)
if
(
nLen
&&
nLen
<
static_cast
<
sal_Int32
>
(
SAL_MAX_UINT32
/
sizeof
(
sal_Int32
)
)
)
{
if
(
offDx
&&
((
nCurPos
+
offDx
+
nLen
*
4
)
<=
nNextPos
)
)
{
...
...
@@ -1219,33 +1220,33 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
if
(
(
nLen
*
sizeof
(
sal_uInt32
)
)
<=
(
nEndPos
-
pWMF
->
Tell
()
)
)
{
pDX
=
new
sal_Int32
[
nLen
];
sal_
u
Int32
i
;
sal_Int32
i
;
for
(
i
=
0
;
i
<
nLen
;
i
++
)
*
pWMF
>>
pDX
[
i
];
}
}
pWMF
->
Seek
(
nCurPos
+
nOffString
);
String
aText
;
OU
String
aText
;
if
(
bFlag
)
{
if
(
nLen
<=
(
nEndPos
-
pWMF
->
Tell
()
)
)
if
(
nLen
<=
static_cast
<
sal_Int32
>
(
nEndPos
-
pWMF
->
Tell
()
)
)
{
sal_Char
*
pBuf
=
new
sal_Char
[
nLen
];
pWMF
->
Read
(
pBuf
,
nLen
);
aText
=
String
(
pBuf
,
(
sal_uInt16
)
nLen
,
pOut
->
GetCharSet
()
);
aText
=
OU
String
(
pBuf
,
(
sal_uInt16
)
nLen
,
pOut
->
GetCharSet
()
);
delete
[]
pBuf
;
if
(
aText
.
Len
()
!=
nLen
)
if
(
aText
.
getLength
()
!=
nLen
)
{
sal_uInt16
i
,
j
;
sal_Int32
*
pOldDx
=
pDX
;
pDX
=
new
sal_Int32
[
aText
.
Len
()
];
for
(
i
=
0
,
j
=
0
;
i
<
aText
.
Len
();
i
++
)
pDX
=
new
sal_Int32
[
aText
.
getLength
()
];
for
(
i
=
0
,
j
=
0
;
i
<
aText
.
getLength
();
i
++
)
{
sal_Unicode
cUniChar
=
aText
.
GetChar
(
i
)
;
sal_Unicode
cUniChar
=
aText
[
i
]
;
OString
aCharacter
(
&
cUniChar
,
1
,
pOut
->
GetCharSet
());
pDX
[
i
]
=
0
;
for
(
sal_Int32
k
=
0
;
(
k
<
aCharacter
.
getLength
()
)
&&
(
j
<
nLen
)
&&
(
i
<
aText
.
Len
()
);
++
k
)
for
(
sal_Int32
k
=
0
;
(
k
<
aCharacter
.
getLength
()
)
&&
(
j
<
nLen
)
&&
(
i
<
aText
.
getLength
()
);
++
k
)
pDX
[
i
]
+=
pOldDx
[
j
++
];
}
delete
[]
pOldDx
;
...
...
vcl/source/filter/wmf/winmtf.cxx
Dosyayı görüntüle @
8fcc5df7
...
...
@@ -1445,7 +1445,7 @@ void WinMtfOutput::DrawPolyBezier( Polygon& rPolygon, sal_Bool bTo, sal_Bool bRe
}
void
WinMtfOutput
::
DrawText
(
Point
&
rPosition
,
String
&
rText
,
sal_Int32
*
pDXArry
,
sal_Bool
bRecordPath
,
sal_Int32
nGfxMode
)
void
WinMtfOutput
::
DrawText
(
Point
&
rPosition
,
OU
String
&
rText
,
sal_Int32
*
pDXArry
,
sal_Bool
bRecordPath
,
sal_Int32
nGfxMode
)
{
UpdateClipRegion
();
rPosition
=
ImplMap
(
rPosition
);
...
...
@@ -1454,7 +1454,7 @@ void WinMtfOutput::DrawText( Point& rPosition, String& rText, sal_Int32* pDXArry
if
(
pDXArry
)
{
sal_Int32
i
,
nSum
,
nLen
=
rText
.
Len
();
sal_Int32
i
,
nSum
,
nLen
=
rText
.
getLength
();
for
(
i
=
0
,
nSum
=
0
;
i
<
nLen
;
i
++
)
{
...
...
@@ -1557,8 +1557,8 @@ void WinMtfOutput::DrawText( Point& rPosition, String& rText, sal_Int32* pDXArry
aVDev
.
SetFont
(
maFont
);
if
(
pDXArry
)
{
sal_uInt32
nLen
=
rText
.
Len
();
nTextWidth
=
aVDev
.
GetTextWidth
(
OUString
(
rText
.
GetChar
(
(
sal_uInt16
)(
nLen
-
1
)
)
)
);
sal_uInt32
nLen
=
rText
.
getLength
();
nTextWidth
=
aVDev
.
GetTextWidth
(
OUString
(
rText
[
nLen
-
1
]
)
);
if
(
nLen
>
1
)
nTextWidth
+=
pDXArry
[
nLen
-
2
];
}
...
...
@@ -1601,7 +1601,7 @@ void WinMtfOutput::DrawText( Point& rPosition, String& rText, sal_Int32* pDXArry
SolarMutexGuard
aGuard
;
VirtualDevice
aVDev
;
pDX
=
new
sal_Int32
[
rText
.
Len
()
];
pDX
=
new
sal_Int32
[
rText
.
getLength
()
];
aVDev
.
SetMapMode
(
MAP_100TH_MM
);
aVDev
.
SetFont
(
maLatestFont
);
aVDev
.
GetTextArray
(
rText
,
pDX
,
0
,
STRING_LEN
);
...
...
vcl/source/filter/wmf/winmtf.hxx
Dosyayı görüntüle @
8fcc5df7
...
...
@@ -136,7 +136,7 @@ struct LOGFONTW
sal_uInt8
lfClipPrecision
;
sal_uInt8
lfQuality
;
sal_uInt8
lfPitchAndFamily
;
String
alfFaceName
;
OUString
alfFaceName
;
};
struct
WMF_EXTERNALHEADER
;
...
...
@@ -750,7 +750,7 @@ public:
);
void
DrawText
(
Point
&
rPosition
,
String
&
rString
,
OU
String
&
rString
,
sal_Int32
*
pDXArry
=
NULL
,
sal_Bool
bRecordPath
=
sal_False
,
sal_Int32
nGraphicsMode
=
GM_COMPATIBLE
...
...
vcl/source/filter/wmf/winwmf.cxx
Dosyayı görüntüle @
8fcc5df7
...
...
@@ -454,7 +454,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
{
char
*
pChar
=
new
char
[
(
nLength
+
1
)
&~
1
];
pWMF
->
Read
(
pChar
,
(
nLength
+
1
)
&~
1
);
String
aText
(
pChar
,
nLength
,
pOut
->
GetCharSet
()
);
OU
String
aText
(
pChar
,
nLength
,
pOut
->
GetCharSet
()
);
delete
[]
pChar
;
Point
aPosition
(
ReadYX
()
);
pOut
->
DrawText
(
aPosition
,
aText
);
...
...
@@ -495,8 +495,8 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
}
char
*
pChar
=
new
char
[
(
nOriginalTextLen
+
1
)
&~
1
];
pWMF
->
Read
(
pChar
,
(
nOriginalTextLen
+
1
)
&~
1
);
String
aText
(
pChar
,
(
sal_uInt16
)
nOriginalTextLen
,
pOut
->
GetCharSet
()
);
// after this conversion the text may contain
nNewTextLen
=
aText
.
Len
();
// less character (japanese version), so the
OU
String
aText
(
pChar
,
(
sal_uInt16
)
nOriginalTextLen
,
pOut
->
GetCharSet
()
);
// after this conversion the text may contain
nNewTextLen
=
aText
.
getLength
();
// less character (japanese version), so the
delete
[]
pChar
;
// dxAry will not fit
if
(
nNewTextLen
)
...
...
@@ -518,7 +518,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
*
pWMF
>>
nDx
;
if
(
nNewTextLen
!=
nOriginalTextLen
)
{
sal_Unicode
nUniChar
=
aText
.
GetChar
(
i
)
;
sal_Unicode
nUniChar
=
aText
[
i
]
;
OString
aTmp
(
&
nUniChar
,
1
,
pOut
->
GetCharSet
());
if
(
aTmp
.
getLength
()
>
1
)
{
...
...
@@ -808,7 +808,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
aLogFont
.
lfOrientation
=
lfOrientation
;
aLogFont
.
lfWeight
=
lfWeight
;
CharSet
eCharSet
;
rtl_TextEncoding
eCharSet
;
if
(
(
aLogFont
.
lfCharSet
==
OEM_CHARSET
)
||
(
aLogFont
.
lfCharSet
==
DEFAULT_CHARSET
)
)
eCharSet
=
osl_getThreadTextEncoding
();
else
...
...
@@ -817,7 +817,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
eCharSet
=
osl_getThreadTextEncoding
();
if
(
eCharSet
==
RTL_TEXTENCODING_SYMBOL
)
eCharSet
=
RTL_TEXTENCODING_MS_1252
;
aLogFont
.
alfFaceName
=
String
(
lfFaceName
,
eCharSet
);
aLogFont
.
alfFaceName
=
OUString
(
lfFaceName
,
strlen
(
lfFaceName
)
,
eCharSet
);
pOut
->
CreateObject
(
GDI_FONT
,
new
WinMtfFontStyle
(
aLogFont
)
);
}
...
...
@@ -934,7 +934,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
if
(
Application
::
GetDefaultDevice
()
->
IsFontAvailable
(
pOut
->
GetFont
().
GetName
()
)
)
{
Point
aPt
;
String
aString
;
OU
String
aString
;
sal_uInt32
nStringLen
,
nDXCount
;
sal_Int32
*
pDXAry
=
NULL
;
SvMemoryStream
aMemoryStream
(
nEscLen
);
...
...
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