[Libreoffice-commits] .: 3 commits - vcl/inc vcl/win
David Tardon
dtardon at kemper.freedesktop.org
Mon Nov 21 04:19:44 PST 2011
vcl/inc/win/salprn.h | 6 +++---
vcl/win/source/gdi/salgdi3.cxx | 4 ++--
vcl/win/source/gdi/salprn.cxx | 30 +++++++++++++++---------------
vcl/win/source/gdi/winlayout.cxx | 13 +++++++------
4 files changed, 27 insertions(+), 26 deletions(-)
New commits:
commit 1c2f5d73a774d93a8e3660a0cc91e32d1f86fd77
Author: David Tardon <dtardon at redhat.com>
Date: Mon Nov 21 13:14:36 2011 +0100
more conversion to rtl::OUString
diff --git a/vcl/inc/win/salprn.h b/vcl/inc/win/salprn.h
index e4d67b8..3b64c62 100644
--- a/vcl/inc/win/salprn.h
+++ b/vcl/inc/win/salprn.h
@@ -59,9 +59,9 @@ class WinSalInfoPrinter : public SalInfoPrinter
{
public:
WinSalGraphics* mpGraphics; // current Printer graphics
- XubString maDriverName; // printer driver name
- XubString maDeviceName; // printer device name
- XubString maPortName; // printer port name
+ rtl::OUString maDriverName; // printer driver name
+ rtl::OUString maDeviceName; // printer device name
+ rtl::OUString maPortName; // printer port name
HDC mhDC; // printer hdc
sal_Bool mbGraphics; // is Graphics used
public:
diff --git a/vcl/win/source/gdi/salprn.cxx b/vcl/win/source/gdi/salprn.cxx
index 0da87bd..7a7c983 100644
--- a/vcl/win/source/gdi/salprn.cxx
+++ b/vcl/win/source/gdi/salprn.cxx
@@ -194,7 +194,7 @@ void WinSalInstance::GetPrinterQueueInfo( ImplPrnQueueList* pList )
for ( i = 0; i < nInfoPrn4; i++ )
{
SalPrinterQueueInfo* pInfo = new SalPrinterQueueInfo;
- pInfo->maPrinterName = UniString( reinterpret_cast< const sal_Unicode* >(pWinInfo4[i].pPrinterName) );
+ pInfo->maPrinterName = rtl::OUString( reinterpret_cast< const sal_Unicode* >(pWinInfo4[i].pPrinterName) );
pInfo->mnStatus = 0;
pInfo->mnJobs = 0;
pInfo->mpSysData = NULL;
@@ -297,8 +297,8 @@ static DWORD ImplDeviceCaps( WinSalInfoPrinter* pPrinter, WORD nCaps,
else
pDevMode = SAL_DEVMODE_W( pSetupData );
- return DeviceCapabilitiesW( reinterpret_cast<LPCWSTR>(pPrinter->maDeviceName.GetBuffer()),
- reinterpret_cast<LPCWSTR>(pPrinter->maPortName.GetBuffer()),
+ return DeviceCapabilitiesW( reinterpret_cast<LPCWSTR>(pPrinter->maDeviceName.getStr()),
+ reinterpret_cast<LPCWSTR>(pPrinter->maPortName.getStr()),
nCaps, (LPWSTR)pOutput, pDevMode );
}
@@ -330,7 +330,7 @@ static sal_Bool ImplTestSalJobSetup( WinSalInfoPrinter* pPrinter,
// #110800#, #111151#, #112381#, #i16580#, #i14173# and perhaps #112375#
ByteString aPrinterNameA= ImplSalGetWinAnsiString( pPrinter->maDeviceName, TRUE );
HANDLE hPrn;
- LPWSTR pPrinterNameW = reinterpret_cast<LPWSTR>(const_cast<sal_Unicode*>(pPrinter->maDeviceName.GetBuffer()));
+ LPWSTR pPrinterNameW = reinterpret_cast<LPWSTR>(const_cast<sal_Unicode*>(pPrinter->maDeviceName.getStr()));
if ( !OpenPrinterW( pPrinterNameW, &hPrn, NULL ) )
return FALSE;
@@ -396,7 +396,7 @@ static sal_Bool ImplUpdateSalJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup
{
ByteString aPrinterNameA = ImplSalGetWinAnsiString( pPrinter->maDeviceName, TRUE );
HANDLE hPrn;
- LPWSTR pPrinterNameW = reinterpret_cast<LPWSTR>(const_cast<sal_Unicode*>(pPrinter->maDeviceName.GetBuffer()));
+ LPWSTR pPrinterNameW = reinterpret_cast<LPWSTR>(const_cast<sal_Unicode*>(pPrinter->maDeviceName.getStr()));
if ( !OpenPrinterW( pPrinterNameW, &hPrn, NULL ) )
return FALSE;
// #131642# hPrn==HGDI_ERROR even though OpenPrinter() succeeded!
@@ -1072,14 +1072,14 @@ static HDC ImplCreateSalPrnIC( WinSalInfoPrinter* pPrinter, ImplJobSetup* pSetup
pDevMode = NULL;
// #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 ?
- if( pPrinter->maDriverName.Len() > 2048 || pPrinter->maDeviceName.Len() > 2048 )
+ if( pPrinter->maDriverName.getLength() > 2048 || pPrinter->maDeviceName.getLength() > 2048 )
return 0;
sal_Unicode pDriverName[ 4096 ];
sal_Unicode pDeviceName[ 4096 ];
- rtl_copyMemory( pDriverName, pPrinter->maDriverName.GetBuffer(), pPrinter->maDriverName.Len()*sizeof(sal_Unicode));
- memset( pDriverName+pPrinter->maDriverName.Len(), 0, 32 );
- rtl_copyMemory( pDeviceName, pPrinter->maDeviceName.GetBuffer(), pPrinter->maDeviceName.Len()*sizeof(sal_Unicode));
- memset( pDeviceName+pPrinter->maDeviceName.Len(), 0, 32 );
+ rtl_copyMemory( pDriverName, pPrinter->maDriverName.getStr(), pPrinter->maDriverName.getLength()*sizeof(sal_Unicode));
+ memset( pDriverName+pPrinter->maDriverName.getLength(), 0, 32 );
+ rtl_copyMemory( pDeviceName, pPrinter->maDeviceName.getStr(), pPrinter->maDeviceName.getLength()*sizeof(sal_Unicode));
+ memset( pDeviceName+pPrinter->maDeviceName.getLength(), 0, 32 );
hDC = ImplCreateICW_WithCatch( reinterpret_cast< LPWSTR >(pDriverName),
reinterpret_cast< LPCWSTR >(pDeviceName),
pDevMode );
@@ -1134,8 +1134,8 @@ SalInfoPrinter* WinSalInstance::CreateInfoPrinter( SalPrinterQueueInfo* pQueueIn
pPrinter->maDriverName = pQueueInfo->maDriver;
pPrinter->maDeviceName = pQueueInfo->maPrinterName;
pPrinter->maPortName = pQueueInfo->mpSysData ?
- *(String*)(pQueueInfo->mpSysData)
- : String();
+ *pQueueInfo->mpSysData
+ : rtl::OUString();
// check if the provided setup data match the actual printer
ImplTestSalJobSetup( pPrinter, pSetupData, TRUE );
@@ -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
sal_Unicode aDrvBuf[4096];
sal_Unicode aDevBuf[4096];
- rtl_copyMemory( aDrvBuf, mpInfoPrinter->maDriverName.GetBuffer(), (mpInfoPrinter->maDriverName.Len()+1)*sizeof(sal_Unicode));
- rtl_copyMemory( aDevBuf, mpInfoPrinter->maDeviceName.GetBuffer(), (mpInfoPrinter->maDeviceName.Len()+1)*sizeof(sal_Unicode));
+ rtl_copyMemory( aDrvBuf, mpInfoPrinter->maDriverName.getStr(), (mpInfoPrinter->maDriverName.getLength()+1)*sizeof(sal_Unicode));
+ rtl_copyMemory( aDevBuf, mpInfoPrinter->maDeviceName.getStr(), (mpInfoPrinter->maDeviceName.getLength()+1)*sizeof(sal_Unicode));
hDC = CreateDCW( reinterpret_cast<LPCWSTR>(aDrvBuf),
reinterpret_cast<LPCWSTR>(aDevBuf),
NULL,
@@ -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
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() );
commit 3a88a0606ba469b6f83d8ac67e14cb1b80cecfb5
Author: David Tardon <dtardon at redhat.com>
Date: Mon Nov 21 13:04:59 2011 +0100
WaE: initialization order
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx
index ed2ffff..58ec98f 100644
--- a/vcl/win/source/gdi/salgdi3.cxx
+++ b/vcl/win/source/gdi/salgdi3.cxx
@@ -1211,8 +1211,8 @@ ImplWinFontData::ImplWinFontData( const ImplDevFontAttributes& rDFS,
mnFontCharSetCount( 0 ),
meWinCharSet( eWinCharSet ),
mnPitchAndFamily( nPitchAndFamily ),
- mbAliasSymbolsLow( false ),
mbAliasSymbolsHigh( false ),
+ mbAliasSymbolsLow( false ),
mbGsubRead( false )
{
SetBitmapSize( 0, nHeight );
diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx
index b1591f0..dbcd2ce 100644
--- a/vcl/win/source/gdi/winlayout.cxx
+++ b/vcl/win/source/gdi/winlayout.cxx
@@ -268,9 +268,9 @@ SimpleWinLayout::SimpleWinLayout( HDC hDC, BYTE nCharSet,
mpGlyphs2Chars( NULL ),
mpGlyphRTLFlags( NULL ),
mnWidth( 0 ),
+ mbDisableGlyphs( false )
mnNotdefWidth( -1 ),
mnCharSet( nCharSet ),
- mbDisableGlyphs( false )
{
mbDisableGlyphs = true;
}
@@ -1231,21 +1231,22 @@ static bool InitUSP()
UniscribeLayout::UniscribeLayout( HDC hDC,
const ImplWinFontData& rWinFontData, ImplWinFontEntry& rWinFontEntry )
: WinLayout( hDC, rWinFontData, rWinFontEntry ),
- mnItemCount( 0 ),
mpScriptItems( NULL ),
mpVisualItems( NULL ),
+ mnItemCount( 0 ),
+ mnCharCapacity( 0 ),
mpLogClusters( NULL ),
mpCharWidths( NULL ),
- mnCharCapacity( 0 ),
mnSubStringMin( 0 ),
- mnGlyphCapacity( 0 ),
mnGlyphCount( 0 ),
- mpOutGlyphs( NULL ),
+ mnGlyphCapacity( 0 ),
mpGlyphAdvances( NULL ),
mpJustifications( NULL ),
+ mpOutGlyphs( NULL ),
mpGlyphOffsets( NULL ),
mpVisualAttrs( NULL ),
mpGlyphs2Chars( NULL ),
+ mnMinKashidaWidth( 0 ),
mnMinKashidaGlyph( 0 ),
mbDisableGlyphInjection( false )
{}
@@ -3061,9 +3062,9 @@ int WinSalGraphics::GetMinKashidaWidth()
ImplWinFontEntry::ImplWinFontEntry( FontSelectPattern& rFSD )
: ImplFontEntry( rFSD )
-, maWidthMap( 512 )
, mpKerningPairs( NULL )
, mnKerningPairs( -1 )
+, maWidthMap( 512 )
, mnMinKashidaWidth( -1 )
, mnMinKashidaGlyph( -1 )
{
commit 5e04a781c5b5cb22bb35ad3031e579ea32c0cace
Author: David Tardon <dtardon at redhat.com>
Date: Mon Nov 21 12:58:47 2011 +0100
WaE: type qualifiers ignored on function return type
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx
index d47f5c9..ed2ffff 100644
--- a/vcl/win/source/gdi/salgdi3.cxx
+++ b/vcl/win/source/gdi/salgdi3.cxx
@@ -258,7 +258,7 @@ public:
~RawFontData() { delete[] mpRawBytes; }
const unsigned char* get() const { return mpRawBytes; }
const unsigned char* steal() { unsigned char* p = mpRawBytes; mpRawBytes = NULL; return p; }
- const int size() const { return mnByteCount; }
+ int size() const { return mnByteCount; }
private:
unsigned char* mpRawBytes;
More information about the Libreoffice-commits
mailing list