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
1c2f5d73
Kaydet (Commit)
1c2f5d73
authored
Kas 21, 2011
tarafından
David Tardon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
more conversion to rtl::OUString
üst
3a88a060
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
18 deletions
+18
-18
salprn.h
vcl/inc/win/salprn.h
+3
-3
salprn.cxx
vcl/win/source/gdi/salprn.cxx
+15
-15
No files found.
vcl/inc/win/salprn.h
Dosyayı görüntüle @
1c2f5d73
...
@@ -59,9 +59,9 @@ class WinSalInfoPrinter : public SalInfoPrinter
...
@@ -59,9 +59,9 @@ class WinSalInfoPrinter : public SalInfoPrinter
{
{
public
:
public
:
WinSalGraphics
*
mpGraphics
;
// current Printer graphics
WinSalGraphics
*
mpGraphics
;
// current Printer graphics
Xub
String
maDriverName
;
// printer driver name
rtl
::
OU
String
maDriverName
;
// printer driver name
Xub
String
maDeviceName
;
// printer device name
rtl
::
OU
String
maDeviceName
;
// printer device name
Xub
String
maPortName
;
// printer port name
rtl
::
OU
String
maPortName
;
// printer port name
HDC
mhDC
;
// printer hdc
HDC
mhDC
;
// printer hdc
sal_Bool
mbGraphics
;
// is Graphics used
sal_Bool
mbGraphics
;
// is Graphics used
public
:
public
:
...
...
vcl/win/source/gdi/salprn.cxx
Dosyayı görüntüle @
1c2f5d73
...
@@ -194,7 +194,7 @@ void WinSalInstance::GetPrinterQueueInfo( ImplPrnQueueList* pList )
...
@@ -194,7 +194,7 @@ void WinSalInstance::GetPrinterQueueInfo( ImplPrnQueueList* pList )
for
(
i
=
0
;
i
<
nInfoPrn4
;
i
++
)
for
(
i
=
0
;
i
<
nInfoPrn4
;
i
++
)
{
{
SalPrinterQueueInfo
*
pInfo
=
new
SalPrinterQueueInfo
;
SalPrinterQueueInfo
*
pInfo
=
new
SalPrinterQueueInfo
;
pInfo
->
maPrinterName
=
Uni
String
(
reinterpret_cast
<
const
sal_Unicode
*
>
(
pWinInfo4
[
i
].
pPrinterName
)
);
pInfo
->
maPrinterName
=
rtl
::
OU
String
(
reinterpret_cast
<
const
sal_Unicode
*
>
(
pWinInfo4
[
i
].
pPrinterName
)
);
pInfo
->
mnStatus
=
0
;
pInfo
->
mnStatus
=
0
;
pInfo
->
mnJobs
=
0
;
pInfo
->
mnJobs
=
0
;
pInfo
->
mpSysData
=
NULL
;
pInfo
->
mpSysData
=
NULL
;
...
@@ -297,8 +297,8 @@ static DWORD ImplDeviceCaps( WinSalInfoPrinter* pPrinter, WORD nCaps,
...
@@ -297,8 +297,8 @@ static DWORD ImplDeviceCaps( WinSalInfoPrinter* pPrinter, WORD nCaps,
else
else
pDevMode
=
SAL_DEVMODE_W
(
pSetupData
);
pDevMode
=
SAL_DEVMODE_W
(
pSetupData
);
return
DeviceCapabilitiesW
(
reinterpret_cast
<
LPCWSTR
>
(
pPrinter
->
maDeviceName
.
GetBuffe
r
()),
return
DeviceCapabilitiesW
(
reinterpret_cast
<
LPCWSTR
>
(
pPrinter
->
maDeviceName
.
getSt
r
()),
reinterpret_cast
<
LPCWSTR
>
(
pPrinter
->
maPortName
.
GetBuffe
r
()),
reinterpret_cast
<
LPCWSTR
>
(
pPrinter
->
maPortName
.
getSt
r
()),
nCaps
,
(
LPWSTR
)
pOutput
,
pDevMode
);
nCaps
,
(
LPWSTR
)
pOutput
,
pDevMode
);
}
}
...
@@ -330,7 +330,7 @@ static sal_Bool ImplTestSalJobSetup( WinSalInfoPrinter* pPrinter,
...
@@ -330,7 +330,7 @@ static sal_Bool ImplTestSalJobSetup( WinSalInfoPrinter* pPrinter,
// #110800#, #111151#, #112381#, #i16580#, #i14173# and perhaps #112375#
// #110800#, #111151#, #112381#, #i16580#, #i14173# and perhaps #112375#
ByteString
aPrinterNameA
=
ImplSalGetWinAnsiString
(
pPrinter
->
maDeviceName
,
TRUE
);
ByteString
aPrinterNameA
=
ImplSalGetWinAnsiString
(
pPrinter
->
maDeviceName
,
TRUE
);
HANDLE
hPrn
;
HANDLE
hPrn
;
LPWSTR
pPrinterNameW
=
reinterpret_cast
<
LPWSTR
>
(
const_cast
<
sal_Unicode
*>
(
pPrinter
->
maDeviceName
.
GetBuffe
r
()));
LPWSTR
pPrinterNameW
=
reinterpret_cast
<
LPWSTR
>
(
const_cast
<
sal_Unicode
*>
(
pPrinter
->
maDeviceName
.
getSt
r
()));
if
(
!
OpenPrinterW
(
pPrinterNameW
,
&
hPrn
,
NULL
)
)
if
(
!
OpenPrinterW
(
pPrinterNameW
,
&
hPrn
,
NULL
)
)
return
FALSE
;
return
FALSE
;
...
@@ -396,7 +396,7 @@ static sal_Bool ImplUpdateSalJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup
...
@@ -396,7 +396,7 @@ static sal_Bool ImplUpdateSalJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup
{
{
ByteString
aPrinterNameA
=
ImplSalGetWinAnsiString
(
pPrinter
->
maDeviceName
,
TRUE
);
ByteString
aPrinterNameA
=
ImplSalGetWinAnsiString
(
pPrinter
->
maDeviceName
,
TRUE
);
HANDLE
hPrn
;
HANDLE
hPrn
;
LPWSTR
pPrinterNameW
=
reinterpret_cast
<
LPWSTR
>
(
const_cast
<
sal_Unicode
*>
(
pPrinter
->
maDeviceName
.
GetBuffe
r
()));
LPWSTR
pPrinterNameW
=
reinterpret_cast
<
LPWSTR
>
(
const_cast
<
sal_Unicode
*>
(
pPrinter
->
maDeviceName
.
getSt
r
()));
if
(
!
OpenPrinterW
(
pPrinterNameW
,
&
hPrn
,
NULL
)
)
if
(
!
OpenPrinterW
(
pPrinterNameW
,
&
hPrn
,
NULL
)
)
return
FALSE
;
return
FALSE
;
// #131642# hPrn==HGDI_ERROR even though OpenPrinter() succeeded!
// #131642# hPrn==HGDI_ERROR even though OpenPrinter() succeeded!
...
@@ -1072,14 +1072,14 @@ static HDC ImplCreateSalPrnIC( WinSalInfoPrinter* pPrinter, ImplJobSetup* pSetup
...
@@ -1072,14 +1072,14 @@ static HDC ImplCreateSalPrnIC( WinSalInfoPrinter* pPrinter, ImplJobSetup* pSetup
pDevMode
=
NULL
;
pDevMode
=
NULL
;
// #95347 some buggy drivers (eg, OKI) write to those buffers in CreateIC, although declared const - so provide some space
// #95347 some buggy drivers (eg, OKI) write to those buffers in CreateIC, although declared const - so provide some space
// pl: does this hold true for Unicode functions ?
// pl: does this hold true for Unicode functions ?
if
(
pPrinter
->
maDriverName
.
Len
()
>
2048
||
pPrinter
->
maDeviceName
.
Len
()
>
2048
)
if
(
pPrinter
->
maDriverName
.
getLength
()
>
2048
||
pPrinter
->
maDeviceName
.
getLength
()
>
2048
)
return
0
;
return
0
;
sal_Unicode
pDriverName
[
4096
];
sal_Unicode
pDriverName
[
4096
];
sal_Unicode
pDeviceName
[
4096
];
sal_Unicode
pDeviceName
[
4096
];
rtl_copyMemory
(
pDriverName
,
pPrinter
->
maDriverName
.
GetBuffer
(),
pPrinter
->
maDriverName
.
Len
()
*
sizeof
(
sal_Unicode
));
rtl_copyMemory
(
pDriverName
,
pPrinter
->
maDriverName
.
getStr
(),
pPrinter
->
maDriverName
.
getLength
()
*
sizeof
(
sal_Unicode
));
memset
(
pDriverName
+
pPrinter
->
maDriverName
.
Len
(),
0
,
32
);
memset
(
pDriverName
+
pPrinter
->
maDriverName
.
getLength
(),
0
,
32
);
rtl_copyMemory
(
pDeviceName
,
pPrinter
->
maDeviceName
.
GetBuffer
(),
pPrinter
->
maDeviceName
.
Len
()
*
sizeof
(
sal_Unicode
));
rtl_copyMemory
(
pDeviceName
,
pPrinter
->
maDeviceName
.
getStr
(),
pPrinter
->
maDeviceName
.
getLength
()
*
sizeof
(
sal_Unicode
));
memset
(
pDeviceName
+
pPrinter
->
maDeviceName
.
Len
(),
0
,
32
);
memset
(
pDeviceName
+
pPrinter
->
maDeviceName
.
getLength
(),
0
,
32
);
hDC
=
ImplCreateICW_WithCatch
(
reinterpret_cast
<
LPWSTR
>
(
pDriverName
),
hDC
=
ImplCreateICW_WithCatch
(
reinterpret_cast
<
LPWSTR
>
(
pDriverName
),
reinterpret_cast
<
LPCWSTR
>
(
pDeviceName
),
reinterpret_cast
<
LPCWSTR
>
(
pDeviceName
),
pDevMode
);
pDevMode
);
...
@@ -1134,8 +1134,8 @@ SalInfoPrinter* WinSalInstance::CreateInfoPrinter( SalPrinterQueueInfo* pQueueIn
...
@@ -1134,8 +1134,8 @@ SalInfoPrinter* WinSalInstance::CreateInfoPrinter( SalPrinterQueueInfo* pQueueIn
pPrinter
->
maDriverName
=
pQueueInfo
->
maDriver
;
pPrinter
->
maDriverName
=
pQueueInfo
->
maDriver
;
pPrinter
->
maDeviceName
=
pQueueInfo
->
maPrinterName
;
pPrinter
->
maDeviceName
=
pQueueInfo
->
maPrinterName
;
pPrinter
->
maPortName
=
pQueueInfo
->
mpSysData
?
pPrinter
->
maPortName
=
pQueueInfo
->
mpSysData
?
*
(
String
*
)(
pQueueInfo
->
mpSysData
)
*
pQueueInfo
->
mpSysData
:
String
();
:
rtl
::
OU
String
();
// check if the provided setup data match the actual printer
// check if the provided setup data match the actual printer
ImplTestSalJobSetup
(
pPrinter
,
pSetupData
,
TRUE
);
ImplTestSalJobSetup
(
pPrinter
,
pSetupData
,
TRUE
);
...
@@ -1563,8 +1563,8 @@ sal_Bool WinSalPrinter::StartJob( const rtl::OUString* pFileName,
...
@@ -1563,8 +1563,8 @@ sal_Bool WinSalPrinter::StartJob( const rtl::OUString* pFileName,
// #95347 some buggy drivers (eg, OKI) write to those buffers in CreateDC, although declared const - so provide some space
// #95347 some buggy drivers (eg, OKI) write to those buffers in CreateDC, although declared const - so provide some space
sal_Unicode
aDrvBuf
[
4096
];
sal_Unicode
aDrvBuf
[
4096
];
sal_Unicode
aDevBuf
[
4096
];
sal_Unicode
aDevBuf
[
4096
];
rtl_copyMemory
(
aDrvBuf
,
mpInfoPrinter
->
maDriverName
.
GetBuffer
(),
(
mpInfoPrinter
->
maDriverName
.
Len
()
+
1
)
*
sizeof
(
sal_Unicode
));
rtl_copyMemory
(
aDrvBuf
,
mpInfoPrinter
->
maDriverName
.
getStr
(),
(
mpInfoPrinter
->
maDriverName
.
getLength
()
+
1
)
*
sizeof
(
sal_Unicode
));
rtl_copyMemory
(
aDevBuf
,
mpInfoPrinter
->
maDeviceName
.
GetBuffer
(),
(
mpInfoPrinter
->
maDeviceName
.
Len
()
+
1
)
*
sizeof
(
sal_Unicode
));
rtl_copyMemory
(
aDevBuf
,
mpInfoPrinter
->
maDeviceName
.
getStr
(),
(
mpInfoPrinter
->
maDeviceName
.
getLength
()
+
1
)
*
sizeof
(
sal_Unicode
));
hDC
=
CreateDCW
(
reinterpret_cast
<
LPCWSTR
>
(
aDrvBuf
),
hDC
=
CreateDCW
(
reinterpret_cast
<
LPCWSTR
>
(
aDrvBuf
),
reinterpret_cast
<
LPCWSTR
>
(
aDevBuf
),
reinterpret_cast
<
LPCWSTR
>
(
aDevBuf
),
NULL
,
NULL
,
...
@@ -1619,7 +1619,7 @@ sal_Bool WinSalPrinter::StartJob( const rtl::OUString* pFileName,
...
@@ -1619,7 +1619,7 @@ sal_Bool WinSalPrinter::StartJob( const rtl::OUString* pFileName,
// bring up a file choser if printing to file port but no file name given
// bring up a file choser if printing to file port but no file name given
OUString
aOutFileName
;
OUString
aOutFileName
;
if
(
mpInfoPrinter
->
maPortName
.
EqualsIgnoreCaseAscii
(
"FILE:"
)
&&
!
(
pFileName
&&
!
pFileName
->
isEmpty
())
)
if
(
mpInfoPrinter
->
maPortName
.
equalsIgnoreAsciiCaseAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
"FILE:"
)
)
&&
!
(
pFileName
&&
!
pFileName
->
isEmpty
())
)
{
{
uno
::
Reference
<
lang
::
XMultiServiceFactory
>
xFactory
(
::
comphelper
::
getProcessServiceFactory
()
);
uno
::
Reference
<
lang
::
XMultiServiceFactory
>
xFactory
(
::
comphelper
::
getProcessServiceFactory
()
);
...
...
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