diff options
1335 files changed, 46343 insertions, 43180 deletions
diff --git a/canvas/source/cairo/cairo_canvasfont.cxx b/canvas/source/cairo/cairo_canvasfont.cxx index 452280728151..e90276f2ba33 100644 --- a/canvas/source/cairo/cairo_canvasfont.cxx +++ b/canvas/source/cairo/cairo_canvasfont.cxx @@ -78,7 +78,7 @@ namespace cairocanvas { maFont->SetAlign( ALIGN_BASELINE ); maFont->SetCharSet( (rFontRequest.FontDescription.IsSymbolFont==com::sun::star::util::TriState_YES) ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE ); - maFont->SetVertical( (rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES) ? TRUE : FALSE ); + maFont->SetVertical( (rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES) ? sal_True : sal_False ); // TODO(F2): improve panose->vclenum conversion maFont->SetWeight( static_cast<FontWeight>(rFontRequest.FontDescription.FontDescription.Weight) ); @@ -94,7 +94,7 @@ namespace cairocanvas if( pOutDev ) { const bool bOldMapState( pOutDev->IsMapModeEnabled() ); - pOutDev->EnableMapMode(FALSE); + pOutDev->EnableMapMode(sal_False); const Size aSize = pOutDev->GetFontMetric( *maFont ).GetSize(); diff --git a/canvas/source/cairo/cairo_canvashelper_text.cxx b/canvas/source/cairo/cairo_canvashelper_text.cxx index 35310e1c078d..7e60d912e1ca 100644 --- a/canvas/source/cairo/cairo_canvashelper_text.cxx +++ b/canvas/source/cairo/cairo_canvashelper_text.cxx @@ -318,7 +318,7 @@ namespace cairocanvas return uno::Reference< rendering::XCachedPrimitive >(NULL); // no output necessary // change text direction and layout mode - ULONG nLayoutMode(0); + sal_uLong nLayoutMode(0); switch( textDirection ) { case rendering::TextDirection::WEAK_LEFT_TO_RIGHT: diff --git a/canvas/source/cairo/cairo_canvashelper_texturefill.cxx b/canvas/source/cairo/cairo_canvashelper_texturefill.cxx index ee8aff6980cf..43447645daf9 100644 --- a/canvas/source/cairo/cairo_canvashelper_texturefill.cxx +++ b/canvas/source/cairo/cairo_canvashelper_texturefill.cxx @@ -82,7 +82,7 @@ namespace cairocanvas const ::Size& rTileSize, const GraphicAttr& rAttr) { - BOOL bRet( false ); + bool bRet( false ); Point aCurrPos; int nX, nY; diff --git a/canvas/source/cairo/cairo_devicehelper.cxx b/canvas/source/cairo/cairo_devicehelper.cxx index 70a5ea51c0ea..36f7a2452aa5 100644 --- a/canvas/source/cairo/cairo_devicehelper.cxx +++ b/canvas/source/cairo/cairo_devicehelper.cxx @@ -270,7 +270,7 @@ namespace cairocanvas const ::Point aEmptyPoint; bool bOldMap( mpRefDevice->IsMapModeEnabled() ); - mpRefDevice->EnableMapMode( FALSE ); + mpRefDevice->EnableMapMode( sal_False ); aStream << mpRefDevice->GetBitmap(aEmptyPoint, mpRefDevice->GetOutputSizePixel()); mpRefDevice->EnableMapMode( bOldMap ); diff --git a/canvas/source/cairo/cairo_textlayout.cxx b/canvas/source/cairo/cairo_textlayout.cxx index d0873b63f5f0..1da9197693ff 100644 --- a/canvas/source/cairo/cairo_textlayout.cxx +++ b/canvas/source/cairo/cairo_textlayout.cxx @@ -81,7 +81,7 @@ namespace cairocanvas sal_Int8 nTextDirection ) { // TODO(P3): avoid if already correctly set - ULONG nLayoutMode; + sal_uLong nLayoutMode; switch( nTextDirection ) { default: diff --git a/canvas/source/directx/dx_5rm.cxx b/canvas/source/directx/dx_5rm.cxx index 642ef7bd7db6..ecc8e6af2a9b 100755 --- a/canvas/source/directx/dx_5rm.cxx +++ b/canvas/source/directx/dx_5rm.cxx @@ -1108,7 +1108,7 @@ namespace dxcanvas const_cast<Window *>(&rWindow), 0) ); // system child window must not receive mouse events - mpWindow->SetMouseTransparent( TRUE ); + mpWindow->SetMouseTransparent( sal_True ); // parent should receive paint messages as well // [PARENTCLIPMODE_NOCLIP], the argument is here @@ -1117,11 +1117,11 @@ namespace dxcanvas mpWindow->SetParentClipMode(0x0002); // the system child window must not clear its background - mpWindow->EnableEraseBackground( FALSE ); + mpWindow->EnableEraseBackground( sal_False ); mpWindow->SetControlForeground(); mpWindow->SetControlBackground(); - mpWindow->EnablePaint(FALSE); + mpWindow->EnablePaint(sal_False); const SystemEnvData *pData = mpWindow->GetSystemData(); const HWND hwnd(reinterpret_cast<HWND>(pData->hWnd)); diff --git a/canvas/source/directx/dx_9rm.cxx b/canvas/source/directx/dx_9rm.cxx index a0f485befa12..6a2d218e936c 100755 --- a/canvas/source/directx/dx_9rm.cxx +++ b/canvas/source/directx/dx_9rm.cxx @@ -696,11 +696,11 @@ namespace dxcanvas mpWindow->SetParentClipMode(0x0002); // the system child window must not clear its background - mpWindow->EnableEraseBackground( FALSE ); + mpWindow->EnableEraseBackground( sal_False ); mpWindow->SetControlForeground(); mpWindow->SetControlBackground(); - mpWindow->EnablePaint(FALSE); + mpWindow->EnablePaint(sal_False); const SystemEnvData *pData = mpWindow->GetSystemData(); const HWND hwnd(reinterpret_cast<HWND>(pData->hWnd)); diff --git a/canvas/source/directx/dx_canvashelper_texturefill.cxx b/canvas/source/directx/dx_canvashelper_texturefill.cxx index 80224aa3d53c..17d5a2983f7c 100755 --- a/canvas/source/directx/dx_canvashelper_texturefill.cxx +++ b/canvas/source/directx/dx_canvashelper_texturefill.cxx @@ -227,6 +227,7 @@ namespace dxcanvas Gdiplus::SolidBrush aBackgroundBrush( rColors[0] ); rGraphics->FillPath( &aBackgroundBrush, pFillPath.get() ); + Gdiplus::Matrix aMatrix; // scale focus according to aspect ratio: for wider-than-tall // bounds (nAspectRatio > 1.0), the focus must have non-zero // width. Specifically, a bound rect twice as wide as tall has @@ -383,7 +384,6 @@ namespace dxcanvas // one sets both, only the translational components of the // texture is respected. - Gdiplus::Matrix aMatrix; tools::gdiPlusMatrixFromAffineMatrix2D( aMatrix, texture.AffineTransform ); GraphicsPathSharedPtr pGradientPath( diff --git a/canvas/source/directx/dx_textlayout_drawhelper.cxx b/canvas/source/directx/dx_textlayout_drawhelper.cxx index 56ec00e9a648..b246cf5bedeb 100755 --- a/canvas/source/directx/dx_textlayout_drawhelper.cxx +++ b/canvas/source/directx/dx_textlayout_drawhelper.cxx @@ -129,7 +129,7 @@ namespace dxcanvas aFont.SetAlign( ALIGN_BASELINE ); aFont.SetCharSet( (rFontRequest.FontDescription.IsSymbolFont==com::sun::star::util::TriState_YES) ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE ); - aFont.SetVertical( (rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES) ? TRUE : FALSE ); + aFont.SetVertical( (rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES) ? sal_True : sal_False ); aFont.SetWeight( static_cast<FontWeight>(rFontRequest.FontDescription.FontDescription.Weight) ); aFont.SetItalic( (rFontRequest.FontDescription.FontDescription.Letterform<=8) ? ITALIC_NONE : ITALIC_NORMAL ); @@ -261,7 +261,7 @@ namespace dxcanvas aFont.SetAlign( ALIGN_BASELINE ); aFont.SetCharSet( (rFontRequest.FontDescription.IsSymbolFont==com::sun::star::util::TriState_YES) ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE ); - aFont.SetVertical( (rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES) ? TRUE : FALSE ); + aFont.SetVertical( (rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES) ? sal_True : sal_False ); aFont.SetWeight( static_cast<FontWeight>(rFontRequest.FontDescription.FontDescription.Weight) ); aFont.SetItalic( (rFontRequest.FontDescription.FontDescription.Letterform<=8) ? ITALIC_NONE : ITALIC_NORMAL ); @@ -301,8 +301,8 @@ namespace dxcanvas return geometry::RealRectangle2D( 0, nAboveBaseline, aVirtualDevice.GetTextWidth( rText.Text, - ::canvas::tools::numeric_cast<USHORT>(rText.StartPosition), - ::canvas::tools::numeric_cast<USHORT>(rText.Length) ), + ::canvas::tools::numeric_cast<sal_uInt16>(rText.StartPosition), + ::canvas::tools::numeric_cast<sal_uInt16>(rText.Length) ), nBelowBaseline ); } } diff --git a/canvas/source/directx/dx_winstuff.hxx b/canvas/source/directx/dx_winstuff.hxx index d1718b07f3d1..f4dc1fcd0496 100755 --- a/canvas/source/directx/dx_winstuff.hxx +++ b/canvas/source/directx/dx_winstuff.hxx @@ -55,9 +55,6 @@ #endif -#define BOOL win32BOOL -#define INT32 win32INT32 -#define UINT32 win32UINT32 #define GradientStyle_RECT win32GradientStyle_RECT #define Polygon win32Polygon #define PolyPolygon win32PolyPolygon @@ -211,9 +208,6 @@ namespace dxcanvas #endif #undef DELETE -#undef BOOL -#undef INT32 -#undef UINT32 #undef PolyPolygon #endif /* _DXCANVAS_WINSTUFF_HXX */ diff --git a/canvas/source/tools/image.cxx b/canvas/source/tools/image.cxx index b6183e463e99..4b8a2a334873 100644 --- a/canvas/source/tools/image.cxx +++ b/canvas/source/tools/image.cxx @@ -417,7 +417,7 @@ namespace canvas { namespace // out notion of alpha is // different from the rest // of the world's - *pCurrOutput++ = 255 - (BYTE)*pAScan++; + *pCurrOutput++ = 255 - (sal_uInt8)*pAScan++; } } break; @@ -437,7 +437,7 @@ namespace canvas { namespace // out notion of alpha is // different from the rest // of the world's - *pCurrOutput++ = 255 - (BYTE)*pAScan++; + *pCurrOutput++ = 255 - (sal_uInt8)*pAScan++; } } break; @@ -469,7 +469,7 @@ namespace canvas { namespace // out notion of alpha is // different from the rest // of the world's - *pCurrOutput++ = 255 - (BYTE)*pAScan++; + *pCurrOutput++ = 255 - (sal_uInt8)*pAScan++; } } break; @@ -661,8 +661,8 @@ namespace canvas { namespace else { // *no* alpha mask - ULONG nFormat = pReadAccess->GetScanlineFormat(); - BYTE *pBuffer = reinterpret_cast<BYTE *>(rBmpData.mpBitmapData); + sal_uIntPtr nFormat = pReadAccess->GetScanlineFormat(); + sal_uInt8 *pBuffer = reinterpret_cast<sal_uInt8 *>(rBmpData.mpBitmapData); switch(nFormat) { @@ -672,14 +672,14 @@ namespace canvas { namespace sal_Int32 height = pReadAccess->Height(); for(sal_Int32 y=0; y<height; ++y) { - BYTE *pScanline=pReadAccess->GetScanline(y); + sal_uInt8 *pScanline=pReadAccess->GetScanline(y); sal_Int32 width = pReadAccess->Width(); for(sal_Int32 x=0; x<width; ++x) { // BGR -> RGB - BYTE b(*pScanline++); - BYTE g(*pScanline++); - BYTE r(*pScanline++); + sal_uInt8 b(*pScanline++); + sal_uInt8 g(*pScanline++); + sal_uInt8 r(*pScanline++); *pBuffer++ = r; *pBuffer++ = g; *pBuffer++ = b; @@ -694,14 +694,14 @@ namespace canvas { namespace sal_Int32 height = pReadAccess->Height(); for(sal_Int32 y=0; y<height; ++y) { - BYTE *pScanline=pReadAccess->GetScanline(y); + sal_uInt8 *pScanline=pReadAccess->GetScanline(y); sal_Int32 width = pReadAccess->Width(); for(sal_Int32 x=0; x<width; ++x) { // RGB -> RGB - BYTE r(*pScanline++); - BYTE g(*pScanline++); - BYTE b(*pScanline++); + sal_uInt8 r(*pScanline++); + sal_uInt8 g(*pScanline++); + sal_uInt8 b(*pScanline++); *pBuffer++ = r; *pBuffer++ = g; *pBuffer++ = b; @@ -720,7 +720,7 @@ namespace canvas { namespace sal_Int32 height = pReadAccess->Height(); for(sal_Int32 y=0; y<height; ++y) { - BYTE *pScanline=pReadAccess->GetScanline(y); + sal_uInt8 *pScanline=pReadAccess->GetScanline(y); sal_Int32 width = pReadAccess->Width(); for(sal_Int32 x=0; x<width; ++x) { @@ -1263,11 +1263,11 @@ ImageCachedPrimitiveSharedPtr Image::fillTexturedPolyPolygonImpl( sal_uInt8 *pDst=pDstBuffer; for(sal_Int32 x=0; x<dwWidth; ++x) { - BYTE r(*pSrc++); - BYTE g(*pSrc++); - BYTE b(*pSrc++); - BYTE Alpha(*pSrc++); - BYTE OneMinusAlpha(0xFF-Alpha); + sal_uInt8 r(*pSrc++); + sal_uInt8 g(*pSrc++); + sal_uInt8 b(*pSrc++); + sal_uInt8 Alpha(*pSrc++); + sal_uInt8 OneMinusAlpha(0xFF-Alpha); *pDst=(((r*Alpha)+((*pDst)*OneMinusAlpha))/0xFF); ++pDst; *pDst=(((g*Alpha)+((*pDst)*OneMinusAlpha))/0xFF); @@ -1287,9 +1287,9 @@ ImageCachedPrimitiveSharedPtr Image::fillTexturedPolyPolygonImpl( sal_uInt8 *pDst=pDstBuffer; for(sal_Int32 x=0; x<dwWidth; ++x) { - BYTE r(*pSrc++); - BYTE g(*pSrc++); - BYTE b(*pSrc++); + sal_uInt8 r(*pSrc++); + sal_uInt8 g(*pSrc++); + sal_uInt8 b(*pSrc++); *pDst++=r; *pDst++=g; *pDst++=b; diff --git a/canvas/source/vcl/bitmapbackbuffer.cxx b/canvas/source/vcl/bitmapbackbuffer.cxx index c09721a5cfaf..53bb67dc32c2 100644 --- a/canvas/source/vcl/bitmapbackbuffer.cxx +++ b/canvas/source/vcl/bitmapbackbuffer.cxx @@ -88,7 +88,7 @@ namespace vclcanvas if( mbVDevContentIsCurrent && mpVDev ) { // VDev content is more current than bitmap - copy contents before! - mpVDev->EnableMapMode( FALSE ); + mpVDev->EnableMapMode( sal_False ); const Point aEmptyPoint; *maBitmap = mpVDev->GetBitmapEx( aEmptyPoint, mpVDev->GetOutputSizePixel() ); @@ -108,7 +108,7 @@ namespace vclcanvas if( mbVDevContentIsCurrent && mpVDev ) { - mpVDev->EnableMapMode( FALSE ); + mpVDev->EnableMapMode( sal_False ); aSize = mpVDev->GetOutputSizePixel(); } @@ -151,7 +151,7 @@ namespace vclcanvas if( mpVDev && mbBitmapContentIsCurrent ) { // fill with bitmap content - mpVDev->EnableMapMode( FALSE ); + mpVDev->EnableMapMode( sal_False ); const Point aEmptyPoint; mpVDev->DrawBitmapEx( aEmptyPoint, *maBitmap ); } diff --git a/canvas/source/vcl/canvasbitmap.cxx b/canvas/source/vcl/canvasbitmap.cxx index 38008e86ba87..2b244602e3fd 100644 --- a/canvas/source/vcl/canvasbitmap.cxx +++ b/canvas/source/vcl/canvasbitmap.cxx @@ -49,7 +49,7 @@ namespace vclcanvas { // create bitmap for given reference device // ======================================== - const USHORT nBitCount( (USHORT)24U ); + const sal_uInt16 nBitCount( (sal_uInt16)24U ); const BitmapPalette* pPalette = NULL; Bitmap aBitmap( rSize, nBitCount, pPalette ); diff --git a/canvas/source/vcl/canvasbitmaphelper.cxx b/canvas/source/vcl/canvasbitmaphelper.cxx index 8fb5a872589d..5b8f9fd84d94 100644 --- a/canvas/source/vcl/canvasbitmaphelper.cxx +++ b/canvas/source/vcl/canvasbitmaphelper.cxx @@ -266,7 +266,7 @@ namespace vclcanvas x<aBmpSize.Width() && x<rect.X2; ++x ) { - *pScan++ = (BYTE)pWriteAccess->GetBestPaletteIndex( + *pScan++ = (sal_uInt8)pWriteAccess->GetBestPaletteIndex( BitmapColor( data[ nCurrPos ], data[ nCurrPos+1 ], data[ nCurrPos+2 ] ) ); @@ -274,7 +274,7 @@ namespace vclcanvas nCurrPos += 3; // cast to unsigned byte, for correct subtraction result - *pAScan++ = static_cast<BYTE>(255 - + *pAScan++ = static_cast<sal_uInt8>(255 - static_cast<sal_uInt8>(data[ nCurrPos++ ])); } } @@ -296,7 +296,7 @@ namespace vclcanvas nCurrPos += 3; // cast to unsigned byte, for correct subtraction result - *pAScan++ = static_cast<BYTE>(255 - + *pAScan++ = static_cast<sal_uInt8>(255 - static_cast<sal_uInt8>(data[ nCurrPos++ ])); } } @@ -318,7 +318,7 @@ namespace vclcanvas nCurrPos += 3; // cast to unsigned byte, for correct subtraction result - *pAScan++ = static_cast<BYTE>(255 - + *pAScan++ = static_cast<sal_uInt8>(255 - static_cast<sal_uInt8>(data[ nCurrPos++ ])); } } @@ -338,7 +338,7 @@ namespace vclcanvas // cast to unsigned byte, for correct subtraction result pAlphaWriteAccess->SetPixel( y, x, BitmapColor( - static_cast<BYTE>(255 - + static_cast<sal_uInt8>(255 - static_cast<sal_uInt8>(data[ nCurrPos++ ])) ) ); } } @@ -359,7 +359,7 @@ namespace vclcanvas x<aBmpSize.Width() && x<rect.X2; ++x ) { - *pScan++ = (BYTE)pWriteAccess->GetBestPaletteIndex( + *pScan++ = (sal_uInt8)pWriteAccess->GetBestPaletteIndex( BitmapColor( data[ nCurrPos ], data[ nCurrPos+1 ], data[ nCurrPos+2 ] ) ); diff --git a/canvas/source/vcl/canvasfont.cxx b/canvas/source/vcl/canvasfont.cxx index e95a3f79f2b5..4ca0084983db 100644 --- a/canvas/source/vcl/canvasfont.cxx +++ b/canvas/source/vcl/canvasfont.cxx @@ -58,7 +58,7 @@ namespace vclcanvas { maFont->SetAlign( ALIGN_BASELINE ); maFont->SetCharSet( (rFontRequest.FontDescription.IsSymbolFont==com::sun::star::util::TriState_YES) ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE ); - maFont->SetVertical( (rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES) ? TRUE : FALSE ); + maFont->SetVertical( (rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES) ? sal_True : sal_False ); // TODO(F2): improve panose->vclenum conversion maFont->SetWeight( static_cast<FontWeight>(rFontRequest.FontDescription.FontDescription.Weight) ); @@ -72,7 +72,7 @@ namespace vclcanvas OutputDevice& rOutDev( rOutDevProvider->getOutDev() ); const bool bOldMapState( rOutDev.IsMapModeEnabled() ); - rOutDev.EnableMapMode(FALSE); + rOutDev.EnableMapMode(sal_False); const Size aSize = rOutDev.GetFontMetric( *maFont ).GetSize(); diff --git a/canvas/source/vcl/canvashelper.cxx b/canvas/source/vcl/canvashelper.cxx index a83b260d52d5..e135ec494fdf 100644 --- a/canvas/source/vcl/canvashelper.cxx +++ b/canvas/source/vcl/canvashelper.cxx @@ -144,7 +144,7 @@ namespace vclcanvas void CanvasHelper::setBackgroundOutDev( const OutDevProviderSharedPtr& rOutDev ) { mp2ndOutDev = rOutDev; - mp2ndOutDev->getOutDev().EnableMapMode( FALSE ); + mp2ndOutDev->getOutDev().EnableMapMode( sal_False ); } void CanvasHelper::clear() @@ -155,7 +155,7 @@ namespace vclcanvas OutputDevice& rOutDev( mpOutDev->getOutDev() ); tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev ); - rOutDev.EnableMapMode( FALSE ); + rOutDev.EnableMapMode( sal_False ); rOutDev.SetLineColor( COL_WHITE ); rOutDev.SetFillColor( COL_WHITE ); rOutDev.DrawRect( Rectangle( Point(), @@ -166,7 +166,7 @@ namespace vclcanvas OutputDevice& rOutDev2( mp2ndOutDev->getOutDev() ); rOutDev2.SetDrawMode( DRAWMODE_DEFAULT ); - rOutDev2.EnableMapMode( FALSE ); + rOutDev2.EnableMapMode( sal_False ); rOutDev2.SetLineColor( COL_WHITE ); rOutDev2.SetFillColor( COL_WHITE ); rOutDev2.DrawRect( Rectangle( Point(), @@ -297,9 +297,9 @@ namespace vclcanvas // DrawPolygon(), and open ones via DrawPolyLine(): // closed polygons will simply already contain the // closing segment. - USHORT nSize( aPolyPoly.Count() ); + sal_uInt16 nSize( aPolyPoly.Count() ); - for( USHORT i=0; i<nSize; ++i ) + for( sal_uInt16 i=0; i<nSize; ++i ) { mpOutDev->getOutDev().DrawPolyLine( aPolyPoly[i] ); @@ -409,21 +409,21 @@ namespace vclcanvas // self-intersections. Therefore, if we would render it // via OutDev::DrawPolyPolygon(), on/off fill would // generate off areas on those self-intersections. - USHORT nSize( aVCLPolyPoly.Count() ); + sal_uInt16 nSize( aVCLPolyPoly.Count() ); - for( USHORT i=0; i<nSize; ++i ) + for( sal_uInt16 i=0; i<nSize; ++i ) { if( aStrokedPolyPoly.getB2DPolygon( i ).isClosed() ) { mpOutDev->getOutDev().DrawPolygon( aVCLPolyPoly[i] ); if( mp2ndOutDev ) mp2ndOutDev->getOutDev().DrawPolygon( aVCLPolyPoly[i] ); } else { - const USHORT nPolySize = aVCLPolyPoly[i].GetSize(); + const sal_uInt16 nPolySize = aVCLPolyPoly[i].GetSize(); if( nPolySize ) { Point rPrevPoint = aVCLPolyPoly[i].GetPoint( 0 ); Point rPoint; - for( USHORT j=1; j<nPolySize; j++ ) { + for( sal_uInt16 j=1; j<nPolySize; j++ ) { rPoint = aVCLPolyPoly[i].GetPoint( j ); mpOutDev->getOutDev().DrawLine( rPrevPoint, rPoint ); if( mp2ndOutDev ) @@ -496,7 +496,7 @@ namespace vclcanvas } else { - mpOutDev->getOutDev().DrawTransparent( aPolyPoly, (USHORT)nTransPercent ); + mpOutDev->getOutDev().DrawTransparent( aPolyPoly, (sal_uInt16)nTransPercent ); } if( mp2ndOutDev ) @@ -521,7 +521,7 @@ namespace vclcanvas } else { - mp2ndOutDev->getOutDev().DrawTransparent( aPolyPoly, (USHORT)nTransPercent ); + mp2ndOutDev->getOutDev().DrawTransparent( aPolyPoly, (sal_uInt16)nTransPercent ); } } } @@ -583,7 +583,7 @@ namespace vclcanvas return uno::Reference< rendering::XCachedPrimitive >(NULL); // no output necessary // change text direction and layout mode - ULONG nLayoutMode(0); + sal_uIntPtr nLayoutMode(0); switch( textDirection ) { case rendering::TextDirection::WEAK_LEFT_TO_RIGHT: @@ -607,16 +607,16 @@ namespace vclcanvas mpOutDev->getOutDev().SetLayoutMode( nLayoutMode ); mpOutDev->getOutDev().DrawText( aOutpos, text.Text, - ::canvas::tools::numeric_cast<USHORT>(text.StartPosition), - ::canvas::tools::numeric_cast<USHORT>(text.Length) ); + ::canvas::tools::numeric_cast<sal_uInt16>(text.StartPosition), + ::canvas::tools::numeric_cast<sal_uInt16>(text.Length) ); if( mp2ndOutDev ) { mp2ndOutDev->getOutDev().SetLayoutMode( nLayoutMode ); mp2ndOutDev->getOutDev().DrawText( aOutpos, text.Text, - ::canvas::tools::numeric_cast<USHORT>(text.StartPosition), - ::canvas::tools::numeric_cast<USHORT>(text.Length) ); + ::canvas::tools::numeric_cast<sal_uInt16>(text.StartPosition), + ::canvas::tools::numeric_cast<sal_uInt16>(text.Length) ); } } @@ -759,7 +759,7 @@ namespace vclcanvas // equivalent to the origAlpha*modulateAlpha the // DX canvas performs) aGrfAttr.SetTransparency( - static_cast< BYTE >( + static_cast< sal_uInt8 >( ::basegfx::fround( 255.0*( 1.0 - nAlphaModulation ) ) ) ); } @@ -778,7 +778,7 @@ namespace vclcanvas // (3600,0]. Note that the original angle may have // values outside the [0,2Pi) interval. const double nAngleInTenthOfDegrees (3600.0 - nRotate * 3600.0 / (2*M_PI)); - aGrfAttr.SetRotation( static_cast< USHORT >(::basegfx::fround(nAngleInTenthOfDegrees)) ); + aGrfAttr.SetRotation( static_cast< sal_uInt16 >(::basegfx::fround(nAngleInTenthOfDegrees)) ); pGrfObj.reset( new GraphicObject( aBmpEx ) ); } @@ -913,7 +913,7 @@ namespace vclcanvas OutputDevice& rOutDev( mpOutDev->getOutDev() ); tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev ); - rOutDev.EnableMapMode( FALSE ); + rOutDev.EnableMapMode( sal_False ); // TODO(F2): Support alpha vdev canvas here const Point aEmptyPoint(0,0); @@ -942,7 +942,7 @@ namespace vclcanvas OutputDevice& rOutDev( mpOutDev->getOutDev() ); tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev ); - rOutDev.EnableMapMode( FALSE ); + rOutDev.EnableMapMode( sal_False ); Bitmap aBitmap( rOutDev.GetBitmap(aRect.TopLeft(), aRect.GetSize()) ); @@ -995,11 +995,11 @@ namespace vclcanvas OutputDevice& rOutDev( mpOutDev->getOutDev() ); tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev ); - rOutDev.EnableMapMode( FALSE ); + rOutDev.EnableMapMode( sal_False ); const Rectangle aRect( ::vcl::unotools::rectangleFromIntegerRectangle2D(rect) ); - const USHORT nBitCount( ::std::min( (USHORT)24U, - (USHORT)rOutDev.GetBitCount() ) ); + const sal_uInt16 nBitCount( ::std::min( (sal_uInt16)24U, + (sal_uInt16)rOutDev.GetBitCount() ) ); const BitmapPalette* pPalette = NULL; if( nBitCount <= 8 ) @@ -1045,7 +1045,7 @@ namespace vclcanvas for( x=0; x<nWidth; ++x ) { - *pScan++ = (BYTE)pWriteAccess->GetBestPaletteIndex( + *pScan++ = (sal_uInt8)pWriteAccess->GetBestPaletteIndex( BitmapColor( data[ nCurrPos ], data[ nCurrPos+1 ], data[ nCurrPos+2 ] ) ); @@ -1121,7 +1121,7 @@ namespace vclcanvas OutputDevice& rOutDev( mpOutDev->getOutDev() ); tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev ); - rOutDev.EnableMapMode( FALSE ); + rOutDev.EnableMapMode( sal_False ); const Size aBmpSize( rOutDev.GetOutputSizePixel() ); @@ -1158,7 +1158,7 @@ namespace vclcanvas OutputDevice& rOutDev( mpOutDev->getOutDev() ); tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev ); - rOutDev.EnableMapMode( FALSE ); + rOutDev.EnableMapMode( sal_False ); const Size aBmpSize( rOutDev.GetOutputSizePixel() ); @@ -1197,7 +1197,7 @@ namespace vclcanvas OutputDevice& rOutDev( mpOutDev->getOutDev() ); OutputDevice* p2ndOutDev = NULL; - rOutDev.EnableMapMode( FALSE ); + rOutDev.EnableMapMode( sal_False ); if( mp2ndOutDev ) p2ndOutDev = &mp2ndOutDev->getOutDev(); diff --git a/canvas/source/vcl/canvashelper_texturefill.cxx b/canvas/source/vcl/canvashelper_texturefill.cxx index c1e71ceb943f..077b30d5b904 100644 --- a/canvas/source/vcl/canvashelper_texturefill.cxx +++ b/canvas/source/vcl/canvashelper_texturefill.cxx @@ -88,7 +88,7 @@ namespace vclcanvas const ::Size& rTileSize, const GraphicAttr& rAttr) { - BOOL bRet( false ); + bool bRet( false ); Point aCurrPos; int nX, nY; @@ -101,10 +101,10 @@ namespace vclcanvas { // update return value. This method should return true, if // at least one of the looped Draws succeeded. - bRet |= rGraphic.Draw( &rOutDev, + bRet |= ( sal_True == rGraphic.Draw( &rOutDev, aCurrPos, rTileSize, - &rAttr ); + &rAttr ) ); aCurrPos.X() += rNextTileX.Width(); aCurrPos.Y() += rNextTileX.Height(); @@ -178,7 +178,7 @@ namespace vclcanvas // vertex values in the loop below (as ::Polygon is a // pimpl class, creating one every loop turn would really // stress the mem allocator) - ::Polygon aTempPoly( static_cast<USHORT>(5) ); + ::Polygon aTempPoly( static_cast<sal_uInt16>(5) ); OSL_ENSURE( nStepCount >= 3, "fillLinearGradient(): stepcount smaller than 3" ); @@ -222,9 +222,9 @@ namespace vclcanvas boost::tuples::tie(nIndex,fAlpha)=aLerper.lerp(double(i)/nStepCount); rOutDev.SetFillColor( - Color( (UINT8)(basegfx::tools::lerp(rColors[nIndex].GetRed(),rColors[nIndex+1].GetRed(),fAlpha)), - (UINT8)(basegfx::tools::lerp(rColors[nIndex].GetGreen(),rColors[nIndex+1].GetGreen(),fAlpha)), - (UINT8)(basegfx::tools::lerp(rColors[nIndex].GetBlue(),rColors[nIndex+1].GetBlue(),fAlpha)) )); + Color( (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetRed(),rColors[nIndex+1].GetRed(),fAlpha)), + (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetGreen(),rColors[nIndex+1].GetGreen(),fAlpha)), + (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetBlue(),rColors[nIndex+1].GetBlue(),fAlpha)) )); // copy right egde of polygon to left edge (and also // copy the closing point) @@ -348,7 +348,7 @@ namespace vclcanvas const sal_uInt32 nNumPoints( aOuterPoly.count() ); - ::Polygon aTempPoly( static_cast<USHORT>(nNumPoints+1) ); + ::Polygon aTempPoly( static_cast<sal_uInt16>(nNumPoints+1) ); // increase number of steps by one: polygonal gradients have // the outermost polygon rendered in rColor2, and the @@ -387,9 +387,9 @@ namespace vclcanvas // lerp color rOutDev.SetFillColor( - Color( (UINT8)(basegfx::tools::lerp(rColors[nIndex].GetRed(),rColors[nIndex+1].GetRed(),fAlpha)), - (UINT8)(basegfx::tools::lerp(rColors[nIndex].GetGreen(),rColors[nIndex+1].GetGreen(),fAlpha)), - (UINT8)(basegfx::tools::lerp(rColors[nIndex].GetBlue(),rColors[nIndex+1].GetBlue(),fAlpha)) )); + Color( (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetRed(),rColors[nIndex+1].GetRed(),fAlpha)), + (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetGreen(),rColors[nIndex+1].GetGreen(),fAlpha)), + (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetBlue(),rColors[nIndex+1].GetBlue(),fAlpha)) )); // scale and render polygon, by interpolating between // outer and inner polygon. @@ -399,13 +399,13 @@ namespace vclcanvas const ::basegfx::B2DPoint& rOuterPoint( aOuterPoly.getB2DPoint(p) ); const ::basegfx::B2DPoint& rInnerPoint( aInnerPoly.getB2DPoint(p) ); - aTempPoly[(USHORT)p] = ::Point( + aTempPoly[(sal_uInt16)p] = ::Point( basegfx::fround( fT*rInnerPoint.getX() + (1-fT)*rOuterPoint.getX() ), basegfx::fround( fT*rInnerPoint.getY() + (1-fT)*rOuterPoint.getY() ) ); } // close polygon explicitely - aTempPoly[(USHORT)p] = aTempPoly[0]; + aTempPoly[(sal_uInt16)p] = aTempPoly[0]; // TODO(P1): compare with vcl/source/gdi/outdev4.cxx, // OutputDevice::ImplDrawComplexGradient(), there's a note @@ -424,7 +424,7 @@ namespace vclcanvas // in the loop below (as ::Polygon is a pimpl class, creating // one every loop turn would really stress the mem allocator) ::PolyPolygon aTempPolyPoly; - ::Polygon aTempPoly2( static_cast<USHORT>(nNumPoints+1) ); + ::Polygon aTempPoly2( static_cast<sal_uInt16>(nNumPoints+1) ); aTempPoly2[0] = rBounds.TopLeft(); aTempPoly2[1] = rBounds.TopRight(); @@ -445,9 +445,9 @@ namespace vclcanvas // lerp color rOutDev.SetFillColor( - Color( (UINT8)(basegfx::tools::lerp(rColors[nIndex].GetRed(),rColors[nIndex+1].GetRed(),fAlpha)), - (UINT8)(basegfx::tools::lerp(rColors[nIndex].GetGreen(),rColors[nIndex+1].GetGreen(),fAlpha)), - (UINT8)(basegfx::tools::lerp(rColors[nIndex].GetBlue(),rColors[nIndex+1].GetBlue(),fAlpha)) )); + Color( (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetRed(),rColors[nIndex+1].GetRed(),fAlpha)), + (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetGreen(),rColors[nIndex+1].GetGreen(),fAlpha)), + (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetBlue(),rColors[nIndex+1].GetBlue(),fAlpha)) )); #if defined(VERBOSE) && OSL_DEBUG_LEVEL > 0 if( i && !(i % 10) ) @@ -463,13 +463,13 @@ namespace vclcanvas const ::basegfx::B2DPoint& rOuterPoint( aOuterPoly.getB2DPoint(p) ); const ::basegfx::B2DPoint& rInnerPoint( aInnerPoly.getB2DPoint(p) ); - aTempPoly[(USHORT)p] = ::Point( + aTempPoly[(sal_uInt16)p] = ::Point( basegfx::fround( fT*rInnerPoint.getX() + (1-fT)*rOuterPoint.getX() ), basegfx::fround( fT*rInnerPoint.getY() + (1-fT)*rOuterPoint.getY() ) ); } // close polygon explicitely - aTempPoly[(USHORT)p] = aTempPoly[0]; + aTempPoly[(sal_uInt16)p] = aTempPoly[0]; // swap inner and outer polygon aTempPolyPoly.Replace( aTempPolyPoly.GetObject( 1 ), 0 ); @@ -921,7 +921,7 @@ namespace vclcanvas aGrfAttr.SetMirrorFlags( ( aScale.getX() < 0.0 ? BMP_MIRROR_HORZ : 0 ) | ( aScale.getY() < 0.0 ? BMP_MIRROR_VERT : 0 ) ); - aGrfAttr.SetRotation( static_cast< USHORT >(::basegfx::fround( nRotate*10.0 )) ); + aGrfAttr.SetRotation( static_cast< sal_uInt16 >(::basegfx::fround( nRotate*10.0 )) ); pGrfObj.reset( new GraphicObject( aBmpEx ) ); } @@ -1050,7 +1050,7 @@ namespace vclcanvas // equivalent to the origAlpha*modulateAlpha // the DX canvas performs) aGrfAttr.SetTransparency( - static_cast< BYTE >( + static_cast< sal_uInt8 >( ::basegfx::fround( 255.0*( 1.0 - textures[0].Alpha ) ) ) ); } @@ -1121,7 +1121,7 @@ namespace vclcanvas aVDev.GetBitmap( aEmptyPoint, aVDev.GetOutputSizePixel() ) ); - BYTE nCol( static_cast< BYTE >( + sal_uInt8 nCol( static_cast< sal_uInt8 >( ::basegfx::fround( 255.0*( 1.0 - textures[0].Alpha ) ) ) ); AlphaMask aAlpha( aVDev.GetOutputSizePixel(), &nCol ); diff --git a/canvas/source/vcl/devicehelper.cxx b/canvas/source/vcl/devicehelper.cxx index 9b7b9fac2857..699a2ebfe9b8 100644 --- a/canvas/source/vcl/devicehelper.cxx +++ b/canvas/source/vcl/devicehelper.cxx @@ -230,7 +230,7 @@ namespace vclcanvas const ::Point aEmptyPoint; OutputDevice& rOutDev = mpOutDev->getOutDev(); bool bOldMap( rOutDev.IsMapModeEnabled() ); - rOutDev.EnableMapMode( FALSE ); + rOutDev.EnableMapMode( sal_False ); aStream << rOutDev.GetBitmap(aEmptyPoint, rOutDev.GetOutputSizePixel()); rOutDev.EnableMapMode( bOldMap ); diff --git a/canvas/source/vcl/impltools.cxx b/canvas/source/vcl/impltools.cxx index b4c19aa5a028..97a825f48f01 100644 --- a/canvas/source/vcl/impltools.cxx +++ b/canvas/source/vcl/impltools.cxx @@ -178,7 +178,7 @@ namespace vclcanvas const ::Polygon& rPoly( rPolyPoly[0] ); - USHORT nCount( rPoly.GetSize() ); + sal_uInt16 nCount( rPoly.GetSize() ); if( nCount < 4 ) return false; @@ -389,7 +389,7 @@ namespace vclcanvas pAlphaWriteAccess->SetPixel( y, x, BitmapColor( 255U - - static_cast<BYTE>( + static_cast<sal_uInt8>( nAlphaModulation* (255U - aAlphaMap[ pAlphaReadAccess->GetPixel( @@ -400,15 +400,15 @@ namespace vclcanvas nSrcX ) ); aColor.SetRed( - static_cast<BYTE>( + static_cast<sal_uInt8>( nRedModulation * aColor.GetRed() + .5 )); aColor.SetGreen( - static_cast<BYTE>( + static_cast<sal_uInt8>( nGreenModulation * aColor.GetGreen() + .5 )); aColor.SetBlue( - static_cast<BYTE>( + static_cast<sal_uInt8>( nBlueModulation * aColor.GetBlue() + .5 )); @@ -443,7 +443,7 @@ namespace vclcanvas pAlphaWriteAccess->SetPixel( y, x, BitmapColor( 255U - - static_cast<BYTE>( + static_cast<sal_uInt8>( nAlphaModulation*255.0 + .5 ) ) ); @@ -451,15 +451,15 @@ namespace vclcanvas nSrcX ) ); aColor.SetRed( - static_cast<BYTE>( + static_cast<sal_uInt8>( nRedModulation * aColor.GetRed() + .5 )); aColor.SetGreen( - static_cast<BYTE>( + static_cast<sal_uInt8>( nGreenModulation * aColor.GetGreen() + .5 )); aColor.SetBlue( - static_cast<BYTE>( + static_cast<sal_uInt8>( nBlueModulation * aColor.GetBlue() + .5 )); diff --git a/canvas/source/vcl/impltools.hxx b/canvas/source/vcl/impltools.hxx index 8bedfc6de340..e79ddb8496df 100644 --- a/canvas/source/vcl/impltools.hxx +++ b/canvas/source/vcl/impltools.hxx @@ -168,7 +168,7 @@ namespace vclcanvas if( mpOutDev ) { mpOutDev->Push(); - mpOutDev->EnableMapMode(FALSE); + mpOutDev->EnableMapMode(sal_False); } } diff --git a/canvas/source/vcl/spritecanvashelper.cxx b/canvas/source/vcl/spritecanvashelper.cxx index f2327a29c480..50f02e6b5888 100644 --- a/canvas/source/vcl/spritecanvashelper.cxx +++ b/canvas/source/vcl/spritecanvashelper.cxx @@ -98,7 +98,7 @@ namespace vclcanvas // clip output to actual update region (otherwise a) // wouldn't save much render time, and b) will clutter // scrolled sprite content outside this area) - rOutDev.EnableMapMode( FALSE ); + rOutDev.EnableMapMode( sal_False ); rOutDev.SetClipRegion( rRequestedArea ); // repaint affected sprite directly to output device (at @@ -318,7 +318,7 @@ namespace vclcanvas // but repaint everything (or caller requested that) maVDev->SetOutputSizePixel( aOutDevSize ); - maVDev->EnableMapMode( FALSE ); + maVDev->EnableMapMode( sal_False ); maVDev->DrawOutDev( aEmptyPoint, aOutDevSize, aEmptyPoint, aOutDevSize, rBackOutDev ); @@ -332,7 +332,7 @@ namespace vclcanvas _1 ) ); // flush to screen - rOutDev.EnableMapMode( FALSE ); + rOutDev.EnableMapMode( sal_False ); rOutDev.SetClipRegion(); rOutDev.DrawOutDev( aEmptyPoint, aOutDevSize, aEmptyPoint, aOutDevSize, @@ -577,7 +577,7 @@ namespace vclcanvas } // paint background - maVDev->EnableMapMode( FALSE ); + maVDev->EnableMapMode( sal_False ); maVDev->SetClipRegion(); maVDev->DrawOutDev( aEmptyPoint, aOutputSize, aOutputPosition, aOutputSize, @@ -594,7 +594,7 @@ namespace vclcanvas _1 ) ); // flush to screen - rOutDev.EnableMapMode( FALSE ); + rOutDev.EnableMapMode( sal_False ); rOutDev.DrawOutDev( aOutputPosition, aOutputSize, aEmptyPoint, aOutputSize, *maVDev ); diff --git a/canvas/source/vcl/spritedevicehelper.cxx b/canvas/source/vcl/spritedevicehelper.cxx index 46561bc3f835..6aa6de0bac97 100644 --- a/canvas/source/vcl/spritedevicehelper.cxx +++ b/canvas/source/vcl/spritedevicehelper.cxx @@ -147,7 +147,7 @@ namespace vclcanvas SvFileStream aStream( aFilename, STREAM_STD_READWRITE ); const ::Point aEmptyPoint; - mpBackBuffer->getOutDev().EnableMapMode( FALSE ); + mpBackBuffer->getOutDev().EnableMapMode( sal_False ); aStream << mpBackBuffer->getOutDev().GetBitmap(aEmptyPoint, mpBackBuffer->getOutDev().GetOutputSizePixel()); } diff --git a/canvas/source/vcl/spritehelper.cxx b/canvas/source/vcl/spritehelper.cxx index a09905e006a8..774a43ae3855 100644 --- a/canvas/source/vcl/spritehelper.cxx +++ b/canvas/source/vcl/spritehelper.cxx @@ -376,7 +376,7 @@ namespace vclcanvas // here // draw semi-transparent - BYTE nColor( static_cast<UINT8>( ::basegfx::fround( 255.0*(1.0 - fAlpha) + .5) ) ); + sal_uInt8 nColor( static_cast<sal_uInt8>( ::basegfx::fround( 255.0*(1.0 - fAlpha) + .5) ) ); AlphaMask aAlpha( maContent->GetSizePixel(), &nColor ); @@ -408,7 +408,7 @@ namespace vclcanvas for( int i=0; i<aMarkerPoly.Count(); ++i ) { - rTargetSurface.DrawPolyLine( aMarkerPoly.GetObject((USHORT)i) ); + rTargetSurface.DrawPolyLine( aMarkerPoly.GetObject((sal_uInt16)i) ); } // paint sprite prio diff --git a/canvas/source/vcl/textlayout.cxx b/canvas/source/vcl/textlayout.cxx index a2fd331fa66f..19b0f7cea4ce 100644 --- a/canvas/source/vcl/textlayout.cxx +++ b/canvas/source/vcl/textlayout.cxx @@ -58,7 +58,7 @@ namespace vclcanvas sal_Int8 nTextDirection ) { // TODO(P3): avoid if already correctly set - ULONG nLayoutMode; + sal_uIntPtr nLayoutMode; switch( nTextDirection ) { default: @@ -139,10 +139,10 @@ namespace vclcanvas if (aVDev.GetTextOutlines( aOutlines, maText.Text, - ::canvas::tools::numeric_cast<USHORT>(maText.StartPosition), - ::canvas::tools::numeric_cast<USHORT>(maText.StartPosition), - ::canvas::tools::numeric_cast<USHORT>(maText.Length), - FALSE, + ::canvas::tools::numeric_cast<sal_uInt16>(maText.StartPosition), + ::canvas::tools::numeric_cast<sal_uInt16>(maText.StartPosition), + ::canvas::tools::numeric_cast<sal_uInt16>(maText.Length), + sal_False, 0, aOffsets.get())) { @@ -192,9 +192,9 @@ namespace vclcanvas if (aVDev.GetGlyphBoundRects( Point(0,0), maText.Text, - ::canvas::tools::numeric_cast<USHORT>(maText.StartPosition), - ::canvas::tools::numeric_cast<USHORT>(maText.Length), - ::canvas::tools::numeric_cast<USHORT>(maText.StartPosition), + ::canvas::tools::numeric_cast<sal_uInt16>(maText.StartPosition), + ::canvas::tools::numeric_cast<sal_uInt16>(maText.Length), + ::canvas::tools::numeric_cast<sal_uInt16>(maText.StartPosition), aMetricVector)) { aBoundingBoxes.realloc(aMetricVector.size()); @@ -272,8 +272,8 @@ namespace vclcanvas return geometry::RealRectangle2D( 0, nAboveBaseline, aVDev.GetTextWidth( maText.Text, - ::canvas::tools::numeric_cast<USHORT>(maText.StartPosition), - ::canvas::tools::numeric_cast<USHORT>(maText.Length) ), + ::canvas::tools::numeric_cast<sal_uInt16>(maText.StartPosition), + ::canvas::tools::numeric_cast<sal_uInt16>(maText.Length) ), nBelowBaseline ); } } @@ -405,15 +405,15 @@ namespace vclcanvas rOutDev.DrawTextArray( rOutpos, maText.Text, aOffsets.get(), - ::canvas::tools::numeric_cast<USHORT>(maText.StartPosition), - ::canvas::tools::numeric_cast<USHORT>(maText.Length) ); + ::canvas::tools::numeric_cast<sal_uInt16>(maText.StartPosition), + ::canvas::tools::numeric_cast<sal_uInt16>(maText.Length) ); } else { rOutDev.DrawText( rOutpos, maText.Text, - ::canvas::tools::numeric_cast<USHORT>(maText.StartPosition), - ::canvas::tools::numeric_cast<USHORT>(maText.Length) ); + ::canvas::tools::numeric_cast<sal_uInt16>(maText.StartPosition), + ::canvas::tools::numeric_cast<sal_uInt16>(maText.Length) ); } return true; diff --git a/comphelper/inc/makefile.mk b/comphelper/JunitTest_comphelper_complex.mk index 5c466f93be42..5da6f2cd2061 100644 --- a/comphelper/inc/makefile.mk +++ b/comphelper/JunitTest_comphelper_complex.mk @@ -2,7 +2,7 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2000, 2010 Oracle and/or its affiliates. +# Copyright 2000, 2011 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # @@ -24,25 +24,25 @@ # for a copy of the LGPLv3 License. # #************************************************************************* -PRJ=.. -PRJNAME=comphelper -TARGET=inc +$(eval $(call gb_JunitTest_JunitTest,comphelper_complex)) -# --- Settings ----------------------------------------------------- +$(eval $(call gb_JunitTest_add_sourcefiles,comphelper_complex,\ + comphelper/qa/complex/comphelper/Map \ + comphelper/qa/complex/comphelper/SequenceOutputStreamUnitTest \ +)) -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk +$(eval $(call gb_JunitTest_add_jars,comphelper_complex,\ + $(OUTDIR)/bin/OOoRunner.jar \ + $(OUTDIR)/bin/ridl.jar \ + $(OUTDIR)/bin/test.jar \ + $(OUTDIR)/bin/unoil.jar \ + $(OUTDIR)/bin/jurt.jar \ +)) -# --- Files -------------------------------------------------------- -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - -.IF "$(ENABLE_PCH)"!="" -ALLTAR : \ - $(SLO)$/precompiled.pch \ - $(SLO)$/precompiled_ex.pch - -.ENDIF # "$(ENABLE_PCH)"!="" +$(eval $(call gb_JunitTest_add_classes,comphelper_complex,\ + complex.comphelper.SequenceOutputStreamUnitTest \ + complex.comphelper.Map \ +)) +# vim: set noet sw=4 ts=4: diff --git a/comphelper/Library_comphelp.mk b/comphelper/Library_comphelp.mk new file mode 100644 index 000000000000..f077c1db4973 --- /dev/null +++ b/comphelper/Library_comphelp.mk @@ -0,0 +1,157 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Library_Library,comphelper)) + +$(eval $(call gb_Library_add_package_headers,comphelper,comphelper_inc)) + +$(eval $(call gb_Library_add_precompiled_header,comphelper,$(SRCDIR)/comphelper/inc/pch/precompiled_comphelper)) + +$(eval $(call gb_Library_set_componentfile,comphelper,comphelper/util/comphelp)) + +$(eval $(call gb_Library_set_include,comphelper,\ + -I$(SRCDIR)/comphelper/inc/pch \ + -I$(SRCDIR)/comphelper/source/inc \ + $$(INCLUDE) \ + -I$(OUTDIR)/inc/offuh \ +)) + +$(eval $(call gb_Library_set_defs,comphelper,\ + $$(DEFS) \ + -DCOMPHELPER_DLLIMPLEMENTATION \ +)) + +$(eval $(call gb_Library_add_linked_libs,comphelper,\ + sal \ + cppuhelper \ + cppu \ + ucbhelper \ + vos3 \ + stl \ + $(gb_STDLIBS) \ +)) + +$(eval $(call gb_Library_add_exception_objects,comphelper,\ + comphelper/source/compare/AnyCompareFactory \ + comphelper/source/container/IndexedPropertyValuesContainer \ + comphelper/source/container/NamedPropertyValuesContainer \ + comphelper/source/container/container \ + comphelper/source/container/containermultiplexer \ + comphelper/source/container/embeddedobjectcontainer \ + comphelper/source/container/enumerablemap \ + comphelper/source/container/enumhelper \ + comphelper/source/container/namecontainer \ + comphelper/source/eventattachermgr/eventattachermgr \ + comphelper/source/misc/accessiblecomponenthelper \ + comphelper/source/misc/accessiblecontexthelper \ + comphelper/source/misc/accessibleeventbuffer \ + comphelper/source/misc/accessibleeventnotifier \ + comphelper/source/misc/accessiblekeybindinghelper \ + comphelper/source/misc/accessibleselectionhelper \ + comphelper/source/misc/accessibletexthelper \ + comphelper/source/misc/accessiblewrapper \ + comphelper/source/misc/accimplaccess \ + comphelper/source/misc/anytostring \ + comphelper/source/misc/asyncnotification \ + comphelper/source/misc/comphelper_module \ + comphelper/source/misc/comphelper_services \ + comphelper/source/misc/componentbase \ + comphelper/source/misc/componentcontext \ + comphelper/source/misc/componentmodule \ + comphelper/source/misc/configurationhelper \ + comphelper/source/misc/docpasswordhelper \ + comphelper/source/misc/docpasswordrequest \ + comphelper/source/misc/documentinfo \ + comphelper/source/misc/documentiologring \ + comphelper/source/misc/evtlistenerhlp \ + comphelper/source/misc/evtmethodhelper \ + comphelper/source/misc/ihwrapnofilter \ + comphelper/source/misc/instancelocker \ + comphelper/source/misc/interaction \ + comphelper/source/misc/legacysingletonfactory \ + comphelper/source/misc/listenernotification \ + comphelper/source/misc/locale \ + comphelper/source/misc/logging \ + comphelper/source/misc/mediadescriptor \ + comphelper/source/misc/mimeconfighelper \ + comphelper/source/misc/namedvaluecollection \ + comphelper/source/misc/numberedcollection \ + comphelper/source/misc/numbers \ + comphelper/source/misc/officeresourcebundle \ + comphelper/source/misc/officerestartmanager \ + comphelper/source/misc/proxyaggregation \ + comphelper/source/misc/regpathhelper \ + comphelper/source/misc/scopeguard \ + comphelper/source/misc/SelectionMultiplex \ + comphelper/source/misc/sequenceashashmap \ + comphelper/source/misc/sequence \ + comphelper/source/misc/servicedecl \ + comphelper/source/misc/serviceinfohelper \ + comphelper/source/misc/sharedmutex \ + comphelper/source/misc/stillreadwriteinteraction \ + comphelper/source/misc/storagehelper \ + comphelper/source/misc/string \ + comphelper/source/misc/synchronousdispatch \ + comphelper/source/misc/types \ + comphelper/source/misc/uieventslogger \ + comphelper/source/misc/weak \ + comphelper/source/misc/weakeventlistener \ + comphelper/source/officeinstdir/officeinstallationdirectories \ + comphelper/source/processfactory/componentfactory \ + comphelper/source/processfactory/processfactory \ + comphelper/source/property/ChainablePropertySet \ + comphelper/source/property/ChainablePropertySetInfo \ + comphelper/source/property/composedprops \ + comphelper/source/property/genericpropertyset \ + comphelper/source/property/MasterPropertySet \ + comphelper/source/property/MasterPropertySetInfo \ + comphelper/source/property/opropertybag \ + comphelper/source/property/propagg \ + comphelper/source/property/propertybag \ + comphelper/source/property/propertycontainer \ + comphelper/source/property/propertycontainerhelper \ + comphelper/source/property/property \ + comphelper/source/property/propertysethelper \ + comphelper/source/property/propertysetinfo \ + comphelper/source/property/propertystatecontainer \ + comphelper/source/property/propmultiplex \ + comphelper/source/property/propstate \ + comphelper/source/property/TypeGeneration \ + comphelper/source/streaming/basicio \ + comphelper/source/streaming/memorystream \ + comphelper/source/streaming/oslfile2streamwrap \ + comphelper/source/streaming/otransactedfilestream \ + comphelper/source/streaming/seekableinput \ + comphelper/source/streaming/seqinputstreamserv \ + comphelper/source/streaming/seqoutputstreamserv \ + comphelper/source/streaming/seqstream \ + comphelper/source/streaming/streamsection \ + comphelper/source/xml/attributelist \ + comphelper/source/xml/ofopxmlhelper \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/comphelper/version.mk b/comphelper/Makefile index f8d798a404b7..a79aff831024 100644 --- a/comphelper/version.mk +++ b/comphelper/Makefile @@ -25,22 +25,14 @@ # #************************************************************************* -# ----------------------------COMPHLP settings------------------------------------# -# target -COMPHLP_TARGET=comphelp - -# the major -COMPHLP_MAJOR=4 -# the minor -COMPHLP_MINOR=0 -# the micro -COMPHLP_MICRO=0 - -# this is a c++ compatible library -COMPHLP_CPP=1 - -COMPHLP=$(COMPHLP_TARGET_TARGET)_$(CMPEXT) - +ifeq ($(strip $(SOLARENV)),) +$(error No environment set!) +endif +gb_PARTIALBUILD := T +GBUILDDIR := $(SOLARENV)/gbuild +include $(GBUILDDIR)/gbuild.mk +$(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk))) +# vim: set noet sw=4 ts=4: diff --git a/svl/util/svl.pmk b/comphelper/Module_comphelper.mk index 854fb6d6d453..e39d973fe23e 100644 --- a/svl/util/svl.pmk +++ b/comphelper/Module_comphelper.mk @@ -2,7 +2,7 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2000, 2010 Oracle and/or its affiliates. +# Copyright 2009 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite # @@ -14,18 +14,26 @@ # # OpenOffice.org is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License version 3 for more details # (a copy is included in the LICENSE file that accompanied this code). # # You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see +# version 3 along with OpenOffice.org. If not, see # <http://www.openoffice.org/license.html> # for a copy of the LGPLv3 License. # #************************************************************************* -# define SVL_DLLIMPLEMENTATION (see @ svldllapi.h) -CDEFS += -DSVL_DLLIMPLEMENTATION +$(eval $(call gb_Module_Module,comphelper)) -VISIBILITY_HIDDEN=TRUE +$(eval $(call gb_Module_add_targets,comphelper,\ + Package_inc \ + Library_comphelp \ +)) + +$(eval $(call gb_Module_add_subsequentcheck_targets,comphelper,\ + JunitTest_comphelper_complex \ +)) + +# vim: set noet ts=4 sw=4: diff --git a/comphelper/Package_inc.mk b/comphelper/Package_inc.mk new file mode 100644 index 000000000000..dcfb4954efb1 --- /dev/null +++ b/comphelper/Package_inc.mk @@ -0,0 +1,135 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Package_Package,comphelper_inc,$(SRCDIR)/comphelper/inc)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/flagguard.hxx,comphelper/flagguard.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/stlunosequence.hxx,comphelper/stlunosequence.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/documentconstants.hxx,comphelper/documentconstants.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/evtmethodhelper.hxx,comphelper/evtmethodhelper.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/weakbag.hxx,comphelper/weakbag.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/basicio.hxx,comphelper/basicio.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/classids.hxx,comphelper/classids.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/MasterPropertySet.hxx,comphelper/MasterPropertySet.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/stillreadwriteinteraction.hxx,comphelper/stillreadwriteinteraction.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/propagg.hxx,comphelper/propagg.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/scopeguard.hxx,comphelper/scopeguard.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/asyncnotification.hxx,comphelper/asyncnotification.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/namedvaluecollection.hxx,comphelper/namedvaluecollection.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/composedprops.hxx,comphelper/composedprops.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/mediadescriptor.hxx,comphelper/mediadescriptor.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/synchronousdispatch.hxx,comphelper/synchronousdispatch.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/accessiblecomponenthelper.hxx,comphelper/accessiblecomponenthelper.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/otransactedfilestream.hxx,comphelper/otransactedfilestream.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/propmultiplex.hxx,comphelper/propmultiplex.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/servicehelper.hxx,comphelper/servicehelper.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/servicedecl.hxx,comphelper/servicedecl.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/mimeconfighelper.hxx,comphelper/mimeconfighelper.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/implbase_var.hxx,comphelper/implbase_var.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/TypeGeneration.hxx,comphelper/TypeGeneration.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/MasterPropertySetInfo.hxx,comphelper/MasterPropertySetInfo.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/accessiblewrapper.hxx,comphelper/accessiblewrapper.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/sequence.hxx,comphelper/sequence.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/uieventslogger.hxx,comphelper/uieventslogger.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/docpasswordhelper.hxx,comphelper/docpasswordhelper.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/propertystatecontainer.hxx,comphelper/propertystatecontainer.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/propertysetinfo.hxx,comphelper/propertysetinfo.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/accimplaccess.hxx,comphelper/accimplaccess.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/docpasswordrequest.hxx,comphelper/docpasswordrequest.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/accessibleeventbuffer.hxx,comphelper/accessibleeventbuffer.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/regpathhelper.hxx,comphelper/regpathhelper.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/extract.hxx,comphelper/extract.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/interaction.hxx,comphelper/interaction.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/uno3.hxx,comphelper/uno3.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/unwrapargs.hxx,comphelper/unwrapargs.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/propertycontainer.hxx,comphelper/propertycontainer.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/guarding.hxx,comphelper/guarding.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/fileformat.h,comphelper/fileformat.h)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/ChainablePropertySetInfo.hxx,comphelper/ChainablePropertySetInfo.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/enumhelper.hxx,comphelper/enumhelper.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/property.hxx,comphelper/property.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/propertysethelper.hxx,comphelper/propertysethelper.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/accessiblekeybindinghelper.hxx,comphelper/accessiblekeybindinghelper.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/propertycontainerhelper.hxx,comphelper/propertycontainerhelper.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/make_shared_from_uno.hxx,comphelper/make_shared_from_uno.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/comphelperdllapi.h,comphelper/comphelperdllapi.h)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/listenernotification.hxx,comphelper/listenernotification.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/attributelist.hxx,comphelper/attributelist.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/streamsection.hxx,comphelper/streamsection.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/accessibletexthelper.hxx,comphelper/accessibletexthelper.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/accessibleselectionhelper.hxx,comphelper/accessibleselectionhelper.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/serviceinfohelper.hxx,comphelper/serviceinfohelper.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/locale.hxx,comphelper/locale.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/numberedcollection.hxx,comphelper/numberedcollection.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/ChainablePropertySet.hxx,comphelper/ChainablePropertySet.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/stl_types.hxx,comphelper/stl_types.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/eventattachermgr.hxx,comphelper/eventattachermgr.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/componentcontext.hxx,comphelper/componentcontext.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/legacysingletonfactory.hxx,comphelper/legacysingletonfactory.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/accessibleeventnotifier.hxx,comphelper/accessibleeventnotifier.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/ihwrapnofilter.hxx,comphelper/ihwrapnofilter.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/sequenceasvector.hxx,comphelper/sequenceasvector.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/officeresourcebundle.hxx,comphelper/officeresourcebundle.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/types.hxx,comphelper/types.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/seekableinput.hxx,comphelper/seekableinput.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/IdPropArrayHelper.hxx,comphelper/IdPropArrayHelper.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/accessiblecontexthelper.hxx,comphelper/accessiblecontexthelper.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/SelectionMultiplex.hxx,comphelper/SelectionMultiplex.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/storagehelper.hxx,comphelper/storagehelper.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/logging.hxx,comphelper/logging.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/sharedmutex.hxx,comphelper/sharedmutex.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/documentinfo.hxx,comphelper/documentinfo.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/weakeventlistener.hxx,comphelper/weakeventlistener.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/componentfactory.hxx,comphelper/componentfactory.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/containermultiplexer.hxx,comphelper/containermultiplexer.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/broadcasthelper.hxx,comphelper/broadcasthelper.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/numbers.hxx,comphelper/numbers.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/evtlistenerhlp.hxx,comphelper/evtlistenerhlp.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/optional.hxx,comphelper/optional.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/componentbase.hxx,comphelper/componentbase.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/InlineContainer.hxx,comphelper/InlineContainer.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/propertybag.hxx,comphelper/propertybag.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/embeddedobjectcontainer.hxx,comphelper/embeddedobjectcontainer.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/anytostring.hxx,comphelper/anytostring.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/implementationreference.hxx,comphelper/implementationreference.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/proparrhlp.hxx,comphelper/proparrhlp.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/PropertyInfoHash.hxx,comphelper/PropertyInfoHash.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/propstate.hxx,comphelper/propstate.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/proxyaggregation.hxx,comphelper/proxyaggregation.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/oslfile2streamwrap.hxx,comphelper/oslfile2streamwrap.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/genericpropertyset.hxx,comphelper/genericpropertyset.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/makesequence.hxx,comphelper/makesequence.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/ofopxmlhelper.hxx,comphelper/ofopxmlhelper.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/SettingsHelper.hxx,comphelper/SettingsHelper.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/string.hxx,comphelper/string.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/weak.hxx,comphelper/weak.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/componentmodule.hxx,comphelper/componentmodule.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/container.hxx,comphelper/container.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/seqstream.hxx,comphelper/seqstream.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/namecontainer.hxx,comphelper/namecontainer.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/processfactory.hxx,comphelper/processfactory.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/sequenceashashmap.hxx,comphelper/sequenceashashmap.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/configurationhelper.hxx,comphelper/configurationhelper.hxx)) diff --git a/comphelper/inc/comphelper/TypeGeneration.hxx b/comphelper/inc/comphelper/TypeGeneration.hxx index 6660e560f4af..08401cb39944 100644 --- a/comphelper/inc/comphelper/TypeGeneration.hxx +++ b/comphelper/inc/comphelper/TypeGeneration.hxx @@ -115,6 +115,7 @@ namespace comphelper CPPUTYPE_SEQNAMEDVALUE, //getCppuType( (Sequence<beans::NamedValue>*)0 ) CPPUTYPE_REFXGRAPHIC, //getCppuType( Reference< graphic::XGraphic >*)0) CPPUTYPE_TABLEBORDERDISTANCES, //getCppuType( (table::TableBorderDistances*)0 ) + CPPUTPYE_REFEMBEDDEDOBJECT, // XEmbeddedObject::static_type CPPUTYPE_END }; diff --git a/comphelper/inc/comphelper/asyncnotification.hxx b/comphelper/inc/comphelper/asyncnotification.hxx index fc4dfcd48dd9..22d901728ef7 100644 --- a/comphelper/inc/comphelper/asyncnotification.hxx +++ b/comphelper/inc/comphelper/asyncnotification.hxx @@ -131,8 +131,9 @@ namespace comphelper virtual oslInterlockedCount SAL_CALL acquire(); virtual oslInterlockedCount SAL_CALL release(); - /// creates (starts) the thread using AsyncEventNotifier_TBASE::create; + using AsyncEventNotifier_TBASE::join; + using AsyncEventNotifier_TBASE::getIdentifier; using AsyncEventNotifier_TBASE::operator new; using AsyncEventNotifier_TBASE::operator delete; diff --git a/comphelper/inc/comphelper/documentconstants.hxx b/comphelper/inc/comphelper/documentconstants.hxx index 73b90d72cc8a..e53bb03ce773 100644 --- a/comphelper/inc/comphelper/documentconstants.hxx +++ b/comphelper/inc/comphelper/documentconstants.hxx @@ -136,7 +136,6 @@ #define SFX_FILTER_STARONEFILTER 0x00080000L #define SFX_FILTER_PACKED 0x00100000L -#define SFX_FILTER_SILENTEXPORT 0x00200000L #define SFX_FILTER_BROWSERPREFERED 0x00400000L diff --git a/comphelper/inc/comphelper/flagguard.hxx b/comphelper/inc/comphelper/flagguard.hxx new file mode 100755 index 000000000000..4fc1f4e97833 --- /dev/null +++ b/comphelper/inc/comphelper/flagguard.hxx @@ -0,0 +1,83 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef COMPHELPER_FLAGGUARD_HXX +#define COMPHELPER_FLAGGUARD_HXX + +#include "comphelper/scopeguard.hxx" + +//...................................................................................................................... +namespace comphelper +{ +//...................................................................................................................... + + //================================================================================================================== + //= FlagRestorationGuard + //================================================================================================================== + class COMPHELPER_DLLPUBLIC FlagRestorationGuard : public ScopeGuard + { + public: + FlagRestorationGuard( bool& i_flagRef, bool i_temporaryValue, exc_handling i_excHandling = IGNORE_EXCEPTIONS ) + :ScopeGuard( ::boost::bind( RestoreFlag, ::boost::ref( i_flagRef ), !!i_flagRef ), i_excHandling ) + { + i_flagRef = i_temporaryValue; + } + + ~FlagRestorationGuard(); + + private: + static void RestoreFlag( bool& i_flagRef, bool i_originalValue ) + { + i_flagRef = i_originalValue; + } + }; + + //================================================================================================================== + //= FlagGuard + //================================================================================================================== + class COMPHELPER_DLLPUBLIC FlagGuard : public ScopeGuard + { + public: + explicit FlagGuard( bool& i_flagRef, exc_handling i_excHandling = IGNORE_EXCEPTIONS ) + :ScopeGuard( ::boost::bind( ResetFlag, ::boost::ref( i_flagRef ) ), i_excHandling ) + { + i_flagRef = true; + } + + ~FlagGuard(); + + private: + static void ResetFlag( bool& i_flagRef ) + { + i_flagRef = false; + } + }; + +//...................................................................................................................... +} // namespace comphelper +//...................................................................................................................... + +#endif // COMPHELPER_FLAGGUARD_HXX diff --git a/comphelper/inc/comphelper/scopeguard.hxx b/comphelper/inc/comphelper/scopeguard.hxx index 1fdd179404a2..e9c8f7ecc625 100644 --- a/comphelper/inc/comphelper/scopeguard.hxx +++ b/comphelper/inc/comphelper/scopeguard.hxx @@ -67,21 +67,6 @@ private: exc_handling const m_excHandling; }; -class COMPHELPER_DLLPUBLIC FlagGuard : ScopeGuard -{ -public: - explicit FlagGuard( bool& i_flagRef, exc_handling i_excHandling = IGNORE_EXCEPTIONS ) - :ScopeGuard( ::boost::bind( ResetFlag, ::boost::ref( i_flagRef ) ), i_excHandling ) - { - } - -private: - static void ResetFlag( bool& i_flagRef ) - { - i_flagRef = false; - } -}; - } // namespace comphelper #endif // ! defined(INCLUDED_COMPHELPER_SCOPEGUARD_HXX) diff --git a/comphelper/prj/build.lst b/comphelper/prj/build.lst index 91e836cabd68..01a022a0e0bc 100644 --- a/comphelper/prj/build.lst +++ b/comphelper/prj/build.lst @@ -1,15 +1,2 @@ -ph comphelper : cppuhelper ucbhelper offuh vos salhelper LIBXSLT:libxslt NULL -ph comphelper usr1 - all ph_mkout NULL -ph comphelper\inc nmake - all ph_inc NULL -ph comphelper\source\container nmake - all ph_container ph_inc NULL -ph comphelper\source\eventattachermgr nmake - all ph_evtatmgr ph_inc NULL -ph comphelper\source\misc nmake - all ph_misc ph_inc NULL -ph comphelper\source\processfactory nmake - all ph_procfact ph_inc NULL -ph comphelper\source\property nmake - all ph_property ph_inc NULL -ph comphelper\source\streaming nmake - all ph_streaming ph_inc NULL -ph comphelper\source\compare nmake - all ph_compare ph_inc NULL -ph comphelper\source\officeinstdir nmake - all ph_officeinstdir ph_inc NULL -ph comphelper\source\xml nmake - all ph_xml NULL -ph comphelper\util nmake - all ph_util ph_container ph_evtatmgr ph_misc ph_procfact ph_property ph_streaming ph_compare ph_officeinstdir ph_xml NULL - -ph comphelper\qa\complex\comphelper nmake - all ph_complex ph_util NULL +ch comphelper : cppuhelper ucbhelper offuh vos salhelper LIBXSLT:libxslt NULL +ch comphelper\prj nmake - all ch_all NULL diff --git a/comphelper/prj/d.lst b/comphelper/prj/d.lst index f05fcf0926dd..e69de29bb2d1 100644 --- a/comphelper/prj/d.lst +++ b/comphelper/prj/d.lst @@ -1,15 +0,0 @@ -..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT%\*.dll -..\%__SRC%\lib\*.lib %_DEST%\lib%_EXT%\*.lib -..\%__SRC%\lib\lib*.so %_DEST%\lib%_EXT% -..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib -..\%__SRC%\lib\*.sl %_DEST%\lib%_EXT%\*.sl -..\%__SRC%\bin\*.bin %_DEST%\bin%_EXT%\*.bin -..\%__SRC%\inc\*.bin %_DEST%\bin%_EXT%\*.bin - -mkdir: %_DEST%\inc%_EXT%\comphelper -..\inc\comphelper\*.hxx %_DEST%\inc%_EXT%\comphelper\*.hxx -..\inc\comphelper\*.h %_DEST%\inc%_EXT%\comphelper\*.h -mkdir: %_DEST%\inc%_EXT%\cppuhelper -..\inc\comphelper\extract.hxx %_DEST%\inc%_EXT%\cppuhelper\extract.hxx -..\version.mk %_DEST%\inc%_EXT%\comphelper\version.mk -..\%__SRC%\misc\comphelp4.component %_DEST%\xml%_EXT%\comphelp4.component diff --git a/comphelper/util/makefile.pmk b/comphelper/prj/makefile.mk index 9a2e65bb0be7..e312a7ccab65 100644 --- a/comphelper/util/makefile.pmk +++ b/comphelper/prj/makefile.mk @@ -25,11 +25,16 @@ # #************************************************************************* -.IF "$(GUI)" == "OS2" -STL_OS2_BUILDING=1 -.ENDIF +PRJ=.. +TARGET=prj + +.INCLUDE : settings.mk -# define COMPHELPER_DLLIMPLEMENTATION (see @ comphelperdllapi.h) -CDEFS += -DCOMPHELPER_DLLIMPLEMENTATION +.IF "$(VERBOSE)"!="" +VERBOSEFLAG := +.ELSE +VERBOSEFLAG := -s +.ENDIF -VISIBILITY_HIDDEN=TRUE +all: + cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) && $(GNUMAKE) $(VERBOSEFLAG) -r deliverlog diff --git a/comphelper/source/eventattachermgr/makefile.mk b/comphelper/source/eventattachermgr/makefile.mk deleted file mode 100644 index 26aca0467d7d..000000000000 --- a/comphelper/source/eventattachermgr/makefile.mk +++ /dev/null @@ -1,50 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. -PRJINC=..$/..$/inc -PRJNAME=comphelper -TARGET=evtattmgr - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings common for the whole project ----- - - -# --- Settings ---------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files ------------------------------------- - -SLOFILES= $(SLO)$/eventattachermgr.obj - -# --- Targets ---------------------------------- - -.INCLUDE : target.mk - diff --git a/comphelper/source/misc/makefile.mk b/comphelper/source/misc/makefile.mk deleted file mode 100644 index 0bb4defb4165..000000000000 --- a/comphelper/source/misc/makefile.mk +++ /dev/null @@ -1,100 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. -PRJNAME=comphelper -TARGET=misc - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ---------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files ------------------------------------- - -SLOFILES= \ - $(SLO)$/accessiblecomponenthelper.obj \ - $(SLO)$/accessiblecontexthelper.obj \ - $(SLO)$/accessibleeventbuffer.obj \ - $(SLO)$/accessibleeventnotifier.obj \ - $(SLO)$/accessiblekeybindinghelper.obj \ - $(SLO)$/accessibleselectionhelper.obj \ - $(SLO)$/accessibletexthelper.obj \ - $(SLO)$/accessiblewrapper.obj \ - $(SLO)$/accimplaccess.obj \ - $(SLO)$/anytostring.obj \ - $(SLO)$/asyncnotification.obj \ - $(SLO)$/componentcontext.obj \ - $(SLO)$/componentmodule.obj \ - $(SLO)$/configurationhelper.obj \ - $(SLO)$/docpasswordhelper.obj \ - $(SLO)$/docpasswordrequest.obj \ - $(SLO)$/documentinfo.obj \ - $(SLO)$/evtmethodhelper.obj \ - $(SLO)$/documentiologring.obj \ - $(SLO)$/evtlistenerhlp.obj \ - $(SLO)$/ihwrapnofilter.obj \ - $(SLO)$/instancelocker.obj \ - $(SLO)$/interaction.obj \ - $(SLO)$/legacysingletonfactory.obj \ - $(SLO)$/listenernotification.obj \ - $(SLO)$/locale.obj \ - $(SLO)$/logging.obj \ - $(SLO)$/mediadescriptor.obj \ - $(SLO)$/mimeconfighelper.obj \ - $(SLO)$/namedvaluecollection.obj \ - $(SLO)$/numberedcollection.obj \ - $(SLO)$/numbers.obj \ - $(SLO)$/officeresourcebundle.obj \ - $(SLO)$/officerestartmanager.obj \ - $(SLO)$/proxyaggregation.obj \ - $(SLO)$/regpathhelper.obj \ - $(SLO)$/scopeguard.obj \ - $(SLO)$/SelectionMultiplex.obj \ - $(SLO)$/sequenceashashmap.obj \ - $(SLO)$/sequence.obj \ - $(SLO)$/servicedecl.obj \ - $(SLO)$/serviceinfohelper.obj \ - $(SLO)$/sharedmutex.obj \ - $(SLO)$/synchronousdispatch.obj \ - $(SLO)$/storagehelper.obj \ - $(SLO)$/string.obj \ - $(SLO)$/types.obj \ - $(SLO)$/uieventslogger.obj \ - $(SLO)$/weakeventlistener.obj \ - $(SLO)$/weak.obj \ - $(SLO)$/comphelper_module.obj \ - $(SLO)$/comphelper_services.obj \ - $(SLO)$/componentbase.obj \ - $(SLO)$/stillreadwriteinteraction.obj \ - -# --- Targets ---------------------------------- - -.INCLUDE : target.mk - diff --git a/comphelper/source/misc/scopeguard.cxx b/comphelper/source/misc/scopeguard.cxx index 7ce478d8bea0..ccd5b618605b 100644 --- a/comphelper/source/misc/scopeguard.cxx +++ b/comphelper/source/misc/scopeguard.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_comphelper.hxx" -#include "comphelper/scopeguard.hxx" +#include "comphelper/flagguard.hxx" #include "osl/diagnose.h" #include "com/sun/star/uno/Exception.hpp" @@ -67,5 +67,13 @@ void ScopeGuard::dismiss() m_func.clear(); } +FlagGuard::~FlagGuard() +{ +} + +FlagRestorationGuard::~FlagRestorationGuard() +{ +} + } // namespace comphelper diff --git a/comphelper/source/officeinstdir/makefile.mk b/comphelper/source/officeinstdir/makefile.mk deleted file mode 100644 index dfe195da662a..000000000000 --- a/comphelper/source/officeinstdir/makefile.mk +++ /dev/null @@ -1,50 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. -PRJINC=..$/..$/inc -PRJNAME=comphelper -TARGET=officeinstdir - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings common for the whole project ----- - - -# --- Settings ---------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files ------------------------------------- - -SLOFILES= $(SLO)$/officeinstallationdirectories.obj - -# --- Targets ---------------------------------- - -.INCLUDE : target.mk - diff --git a/comphelper/source/processfactory/makefile.mk b/comphelper/source/processfactory/makefile.mk deleted file mode 100644 index 531291bb3a15..000000000000 --- a/comphelper/source/processfactory/makefile.mk +++ /dev/null @@ -1,52 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. -PRJNAME=comphelper -TARGET=processfactory - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings common for the whole project ----- - - -# --- Settings ---------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Types ------------------------------------- - -# --- Files ------------------------------------- - -SLOFILES= $(SLO)$/processfactory.obj \ - $(SLO)$/componentfactory.obj - -# --- Targets ---------------------------------- - -.INCLUDE : target.mk - diff --git a/comphelper/source/property/TypeGeneration.cxx b/comphelper/source/property/TypeGeneration.cxx index bf880330ce75..649e50711d28 100644 --- a/comphelper/source/property/TypeGeneration.cxx +++ b/comphelper/source/property/TypeGeneration.cxx @@ -132,7 +132,8 @@ // --> OD 2004-08-09 #i28749# #include <com/sun/star/drawing/HomogenMatrix3.hpp> // <-- -#include <com/sun/star/graphic/XGraphicProvider.hpp> +#include <com/sun/star/graphic/XGraphic.hpp> +#include <com/sun/star/embed/XEmbeddedObject.hpp> using ::rtl::OUString; using namespace ::com::sun::star; @@ -230,6 +231,7 @@ namespace comphelper case CPPUTYPE_SEQNAMEDVALUE: pType = &::getCppuType( (Sequence<beans::NamedValue>*)0 ); break; case CPPUTYPE_REFXGRAPHIC: pType = &::getCppuType( (Reference< graphic::XGraphic >*)0); break; case CPPUTYPE_TABLEBORDERDISTANCES: pType = &::getCppuType( (table::TableBorderDistances*)0 ); break; + case CPPUTPYE_REFEMBEDDEDOBJECT: pType = &embed::XEmbeddedObject::static_type(); break; default: OSL_ASSERT( "Unknown CPPU type" ); } diff --git a/comphelper/source/property/makefile.mk b/comphelper/source/property/makefile.mk deleted file mode 100644 index 1bcdb4c8dd63..000000000000 --- a/comphelper/source/property/makefile.mk +++ /dev/null @@ -1,65 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. -PRJINC=..$/..$/inc -PRJNAME=comphelper -TARGET=property - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ---------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files ------------------------------------- - -SLOFILES= \ - $(SLO)$/MasterPropertySetInfo.obj \ - $(SLO)$/MasterPropertySet.obj \ - $(SLO)$/ChainablePropertySetInfo.obj \ - $(SLO)$/ChainablePropertySet.obj \ - $(SLO)$/TypeGeneration.obj \ - $(SLO)$/genericpropertyset.obj\ - $(SLO)$/propertysethelper.obj \ - $(SLO)$/propertysetinfo.obj \ - $(SLO)$/composedprops.obj \ - $(SLO)$/propagg.obj \ - $(SLO)$/property.obj \ - $(SLO)$/propmultiplex.obj \ - $(SLO)$/propstate.obj \ - $(SLO)$/propertystatecontainer.obj \ - $(SLO)$/propertycontainer.obj \ - $(SLO)$/propertycontainerhelper.obj \ - $(SLO)$/propertybag.obj \ - $(SLO)$/opropertybag.obj - -# --- Targets ---------------------------------- - -.INCLUDE : target.mk - diff --git a/comphelper/source/streaming/makefile.mk b/comphelper/source/streaming/makefile.mk deleted file mode 100644 index 2a6ea38ca65e..000000000000 --- a/comphelper/source/streaming/makefile.mk +++ /dev/null @@ -1,54 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. -PRJNAME=comphelper -TARGET=streaming - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ---------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files ------------------------------------- - -SLOFILES= $(SLO)$/basicio.obj \ - $(SLO)$/oslfile2streamwrap.obj \ - $(SLO)$/seqstream.obj \ - $(SLO)$/seqinputstreamserv.obj \ - $(SLO)$/seqoutputstreamserv.obj \ - $(SLO)$/streamsection.obj \ - $(SLO)$/seekableinput.obj \ - $(SLO)$/otransactedfilestream.obj \ - $(SLO)$/memorystream.obj - -# --- Targets ---------------------------------- - -.INCLUDE : target.mk - diff --git a/comphelper/source/xml/makefile.mk b/comphelper/source/xml/makefile.mk deleted file mode 100644 index 8fa34b2477a2..000000000000 --- a/comphelper/source/xml/makefile.mk +++ /dev/null @@ -1,48 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. -PRJNAME=comphelper -TARGET=xml - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ---------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files ------------------------------------- - -SLOFILES= \ - $(SLO)$/ofopxmlhelper.obj \ - $(SLO)$/attributelist.obj - -# --- Targets ---------------------------------- - -.INCLUDE : target.mk - diff --git a/comphelper/test/uno_iterators/makefile.mk b/comphelper/test/uno_iterators/makefile.mk deleted file mode 100644 index 2346a0d24742..000000000000 --- a/comphelper/test/uno_iterators/makefile.mk +++ /dev/null @@ -1,48 +0,0 @@ -#************************************************************************* -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#***********************************************************************/ - -PRJNAME=extensions -PRJ=..$/.. - -TARGET=uno_iterators - -ENABLE_EXCEPTIONS=TRUE - -.INCLUDE : settings.mk - -OBJFILES= \ - $(OBJ)$/uno_iterators.obj - -APP1TARGET=uno_iterators -APP1OBJS= \ - $(OBJ)$/uno_iterators.obj -APP1STDLIBS= \ - $(SALLIB) \ - $(CPPULIB) \ - $(SALHELPERLIB) \ - $(CPPUHELPERLIB) - -.INCLUDE : target.mk diff --git a/comphelper/test/uno_iterators/uno_iterators.cxx b/comphelper/test/uno_iterators/uno_iterators.cxx deleted file mode 100644 index 6f45b16cf6da..000000000000 --- a/comphelper/test/uno_iterators/uno_iterators.cxx +++ /dev/null @@ -1,218 +0,0 @@ -/************************************************************************* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * -************************************************************************/ - -#include <algorithm> -#include <comphelper/stlunosequence.hxx> -#include <com/sun/star/uno/Sequence.hxx> -#include <iostream> -#include <list> -#include <rtl/textenc.h> -#include <rtl/ustrbuf.hxx> -#include <rtl/ustring.hxx> -#include <vector> - -using namespace ::comphelper; -using namespace ::com::sun::star::uno; -using namespace ::rtl; -using namespace ::std; - -// some helpers for testing (imperative) -void fill_testdata(Sequence<OUString>& seq) -{ - OUStringBuffer buf; - for(sal_Int32 i=0; i<seq.getLength(); i++) - { - buf.appendAscii("Sampletext "); - buf.append(i); - seq[i] = buf.makeStringAndClear(); - } -} - -void print_oustring(const OUString& ustr) -{ cout << OUStringToOString(ustr, RTL_TEXTENCODING_ASCII_US).getStr() << endl; } - -void print_sequence(const Sequence<OUString>& seq) -{ - cout << "Sequence of " << seq.getLength() << " OUStrings: " << endl; - for(sal_Int32 i=0; i<seq.getLength(); i++) - print_oustring(seq[i]); - cout << endl; -} - -// some helpers for testing (functional) -class TestdataGenerator -{ - public: - TestdataGenerator() : m_Index(0) {}; - OUString operator()() { return m_Buf.appendAscii("Sampletext ").append(m_Index++).makeStringAndClear(); }; - OUStringBuffer m_Buf; - sal_Int32 m_Index; -}; - -void fill_testdata_stl(StlUnoSequence<OUString>& stl_seq) -{ - generate(stl_seq.begin(), stl_seq.end(), TestdataGenerator()); -} - -void print_sequence_stl(const StlUnoSequence<OUString>& stl_seq) -{ - cout << "Sequence of " << stl_seq.size() << " OUStrings: " << endl; - for_each(stl_seq.begin(), stl_seq.end(), &print_oustring); - cout << endl; -} - - -// code samples - -// imperative loops (just to show they work, using for_each would be better most of the time -void classic_loops() -{ - Sequence<OUString> s(10); - fill_testdata(s); - StlUnoSequence<OUString>::iterator stl_s_it; - - cout << "for iteration" << endl; - for(stl_s_it = stl_begin(s); stl_s_it != stl_end(s); stl_s_it++) - cout << OUStringToOString(*stl_s_it, RTL_TEXTENCODING_ASCII_US).getStr() << endl; - - cout << "reverse for iteration" << endl; - for(stl_s_it = stl_end(s); stl_s_it != stl_begin(s); stl_s_it--) - cout << OUStringToOString(*(stl_s_it-1), RTL_TEXTENCODING_ASCII_US).getStr() << endl; - - cout << "skipping for iteration" << endl; - for(stl_s_it = stl_begin(s); stl_s_it != stl_end(s); stl_s_it+=2) - cout << OUStringToOString(*stl_s_it, RTL_TEXTENCODING_ASCII_US).getStr() << endl; - - cout << "skipping reverse for iteration" << endl; - for(stl_s_it = stl_end(s); stl_s_it != stl_begin(s); stl_s_it-=2) - std::cout << OUStringToOString(*(stl_s_it-1), RTL_TEXTENCODING_ASCII_US).getStr() << endl; -} - -void stl_algos() -{ - Sequence<OUString> s(10); - fill_testdata(s); - - random_shuffle(stl_begin(s), stl_end(s)); - cout << "shuffed" << std::endl; - print_sequence(s); - - sort(stl_begin(s), stl_end(s)); - cout << "sorted" << std::endl; - print_sequence(s); -} - -void stl_conversions() -{ - Sequence<OUString> s(10); - fill_testdata(s); - StlUnoSequence<OUString> stl_s = StlUnoSequence<OUString>::createInstance(s); - - // convert to stl::vector, modify in vector, copy back, print - cout << "vector conversion" << endl; - vector<OUString> vec(stl_s.begin(), stl_s.end()); - vec[2] = OUString::createFromAscii("changed in vector"); - copy(vec.begin(), vec.end(), stl_s.begin()); - print_sequence(s); - - // convert to stl::list, modify in list, copy back, print - cout << "list conversion" << endl; - list<OUString> l(stl_s.begin(), stl_s.end()); - l.pop_back(); - l.push_back(OUString::createFromAscii("changed in list")); - copy(l.begin(), l.end(), stl_s.begin()); - print_sequence(s); -} - -// inserts the second half of the second sequence after the first element of the first sequence -void stl_inserting() -{ - Sequence<OUString> s1(10); - Sequence<OUString> s2(10); - Sequence<OUString> result(15); - StlUnoSequence<OUString> stl_s1 = StlUnoSequence<OUString>::createInstance(s1); - StlUnoSequence<OUString> stl_s2 = StlUnoSequence<OUString>::createInstance(s2); - StlUnoSequence<OUString> stl_result = StlUnoSequence<OUString>::createInstance(result); - fill_testdata(s1); - fill_testdata(s2); - - list<OUString> temp(stl_s1.begin(), stl_s1.end()); - copy(stl_s2.begin()+5, stl_s2.end(), insert_iterator<list<OUString> >(temp, ++temp.begin())); - copy(temp.begin(), temp.end(), stl_result.begin()); - print_sequence(result); -} - -void stl_compare() -{ - Sequence<OUString> s1(10); - Sequence<OUString> s2(10); - StlUnoSequence<OUString> stl_s1 = StlUnoSequence<OUString>::createInstance(s1); - StlUnoSequence<OUString> stl_s2 = StlUnoSequence<OUString>::createInstance(s2); - if (stl_s1 == stl_s2) - cout << "sequences are equal." << endl; - s2[9] = OUString::createFromAscii("ZZZZZ"); - if(stl_s1 < stl_s2) - cout << "first sequence is smaller." << endl; -} - -void stl_const_sequence() -{ - const Sequence<OUString> s(10); - for(StlUnoSequence<OUString>::const_iterator stl_s_it = stl_begin(s); stl_s_it != stl_end(s); stl_s_it++) - cout << OUStringToOString(*stl_s_it, RTL_TEXTENCODING_ASCII_US).getStr() << endl; -} - -void stl_helpers() -{ - Sequence<OUString> s(10); - StlUnoSequence<OUString> stl_s = StlUnoSequence<OUString>::createInstance(s); - fill_testdata_stl(stl_s); - print_sequence_stl(stl_s); -} - -int main() -{ - cout << "--- CLASSIC LOOPS" << endl; - classic_loops(); - - cout << "--- SOME STL ALGORITHMS" << endl; - stl_algos(); - - cout << "--- SOME STL CONVERSIONS" << endl; - stl_conversions(); - - cout << "--- INSERTING IN SEQUENCE" << endl; - stl_inserting(); - - cout << "--- COMPARING" << endl; - stl_compare(); - - cout << "--- CONST SEQUENCE" << endl; - stl_const_sequence(); - - cout << "--- HELPERS IN STL-STYLE" << endl; - stl_helpers(); -} diff --git a/comphelper/util/comphelp4.component b/comphelper/util/comphelp.component index 10d23d48bcea..10d23d48bcea 100644 --- a/comphelper/util/comphelp4.component +++ b/comphelper/util/comphelp.component diff --git a/comphelper/util/exports.dxp b/comphelper/util/exports.dxp deleted file mode 100644 index 0cb5620a1603..000000000000 --- a/comphelper/util/exports.dxp +++ /dev/null @@ -1,2 +0,0 @@ -component_getImplementationEnvironment -component_getFactory
\ No newline at end of file diff --git a/comphelper/util/makefile.mk b/comphelper/util/makefile.mk deleted file mode 100644 index 62e66672a1cb..000000000000 --- a/comphelper/util/makefile.mk +++ /dev/null @@ -1,78 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=.. -PRJNAME=comphelper -TARGET=comphelper - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/version.mk - -# --- Library ----------------------------------- - -LIB1TARGET= $(SLB)$/$(TARGET).lib -LIB1FILES= $(SLB)$/container.lib \ - $(SLB)$/evtattmgr.lib \ - $(SLB)$/misc.lib \ - $(SLB)$/processfactory.lib \ - $(SLB)$/property.lib \ - $(SLB)$/streaming.lib \ - $(SLB)$/compare.lib \ - $(SLB)$/officeinstdir.lib \ - $(SLB)$/xml.lib - -SHL1TARGET=$(COMPHLP_TARGET)$(COMPHLP_MAJOR)$(COMID) -.IF "$(GUI)" == "OS2" -SHL1TARGET=comph$(COMPHLP_MAJOR) -.ENDIF -SHL1STDLIBS= \ - $(SALLIB) \ - $(CPPUHELPERLIB) \ - $(CPPULIB) \ - $(UCBHELPERLIB) \ - $(VOSLIB) - -SHL1DEPN= -SHL1IMPLIB= i$(COMPHLP_TARGET) -SHL1USE_EXPORTS=name -SHL1LIBS= $(LIB1TARGET) -SHL1DEF= $(MISC)$/$(SHL1TARGET).def - -DEF1NAME= $(SHL1TARGET) -DEFLIB1NAME=$(TARGET) - -# --- Targets ---------------------------------- - -.INCLUDE : target.mk - -ALLTAR : $(MISC)/comphelp4.component - -$(MISC)/comphelp4.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ - comphelp4.component - $(XSLTPROC) --nonet --stringparam uri \ - '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ - $(SOLARENV)/bin/createcomponent.xslt comphelp4.component diff --git a/cppcanvas/source/inc/implrenderer.hxx b/cppcanvas/source/inc/implrenderer.hxx index 8c1f7941abc4..c3613af135a9 100644 --- a/cppcanvas/source/inc/implrenderer.hxx +++ b/cppcanvas/source/inc/implrenderer.hxx @@ -134,7 +134,7 @@ namespace cppcanvas bool isActionContained( GDIMetaFile& rMtf, const char* pCommentString, - USHORT nType ) const; + sal_uInt16 nType ) const; void createGradientAction( const ::PolyPolygon& rPoly, const ::Gradient& rGradient, diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx index 006d55a01de6..e8a6468611f7 100644 --- a/cppcanvas/source/mtfrenderer/implrenderer.cxx +++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx @@ -143,7 +143,7 @@ namespace } void pushState( ::cppcanvas::internal::VectorOfOutDevStates& rStates, - USHORT nFlags ) + sal_uInt16 nFlags ) { rStates.push_back( getState( rStates ) ); getState( rStates ).pushFlags = nFlags; @@ -447,7 +447,7 @@ namespace // translate characters to local preference sal_Unicode cChar = getLocalizedChar( *pBegin, eTextLanguage ); if( cChar != *pBegin ) - rStr.SetChar( sal::static_int_cast<USHORT>(pBegin - pBase), cChar ); + rStr.SetChar( sal::static_int_cast<sal_uInt16>(pBegin - pBase), cChar ); } } } @@ -522,7 +522,7 @@ namespace cppcanvas bool ImplRenderer::isActionContained( GDIMetaFile& rMtf, const char* pCommentString, - USHORT nType ) const + sal_uInt16 nType ) const { ENSURE_OR_THROW( pCommentString, "ImplRenderer::isActionContained(): NULL string given" ); @@ -531,7 +531,7 @@ namespace cppcanvas // at least _one_ call to GDIMetaFile::NextAction() is // executed - ULONG nPos( 1 ); + sal_uIntPtr nPos( 1 ); MetaAction* pCurrAct; while( (pCurrAct=rMtf.NextAction()) != NULL ) @@ -582,7 +582,7 @@ namespace cppcanvas // decide, whether this gradient can be rendered natively // by the canvas, or must be emulated via VCL gradient // action extraction. - const USHORT nSteps( rGradient.GetSteps() ); + const sal_uInt16 nSteps( rGradient.GetSteps() ); if( // step count is infinite, can use native canvas // gradients here @@ -607,17 +607,17 @@ namespace cppcanvas // ---------------------------- // scale color coefficients with gradient intensities - const USHORT nStartIntensity( rGradient.GetStartIntensity() ); + const sal_uInt16 nStartIntensity( rGradient.GetStartIntensity() ); ::Color aVCLStartColor( rGradient.GetStartColor() ); - aVCLStartColor.SetRed( (UINT8)(aVCLStartColor.GetRed() * nStartIntensity / 100) ); - aVCLStartColor.SetGreen( (UINT8)(aVCLStartColor.GetGreen() * nStartIntensity / 100) ); - aVCLStartColor.SetBlue( (UINT8)(aVCLStartColor.GetBlue() * nStartIntensity / 100) ); + aVCLStartColor.SetRed( (sal_uInt8)(aVCLStartColor.GetRed() * nStartIntensity / 100) ); + aVCLStartColor.SetGreen( (sal_uInt8)(aVCLStartColor.GetGreen() * nStartIntensity / 100) ); + aVCLStartColor.SetBlue( (sal_uInt8)(aVCLStartColor.GetBlue() * nStartIntensity / 100) ); - const USHORT nEndIntensity( rGradient.GetEndIntensity() ); + const sal_uInt16 nEndIntensity( rGradient.GetEndIntensity() ); ::Color aVCLEndColor( rGradient.GetEndColor() ); - aVCLEndColor.SetRed( (UINT8)(aVCLEndColor.GetRed() * nEndIntensity / 100) ); - aVCLEndColor.SetGreen( (UINT8)(aVCLEndColor.GetGreen() * nEndIntensity / 100) ); - aVCLEndColor.SetBlue( (UINT8)(aVCLEndColor.GetBlue() * nEndIntensity / 100) ); + aVCLEndColor.SetRed( (sal_uInt8)(aVCLEndColor.GetRed() * nEndIntensity / 100) ); + aVCLEndColor.SetGreen( (sal_uInt8)(aVCLEndColor.GetGreen() * nEndIntensity / 100) ); + aVCLEndColor.SetBlue( (sal_uInt8)(aVCLEndColor.GetBlue() * nEndIntensity / 100) ); uno::Reference<rendering::XColorSpace> xColorSpace( rParms.mrCanvas->getUNOCanvas()->getDevice()->getDeviceColorSpace()); @@ -682,10 +682,23 @@ namespace cppcanvas case GRADIENT_AXIAL: { - basegfx::tools::createLinearODFGradientInfo(aGradInfo, + // Adapt the border so that it is suitable + // for the axial gradient. An axial + // gradient consists of two linear + // gradients. Each of those covers half + // of the total size. In order to + // compensate for the condensed display of + // the linear gradients, we have to + // enlarge the area taken up by the actual + // gradient (1-fBorder). After that we + // have to turn the result back into a + // border value, hence the second (left + // most 1-... + const double fAxialBorder (1-2*(1-fBorder)); + basegfx::tools::createAxialODFGradientInfo(aGradInfo, aBounds, nSteps, - fBorder, + fAxialBorder, fRotation); // map odf to svg gradient orientation - x // instead of y direction @@ -1531,9 +1544,9 @@ namespace cppcanvas (sal_Int8)rFont.GetUnderline(); rState.textStrikeoutStyle = (sal_Int8)rFont.GetStrikeout(); rState.textEmphasisMarkStyle = (sal_Int8)rFont.GetEmphasisMark(); - rState.isTextEffectShadowSet = (rFont.IsShadow() != FALSE); - rState.isTextWordUnderlineSet = (rFont.IsWordLineMode() != FALSE); - rState.isTextOutlineModeSet = (rFont.IsOutline() != FALSE); + rState.isTextEffectShadowSet = (rFont.IsShadow() != sal_False); + rState.isTextWordUnderlineSet = (rFont.IsWordLineMode() != sal_False); + rState.isTextOutlineModeSet = (rFont.IsOutline() != sal_False); } break; @@ -1695,7 +1708,7 @@ namespace cppcanvas // Handle drawing layer fills else if( pAct->GetComment().Equals( "XPATHFILL_SEQ_BEGIN" ) ) { - const BYTE* pData = pAct->GetData(); + const sal_uInt8* pData = pAct->GetData(); if ( pData ) { SvMemoryStream aMemStm( (void*)pData, pAct->GetDataSize(), STREAM_READ ); @@ -2496,7 +2509,7 @@ namespace cppcanvas pAct->GetPoint(), sText, pAct->GetIndex(), - pAct->GetLen() == (USHORT)STRING_LEN ? pAct->GetText().Len() - pAct->GetIndex() : pAct->GetLen(), + pAct->GetLen() == (sal_uInt16)STRING_LEN ? pAct->GetText().Len() - pAct->GetIndex() : pAct->GetLen(), NULL, rFactoryParms, bSubsettableActions ); @@ -2515,7 +2528,7 @@ namespace cppcanvas pAct->GetPoint(), sText, pAct->GetIndex(), - pAct->GetLen() == (USHORT)STRING_LEN ? pAct->GetText().Len() - pAct->GetIndex() : pAct->GetLen(), + pAct->GetLen() == (sal_uInt16)STRING_LEN ? pAct->GetText().Len() - pAct->GetIndex() : pAct->GetLen(), pAct->GetDXArray(), rFactoryParms, bSubsettableActions ); @@ -2590,7 +2603,7 @@ namespace cppcanvas if( rVDev.GetDigitLanguage()) convertToLocalizedNumerals ( sText,rVDev.GetDigitLanguage() ); - const USHORT nLen( pAct->GetLen() == (USHORT)STRING_LEN ? + const sal_uInt16 nLen( pAct->GetLen() == (sal_uInt16)STRING_LEN ? pAct->GetText().Len() - pAct->GetIndex() : pAct->GetLen() ); // #i70897# Nothing to do, actually... @@ -2611,7 +2624,7 @@ namespace cppcanvas // Last entry of pDXArray contains total width of the text sal_Int32* p=pDXArray.get(); - for( USHORT i=1; i<=nLen; ++i ) + for( sal_uInt16 i=1; i<=nLen; ++i ) { // calc ratio for every array entry, to // distribute rounding errors 'evenly' @@ -2626,7 +2639,7 @@ namespace cppcanvas pAct->GetPoint(), sText, pAct->GetIndex(), - pAct->GetLen() == (USHORT)STRING_LEN ? pAct->GetText().Len() - pAct->GetIndex() : pAct->GetLen(), + pAct->GetLen() == (sal_uInt16)STRING_LEN ? pAct->GetText().Len() - pAct->GetIndex() : pAct->GetLen(), pDXArray.get(), rFactoryParms, bSubsettableActions ); @@ -2901,7 +2914,7 @@ namespace cppcanvas VectorOfOutDevStates aStateStack; VirtualDevice aVDev; - aVDev.EnableOutput( FALSE ); + aVDev.EnableOutput( sal_False ); // Setup VDev for state tracking and mapping // ========================================= diff --git a/cppcanvas/source/mtfrenderer/mtftools.cxx b/cppcanvas/source/mtfrenderer/mtftools.cxx index 2d165eca4d38..9860f1d1cd7d 100644 --- a/cppcanvas/source/mtfrenderer/mtftools.cxx +++ b/cppcanvas/source/mtfrenderer/mtftools.cxx @@ -306,14 +306,14 @@ namespace cppcanvas TextLineInfo createTextLineInfo( const ::VirtualDevice& rVDev, const ::cppcanvas::internal::OutDevState& rState ) { - const BOOL bOldMode( rVDev.IsMapModeEnabled() ); + const sal_Bool bOldMode( rVDev.IsMapModeEnabled() ); // #i68512# Force metric regeneration with mapmode enabled // (prolly OutDev bug) rVDev.GetFontMetric(); // will restore map mode below - const_cast< ::VirtualDevice& >(rVDev).EnableMapMode( FALSE ); + const_cast< ::VirtualDevice& >(rVDev).EnableMapMode( sal_False ); const ::FontMetric aMetric = rVDev.GetFontMetric(); diff --git a/cppcanvas/source/mtfrenderer/textaction.cxx b/cppcanvas/source/mtfrenderer/textaction.cxx index 56ce197b7e8e..30aecef24206 100644 --- a/cppcanvas/source/mtfrenderer/textaction.cxx +++ b/cppcanvas/source/mtfrenderer/textaction.cxx @@ -212,8 +212,8 @@ namespace cppcanvas ::boost::scoped_array< sal_Int32 > pCharWidths( new sal_Int32[nLen] ); rVDev.GetTextArray( rText, pCharWidths.get(), - static_cast<USHORT>(nStartPos), - static_cast<USHORT>(nLen) ); + static_cast<sal_uInt16>(nStartPos), + static_cast<sal_uInt16>(nLen) ); return setupDXArray( pCharWidths.get(), nLen, rState ); } @@ -287,8 +287,8 @@ namespace cppcanvas { // TODO(F2): use correct scale direction const ::basegfx::B2DSize aSize( rVDev.GetTextWidth( rStringContext.Text, - static_cast<USHORT>(rStringContext.StartPosition), - static_cast<USHORT>(rStringContext.Length) ), + static_cast<sal_uInt16>(rStringContext.StartPosition), + static_cast<sal_uInt16>(rStringContext.Length) ), 0 ); return (rState.mapModeTransform * aSize).getX(); @@ -1994,10 +1994,10 @@ namespace cppcanvas ::basegfx::B2DPolyPolygon aResultingPolyPolygon; PolyPolyVector aVCLPolyPolyVector; const bool bHaveOutlines( rVDev.GetTextOutlines( aVCLPolyPolyVector, rText, - static_cast<USHORT>(nStartPos), - static_cast<USHORT>(nStartPos), - static_cast<USHORT>(nLen), - TRUE, 0, pDXArray ) ); + static_cast<sal_uInt16>(nStartPos), + static_cast<sal_uInt16>(nStartPos), + static_cast<sal_uInt16>(nLen), + sal_True, 0, pDXArray ) ); rVDev.SetFont(aOrigFont); if( !bHaveOutlines ) diff --git a/cppcanvas/source/wrapper/vclfactory.cxx b/cppcanvas/source/wrapper/vclfactory.cxx index 7983f081b2a9..bc80afaa92cd 100644 --- a/cppcanvas/source/wrapper/vclfactory.cxx +++ b/cppcanvas/source/wrapper/vclfactory.cxx @@ -295,7 +295,7 @@ namespace cppcanvas if( !pSpriteCanvas ) return SpriteSharedPtr(); - const USHORT nBitmaps( rAnim.Count() ); + const sal_uInt16 nBitmaps( rAnim.Count() ); uno::Sequence< uno::Reference< rendering::XBitmap > > aBitmapSequence( nBitmaps ); uno::Reference< rendering::XBitmap >* pBitmaps = aBitmapSequence.getArray(); @@ -310,7 +310,7 @@ namespace cppcanvas for( i=0; i<nBitmaps; ++i ) { - const AnimationBitmap& rAnimBmp( rAnim.Get((USHORT)i) ); + const AnimationBitmap& rAnimBmp( rAnim.Get((sal_uInt16)i) ); // Handle dispose according to GIF spec: a // DISPOSE_PREVIOUS does _not_ mean to revert to the diff --git a/i18npool/inc/i18npool/paper.hxx b/i18npool/inc/i18npool/paper.hxx index 76aebbe473d5..f0a7d76931b7 100644 --- a/i18npool/inc/i18npool/paper.hxx +++ b/i18npool/inc/i18npool/paper.hxx @@ -34,6 +34,10 @@ #include <rtl/string.hxx> #include <com/sun/star/lang/Locale.hpp> +//!! WARNING: be aware of cui/source/tabpages/page.h where someone had the broken idea +//!! of duplicating the values of this enum in order to use those defines within +//!! src files. +//!! Thus don't reorder the enum values here without changing the code there as well. enum Paper { PAPER_A0, @@ -116,6 +120,9 @@ enum Paper PAPER_ARCHE }; +// defined for 'equal size' test with the implementation array +#define NUM_PAPER_ENTRIES (PAPER_ARCHE - PAPER_A0 + 1) + // --------- // - Paper - // --------- diff --git a/i18npool/source/breakiterator/breakiteratorImpl.cxx b/i18npool/source/breakiterator/breakiteratorImpl.cxx index d22203d100c7..19b175d4bd83 100644 --- a/i18npool/source/breakiterator/breakiteratorImpl.cxx +++ b/i18npool/source/breakiterator/breakiteratorImpl.cxx @@ -448,6 +448,10 @@ typedef struct { sal_Int16 script; } UBlock2Script; +// for a list of the UBLOCK_... values see: +// http://icu-project.org/apiref/icu4c/uchar_8h.html +// where enum UBlockCode is defined. +// See also http://www.unicode.org/charts/ for general reference static UBlock2Script scriptList[] = { {UBLOCK_NO_BLOCK, UBLOCK_NO_BLOCK, ScriptType::WEAK}, {UBLOCK_BASIC_LATIN, UBLOCK_ARMENIAN, ScriptType::LATIN}, diff --git a/i18npool/source/paper/paper.cxx b/i18npool/source/paper/paper.cxx index e94efa6e06c5..0d9235747fd6 100644 --- a/i18npool/source/paper/paper.cxx +++ b/i18npool/source/paper/paper.cxx @@ -27,6 +27,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_i18npool.hxx" + +#include <osl/diagnose.h> #include <sal/config.h> #include <rtl/ustring.hxx> #include <rtl/string.hxx> @@ -129,7 +131,6 @@ static PageDesc aDinTab[] = { MM2MM100( 227 ), MM2MM100( 356 ), "SuperA", NULL }, { MM2MM100( 305 ), MM2MM100( 487 ), "SuperB", NULL }, { IN2MM100( 8.5 ), IN2MM100( 12.69 ), "LetterPlus", NULL }, - { IN2MM100( 8.5 ), IN2MM100( 12.69 ), "LetterPlus", NULL }, { MM2MM100( 210 ), MM2MM100( 330 ), "A4Plus", NULL }, { MM2MM100( 200 ), MM2MM100( 148 ), "DoublePostcard", NULL }, { MM2MM100( 105 ), MM2MM100( 148 ), "A6", NULL }, @@ -385,6 +386,9 @@ PaperInfo PaperInfo::getSystemDefaultPaper() PaperInfo::PaperInfo(Paper eType) : m_eType(eType) { + OSL_ENSURE( sizeof(aDinTab) / sizeof(aDinTab[0]) == NUM_PAPER_ENTRIES, + "mismatch between array entries and enum values" ); + m_nPaperWidth = aDinTab[m_eType].m_nWidth; m_nPaperHeight = aDinTab[m_eType].m_nHeight; } diff --git a/l10ntools/inc/cfgmerge.hxx b/l10ntools/inc/cfgmerge.hxx index ae0708f5ff05..2f6418e1aa3f 100644 --- a/l10ntools/inc/cfgmerge.hxx +++ b/l10ntools/inc/cfgmerge.hxx @@ -76,13 +76,13 @@ public: CfgStack() : CfgStackList( 10, 10 ) {} ~CfgStack(); - ULONG Push( CfgStackData *pStackData ); + sal_uLong Push( CfgStackData *pStackData ); CfgStackData *Push( const ByteString &rTag, const ByteString &rId ); CfgStackData *Pop() { return Remove( Count() - 1 ); } - CfgStackData *GetStackData( ULONG nPos = LIST_APPEND ); + CfgStackData *GetStackData( sal_uLong nPos = LIST_APPEND ); - ByteString GetAccessPath( ULONG nPos = LIST_APPEND ); + ByteString GetAccessPath( sal_uLong nPos = LIST_APPEND ); }; // @@ -101,7 +101,7 @@ protected: CfgStack aStack; CfgStackData *pStackData; - BOOL bLocalize; + sal_Bool bLocalize; virtual void WorkOnText( ByteString &rText, @@ -121,7 +121,7 @@ private: const ByteString &rIsoLang, const ByteString &rResTyp ); -BOOL IsTokenClosed( const ByteString &rToken ); +sal_Bool IsTokenClosed( const ByteString &rToken ); public: CfgParser(); @@ -181,9 +181,9 @@ private: std::vector<ByteString> aLanguages; ResData *pResData; - BOOL bGerman; + sal_Bool bGerman; ByteString sFilename; - BOOL bEnglish; + sal_Bool bEnglish; protected: void WorkOnText( diff --git a/l10ntools/inc/export.hxx b/l10ntools/inc/export.hxx index 222cd3bf5cb8..b315d6cb3040 100644 --- a/l10ntools/inc/export.hxx +++ b/l10ntools/inc/export.hxx @@ -61,7 +61,7 @@ struct eqstr{ - BOOL operator()(const char* s1, const char* s2) const{ + sal_Bool operator()(const char* s1, const char* s2) const{ return strcmp(s1,s2)==0; } }; @@ -114,11 +114,11 @@ DECLARE_LIST( ExportListBase, ExportListEntry * ) class ExportList : public ExportListBase { private: - ULONG nSourceLanguageListEntryCount; + sal_uLong nSourceLanguageListEntryCount; public: ExportList() : ExportListBase() { nSourceLanguageListEntryCount = 0; } - ULONG GetSourceLanguageListEntryCount() { return nSourceLanguageListEntryCount; } + sal_uLong GetSourceLanguageListEntryCount() { return nSourceLanguageListEntryCount; } void NewSourceLanguageListEntry() { nSourceLanguageListEntryCount++; } }; @@ -144,21 +144,21 @@ class ResData { public: ~ResData(); - BOOL SetId( const ByteString &rId, USHORT nLevel ); + sal_Bool SetId( const ByteString &rId, sal_uInt16 nLevel ); - USHORT nWidth; - USHORT nChildIndex; - USHORT nIdLevel; - BOOL bChild; - BOOL bChildWithText; + sal_uInt16 nWidth; + sal_uInt16 nChildIndex; + sal_uInt16 nIdLevel; + sal_Bool bChild; + sal_Bool bChildWithText; - BOOL bText; - BOOL bHelpText; - BOOL bQuickHelpText; - BOOL bTitle; - BOOL bList; + sal_Bool bText; + sal_Bool bHelpText; + sal_Bool bQuickHelpText; + sal_Bool bTitle; + sal_Bool bList; - BOOL bRestMerged; + sal_Bool bRestMerged; ByteString sResTyp; ByteString sId; @@ -167,16 +167,16 @@ public: ByteString sFilename; ByteStringHashMap sText; - USHORT nTextRefId; + sal_uInt16 nTextRefId; ByteStringHashMap sHelpText; - USHORT nHelpTextRefId; + sal_uInt16 nHelpTextRefId; ByteStringHashMap sQuickHelpText; - USHORT nQuickHelpTextRefId; + sal_uInt16 nQuickHelpTextRefId; ByteStringHashMap sTitle; - USHORT nTitleRefId; + sal_uInt16 nTitleRefId; ByteString sTextTyp; ByteStringHashMap aFallbackData; @@ -201,14 +201,14 @@ public: nWidth( 0 ), nChildIndex( 0 ), nIdLevel( ID_LEVEL_NULL ), - bChild( FALSE ), - bChildWithText( FALSE ), - bText( FALSE ), - bHelpText( FALSE ), - bQuickHelpText( FALSE ), - bTitle( FALSE ), - bList( FALSE ), - bRestMerged( FALSE ), + bChild( sal_False ), + bChildWithText( sal_False ), + bText( sal_False ), + bHelpText( sal_False ), + bQuickHelpText( sal_False ), + bTitle( sal_False ), + bList( sal_False ), + bRestMerged( sal_False ), sGId( rGId ), nTextRefId( REFID_NONE ), nHelpTextRefId( REFID_NONE ), @@ -229,14 +229,14 @@ public: : nChildIndex( 0 ), nIdLevel( ID_LEVEL_NULL ), - bChild( FALSE ), - bChildWithText( FALSE ), - bText( FALSE ), - bHelpText( FALSE ), - bQuickHelpText( FALSE ), - bTitle( FALSE ), - bList( FALSE ), - bRestMerged( FALSE ), + bChild( sal_False ), + bChildWithText( sal_False ), + bText( sal_False ), + bHelpText( sal_False ), + bQuickHelpText( sal_False ), + bTitle( sal_False ), + bList( sal_False ), + bRestMerged( sal_False ), sGId( rGId ), sFilename( rFilename ), nTextRefId( REFID_NONE ), @@ -300,23 +300,23 @@ private: ByteString sActPForm; // hold cur. system - BOOL bDefine; // cur. res. in a define? - BOOL bNextMustBeDefineEOL; // define but no \ at lineend - ULONG nLevel; // res. recursiv? how deep? - USHORT nList; // cur. res. is String- or FilterList + sal_Bool bDefine; // cur. res. in a define? + sal_Bool bNextMustBeDefineEOL; // define but no \ at lineend + sal_uLong nLevel; // res. recursiv? how deep? + sal_uInt16 nList; // cur. res. is String- or FilterList ByteString nListLang; - ULONG nListIndex; - ULONG nListLevel; + sal_uLong nListIndex; + sal_uLong nListLevel; bool bSkipFile; ByteString sProject; ByteString sRoot; - BOOL bEnableExport; - BOOL bMergeMode; + sal_Bool bEnableExport; + sal_Bool bMergeMode; ByteString sMergeSrc; ByteString sLastListLine; - BOOL bError; // any errors while export? - BOOL bReadOver; - BOOL bDontWriteOutput; + sal_Bool bError; // any errors while export? + sal_Bool bReadOver; + sal_Bool bDontWriteOutput; ByteString sLastTextTyp; static bool isInitialized; ByteString sFilename; @@ -339,7 +339,7 @@ public: static bool hasUTF8ByteOrderMarker( const ByteString &rString ); static void RemoveUTF8ByteOrderMarkerFromFile( const ByteString &rFilename ); static bool fileHasUTF8ByteOrderMarker( const ByteString &rString ); - static ByteString GetIsoLangByIndex( USHORT nIndex ); + static ByteString GetIsoLangByIndex( sal_uInt16 nIndex ); static void QuotHTML( ByteString &rString ); static bool CopyFile( const ByteString& source , const ByteString& dest ); @@ -364,7 +364,7 @@ public: static void FillInFallbacks( ResData *pResData ); static void FillInListFallbacks( ExportList *pList, const ByteString &nSource, const ByteString &nFallback ); static ByteString GetTimeStamp(); - static BOOL ConvertLineEnds( ByteString sSource, ByteString sDestination ); + static sal_Bool ConvertLineEnds( ByteString sSource, ByteString sDestination ); static ByteString GetNativeFile( ByteString sSource ); static DirEntry GetTempFile(); @@ -375,11 +375,11 @@ private: static std::vector<ByteString> aLanguages; static std::vector<ByteString> aForcedLanguages; - BOOL ListExists( ResData *pResData, USHORT nLst ); + sal_Bool ListExists( ResData *pResData, sal_uInt16 nLst ); - BOOL WriteData( ResData *pResData, BOOL bCreateNew = FALSE );// called befor dest. cur ResData - BOOL WriteExportList( ResData *pResData, ExportList *pExportList, - const ByteString &rTyp, BOOL bCreateNew = FALSE ); + sal_Bool WriteData( ResData *pResData, sal_Bool bCreateNew = sal_False );// called befor dest. cur ResData + sal_Bool WriteExportList( ResData *pResData, ExportList *pExportList, + const ByteString &rTyp, sal_Bool bCreateNew = sal_False ); ByteString MergePairedList( ByteString& sLine , ByteString& sText ); @@ -396,10 +396,10 @@ private: void CleanValue( ByteString &rValue ); ByteString GetText( const ByteString &rSource, int nToken ); - BOOL PrepareTextToMerge( ByteString &rText, USHORT nTyp, + sal_Bool PrepareTextToMerge( ByteString &rText, sal_uInt16 nTyp, ByteString &nLangIndex, ResData *pResData ); - void MergeRest( ResData *pResData, USHORT nMode = MERGE_MODE_NORMAL ); + void MergeRest( ResData *pResData, sal_uInt16 nMode = MERGE_MODE_NORMAL ); void ConvertMergeContent( ByteString &rText ); void WriteToMerged( const ByteString &rText , bool bSDFContent ); @@ -408,17 +408,17 @@ private: void CutComment( ByteString &rText ); public: - Export( const ByteString &rOutput, BOOL bWrite, + Export( const ByteString &rOutput, sal_Bool bWrite, const ByteString &rPrj, const ByteString &rPrjRoot , const ByteString& rFile ); - Export( const ByteString &rOutput, BOOL bWrite, + Export( const ByteString &rOutput, sal_Bool bWrite, const ByteString &rPrj, const ByteString &rPrjRoot, const ByteString &rMergeSource , const ByteString& rFile ); ~Export(); void Init(); int Execute( int nToken, const char * pToken ); // called from lexer - void SetError() { bError = TRUE; } - BOOL GetError() { return bError; } + void SetError() { bError = sal_True; } + sal_Bool GetError() { return bError; } }; @@ -459,8 +459,8 @@ public: sTitle[ nId ] = rTitle; bTitleFirst[ nId ] = true; } - BOOL GetText( ByteString &rReturn, USHORT nTyp, const ByteString &nLangIndex, BOOL bDel = FALSE ); - BOOL GetTransex3Text( ByteString &rReturn, USHORT nTyp, const ByteString &nLangIndex, BOOL bDel = FALSE ); + sal_Bool GetText( ByteString &rReturn, sal_uInt16 nTyp, const ByteString &nLangIndex, sal_Bool bDel = sal_False ); + sal_Bool GetTransex3Text( ByteString &rReturn, sal_uInt16 nTyp, const ByteString &nLangIndex, sal_Bool bDel = sal_False ); }; @@ -494,7 +494,7 @@ public: PFormEntrys* GetPFObject( const ByteString& rPFO ); ByteString Dump(); - BOOL operator==( ResData *pData ); + sal_Bool operator==( ResData *pData ); }; // @@ -508,7 +508,7 @@ public: class MergeDataFile { private: - BOOL bErrorLog; + sal_Bool bErrorLog; ByteString sErrorLog; SvFileStream aErrLog; MergeDataHashMap aMap; @@ -525,7 +525,7 @@ class MergeDataFile void WriteError( const ByteString &rLine ); public: - MergeDataFile( const ByteString &rFileName, const ByteString& rFile , BOOL bErrLog, CharSet aCharSet, bool bCaseSensitive = false ); + MergeDataFile( const ByteString &rFileName, const ByteString& rFile , sal_Bool bErrLog, CharSet aCharSet, bool bCaseSensitive = false ); ~MergeDataFile(); std::vector<ByteString> GetLanguages(); diff --git a/l10ntools/inc/gsicheck.hxx b/l10ntools/inc/gsicheck.hxx index fb1eecd38c82..6779557a4bb6 100644 --- a/l10ntools/inc/gsicheck.hxx +++ b/l10ntools/inc/gsicheck.hxx @@ -41,7 +41,7 @@ private: ParserMessageList aMessages; LineFormat aFormat; - ULONG nLineNumber; + sal_uLong nLineNumber; ByteString aUniqId; ByteString aLineType; @@ -50,15 +50,15 @@ private: ByteString aQuickHelpText; ByteString aTitle; - BOOL bOK; - BOOL bFixed; + sal_Bool bOK; + sal_Bool bFixed; void ReassembleLine(); public: - GSILine( const ByteString &rLine, ULONG nLine ); + GSILine( const ByteString &rLine, sal_uLong nLine ); LineFormat GetLineFormat() const { return aFormat; } - ULONG GetLineNumber() const { return nLineNumber; } + sal_uLong GetLineNumber() const { return nLineNumber; } ByteString const GetUniqId() const { return aUniqId; } ByteString const GetLineType() const { return aLineType; } @@ -74,13 +74,13 @@ public: void SetTitle( ByteString &aNew ) { aTitle = aNew; ReassembleLine(); } ParserMessageList* GetMessageList() { return &aMessages; }; - BOOL HasMessages(){ return ( aMessages.Count() > 0 ); }; + sal_Bool HasMessages(){ return ( aMessages.Count() > 0 ); }; - BOOL IsOK() const { return bOK; } + sal_Bool IsOK() const { return bOK; } void NotOK(); - BOOL IsFixed() const { return bFixed; } - void SetFixed() { bFixed = TRUE; }; + sal_Bool IsFixed() const { return bFixed; } + void SetFixed() { bFixed = sal_True; }; }; // @@ -97,31 +97,31 @@ private: GSILine *pSourceLine; GSILine *pReferenceLine; void PrintList( ParserMessageList *pList, ByteString aPrefix, GSILine *pLine ); - BOOL bPrintContext; - BOOL bCheckSourceLang; - BOOL bCheckTranslationLang; - BOOL bReference; - BOOL bAllowKeyIDs; - BOOL bAllowSuspicious; + sal_Bool bPrintContext; + sal_Bool bCheckSourceLang; + sal_Bool bCheckTranslationLang; + sal_Bool bReference; + sal_Bool bAllowKeyIDs; + sal_Bool bAllowSuspicious; - BOOL bHasBlockError; + sal_Bool bHasBlockError; - BOOL IsUTF8( const ByteString &aTestee, BOOL bFixTags, USHORT &nErrorPos, ByteString &aErrorMsg, BOOL &bHasBeenFixed, ByteString &aFixed ) const; - BOOL TestUTF8( GSILine* pTestee, BOOL bFixTags ); - BOOL HasSuspiciousChars( GSILine* pTestee, GSILine* pSource ); + sal_Bool IsUTF8( const ByteString &aTestee, sal_Bool bFixTags, sal_uInt16 &nErrorPos, ByteString &aErrorMsg, sal_Bool &bHasBeenFixed, ByteString &aFixed ) const; + sal_Bool TestUTF8( GSILine* pTestee, sal_Bool bFixTags ); + sal_Bool HasSuspiciousChars( GSILine* pTestee, GSILine* pSource ); public: - GSIBlock( BOOL PbPrintContext, BOOL bSource, BOOL bTrans, BOOL bRef, BOOL bAllowKID, BOOL bAllowSusp ); + GSIBlock( sal_Bool PbPrintContext, sal_Bool bSource, sal_Bool bTrans, sal_Bool bRef, sal_Bool bAllowKID, sal_Bool bAllowSusp ); ~GSIBlock(); - void PrintMessage( ByteString aType, ByteString aMsg, ByteString aPrefix, ByteString aContext, ULONG nLine, ByteString aUniqueId = ByteString() ); - void PrintError( ByteString aMsg, ByteString aPrefix, ByteString aContext, ULONG nLine, ByteString aUniqueId = ByteString() ); + void PrintMessage( ByteString aType, ByteString aMsg, ByteString aPrefix, ByteString aContext, sal_uLong nLine, ByteString aUniqueId = ByteString() ); + void PrintError( ByteString aMsg, ByteString aPrefix, ByteString aContext, sal_uLong nLine, ByteString aUniqueId = ByteString() ); void InsertLine( GSILine* pLine, const ByteString aSourceLang); void SetReferenceLine( GSILine* pLine ); - BOOL CheckSyntax( ULONG nLine, BOOL bRequireSourceLine, BOOL bFixTags ); + sal_Bool CheckSyntax( sal_uLong nLine, sal_Bool bRequireSourceLine, sal_Bool bFixTags ); - void WriteError( LazySvFileStream &aErrOut, BOOL bRequireSourceLine ); - void WriteCorrect( LazySvFileStream &aOkOut, BOOL bRequireSourceLine ); - void WriteFixed( LazySvFileStream &aFixOut, BOOL bRequireSourceLine ); + void WriteError( LazySvFileStream &aErrOut, sal_Bool bRequireSourceLine ); + void WriteCorrect( LazySvFileStream &aOkOut, sal_Bool bRequireSourceLine ); + void WriteFixed( LazySvFileStream &aFixOut, sal_Bool bRequireSourceLine ); }; #endif diff --git a/l10ntools/inc/l10ntools/vosapp.hxx b/l10ntools/inc/l10ntools/vosapp.hxx index 49e10e15e3d4..ccfe07006f76 100644 --- a/l10ntools/inc/l10ntools/vosapp.hxx +++ b/l10ntools/inc/l10ntools/vosapp.hxx @@ -10,19 +10,19 @@ class Application { public: - USHORT GetCommandLineParamCount(); - XubString GetCommandLineParam( USHORT nParam ); + sal_uInt16 GetCommandLineParamCount(); + XubString GetCommandLineParam( sal_uInt16 nParam ); virtual void Main() = 0; }; // Urg: Cut & Paste from svapp.cxx: we don't want to depend on vcl -USHORT Application::GetCommandLineParamCount() +sal_uInt16 Application::GetCommandLineParamCount() { vos::OStartupInfo aStartInfo; - return (USHORT)aStartInfo.getCommandArgCount(); + return (sal_uInt16)aStartInfo.getCommandArgCount(); } -XubString Application::GetCommandLineParam( USHORT nParam ) +XubString Application::GetCommandLineParam( sal_uInt16 nParam ) { vos::OStartupInfo aStartInfo; rtl::OUString aParam; diff --git a/l10ntools/inc/lngmerge.hxx b/l10ntools/inc/lngmerge.hxx index 843d1a6de3d2..dce939386539 100644 --- a/l10ntools/inc/lngmerge.hxx +++ b/l10ntools/inc/lngmerge.hxx @@ -43,11 +43,11 @@ DECLARE_LIST( LngLineList, ByteString * ) class LngParser { private: - USHORT nError; + sal_uInt16 nError; LngLineList *pLines; ByteString sSource; - BOOL bDBIsUTF8; - BOOL bULF; + sal_Bool bDBIsUTF8; + sal_Bool bULF; bool bQuiet; std::vector<ByteString> aLanguages; @@ -58,9 +58,9 @@ private: const ByteString &rPrj , const ByteString &rRoot , const ByteString &sActFileName , const ByteString &sID ); public: - LngParser( const ByteString &rLngFile, BOOL bUTF8, BOOL bULFFormat ); + LngParser( const ByteString &rLngFile, sal_Bool bUTF8, sal_Bool bULFFormat ); ~LngParser(); - BOOL CreateSDF( const ByteString &rSDFFile, const ByteString &rPrj, const ByteString &rRoot ); - BOOL Merge( const ByteString &rSDFFile, const ByteString &rDestinationFile , const ByteString &rPrj ); + sal_Bool CreateSDF( const ByteString &rSDFFile, const ByteString &rPrj, const ByteString &rRoot ); + sal_Bool Merge( const ByteString &rSDFFile, const ByteString &rDestinationFile , const ByteString &rPrj ); }; diff --git a/l10ntools/inc/srciter.hxx b/l10ntools/inc/srciter.hxx index 36061346fe16..91e2c20a768a 100644 --- a/l10ntools/inc/srciter.hxx +++ b/l10ntools/inc/srciter.hxx @@ -49,7 +49,7 @@ public: SourceTreeIterator( const ByteString &rRootDirectory, const ByteString &rVersion , bool bLocal_in = false); virtual ~SourceTreeIterator(); - BOOL StartExecute(); + sal_Bool StartExecute(); void EndExecute(); virtual void OnExecuteDirectory( const rtl::OUString &rDirectory ); diff --git a/l10ntools/inc/tagtest.hxx b/l10ntools/inc/tagtest.hxx index 3e9b03916f4f..ef2a696d71d7 100644 --- a/l10ntools/inc/tagtest.hxx +++ b/l10ntools/inc/tagtest.hxx @@ -34,9 +34,9 @@ class GSILine; -typedef USHORT TokenId; +typedef sal_uInt16 TokenId; -#define TOK_INVALIDPOS USHORT( 0xFFFF ) +#define TOK_INVALIDPOS sal_uInt16( 0xFFFF ) class ParserMessage; @@ -74,24 +74,24 @@ private: String aTagName; StringHashMap aProperties; - BOOL bClosed; // tag is closed <sdnf/> - BOOL bCloseTag; // tag is close Tag </sdnf> + sal_Bool bClosed; // tag is closed <sdnf/> + sal_Bool bCloseTag; // tag is close Tag </sdnf> - BOOL bIsBroken; - BOOL bHasBeenFixed; - BOOL bDone; + sal_Bool bIsBroken; + sal_Bool bHasBeenFixed; + sal_Bool bDone; public: String aTokenString; TokenId nId; - USHORT nPos; // Position in String + sal_uInt16 nPos; // Position in String - TokenInfo():bClosed(FALSE),bCloseTag(FALSE),bIsBroken(FALSE),bHasBeenFixed(FALSE),bDone(FALSE),nId( 0 ){;} -explicit TokenInfo( TokenId pnId, USHORT nP ):bClosed(FALSE),bCloseTag(FALSE),bIsBroken(FALSE),bHasBeenFixed(FALSE),bDone(FALSE),nId( pnId ),nPos(nP){;} -explicit TokenInfo( TokenId pnId, USHORT nP, String paStr ):bClosed(FALSE),bCloseTag(FALSE),bIsBroken(FALSE),bHasBeenFixed(FALSE),bDone(FALSE),aTokenString( paStr ),nId( pnId ),nPos(nP) {;} -explicit TokenInfo( TokenId pnId, USHORT nP, String paStr, ParserMessageList &rErrorList ); + TokenInfo():bClosed(sal_False),bCloseTag(sal_False),bIsBroken(sal_False),bHasBeenFixed(sal_False),bDone(sal_False),nId( 0 ){;} +explicit TokenInfo( TokenId pnId, sal_uInt16 nP ):bClosed(sal_False),bCloseTag(sal_False),bIsBroken(sal_False),bHasBeenFixed(sal_False),bDone(sal_False),nId( pnId ),nPos(nP){;} +explicit TokenInfo( TokenId pnId, sal_uInt16 nP, String paStr ):bClosed(sal_False),bCloseTag(sal_False),bIsBroken(sal_False),bHasBeenFixed(sal_False),bDone(sal_False),aTokenString( paStr ),nId( pnId ),nPos(nP) {;} +explicit TokenInfo( TokenId pnId, sal_uInt16 nP, String paStr, ParserMessageList &rErrorList ); String GetTagName() const; @@ -100,35 +100,35 @@ explicit TokenInfo( TokenId pnId, USHORT nP, String paStr, ParserMessageList /** Is the property to be ignored or does it have the default value anyways **/ - BOOL IsPropertyRelevant( const ByteString &aName, const String &aValue ) const; - BOOL IsPropertyValueValid( const ByteString &aName, const String &aValue ) const; + sal_Bool IsPropertyRelevant( const ByteString &aName, const String &aValue ) const; + sal_Bool IsPropertyValueValid( const ByteString &aName, const String &aValue ) const; /** Does the property contain the same value for all languages e.g.: the href in a link tag **/ - BOOL IsPropertyInvariant( const ByteString &aName, const String &aValue ) const; + sal_Bool IsPropertyInvariant( const ByteString &aName, const String &aValue ) const; /** a subset of IsPropertyInvariant but containing only those that are fixable we dont wat to fix e.g.: ahelp :: visibility **/ - BOOL IsPropertyFixable( const ByteString &aName ) const; - BOOL MatchesTranslation( TokenInfo& rInfo, BOOL bGenErrors, ParserMessageList &rErrorList, BOOL bFixTags = FALSE ) const; + sal_Bool IsPropertyFixable( const ByteString &aName ) const; + sal_Bool MatchesTranslation( TokenInfo& rInfo, sal_Bool bGenErrors, ParserMessageList &rErrorList, sal_Bool bFixTags = sal_False ) const; - BOOL IsDone() const { return bDone; } - void SetDone( BOOL bNew = TRUE ) { bDone = bNew; } + sal_Bool IsDone() const { return bDone; } + void SetDone( sal_Bool bNew = sal_True ) { bDone = bNew; } - BOOL HasBeenFixed() const { return bHasBeenFixed; } - void SetHasBeenFixed( BOOL bNew = TRUE ) { bHasBeenFixed = bNew; } + sal_Bool HasBeenFixed() const { return bHasBeenFixed; } + void SetHasBeenFixed( sal_Bool bNew = sal_True ) { bHasBeenFixed = bNew; } }; class ParserMessageList : public Impl_ParserMessageList { public: - void AddError( USHORT nErrorNr, ByteString aErrorText, const TokenInfo &rTag ); - void AddWarning( USHORT nErrorNr, ByteString aErrorText, const TokenInfo &rTag ); + void AddError( sal_uInt16 nErrorNr, ByteString aErrorText, const TokenInfo &rTag ); + void AddWarning( sal_uInt16 nErrorNr, ByteString aErrorText, const TokenInfo &rTag ); - BOOL HasErrors(); + sal_Bool HasErrors(); }; @@ -235,13 +235,13 @@ public: void Clear() { - for ( ULONG i = 0 ; i < Count() ; i++ ) + for ( sal_uLong i = 0 ; i < Count() ; i++ ) delete TokenListImpl::GetObject( i ); TokenListImpl::Clear(); } - void Insert( TokenInfo p, ULONG nIndex = LIST_APPEND ) + void Insert( TokenInfo p, sal_uLong nIndex = LIST_APPEND ) { TokenListImpl::Insert( new TokenInfo(p), nIndex ); } -/* TokenInfo Remove( ULONG nIndex ) +/* TokenInfo Remove( sal_uLong nIndex ) { TokenInfo aT = GetObject( nIndex ); delete TokenListImpl::GetObject( nIndex ); @@ -250,16 +250,16 @@ public: }*/ // TokenInfo Remove( TokenInfo p ){ return Remove( GetPos( p ) ); } // TokenInfo GetCurObject() const { return *TokenListImpl::GetCurObject(); } - TokenInfo& GetObject( ULONG nIndex ) const + TokenInfo& GetObject( sal_uLong nIndex ) const { // if ( TokenListImpl::GetObject(nIndex) ) return *TokenListImpl::GetObject(nIndex); // else // return TokenInfo(); } -/* ULONG GetPos( const TokenInfo p ) const +/* sal_uLong GetPos( const TokenInfo p ) const { - for ( ULONG i = 0 ; i < Count() ; i++ ) + for ( sal_uLong i = 0 ; i < Count() ; i++ ) if ( p == GetObject( i ) ) return i; return LIST_ENTRY_NOTFOUND; @@ -267,7 +267,7 @@ public: TokenList( const TokenList& rList ); /* { - for ( ULONG i = 0 ; i < rList.Count() ; i++ ) + for ( sal_uLong i = 0 ; i < rList.Count() ; i++ ) { Insert( rList.GetObject( i ), LIST_APPEND ); } @@ -276,54 +276,54 @@ public: class ParserMessage { - USHORT nErrorNr; + sal_uInt16 nErrorNr; ByteString aErrorText; - USHORT nTagBegin,nTagLength; + sal_uInt16 nTagBegin,nTagLength; protected: - ParserMessage( USHORT PnErrorNr, ByteString PaErrorText, const TokenInfo &rTag ); + ParserMessage( sal_uInt16 PnErrorNr, ByteString PaErrorText, const TokenInfo &rTag ); public: - USHORT GetErrorNr() { return nErrorNr; } + sal_uInt16 GetErrorNr() { return nErrorNr; } ByteString GetErrorText() { return aErrorText; } - USHORT GetTagBegin() { return nTagBegin; } - USHORT GetTagLength() { return nTagLength; } + sal_uInt16 GetTagBegin() { return nTagBegin; } + sal_uInt16 GetTagLength() { return nTagLength; } virtual ~ParserMessage() {} - virtual BOOL IsError() =0; + virtual sal_Bool IsError() =0; virtual ByteString Prefix() =0; }; class ParserError : public ParserMessage { public: - ParserError( USHORT PnErrorNr, ByteString PaErrorText, const TokenInfo &rTag ); + ParserError( sal_uInt16 PnErrorNr, ByteString PaErrorText, const TokenInfo &rTag ); - virtual BOOL IsError() {return TRUE;}; + virtual sal_Bool IsError() {return sal_True;}; virtual ByteString Prefix() {return "Error:"; }; }; class ParserWarning : public ParserMessage { public: - ParserWarning( USHORT PnErrorNr, ByteString PaErrorText, const TokenInfo &rTag ); + ParserWarning( sal_uInt16 PnErrorNr, ByteString PaErrorText, const TokenInfo &rTag ); - virtual BOOL IsError() {return FALSE;}; + virtual sal_Bool IsError() {return sal_False;}; virtual ByteString Prefix() {return "Warning:"; }; }; class SimpleParser { private: - USHORT nPos; + sal_uInt16 nPos; String aSource; String aLastToken; TokenList aTokenList; TokenInfo aNextTag; // to store closetag in case of combined tags like <br/> - String GetNextTokenString( ParserMessageList &rErrorList, USHORT &rTokeStartPos ); + String GetNextTokenString( ParserMessageList &rErrorList, sal_uInt16 &rTokeStartPos ); public: SimpleParser(); @@ -335,9 +335,9 @@ public: class TokenParser { - BOOL match( const TokenInfo &aCurrentToken, const TokenId &aExpectedToken ); - BOOL match( const TokenInfo &aCurrentToken, const TokenInfo &aExpectedToken ); - void ParseError( USHORT nErrNr, ByteString aErrMsg, const TokenInfo &rTag ); + sal_Bool match( const TokenInfo &aCurrentToken, const TokenId &aExpectedToken ); + sal_Bool match( const TokenInfo &aCurrentToken, const TokenInfo &aExpectedToken ); + void ParseError( sal_uInt16 nErrNr, ByteString aErrMsg, const TokenInfo &rTag ); void Paragraph(); void PfCase(); void PfCaseBegin(); @@ -353,7 +353,7 @@ class TokenParser TokenId nPfCaseOptions; TokenId nAppCaseOptions; - BOOL bPfCaseActive ,bAppCaseActive; + sal_Bool bPfCaseActive ,bAppCaseActive; TokenId nActiveRefTypes; @@ -363,7 +363,7 @@ public: TokenParser(); void Parse( const String &aCode, ParserMessageList* pList ); // ParserMessageList& GetErrors(){ return aErrorList; } -// BOOL HasErrors(){ return ( aErrorList.Count() > 0 ); } +// sal_Bool HasErrors(){ return ( aErrorList.Count() > 0 ); } TokenList& GetTokenList(){ return aParser.GetTokenList(); } }; @@ -373,21 +373,21 @@ private: TokenParser aReferenceParser; TokenParser aTesteeParser; ParserMessageList aCompareWarningList; - void CheckTags( TokenList &aReference, TokenList &aTestee, BOOL bFixTags ); - BOOL IsTagMandatory( TokenInfo const &aToken, TokenId &aMetaTokens ); + void CheckTags( TokenList &aReference, TokenList &aTestee, sal_Bool bFixTags ); + sal_Bool IsTagMandatory( TokenInfo const &aToken, TokenId &aMetaTokens ); String aFixedTestee; public: void CheckReference( GSILine *aReference ); - void CheckTestee( GSILine *aTestee, BOOL bHasSourceLine, BOOL bFixTags ); + void CheckTestee( GSILine *aTestee, sal_Bool bHasSourceLine, sal_Bool bFixTags ); // ParserMessageList& GetReferenceErrors(){ return aReferenceParser.GetErrors(); } -// BOOL HasReferenceErrors(){ return aReferenceParser.HasErrors(); } +// sal_Bool HasReferenceErrors(){ return aReferenceParser.HasErrors(); } // ParserMessageList& GetTesteeErrors(){ return aTesteeParser.GetErrors(); } -// BOOL HasTesteeErrors(){ return aTesteeParser.HasErrors(); } +// sal_Bool HasTesteeErrors(){ return aTesteeParser.HasErrors(); } ParserMessageList& GetCompareWarnings(){ return aCompareWarningList; } - BOOL HasCompareWarnings(){ return ( aCompareWarningList.Count() > 0 ); } + sal_Bool HasCompareWarnings(){ return ( aCompareWarningList.Count() > 0 ); } String GetFixedTestee(){ return aFixedTestee; } }; diff --git a/l10ntools/inc/wtranode.hxx b/l10ntools/inc/wtranode.hxx index af01a4b29d5c..99afe462a9ab 100644 --- a/l10ntools/inc/wtranode.hxx +++ b/l10ntools/inc/wtranode.hxx @@ -80,7 +80,7 @@ class WTT_Node // WordTransTree-Node // INQUIRY E_TokenType TokenType() const; UINT8 Value() const; - BOOL IsOnDeleting() const; + sal_Bool IsOnDeleting() const; const ByteString & ReplaceString() const; private: @@ -102,7 +102,7 @@ WTT_Node::TokenType() const inline UINT8 WTT_Node::Value() const { return nValue; } -inline BOOL +inline sal_Bool WTT_Node::IsOnDeleting() const { return bIsOnDeleting; } inline const ByteString & diff --git a/l10ntools/inc/wtratree.hxx b/l10ntools/inc/wtratree.hxx index 6fd33a7cb413..5ed45d350348 100644 --- a/l10ntools/inc/wtratree.hxx +++ b/l10ntools/inc/wtratree.hxx @@ -81,7 +81,7 @@ class WordTransTree E_Result TransformNextToken(); // INQUIRY - BOOL TextEndReached() const; + sal_Bool TextEndReached() const; const char * Output() const; // These 3 functions are valid between two calls of @@ -132,7 +132,7 @@ class WordTransTree -inline BOOL +inline sal_Bool WordTransTree::TextEndReached() const { return pInputPosition == pInputEnd; } inline const char * diff --git a/l10ntools/inc/xmlparse.hxx b/l10ntools/inc/xmlparse.hxx index 69e74a83ec47..5be58ffb50a7 100644 --- a/l10ntools/inc/xmlparse.hxx +++ b/l10ntools/inc/xmlparse.hxx @@ -87,7 +87,7 @@ public: void setValue(const String &rValue){sValue=rValue;} /// returns true if two attributes are equal and have the same value - BOOL IsEqual( + sal_Bool IsEqual( const XMLAttribute &rAttribute // the attribute which has to be equal ) { @@ -107,7 +107,7 @@ protected: XMLNode() {} public: - virtual USHORT GetNodeType() = 0; + virtual sal_uInt16 GetNodeType() = 0; virtual ~XMLNode() {} }; @@ -126,7 +126,7 @@ protected: XMLChildNode( const XMLChildNode& obj); XMLChildNode& operator=(const XMLChildNode& obj); public: - virtual USHORT GetNodeType() = 0; + virtual sal_uInt16 GetNodeType() = 0; /// returns the parent of this node XMLParentNode *GetParent() { return pParent; } @@ -162,7 +162,7 @@ protected: public: - virtual USHORT GetNodeType() = 0; + virtual sal_uInt16 GetNodeType() = 0; /// returns child list of this node XMLChildNodeList *GetChildList() { return pChildList; } @@ -201,7 +201,7 @@ typedef std::hash_map<ByteString , LangHashMap* , typedef std::hash_map<ByteString, int, hashByteString,equalByteString> HashMap; /// Mapping XML tag names <-> have localizable strings -typedef std::hash_map<ByteString , BOOL , +typedef std::hash_map<ByteString , sal_Bool , hashByteString,equalByteString> TagMap; /** Holds information of a XML file, is root node of tree @@ -219,7 +219,7 @@ public: ~XMLFile(); ByteString* GetGroupID(std::deque<ByteString> &groupid); - void Print( XMLNode *pCur = NULL, USHORT nLevel = 0 ); + void Print( XMLNode *pCur = NULL, sal_uInt16 nLevel = 0 ); virtual void SearchL10NElements( XMLParentNode *pCur, int pos = 0 ); void Extract( XMLFile *pCur = NULL ); void View(); @@ -227,14 +227,14 @@ public: void showType(XMLParentNode* node); XMLHashMap* GetStrings(){return XMLStrings;} - BOOL Write( ByteString &rFilename ); - BOOL Write( ofstream &rStream , XMLNode *pCur = NULL ); + sal_Bool Write( ByteString &rFilename ); + sal_Bool Write( ofstream &rStream , XMLNode *pCur = NULL ); bool CheckExportStatus( XMLParentNode *pCur = NULL );// , int pos = 0 ); XMLFile& operator=(const XMLFile& obj); - virtual USHORT GetNodeType(); + virtual sal_uInt16 GetNodeType(); /// returns file name const String &GetName() { return sFileName; } @@ -275,10 +275,10 @@ public: static void UnQuotHTML ( String &rString ); /// Return the numeric iso language code - //USHORT GetLangByIsoLang( const ByteString &rIsoLang ); + //sal_uInt16 GetLangByIsoLang( const ByteString &rIsoLang ); /// Return the alpha strings representation - ByteString GetIsoLangByIndex( USHORT nIndex ); + ByteString GetIsoLangByIndex( sal_uInt16 nIndex ); static XMLUtil& Instance(); ~XMLUtil(); @@ -344,7 +344,7 @@ public: XMLElement& operator=(const XMLElement& obj); /// returns node type XML_NODE_ELEMENT - virtual USHORT GetNodeType(); + virtual sal_uInt16 GetNodeType(); /// returns element name const String &GetName() { return sElementName; } @@ -414,7 +414,7 @@ public: XMLData(const XMLData& obj); XMLData& operator=(const XMLData& obj); - virtual USHORT GetNodeType(); + virtual sal_uInt16 GetNodeType(); /// returns the data const String &GetData() { return sData; } @@ -446,7 +446,7 @@ public: ) : XMLChildNode( Parent ), sComment( rComment ) {} - virtual USHORT GetNodeType(); + virtual sal_uInt16 GetNodeType(); XMLComment( const XMLComment& obj ); @@ -478,7 +478,7 @@ public: XMLDefault& operator=(const XMLDefault& obj); /// returns node type XML_NODE_TYPE_COMMENT - virtual USHORT GetNodeType(); + virtual sal_uInt16 GetNodeType(); /// returns the comment const String &GetDefault() { return sDefault; } @@ -490,8 +490,8 @@ public: */ struct XMLError { XML_Error eCode; // the error code - ULONG nLine; // error line number - ULONG nColumn; // error column number + sal_uLong nLine; // error line number + sal_uLong nColumn; // error column number String sMessage; // readable error message }; diff --git a/l10ntools/inc/xrmmerge.hxx b/l10ntools/inc/xrmmerge.hxx index e8c3d322c92b..91981aa41619 100644 --- a/l10ntools/inc/xrmmerge.hxx +++ b/l10ntools/inc/xrmmerge.hxx @@ -38,8 +38,8 @@ private: ByteString sGID; ByteString sLID; - BOOL bError; - BOOL bText; + sal_Bool bError; + sal_Bool bText; bool sLocalized; @@ -74,8 +74,8 @@ public: int Execute( int nToken, char * pToken ); - void SetError( BOOL bErr = TRUE ) { bError = bErr; } - BOOL GetError() { return bError; } + void SetError( sal_Bool bErr = sal_True ) { bError = bErr; } + sal_Bool GetError() { return bError; } }; // diff --git a/l10ntools/layout/layoutparse.cxx b/l10ntools/layout/layoutparse.cxx index 6bb839a9409e..f24cc432bf41 100644 --- a/l10ntools/layout/layoutparse.cxx +++ b/l10ntools/layout/layoutparse.cxx @@ -44,7 +44,7 @@ LayoutXMLFile::SearchL10NElements( XMLParentNode* pCur, int ) /* Recurse int children, SearchL10NElements does not do that for us. */ if ( XMLChildNodeList* lst = pCur->GetChildList() ) - for ( ULONG i = 0; i < lst->Count(); i++ ) + for ( sal_uLong i = 0; i < lst->Count(); i++ ) if ( lst->GetObject( i )->GetNodeType() == XML_NODE_TYPE_ELEMENT ) HandleElement( ( XMLElement* )lst->GetObject( i ) ); else if ( lst->GetObject( i )->GetNodeType() == XML_NODE_TYPE_COMMENT ) @@ -56,7 +56,7 @@ interestingAttributes( XMLAttributeList* lst ) { std::vector<XMLAttribute*> interesting; if ( lst ) - for ( ULONG i = 0; i < lst->Count(); i++ ) + for ( sal_uLong i = 0; i < lst->Count(); i++ ) if ( lst->GetObject( i )->Equals( STRING( "id" ) ) ) interesting.insert( interesting.begin(), lst->GetObject( i ) ); else if ( ! BSTRING( *lst->GetObject( i ) ).CompareTo( "_", 1 ) ) @@ -116,7 +116,7 @@ void LayoutXMLFile::InsertL10NElement( ByteString const& id, XMLElement* element (*languageMap)[ language ] = element; } -BOOL LayoutXMLFile::Write( ByteString &aFilename ) +sal_Bool LayoutXMLFile::Write( ByteString &aFilename ) { if ( aFilename.Len() ) diff --git a/l10ntools/layout/layoutparse.hxx b/l10ntools/layout/layoutparse.hxx index cd24f091d318..2cf560b96893 100644 --- a/l10ntools/layout/layoutparse.hxx +++ b/l10ntools/layout/layoutparse.hxx @@ -38,7 +38,7 @@ public: LayoutXMLFile( bool mergeMode ); void SearchL10NElements( XMLParentNode *pCur, int pos = 0 ); - BOOL Write( ByteString &aFilename ); + sal_Bool Write( ByteString &aFilename ); void HandleElement( XMLElement* element ); void InsertL10NElement( ByteString const& id, XMLElement* element ); diff --git a/l10ntools/layout/tralay.cxx b/l10ntools/layout/tralay.cxx index 72fd1a1d8c5e..9e6fa32bb094 100644 --- a/l10ntools/layout/tralay.cxx +++ b/l10ntools/layout/tralay.cxx @@ -111,7 +111,7 @@ static ByteString ConvertSystemPath( const ByteString& rPath ) ByteString TranslateLayout::GetCommandLineParam( int i ) { - return ByteString( OUSTRING_CSTR( Application::GetCommandLineParam( sal::static_int_cast< USHORT >( i ) ) ) ); + return ByteString( OUSTRING_CSTR( Application::GetCommandLineParam( sal::static_int_cast< sal_uInt16 >( i ) ) ) ); } ByteString TranslateLayout::GetOptionArgument( int const i ) @@ -163,7 +163,7 @@ void TranslateLayout::ParseCommandLine() static XMLAttribute* findAttribute( XMLAttributeList* lst, String const& name ) { - for ( ULONG i = 0; i < lst->Count(); i++ ) + for ( sal_uLong i = 0; i < lst->Count(); i++ ) if ( lst->GetObject( i )->Equals( name ) ) return lst->GetObject( i ); return 0; @@ -243,7 +243,7 @@ static void insertMarker( XMLParentNode *p, ByteString const& file ) if ( XMLChildNodeList* lst = p->GetChildList() ) if ( lst->Count() ) { - ULONG i = 1; + sal_uLong i = 1; // Skip newline, if possible. if ( lst->Count() > 1 && lst->GetObject( 2 )->GetNodeType() == XML_NODE_TYPE_DEFAULT ) @@ -260,7 +260,7 @@ void TranslateLayout::MergeLanguage( ByteString const& language ) ByteString xmlFile = mFiles.front(); MergeDataFile mergeData( mLocalize, xmlFile, - FALSE, RTL_TEXTENCODING_MS_1252 ); + sal_False, RTL_TEXTENCODING_MS_1252 ); DirEntry aFile( xmlFile ); SimpleXMLParser aParser; diff --git a/l10ntools/source/cfgmerge.cxx b/l10ntools/source/cfgmerge.cxx index e8feee1fe3c8..ab53f28a1092 100644 --- a/l10ntools/source/cfgmerge.cxx +++ b/l10ntools/source/cfgmerge.cxx @@ -54,11 +54,11 @@ extern "C" { int YYWarning( char * ); } #define STATE_FORCE 0x000B // set of global variables -BOOL bEnableExport; -BOOL bMergeMode; -BOOL bErrorLog; -BOOL bForce; -BOOL bUTF8; +sal_Bool bEnableExport; +sal_Bool bMergeMode; +sal_Bool bErrorLog; +sal_Bool bForce; +sal_Bool bUTF8; ByteString sPrj; ByteString sPrjRoot; ByteString sInputFileName; @@ -77,18 +77,18 @@ extern "C" { extern char *GetOutputFile( int argc, char* argv[]) /*****************************************************************************/ { - bEnableExport = FALSE; - bMergeMode = FALSE; - bErrorLog = TRUE; - bForce = FALSE; - bUTF8 = TRUE; + bEnableExport = sal_False; + bMergeMode = sal_False; + bErrorLog = sal_True; + bForce = sal_False; + bUTF8 = sal_True; sPrj = ""; sPrjRoot = ""; sInputFileName = ""; sActFileName = ""; - USHORT nState = STATE_NON; - BOOL bInput = FALSE; + sal_uInt16 nState = STATE_NON; + sal_Bool bInput = sal_False; // parse command line for( int i = 1; i < argc; i++ ) { @@ -112,19 +112,19 @@ extern char *GetOutputFile( int argc, char* argv[]) } else if ( sSwitch == "-E" ) { nState = STATE_ERRORLOG; - bErrorLog = FALSE; + bErrorLog = sal_False; } else if ( sSwitch == "-UTF8" ) { nState = STATE_UTF8; - bUTF8 = TRUE; + bUTF8 = sal_True; } else if ( sSwitch == "-NOUTF8" ) { nState = STATE_UTF8; - bUTF8 = FALSE; + bUTF8 = sal_False; } else if ( sSwitch == "-F" ) { nState = STATE_FORCE; - bForce = TRUE; + bForce = sal_True; } else if ( sSwitch == "-L" ) { nState = STATE_LANGUAGES; @@ -139,7 +139,7 @@ extern char *GetOutputFile( int argc, char* argv[]) } case STATE_INPUT: { sInputFileName = argv[ i ]; - bInput = TRUE; // source file found + bInput = sal_True; // source file found } break; case STATE_OUTPUT: { @@ -157,7 +157,7 @@ extern char *GetOutputFile( int argc, char* argv[]) break; case STATE_MERGESRC: { sMergeSrc = ByteString( argv[ i ]); - bMergeMode = TRUE; // activate merge mode, cause merge database found + bMergeMode = sal_True; // activate merge mode, cause merge database found } break; case STATE_LANGUAGES: { @@ -170,7 +170,7 @@ extern char *GetOutputFile( int argc, char* argv[]) if ( bInput ) { // command line is valid - bEnableExport = TRUE; + bEnableExport = sal_True; char *pReturn = new char[ sOutputFile.Len() + 1 ]; strcpy( pReturn, sOutputFile.GetBuffer()); // #100211# - checked return pReturn; @@ -309,19 +309,19 @@ CfgStackData* CfgStack::Push( const ByteString &rTag, const ByteString &rId ) CfgStack::~CfgStack() /*****************************************************************************/ { - for ( ULONG i = 0; i < Count(); i++ ) + for ( sal_uLong i = 0; i < Count(); i++ ) delete GetObject( i ); } /*****************************************************************************/ -ByteString CfgStack::GetAccessPath( ULONG nPos ) +ByteString CfgStack::GetAccessPath( sal_uLong nPos ) /*****************************************************************************/ { if ( nPos == LIST_APPEND ) nPos = Count() - 1; ByteString sReturn; - for ( ULONG i = 0; i <= nPos; i++ ) { + for ( sal_uLong i = 0; i <= nPos; i++ ) { if ( i ) sReturn += "."; sReturn += GetStackData( i )->GetIdentifier(); @@ -331,7 +331,7 @@ ByteString CfgStack::GetAccessPath( ULONG nPos ) } /*****************************************************************************/ -CfgStackData *CfgStack::GetStackData( ULONG nPos ) +CfgStackData *CfgStack::GetStackData( sal_uLong nPos ) /*****************************************************************************/ { if ( nPos == LIST_APPEND ) @@ -348,7 +348,7 @@ CfgStackData *CfgStack::GetStackData( ULONG nPos ) CfgParser::CfgParser() /*****************************************************************************/ : pStackData( NULL ), - bLocalize( FALSE ) + bLocalize( sal_False ) { } @@ -360,7 +360,7 @@ CfgParser::~CfgParser() /*****************************************************************************/ -BOOL CfgParser::IsTokenClosed( const ByteString &rToken ) +sal_Bool CfgParser::IsTokenClosed( const ByteString &rToken ) /*****************************************************************************/ { return rToken.GetChar( rToken.Len() - 2 ) == '/'; @@ -374,7 +374,7 @@ void CfgParser::AddText( ) /*****************************************************************************/ { - USHORT nTextLen = 0; + sal_uInt16 nTextLen = 0; while ( rText.Len() != nTextLen ) { nTextLen = rText.Len(); rText.SearchAndReplaceAll( "\n", " " ); @@ -407,7 +407,7 @@ int CfgParser::ExecuteAnalyzedToken( int nToken, char *pToken ) ByteString sTokenName; ByteString sTokenId; - BOOL bOutput = TRUE; + sal_Bool bOutput = sal_True; switch ( nToken ) { case CFG_TOKEN_PACKAGE: @@ -439,7 +439,7 @@ int CfgParser::ExecuteAnalyzedToken( int nToken, char *pToken ) break; case CFG_TOKEN_OORNAME: sSearch = "oor:name="; - bLocalize = TRUE; + bLocalize = sal_True; break; case CFG_TOKEN_OORVALUE: sSearch = "oor:value="; @@ -459,7 +459,7 @@ int CfgParser::ExecuteAnalyzedToken( int nToken, char *pToken ) sCurrentIsoLang = sTemp.GetToken( 1, '\"' ).GetToken( 0, '\"' ); if ( sCurrentIsoLang == NO_TRANSLATE_ISO ) - bLocalize = FALSE; + bLocalize = sal_False; pStackData->sTextTag = sToken; @@ -477,7 +477,7 @@ int CfgParser::ExecuteAnalyzedToken( int nToken, char *pToken ) ByteString sTemp( sToken ); sTemp.ToUpperAscii(); bLocalize = (( sTemp.Search( "CFG:TYPE=\"STRING\"" ) != STRING_NOTFOUND ) && - ( sTemp.Search( "CFG:LOCALIZED=\"TRUE\"" ) != STRING_NOTFOUND )); + ( sTemp.Search( "CFG:LOCALIZED=\"sal_True\"" ) != STRING_NOTFOUND )); } } else if ( sTokenName == "label" ) { @@ -514,11 +514,11 @@ int CfgParser::ExecuteAnalyzedToken( int nToken, char *pToken ) case CFG_TEXTCHAR: sCurrentText += sToken; - bOutput = FALSE; + bOutput = sal_False; break; case CFG_TOKEN_NO_TRANSLATE: - bLocalize = FALSE; + bLocalize = sal_False; break; } @@ -723,9 +723,9 @@ CfgMerge::CfgMerge( : CfgOutputParser( rOutputFile ), pMergeDataFile( NULL ), pResData( NULL ), - bGerman( FALSE ), + bGerman( sal_False ), sFilename( rFilename ), - bEnglish( FALSE ) + bEnglish( sal_False ) { if ( rMergeSource.Len()){ pMergeDataFile = new MergeDataFile( @@ -775,9 +775,9 @@ void CfgMerge::WorkOnText( } //if ( nLangIndex.EqualsIgnoreCaseAscii("de") ) - // bGerman = TRUE; + // bGerman = sal_True; if (( nLangIndex.EqualsIgnoreCaseAscii("en-US") )) - bEnglish = TRUE; + bEnglish = sal_True; PFormEntrys *pEntrys = pMergeDataFile->GetPFormEntrysCaseSensitive( pResData ); if ( pEntrys ) { @@ -805,7 +805,7 @@ void CfgMerge::Output( const ByteString& rOutput ) pOutputStream->Write( rOutput.GetBuffer(), rOutput.Len()); } -ULONG CfgStack::Push( CfgStackData *pStackData ) +sal_uLong CfgStack::Push( CfgStackData *pStackData ) { Insert( pStackData, LIST_APPEND ); return Count() - 1; @@ -825,7 +825,7 @@ void CfgMerge::WorkOnRessourceEnd() sCur = aLanguages[ n ]; ByteString sContent; - pEntrys->GetText( sContent, STRING_TYP_TEXT, sCur , TRUE ); + pEntrys->GetText( sContent, STRING_TYP_TEXT, sCur , sal_True ); if ( // (!sCur.EqualsIgnoreCaseAscii("de") ) && ( !sCur.EqualsIgnoreCaseAscii("en-US") ) && @@ -867,6 +867,6 @@ void CfgMerge::WorkOnRessourceEnd() } delete pResData; pResData = NULL; - bGerman = FALSE; - bEnglish = FALSE; + bGerman = sal_False; + bEnglish = sal_False; } diff --git a/l10ntools/source/directory.cxx b/l10ntools/source/directory.cxx index a36f8bd2361f..f7330a9b5ed9 100644 --- a/l10ntools/source/directory.cxx +++ b/l10ntools/source/directory.cxx @@ -107,7 +107,7 @@ void Directory::readDirectory() void Directory::readDirectory ( const rtl::OUString& sFullpath ) { - BOOL fFinished; + sal_Bool fFinished; HANDLE hList; TCHAR szDir[MAX_PATH+1]; TCHAR szSubDir[MAX_PATH+1]; @@ -128,7 +128,7 @@ void Directory::readDirectory ( const rtl::OUString& sFullpath ) } else { - fFinished = FALSE; + fFinished = sal_False; while (!fFinished) { @@ -157,7 +157,7 @@ void Directory::readDirectory ( const rtl::OUString& sFullpath ) { if (GetLastError() == ERROR_NO_MORE_FILES) { - fFinished = TRUE; + fFinished = sal_True; } } } diff --git a/l10ntools/source/export.cxx b/l10ntools/source/export.cxx index d6c7a9533309..1012e19b6064 100644 --- a/l10ntools/source/export.cxx +++ b/l10ntools/source/export.cxx @@ -56,12 +56,12 @@ Export *pExport = 0L; // set of global variables DECLARE_LIST( FileList, ByteString * ) FileList aInputFileList; -BOOL bEnableExport; -BOOL bMergeMode; -BOOL bErrorLog; -BOOL bBreakWhenHelpText; -BOOL bUnmerge; -BOOL bUTF8; +sal_Bool bEnableExport; +sal_Bool bMergeMode; +sal_Bool bErrorLog; +sal_Bool bBreakWhenHelpText; +sal_Bool bUnmerge; +sal_Bool bUTF8; ByteString sPrj; ByteString sPrjRoot; ByteString sActFileName; @@ -84,12 +84,12 @@ extern "C" { extern char *GetOutputFile( int argc, char* argv[]) /*****************************************************************************/ { - bEnableExport = FALSE; - bMergeMode = FALSE; - bErrorLog = TRUE; - bBreakWhenHelpText = FALSE; - bUnmerge = FALSE; - bUTF8 = TRUE; + bEnableExport = sal_False; + bMergeMode = sal_False; + bErrorLog = sal_True; + bBreakWhenHelpText = sal_False; + bUnmerge = sal_False; + bUTF8 = sal_True; sPrj = ""; sPrjRoot = ""; sActFileName = ""; @@ -97,8 +97,8 @@ extern char *GetOutputFile( int argc, char* argv[]) Export::sForcedLanguages = ""; sTempFile = ""; pTempFile = NULL; - USHORT nState = STATE_NON; - BOOL bInput = FALSE; + sal_uInt16 nState = STATE_NON; + sal_Bool bInput = sal_False; // parse command line for( int i = 1; i < argc; i++ ) { @@ -122,24 +122,24 @@ extern char *GetOutputFile( int argc, char* argv[]) } else if (sSwitch == "-e" || sSwitch == "-E" ) { nState = STATE_ERRORLOG; - bErrorLog = FALSE; + bErrorLog = sal_False; } else if (sSwitch == "-b" || sSwitch == "-B" ) { nState = STATE_BREAKHELP; - bBreakWhenHelpText = TRUE; + bBreakWhenHelpText = sal_True; } else if (sSwitch == "-u" || sSwitch == "-U" ) { nState = STATE_UNMERGE; - bUnmerge = TRUE; - bMergeMode = TRUE; + bUnmerge = sal_True; + bMergeMode = sal_True; } else if ( sSwitch.ToUpperAscii() == "-UTF8" ) { nState = STATE_UTF8; - bUTF8 = TRUE; + bUTF8 = sal_True; } else if ( sSwitch.ToUpperAscii() == "-NOUTF8" ) { nState = STATE_UTF8; - bUTF8 = FALSE; + bUTF8 = sal_False; } else if ( sSwitch == "-l" || sSwitch == "-L" ) { nState = STATE_LANGUAGES; @@ -151,7 +151,7 @@ extern char *GetOutputFile( int argc, char* argv[]) } case STATE_INPUT: { aInputFileList.Insert( new ByteString( argv[ i ]), LIST_APPEND ); - bInput = TRUE; // min. one source file found + bInput = sal_True; // min. one source file found } break; case STATE_OUTPUT: { @@ -168,7 +168,7 @@ extern char *GetOutputFile( int argc, char* argv[]) break; case STATE_MERGESRC: { sMergeSrc = ByteString( argv[ i ]); - bMergeMode = TRUE; // activate merge mode, cause merge database found + bMergeMode = sal_True; // activate merge mode, cause merge database found } break; case STATE_LANGUAGES: { @@ -181,7 +181,7 @@ extern char *GetOutputFile( int argc, char* argv[]) if( bUnmerge ) sMergeSrc = ByteString(); if ( bInput ) { // command line is valid - bEnableExport = TRUE; + bEnableExport = sal_True; char *pReturn = new char[ sOutputFile.Len() + 1 ]; strcpy( pReturn, sOutputFile.GetBuffer()); // #100211# - checked return pReturn; @@ -238,8 +238,8 @@ extern FILE *GetNextFile() ByteString sOrigFile( sFileName ); sFileName = Export::GetNativeFile( sFileName ); - delete aInputFileList.GetObject(( ULONG ) 0 ); - aInputFileList.Remove(( ULONG ) 0 ); + delete aInputFileList.GetObject(( sal_uLong ) 0 ); + aInputFileList.Remove(( sal_uLong ) 0 ); if ( sFileName == "" ) { fprintf( stderr, "ERROR: Could not precompile File %s\n", @@ -324,7 +324,7 @@ int GetError() // get error at global instance of class Export if ( pExport->GetError()) return 1; - return FALSE; + return sal_False; } } @@ -372,7 +372,7 @@ bool ResData::isMerged( ByteString& sLang ){ } /*****************************************************************************/ -BOOL ResData::SetId( const ByteString &rId, USHORT nLevel ) +sal_Bool ResData::SetId( const ByteString &rId, sal_uInt16 nLevel ) /*****************************************************************************/ { if ( nLevel > nIdLevel ) @@ -396,10 +396,10 @@ BOOL ResData::SetId( const ByteString &rId, USHORT nLevel ) sId.EraseTrailingChars( '\t' ); } - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } // @@ -407,14 +407,14 @@ BOOL ResData::SetId( const ByteString &rId, USHORT nLevel ) // /*****************************************************************************/ -Export::Export( const ByteString &rOutput, BOOL bWrite, +Export::Export( const ByteString &rOutput, sal_Bool bWrite, const ByteString &rPrj, const ByteString &rPrjRoot , const ByteString& rFile ) /*****************************************************************************/ : pWordTransformer( NULL ), aCharSet( RTL_TEXTENCODING_MS_1252 ), - bDefine( FALSE ), - bNextMustBeDefineEOL( FALSE ), + bDefine( sal_False ), + bNextMustBeDefineEOL( sal_False ), nLevel( 0 ), nList( LIST_NON ), nListIndex( 0 ), @@ -424,9 +424,9 @@ Export::Export( const ByteString &rOutput, BOOL bWrite, sRoot( sPrjRoot ), bEnableExport( bWrite ), bMergeMode( bUnmerge ), - bError( FALSE ), - bReadOver( FALSE ), - bDontWriteOutput( FALSE ), + bError( sal_False ), + bReadOver( sal_False ), + bDontWriteOutput( sal_False ), sFilename( rFile ) { pParseQueue = new ParserQueue( *this ); @@ -451,15 +451,15 @@ Export::Export( const ByteString &rOutput, BOOL bWrite, } /*****************************************************************************/ -Export::Export( const ByteString &rOutput, BOOL bWrite, +Export::Export( const ByteString &rOutput, sal_Bool bWrite, const ByteString &rPrj, const ByteString &rPrjRoot, const ByteString &rMergeSource , const ByteString& rFile ) /*****************************************************************************/ : pWordTransformer( NULL ), aCharSet( RTL_TEXTENCODING_MS_1252 ), - bDefine( FALSE ), - bNextMustBeDefineEOL( FALSE ), + bDefine( sal_False ), + bNextMustBeDefineEOL( sal_False ), nLevel( 0 ), nList( LIST_NON ), nListIndex( 0 ), @@ -468,11 +468,11 @@ Export::Export( const ByteString &rOutput, BOOL bWrite, sProject( sPrj ), sRoot( sPrjRoot ), bEnableExport( bWrite ), - bMergeMode( TRUE ), + bMergeMode( sal_True ), sMergeSrc( rMergeSource ), - bError( FALSE ), - bReadOver( FALSE ), - bDontWriteOutput( FALSE ), + bError( sal_False ), + bReadOver( sal_False ), + bDontWriteOutput( sal_False ), sFilename( rFile ) { (void) rPrj; @@ -497,15 +497,15 @@ void Export::Init() { // resets the internal status, used before parseing another file sActPForm = ""; - bDefine = FALSE; - bNextMustBeDefineEOL = FALSE; + bDefine = sal_False; + bNextMustBeDefineEOL = sal_False; nLevel = 0; nList = LIST_NON; nListLang = ByteString( String::CreateFromAscii(""),RTL_TEXTENCODING_ASCII_US ); nListIndex = 0; while ( aResStack.Count()) { - delete aResStack.GetObject(( ULONG ) 0 ); - aResStack.Remove(( ULONG ) 0 ); + delete aResStack.GetObject(( sal_uLong ) 0 ); + aResStack.Remove(( sal_uLong ) 0 ); } } @@ -519,8 +519,8 @@ Export::~Export() if ( bEnableExport ) aOutput.Close(); while ( aResStack.Count()) { - delete aResStack.GetObject(( ULONG ) 0 ); - aResStack.Remove(( ULONG ) 0 ); + delete aResStack.GetObject(( sal_uLong ) 0 ); + aResStack.Remove(( sal_uLong ) 0 ); } if ( bMergeMode && !bUnmerge ) { @@ -543,16 +543,16 @@ int Export::Execute( int nToken, const char * pToken ) printf("sToken = %s\n",sToken.GetBuffer()); printf("nToken = %d\n",nToken); printf("+---------------\n"); */ - BOOL bWriteToMerged = bMergeMode; + sal_Bool bWriteToMerged = bMergeMode; if ( nToken == CONDITION ) { ByteString sTestToken( pToken ); sTestToken.EraseAllChars( '\t' ); sTestToken.EraseAllChars( ' ' ); if (( !bReadOver ) && ( sTestToken.Search( "#ifndef__RSC_PARSER" ) == 0 )) - bReadOver = TRUE; + bReadOver = sal_True; else if (( bReadOver ) && ( sTestToken.Search( "#endif" ) == 0 )) - bReadOver = FALSE; + bReadOver = sal_False; } if ((( nToken < FILTER_LEVEL ) || ( bReadOver )) && (!(( bNextMustBeDefineEOL ) && ( sOrig == "\n" )))) { @@ -596,21 +596,21 @@ int Export::Execute( int nToken, const char * pToken ) if ( bNextMustBeDefineEOL ) { if ( nToken != RSCDEFINELEND ) { // end of macro found, so destroy res. - bDefine = FALSE; + bDefine = sal_False; if ( bMergeMode ) { /*if ( bDontWriteOutput && bUnmerge ) { - bDontWriteOutput = FALSE; - bNextMustBeDefineEOL = FALSE; - bDefine = TRUE; + bDontWriteOutput = sal_False; + bNextMustBeDefineEOL = sal_False; + bDefine = sal_True; }*/ MergeRest( pResData ); } - bNextMustBeDefineEOL = FALSE; + bNextMustBeDefineEOL = sal_False; Execute( LEVELDOWN, "" ); } else { // next line also in macro definition - bNextMustBeDefineEOL = FALSE; + bNextMustBeDefineEOL = sal_False; if ( bMergeMode ) WriteToMerged( sOrig , false ); return 1; @@ -623,20 +623,20 @@ int Export::Execute( int nToken, const char * pToken ) #if 0 // impossible, unsigned is never negative if( sTmpLine.Len() < 0 ){ - if ( sTmpLine.GetChar(( USHORT )( sTmpLine.Len() - 1 )) != '\\' ) - bNextMustBeDefineEOL = TRUE; + if ( sTmpLine.GetChar(( sal_uInt16 )( sTmpLine.Len() - 1 )) != '\\' ) + bNextMustBeDefineEOL = sal_True; } #endif } } } - BOOL bExecuteDown = FALSE; + sal_Bool bExecuteDown = sal_False; if ( nToken != LEVELDOWN ) { - USHORT nOpen = 0; - USHORT nClose = 0; - BOOL bReadOver1 = FALSE; - USHORT i = 0; + sal_uInt16 nOpen = 0; + sal_uInt16 nClose = 0; + sal_Bool bReadOver1 = sal_False; + sal_uInt16 i = 0; for ( i = 0; i < sToken.Len(); i++ ) { if ( sToken.GetChar( i ) == '\"' ) bReadOver1 = !bReadOver1; @@ -644,7 +644,7 @@ int Export::Execute( int nToken, const char * pToken ) nOpen++; } - bReadOver1 = FALSE; + bReadOver1 = sal_False; for ( i = 0; i < sToken.Len(); i++ ) { if ( sToken.GetChar( i ) == '\"' ) bReadOver1 = !bReadOver1; @@ -653,7 +653,7 @@ int Export::Execute( int nToken, const char * pToken ) } if ( nOpen < nClose ) - bExecuteDown = TRUE; + bExecuteDown = sal_True; } switch ( nToken ) { @@ -673,17 +673,17 @@ int Export::Execute( int nToken, const char * pToken ) case RSCDEFINE: - bDefine = TRUE; // res. defined in macro + bDefine = sal_True; // res. defined in macro case RESSOURCE: case RESSOURCEEXPR: { - bDontWriteOutput = FALSE; + bDontWriteOutput = sal_False; if ( nToken != RSCDEFINE ) - bNextMustBeDefineEOL = FALSE; + bNextMustBeDefineEOL = sal_False; // this is the beginning of a new res. nLevel++; if ( nLevel > 1 ) { - aResStack.GetObject( nLevel - 2 )->bChild = TRUE; + aResStack.GetObject( nLevel - 2 )->bChild = sal_True; } // create new instance for this res. and fill mandatory fields @@ -720,12 +720,12 @@ int Export::Execute( int nToken, const char * pToken ) } break; case SMALRESSOURCE: { - bDontWriteOutput = FALSE; + bDontWriteOutput = sal_False; // this is the beginning of a new res. - bNextMustBeDefineEOL = FALSE; + bNextMustBeDefineEOL = sal_False; nLevel++; if ( nLevel > 1 ) { - aResStack.GetObject( nLevel - 2 )->bChild = TRUE; + aResStack.GetObject( nLevel - 2 )->bChild = sal_True; } // create new instance for this res. and fill mandatory fields @@ -748,13 +748,13 @@ int Export::Execute( int nToken, const char * pToken ) if ( nList ) break; - bDontWriteOutput = FALSE; + bDontWriteOutput = sal_False; ByteString sLowerTyp; if ( pResData ) sLowerTyp = "unknown"; nLevel++; if ( nLevel > 1 ) { - aResStack.GetObject( nLevel - 2 )->bChild = TRUE; + aResStack.GetObject( nLevel - 2 )->bChild = sal_True; } ResData *pNewData = new ResData( sActPForm, FullId() , sFilename ); @@ -765,11 +765,11 @@ int Export::Execute( int nToken, const char * pToken ) case LEVELDOWN: { // pop if ( !nList ) { - bDontWriteOutput = FALSE; + bDontWriteOutput = sal_False; if ( nLevel ) { if ( bDefine && (nLevel == 1 )) { - bDefine = FALSE; - bNextMustBeDefineEOL = FALSE; + bDefine = sal_False; + bNextMustBeDefineEOL = sal_False; } WriteData( pResData ); delete aResStack.GetObject( nLevel - 1 ); @@ -779,7 +779,7 @@ int Export::Execute( int nToken, const char * pToken ) } else { if ( bDefine ) - bNextMustBeDefineEOL = TRUE; + bNextMustBeDefineEOL = sal_True; if ( !nListLevel ) { if ( bMergeMode ) MergeRest( pResData, MERGE_MODE_LIST ); @@ -791,7 +791,7 @@ int Export::Execute( int nToken, const char * pToken ) } break; case ASSIGNMENT: { - bDontWriteOutput = FALSE; + bDontWriteOutput = sal_False; // interpret different types of assignement ByteString sKey = sToken.GetToken( 0, '=' ); sKey.EraseAllChars( ' ' ); @@ -810,7 +810,7 @@ int Export::Execute( int nToken, const char * pToken ) // ( sOrig.SearchAndReplace( "=", "[ de ] =" )); //} - pResData->bList = TRUE; + pResData->bList = sal_True; nList = LIST_STRING; //ByteString sLang("en-US" , RTL_TEXTENCODING_ASCII_US ); nListLang = SOURCE_LANGUAGE; @@ -821,7 +821,7 @@ int Export::Execute( int nToken, const char * pToken ) //if ( bUnmerge ){ // ( sOrig.SearchAndReplace( "=", "[ de ] =" )); //} - pResData->bList = TRUE; + pResData->bList = sal_True; nList = LIST_FILTER; //ByteString sLang("en-US" , RTL_TEXTENCODING_ASCII_US ); nListLang = SOURCE_LANGUAGE; @@ -831,7 +831,7 @@ int Export::Execute( int nToken, const char * pToken ) else if ( sKey == "UIENTRIES" ) { //if ( bUnmerge ){ // ( sOrig.SearchAndReplace( "=", "[ de ] =" ));} - pResData->bList = TRUE; + pResData->bList = sal_True; nList = LIST_UIENTRIES; //ByteString sLang("en-US" , RTL_TEXTENCODING_ASCII_US ); nListLang = SOURCE_LANGUAGE; @@ -845,15 +845,15 @@ int Export::Execute( int nToken, const char * pToken ) Parse( LEVELUP, "" ); } //if ( bUnmerge && ( nListLang.EqualsIgnoreCaseAscii("de") || nListLang.EqualsIgnoreCaseAscii("en-US") ) && ListExists( pResData, nList )) - // bDontWriteOutput = TRUE; + // bDontWriteOutput = sal_True; } break; case UIENTRIES: case LISTASSIGNMENT: { - bDontWriteOutput = FALSE; + bDontWriteOutput = sal_False; ByteString sTmpToken( sToken); sTmpToken.EraseAllChars(' '); - USHORT nPos = 0; + sal_uInt16 nPos = 0; //nPos = sTmpToken.ToLowerAscii().Search("[de]="); nPos = sTmpToken.ToLowerAscii().Search("[en-us]="); if( nPos != STRING_NOTFOUND ) { @@ -866,7 +866,7 @@ int Export::Execute( int nToken, const char * pToken ) ByteString sValue = sToken.GetToken( 1, '=' ); CleanValue( sValue ); if ( sKey.ToUpperAscii() == "STRINGLIST" ) { - pResData->bList = TRUE; + pResData->bList = sal_True; nList = LIST_STRING; //ByteString sLang("en-US" , RTL_TEXTENCODING_ASCII_US ); nListLang = SOURCE_LANGUAGE; @@ -874,7 +874,7 @@ int Export::Execute( int nToken, const char * pToken ) nListLevel = 0; } else if ( sKey == "FILTERLIST" ) { - pResData->bList = TRUE; + pResData->bList = sal_True; nList = LIST_FILTER; //ByteString sLang("en-US" , RTL_TEXTENCODING_ASCII_US ); nListLang = SOURCE_LANGUAGE; @@ -883,7 +883,7 @@ int Export::Execute( int nToken, const char * pToken ) } // PairedList else if ( sKey == "PAIREDLIST" ) { - pResData->bList = TRUE; + pResData->bList = sal_True; nList = LIST_PAIRED; //ByteString sLang("en-US" , RTL_TEXTENCODING_ASCII_US ); nListLang = SOURCE_LANGUAGE; @@ -892,7 +892,7 @@ int Export::Execute( int nToken, const char * pToken ) } else if ( sKey == "ITEMLIST" ) { - pResData->bList = TRUE; + pResData->bList = sal_True; nList = LIST_ITEM; //ByteString sLang("en-US" , RTL_TEXTENCODING_ASCII_US ); nListLang = SOURCE_LANGUAGE; @@ -900,7 +900,7 @@ int Export::Execute( int nToken, const char * pToken ) nListLevel = 0; } else if ( sKey == "UIENTRIES" ) { - pResData->bList = TRUE; + pResData->bList = sal_True; nList = LIST_UIENTRIES; //ByteString sLang("en-US" , RTL_TEXTENCODING_ASCII_US ); nListLang = SOURCE_LANGUAGE; @@ -910,7 +910,7 @@ int Export::Execute( int nToken, const char * pToken ) /*if ( bUnmerge && ( nListLang.EqualsIgnoreCaseAscii( "de" ) || nListLang.EqualsIgnoreCaseAscii("en-US" ) ) && ListExists( pResData, nList )) - bDontWriteOutput = TRUE;*/ + bDontWriteOutput = sal_True;*/ } else { // new res. is a String- or FilterList @@ -932,11 +932,11 @@ int Export::Execute( int nToken, const char * pToken ) CleanValue( sLang ); nListLang = sLang; /*if (( bUnmerge ) && ( !nListLang.EqualsIgnoreCaseAscii("de")) && ( !nListLang.EqualsIgnoreCaseAscii("en-US"))) - bDontWriteOutput = TRUE;*/ + bDontWriteOutput = sal_True;*/ nListIndex = 0; nListLevel = 0; /*if ( bUnmerge && nListLang.EqualsIgnoreCaseAscii("de") && ListExists( pResData, nList ) ) - bDontWriteOutput = TRUE;*/ + bDontWriteOutput = sal_True;*/ } } } @@ -963,7 +963,7 @@ int Export::Execute( int nToken, const char * pToken ) break; case LONGTEXTLINE: case TEXTLINE: - bDontWriteOutput = FALSE; + bDontWriteOutput = sal_False; if ( nLevel ) { CutComment( sToken ); @@ -996,7 +996,7 @@ int Export::Execute( int nToken, const char * pToken ) if ( Export::isSourceLanguage( nLangIndex ) ) pResData->SetId( sText, ID_LEVEL_TEXT ); - pResData->bText = TRUE; + pResData->bText = sal_True; pResData->sTextTyp = sOrigKey; if ( bMergeMode ) { PrepareTextToMerge( sOrig, STRING_TYP_TEXT, nLangIndex, pResData ); @@ -1017,7 +1017,7 @@ int Export::Execute( int nToken, const char * pToken ) // ( sOrig.SearchAndReplace( "=", "[ de ] =" )); // } SetChildWithText(); - pResData->bHelpText = TRUE; + pResData->bHelpText = sal_True; if ( bBreakWhenHelpText ) { ByteString sError( "\"HelpText\" found in source\n" ); YYWarning( sError.GetBufferAccess()); @@ -1042,7 +1042,7 @@ int Export::Execute( int nToken, const char * pToken ) // ( sOrig.SearchAndReplace( "=", "[ de ] =" )); // } SetChildWithText(); - pResData->bQuickHelpText = TRUE; + pResData->bQuickHelpText = sal_True; if ( bMergeMode ) PrepareTextToMerge( sOrig, STRING_TYP_QUICKHELPTEXT, nLangIndex, pResData ); //if ( bUnmerge ) @@ -1061,7 +1061,7 @@ int Export::Execute( int nToken, const char * pToken ) // ( sOrig.SearchAndReplace( "=", "[ de ] =" )); // } SetChildWithText(); - pResData->bTitle = TRUE; + pResData->bTitle = sal_True; if ( bMergeMode ) PrepareTextToMerge( sOrig, STRING_TYP_TITLE, nLangIndex, pResData ); //if ( bUnmerge ) @@ -1085,7 +1085,7 @@ int Export::Execute( int nToken, const char * pToken ) } break; case NEWTEXTINRES: { - bDontWriteOutput = TRUE; + bDontWriteOutput = sal_True; // this means something like // ### Achtung : Neuer Text ... /*ByteString sLang( "GERMAN" ); ByteString sText = sToken.GetToken( 2, ':' ).GetToken( 0, '*' ); @@ -1095,7 +1095,7 @@ int Export::Execute( int nToken, const char * pToken ) } break; case APPFONTMAPPING: { - bDontWriteOutput = FALSE; + bDontWriteOutput = sal_False; // this is a AppfontMapping, so look if its a definition // of field size ByteString sKey = sToken.GetToken( 0, '=' ); @@ -1107,18 +1107,18 @@ int Export::Execute( int nToken, const char * pToken ) sMapping.EraseAllChars( ' ' ); sMapping.EraseAllChars( '\t' ); if ( sKey.ToUpperAscii() == "SIZE" ) { - pResData->nWidth = ( USHORT ) sMapping.GetToken( 0, ',' ).ToInt64(); + pResData->nWidth = ( sal_uInt16 ) sMapping.GetToken( 0, ',' ).ToInt64(); } else if ( sKey == "POSSIZE" ) { - pResData->nWidth = ( USHORT ) sMapping.GetToken( 2, ',' ).ToInt64(); + pResData->nWidth = ( sal_uInt16 ) sMapping.GetToken( 2, ',' ).ToInt64(); } } break; case RSCDEFINELEND: - bDontWriteOutput = FALSE; + bDontWriteOutput = sal_False; break; case CONDITION: { - bDontWriteOutput = FALSE; + bDontWriteOutput = sal_False; while( sToken.SearchAndReplace( "\r", " " ) != STRING_NOTFOUND ) {}; while( sToken.SearchAndReplace( "\t", " " ) != STRING_NOTFOUND ) {}; while( sToken.SearchAndReplace( " ", " " ) != STRING_NOTFOUND ) {}; @@ -1147,16 +1147,16 @@ int Export::Execute( int nToken, const char * pToken ) } else break; if ( nLevel ) { - WriteData( pResData, TRUE ); + WriteData( pResData, sal_True ); pResData->sPForm = sActPForm; } } break; case EMPTYLINE : { - bDontWriteOutput = FALSE; + bDontWriteOutput = sal_False; if ( bDefine ) { - bNextMustBeDefineEOL = FALSE; - bDefine = FALSE; + bNextMustBeDefineEOL = sal_False; + bDefine = sal_False; while ( nLevel ) Parse( LEVELDOWN, "" ); //WorkOnTokenSet( LEVELDOWN, pTkn ); @@ -1164,7 +1164,7 @@ int Export::Execute( int nToken, const char * pToken ) } break; case PRAGMA : { - bDontWriteOutput = FALSE; + bDontWriteOutput = sal_False; while( sToken.SearchAndReplace( "\t", " " ) != STRING_NOTFOUND ) {}; while( sToken.SearchAndReplace( " ", " " ) != STRING_NOTFOUND ) {}; sToken.EraseLeadingChars( ' ' ); @@ -1187,11 +1187,11 @@ int Export::Execute( int nToken, const char * pToken ) } break; case TEXTREFID : { - bDontWriteOutput = TRUE; + bDontWriteOutput = sal_True; /*ByteString sK = sToken.GetToken( 0, '=' ); ByteString sKey = sK.EraseAllChars( '\t' ).EraseAllChars( ' ' ); ByteString sT = sToken.GetToken( 1, '=' ).GetToken( 0, ';' ); - USHORT nRefId = ( USHORT ) sT.EraseAllChars( '\t' ).EraseAllChars( ' ' ).ToInt32(); + sal_uInt16 nRefId = ( sal_uInt16 ) sT.EraseAllChars( '\t' ).EraseAllChars( ' ' ).ToInt32(); if (( sKey.ToUpperAscii() == "TEXT" ) || ( sKey == "MESSAGE" ) || ( sKey == "CUSTOMUNITTEXT" ) || @@ -1210,7 +1210,7 @@ int Export::Execute( int nToken, const char * pToken ) // the current token must be written to dest. without merging if( bDefine && sOrig.Len() > 2 ){ - for( USHORT n = 0 ; n < sOrig.Len() ; n++ ){ + for( sal_uInt16 n = 0 ; n < sOrig.Len() ; n++ ){ if( sOrig.GetChar( n ) == '\n' && sOrig.GetChar( n-1 ) != '\\'){ sOrig.Insert('\\' , n++ ); } @@ -1234,8 +1234,8 @@ void Export::CutComment( ByteString &rText ) if ( rText.Search( "//" ) != STRING_NOTFOUND ) { ByteString sWork( rText ); sWork.SearchAndReplaceAll( "\\\"", "XX" ); - USHORT i = 0; - BOOL bInner = FALSE; + sal_uInt16 i = 0; + sal_Bool bInner = sal_False; while ( i < sWork.Len() - 1 ) { if ( sWork.GetChar( i ) == '\"' ) @@ -1254,8 +1254,8 @@ void Export::CutComment( ByteString &rText ) } void Export::UnmergeUTF8( ByteString& sOrig ){ - USHORT nPos1 = sOrig.Search('\"'); - USHORT nPos2 = sOrig.SearchBackward('\"'); + sal_uInt16 nPos1 = sOrig.Search('\"'); + sal_uInt16 nPos2 = sOrig.SearchBackward('\"'); if( nPos1 > 0 && nPos2 > 0 && nPos1 < nPos2){ ByteString sPart = sOrig.Copy(nPos1+1 , nPos2-1); ByteString sPartUTF8 = sPart; @@ -1265,7 +1265,7 @@ void Export::UnmergeUTF8( ByteString& sOrig ){ } /*****************************************************************************/ -BOOL Export::ListExists( ResData *pResData, USHORT nLst ) +sal_Bool Export::ListExists( ResData *pResData, sal_uInt16 nLst ) /*****************************************************************************/ { switch ( nLst ) { @@ -1275,20 +1275,20 @@ BOOL Export::ListExists( ResData *pResData, USHORT nLst ) case LIST_PAIRED: return pResData->pPairedList != NULL; case LIST_UIENTRIES: return pResData->pUIEntries != NULL; } - return FALSE; + return sal_False; } /*****************************************************************************/ -BOOL Export::WriteData( ResData *pResData, BOOL bCreateNew ) +sal_Bool Export::WriteData( ResData *pResData, sal_Bool bCreateNew ) /*****************************************************************************/ { if ( bMergeMode ) { MergeRest( pResData ); - return TRUE; + return sal_True; } if ( bUnmerge ) - return TRUE; + return sal_True; /* ByteStringHashMap::iterator pos3 = pResData->sText.begin(); ByteStringHashMap::iterator end3 = pResData->sText.end(); @@ -1449,7 +1449,7 @@ BOOL Export::WriteData( ResData *pResData, BOOL bCreateNew ) if ( bCreateNew ) pResData->pUIEntries = 0; } - return TRUE; + return sal_True; } ByteString Export::GetPairedListID( const ByteString& sText ){ // < "STRING" ; IDENTIFIER ; > ; @@ -1477,8 +1477,8 @@ ByteString Export::StripList( const ByteString& sText ){ } /*****************************************************************************/ -BOOL Export::WriteExportList( ResData *pResData, ExportList *pExportList, - const ByteString &rTyp, BOOL bCreateNew ) +sal_Bool Export::WriteExportList( ResData *pResData, ExportList *pExportList, + const ByteString &rTyp, sal_Bool bCreateNew ) /*****************************************************************************/ { ByteString sGID = pResData->sGId; @@ -1492,7 +1492,7 @@ BOOL Export::WriteExportList( ResData *pResData, ExportList *pExportList, ByteString sTimeStamp( Export::GetTimeStamp()); ByteString sCur; - for ( ULONG i = 0; pExportList != NULL && i < pExportList->Count(); i++ ) { + for ( sal_uLong i = 0; pExportList != NULL && i < pExportList->Count(); i++ ) { ExportListEntry *pEntry = pExportList->GetObject( i ); // mandatory for export: german and eng. and/or enus //ByteString a("Export::WriteExportList::pEntry"); @@ -1555,7 +1555,7 @@ BOOL Export::WriteExportList( ResData *pResData, ExportList *pExportList, if ( bCreateNew ) delete pExportList; - return TRUE; + return sal_True; } /*****************************************************************************/ @@ -1565,7 +1565,7 @@ ByteString Export::FullId() ByteString sFull; if ( nLevel > 1 ) { sFull = aResStack.GetObject( 0 )->sId; - for ( USHORT i = 1; i < nLevel - 1; i++ ) { + for ( sal_uInt16 i = 1; i < nLevel - 1; i++ ) { ByteString sToAdd = aResStack.GetObject( i )->sId; if ( sToAdd.Len()) { sFull += "."; @@ -1695,7 +1695,7 @@ void Export::CleanValue( ByteString &rValue ) } if ( rValue.Len()) { - for ( USHORT i = rValue.Len() - 1; i > 0; i-- ) { + for ( sal_uInt16 i = rValue.Len() - 1; i > 0; i-- ) { if (( rValue.GetChar( i ) == ' ' ) || ( rValue.GetChar( i ) == '\t' ) || ( rValue.GetChar( i ) == '\n' ) || ( rValue.GetChar( i ) == ';' ) || ( rValue.GetChar( i ) == '{' ) || ( rValue.GetChar( i ) == '\\' ) || @@ -1733,14 +1733,14 @@ ByteString Export::GetText( const ByteString &rSource, int nToken ) while ( sTmp.SearchAndReplace( "\\0x7F", "-=<[0x7F]>=-" ) != STRING_NOTFOUND ) {}; - USHORT nStart = 0; - USHORT nState = TXT_STATE_MACRO; + sal_uInt16 nStart = 0; + sal_uInt16 nState = TXT_STATE_MACRO; nState = TXT_STATE_TEXT; nStart = 1; - for ( USHORT i = nStart; i < sTmp.GetTokenCount( '\"' ); i++ ) { + for ( sal_uInt16 i = nStart; i < sTmp.GetTokenCount( '\"' ); i++ ) { ByteString sToken = sTmp.GetToken( i, '\"' ); if ( sToken.Len()) { if ( nState == TXT_STATE_TEXT ) { @@ -1800,7 +1800,7 @@ void Export::WriteToMerged( const ByteString &rText , bool bSDFContent ) ByteString sText( rText ); while ( sText.SearchAndReplace( " \n", "\n" ) != STRING_NOTFOUND ) {}; if( pParseQueue->bNextIsM && bSDFContent && sText.Len() > 2 ){ - for( USHORT n = 0 ; n < sText.Len() ; n++ ){ + for( sal_uInt16 n = 0 ; n < sText.Len() ; n++ ){ if( sText.GetChar( n ) == '\n' && sText.GetChar( n-1 ) != '\\'){ sText.Insert('\\' , n++ ); @@ -1808,7 +1808,7 @@ void Export::WriteToMerged( const ByteString &rText , bool bSDFContent ) } } else if( pParseQueue->bLastWasM && sText.Len() > 2 ){ - for( USHORT n = 0 ; n < sText.Len() ; n++ ){ + for( sal_uInt16 n = 0 ; n < sText.Len() ; n++ ){ if( sText.GetChar( n ) == '\n' && sText.GetChar( n-1 ) != '\\'){ sText.Insert('\\' , n++ ); } @@ -1816,7 +1816,7 @@ void Export::WriteToMerged( const ByteString &rText , bool bSDFContent ) } } else if( pParseQueue->bCurrentIsM && bSDFContent && sText.Len() > 2 ){ - for( USHORT n = 0 ; n < sText.Len() ; n++ ){ + for( sal_uInt16 n = 0 ; n < sText.Len() ; n++ ){ if( sText.GetChar( n ) == '\n' && sText.GetChar( n-1 ) != '\\'){ sText.Insert('\\' , n++ ); pParseQueue->bMflag=true; @@ -1824,13 +1824,13 @@ void Export::WriteToMerged( const ByteString &rText , bool bSDFContent ) } } else if( pParseQueue->bMflag ){ - for( USHORT n = 1 ; n < sText.Len() ; n++ ){ + for( sal_uInt16 n = 1 ; n < sText.Len() ; n++ ){ if( sText.GetChar( n ) == '\n' && sText.GetChar( n-1 ) != '\\'){ sText.Insert('\\' , n++ ); } } } - for ( USHORT i = 0; i < sText.Len(); i++ ) { + for ( sal_uInt16 i = 0; i < sText.Len(); i++ ) { if ( sText.GetChar( i ) != '\n' ){ aOutput.Write( ByteString( sText.GetChar( i )).GetBuffer(), 1 ); @@ -1847,11 +1847,11 @@ void Export::WriteToMerged( const ByteString &rText , bool bSDFContent ) void Export::ConvertMergeContent( ByteString &rText ) /*****************************************************************************/ { - BOOL bNoOpen = ( rText.Search( "\\\"" ) != 0 ); + sal_Bool bNoOpen = ( rText.Search( "\\\"" ) != 0 ); ByteString sClose( rText.Copy( rText.Len() - 2 )); - BOOL bNoClose = ( sClose != "\\\"" ); + sal_Bool bNoClose = ( sClose != "\\\"" ); ByteString sNew; - for ( USHORT i = 0; i < rText.Len(); i++ ) { + for ( sal_uInt16 i = 0; i < rText.Len(); i++ ) { ByteString sChar( rText.GetChar( i )); if ( sChar == "\\" ) { if (( i + 1 ) < rText.Len()) { @@ -1900,13 +1900,13 @@ void Export::ConvertMergeContent( ByteString &rText ) } /*****************************************************************************/ -BOOL Export::PrepareTextToMerge( ByteString &rText, USHORT nTyp, +sal_Bool Export::PrepareTextToMerge( ByteString &rText, sal_uInt16 nTyp, ByteString &nLangIndex, ResData *pResData ) /*****************************************************************************/ { // position to merge in: - USHORT nStart = 0; - USHORT nEnd = 0; + sal_uInt16 nStart = 0; + sal_uInt16 nEnd = 0; ByteString sOldId = pResData->sId; ByteString sOldGId = pResData->sGId; ByteString sOldTyp = pResData->sResTyp; @@ -1921,7 +1921,7 @@ BOOL Export::PrepareTextToMerge( ByteString &rText, USHORT nTyp, case LIST_ITEM : { if ( bUnmerge ) - return TRUE; + return sal_True; ExportList *pList = NULL; switch ( nTyp ) { @@ -1968,17 +1968,17 @@ BOOL Export::PrepareTextToMerge( ByteString &rText, USHORT nTyp, nStart = rText.Search( "\"" ); if ( nStart == STRING_NOTFOUND ) { rText = sOrigText; - return FALSE; + return sal_False; } - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; for ( nEnd = nStart + 1; nEnd < rText.Len() && !bFound; nEnd++ ) { if ( rText.GetChar( nEnd ) == '\"' ) - bFound = TRUE; + bFound = sal_True; } if ( !bFound ) { rText = sOrigText; - return FALSE; + return sal_False; } nEnd --; @@ -2010,22 +2010,22 @@ BOOL Export::PrepareTextToMerge( ByteString &rText, USHORT nTyp, if (( nLangIndex != ByteString("de") ) && ( nLangIndex != ByteString("en-US") )) { - bDontWriteOutput = TRUE; + bDontWriteOutput = sal_True; } - return TRUE; + return sal_True; }*/ nStart = rText.Search( "=" ); if ( nStart == STRING_NOTFOUND ) { rText = sOrigText; - return FALSE; + return sal_False; } nStart++; - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; while(( nStart < rText.Len()) && !bFound ) { if (( rText.GetChar( nStart ) != ' ' ) && ( rText.GetChar( nStart ) != '\t' )) - bFound = TRUE; + bFound = sal_True; else nStart ++; } @@ -2033,19 +2033,19 @@ BOOL Export::PrepareTextToMerge( ByteString &rText, USHORT nTyp, // no start position found if ( !bFound ) { rText = sOrigText; - return FALSE; + return sal_False; } // position to end mergeing in nEnd = rText.Len() - 1; - bFound = FALSE; + bFound = sal_False; while (( nEnd > nStart ) && !bFound ) { if (( rText.GetChar( nEnd ) != ' ' ) && ( rText.GetChar( nEnd ) != '\t' ) && ( rText.GetChar( nEnd ) != '\n' ) && ( rText.GetChar( nEnd ) != ';' ) && ( rText.GetChar( nEnd ) != '{' ) && ( rText.GetChar( nEnd ) != '\\' )) { - bFound = TRUE; + bFound = sal_True; } else nEnd --; @@ -2080,7 +2080,7 @@ BOOL Export::PrepareTextToMerge( ByteString &rText, USHORT nTyp, if ( !pEntrys ) { rText = sOrigText; - return FALSE; // no data found + return sal_False; // no data found } ByteString sContent; @@ -2088,12 +2088,12 @@ BOOL Export::PrepareTextToMerge( ByteString &rText, USHORT nTyp, //if ( !sContent.Len() && ( ! nLangIndex.EqualsIgnoreCaseAscii("en-US") )) { if ( !sContent.Len() && ( ! Export::isSourceLanguage( nLangIndex ) )) { rText = sOrigText; - return FALSE; // no data found + return sal_False; // no data found } //if ( nLangIndex.EqualsIgnoreCaseAscii("en-US") ) { if ( Export::isSourceLanguage( nLangIndex ) ) { - return FALSE; + return sal_False; } ByteString sPostFix( rText.Copy( ++nEnd )); @@ -2109,11 +2109,11 @@ BOOL Export::PrepareTextToMerge( ByteString &rText, USHORT nTyp, rText += sContent; rText += sPostFix; - return TRUE; + return sal_True; } /*****************************************************************************/ -void Export::MergeRest( ResData *pResData, USHORT nMode ) +void Export::MergeRest( ResData *pResData, sal_uInt16 nMode ) /*****************************************************************************/ { //if ( bUnmerge ) { return;} @@ -2137,8 +2137,8 @@ void Export::MergeRest( ResData *pResData, USHORT nMode ) bool bWriteNoSlash = false; if ( pEntry && pResData->bText ) { - BOOL bAddSemikolon = FALSE; - BOOL bFirst = TRUE; + sal_Bool bAddSemikolon = sal_False; + sal_Bool bFirst = sal_True; ByteString sCur; ByteString sTmp = Export::sLanguages; @@ -2146,7 +2146,7 @@ void Export::MergeRest( ResData *pResData, USHORT nMode ) sCur = aLanguages[ n ]; ByteString sText; - BOOL bText = pEntry->GetTransex3Text( sText, STRING_TYP_TEXT, sCur , TRUE ); + sal_Bool bText = pEntry->GetTransex3Text( sText, STRING_TYP_TEXT, sCur , sal_True ); if ( bText && sText.Len() && sText != "-" ) { ByteString sOutput; if ( bNextMustBeDefineEOL) { @@ -2155,7 +2155,7 @@ void Export::MergeRest( ResData *pResData, USHORT nMode ) else sOutput += ";\t\\\n"; } - bFirst=FALSE; + bFirst=sal_False; sOutput += "\t"; sOutput += pResData->sTextTyp; //if ( !sCur.EqualsIgnoreCaseAscii("en-US")) { @@ -2176,8 +2176,8 @@ void Export::MergeRest( ResData *pResData, USHORT nMode ) else if ( !bNextMustBeDefineEOL ) sOutput += ";\n"; else - bAddSemikolon = TRUE; - for ( USHORT j = 1; j < nLevel; j++ ) + bAddSemikolon = sal_True; + for ( sal_uInt16 j = 1; j < nLevel; j++ ) sOutput += "\t"; WriteToMerged( sOutput , true ); } @@ -2191,15 +2191,15 @@ void Export::MergeRest( ResData *pResData, USHORT nMode ) } if ( pEntry && pResData->bQuickHelpText ) { - BOOL bAddSemikolon = FALSE; - BOOL bFirst = TRUE; + sal_Bool bAddSemikolon = sal_False; + sal_Bool bFirst = sal_True; ByteString sCur; for( unsigned int n = 0; n < aLanguages.size(); n++ ){ sCur = aLanguages[ n ]; ByteString sText; - BOOL bText = pEntry->GetTransex3Text( sText, STRING_TYP_QUICKHELPTEXT, sCur, TRUE ); + sal_Bool bText = pEntry->GetTransex3Text( sText, STRING_TYP_QUICKHELPTEXT, sCur, sal_True ); if ( bText && sText.Len() && sText != "-" ) { ByteString sOutput; if ( bNextMustBeDefineEOL) { @@ -2208,7 +2208,7 @@ void Export::MergeRest( ResData *pResData, USHORT nMode ) else sOutput += ";\t\\\n"; } - bFirst=FALSE; + bFirst=sal_False; sOutput += "\t"; sOutput += "QuickHelpText"; //if ( !sCur.EqualsIgnoreCaseAscii("en-US") ) { @@ -2225,8 +2225,8 @@ void Export::MergeRest( ResData *pResData, USHORT nMode ) else if ( !bNextMustBeDefineEOL ) sOutput += ";\n"; else - bAddSemikolon = TRUE; - for ( USHORT j = 1; j < nLevel; j++ ) + bAddSemikolon = sal_True; + for ( sal_uInt16 j = 1; j < nLevel; j++ ) sOutput += "\t"; WriteToMerged( sOutput ,true ); } @@ -2238,15 +2238,15 @@ void Export::MergeRest( ResData *pResData, USHORT nMode ) } if ( pEntry && pResData->bTitle ) { - BOOL bAddSemikolon = FALSE; - BOOL bFirst = TRUE; + sal_Bool bAddSemikolon = sal_False; + sal_Bool bFirst = sal_True; ByteString sCur; for( unsigned int n = 0; n < aLanguages.size(); n++ ){ sCur = aLanguages[ n ]; ByteString sText; - BOOL bText = pEntry->GetTransex3Text( sText, STRING_TYP_TITLE, sCur, TRUE ); + sal_Bool bText = pEntry->GetTransex3Text( sText, STRING_TYP_TITLE, sCur, sal_True ); if ( bText && sText.Len() && sText != "-" ) { ByteString sOutput; if ( bNextMustBeDefineEOL) { @@ -2255,7 +2255,7 @@ void Export::MergeRest( ResData *pResData, USHORT nMode ) else sOutput += ";\t\\\n"; } - bFirst=FALSE; + bFirst=sal_False; sOutput += "\t"; sOutput += "Title"; //if ( !sCur.EqualsIgnoreCaseAscii("en-US") ) { @@ -2272,8 +2272,8 @@ void Export::MergeRest( ResData *pResData, USHORT nMode ) else if ( !bNextMustBeDefineEOL ) sOutput += ";\n"; else - bAddSemikolon = TRUE; - for ( USHORT j = 1; j < nLevel; j++ ) + bAddSemikolon = sal_True; + for ( sal_uInt16 j = 1; j < nLevel; j++ ) sOutput += "\t"; WriteToMerged( sOutput ,true ); } @@ -2297,9 +2297,9 @@ void Export::MergeRest( ResData *pResData, USHORT nMode ) pResData->sGId += "."; pResData->sGId += sOldId; ByteString sSpace; - for ( USHORT i = 1; i < nLevel-1; i++ ) + for ( sal_uInt16 i = 1; i < nLevel-1; i++ ) sSpace += "\t"; - for ( USHORT nT = LIST_STRING; nT <= LIST_UIENTRIES; nT++ ) { + for ( sal_uInt16 nT = LIST_STRING; nT <= LIST_UIENTRIES; nT++ ) { ExportList *pList = NULL; switch ( nT ) { case LIST_STRING : pResData->sResTyp = "stringlist"; pList = pResData->pStringList; bPairedList = false; break; @@ -2311,7 +2311,7 @@ void Export::MergeRest( ResData *pResData, USHORT nMode ) ByteString sCur; for( unsigned int n = 0; n < aLanguages.size(); n++ ){ sCur = aLanguages[ n ]; - USHORT nIdx = 1; + sal_uInt16 nIdx = 1; // Set matching pairedlist identifier if( bPairedList && pResData->pPairedList && ( nIdx == 1 ) ){ @@ -2322,18 +2322,18 @@ void Export::MergeRest( ResData *pResData, USHORT nMode ) pResData->sId = ByteString("1"); PFormEntrys *pEntrys; - ULONG nLIndex = 0; - ULONG nMaxIndex = 0; + sal_uLong nLIndex = 0; + sal_uLong nMaxIndex = 0; if ( pList ) nMaxIndex = pList->GetSourceLanguageListEntryCount(); pEntrys = pMergeDataFile->GetPFormEntrys( pResData ); while( pEntrys && ( nLIndex < nMaxIndex )) { //printf("Lang %s, List Index %d\n",sCur.GetBuffer(),(int)nLIndex); ByteString sText; - BOOL bText; - bText = pEntrys->GetTransex3Text( sText, STRING_TYP_TEXT, sCur, TRUE ); + sal_Bool bText; + bText = pEntrys->GetTransex3Text( sText, STRING_TYP_TEXT, sCur, sal_True ); if( !bText ) - bText = pEntrys->GetTransex3Text( sText , STRING_TYP_TEXT, SOURCE_LANGUAGE , FALSE ); + bText = pEntrys->GetTransex3Text( sText , STRING_TYP_TEXT, SOURCE_LANGUAGE , sal_False ); // Use fallback, if data is missing in sdf file //if( !bText && pResData->sResTyp.Equals( "pairedlist" ) ){ @@ -2396,7 +2396,7 @@ void Export::MergeRest( ResData *pResData, USHORT nMode ) } } - USHORT nStart, nEnd; + sal_uInt16 nStart, nEnd; nStart = sLine.Search( "\"" ); ByteString sPostFix; @@ -2480,7 +2480,7 @@ void Export::MergeRest( ResData *pResData, USHORT nMode ) } nListIndex++; - ULONG nMaxIndex = 0; + sal_uLong nMaxIndex = 0; if ( pList ) nMaxIndex = pList->GetSourceLanguageListEntryCount(); ByteString sLine; @@ -2505,7 +2505,7 @@ void Export::MergeRest( ResData *pResData, USHORT nMode ) sText += sLine; sText += " ;"; sText += "\n"; - for ( USHORT i = 0; i < nLevel; i++ ) + for ( sal_uInt16 i = 0; i < nLevel; i++ ) sText += "\t"; WriteToMerged( sText ,false ); nListIndex++; @@ -2535,15 +2535,15 @@ void Export::SetChildWithText() /*****************************************************************************/ { if ( aResStack.Count() > 1 ) { - for ( ULONG i = 0; i < aResStack.Count() - 1; i++ ) { - aResStack.GetObject( i )->bChildWithText = TRUE; + for ( sal_uLong i = 0; i < aResStack.Count() - 1; i++ ) { + aResStack.GetObject( i )->bChildWithText = sal_True; } } } void ParserQueue::Push( const QueueEntry& aEntry ){ // printf("nTyp = %d ",aEntry.nTyp); - USHORT nLen = aEntry.sLine.Len(); + sal_uInt16 nLen = aEntry.sLine.Len(); if( !bStart ){ aQueueCur->push( aEntry ); diff --git a/l10ntools/source/export2.cxx b/l10ntools/source/export2.cxx index fc8f823b7deb..eb5f8d5fbf15 100644 --- a/l10ntools/source/export2.cxx +++ b/l10ntools/source/export2.cxx @@ -52,7 +52,7 @@ ResData::~ResData() { if ( pStringList ) { // delete existing res. of type StringList - for ( ULONG i = 0; i < pStringList->Count(); i++ ) { + for ( sal_uLong i = 0; i < pStringList->Count(); i++ ) { ExportListEntry* test = pStringList->GetObject( i ); if( test != NULL ) delete test; } @@ -60,7 +60,7 @@ ResData::~ResData() } if ( pFilterList ) { // delete existing res. of type FilterList - for ( ULONG i = 0; i < pFilterList->Count(); i++ ) { + for ( sal_uLong i = 0; i < pFilterList->Count(); i++ ) { ExportListEntry* test = pFilterList->GetObject( i ); delete test; } @@ -68,7 +68,7 @@ ResData::~ResData() } if ( pItemList ) { // delete existing res. of type ItemList - for ( ULONG i = 0; i < pItemList->Count(); i++ ) { + for ( sal_uLong i = 0; i < pItemList->Count(); i++ ) { ExportListEntry* test = pItemList->GetObject( i ); delete test; } @@ -76,7 +76,7 @@ ResData::~ResData() } if ( pUIEntries ) { // delete existing res. of type UIEntries - for ( ULONG i = 0; i < pUIEntries->Count(); i++ ) { + for ( sal_uLong i = 0; i < pUIEntries->Count(); i++ ) { ExportListEntry* test = pUIEntries->GetObject( i ); delete test; } @@ -145,8 +145,8 @@ void Export::QuotHTMLXRM( ByteString &rString ) /*****************************************************************************/ { ByteString sReturn; - //BOOL bBreak = FALSE; - for ( USHORT i = 0; i < rString.Len(); i++ ) { + //sal_Bool bBreak = sal_False; + for ( sal_uInt16 i = 0; i < rString.Len(); i++ ) { ByteString sTemp = rString.Copy( i ); if ( sTemp.Search( "<Arg n=" ) == 0 ) { while ( i < rString.Len() && rString.GetChar( i ) != '>' ) { @@ -214,7 +214,7 @@ void Export::QuotHTML( ByteString &rString ) /*****************************************************************************/ { ByteString sReturn; - for ( USHORT i = 0; i < rString.Len(); i++ ) { + for ( sal_uInt16 i = 0; i < rString.Len(); i++ ) { ByteString sTemp = rString.Copy( i ); if ( sTemp.Search( "<Arg n=" ) == 0 ) { while ( i < rString.Len() && rString.GetChar( i ) != '>' ) { @@ -444,7 +444,7 @@ void Export::InitLanguages( bool bMergeMode ){ if( !isInitialized ){ ByteString sTmp; ByteStringBoolHashMap aEnvLangs; - for ( USHORT x = 0; x < sLanguages.GetTokenCount( ',' ); x++ ){ + for ( sal_uInt16 x = 0; x < sLanguages.GetTokenCount( ',' ); x++ ){ sTmp = sLanguages.GetToken( x, ',' ).GetToken( 0, '=' ); sTmp.EraseLeadingAndTrailingChars(); if( bMergeMode && !isAllowed( sTmp ) ){} @@ -461,7 +461,7 @@ void Export::InitForcedLanguages( bool bMergeMode ){ /*****************************************************************************/ ByteString sTmp; ByteStringBoolHashMap aEnvLangs; - for ( USHORT x = 0; x < sForcedLanguages.GetTokenCount( ',' ); x++ ){ + for ( sal_uInt16 x = 0; x < sForcedLanguages.GetTokenCount( ',' ); x++ ){ sTmp = sForcedLanguages.GetToken( x, ',' ).GetToken( 0, '=' ); sTmp.EraseLeadingAndTrailingChars(); if( bMergeMode && isAllowed( sTmp ) ){} @@ -558,7 +558,7 @@ void Export::FillInListFallbacks( /*****************************************************************************/ { - for ( ULONG i = 0; i < pList->Count(); i++ ) { + for ( sal_uLong i = 0; i < pList->Count(); i++ ) { ExportListEntry *pEntry = pList->GetObject( i ); if ( !( *pEntry )[ nSource ].Len()){ ( *pEntry )[ nSource ] = ( *pEntry )[ nFallback ]; @@ -582,7 +582,7 @@ ByteString Export::GetTimeStamp() } /*****************************************************************************/ -BOOL Export::ConvertLineEnds( +sal_Bool Export::ConvertLineEnds( ByteString sSource, ByteString sDestination ) /*****************************************************************************/ { @@ -591,11 +591,11 @@ BOOL Export::ConvertLineEnds( SvFileStream aSource( sSourceFile, STREAM_READ ); if ( !aSource.IsOpen()) - return FALSE; + return sal_False; SvFileStream aDestination( sDestinationFile, STREAM_STD_WRITE | STREAM_TRUNC ); if ( !aDestination.IsOpen()) { aSource.Close(); - return FALSE; + return sal_False; } ByteString sLine; @@ -613,7 +613,7 @@ BOOL Export::ConvertLineEnds( aSource.Close(); aDestination.Close(); - return TRUE; + return sal_True; } /*****************************************************************************/ @@ -623,7 +623,7 @@ ByteString Export::GetNativeFile( ByteString sSource ) DirEntry aTemp( GetTempFile()); ByteString sReturn( aTemp.GetFull(), RTL_TEXTENCODING_ASCII_US ); - for ( USHORT i = 0; i < 10; i++ ) + for ( sal_uInt16 i = 0; i < 10; i++ ) if ( ConvertLineEnds( sSource, sReturn )) return sReturn; diff --git a/l10ntools/source/filter/utils/Cache.java b/l10ntools/source/filter/utils/Cache.java index f4120b2140cc..d1d4766398d2 100644 --- a/l10ntools/source/filter/utils/Cache.java +++ b/l10ntools/source/filter/utils/Cache.java @@ -159,7 +159,6 @@ public class Cache private static final java.lang.String FLAGNAME_PACKED = "PACKED"; private static final java.lang.String FLAGNAME_PREFERRED = "PREFERRED"; private static final java.lang.String FLAGNAME_READONLY = "READONLY"; - private static final java.lang.String FLAGNAME_SILENTEXPORT = "SILENTEXPORT"; private static final java.lang.String FLAGNAME_TEMPLATE = "TEMPLATE"; private static final java.lang.String FLAGNAME_TEMPLATEPATH = "TEMPLATEPATH"; private static final java.lang.String FLAGNAME_USESOPTIONS = "USESOPTIONS"; @@ -185,7 +184,6 @@ public class Cache private static final int FLAGVAL_PACKED = 0x00100000; // 1048576 private static final int FLAGVAL_PREFERRED = 0x10000000; // 268435456 private static final int FLAGVAL_READONLY = 0x00010000; // 65536 - private static final int FLAGVAL_SILENTEXPORT = 0x00200000; // 2097152 private static final int FLAGVAL_TEMPLATE = 0x00000004; // 4 private static final int FLAGVAL_TEMPLATEPATH = 0x00000010; // 16 private static final int FLAGVAL_USESOPTIONS = 0x00000080; // 128 @@ -1358,9 +1356,6 @@ public class Cache if (sFlagName.equals(FLAGNAME_READONLY)) nFlags |= FLAGVAL_READONLY; else - if (sFlagName.equals(FLAGNAME_SILENTEXPORT)) - nFlags |= FLAGVAL_SILENTEXPORT; - else if (sFlagName.equals(FLAGNAME_TEMPLATE)) nFlags |= FLAGVAL_TEMPLATE; else @@ -1455,9 +1450,6 @@ public class Cache if((field & FLAGVAL_PACKED) == FLAGVAL_PACKED) lFlags.add(FLAGNAME_PACKED); - if((field & FLAGVAL_SILENTEXPORT) == FLAGVAL_SILENTEXPORT) - lFlags.add(FLAGNAME_SILENTEXPORT); - if((field & FLAGVAL_BROWSERPREFERRED) == FLAGVAL_BROWSERPREFERRED) lFlags.add(FLAGNAME_BROWSERPREFERRED); diff --git a/l10ntools/source/gsicheck.cxx b/l10ntools/source/gsicheck.cxx index 1ec9827a753d..61c7cf02fea3 100644 --- a/l10ntools/source/gsicheck.cxx +++ b/l10ntools/source/gsicheck.cxx @@ -40,7 +40,7 @@ /*****************************************************************************/ void PrintMessage( ByteString aType, ByteString aMsg, ByteString aPrefix, - ByteString aContext, BOOL bPrintContext, ULONG nLine, ByteString aUniqueId = ByteString() ) + ByteString aContext, sal_Bool bPrintContext, sal_uLong nLine, ByteString aUniqueId = ByteString() ) /****************************************************** |