vcl/source/gdi/impfont.cxx | 2 vcl/source/gdi/outdev4.cxx | 47 ++++++------ vcl/source/gdi/outdev6.cxx | 2 vcl/source/gdi/outmap.cxx | 153 +++++++++++------------------------------- vcl/source/gdi/regband.cxx | 19 ++--- vcl/source/gdi/regionband.cxx | 2 vcl/source/gdi/virdev.cxx | 4 - vcl/source/gdi/wall.cxx | 17 ++-- 8 files changed, 87 insertions(+), 159 deletions(-)
New commits: commit 68e5e6407eecf5134168a8242640c3c95e14928a Author: Luc Castermans <luc.casterm...@gmail.com> Date: Wed Feb 12 20:57:20 2014 +0100 Translated German comments - find-german-comments Change-Id: I716d135de71605ac79c04e575ef946f303196097 Reviewed-on: https://gerrit.libreoffice.org/8023 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/source/gdi/impfont.cxx b/vcl/source/gdi/impfont.cxx index 09bb07e..2674a1a 100644 --- a/vcl/source/gdi/impfont.cxx +++ b/vcl/source/gdi/impfont.cxx @@ -725,8 +725,6 @@ void UpdateAttributesFromPSName( const OUString& rPSName, ImplDevFontAttributes& rDFA.SetWeight(WEIGHT_BLACK); else if (aPSName.indexOf("black") != -1) rDFA.SetWeight(WEIGHT_BLACK); - //else if (aPSName.indexOf("book") != -1) - // rDFA.SetWeight(WEIGHT_SEMIBOLD); else if( (aPSName.indexOf("semibold") != -1) || (aPSName.indexOf("smbd") != -1)) rDFA.SetWeight(WEIGHT_SEMIBOLD); diff --git a/vcl/source/gdi/outdev4.cxx b/vcl/source/gdi/outdev4.cxx index a18ce19..fb8052e 100644 --- a/vcl/source/gdi/outdev4.cxx +++ b/vcl/source/gdi/outdev4.cxx @@ -164,7 +164,7 @@ void OutputDevice::ImplDrawLinearGradient( const Rectangle& rRect, aRect.Bottom() = aMirrorRect.Top(); } - // Intensitaeten von Start- und Endfarbe ggf. aendern + // colour-intensities of start- and finish; change if needed long nFactor; Color aStartCol = rGradient.GetStartColor(); Color aEndCol = rGradient.GetEndColor(); @@ -355,14 +355,13 @@ void OutputDevice::ImplDrawComplexGradient( const Rectangle& rRect, const Gradient& rGradient, sal_Bool bMtf, const PolyPolygon* pClipPolyPoly ) { - // Feststellen ob Ausgabe ueber Polygon oder PolyPolygon - // Bei Rasteroperationen ungleich Overpaint immer PolyPolygone, - // da es zu falschen Ergebnissen kommt, wenn man mehrfach uebereinander - // ausgibt - // Bei Druckern auch immer PolyPolygone, da nicht alle Drucker - // das Uebereinanderdrucken von Polygonen koennen - // Virtuelle Device werden auch ausgeklammert, da einige Treiber - // ansonsten zu langsam sind + // Determine if we output via Polygon or PolyPolygon + // For all rasteroperations other then Overpaint always use PolyPolygon, + // as we will get wrong results if we output multiple times on top of each other. + // Also for printers always use PolyPolygon, as not all printers + // can print polygons on top of each other. + // Also virtual devices are excluded, as some drivers are too slow. + // PolyPolygon* pPolyPoly; Rectangle aRect; Point aCenter; @@ -389,7 +388,7 @@ void OutputDevice::ImplDrawComplexGradient( const Rectangle& rRect, long nMinRect = std::min( aRect.GetWidth(), aRect.GetHeight() ); - // Anzahl der Schritte berechnen, falls nichts uebergeben wurde + // calculate number of steps, if this was not passed if( !nStepCount ) { long nInc; @@ -407,7 +406,7 @@ void OutputDevice::ImplDrawComplexGradient( const Rectangle& rRect, nStepCount = nMinRect / nInc; } - // minimal drei Schritte und maximal die Anzahl der Farbunterschiede + // at least three steps and maximum number if colour differences long nSteps = std::max( nStepCount, 2L ); long nCalcSteps = std::abs( nRedSteps ); long nTempSteps = std::abs( nGreenSteps ); @@ -421,7 +420,7 @@ void OutputDevice::ImplDrawComplexGradient( const Rectangle& rRect, if ( !nSteps ) nSteps = 1; - // Ausgabebegrenzungen und Schrittweite fuer jede Richtung festlegen + // determine output limits and stepsizes for all directions Polygon aPoly; double fScanLeft = aRect.Left(); double fScanTop = aRect.Top(); @@ -464,10 +463,10 @@ void OutputDevice::ImplDrawComplexGradient( const Rectangle& rRect, ImplDrawPolygon( aPoly = aExtRect, pClipPolyPoly ); } - // Schleife, um nacheinander die Polygone/PolyPolygone auszugeben + // loop to output Polygone/PolyPolygone sequentially for( long i = 1; i < nSteps; i++ ) { - // neues Polygon berechnen + // calculate new Polygon aRect.Left() = (long)( fScanLeft += fScanIncX ); aRect.Top() = (long)( fScanTop += fScanIncY ); aRect.Right() = (long)( fScanRight -= fScanIncX ); @@ -483,13 +482,13 @@ void OutputDevice::ImplDrawComplexGradient( const Rectangle& rRect, aPoly.Rotate( aCenter, nAngle ); - // Farbe entsprechend anpassen + // adapt colour accordingly const long nStepIndex = ( ( pPolyPoly != NULL ) ? i : ( i + 1 ) ); nRed = ImplGetGradientColorValue( nStartRed + ( ( nRedSteps * nStepIndex ) / nSteps ) ); nGreen = ImplGetGradientColorValue( nStartGreen + ( ( nGreenSteps * nStepIndex ) / nSteps ) ); nBlue = ImplGetGradientColorValue( nStartBlue + ( ( nBlueSteps * nStepIndex ) / nSteps ) ); - // entweder langsame PolyPolygon-Ausgaben oder schnelles Polygon-Painting + // either slow PolyPolygon output or fast Polygon-Paiting if( pPolyPoly ) { bPaintLastPolygon = true; // #107349# Paint last polygon only if loop has generated any output @@ -526,7 +525,7 @@ void OutputDevice::ImplDrawComplexGradient( const Rectangle& rRect, } } - // Falls PolyPolygon-Ausgabe, muessen wir noch ein letztes inneres Polygon zeichnen + // we should draw last inner Polygon if we output PolyPolygon if( pPolyPoly ) { const Polygon& rPoly = pPolyPoly->GetObject( 1 ); @@ -626,11 +625,11 @@ void OutputDevice::DrawGradient( const Rectangle& rRect, if( !IsDeviceOutputNecessary() || ImplIsRecordLayout() ) return; - // Rechteck in Pixel umrechnen + // convert rectangle to pixels Rectangle aRect( ImplLogicToDevicePixel( rRect ) ); aRect.Justify(); - // Wenn Rechteck leer ist, brauchen wir nichts machen + // do nothing if the rectangle is empty if ( !aRect.IsEmpty() ) { // Clip Region sichern @@ -656,7 +655,7 @@ void OutputDevice::DrawGradient( const Rectangle& rRect, if ( !mbOutputClipped ) { - // Gradienten werden ohne Umrandung gezeichnet + // gradients are drawn without border if ( mbLineColor || mbInitLineColor ) { mpGraphics->SetLineColor(); @@ -799,11 +798,11 @@ void OutputDevice::DrawGradient( const PolyPolygon& rPolyPoly, if( !Rectangle( PixelToLogic( Point() ), GetOutputSize() ).IsEmpty() ) { - // Rechteck in Pixel umrechnen + // convert rectangle to pixels Rectangle aRect( ImplLogicToDevicePixel( aBoundRect ) ); aRect.Justify(); - // Wenn Rechteck leer ist, brauchen wir nichts machen + // do nothing if the rectangle is empty if ( !aRect.IsEmpty() ) { if( !mpGraphics && !ImplGetGraphics() ) @@ -816,7 +815,7 @@ void OutputDevice::DrawGradient( const PolyPolygon& rPolyPoly, { PolyPolygon aClipPolyPoly( ImplLogicToDevicePixel( rPolyPoly ) ); - // Gradienten werden ohne Umrandung gezeichnet + // draw gradients without border if( mbLineColor || mbInitLineColor ) { mpGraphics->SetLineColor(); @@ -912,7 +911,7 @@ void OutputDevice::AddGradientActions( const Rectangle& rRect, const Gradient& r aRect.Justify(); - // Wenn Rechteck leer ist, brauchen wir nichts machen + // do nothing if the rectangle is empty if ( !aRect.IsEmpty() ) { Gradient aGradient( rGradient ); diff --git a/vcl/source/gdi/outdev6.cxx b/vcl/source/gdi/outdev6.cxx index e55e125..3f06b4e 100644 --- a/vcl/source/gdi/outdev6.cxx +++ b/vcl/source/gdi/outdev6.cxx @@ -802,7 +802,7 @@ void OutputDevice::ImplDrawColorWallpaper( long nX, long nY, long nWidth, long nHeight, const Wallpaper& rWallpaper ) { - // Wallpaper ohne Umrandung zeichnen + // draw wallpaper without border Color aOldLineColor = GetLineColor(); Color aOldFillColor = GetFillColor(); SetLineColor(); diff --git a/vcl/source/gdi/outmap.cxx b/vcl/source/gdi/outmap.cxx index 24b5747..e68140b 100644 --- a/vcl/source/gdi/outmap.cxx +++ b/vcl/source/gdi/outmap.cxx @@ -56,8 +56,8 @@ static const long aImplDenominatorAry[s_ImplArySize] = // ----------------------------------------------------------------------- /* -Reduziert die Genauigkeit bis eine Fraction draus wird (sollte mal -ein Fraction ctor werden) koennte man dann auch mit BigInts machen +Reduces accuracy until it is a fraction (should become +ctor fraction once); we could also do this with BigInts */ static Fraction ImplMakeFraction( long nN1, long nN2, long nD1, long nD2 ) @@ -68,7 +68,7 @@ static Fraction ImplMakeFraction( long nN1, long nN2, long nD1, long nD2 ) if ( nN2 < 0 ) { i = -i; nN2 = -nN2; } if ( nD1 < 0 ) { i = -i; nD1 = -nD1; } if ( nD2 < 0 ) { i = -i; nD2 = -nD2; } - // alle positiv; i Vorzeichen + // all positive; i sign Fraction aF( i*nN1, nD1 ); aF *= Fraction( nN2, nD2 ); @@ -116,7 +116,7 @@ static void ImplCalcBigIntThreshold( long nDPIX, long nDPIY, } else { - // Schwellenwerte fuer BigInt Arithmetik berechnen + // calculate thresholds for BigInt arithmetic long nDenomHalfX = rMapRes.mnMapScDenomX / 2; sal_uLong nDenomX = rMapRes.mnMapScDenomX; long nProductX = nDPIX * rMapRes.mnMapScNumX; @@ -141,7 +141,7 @@ static void ImplCalcBigIntThreshold( long nDPIX, long nDPIY, } else { - // Schwellenwerte fuer BigInt Arithmetik berechnen + // calculate thresholds for BigInt arithmetic long nDenomHalfY = rMapRes.mnMapScDenomY / 2; sal_uLong nDenomY = rMapRes.mnMapScDenomY; long nProductY = nDPIY * rMapRes.mnMapScNumY; @@ -273,7 +273,7 @@ static void ImplCalcMapResolution( const MapMode& rMapMode, Fraction aScaleX = rMapMode.GetScaleX(); Fraction aScaleY = rMapMode.GetScaleY(); - // Offset laut MapMode setzen + // set offset according to MapMode Point aOrigin = rMapMode.GetOrigin(); if ( rMapMode.GetMapUnit() != MAP_RELATIVE ) { @@ -320,7 +320,7 @@ static void ImplCalcMapResolution( const MapMode& rMapMode, rMapRes.mnMapOfsY = (long)aY + aOrigin.Y(); } - // Scaling Faktor laut MapMode einberechnen + // calculate scaling factor according to MapMode // aTemp? = rMapRes.mnMapSc? * aScale? Fraction aTempX = ImplMakeFraction( rMapRes.mnMapScNumX, aScaleX.GetNumerator(), @@ -335,7 +335,7 @@ static void ImplCalcMapResolution( const MapMode& rMapMode, rMapRes.mnMapScNumY = aTempY.GetNumerator(); rMapRes.mnMapScDenomY = aTempY.GetDenominator(); - // hack: 0/n ungef"ahr 1/max + // hack: 0/n approximately 1/max if ( !rMapRes.mnMapScNumX ) { rMapRes.mnMapScNumX = 1; @@ -565,7 +565,7 @@ Polygon OutputDevice::ImplLogicToDevicePixel( const Polygon& rLogicPoly ) const sal_uInt16 nPoints = rLogicPoly.GetSize(); Polygon aPoly( rLogicPoly ); - // Pointer auf das Point-Array holen (Daten werden kopiert) + // get pointer to Point-array (copy data) const Point* pPointAry = aPoly.GetConstPointAry(); if ( mbMap ) @@ -705,7 +705,7 @@ void OutputDevice::SetMapMode() mbMap = false; maMapMode = MapMode(); - // create new objects (clip region werden nicht neu skaliert) + // create new objects (clip region are not re-scaled) mbNewFont = true; mbInitFont = true; if ( GetOutDevType() == OUTDEV_WINDOW ) @@ -742,25 +742,25 @@ void OutputDevice::SetMapMode( const MapMode& rNewMapMode ) #endif } - // Ist der MapMode der gleiche wie vorher, dann mache nichts + // do nothing if MapMode was not changed if ( maMapMode == rNewMapMode ) return; if( mpAlphaVDev ) mpAlphaVDev->SetMapMode( rNewMapMode ); - // Ist Default-MapMode, dann bereche nichts + // if default MapMode calculate nothing bool bOldMap = mbMap; mbMap = !rNewMapMode.IsDefault(); if ( mbMap ) { - // Falls nur der Orign umgesetzt wird, dann scaliere nichts neu + // if only the origin is converted, do not scale new if ( (rNewMapMode.GetMapUnit() == maMapMode.GetMapUnit()) && (rNewMapMode.GetScaleX() == maMapMode.GetScaleX()) && (rNewMapMode.GetScaleY() == maMapMode.GetScaleY()) && (bOldMap == mbMap) ) { - // Offset setzen + // set offset Point aOrigin = rNewMapMode.GetOrigin(); maMapRes.mnMapOfsX = aOrigin.X(); maMapRes.mnMapOfsY = aOrigin.Y(); @@ -781,11 +781,11 @@ void OutputDevice::SetMapMode( const MapMode& rNewMapMode ) maMapRes.mnMapOfsY = 0; } - // Neue MapMode-Aufloesung berechnen + // calculate new MapMode-resolution ImplCalcMapResolution( rNewMapMode, mnDPIX, mnDPIY, maMapRes, maThresRes ); } - // Neuen MapMode setzen + // set new MapMode if ( bRelMap ) { Point aOrigin( maMapRes.mnMapOfsX, maMapRes.mnMapOfsY ); @@ -805,7 +805,7 @@ void OutputDevice::SetMapMode( const MapMode& rNewMapMode ) else maMapMode = rNewMapMode; - // create new objects (clip region werden nicht neu skaliert) + // create new objects (clip region are not re-scaled) mbNewFont = true; mbInitFont = true; if ( GetOutDevType() == OUTDEV_WINDOW ) @@ -830,8 +830,7 @@ void OutputDevice::SetMapMode( const MapMode& rNewMapMode ) void OutputDevice::SetRelativeMapMode( const MapMode& rNewMapMode ) { - - // Ist der MapMode der gleiche wie vorher, dann mache nichts + // do nothing if MapMode did not change if ( maMapMode == rNewMapMode ) return; @@ -888,7 +887,7 @@ void OutputDevice::SetRelativeMapMode( const MapMode& rNewMapMode ) if ( eNew != eOld ) maMapMode = rNewMapMode; - // #106426# Adapt logical offset when changing mapmode + // #106426# Adapt logical offset when changing MapMode mnOutOffLogicX = ImplPixelToLogic( mnOutOffOrigX, mnDPIX, maMapRes.mnMapScNumX, maMapRes.mnMapScDenomX, maThresRes.mnThresPixToLogX ); @@ -1076,7 +1075,7 @@ Polygon OutputDevice::LogicToPixel( const Polygon& rLogicPoly ) const sal_uInt16 nPoints = rLogicPoly.GetSize(); Polygon aPoly( rLogicPoly ); - // Pointer auf das Point-Array holen (Daten werden kopiert) + // get pointer to Point-array (copy data) const Point* pPointAry = aPoly.GetConstPointAry(); for ( i = 0; i < nPoints; i++ ) @@ -1164,23 +1163,6 @@ Region OutputDevice::LogicToPixel( const Region& rLogicRegion ) const { aRegion.Union(LogicToPixel(*aRectIter)); } - - //long nX(0); - //long nY(0); - //long nWidth(0); - //long nHeight(0); - //ImplRegionInfo aInfo; - //aRegion.ImplBeginAddRect(); - //bool bRegionRect(rLogicRegion.ImplGetFirstRect(aInfo, nX, nY, nWidth, nHeight)); - // - //while(bRegionRect) - //{ - // const Rectangle aRect(Point(nX, nY), Size(nWidth, nHeight)); - // aRegion.ImplAddRect(LogicToPixel(aRect)); - // bRegionRect = rLogicRegion.ImplGetNextRect(aInfo, nX, nY, nWidth, nHeight); - //} - // - //aRegion.ImplEndAddRect(); } return aRegion; @@ -1195,7 +1177,7 @@ Point OutputDevice::LogicToPixel( const Point& rLogicPt, if ( rMapMode.IsDefault() ) return rLogicPt; - // MapMode-Aufloesung berechnen und Umrechnen + // convert MapMode resolution and convert ImplMapRes aMapRes; ImplThresholdRes aThresRes; ImplCalcMapResolution( rMapMode, mnDPIX, mnDPIY, aMapRes, aThresRes ); @@ -1217,7 +1199,7 @@ Size OutputDevice::LogicToPixel( const Size& rLogicSize, if ( rMapMode.IsDefault() ) return rLogicSize; - // MapMode-Aufloesung berechnen und Umrechnen + // convert MapMode resolution and convert ImplMapRes aMapRes; ImplThresholdRes aThresRes; ImplCalcMapResolution( rMapMode, mnDPIX, mnDPIY, aMapRes, aThresRes ); @@ -1239,7 +1221,7 @@ Rectangle OutputDevice::LogicToPixel( const Rectangle& rLogicRect, if ( rMapMode.IsDefault() || rLogicRect.IsEmpty() ) return rLogicRect; - // MapMode-Aufloesung berechnen und Umrechnen + // convert MapMode resolution and convert ImplMapRes aMapRes; ImplThresholdRes aThresRes; ImplCalcMapResolution( rMapMode, mnDPIX, mnDPIY, aMapRes, aThresRes ); @@ -1267,7 +1249,7 @@ Polygon OutputDevice::LogicToPixel( const Polygon& rLogicPoly, if ( rMapMode.IsDefault() ) return rLogicPoly; - // MapMode-Aufloesung berechnen und Umrechnen + // convert MapMode resolution and convert ImplMapRes aMapRes; ImplThresholdRes aThresRes; ImplCalcMapResolution( rMapMode, mnDPIX, mnDPIY, aMapRes, aThresRes ); @@ -1276,7 +1258,7 @@ Polygon OutputDevice::LogicToPixel( const Polygon& rLogicPoly, sal_uInt16 nPoints = rLogicPoly.GetSize(); Polygon aPoly( rLogicPoly ); - // Pointer auf das Point-Array holen (Daten werden kopiert) + // get pointer to Point-array (copy data) const Point* pPointAry = aPoly.GetConstPointAry(); for ( i = 0; i < nPoints; i++ ) @@ -1367,23 +1349,6 @@ Region OutputDevice::LogicToPixel( const Region& rLogicRegion, const MapMode& rM { aRegion.Union(LogicToPixel(*aRectIter, rMapMode)); } - - //long nX(0); - //long nY(0); - //long nWidth(0); - //long nHeight(0); - //ImplRegionInfo aInfo; - //aRegion.ImplBeginAddRect(); - //bool bRegionRect(rLogicRegion.ImplGetFirstRect(aInfo, nX, nY, nWidth, nHeight)); - // - //while(bRegionRect) - //{ - // const Rectangle aRect(Point(nX, nY), Size(nWidth, nHeight)); - // aRegion.ImplAddRect(LogicToPixel(aRect, rMapMode)); - // bRegionRect = rLogicRegion.ImplGetNextRect(aInfo, nX, nY, nWidth, nHeight); - //} - // - //aRegion.ImplEndAddRect(); } return aRegion; @@ -1455,7 +1420,7 @@ Polygon OutputDevice::PixelToLogic( const Polygon& rDevicePoly ) const sal_uInt16 nPoints = rDevicePoly.GetSize(); Polygon aPoly( rDevicePoly ); - // Pointer auf das Point-Array holen (Daten werden kopiert) + // get pointer to Point-array (copy data) const Point* pPointAry = aPoly.GetConstPointAry(); for ( i = 0; i < nPoints; i++ ) @@ -1531,23 +1496,6 @@ Region OutputDevice::PixelToLogic( const Region& rDeviceRegion ) const { aRegion.Union(PixelToLogic(*aRectIter)); } - - //long nX(0); - //long nY(0); - //long nWidth(0); - //long nHeight(0); - //ImplRegionInfo aInfo; - //aRegion.ImplBeginAddRect(); - //bool bRegionRect(rDeviceRegion.ImplGetFirstRect(aInfo, nX, nY, nWidth, nHeight)); - // - //while(bRegionRect) - //{ - // const Rectangle aRect(Point(nX, nY), Size(nWidth, nHeight)); - // aRegion.ImplAddRect(PixelToLogic(aRect)); - // bRegionRect = rDeviceRegion.ImplGetNextRect(aInfo, nX, nY, nWidth, nHeight); - //} - // - //aRegion.ImplEndAddRect(); } return aRegion; @@ -1559,11 +1507,11 @@ Point OutputDevice::PixelToLogic( const Point& rDevicePt, const MapMode& rMapMode ) const { - // Ist Default-MapMode, dann bereche nichts + // calculate nothing if default-MapMode if ( rMapMode.IsDefault() ) return rDevicePt; - // MapMode-Aufloesung berechnen und Umrechnen + // calculate MapMode-resolution and convert ImplMapRes aMapRes; ImplThresholdRes aThresRes; ImplCalcMapResolution( rMapMode, mnDPIX, mnDPIY, aMapRes, aThresRes ); @@ -1582,11 +1530,11 @@ Size OutputDevice::PixelToLogic( const Size& rDeviceSize, const MapMode& rMapMode ) const { - // Ist Default-MapMode, dann bereche nichts + // calculate nothing if default-MapMode if ( rMapMode.IsDefault() ) return rDeviceSize; - // MapMode-Aufloesung berechnen und Umrechnen + // calculate MapMode-resolution and convert ImplMapRes aMapRes; ImplThresholdRes aThresRes; ImplCalcMapResolution( rMapMode, mnDPIX, mnDPIY, aMapRes, aThresRes ); @@ -1605,11 +1553,11 @@ Rectangle OutputDevice::PixelToLogic( const Rectangle& rDeviceRect, const MapMode& rMapMode ) const { - // Ist Default-MapMode, dann bereche nichts + // calculate nothing if default-MapMode if ( rMapMode.IsDefault() || rDeviceRect.IsEmpty() ) return rDeviceRect; - // MapMode-Aufloesung berechnen und Umrechnen + // calculate MapMode-resolution and convert ImplMapRes aMapRes; ImplThresholdRes aThresRes; ImplCalcMapResolution( rMapMode, mnDPIX, mnDPIY, aMapRes, aThresRes ); @@ -1634,11 +1582,11 @@ Polygon OutputDevice::PixelToLogic( const Polygon& rDevicePoly, const MapMode& rMapMode ) const { - // Ist Default-MapMode, dann bereche nichts + // calculate nothing if default-MapMode if ( rMapMode.IsDefault() ) return rDevicePoly; - // MapMode-Aufloesung berechnen und Umrechnen + // calculate MapMode-resolution and convert ImplMapRes aMapRes; ImplThresholdRes aThresRes; ImplCalcMapResolution( rMapMode, mnDPIX, mnDPIY, aMapRes, aThresRes ); @@ -1647,7 +1595,7 @@ Polygon OutputDevice::PixelToLogic( const Polygon& rDevicePoly, sal_uInt16 nPoints = rDevicePoly.GetSize(); Polygon aPoly( rDevicePoly ); - // Pointer auf das Point-Array holen (Daten werden kopiert) + // get pointer to Point-array (copy data) const Point* pPointAry = aPoly.GetConstPointAry(); for ( i = 0; i < nPoints; i++ ) @@ -1738,23 +1686,6 @@ Region OutputDevice::PixelToLogic( const Region& rDeviceRegion, const MapMode& r { aRegion.Union(PixelToLogic(*aRectIter, rMapMode)); } - - //long nX(0); - //long nY(0); - //long nWidth(0); - //long nHeight(0); - //ImplRegionInfo aInfo; - //aRegion.ImplBeginAddRect(); - //bool bRegionRect(rDeviceRegion.ImplGetFirstRect(aInfo, nX, nY, nWidth, nHeight)); - // - //while(bRegionRect) - //{ - // const Rectangle aRect(Point(nX, nY), Size(nWidth, nHeight)); - // aRegion.ImplAddRect(PixelToLogic(aRect, rMapMode)); - // bRegionRect = rDeviceRegion.ImplGetNextRect(aInfo, nX, nY, nWidth, nHeight); - //} - // - //aRegion.ImplEndAddRect(); } return aRegion; @@ -1866,7 +1797,7 @@ static long fn5( const long n1, return 0; if ( LONG_MAX / std::abs(n2) < std::abs(n3) ) { - // a6 wird "ubersprungen + // a6 is skipped BigInt a7 = n2; a7 *= n3; a7 *= n1; @@ -2310,7 +2241,7 @@ long Window::ImplLogicUnitToPixelX( long nX, MapUnit eUnit ) { ImplFrameData* pFrameData = mpWindowImpl->mpFrameData; - // Map-Einheit verschieden, dann neu berechnen + // shift map unit, then re-calculate if ( pFrameData->meMapUnit != eUnit ) { pFrameData->meMapUnit = eUnit; @@ -2318,8 +2249,8 @@ long Window::ImplLogicUnitToPixelX( long nX, MapUnit eUnit ) pFrameData->maMapUnitRes ); } - // Es wird kein BigInt gebraucht, da diese Funktion nur zur Umrechnung - // von Fensterposition benutzt wird + // BigInt is not required, as this function is only used to + // convert the window position nX = nX * mnDPIX * pFrameData->maMapUnitRes.mnMapScNumX; nX += nX >= 0 ? (pFrameData->maMapUnitRes.mnMapScDenomX/2) : -((pFrameData->maMapUnitRes.mnMapScDenomX-1)/2); @@ -2337,7 +2268,7 @@ long Window::ImplLogicUnitToPixelY( long nY, MapUnit eUnit ) { ImplFrameData* pFrameData = mpWindowImpl->mpFrameData; - // Map-Einheit verschieden, dann neu berechnen + // shift map unit, then re-calculate if ( pFrameData->meMapUnit != eUnit ) { pFrameData->meMapUnit = eUnit; @@ -2345,8 +2276,8 @@ long Window::ImplLogicUnitToPixelY( long nY, MapUnit eUnit ) pFrameData->maMapUnitRes ); } - // Es wird kein BigInt gebraucht, da diese Funktion nur zur Umrechnung - // von Fensterposition benutzt wird + // BigInt is not required, as this function is only used to + // convert the window position nY = nY * mnDPIY * pFrameData->maMapUnitRes.mnMapScNumY; nY += nY >= 0 ? (pFrameData->maMapUnitRes.mnMapScDenomY/2) : -((pFrameData->maMapUnitRes.mnMapScDenomY-1)/2); diff --git a/vcl/source/gdi/regband.cxx b/vcl/source/gdi/regband.cxx index 4327f33..699ef39 100644 --- a/vcl/source/gdi/regband.cxx +++ b/vcl/source/gdi/regband.cxx @@ -29,17 +29,18 @@ // // ImplRegionBand // -// Jedes Band enthaelt die zwischen der enthaltenen Ober- und Untergrenze -// enthaltenen Rechtecke. Bei den Operationen Union, Intersect, XOr und -// Exclude werden immer Rechtecke der gleichen Hoehe ausgewerte; die -// Grenzen der Baender sind immer so zu waehlen, dasz dies moeglich ist. +// Each band contains all rectangles between upper and lower border. +// For Union, Intersect, Xor and Exclude operations rectangles of +// equal height are evaluated. The borders of the bands should always +// be choosen such that this is possible. // -// Die Rechtecke in den Baendern werden nach Moeglichkeit zusammengefaszt. +// If possible, rectangles within the bands are condensed. +// +// When converting polygons all points of the polygon are registered +// in the individual bands (for each band they are stored as +// points in a list). After registration of these points they are +// converted to rectangles and the points in the list are deleted. // -// Bei der Umwandlung von Polygonen werden alle Punkte des Polygons -// in die einzelnen Baender eingetragen (sie stehen fuer jedes Band als -// Punkte in einer Liste). Nach dem Eintragen der Punkte werden diese -// in Rechtecke umgewandelt und die Liste der Punkte geloescht. // // ----------------------------------------------------------------------- diff --git a/vcl/source/gdi/regionband.cxx b/vcl/source/gdi/regionband.cxx index 3e8ea17..13106ac 100644 --- a/vcl/source/gdi/regionband.cxx +++ b/vcl/source/gdi/regionband.cxx @@ -1118,7 +1118,7 @@ void RegionBand::Intersect(const RegionBand& rSource) bool RegionBand::Exclude(const RegionBand& rSource) { - // Alle Rechtecke aus der uebergebenen Region auf diese Region anwenden + // apply all rectangles to the region passed to this region ImplRegionBand* pBand = rSource.mpFirstBand; while ( pBand ) diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx index dae1e8c..a7b3633 100644 --- a/vcl/source/gdi/virdev.cxx +++ b/vcl/source/gdi/virdev.cxx @@ -105,14 +105,14 @@ void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev, mbInitTextColor = true; } - // Virtuelle Devices haben defaultmaessig einen weissen Hintergrund + // virtual devices have white background by default SetBackground( Wallpaper( Color( COL_WHITE ) ) ); // #i59283# don't erase user-provided surface if( !pData ) Erase(); - // VirDev in Liste eintragen + // register VirDev in the list mpNext = pSVData->maGDIData.mpFirstVirDev; mpPrev = NULL; if ( mpNext ) diff --git a/vcl/source/gdi/wall.cxx b/vcl/source/gdi/wall.cxx index 328ca8c..eac17ed 100644 --- a/vcl/source/gdi/wall.cxx +++ b/vcl/source/gdi/wall.cxx @@ -186,7 +186,7 @@ SvStream& WriteImplWallpaper( SvStream& rOStm, const ImplWallpaper& rImplWallpap inline void Wallpaper::ImplMakeUnique( sal_Bool bReleaseCache ) { - // Falls noch andere Referenzen bestehen, dann kopieren + // copy them if other references exist if ( mpImplWallpaper->mnRefCount != 1 ) { if ( mpImplWallpaper->mnRefCount ) @@ -215,9 +215,9 @@ Wallpaper::Wallpaper( const Wallpaper& rWallpaper ) { DBG_ASSERT( rWallpaper.mpImplWallpaper->mnRefCount < 0xFFFFFFFE, "Wallpaper: RefCount overflow" ); - // Instance Daten uebernehmen und Referenzcounter erhoehen + // use Instance data and increment reference counter mpImplWallpaper = rWallpaper.mpImplWallpaper; - // RefCount == 0 fuer statische Objekte + // RefCount == 0 for static objekts if ( mpImplWallpaper->mnRefCount ) mpImplWallpaper->mnRefCount++; } @@ -256,9 +256,8 @@ Wallpaper::Wallpaper( const Gradient& rGradient ) Wallpaper::~Wallpaper() { - - // Wenn es keine statischen ImpDaten sind, dann loeschen, wenn es - // die letzte Referenz ist, sonst Referenzcounter decrementieren + // if ImpData are not static then delete them if it is the last reference, + // otherwise decrement reference counter if ( mpImplWallpaper->mnRefCount ) { if ( mpImplWallpaper->mnRefCount == 1 ) @@ -495,12 +494,12 @@ Wallpaper& Wallpaper::operator=( const Wallpaper& rWallpaper ) { DBG_ASSERT( rWallpaper.mpImplWallpaper->mnRefCount < 0xFFFFFFFE, "Wallpaper: RefCount overflow" ); - // Zuerst Referenzcounter erhoehen, damit man sich selbst zuweisen kann + // first increment reference counter, in order to self assign if ( rWallpaper.mpImplWallpaper->mnRefCount ) rWallpaper.mpImplWallpaper->mnRefCount++; - // Wenn es keine statischen ImpDaten sind, dann loeschen, wenn es - // die letzte Referenz ist, sonst Referenzcounter decrementieren + // if ImpData are not static then delete them if it is the last reference, + // otherwise decrement reference counter if ( mpImplWallpaper->mnRefCount ) { if ( mpImplWallpaper->mnRefCount == 1 )
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits