21#include <servicenames.hxx>
28#include <com/sun/star/frame/XLoadable.hpp>
29#include <com/sun/star/uno/XComponentContext.hpp>
38 uno::Reference<uno::XComponentContext>
const & xContext)
39 : m_bCancelRequired( false )
42 m_oCancelFinished.reset();
45ChartFrameLoader::~ChartFrameLoader()
49bool ChartFrameLoader::impl_checkCancel()
53 m_oCancelFinished.set();
61OUString SAL_CALL ChartFrameLoader::getImplementationName()
66sal_Bool SAL_CALL ChartFrameLoader::supportsService(
const OUString& rServiceName )
71css::uno::Sequence< OUString > SAL_CALL ChartFrameLoader::getSupportedServiceNames()
83 bool bHaveLoadedModel =
false;
88 if( aIt != aMediaDescriptor.end())
91 bHaveLoadedModel =
true;
99 xModel =
new ChartModel(m_xCC);
101 if( impl_checkCancel() )
108 if( impl_checkCancel() )
124 if( aIt != aMediaDescriptor.end())
126 OUString
aURL( (*aIt).second.get< OUString >());
127 if(
aURL.startsWith(
"private:factory/schart" ) )
131 xLoadable->initNew();
142 aMediaDescriptor >> aCompleteMediaDescriptor;
148 xLoadable->load( aCompleteMediaDescriptor );
154 awt::Rectangle aRect( xComponentWindow->getPosSize() );
155 xComponentWindow->setPosSize( aRect.X, aRect.Y, aRect.Width, aRect.Height, 0 );
160 catch(
const uno::Exception & )
168void SAL_CALL ChartFrameLoader::cancel()
170 m_oCancelFinished.reset();
171 m_bCancelRequired =
true;
172 m_oCancelFinished.wait();
173 m_bCancelRequired =
false;
178extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
180 css::uno::Sequence<css::uno::Any>
const &)
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * com_sun_star_comp_chart2_ChartFrameLoader_get_implementation(css::uno::XComponentContext *context, css::uno::Sequence< css::uno::Any > const &)
ChartFrameLoader()=delete
#define DBG_UNHANDLED_EXCEPTION(...)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
void ConnectFrameControllerModel(const css::uno::Reference< css::frame::XFrame > &xFrame, const css::uno::Reference< css::frame::XController2 > &xController, const css::uno::Reference< css::frame::XModel > &xModel)
constexpr OUStringLiteral CHART_FRAMELOADER_SERVICE_IMPLEMENTATION_NAME
constexpr OUStringLiteral CHART_FRAMELOADER_SERVICE_NAME
Reference< XController > xController
Reference< XFrame > xFrame
Reference< XModel > xModel