diff options
author | Elton Chung <elton@layerjet.com> | 2012-02-25 13:52:32 +0800 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2012-02-25 20:33:57 +0000 |
commit | ba8919e8129b5e8da112ad4f1d11bb39096c1e0e (patch) | |
tree | 09c421269f3332bafac4cfb6297f7982443f73bb /canvas | |
parent | 0333d2101acf36c9f44e5cc51ff6964d8a98920d (diff) |
Remove unused code
Diffstat (limited to 'canvas')
-rw-r--r-- | canvas/inc/canvas/verifyinput.hxx | 46 | ||||
-rw-r--r-- | canvas/source/tools/verifyinput.cxx | 126 |
2 files changed, 0 insertions, 172 deletions
diff --git a/canvas/inc/canvas/verifyinput.hxx b/canvas/inc/canvas/verifyinput.hxx index 8c4c11f32494..60b168e7ff58 100644 --- a/canvas/inc/canvas/verifyinput.hxx +++ b/canvas/inc/canvas/verifyinput.hxx @@ -61,7 +61,6 @@ namespace com { namespace sun { namespace star { namespace rendering struct Texture; struct ViewState; struct IntegerBitmapLayout; - struct FloatingPointBitmapLayout; struct FontRequest; struct FontInfo; class XCanvas; @@ -149,29 +148,6 @@ namespace canvas ::com::sun::star::uno::XInterface >& xIf, ::sal_Int16 nArgPos ); - /** Verify that the given size contains valid floating point - values. - - @param rSize - Size to check - - @param xIf - The interface that should be reported as the one - generating the exception. - - @param nArgPos - Argument position on the call site (i.e. the position of - the argument, checked here, on the UNO interface - method. Counting starts at 0). - - @throws an lang::IllegalArgumentException, if anything is wrong - */ - CANVASTOOLS_DLLPUBLIC void verifyInput( const ::com::sun::star::geometry::RealSize2D& rSize, - const char* pStr, - const ::com::sun::star::uno::Reference< - ::com::sun::star::uno::XInterface >& xIf, - ::sal_Int16 nArgPos ); - /** Verify that the given bezier segment contains valid floating point values. @@ -356,28 +332,6 @@ namespace canvas ::com::sun::star::uno::XInterface >& xIf, ::sal_Int16 nArgPos ); - /** Basic check for bitmap layout validity. - - @param bitmapLayout - Bitmap layout to check - - @param xIf - The interface that should be reported as the one - generating the exception. - - @param nArgPos - Argument position on the call site (i.e. the position of - the argument, checked here, on the UNO interface - method. Counting starts at 0). - - @throws an lang::IllegalArgumentException, if anything is wrong - */ - CANVASTOOLS_DLLPUBLIC void verifyInput( const ::com::sun::star::rendering::FloatingPointBitmapLayout& bitmapLayout, - const char* pStr, - const ::com::sun::star::uno::Reference< - ::com::sun::star::uno::XInterface >& xIf, - ::sal_Int16 nArgPos ); - /** Basic check for font info validity. @param fontInfo diff --git a/canvas/source/tools/verifyinput.cxx b/canvas/source/tools/verifyinput.cxx index f7929a410949..32ac8bbd3447 100644 --- a/canvas/source/tools/verifyinput.cxx +++ b/canvas/source/tools/verifyinput.cxx @@ -101,40 +101,6 @@ namespace canvas #endif } - void verifyInput( const geometry::RealSize2D& rSize, - const char* pStr, - const uno::Reference< uno::XInterface >& xIf, - ::sal_Int16 nArgPos ) - { - (void)pStr; (void)xIf; (void)nArgPos; - -#if OSL_DEBUG_LEVEL > 0 - if( !::rtl::math::isFinite( rSize.Width ) ) - { - throw lang::IllegalArgumentException( - ::rtl::OUString::createFromAscii(pStr) + - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyInput(): size.Width value contains infinite or NAN" )), - xIf, - nArgPos ); - } - - if( !::rtl::math::isFinite( rSize.Height ) ) - { - throw lang::IllegalArgumentException( - ::rtl::OUString::createFromAscii(pStr) + - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyInput(): size.Height value contains infinite or NAN" )), - xIf, - nArgPos ); - } -#else - if( !::rtl::math::isFinite( rSize.Width ) || - !::rtl::math::isFinite( rSize.Height ) ) - { - throw lang::IllegalArgumentException(); - } -#endif - } - void verifyInput( const geometry::RealBezierSegment2D& rSegment, const char* pStr, const uno::Reference< uno::XInterface >& xIf, @@ -667,98 +633,6 @@ namespace canvas } } - void verifyInput( const rendering::FloatingPointBitmapLayout& bitmapLayout, - const char* pStr, - const uno::Reference< uno::XInterface >& xIf, - ::sal_Int16 nArgPos ) - { - (void)pStr; (void)xIf; (void)nArgPos; - - if( bitmapLayout.ScanLines < 0 ) - { -#if OSL_DEBUG_LEVEL > 0 - throw lang::IllegalArgumentException( - ::rtl::OUString::createFromAscii(pStr) + - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyInput(): bitmap layout's ScanLines is negative" )), - xIf, - nArgPos ); -#else - throw lang::IllegalArgumentException(); -#endif - } - - if( bitmapLayout.ScanLineBytes < 0 ) - { -#if OSL_DEBUG_LEVEL > 0 - throw lang::IllegalArgumentException( - ::rtl::OUString::createFromAscii(pStr) + - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyInput(): bitmap layout's ScanLineBytes is negative" )), - xIf, - nArgPos ); -#else - throw lang::IllegalArgumentException(); -#endif - } - - if( !bitmapLayout.ColorSpace.is() ) - { -#if OSL_DEBUG_LEVEL > 0 - throw lang::IllegalArgumentException( - ::rtl::OUString::createFromAscii(pStr) + - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyInput(): bitmap layout's ColorSpace is invalid" )), - xIf, - nArgPos ); -#else - throw lang::IllegalArgumentException(); -#endif - } - - if( bitmapLayout.NumComponents < 0 ) - { -#if OSL_DEBUG_LEVEL > 0 - throw lang::IllegalArgumentException( - ::rtl::OUString::createFromAscii(pStr) + - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyInput(): bitmap layout's NumComponents is negative" )), - xIf, - nArgPos ); -#else - throw lang::IllegalArgumentException(); -#endif - } - - if( bitmapLayout.Endianness < util::Endianness::LITTLE || - bitmapLayout.Endianness > util::Endianness::BIG ) - { -#if OSL_DEBUG_LEVEL > 0 - throw lang::IllegalArgumentException( - ::rtl::OUString::createFromAscii(pStr) + - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyInput(): bitmap layout's Endianness value is out of range (" )) + - ::rtl::OUString::valueOf(sal::static_int_cast<sal_Int32>(bitmapLayout.Endianness)) + - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " not known)" )), - xIf, - nArgPos ); -#else - throw lang::IllegalArgumentException(); -#endif - } - - if( bitmapLayout.Format < rendering::FloatingPointBitmapFormat::HALFFLOAT || - bitmapLayout.Format > rendering::FloatingPointBitmapFormat::DOUBLE ) - { -#if OSL_DEBUG_LEVEL > 0 - throw lang::IllegalArgumentException( - ::rtl::OUString::createFromAscii(pStr) + - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": verifyInput(): bitmap layout's Format value is out of range (" )) + - ::rtl::OUString::valueOf(sal::static_int_cast<sal_Int32>(bitmapLayout.Format)) + - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " not known)" )), - xIf, - nArgPos ); -#else - throw lang::IllegalArgumentException(); -#endif - } - } - void verifyInput( const rendering::FontInfo& /*fontInfo*/, const char* /*pStr*/, const uno::Reference< uno::XInterface >& /*xIf*/, |