diff options
29 files changed, 73 insertions, 71 deletions
diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox index 6f4b4963d834..11b761305c52 100644 --- a/include/sal/log-areas.dox +++ b/include/sal/log-areas.dox @@ -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 diff --git a/vcl/generic/fontmanager/fontmanager.cxx b/vcl/generic/fontmanager/fontmanager.cxx index afd6ed58f8f3..4102df704506 100644 --- a/vcl/generic/fontmanager/fontmanager.cxx +++ b/vcl/generic/fontmanager/fontmanager.cxx @@ -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++ ) diff --git a/vcl/headless/svpframe.cxx b/vcl/headless/svpframe.cxx index db5d08d88866..98f0a44b343b 100644 --- a/vcl/headless/svpframe.cxx +++ b/vcl/headless/svpframe.cxx @@ -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 ); diff --git a/vcl/inc/headless/svpframe.hxx b/vcl/inc/headless/svpframe.hxx index c4e88c312fb2..6068ba54cc0f 100644 --- a/vcl/inc/headless/svpframe.hxx +++ b/vcl/inc/headless/svpframe.hxx @@ -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 ); diff --git a/vcl/inc/osx/salframe.h b/vcl/inc/osx/salframe.h index ed9f61ca7b9a..438610706c2e 100644 --- a/vcl/inc/osx/salframe.h +++ b/vcl/inc/osx/salframe.h @@ -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 ); diff --git a/vcl/inc/salframe.hxx b/vcl/inc/salframe.hxx index a30ca80c277a..8f8621a6d6a8 100644 --- a/vcl/inc/salframe.hxx +++ b/vcl/inc/salframe.hxx @@ -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; diff --git a/vcl/inc/sft.hxx b/vcl/inc/sft.hxx index ba69bda08d9b..5c0120afee1e 100644 --- a/vcl/inc/sft.hxx +++ b/vcl/inc/sft.hxx @@ -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 diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx index bd2fd96dbbc8..9d0184c526f6 100644 --- a/vcl/inc/unx/gtk/gtkframe.hxx +++ b/vcl/inc/unx/gtk/gtkframe.hxx @@ -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 diff --git a/vcl/inc/unx/salframe.h b/vcl/inc/unx/salframe.h index d76218b918dc..a41fac4160c0 100644 --- a/vcl/inc/unx/salframe.h +++ b/vcl/inc/unx/salframe.h @@ -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 ); diff --git a/vcl/inc/win/salframe.h b/vcl/inc/win/salframe.h index 2aa3eed27ee3..2309a1b45b72 100644 --- a/vcl/inc/win/salframe.h +++ b/vcl/inc/win/salframe.h @@ -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 ); diff --git a/vcl/ios/iosinst.cxx b/vcl/ios/iosinst.cxx index a8dccdf873da..4ffc6893cfab 100644 --- a/vcl/ios/iosinst.cxx +++ b/vcl/ios/iosinst.cxx @@ -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 ); diff --git a/vcl/osx/DataFlavorMapping.cxx b/vcl/osx/DataFlavorMapping.cxx index 4590e97e2343..b24dffcb8411 100644 --- a/vcl/osx/DataFlavorMapping.cxx +++ b/vcl/osx/DataFlavorMapping.cxx @@ -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); diff --git a/vcl/osx/DragSource.cxx b/vcl/osx/DragSource.cxx index 1e5e5eb6ab8d..6c22424b51e0 100644 --- a/vcl/osx/DragSource.cxx +++ b/vcl/osx/DragSource.cxx @@ -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; diff --git a/vcl/osx/HtmlFmtFlt.cxx b/vcl/osx/HtmlFmtFlt.cxx index f5e0b2282004..74779df5a11e 100644 --- a/vcl/osx/HtmlFmtFlt.cxx +++ b/vcl/osx/HtmlFmtFlt.cxx @@ -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 diff --git a/vcl/osx/PictToBmpFlt.cxx b/vcl/osx/PictToBmpFlt.cxx index 91ed2bc5f177..77c67a654107 100644 --- a/vcl/osx/PictToBmpFlt.cxx +++ b/vcl/osx/PictToBmpFlt.cxx @@ -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]; diff --git a/vcl/osx/salframe.cxx b/vcl/osx/salframe.cxx index 6231886dc145..3ce28c9a2588 100644 --- a/vcl/osx/salframe.cxx +++ b/vcl/osx/salframe.cxx @@ -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& ) diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx index 3d169989d791..e960e8db82bd 100644 --- a/vcl/osx/salinst.cxx +++ b/vcl/osx/salinst.cxx @@ -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); } diff --git a/vcl/osx/salmenu.cxx b/vcl/osx/salmenu.cxx index 57bc23f7add2..8c6006f549ba 100644 --- a/vcl/osx/salmenu.cxx +++ b/vcl/osx/salmenu.cxx @@ -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 ) diff --git a/vcl/osx/salnativewidgets.cxx b/vcl/osx/salnativewidgets.cxx index cb0cfb059062..422cab788cdc 100644 --- a/vcl/osx/salnativewidgets.cxx +++ b/vcl/osx/salnativewidgets.cxx @@ -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; diff --git a/vcl/osx/salprn.cxx b/vcl/osx/salprn.cxx index d57f7e6f1551..c0e13b2dd4ef 100644 --- a/vcl/osx/salprn.cxx +++ b/vcl/osx/salprn.cxx @@ -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; } // ----------------------------------------------------------------------- diff --git a/vcl/quartz/salgdi.cxx b/vcl/quartz/salgdi.cxx index 252a025edf56..91ff6cb1bc9e 100644 --- a/vcl/quartz/salgdi.cxx +++ b/vcl/quartz/salgdi.cxx @@ -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; diff --git a/vcl/quartz/salgdicommon.cxx b/vcl/quartz/salgdicommon.cxx index b1c81212fa63..06a3cfe487b9 100644 --- a/vcl/quartz/salgdicommon.cxx +++ b/vcl/quartz/salgdicommon.cxx @@ -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 ) diff --git a/vcl/source/fontsubset/gsub.cxx b/vcl/source/fontsubset/gsub.cxx index 68ba4014714d..3d5c5d146643 100644 --- a/vcl/source/fontsubset/gsub.cxx +++ b/vcl/source/fontsubset/gsub.cxx @@ -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 ) diff --git a/vcl/source/fontsubset/gsub.h b/vcl/source/fontsubset/gsub.h index ece5aae1195e..362a6196028d 100644 --- a/vcl/source/fontsubset/gsub.h +++ b/vcl/source/fontsubset/gsub.h @@ -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 ); diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx index 93257adc2ef3..b439477f8bca 100644 --- a/vcl/source/fontsubset/sft.cxx +++ b/vcl/source/fontsubset/sft.cxx @@ -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); diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx index 481f44f7c612..50ba7dcbaf2f 100644 --- a/vcl/unx/generic/window/salframe.cxx +++ b/vcl/unx/generic/window/salframe.cxx @@ -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 ) { diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx index 324a06635f84..f5356db897dc 100644 --- a/vcl/unx/gtk/window/gtksalframe.cxx +++ b/vcl/unx/gtk/window/gtksalframe.cxx @@ -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; diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx index fb33dfa0aadd..be8ea7845218 100644 --- a/vcl/win/source/gdi/salgdi3.cxx +++ b/vcl/win/source/gdi/salgdi3.cxx @@ -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; } diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx index 74fbe8adccdf..a2171127a1b5 100644 --- a/vcl/win/source/window/salframe.cxx +++ b/vcl/win/source/window/salframe.cxx @@ -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; |