...(for now, from LIBO_INTERNAL_CODE only). See the mail thread starting at <https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html> "Dynamic Exception Specifications" for details. Most changes have been done automatically by the rewriting loplugin:dynexcspec (after enabling the rewriting mode, to be committed shortly). The way it only removes exception specs from declarations if it also sees a definition, it identified some dead declarations-w/o-definitions (that have been removed manually) and some cases where a definition appeared in multiple include files (which have also been cleaned up manually). There's also been cases of macro paramters (that were used to abstract over exception specs) that have become unused now (and been removed). Furthermore, some code needed to be cleaned up manually (avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no configurations available that would actually build that code. Missing @throws documentation has not been applied in such manual clean-up. Change-Id: I3408691256c9b0c12bc5332de976743626e13960 Reviewed-on: https://gerrit.libreoffice.org/33574 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
64 lines
2.2 KiB
C++
64 lines
2.2 KiB
C++
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
/*
|
|
* This file is part of the LibreOffice project.
|
|
*
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
*/
|
|
|
|
#include "uno_mtfrenderer.hxx"
|
|
#include <cppcanvas/vclfactory.hxx>
|
|
#include <comphelper/servicedecl.hxx>
|
|
#include <cppuhelper/factory.hxx>
|
|
#include <o3tl/any.hxx>
|
|
|
|
using namespace ::com::sun::star;
|
|
|
|
void MtfRenderer::setMetafile (const uno::Sequence< sal_Int8 >& /*rMtf*/)
|
|
{
|
|
// printf ("MtfRenderer::setMetafile unimplemented, use fast property set or implement me\n");
|
|
}
|
|
|
|
void MtfRenderer::draw (double fScaleX, double fScaleY)
|
|
{
|
|
if (mpMetafile && mxCanvas.get()) {
|
|
cppcanvas::BitmapCanvasSharedPtr canvas = cppcanvas::VCLFactory::createBitmapCanvas (mxCanvas);
|
|
cppcanvas::RendererSharedPtr renderer = cppcanvas::VCLFactory::createRenderer (canvas, *mpMetafile, cppcanvas::Renderer::Parameters ());
|
|
::basegfx::B2DHomMatrix aMatrix;
|
|
aMatrix.scale( fScaleX, fScaleY );
|
|
canvas->setTransformation( aMatrix );
|
|
renderer->draw ();
|
|
}
|
|
}
|
|
|
|
void MtfRenderer::setFastPropertyValue( sal_Int32 nHandle, const uno::Any& aAny)
|
|
{
|
|
if (nHandle == 0) {
|
|
mpMetafile = reinterpret_cast<GDIMetaFile*>( *o3tl::doAccess<sal_Int64>(aAny) );
|
|
}
|
|
}
|
|
|
|
MtfRenderer::MtfRenderer (uno::Sequence<uno::Any> const& aArgs, uno::Reference<uno::XComponentContext> const&) : MtfRendererBase (m_aMutex), mpMetafile (nullptr)
|
|
{
|
|
if( aArgs.getLength() == 1 ) {
|
|
aArgs[0] >>= mxCanvas;
|
|
}
|
|
}
|
|
|
|
namespace sdecl = comphelper::service_decl;
|
|
const sdecl::ServiceDecl MtfRendererDecl(
|
|
sdecl::class_<MtfRenderer, sdecl::with_args<true> >(),
|
|
"com.sun.star.comp.rendering.MtfRenderer",
|
|
"com.sun.star.rendering.MtfRenderer" );
|
|
|
|
// The C shared lib entry points
|
|
extern "C"
|
|
SAL_DLLPUBLIC_EXPORT void* SAL_CALL mtfrenderer_component_getFactory( sal_Char const* pImplName,
|
|
void*, void* )
|
|
{
|
|
return sdecl::component_getFactoryHelper( pImplName, {&MtfRendererDecl} );
|
|
}
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|