Kaydet (Commit) d83c63be authored tarafından Philipp Weissenbacher's avatar Philipp Weissenbacher Kaydeden (comit) Thomas Arnhold

Translate German comments, fix some ws

Change-Id: Ic7cf80655e6520f09a0b63b7839e46ad50de8fb1
Reviewed-on: https://gerrit.libreoffice.org/3063Reviewed-by: 's avatarThomas Arnhold <thomas@arnhold.org>
Tested-by: 's avatarThomas Arnhold <thomas@arnhold.org>
üst 488e6875
......@@ -132,7 +132,7 @@ GDIMetaFile::GDIMetaFile( const GDIMetaFile& rMtf ) :
bRecord ( sal_False ),
bUseCanvas ( rMtf.bUseCanvas )
{
// RefCount der MetaActions erhoehen
// Increment RefCount of MetaActions
for( size_t i = 0, n = rMtf.GetActionSize(); i < n; ++i )
{
rMtf.GetAction( i )->Duplicate();
......@@ -195,7 +195,7 @@ GDIMetaFile& GDIMetaFile::operator=( const GDIMetaFile& rMtf )
{
Clear();
// RefCount der MetaActions erhoehen
// Increment RefCount of MetaActions
for( size_t i = 0, n = rMtf.GetActionSize(); i < n; ++i )
{
rMtf.GetAction( i )->Duplicate();
......@@ -690,7 +690,6 @@ void GDIMetaFile::push_back( MetaAction* pAction )
aList.push_back( pAction );
}
// @since #110496#
void GDIMetaFile::RemoveAction( size_t nPos )
{
if ( nPos < aList.size() )
......@@ -908,8 +907,7 @@ void GDIMetaFile::ImplAddGradientEx( GDIMetaFile& rMtf,
const PolyPolygon& rPolyPoly,
const Gradient& rGrad )
{
// #105055# Generate comment, GradientEx and Gradient actions
// (within DrawGradient)
// Generate comment, GradientEx and Gradient actions (within DrawGradient)
VirtualDevice aVDev( rMapDev, 0 );
aVDev.EnableOutput( sal_False );
GDIMetaFile aGradMtf;
......@@ -1162,7 +1160,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
}
break;
// #105055# Handle gradientex comment block correctly
// Handle gradientex comment block correctly
case( META_COMMENT_ACTION ):
{
MetaCommentAction* pCommentAct = (MetaCommentAction*) pAction;
......@@ -2888,8 +2886,6 @@ sal_Bool GDIMetaFile::CreateThumbnail( sal_uInt32 nMaximumExtent,
const BitmapEx* pOverlay,
const Rectangle* pOverlayRect ) const
{
// the implementation is provided by KA
// initialization seems to be complicated but is used to avoid rounding errors
VirtualDevice aVDev;
const Point aNullPt;
......@@ -3011,7 +3007,7 @@ MetaCommentAction* makePluggableRendererAction( const rtl::OUString& rRendererSe
{
const sal_uInt8* pData=(sal_uInt8*)_pData;
// data gets copied twice, unfortunately
// FIXME: Data gets copied twice, unfortunately
rtl::OString aRendererServiceName(
rRendererServiceName.getStr(),
rRendererServiceName.getLength(),
......
......@@ -29,10 +29,6 @@
#include <vcl/cvtgrf.hxx>
#include <com/sun/star/ucb/CommandAbortedException.hpp>
// -----------
// - GfxLink -
// -----------
GfxLink::GfxLink() :
meType ( GFX_LINK_TYPE_NONE ),
mpBuf ( NULL ),
......@@ -43,16 +39,12 @@ GfxLink::GfxLink() :
{
}
// ------------------------------------------------------------------------
GfxLink::GfxLink( const GfxLink& rGfxLink ) :
mpImpData( new ImpGfxLink )
{
ImplCopy( rGfxLink );
}
// ------------------------------------------------------------------------
GfxLink::GfxLink( sal_uInt8* pBuf, sal_uInt32 nSize, GfxLinkType nType, sal_Bool bOwns ) :
mpImpData( new ImpGfxLink )
{
......@@ -75,8 +67,6 @@ GfxLink::GfxLink( sal_uInt8* pBuf, sal_uInt32 nSize, GfxLinkType nType, sal_Bool
mpBuf = NULL;
}
// ------------------------------------------------------------------------
GfxLink::~GfxLink()
{
if( mpBuf && !( --mpBuf->mnRefCount ) )
......@@ -88,8 +78,6 @@ GfxLink::~GfxLink()
delete mpImpData;
}
// ------------------------------------------------------------------------
GfxLink& GfxLink::operator=( const GfxLink& rGfxLink )
{
if( &rGfxLink != this )
......@@ -106,8 +94,6 @@ GfxLink& GfxLink::operator=( const GfxLink& rGfxLink )
return *this;
}
// ------------------------------------------------------------------------
sal_Bool GfxLink::IsEqual( const GfxLink& rGfxLink ) const
{
sal_Bool bIsEqual = sal_False;
......@@ -128,8 +114,6 @@ sal_Bool GfxLink::IsEqual( const GfxLink& rGfxLink ) const
return bIsEqual;
}
// ------------------------------------------------------------------------
void GfxLink::ImplCopy( const GfxLink& rGfxLink )
{
mnBufSize = rGfxLink.mnBufSize;
......@@ -146,29 +130,21 @@ void GfxLink::ImplCopy( const GfxLink& rGfxLink )
mpSwap->mnRefCount++;
}
// ------------------------------------------------------------------------
GfxLinkType GfxLink::GetType() const
{
return meType;
}
// ------------------------------------------------------------------------
sal_Bool GfxLink::IsNative() const
{
return( meType >= GFX_LINK_FIRST_NATIVE_ID && meType <= GFX_LINK_LAST_NATIVE_ID );
}
// ------------------------------------------------------------------------
sal_uInt32 GfxLink::GetDataSize() const
{
return mnBufSize;
}
// ------------------------------------------------------------------------
const sal_uInt8* GfxLink::GetData() const
{
if( IsSwappedOut() )
......@@ -177,52 +153,38 @@ const sal_uInt8* GfxLink::GetData() const
return( mpBuf ? mpBuf->mpBuffer : NULL );
}
// ------------------------------------------------------------------------
const Size& GfxLink::GetPrefSize() const
{
return mpImpData->maPrefSize;
}
// ------------------------------------------------------------------------
void GfxLink::SetPrefSize( const Size& rPrefSize )
{
mpImpData->maPrefSize = rPrefSize;
mpImpData->mbPrefSizeValid = true;
}
// ------------------------------------------------------------------------
bool GfxLink::IsPrefSizeValid()
{
return mpImpData->mbPrefSizeValid;
}
// ------------------------------------------------------------------------
const MapMode& GfxLink::GetPrefMapMode() const
{
return mpImpData->maPrefMapMode;
}
// ------------------------------------------------------------------------
void GfxLink::SetPrefMapMode( const MapMode& rPrefMapMode )
{
mpImpData->maPrefMapMode = rPrefMapMode;
mpImpData->mbPrefMapModeValid = true;
}
// ------------------------------------------------------------------------
bool GfxLink::IsPrefMapModeValid()
{
return mpImpData->mbPrefMapModeValid;
}
// ------------------------------------------------------------------------
sal_Bool GfxLink::LoadNative( Graphic& rGraphic )
{
sal_Bool bRet = sal_False;
......@@ -260,8 +222,6 @@ sal_Bool GfxLink::LoadNative( Graphic& rGraphic )
return bRet;
}
// ------------------------------------------------------------------------
void GfxLink::SwapOut()
{
if( !IsSwappedOut() && mpBuf )
......@@ -283,8 +243,6 @@ void GfxLink::SwapOut()
}
}
// ------------------------------------------------------------------------
void GfxLink::SwapIn()
{
if( IsSwappedOut() )
......@@ -298,8 +256,6 @@ void GfxLink::SwapIn()
}
}
// ------------------------------------------------------------------------
sal_Bool GfxLink::ExportNative( SvStream& rOStream ) const
{
if( GetDataSize() )
......@@ -313,8 +269,6 @@ sal_Bool GfxLink::ExportNative( SvStream& rOStream ) const
return ( rOStream.GetError() == ERRCODE_NONE );
}
// ------------------------------------------------------------------------
SvStream& operator<<( SvStream& rOStream, const GfxLink& rGfxLink )
{
VersionCompat* pCompat = new VersionCompat( rOStream, STREAM_WRITE, 2 );
......@@ -338,8 +292,6 @@ SvStream& operator<<( SvStream& rOStream, const GfxLink& rGfxLink )
return rOStream;
}
// ------------------------------------------------------------------------
SvStream& operator>>( SvStream& rIStream, GfxLink& rGfxLink)
{
Size aSize;
......@@ -377,10 +329,6 @@ SvStream& operator>>( SvStream& rIStream, GfxLink& rGfxLink)
return rIStream;
}
// -----------
// - ImpSwap -
// -----------
ImpSwap::ImpSwap( sal_uInt8* pData, sal_uLong nDataSize ) :
mnDataSize( nDataSize ),
mnRefCount( 1UL )
......@@ -409,16 +357,12 @@ ImpSwap::ImpSwap( sal_uInt8* pData, sal_uLong nDataSize ) :
}
}
// ------------------------------------------------------------------------
ImpSwap::~ImpSwap()
{
if( IsSwapped() )
osl_removeFile( maURL.pData );
}
// ------------------------------------------------------------------------
sal_uInt8* ImpSwap::GetData() const
{
sal_uInt8* pData;
......@@ -445,8 +389,6 @@ sal_uInt8* ImpSwap::GetData() const
return pData;
}
// ------------------------------------------------------------------------
void ImpSwap::WriteTo( SvStream& rOStm ) const
{
sal_uInt8* pData = GetData();
......
......@@ -23,12 +23,8 @@
#include <tools/gen.hxx>
#include <vcl/gradient.hxx>
// =======================================================================
DBG_NAME( Gradient )
// -----------------------------------------------------------------------
Impl_Gradient::Impl_Gradient() :
maStartColor( COL_BLACK ),
maEndColor( COL_WHITE )
......@@ -44,8 +40,6 @@ Impl_Gradient::Impl_Gradient() :
mnStepCount = 0;
}
// -----------------------------------------------------------------------
Impl_Gradient::Impl_Gradient( const Impl_Gradient& rImplGradient ) :
maStartColor( rImplGradient.maStartColor ),
maEndColor( rImplGradient.maEndColor )
......@@ -61,11 +55,9 @@ Impl_Gradient::Impl_Gradient( const Impl_Gradient& rImplGradient ) :
mnStepCount = rImplGradient.mnStepCount;
}
// -----------------------------------------------------------------------
void Gradient::MakeUnique()
{
// Falls noch andere Referenzen bestehen, dann kopieren
// If there are still other references, copy
if ( mpImplGradient->mnRefCount != 1 )
{
if( mpImplGradient->mnRefCount )
......@@ -75,8 +67,6 @@ void Gradient::MakeUnique()
}
}
// -----------------------------------------------------------------------
Gradient::Gradient()
{
DBG_CTOR( Gradient, NULL );
......@@ -84,20 +74,16 @@ Gradient::Gradient()
mpImplGradient = new Impl_Gradient;
}
// -----------------------------------------------------------------------
Gradient::Gradient( const Gradient& rGradient )
{
DBG_CTOR( Gradient, NULL );
DBG_CHKOBJ( &rGradient, Gradient, NULL );
// Instance Daten uebernehmen und Referenzcounter erhoehen
// Take over instance data and increment refcount
mpImplGradient = rGradient.mpImplGradient;
mpImplGradient->mnRefCount++;
}
// -----------------------------------------------------------------------
Gradient::Gradient( GradientStyle eStyle,
const Color& rStartColor, const Color& rEndColor )
{
......@@ -109,22 +95,18 @@ Gradient::Gradient( GradientStyle eStyle,
mpImplGradient->maEndColor = rEndColor;
}
// -----------------------------------------------------------------------
Gradient::~Gradient()
{
DBG_DTOR( Gradient, NULL );
// Wenn es die letzte Referenz ist, loeschen,
// sonst Referenzcounter decrementieren
// If it's the last reference, delete it, otherwise
// decrement refcount
if ( mpImplGradient->mnRefCount == 1 )
delete mpImplGradient;
else
mpImplGradient->mnRefCount--;
}
// -----------------------------------------------------------------------
void Gradient::SetStyle( GradientStyle eStyle )
{
DBG_CHKTHIS( Gradient, NULL );
......@@ -133,8 +115,6 @@ void Gradient::SetStyle( GradientStyle eStyle )
mpImplGradient->meStyle = eStyle;
}
// -----------------------------------------------------------------------
void Gradient::SetStartColor( const Color& rColor )
{
DBG_CHKTHIS( Gradient, NULL );
......@@ -143,8 +123,6 @@ void Gradient::SetStartColor( const Color& rColor )
mpImplGradient->maStartColor = rColor;
}
// -----------------------------------------------------------------------
void Gradient::SetEndColor( const Color& rColor )
{
DBG_CHKTHIS( Gradient, NULL );
......@@ -153,8 +131,6 @@ void Gradient::SetEndColor( const Color& rColor )
mpImplGradient->maEndColor = rColor;
}
// -----------------------------------------------------------------------
void Gradient::SetAngle( sal_uInt16 nAngle )
{
DBG_CHKTHIS( Gradient, NULL );
......@@ -163,8 +139,6 @@ void Gradient::SetAngle( sal_uInt16 nAngle )
mpImplGradient->mnAngle = nAngle;
}
// -----------------------------------------------------------------------
void Gradient::SetBorder( sal_uInt16 nBorder )
{
DBG_CHKTHIS( Gradient, NULL );
......@@ -173,8 +147,6 @@ void Gradient::SetBorder( sal_uInt16 nBorder )
mpImplGradient->mnBorder = nBorder;
}
// -----------------------------------------------------------------------
void Gradient::SetOfsX( sal_uInt16 nOfsX )
{
DBG_CHKTHIS( Gradient, NULL );
......@@ -183,8 +155,6 @@ void Gradient::SetOfsX( sal_uInt16 nOfsX )
mpImplGradient->mnOfsX = nOfsX;
}
// -----------------------------------------------------------------------
void Gradient::SetOfsY( sal_uInt16 nOfsY )
{
DBG_CHKTHIS( Gradient, NULL );
......@@ -193,8 +163,6 @@ void Gradient::SetOfsY( sal_uInt16 nOfsY )
mpImplGradient->mnOfsY = nOfsY;
}
// -----------------------------------------------------------------------
void Gradient::SetStartIntensity( sal_uInt16 nIntens )
{
DBG_CHKTHIS( Gradient, NULL );
......@@ -203,8 +171,6 @@ void Gradient::SetStartIntensity( sal_uInt16 nIntens )
mpImplGradient->mnIntensityStart = nIntens;
}
// -----------------------------------------------------------------------
void Gradient::SetEndIntensity( sal_uInt16 nIntens )
{
DBG_CHKTHIS( Gradient, NULL );
......@@ -213,8 +179,6 @@ void Gradient::SetEndIntensity( sal_uInt16 nIntens )
mpImplGradient->mnIntensityEnd = nIntens;
}
// -----------------------------------------------------------------------
void Gradient::SetSteps( sal_uInt16 nSteps )
{
DBG_CHKTHIS( Gradient, NULL );
......@@ -223,8 +187,6 @@ void Gradient::SetSteps( sal_uInt16 nSteps )
mpImplGradient->mnStepCount = nSteps;
}
// -----------------------------------------------------------------------
void Gradient::GetBoundRect( const Rectangle& rRect, Rectangle& rBoundRect, Point& rCenter ) const
{
Rectangle aRect( rRect );
......@@ -277,29 +239,29 @@ void Gradient::GetBoundRect( const Rectangle& rRect, Rectangle& rBoundRect, Poin
if( GetStyle() == GradientStyle_RADIAL )
{
// Radien-Berechnung fuer Kreis
// Calculation of radii for circle
aSize.Width() = (long)(0.5 + sqrt((double)aSize.Width()*(double)aSize.Width() + (double)aSize.Height()*(double)aSize.Height()));
aSize.Height() = aSize.Width();
}
else if( GetStyle() == GradientStyle_ELLIPTICAL )
{
// Radien-Berechnung fuer Ellipse
// Calculation of radii for ellipse
aSize.Width() = (long)( 0.5 + (double) aSize.Width() * 1.4142 );
aSize.Height() = (long)( 0.5 + (double) aSize.Height() * 1.4142 );
}
// neue Mittelpunkte berechnen
// Calculate new centers
long nZWidth = aRect.GetWidth() * (long) GetOfsX() / 100;
long nZHeight = aRect.GetHeight() * (long) GetOfsY() / 100;
long nBorderX = (long) GetBorder() * aSize.Width() / 100;
long nBorderY = (long) GetBorder() * aSize.Height() / 100;
rCenter = Point( aRect.Left() + nZWidth, aRect.Top() + nZHeight );
// Rand beruecksichtigen
// Respect borders
aSize.Width() -= nBorderX;
aSize.Height() -= nBorderY;
// Ausgaberechteck neu setzen
// Recalculate output rectangle
aRect.Left() = rCenter.X() - ( aSize.Width() >> 1 );
aRect.Top() = rCenter.Y() - ( aSize.Height() >> 1 );
......@@ -308,18 +270,15 @@ void Gradient::GetBoundRect( const Rectangle& rRect, Rectangle& rBoundRect, Poin
}
}
// -----------------------------------------------------------------------
Gradient& Gradient::operator=( const Gradient& rGradient )
{
DBG_CHKTHIS( Gradient, NULL );
DBG_CHKOBJ( &rGradient, Gradient, NULL );
// Zuerst Referenzcounter erhoehen, damit man sich selbst zuweisen kann
// Increment refcount first so that we can reference ourselves
rGradient.mpImplGradient->mnRefCount++;
// Wenn es die letzte Referenz ist, loeschen,
// sonst Referenzcounter decrementieren
// If it's the last reference, delete it, otherwise decrement
if ( mpImplGradient->mnRefCount == 1 )
delete mpImplGradient;
else
......@@ -329,8 +288,6 @@ Gradient& Gradient::operator=( const Gradient& rGradient )
return *this;
}
// -----------------------------------------------------------------------
sal_Bool Gradient::operator==( const Gradient& rGradient ) const
{
DBG_CHKTHIS( Gradient, NULL );
......@@ -374,8 +331,6 @@ SvStream& operator>>( SvStream& rIStm, Impl_Gradient& rImpl_Gradient )
return rIStm;
}
// -----------------------------------------------------------------------
SvStream& operator<<( SvStream& rOStm, const Impl_Gradient& rImpl_Gradient )
{
VersionCompat aCompat( rOStm, STREAM_WRITE, 1 );
......@@ -394,16 +349,12 @@ SvStream& operator<<( SvStream& rOStm, const Impl_Gradient& rImpl_Gradient )
return rOStm;
}
// -----------------------------------------------------------------------
SvStream& operator>>( SvStream& rIStm, Gradient& rGradient )
{
rGradient.MakeUnique();
return( rIStm >> *rGradient.mpImplGradient );
}
// -----------------------------------------------------------------------
SvStream& operator<<( SvStream& rOStm, const Gradient& rGradient )
{
return( rOStm << *rGradient.mpImplGradient );
......
This diff is collapsed.
......@@ -21,16 +21,12 @@
#include <vcl/graphictools.hxx>
////////////////////////////////////////////////////////////////////////////
SvtGraphicFill::Transform::Transform()
{
matrix[0] = 1.0; matrix[1] = 0.0; matrix[2] = 0.0;
matrix[3] = 0.0; matrix[4] = 1.0; matrix[5] = 0.0;
}
////////////////////////////////////////////////////////////////////////////
SvtGraphicStroke::SvtGraphicStroke() :
maPath(),
maStartArrow(),
......@@ -177,9 +173,6 @@ SvStream& operator>>( SvStream& rIStm, SvtGraphicStroke& rClass )
return rIStm;
}
/////////////////////////////////////////////////////////////////////////////
SvtGraphicFill::SvtGraphicFill() :
maPath(),
maFillColor( COL_BLACK ),
......
......@@ -24,10 +24,6 @@
DBG_NAME( Hatch )
// --------------
// - ImplHatch -
// --------------
ImplHatch::ImplHatch() :
mnRefCount ( 1 ),
maColor ( COL_BLACK ),
......@@ -37,8 +33,6 @@ ImplHatch::ImplHatch() :
{
}
// -----------------------------------------------------------------------
ImplHatch::ImplHatch( const ImplHatch& rImplHatch ) :
mnRefCount ( 1 ),
maColor ( rImplHatch.maColor ),
......@@ -48,18 +42,12 @@ ImplHatch::ImplHatch( const ImplHatch& rImplHatch ) :
{
}
// ---------
// - Hatch -
// ---------
Hatch::Hatch()
{
DBG_CTOR( Hatch, NULL );
mpImplHatch = new ImplHatch;
}
// -----------------------------------------------------------------------
Hatch::Hatch( const Hatch& rHatch )
{
DBG_CTOR( Hatch, NULL );
......@@ -68,8 +56,6 @@ Hatch::Hatch( const Hatch& rHatch )
mpImplHatch->mnRefCount++;
}
// -----------------------------------------------------------------------
Hatch::Hatch( HatchStyle eStyle, const Color& rColor,
long nDistance, sal_uInt16 nAngle10 )
{
......@@ -81,8 +67,6 @@ Hatch::Hatch( HatchStyle eStyle, const Color& rColor,
mpImplHatch->mnAngle = nAngle10;
}
// -----------------------------------------------------------------------
Hatch::~Hatch()
{
DBG_DTOR( Hatch, NULL );
......@@ -90,8 +74,6 @@ Hatch::~Hatch()
delete mpImplHatch;
}
// -----------------------------------------------------------------------
Hatch& Hatch::operator=( const Hatch& rHatch )
{
DBG_CHKTHIS( Hatch, NULL );
......@@ -106,8 +88,6 @@ Hatch& Hatch::operator=( const Hatch& rHatch )
return *this;
}
// -----------------------------------------------------------------------
sal_Bool Hatch::operator==( const Hatch& rHatch ) const
{
DBG_CHKTHIS( Hatch, NULL );
......@@ -120,8 +100,6 @@ sal_Bool Hatch::operator==( const Hatch& rHatch ) const
mpImplHatch->mnAngle == rHatch.mpImplHatch->mnAngle ) );
}
// -----------------------------------------------------------------------
void Hatch::ImplMakeUnique()
{
if( mpImplHatch->mnRefCount != 1 )
......@@ -133,8 +111,6 @@ void Hatch::ImplMakeUnique()
}
}
// -----------------------------------------------------------------------
void Hatch::SetColor( const Color& rColor )
{
DBG_CHKTHIS( Hatch, NULL );
......@@ -142,8 +118,6 @@ void Hatch::SetColor( const Color& rColor )
mpImplHatch->maColor = rColor;
}
// -----------------------------------------------------------------------
void Hatch::SetDistance( long nDistance )
{
DBG_CHKTHIS( Hatch, NULL );
......@@ -151,8 +125,6 @@ void Hatch::SetDistance( long nDistance )
mpImplHatch->mnDistance = nDistance;
}
// -----------------------------------------------------------------------
void Hatch::SetAngle( sal_uInt16 nAngle10 )
{
DBG_CHKTHIS( Hatch, NULL );
......@@ -160,8 +132,6 @@ void Hatch::SetAngle( sal_uInt16 nAngle10 )
mpImplHatch->mnAngle = nAngle10;
}
// -----------------------------------------------------------------------
SvStream& operator>>( SvStream& rIStm, ImplHatch& rImplHatch )
{
VersionCompat aCompat( rIStm, STREAM_READ );
......@@ -176,8 +146,6 @@ SvStream& operator>>( SvStream& rIStm, ImplHatch& rImplHatch )
return rIStm;
}
// -----------------------------------------------------------------------
SvStream& operator<<( SvStream& rOStm, const ImplHatch& rImplHatch )
{
VersionCompat aCompat( rOStm, STREAM_WRITE, 1 );
......@@ -189,16 +157,12 @@ SvStream& operator<<( SvStream& rOStm, const ImplHatch& rImplHatch )
return rOStm;
}
// -----------------------------------------------------------------------
SvStream& operator>>( SvStream& rIStm, Hatch& rHatch )
{
rHatch.ImplMakeUnique();
return( rIStm >> *rHatch.mpImplHatch );
}
// -----------------------------------------------------------------------
SvStream& operator<<( SvStream& rOStm, const Hatch& rHatch )
{
return( rOStm << *rHatch.mpImplHatch );
......
This diff is collapsed.
......@@ -23,10 +23,6 @@
#include <vcl/window.hxx>
#include <tools/helpers.hxx>
// ----------------
// - ImplAnimView -
// ----------------
ImplAnimView::ImplAnimView( Animation* pParent, OutputDevice* pOut,
const Point& rPt, const Size& rSz,
sal_uLong nExtraData,
......@@ -48,7 +44,7 @@ ImplAnimView::ImplAnimView( Animation* pParent, OutputDevice* pOut,
{
mpParent->ImplIncAnimCount();
// mirrored horizontically?
// Mirrored horizontally?
if( mbHMirr )
{
maDispPt.X() = maPt.X() + maSz.Width() + 1L;
......@@ -61,7 +57,7 @@ ImplAnimView::ImplAnimView( Animation* pParent, OutputDevice* pOut,
maDispSz.Width() = maSz.Width();
}
// mirrored vertically?
// Mirrored vertically?
if( mbVMirr )
{
maDispPt.Y() = maPt.Y() + maSz.Height() + 1L;
......@@ -88,16 +84,14 @@ ImplAnimView::ImplAnimView( Animation* pParent, OutputDevice* pOut,
else
mpBackground->DrawOutDev( Point(), maSzPix, maDispPt, maDispSz, *mpOut );
// initial drawing to actual position
// Initialize drawing to actual position
ImplDrawToPos( mpParent->ImplGetCurPos() );
// if first frame OutputDevice is set, update variables now for real OutputDevice
// If first frame OutputDevice is set, update variables now for real OutputDevice
if( pFirstFrameOutDev )
maClip = ( mpOut = pOut )->GetClipRegion();
}
// ------------------------------------------------------------------------
ImplAnimView::~ImplAnimView()
{
delete mpBackground;
......@@ -106,8 +100,6 @@ ImplAnimView::~ImplAnimView()
mpParent->ImplDecAnimCount();
}
// ------------------------------------------------------------------------
sal_Bool ImplAnimView::ImplMatches( OutputDevice* pOut, long nExtraData ) const
{
sal_Bool bRet = sal_False;
......@@ -123,8 +115,6 @@ sal_Bool ImplAnimView::ImplMatches( OutputDevice* pOut, long nExtraData ) const
return bRet;
}
// ------------------------------------------------------------------------
void ImplAnimView::ImplGetPosSize( const AnimationBitmap& rAnm, Point& rPosPix, Size& rSizePix )
{
const Size& rAnmSize = mpParent->GetDisplaySizePixel();
......@@ -153,17 +143,15 @@ void ImplAnimView::ImplGetPosSize( const AnimationBitmap& rAnm, Point& rPosPix,
rSizePix.Width() = aPt2.X() - rPosPix.X() + 1L;
rSizePix.Height() = aPt2.Y() - rPosPix.Y() + 1L;
// mirrored horizontically?
// Mirrored horizontally?
if( mbHMirr )
rPosPix.X() = maSzPix.Width() - 1L - aPt2.X();
// mirrored vertically?
// Mirrored vertically?
if( mbVMirr )
rPosPix.Y() = maSzPix.Height() - 1L - aPt2.Y();
}
// ------------------------------------------------------------------------
void ImplAnimView::ImplDrawToPos( sal_uLong nPos )
{
VirtualDevice aVDev;
......@@ -187,15 +175,11 @@ void ImplAnimView::ImplDrawToPos( sal_uLong nPos )
}
}
// ------------------------------------------------------------------------
void ImplAnimView::ImplDraw( sal_uLong nPos )
{
ImplDraw( nPos, NULL );
}
// ------------------------------------------------------------------------
void ImplAnimView::ImplDraw( sal_uLong nPos, VirtualDevice* pVDev )
{
Rectangle aOutRect( mpOut->PixelToLogic( Point() ), mpOut->GetOutputSize() );
......@@ -215,7 +199,7 @@ void ImplAnimView::ImplDraw( sal_uLong nPos, VirtualDevice* pVDev )
ImplGetPosSize( rAnm, aPosPix, aSizePix );
// mirrored horizontically?
// Mirrored horizontally?
if( mbHMirr )
{
aBmpPosPix.X() = aPosPix.X() + aSizePix.Width() - 1L;
......@@ -227,7 +211,7 @@ void ImplAnimView::ImplDraw( sal_uLong nPos, VirtualDevice* pVDev )
aBmpSizePix.Width() = aSizePix.Width();
}
// mirrored vertically?
// Mirrored vertically?
if( mbVMirr )
{
aBmpPosPix.Y() = aPosPix.Y() + aSizePix.Height() - 1L;
......@@ -270,9 +254,9 @@ void ImplAnimView::ImplDraw( sal_uLong nPos, VirtualDevice* pVDev )
maRestPt = aPosPix;
maRestSz = aSizePix;
// Was muessen wir beim naechsten Mal restaurieren ?
// ==> ggf. in eine Bitmap stecken, ansonsten SaveBitmap
// aus Speichergruenden loeschen
// What do we need to restore the next time?
// Put it into a bitmap if needed, else delete
// SaveBitmap to conserve memory
if( ( meLastDisposal == DISPOSE_BACK ) || ( meLastDisposal == DISPOSE_NOT ) )
mpRestore->SetOutputSizePixel( Size( 1, 1 ), sal_False );
else
......@@ -306,8 +290,6 @@ void ImplAnimView::ImplDraw( sal_uLong nPos, VirtualDevice* pVDev )
}
}
// ------------------------------------------------------------------------
void ImplAnimView::ImplRepaint()
{
const sal_Bool bOldPause = mbPause;
......@@ -328,8 +310,6 @@ void ImplAnimView::ImplRepaint()
mbPause = bOldPause;
}
// ------------------------------------------------------------------------
AInfo* ImplAnimView::ImplCreateAInfo() const
{
AInfo* pAInfo = new AInfo;
......
......@@ -22,10 +22,6 @@
#include <vcl/animate.hxx>
// ----------------
// - ImplAnimView -
// ----------------
class Animation;
class OutputDevice;
class VirtualDevice;
......
......@@ -25,8 +25,6 @@
#include <jobset.h>
// =======================================================================
DBG_NAME( JobSetup )
#define JOBSET_FILEFORMAT2 3780
......@@ -53,8 +51,6 @@ struct Impl364JobSetupData
SVBT32 nPaperHeight;
};
// =======================================================================
ImplJobSetup::ImplJobSetup()
{
mnRefCount = 1;
......@@ -69,8 +65,6 @@ ImplJobSetup::ImplJobSetup()
mpDriverData = NULL;
}
// -----------------------------------------------------------------------
ImplJobSetup::ImplJobSetup( const ImplJobSetup& rJobSetup ) :
maPrinterName( rJobSetup.maPrinterName ),
maDriver( rJobSetup.maDriver )
......@@ -94,15 +88,11 @@ ImplJobSetup::ImplJobSetup( const ImplJobSetup& rJobSetup ) :
maValueMap = rJobSetup.maValueMap;
}
// -----------------------------------------------------------------------
ImplJobSetup::~ImplJobSetup()
{
rtl_freeMemory( mpDriverData );
}
// =======================================================================
ImplJobSetup* JobSetup::ImplGetData()
{
if ( !mpData )
......@@ -116,8 +106,6 @@ ImplJobSetup* JobSetup::ImplGetData()
return mpData;
}
// -----------------------------------------------------------------------
ImplJobSetup* JobSetup::ImplGetConstData()
{
if ( !mpData )
......@@ -125,8 +113,6 @@ ImplJobSetup* JobSetup::ImplGetConstData()
return mpData;
}
// -----------------------------------------------------------------------
const ImplJobSetup* JobSetup::ImplGetConstData() const
{
if ( !mpData )
......@@ -134,8 +120,6 @@ const ImplJobSetup* JobSetup::ImplGetConstData() const
return mpData;
}
// =======================================================================
JobSetup::JobSetup()
{
DBG_CTOR( JobSetup, NULL );
......@@ -143,8 +127,6 @@ JobSetup::JobSetup()
mpData = NULL;
}
// -----------------------------------------------------------------------
JobSetup::JobSetup( const JobSetup& rJobSetup )
{
DBG_CTOR( JobSetup, NULL );
......@@ -156,8 +138,6 @@ JobSetup::JobSetup( const JobSetup& rJobSetup )
mpData->mnRefCount++;
}
// -----------------------------------------------------------------------
JobSetup::~JobSetup()
{
DBG_DTOR( JobSetup, NULL );
......@@ -171,8 +151,6 @@ JobSetup::~JobSetup()
}
}
// -----------------------------------------------------------------------
rtl::OUString JobSetup::GetPrinterName() const
{
if ( mpData )
......@@ -181,8 +159,6 @@ rtl::OUString JobSetup::GetPrinterName() const
return rtl::OUString();
}
// -----------------------------------------------------------------------
rtl::OUString JobSetup::GetDriverName() const
{
if ( mpData )
......@@ -191,8 +167,6 @@ rtl::OUString JobSetup::GetDriverName() const
return rtl::OUString();
}
// -----------------------------------------------------------------------
void JobSetup::SetValue( const rtl::OUString& rKey, const rtl::OUString& rValue )
{
if( ! mpData )
......@@ -201,20 +175,18 @@ void JobSetup::SetValue( const rtl::OUString& rKey, const rtl::OUString& rValue
mpData->maValueMap[ rKey ] = rValue;
}
// -----------------------------------------------------------------------
JobSetup& JobSetup::operator=( const JobSetup& rJobSetup )
{
DBG_CHKTHIS( JobSetup, NULL );
DBG_CHKOBJ( &rJobSetup, JobSetup, NULL );
DBG_ASSERT( !rJobSetup.mpData || (rJobSetup.mpData->mnRefCount) < 0xFFFE, "JobSetup: RefCount overflow" );
// Zuerst Referenzcounter erhoehen, damit man sich selbst zuweisen kann
// Increment refcount first, so that we can assign to ourselves
if ( rJobSetup.mpData )
rJobSetup.mpData->mnRefCount++;
// Wenn es keine statischen ImpDaten sind, dann loeschen, wenn es
// die letzte Referenz ist, sonst Referenzcounter decrementieren
// If it's not static ImpData and the last reference, delete it, else
// decrement refcount
if ( mpData )
{
if ( mpData->mnRefCount == 1 )
......@@ -228,8 +200,6 @@ JobSetup& JobSetup::operator=( const JobSetup& rJobSetup )
return *this;
}
// -----------------------------------------------------------------------
sal_Bool JobSetup::operator==( const JobSetup& rJobSetup ) const
{
DBG_CHKTHIS( JobSetup, NULL );
......@@ -261,8 +231,6 @@ sal_Bool JobSetup::operator==( const JobSetup& rJobSetup ) const
return sal_False;
}
// -----------------------------------------------------------------------
SvStream& operator>>( SvStream& rIStream, JobSetup& rJobSetup )
{
DBG_ASSERTWARNING( rIStream.GetVersion(), "JobSetup::>> - Solar-Version not set on rOStream" );
......@@ -300,7 +268,7 @@ SvStream& operator>>( SvStream& rIStream, JobSetup& rJobSetup )
pJobData->maPrinterName = OStringToOUString(pData->cPrinterName, aStreamEncoding);
pJobData->maDriver = OStringToOUString(pData->cDriverName, aStreamEncoding);
// Sind es unsere neuen JobSetup-Daten?
// Are these our new JobSetup files?
if ( nSystem == JOBSET_FILE364_SYSTEM ||
nSystem == JOBSET_FILE605_SYSTEM )
{
......@@ -353,14 +321,12 @@ SvStream& operator>>( SvStream& rIStream, JobSetup& rJobSetup )
return rIStream;
}
// -----------------------------------------------------------------------
SvStream& operator<<( SvStream& rOStream, const JobSetup& rJobSetup )
{
DBG_ASSERTWARNING( rOStream.GetVersion(), "JobSetup::<< - Solar-Version not set on rOStream" );
// Zur Zeit haben wir noch kein neues FileFormat
// if ( rOStream.GetVersion() < JOBSET_FILEFORMAT2 )
// We do not have a new FileFormat at this point in time
// if ( rOStream.GetVersion() < JOBSET_FILEFORMAT2 )
{
sal_uInt16 nLen = 0;
if ( !rJobSetup.mpData )
......@@ -371,7 +337,7 @@ SvStream& operator<<( SvStream& rOStream, const JobSetup& rJobSetup )
const ImplJobSetup* pJobData = rJobSetup.ImplGetConstData();
Impl364JobSetupData aOldJobData;
sal_uInt16 nOldJobDataSize = sizeof( aOldJobData );
sal_uInt16 nOldJobDataSize = sizeof( aOldJobData );
ShortToSVBT16( nOldJobDataSize, aOldJobData.nSize );
ShortToSVBT16( pJobData->mnSystem, aOldJobData.nSystem );
UInt32ToSVBT32( pJobData->mnDriverDataLen, aOldJobData.nDriverDataLen );
......@@ -422,11 +388,6 @@ SvStream& operator<<( SvStream& rOStream, const JobSetup& rJobSetup )
rOStream.Seek( nPos + nLen );
}
}
/*
else
{
}
*/
return rOStream;
}
......
......@@ -22,12 +22,8 @@
#include <tools/debug.hxx>
#include <vcl/mapmod.hxx>
// =======================================================================
DBG_NAME( MapMode )
// -----------------------------------------------------------------------
ImplMapMode::ImplMapMode() :
maOrigin( 0, 0 ),
maScaleX( 1, 1 ),
......@@ -38,8 +34,6 @@ ImplMapMode::ImplMapMode() :
mbSimple = sal_False;
}
// -----------------------------------------------------------------------
ImplMapMode::ImplMapMode( const ImplMapMode& rImplMapMode ) :
maOrigin( rImplMapMode.maOrigin ),
maScaleX( rImplMapMode.maScaleX ),
......@@ -50,8 +44,6 @@ ImplMapMode::ImplMapMode( const ImplMapMode& rImplMapMode ) :
mbSimple = sal_False;
}
// -----------------------------------------------------------------------
SvStream& operator>>( SvStream& rIStm, ImplMapMode& rImplMapMode )
{
VersionCompat aCompat( rIStm, STREAM_READ );
......@@ -64,8 +56,6 @@ SvStream& operator>>( SvStream& rIStm, ImplMapMode& rImplMapMode )
return rIStm;
}
// -----------------------------------------------------------------------
SvStream& operator<<( SvStream& rOStm, const ImplMapMode& rImplMapMode )
{
VersionCompat aCompat( rOStm, STREAM_WRITE, 1 );
......@@ -79,8 +69,6 @@ SvStream& operator<<( SvStream& rOStm, const ImplMapMode& rImplMapMode )
return rOStm;
}
// -----------------------------------------------------------------------
ImplMapMode* ImplMapMode::ImplGetStaticMapMode( MapUnit eUnit )
{
static long aStaticImplMapModeAry[(MAP_LASTENUMDUMMY)*sizeof(ImplMapMode)/sizeof(long)];
......@@ -102,11 +90,9 @@ ImplMapMode* ImplMapMode::ImplGetStaticMapMode( MapUnit eUnit )
return pImplMapMode;
}
// -----------------------------------------------------------------------
inline void MapMode::ImplMakeUnique()
{
// Falls noch andere Referenzen bestehen, dann kopieren
// If there are other references, copy
if ( mpImplMapMode->mnRefCount != 1 )
{
if ( mpImplMapMode->mnRefCount )
......@@ -115,8 +101,6 @@ inline void MapMode::ImplMakeUnique()
}
}
// -----------------------------------------------------------------------
MapMode::MapMode()
{
DBG_CTOR( MapMode, NULL );
......@@ -124,23 +108,19 @@ MapMode::MapMode()
mpImplMapMode = ImplMapMode::ImplGetStaticMapMode( MAP_PIXEL );
}
// -----------------------------------------------------------------------
MapMode::MapMode( const MapMode& rMapMode )
{
DBG_CTOR( MapMode, NULL );
DBG_CHKOBJ( &rMapMode, MapMode, NULL );
DBG_ASSERT( rMapMode.mpImplMapMode->mnRefCount < 0xFFFFFFFE, "MapMode: RefCount overflow" );
// shared Instance Daten uebernehmen und Referenzcounter erhoehen
// Take over Shared Instance Data and increment refcount
mpImplMapMode = rMapMode.mpImplMapMode;
// RefCount == 0 fuer statische Objekte
// RefCount == 0 for static objects
if ( mpImplMapMode->mnRefCount )
mpImplMapMode->mnRefCount++;
}
// -----------------------------------------------------------------------
MapMode::MapMode( MapUnit eUnit )
{
DBG_CTOR( MapMode, NULL );
......@@ -148,8 +128,6 @@ MapMode::MapMode( MapUnit eUnit )
mpImplMapMode = ImplMapMode::ImplGetStaticMapMode( eUnit );
}
// -----------------------------------------------------------------------
MapMode::MapMode( MapUnit eUnit, const Point& rLogicOrg,
const Fraction& rScaleX, const Fraction& rScaleY )
{
......@@ -162,14 +140,12 @@ MapMode::MapMode( MapUnit eUnit, const Point& rLogicOrg,
mpImplMapMode->maScaleY = rScaleY;
}
// -----------------------------------------------------------------------
MapMode::~MapMode()
{
DBG_DTOR( MapMode, NULL );
// Wenn es keine statischen ImpDaten sind, dann loeschen, wenn es
// die letzte Referenz ist, sonst Referenzcounter decrementieren
// If it's not static ImpData and it's the last reference, delete it,
// else decrement refcounter
if ( mpImplMapMode->mnRefCount )
{
if ( mpImplMapMode->mnRefCount == 1 )
......@@ -179,8 +155,6 @@ MapMode::~MapMode()
}
}
// -----------------------------------------------------------------------
void MapMode::SetMapUnit( MapUnit eUnit )
{
DBG_CHKTHIS( MapMode, NULL );
......@@ -189,8 +163,6 @@ void MapMode::SetMapUnit( MapUnit eUnit )
mpImplMapMode->meUnit = eUnit;
}
// -----------------------------------------------------------------------
void MapMode::SetOrigin( const Point& rLogicOrg )
{
DBG_CHKTHIS( MapMode, NULL );
......@@ -199,8 +171,6 @@ void MapMode::SetOrigin( const Point& rLogicOrg )
mpImplMapMode->maOrigin = rLogicOrg;
}
// -----------------------------------------------------------------------
void MapMode::SetScaleX( const Fraction& rScaleX )
{
DBG_CHKTHIS( MapMode, NULL );
......@@ -209,8 +179,6 @@ void MapMode::SetScaleX( const Fraction& rScaleX )
mpImplMapMode->maScaleX = rScaleX;
}
// -----------------------------------------------------------------------
void MapMode::SetScaleY( const Fraction& rScaleY )
{
DBG_CHKTHIS( MapMode, NULL );
......@@ -219,21 +187,19 @@ void MapMode::SetScaleY( const Fraction& rScaleY )
mpImplMapMode->maScaleY = rScaleY;
}
// -----------------------------------------------------------------------
MapMode& MapMode::operator=( const MapMode& rMapMode )
{
DBG_CHKTHIS( MapMode, NULL );
DBG_CHKOBJ( &rMapMode, MapMode, NULL );
DBG_ASSERT( rMapMode.mpImplMapMode->mnRefCount < 0xFFFFFFFE, "MapMode: RefCount overflow" );
// Zuerst Referenzcounter erhoehen, damit man sich selbst zuweisen kann
// RefCount == 0 fuer statische Objekte
// First increment refcount so that we can reference ourselves
// RefCount == 0 for static objects
if ( rMapMode.mpImplMapMode->mnRefCount )
rMapMode.mpImplMapMode->mnRefCount++;
// Wenn es keine statischen ImpDaten sind, dann loeschen, wenn es
// die letzte Referenz ist, sonst Referenzcounter decrementieren
// If it's not static ImpData and it's the last reference, delete it,
// else decrement refcounter
if ( mpImplMapMode->mnRefCount )
{
if ( mpImplMapMode->mnRefCount == 1 )
......@@ -247,8 +213,6 @@ MapMode& MapMode::operator=( const MapMode& rMapMode )
return *this;
}
// -----------------------------------------------------------------------
sal_Bool MapMode::operator==( const MapMode& rMapMode ) const
{
DBG_CHKTHIS( MapMode, NULL );
......@@ -266,8 +230,6 @@ sal_Bool MapMode::operator==( const MapMode& rMapMode ) const
return sal_False;
}
// -----------------------------------------------------------------------
sal_Bool MapMode::IsDefault() const
{
DBG_CHKTHIS( MapMode, NULL );
......@@ -285,16 +247,12 @@ sal_Bool MapMode::IsDefault() const
return sal_False;
}
// -----------------------------------------------------------------------
SvStream& operator>>( SvStream& rIStm, MapMode& rMapMode )
{
rMapMode.ImplMakeUnique();
return (rIStm >> *rMapMode.mpImplMapMode);
}
// -----------------------------------------------------------------------
SvStream& operator<<( SvStream& rOStm, const MapMode& rMapMode )
{
return (rOStm << *rMapMode.mpImplMapMode);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment