Adapt vcl to various loplugin warnings on Mac OS X

Change-Id: I4553ce218fbcf2ac681b284c71e7d558a451511c
This commit is contained in:
Stephan Bergmann 2014-02-21 23:46:33 +01:00
parent 216bcceee1
commit fe7a4bccfd
29 changed files with 73 additions and 71 deletions

View File

@ -363,6 +363,7 @@ certain functionality.
@li @c vcl.kde4 - KDE4
@li @c vcl.layout - Widget layout
@li @c vcl.plugadapt - the Unix/X11 backend plugin mechanism
@li @c vcl.osx
@li @c vcl.osx.print
@li @c vcl.scrollbar - Scroll Bars
@li @c vcl.sm - Session Manager

View File

@ -234,7 +234,7 @@ bool PrintFontManager::TrueTypeFontFile::queryMetricPage( int nPage, MultiAtomPr
int nCharacters = nPage < 255 ? 256 : 254;
MapString( pTTFont, table, nCharacters, NULL, false );
TTSimpleGlyphMetrics* pMetrics = GetTTSimpleCharMetrics( pTTFont, nPage*256, nCharacters, 0 );
TTSimpleGlyphMetrics* pMetrics = GetTTSimpleCharMetrics( pTTFont, nPage*256, nCharacters, false );
if( pMetrics )
{
for( i = 0; i < nCharacters; i++ )
@ -253,7 +253,7 @@ bool PrintFontManager::TrueTypeFontFile::queryMetricPage( int nPage, MultiAtomPr
for( i = 0; i < 256; i++ )
table_vert[ i ] = 256*nPage + i;
MapString( pTTFont, table_vert, nCharacters, NULL, true );
pMetrics = GetTTSimpleCharMetrics( pTTFont, nPage*256, nCharacters, 1 );
pMetrics = GetTTSimpleCharMetrics( pTTFont, nPage*256, nCharacters, true );
if( pMetrics )
{
for( i = 0; i < nCharacters; i++ )
@ -2028,7 +2028,7 @@ bool PrintFontManager::createFontSubset(
TTSimpleGlyphMetrics* pMetrics = GetTTSimpleGlyphMetrics( pTTFont,
pGID,
nGlyphs,
bVertical ? 1 : 0 );
bVertical );
if( pMetrics )
{
for( int i = 0; i < nGlyphs; i++ )
@ -2080,7 +2080,7 @@ void PrintFontManager::getGlyphWidths( fontID nFont,
TTSimpleGlyphMetrics* pMetrics = GetTTSimpleGlyphMetrics( pTTFont,
&aGlyphIds[0],
nGlyphs,
bVertical ? 1 : 0 );
bVertical );
if( pMetrics )
{
for( int i = 0; i< nGlyphs; i++ )

View File

@ -366,7 +366,7 @@ bool SvpSalFrame::GetWindowState( SalFrameState* pState )
return true;
}
void SvpSalFrame::ShowFullScreen( sal_Bool, sal_Int32 )
void SvpSalFrame::ShowFullScreen( bool, sal_Int32 )
{
SetPosSize( 0, 0, VIRTUAL_DESKTOP_WIDTH, VIRTUAL_DESKTOP_HEIGHT,
SAL_FRAME_POSSIZE_WIDTH | SAL_FRAME_POSSIZE_HEIGHT );

View File

@ -97,7 +97,7 @@ public:
virtual SalFrame* GetParent() const;
virtual void SetWindowState( const SalFrameState* pState );
virtual bool GetWindowState( SalFrameState* pState );
virtual void ShowFullScreen( sal_Bool bFullScreen, sal_Int32 nDisplay );
virtual void ShowFullScreen( bool bFullScreen, sal_Int32 nDisplay );
virtual void StartPresentation( sal_Bool bStart );
virtual void SetAlwaysOnTop( sal_Bool bOnTop );
virtual void ToTop( sal_uInt16 nFlags );

View File

@ -126,7 +126,7 @@ public:
virtual SalFrame* GetParent() const;
virtual void SetWindowState( const SalFrameState* pState );
virtual bool GetWindowState( SalFrameState* pState );
virtual void ShowFullScreen( sal_Bool bFullScreen, sal_Int32 nDisplay );
virtual void ShowFullScreen( bool bFullScreen, sal_Int32 nDisplay );
virtual void StartPresentation( sal_Bool bStart );
virtual void SetAlwaysOnTop( sal_Bool bOnTop );
virtual void ToTop( sal_uInt16 nFlags );

View File

@ -143,7 +143,7 @@ public:
virtual void SetWindowState( const SalFrameState* pState ) = 0;
virtual bool GetWindowState( SalFrameState* pState ) = 0;
virtual void ShowFullScreen( sal_Bool bFullScreen, sal_Int32 nDisplay ) = 0;
virtual void ShowFullScreen( bool bFullScreen, sal_Int32 nDisplay ) = 0;
// Enable/Disable ScreenSaver, SystemAgents, ...
virtual void StartPresentation( sal_Bool bStart ) = 0;

View File

@ -464,11 +464,11 @@ namespace vcl
* @param ttf pointer to the TrueTypeFont structure
* @param glyphArray pointer to an array of glyphs that are to be extracted from ttf
* @param nGlyphs number of glyph IDs in glyphArray and encoding values in encoding
* @param mode writing mode: 0 - horizontal, 1 - vertical
* @param vertical writing mode: false - horizontal, true - vertical
* @ingroup sft
*
*/
TTSimpleGlyphMetrics *GetTTSimpleGlyphMetrics(TrueTypeFont *ttf, sal_uInt16 *glyphArray, int nGlyphs, int mode);
TTSimpleGlyphMetrics *GetTTSimpleGlyphMetrics(TrueTypeFont *ttf, sal_uInt16 *glyphArray, int nGlyphs, bool vertical);
#ifndef NO_MAPPERS
/**
@ -479,13 +479,13 @@ namespace vcl
* @param ttf pointer to the TrueTypeFont structure
* @param firstChar Unicode value of the first character in the range
* @param nChars number of Unicode characters in the range
* @param mode writing mode: 0 - horizontal, 1 - vertical
* @param vertical writing mode: false - horizontal, true - vertical
*
* @see GetTTSimpleGlyphMetrics
* @ingroup sft
*
*/
TTSimpleGlyphMetrics *GetTTSimpleCharMetrics(TrueTypeFont *ttf, sal_uInt16 firstChar, int nChars, int mode);
TTSimpleGlyphMetrics *GetTTSimpleCharMetrics(TrueTypeFont *ttf, sal_uInt16 firstChar, int nChars, bool vertical);
/**
* Maps a Unicode (UCS-2) string to a glyph array. Returns the number of glyphs in the array,
@ -516,7 +516,7 @@ namespace vcl
* @return glyph ID, if the character is missing in the font, the return value is 0.
* @ingroup sft
*/
sal_uInt16 MapChar(TrueTypeFont *ttf, sal_uInt16 ch, int bvertical);
sal_uInt16 MapChar(TrueTypeFont *ttf, sal_uInt16 ch, bool bvertical);
/**
* Returns 0 when the font does not substitute vertical glyphs

View File

@ -380,7 +380,7 @@ public:
virtual SalFrame* GetParent() const;
virtual void SetWindowState( const SalFrameState* pState );
virtual bool GetWindowState( SalFrameState* pState );
virtual void ShowFullScreen( sal_Bool bFullScreen, sal_Int32 nDisplay );
virtual void ShowFullScreen( bool bFullScreen, sal_Int32 nDisplay );
// Enable/Disable ScreenSaver, SystemAgents, ...
virtual void StartPresentation( sal_Bool bStart );
// Show Window over all other Windows

View File

@ -235,7 +235,7 @@ public:
virtual SalFrame* GetParent() const;
virtual void SetWindowState( const SalFrameState* pState );
virtual bool GetWindowState( SalFrameState* pState );
virtual void ShowFullScreen( sal_Bool bFullScreen, sal_Int32 nMonitor );
virtual void ShowFullScreen( bool bFullScreen, sal_Int32 nMonitor );
virtual void StartPresentation( sal_Bool bStart );
virtual void SetAlwaysOnTop( sal_Bool bOnTop );
virtual void ToTop( sal_uInt16 nFlags );

View File

@ -106,7 +106,7 @@ public:
virtual SalFrame* GetParent() const;
virtual void SetWindowState( const SalFrameState* pState );
virtual bool GetWindowState( SalFrameState* pState );
virtual void ShowFullScreen( sal_Bool bFullScreen, sal_Int32 nDisplay );
virtual void ShowFullScreen( bool bFullScreen, sal_Int32 nDisplay );
virtual void StartPresentation( sal_Bool bStart );
virtual void SetAlwaysOnTop( sal_Bool bOnTop );
virtual void ToTop( sal_uInt16 nFlags );

View File

@ -171,7 +171,7 @@ public:
IosSalInstance::getInstance()->GetWorkArea( rRect );
}
void ShowFullScreen( sal_Bool, sal_Int32 )
void ShowFullScreen( bool, sal_Int32 )
{
SetPosSize( 0, 0, viewWidth, viewHeight,
SAL_FRAME_POSSIZE_WIDTH | SAL_FRAME_POSSIZE_HEIGHT );

View File

@ -31,6 +31,7 @@
#include <rtl/ustring.hxx>
#include <osl/endian.h>
#include <cassert>
#include <stdio.h>
#include <string.h>
@ -58,7 +59,7 @@ namespace // private
OUString NSStringToOUString( const NSString* cfString)
{
BOOST_ASSERT(cfString && "Invalid parameter");
assert(cfString && "Invalid parameter");
const char* utf8Str = [cfString UTF8String];
unsigned int len = rtl_str_getLength(utf8Str);

View File

@ -34,6 +34,7 @@
#include "osx/salframe.h"
#include <cassert>
#include <memory>
@ -230,8 +231,8 @@ void SAL_CALL DragSource::startDrag(const DragGestureEvent& trigger,
{
MutexGuard guard(m_aMutex);
OSL_ASSERT(listener.is() && "DragSource::startDrag: No XDragSourceListener provided\n");
OSL_ASSERT(transferable.is() && "DragSource::startDrag: No transferable provided\n");
assert(listener.is() && "DragSource::startDrag: No XDragSourceListener provided\n");
assert(transferable.is() && "DragSource::startDrag: No transferable provided\n");
trigger.Event >>= mMouseEvent;
m_MouseButton= mMouseEvent.Buttons;

View File

@ -25,8 +25,7 @@
#include <sstream>
#include <vector>
#include <iomanip>
#include <boost/assert.hpp>
#include <cassert>
using namespace com::sun::star::uno;
@ -122,14 +121,14 @@ const char* HtmlStartTag = "<html";
Sequence<sal_Int8> HTMLFormatToTextHtml(const Sequence<sal_Int8>& aHTMLFormat)
{
BOOST_ASSERT(isHTMLFormat(aHTMLFormat) && "No HTML Format provided");
assert(isHTMLFormat(aHTMLFormat) && "No HTML Format provided");
Sequence<sal_Int8>& nonconstHTMLFormatRef = const_cast< Sequence<sal_Int8>& >(aHTMLFormat);
sal_Char* dataStart = reinterpret_cast<sal_Char*>(nonconstHTMLFormatRef.getArray());
sal_Char* dataEnd = dataStart + nonconstHTMLFormatRef.getLength() - 1;
const sal_Char* htmlStartTag = strcasestr(dataStart, HtmlStartTag);
BOOST_ASSERT(htmlStartTag && "Seems to be no HTML at all");
assert(htmlStartTag && "Seems to be no HTML at all");
// It doesn't seem to be HTML? Well then simply return what has been
// provided in non-debug builds

View File

@ -59,8 +59,8 @@ bool PNGToImage( com::sun::star::uno::Sequence<sal_Int8>& rPngData,
if( !pData)
return false;
NSBitmapImageRep* pRep = [NSBitmapImageRep imageRepWithData: pData];
if( !pRep)
NSBitmapImageRep* pRep = [NSBitmapImageRep imageRepWithData: pData];
if( !pRep)
return false;
NSData* pOut = [pRep representationUsingType: eOutFormat properties: nil];

View File

@ -722,7 +722,7 @@ void AquaSalFrame::SetApplicationID( const OUString &/*rApplicationID*/ )
// -----------------------------------------------------------------------
void AquaSalFrame::ShowFullScreen( sal_Bool bFullScreen, sal_Int32 nDisplay )
void AquaSalFrame::ShowFullScreen( bool bFullScreen, sal_Int32 nDisplay )
{
if ( !mpNSWindow )
return;
@ -730,7 +730,7 @@ void AquaSalFrame::ShowFullScreen( sal_Bool bFullScreen, sal_Int32 nDisplay )
// #i113170# may not be the main thread if called from UNO API
SalData::ensureThreadAutoreleasePool();
SAL_INFO("vcl.macosx", OSL_THIS_FUNC << ": mbFullScreen=" << mbFullScreen << ", bFullScreen=" << bFullScreen);
SAL_INFO("vcl.osx", OSL_THIS_FUNC << ": mbFullScreen=" << mbFullScreen << ", bFullScreen=" << bFullScreen);
if( mbFullScreen == bFullScreen )
return;
@ -1297,8 +1297,8 @@ void AquaSalFrame::UpdateSettings( AllSettings& rSettings )
// images in menus false for MacOSX
aStyleSettings.SetPreferredUseImagesInMenus( false );
aStyleSettings.SetHideDisabledMenuItems( sal_True );
aStyleSettings.SetAcceleratorsInContextMenus( sal_False );
aStyleSettings.SetHideDisabledMenuItems( true );
aStyleSettings.SetAcceleratorsInContextMenus( false );
rSettings.SetStyleSettings( aStyleSettings );
@ -1535,7 +1535,7 @@ bool AquaSalFrame::SetPluginParent( SystemParentData* )
// plugging process;
//TODO: implement
return sal_False;
return false;
}
bool AquaSalFrame::MapUnicodeToKeyCode( sal_Unicode , LanguageType , KeyCode& )

View File

@ -808,7 +808,7 @@ bool AquaSalInstance::AnyInput( sal_uInt16 nType )
if( !nType)
return false;
NSEvent* pEvent = [NSApp nextEventMatchingMask: nEventMask untilDate: nil
NSEvent* pEvent = [NSApp nextEventMatchingMask: nEventMask untilDate: nil
inMode: NSDefaultRunLoopMode dequeue: NO];
return (pEvent != NULL);
}

View File

@ -526,11 +526,11 @@ bool AquaSalMenu::VisibleMenuBar()
static const char *pExperimental = getenv ("AQUA_NATIVE_MENUS");
if ( pExperimental && !strcasecmp(pExperimental, "FALSE") )
return sal_False;
return false;
// End of experimental code enable/disable part
return sal_True;
return true;
}
void AquaSalMenu::SetFrame( const SalFrame *pFrame )

View File

@ -270,7 +270,7 @@ static bool AquaGetScrollRect( /* TODO: int nScreen, */ ControlPart nPart,
*/
bool AquaSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart nPart )
{
bool bOk = sal_False;
bool bOk = false;
// Native controls are now defaults
// If you want to disable experimental native controls code,
@ -421,20 +421,20 @@ bool AquaSalGraphics::hitTestNativeControl( ControlType nType, ControlPart nPart
{
// the left 4 pixels are not hit sensitive
if( rPos.X() - aRect.Left() < 4 )
rIsInside = sal_False;
rIsInside = false;
}
else if( nPart == PART_TRACK_VERT_AREA )
{
// the top 4 pixels are not hit sensitive
if( rPos.Y() - aRect.Top() < 4 )
rIsInside = sal_False;
rIsInside = false;
}
}
}
return bValid;
} // CTRL_SCROLLBAR
return sal_False;
return false;
}
/*
@ -1353,8 +1353,8 @@ bool AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
else if( nPart == PART_BUTTON_DOWN )
{
w = aCtrlBoundRect.GetWidth();
if( w < 3+2*FOCUS_RING_WIDTH )
w = 3+2*FOCUS_RING_WIDTH;
if( w < 3+2*FOCUS_RING_WIDTH )
w = 3+2*FOCUS_RING_WIDTH;
h = COMBOBOX_HEIGHT_NORMAL;//listboxes and comboxes have the same height
x += w-DROPDOWN_BUTTON_WIDTH - FOCUS_RING_WIDTH;

View File

@ -166,7 +166,7 @@ void AquaSalInfoPrinter::ReleaseGraphics( SalGraphics* )
bool AquaSalInfoPrinter::Setup( SalFrame*, ImplJobSetup* )
{
return sal_False;
return false;
}
// -----------------------------------------------------------------------
@ -244,7 +244,7 @@ void AquaSalInfoPrinter::setPaperSize( long i_nWidth, long i_nHeight, Orientatio
bool AquaSalInfoPrinter::SetData( sal_uLong i_nFlags, ImplJobSetup* io_pSetupData )
{
if( ! io_pSetupData || io_pSetupData->mnSystem != JOBSETUP_SYSTEM_MAC )
return sal_False;
return false;
if( mpPrintInfo )
@ -395,7 +395,7 @@ sal_Bool AquaSalInfoPrinter::StartJob( const OUString* i_pFileName,
sal_Int32 nAllPages = 0;
// reset IsLastPage
i_rController.setLastPage( sal_False );
i_rController.setLastPage( false );
// update job data
if( i_pSetupData )
@ -545,7 +545,7 @@ sal_Bool AquaSalInfoPrinter::StartJob( const OUString* i_pFileName,
// inform application that it can release its data
// this is awkward, but the XRenderable interface has no method for this,
// so we need to call XRenderadble::render one last time with IsLastPage = sal_True
i_rController.setLastPage( sal_True );
i_rController.setLastPage( true );
GDIMetaFile aPageFile;
if( mrContext )
SetupPrinterGraphics( mrContext );
@ -643,7 +643,7 @@ bool AquaSalPrinter::StartJob( const OUString* /*i_pFileName*/,
ImplJobSetup* )
{
OSL_FAIL( "should never be called" );
return sal_False;
return false;
}
// -----------------------------------------------------------------------

View File

@ -596,7 +596,7 @@ bool AquaSalGraphics::GetRawFontData( const PhysicalFontFace* pFontData,
// prepare a byte buffer for a fake font
int nTableCount = 7;
nTableCount += (nPrepSize>0) + (nCvtSize>0) + (nFpgmSize>0) + (nGlyfSize>0);
nTableCount += (nPrepSize>0?1:0) + (nCvtSize>0?1:0) + (nFpgmSize>0?1:0) + (nGlyfSize>0?1:0);
const ByteCount nFdirSize = 12 + 16*nTableCount;
ByteCount nTotalSize = nFdirSize;
nTotalSize += nHeadSize + nMaxpSize + nNameSize + nCmapSize;

View File

@ -154,7 +154,7 @@ bool AquaSalGraphics::CreateFontSubset( const OUString& rToFile,
// prepare the requested file name for writing the font-subset file
OUString aSysPath;
if( osl_File_E_None != osl_getSystemPathFromFileURL( rToFile.pData, &aSysPath.pData ) )
return sal_False;
return false;
const rtl_TextEncoding aThreadEncoding = osl_getThreadTextEncoding();
const OString aToFile( OUStringToOString( aSysPath, aThreadEncoding ) );
@ -162,7 +162,7 @@ bool AquaSalGraphics::CreateFontSubset( const OUString& rToFile,
ByteVector aBuffer;
bool bCffOnly = false;
if( !GetRawFontData( pFontData, aBuffer, &bCffOnly ) )
return sal_False;
return false;
// handle CFF-subsetting
if( bCffOnly )
@ -189,7 +189,7 @@ bool AquaSalGraphics::CreateFontSubset( const OUString& rToFile,
TrueTypeFont* pSftFont = NULL;
int nRC = ::OpenTTFontBuffer( (void*)&aBuffer[0], aBuffer.size(), 0, &pSftFont);
if( nRC != SF_OK )
return sal_False;
return false;
// get details about the subsetted font
TTGlobalFontInfo aTTInfo;
@ -264,7 +264,7 @@ bool AquaSalGraphics::CreateFontSubset( const OUString& rToFile,
TTSimpleGlyphMetrics* pGlyphMetrics =
::GetTTSimpleGlyphMetrics( pSftFont, aShortIDs, nGlyphCount, bVertical );
if( !pGlyphMetrics )
return sal_False;
return false;
sal_uInt16 nNotDefAdv = pGlyphMetrics[0].adv;
pGlyphMetrics[0].adv = pGlyphMetrics[nNotDef].adv;
pGlyphMetrics[nNotDef].adv = nNotDefAdv;
@ -859,7 +859,7 @@ bool AquaSalGraphics::drawPolyLine(
bool AquaSalGraphics::drawPolyLineBezier( sal_uInt32, const SalPoint*, const sal_uInt8* )
{
return sal_False;
return false;
}
bool AquaSalGraphics::drawPolyPolygon( const ::basegfx::B2DPolyPolygon& rPolyPoly,
@ -1084,13 +1084,13 @@ void AquaSalGraphics::drawPolygon( sal_uInt32 nPoints, const SalPoint *pPtAry )
bool AquaSalGraphics::drawPolygonBezier( sal_uInt32, const SalPoint*, const sal_uInt8* )
{
return sal_False;
return false;
}
bool AquaSalGraphics::drawPolyPolygonBezier( sal_uInt32, const sal_uInt32*,
const SalPoint* const*, const sal_uInt8* const* )
{
return sal_False;
return false;
}
void AquaSalGraphics::drawRect( long nX, long nY, long nWidth, long nHeight )

View File

@ -325,7 +325,7 @@ void ReleaseGSUB(struct _TrueTypeFont* pTTFile)
delete pGlyphSubstitution;
}
int UseGSUB( struct _TrueTypeFont* pTTFile, int nGlyph, bool /*wmode*/ )
int UseGSUB( struct _TrueTypeFont* pTTFile, int nGlyph )
{
GlyphSubstitution* pGlyphSubstitution = (GlyphSubstitution*)pTTFile->pGSubstitution;
if( pGlyphSubstitution != 0 )

View File

@ -25,7 +25,7 @@ namespace vcl
int HasVerticalGSUB( struct vcl::_TrueTypeFont* pTTFile );
int UseGSUB( struct vcl::_TrueTypeFont* pTTFile, int nGlyph, bool wmode );
int UseGSUB( struct vcl::_TrueTypeFont* pTTFile, int nGlyph );
bool ReadGSUB( struct vcl::_TrueTypeFont* pTTFile, int nRequestedScript, int nRequestedLangsys );

View File

@ -2282,12 +2282,12 @@ int MapString(TrueTypeFont *ttf, sal_uInt16 *str, int nchars, sal_uInt16 *glyphA
for (i = 0; i < nchars; i++) {
cp[i] = (sal_uInt16)ttf->mapper(ttf->cmap, cp[i]);
if (cp[i]!=0 && bvertical)
cp[i] = (sal_uInt16)UseGSUB(ttf,cp[i],bvertical);
cp[i] = (sal_uInt16)UseGSUB(ttf,cp[i]);
}
return nchars;
}
sal_uInt16 MapChar(TrueTypeFont *ttf, sal_uInt16 ch, int bvertical)
sal_uInt16 MapChar(TrueTypeFont *ttf, sal_uInt16 ch, bool bvertical)
{
switch (ttf->cmapType) {
case CMAP_MS_Symbol:
@ -2305,8 +2305,8 @@ sal_uInt16 MapChar(TrueTypeFont *ttf, sal_uInt16 ch, int bvertical)
default: return 0;
}
ch = (sal_uInt16)ttf->mapper(ttf->cmap, ch);
if (ch!=0 && bvertical!=0)
ch = (sal_uInt16)UseGSUB(ttf,ch,bvertical);
if (ch!=0 && bvertical)
ch = (sal_uInt16)UseGSUB(ttf,ch);
return ch;
}
@ -2336,13 +2336,13 @@ bool GetSfntTable( TrueTypeFont* ttf, int nSubtableIndex,
return bOk;
}
TTSimpleGlyphMetrics *GetTTSimpleGlyphMetrics(TrueTypeFont *ttf, sal_uInt16 *glyphArray, int nGlyphs, int mode)
TTSimpleGlyphMetrics *GetTTSimpleGlyphMetrics(TrueTypeFont *ttf, sal_uInt16 *glyphArray, int nGlyphs, bool vertical)
{
const sal_uInt8* pTable;
sal_uInt32 n;
int nTableSize;
if (mode == 0) {
if (!vertical) {
n = ttf->numberOfHMetrics;
pTable = getTable( ttf, O_hmtx );
nTableSize = getTableSize( ttf, O_hmtx );
@ -2391,7 +2391,7 @@ TTSimpleGlyphMetrics *GetTTSimpleGlyphMetrics(TrueTypeFont *ttf, sal_uInt16 *gly
}
#ifndef NO_MAPPERS
TTSimpleGlyphMetrics *GetTTSimpleCharMetrics(TrueTypeFont * ttf, sal_uInt16 firstChar, int nChars, int mode)
TTSimpleGlyphMetrics *GetTTSimpleCharMetrics(TrueTypeFont * ttf, sal_uInt16 firstChar, int nChars, bool vertical)
{
TTSimpleGlyphMetrics *res = 0;
int i, n;
@ -2400,8 +2400,8 @@ TTSimpleGlyphMetrics *GetTTSimpleCharMetrics(TrueTypeFont * ttf, sal_uInt16 firs
assert(str != 0);
for (i=0; i<nChars; i++) str[i] = (sal_uInt16)(firstChar + i);
if ((n = MapString(ttf, str, nChars, 0, mode)) != -1) {
res = GetTTSimpleGlyphMetrics(ttf, str, n, mode);
if ((n = MapString(ttf, str, nChars, 0, vertical)) != -1) {
res = GetTTSimpleGlyphMetrics(ttf, str, n, vertical);
}
free(str);

View File

@ -800,7 +800,7 @@ X11SalFrame::~X11SalFrame()
XSelectInput( GetXDisplay(), GetShellWindow(), 0 );
XSelectInput( GetXDisplay(), GetWindow(), 0 );
ShowFullScreen( sal_False, 0 );
ShowFullScreen( false, 0 );
if( bMapped_ )
Show( sal_False );
@ -2056,7 +2056,7 @@ void X11SalFrame::updateWMClass()
XFree( pClass );
}
void X11SalFrame::ShowFullScreen( sal_Bool bFullScreen, sal_Int32 nScreen )
void X11SalFrame::ShowFullScreen( bool bFullScreen, sal_Int32 nScreen )
{
if( GetDisplay()->IsXinerama() && GetDisplay()->GetXineramaScreens().size() > 1 )
{

View File

@ -2420,7 +2420,7 @@ void GtkSalFrame::SetApplicationID( const OUString &rWMClass )
}
}
void GtkSalFrame::ShowFullScreen( sal_Bool bFullScreen, sal_Int32 nScreen )
void GtkSalFrame::ShowFullScreen( bool bFullScreen, sal_Int32 nScreen )
{
m_bFullscreen = bFullScreen;

View File

@ -1339,7 +1339,7 @@ void ImplWinFontData::ReadGsubTable( HDC hDC ) const
for( const sal_Unicode* pPair = aGSUBCandidates; *pPair; pPair += 2 )
for( sal_Unicode cChar = pPair[0]; cChar < pPair[1]; ++cChar )
if( ::MapChar( pTTFont, cChar, 0 ) != ::MapChar( pTTFont, cChar, 1 ) )
if( ::MapChar( pTTFont, cChar, false ) != ::MapChar( pTTFont, cChar, true ) )
maGsubTable.insert( cChar ); // insert GSUBbed unicodes
CloseTTFont( pTTFont );
@ -2826,7 +2826,7 @@ void WinSalGraphics::GetGlyphWidths( const PhysicalFontFace* pFont,
TTSimpleGlyphMetrics* pMetrics = ::GetTTSimpleGlyphMetrics( aSftTTF.get(),
&aGlyphIds[0],
nGlyphs,
bVertical ? 1 : 0 );
bVertical );
if( pMetrics )
{
for( int i = 0; i< nGlyphs; i++ )
@ -2847,7 +2847,7 @@ void WinSalGraphics::GetGlyphWidths( const PhysicalFontFace* pFont,
{
sal_uInt16 nGlyph = ::MapChar( aSftTTF.get(),
static_cast<sal_Ucs>(nChar),
bVertical ? 1 : 0 );
bVertical );
if( nGlyph )
rUnicodeEnc[ static_cast<sal_Unicode>(nChar) ] = nGlyph;
}

View File

@ -1946,7 +1946,7 @@ void WinSalFrame::SetApplicationID( const OUString &rApplicationID )
// -----------------------------------------------------------------------
void WinSalFrame::ShowFullScreen( sal_Bool bFullScreen, sal_Int32 nDisplay )
void WinSalFrame::ShowFullScreen( bool bFullScreen, sal_Int32 nDisplay )
{
if ( (mbFullScreen == bFullScreen) && (!bFullScreen || (mnDisplay == nDisplay)) )
return;