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
5eb475f3
Kaydet (Commit)
5eb475f3
authored
Eyl 27, 2011
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
ByteString->rtl::OStringBuffer
üst
84841b11
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
6 deletions
+20
-6
ppdparser.cxx
vcl/unx/generic/printer/ppdparser.cxx
+20
-6
No files found.
vcl/unx/generic/printer/ppdparser.cxx
Dosyayı görüntüle @
5eb475f3
...
@@ -923,6 +923,20 @@ String PPDParser::handleTranslation(const rtl::OString& i_rString, bool bIsGloba
...
@@ -923,6 +923,20 @@ String PPDParser::handleTranslation(const rtl::OString& i_rString, bool bIsGloba
return
OStringToOUString
(
aTrans
.
makeStringAndClear
(),
bIsGlobalized
?
RTL_TEXTENCODING_UTF8
:
m_aFileEncoding
);
return
OStringToOUString
(
aTrans
.
makeStringAndClear
(),
bIsGlobalized
?
RTL_TEXTENCODING_UTF8
:
m_aFileEncoding
);
}
}
namespace
{
bool
oddDoubleQuoteCount
(
rtl
::
OStringBuffer
&
rBuffer
)
{
bool
bHasOddCount
=
false
;
for
(
sal_Int32
i
=
0
;
i
<
rBuffer
.
getLength
();
++
i
)
{
if
(
rBuffer
[
i
]
==
'"'
)
bHasOddCount
=
!
bHasOddCount
;
}
return
bHasOddCount
;
}
}
void
PPDParser
::
parse
(
::
std
::
list
<
rtl
::
OString
>&
rLines
)
void
PPDParser
::
parse
(
::
std
::
list
<
rtl
::
OString
>&
rLines
)
{
{
std
::
list
<
rtl
::
OString
>::
iterator
line
=
rLines
.
begin
();
std
::
list
<
rtl
::
OString
>::
iterator
line
=
rLines
.
begin
();
...
@@ -1020,16 +1034,16 @@ void PPDParser::parse( ::std::list< rtl::OString >& rLines )
...
@@ -1020,16 +1034,16 @@ void PPDParser::parse( ::std::list< rtl::OString >& rLines )
aLine
=
aCurrentLine
.
Copy
(
nPos
+
1
);
aLine
=
aCurrentLine
.
Copy
(
nPos
+
1
);
if
(
aLine
.
Len
()
)
if
(
aLine
.
Len
()
)
{
{
while
(
!
(
aLine
.
GetTokenCount
(
'"'
)
&
1
)
&&
//while( ! ( aLine.GetTokenCount( '"' ) & 1 ) &&
line
!=
rLines
.
end
()
)
rtl
::
OStringBuffer
aBuffer
(
aLine
);
// while there is an even number of tokens; that means
while
(
line
!=
rLines
.
end
()
&&
oddDoubleQuoteCount
(
aBuffer
))
// an odd number of doubleqoutes
{
{
// copy the newlines also
// copy the newlines also
a
Line
+=
'\n'
;
a
Buffer
.
append
(
'\n'
)
;
a
Line
+=
ByteString
(
*
line
);
a
Buffer
.
append
(
*
line
);
++
line
;
++
line
;
}
}
aLine
=
aBuffer
.
makeStringAndClear
();
}
}
aLine
=
WhitespaceToSpace
(
aLine
);
aLine
=
WhitespaceToSpace
(
aLine
);
...
...
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