[Libreoffice-commits] .: 2 commits - connectivity/source desktop/source desktop/unx editeng/source linguistic/source xmloff/source

Caolán McNamara caolan at kemper.freedesktop.org
Tue Jan 25 02:34:46 PST 2011


 connectivity/source/commontools/ConnectionWrapper.cxx |   12 ++---
 desktop/source/app/app.cxx                            |   13 -----
 desktop/source/app/officeipcthread.cxx                |    8 ---
 desktop/source/deployment/misc/dp_update.cxx          |    2 
 desktop/source/migration/migration.cxx                |    1 
 desktop/source/splash/splash.cxx                      |    5 --
 desktop/unx/source/start.c                            |    2 
 editeng/source/editeng/editundo.cxx                   |    2 
 editeng/source/editeng/edtspell.cxx                   |    1 
 editeng/source/editeng/impedit3.cxx                   |    2 
 editeng/source/items/frmitems.cxx                     |   40 ------------------
 editeng/source/misc/svxacorr.cxx                      |    3 -
 editeng/source/outliner/outlvw.cxx                    |    1 
 linguistic/source/convdic.cxx                         |    8 ---
 xmloff/source/style/PagePropertySetContext.cxx        |    2 
 xmloff/source/xforms/xformsapi.cxx                    |    1 
 16 files changed, 20 insertions(+), 83 deletions(-)

New commits:
commit 46e7066e0edac4a2d077a7164f819998baa6b204
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jan 25 10:21:18 2011 +0000

    WaE: gcc 4.6.0 various warnings

diff --git a/connectivity/source/commontools/ConnectionWrapper.cxx b/connectivity/source/commontools/ConnectionWrapper.cxx
index 74ca78a..591429e 100644
--- a/connectivity/source/commontools/ConnectionWrapper.cxx
+++ b/connectivity/source/commontools/ConnectionWrapper.cxx
@@ -215,11 +215,11 @@ void OConnectionWrapper::createUniqueId( const ::rtl::OUString& _rURL
 {
     // first we create the digest we want to have
     rtlDigest aDigest = rtl_digest_create( rtl_Digest_AlgorithmSHA1 );
-    rtlDigestError aError = rtl_digest_update(aDigest,_rURL.getStr(),_rURL.getLength()*sizeof(sal_Unicode));
+    rtl_digest_update(aDigest,_rURL.getStr(),_rURL.getLength()*sizeof(sal_Unicode));
     if ( _rUserName.getLength() )
-        aError = rtl_digest_update(aDigest,_rUserName.getStr(),_rUserName.getLength()*sizeof(sal_Unicode));
+        rtl_digest_update(aDigest,_rUserName.getStr(),_rUserName.getLength()*sizeof(sal_Unicode));
     if ( _rPassword.getLength() )
-        aError = rtl_digest_update(aDigest,_rPassword.getStr(),_rPassword.getLength()*sizeof(sal_Unicode));
+        rtl_digest_update(aDigest,_rPassword.getStr(),_rPassword.getLength()*sizeof(sal_Unicode));
     // now we need to sort the properties
     PropertyValue* pBegin = _rInfo.getArray();
     PropertyValue* pEnd   = pBegin + _rInfo.getLength();
@@ -246,18 +246,18 @@ void OConnectionWrapper::createUniqueId( const ::rtl::OUString& _rURL
                     const ::rtl::OUString* pSBegin = aSeq.getConstArray();
                     const ::rtl::OUString* pSEnd   = pSBegin + aSeq.getLength();
                     for(;pSBegin != pSEnd;++pSBegin)
-                        aError = rtl_digest_update(aDigest,pSBegin->getStr(),pSBegin->getLength()*sizeof(sal_Unicode));
+                        rtl_digest_update(aDigest,pSBegin->getStr(),pSBegin->getLength()*sizeof(sal_Unicode));
                 }
             }
         }
         if ( sValue.getLength() > 0 )
         {
             // we don't have to convert this into UTF8 because we don't store on a file system
-            aError = rtl_digest_update(aDigest,sValue.getStr(),sValue.getLength()*sizeof(sal_Unicode));
+            rtl_digest_update(aDigest,sValue.getStr(),sValue.getLength()*sizeof(sal_Unicode));
         }
     }
 
-    aError = rtl_digest_get(aDigest,_pBuffer,RTL_DIGEST_LENGTH_SHA1);
+    rtl_digest_get(aDigest,_pBuffer,RTL_DIGEST_LENGTH_SHA1);
     // we have to destroy the digest
     rtl_digest_destroy(aDigest);
 }
