[Libreoffice-commits] core.git: 2 commits - vcl/win
Noel Grandin
noel at peralex.com
Wed May 20 01:04:34 PDT 2015
vcl/win/source/gdi/salprn.cxx | 4 ++--
vcl/win/source/gdi/winlayout.cxx | 14 +++++++-------
2 files changed, 9 insertions(+), 9 deletions(-)
New commits:
commit e964042c16efafd5f6656dbb7cea14c852a39822
Author: Noel Grandin <noel at peralex.com>
Date: Wed May 20 10:01:56 2015 +0200
fix Win build
after my commit 7a0af37989d1f1b508a61f28e785c5b1f27d58af
"convert SAL_LAYOUT flags to scoped enum"
Change-Id: Iba12d2f60840a012d3e54a1364b672820e8bd6dc
diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx
index 4de0437..a231a2f 100644
--- a/vcl/win/source/gdi/winlayout.cxx
+++ b/vcl/win/source/gdi/winlayout.cxx
@@ -264,7 +264,7 @@ bool SimpleWinLayout::LayoutText( ImplLayoutArgs& rArgs )
{
// prepare layout
// TODO: fix case when recyclying old SimpleWinLayout object
- mbDisableGlyphs |= ((rArgs.mnFlags & SalLayoutFlags::DisableGlyphProcessing) != 0);
+ mbDisableGlyphs |= bool(rArgs.mnFlags & SalLayoutFlags::DisableGlyphProcessing);
mnCharCount = rArgs.mnEndCharPos - rArgs.mnMinCharPos;
if( !mbDisableGlyphs )
@@ -291,7 +291,7 @@ bool SimpleWinLayout::LayoutText( ImplLayoutArgs& rArgs )
int i, j;
mnGlyphCount = 0;
- bool bVertical = (rArgs.mnFlags & SalLayoutFlags::Vertical) != 0;
+ bool bVertical(rArgs.mnFlags & SalLayoutFlags::Vertical);
// count the number of chars to process if no RTL run
rArgs.ResetPos();
@@ -1071,14 +1071,14 @@ bool UniscribeLayout::LayoutText( ImplLayoutArgs& rArgs )
// prepare itemization
// TODO: try to avoid itemization since it costs a lot of performance
SCRIPT_STATE aScriptState = {0,false,false,false,false,false,false,false,false,0,0};
- aScriptState.uBidiLevel = (0 != (rArgs.mnFlags & SalLayoutFlags::BiDiRtl));
- aScriptState.fOverrideDirection = (0 != (rArgs.mnFlags & SalLayoutFlags::BidiStrong));
- aScriptState.fDigitSubstitute = (0 != (rArgs.mnFlags & SalLayoutFlags::SubstituteDigits));
+ aScriptState.uBidiLevel = bool(rArgs.mnFlags & SalLayoutFlags::BiDiRtl);
+ aScriptState.fOverrideDirection = bool(rArgs.mnFlags & SalLayoutFlags::BidiStrong);
+ aScriptState.fDigitSubstitute = bool(rArgs.mnFlags & SalLayoutFlags::SubstituteDigits);
aScriptState.fArabicNumContext = aScriptState.fDigitSubstitute & aScriptState.uBidiLevel;
DWORD nLangId = 0; // TODO: get language from font
SCRIPT_CONTROL aScriptControl = {nLangId,false,false,false,false,false,false,false,false,0};
aScriptControl.fNeutralOverride = aScriptState.fOverrideDirection;
- aScriptControl.fContextDigits = (0 != (rArgs.mnFlags & SalLayoutFlags::SubstituteDigits));
+ aScriptControl.fContextDigits = bool(rArgs.mnFlags & SalLayoutFlags::SubstituteDigits);
#if HAVE_FMERGENEUTRALITEMS
aScriptControl.fMergeNeutralItems = true;
#endif
@@ -1265,7 +1265,7 @@ bool UniscribeLayout::LayoutText( ImplLayoutArgs& rArgs )
rVisualItem.IsRTL() );
// don't bother to do a default layout in a fallback level
- if( 0 != (rArgs.mnFlags & SalLayoutFlags::ForFallback) )
+ if( rArgs.mnFlags & SalLayoutFlags::ForFallback )
continue;
// the primitive layout engine is good enough for the default layout
commit bc56da8784a76e92878193baf4764c50333eb21f
Author: Noel Grandin <noel at peralex.com>
Date: Wed May 20 10:00:18 2015 +0200
fix Win build
after my commit 4b57be7234ea61aad0a472a56a4f073270933c8e
"convert QUEUE_STATUS constants to scoped enum"
Change-Id: I5a91a79148b3b3edaa12e6933344040ed64acc6a
diff --git a/vcl/win/source/gdi/salprn.cxx b/vcl/win/source/gdi/salprn.cxx
index f6c00be..c0705fe 100644
--- a/vcl/win/source/gdi/salprn.cxx
+++ b/vcl/win/source/gdi/salprn.cxx
@@ -151,7 +151,7 @@ static PrintQueueFlags ImplWinQueueStatusToSal( DWORD nWinStatus )
nStatus |= PrintQueueFlags::StatusUnknown;
if ( nWinStatus & PRINTER_STATUS_POWER_SAVE )
nStatus |= PrintQueueFlags::PowerSave;
- if ( !nStatus && !(nWinStatus & PRINTER_STATUS_NOT_AVAILABLE) )
+ if ( nStatus == PrintQueueFlags::NONE && !(nWinStatus & PRINTER_STATUS_NOT_AVAILABLE) )
nStatus |= PrintQueueFlags::Ready;
return nStatus;
}
@@ -173,7 +173,7 @@ void WinSalInstance::GetPrinterQueueInfo( ImplPrnQueueList* pList )
{
SalPrinterQueueInfo* pInfo = new SalPrinterQueueInfo;
pInfo->maPrinterName = OUString( reinterpret_cast< const sal_Unicode* >(pWinInfo4[i].pPrinterName) );
- pInfo->mnStatus = 0;
+ pInfo->mnStatus = PrintQueueFlags::NONE;
pInfo->mnJobs = 0;
pInfo->mpSysData = NULL;
pList->Add( pInfo );
More information about the Libreoffice-commits
mailing list