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
6dc46553
Kaydet (Commit)
6dc46553
authored
Ock 10, 2012
tarafından
Christina Rossmanith
Kaydeden (comit)
Caolán McNamara
Ock 10, 2012
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Replace (Byte)String with rtl::O(U)String
üst
a74627d5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
32 deletions
+33
-32
genprnpsp.cxx
vcl/generic/print/genprnpsp.cxx
+24
-25
genpspgraphics.cxx
vcl/generic/print/genpspgraphics.cxx
+9
-7
No files found.
vcl/generic/print/genprnpsp.cxx
Dosyayı görüntüle @
6dc46553
...
...
@@ -83,7 +83,7 @@ extern "C"
{
typedef
int
(
*
setupFunction
)(
PrinterInfo
&
);
static
setupFunction
pSetupFunction
=
NULL
;
typedef
int
(
*
faxFunction
)(
String
&
);
typedef
int
(
*
faxFunction
)(
OU
String
&
);
static
faxFunction
pFaxNrFunction
=
NULL
;
}
...
...
@@ -170,7 +170,7 @@ static void copyJobDataToJobSetup( ImplJobSetup* pJobSetup, JobData& rData )
pJobSetup
->
mnPaperBin
=
0
;
if
(
rData
.
m_pParser
)
pKey
=
rData
.
m_pParser
->
getKey
(
String
(
RTL_CONSTASCII_USTRINGPARAM
(
"InputSlot"
)
)
);
pKey
=
rData
.
m_pParser
->
getKey
(
OU
String
(
RTL_CONSTASCII_USTRINGPARAM
(
"InputSlot"
)
)
);
if
(
pKey
)
pValue
=
rData
.
m_aContext
.
getValue
(
pKey
);
if
(
pKey
&&
pValue
)
...
...
@@ -190,7 +190,7 @@ static void copyJobDataToJobSetup( ImplJobSetup* pJobSetup, JobData& rData )
pJobSetup
->
meDuplexMode
=
DUPLEX_UNKNOWN
;
if
(
rData
.
m_pParser
)
pKey
=
rData
.
m_pParser
->
getKey
(
String
(
RTL_CONSTASCII_USTRINGPARAM
(
"Duplex"
)
)
);
pKey
=
rData
.
m_pParser
->
getKey
(
OU
String
(
RTL_CONSTASCII_USTRINGPARAM
(
"Duplex"
)
)
);
if
(
pKey
)
pValue
=
rData
.
m_aContext
.
getValue
(
pKey
);
if
(
pKey
&&
pValue
)
...
...
@@ -231,7 +231,7 @@ static void copyJobDataToJobSetup( ImplJobSetup* pJobSetup, JobData& rData )
// Needs a cleaner abstraction ...
#if defined( UNX )
static
bool
passFileToCommandLine
(
const
String
&
rFilename
,
const
String
&
rCommandLine
,
bool
bRemoveFile
=
true
)
static
bool
passFileToCommandLine
(
const
OUString
&
rFilename
,
const
OU
String
&
rCommandLine
,
bool
bRemoveFile
=
true
)
{
bool
bSuccess
=
false
;
...
...
@@ -315,19 +315,19 @@ static bool passFileToCommandLine( const String& rFilename, const String& rComma
}
#endif
static
bool
sendAFax
(
const
String
&
rFaxNumber
,
const
String
&
rFileName
,
const
String
&
rCommand
)
static
bool
sendAFax
(
const
OUString
&
rFaxNumber
,
const
OUString
&
rFileName
,
const
OU
String
&
rCommand
)
{
#if defined( UNX )
std
::
list
<
OUString
>
aFaxNumbers
;
if
(
!
rFaxNumber
.
Len
()
)
if
(
rFaxNumber
.
isEmpty
()
)
{
getPaLib
();
if
(
pFaxNrFunction
)
{
String
aNewNr
;
OU
String
aNewNr
;
if
(
pFaxNrFunction
(
aNewNr
)
)
aFaxNumbers
.
push_back
(
OUString
(
aNewNr
)
);
aFaxNumbers
.
push_back
(
aNewNr
);
}
}
else
...
...
@@ -357,11 +357,10 @@ static bool sendAFax( const String& rFaxNumber, const String& rFileName, const S
{
while
(
aFaxNumbers
.
begin
()
!=
aFaxNumbers
.
end
()
&&
bSuccess
)
{
String
aCmdLine
(
rCommand
);
String
aFaxNumber
(
aFaxNumbers
.
front
()
);
OU
String
aCmdLine
(
rCommand
);
OU
String
aFaxNumber
(
aFaxNumbers
.
front
()
);
aFaxNumbers
.
pop_front
();
while
(
aCmdLine
.
SearchAndReplace
(
String
(
RTL_CONSTASCII_USTRINGPARAM
(
"(PHONE)"
)
),
aFaxNumber
)
!=
STRING_NOTFOUND
)
;
aCmdLine
=
comphelper
::
string
::
replace
(
aCmdLine
,
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"(PHONE)"
)
),
aFaxNumber
);
#if OSL_DEBUG_LEVEL > 1
fprintf
(
stderr
,
"sending fax to
\"
%s
\"\n
"
,
OUStringToOString
(
aFaxNumber
,
osl_getThreadTextEncoding
()
).
getStr
()
);
#endif
...
...
@@ -381,12 +380,12 @@ static bool sendAFax( const String& rFaxNumber, const String& rFileName, const S
#endif
}
static
bool
createPdf
(
const
String
&
rToFile
,
const
String
&
rFromFile
,
const
String
&
rCommandLine
)
static
bool
createPdf
(
const
OUString
&
rToFile
,
const
OUString
&
rFromFile
,
const
OU
String
&
rCommandLine
)
{
#if defined( UNX )
String
aCommandLine
(
rCommandLine
);
while
(
aCommandLine
.
SearchAndReplace
(
String
(
RTL_CONSTASCII_USTRINGPARAM
(
"(OUTFILE)"
)
),
rToFile
)
!=
STRING_NOTFOUND
)
;
OU
String
aCommandLine
(
rCommandLine
);
aCommandLine
=
comphelper
::
string
::
replace
(
aCommandLine
,
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"(OUTFILE)"
)
),
rToFile
);
return
passFileToCommandLine
(
rFromFile
,
aCommandLine
);
#else
(
void
)
rToFile
;
(
void
)
rFromFile
;
(
void
)
rCommandLine
;
...
...
@@ -537,7 +536,7 @@ void PspSalInfoPrinter::InitPaperFormats( const ImplJobSetup* )
if
(
m_aJobData
.
m_pParser
)
{
const
PPDKey
*
pKey
=
m_aJobData
.
m_pParser
->
getKey
(
String
(
RTL_CONSTASCII_USTRINGPARAM
(
"PageSize"
)
)
);
const
PPDKey
*
pKey
=
m_aJobData
.
m_pParser
->
getKey
(
OU
String
(
RTL_CONSTASCII_USTRINGPARAM
(
"PageSize"
)
)
);
if
(
pKey
)
{
int
nValues
=
pKey
->
countValues
();
...
...
@@ -668,7 +667,7 @@ sal_Bool PspSalInfoPrinter::SetData(
// merge papersize if necessary
if
(
nSetDataFlags
&
SAL_JOBSET_PAPERSIZE
)
{
String
aPaper
;
OU
String
aPaper
;
if
(
pJobSetup
->
mePaperFormat
==
PAPER_USER
)
aPaper
=
aData
.
m_pParser
->
matchPaper
(
...
...
@@ -677,7 +676,7 @@ sal_Bool PspSalInfoPrinter::SetData(
else
aPaper
=
rtl
::
OStringToOUString
(
PaperInfo
::
toPSName
(
pJobSetup
->
mePaperFormat
),
RTL_TEXTENCODING_ISO_8859_1
);
pKey
=
aData
.
m_pParser
->
getKey
(
String
(
RTL_CONSTASCII_USTRINGPARAM
(
"PageSize"
)
)
);
pKey
=
aData
.
m_pParser
->
getKey
(
OU
String
(
RTL_CONSTASCII_USTRINGPARAM
(
"PageSize"
)
)
);
pValue
=
pKey
?
pKey
->
getValueCaseInsensitive
(
aPaper
)
:
NULL
;
// some PPD files do not specify the standard paper names (e.g. C5 instead of EnvC5)
...
...
@@ -698,7 +697,7 @@ sal_Bool PspSalInfoPrinter::SetData(
// merge paperbin if necessary
if
(
nSetDataFlags
&
SAL_JOBSET_PAPERBIN
)
{
pKey
=
aData
.
m_pParser
->
getKey
(
String
(
RTL_CONSTASCII_USTRINGPARAM
(
"InputSlot"
)
)
);
pKey
=
aData
.
m_pParser
->
getKey
(
OU
String
(
RTL_CONSTASCII_USTRINGPARAM
(
"InputSlot"
)
)
);
if
(
pKey
)
{
int
nPaperBin
=
pJobSetup
->
mnPaperBin
;
...
...
@@ -722,22 +721,22 @@ sal_Bool PspSalInfoPrinter::SetData(
// merge duplex if necessary
if
(
nSetDataFlags
&
SAL_JOBSET_DUPLEXMODE
)
{
pKey
=
aData
.
m_pParser
->
getKey
(
String
(
RTL_CONSTASCII_USTRINGPARAM
(
"Duplex"
)
)
);
pKey
=
aData
.
m_pParser
->
getKey
(
OU
String
(
RTL_CONSTASCII_USTRINGPARAM
(
"Duplex"
)
)
);
if
(
pKey
)
{
pValue
=
NULL
;
switch
(
pJobSetup
->
meDuplexMode
)
{
case
DUPLEX_OFF
:
pValue
=
pKey
->
getValue
(
String
(
RTL_CONSTASCII_USTRINGPARAM
(
"None"
)
)
);
pValue
=
pKey
->
getValue
(
OU
String
(
RTL_CONSTASCII_USTRINGPARAM
(
"None"
)
)
);
if
(
pValue
==
NULL
)
pValue
=
pKey
->
getValue
(
String
(
RTL_CONSTASCII_USTRINGPARAM
(
"SimplexNoTumble"
)
)
);
pValue
=
pKey
->
getValue
(
OU
String
(
RTL_CONSTASCII_USTRINGPARAM
(
"SimplexNoTumble"
)
)
);
break
;
case
DUPLEX_SHORTEDGE
:
pValue
=
pKey
->
getValue
(
String
(
RTL_CONSTASCII_USTRINGPARAM
(
"DuplexTumble"
)
)
);
pValue
=
pKey
->
getValue
(
OU
String
(
RTL_CONSTASCII_USTRINGPARAM
(
"DuplexTumble"
)
)
);
break
;
case
DUPLEX_LONGEDGE
:
pValue
=
pKey
->
getValue
(
String
(
RTL_CONSTASCII_USTRINGPARAM
(
"DuplexNoTumble"
)
)
);
pValue
=
pKey
->
getValue
(
OU
String
(
RTL_CONSTASCII_USTRINGPARAM
(
"DuplexNoTumble"
)
)
);
break
;
case
DUPLEX_UNKNOWN
:
default
:
...
...
vcl/generic/print/genpspgraphics.cxx
Dosyayı görüntüle @
6dc46553
...
...
@@ -60,6 +60,8 @@
#include <graphite_serverfont.hxx>
#endif
#include "comphelper/string.hxx"
using
namespace
psp
;
using
::
rtl
::
OUString
;
...
...
@@ -1164,10 +1166,10 @@ ImplDevFontAttributes GenPspGraphics::Info2DevFontAttributes( const psp::FastPri
#if OSL_DEBUG_LEVEL > 2
if
(
bHasMapNames
)
{
ByteString
aOrigName
(
aDFA
.
maName
,
osl_getThreadTextEncoding
()
);
ByteString
aAliasNames
(
aDFA
.
maMapNames
,
osl_getThreadTextEncoding
()
);
rtl
::
OString
aOrigName
(
rtl
::
OUStringToOString
(
aDFA
.
maName
,
osl_getThreadTextEncoding
())
);
rtl
::
OString
aAliasNames
(
rtl
::
OUStringToOString
(
aDFA
.
maMapNames
,
osl_getThreadTextEncoding
())
);
fprintf
(
stderr
,
"using alias names
\"
%s
\"
for font family
\"
%s
\"\n
"
,
aAliasNames
.
GetBuffer
(),
aOrigName
.
GetBuffe
r
()
);
aAliasNames
.
getStr
(),
aOrigName
.
getSt
r
()
);
}
#endif
...
...
@@ -1184,9 +1186,9 @@ void GenPspGraphics::AnnounceFonts( ImplDevFontList* pFontList, const psp::FastP
{
// asian type 1 fonts are not known
psp
::
PrintFontManager
&
rMgr
=
psp
::
PrintFontManager
::
get
();
Byte
String
aFileName
(
rMgr
.
getFontFileSysPath
(
aInfo
.
m_nID
)
);
int
nPos
=
aFileName
.
SearchBackward
(
'_'
);
if
(
nPos
==
STRING_NOTFOUND
||
aFileName
.
GetChar
(
nPos
+
1
)
==
'.'
)
O
String
aFileName
(
rMgr
.
getFontFileSysPath
(
aInfo
.
m_nID
)
);
int
nPos
=
aFileName
.
lastIndexOf
(
'_'
);
if
(
nPos
==
-
1
||
aFileName
[
nPos
+
1
]
==
'.'
)
nQuality
+=
5
;
else
{
...
...
@@ -1219,7 +1221,7 @@ void GenPspGraphics::AnnounceFonts( ImplDevFontList* pFontList, const psp::FastP
}
if
(
pLangBoost
)
if
(
aFileName
.
Copy
(
nPos
+
1
,
3
).
EqualsIgnoreCaseAscii
(
pLangBoost
)
)
if
(
aFileName
.
copy
(
nPos
+
1
,
3
).
equalsIgnoreAsciiCase
(
pLangBoost
)
)
nQuality
+=
10
;
}
}
...
...
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