summaryrefslogtreecommitdiff
path: root/basebmp/inc
diff options
context:
space:
mode:
authorThorsten Behrens <thb@openoffice.org>2006-07-28 11:43:20 +0000
committerThorsten Behrens <thb@openoffice.org>2006-07-28 11:43:20 +0000
commitfaa4280d0a138f79d45df0a56ac31dd0fcd790e9 (patch)
tree4d0ae218ea1ab9ceeee7e07fde22dc282f56320a /basebmp/inc
parent8ce0bf508e47bb382088ffbb427bd6154a14d557 (diff)
#i65904# Made code compile warning-free for MSVC; removed inline statement from the longer functions
Diffstat (limited to 'basebmp/inc')
-rw-r--r--basebmp/inc/basebmp/clippedlinerenderer.hxx8
-rw-r--r--basebmp/inc/basebmp/color.hxx28
-rw-r--r--basebmp/inc/basebmp/fillimage.hxx12
-rw-r--r--basebmp/inc/basebmp/linerenderer.hxx6
-rw-r--r--basebmp/inc/basebmp/polypolygonrenderer.hxx8
-rw-r--r--basebmp/inc/basebmp/scaleimage.hxx34
6 files changed, 49 insertions, 47 deletions
diff --git a/basebmp/inc/basebmp/clippedlinerenderer.hxx b/basebmp/inc/basebmp/clippedlinerenderer.hxx
index 0f26309c30d5..c5d60c04689f 100644
--- a/basebmp/inc/basebmp/clippedlinerenderer.hxx
+++ b/basebmp/inc/basebmp/clippedlinerenderer.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: clippedlinerenderer.hxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: thb $ $Date: 2006-07-27 11:35:31 $
+ * last change: $Author: thb $ $Date: 2006-07-28 12:43:19 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -79,7 +79,7 @@ inline bool prepareClip( sal_Int32 a1,
sal_uInt32 bMaxFlag,
bool bRoundTowardsPt2 )
{
- int ca, cb;
+ int ca(0), cb(0);
if( clipCode1 )
{
if( clipCode1 & aMinFlag )
@@ -209,7 +209,7 @@ inline bool prepareClip( sal_Int32 a1,
pixel, the pixel closer to pt1 will be chosen. Giving true here
makes renderClippedLine() choose pt2 in those cases.
*/
-template< class Iterator, class Accessor > inline
+template< class Iterator, class Accessor >
void renderClippedLine( basegfx::B2IPoint aPt1,
basegfx::B2IPoint aPt2,
const basegfx::B2IRange& rClipRect,
diff --git a/basebmp/inc/basebmp/color.hxx b/basebmp/inc/basebmp/color.hxx
index 218947205a13..6b5630a9cfe8 100644
--- a/basebmp/inc/basebmp/color.hxx
+++ b/basebmp/inc/basebmp/color.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: color.hxx,v $
*
- * $Revision: 1.14 $
+ * $Revision: 1.15 $
*
- * last change: $Author: thb $ $Date: 2006-07-21 20:57:05 $
+ * last change: $Author: thb $ $Date: 2006-07-28 12:43:19 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -65,9 +65,9 @@ public:
void setGrey( sal_uInt8 nGreyVal ) { mnColor = (sal_uInt32)nGreyVal << 16 | (sal_uInt32)nGreyVal << 8 | nGreyVal; }
- sal_uInt8 getRed() const { return 0xFF & (mnColor >> 16); }
- sal_uInt8 getGreen() const { return 0xFF & (mnColor >> 8); }
- sal_uInt8 getBlue() const { return 0xFF & mnColor; }
+ sal_uInt8 getRed() const { return 0xFF & (sal_uInt8)(mnColor >> 16); }
+ sal_uInt8 getGreen() const { return 0xFF & (sal_uInt8)(mnColor >> 8); }
+ sal_uInt8 getBlue() const { return 0xFF & (sal_uInt8)mnColor; }
sal_uInt8 getGreyscale() const { return (sal_uInt8)((getBlue()*28UL +
getGreen()*151 +
@@ -80,18 +80,18 @@ public:
Color operator^( Color col ) const { return Color(col.getRed()^getRed(),
col.getGreen()^getGreen(),
col.getBlue()^getBlue()); }
- Color operator-( Color col ) const { return Color(abs((int)getRed()-col.getRed()),
- abs((int)getGreen()-col.getGreen()),
- abs((int)getBlue()-col.getBlue())); }
+ Color operator-( Color col ) const { return Color((sal_uInt8)abs((int)getRed()-col.getRed()),
+ (sal_uInt8)abs((int)getGreen()-col.getGreen()),
+ (sal_uInt8)abs((int)getBlue()-col.getBlue())); }
Color operator+( Color col ) const { return Color(getRed()+col.getRed(),
getGreen()+col.getGreen(),
getBlue()+col.getBlue()); }
- Color operator*( Color col ) const { return Color((sal_uInt32)col.getRed()*getRed()/SAL_MAX_UINT8,
- (sal_uInt32)col.getGreen()*getGreen()/SAL_MAX_UINT8,
- (sal_uInt32)col.getBlue()*getBlue()/SAL_MAX_UINT8); }
- Color operator*( sal_uInt8 n ) const { return Color((sal_uInt32)n*getRed()/SAL_MAX_UINT8,
- (sal_uInt32)n*getGreen()/SAL_MAX_UINT8,
- (sal_uInt32)n*getBlue()/SAL_MAX_UINT8); }
+ Color operator*( Color col ) const { return Color((sal_uInt8)((sal_uInt32)col.getRed()*getRed()/SAL_MAX_UINT8),
+ (sal_uInt8)((sal_uInt32)col.getGreen()*getGreen()/SAL_MAX_UINT8),
+ (sal_uInt8)((sal_uInt32)col.getBlue()*getBlue()/SAL_MAX_UINT8)); }
+ Color operator*( sal_uInt8 n ) const { return Color((sal_uInt8)((sal_uInt32)n*getRed()/SAL_MAX_UINT8),
+ (sal_uInt8)((sal_uInt32)n*getGreen()/SAL_MAX_UINT8),
+ (sal_uInt8)((sal_uInt32)n*getBlue()/SAL_MAX_UINT8)); }
Color operator*( double n ) const { return Color((sal_uInt8)(n*getRed()+.5),
(sal_uInt8)(n*getGreen()+.5),
(sal_uInt8)(n*getBlue()+.5)); }
diff --git a/basebmp/inc/basebmp/fillimage.hxx b/basebmp/inc/basebmp/fillimage.hxx
index d1f4d3e00082..855d67845c40 100644
--- a/basebmp/inc/basebmp/fillimage.hxx
+++ b/basebmp/inc/basebmp/fillimage.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: fillimage.hxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: thb $ $Date: 2006-07-11 15:33:05 $
+ * last change: $Author: thb $ $Date: 2006-07-28 12:43:20 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -43,10 +43,10 @@ namespace basebmp
{
template< class DestIterator, class DestAccessor, typename T >
-inline void fillImage( DestIterator begin,
- DestIterator end,
- DestAccessor ad,
- T fillVal )
+void fillImage( DestIterator begin,
+ DestIterator end,
+ DestAccessor ad,
+ T fillVal )
{
const int width ( end.x - begin.x );
const int height( end.y - begin.y );
diff --git a/basebmp/inc/basebmp/linerenderer.hxx b/basebmp/inc/basebmp/linerenderer.hxx
index df58c6f56742..3a5aa89e1993 100644
--- a/basebmp/inc/basebmp/linerenderer.hxx
+++ b/basebmp/inc/basebmp/linerenderer.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: linerenderer.hxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: thb $ $Date: 2006-07-27 11:35:31 $
+ * last change: $Author: thb $ $Date: 2006-07-28 12:43:20 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -79,7 +79,7 @@ namespace basebmp
pixel, the pixel closer to pt1 will be chosen. Giving true here
makes renderClippedLine() choose pt2 in those cases.
*/
-template< class Iterator, class Accessor > inline
+template< class Iterator, class Accessor >
void renderLine( const basegfx::B2IPoint& rPt1,
const basegfx::B2IPoint& rPt2,
typename Accessor::value_type color,
diff --git a/basebmp/inc/basebmp/polypolygonrenderer.hxx b/basebmp/inc/basebmp/polypolygonrenderer.hxx
index 25939d4e207a..5501b0d62954 100644
--- a/basebmp/inc/basebmp/polypolygonrenderer.hxx
+++ b/basebmp/inc/basebmp/polypolygonrenderer.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: polypolygonrenderer.hxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: thb $ $Date: 2006-07-28 09:47:53 $
+ * last change: $Author: thb $ $Date: 2006-07-28 12:43:20 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -109,6 +109,8 @@ namespace basebmp
/// For the STL algorithms
struct RasterConvertVertexComparator
{
+ RasterConvertVertexComparator() {}
+
bool operator()( const Vertex& rLHS,
const Vertex& rRHS ) const
{
@@ -147,7 +149,7 @@ namespace basebmp
@param rPoly
Polygon to fill
*/
- template< class DestIterator, class DestAccessor, typename T > inline
+ template< class DestIterator, class DestAccessor, typename T >
void renderClippedPolyPolygon( DestIterator begin,
DestAccessor ad,
T fillColor,
diff --git a/basebmp/inc/basebmp/scaleimage.hxx b/basebmp/inc/basebmp/scaleimage.hxx
index af8557175e04..dead43f0456e 100644
--- a/basebmp/inc/basebmp/scaleimage.hxx
+++ b/basebmp/inc/basebmp/scaleimage.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: scaleimage.hxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: thb $ $Date: 2006-07-27 11:35:31 $
+ * last change: $Author: thb $ $Date: 2006-07-28 12:43:20 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -33,8 +33,8 @@
*
************************************************************************/
-#ifndef INCLUDED_BASEBIMAGE_SCALEIMAGE_HXX
-#define INCLUDED_BASEBIMAGE_SCALEIMAGE_HXX
+#ifndef INCLUDED_BASEBMP_SCALEIMAGE_HXX
+#define INCLUDED_BASEBMP_SCALEIMAGE_HXX
#include <osl/diagnose.h>
@@ -47,12 +47,12 @@ namespace basebmp
template< class SourceIter, class SourceAcc,
class DestIter, class DestAcc >
-inline void scaleLine( SourceIter s_begin,
- SourceIter s_end,
- SourceAcc s_acc,
- DestIter d_begin,
- DestIter d_end,
- DestAcc d_acc )
+void scaleLine( SourceIter s_begin,
+ SourceIter s_end,
+ SourceAcc s_acc,
+ DestIter d_begin,
+ DestIter d_end,
+ DestAcc d_acc )
{
const int src_width = s_end - s_begin;
const int dest_width = d_end - d_begin;
@@ -122,12 +122,12 @@ inline void scaleLine( SourceIter s_begin,
*/
template< class SourceIter, class SourceAcc,
class DestIter, class DestAcc >
-inline void scaleImage( SourceIter s_begin,
- SourceIter s_end,
- SourceAcc s_acc,
- DestIter d_begin,
- DestIter d_end,
- DestAcc d_acc )
+void scaleImage( SourceIter s_begin,
+ SourceIter s_end,
+ SourceAcc s_acc,
+ DestIter d_begin,
+ DestIter d_end,
+ DestAcc d_acc )
{
const int src_width ( s_end.x - s_begin.x );
const int src_height( s_end.y - s_begin.y );
@@ -178,4 +178,4 @@ inline void scaleImage( vigra::triple<SourceIter,SourceIter,SourceAcc> const& sr
}
-#endif /* INCLUDED_BASEBIMAGE_SCALEIMAGE_HXX */
+#endif /* INCLUDED_BASEBMP_SCALEIMAGE_HXX */