diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-11-21 12:49:42 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-11-21 12:51:36 +0000 |
commit | 054568fea71c493746a11569427169b718c6c5e4 (patch) | |
tree | db9819e819a8fd9e18bb9434b0f7406ca11f6b43 /vcl | |
parent | 54bc5bc910e6082398d6b2f55fa7dba65421bbb7 (diff) |
this casting of a void* is a disaster waiting to happen
only ever used for a string, to set it to a string type
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/salprn.hxx | 2 | ||||
-rw-r--r-- | vcl/win/source/gdi/salprn.cxx | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/vcl/inc/salprn.hxx b/vcl/inc/salprn.hxx index 195bc80698f4..0164acf8c108 100644 --- a/vcl/inc/salprn.hxx +++ b/vcl/inc/salprn.hxx @@ -54,7 +54,7 @@ struct VCL_PLUGIN_PUBLIC SalPrinterQueueInfo rtl::OUString maComment; sal_uLong mnStatus; sal_uLong mnJobs; - void* mpSysData; + rtl::OUString* mpSysData; SalPrinterQueueInfo(); ~SalPrinterQueueInfo(); diff --git a/vcl/win/source/gdi/salprn.cxx b/vcl/win/source/gdi/salprn.cxx index 7a7c9837aa72..5f58cb7c6bfb 100644 --- a/vcl/win/source/gdi/salprn.cxx +++ b/vcl/win/source/gdi/salprn.cxx @@ -236,7 +236,7 @@ void WinSalInstance::GetPrinterQueueState( SalPrinterQueueInfo* pInfo ) pInfo->mnStatus = ImplWinQueueStatusToSal( pWinInfo2->Status ); pInfo->mnJobs = pWinInfo2->cJobs; if( ! pInfo->mpSysData ) - pInfo->mpSysData = new XubString( aPortName ); + pInfo->mpSysData = new rtl::OUString(aPortName); } rtl_freeMemory(pWinInfo2); } @@ -248,7 +248,7 @@ void WinSalInstance::GetPrinterQueueState( SalPrinterQueueInfo* pInfo ) void WinSalInstance::DeletePrinterQueueInfo( SalPrinterQueueInfo* pInfo ) { - delete (String*)(pInfo->mpSysData); + delete pInfo->mpSysData; delete pInfo; } |