[Libreoffice-commits] .: binfilter/bf_sfx2 filter/source

Caolán McNamara caolan at kemper.freedesktop.org
Tue Jan 25 06:48:37 PST 2011


 binfilter/bf_sfx2/source/appl/sfx2_namecont.cxx  |    2 
 filter/source/msfilter/msdffimp.cxx              |   63 ++---------------------
 filter/source/msfilter/msocximex.cxx             |   16 ++---
 filter/source/msfilter/svdfppt.cxx               |   10 +--
 filter/source/xsltdialog/xmlfileview.cxx         |    4 -
 filter/source/xsltdialog/xmlfiltertestdialog.cxx |    4 -
 6 files changed, 19 insertions(+), 80 deletions(-)

New commits:
commit 751156dcaa8d6ad9b762434a7509db12d80284f0
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jan 25 12:35:45 2011 +0000

    WaE: gcc 4.6.0 various warnings

diff --git a/binfilter/bf_sfx2/source/appl/sfx2_namecont.cxx b/binfilter/bf_sfx2/source/appl/sfx2_namecont.cxx
index c39619b..1493258 100644
--- a/binfilter/bf_sfx2/source/appl/sfx2_namecont.cxx
+++ b/binfilter/bf_sfx2/source/appl/sfx2_namecont.cxx
@@ -624,7 +624,6 @@ namespace SfxContainer_Impl
 /*N*/
 /*N*/ 		INetURLObject aUserBasic60InetObj = aUserBasic60InetObj_1;
 /*N*/         String aFolder60 = aUserBasic60InetObj.GetMainURL( INetURLObject::NO_DECODE );
-/*N*/ 		bool bSecondTime = false;
 /*N*/ 	    if( mxSFI->isFolder( aFolder60 ) )
 /*N*/ 		{
 /*?*/ 			// #110101 Check if Standard folder exists and is complete
@@ -670,7 +669,6 @@ namespace SfxContainer_Impl
 /*?*/ 		}
 /*N*/ 		else
 /*?*/ 		{
-/*?*/ 			bSecondTime = true;
 /*?*/ 			aUserBasic60InetObj = aUserBasic60InetObj_2;
 /*?*/ 			aFolder60 = aUserBasic60InetObj.GetMainURL( INetURLObject::NO_DECODE );
 /*N*/ 		}
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 386bbfa..a1fcf10 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -411,7 +411,7 @@ SvStream& operator>>( SvStream& rIn, DffPropSet& rRec )
             // set flags that have to be set
             rRec.mpContents[ nRecType ] |= nContent;
             nContentEx |= ( nContent >> 16 );
-            rRec.Replace( nRecType, (void*)nContentEx );
+            rRec.Replace( nRecType, (void*)(sal_uIntPtr)nContentEx );
         }
         else
         {
@@ -470,7 +470,7 @@ SvStream& operator>>( SvStream& rIn, DffPropSet& rRec )
             }
             rRec.mpContents[ nRecType ] = nContent;
             rRec.mpFlags[ nRecType ] = aPropFlag;
-            rRec.Insert( nRecType, (void*)nContentEx );
+            rRec.Insert( nRecType, (void*)(sal_uIntPtr)nContentEx );
         }
     }
     aHd.SeekToEndOfRecord( rIn );
@@ -594,7 +594,7 @@ void DffPropSet::Merge( DffPropSet& rMaster ) const
             sal_uInt32 nNewContentEx = (sal_uInt32)(sal_uIntPtr)rMaster.GetCurObject();
             if ( ((DffPropSet*)this)->Seek( nRecType ) )
                 nNewContentEx |= (sal_uInt32)(sal_uIntPtr)GetCurObject();