diff --git a/editeng/source/editeng/editundo.cxx b/editeng/source/editeng/editundo.cxx
index 8e16a6e..e928126 100644
--- a/editeng/source/editeng/editundo.cxx
+++ b/editeng/source/editeng/editundo.cxx
@@ -437,7 +437,7 @@ void EditUndoInsertFeature::Undo()
     EditSelection aSel( aPaM, aPaM );
     // Attribute werden dort implizit vom Dokument korrigiert...
     aSel.Max().GetIndex()++;
-    EditPaM aNewPaM = GetImpEditEngine()->ImpDeleteSelection( aSel );
+    GetImpEditEngine()->ImpDeleteSelection( aSel );
     aSel.Max().GetIndex()--;	// Fuer Selektion
     GetImpEditEngine()->GetActiveView()->GetImpEditView()->SetEditSelection( aSel );
 }
diff --git a/editeng/source/editeng/edtspell.cxx b/editeng/source/editeng/edtspell.cxx
index a582b90..5a6fccd 100644
--- a/editeng/source/editeng/edtspell.cxx
+++ b/editeng/source/editeng/edtspell.cxx
@@ -293,6 +293,7 @@ void WrongList::TextInserted( sal_uInt16 nPos, sal_uInt16 nNew, sal_Bool bPosIsS
         }
         DBG_ASSERT( !bRefIsValid || ( rWrong.nStart < rWrong.nEnd ),
                 "TextInserted, WrongRange: Start >= End?!" );
+        (void)bRefIsValid;
     }
 
     DBG_ASSERT( !DbgIsBuggy(), "InsertWrong: WrongList kaputt!" );
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index cbe3de9..6b770b9 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -934,6 +934,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
             }
             DBG_ASSERT( pPortion->GetKind() != PORTIONKIND_HYPHENATOR, "CreateLines: Hyphenator-Portion!" );
             DBG_ASSERT( pPortion->GetLen() || bProcessingEmptyLine, "Leere Portion in CreateLines ?!" );
+            (void)bProcessingEmptyLine;
             if ( pNextFeature && ( pNextFeature->GetStart() == nTmpPos ) )
             {
                 sal_uInt16 nWhich = pNextFeature->GetItem()->Which();
@@ -1054,6 +1055,7 @@ sal_Bool ImpEditEngine::CreateLines( USHORT nPara, sal_uInt32 nStartPosY )
             else
             {
                 DBG_ASSERT( pPortion->GetLen() || bProcessingEmptyLine, "Empty Portion - Extra Space?!" );
+                (void)bProcessingEmptyLine;
                 SeekCursor( pNode, nTmpPos+1, aTmpFont );
                 aTmpFont.SetPhysFont( GetRefDevice() );
                 ImplInitDigitMode( GetRefDevice(), 0, 0, 0, aTmpFont.GetLanguage() );
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index 092878f..8faf443 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -1851,7 +1851,6 @@ bool SvxBoxItem::QueryValue( uno::Any& rVal, BYTE nMemberId  ) const
     sal_uInt16 nDist = 0;
     sal_Bool bDistMember = sal_False;
     nMemberId &= ~CONVERT_TWIPS;
-    sal_Bool bSerialize = sal_False;
     switch(nMemberId)
     {
         case 0:
@@ -1871,22 +1870,18 @@ bool SvxBoxItem::QueryValue( uno::Any& rVal, BYTE nMemberId  ) const
             return sal_True;
         }
         case MID_LEFT_BORDER:
-            bSerialize = sal_True;      // intentionally no break!
         case LEFT_BORDER:
             aRetLine = SvxBoxItem::SvxLineToLine(GetLeft(), bConvert);
             break;
         case MID_RIGHT_BORDER:
-            bSerialize = sal_True;      // intentionally no break!
         case RIGHT_BORDER:
             aRetLine = SvxBoxItem::SvxLineToLine(GetRight(), bConvert);
             break;
         case MID_BOTTOM_BORDER:
-            bSerialize = sal_True;      // intentionally no break!
         case BOTTOM_BORDER:
             aRetLine = SvxBoxItem::SvxLineToLine(GetBottom(), bConvert);
             break;
         case MID_TOP_BORDER:
-            bSerialize = sal_True;      // intentionally no break!
         case TOP_BORDER:
             aRetLine = SvxBoxItem::SvxLineToLine(GetTop(), bConvert);
             break;
@@ -1915,21 +1910,7 @@ bool SvxBoxItem::QueryValue( uno::Any& rVal, BYTE nMemberId  ) const
     if( bDistMember )
         rVal <<= (sal_Int32)(bConvert ? TWIP_TO_MM100_UNSIGNED(nDist) : nDist);
     else
-    {
-/*
-        if ( bSerialize )
-        {
-            ::com::sun::star::uno::Sequence < ::com::sun::star::uno::Any > aSeq(4);
-            aSeq[0] <<= aRetLine.Color;
-            aSeq[1] <<= aRetLine.InnerLineWidth;
-            aSeq[2] <<= aRetLine.OuterLineWidth;
-            aSeq[3] <<= aRetLine.LineDistance;
-            rVal <<= aSeq;
-        }
-        else
-*/
-            rVal <<= aRetLine;
-    }
+        rVal <<= aRetLine;
 
     return true;
 }
@@ -2837,7 +2818,6 @@ bool SvxBoxInfoItem::QueryValue( uno::Any& rVal, BYTE nMemberId  ) const
     sal_Int16 nVal=0;
     sal_Bool bIntMember = sal_False;
     nMemberId &= ~CONVERT_TWIPS;
-    sal_Bool bSerialize = sal_False;
     switch(nMemberId)
     {
         case 0:
@@ -2861,11 +2841,9 @@ bool SvxBoxInfoItem::QueryValue( uno::Any& rVal, BYTE nMemberId  ) const
         }
 
         case MID_HORIZONTAL:
-            bSerialize = sal_True;
             aRetLine = SvxBoxItem::SvxLineToLine( pHori, bConvert);
             break;
         case MID_VERTICAL:
-            bSerialize = sal_True;
             aRetLine = SvxBoxItem::SvxLineToLine( pVert, bConvert);
             break;
         case MID_FLAGS:
@@ -2891,21 +2869,7 @@ bool SvxBoxInfoItem::QueryValue( uno::Any& rVal, BYTE nMemberId  ) const
     }
 
     if( !bIntMember )
