include/vcl/bmpacc.hxx        |    1 -
 unusedcode.easy               |    1 -
 vcl/source/filter/sgvtext.cxx |   15 +++++----------
 vcl/source/gdi/bmpacc3.cxx    |   42 ------------------------------------------
 4 files changed, 5 insertions(+), 54 deletions(-)

New commits:
commit 651a252374d67716afedebb2a5eae76243da8e3b
Author: Julien Nabet <serval2...@yahoo.fr>
Date:   Sat Aug 10 15:38:31 2013 +0200

    Remove unused BitmapWriteAccess::FillPolygon
    
    Change-Id: Iba583b4efab88620b54b02626bc9d9396219d0c8

diff --git a/include/vcl/bmpacc.hxx b/include/vcl/bmpacc.hxx
index a57377d..ea36a05 100644
--- a/include/vcl/bmpacc.hxx
+++ b/include/vcl/bmpacc.hxx
@@ -195,7 +195,6 @@ public:
     void                        FillRect( const Rectangle& rRect );
     void                        DrawRect( const Rectangle& rRect );
 
-    void                        FillPolygon( const Polygon& rPoly );
     void                        FillPolyPolygon( const PolyPolygon& rPoly );
 
 private:
diff --git a/unusedcode.easy b/unusedcode.easy
index 2b35769..07246c1c 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -5,7 +5,6 @@
 (anonymous namespace)::VBATest::testMiscOLEStuff()
 AffineMatrixItem::GetAffineMatrix2D() const
 BitmapWriteAccess::FillPolyPolygon(PolyPolygon const&)
-BitmapWriteAccess::FillPolygon(Polygon const&)
 CuiAboutConfigTabPage::LinkStubHeaderSelect_Impl(void*, void*)
 DbgRegisterNamedUserChannel(rtl::OUString const&, void (*)(char const*))
 EditTextObjectImpl::SetParaAttribs(int, SfxItemSet const&)
diff --git a/vcl/source/gdi/bmpacc3.cxx b/vcl/source/gdi/bmpacc3.cxx
index 6523967..06c9c09 100644
--- a/vcl/source/gdi/bmpacc3.cxx
+++ b/vcl/source/gdi/bmpacc3.cxx
@@ -243,48 +243,6 @@ void BitmapWriteAccess::DrawRect( const Rectangle& rRect )
     }
 }
 
