[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 6 commits - framework/inc vcl/aqua vcl/inc vcl/source

Herbert Dürr hdu at apache.org
Wed Feb 27 17:20:47 PST 2013


 framework/inc/properties.h                           |   14 --------------
 vcl/aqua/source/a11y/aqua11ytextattributeswrapper.mm |    2 +-
 vcl/aqua/source/gdi/salgdiutils.cxx                  |    2 +-
 vcl/inc/vcl/bitmap.hxx                               |   11 +++++++++++
 vcl/source/gdi/bitmap3.cxx                           |    5 -----
 vcl/source/gdi/pdfwriter_impl.cxx                    |    2 +-
 6 files changed, 14 insertions(+), 22 deletions(-)

New commits:
commit 04a9a74efd2a0bef1dca9d5913c73bb09b178941
Author: Herbert Dürr <hdu at apache.org>
Date:   Wed Feb 27 16:18:35 2013 +0000

    WaE: calculatePropArrayCount() was always wrong but fortunately nobody used it anyway

diff --git a/framework/inc/properties.h b/framework/inc/properties.h
index 49c3a4b..0662660 100644
--- a/framework/inc/properties.h
+++ b/framework/inc/properties.h
@@ -329,20 +329,6 @@ class PropHelper
 
         return bChanged;
     }
-
-    //___________________________________________
-
-    /** calculates the count of items inside the given ascii array.
-     *
-     *  @param  pArray  must point to an array of items from type sal_Char
-     *
-     *  @return The count of items inside this array, calculated by knowing the size of sal_Char.
-     */
-
-    static sal_Int32 calculatePropArrayCount( const sal_Char* pArray[] )
-    {
-        return (sal_Int32)(sizeof(pArray)/sizeof(sal_Char*));
-    }
 };
 
 } // namespace framework
commit 75b2f831c2cf8ae982bf830ea49c1519a242a224
Author: Herbert Dürr <hdu at apache.org>
Date:   Wed Feb 27 13:21:48 2013 +0000

    WaE: fix if-condition with mixed-up assignment vs. comparison

diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 96863da..4a75e6f 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -6559,7 +6559,7 @@ bool PDFWriterImpl::emitTrailer()
     aLine.append( "/Root " );
     aLine.append( m_nCatalogObject );
     aLine.append( " 0 R\n" );
