diff options
Diffstat (limited to 'editeng/source/items')
-rw-r--r-- | editeng/source/items/bulitem.cxx | 36 | ||||
-rw-r--r-- | editeng/source/items/flditem.cxx | 61 | ||||
-rw-r--r-- | editeng/source/items/frmitems.cxx | 166 | ||||
-rw-r--r-- | editeng/source/items/itemtype.cxx | 6 | ||||
-rw-r--r-- | editeng/source/items/justifyitem.cxx | 29 | ||||
-rw-r--r-- | editeng/source/items/makefile.mk | 5 | ||||
-rw-r--r-- | editeng/source/items/numitem.cxx | 69 | ||||
-rw-r--r-- | editeng/source/items/paperinf.cxx | 18 | ||||
-rw-r--r-- | editeng/source/items/paraitem.cxx | 79 | ||||
-rw-r--r-- | editeng/source/items/svxfont.cxx | 103 | ||||
-rw-r--r-- | editeng/source/items/svxitems.src | 2 | ||||
-rw-r--r-- | editeng/source/items/textitem.cxx | 89 | ||||
-rw-r--r-- | editeng/source/items/writingmodeitem.cxx | 5 | ||||
-rw-r--r-- | editeng/source/items/xmlcnitm.cxx | 1 |
14 files changed, 214 insertions, 455 deletions
diff --git a/editeng/source/items/bulitem.cxx b/editeng/source/items/bulitem.cxx index b03e0f601ad5..5b792d4bb7f0 100644 --- a/editeng/source/items/bulitem.cxx +++ b/editeng/source/items/bulitem.cxx @@ -38,7 +38,6 @@ #include <editeng/bulitem.hxx> #include <editeng/editrids.hrc> -// #90477# #include <tools/tenccvt.hxx> #define BULITEM_VERSION ((USHORT)2) @@ -56,7 +55,6 @@ void SvxBulletItem::StoreFont( SvStream& rStream, const Font& rFont ) rStream << rFont.GetColor(); nTemp = (USHORT)rFont.GetFamily(); rStream << nTemp; - // #90477# nTemp = (USHORT)GetStoreCharSet( rFont.GetCharSet(), rStream.GetVersion() ); nTemp = (USHORT)GetSOStoreTextEncoding((rtl_TextEncoding)rFont.GetCharSet(), (sal_uInt16)rStream.GetVersion()); rStream << nTemp; @@ -85,7 +83,6 @@ Font SvxBulletItem::CreateFont( SvStream& rStream, USHORT nVer ) USHORT nTemp; rStream >> nTemp; aFont.SetFamily((FontFamily)nTemp); - // #90477# rStream >> nTemp; nTemp = (sal_uInt16)GetSOLoadTextEncoding((rtl_TextEncoding)nTemp, (sal_uInt16)rStream.GetVersion()); aFont.SetCharSet((rtl_TextEncoding)nTemp); @@ -189,18 +186,16 @@ SvxBulletItem::SvxBulletItem( SvStream& rStrm, USHORT _nWhich ) : aFont = CreateFont( rStrm, BULITEM_VERSION ); else { - // Sicheres Laden mit Test auf leere Bitmap + // Safe Load with Test on empty Bitmap Bitmap aBmp; const UINT32 nOldPos = rStrm.Tell(); - // #69345# Errorcode beim Bitmap lesen ignorieren, - // siehe Kommentar #67581# in SvxBulletItem::Store() + // Ignore Errorcode when reading Bitmap, + // see comment in SvxBulletItem::Store() BOOL bOldError = rStrm.GetError() ? TRUE : FALSE; rStrm >> aBmp; if ( !bOldError && rStrm.GetError() ) { rStrm.ResetError(); - // #71493# Keine Warnung: Das BulletItem interessiert seit 5.0 im Dateiformat nicht mehr. - // rStrm.SetError(ERRCODE_CLASS_READ | ERRCODE_SVX_BULLETITEM_NOBULLET | ERRCODE_WARNING_MASK); } if( aBmp.IsEmpty() ) @@ -338,8 +333,8 @@ int SvxBulletItem::operator==( const SfxPoolItem& rItem ) const { DBG_ASSERT(rItem.ISA(SvxBulletItem),"operator==Types not matching"); const SvxBulletItem& rBullet = (const SvxBulletItem&)rItem; - // ValidMask mitvergleichen, da sonst kein Putten in ein AttrSet moeglich, - // wenn sich das Item nur in der ValidMask von einem existierenden unterscheidet. + // Compare with ValidMask, otherwise no put possible in a AttrSet if the + // item differs only in terms of the ValidMask from an existing one. if( nValidMask != rBullet.nValidMask || nStyle != rBullet.nStyle || nScale != rBullet.nScale || @@ -374,7 +369,7 @@ int SvxBulletItem::operator==( const SfxPoolItem& rItem ) const SvStream& SvxBulletItem::Store( SvStream& rStrm, USHORT /*nItemVersion*/ ) const { - // Korrektur bei leerer Bitmap + // Correction for empty bitmap if( ( nStyle == BS_BMP ) && ( !pGraphicObject || ( GRAPHIC_NONE == pGraphicObject->GetType() ) || ( GRAPHIC_DEFAULT == pGraphicObject->GetType() ) ) ) { @@ -395,7 +390,7 @@ SvStream& SvxBulletItem::Store( SvStream& rStrm, USHORT /*nItemVersion*/ ) const { ULONG _nStart = rStrm.Tell(); - // Kleine Vorab-Schaetzung der Groesse... + // Small preliminary estimate of the size ... USHORT nFac = ( rStrm.GetCompressMode() != COMPRESSMODE_NONE ) ? 3 : 1; const Bitmap aBmp( pGraphicObject->GetGraphic().GetBitmap() ); ULONG nBytes = aBmp.GetSizeBytes(); @@ -403,15 +398,14 @@ SvStream& SvxBulletItem::Store( SvStream& rStrm, USHORT /*nItemVersion*/ ) const rStrm << aBmp; ULONG nEnd = rStrm.Tell(); - // #67581# Item darf mit Overhead nicht mehr als 64K schreiben, - // sonst platzt der SfxMultiRecord - // Dann lieber auf die Bitmap verzichten, ist nur fuer Outliner - // und auch nur fuer <= 5.0 wichtig. - // Beim Einlesen merkt der Stream-Operator der Bitmap, dass dort keine steht. - // Hiermit funktioniert jetzt der Fall das die grosse Bitmap aus einem anderen - // Fileformat entstanden ist, welches keine 64K belegt, aber wenn eine - // Bitmap > 64K verwendet wird, hat das SvxNumBulletItem beim Laden ein Problem, - // stuerzt aber nicht ab. + // Item can not write with an overhead more than 64K or SfxMultiRecord + // will crash. Then prefer to forego on the bitmap, it is only + // important for the outliner and only for <= 5.0. + // When reading, the stream-operator makes note of the bitmap and the + // fact that there is none. This is now the case how it works with + // large bitmap created from another file format, which do not occupy a + // 64K chunk, but if a bitmap > 64K is used, the SvxNumBulletItem will + // have problem loading it, but does not crash. if ( (nEnd-_nStart) > 0xFF00 ) rStrm.Seek( _nStart ); diff --git a/editeng/source/items/flditem.cxx b/editeng/source/items/flditem.cxx index 739c394cf0d0..edfe7921f88a 100644 --- a/editeng/source/items/flditem.cxx +++ b/editeng/source/items/flditem.cxx @@ -39,7 +39,6 @@ #include <editeng/measfld.hxx> -// #90477# #include <tools/tenccvt.hxx> #define FRAME_MARKER (sal_uInt32)0x21981357 @@ -74,9 +73,9 @@ SvxFieldData* SvxFieldData::Clone() const int SvxFieldData::operator==( const SvxFieldData& rFld ) const { - DBG_ASSERT( Type() == rFld.Type(), "==: Verschiedene Typen" ); + DBG_ASSERT( Type() == rFld.Type(), "==: Different Types" ); (void)rFld; - return TRUE; // Basicklasse immer gleich. + return TRUE; // Basic class is always the same. } // ----------------------------------------------------------------------- @@ -107,7 +106,7 @@ MetaAction* SvxFieldData::createEndComment() const SvxFieldItem::SvxFieldItem( SvxFieldData* pFld, const USHORT nId ) : SfxPoolItem( nId ) { - pField = pFld; // gehoert direkt dem Item + pField = pFld; // belongs directly to the item } // ----------------------------------------------------------------------- @@ -152,7 +151,7 @@ SfxPoolItem* SvxFieldItem::Create( SvStream& rStrm, USHORT ) const aPStrm.SetError( SVSTREAM_GENERALERROR ); if ( aPStrm.GetError() == ERRCODE_IO_NOFACTORY ) - aPStrm.ResetError(); // Eigentlich einen Code, dass nicht alle Attr gelesen wurden... + aPStrm.ResetError(); // Actually a code for that not all were read Attr ... return new SvxFieldItem( pData, Which() ); } @@ -161,14 +160,14 @@ SfxPoolItem* SvxFieldItem::Create( SvStream& rStrm, USHORT ) const SvStream& SvxFieldItem::Store( SvStream& rStrm, USHORT /*nItemVersion*/ ) const { - DBG_ASSERT( pField, "SvxFieldItem::Store: Feld?!" ); + DBG_ASSERT( pField, "SvxFieldItem::Store: Field?!" ); SvPersistStream aPStrm( GetClassManager(), &rStrm ); - // Das ResetError in der obigen Create-Methode gab es in 3.1 noch nicht, - // deshalb duerfen beim 3.x-Export neuere Items nicht gespeichert werden! + // The reset error in the above Create method did not exist in 3.1, + // therefore newer items can not be saved for 3.x-exports! if ( ( rStrm.GetVersion() <= SOFFICE_FILEFORMAT_31 ) && pField && pField->GetClassId() == 50 /* SdrMeasureField */ ) { - // SvxFieldData reicht nicht, weil auch nicht am ClassMgr angemeldet + // SvxFieldData not enough, because not registered on ClassMgr. SvxURLField aDummyData; aPStrm << &aDummyData; } @@ -196,7 +195,7 @@ int SvxFieldItem::operator==( const SfxPoolItem& rItem ) const } // ================================================================= -// Es folgen die Ableitungen von SvxFieldData... +// The following are the derivatives of SvxFieldData ... // ================================================================= SV_IMPL_PERSIST1( SvxDateField, SvxFieldData ); @@ -277,12 +276,12 @@ String SvxDateField::GetFormatted( Date& aDate, SvxDateFormat eFormat, SvNumberF { if ( eFormat == SVXDATEFORMAT_SYSTEM ) { - DBG_ERROR( "SVXDATEFORMAT_SYSTEM nicht implementiert!" ); + OSL_FAIL( "SVXDATEFORMAT_SYSTEM not implemented!" ); eFormat = SVXDATEFORMAT_STDSMALL; } else if ( eFormat == SVXDATEFORMAT_APPDEFAULT ) { - DBG_ERROR( "SVXDATEFORMAT_APPDEFAULT: Woher nehmen?" ); + OSL_FAIL( "SVXDATEFORMAT_APPDEFAULT: take them from where? "); eFormat = SVXDATEFORMAT_STDSMALL; } @@ -311,15 +310,15 @@ String SvxDateField::GetFormatted( Date& aDate, SvxDateFormat eFormat, SvNumberF nFormatKey = rFormatter.GetFormatIndex( NF_DATE_SYS_DMMMYYYY, eLang ); break; case SVXDATEFORMAT_D: - // 13. Februar 1996 + // 13. February 1996 nFormatKey = rFormatter.GetFormatIndex( NF_DATE_SYS_DMMMMYYYY, eLang ); break; case SVXDATEFORMAT_E: - // Die, 13. Februar 1996 + // The, 13. February 1996 nFormatKey = rFormatter.GetFormatIndex( NF_DATE_SYS_NNDMMMMYYYY, eLang ); break; case SVXDATEFORMAT_F: - // Dienstag, 13. Februar 1996 + // Tuesday, 13. February 1996 nFormatKey = rFormatter.GetFormatIndex( NF_DATE_SYS_NNNNDMMMMYYYY, eLang ); break; default: @@ -394,7 +393,7 @@ void SvxURLField::Load( SvPersistStream & rStm ) // read to a temp string first, read text encoding and // convert later to stay compatible to fileformat ByteString aTempString; - rtl_TextEncoding aTempEncoding = RTL_TEXTENCODING_MS_1252; // #101493# Init for old documents + rtl_TextEncoding aTempEncoding = RTL_TEXTENCODING_MS_1252; // Init for old documents rStm.ReadByteString(aTempString); rStm >> nFrameMarker; @@ -423,8 +422,8 @@ void SvxURLField::Load( SvPersistStream & rStm ) eFormat= (SvxURLFormat)nFormat; - // Relatives Speichern => Beim laden absolut machen. - DBG_ERROR("No BaseURL!"); + // Relative save => make it absolute for loading + OSL_FAIL("No BaseURL!"); // TODO/MBA: no BaseURL aURL = INetURLObject::GetAbsURL( String(), aTmpURL ); } @@ -433,8 +432,8 @@ void SvxURLField::Load( SvPersistStream & rStm ) void SvxURLField::Save( SvPersistStream & rStm ) { - // Relatives Speichern der URL - DBG_ERROR("No BaseURL!"); + // Relative save of the URL + OSL_FAIL("No BaseURL!"); // TODO/MBA: no BaseURL String aTmpURL = INetURLObject::GetRelURL( String(), aURL ); @@ -467,14 +466,14 @@ MetaAction* SvxURLField::createBeginComment() const } // ================================================================= -// Die Felder, die aus Calc ausgebaut wurden: +// The fields that were removed from Calc: // ================================================================= SV_IMPL_PERSIST1( SvxPageField, SvxFieldData ); SvxFieldData* SvxPageField::Clone() const { - return new SvxPageField; // leer + return new SvxPageField; // empty } int SvxPageField::operator==( const SvxFieldData& rCmp ) const @@ -500,7 +499,7 @@ SV_IMPL_PERSIST1( SvxPagesField, SvxFieldData ); SvxFieldData* SvxPagesField::Clone() const { - return new SvxPagesField; // leer + return new SvxPagesField; // empty } int SvxPagesField::operator==( const SvxFieldData& rCmp ) const @@ -520,7 +519,7 @@ SV_IMPL_PERSIST1( SvxTimeField, SvxFieldData ); SvxFieldData* SvxTimeField::Clone() const { - return new SvxTimeField; // leer + return new SvxTimeField; // empty } int SvxTimeField::operator==( const SvxFieldData& rCmp ) const @@ -545,7 +544,7 @@ SV_IMPL_PERSIST1( SvxFileField, SvxFieldData ); SvxFieldData* SvxFileField::Clone() const { - return new SvxFileField; // leer + return new SvxFileField; // empty } int SvxFileField::operator==( const SvxFieldData& rCmp ) const @@ -565,7 +564,7 @@ SV_IMPL_PERSIST1( SvxTableField, SvxFieldData ); SvxFieldData* SvxTableField::Clone() const { - return new SvxTableField; // leer + return new SvxTableField; // empty } int SvxTableField::operator==( const SvxFieldData& rCmp ) const @@ -663,11 +662,11 @@ String SvxExtTimeField::GetFormatted( Time& aTime, SvxTimeFormat eFormat, SvNumb switch( eFormat ) { case SVXTIMEFORMAT_SYSTEM : - DBG_ERROR( "SVXTIMEFORMAT_SYSTEM: not implemented" ); + OSL_FAIL( "SVXTIMEFORMAT_SYSTEM: not implemented" ); eFormat = SVXTIMEFORMAT_STANDARD; break; case SVXTIMEFORMAT_APPDEFAULT : - DBG_ERROR( "SVXTIMEFORMAT_APPDEFAULT: not implemented" ); + OSL_FAIL( "SVXTIMEFORMAT_APPDEFAULT: not implemented" ); eFormat = SVXTIMEFORMAT_STANDARD; break; default: ;//prevent warning @@ -1013,7 +1012,7 @@ SV_IMPL_PERSIST1( SvxHeaderField, SvxFieldData ); SvxFieldData* SvxHeaderField::Clone() const { - return new SvxHeaderField; // leer + return new SvxHeaderField; // empty } int SvxHeaderField::operator==( const SvxFieldData& rCmp ) const @@ -1035,7 +1034,7 @@ SV_IMPL_PERSIST1( SvxFooterField, SvxFieldData ); SvxFieldData* SvxFooterField::Clone() const { - return new SvxFooterField; // leer + return new SvxFooterField; // empty } int SvxFooterField::operator==( const SvxFieldData& rCmp ) const @@ -1057,7 +1056,7 @@ SV_IMPL_PERSIST1( SvxDateTimeField, SvxFieldData ); SvxFieldData* SvxDateTimeField::Clone() const { - return new SvxDateTimeField; // leer + return new SvxDateTimeField; // empty } int SvxDateTimeField::operator==( const SvxFieldData& rCmp ) const diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx index d8a755f28a87..45fd0b5759d7 100644 --- a/editeng/source/items/frmitems.cxx +++ b/editeng/source/items/frmitems.cxx @@ -97,7 +97,7 @@ using namespace ::rtl; using namespace ::com::sun::star; -// Konvertierung fuer UNO +// Conversion for UNO #define TWIP_TO_MM100(TWIP) ((TWIP) >= 0 ? (((TWIP)*127L+36L)/72L) : (((TWIP)*127L-36L)/72L)) #define MM100_TO_TWIP(MM100) ((MM100) >= 0 ? (((MM100)*72L+63L)/127L) : (((MM100)*72L-63L)/127L)) #define TWIP_TO_MM100_UNSIGNED(TWIP) ((((TWIP)*127L+36L)/72L)) @@ -236,7 +236,7 @@ bool SvxSizeItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const case MID_SIZE_SIZE: rVal <<= aTmp; break; case MID_SIZE_WIDTH: rVal <<= aTmp.Width; break; case MID_SIZE_HEIGHT: rVal <<= aTmp.Height; break; - default: DBG_ERROR("Wrong MemberId!"); return false; + default: OSL_FAIL("Wrong MemberId!"); return false; } return true; @@ -285,7 +285,7 @@ bool SvxSizeItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) aSize.Height() = bConvert ? MM100_TO_TWIP(nVal) : nVal; } break; - default: DBG_ERROR("Wrong MemberId!"); + default: OSL_FAIL("Wrong MemberId!"); return false; } return true; @@ -438,7 +438,7 @@ bool SvxLRSpaceItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const nMemberId &= ~CONVERT_TWIPS; switch( nMemberId ) { - // jetzt alles signed + // now all signed case MID_L_MARGIN: rVal <<= (sal_Int32)(bConvert ? TWIP_TO_MM100(nLeftMargin) : nLeftMargin); break; @@ -470,7 +470,7 @@ bool SvxLRSpaceItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const default: bRet = false; - DBG_ERROR("unknown MemberId"); + OSL_FAIL("unknown MemberId"); } return bRet; } @@ -527,7 +527,7 @@ bool SvxLRSpaceItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) break; default: - DBG_ERROR("unknown MemberId"); + OSL_FAIL("unknown MemberId"); return false; } return true; @@ -535,7 +535,7 @@ bool SvxLRSpaceItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) // ----------------------------------------------------------------------- -// nLeftMargin und nTxtLeft anpassen. +// Adapt nLeftMargin and nTxtLeft. void SvxLRSpaceItem::AdjustLeft() { @@ -650,15 +650,14 @@ SfxItemPresentation SvxLRSpaceItem::GetPresentation // ----------------------------------------------------------------------- -// MT: BulletFI: Vor 501 wurde im Outliner das Bullet nicht auf der Position des -// FI positioniert, deshalb muss in aelteren Dokumenten der FI auf 0 stehen. - +// BulletFI: Before 501 in the Outliner the bullet was not on the position of +// the FI, so in older documents one must set FI to 0. #define BULLETLR_MARKER 0x599401FE SvStream& SvxLRSpaceItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const { short nSaveFI = nFirstLineOfst; - ((SvxLRSpaceItem*)this)->SetTxtFirstLineOfst( 0 ); // nLeftMargin wird mitmanipuliert, siehe Create() + ((SvxLRSpaceItem*)this)->SetTxtFirstLineOfst( 0 ); // nLeftMargin is manipulated together with this, see Create() sal_uInt16 nMargin = 0; if( nLeftMargin > 0 ) @@ -686,8 +685,8 @@ SvStream& SvxLRSpaceItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) con nAutoFirst |= 0x80; rStrm << nAutoFirst; - // Ab 6.0 keine Magicnumber schreiben... - DBG_ASSERT( rStrm.GetVersion() <= SOFFICE_FILEFORMAT_50, "MT: Fileformat SvxLRSpaceItem aendern!" ); + // From 6.0 onwards, do not write Magic numbers... + DBG_ASSERT( rStrm.GetVersion() <= SOFFICE_FILEFORMAT_50, "Change File format SvxLRSpaceItem!" ); rStrm << (sal_uInt32) BULLETLR_MARKER; rStrm << nSaveFI; @@ -723,7 +722,7 @@ SfxPoolItem* SvxLRSpaceItem::Create( SvStream& rStrm, sal_uInt16 nVersion ) cons { rStrm >> firstline; if ( firstline < 0 ) - left = left + static_cast<sal_uInt16>(firstline); // s.u.: txtleft = ... + left = left + static_cast<sal_uInt16>(firstline); // see below: txtleft = ... } else rStrm.Seek( nPos ); @@ -831,7 +830,7 @@ bool SvxULSpaceItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const nMemberId &= ~CONVERT_TWIPS; switch( nMemberId ) { - // jetzt alles signed + // now all signed case 0: { ::com::sun::star::frame::status::UpperLowerMarginScale aUpperLowerMarginScale; @@ -901,7 +900,7 @@ bool SvxULSpaceItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) default: - DBG_ERROR("unknown MemberId"); + OSL_FAIL("unknown MemberId"); return false; } return true; @@ -1168,7 +1167,6 @@ int SvxProtectItem::operator==( const SfxPoolItem& rAttr ) const bool SvxProtectItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const { -// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; sal_Bool bValue; switch(nMemberId) @@ -1177,7 +1175,7 @@ bool SvxProtectItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const case MID_PROTECT_SIZE : bValue = bSize; break; case MID_PROTECT_POSITION: bValue = bPos; break; default: - DBG_ERROR("falsche MemberId"); + OSL_FAIL("Wrong MemberId"); return false; } @@ -1187,7 +1185,6 @@ bool SvxProtectItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const bool SvxProtectItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) { -// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; sal_Bool bVal( Any2Bool(rVal) ); switch(nMemberId) @@ -1196,7 +1193,7 @@ bool SvxProtectItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) case MID_PROTECT_SIZE : bSize = bVal; break; case MID_PROTECT_POSITION: bPos = bVal; break; default: - DBG_ERROR("falsche MemberId"); + OSL_FAIL("Wrong MemberId"); return false; } return true; @@ -1321,7 +1318,7 @@ bool SvxShadowItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const case MID_TRANSPARENT: rVal <<= aShadow.IsTransparent; break; case MID_BG_COLOR: rVal <<= aShadow.Color; break; case 0: rVal <<= aShadow; break; - default: DBG_ERROR("Wrong MemberId!"); return false; + default: OSL_FAIL("Wrong MemberId!"); return false; } return true; @@ -1354,7 +1351,7 @@ bool SvxShadowItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) case MID_TRANSPARENT: rVal >>= aShadow.IsTransparent; break; case MID_BG_COLOR: rVal >>= aShadow.Color; break; case 0: rVal >>= aShadow; break; - default: DBG_ERROR("Wrong MemberId!"); return sal_False; + default: OSL_FAIL("Wrong MemberId!"); return sal_False; } if ( bRet ) @@ -1429,7 +1426,7 @@ sal_uInt16 SvxShadowItem::CalcShadowSpace( sal_uInt16 nShadow ) const break; default: - DBG_ERROR( "wrong shadow" ); + OSL_FAIL( "wrong shadow" ); } return nSpace; } @@ -1640,7 +1637,7 @@ XubString SvxBorderLine::GetValueString( SfxMapUnit eSrcUnit, } else if ( DEF_LINE_WIDTH_1 == nDistance ) { - // doppelte Linie, kleiner Abstand + // double line, small gap if ( DEF_LINE_WIDTH_0 == nOutWidth && DEF_LINE_WIDTH_0 == nInWidth ) nResId = RID_DOUBLE_LINE0; else if ( DEF_LINE_WIDTH_1 == nOutWidth && @@ -1652,7 +1649,7 @@ XubString SvxBorderLine::GetValueString( SfxMapUnit eSrcUnit, } else if ( DEF_LINE_WIDTH_2 == nDistance ) { - // doppelte Linie, gro\ser Abstand + // double line, large gap if ( DEF_LINE_WIDTH_0 == nOutWidth && DEF_LINE_WIDTH_0 == nInWidth ) nResId = RID_DOUBLE_LINE1; else if ( DEF_LINE_WIDTH_2 == nOutWidth && @@ -1989,16 +1986,16 @@ template<typename Item> bool lcl_setLine(const uno::Any& rAny, Item& rItem, USHORT nLine, const bool bConvert) { - bool bSet(false); + bool bDone = false; table::BorderLine2 aBorderLine; if (lcl_extractBorderLine(rAny, aBorderLine)) { SvxBorderLine aLine; - bSet = SvxBoxItem::LineToSvxLine(aBorderLine, aLine, bConvert); - if (bSet) - rItem.SetLine(&aLine, nLine); + bool bSet = SvxBoxItem::LineToSvxLine(aBorderLine, aLine, bConvert); + rItem.SetLine( bSet ? &aLine : NULL, nLine); + bDone = true; } - return bSet; + return bDone; } } @@ -2430,7 +2427,7 @@ const SvxBorderLine *SvxBoxItem::GetLine( sal_uInt16 nLine ) const pRet = pRight; break; default: - DBG_ERROR( "wrong line" ); + OSL_FAIL( "wrong line" ); break; } @@ -2462,7 +2459,7 @@ void SvxBoxItem::SetLine( const SvxBorderLine* pNew, sal_uInt16 nLine ) pRight = pTmp; break; default: - DBG_ERROR( "wrong line" ); + OSL_FAIL( "wrong line" ); } } @@ -2502,7 +2499,7 @@ sal_uInt16 SvxBoxItem::GetDistance( sal_uInt16 nLine ) const nDist = nRightDist; break; default: - DBG_ERROR( "wrong line" ); + OSL_FAIL( "wrong line" ); } return nDist; @@ -2527,7 +2524,7 @@ void SvxBoxItem::SetDistance( sal_uInt16 nNew, sal_uInt16 nLine ) nRightDist = nNew; break; default: - DBG_ERROR( "wrong line" ); + OSL_FAIL( "wrong line" ); } } @@ -2556,7 +2553,7 @@ sal_uInt16 SvxBoxItem::CalcLineSpace( sal_uInt16 nLine, sal_Bool bIgnoreLine ) c nDist = nRightDist; break; default: - DBG_ERROR( "wrong line" ); + OSL_FAIL( "wrong line" ); } if( pTmp ) @@ -2659,7 +2656,7 @@ void SvxBoxInfoItem::SetLine( const SvxBorderLine* pNew, sal_uInt16 nLine ) } else { - DBG_ERROR( "wrong line" ); + OSL_FAIL( "wrong line" ); } } @@ -2681,39 +2678,7 @@ SfxItemPresentation SvxBoxInfoItem::GetPresentation XubString& rText, const IntlWrapper * ) const { -#ifndef SVX_LIGHT -/*!!! - ResMgr* pMgr = DIALOG_MGR(); - if ( pHori ) - { - rText += pHori->GetValueString(); - rText += cpDelim; - } - if ( pVert ) - { - rText += pVert->GetValueString(); - rText += cpDelim; - } - if ( bTable ) - rText += String( ResId( RID_SVXITEMS_BOXINF_TABLE_TRUE, pMgr ) ); - else - rText += String( ResId( RID_SVXITEMS_BOXINF_TABLE_FALSE, pMgr ) ); - rText += cpDelim; - if ( bDist ) - rText += String( ResId( RID_SVXITEMS_BOXINF_DIST_TRUE, pMgr ) ); - else - rText += String( ResId( RID_SVXITEMS_BOXINF_DIST_FALSE, pMgr ) ); - rText += cpDelim; - if ( bMinDist ) - rText += String( ResId( RID_SVXITEMS_BOXINF_MDIST_TRUE, pMgr ) ); - else - rText += String( ResId( RID_SVXITEMS_BOXINF_MDIST_FALSE, pMgr ) ); - rText += cpDelim; - rText += nDefDist; - return SFX_ITEM_PRESENTATION_NAMELESS; -*/ rText.Erase(); -#endif // !SVX_LIGHT return SFX_ITEM_PRESENTATION_NONE; } @@ -2808,7 +2773,7 @@ SfxPoolItem* SvxBoxInfoItem::Create( SvStream& rStrm, sal_uInt16 ) const void SvxBoxInfoItem::ResetFlags() { - nValidFlags = 0x7F; // alles g"ultig au/ser Disable + nValidFlags = 0x7F; // all valid except Disable } bool SvxBoxInfoItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const @@ -2865,7 +2830,7 @@ bool SvxBoxInfoItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const bIntMember = sal_True; rVal <<= (sal_Int32)(bConvert ? TWIP_TO_MM100_UNSIGNED(GetDefDist()) : GetDefDist()); break; - default: DBG_ERROR("Wrong MemberId!"); return false; + default: OSL_FAIL("Wrong MemberId!"); return false; } if( !bIntMember ) @@ -2879,8 +2844,6 @@ bool SvxBoxInfoItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const bool SvxBoxInfoItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); -// sal_uInt16 nLine = BOX_LINE_TOP; -// sal_Bool bDistMember = sal_False; nMemberId &= ~CONVERT_TWIPS; sal_Bool bRet; switch(nMemberId) @@ -3014,7 +2977,7 @@ bool SvxBoxInfoItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) } break; } - default: DBG_ERROR("Wrong MemberId!"); return sal_False; + default: OSL_FAIL("Wrong MemberId!"); return sal_False; } return sal_True; @@ -3136,7 +3099,7 @@ sal_uInt16 SvxFmtBreakItem::GetVersion( sal_uInt16 nFFVer ) const DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer || SOFFICE_FILEFORMAT_40==nFFVer || SOFFICE_FILEFORMAT_50==nFFVer, - "SvxFmtBreakItem: Gibt es ein neues Fileformat?" ); + "SvxFmtBreakItem: Is there a new file format? "); return SOFFICE_FILEFORMAT_31==nFFVer || SOFFICE_FILEFORMAT_40==nFFVer ? 0 : FMTBREAK_NOAUTO; } @@ -3286,7 +3249,7 @@ bool SvxLineItem::QueryValue( uno::Any& rVal, BYTE nMemId ) const case MID_INNER_WIDTH: rVal <<= sal_Int32(pLine->GetInWidth( )); break; case MID_DISTANCE: rVal <<= sal_Int32(pLine->GetDistance()); break; default: - DBG_ERROR( "Wrong MemberId" ); + OSL_FAIL( "Wrong MemberId" ); return false; } } @@ -3327,7 +3290,7 @@ bool SvxLineItem::PutValue( const uno::Any& rVal, BYTE nMemId ) case MID_DISTANCE: pLine->SetDistance((USHORT)nVal); break; case MID_LINE_STYLE: pLine->SetStyle((SvxBorderStyle)nVal); break; default: - DBG_ERROR( "Wrong MemberId" ); + OSL_FAIL( "Wrong MemberId" ); return sal_False; } @@ -3641,7 +3604,7 @@ SvxBrushItem::SvxBrushItem( SvStream& rStream, sal_uInt16 nVersion, rStream.ReadByteString(aRel); // TODO/MBA: how can we get a BaseURL here?! - DBG_ERROR("No BaseURL!"); + OSL_FAIL("No BaseURL!"); String aAbs = INetURLObject::GetAbsURL( String(), aRel ); DBG_ASSERT( aAbs.Len(), "Invalid URL!" ); pStrLink = new String( aAbs ); @@ -3706,7 +3669,6 @@ inline sal_Int8 lcl_TransparencyToPercent(sal_Int32 nTrans) bool SvxBrushItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const { -// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; switch( nMemberId) { @@ -3768,7 +3730,6 @@ bool SvxBrushItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const bool SvxBrushItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) { -// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; switch( nMemberId) { @@ -3826,7 +3787,7 @@ bool SvxBrushItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) if( 0 == sLink.compareToAscii( UNO_NAME_GRAPHOBJ_URLPKGPREFIX, sizeof(UNO_NAME_GRAPHOBJ_URLPKGPREFIX)-1 ) ) { - DBG_ERROR( "package urls aren't implemented" ); + OSL_FAIL( "package urls aren't implemented" ); } else if( 0 == sLink.compareToAscii( UNO_NAME_GRAPHOBJ_URLPREFIX, sizeof(UNO_NAME_GRAPHOBJ_URLPREFIX)-1 ) ) @@ -4026,7 +3987,7 @@ SvStream& SvxBrushItem::Store( SvStream& rStream , sal_uInt16 /*nItemVersion*/ ) rStream << pImpl->pGraphicObject->GetGraphic(); if ( pStrLink ) { - DBG_ERROR("No BaseURL!"); + OSL_FAIL("No BaseURL!"); // TODO/MBA: how to get a BaseURL?! String aRel = INetURLObject::GetRelURL( String(), *pStrLink ); // UNICODE: rStream << aRel; @@ -4042,9 +4003,9 @@ SvStream& SvxBrushItem::Store( SvStream& rStream , sal_uInt16 /*nItemVersion*/ ) } // ----------------------------------------------------------------------- -// const wegcasten, da const als logisches const zu verstehen ist -// wenn GetGraphic() gerufen wird, soll sich das Item darum kuemmern, -// eine gelinkte Grafik zu holen. +// cast away const, since const is to be understood as a logical const +// if GetGraphic() is called, the item should take care of getting a linked +// graphic. // ----------------------------------------------------------------------- void SvxBrushItem::PurgeGraphic() const @@ -4065,26 +4026,11 @@ void SvxBrushItem::PurgeMedium() const const GraphicObject* SvxBrushItem::GetGraphicObject() const { if ( bLoadAgain && pStrLink && !pImpl->pGraphicObject ) - // wenn Grafik schon geladen, als Cache benutzen + // when graphics already loaded, use as a cache { - //JP 29.6.2001: only with "valid" names - empty names now allowed + // only with "valid" names - empty names now allowed if( pStrLink->Len() ) { - // currently we don't have asynchronous processing -/* if( pImpl->aDoneLink.IsSet() ) - { - // Auf besonderen Wunsch des Writers wird der synchrone und der - // asynchrone Fall was die Benachrichtigung angeht unterschiedlich - // behandelt. Der Callback erfolgt nur bei asynchronem Eintreffen - // der Daten - - Link aTmp = pImpl->aDoneLink; - pImpl->aDoneLink = Link(); - pImpl->xMedium->DownLoad( - STATIC_LINK( this, SvxBrushItem, DoneHdl_Impl ) ); - pImpl->aDoneLink = aTmp; - } */ - pImpl->pStream = utl::UcbStreamHelper::CreateStream( *pStrLink, STREAM_STD_READ ); if( pImpl->pStream && !pImpl->pStream->GetError() ) { @@ -4110,9 +4056,6 @@ const GraphicObject* SvxBrushItem::GetGraphicObject() const { const_cast < SvxBrushItem*> (this)->bLoadAgain = sal_False; } - - // currently we don't have asynchronous processing -// pThis->pImpl->aDoneLink.Call( pThis ); } } @@ -4143,7 +4086,7 @@ void SvxBrushItem::SetGraphicPos( SvxGraphicPosition eNew ) { if ( !pImpl->pGraphicObject && !pStrLink ) { - pImpl->pGraphicObject = new GraphicObject; // dummy anlegen + pImpl->pGraphicObject = new GraphicObject; // Creating a dummy } } } @@ -4162,11 +4105,11 @@ void SvxBrushItem::SetGraphic( const Graphic& rNew ) ApplyGraphicTransparency_Impl(); if ( GPOS_NONE == eGraphicPos ) - eGraphicPos = GPOS_MM; // None waere Brush, also Default: Mitte + eGraphicPos = GPOS_MM; // None would be brush, then Default: middle } else { - DBG_ERROR( "SetGraphic() on linked graphic! :-/" ); + OSL_FAIL( "SetGraphic() on linked graphic! :-/" ); } } @@ -4184,11 +4127,11 @@ void SvxBrushItem::SetGraphicObject( const GraphicObject& rNewObj ) ApplyGraphicTransparency_Impl(); if ( GPOS_NONE == eGraphicPos ) - eGraphicPos = GPOS_MM; // None waere Brush, also Default: Mitte + eGraphicPos = GPOS_MM; // None would be brush, then Default: middle } else { - DBG_ERROR( "SetGraphic() on linked graphic! :-/" ); + OSL_FAIL( "SetGraphic() on linked graphic! :-/" ); } } @@ -4228,7 +4171,7 @@ void SvxBrushItem::SetGraphicFilter( const String& rNew ) SvxGraphicPosition SvxBrushItem::WallpaperStyle2GraphicPos( WallpaperStyle eStyle ) { SvxGraphicPosition eResult; - // der Switch ist nicht der schnellste, dafuer aber am sichersten + // The switch is not the fastest, but the safest switch( eStyle ) { case WALLPAPER_NULL: eResult = GPOS_NONE; break; @@ -4303,7 +4246,6 @@ CntWallpaperItem* SvxBrushItem::CreateCntWallpaperItem() const { DBG_ERRORFILE( "Don't know what to do with a graphic" ); } -// pItem->SetGraphic( *pImpl->pGraphic, bLink ); return pItem; } @@ -4453,7 +4395,7 @@ bool SvxFrameDirectionItem::QueryValue( com::sun::star::uno::Any& rVal, nVal = text::WritingMode2::PAGE; break; default: - DBG_ERROR("Unknown SvxFrameDirection value!"); + OSL_FAIL("Unknown SvxFrameDirection value!"); bRet = false; break; } diff --git a/editeng/source/items/itemtype.cxx b/editeng/source/items/itemtype.cxx index 2488ce72a92b..0d169e4b0b00 100644 --- a/editeng/source/items/itemtype.cxx +++ b/editeng/source/items/itemtype.cxx @@ -30,7 +30,6 @@ #include "precompiled_editeng.hxx" // include --------------------------------------------------------------- -#include <tools/list.hxx> #include <vcl/outdev.hxx> #include <editeng/editrids.hrc> #include <unotools/intlwrapper.hxx> @@ -97,7 +96,7 @@ XubString GetMetricText( long nVal, SfxMapUnit eSrcUnit, SfxMapUnit eDestUnit, c nVal, (MapUnit)eSrcUnit, (MapUnit)eDestUnit )); default: - DBG_ERROR( "not supported mapunit" ); + OSL_FAIL( "not supported mapunit" ); return sRet; } @@ -124,7 +123,6 @@ XubString GetMetricText( long nVal, SfxMapUnit eSrcUnit, SfxMapUnit eDestUnit, c nRet %= nDiff; if( 4 == nDigits ) { -// DBG_ASSERT(pIntl, "no IntlWrapper* set") if(pIntl) sRet += pIntl->getLocaleData()->getNumDecimalSep(); else @@ -229,7 +227,7 @@ sal_uInt16 GetMetricId( SfxMapUnit eUnit ) break; default: - DBG_ERROR( "not supported mapunit" ); + OSL_FAIL( "not supported mapunit" ); } return nId; } diff --git a/editeng/source/items/justifyitem.cxx b/editeng/source/items/justifyitem.cxx index ad34db825705..abe83500c106 100644 --- a/editeng/source/items/justifyitem.cxx +++ b/editeng/source/items/justifyitem.cxx @@ -44,14 +44,12 @@ #include <com/sun/star/table/CellVertJustify2.hpp> #include <com/sun/star/style/VerticalAlignment.hpp> -// STATIC DATA ----------------------------------------------------------- TYPEINIT1_FACTORY( SvxHorJustifyItem, SfxEnumItem, new SvxHorJustifyItem(SVX_HOR_JUSTIFY_STANDARD, 0) ); TYPEINIT1_FACTORY( SvxVerJustifyItem, SfxEnumItem, new SvxVerJustifyItem(SVX_VER_JUSTIFY_STANDARD, 0) ); using namespace ::com::sun::star; -// class SvxHorJustifyItem ----------------------------------------------- SvxHorJustifyItem::SvxHorJustifyItem( const USHORT nId ) : @@ -65,7 +63,6 @@ SvxHorJustifyItem::SvxHorJustifyItem( const SvxCellHorJustify eJustify, { } -//------------------------------------------------------------------------ SfxItemPresentation SvxHorJustifyItem::GetPresentation ( @@ -88,7 +85,6 @@ SfxItemPresentation SvxHorJustifyItem::GetPresentation return SFX_ITEM_PRESENTATION_NONE; } -//------------------------------------------------------------------------ bool SvxHorJustifyItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const { @@ -185,7 +181,6 @@ bool SvxHorJustifyItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) return true; } -//------------------------------------------------------------------------ XubString SvxHorJustifyItem::GetValueText( USHORT nVal ) const { @@ -193,14 +188,12 @@ XubString SvxHorJustifyItem::GetValueText( USHORT nVal ) const return EE_RESSTR(RID_SVXITEMS_HORJUST_STANDARD + nVal); } -//------------------------------------------------------------------------ SfxPoolItem* SvxHorJustifyItem::Clone( SfxItemPool* ) const { return new SvxHorJustifyItem( *this ); } -//------------------------------------------------------------------------ SfxPoolItem* SvxHorJustifyItem::Create( SvStream& rStream, USHORT ) const { @@ -208,14 +201,13 @@ SfxPoolItem* SvxHorJustifyItem::Create( SvStream& rStream, USHORT ) const rStream >> nVal; return new SvxHorJustifyItem( (SvxCellHorJustify)nVal, Which() ); } -//------------------------------------------------------------------------ + USHORT SvxHorJustifyItem::GetValueCount() const { - return SVX_HOR_JUSTIFY_REPEAT + 1; // letzter Enum-Wert + 1 + return SVX_HOR_JUSTIFY_REPEAT + 1; // Last Enum value + 1 } -// class SvxVerJustifyItem ----------------------------------------------- SvxVerJustifyItem::SvxVerJustifyItem( const USHORT nId ) : SfxEnumItem( nId, (USHORT)SVX_VER_JUSTIFY_STANDARD ) @@ -228,7 +220,6 @@ SvxVerJustifyItem::SvxVerJustifyItem( const SvxCellVerJustify eJustify, { } -//------------------------------------------------------------------------ SfxItemPresentation SvxVerJustifyItem::GetPresentation ( @@ -252,7 +243,6 @@ SfxItemPresentation SvxVerJustifyItem::GetPresentation return SFX_ITEM_PRESENTATION_NONE; } -//------------------------------------------------------------------------ bool SvxVerJustifyItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const { @@ -337,7 +327,6 @@ bool SvxVerJustifyItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) return true; } -//------------------------------------------------------------------------ XubString SvxVerJustifyItem::GetValueText( USHORT nVal ) const { @@ -345,14 +334,12 @@ XubString SvxVerJustifyItem::GetValueText( USHORT nVal ) const return EE_RESSTR(RID_SVXITEMS_VERJUST_STANDARD + nVal); } -//------------------------------------------------------------------------ SfxPoolItem* SvxVerJustifyItem::Clone( SfxItemPool* ) const { return new SvxVerJustifyItem( *this ); } -//------------------------------------------------------------------------ SfxPoolItem* SvxVerJustifyItem::Create( SvStream& rStream, USHORT ) const { @@ -361,15 +348,13 @@ SfxPoolItem* SvxVerJustifyItem::Create( SvStream& rStream, USHORT ) const return new SvxVerJustifyItem( (SvxCellVerJustify)nVal, Which() ); } -//------------------------------------------------------------------------ USHORT SvxVerJustifyItem::GetValueCount() const { - return SVX_VER_JUSTIFY_BOTTOM + 1; // letzter Enum-Wert + 1 + return SVX_VER_JUSTIFY_BOTTOM + 1; // Last Enum value + 1 } -// class SvxJustifyMethodItem ----------------------------------------------- SvxJustifyMethodItem::SvxJustifyMethodItem( const USHORT nId ) : SfxEnumItem( nId, (USHORT)SVX_JUSTIFY_METHOD_AUTO ) @@ -382,7 +367,6 @@ SvxJustifyMethodItem::SvxJustifyMethodItem( const SvxCellJustifyMethod eJustify, { } -//------------------------------------------------------------------------ SfxItemPresentation SvxJustifyMethodItem::GetPresentation ( @@ -406,7 +390,6 @@ SfxItemPresentation SvxJustifyMethodItem::GetPresentation return SFX_ITEM_PRESENTATION_NONE; } -//------------------------------------------------------------------------ bool SvxJustifyMethodItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const { @@ -442,7 +425,6 @@ bool SvxJustifyMethodItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ ) return true; } -//------------------------------------------------------------------------ XubString SvxJustifyMethodItem::GetValueText( USHORT nVal ) const { @@ -450,14 +432,12 @@ XubString SvxJustifyMethodItem::GetValueText( USHORT nVal ) const return EE_RESSTR(RID_SVXITEMS_JUSTMETHOD_AUTO + nVal); } -//------------------------------------------------------------------------ SfxPoolItem* SvxJustifyMethodItem::Clone( SfxItemPool* ) const { return new SvxJustifyMethodItem( *this ); } -//------------------------------------------------------------------------ SfxPoolItem* SvxJustifyMethodItem::Create( SvStream& rStream, USHORT ) const { @@ -466,11 +446,10 @@ SfxPoolItem* SvxJustifyMethodItem::Create( SvStream& rStream, USHORT ) const return new SvxJustifyMethodItem( (SvxCellJustifyMethod)nVal, Which() ); } -//------------------------------------------------------------------------ USHORT SvxJustifyMethodItem::GetValueCount() const { - return SVX_JUSTIFY_METHOD_DISTRIBUTE + 1; // letzter Enum-Wert + 1 + return SVX_JUSTIFY_METHOD_DISTRIBUTE + 1; // Last Enum value + 1 } SvxJustifyMethodItem& SvxJustifyMethodItem::operator=(const SvxJustifyMethodItem& r) diff --git a/editeng/source/items/makefile.mk b/editeng/source/items/makefile.mk index 0caa661bf11c..350d9cbedeb9 100644 --- a/editeng/source/items/makefile.mk +++ b/editeng/source/items/makefile.mk @@ -27,11 +27,6 @@ PRJ=..$/.. -#PROJECTPCH4DLL=TRUE -#PROJECTPCH=svxpch -#PROJECTPCHSOURCE=$(PRJ)$/util$/svxpch -#ENABLE_EXCEPTIONS=TRUE - PRJNAME=editeng TARGET=items diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx index e3360c1a0756..812b8e02d5ae 100644 --- a/editeng/source/items/numitem.cxx +++ b/editeng/source/items/numitem.cxx @@ -54,8 +54,8 @@ #define MM100_TO_TWIP(MM100) ((MM100*72L+63L)/127L) -#define DEF_WRITER_LSPACE 500 //Standardeinrueckung -#define DEF_DRAW_LSPACE 800 //Standardeinrueckung +#define DEF_WRITER_LSPACE 500 //Standard Indentation +#define DEF_DRAW_LSPACE 800 //Standard Indentation #define NUMITEM_VERSION_01 0x01 #define NUMITEM_VERSION_02 0x02 @@ -133,7 +133,7 @@ String SvxNumberType::GetNumStr( ULONG nNo, const Locale& rLocale ) const break; default: { - //#95525# '0' allowed for ARABIC numberings + // '0' allowed for ARABIC numberings if(NumberingType::ARABIC == nNumType && 0 == nNo ) aTmpStr = '0'; else @@ -334,7 +334,7 @@ SvStream& SvxNumberFormat::Store(SvStream &rStream, FontToSubsFontConverter pC { rStream << (USHORT)1; - // #75113# in SD or SI force bullet itself to be stored, + // in SD or SI force bullet itself to be stored, // for that purpose throw away link when link and graphic // are present, so Brush save is forced if(pGraphicBrush->GetGraphicLink() && pGraphicBrush->GetGraphic()) @@ -579,7 +579,7 @@ long SvxNumberFormat::GetIndentAt() const IMPL_STATIC_LINK( SvxNumberFormat, GraphicArrived, void *, EMPTYARG ) { - // ggfs. die GrfSize setzen: + // if necessary, set the GrfSize: if( !pThis->aGraphicSize.Width() || !pThis->aGraphicSize.Height() ) { const Graphic* pGrf = pThis->pGraphicBrush->GetGraphic(); @@ -614,12 +614,12 @@ Size SvxNumberFormat::GetGraphicSizeMM100(const Graphic* pGraphic) String SvxNumberFormat::CreateRomanString( ULONG nNo, BOOL bUpper ) { - nNo %= 4000; // mehr kann nicht dargestellt werden + nNo %= 4000; // more can not be displayed // i, ii, iii, iv, v, vi, vii, vii, viii, ix // (Dummy),1000,500,100,50,10,5,1 const char *cRomanArr = bUpper - ? "MDCLXVI--" // +2 Dummy-Eintraege !! - : "mdclxvi--"; // +2 Dummy-Eintraege !! + ? "MDCLXVI--" // +2 Dummy entries! + : "mdclxvi--"; // +2 Dummy entries! String sRet; USHORT nMask = 1000; @@ -652,45 +652,11 @@ String SvxNumberFormat::CreateRomanString( ULONG nNo, BOOL bUpper ) break; } - nMask /= 10; // zur naechsten Dekade + nMask /= 10; // for the next decade cRomanArr += 2; } return sRet; } -#ifdef OLD_NUMBER_FORMATTING -void SvxNumberFormat::GetCharStr( ULONG nNo, String& rStr ) const -{ - DBG_ASSERT( nNo, "0 ist eine ungueltige Nummer !!" ); - - const ULONG coDiff = 'Z' - 'A' +1; - char cAdd = (SVX_NUM_CHARS_UPPER_LETTER == eNumType ? 'A' : 'a') - 1; - ULONG nCalc; - - do { - nCalc = nNo % coDiff; - if( !nCalc ) - nCalc = coDiff; - rStr.Insert( sal_Unicode(cAdd + nCalc ), 0 ); - nNo -= nCalc; - if( nNo ) - nNo /= coDiff; - } while( nNo ); -} - -void SvxNumberFormat::GetCharStrN( ULONG nNo, String& rStr ) const -{ - DBG_ASSERT( nNo, "0 ist eine ungueltige Nummer !!" ); - - const ULONG coDiff = 'Z' - 'A' +1; - char cChar = (char)(--nNo % coDiff); - if( SVX_NUM_CHARS_UPPER_LETTER_N == eNumType ) - cChar += 'A'; - else - cChar += 'a'; - - rStr.Fill( (USHORT)(nNo / coDiff) + 1, sal_Unicode(cChar) ); -} -#endif //OLD_NUMBER_FORMATTING const String& SvxNumberFormat::GetCharFmtName()const { @@ -719,7 +685,7 @@ SvxNumRule::SvxNumRule( ULONG nFeatures, if(i < nLevels) { aFmts[i] = new SvxNumberFormat(SVX_NUM_CHARS_UPPER_LETTER); - //daran wird zwischen writer und draw unterschieden + // It is a distinction between writer and draw if(nFeatures & NUM_CONTINUOUS) { if ( eDefaultNumberFormatPositionAndSpaceMode == @@ -900,7 +866,7 @@ int SvxNumRule::operator==( const SvxNumRule& rCopy) const const SvxNumberFormat* SvxNumRule::Get(USHORT nLevel)const { - DBG_ASSERT(nLevel < SVX_MAX_NUM, "falsches Level" ); + DBG_ASSERT(nLevel < SVX_MAX_NUM, "Wrong Level" ); if( nLevel < SVX_MAX_NUM ) return aFmtsSet[nLevel] ? aFmts[nLevel] : 0; else @@ -915,7 +881,7 @@ const SvxNumberFormat& SvxNumRule::GetLevel(USHORT nLevel)const pStdOutlineNumFmt = new SvxNumberFormat(SVX_NUM_NUMBER_NONE); } - DBG_ASSERT(nLevel < SVX_MAX_NUM, "falsches Level" ); + DBG_ASSERT(nLevel < SVX_MAX_NUM, "Wrong Level" ); return ( ( nLevel < SVX_MAX_NUM ) && aFmts[nLevel] ) ? *aFmts[nLevel] : eNumberingType == SVX_RULETYPE_NUMBERING ? @@ -925,7 +891,7 @@ const SvxNumberFormat& SvxNumRule::GetLevel(USHORT nLevel)const void SvxNumRule::SetLevel( USHORT i, const SvxNumberFormat& rNumFmt, BOOL bIsValid ) { - DBG_ASSERT(i < SVX_MAX_NUM, "falsches Level" ); + DBG_ASSERT(i < SVX_MAX_NUM, "Wrong Level" ); if( (i < SVX_MAX_NUM) && (!aFmtsSet[i] || !(rNumFmt == *Get( i ))) ) { @@ -937,7 +903,7 @@ void SvxNumRule::SetLevel( USHORT i, const SvxNumberFormat& rNumFmt, BOOL bIsVal void SvxNumRule::SetLevel(USHORT nLevel, const SvxNumberFormat* pFmt) { - DBG_ASSERT(nLevel < SVX_MAX_NUM, "falsches Level" ); + DBG_ASSERT(nLevel < SVX_MAX_NUM, "Wrong Level" ); if( nLevel < SVX_MAX_NUM ) { @@ -963,7 +929,7 @@ String SvxNumRule::MakeNumString( const SvxNodeNum& rNum, BOOL bInclStrings ) c BYTE i = rNum.GetLevel(); if( !IsContinuousNumbering() && - 1 < rMyNFmt.GetIncludeUpperLevels() ) // nur der eigene Level ? + 1 < rMyNFmt.GetIncludeUpperLevels() ) // only on own level? { BYTE n = rMyNFmt.GetIncludeUpperLevels(); if( 1 < n ) @@ -980,9 +946,6 @@ String SvxNumRule::MakeNumString( const SvxNodeNum& rNum, BOOL bInclStrings ) c const SvxNumberFormat& rNFmt = GetLevel( i ); if( SVX_NUM_NUMBER_NONE == rNFmt.GetNumberingType() ) { - // Soll aus 1.1.1 --> 2. NoNum --> 1..1 oder 1.1 ?? - // if( i != rNum.nMyLevel ) - // aStr += aDotStr; continue; } @@ -995,7 +958,7 @@ String SvxNumRule::MakeNumString( const SvxNodeNum& rNum, BOOL bInclStrings ) c bDot = sal_False; } else - aStr += sal_Unicode('0'); // alle 0-Level sind eine 0 + aStr += sal_Unicode('0'); // all 0-levels are a 0 if( i != rNum.GetLevel() && bDot) aStr += sal_Unicode('.'); } diff --git a/editeng/source/items/paperinf.cxx b/editeng/source/items/paperinf.cxx index a83040f72049..7881c069c797 100644 --- a/editeng/source/items/paperinf.cxx +++ b/editeng/source/items/paperinf.cxx @@ -40,7 +40,7 @@ #include <editeng/eerdll.hxx> /*-------------------------------------------------------------------- - Beschreibung: Ist der Printer gueltig + Description: Is the printer valid --------------------------------------------------------------------*/ inline BOOL IsValidPrinter( const Printer* pPtr ) @@ -58,10 +58,9 @@ Size SvxPaperInfo::GetPaperSize( Paper ePaper, MapUnit eUnit ) } /*------------------------------------------------------------------------ - Beschreibung: Papiergroesse der Druckers liefern, aligned auf - die eigenen Groessen. - Falls kein Printer im System eingestellt ist, - wird DIN A4 Portrait als Defaultpapiergroesse geliefert. + Description: Return the paper size of the printer, aligned to our + own sizes. If no Printer is set in the system, A4 portrait + will be delivered as the default paper size. ------------------------------------------------------------------------*/ //Is this method may be confused about the units it returns ? @@ -76,8 +75,8 @@ Size SvxPaperInfo::GetPaperSize( const Printer* pPrinter ) if ( ePaper == PAPER_USER ) { - // Orientation nicht beruecksichtigen, da durch SV bereits - // die richtigen Masze eingestellt worden sind. + // Orientation not take into account, as the right size has + // been already set by SV Size aPaperSize = pPrinter->GetPaperSize(); const Size aInvalidSize; @@ -94,7 +93,7 @@ Size SvxPaperInfo::GetPaperSize( const Printer* pPrinter ) const Orientation eOrient = pPrinter->GetOrientation(); Size aSize( GetPaperSize( ePaper ) ); - // bei Landscape die Seiten tauschen, ist bei SV schon geschehen + // for Landscape exchange the pages, has already been done by SV if ( eOrient == ORIENTATION_LANDSCAPE ) Swap( aSize ); return aSize; @@ -130,8 +129,7 @@ Size SvxPaperInfo::GetDefaultPaperSize( MapUnit eUnit ) } /*------------------------------------------------------------------------ - Beschreibung: String Repr"asentation f"ur die SV-Defines f"ur - Papiergroessen. + Description: String representation for the SV-defines of paper size ------------------------------------------------------------------------*/ String SvxPaperInfo::GetName( Paper ePaper ) diff --git a/editeng/source/items/paraitem.cxx b/editeng/source/items/paraitem.cxx index 8e324ab66bb3..d8807301872b 100644 --- a/editeng/source/items/paraitem.cxx +++ b/editeng/source/items/paraitem.cxx @@ -124,15 +124,14 @@ int SvxLineSpacingItem::operator==( const SfxPoolItem& rAttr ) const const SvxLineSpacingItem& rLineSpace = (const SvxLineSpacingItem&)rAttr; return ( - // Gleiche Linespacing Rule? + // Same Linespacing Rule? (eLineSpace == rLineSpace.eLineSpace) - // Bei maximalem und minimalem Linespacing muss das Mass - // uebereinstimmen. + // For maximum and minimum Linespacing be the size must coincide. && (eLineSpace == SVX_LINE_SPACE_AUTO || nLineHeight == rLineSpace.nLineHeight) - // Gleiche Interlinespacing Rule? + // Same Linespacing Rule? && ( eInterLineSpace == rLineSpace.eInterLineSpace ) - // Entweder proportional oder draufaddieren eingestellt. + // Either set proportional or additive. && (( eInterLineSpace == SVX_INTER_LINE_SPACE_OFF) || (eInterLineSpace == SVX_INTER_LINE_SPACE_PROP && nPropLineSpace == rLineSpace.nPropLineSpace) @@ -141,11 +140,10 @@ int SvxLineSpacingItem::operator==( const SfxPoolItem& rAttr ) const 1 : 0; } -/* wer weiss noch, wieso das LineSpacingItem so - kompliziert ist? Fuer UNO koennen wir das nicht - gebrauchen. Da gibt es nur zwei Werte: - - ein sal_uInt16 fuer den Modus - - ein sal_uInt32 fuer alle Werte (Abstand, Hoehe, rel. Angaben) +/* Who does still know why the LineSpacingItem is so complicated? + We can not use it for UNO since there are only two values: + - ein sal_uInt16 for the mode + - ein sal_uInt32 for all values (distance, height, rel. detail) */ bool SvxLineSpacingItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const { @@ -186,7 +184,7 @@ bool SvxLineSpacingItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const case 0 : rVal <<= aLSp; break; case MID_LINESPACE : rVal <<= aLSp.Mode; break; case MID_HEIGHT : rVal <<= aLSp.Height; break; - default: DBG_ERROR("Wrong MemberId!"); break; + default: OSL_FAIL("Wrong MemberId!"); break; } return true; @@ -208,7 +206,7 @@ bool SvxLineSpacingItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) case 0 : bRet = (rVal >>= aLSp); break; case MID_LINESPACE : bRet = (rVal >>= aLSp.Mode); break; case MID_HEIGHT : bRet = (rVal >>= aLSp.Height); break; - default: DBG_ERROR("Wrong MemberId!"); break; + default: OSL_FAIL("Wrong MemberId!"); break; } if( bRet ) @@ -323,14 +321,14 @@ sal_uInt16 SvxLineSpacingItem::GetValueCount() const XubString SvxLineSpacingItem::GetValueTextByPos( sal_uInt16 nPos ) const { - //! Strings demnaechst aus Resource laden + //! load strings from resource XubString aText; switch ( nPos ) { - case SVX_LINESPACE_USER : aText.AppendAscii( "Benutzer" ); break; - case SVX_LINESPACE_ONE_LINE : aText.AppendAscii( "Einzeilig" ); break; - case SVX_LINESPACE_ONE_POINT_FIVE_LINES : aText.AppendAscii( "1,5zeilig" ); break; - case SVX_LINESPACE_TWO_LINES : aText.AppendAscii( "Zweizeilig" ); break; + case SVX_LINESPACE_USER : aText.AppendAscii( "User" ); break; + case SVX_LINESPACE_ONE_LINE : aText.AppendAscii( "One line" ); break; + case SVX_LINESPACE_ONE_POINT_FIVE_LINES : aText.AppendAscii( "1.5 line" ); break; + case SVX_LINESPACE_TWO_LINES : aText.AppendAscii( "Two lines" ); break; } return aText; } @@ -386,7 +384,6 @@ int SvxAdjustItem::operator==( const SfxPoolItem& rAttr ) const bool SvxAdjustItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const { -// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; switch( nMemberId ) { @@ -405,7 +402,6 @@ bool SvxAdjustItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const bool SvxAdjustItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) { -// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; switch( nMemberId ) { @@ -702,7 +698,6 @@ SvxHyphenZoneItem::SvxHyphenZoneItem( const sal_Bool bHyph, const sal_uInt16 nId // ----------------------------------------------------------------------- bool SvxHyphenZoneItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const { -// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; switch(nMemberId) { @@ -724,7 +719,6 @@ bool SvxHyphenZoneItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const // ----------------------------------------------------------------------- bool SvxHyphenZoneItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) { -// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; sal_Int16 nNewVal = 0; @@ -982,27 +976,6 @@ SvxTabStopItem& SvxTabStopItem::operator=( const SvxTabStopItem& rTSI ) return *this; } - -/* - enum ::com::sun::star::style::TabAlign -{ - TABALIGN_LEFT, - TABALIGN_CENTER, - TABALIGN_RIGHT, - TABALIGN_DECIMAL -}; - -struct ::com::sun::star::style::TabStop -{ - long Position; - ::com::sun::star::style::TabAlign ::com::sun::star::drawing::Alignment; - unsigned short DecimalChar; - unsigned short FillChar; -}; -typedef sequence ::com::sun::star::style::TabStop> TabSTopSequence; - - */ - bool SvxTabStopItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); @@ -1223,11 +1196,9 @@ SfxPoolItem* SvxTabStopItem::Create( SvStream& rStrm, sal_uInt16 ) const SvStream& SvxTabStopItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) const { - //MA 05. Sep. 96: Default-Tabs werden nur noch fuer das default-Attr - //expandiert. Fuer vollstaendige Rueckwaertskompatibilitaet (<=304) - //muessten alle Tabs expandiert werden, dass blaeht aber das File u.U. - //enorm auf. - //Alles nur SWG! + // Default-Tabs are only expanded for the default Attribute. For complete + // backward compabillity (<=304) all tabs have to be expanded, this makes + // the files grow large in size. All only SWG! const SfxItemPool *pPool = SfxItemPool::GetStoringPool(); const bool bStoreDefTabs = pPool @@ -1370,14 +1341,13 @@ SfxPoolItem* SvxPageModelItem::Clone( SfxItemPool* ) const bool SvxPageModelItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId ) const { -// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; switch ( nMemberId ) { case MID_AUTO: rVal <<= (sal_Bool) bAuto; break; case MID_NAME: rVal <<= ::rtl::OUString( GetValue() ); break; - default: DBG_ERROR("Wrong MemberId!"); return sal_False; + default: OSL_FAIL("Wrong MemberId!"); return sal_False; } return sal_True; @@ -1385,7 +1355,6 @@ bool SvxPageModelItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberI bool SvxPageModelItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId ) { -// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; sal_Bool bRet; ::rtl::OUString aStr; @@ -1393,7 +1362,7 @@ bool SvxPageModelItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE nMem { case MID_AUTO: bRet = ( rVal >>= bAuto ); break; case MID_NAME: bRet = ( rVal >>= aStr ); if ( bRet ) SetValue(aStr); break; - default: DBG_ERROR("Wrong MemberId!"); return sal_False; + default: OSL_FAIL("Wrong MemberId!"); return sal_False; } return bRet; @@ -1456,7 +1425,7 @@ USHORT SvxScriptSpaceItem::GetVersion( USHORT nFFVer ) const DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer || SOFFICE_FILEFORMAT_40==nFFVer || SOFFICE_FILEFORMAT_50==nFFVer, - "SvxTwoLinesItem: Gibt es ein neues Fileformat?" ); + "SvxTwoLinesItem: Is there a new file format? "); return SOFFICE_FILEFORMAT_50 > nFFVer ? USHRT_MAX : 0; } @@ -1509,7 +1478,7 @@ USHORT SvxHangingPunctuationItem::GetVersion( USHORT nFFVer ) const DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer || SOFFICE_FILEFORMAT_40==nFFVer || SOFFICE_FILEFORMAT_50==nFFVer, - "SvxHangingPunctuationItem: Gibt es ein neues Fileformat?" ); + "SvxHangingPunctuationItem: Is there a new file format? "); return SOFFICE_FILEFORMAT_50 > nFFVer ? USHRT_MAX : 0; } @@ -1562,7 +1531,7 @@ USHORT SvxForbiddenRuleItem::GetVersion( USHORT nFFVer ) const DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer || SOFFICE_FILEFORMAT_40==nFFVer || SOFFICE_FILEFORMAT_50==nFFVer, - "SvxForbiddenRuleItem: Gibt es ein neues Fileformat?" ); + "SvxForbiddenRuleItem: Is there a new file format? "); return SOFFICE_FILEFORMAT_50 > nFFVer ? USHRT_MAX : 0; } @@ -1704,7 +1673,7 @@ USHORT SvxParaGridItem::GetVersion( USHORT nFFVer ) const DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer || SOFFICE_FILEFORMAT_40==nFFVer || SOFFICE_FILEFORMAT_50==nFFVer, - "SvxParaGridItem: Gibt es ein neues Fileformat?" ); + "SvxParaGridItem: Is there a new file format? "); return SOFFICE_FILEFORMAT_50 > nFFVer ? USHRT_MAX : 0; } diff --git a/editeng/source/items/svxfont.cxx b/editeng/source/items/svxfont.cxx index 55c4607f35bc..62227cc40676 100644 --- a/editeng/source/items/svxfont.cxx +++ b/editeng/source/items/svxfont.cxx @@ -43,17 +43,14 @@ #include <editeng/svxfont.hxx> #include <editeng/escpitem.hxx> -// Minimum: Prozentwert fuers kernen +// Minimum: Percentage of kernel #define MINKERNPERCENT 5 #ifndef REDUCEDSVXFONT - const sal_Unicode CH_BLANK = sal_Unicode(' '); // ' ' Leerzeichen + const sal_Unicode CH_BLANK = sal_Unicode(' '); // ' ' Space character static sal_Char const sDoubleSpace[] = " "; #endif -/************************************************************************* - * class SvxFont - *************************************************************************/ SvxFont::SvxFont() { @@ -72,10 +69,6 @@ SvxFont::SvxFont( const Font &rFont ) eLang = LANGUAGE_SYSTEM; } -/************************************************************************* - * class SvxFont: Copy-Ctor - *************************************************************************/ - SvxFont::SvxFont( const SvxFont &rFont ) : Font( rFont ) { @@ -86,9 +79,6 @@ SvxFont::SvxFont( const SvxFont &rFont ) eLang = rFont.GetLanguage(); } -/************************************************************************* - * static SvxFont::DrawArrow - *************************************************************************/ void SvxFont::DrawArrow( OutputDevice &rOut, const Rectangle& rRect, const Size& rSize, const Color& rCol, BOOL bLeft ) @@ -126,15 +116,12 @@ void SvxFont::DrawArrow( OutputDevice &rOut, const Rectangle& rRect, rOut.SetFillColor( aOldFillColor ); } -/************************************************************************* - * SvxFont::CalcCaseMap - *************************************************************************/ XubString SvxFont::CalcCaseMap( const XubString &rTxt ) const { if( !IsCaseMap() || !rTxt.Len() ) return rTxt; XubString aTxt( rTxt ); - // Ich muss mir noch die Sprache besorgen + // I still have to get the language const LanguageType eLng = LANGUAGE_DONTKNOW == eLang ? LANGUAGE_SYSTEM : eLang; @@ -156,9 +143,9 @@ XubString SvxFont::CalcCaseMap( const XubString &rTxt ) const } case SVX_CASEMAP_TITEL: { - // Jeder Wortbeginn wird gross geschrieben, - // der Rest des Wortes wird unbesehen uebernommen. - // Bug: wenn das Attribut mitten im Wort beginnt. + // Every beginning of a word is capitalized, the rest of the word + // is taken over as is. + // Bug: if the attribute starts in the middle of the word. BOOL bBlank = TRUE; for( USHORT i = 0; i < aTxt.Len(); ++i ) @@ -188,16 +175,16 @@ XubString SvxFont::CalcCaseMap( const XubString &rTxt ) const } /************************************************************************* - * Hier beginnen die Methoden, die im Writer nicht benutzt werden koennen, - * deshalb kann man diesen Bereich durch setzen von REDUCEDSVXFONT ausklammern. +* Starting form here are the methods that can not be used in Writer, +* so we put this section to be excluded by REDUCEDSVXFONT. *************************************************************************/ #ifndef REDUCEDSVXFONT /************************************************************************* * class SvxDoCapitals - * die virtuelle Methode Do wird von SvxFont::DoOnCapitals abwechselnd mit - * den "Gross-" und "Kleinbuchstaben"-Teilen aufgerufen. - * Die Ableitungen von SvxDoCapitals erfuellen diese Methode mit Leben. + * The virtual Method Do si called by SvxFont::DoOnCapitals alternately + * the uppercase and lowercase parts. The derivate of SvxDoCapitals fills + * this method with life. *************************************************************************/ class SvxDoCapitals @@ -235,8 +222,8 @@ void SvxDoCapitals::Do( const XubString &/*_rTxt*/, const xub_StrLen /*_nIdx*/, /************************************************************************* * SvxFont::DoOnCapitals() const - * zerlegt den String in Gross- und Kleinbuchstaben und ruft jeweils die - * Methode SvxDoCapitals::Do( ) auf. + * Decomposes the String into uppercase and lowercase letters and then + * calls the method SvxDoCapitals::Do( ). *************************************************************************/ void SvxFont::DoOnCapitals(SvxDoCapitals &rDo, const xub_StrLen nPartLen) const @@ -262,11 +249,11 @@ void SvxFont::DoOnCapitals(SvxDoCapitals &rDo, const xub_StrLen nPartLen) const while( nPos < nTxtLen ) { - // Erst kommen die Upper-Chars dran + // first in turn are teh uppercase letters - // 4251: Es gibt Zeichen, die Upper _und_ Lower sind (z.B. das Blank). - // Solche Zweideutigkeiten fuehren ins Chaos, deswegen werden diese - // Zeichen der Menge Lower zugeordnet ! + // There are characters that are both upper- and lower-case L (eg blank) + // Such ambiguities lead to chaos, this is why these characters are + // allocated to the lowercase characters! while( nPos < nTxtLen ) { @@ -297,7 +284,7 @@ void SvxFont::DoOnCapitals(SvxDoCapitals &rDo, const xub_StrLen nPartLen) const nOldPos = nPos; } - // Nun werden die Lower-Chars verarbeitet (ohne Blanks) + // Now the lowercase are processed (without blanks) while( nPos < nTxtLen ) { sal_uInt32 nCharacterType = aCharClass.getCharacterType( aCharString, 0 ); @@ -327,7 +314,7 @@ void SvxFont::DoOnCapitals(SvxDoCapitals &rDo, const xub_StrLen nPartLen) const nOldPos = nPos; } - // Nun werden die Blanks verarbeitet + // Now the blanks are<processed while( nPos < nTxtLen && CH_BLANK == aCharString && ++nPos < nTxtLen ) aCharString = rTxt.GetChar( nPos + nIdx ); @@ -357,9 +344,6 @@ void SvxFont::DoOnCapitals(SvxDoCapitals &rDo, const xub_StrLen nPartLen) const rDo.DoSpace( TRUE ); } -/************************************************************************** - * SvxFont::SetPhysFont() - *************************************************************************/ void SvxFont::SetPhysFont( OutputDevice *pOut ) const { @@ -380,9 +364,6 @@ void SvxFont::SetPhysFont( OutputDevice *pOut ) const } } -/************************************************************************* - * SvxFont::ChgPhysFont() - *************************************************************************/ Font SvxFont::ChgPhysFont( OutputDevice *pOut ) const { @@ -391,9 +372,6 @@ Font SvxFont::ChgPhysFont( OutputDevice *pOut ) const return aOldFont; } -/************************************************************************* - * SvxFont::GetPhysTxtSize() - *************************************************************************/ Size SvxFont::GetPhysTxtSize( const OutputDevice *pOut, const XubString &rTxt, const xub_StrLen nIdx, const xub_StrLen nLen ) const @@ -476,22 +454,19 @@ Size SvxFont::QuickGetTextSize( const OutputDevice *pOut, const XubString &rTxt, { for ( xub_StrLen i = 0; i < nLen; i++ ) pDXArray[i] += ( (i+1) * long( nKern ) ); - // Der letzte ist um ein nKern zu gross: + // The last one is a nKern too big: pDXArray[nLen-1] -= nKern; } } return aTxtSize; } -/************************************************************************* - * SvxFont::GetTxtSize() - *************************************************************************/ Size SvxFont::GetTxtSize( const OutputDevice *pOut, const XubString &rTxt, const xub_StrLen nIdx, const xub_StrLen nLen ) { xub_StrLen nTmp = nLen; - if ( nTmp == STRING_LEN ) // schon initialisiert? + if ( nTmp == STRING_LEN ) // already initialized? nTmp = rTxt.Len(); Font aOldFont( ChgPhysFont((OutputDevice *)pOut) ); Size aTxtSize; @@ -504,9 +479,6 @@ Size SvxFont::GetTxtSize( const OutputDevice *pOut, const XubString &rTxt, return aTxtSize; } -/************************************************************************* - * SvxFont::DrawText() - *************************************************************************/ void SvxFont::DrawText( OutputDevice *pOut, const Point &rPos, const XubString &rTxt, @@ -514,7 +486,7 @@ void SvxFont::DrawText( OutputDevice *pOut, { if( !nLen || !rTxt.Len() ) return; xub_StrLen nTmp = nLen; - if ( nTmp == STRING_LEN ) // schon initialisiert? + if ( nTmp == STRING_LEN ) // already initialized? nTmp = rTxt.Len(); Point aPos( rPos ); if ( nEsc ) @@ -543,7 +515,7 @@ void SvxFont::QuickDrawText( OutputDevice *pOut, const Point &rPos, const XubString &rTxt, const xub_StrLen nIdx, const xub_StrLen nLen, const sal_Int32* pDXArray ) const { - // Font muss ins OutputDevice selektiert sein... + // Font has to be selected in OutputDevice... if ( !IsCaseMap() && !IsCapital() && !IsKern() && !IsEsc() ) { pOut->DrawTextArray( rPos, rTxt, pDXArray, nIdx, nLen ); @@ -566,7 +538,7 @@ void SvxFont::QuickDrawText( OutputDevice *pOut, if( IsCapital() ) { - DBG_ASSERT( !pDXArray, "DrawCapital nicht fuer TextArray!" ); + DBG_ASSERT( !pDXArray, "DrawCapital not for TextArray!" ); DrawCapital( pOut, aPos, rTxt, nIdx, nLen ); } else @@ -590,7 +562,6 @@ void SvxFont::QuickDrawText( OutputDevice *pOut, } } -// ----------------------------------------------------------------------- void SvxFont::DrawPrev( OutputDevice *pOut, Printer* pPrinter, const Point &rPos, const XubString &rTxt, @@ -600,7 +571,7 @@ void SvxFont::DrawPrev( OutputDevice *pOut, Printer* pPrinter, return; xub_StrLen nTmp = nLen; - if ( nTmp == STRING_LEN ) // schon initialisiert? + if ( nTmp == STRING_LEN ) // already initialized? nTmp = rTxt.Len(); Point aPos( rPos ); @@ -652,7 +623,6 @@ void SvxFont::DrawPrev( OutputDevice *pOut, Printer* pPrinter, pPrinter->SetFont( aOldPrnFont ); } -// ----------------------------------------------------------------------- SvxFont& SvxFont::operator=( const Font& rFont ) { @@ -671,13 +641,6 @@ SvxFont& SvxFont::operator=( const SvxFont& rFont ) return *this; } - -/************************************************************************* - * class SvxDoGetCapitalSize - * wird von SvxFont::GetCapitalSize() zur Berechnung der TxtSize bei - * eingestellten Kapitaelchen benutzt. - *************************************************************************/ - class SvxDoGetCapitalSize : public SvxDoCapitals { protected: @@ -723,11 +686,6 @@ void SvxDoGetCapitalSize::Do( const XubString &_rTxt, const xub_StrLen _nIdx, aTxtSize.Width() += ( _nLen * long( nKern ) ); } -/************************************************************************* - * SvxFont::GetCapitalSize() - * berechnet TxtSize, wenn Kapitaelchen eingestellt sind. - *************************************************************************/ - Size SvxFont::GetCapitalSize( const OutputDevice *pOut, const XubString &rTxt, const xub_StrLen nIdx, const xub_StrLen nLen) const { @@ -745,11 +703,6 @@ Size SvxFont::GetCapitalSize( const OutputDevice *pOut, const XubString &rTxt, return aTxtSize; } -/************************************************************************* - * class SvxDoDrawCapital - * wird von SvxFont::DrawCapital zur Ausgabe von Kapitaelchen benutzt. - *************************************************************************/ - class SvxDoDrawCapital : public SvxDoCapitals { protected: @@ -806,7 +759,7 @@ void SvxDoDrawCapital::Do( const XubString &_rTxt, const xub_StrLen _nIdx, BYTE nProp = 0; Size aPartSize; - // Einstellen der gewuenschten Fonts + // Set the desired font FontUnderline eUnder = pFont->GetUnderline(); FontStrikeout eStrike = pFont->GetStrikeout(); pFont->SetUnderline( UNDERLINE_NONE ); @@ -828,7 +781,7 @@ void SvxDoDrawCapital::Do( const XubString &_rTxt, const xub_StrLen _nIdx, } pOut->DrawStretchText(aPos,nWidth-nKern,_rTxt,_nIdx,_nLen); - // Font restaurieren + // Restore Font pFont->SetUnderline( eUnder ); pFont->SetStrikeout( eStrike ); if ( !bUpper ) @@ -839,7 +792,7 @@ void SvxDoDrawCapital::Do( const XubString &_rTxt, const xub_StrLen _nIdx, } /************************************************************************* - * SvxFont::DrawCapital() gibt Kapitaelchen aus. + * SvxFont::DrawCapital() draws the uppercase letter. *************************************************************************/ void SvxFont::DrawCapital( OutputDevice *pOut, diff --git a/editeng/source/items/svxitems.src b/editeng/source/items/svxitems.src index a6b6a7e037de..5b9d01660286 100644 --- a/editeng/source/items/svxitems.src +++ b/editeng/source/items/svxitems.src @@ -28,7 +28,7 @@ #include <editeng/editrids.hrc> // pragma ------------------------------------------------------------------- - // Value-Strings ------------------------------------------------------------ + // Value strings ------------------------------------------------------------ String RID_SVXITEMS_TRUE { Text [ en-US ] = "True" ; diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx index fc73703d3957..0d172cf481bf 100644 --- a/editeng/source/items/textitem.cxx +++ b/editeng/source/items/textitem.cxx @@ -110,7 +110,6 @@ #include <editeng/itemtype.hxx> #include <editeng/eerdll.hxx> -// #90477# #include <tools/tenccvt.hxx> #define STORE_UNICODE_MAGIC_MARKER 0xFE331188 @@ -119,7 +118,7 @@ using namespace ::rtl; using namespace ::com::sun::star; using namespace ::com::sun::star::text; -// Konvertierung fuer UNO +// Conversion for UNO #define TWIP_TO_MM100(TWIP) ((TWIP) >= 0 ? (((TWIP)*127L+36L)/72L) : (((TWIP)*127L-36L)/72L)) #define MM100_TO_TWIP(MM100) ((MM100) >= 0 ? (((MM100)*72L+63L)/127L) : (((MM100)*72L-63L)/127L)) #define TWIP_TO_MM100_UNSIGNED(TWIP) ((((TWIP)*127L+36L)/72L)) @@ -260,7 +259,6 @@ SvxFontItem::SvxFontItem( const FontFamily eFam, const XubString& aName, bool SvxFontItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const { -// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; switch(nMemberId) { @@ -290,7 +288,6 @@ bool SvxFontItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const // ----------------------------------------------------------------------- bool SvxFontItem::PutValue( const uno::Any& rVal, BYTE nMemberId) { -// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; switch(nMemberId) { @@ -368,7 +365,7 @@ int SvxFontItem::operator==( const SfxPoolItem& rAttr ) const if ( ePitch != rItem.ePitch || eTextEncoding != rItem.eTextEncoding ) { bRet = sal_False; - DBG_WARNING( "FontItem::operator==(): nur Pitch oder rtl_TextEncoding unterschiedlich" ); + DBG_WARNING( "FontItem::operator==(): only pitch or rtl_TextEncoding different "); } } return bRet; @@ -389,9 +386,6 @@ SvStream& SvxFontItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const GetFamilyName().EqualsAscii( "StarSymbol", 0, sizeof("StarSymbol")-1 ) || GetFamilyName().EqualsAscii( "OpenSymbol", 0, sizeof("OpenSymbol")-1 ); - // #90477# rStrm << (BYTE) GetFamily() - // << (BYTE) GetPitch() - // << (BYTE)(bToBats ? RTL_TEXTENCODING_SYMBOL : GetStoreCharSet( GetCharSet(), (USHORT)rStrm.GetVersion() ) ); rStrm << (BYTE) GetFamily() << (BYTE) GetPitch() << (BYTE)(bToBats ? RTL_TEXTENCODING_SYMBOL : GetSOStoreTextEncoding(GetCharSet(), (sal_uInt16)rStrm.GetVersion())); @@ -401,7 +395,7 @@ SvStream& SvxFontItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const rStrm.WriteByteString(aStoreFamilyName); rStrm.WriteByteString(GetStyleName()); - // #96441# Kach for EditEngine, only set while creating clipboard stream. + // cach for EditEngine, only set while creating clipboard stream. if ( bEnableStoreUnicodeNames ) { sal_uInt32 nMagic = STORE_UNICODE_MAGIC_MARKER; @@ -429,10 +423,10 @@ SfxPoolItem* SvxFontItem::Create(SvStream& rStrm, USHORT) const // UNICODE: rStrm >> aStyle; rStrm.ReadByteString(aStyle); - // Task 91008/90471: set the "correct" textencoding + // Set the "correct" textencoding eFontTextEncoding = (BYTE)GetSOLoadTextEncoding( eFontTextEncoding, (USHORT)rStrm.GetVersion() ); - // irgendwann wandelte sich der StarBats vom ANSI- zum SYMBOL-Font + // at some point, the StarBats changes from ANSI font to SYMBOL font if ( RTL_TEXTENCODING_SYMBOL != eFontTextEncoding && aName.EqualsAscii("StarBats") ) eFontTextEncoding = RTL_TEXTENCODING_SYMBOL; @@ -505,7 +499,7 @@ SfxPoolItem* SvxPostureItem::Clone( SfxItemPool * ) const USHORT SvxPostureItem::GetValueCount() const { - return ITALIC_NORMAL + 1; // auch ITALIC_NONE geh"ort dazu + return ITALIC_NORMAL + 1; // ITALIC_NONE also belongs here } // ----------------------------------------------------------------------- @@ -574,7 +568,6 @@ XubString SvxPostureItem::GetValueTextByPos( USHORT nPos ) const bool SvxPostureItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const { -// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; switch( nMemberId ) { @@ -582,7 +575,7 @@ bool SvxPostureItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const rVal = Bool2Any(GetBoolValue()); break; case MID_POSTURE: - rVal <<= (awt::FontSlant)GetValue(); // Werte von awt::FontSlant und FontItalic sind gleich + rVal <<= (awt::FontSlant)GetValue(); // values from awt::FontSlant and FontItalic are equal break; } return true; @@ -590,7 +583,6 @@ bool SvxPostureItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const bool SvxPostureItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) { -// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; switch( nMemberId ) { @@ -668,7 +660,7 @@ void SvxWeightItem::SetBoolValue( sal_Bool bVal ) USHORT SvxWeightItem::GetValueCount() const { - return WEIGHT_BLACK; // WEIGHT_DONTKNOW geh"ort nicht dazu + return WEIGHT_BLACK; // WEIGHT_DONTKNOW does not belong } // ----------------------------------------------------------------------- @@ -729,7 +721,6 @@ XubString SvxWeightItem::GetValueTextByPos( USHORT nPos ) const bool SvxWeightItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const { -// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; switch( nMemberId ) { @@ -747,7 +738,6 @@ bool SvxWeightItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const bool SvxWeightItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) { -// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; switch( nMemberId ) { @@ -778,7 +768,7 @@ SvxFontHeightItem::SvxFontHeightItem( const ULONG nSz, const USHORT nId ) : SfxPoolItem( nId ) { - SetHeight( nSz,nPrp ); // mit den Prozenten rechnen + SetHeight( nSz,nPrp ); // calculate in percentage } // ----------------------------------------------------------------------- @@ -798,8 +788,8 @@ SvStream& SvxFontHeightItem::Store( SvStream& rStrm , USHORT nItemVersion ) cons rStrm << GetProp() << (USHORT)GetPropUnit(); else { - // JP 30.06.98: beim Export in alte Versionen geht die relative - // Angabe verloren, wenn es keine Prozentuale ist + // When exporting to the old versions the relative information is lost + // when there is no percentage USHORT _nProp = GetProp(); if( SFX_MAPUNIT_RELATIVE != GetPropUnit() ) _nProp = 100; @@ -846,8 +836,8 @@ int SvxFontHeightItem::operator==( const SfxPoolItem& rItem ) const bool SvxFontHeightItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const { - // In StarOne sind im uno::Any immer 1/100mm. Ueber die MemberId wird - // gesteuert, ob der Wert im Item 1/100mm oder Twips sind. + // In StarOne is the uno::Any always 1/100mm. Through the MemberId it is + // controlled if the value in the Item should be 1/100mm or Twips. sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -857,8 +847,8 @@ bool SvxFontHeightItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const { ::com::sun::star::frame::status::FontHeight aFontHeight; - // Point (also Twips) sind gefragt, - // also umrechnen, wenn CONVERT_TWIPS nicht gesetzt ist + // Point (i.e. Twips) is asked for, thus re-calculate if + // CONVERT_TWIPS is not set. if( bConvert ) { long nTwips = bConvert ? nHeight : MM100_TO_TWIP_UNSIGNED(nHeight); @@ -898,8 +888,8 @@ bool SvxFontHeightItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const break; case MID_FONTHEIGHT: { - // Point (also Twips) sind gefragt, - // also umrechnen, wenn CONVERT_TWIPS nicht gesetzt ist + // Point (i.e. Twips) is asked for, thus re-calculate if + // CONVERT_TWIPS is not set. if( bConvert ) { long nTwips = bConvert ? nHeight : MM100_TO_TWIP_UNSIGNED(nHeight); @@ -944,7 +934,7 @@ bool SvxFontHeightItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const return sal_True; } -// Relative Abweichung aus der Hoehe herausrechnen +// Calculate the relative deviation from the expected height. sal_uInt32 lcl_GetRealHeight_Impl(sal_uInt32 nHeight, sal_uInt16 nProp, SfxMapUnit eProp, sal_Bool bCoreInTwip) { sal_uInt32 nRet = nHeight; @@ -964,11 +954,11 @@ sal_uInt32 lcl_GetRealHeight_Impl(sal_uInt32 nHeight, sal_uInt16 nProp, SfxMapUn } break; case SFX_MAPUNIT_100TH_MM: - //dann ist die Core doch wohl auch in 1/100 mm + //then the core is surely also in 1/100 mm nDiff = (short)nProp; break; case SFX_MAPUNIT_TWIP: - // hier doch sicher TWIP + // Here surely TWIP nDiff = ((short)nProp); break; default: ;//prevent warning @@ -998,7 +988,7 @@ bool SvxFontHeightItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) nHeight = (long)( fPoint * 20.0 + 0.5 ); // Twips if (!bConvert) - nHeight = TWIP_TO_MM100_UNSIGNED(nHeight); // umrechnen, wenn das Item 1/100mm enthaelt + nHeight = TWIP_TO_MM100_UNSIGNED(nHeight); // Convert, if the item contains 1/100mm nProp = aFontHeight.Prop; } @@ -1023,7 +1013,7 @@ bool SvxFontHeightItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) nHeight = (long)( fPoint * 20.0 + 0.5 ); // Twips if (!bConvert) - nHeight = TWIP_TO_MM100_UNSIGNED(nHeight); // umrechnen, wenn das Item 1/100mm enthaelt + nHeight = TWIP_TO_MM100_UNSIGNED(nHeight); // Convert, if the item contains 1/100mm } break; case MID_FONTHEIGHT_PROP: @@ -1344,7 +1334,7 @@ SfxPoolItem* SvxTextLineItem::Clone( SfxItemPool * ) const USHORT SvxTextLineItem::GetValueCount() const { - return UNDERLINE_DOTTED + 1; // auch UNDERLINE_NONE geh"ort dazu + return UNDERLINE_DOTTED + 1; // UNDERLINE_NONE also belongs here } // ----------------------------------------------------------------------- @@ -1396,13 +1386,12 @@ SfxItemPresentation SvxTextLineItem::GetPresentation XubString SvxTextLineItem::GetValueTextByPos( USHORT /*nPos*/ ) const { - DBG_ERROR("SvxTextLineItem::GetValueTextByPos: Pure virtual method"); + OSL_FAIL("SvxTextLineItem::GetValueTextByPos: Pure virtual method"); return XubString(); } bool SvxTextLineItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const { -// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; switch(nMemberId) { @@ -1425,7 +1414,6 @@ bool SvxTextLineItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const bool SvxTextLineItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) { -// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; sal_Bool bRet = sal_True; switch(nMemberId) @@ -1569,7 +1557,7 @@ void SvxCrossedOutItem::SetBoolValue( sal_Bool bVal ) USHORT SvxCrossedOutItem::GetValueCount() const { - return STRIKEOUT_DOUBLE + 1; // auch STRIKEOUT_NONE geh"ort dazu + return STRIKEOUT_DOUBLE + 1; // STRIKEOUT_NONE belongs also here } // ----------------------------------------------------------------------- @@ -1630,7 +1618,6 @@ XubString SvxCrossedOutItem::GetValueTextByPos( USHORT nPos ) const bool SvxCrossedOutItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const { -// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; switch(nMemberId) { @@ -1646,7 +1633,6 @@ bool SvxCrossedOutItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const bool SvxCrossedOutItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) { -// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; switch(nMemberId) { @@ -2000,7 +1986,7 @@ USHORT SvxColorItem::GetVersion( USHORT nFFVer ) const DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer || SOFFICE_FILEFORMAT_40==nFFVer || SOFFICE_FILEFORMAT_50==nFFVer, - "SvxColorItem: Gibt es ein neues Fileformat?" ); + "SvxColorItem: Is there a new file format? "); return SOFFICE_FILEFORMAT_50 >= nFFVer ? VERSION_USEAUTOCOLOR : 0; } @@ -2124,8 +2110,6 @@ SfxPoolItem* SvxCharSetColorItem::Clone( SfxItemPool * ) const SvStream& SvxCharSetColorItem::Store( SvStream& rStrm , USHORT /*nItemVersion*/ ) const { - // #90477# rStrm << (BYTE) GetStoreCharSet( GetCharSet(), (USHORT)rStrm.GetVersion() ) - // << GetValue(); rStrm << (BYTE)GetSOStoreTextEncoding(GetCharSet(), (sal_uInt16)rStrm.GetVersion()) << GetValue(); return rStrm; @@ -2338,7 +2322,6 @@ bool SvxCaseMapItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const sal_Int16 nRet = style::CaseMap::NONE; switch( GetValue() ) { -// case SVX_CASEMAP_NOT_MAPPED : nRet = style::CaseMap::NONE ; break; case SVX_CASEMAP_VERSALIEN : nRet = style::CaseMap::UPPERCASE; break; case SVX_CASEMAP_GEMEINE : nRet = style::CaseMap::LOWERCASE; break; case SVX_CASEMAP_TITEL : nRet = style::CaseMap::TITLE ; break; @@ -2512,7 +2495,6 @@ void SvxEscapementItem::SetEnumValue( USHORT nVal ) bool SvxEscapementItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const { -// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; switch(nMemberId) { @@ -2531,7 +2513,6 @@ bool SvxEscapementItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const bool SvxEscapementItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) { -// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; switch(nMemberId) { @@ -2648,7 +2629,6 @@ SfxItemPresentation SvxLanguageItem::GetPresentation bool SvxLanguageItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const { -// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; switch(nMemberId) { @@ -2665,7 +2645,6 @@ bool SvxLanguageItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const bool SvxLanguageItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) { -// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; switch(nMemberId) { @@ -2784,7 +2763,7 @@ SfxItemPresentation SvxNoHyphenItem::GetPresentation } /* - * Dummy-Item fuer ToolBox-Controls: + * Dummy item for ToolBox controls: * */ @@ -2974,7 +2953,6 @@ SfxItemPresentation SvxEmphasisMarkItem::GetPresentation bool SvxEmphasisMarkItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const { -// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; switch( nMemberId ) { @@ -3001,7 +2979,6 @@ bool SvxEmphasisMarkItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const bool SvxEmphasisMarkItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) { -// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; sal_Bool bRet = true; switch( nMemberId ) @@ -3035,7 +3012,7 @@ USHORT SvxEmphasisMarkItem::GetVersion( USHORT nFFVer ) const DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer || SOFFICE_FILEFORMAT_40==nFFVer || SOFFICE_FILEFORMAT_50==nFFVer, - "SvxEmphasisMarkItem: Gibt es ein neues Fileformat?" ); + "SvxEmphasisMarkItem: Is there a new file format? "); return SOFFICE_FILEFORMAT_50 > nFFVer ? USHRT_MAX : 0; } @@ -3080,7 +3057,6 @@ SfxPoolItem* SvxTwoLinesItem::Clone( SfxItemPool* ) const bool SvxTwoLinesItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId ) const { -// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; sal_Bool bRet = true; switch( nMemberId ) @@ -3114,7 +3090,6 @@ bool SvxTwoLinesItem::QueryValue( com::sun::star::uno::Any& rVal, bool SvxTwoLinesItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId ) { -// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; sal_Bool bRet = sal_False; OUString s; @@ -3266,7 +3241,6 @@ SfxItemPresentation SvxCharRotateItem::GetPresentation( bool SvxCharRotateItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId ) const { -// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; bool bRet = true; switch( nMemberId ) @@ -3287,7 +3261,6 @@ bool SvxCharRotateItem::QueryValue( com::sun::star::uno::Any& rVal, bool SvxCharRotateItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId ) { -// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; bool bRet = true; switch( nMemberId ) @@ -3342,7 +3315,7 @@ SfxPoolItem* SvxCharScaleWidthItem::Create( SvStream& rStrm, USHORT ) const if ( Which() == EE_CHAR_FONTWIDTH ) { - // #87271#: Was a SvxFontWidthItem in 5.2 + // Was a SvxFontWidthItem in 5.2 // USHORT nFixWidth, USHORT nPropWidth. // nFixWidth has never been used... rStrm >> nVal; @@ -3417,7 +3390,7 @@ bool SvxCharScaleWidthItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ ) return true; } - DBG_ERROR( "SvxCharScaleWidthItem::PutValue - Wrong type!" ); + OSL_FAIL( "SvxCharScaleWidthItem::PutValue - Wrong type!" ); return false; } @@ -3504,7 +3477,6 @@ SfxItemPresentation SvxCharReliefItem::GetPresentation bool SvxCharReliefItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId ) { -// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; bool bRet = true; switch( nMemberId ) @@ -3529,7 +3501,6 @@ bool SvxCharReliefItem::PutValue( const com::sun::star::uno::Any& rVal, bool SvxCharReliefItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId ) const { -// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; bool bRet = true; switch( nMemberId ) diff --git a/editeng/source/items/writingmodeitem.cxx b/editeng/source/items/writingmodeitem.cxx index 8120b9ddf76f..bcf47dd222f7 100644 --- a/editeng/source/items/writingmodeitem.cxx +++ b/editeng/source/items/writingmodeitem.cxx @@ -39,7 +39,6 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::text; -// class SvxWritingModeItem ------------------------------------------------- TYPEINIT1_FACTORY(SvxWritingModeItem, SfxUInt16Item, new SvxWritingModeItem(com::sun::star::text::WritingMode_LR_TB, 0)); @@ -66,13 +65,13 @@ SfxPoolItem* SvxWritingModeItem::Clone( SfxItemPool * ) const SfxPoolItem* SvxWritingModeItem::Create( SvStream & , USHORT ) const { - DBG_ERROR("SvxWritingModeItem should not be streamed!"); + OSL_FAIL("SvxWritingModeItem should not be streamed!"); return NULL; } SvStream& SvxWritingModeItem::Store( SvStream & rStrm, USHORT ) const { - DBG_ERROR("SvxWritingModeItem should not be streamed!"); + OSL_FAIL("SvxWritingModeItem should not be streamed!"); return rStrm; } diff --git a/editeng/source/items/xmlcnitm.cxx b/editeng/source/items/xmlcnitm.cxx index 395bbcd9ef5a..9c43dd5b2535 100644 --- a/editeng/source/items/xmlcnitm.cxx +++ b/editeng/source/items/xmlcnitm.cxx @@ -39,7 +39,6 @@ using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::xml; -// ------------------------------------------------------------------------ TYPEINIT1(SvXMLAttrContainerItem, SfxPoolItem); |