Move setting of LD_LIBRARY_PATH closer to invocation of cppunittester
[LibreOffice.git] / canvas / source / tools / verifyinput.cxx
blobae0704d81d574ba34001553278fe123de2e0b660
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <sal/config.h>
22 #include <basegfx/range/b2irange.hxx>
23 #include <basegfx/utils/canvastools.hxx>
24 #include <com/sun/star/geometry/AffineMatrix2D.hpp>
25 #include <com/sun/star/geometry/IntegerPoint2D.hpp>
26 #include <com/sun/star/geometry/IntegerSize2D.hpp>
27 #include <com/sun/star/geometry/Matrix2D.hpp>
28 #include <com/sun/star/geometry/RealBezierSegment2D.hpp>
29 #include <com/sun/star/geometry/RealPoint2D.hpp>
30 #include <com/sun/star/geometry/RealRectangle2D.hpp>
31 #include <com/sun/star/geometry/RealSize2D.hpp>
32 #include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
33 #include <com/sun/star/rendering/CompositeOperation.hpp>
34 #include <com/sun/star/rendering/FontRequest.hpp>
35 #include <com/sun/star/rendering/IntegerBitmapLayout.hpp>
36 #include <com/sun/star/rendering/PathCapType.hpp>
37 #include <com/sun/star/rendering/PathJoinType.hpp>
38 #include <com/sun/star/rendering/RenderState.hpp>
39 #include <com/sun/star/rendering/Texture.hpp>
40 #include <com/sun/star/rendering/TexturingMode.hpp>
41 #include <com/sun/star/rendering/ViewState.hpp>
42 #include <com/sun/star/util/Endianness.hpp>
44 #include <verifyinput.hxx>
47 using namespace ::com::sun::star;
49 namespace canvas::tools
51 void verifyInput( const geometry::RealPoint2D& rPoint,
52 const char* pStr,
53 const uno::Reference< uno::XInterface >& xIf,
54 ::sal_Int16 nArgPos )
56 #if OSL_DEBUG_LEVEL > 0
57 if( !std::isfinite( rPoint.X ) )
59 throw lang::IllegalArgumentException(
60 OUString::createFromAscii( pStr ) + ": verifyInput(): point X value contains infinite or NAN",
61 xIf, nArgPos );
64 if( !std::isfinite( rPoint.Y ) )
66 throw lang::IllegalArgumentException(
67 OUString::createFromAscii( pStr ) + ": verifyInput(): point X value contains infinite or NAN",
68 xIf, nArgPos );
70 #else
71 (void)pStr; (void)xIf; (void)nArgPos;
72 if( !std::isfinite( rPoint.X ) ||
73 !std::isfinite( rPoint.Y ) )
75 throw lang::IllegalArgumentException();
77 #endif
80 void verifyInput( const geometry::RealBezierSegment2D& rSegment,
81 const char* pStr,
82 const uno::Reference< uno::XInterface >& xIf,
83 ::sal_Int16 nArgPos )
85 #if OSL_DEBUG_LEVEL > 0
86 if( !std::isfinite( rSegment.Px ) )
88 throw lang::IllegalArgumentException(
89 OUString::createFromAscii( pStr ) +
90 ": verifyInput(): bezier segment's Px value contains infinite or NAN",
91 xIf, nArgPos );
94 if( !std::isfinite( rSegment.Py ) )
96 throw lang::IllegalArgumentException(
97 OUString::createFromAscii( pStr ) +
98 ": verifyInput(): bezier segment's Py value contains infinite or NAN",
99 xIf, nArgPos );
102 if( !std::isfinite( rSegment.C1x ) )
104 throw lang::IllegalArgumentException(
105 OUString::createFromAscii( pStr ) +
106 ": verifyInput(): bezier segment's C1x value contains infinite or NAN",
107 xIf, nArgPos );
110 if( !std::isfinite( rSegment.C1y ) )
112 throw lang::IllegalArgumentException(
113 OUString::createFromAscii( pStr ) +
114 ": verifyInput(): bezier segment's C1y value contains infinite or NAN",
115 xIf, nArgPos );
118 if( !std::isfinite( rSegment.C2x ) )
120 throw lang::IllegalArgumentException(
121 OUString::createFromAscii( pStr ) +
122 ": verifyInput(): bezier segment's C2x value contains infinite or NAN",
123 xIf, nArgPos );
126 if( !std::isfinite( rSegment.C2y ) )
128 throw lang::IllegalArgumentException(
129 OUString::createFromAscii( pStr ) +
130 ": verifyInput(): bezier segment's C2y value contains infinite or NAN",
131 xIf, nArgPos );
133 #else
134 (void)pStr; (void)xIf; (void)nArgPos;
135 if( !std::isfinite( rSegment.Px ) ||
136 !std::isfinite( rSegment.Py ) ||
137 !std::isfinite( rSegment.C1x ) ||
138 !std::isfinite( rSegment.C1y ) ||
139 !std::isfinite( rSegment.C2x ) ||
140 !std::isfinite( rSegment.C2y ) )
142 throw lang::IllegalArgumentException();
144 #endif
147 void verifyInput( const geometry::RealRectangle2D& rRect,
148 const char* pStr,
149 const uno::Reference< uno::XInterface >& xIf,
150 ::sal_Int16 nArgPos )
152 #if OSL_DEBUG_LEVEL > 0
153 if( !std::isfinite( rRect.X1 ) )
155 throw lang::IllegalArgumentException(
156 OUString::createFromAscii(pStr) +
157 ": verifyInput(): rectangle point X1 contains infinite or NAN",
158 xIf, nArgPos );
161 if( !std::isfinite( rRect.Y1 ) )
163 throw lang::IllegalArgumentException(
164 OUString::createFromAscii(pStr) +
165 ": verifyInput(): rectangle point Y1 contains infinite or NAN",
166 xIf, nArgPos );
169 if( !std::isfinite( rRect.X2 ) )
171 throw lang::IllegalArgumentException(
172 OUString::createFromAscii(pStr) +
173 ": verifyInput(): rectangle point X2 contains infinite or NAN",
174 xIf, nArgPos );
177 if( !std::isfinite( rRect.Y2 ) )
179 throw lang::IllegalArgumentException(
180 OUString::createFromAscii(pStr) +
181 ": verifyInput(): rectangle point Y2 contains infinite or NAN",
182 xIf, nArgPos );
184 #else
185 (void)pStr; (void)xIf; (void)nArgPos;
186 if( !std::isfinite( rRect.X1 ) ||
187 !std::isfinite( rRect.Y1 ) ||
188 !std::isfinite( rRect.X2 ) ||
189 !std::isfinite( rRect.Y2 ) )
191 throw lang::IllegalArgumentException();
193 #endif
196 void verifyInput( const geometry::AffineMatrix2D& matrix,
197 const char* pStr,
198 const uno::Reference< uno::XInterface >& xIf,
199 ::sal_Int16 nArgPos )
201 #if OSL_DEBUG_LEVEL > 0
202 const sal_Int32 nBinaryState(
203 100000 * int(!std::isfinite( matrix.m00 )) +
204 10000 * int(!std::isfinite( matrix.m01 )) +
205 1000 * int(!std::isfinite( matrix.m02 )) +
206 100 * int(!std::isfinite( matrix.m10 )) +
207 10 * int(!std::isfinite( matrix.m11 )) +
208 1 * int(!std::isfinite( matrix.m12 )) );
210 if( nBinaryState )
212 throw lang::IllegalArgumentException(
213 OUString::createFromAscii(pStr) +
214 ": verifyInput(): AffineMatrix2D contains infinite or NAN value(s) at the following positions (m00-m12): " +
215 OUString::number(nBinaryState),
216 xIf, nArgPos );
218 #else
219 (void)pStr; (void)xIf; (void)nArgPos;
220 if( !std::isfinite( matrix.m00 ) ||
221 !std::isfinite( matrix.m01 ) ||
222 !std::isfinite( matrix.m02 ) ||
223 !std::isfinite( matrix.m10 ) ||
224 !std::isfinite( matrix.m11 ) ||
225 !std::isfinite( matrix.m12 ) )
227 throw lang::IllegalArgumentException();
229 #endif
232 void verifyInput( const geometry::Matrix2D& matrix,
233 const char* pStr,
234 const uno::Reference< uno::XInterface >& xIf,
235 ::sal_Int16 nArgPos )
237 #if OSL_DEBUG_LEVEL > 0
238 const sal_Int32 nBinaryState(
239 1000 * int(!std::isfinite( matrix.m00 )) +
240 100 * int(!std::isfinite( matrix.m01 )) +
241 10 * int(!std::isfinite( matrix.m10 )) +
242 1 * int(!std::isfinite( matrix.m11 )) );
244 if( nBinaryState )
246 throw lang::IllegalArgumentException(
247 OUString::createFromAscii(pStr) +
248 ": verifyInput(): Matrix2D contains infinite or NAN value(s) at the following positions (m00-m11): " +
249 OUString::number(nBinaryState),
250 xIf, nArgPos );
252 #else
253 (void)pStr; (void)xIf; (void)nArgPos;
254 if( !std::isfinite( matrix.m00 ) ||
255 !std::isfinite( matrix.m01 ) ||
256 !std::isfinite( matrix.m10 ) ||
257 !std::isfinite( matrix.m11 ) )
259 throw lang::IllegalArgumentException();
261 #endif
264 void verifyInput( const rendering::ViewState& viewState,
265 const char* pStr,
266 const uno::Reference< uno::XInterface >& xIf,
267 ::sal_Int16 nArgPos )
269 verifyInput( viewState.AffineTransform,
270 pStr, xIf, nArgPos );
273 void verifyInput( const rendering::RenderState& renderState,
274 const char* pStr,
275 const uno::Reference< uno::XInterface >& xIf,
276 ::sal_Int16 nArgPos,
277 sal_Int32 nMinColorComponents )
279 verifyInput( renderState.AffineTransform,
280 pStr, xIf, nArgPos );
282 if( renderState.DeviceColor.getLength() < nMinColorComponents )
284 #if OSL_DEBUG_LEVEL > 0
285 throw lang::IllegalArgumentException(
286 OUString::createFromAscii(pStr) +
287 ": verifyInput(): render state's device color has too few components (" +
288 OUString::number(nMinColorComponents) +
289 " expected, " +
290 OUString::number(renderState.DeviceColor.getLength()) +
291 " provided)",
292 xIf, nArgPos );
293 #else
294 throw lang::IllegalArgumentException();
295 #endif
298 if( renderState.CompositeOperation >= rendering::CompositeOperation::CLEAR &&
299 renderState.CompositeOperation <= rendering::CompositeOperation::SATURATE )
300 return;
302 #if OSL_DEBUG_LEVEL > 0
303 throw lang::IllegalArgumentException(
304 OUString::createFromAscii(pStr) +
305 ": verifyInput(): render state's CompositeOperation value out of range (" +
306 OUString::number(sal::static_int_cast<sal_Int32>(renderState.CompositeOperation)) +
307 " not known)",
308 xIf, nArgPos );
309 #else
310 throw lang::IllegalArgumentException();
311 #endif
314 void verifyInput( const rendering::Texture& texture,
315 const char* pStr,
316 const uno::Reference< uno::XInterface >& xIf,
317 ::sal_Int16 nArgPos )
319 verifyInput( texture.AffineTransform,
320 pStr, xIf, nArgPos );
322 if( !std::isfinite( texture.Alpha ) ||
323 texture.Alpha < 0.0 ||
324 texture.Alpha > 1.0 )
326 #if OSL_DEBUG_LEVEL > 0
327 throw lang::IllegalArgumentException(
328 OUString::createFromAscii(pStr) +
329 ": verifyInput(): textures' alpha value out of range (is " +
330 OUString::number(texture.Alpha) + ")",
331 xIf, nArgPos );
332 #else
333 throw lang::IllegalArgumentException();
334 #endif
337 if( texture.NumberOfHatchPolygons < 0 )
339 #if OSL_DEBUG_LEVEL > 0
340 throw lang::IllegalArgumentException(
341 OUString::createFromAscii(pStr) +
342 ": verifyInput(): textures' NumberOfHatchPolygons is negative",
343 xIf, nArgPos );
344 #else
345 throw lang::IllegalArgumentException();
346 #endif
349 if( texture.RepeatModeX < rendering::TexturingMode::NONE ||
350 texture.RepeatModeX > rendering::TexturingMode::REPEAT )
352 #if OSL_DEBUG_LEVEL > 0
353 throw lang::IllegalArgumentException(
354 OUString::createFromAscii(pStr) +
355 ": verifyInput(): textures' RepeatModeX value is out of range (" +
356 OUString::number(sal::static_int_cast<sal_Int32>(texture.RepeatModeX)) +
357 " not known)",
358 xIf, nArgPos );
359 #else
360 throw lang::IllegalArgumentException();
361 #endif
364 if( texture.RepeatModeY >= rendering::TexturingMode::NONE &&
365 texture.RepeatModeY <= rendering::TexturingMode::REPEAT )
366 return;
368 #if OSL_DEBUG_LEVEL > 0
369 throw lang::IllegalArgumentException(
370 OUString::createFromAscii(pStr) +
371 ": verifyInput(): textures' RepeatModeY value is out of range (" +
372 OUString::number(sal::static_int_cast<sal_Int32>(texture.RepeatModeY)) +
373 " not known)",
374 xIf, nArgPos );
375 #else
376 throw lang::IllegalArgumentException();
377 #endif
380 namespace
382 struct VerifyDashValue
384 VerifyDashValue( const char* pStr,
385 const uno::Reference< uno::XInterface >& xIf,
386 ::sal_Int16 nArgPos ) :
387 mpStr( pStr ),
388 mrIf( xIf ),
389 mnArgPos( nArgPos )
393 void operator()( const double& rVal )
395 if( !std::isfinite( rVal ) || rVal < 0.0 )
397 throw lang::IllegalArgumentException(
398 OUString::createFromAscii(mpStr) +
399 ": verifyInput(): one of stroke attributes' DashArray value out of range (is " +
400 OUString::number(rVal) + ")",
401 mrIf, mnArgPos );
405 const char* mpStr;
406 const uno::Reference< uno::XInterface >& mrIf;
407 sal_Int16 mnArgPos;
411 void verifyInput( const rendering::StrokeAttributes& strokeAttributes,
412 const char* pStr,
413 const uno::Reference< uno::XInterface >& xIf,
414 ::sal_Int16 nArgPos )
416 if( !std::isfinite( strokeAttributes.StrokeWidth ) ||
417 strokeAttributes.StrokeWidth < 0.0 )
419 #if OSL_DEBUG_LEVEL > 0
420 throw lang::IllegalArgumentException(
421 OUString::createFromAscii(pStr) +
422 ": verifyInput(): stroke attributes' StrokeWidth value out of range (is " +
423 OUString::number(strokeAttributes.StrokeWidth) +
424 ")",
425 xIf, nArgPos );
426 #else
427 throw lang::IllegalArgumentException();
428 #endif
431 if( !std::isfinite( strokeAttributes.MiterLimit ) ||
432 strokeAttributes.MiterLimit < 0.0 )
434 #if OSL_DEBUG_LEVEL > 0
435 throw lang::IllegalArgumentException(
436 OUString::createFromAscii(pStr) +
437 ": verifyInput(): stroke attributes' MiterLimit value out of range (is " +
438 OUString::number(strokeAttributes.MiterLimit) + ")",
439 xIf, nArgPos );
440 #else
441 throw lang::IllegalArgumentException();
442 #endif
445 VerifyDashValue aVerifyDashValue( pStr, xIf, nArgPos );
446 for (auto const& aStrokeAttribute : strokeAttributes.DashArray)
447 aVerifyDashValue( aStrokeAttribute );
449 for (auto const& aStrokeAttribute : strokeAttributes.LineArray)
450 aVerifyDashValue( aStrokeAttribute );
452 if( strokeAttributes.StartCapType < rendering::PathCapType::BUTT ||
453 strokeAttributes.StartCapType > rendering::PathCapType::SQUARE )
455 #if OSL_DEBUG_LEVEL > 0
456 throw lang::IllegalArgumentException(
457 OUString::createFromAscii(pStr) +
458 ": verifyInput(): stroke attributes' StartCapType value is out of range (" +
459 OUString::number(sal::static_int_cast<sal_Int32>(strokeAttributes.StartCapType)) +
460 " not known)",
461 xIf, nArgPos );
462 #else
463 throw lang::IllegalArgumentException();
464 #endif
467 if( strokeAttributes.EndCapType < rendering::PathCapType::BUTT ||
468 strokeAttributes.EndCapType > rendering::PathCapType::SQUARE )
470 #if OSL_DEBUG_LEVEL > 0
471 throw lang::IllegalArgumentException(
472 OUString::createFromAscii(pStr) +
473 ": verifyInput(): stroke attributes' StartCapType value is out of range (" +
474 OUString::number(sal::static_int_cast<sal_Int32>(strokeAttributes.EndCapType)) +
475 " not known)",
476 xIf, nArgPos );
477 #else
478 throw lang::IllegalArgumentException();
479 #endif
482 if( strokeAttributes.JoinType >= rendering::PathJoinType::NONE &&
483 strokeAttributes.JoinType <= rendering::PathJoinType::BEVEL )
484 return;
486 #if OSL_DEBUG_LEVEL > 0
487 throw lang::IllegalArgumentException(
488 OUString::createFromAscii(pStr) +
489 ": verifyInput(): stroke attributes' JoinType value is out of range (" +
490 OUString::number(sal::static_int_cast<sal_Int32>(strokeAttributes.JoinType)) +
491 " not known)",
492 xIf, nArgPos );
493 #else
494 throw lang::IllegalArgumentException();
495 #endif
498 void verifyInput( const rendering::IntegerBitmapLayout& bitmapLayout,
499 const char* pStr,
500 const uno::Reference< uno::XInterface >& xIf,
501 ::sal_Int16 nArgPos )
503 if( bitmapLayout.ScanLines < 0 )
505 #if OSL_DEBUG_LEVEL > 0
506 throw lang::IllegalArgumentException(
507 OUString::createFromAscii(pStr) +
508 ": verifyInput(): bitmap layout's ScanLines is negative",
509 xIf, nArgPos );
510 #else
511 (void)pStr; (void)xIf; (void)nArgPos;
512 throw lang::IllegalArgumentException();
513 #endif
516 if( bitmapLayout.ScanLineBytes < 0 )
518 #if OSL_DEBUG_LEVEL > 0
519 throw lang::IllegalArgumentException(
520 OUString::createFromAscii(pStr) +
521 ": verifyInput(): bitmap layout's ScanLineBytes is negative",
522 xIf, nArgPos );
523 #else
524 throw lang::IllegalArgumentException();
525 #endif
528 if( !bitmapLayout.ColorSpace.is() )
530 #if OSL_DEBUG_LEVEL > 0
531 throw lang::IllegalArgumentException(
532 OUString::createFromAscii(pStr) +
533 ": verifyInput(): bitmap layout's ColorSpace is invalid",
534 xIf, nArgPos );
535 #else
536 throw lang::IllegalArgumentException();
537 #endif
539 if( bitmapLayout.ColorSpace->getBitsPerPixel() < 0 )
541 #if OSL_DEBUG_LEVEL > 0
542 throw lang::IllegalArgumentException(
543 OUString::createFromAscii(pStr) +
544 ": verifyInput(): bitmap layout's ColorSpace getBitsPerPixel() is negative",
545 xIf, nArgPos );
546 #else
547 throw lang::IllegalArgumentException();
548 #endif
551 if( bitmapLayout.ColorSpace->getEndianness() >= util::Endianness::LITTLE &&
552 bitmapLayout.ColorSpace->getEndianness() <= util::Endianness::BIG )
553 return;
555 #if OSL_DEBUG_LEVEL > 0
556 throw lang::IllegalArgumentException(
557 OUString::createFromAscii(pStr) +
558 ": verifyInput(): bitmap layout's ColorSpace getEndianness() value is out of range (" +
559 OUString::number(sal::static_int_cast<sal_Int32>(bitmapLayout.ColorSpace->getEndianness())) +
560 " not known)",
561 xIf, nArgPos );
562 #else
563 throw lang::IllegalArgumentException();
564 #endif
567 void verifyInput( const rendering::FontRequest& fontRequest,
568 const char* pStr,
569 const uno::Reference< uno::XInterface >& xIf,
570 ::sal_Int16 nArgPos )
572 verifyInput( fontRequest.FontDescription,
573 pStr, xIf, nArgPos );
575 if( !std::isfinite( fontRequest.CellSize ) )
577 #if OSL_DEBUG_LEVEL > 0
578 throw lang::IllegalArgumentException(
579 OUString::createFromAscii(pStr) +
580 ": verifyInput(): font request's CellSize value contains infinite or NAN",
581 xIf, nArgPos );
582 #else
583 throw lang::IllegalArgumentException();
584 #endif
587 if( !std::isfinite( fontRequest.ReferenceAdvancement ) )
589 #if OSL_DEBUG_LEVEL > 0
590 throw lang::IllegalArgumentException(
591 OUString::createFromAscii(pStr) +
592 ": verifyInput(): font request's ReferenceAdvancement value contains infinite or NAN",
593 xIf, nArgPos );
594 #else
595 throw lang::IllegalArgumentException();
596 #endif
599 if( fontRequest.CellSize != 0.0 &&
600 fontRequest.ReferenceAdvancement != 0.0 )
602 #if OSL_DEBUG_LEVEL > 0
603 throw lang::IllegalArgumentException(
604 OUString::createFromAscii(pStr) +
605 ": verifyInput(): font request's CellSize and ReferenceAdvancement are mutually exclusive, one of them must be 0.0",
606 xIf, nArgPos );
607 #else
608 throw lang::IllegalArgumentException();
609 #endif
613 void verifyIndexRange( const geometry::IntegerRectangle2D& rect,
614 const geometry::IntegerSize2D& size )
616 const ::basegfx::B2IRange aRect(
617 ::basegfx::unotools::b2IRectangleFromIntegerRectangle2D(
618 rect ) );
620 if( aRect.getMinX() < 0 ||
621 aRect.getMaxX() > size.Width ||
622 aRect.getMinY() < 0 ||
623 aRect.getMaxY() > size.Height )
625 throw css::lang::IndexOutOfBoundsException();
629 void verifyIndexRange( const geometry::IntegerPoint2D& pos,
630 const geometry::IntegerSize2D& size )
632 if( pos.X < 0 ||
633 pos.X > size.Width ||
634 pos.Y < 0 ||
635 pos.Y > size.Height )
637 throw css::lang::IndexOutOfBoundsException();
641 void verifyBitmapSize( const geometry::IntegerSize2D& size,
642 const char* pStr,
643 const uno::Reference< uno::XInterface >& xIf )
645 if( size.Width <= 0 )
647 #if OSL_DEBUG_LEVEL > 0
648 throw lang::IllegalArgumentException(
649 OUString::createFromAscii(pStr) +
650 ": verifyBitmapSize(): size has 0 or negative width (value: " +
651 OUString::number(size.Width) + ")",
652 xIf, 0 );
653 #else
654 (void)pStr; (void)xIf;
655 throw lang::IllegalArgumentException();
656 #endif
659 if( size.Height > 0 )
660 return;
662 #if OSL_DEBUG_LEVEL > 0
663 throw lang::IllegalArgumentException(
664 OUString::createFromAscii(pStr) +
665 ": verifyBitmapSize(): size has 0 or negative height (value: " +
666 OUString::number(size.Height) +
667 ")",
668 xIf, 0 );
669 #else
670 throw lang::IllegalArgumentException();
671 #endif
674 void verifySpriteSize( const geometry::RealSize2D& size,
675 const char* pStr,
676 const uno::Reference< uno::XInterface >& xIf )
678 if( size.Width <= 0.0 )
680 #if OSL_DEBUG_LEVEL > 0
681 throw lang::IllegalArgumentException(
682 OUString::createFromAscii(pStr) +
683 ": verifySpriteSize(): size has 0 or negative width (value: " +
684 OUString::number(size.Width) + ")",
685 xIf, 0 );
686 #else
687 (void)pStr; (void)xIf;
688 throw lang::IllegalArgumentException();
689 #endif
692 if( size.Height <= 0.0 )
694 #if OSL_DEBUG_LEVEL > 0
695 throw lang::IllegalArgumentException(
696 OUString::createFromAscii(pStr) +
697 ": verifySpriteSize(): size has 0 or negative height (value: " +
698 OUString::number(size.Height) + ")",
699 xIf, 0 );
700 #else
701 throw lang::IllegalArgumentException();
702 #endif
707 } // namespace
709 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */