Further XCanvas != XBitmapCanvas cleanup.

It seems I missed a few places in
21ec9beae2, getting that straight
now hopefully.

Change-Id: I34fc8df2d1ee65bef0639b3de9487ff311bed89a
This commit is contained in:
Thorsten Behrens
2013-11-29 18:26:48 +01:00
parent 1b10205c2c
commit 05d2994c13
8 changed files with 20 additions and 13 deletions

View File

@@ -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 );

View File

@@ -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 ) );

View File

@@ -43,6 +43,7 @@ class Animation;
namespace com { namespace sun { namespace star { namespace rendering
{
class XCanvas;
class XBitmapCanvas;
class XSpriteCanvas;
} } } }
@@ -64,7 +65,9 @@ namespace cppcanvas
public:
static VCLFactory& getInstance();
BitmapCanvasSharedPtr createCanvas( const ::com::sun::star::uno::Reference<
CanvasSharedPtr createCanvas( const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XCanvas >& xCanvas );
BitmapCanvasSharedPtr createBitmapCanvas( const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XBitmapCanvas >& xCanvas );
SpriteCanvasSharedPtr createSpriteCanvas( const ::Window& rVCLWindow ) const;

View File

@@ -452,7 +452,7 @@ Reference<rendering::XBitmap> SAL_CALL PresenterHelper::loadBitmap (
const cppcanvas::CanvasSharedPtr pCanvas (
cppcanvas::VCLFactory::getInstance().createCanvas(
Reference<css::rendering::XBitmapCanvas>(rxCanvas,UNO_QUERY)));
Reference<css::rendering::XCanvas>(rxCanvas,UNO_QUERY)));
if (pCanvas.get() != NULL)
{

View File

@@ -25,7 +25,6 @@
#include "sdpage.hxx"
#include <cppcanvas/vclfactory.hxx>
#include <com/sun/star/drawing/XDrawPage.hpp>
#include <com/sun/star/rendering/XBitmapCanvas.hpp>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -189,9 +188,8 @@ Reference<rendering::XBitmap> SAL_CALL PresenterPreviewCache::getSlidePreview (
ThrowIfDisposed();
OSL_ASSERT(mpCacheContext.get()!=NULL);
cppcanvas::BitmapCanvasSharedPtr pCanvas (
cppcanvas::VCLFactory::getInstance().createCanvas(
Reference<rendering::XBitmapCanvas>(rxCanvas, UNO_QUERY)));
cppcanvas::CanvasSharedPtr pCanvas (
cppcanvas::VCLFactory::getInstance().createCanvas(rxCanvas));
const SdrPage* pPage = mpCacheContext->GetPage(nSlideIndex);
if (pPage == NULL)

View File

@@ -167,7 +167,7 @@ void SAL_CALL PresenterTextView::initialize (const Sequence<Any>& rArguments)
{
try
{
Reference<rendering::XBitmapCanvas> xCanvas (rArguments[0], UNO_QUERY_THROW);
Reference<rendering::XCanvas> xCanvas (rArguments[0], UNO_QUERY_THROW);
if (xCanvas.is())
{
mpImplementation->SetCanvas(

View File

@@ -131,8 +131,8 @@ Reference<rendering::XBitmap> SlideRenderer::createPreviewForCanvas (
ThrowIfDisposed();
SolarMutexGuard aGuard;
cppcanvas::BitmapCanvasSharedPtr pCanvas (cppcanvas::VCLFactory::getInstance().createCanvas(
Reference<rendering::XBitmapCanvas>(rxCanvas, UNO_QUERY)));
cppcanvas::CanvasSharedPtr pCanvas (
cppcanvas::VCLFactory::getInstance().createCanvas(rxCanvas));
if (pCanvas.get() != NULL)
return cppcanvas::VCLFactory::getInstance().createBitmap(
pCanvas,

View File

@@ -180,7 +180,7 @@ private:
const OUString& rsText) const;
OUString GetFittingText (const OUString& rsText, const double nMaximalWidth) const;
void PaintButtonBackground (
const Reference<rendering::XBitmapCanvas>& rxCanvas,
const Reference<rendering::XCanvas>& rxCanvas,
const geometry::IntegerSize2D& rSize) const;
};
@@ -1742,7 +1742,7 @@ geometry::IntegerSize2D PresenterSlideSorter::MouseOverManager::CalculateLabelSi
}
void PresenterSlideSorter::MouseOverManager::PaintButtonBackground (
const Reference<rendering::XBitmapCanvas>& rxCanvas,
const Reference<rendering::XCanvas>& rxCanvas,
const geometry::IntegerSize2D& rSize) const
{
// Get the bitmaps for painting the label background.