23#include <com/sun/star/graphic/XGraphicObject.hpp>
24#include <com/sun/star/lang/XServiceInfo.hpp>
25#include <com/sun/star/uno/XComponentContext.hpp>
33typedef ::cppu::WeakImplHelper<graphic::XGraphicObject, css::lang::XServiceInfo> GraphicObject_BASE;
38class GraphicObjectImpl :
public GraphicObject_BASE
41 std::optional<GraphicObject> mpGraphicObject;
45 explicit GraphicObjectImpl(uno::Sequence<uno::Any>
const & rArgs);
48 virtual uno::Reference<graphic::XGraphic> SAL_CALL getGraphic()
override;
49 virtual void SAL_CALL setGraphic(uno::Reference<graphic::XGraphic>
const & rxGraphic)
override;
53 return "com.sun.star.graphic.GraphicObject";
63 return {
"com.sun.star.graphic.GraphicObject" };
67GraphicObjectImpl::GraphicObjectImpl(
const uno::Sequence<uno::Any>& )
69 mpGraphicObject.emplace();
72uno::Reference<graphic::XGraphic> SAL_CALL GraphicObjectImpl::getGraphic()
74 std::scoped_lock aGuard(m_aMutex);
77 throw uno::RuntimeException();
78 return mpGraphicObject->GetGraphic().GetXGraphic();
81void SAL_CALL GraphicObjectImpl::setGraphic(uno::Reference<graphic::XGraphic>
const & rxGraphic)
83 std::scoped_lock aGuard(m_aMutex);
86 throw uno::RuntimeException();
88 mpGraphicObject->SetGraphic(aGraphic);
93extern "C" SAL_DLLPUBLIC_EXPORT
95 SAL_UNUSED_PARAMETER uno::XComponentContext*,
96 uno::Sequence<uno::Any>
const & rArguments)
98 return cppu::acquire(
new GraphicObjectImpl(rArguments));
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * com_sun_star_graphic_GraphicObject_get_implementation(SAL_UNUSED_PARAMETER uno::XComponentContext *, uno::Sequence< uno::Any > const &rArguments)
css::uno::Sequence< OUString > getSupportedServiceNames()
OUString getImplementationName()
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)