[Libreoffice-commits] .: 2 commits - accessibility/source cui/source extensions/source lingucomponent/source xmlsecurity/source

Caolán McNamara caolan at kemper.freedesktop.org
Thu Jan 27 12:02:28 PST 2011


 accessibility/source/extended/textwindowaccessibility.cxx |    3 -
 cui/source/customize/cfg.cxx                              |    1 
 cui/source/dialogs/cuicharmap.cxx                         |    1 
 cui/source/options/optcolor.cxx                           |    2 -
 cui/source/options/optfltr.cxx                            |    4 --
 cui/source/tabpages/border.cxx                            |    1 
 cui/source/tabpages/chardlg.cxx                           |    4 --
 cui/source/tabpages/swpossizetabpage.cxx                  |   24 --------------
 extensions/source/bibliography/datman.cxx                 |    3 -
 extensions/source/bibliography/framectr.cxx               |    3 -
 extensions/source/bibliography/toolbar.cxx                |    1 
 extensions/source/dbpilots/gridwizard.cxx                 |   16 ++++-----
 extensions/source/plugin/base/xplugin.cxx                 |    4 +-
 lingucomponent/source/lingutil/lingutil.cxx               |    6 ---
 xmlsecurity/source/dialogs/certificatechooser.cxx         |    2 -
 xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx    |   18 +++++-----
 xmlsecurity/source/dialogs/macrosecurity.cxx              |    2 -
 17 files changed, 23 insertions(+), 72 deletions(-)

New commits:
commit 9923c5f5606383b386e81640aaa5f2b7a3908ec0
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jan 27 16:53:01 2011 +0000

    WaE: gcc 4.6.0 various warnings

