diff options
Diffstat (limited to 'canvas/source/tools/canvastools.cxx')
-rw-r--r-- | canvas/source/tools/canvastools.cxx | 104 |
1 files changed, 52 insertions, 52 deletions
diff --git a/canvas/source/tools/canvastools.cxx b/canvas/source/tools/canvastools.cxx index 02b81a462ad7..0b874e518e2e 100644 --- a/canvas/source/tools/canvastools.cxx +++ b/canvas/source/tools/canvastools.cxx @@ -213,14 +213,14 @@ namespace canvas virtual uno::Sequence< rendering::RGBColor > SAL_CALL convertToRGB( const uno::Sequence< double >& deviceColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override { const double* pIn( deviceColor.getConstArray() ); - const sal_Size nLen( deviceColor.getLength() ); + const std::size_t nLen( deviceColor.getLength() ); ENSURE_ARG_OR_THROW2(nLen%4==0, "number of channels no multiple of 4", static_cast<rendering::XColorSpace*>(this), 0); uno::Sequence< rendering::RGBColor > aRes(nLen/4); rendering::RGBColor* pOut( aRes.getArray() ); - for( sal_Size i=0; i<nLen; i+=4 ) + for( std::size_t i=0; i<nLen; i+=4 ) { *pOut++ = rendering::RGBColor(pIn[0],pIn[1],pIn[2]); pIn += 4; @@ -231,14 +231,14 @@ namespace canvas { SAL_WARN_IF(deviceColor.getLength() == 0, "canvas", "empty deviceColor argument"); const double* pIn( deviceColor.getConstArray() ); - const sal_Size nLen( deviceColor.getLength() ); + const std::size_t nLen( deviceColor.getLength() ); ENSURE_ARG_OR_THROW2(nLen%4==0, "number of channels no multiple of 4", static_cast<rendering::XColorSpace*>(this), 0); uno::Sequence< rendering::ARGBColor > aRes(nLen/4); rendering::ARGBColor* pOut( aRes.getArray() ); - for( sal_Size i=0; i<nLen; i+=4 ) + for( std::size_t i=0; i<nLen; i+=4 ) { *pOut++ = rendering::ARGBColor(pIn[3],pIn[0],pIn[1],pIn[2]); pIn += 4; @@ -248,14 +248,14 @@ namespace canvas virtual uno::Sequence< rendering::ARGBColor > SAL_CALL convertToPARGB( const uno::Sequence< double >& deviceColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override { const double* pIn( deviceColor.getConstArray() ); - const sal_Size nLen( deviceColor.getLength() ); + const std::size_t nLen( deviceColor.getLength() ); ENSURE_ARG_OR_THROW2(nLen%4==0, "number of channels no multiple of 4", static_cast<rendering::XColorSpace*>(this), 0); uno::Sequence< rendering::ARGBColor > aRes(nLen/4); rendering::ARGBColor* pOut( aRes.getArray() ); - for( sal_Size i=0; i<nLen; i+=4 ) + for( std::size_t i=0; i<nLen; i+=4 ) { *pOut++ = rendering::ARGBColor(pIn[3],pIn[3]*pIn[0],pIn[3]*pIn[1],pIn[3]*pIn[2]); pIn += 4; @@ -265,11 +265,11 @@ namespace canvas virtual uno::Sequence< double > SAL_CALL convertFromRGB( const uno::Sequence< rendering::RGBColor >& rgbColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override { const rendering::RGBColor* pIn( rgbColor.getConstArray() ); - const sal_Size nLen( rgbColor.getLength() ); + const std::size_t nLen( rgbColor.getLength() ); uno::Sequence< double > aRes(nLen*4); double* pColors=aRes.getArray(); - for( sal_Size i=0; i<nLen; ++i ) + for( std::size_t i=0; i<nLen; ++i ) { *pColors++ = pIn->Red; *pColors++ = pIn->Green; @@ -282,11 +282,11 @@ namespace canvas virtual uno::Sequence< double > SAL_CALL convertFromARGB( const uno::Sequence< rendering::ARGBColor >& rgbColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override { const rendering::ARGBColor* pIn( rgbColor.getConstArray() ); - const sal_Size nLen( rgbColor.getLength() ); + const std::size_t nLen( rgbColor.getLength() ); uno::Sequence< double > aRes(nLen*4); double* pColors=aRes.getArray(); - for( sal_Size i=0; i<nLen; ++i ) + for( std::size_t i=0; i<nLen; ++i ) { *pColors++ = pIn->Red; *pColors++ = pIn->Green; @@ -299,11 +299,11 @@ namespace canvas virtual uno::Sequence< double > SAL_CALL convertFromPARGB( const uno::Sequence< rendering::ARGBColor >& rgbColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override { const rendering::ARGBColor* pIn( rgbColor.getConstArray() ); - const sal_Size nLen( rgbColor.getLength() ); + const std::size_t nLen( rgbColor.getLength() ); uno::Sequence< double > aRes(nLen*4); double* pColors=aRes.getArray(); - for( sal_Size i=0; i<nLen; ++i ) + for( std::size_t i=0; i<nLen; ++i ) { *pColors++ = pIn->Red/pIn->Alpha; *pColors++ = pIn->Green/pIn->Alpha; @@ -334,14 +334,14 @@ namespace canvas if( dynamic_cast<StandardColorSpace*>(targetColorSpace.get()) ) { const sal_Int8* pIn( deviceColor.getConstArray() ); - const sal_Size nLen( deviceColor.getLength() ); + const std::size_t nLen( deviceColor.getLength() ); ENSURE_ARG_OR_THROW2(nLen%4==0, "number of channels no multiple of 4", static_cast<rendering::XColorSpace*>(this), 0); uno::Sequence<double> aRes(nLen); double* pOut( aRes.getArray() ); - for( sal_Size i=0; i<nLen; i+=4 ) + for( std::size_t i=0; i<nLen; i+=4 ) { *pOut++ = vcl::unotools::toDoubleColor(*pIn++); *pOut++ = vcl::unotools::toDoubleColor(*pIn++); @@ -380,14 +380,14 @@ namespace canvas virtual uno::Sequence< rendering::RGBColor > SAL_CALL convertIntegerToRGB( const uno::Sequence< ::sal_Int8 >& deviceColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override { const sal_Int8* pIn( deviceColor.getConstArray() ); - const sal_Size nLen( deviceColor.getLength() ); + const std::size_t nLen( deviceColor.getLength() ); ENSURE_ARG_OR_THROW2(nLen%4==0, "number of channels no multiple of 4", static_cast<rendering::XColorSpace*>(this), 0); uno::Sequence< rendering::RGBColor > aRes(nLen/4); rendering::RGBColor* pOut( aRes.getArray() ); - for( sal_Size i=0; i<nLen; i+=4 ) + for( std::size_t i=0; i<nLen; i+=4 ) { *pOut++ = rendering::RGBColor( vcl::unotools::toDoubleColor(pIn[0]), @@ -401,14 +401,14 @@ namespace canvas virtual uno::Sequence< rendering::ARGBColor > SAL_CALL convertIntegerToARGB( const uno::Sequence< ::sal_Int8 >& deviceColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override { const sal_Int8* pIn( deviceColor.getConstArray() ); - const sal_Size nLen( deviceColor.getLength() ); + const std::size_t nLen( deviceColor.getLength() ); ENSURE_ARG_OR_THROW2(nLen%4==0, "number of channels no multiple of 4", static_cast<rendering::XColorSpace*>(this), 0); uno::Sequence< rendering::ARGBColor > aRes(nLen/4); rendering::ARGBColor* pOut( aRes.getArray() ); - for( sal_Size i=0; i<nLen; i+=4 ) + for( std::size_t i=0; i<nLen; i+=4 ) { *pOut++ = rendering::ARGBColor( vcl::unotools::toDoubleColor(pIn[3]), @@ -423,14 +423,14 @@ namespace canvas virtual uno::Sequence< rendering::ARGBColor > SAL_CALL convertIntegerToPARGB( const uno::Sequence< ::sal_Int8 >& deviceColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override { const sal_Int8* pIn( deviceColor.getConstArray() ); - const sal_Size nLen( deviceColor.getLength() ); + const std::size_t nLen( deviceColor.getLength() ); ENSURE_ARG_OR_THROW2(nLen%4==0, "number of channels no multiple of 4", static_cast<rendering::XColorSpace*>(this), 0); uno::Sequence< rendering::ARGBColor > aRes(nLen/4); rendering::ARGBColor* pOut( aRes.getArray() ); - for( sal_Size i=0; i<nLen; i+=4 ) + for( std::size_t i=0; i<nLen; i+=4 ) { const sal_Int8 nAlpha( pIn[3] ); *pOut++ = rendering::ARGBColor( @@ -446,11 +446,11 @@ namespace canvas virtual uno::Sequence< ::sal_Int8 > SAL_CALL convertIntegerFromRGB( const uno::Sequence< rendering::RGBColor >& rgbColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override { const rendering::RGBColor* pIn( rgbColor.getConstArray() ); - const sal_Size nLen( rgbColor.getLength() ); + const std::size_t nLen( rgbColor.getLength() ); uno::Sequence< sal_Int8 > aRes(nLen*4); sal_Int8* pColors=aRes.getArray(); - for( sal_Size i=0; i<nLen; ++i ) + for( std::size_t i=0; i<nLen; ++i ) { *pColors++ = vcl::unotools::toByteColor(pIn->Red); *pColors++ = vcl::unotools::toByteColor(pIn->Green); @@ -464,11 +464,11 @@ namespace canvas virtual uno::Sequence< ::sal_Int8 > SAL_CALL convertIntegerFromARGB( const uno::Sequence< rendering::ARGBColor >& rgbColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override { const rendering::ARGBColor* pIn( rgbColor.getConstArray() ); - const sal_Size nLen( rgbColor.getLength() ); + const std::size_t nLen( rgbColor.getLength() ); uno::Sequence< sal_Int8 > aRes(nLen*4); sal_Int8* pColors=aRes.getArray(); - for( sal_Size i=0; i<nLen; ++i ) + for( std::size_t i=0; i<nLen; ++i ) { *pColors++ = vcl::unotools::toByteColor(pIn->Red); *pColors++ = vcl::unotools::toByteColor(pIn->Green); @@ -482,11 +482,11 @@ namespace canvas virtual uno::Sequence< ::sal_Int8 > SAL_CALL convertIntegerFromPARGB( const uno::Sequence< rendering::ARGBColor >& rgbColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override { const rendering::ARGBColor* pIn( rgbColor.getConstArray() ); - const sal_Size nLen( rgbColor.getLength() ); + const std::size_t nLen( rgbColor.getLength() ); uno::Sequence< sal_Int8 > aRes(nLen*4); sal_Int8* pColors=aRes.getArray(); - for( sal_Size i=0; i<nLen; ++i ) + for( std::size_t i=0; i<nLen; ++i ) { *pColors++ = vcl::unotools::toByteColor(pIn->Red/pIn->Alpha); *pColors++ = vcl::unotools::toByteColor(pIn->Green/pIn->Alpha); @@ -551,14 +551,14 @@ namespace canvas virtual uno::Sequence< rendering::RGBColor > SAL_CALL convertToRGB( const uno::Sequence< double >& deviceColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override { const double* pIn( deviceColor.getConstArray() ); - const sal_Size nLen( deviceColor.getLength() ); + const std::size_t nLen( deviceColor.getLength() ); ENSURE_ARG_OR_THROW2(nLen%4==0, "number of channels no multiple of 4", static_cast<rendering::XColorSpace*>(this), 0); uno::Sequence< rendering::RGBColor > aRes(nLen/4); rendering::RGBColor* pOut( aRes.getArray() ); - for( sal_Size i=0; i<nLen; i+=4 ) + for( std::size_t i=0; i<nLen; i+=4 ) { *pOut++ = rendering::RGBColor(pIn[0],pIn[1],pIn[2]); pIn += 4; @@ -568,14 +568,14 @@ namespace canvas virtual uno::Sequence< rendering::ARGBColor > SAL_CALL convertToARGB( const uno::Sequence< double >& deviceColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override { const double* pIn( deviceColor.getConstArray() ); - const sal_Size nLen( deviceColor.getLength() ); + const std::size_t nLen( deviceColor.getLength() ); ENSURE_ARG_OR_THROW2(nLen%4==0, "number of channels no multiple of 4", static_cast<rendering::XColorSpace*>(this), 0); uno::Sequence< rendering::ARGBColor > aRes(nLen/4); rendering::ARGBColor* pOut( aRes.getArray() ); - for( sal_Size i=0; i<nLen; i+=4 ) + for( std::size_t i=0; i<nLen; i+=4 ) { *pOut++ = rendering::ARGBColor(1.0,pIn[0],pIn[1],pIn[2]); pIn += 4; @@ -585,14 +585,14 @@ namespace canvas virtual uno::Sequence< rendering::ARGBColor > SAL_CALL convertToPARGB( const uno::Sequence< double >& deviceColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override { const double* pIn( deviceColor.getConstArray() ); - const sal_Size nLen( deviceColor.getLength() ); + const std::size_t nLen( deviceColor.getLength() ); ENSURE_ARG_OR_THROW2(nLen%4==0, "number of channels no multiple of 4", static_cast<rendering::XColorSpace*>(this), 0); uno::Sequence< rendering::ARGBColor > aRes(nLen/4); rendering::ARGBColor* pOut( aRes.getArray() ); - for( sal_Size i=0; i<nLen; i+=4 ) + for( std::size_t i=0; i<nLen; i+=4 ) { *pOut++ = rendering::ARGBColor(1.0,pIn[0],pIn[1],pIn[2]); pIn += 4; @@ -602,11 +602,11 @@ namespace canvas virtual uno::Sequence< double > SAL_CALL convertFromRGB( const uno::Sequence< rendering::RGBColor >& rgbColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override { const rendering::RGBColor* pIn( rgbColor.getConstArray() ); - const sal_Size nLen( rgbColor.getLength() ); + const std::size_t nLen( rgbColor.getLength() ); uno::Sequence< double > aRes(nLen*4); double* pColors=aRes.getArray(); - for( sal_Size i=0; i<nLen; ++i ) + for( std::size_t i=0; i<nLen; ++i ) { *pColors++ = pIn->Red; *pColors++ = pIn->Green; @@ -619,11 +619,11 @@ namespace canvas virtual uno::Sequence< double > SAL_CALL convertFromARGB( const uno::Sequence< rendering::ARGBColor >& rgbColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override { const rendering::ARGBColor* pIn( rgbColor.getConstArray() ); - const sal_Size nLen( rgbColor.getLength() ); + const std::size_t nLen( rgbColor.getLength() ); uno::Sequence< double > aRes(nLen*4); double* pColors=aRes.getArray(); - for( sal_Size i=0; i<nLen; ++i ) + for( std::size_t i=0; i<nLen; ++i ) { *pColors++ = pIn->Red; *pColors++ = pIn->Green; @@ -636,11 +636,11 @@ namespace canvas virtual uno::Sequence< double > SAL_CALL convertFromPARGB( const uno::Sequence< rendering::ARGBColor >& rgbColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override { const rendering::ARGBColor* pIn( rgbColor.getConstArray() ); - const sal_Size nLen( rgbColor.getLength() ); + const std::size_t nLen( rgbColor.getLength() ); uno::Sequence< double > aRes(nLen*4); double* pColors=aRes.getArray(); - for( sal_Size i=0; i<nLen; ++i ) + for( std::size_t i=0; i<nLen; ++i ) { *pColors++ = pIn->Red/pIn->Alpha; *pColors++ = pIn->Green/pIn->Alpha; @@ -671,14 +671,14 @@ namespace canvas if( dynamic_cast<StandardNoAlphaColorSpace*>(targetColorSpace.get()) ) { const sal_Int8* pIn( deviceColor.getConstArray() ); - const sal_Size nLen( deviceColor.getLength() ); + const std::size_t nLen( deviceColor.getLength() ); ENSURE_ARG_OR_THROW2(nLen%4==0, "number of channels no multiple of 4", static_cast<rendering::XColorSpace*>(this), 0); uno::Sequence<double> aRes(nLen); double* pOut( aRes.getArray() ); - for( sal_Size i=0; i<nLen; i+=4 ) + for( std::size_t i=0; i<nLen; i+=4 ) { *pOut++ = vcl::unotools::toDoubleColor(*pIn++); *pOut++ = vcl::unotools::toDoubleColor(*pIn++); @@ -717,14 +717,14 @@ namespace canvas virtual uno::Sequence< rendering::RGBColor > SAL_CALL convertIntegerToRGB( const uno::Sequence< ::sal_Int8 >& deviceColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override { const sal_Int8* pIn( deviceColor.getConstArray() ); - const sal_Size nLen( deviceColor.getLength() ); + const std::size_t nLen( deviceColor.getLength() ); ENSURE_ARG_OR_THROW2(nLen%4==0, "number of channels no multiple of 4", static_cast<rendering::XColorSpace*>(this), 0); uno::Sequence< rendering::RGBColor > aRes(nLen/4); rendering::RGBColor* pOut( aRes.getArray() ); - for( sal_Size i=0; i<nLen; i+=4 ) + for( std::size_t i=0; i<nLen; i+=4 ) { *pOut++ = rendering::RGBColor( vcl::unotools::toDoubleColor(pIn[0]), @@ -738,14 +738,14 @@ namespace canvas virtual uno::Sequence< rendering::ARGBColor > SAL_CALL convertIntegerToARGB( const uno::Sequence< ::sal_Int8 >& deviceColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override { const sal_Int8* pIn( deviceColor.getConstArray() ); - const sal_Size nLen( deviceColor.getLength() ); + const std::size_t nLen( deviceColor.getLength() ); ENSURE_ARG_OR_THROW2(nLen%4==0, "number of channels no multiple of 4", static_cast<rendering::XColorSpace*>(this), 0); uno::Sequence< rendering::ARGBColor > aRes(nLen/4); rendering::ARGBColor* pOut( aRes.getArray() ); - for( sal_Size i=0; i<nLen; i+=4 ) + for( std::size_t i=0; i<nLen; i+=4 ) { *pOut++ = rendering::ARGBColor( 1.0, @@ -760,14 +760,14 @@ namespace canvas virtual uno::Sequence< rendering::ARGBColor > SAL_CALL convertIntegerToPARGB( const uno::Sequence< ::sal_Int8 >& deviceColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override { const sal_Int8* pIn( deviceColor.getConstArray() ); - const sal_Size nLen( deviceColor.getLength() ); + const std::size_t nLen( deviceColor.getLength() ); ENSURE_ARG_OR_THROW2(nLen%4==0, "number of channels no multiple of 4", static_cast<rendering::XColorSpace*>(this), 0); uno::Sequence< rendering::ARGBColor > aRes(nLen/4); rendering::ARGBColor* pOut( aRes.getArray() ); - for( sal_Size i=0; i<nLen; i+=4 ) + for( std::size_t i=0; i<nLen; i+=4 ) { *pOut++ = rendering::ARGBColor( 1.0, @@ -782,11 +782,11 @@ namespace canvas virtual uno::Sequence< ::sal_Int8 > SAL_CALL convertIntegerFromRGB( const uno::Sequence< rendering::RGBColor >& rgbColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override { const rendering::RGBColor* pIn( rgbColor.getConstArray() ); - const sal_Size nLen( rgbColor.getLength() ); + const std::size_t nLen( rgbColor.getLength() ); uno::Sequence< sal_Int8 > aRes(nLen*4); sal_Int8* pColors=aRes.getArray(); - for( sal_Size i=0; i<nLen; ++i ) + for( std::size_t i=0; i<nLen; ++i ) { *pColors++ = vcl::unotools::toByteColor(pIn->Red); *pColors++ = vcl::unotools::toByteColor(pIn->Green); @@ -800,11 +800,11 @@ namespace canvas virtual uno::Sequence< ::sal_Int8 > SAL_CALL convertIntegerFromARGB( const uno::Sequence< rendering::ARGBColor >& rgbColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override { const rendering::ARGBColor* pIn( rgbColor.getConstArray() ); - const sal_Size nLen( rgbColor.getLength() ); + const std::size_t nLen( rgbColor.getLength() ); uno::Sequence< sal_Int8 > aRes(nLen*4); sal_Int8* pColors=aRes.getArray(); - for( sal_Size i=0; i<nLen; ++i ) + for( std::size_t i=0; i<nLen; ++i ) { *pColors++ = vcl::unotools::toByteColor(pIn->Red); *pColors++ = vcl::unotools::toByteColor(pIn->Green); @@ -818,11 +818,11 @@ namespace canvas virtual uno::Sequence< ::sal_Int8 > SAL_CALL convertIntegerFromPARGB( const uno::Sequence< rendering::ARGBColor >& rgbColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override { const rendering::ARGBColor* pIn( rgbColor.getConstArray() ); - const sal_Size nLen( rgbColor.getLength() ); + const std::size_t nLen( rgbColor.getLength() ); uno::Sequence< sal_Int8 > aRes(nLen*4); sal_Int8* pColors=aRes.getArray(); - for( sal_Size i=0; i<nLen; ++i ) + for( std::size_t i=0; i<nLen; ++i ) { *pColors++ = vcl::unotools::toByteColor(pIn->Red/pIn->Alpha); *pColors++ = vcl::unotools::toByteColor(pIn->Green/pIn->Alpha); |