-// ------------------------------------------------------------------
-
-void BitmapWriteAccess::FillPolygon( const Polygon& rPoly )
-{
-    const sal_uInt16 nSize = rPoly.GetSize();
-
-    if( nSize && mpFillColor )
-    {
-        const BitmapColor&  rFillColor = *mpFillColor;
-        Region              aRegion( rPoly );
-//      Rectangle           aRect;
-
-        aRegion.Intersect( Rectangle( Point(), Size( Width(), Height() ) ) );
-
-        if( !aRegion.IsEmpty() )
-        {
-            RectangleVector aRectangles;
-            aRegion.GetRegionRectangles(aRectangles);
-
-            for(RectangleVector::const_iterator 
aRectIter(aRectangles.begin()); aRectIter != aRectangles.end(); ++aRectIter)
-            {
-                for(long nY = aRectIter->Top(), nEndY = aRectIter->Bottom(); 
nY <= nEndY; nY++)
-                {
-                    for(long nX = aRectIter->Left(), nEndX = 
aRectIter->Right(); nX <= nEndX; nX++)
-                    {
-                        SetPixel(nY, nX, rFillColor);
-                    }
-                }
-            }
-
-            //RegionHandle aRegHandle( aRegion.BeginEnumRects() );
-            //
-            //while( aRegion.GetEnumRects( aRegHandle, aRect ) )
-            //  for( long nY = aRect.Top(), nEndY = aRect.Bottom(); nY <= 
nEndY; nY++ )
-            //      for( long nX = aRect.Left(), nEndX = aRect.Right(); nX <= 
nEndX; nX++ )
-            //          SetPixel( nY, nX, rFillColor );
-            //
-            //aRegion.EndEnumRects( aRegHandle );
-        }
-    }
-}
-
 void BitmapWriteAccess::FillPolyPolygon( const PolyPolygon& rPolyPoly )
 {
     const sal_uInt16 nCount = rPolyPoly.Count();
commit d11285ac88e5d9eabe49b2beaf08d5c762b8ce1b
Author: Julien Nabet <serval2...@yahoo.fr>
Date:   Sat Aug 10 15:31:02 2013 +0200

    Some cppcheck cleaning
    
    Change-Id: I31539733914a66241e77a7246aebc50850dea2aa

diff --git a/vcl/source/filter/sgvtext.cxx b/vcl/source/filter/sgvtext.cxx
index 96aba68..d9baff4 100644
--- a/vcl/source/filter/sgvtext.cxx
+++ b/vcl/source/filter/sgvtext.cxx
@@ -400,13 +400,11 @@ UCHAR GetTextChar(UCHAR* TBuf, sal_uInt16& Index,
                   ObjTextType& Atr0, ObjTextType& AktAtr,
                   sal_uInt16 Rest, bool ScanEsc)
 {
-    UCHAR c,c0,nc;
-
-    c=ProcessOne(TBuf,Index,Atr0,AktAtr,ScanEsc);
+    UCHAR c=ProcessOne(TBuf,Index,Atr0,AktAtr,ScanEsc);
     if (!ScanEsc) {
         if (c==SoftTrennAdd || c==SoftTrennK || c==SoftTrenn) {
-            nc=GetNextChar(TBuf,Index);
-            c0=c;
+            UCHAR nc=GetNextChar(TBuf,Index);
+            UCHAR c0=c;
             if (Rest==0 || Rest==DoTrenn ||
                 nc==' ' || nc==AbsatzEnd || nc==TextEnd) c='-';
             else {
@@ -693,7 +691,6 @@ UCHAR ProcessChar(OutputDevice& rOut, UCHAR* TBuf, 
ProcChrSta& R, ObjTextType& A
     sal_uInt16       KernDist=0;       // Wert fuer Kerning
     sal_uInt16       ChrWidth;
     UCHAR        c;
-    UCHAR        c1;
     bool         AbsEnd;
 
     c=GetTextChar(TBuf,R.Index,Atr0,R.Attrib,Rest,false); // versucht evtl. zu 
trennen, wenn Rest entsprechenden Wert besitzt
@@ -705,7 +702,7 @@ UCHAR ProcessChar(OutputDevice& rOut, UCHAR* TBuf, 
ProcChrSta& R, ObjTextType& A
         if (R.Kapt) R.OutCh=Upcase(R.OutCh);
         SetTextContext(rOut,R.Attrib,R.Kapt,0,1,1,1,1);
 
-        if (R.Kapt) c1=Upcase(c); else c1=c;
+        UCHAR c1 = (R.Kapt)?Upcase(c):c;
         ChrWidth=GetCharWidth(rOut,c1);
 
         if (R.Attrib.ZAbst!=100) { // Spezial-Zeichenabstand ?
@@ -980,7 +977,6 @@ void TextType::Draw(OutputDevice& rOut)
     sal_uInt16 TopToBase;
     bool   Ende = false;
     sal_uInt16 lc;
-    bool   LineFit; // FitSize.x=0? oder Flags -> jede Zeile stretchen
     bool   TextFit;
     short* xLine;
     UCHAR* cLine;   // Buffer fuer FormatLine
@@ -996,8 +992,7 @@ void TextType::Draw(OutputDevice& rOut)
     cLine=new UCHAR[CharLineSize];
 
     TextFit=(Flags & TextFitBits)!=0;
-    LineFit=false;
-    LineFit=((Flags & TextFitZBit)!=0);
+    bool LineFit=((Flags & TextFitZBit)!=0);  // FitSize.x=0? oder Flags -> 
jede Zeile stretchen
     if (TextFit && FitSize.x==0) LineFit=true;
 
     if (DrehWink==0) {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to