-            ( (DffPropSet*) this )->Replace( nRecType, (void*)nNewContentEx );
+            ( (DffPropSet*) this )->Replace( nRecType, (void*)(sal_uIntPtr)nNewContentEx );
         }
         else
         {
@@ -669,7 +669,7 @@ void DffPropSet::SetPropertyValue( UINT32 nId, UINT32 nValue ) const
 {
     if ( !mpFlags[ nId ].bSet )
     {
-        ( (DffPropSet*) this )->Insert( nId, (void*)nValue );
+        ( (DffPropSet*) this )->Insert( nId, (void*)(sal_uIntPtr)nValue );
         ( (DffPropSet*) this )->mpFlags[ nId ].bSet = TRUE;
     }
     ( (DffPropSet*) this )->mpContents[ nId ] = nValue;
@@ -935,17 +935,14 @@ void SvxMSDffManager::SolveSolver( const SvxMSDffSolverContainer& rSolver )
             {
                 SdrObject*  pO;
                 sal_uInt32  nC, nSpFlags;
-                sal_Bool    bTail;
                 if ( !nN )
                 {
-                    bTail = sal_True;
                     pO = pPtr->pAObj;
                     nC = pPtr->ncptiA;
                     nSpFlags = pPtr->nSpFlagsA;
                 }
                 else
                 {
-                    bTail = sal_False;
                     pO = pPtr->pBObj;
                     nC = pPtr->ncptiB;
                     nSpFlags = pPtr->nSpFlagsB;
@@ -4947,7 +4944,6 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
             SfxItemSet	aSet( pSdrModel->GetItemPool() );
 
             sal_Bool	bIsConnector = ( ( aObjData.eShapeType >= mso_sptStraightConnector1 ) && ( aObjData.eShapeType <= mso_sptCurvedConnector5 ) );
-            sal_Bool	bIsCustomShape = sal_False;
             sal_Int32	nObjectRotation = mnFix16Angle;
             sal_uInt32	nSpFlags = aObjData.nSpFlags;
 
@@ -5275,8 +5271,6 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
                     EnhancedCustomShape2d aCustomShape2d( pRet );
                     aTextRect = aCustomShape2d.GetTextRect();
 
-                    bIsCustomShape = TRUE;
-
                     if( bIsConnector )
                     {
                         if( nObjectRotation )
@@ -6293,7 +6287,7 @@ void SvxMSDffManager::SetDgContainer( SvStream& rSt )
         DffRecordHeader aRecHd;
         rSt >> aRecHd;
         UINT32 nDrawingId = aRecHd.nRecInstance;
-        maDgOffsetTable.Insert( nDrawingId, (void*)nFilePos );
+        maDgOffsetTable.Insert( nDrawingId, (void*)(sal_uIntPtr)nFilePos );
         rSt.Seek( nFilePos );
     }
 }
@@ -6650,7 +6644,6 @@ BOOL SvxMSDffManager::GetShapeContainerData( SvStream& rSt,
 
     // wir wissen noch nicht, ob es eine TextBox ist
     MSO_SPT			eShapeType		= mso_sptNil;
-    MSO_WrapMode	eWrapMode		= mso_wrapSquare;
 //	BOOL			bIsTextBox		= FALSE;
 
     // Shape analysieren
@@ -6736,7 +6729,7 @@ BOOL SvxMSDffManager::GetShapeContainerData( SvStream& rSt,
                     break;
 
                     case DFF_Prop_WrapText :
-                        eWrapMode = (MSO_WrapMode)nPropVal;
+                        //TO-DO: eWrapMode = (MSO_WrapMode)nPropVal;
                     break;
 
                     default:
@@ -6758,50 +6751,6 @@ BOOL SvxMSDffManager::GetShapeContainerData( SvStream& rSt,
                     }
                     break;
                 }
-
-/*
-//JP 21.04.99: Bug 64510
-// alte Version, die unter OS/2 zu Compilerfehlern fuehrt und damit arge
-// Performance einbussen hat.
-
-                if( 0x4000 == ( nPropId & 0xC000 ) )// Bit gesetzt und gueltig?
-                {
-                    // Blip Property gefunden: BStore Idx vermerken!
-                    aInfo.nBStoreIdx = nPropVal;    // Index im BStore Container
-                    break;
-                }
-                else
-                if(    (    (    (DFF_Prop_txflTextFlow   == nPropId)
-                              || (DFF_Prop_Rotation       == nPropId)
-                              || (DFF_Prop_cdirFont       == nPropId) )
-                         && (0 != nPropVal) )
-
-                    || (    (DFF_Prop_gtextFStrikethrough == nPropId)
-                         && ( (0x20002000 & nPropVal)  == 0x20002000) ) // also DFF_Prop_gtextFVertical
-                    || (    (DFF_Prop_fc3DLightFace       == nPropId)
-                         && ( (0x00080008 & nPropVal)  == 0x00080008) )	// also DFF_Prop_f3D
-                  )
-                {
-                    bCanBeReplaced = FALSE;  // Mist: gedrehter Text oder 3D-Objekt!
-                }
-                else
-                if( DFF_Prop_WrapText == nPropId )
-                {
-                    eWrapMode = (MSO_WrapMode)nPropVal;
-                }
-                ////////////////////////////////////////////////////////////////
-                ////////////////////////////////////////////////////////////////
-                // keine weitere Property-Auswertung: folge beim Shape-Import //
-                ////////////////////////////////////////////////////////////////
-                ////////////////////////////////////////////////////////////////
-                else
-                if( 0x8000 & nPropId )
-                {
-                    // komplexe Prop gefunden: Laenge lesen und ueberspringen
-                    if(!SkipBytes( rSt, nPropVal )) return FALSE;
-                    nPropRead += nPropVal;
-                }
-*/
             }
             while( nPropRead < nLenShapePropTbl );
             rSt.Seek( nStartShapePropTbl + nLenShapePropTbl );
diff --git a/filter/source/msfilter/msocximex.cxx b/filter/source/msfilter/msocximex.cxx
index 3047c93..5ee4c1f 100644
--- a/filter/source/msfilter/msocximex.cxx
+++ b/filter/source/msfilter/msocximex.cxx
@@ -5094,8 +5094,6 @@ sal_Bool OCX_TabStrip::Read(SotStorageStream *pS)
     pS->Read(pBlockFlags, sizeof(pBlockFlags));
 
     bool bSize = false;
-    bool bMultiRow = false;
-    bool bTooltips = true;
     bool hasEmbeddedImage = false;
     sal_Int32 nameSize = 0;
     sal_Int32 tipStringSize = 0;
@@ -5145,8 +5143,8 @@ sal_Bool OCX_TabStrip::Read(SotStorageStream *pS)
         if ( nOptional32 == 2 )
             bHasTabs =false;
     }
-    if (pBlockFlags[1] & 0x04)
-        bMultiRow = true;
+    // (pBlockFlags[1] & 0x04) -> MultiRow is true
+
     if (pBlockFlags[1] & 0x08)
     {
         ReadAlign(pS, pS->Tell() - nStart, 4);
@@ -5159,8 +5157,8 @@ sal_Bool OCX_TabStrip::Read(SotStorageStream *pS)
         sal_Int32 nOptional32 = 0; // tabfixedheight
         *pS >> nOptional32;
     }
-    if (pBlockFlags[1] & 0x20)
-        bTooltips = false;
+
+    // (pBlockFlags[1] & 0x20) -> Tooltips is false
 
     if (pBlockFlags[1] & 0x80)
     {
@@ -6054,13 +6052,11 @@ sal_Bool OCX_ProgressBar::Read( SvStorageStream *pS )
     *pS >> fMin >> fMax;
     nMin = static_cast< sal_Int32 >( fMin );
     nMax = static_cast< sal_Int32 >( fMax );
-    bool bVisible = true;
     sal_uInt8 pUnknownFlags[4];
     pS->Read(pUnknownFlags,4);
 
-    // complete guess, but we don't handle visible anyway
-    if ( ( pUnknownFlags[2] & 0x8 ) &&  (  pUnknownFlags[2] & 0x2 ) )
-        bVisible = false;
+    //complete guess, but we don't handle visible anyway
+    //( ( pUnknownFlags[2] & 0x8 ) && ( pUnknownFlags[2] & 0x2 ) ) -> Visible is false
 
     sal_uInt32 nFlags;
     *pS >> nFlags;
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index e64bc65..10901e8 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -1931,7 +1931,6 @@ SdrObject* SdrPowerPointImport::ImportOLE( long nOLEId,
                                 if ( !pRet )
                                 {
                                     aNm = pOe->pShell->getEmbeddedObjectContainer().CreateUniqueObjectName();
-                                    ErrCode aErrCode = 0;
 
                                     // object is not an own object
                                     SotStorageRef xTarget = SotStorage::OpenOLEStorage( pOe->pShell->GetStorage(), aNm, STREAM_READWRITE );
@@ -1940,8 +1939,6 @@ SdrObject* SdrPowerPointImport::ImportOLE( long nOLEId,
                                         xObjStor->CopyTo( xTarget );
                                         if( !xTarget->GetError() )
                                             xTarget->Commit();
-                                        if( xTarget->GetError() )
-                                            aErrCode = xTarget->GetError();
                                     }
                                     xTarget.Clear();
 
@@ -2099,8 +2096,7 @@ void SdrPowerPointImport::SeekOle( SfxObjectShell* pShell, sal_uInt32 nFilterOpt
                                                                 *xOriginal	<< nIDoNotKnow1
                                                                                 << nIDoNotKnow2;
 
-                                                                UINT32 nSource, nToCopy, nBufSize;
-                                                                nSource = rStCtrl.Tell();
+                                                                UINT32 nToCopy, nBufSize;
                                                                 nToCopy = pHd->nRecLen;
                                                                 BYTE* pBuf = new BYTE[ 0x40000 ];	// 256KB Buffer
                                                                 if ( pBuf )
@@ -5284,13 +5280,13 @@ void PPTStyleTextPropReader::Init( SvStream& rIn, SdrPowerPointImport& rMan, con
             if ( !nChar )
                 break;
             if ( ( nChar & 0xff00 ) == 0xf000 )			// in this special case we got a symbol
-                aSpecMarkerList.Insert( (void*)( i | PPT_SPEC_SYMBOL ), LIST_APPEND );
+                aSpecMarkerList.Insert( (void*)(sal_uIntPtr)( i | PPT_SPEC_SYMBOL ), LIST_APPEND );
             else if ( nChar == 0xd )
             {
                 if ( nInstance == TSS_TYPE_PAGETITLE )
                     *pPtr = 0xb;
                 else
-                    aSpecMarkerList.Insert( (void*)( i | PPT_SPEC_NEWLINE ), LIST_APPEND );
+                    aSpecMarkerList.Insert( (void*)(sal_uIntPtr)( i | PPT_SPEC_NEWLINE ), LIST_APPEND );
             }
         }
         if ( i )
diff --git a/filter/source/xsltdialog/xmlfileview.cxx b/filter/source/xsltdialog/xmlfileview.cxx
index a9ab5b7..06bd047 100644
--- a/filter/source/xsltdialog/xmlfileview.cxx
+++ b/filter/source/xsltdialog/xmlfileview.cxx
@@ -112,7 +112,7 @@ void SAL_CALL XMLErrorHandler::error( const Any& aSAXParseException ) throw (SAX
         sErr += String( RTL_CONSTASCII_USTRINGPARAM( " : " ) );
         sErr += String( e.Message );
         USHORT nEntry = mrListBox.InsertEntry( sErr );
-        mrListBox.SetEntryData( nEntry, (void*)e.LineNumber );
+        mrListBox.SetEntryData( nEntry, (void*)(sal_IntPtr)e.LineNumber );
     }
 }
 
@@ -127,7 +127,7 @@ void SAL_CALL XMLErrorHandler::fatalError( const Any& aSAXParseException ) throw
         sErr += String( RTL_CONSTASCII_USTRINGPARAM( " : " ) );
         sErr += String( e.Message );
         USHORT nEntry = mrListBox.InsertEntry( sErr );
-        mrListBox.SetEntryData( nEntry, (void*)e.LineNumber );
+        mrListBox.SetEntryData( nEntry, (void*)(sal_IntPtr)e.LineNumber );
     }
 }
 
diff --git a/filter/source/xsltdialog/xmlfiltertestdialog.cxx b/filter/source/xsltdialog/xmlfiltertestdialog.cxx
index acbd066..dcac5ed 100644
--- a/filter/source/xsltdialog/xmlfiltertestdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltertestdialog.cxx
@@ -652,7 +652,7 @@ void XMLFilterTestDialog::import( const OUString& rURL )
             if( xImporter.is() )
             {
                 osl::File aInputFile( rURL );
-                osl::File::RC rc = aInputFile.open( osl_File_OpenFlag_Read );
+                aInputFile.open( osl_File_OpenFlag_Read );
 
                 Reference< XInputStream > xIS( new comphelper::OSLInputStreamWrapper( aInputFile ) );
                 
@@ -677,7 +677,7 @@ void XMLFilterTestDialog::import( const OUString& rURL )
                 Reference< XDocumentHandler > xWriter( mxMSF->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xml.sax.Writer" )) ), UNO_QUERY );
                 
                 File aOutputFile( aTempFileURL );
-                rc = aOutputFile.open( osl_File_OpenFlag_Write );
+                aOutputFile.open( osl_File_OpenFlag_Write );
 
                 Reference< XOutputStream > xOS( new OSLOutputStreamWrapper( aOutputFile ) );
                 Reference< XActiveDataSource > xDocSrc( xWriter, UNO_QUERY );


More information about the Libreoffice-commits mailing list