[Libreoffice-commits] .: 2 commits - starmath/source sw/source

Caolán McNamara caolan at kemper.freedesktop.org
Thu Jan 27 09:29:20 PST 2011


 starmath/source/smdetect.cxx              |    5 -----
 sw/source/core/doc/doccomp.cxx            |    6 ++----
 sw/source/core/edit/edglss.cxx            |    2 --
 sw/source/core/frmedt/feflyole.cxx        |    1 +
 sw/source/core/layout/frmtool.cxx         |    2 --
 sw/source/core/unocore/unotbl.cxx         |    3 ---
 sw/source/core/view/pagepreviewlayout.cxx |    2 --
 sw/source/filter/basflt/iodetect.cxx      |    7 +------
 sw/source/filter/ww8/wrtw8num.cxx         |    2 --
 sw/source/filter/ww8/ww8par.cxx           |    2 --
 sw/source/filter/ww8/ww8par3.cxx          |    1 +
 sw/source/ui/dbui/mmoutputpage.cxx        |    3 +--
 sw/source/ui/docvw/SidebarWin.cxx         |    8 ++------
 sw/source/ui/ribbar/concustomshape.cxx    |    4 ----
 sw/source/ui/table/tabledlg.cxx           |    2 +-
 sw/source/ui/utlui/viewlayoutctrl.cxx     |    2 --
 16 files changed, 9 insertions(+), 43 deletions(-)

New commits:
commit 627862be2c077acf99c6bfa831e468c6676f62df
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jan 27 12:09:39 2011 +0000

    WaE: gcc 4.6.0 various warnings

diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx
index 1100fe6..93915bc 100644
--- a/sw/source/core/doc/doccomp.cxx
+++ b/sw/source/core/doc/doccomp.cxx
@@ -701,13 +701,12 @@ ULONG Compare::CompareSequence::CheckDiag( ULONG nStt1, ULONG nEnd1,
         fmax < dmax ? pFDiag[++fmax + 1] = -1 : --fmax;
         for (d = fmax; d >= fmin; d -= 2)
         {
-            long x, y, oldx, tlo = pFDiag[d - 1], thi = pFDiag[d + 1];
+            long x, y, tlo = pFDiag[d - 1], thi = pFDiag[d + 1];
 
             if (tlo >= thi)
                 x = tlo + 1;
             else
                 x = thi;
-            oldx = x;
             y = x - d;
             while( ULONG(x) < nEnd1 && ULONG(y) < nEnd2 &&
                 rMoved1.GetIndex( x ) == rMoved2.GetIndex( y ))
@@ -725,13 +724,12 @@ ULONG Compare::CompareSequence::CheckDiag( ULONG nStt1, ULONG nEnd1,
         bmax < dmax ? pBDiag[++bmax + 1] = INT_MAX : --bmax;
         for (d = bmax; d >= bmin; d -= 2)
         {
-            long x, y, oldx, tlo = pBDiag[d - 1], thi = pBDiag[d + 1];
+            long x, y, tlo = pBDiag[d - 1], thi = pBDiag[d + 1];
 
             if (tlo < thi)
                 x = tlo;
             else
                 x = thi - 1;
-            oldx = x;
             y = x - d;
             while( ULONG(x) > nStt1 && ULONG(y) > nStt2 &&
                 rMoved1.GetIndex( x - 1 ) == rMoved2.GetIndex( y - 1 ))
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index b10ac8a..cd50b87 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -1013,7 +1013,6 @@ SwCntntNotify::~SwCntntNotify()
                     continue;	//#60878# nicht etwa zeichengebundene.
                 }
 
-                BOOL bCheckPos = FALSE;
                 if ( rAnch.GetCntntAnchor() )
                 {
                     if ( !pIdx )
@@ -1022,7 +1021,6 @@ SwCntntNotify::~SwCntntNotify()
                     }
                     if ( rAnch.GetCntntAnchor()->nNode == *pIdx )
                     {
-                        bCheckPos = TRUE;
                         if (FLY_AT_PAGE == rAnch.GetAnchorId())
                         {
                             OSL_ENSURE( false, "<SwCntntNotify::~SwCntntNotify()> - to page anchored object with content position. Please inform OD." );
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index 68e7d6b..2169cbf 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -2027,17 +2027,14 @@ void	SwTableProperties_Impl::ApplyTblAttr(const SwTable& rTbl, SwDoc& rDoc)
         aSet.Put(aKeep);
     }
 
-    sal_Bool bFullAlign = sal_True;
     const uno::Any* pHOrient;
     if(GetProperty(RES_HORI_ORIENT, MID_HORIORIENT_ORIENT, pHOrient))
     {
         SwFmtHoriOrient aOrient ( rFrmFmt.GetHoriOrient() );
         ((SfxPoolItem&)aOrient).PutValue(*pHOrient, MID_HORIORIENT_ORIENT|CONVERT_TWIPS);
-        bFullAlign = (aOrient.GetHoriOrient() == text::HoriOrientation::FULL);
         aSet.Put(aOrient);
     }
 
-
     const uno::Any* pSzRel       = 0;
     GetProperty(FN_TABLE_IS_RELATIVE_WIDTH, 0xff, pSzRel  );
     const uno::Any* pRelWidth   = 0;
diff --git a/sw/source/ui/ribbar/concustomshape.cxx b/sw/source/ui/ribbar/concustomshape.cxx
index a1efd85..78263f4 100644
--- a/sw/source/ui/ribbar/concustomshape.cxx
+++ b/sw/source/ui/ribbar/concustomshape.cxx
@@ -109,13 +109,9 @@ BOOL ConstCustomShape::MouseButtonDown(const MouseEvent& rMEvt)
             if ( pObj )
             {
                 SetAttributes( pObj );
-                sal_Bool bForceFillStyle = sal_True;
                 sal_Bool bForceNoFillStyle = sal_False;
                 if ( ((SdrObjCustomShape*)pObj)->UseNoFillStyle() )
-                {
-                    bForceFillStyle = sal_False;
                     bForceNoFillStyle = sal_True;
-                }
 
                 SfxItemSet aAttr( m_pView->GetPool() );
                 if ( bForceNoFillStyle )
commit 9234fd2ca59aea19602e416b911aa7c712636340
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jan 27 11:22:34 2011 +0000

    WaE: gcc 4.6.0 various warnings

diff --git a/starmath/source/smdetect.cxx b/starmath/source/smdetect.cxx
index e4f11c0..e936de5 100644
--- a/starmath/source/smdetect.cxx
+++ b/starmath/source/smdetect.cxx
@@ -116,7 +116,6 @@ SmFilterDetect::~SmFilterDetect()
     // now some parameters that can already be in the array, but may be overwritten or new inserted here
     // remember their indices in the case new values must be added to the array
     sal_Int32 nPropertyCount = lDescriptor.getLength();
-    sal_Int32 nIndexOfFilterName = -1;
     sal_Int32 nIndexOfInputStream = -1;
     sal_Int32 nIndexOfContent = -1;
     sal_Int32 nIndexOfReadOnlyFlag = -1;
@@ -145,10 +144,6 @@ SmFilterDetect::~SmFilterDetect()
         {
             lDescriptor[nProperty].Value >>= sTemp;
             aPreselectedFilterName = sTemp;
-
-            // if the preselected filter name is not correct, it must be erased after detection
-            // remember index of property to get access to it later
-            nIndexOfFilterName = nProperty;
         }
         else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("InputStream")) )
             nIndexOfInputStream = nProperty;
diff --git a/sw/source/core/edit/edglss.cxx b/sw/source/core/edit/edglss.cxx
index 5fb1ad9..79b1e50 100644
--- a/sw/source/core/edit/edglss.cxx
+++ b/sw/source/core/edit/edglss.cxx
@@ -283,7 +283,6 @@ BOOL SwEditShell::_CopySelToDoc( SwDoc* pInsDoc, SwNodeIndex* pSttNd )
 
 BOOL SwEditShell::GetSelectedText( String &rBuf, int nHndlParaBrk )
 {
-    BOOL bRet = FALSE;
     GetCrsr();	// ggfs. alle Cursor erzeugen lassen
     if( IsSelOnePara() )
     {
@@ -305,7 +304,6 @@ BOOL SwEditShell::GetSelectedText( String &rBuf, int nHndlParaBrk )
                             RTL_CONSTASCII_STRINGPARAM( "\015\012" ));
 #endif
         }
-        bRet = TRUE;
     }
     else if( IsSelection() )
     {
diff --git a/sw/source/core/frmedt/feflyole.cxx b/sw/source/core/frmedt/feflyole.cxx
index 28fb8fd..66be016 100644
--- a/sw/source/core/frmedt/feflyole.cxx
+++ b/sw/source/core/frmedt/feflyole.cxx
@@ -88,6 +88,7 @@ SwFlyFrm *SwFEShell::FindFlyFrm( const uno::Reference < embed::XEmbeddedObject >
         }
 
         OSL_ENSURE( bExist, "OLE-Object unknown and FlyFrm not found." );
+        (void)bExist;
     }
     return pFly;
 }
diff --git a/sw/source/core/view/pagepreviewlayout.cxx b/sw/source/core/view/pagepreviewlayout.cxx
index 62ed0a4..ec64a9b 100644
--- a/sw/source/core/view/pagepreviewlayout.cxx
+++ b/sw/source/core/view/pagepreviewlayout.cxx
@@ -1034,8 +1034,6 @@ bool SwPagePreviewLayout::Paint( const Rectangle  _aOutRect ) const
 
     const Font& rEmptyPgFont = SwPageFrm::GetEmptyPageFont();
 
-    Color aEmptyPgShadowBorderColor = SwViewOption::GetFontColor();
-
     for ( std::vector<PrevwPage*>::const_iterator aPageIter = maPrevwPages.begin();
           aPageIter != maPrevwPages.end();
           ++aPageIter )
diff --git a/sw/source/filter/basflt/iodetect.cxx b/sw/source/filter/basflt/iodetect.cxx
index 6ea629a..9a6eb8b 100644
--- a/sw/source/filter/basflt/iodetect.cxx
+++ b/sw/source/filter/basflt/iodetect.cxx
@@ -308,14 +308,12 @@ const SfxFilter* SwIoSystem::GetFileFilter(const String& rFileName,
     {
         // package storage or OLEStorage based format
         SotStorageRef xStg;
-        BOOL bDeleteMedium = FALSE;
         if (!pMedium )
         {
             INetURLObject aObj;
             aObj.SetSmartProtocol( INET_PROT_FILE );
             aObj.SetSmartURL( rFileName );
             pMedium = new SfxMedium( aObj.GetMainURL( INetURLObject::NO_DECODE ), STREAM_STD_READ, FALSE );
-            bDeleteMedium = TRUE;
         }
 
         // templates should not get precedence over "normal" filters (#i35508, #i33168)
@@ -457,8 +455,7 @@ bool SwIoSystem::IsDetectableText(const sal_Char* pBuf, ULONG &rLen,
         rLen-=nHead;
     }
 
-    bool bCR = false, bLF = false, bNoNormalChar = false,
-        bIsBareUnicode = false;
+    bool bCR = false, bLF = false, bIsBareUnicode = false;
 
     if (eCharSet != RTL_TEXTENCODING_DONTKNOW)
     {
@@ -547,8 +544,6 @@ bool SwIoSystem::IsDetectableText(const sal_Char* pBuf, ULONG &rLen,
                 case 0x9:
                     break;
                 default:
-                    if (0x20 > (BYTE)*pBuf)
-                        bNoNormalChar = true;
                     break;
             }
         }
diff --git a/sw/source/filter/ww8/wrtw8num.cxx b/sw/source/filter/ww8/wrtw8num.cxx
index 284d43f..90f1ad9 100644
--- a/sw/source/filter/ww8/wrtw8num.cxx
+++ b/sw/source/filter/ww8/wrtw8num.cxx
@@ -711,7 +711,6 @@ void MSWordExportBase::SubstituteBullet( String& rNumStr,
     rtl_TextEncoding& rChrSet, String& rFontName ) const
 {
     StarSymbolToMSMultiFont *pConvert = 0;
-    FontFamily eFamily = FAMILY_DECORATIVE;
 
     if (!bSubstituteBullets)
         return;
@@ -748,7 +747,6 @@ void MSWordExportBase::SubstituteBullet( String& rNumStr,
         let words own font substitution kick in
         */
         rChrSet = RTL_TEXTENCODING_UNICODE;
-        eFamily = FAMILY_SWISS;
         rFontName = ::GetFontToken(rFontName, 0);
      }
      else
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 0690061..7d95b0e 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -568,7 +568,6 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
             if( bIsSimpleDrawingTextBox )
                 ApplyAttributes( rSt, aSet, rObjData );
 
-            bool bFitText = false;
             if (GetPropertyValue(DFF_Prop_FitTextToShape) & 2)
             {
                 aSet.Put( SdrTextAutoGrowHeightItem( TRUE ) );
@@ -576,7 +575,6 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
                     aNewRect.Bottom() - aNewRect.Top() ) );
                 aSet.Put( SdrTextMinFrameWidthItem(
                     aNewRect.Right() - aNewRect.Left() ) );
-                bFitText = true;
             }
             else
             {
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index 966e6e6..c49a398 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -629,6 +629,7 @@ bool WW8ListManager::ReadLVL(SwNumFmt& rNumFmt, SfxItemSet*& rpItemSet,
             }
             OSL_ENSURE(bDone, "tab setting in numbering is "
                 "of unexpected configuration");
+            (void)bDone;
         }
         if ( rNumFmt.GetPositionAndSpaceMode() ==
                                   SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx
index f3bb4b4..fdd21c3 100644
--- a/sw/source/ui/dbui/mmoutputpage.cxx
+++ b/sw/source/ui/dbui/mmoutputpage.cxx
@@ -1038,7 +1038,6 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
             nEnd = rConfigItem.GetMergedDocumentCount();
     }
     bool bAsBody = false;
-    bool bIsPDF = false;
     rtl_TextEncoding eEncoding = ::gsl_getSystemTextEncoding();
     SfxFilterContainer* pFilterContainer = SwDocShell::Factory().GetFilterContainer();
     const SfxFilter *pSfxFlt = 0;
@@ -1047,7 +1046,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
     switch( nDocType )
     {
         case MM_DOCTYPE_OOO : break;
-        case MM_DOCTYPE_PDF : bIsPDF = true; break;
+        case MM_DOCTYPE_PDF : break;
         case MM_DOCTYPE_WORD:
         {
             //the method SwIOSystemGetFilterOfFormat( ) returns the template filter
diff --git a/sw/source/ui/docvw/SidebarWin.cxx b/sw/source/ui/docvw/SidebarWin.cxx
index ccd09d5..686dbc4 100644
--- a/sw/source/ui/docvw/SidebarWin.cxx
+++ b/sw/source/ui/docvw/SidebarWin.cxx
@@ -1053,18 +1053,14 @@ IMPL_LINK(SwSidebarWin, ScrollHdl, ScrollBar*, pScroll)
     return 0;
 }
 
-IMPL_LINK(SwSidebarWin, ModifyHdl, void*, pVoid)
+IMPL_LINK(SwSidebarWin, ModifyHdl, void*, EMPTYARG)
 {
-    // no warnings, please
-    pVoid=0;
     mrView.GetDocShell()->SetModified(sal_True);
     return 0;
 }
 
-IMPL_LINK(SwSidebarWin, DeleteHdl, void*, pVoid)
+IMPL_LINK(SwSidebarWin, DeleteHdl, void*, EMPTYARG)
 {
-    // no warnings, please
-    pVoid=0;
     mnEventId = 0;
     Delete();
     return 0;
diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx
index 84f52b4..a83e958 100644
--- a/sw/source/ui/table/tabledlg.cxx
+++ b/sw/source/ui/table/tabledlg.cxx
@@ -637,7 +637,7 @@ void  SwFormatTablePage::Reset( const SfxItemSet& )
     //text direction
     if( SFX_ITEM_SET == rSet.GetItemState( RES_FRAMEDIR, TRUE, &pItem ) )
     {
-        sal_uInt32 nVal  = ((SvxFrameDirectionItem*)pItem)->GetValue();
+        sal_uIntPtr nVal  = ((SvxFrameDirectionItem*)pItem)->GetValue();
         USHORT nPos = aTextDirectionLB.GetEntryPos( (void*) nVal );
         aTextDirectionLB.SelectEntryPos( nPos );
         aTextDirectionLB.SaveValue();
diff --git a/sw/source/ui/utlui/viewlayoutctrl.cxx b/sw/source/ui/utlui/viewlayoutctrl.cxx
index 352caac..fef0002 100644
--- a/sw/source/ui/utlui/viewlayoutctrl.cxx
+++ b/sw/source/ui/utlui/viewlayoutctrl.cxx
@@ -112,8 +112,6 @@ void SwViewLayoutControl::Paint( const UserDrawEvent& rUsrEvt )
 {
     OutputDevice*       pDev =  rUsrEvt.GetDevice();
     Rectangle           aRect = rUsrEvt.GetRect();
-    Color               aOldLineColor = pDev->GetLineColor();
-    Color               aOldFillColor = pDev->GetFillColor();
 
     const bool bSingleColumn    = 0 == mpImpl->mnState;
     const bool bAutomatic       = 1 == mpImpl->mnState;


More information about the Libreoffice-commits mailing list