summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2007-07-17 14:24:30 +0000
committerOliver Bolte <obo@openoffice.org>2007-07-17 14:24:30 +0000
commit5bb8d6bf7415b173d5ec9e5441c060420fd9dfaa (patch)
tree3b55e8b22b101b922d90fd886d9f9fac232e4cd2
parent2c0196934438950b977b416b10940ee5d0cbc821 (diff)
INTEGRATION: CWS presfixes12 (1.20.18); FILE MERGED
2007/03/05 14:06:35 thb 1.20.18.3: #i37778# Converting XCanvas exceptions into return value for metafile renderer 2007/02/21 15:03:59 thb 1.20.18.2: RESYNC: (1.20-1.21); FILE MERGED 2007/02/20 22:29:27 thb 1.20.18.1: #i37778# Added XCanvas::clear() to all relevant interfaces
-rw-r--r--cppcanvas/source/mtfrenderer/implrenderer.cxx75
1 files changed, 51 insertions, 24 deletions
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index e82d48027a22..8fd39f622d12 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: implrenderer.cxx,v $
*
- * $Revision: 1.21 $
+ * $Revision: 1.22 $
*
- * last change: $Author: obo $ $Date: 2007-01-22 11:49:42 $
+ * last change: $Author: obo $ $Date: 2007-07-17 15:24:30 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -46,6 +46,8 @@
#include <rtl/logfile.hxx>
#include <comphelper/sequence.hxx>
+#include <comphelper/anytostring.hxx>
+#include <cppuhelper/exc_hlp.hxx>
#include <cppcanvas/canvas.hxx>
@@ -2952,33 +2954,46 @@ namespace cppcanvas
ActionVector::const_iterator aRangeBegin;
ActionVector::const_iterator aRangeEnd;
- if( !getSubsetIndices( nStartIndex, nEndIndex,
- aRangeBegin, aRangeEnd ) )
- return true; // nothing to render (but _that_ was successful)
+ try
+ {
+ if( !getSubsetIndices( nStartIndex, nEndIndex,
+ aRangeBegin, aRangeEnd ) )
+ return true; // nothing to render (but _that_ was successful)
- // now, aRangeBegin references the action in which the
- // subset rendering must start, and aRangeEnd references
- // the action in which the subset rendering must end (it
- // might also end right at the start of the referenced
- // action, such that zero of that action needs to be
- // rendered).
+ // now, aRangeBegin references the action in which the
+ // subset rendering must start, and aRangeEnd references
+ // the action in which the subset rendering must end (it
+ // might also end right at the start of the referenced
+ // action, such that zero of that action needs to be
+ // rendered).
- // render subset of actions
- // ========================
+ // render subset of actions
+ // ========================
- ::basegfx::B2DHomMatrix aMatrix;
- ::canvas::tools::getRenderStateTransform( aMatrix,
- getRenderState() );
+ ::basegfx::B2DHomMatrix aMatrix;
+ ::canvas::tools::getRenderStateTransform( aMatrix,
+ getRenderState() );
+
+ ActionRenderer aRenderer( aMatrix );
- ActionRenderer aRenderer( aMatrix );
+ return forSubsetRange( aRenderer,
+ aRangeBegin,
+ aRangeEnd,
+ nStartIndex,
+ nEndIndex,
+ maActions.end() );
+ }
+ catch( uno::Exception& )
+ {
+ OSL_ENSURE( false,
+ rtl::OUStringToOString(
+ comphelper::anyToString( cppu::getCaughtException() ),
+ RTL_TEXTENCODING_UTF8 ).getStr() );
- return forSubsetRange( aRenderer,
- aRangeBegin,
- aRangeEnd,
- nStartIndex,
- nEndIndex,
- maActions.end() );
+ // convert error to return value
+ return false;
+ }
}
::basegfx::B2DRange ImplRenderer::getSubsetArea( sal_Int32 nStartIndex,
@@ -3027,7 +3042,19 @@ namespace cppcanvas
::canvas::tools::getRenderStateTransform( aMatrix,
getRenderState() );
- return ::std::for_each( maActions.begin(), maActions.end(), ActionRenderer( aMatrix ) ).result();
+ try
+ {
+ return ::std::for_each( maActions.begin(), maActions.end(), ActionRenderer( aMatrix ) ).result();
+ }
+ catch( uno::Exception& )
+ {
+ OSL_ENSURE( false,
+ rtl::OUStringToOString(
+ comphelper::anyToString( cppu::getCaughtException() ),
+ RTL_TEXTENCODING_UTF8 ).getStr() );
+
+ return false;
+ }
}
}
}