-    if( nSecObject |= 0 )
+    if( nSecObject )
     {
         aLine.append( "/Encrypt ");
         aLine.append( nSecObject );
commit 29940aac42479eae4854234ce813518a83e4233b
Author: Herbert Dürr <hdu at apache.org>
Date:   Wed Feb 27 13:16:54 2013 +0000

    WaE: fix allocation of an CGPoint array

diff --git a/vcl/aqua/source/gdi/salgdiutils.cxx b/vcl/aqua/source/gdi/salgdiutils.cxx
index 4ad6f8d..dd49d6f 100644
--- a/vcl/aqua/source/gdi/salgdiutils.cxx
+++ b/vcl/aqua/source/gdi/salgdiutils.cxx
@@ -253,7 +253,7 @@ void AquaSalGraphics::RefreshRect(float lX, float lY, float lWidth, float lHeigh
 
 CGPoint* AquaSalGraphics::makeCGptArray(sal_uLong nPoints, const SalPoint*  pPtAry)
 {
-    CGPoint *CGpoints = new (CGPoint[nPoints]);
+    CGPoint *CGpoints = new CGPoint[ nPoints];
     if ( CGpoints )
       {
         for(sal_uLong i=0;i<nPoints;i++)
commit 801369e540a4c44b69aa5e2f73ad3b367c0d70c3
Author: Herbert Dürr <hdu at apache.org>
Date:   Wed Feb 27 13:10:22 2013 +0000

    WaE: default-initialized const object requires a user-provided default constructor

diff --git a/vcl/inc/vcl/bitmap.hxx b/vcl/inc/vcl/bitmap.hxx
index fce0e86..e81a47d 100644
--- a/vcl/inc/vcl/bitmap.hxx
+++ b/vcl/inc/vcl/bitmap.hxx
@@ -254,6 +254,8 @@ public:
 class Lanczos3Kernel : public Kernel
 {
 public:
+    Lanczos3Kernel( void) {}
+
     virtual double GetWidth() const
     {
         return 3.0;
@@ -278,6 +280,9 @@ public:
 
 class BicubicKernel : public Kernel
 {
+public:
+    BicubicKernel( void) {}
+
     virtual double GetWidth() const
     {
         return 2.0;
@@ -305,6 +310,9 @@ class BicubicKernel : public Kernel
 
 class BilinearKernel : public Kernel
 {
+public:
+    BilinearKernel( void) {}
+
     virtual double GetWidth() const
     {
         return 1.0;
@@ -328,6 +336,9 @@ class BilinearKernel : public Kernel
 
 class BoxKernel : public Kernel
 {
+public:
+    BoxKernel( void) {}
+
     virtual double GetWidth() const
     {
         return 0.5;
commit 32bd6183ec590d78ef92c1206e3fa0296b2b6f79
Author: Herbert Dürr <hdu at apache.org>
Date:   Wed Feb 27 13:03:27 2013 +0000

    WaE: removed suspicious self-assignments in the new BMP_SCALE_* code

diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx
index 24948f8..33cc96a 100644
--- a/vcl/source/gdi/bitmap3.cxx
+++ b/vcl/source/gdi/bitmap3.cxx
@@ -1559,7 +1559,6 @@ sal_Bool Bitmap::ImplScaleSuper(
                                     else
                                         nWeightY = nMax;
 
-                                    nWeightY = nWeightY ;
                                     nSumB += nWeightY * ( nSumRowB / nTotalWeightX );
                                     nSumG += nWeightY * ( nSumRowG / nTotalWeightX );
                                     nSumR += nWeightY * ( nSumRowR / nTotalWeightX );
@@ -1704,7 +1703,6 @@ sal_Bool Bitmap::ImplScaleSuper(
                                     else
                                         nWeightY = nMax;
 
-                                    nWeightY = nWeightY ;
                                     nSumB += nWeightY * ( nSumRowB / nTotalWeightX );
                                     nSumG += nWeightY * ( nSumRowG / nTotalWeightX );
                                     nSumR += nWeightY * ( nSumRowR / nTotalWeightX );
@@ -1851,7 +1849,6 @@ sal_Bool Bitmap::ImplScaleSuper(
                                     else
                                         nWeightY = nMax;
 
-                                    nWeightY = nWeightY ;
                                     nSumB += nWeightY * ( nSumRowB / nTotalWeightX );
                                     nSumG += nWeightY * ( nSumRowG / nTotalWeightX );
                                     nSumR += nWeightY * ( nSumRowR / nTotalWeightX );
@@ -1996,7 +1993,6 @@ sal_Bool Bitmap::ImplScaleSuper(
                                     else
                                         nWeightY = nMax;
 
-                                    nWeightY = nWeightY ;
                                     nSumB += nWeightY * ( nSumRowB / nTotalWeightX );
                                     nSumG += nWeightY * ( nSumRowG / nTotalWeightX );
                                     nSumR += nWeightY * ( nSumRowR / nTotalWeightX );
@@ -2139,7 +2135,6 @@ sal_Bool Bitmap::ImplScaleSuper(
                                     else
                                         nWeightY = nMax;
 
-                                    nWeightY = nWeightY ;
                                     nSumB += nWeightY * ( nSumRowB / nTotalWeightX );
                                     nSumG += nWeightY * ( nSumRowG / nTotalWeightX );
                                     nSumR += nWeightY * ( nSumRowR / nTotalWeightX );
commit 48abe64c9963a03b38224aed16cf7a832c225802
Author: Herbert Dürr <hdu at apache.org>
Date:   Wed Feb 27 08:53:57 2013 +0000

    fix building in environments where trigraphs are accidentially enabled

diff --git a/vcl/aqua/source/a11y/aqua11ytextattributeswrapper.mm b/vcl/aqua/source/a11y/aqua11ytextattributeswrapper.mm
index 971f367..39ec446 100644
--- a/vcl/aqua/source/a11y/aqua11ytextattributeswrapper.mm
+++ b/vcl/aqua/source/a11y/aqua11ytextattributeswrapper.mm
@@ -69,7 +69,7 @@ using namespace ::rtl;
 
 +(int)convertItalicStyle:(PropertyValue)property {
     int italicStyle = 0;
-    sal_Int16 value = property.Value.get<::css_awt::FontSlant>();
+    const sal_Int16 value = property.Value.get< ::css_awt::FontSlant>();
     if ( value == ::css_awt::FontSlant_ITALIC ) {
         italicStyle = NSItalicFontMask;
     }


More information about the Libreoffice-commits mailing list