[Libreoffice-commits] core.git: sw/source

Caolán McNamara caolanm at redhat.com
Wed Mar 13 06:18:20 PDT 2013


 sw/source/filter/ww8/rtfattributeoutput.cxx |    2 -
 sw/source/filter/ww8/rtfexport.cxx          |    2 -
 sw/source/filter/ww8/writerhelper.cxx       |   42 ++++++++++++++--------------
 sw/source/filter/ww8/wrtww8gr.cxx           |    5 +--
 sw/source/filter/ww8/ww8par.cxx             |    4 +-
 sw/source/filter/ww8/ww8par.hxx             |    4 +-
 sw/source/filter/ww8/ww8par3.cxx            |    4 +-
 7 files changed, 31 insertions(+), 32 deletions(-)

New commits:
commit ed740489ed39e0fc3ec43e3f3a1e6e9e366a2c5e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Mar 13 13:06:13 2013 +0000

    WaE: various warngs, e.g. unused argument, variables, ordering
    
    Change-Id: I551ccf9b098d7f916bd889dbc82d22c0dc5c63f3

diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 8d4eefa..39fd23b 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -1326,7 +1326,7 @@ void RtfAttributeOutput::NumberingLevel( sal_uInt8 nLevel,
         sal_Int16 nFirstLineIndex,
         sal_Int16 /*nListTabPos*/,
         const String &rNumberingString,
-        const SvxBrushItem* pBrush)
+        const SvxBrushItem* /*pBrush*/)
 {
     SAL_INFO("sw.rtf", OSL_THIS_FUNC);
 
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index e421ac0..0079fbe 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -169,7 +169,7 @@ void RtfExport::AppendBookmark( const OUString& rName, bool /*bSkip*/ )
 }
 
 //For i120928,to export graphic of bullet for RTF filter
-void RtfExport::ExportGrfBullet(const SwTxtNode& rNd)
+void RtfExport::ExportGrfBullet(const SwTxtNode&)
 {
     //This is for RTF filter on the graphic bullets
 }
diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx
index df5f5ef..32167e0 100644
--- a/sw/source/filter/ww8/writerhelper.cxx
+++ b/sw/source/filter/ww8/writerhelper.cxx
@@ -157,16 +157,16 @@ namespace
 namespace sw
 {
     //For i120928,size conversion before exporting graphic of bullet
-    Frame::Frame(const Graphic&rGrf, const SwPosition &rPos)
-        :mpFlyFrm(NULL),
-        maPos(rPos),
-        maSize(),
-        maLayoutSize(),
-        mpStartFrameContent(0),
-        mbIsInline(true),
-        meWriterType(eBulletGrf),
-        maGrf(rGrf),
-        mbForBullet(true)
+    Frame::Frame(const Graphic &rGrf, const SwPosition &rPos)
+        : mpFlyFrm(NULL)
+        , maPos(rPos)
+        , maSize()
+        , maLayoutSize()
+        , meWriterType(eBulletGrf)
+        , mpStartFrameContent(0)
+        , mbIsInline(true)
+        , mbForBullet(true)
+        , maGrf(rGrf)
     {
         const MapMode aMap100mm( MAP_100TH_MM );
         Size    aSize( rGrf.GetPrefSize() );
@@ -183,17 +183,17 @@ namespace sw
     }
 
     Frame::Frame(const SwFrmFmt &rFmt, const SwPosition &rPos)
-        : mpFlyFrm(&rFmt),
-          maPos(rPos),
-          maSize(),
-          maLayoutSize(), // #i43447#
-          meWriterType(eTxtBox),
-          mpStartFrameContent(0),
-          // #i43447# - move to initialization list
-          mbIsInline( (rFmt.GetAnchor().GetAnchorId() == FLY_AS_CHAR) )
-          // #i120928# - handle graphic of bullet within existing implementation
-          ,maGrf()
-          ,mbForBullet(false)
+        : mpFlyFrm(&rFmt)
+        , maPos(rPos)
+        , maSize()
+        , maLayoutSize() // #i43447#
+        , meWriterType(eTxtBox)
+        , mpStartFrameContent(0)
+        // #i43447# - move to initialization list
+        , mbIsInline( (rFmt.GetAnchor().GetAnchorId() == FLY_AS_CHAR) )
+        // #i120928# - handle graphic of bullet within existing implementation
+        , mbForBullet(false)
+        , maGrf()
     {
         switch (rFmt.Which())
         {
diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx
index d7cd88c..d072727 100644
--- a/sw/source/filter/ww8/wrtww8gr.cxx
+++ b/sw/source/filter/ww8/wrtww8gr.cxx
@@ -808,7 +808,8 @@ void SwWW8WrGrf::WritePICBulletFHeader(SvStream& rStrm, const Graphic &rGrf,
 
     rStrm.Write( aArr, nHdrLen );
 }
-void SwWW8WrGrf::WriteGrfForBullet(SvStream& rStrm,  const Graphic &rGrf, sal_uInt16 nWidth, sal_uInt16 nHeight)
+
+void SwWW8WrGrf::WriteGrfForBullet(SvStream& rStrm, const Graphic &rGrf, sal_uInt16 nWidth, sal_uInt16 nHeight)
 {
     if (rWrt.bWrtWW8)
     {
@@ -819,8 +820,6 @@ void SwWW8WrGrf::WriteGrfForBullet(SvStream& rStrm,  const Graphic &rGrf, sal_uI
     }
     else
     {
-        bool bSwapped = rGrf.IsSwapOut() ? true : false;
-
         GDIMetaFile aMeta;
         switch (rGrf.GetType())
         {
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index c7104c4..8fa7f0c 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -4746,8 +4746,8 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
                         }
                     }
                     // update graphic bullet information
-                    int nCount = pLstManager->GetWW8LSTInfoNum();
-                    for (int i = 0; i < nCount; ++i)
+                    size_t nCount = pLstManager->GetWW8LSTInfoNum();
+                    for (size_t i = 0; i < nCount; ++i)
                     {
                         SwNumRule* pRule = pLstManager->GetNumRule(i);
                         for (int j = 0; j < MAXLEVEL; ++j)
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index 0d5da66..dbb5e1b 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -159,8 +159,8 @@ public:
         std::vector<sal_uInt8> &rParaSprms, SwTxtNode *pNode=0);
     SwNumRule* CreateNextRule(bool bSimple);
     ~WW8ListManager();
-    SwNumRule* GetNumRule(int i);
-    int GetWW8LSTInfoNum() const{return maLSTInfos.size();}
+    SwNumRule* GetNumRule(size_t i);
+    size_t GetWW8LSTInfoNum() const{return maLSTInfos.size();}
 private:
     wwSprmParser maSprmParser;
     SwWW8ImplReader& rReader;
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index 6dfc40f..6f3d2c7 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -1070,9 +1070,9 @@ SwNumRule* WW8ListManager::CreateNextRule(bool bSimple)
     return pMyNumRule;
 }
 
-SwNumRule* WW8ListManager::GetNumRule(int i)
+SwNumRule* WW8ListManager::GetNumRule(size_t i)
 {
-    if ( i >= 0 && i < maLSTInfos.size() )
+    if (i < maLSTInfos.size())
         return maLSTInfos[i]->pNumRule;
     else
         return 0;


More information about the Libreoffice-commits mailing list