diff --git a/lingucomponent/source/lingutil/lingutil.cxx b/lingucomponent/source/lingutil/lingutil.cxx
index 728a673..fd9977a 100644
--- a/lingucomponent/source/lingutil/lingutil.cxx
+++ b/lingucomponent/source/lingutil/lingutil.cxx
@@ -124,9 +124,6 @@ std::vector< SvtLinguConfigDictionaryEntry > GetOldStyleDics( const char *pDicTy
     rtl::OUString aSystemPrefix;
     rtl::OUString aSystemSuffix;
 #endif
-    bool bSpell = false;
-    bool bHyph  = false;
-    bool bThes  = false;
     if (strcmp( pDicType, "DICT" ) == 0)
     {
         aFormatName		= A2OU("DICT_SPELL");
@@ -135,7 +132,6 @@ std::vector< SvtLinguConfigDictionaryEntry > GetOldStyleDics( const char *pDicTy
         aSystemDir		= A2OU( DICT_SYSTEM_DIR );
         aSystemSuffix		= aDicExtension;
 #endif
-        bSpell = true;
     }
     else if (strcmp( pDicType, "HYPH" ) == 0)
     {
@@ -146,7 +142,6 @@ std::vector< SvtLinguConfigDictionaryEntry > GetOldStyleDics( const char *pDicTy
         aSystemPrefix		= A2OU( "hyph_" );
         aSystemSuffix		= aDicExtension;
 #endif
-        bHyph = true;
     }
     else if (strcmp( pDicType, "THES" ) == 0)
     {
@@ -157,7 +152,6 @@ std::vector< SvtLinguConfigDictionaryEntry > GetOldStyleDics( const char *pDicTy
         aSystemPrefix		= A2OU( "th_" );
         aSystemSuffix		= A2OU( "_v2.dat" );
 #endif
-        bThes = true;
     }
 
 
commit 279eb5ea419757f1ad5c7116cf5e5c876be22f32
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jan 27 11:23:31 2011 +0000

    WaE: gcc 4.6.0 various warnings

diff --git a/accessibility/source/extended/textwindowaccessibility.cxx b/accessibility/source/extended/textwindowaccessibility.cxx
index cd31df1..b0372e9 100644
--- a/accessibility/source/extended/textwindowaccessibility.cxx
+++ b/accessibility/source/extended/textwindowaccessibility.cxx
@@ -603,8 +603,7 @@ ParagraphImpl::getRunAttributes(::sal_Int32 Index, const ::css::uno::Sequence< :
     checkDisposed();
     
     ::sal_Int32 nLineNo = -1;
-    ::css::i18n::Boundary aBoundary = 
-        m_xDocument->retrieveParagraphLineBoundary( this, nIndex, &nLineNo );
+    m_xDocument->retrieveParagraphLineBoundary( this, nIndex, &nLineNo );
         
     return nLineNo;
 }
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 21aa53c..5bfb108 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -5975,7 +5975,6 @@ BitmapEx SvxIconSelectorDialog::AutoScaleBitmap(BitmapEx & aBitmap, const long a
         imgposY = (aStandardSize - imgOldHeight) / 2 + 0.5;
     }
 
-    Size aBmpSize = aRet.GetSizePixel();
     Size aStdSize( aStandardSize, aStandardSize );
     Rectangle aRect(aEmptyPoint, aStdSize );
 
diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx
index 66a80e7..15cf6ba 100644
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -349,7 +349,6 @@ SvxCharMapData::SvxCharMapData( SfxModalDialog* pDialog, BOOL bOne_, ResMgr* pRe
     // left align aShowText field
     int nLeftEdge = aSymbolText.GetPosPixel().X();
     nLeftEdge += aSymbolText.GetTextWidth( aSymbolText.GetText() );
-    Size aNewSize = aShowText.GetOutputSizePixel();
     aShowText.SetPosPixel( Point( nLeftEdge+4, aShowText.GetPosPixel().Y() ) );
 }
 
diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx
index 8dac098..f137081 100644
--- a/cui/source/options/optcolor.cxx
+++ b/cui/source/options/optcolor.cxx
@@ -703,8 +703,6 @@ ColorConfigWindow_Impl::ColorConfigWindow_Impl(Window* pParent, const ResId& rRe
         sal_Int32 nHeight = LogicToPixel( Size( 0, _LINE_HEIGHT ), MAP_APPFONT ).Height();
         sal_Int32 nLineNum = nLastY / nHeight;
 
-        Point aFixedPos = LogicToPixel( Point( _FT_XPOS, nLineNum * _LINE_HEIGHT ), MAP_APPFONT );
-        Point aLBPos = LogicToPixel( Point( _LB_XPOS, nLineNum * _LINE_HEIGHT ), MAP_APPFONT );
         Size aFixedSize = LogicToPixel( Size( _FT_WIDTH , _FT_HEIGHT ), MAP_APPFONT );
         Size aLBSize = LogicToPixel( Size( _LB_WIDTH , _LB_HEIGHT ), MAP_APPFONT );
         Size aWinSize = LogicToPixel( Size( _WN_WIDTH , _WN_HEIGHT ), MAP_APPFONT );
diff --git a/cui/source/options/optfltr.cxx b/cui/source/options/optfltr.cxx
index 041e067..b74756a 100644
--- a/cui/source/options/optfltr.cxx
+++ b/cui/source/options/optfltr.cxx
@@ -188,7 +188,6 @@ SfxTabPage*	OfaMSFilterTabPage2::Create( Window* pParent,
 
 BOOL OfaMSFilterTabPage2::FillItemSet( SfxItemSet& )
 {
-    BOOL bModified = FALSE;
     SvtFilterOptions* pOpt = SvtFilterOptions::Get();
 
     static struct ChkCBoxEntries{
@@ -231,10 +230,7 @@ BOOL OfaMSFilterTabPage2::FillItemSet( SfxItemSet& )
                         pCheckButtonData->ConvertToButtonState( nButtonFlags );
 
                 if( bCheck != (pOpt->*pArr->FnIs)() )
-                {
-                    bModified = TRUE;
                     (pOpt->*pArr->FnSet)( bCheck );
-                }
             }
         }
     }
diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index 481d0fa..c993163 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -450,7 +450,6 @@ void SvxBorderTabPage::Reset( const SfxItemSet& rSet )
     const SvxBoxInfoItem*   pBoxInfoItem;
     USHORT					nWhichBox		= GetWhich(SID_ATTR_BORDER_OUTER);
     SfxMapUnit 				eCoreUnit;
-    const Color				aColBlack		= RGBCOL(COL_BLACK);
 
     pBoxItem  = (const SvxBoxItem*)GetItem( rSet, SID_ATTR_BORDER_OUTER );
     
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 5eef9e3..0b9c0d3 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -980,7 +980,6 @@ void SvxCharNamePage::FillSizeBox_Impl( const FontNameBox* pNameBox )
 
 void SvxCharNamePage::Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp )
 {
-    FixedText* pNameLabel = NULL;
     FontNameBox* pNameBox = NULL;
     FixedText* pStyleLabel = NULL;
     FontStyleBox* pStyleBox = NULL;
@@ -993,7 +992,6 @@ void SvxCharNamePage::Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp
     switch ( eLangGrp )
     {
         case Western :
-            pNameLabel = m_pWestFontNameFT;
             pNameBox = m_pWestFontNameLB;
             pStyleLabel = m_pWestFontStyleFT;
             pStyleBox = m_pWestFontStyleLB;
@@ -1005,7 +1003,6 @@ void SvxCharNamePage::Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp
             break;
 
         case Asian :
-            pNameLabel = m_pEastFontNameFT;
             pNameBox = m_pEastFontNameLB;
             pStyleLabel = m_pEastFontStyleFT;
             pStyleBox = m_pEastFontStyleLB;
@@ -1017,7 +1014,6 @@ void SvxCharNamePage::Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp
             break;
 
         case Ctl :
-            pNameLabel = m_pCTLFontNameFT;
             pNameBox = m_pCTLFontNameLB;
             pStyleLabel = m_pCTLFontStyleFT;
             pStyleBox = m_pCTLFontStyleLB;
diff --git a/cui/source/tabpages/swpossizetabpage.cxx b/cui/source/tabpages/swpossizetabpage.cxx
index 7ab2219..ee3add0 100644
--- a/cui/source/tabpages/swpossizetabpage.cxx
+++ b/cui/source/tabpages/swpossizetabpage.cxx
@@ -1889,30 +1889,6 @@ void SvxSwPosSizeTabPage::SetView( const SdrView* pSdrView )
     }
     else
         m_bIsMultiSelection = true;
-
-    // use page offset and recalculate
-    Point aPt( m_pSdrView->GetSdrPageView()->GetPageOrigin() );
-
-    // Massstab
-    Fraction aUIScale = m_pSdrView->GetModel()->GetUIScale();
-
-//    lcl_ScaleRect( m_aWorkArea, aUIScale );
-//    lcl_ScaleRect( m_aRect, aUIScale );
-//    lcl_ScalePoint( aPt, aUIScale );
-
-    // Metrik konvertieren
-//    int nDigits = maMtrPosX.GetDecimalDigits();
-
-//    aPt = lcl_ConvertPoint( aPt, nDigits, (MapUnit) mePoolUnit, meDlgUnit );
-//    m_aWorkArea = lcl_ConvertRect( m_aWorkArea, nDigits, (MapUnit) mePoolUnit, meDlgUnit );
-//    m_aRect = lcl_ConvertRect( m_aRect, nDigits, (MapUnit) mePoolUnit, meDlgUnit );
-
-    // use page offset
-//    aPt *= -1;
-//    aPt += m_aWorkArea.TopLeft();
-//    m_aWorkArea.SetPos( aPt );
-
-    //SetMinMaxPosition();
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx
index 7533609..1b3ef90 100644
--- a/extensions/source/bibliography/datman.cxx
+++ b/extensions/source/bibliography/datman.cxx
@@ -1524,7 +1524,6 @@ void BibDataManager::propertyChange(const beans::PropertyChangeEvent& evt) throw
 {
     try
     {
-        sal_Bool bFlag=sal_False;
         if(evt.PropertyName == FM_PROP_VALUE)
         {
             if( evt.NewValue.getValueType() == ::getCppuType((Reference<io::XInputStream>*)0) )
@@ -1538,7 +1537,7 @@ void BibDataManager::propertyChange(const beans::PropertyChangeEvent& evt) throw
 
             Reference< XRowLocate > xLocate(xBibCursor, UNO_QUERY);
             DBG_ASSERT(xLocate.is(), "BibDataManager::propertyChange : invalid cursor !");
-            bFlag = xLocate->moveToBookmark(aUID);
+            xLocate->moveToBookmark(aUID);
         }
     }
     catch(Exception& e )
diff --git a/extensions/source/bibliography/framectr.cxx b/extensions/source/bibliography/framectr.cxx
index 5827188..0c67601 100644
--- a/extensions/source/bibliography/framectr.cxx
+++ b/extensions/source/bibliography/framectr.cxx
@@ -383,7 +383,6 @@ sal_Bool BibFrameController_Impl::SaveModified(const Reference< form::runtime::X
 {
     if (!xController.is())
         return sal_False;
-    sal_Bool bInserted = sal_False;
 
     Reference< XResultSetUpdate> _xCursor = Reference< XResultSetUpdate>(xController->getModel(), UNO_QUERY);
 
@@ -412,8 +411,6 @@ sal_Bool BibFrameController_Impl::SaveModified(const Reference< form::runtime::X
         {
             DBG_ERROR("SaveModified: Exception occurred!");
         }
-
-        bInserted = bIsNew && bResult;
     }
     return bResult;
 }
diff --git a/extensions/source/bibliography/toolbar.cxx b/extensions/source/bibliography/toolbar.cxx
index 97a0137..8899f98 100644
--- a/extensions/source/bibliography/toolbar.cxx
+++ b/extensions/source/bibliography/toolbar.cxx
@@ -216,7 +216,6 @@ BibToolBar::BibToolBar(Window* pParent, Link aLink, WinBits nStyle):
     ApplyImageList();
     SetStyle(GetStyle()|nStyle);
     SetOutStyle(TOOLBOX_STYLE_FLAT);
-    Size aSize=GetSizePixel();
     Size a2Size(GetOutputSizePixel());
     a2Size.Width()=100;
     aLBSource.SetSizePixel(a2Size);
diff --git a/extensions/source/dbpilots/gridwizard.cxx b/extensions/source/dbpilots/gridwizard.cxx
index 7900c74..dc8f4b7 100644
--- a/extensions/source/dbpilots/gridwizard.cxx
+++ b/extensions/source/dbpilots/gridwizard.cxx
@@ -118,10 +118,10 @@ namespace dbp
         static const ::rtl::OUString s_sEmptyString;
 
         // collect "descriptors" for the to-be-created (grid)columns
-        DECLARE_STL_VECTOR( ::rtl::OUString, StringArray );
-        StringArray aColumnServiceNames;	// service names to be used with the XGridColumnFactory
-        StringArray aColumnLabelPostfixes;	// postfixes to append to the column labels
-        StringArray aFormFieldNames;		// data field names
+        DECLARE_STL_VECTOR( ::rtl::OUString, OUStringArray );
+        OUStringArray aColumnServiceNames;	// service names to be used with the XGridColumnFactory
+        OUStringArray aColumnLabelPostfixes;	// postfixes to append to the column labels
+        OUStringArray aFormFieldNames;		// data field names
 
         aColumnServiceNames.reserve(getSettings().aSelectedFields.getLength());
         aColumnLabelPostfixes.reserve(getSettings().aSelectedFields.getLength());
@@ -196,10 +196,10 @@ namespace dbp
         {
             Reference< XNameAccess > xExistenceChecker(xColumnContainer.get());
 
-            ConstStringArrayIterator pColumnServiceName = aColumnServiceNames.begin();
-            ConstStringArrayIterator pColumnLabelPostfix = aColumnLabelPostfixes.begin();
-            ConstStringArrayIterator pFormFieldName = aFormFieldNames.begin();
-            ConstStringArrayIterator pColumnServiceNameEnd = aColumnServiceNames.end();
+            ConstOUStringArrayIterator pColumnServiceName = aColumnServiceNames.begin();
+            ConstOUStringArrayIterator pColumnLabelPostfix = aColumnLabelPostfixes.begin();
+            ConstOUStringArrayIterator pFormFieldName = aFormFieldNames.begin();
+            ConstOUStringArrayIterator pColumnServiceNameEnd = aColumnServiceNames.end();
 
             for (;pColumnServiceName < pColumnServiceNameEnd; ++pColumnServiceName, ++pColumnLabelPostfix, ++pFormFieldName)
             {
diff --git a/extensions/source/plugin/base/xplugin.cxx b/extensions/source/plugin/base/xplugin.cxx
index 882ea65..434c818 100644
--- a/extensions/source/plugin/base/xplugin.cxx
+++ b/extensions/source/plugin/base/xplugin.cxx
@@ -548,7 +548,7 @@ void XPlugin_Impl::loadPlugin()
             return;
     }
 
-    NPError aError = getPluginComm()->
+    getPluginComm()->
         NPP_New( (char*)OUStringToOString( m_aDescription.Mimetype,
                                                   m_aEncoding).getStr(),
                  getNPPInstance(),
@@ -595,7 +595,7 @@ void XPlugin_Impl::loadPlugin()
     m_aNPWindow.width   = aPosSize.Width ? aPosSize.Width : 600;
     m_aNPWindow.height  = aPosSize.Height ? aPosSize.Height : 600;
 
-    aError = getPluginComm()->NPP_SetWindow( this );
+    getPluginComm()->NPP_SetWindow( this );
 }
 
 void XPlugin_Impl::destroyStreams()
diff --git a/xmlsecurity/source/dialogs/certificatechooser.cxx b/xmlsecurity/source/dialogs/certificatechooser.cxx
index fa82427..c724a72 100644
--- a/xmlsecurity/source/dialogs/certificatechooser.cxx
+++ b/xmlsecurity/source/dialogs/certificatechooser.cxx
@@ -188,7 +188,7 @@ void CertificateChooser::ImplInitialize()
             sEntry += '\t';
             sEntry += XmlSec::GetDateString( maCerts[ nC ]->getNotValidAfter() );
             SvLBoxEntry* pEntry = maCertLB.InsertEntry( sEntry );
-            pEntry->SetUserData( ( void* )nC ); // missuse user data as index
+            pEntry->SetUserData( ( void* )(sal_IntPtr)nC ); // missuse user data as index
         }
 
         // enable/disable buttons
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index 1095c22..410ffaa 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -391,8 +391,8 @@ IMPL_LINK( DigitalSignaturesDialog, OKButtonHdl, void*, EMPTYARG )
     uno::Reference< com::sun::star::xml::sax::XDocumentHandler> xDocumentHandler = 
         maSignatureHelper.CreateDocumentHandlerWithHeader( xOutputStream );
 
-    int nInfos = maCurrentSignatureInformations.size();
-    for( int n = 0 ; n < nInfos ; ++n )
+    size_t nInfos = maCurrentSignatureInformations.size();
+    for( size_t n = 0 ; n < nInfos ; ++n )
         maSignatureHelper.ExportSignature( 
         xDocumentHandler, maCurrentSignatureInformations[ n ] );
 
@@ -485,8 +485,8 @@ IMPL_LINK( DigitalSignaturesDialog, AddButtonHdl, Button*, EMPTYARG )
                 maSignatureHelper.CreateDocumentHandlerWithHeader( xOutputStream );
 
             // Export old signatures...
-             int nInfos = maCurrentSignatureInformations.size();
-            for ( int n = 0; n < nInfos; n++ )
+            size_t nInfos = maCurrentSignatureInformations.size();
+            for ( size_t n = 0; n < nInfos; n++ )
                 maSignatureHelper.ExportSignature( xDocumentHandler, maCurrentSignatureInformations[n]);
 
             // Create a new one...
@@ -547,8 +547,8 @@ IMPL_LINK( DigitalSignaturesDialog, RemoveButtonHdl, Button*, EMPTYARG )
             Reference< css::xml::sax::XDocumentHandler> xDocumentHandler = 
                 maSignatureHelper.CreateDocumentHandlerWithHeader( xOutputStream );
 
-            int nInfos = maCurrentSignatureInformations.size();
-            for( int n = 0 ; n < nInfos ; ++n )
+            size_t nInfos = maCurrentSignatureInformations.size();
+            for( size_t n = 0 ; n < nInfos ; ++n )
                 maSignatureHelper.ExportSignature( xDocumentHandler, maCurrentSignatureInformations[ n ] );
 
             maSignatureHelper.CloseDocumentHandler( xDocumentHandler);
@@ -587,13 +587,13 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox()
     uno::Reference< ::com::sun::star::security::XCertificate > xCert;
 
     String aNullStr;
-    int nInfos = maCurrentSignatureInformations.size();
-    int nValidSigs = 0, nValidCerts = 0;
+    size_t nInfos = maCurrentSignatureInformations.size();
+    size_t nValidSigs = 0, nValidCerts = 0;
     bool bAllNewSignatures = true;
 
     if( nInfos )
     {
-        for( int n = 0; n < nInfos; ++n )
+        for( size_t n = 0; n < nInfos; ++n )
         {
             DocumentSignatureAlgorithm mode = DocumentSignatureHelper::getDocumentAlgorithm(
                 m_sODFVersion, maCurrentSignatureInformations[n]);
diff --git a/xmlsecurity/source/dialogs/macrosecurity.cxx b/xmlsecurity/source/dialogs/macrosecurity.cxx
index 043e972..4d0a351 100644
--- a/xmlsecurity/source/dialogs/macrosecurity.cxx
+++ b/xmlsecurity/source/dialogs/macrosecurity.cxx
@@ -329,7 +329,7 @@ void MacroSecurityTrustedSourcesTP::FillCertLB( void )
             SvLBoxEntry*    pLBEntry = maTrustCertLB.InsertEntry( XmlSec::GetContentPart( xCert->getSubjectName() ) );
             maTrustCertLB.SetEntryText( XmlSec::GetContentPart( xCert->getIssuerName() ), pLBEntry, 1 );
             maTrustCertLB.SetEntryText( XmlSec::GetDateTimeString( xCert->getNotValidAfter() ), pLBEntry, 2 );
-            pLBEntry->SetUserData( ( void* ) sal_Int32( nEntry ) );		// missuse user data as index
+            pLBEntry->SetUserData( ( void* ) (sal_IntPtr)nEntry );		// missuse user data as index
         }
     }
 }


More information about the Libreoffice-commits mailing list