summaryrefslogtreecommitdiff
path: root/toolkit/source/controls/spinningprogress.cxx
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@collabora.com>2014-01-23 12:03:34 +0100
committerMatúš Kukan <matus.kukan@collabora.com>2014-01-23 23:38:58 +0100
commit574f963fad514031190ae2a838f1d11a9fa8449f (patch)
tree3e03b7d477427dd1870d62bba8aaad1b48c079a5 /toolkit/source/controls/spinningprogress.cxx
parent20b7476142f75b49d10a75e48429a94cff0cec32 (diff)
tk: Constructor feature for SpinningProgressControlModel.
Change-Id: I137cebba9743f6d703412d6d6f8a39d47d01738d
Diffstat (limited to 'toolkit/source/controls/spinningprogress.cxx')
-rw-r--r--toolkit/source/controls/spinningprogress.cxx78
1 files changed, 42 insertions, 36 deletions
diff --git a/toolkit/source/controls/spinningprogress.cxx b/toolkit/source/controls/spinningprogress.cxx
index a4d402f9b682..a9d207d8c9b1 100644
--- a/toolkit/source/controls/spinningprogress.cxx
+++ b/toolkit/source/controls/spinningprogress.cxx
@@ -17,39 +17,39 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
-#include "toolkit/controls/spinningprogress.hxx"
-#include "toolkit/helper/servicenames.hxx"
-#include "toolkit/helper/unopropertyarrayhelper.hxx"
-
-
#include <rtl/ustrbuf.hxx>
+#include <toolkit/controls/animatedimages.hxx>
#include <tools/diagnose_ex.h>
#include <vcl/throbber.hxx>
-//......................................................................................................................
-namespace toolkit
+using namespace css;
+using namespace css::uno;
+
+namespace {
+
+typedef toolkit::AnimatedImagesControlModel SpinningProgressControlModel_Base;
+class SpinningProgressControlModel : public SpinningProgressControlModel_Base
{
-//......................................................................................................................
-
- using ::com::sun::star::uno::Reference;
- using ::com::sun::star::uno::XInterface;
- using ::com::sun::star::uno::UNO_QUERY;
- using ::com::sun::star::uno::UNO_QUERY_THROW;
- using ::com::sun::star::uno::UNO_SET_THROW;
- using ::com::sun::star::uno::Exception;
- using ::com::sun::star::uno::RuntimeException;
- using ::com::sun::star::uno::Any;
- using ::com::sun::star::uno::makeAny;
- using ::com::sun::star::uno::Sequence;
- using ::com::sun::star::uno::Type;
- using ::com::sun::star::beans::XPropertySetInfo;
- using ::com::sun::star::uno::XComponentContext;
-
- //==================================================================================================================
- //= SpinningProgressControlModel
- //==================================================================================================================
- //------------------------------------------------------------------------------------------------------------------
+public:
+ SpinningProgressControlModel( css::uno::Reference< css::uno::XComponentContext > const & i_factory );
+ SpinningProgressControlModel( const SpinningProgressControlModel& i_copySource );
+
+ virtual UnoControlModel* Clone() const;
+
+ // XPropertySet
+ css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(css::uno::RuntimeException);
+
+ // XPersistObject
+ OUString SAL_CALL getServiceName() throw(css::uno::RuntimeException);
+
+ // XServiceInfo
+ OUString SAL_CALL getImplementationName( ) throw(css::uno::RuntimeException);
+ css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(css::uno::RuntimeException);
+
+protected:
+ ~SpinningProgressControlModel();
+};
+
SpinningProgressControlModel::SpinningProgressControlModel( Reference< XComponentContext > const & i_factory )
:SpinningProgressControlModel_Base( i_factory )
{
@@ -95,16 +95,16 @@ namespace toolkit
}
//------------------------------------------------------------------------------------------------------------------
- Reference< XPropertySetInfo > SAL_CALL SpinningProgressControlModel::getPropertySetInfo( ) throw(RuntimeException)
+ Reference< beans::XPropertySetInfo > SAL_CALL SpinningProgressControlModel::getPropertySetInfo( ) throw(RuntimeException)
{
- static Reference< XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) );
+ static Reference< beans::XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) );
return xInfo;
}
//------------------------------------------------------------------------------------------------------------------
OUString SAL_CALL SpinningProgressControlModel::getServiceName() throw(RuntimeException)
{
- return OUString::createFromAscii( szServiceName_SpinningProgressControlModel );
+ return OUString("com.sun.star.awt.SpinningProgressControlModel");
}
//------------------------------------------------------------------------------------------------------------------
@@ -117,14 +117,20 @@ namespace toolkit
Sequence< OUString > SAL_CALL SpinningProgressControlModel::getSupportedServiceNames() throw(RuntimeException)
{
Sequence< OUString > aServiceNames(3);
- aServiceNames[0] = OUString::createFromAscii( szServiceName_SpinningProgressControlModel );
- aServiceNames[1] = OUString::createFromAscii( szServiceName_AnimatedImagesControlModel );
+ aServiceNames[0] = "com.sun.star.awt.SpinningProgressControlModel";
+ aServiceNames[1] = "com.sun.star.awt.AnimatedImagesControlModel";
aServiceNames[2] = "com.sun.star.awt.UnoControlModel";
return aServiceNames;
}
-//......................................................................................................................
-} // namespace toolkit
-//......................................................................................................................
+}
+
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+org_openoffice_comp_toolkit_SpinningProgressControlModel_get_implementation(
+ css::uno::XComponentContext *context,
+ css::uno::Sequence<css::uno::Any> const &)
+{
+ return cppu::acquire(new SpinningProgressControlModel(context));
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */