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
9268759a
Kaydet (Commit)
9268759a
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/wmfhr.hxx from String to OUString
Change-Id: I125eb51d27164791d79ef4364b68096ec5f4c1d4
üst
8fcc5df7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
20 deletions
+20
-20
wmfwr.cxx
vcl/source/filter/wmf/wmfwr.cxx
+16
-16
wmfwr.hxx
vcl/source/filter/wmf/wmfwr.hxx
+4
-4
No files found.
vcl/source/filter/wmf/wmfwr.cxx
Dosyayı görüntüle @
9268759a
...
...
@@ -419,17 +419,17 @@ void WMFWriter::WMFRecord_Escape( sal_uInt32 nEsc, sal_uInt32 nLen, const sal_In
/* if return value is true, then a complete unicode string and also a polygon replacement has been written,
so there is no more action necessary
*/
bool
WMFWriter
::
WMFRecord_Escape_Unicode
(
const
Point
&
rPoint
,
const
String
&
rUniStr
,
const
sal_Int32
*
pDXAry
)
bool
WMFWriter
::
WMFRecord_Escape_Unicode
(
const
Point
&
rPoint
,
const
OU
String
&
rUniStr
,
const
sal_Int32
*
pDXAry
)
{
bool
bEscapeUsed
=
false
;
sal_uInt32
i
,
nStringLen
=
rUniStr
.
Len
();
sal_uInt32
i
,
nStringLen
=
rUniStr
.
getLength
();
if
(
nStringLen
)
{
// first we will check if a comment is necessary
if
(
aSrcFont
.
GetCharSet
()
!=
RTL_TEXTENCODING_SYMBOL
)
// symbol is always byte character, so there is no unicode loss
{
const
sal_Unicode
*
pBuf
=
rUniStr
.
GetBuffe
r
();
const
sal_Unicode
*
pBuf
=
rUniStr
.
getSt
r
();
const
rtl_TextEncoding
aTextEncodingOrg
=
aSrcFont
.
GetCharSet
();
OString
aByteStr
(
OUStringToOString
(
rUniStr
,
aTextEncodingOrg
));
OUString
aUniStr2
(
OStringToOUString
(
aByteStr
,
aTextEncodingOrg
));
...
...
@@ -442,7 +442,7 @@ bool WMFWriter::WMFRecord_Escape_Unicode( const Point& rPoint, const String& rUn
if
(
i
!=
nStringLen
)
// after conversion the characters are not original,
{
// try again, with determining a better charset from unicode char
pBuf
=
rUniStr
.
GetBuffe
r
();
pBuf
=
rUniStr
.
getSt
r
();
const
sal_Unicode
*
pCheckChar
=
pBuf
;
rtl_TextEncoding
aTextEncoding
=
getBestMSEncodingByChar
(
*
pCheckChar
);
// try the first character
for
(
i
=
1
;
i
<
nStringLen
;
i
++
)
...
...
@@ -493,7 +493,7 @@ bool WMFWriter::WMFRecord_Escape_Unicode( const Point& rPoint, const String& rUn
<<
static_cast
<
sal_Int32
>
(
aPt
.
Y
())
<<
nStringLen
;
for
(
i
=
0
;
i
<
nStringLen
;
i
++
)
aMemoryStream
<<
rUniStr
.
GetChar
(
(
sal_uInt16
)
i
)
;
aMemoryStream
<<
rUniStr
[
i
]
;
aMemoryStream
<<
nDXCount
;
for
(
i
=
0
;
i
<
nDXCount
;
i
++
)
aMemoryStream
<<
pDXAry
[
i
];
...
...
@@ -518,9 +518,9 @@ bool WMFWriter::WMFRecord_Escape_Unicode( const Point& rPoint, const String& rUn
}
void
WMFWriter
::
WMFRecord_ExtTextOut
(
const
Point
&
rPoint
,
const
String
&
rString
,
const
sal_Int32
*
pDXAry
)
const
OU
String
&
rString
,
const
sal_Int32
*
pDXAry
)
{
sal_
uInt16
nOriginalTextLen
=
rString
.
Len
();
sal_
Int32
nOriginalTextLen
=
rString
.
getLength
();
if
(
(
nOriginalTextLen
<=
1
)
||
(
pDXAry
==
NULL
)
)
{
...
...
@@ -532,7 +532,7 @@ void WMFWriter::WMFRecord_ExtTextOut( const Point & rPoint,
TrueExtTextOut
(
rPoint
,
rString
,
aByteString
,
pDXAry
);
}
void
WMFWriter
::
TrueExtTextOut
(
const
Point
&
rPoint
,
const
String
&
rString
,
void
WMFWriter
::
TrueExtTextOut
(
const
Point
&
rPoint
,
const
OU
String
&
rString
,
const
OString
&
rByteString
,
const
sal_Int32
*
pDXAry
)
{
WriteRecordHeader
(
0
,
W_META_EXTTEXTOUT
);
...
...
@@ -543,7 +543,7 @@ void WMFWriter::TrueExtTextOut( const Point & rPoint, const String & rString,
if
(
nNewTextLen
&
1
)
*
pWMF
<<
(
sal_uInt8
)
0
;
sal_
uInt16
nOriginalTextLen
=
rString
.
Len
();
sal_
Int32
nOriginalTextLen
=
rString
.
getLength
();
sal_Int16
*
pConvertedDXAry
=
new
sal_Int16
[
nOriginalTextLen
];
sal_Int32
j
=
0
;
pConvertedDXAry
[
j
++
]
=
(
sal_Int16
)
ScaleWidth
(
pDXAry
[
0
]
);
...
...
@@ -557,7 +557,7 @@ void WMFWriter::TrueExtTextOut( const Point & rPoint, const String & rString,
*
pWMF
<<
nDx
;
if
(
nOriginalTextLen
<
nNewTextLen
)
{
sal_Unicode
nUniChar
=
rString
.
GetChar
(
i
)
;
sal_Unicode
nUniChar
=
rString
[
i
]
;
OString
aTemp
(
&
nUniChar
,
1
,
aSrcFont
.
GetCharSet
());
j
=
aTemp
.
getLength
();
while
(
--
j
>
0
)
...
...
@@ -815,7 +815,7 @@ void WMFWriter::WMFRecord_StretchDIB( const Point & rPoint, const Size & rSize,
}
void
WMFWriter
::
WMFRecord_TextOut
(
const
Point
&
rPoint
,
const
String
&
rStr
)
void
WMFWriter
::
WMFRecord_TextOut
(
const
Point
&
rPoint
,
const
OU
String
&
rStr
)
{
rtl_TextEncoding
eChrSet
=
aSrcFont
.
GetCharSet
();
OString
aString
(
OUStringToOString
(
rStr
,
eChrSet
));
...
...
@@ -1169,7 +1169,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
case
META_TEXTRECT_ACTION
:
{
const
MetaTextRectAction
*
pA
=
(
const
MetaTextRectAction
*
)
pMA
;
String
aTemp
(
pA
->
GetText
()
);
OU
String
aTemp
(
pA
->
GetText
()
);
aSrcLineInfo
=
LineInfo
();
SetAllAttr
();
...
...
@@ -1182,7 +1182,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
case
META_TEXT_ACTION
:
{
const
MetaTextAction
*
pA
=
(
const
MetaTextAction
*
)
pMA
;
String
aTemp
(
pA
->
GetText
(),
pA
->
GetIndex
(),
pA
->
GetLen
()
);
OUString
aTemp
=
pA
->
GetText
().
copy
(
pA
->
GetIndex
(),
pA
->
GetLen
()
);
aSrcLineInfo
=
LineInfo
();
SetAllAttr
();
if
(
!
WMFRecord_Escape_Unicode
(
pA
->
GetPoint
(),
aTemp
,
NULL
)
)
...
...
@@ -1194,7 +1194,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
{
const
MetaTextArrayAction
*
pA
=
(
const
MetaTextArrayAction
*
)
pMA
;
String
aTemp
(
pA
->
GetText
(),
pA
->
GetIndex
(),
pA
->
GetLen
()
);
OUString
aTemp
=
pA
->
GetText
().
copy
(
pA
->
GetIndex
(),
pA
->
GetLen
()
);
aSrcLineInfo
=
LineInfo
();
SetAllAttr
();
if
(
!
WMFRecord_Escape_Unicode
(
pA
->
GetPoint
(),
aTemp
,
pA
->
GetDXArray
()
)
)
...
...
@@ -1205,13 +1205,13 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
case
META_STRETCHTEXT_ACTION
:
{
const
MetaStretchTextAction
*
pA
=
(
const
MetaStretchTextAction
*
)
pMA
;
String
aTemp
(
pA
->
GetText
(),
pA
->
GetIndex
(),
pA
->
GetLen
()
);
OUString
aTemp
=
pA
->
GetText
().
copy
(
pA
->
GetIndex
(),
pA
->
GetLen
()
);
sal_uInt16
nLen
,
i
;
sal_Int32
nNormSize
;
pVirDev
->
SetFont
(
aSrcFont
);
nLen
=
aTemp
.
Len
();
nLen
=
aTemp
.
getLength
();
sal_Int32
*
pDXAry
=
nLen
?
new
sal_Int32
[
nLen
]
:
NULL
;
nNormSize
=
pVirDev
->
GetTextArray
(
aTemp
,
pDXAry
);
for
(
i
=
0
;
i
<
(
nLen
-
1
);
i
++
)
...
...
vcl/source/filter/wmf/wmfwr.hxx
Dosyayı görüntüle @
9268759a
...
...
@@ -154,10 +154,10 @@ private:
void
WMFRecord_DeleteObject
(
sal_uInt16
nObjectHandle
);
void
WMFRecord_Ellipse
(
const
Rectangle
&
rRect
);
void
WMFRecord_Escape
(
sal_uInt32
nEsc
,
sal_uInt32
nLen
,
const
sal_Int8
*
pData
);
bool
WMFRecord_Escape_Unicode
(
const
Point
&
rPoint
,
const
String
&
rStr
,
const
sal_Int32
*
pDXAry
);
void
WMFRecord_ExtTextOut
(
const
Point
&
rPoint
,
const
String
&
rString
,
const
sal_Int32
*
pDXAry
);
bool
WMFRecord_Escape_Unicode
(
const
Point
&
rPoint
,
const
OU
String
&
rStr
,
const
sal_Int32
*
pDXAry
);
void
WMFRecord_ExtTextOut
(
const
Point
&
rPoint
,
const
OU
String
&
rString
,
const
sal_Int32
*
pDXAry
);
void
TrueExtTextOut
(
const
Point
&
rPoint
,
const
String
&
rString
,
void
TrueExtTextOut
(
const
Point
&
rPoint
,
const
OU
String
&
rString
,
const
OString
&
rByteString
,
const
sal_Int32
*
pDXAry
);
void
TrueTextOut
(
const
Point
&
rPoint
,
const
OString
&
rString
);
void
WMFRecord_LineTo
(
const
Point
&
rPoint
);
...
...
@@ -180,7 +180,7 @@ private:
void
WMFRecord_SetWindowExt
(
const
Size
&
rSize
);
void
WMFRecord_SetWindowOrg
(
const
Point
&
rPoint
);
void
WMFRecord_StretchDIB
(
const
Point
&
rPoint
,
const
Size
&
rSize
,
const
Bitmap
&
rBitmap
,
sal_uInt32
nROP
=
0UL
);
void
WMFRecord_TextOut
(
const
Point
&
rPoint
,
const
String
&
rString
);
void
WMFRecord_TextOut
(
const
Point
&
rPoint
,
const
OU
String
&
rString
);
void
WMFRecord_EndOfFile
();
void
WMFRecord_IntersectClipRect
(
const
Rectangle
&
rRect
);
...
...
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