-    {
-/*
-        if ( bSerialize )
-        {
-            ::com::sun::star::uno::Sequence < ::com::sun::star::uno::Any > aSeq(4);
-            aSeq[0] <<= aRetLine.Color;
-            aSeq[1] <<= aRetLine.InnerLineWidth;
-            aSeq[2] <<= aRetLine.OuterLineWidth;
-            aSeq[3] <<= aRetLine.LineDistance;
-            rVal <<= aSeq;
-        }
-        else
- */
-            rVal <<= aRetLine;
-    }
+        rVal <<= aRetLine;
 
     return true;
 }
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 1d2be63..0ccc1b7 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -804,7 +804,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
                       *pWordStt = 0,
                       *pDelim = 0;
 
-    BOOL bAtStart = FALSE, bPrevPara = FALSE;
+    BOOL bAtStart = FALSE;
     do {
         --pStr;
         if( rCC.isLetter(
@@ -879,7 +879,6 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
         }
 
         aText = *pPrevPara;
-        bPrevPara = TRUE;
         bAtStart = FALSE;
         pStart = aText.GetBuffer();
         pStr = pStart + aText.Len();
diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx
index b4fd849..7c00f24 100644
--- a/editeng/source/outliner/outlvw.cxx
+++ b/editeng/source/outliner/outlvw.cxx
@@ -434,7 +434,6 @@ void OutlinerView::ImpPaintDDCursor()
 
     Point aStartPointWin, aEndPointWin;
     Rectangle aOutputArWin = pEditView->GetOutputArea();
-    Rectangle aVisAreaRef = pEditView->GetVisArea();
 
     if( bDDChangingDepth )
     {
diff --git a/linguistic/source/convdic.cxx b/linguistic/source/convdic.cxx
index 716c76a..83349db 100644
--- a/linguistic/source/convdic.cxx
+++ b/linguistic/source/convdic.cxx
@@ -111,8 +111,6 @@ void ReadThroughDic( const String &rMainURL, ConvDicXMLImport &rImport )
 
     SvStreamPtr pStream = SvStreamPtr( utl::UcbStreamHelper::CreateStream( xIn ) );
 
-    ULONG nError = sal::static_int_cast< ULONG >(-1);
-
     // prepare ParserInputSource
     xml::sax::InputSource aParserInput;
     aParserInput.aInputStream = xIn;
@@ -145,18 +143,12 @@ void ReadThroughDic( const String &rMainURL, ConvDicXMLImport &rImport )
     try
     {
         xParser->parseStream( aParserInput );   // implicitly calls ConvDicXMLImport::CreateContext
-        if (rImport.GetSuccess())
-            nError = 0;
     }
     catch( xml::sax::SAXParseException& )
     {
-//        if( bEncrypted )
-//            nError = ERRCODE_SFX_WRONGPASSWORD;
     }
     catch( xml::sax::SAXException& )
     {
-//        if( bEncrypted )
-//            nError = ERRCODE_SFX_WRONGPASSWORD;
     }
     catch( io::IOException& )
     {
diff --git a/xmloff/source/style/PagePropertySetContext.cxx b/xmloff/source/style/PagePropertySetContext.cxx
index 7221254..12893df 100644
--- a/xmloff/source/style/PagePropertySetContext.cxx
+++ b/xmloff/source/style/PagePropertySetContext.cxx
@@ -99,6 +99,8 @@ SvXMLImportContext *PagePropertySetContext::CreateChildContext(
                     nFil  == mxMapper->getPropertySetMapper()
                         ->GetEntryContextId( rProp.mnIndex-1 ),
                     "invalid property map!");
+        (void)nPos;
+        (void)nFil;
         pContext =
             new XMLBackgroundImageContext( GetImport(), nPrefix,
                                            rLocalName, xAttrList,
diff --git a/xmloff/source/xforms/xformsapi.cxx b/xmloff/source/xforms/xformsapi.cxx
index 753d735..d03e89d 100644
--- a/xmloff/source/xforms/xformsapi.cxx
+++ b/xmloff/source/xforms/xformsapi.cxx
@@ -117,6 +117,7 @@ void lcl_addXFormsModel(
 
     // TODO: implement proper error handling
     DBG_ASSERT( bSuccess, "can't import model" );
+    (void)bSuccess;
 }
 
 Reference<XPropertySet> lcl_findXFormsBindingOrSubmission( 
commit 90d4b17a07f3c5fdd5ab5161bf11193e9f016985
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jan 24 15:53:29 2011 +0000

    WaE: gcc 4.6.0 various warnings

diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index a423e17..87d7c00 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -822,9 +822,6 @@ void Desktop::HandleBootstrapPathErrors( ::utl::Bootstrap::Status aBootstrapStat
 {
     if ( aBootstrapStatus != ::utl::Bootstrap::DATA_OK )
     {
-        sal_Bool            bWorkstationInstallation = sal_False;
-        ::rtl::OUString        aBaseInstallURL;
-        ::rtl::OUString        aUserInstallURL;
         ::rtl::OUString        aProductKey;
         ::rtl::OUString        aTemp;
 
@@ -837,16 +834,6 @@ void Desktop::HandleBootstrapPathErrors( ::utl::Bootstrap::Status aBootstrapStat
         if ( aTemp.getLength() > 0 )
             aProductKey = aTemp;
 
-        ::utl::Bootstrap::PathStatus aBaseInstallStatus = ::utl::Bootstrap::locateBaseInstallation( aBaseInstallURL );
-        ::utl::Bootstrap::PathStatus aUserInstallStatus = ::utl::Bootstrap::locateUserInstallation( aUserInstallURL );
-
-        if (( aBaseInstallStatus == ::utl::Bootstrap::PATH_EXISTS &&
-              aUserInstallStatus == ::utl::Bootstrap::PATH_EXISTS        ))
-        {
-            if ( aBaseInstallURL != aUserInstallURL )
-                bWorkstationInstallation = sal_True;
-        }
-
         OUString        aMessage;
         OUStringBuffer    aBuffer( 100 );
         aBuffer.append( aDiagnosticMessage );
diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx
index 858c5ce..ceec750 100644
--- a/desktop/source/app/officeipcthread.cxx
+++ b/desktop/source/app/officeipcthread.cxx
@@ -540,7 +540,6 @@ OfficeIPCThread::Status OfficeIPCThread::EnableOfficeIPCThread()
         // Seems another office is running. Pipe arguments to it and self terminate
         osl::StreamPipe aStreamPipe(pThread->maPipe.getHandle());
 
-        sal_Bool bWaitBeforeClose = sal_False;
         ByteString aArguments(RTL_CONSTASCII_STRINGPARAM(ARGUMENT_PREFIX));
         rtl::OUString cwdUrl;
         if (!(tools::getProcessWorkingDir(cwdUrl) &&
@@ -552,10 +551,6 @@ OfficeIPCThread::Status OfficeIPCThread::EnableOfficeIPCThread()
         for( sal_uInt32 i=0; i < nCount; i++ )
         {
             rtl_getAppCommandArg( i, &aDummy.pData );
-            if( aDummy.indexOf('-',0) != 0 )
-            {
-                bWaitBeforeClose = sal_True;
-            }
             if (!addArgument(&aArguments, ',', aDummy)) {
                 return IPC_STATUS_BOOTSTRAP_ERROR;
             }
@@ -728,14 +723,12 @@ void SAL_CALL OfficeIPCThread::run()
             }
 
             // handle request for acceptor
-            sal_Bool bAcceptorRequest = sal_False;
             OUString aAcceptString;
             if ( aCmdLineArgs->GetAcceptString(aAcceptString) && Desktop::CheckOEM()) {
                 ApplicationEvent* pAppEvent =
                     new ApplicationEvent( aEmpty, aEmpty,
                                           "ACCEPT", aAcceptString );
                 ImplPostForeignAppEvent( pAppEvent );
-                bAcceptorRequest = sal_True;
             }
             // handle acceptor removal
             OUString aUnAcceptString;
@@ -744,7 +737,6 @@ void SAL_CALL OfficeIPCThread::run()
                     new ApplicationEvent( aEmpty, aEmpty,
                                          "UNACCEPT", aUnAcceptString );
                 ImplPostForeignAppEvent( pAppEvent );
-                bAcceptorRequest = sal_True;
             }
 
 #ifndef UNX
diff --git a/desktop/source/deployment/misc/dp_update.cxx b/desktop/source/deployment/misc/dp_update.cxx
index 6ff42f8..f478a0d 100644
--- a/desktop/source/deployment/misc/dp_update.cxx
+++ b/desktop/source/deployment/misc/dp_update.cxx
@@ -392,6 +392,7 @@ UpdateInfoMap getOnlineUpdateInfos(
                 UpdateInfoMap::value_type(
                     dp_misc::getIdentifier(extension), UpdateInfo(extension)));
             OSL_ASSERT(insertRet.second == true);
+            (void)insertRet;
         }
     }
     else
@@ -404,6 +405,7 @@ UpdateInfoMap getOnlineUpdateInfos(
                 UpdateInfoMap::value_type(
                     dp_misc::getIdentifier(*i), UpdateInfo(*i)));
             OSL_ASSERT(insertRet.second == true);            
+            (void)insertRet;
         }
     }
 
diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx
index 1639510..e70ed24 100644
--- a/desktop/source/migration/migration.cxx
+++ b/desktop/source/migration/migration.cxx
@@ -232,6 +232,7 @@ void Migration::migrateSettingsIfNecessary()
         OSL_ENSURE(sal_False, aMsg.getStr());
     }
     OSL_ENSURE(bResult, "Migration has not been successfull");
+    (void)bResult;
 }
 
 MigrationImpl::MigrationImpl(const uno::Reference< XMultiServiceFactory >& xFactory)
diff --git a/desktop/source/splash/splash.cxx b/desktop/source/splash/splash.cxx
index 57e9682..d316f76 100644
--- a/desktop/source/splash/splash.cxx
+++ b/desktop/source/splash/splash.cxx
@@ -552,12 +552,7 @@ void SplashScreen::Paint( const Rectangle&)
         _vdev.DrawRect(Rectangle(_tlx+_barspace, _tly+_barspace, _tlx+_barspace+length, _tly+_barheight-_barspace));
         _vdev.DrawText( Rectangle(_tlx, _tly+_barheight+5, _tlx+_barwidth, _tly+_barheight+5+20), _sProgressText, TEXT_DRAW_CENTER );
     }
-    Size aSize =  GetOutputSizePixel();
-    Size bSize =  _vdev.GetOutputSizePixel();
-    //_vdev.Flush();
-    //_vdev.DrawOutDev(Point(), GetOutputSize(), Point(), GetOutputSize(), *((IntroWindow*)this) );
     DrawOutDev(Point(), GetOutputSizePixel(), Point(), _vdev.GetOutputSizePixel(), _vdev );
-    //Flush();
 }
 
 
diff --git a/desktop/unx/source/start.c b/desktop/unx/source/start.c
index 2bb274a..d747a7d 100644
--- a/desktop/unx/source/start.c
+++ b/desktop/unx/source/start.c
@@ -592,7 +592,7 @@ show_splash( int status_fd )
 
     int nPercent = 0;
     sal_Bool bFinish = sal_False;
-    ProgressStatus eResult;
+    ProgressStatus eResult = ProgressExit;
 
     /* we want to watch status_fd */
     aPfd.fd = status_fd;


More information about the Libreoffice-commits mailing list