diff options
author | Vladimir Glazunov <vg@openoffice.org> | 2010-02-15 15:55:35 +0100 |
---|---|---|
committer | Vladimir Glazunov <vg@openoffice.org> | 2010-02-15 15:55:35 +0100 |
commit | 5425bea512ea8ee87fb5ee34d0587936101c5d3a (patch) | |
tree | 0236c6da85e124b43b1933a82abdcf8963cec36c | |
parent | 919bd854d2257cfdbeaeb4e086f83fa8409f8e58 (diff) | |
parent | 07e314f63e3f1f3649e8ba91f36758519d585183 (diff) |
CWS-TOOLING: integrate CWS cmcfixes71
-rw-r--r-- | connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx | 12 | ||||
-rw-r--r-- | connectivity/source/commontools/FValue.cxx | 10 | ||||
-rw-r--r-- | scripting/source/pyprov/mailmerge.py | 9 | ||||
-rw-r--r-- | svx/source/form/filtnav.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdoedge.cxx | 8 | ||||
-rw-r--r-- | svx/source/svdraw/svdopath.cxx | 2 | ||||
-rw-r--r-- | vbahelper/source/vbahelper/vbahelper.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/core/SettingsExportHelper.cxx | 8 | ||||
-rw-r--r-- | xmloff/source/draw/shapeexport4.cxx | 2 |
9 files changed, 29 insertions, 28 deletions
diff --git a/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx b/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx index afa53652d4e6..e7727c500ce1 100644 --- a/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx +++ b/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx @@ -764,7 +764,7 @@ void SAL_CALL ODatabaseMetaDataResultSet::initialize( const Sequence< Any >& _aA break; case TypeClass_BYTE: { - sal_Int8 nValue; + sal_Int8 nValue(0); *pRowIter >>= nValue; aValue = new ORowSetValueDecorator(ORowSetValue(nValue)); } @@ -772,7 +772,7 @@ void SAL_CALL ODatabaseMetaDataResultSet::initialize( const Sequence< Any >& _aA case TypeClass_SHORT: case TypeClass_UNSIGNED_SHORT: { - sal_Int16 nValue; + sal_Int16 nValue(0); *pRowIter >>= nValue; aValue = new ORowSetValueDecorator(ORowSetValue(nValue)); } @@ -780,7 +780,7 @@ void SAL_CALL ODatabaseMetaDataResultSet::initialize( const Sequence< Any >& _aA case TypeClass_LONG: case TypeClass_UNSIGNED_LONG: { - sal_Int32 nValue; + sal_Int32 nValue(0); *pRowIter >>= nValue; aValue = new ORowSetValueDecorator(ORowSetValue(nValue)); } @@ -788,21 +788,21 @@ void SAL_CALL ODatabaseMetaDataResultSet::initialize( const Sequence< Any >& _aA case TypeClass_HYPER: case TypeClass_UNSIGNED_HYPER: { - sal_Int64 nValue; + sal_Int64 nValue(0); *pRowIter >>= nValue; aValue = new ORowSetValueDecorator(ORowSetValue(nValue)); } break; case TypeClass_FLOAT: { - float nValue; + float nValue(0.0); *pRowIter >>= nValue; aValue = new ORowSetValueDecorator(ORowSetValue(nValue)); } break; case TypeClass_DOUBLE: { - double nValue; + double nValue(0.0); *pRowIter >>= nValue; aValue = new ORowSetValueDecorator(ORowSetValue(nValue)); } diff --git a/connectivity/source/commontools/FValue.cxx b/connectivity/source/commontools/FValue.cxx index f434d775f87c..596ff3ed147e 100644 --- a/connectivity/source/commontools/FValue.cxx +++ b/connectivity/source/commontools/FValue.cxx @@ -2136,35 +2136,35 @@ void ORowSetValue::fill(const Any& _rValue) } case TypeClass_FLOAT: { - float aDummy; + float aDummy(0.0); _rValue >>= aDummy; (*this) = aDummy; break; } case TypeClass_DOUBLE: { - double aDummy; + double aDummy(0.0); _rValue >>= aDummy; (*this) = aDummy; break; } case TypeClass_BYTE: { - sal_Int8 aDummy; + sal_Int8 aDummy(0); _rValue >>= aDummy; (*this) = aDummy; break; } case TypeClass_SHORT: { - sal_Int16 aDummy; + sal_Int16 aDummy(0); _rValue >>= aDummy; (*this) = aDummy; break; } case TypeClass_LONG: { - sal_Int32 aDummy; + sal_Int32 aDummy(0); _rValue >>= aDummy; (*this) = aDummy; break; diff --git a/scripting/source/pyprov/mailmerge.py b/scripting/source/pyprov/mailmerge.py index c8f7b6765261..f9c2f0f70b09 100644 --- a/scripting/source/pyprov/mailmerge.py +++ b/scripting/source/pyprov/mailmerge.py @@ -37,6 +37,7 @@ from email import Encoders from email.Header import Header from email.MIMEMultipart import MIMEMultipart from email.Utils import formatdate +from email.Utils import formataddr import sys, smtplib, imaplib, poplib @@ -123,8 +124,8 @@ class PyMailSMTPService(unohelper.Base, XSmtpService): bccrecipients = xMailMessage.getBccRecipients() if dbg: print >> sys.stderr, "PyMailSMPTService subject", subject - print >> sys.stderr, "PyMailSMPTService from", sendername.encode('utf-8') - print >> sys.stderr, "PyMailSMTPService from", sendermail + print >> sys.stderr, "PyMailSMPTService from", sendername.encode('utf-8'), sendermail + print >> sys.stderr, "PyMailSMTPService from", formataddr((sendername.encode('utf-8'), sendermail)) print >> sys.stderr, "PyMailSMPTService send to", recipients attachments = xMailMessage.getAttachments() @@ -149,10 +150,8 @@ class PyMailSMTPService(unohelper.Base, XSmtpService): else: msg = textmsg - hdr = Header(sendername, 'utf-8') - hdr.append('<'+sendermail+'>','us-ascii') msg['Subject'] = subject - msg['From'] = hdr + msg['From'] = formataddr((sendername.encode('utf-8'), sendermail)) msg['To'] = COMMASPACE.join(recipients) if len(ccrecipients): msg['Cc'] = COMMASPACE.join(ccrecipients) diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx index f3a5a67d39e6..ec30ae64b21d 100644 --- a/svx/source/form/filtnav.cxx +++ b/svx/source/form/filtnav.cxx @@ -374,10 +374,12 @@ void FmFilterAdapter::AddOrRemoveListener( const Reference< XIndexAccess >& _rxC Reference< XFilterController > xController( xElement, UNO_QUERY ); OSL_ENSURE( xController.is(), "FmFilterAdapter::InsertElements: no XFilterController, cannot sync data!" ); if ( xController.is() ) + { if ( _bAdd ) xController->addFilterControllerListener( this ); else xController->removeFilterControllerListener( this ); + } } } diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx index c45f9509b024..d2af93ec14f0 100644 --- a/svx/source/svdraw/svdoedge.cxx +++ b/svx/source/svdraw/svdoedge.cxx @@ -1041,7 +1041,7 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec if (bCase29) { // und nun noch dafuer sorgen, dass das // umzingelte Obj nicht durchquert wird - if (aBewR1.Center().Y()<aBewR2.Center().Y() != bObenLang) { + if ((aBewR1.Center().Y()<aBewR2.Center().Y()) != bObenLang) { aMeeting.X()=aBewR2.Right(); } else { aMeeting.X()=aBewR1.Left(); @@ -1101,7 +1101,7 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec if (bCase29) { // und nun noch dafuer sorgen, dass das // umzingelte Obj nicht durchquert wird - if (aBewR1.Center().X()<aBewR2.Center().X() != bLinksLang) { + if ((aBewR1.Center().X()<aBewR2.Center().X()) != bLinksLang) { aMeeting.Y()=aBewR2.Bottom(); } else { aMeeting.Y()=aBewR1.Top(); @@ -1277,10 +1277,10 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec Point aP3(aXP1[3]); Point aP4(aXP1[4]); if (aP1.Y()==aP2.Y()) { // beide Linien Horz - if (aP1.X()<aP2.X()==aP3.X()<aP4.X()) cForm='S'; + if ((aP1.X()<aP2.X())==(aP3.X()<aP4.X())) cForm='S'; else cForm='C'; } else { // sonst beide Linien Vert - if (aP1.Y()<aP2.Y()==aP3.Y()<aP4.Y()) cForm='S'; + if ((aP1.Y()<aP2.Y())==(aP3.Y()<aP4.Y())) cForm='S'; else cForm='C'; } } else cForm='4'; // sonst der 3. Fall mit 5 Linien diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx index dfad9824a8fd..21d100bf3377 100644 --- a/svx/source/svdraw/svdopath.cxx +++ b/svx/source/svdraw/svdopath.cxx @@ -406,7 +406,7 @@ Point ImpPathCreateUser::CalcLine(const Point& aCsr, long nDirX, long nDirY, Sdr y2=BigMulDiv(x,nDirY,nDirX); long l1=Abs(x1)+Abs(y1); long l2=Abs(x2)+Abs(y2); - if (l1<=l2 !=(pView!=NULL && pView->IsBigOrtho())) { + if ((l1<=l2) != (pView!=NULL && pView->IsBigOrtho())) { x=x1; y=y1; } else { x=x2; y=y2; diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx index ca3a3b5d729f..bc412b6dd184 100644 --- a/vbahelper/source/vbahelper/vbahelper.cxx +++ b/vbahelper/source/vbahelper/vbahelper.cxx @@ -535,7 +535,7 @@ XLRGBToOORGB( sal_Int32 nCol ) uno::Any OORGBToXLRGB( const uno::Any& aCol ) { - sal_Int32 nCol; + sal_Int32 nCol(0); aCol >>= nCol; nCol = OORGBToXLRGB( nCol ); return uno::makeAny( nCol ); @@ -543,7 +543,7 @@ OORGBToXLRGB( const uno::Any& aCol ) uno::Any XLRGBToOORGB( const uno::Any& aCol ) { - sal_Int32 nCol; + sal_Int32 nCol(0); aCol >>= nCol; nCol = XLRGBToOORGB( nCol ); return uno::makeAny( nCol ); diff --git a/xmloff/source/core/SettingsExportHelper.cxx b/xmloff/source/core/SettingsExportHelper.cxx index e8bb000942d1..c5b3db7b8e72 100644 --- a/xmloff/source/core/SettingsExportHelper.cxx +++ b/xmloff/source/core/SettingsExportHelper.cxx @@ -108,28 +108,28 @@ void XMLSettingsExportHelper::CallTypeFunction(const uno::Any& rAny, break; case uno::TypeClass_SHORT: { - sal_Int16 nInt16; + sal_Int16 nInt16 = 0; aAny >>= nInt16; exportShort(nInt16, rName); } break; case uno::TypeClass_LONG: { - sal_Int32 nInt32; + sal_Int32 nInt32 = 0; aAny >>= nInt32; exportInt(nInt32, rName); } break; case uno::TypeClass_HYPER: { - sal_Int64 nInt64; + sal_Int64 nInt64 = 0; aAny >>= nInt64; exportLong(nInt64, rName); } break; case uno::TypeClass_DOUBLE: { - double fDouble; + double fDouble = 0.0; aAny >>= fDouble; exportDouble(fDouble, rName); } diff --git a/xmloff/source/draw/shapeexport4.cxx b/xmloff/source/draw/shapeexport4.cxx index e2e804eefb43..6dacdba12e32 100644 --- a/xmloff/source/draw/shapeexport4.cxx +++ b/xmloff/source/draw/shapeexport4.cxx @@ -1031,7 +1031,7 @@ void ImpExportEnhancedGeometry( SvXMLExport& rExport, const uno::Reference< bean { if ( rAdj.Value.getValueTypeClass() == uno::TypeClass_DOUBLE ) { - double fValue; + double fValue = 0.0; rAdj.Value >>= fValue; rUnitConverter.convertDouble( aStrBuffer, fValue ); } |