summaryrefslogtreecommitdiff
path: root/cppcanvas
diff options
context:
space:
mode:
authorThorsten Behrens <thb@documentfoundation.org>2013-11-28 15:27:30 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-12-02 11:21:44 +0000
commit0f080297e9c176f221e20c422ba77080eee8e21c (patch)
tree0b420b04c22157a81ebf8ce632895aab1a5a151a /cppcanvas
parentaac1da796aa1fc1a01a0cd8a6fac7d668a8c259e (diff)
Resolves: fdo#71527 make presenter console not crash/useless
Basically reverts the pieces of 21ec9beae29b19b8ec6f0a16fd0e708e4f210208 to make XSpriteCanvas a XBitmapCanvas again Otherwise PresenterHelper::loadBitmap is not an XBitmapCanvas and so VclFactory::createBitmap cannot succeed (cherry picked from commit 639aa8e72639fd01e9004977f1cfaafc13b1e45f) Revert "Resolves: fdo#71527 make presenter console not crash/useless" This reverts commit 639aa8e72639fd01e9004977f1cfaafc13b1e45f. (cherry picked from commit 72aa51185fb7b1ff2ad9006f2067a680b70ab66d) Revert "Resolves: fdo#71527 don't crash in presenter console" This reverts commit bae01385c895a100b5371879889e606927cff877. (cherry picked from commit b807b2d9291a2328a55de55d67c4874803d8b7fd) Fix fdo#71527 no unguarded ptr dereference here. This is the real problem - mxPane can be validly NULL. (cherry picked from commit 1b10205c2cb952ab43e30706c05f78d6e8f642c3) Further XCanvas != XBitmapCanvas cleanup. It seems I missed a few places in 21ec9beae29b19b8ec6f0a16fd0e708e4f210208, getting that straight now hopefully. (cherry picked from commit 05d2994c136650deca2d80fedf6b14d10109986e) 0ac1a7ada530791e2d34d2f0802213c869ea48a1 d149bae0904fd6c2120209d69490d0b257ac3f64 e8d055db9bfb68cb9031fa970518343f5aec6619 34fc8df2d1ee65bef0639b3de9487ff311bed89a Change-Id: I197adf98e915102f383ee050a8ea16d1e41cecf2
Diffstat (limited to 'cppcanvas')
-rw-r--r--cppcanvas/source/uno/uno_mtfrenderer.cxx2
-rw-r--r--cppcanvas/source/wrapper/vclfactory.cxx8
2 files changed, 8 insertions, 2 deletions
diff --git a/cppcanvas/source/uno/uno_mtfrenderer.cxx b/cppcanvas/source/uno/uno_mtfrenderer.cxx
index 63271d7940df..8fa7199933ca 100644
--- a/cppcanvas/source/uno/uno_mtfrenderer.cxx
+++ b/cppcanvas/source/uno/uno_mtfrenderer.cxx
@@ -23,7 +23,7 @@ void MtfRenderer::draw (double fScaleX, double fScaleY) throw (uno::RuntimeExcep
{
if (mpMetafile && mxCanvas.get()) {
cppcanvas::VCLFactory& factory = cppcanvas::VCLFactory::getInstance();
- cppcanvas::BitmapCanvasSharedPtr canvas = factory.createCanvas (mxCanvas);
+ cppcanvas::BitmapCanvasSharedPtr canvas = factory.createBitmapCanvas (mxCanvas);
cppcanvas::RendererSharedPtr renderer = factory.createRenderer (canvas, *mpMetafile, cppcanvas::Renderer::Parameters ());
::basegfx::B2DHomMatrix aMatrix;
aMatrix.scale( fScaleX, fScaleY );
diff --git a/cppcanvas/source/wrapper/vclfactory.cxx b/cppcanvas/source/wrapper/vclfactory.cxx
index a24025e34f4e..d27afa18099d 100644
--- a/cppcanvas/source/wrapper/vclfactory.cxx
+++ b/cppcanvas/source/wrapper/vclfactory.cxx
@@ -59,7 +59,13 @@ namespace cppcanvas
{
}
- BitmapCanvasSharedPtr VCLFactory::createCanvas( const uno::Reference< rendering::XBitmapCanvas >& xCanvas )
+ CanvasSharedPtr VCLFactory::createCanvas( const uno::Reference< rendering::XCanvas >& xCanvas )
+ {
+ return CanvasSharedPtr(
+ new internal::ImplCanvas( xCanvas ) );
+ }
+
+ BitmapCanvasSharedPtr VCLFactory::createBitmapCanvas( const uno::Reference< rendering::XBitmapCanvas >& xCanvas )
{
return BitmapCanvasSharedPtr(
new internal::ImplBitmapCanvas( xCanvas ) );