summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@collabora.com>2014-01-08 14:16:58 +0100
committerMatúš Kukan <matus.kukan@collabora.com>2014-01-08 14:30:53 +0100
commit0196a81910753f3d14add062b83a03ca83ca9e0b (patch)
tree93ed5c23030d29ab3901d3fe0ed4c1a13fc0df24
parentf7936b021f7f0d08dc2baeddefb1b5613a8f87f6 (diff)
SvxShapeCollection is not used directly anymore; hide it.
Change-Id: I81c62c0a3ed880c0523e6ae54a27da56ff5acdca
-rw-r--r--include/svx/unoshcol.hxx87
-rw-r--r--svx/source/unodraw/unoshcol.cxx69
2 files changed, 59 insertions, 97 deletions
diff --git a/include/svx/unoshcol.hxx b/include/svx/unoshcol.hxx
deleted file mode 100644
index f0e85f70709d..000000000000
--- a/include/svx/unoshcol.hxx
+++ /dev/null
@@ -1,87 +0,0 @@
-/* -*- 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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef INCLUDED_SVX_UNOSHCOL_HXX
-#define INCLUDED_SVX_UNOSHCOL_HXX
-
-#include <com/sun/star/lang/XComponent.hpp>
-#include <com/sun/star/drawing/XShapes.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <osl/mutex.hxx>
-#include <cppuhelper/interfacecontainer.hxx>
-
-#include <cppuhelper/implbase3.hxx>
-#include <svx/svxdllapi.h>
-
-class SvxShapeCollectionMutex
-{
-public:
- ::osl::Mutex maMutex;
-};
-
-/***********************************************************************
-* *
-***********************************************************************/
-class SVX_DLLPUBLIC SvxShapeCollection : public ::cppu::WeakAggImplHelper3<
- ::com::sun::star::drawing::XShapes,
- ::com::sun::star::lang::XServiceInfo,
- ::com::sun::star::lang::XComponent
- >,
- public SvxShapeCollectionMutex
-{
-private:
- cppu::OInterfaceContainerHelper maShapeContainer;
-
- cppu::OBroadcastHelper mrBHelper;
-
- SVX_DLLPRIVATE virtual void disposing() throw();
-
-public:
- SvxShapeCollection() throw();
- virtual ~SvxShapeCollection() throw();
-
- // XInterface
- virtual void SAL_CALL release() throw();
-
- // XComponent
- virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException);
-
- // XIndexAccess
- virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException) ;
- virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) throw(::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
-
- // XElementAccess
- virtual ::com::sun::star::uno::Type SAL_CALL getElementType() throw(::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
-
- // XShapes
- virtual void SAL_CALL add( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL remove( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw(::com::sun::star::uno::RuntimeException);
-
- // XServiceInfo
- virtual OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
-};
-
-#endif
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/unodraw/unoshcol.cxx b/svx/source/unodraw/unoshcol.cxx
index 1c10e4b3bab9..553723f51287 100644
--- a/svx/source/unodraw/unoshcol.cxx
+++ b/svx/source/unodraw/unoshcol.cxx
@@ -18,22 +18,69 @@
*/
#include <com/sun/star/document/EventObject.hpp>
+#include <com/sun/star/drawing/XShapes.hpp>
+#include <com/sun/star/lang/XComponent.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
-#include <svx/unoprov.hxx>
-#include <svx/unoshcol.hxx>
+#include <cppuhelper/implbase3.hxx>
+#include <cppuhelper/interfacecontainer.hxx>
#include <cppuhelper/supportsservice.hxx>
+#include <osl/mutex.hxx>
+#include <svx/unoprov.hxx>
-using namespace ::cppu;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::container;
-using namespace ::com::sun::star::drawing;
-/***********************************************************************
-* *
-***********************************************************************/
+namespace {
+
+class SvxShapeCollectionMutex
+{
+public:
+ ::osl::Mutex maMutex;
+};
+
+class SvxShapeCollection :
+ public cppu::WeakAggImplHelper3<drawing::XShapes, lang::XServiceInfo, lang::XComponent>,
+ public SvxShapeCollectionMutex
+{
+private:
+ cppu::OInterfaceContainerHelper maShapeContainer;
+
+ cppu::OBroadcastHelper mrBHelper;
+
+ virtual void disposing() throw();
+
+public:
+ SvxShapeCollection() throw();
+ virtual ~SvxShapeCollection() throw();
+
+ // XInterface
+ virtual void SAL_CALL release() throw();
+
+ // XComponent
+ virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XIndexAccess
+ virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException) ;
+ virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) throw(::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ // XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType() throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
+
+ // XShapes
+ virtual void SAL_CALL add( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL remove( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ virtual OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
+};
+
SvxShapeCollection::SvxShapeCollection() throw()
: maShapeContainer( maMutex ), mrBHelper( maMutex )
{
@@ -184,7 +231,7 @@ uno::Any SAL_CALL SvxShapeCollection::getByIndex( sal_Int32 Index )
uno::Sequence< Reference< uno::XInterface> > xElements( maShapeContainer.getElements() );
- return uno::makeAny( Reference< XShape>(static_cast< drawing::XShape* >( xElements.getArray()[Index].get())) );
+ return uno::makeAny( Reference< drawing::XShape>(static_cast< drawing::XShape* >( xElements.getArray()[Index].get())) );
}
// XElementAccess
@@ -219,6 +266,8 @@ uno::Sequence< OUString > SAL_CALL SvxShapeCollection::getSupportedServiceNames(
return aSeq;
}
+}
+
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
com_sun_star_drawing_SvxShapeCollection_implementation_getFactory(
SAL_UNUSED_PARAMETER css::uno::XComponentContext *,