34 mpOptimizerDialog( nullptr )
45 throw IllegalArgumentException();
54 return "com.sun.star.comp.PresentationMinimizerImp";
64 return {
"com.sun.star.comp.PresentationMinimizer" };
68 const URL& aURL,
const OUString& , sal_Int32 )
70 Reference < XDispatch > xRet;
71 if (
aURL.Protocol.equalsIgnoreAsciiCase(
"vnd.com.sun.star.comp.PresentationMinimizer:" ) )
78 const Sequence< css::frame::DispatchDescriptor >& aDescripts )
80 Sequence< Reference< css::frame::XDispatch> > aReturn( aDescripts.getLength() );
81 std::transform(aDescripts.begin(), aDescripts.end(), aReturn.getArray(),
82 [
this](
const css::frame::DispatchDescriptor& rDescr) -> Reference<css::frame::XDispatch> {
83 return queryDispatch(rDescr.FeatureURL, rDescr.FrameName, rDescr.SearchFlags); });
88 const Sequence< PropertyValue >& rArguments )
91 if ( !(
mxController.is() && rURL.Protocol.equalsIgnoreAsciiCase(
"vnd.com.sun.star.comp.PresentationMinimizer:" )) )
94 if ( rURL.Path ==
"execute" )
98 sal_Int64 nFileSizeSource = 0;
99 sal_Int64 nFileSizeDest = 0;
105 *pVal >>= nFileSizeSource;
108 *pVal >>= nFileSizeDest;
110 if ( nFileSizeSource && nFileSizeDest )
112 OUString sResult =
"Your Presentation has been minimized from:" +
113 OUString::number( nFileSizeSource >> 10 ) +
115 OUString::number( nFileSizeDest >> 10 ) +
117 SAL_INFO(
"sdext.minimizer", sResult );
126 else if ( rURL.Path ==
"statusupdate" )
146extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
148 css::uno::XComponentContext* context , css::uno::Sequence<css::uno::Any>
const&)
const css::uno::Any * GetStatusValue(const PPPOptimizerTokenEnum eStat) const
OptimizationStats maStats
void UpdateStatus(const css::uno::Sequence< css::beans::PropertyValue > &rStatus)
virtual OUString SAL_CALL getImplementationName() override
css::uno::Reference< css::frame::XFrame > mxFrame
css::uno::Reference< css::uno::XComponentContext > mxContext
virtual css::uno::Reference< css::frame::XDispatch > SAL_CALL queryDispatch(const css::util::URL &aURL, const OUString &aTargetFrameName, sal_Int32 nSearchFlags) override
void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any > &aArguments) override
virtual void SAL_CALL addStatusListener(const css::uno::Reference< css::frame::XStatusListener > &xListener, const css::util::URL &aURL) override
virtual sal_Bool SAL_CALL supportsService(const OUString &sServiceName) override
PPPOptimizerDialog(const css::uno::Reference< css::uno::XComponentContext > &xContext)
virtual void SAL_CALL removeStatusListener(const css::uno::Reference< css::frame::XStatusListener > &xListener, const css::util::URL &aURL) override
virtual css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > SAL_CALL queryDispatches(const css::uno::Sequence< css::frame::DispatchDescriptor > &aDescripts) override
virtual ~PPPOptimizerDialog() override
OptimizerDialog * mpOptimizerDialog
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual void SAL_CALL dispatch(const css::util::URL &aURL, const css::uno::Sequence< css::beans::PropertyValue > &lArguments) override
css::uno::Reference< css::frame::XController > mxController
Sequence< PropertyValue > aArguments
#define SAL_INFO(area, stream)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * sdext_PPPOptimizerDialog_get_implementation(css::uno::XComponentContext *context, css::uno::Sequence< css::uno::Any > const &)