summaryrefslogtreecommitdiffstats
path: root/include/sot
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@gmail.com>2016-01-03 20:00:21 +0100
committerMatúš Kukan <matus.kukan@gmail.com>2016-01-05 20:41:11 +0100
commit5b22663e373f2137c93adcdd2c31c54da2fba663 (patch)
tree0f6935e54a9ff498bdaea06eb91b2d7a61d9bbe1 /include/sot
parentstarmath: Drop nonexistent friend (diff)
downloadcore-5b22663e373f2137c93adcdd2c31c54da2fba663.tar.gz
core-5b22663e373f2137c93adcdd2c31c54da2fba663.zip
Make SotFactory private to sot/ and clean a bit
Change-Id: Ia683280a3e95eee995e036db6bde5d28852f92ff
Diffstat (limited to 'include/sot')
-rw-r--r--include/sot/factory.hxx64
-rw-r--r--include/sot/object.hxx13
-rw-r--r--include/sot/sotdata.hxx52
-rw-r--r--include/sot/storage.hxx10
4 files changed, 7 insertions, 132 deletions
diff --git a/include/sot/factory.hxx b/include/sot/factory.hxx
deleted file mode 100644
index 3fe2fcad0954..000000000000
--- a/include/sot/factory.hxx
+++ /dev/null
@@ -1,64 +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_SOT_FACTORY_HXX
-#define INCLUDED_SOT_FACTORY_HXX
-
-#include <tools/globname.hxx>
-#include <sot/sotdllapi.h>
-#include <vector>
-
-/*************************************************************************
-*************************************************************************/
-class SotObject;
-class SotFactory;
-
-typedef ::std::vector< SotFactory* > SotFactoryList;
-typedef void * (*CreateInstanceType)( SotObject ** );
-
-//==================class SotFactory=======================================
-class SOT_DLLPUBLIC SotFactory : public SvGlobalName
-{
- sal_uInt16 nSuperCount; // Anzahl der Superklassen
- const SotFactory ** pSuperClasses; // Superklassen
-
-protected:
- virtual ~SotFactory();
-public:
- static void IncSvObjectCount( SotObject * = nullptr );
- static void DecSvObjectCount( SotObject * = nullptr );
-
-#ifdef DBG_UTIL
- static const SotFactory * Find( const SvGlobalName & );
-#endif
-
- SotFactory( const SvGlobalName & );
-
- void PutSuperClass( const SotFactory * );
-
- bool Is( const SotFactory * pSuperClass ) const;
-
-private:
- SotFactory( const SotFactory & ) = delete;
- SotFactory & operator = ( const SotFactory & ) = delete;
-};
-
-#endif // _FACTORY_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/sot/object.hxx b/include/sot/object.hxx
index f2c3b24490f6..b6328efa681b 100644
--- a/include/sot/object.hxx
+++ b/include/sot/object.hxx
@@ -20,11 +20,13 @@
#ifndef INCLUDED_SOT_OBJECT_HXX
#define INCLUDED_SOT_OBJECT_HXX
-#include <sot/sotdata.hxx>
-#include <tools/globname.hxx>
+#include <sal/config.h>
+
#include <tools/ref.hxx>
#include <sot/sotdllapi.h>
+class SotFactory;
+
class SOT_DLLPUBLIC SotObject : virtual public SvRefBase
{
friend class SotFactory;
@@ -35,13 +37,10 @@ friend class SotFactory;
protected:
virtual ~SotObject();
virtual bool Close();
+
public:
SotObject();
-private:
- static SotFactory ** GetFactoryAdress()
- { return &(SOTDATA()->pSotObjectFactory); }
-public:
static SotFactory * ClassFactory();
virtual void * Cast( const SotFactory * );
@@ -58,6 +57,6 @@ private:
SotObject( const SotObject & ) = delete;
};
-#endif // _IFACE_HXX
+#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/sot/sotdata.hxx b/include/sot/sotdata.hxx
deleted file mode 100644
index 58867b0b0cd7..000000000000
--- a/include/sot/sotdata.hxx
+++ /dev/null
@@ -1,52 +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_SOT_SOTDATA_HXX
-#define INCLUDED_SOT_SOTDATA_HXX
-
-#include <sot/sotdllapi.h>
-#include <com/sun/star/datatransfer/DataFlavor.hpp>
-#include <vector>
-#include <list>
-
-
-class SotFactory;
-class SotObject;
-
-typedef ::std::vector< SotFactory* > SotFactoryList;
-typedef ::std::vector< css::datatransfer::DataFlavor* > tDataFlavorList;
-
-struct SotData_Impl
-{
- sal_uInt32 nSvObjCount;
- std::list<SotObject*> aObjectList;
- SotFactoryList * pFactoryList;
- SotFactory * pSotObjectFactory;
- SotFactory * pSotStorageStreamFactory;
- SotFactory * pSotStorageFactory;
- tDataFlavorList* pDataFlavorList;
- SotData_Impl();
- ~SotData_Impl();
-};
-
-SOT_DLLPUBLIC SotData_Impl* SOTDATA();
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/sot/storage.hxx b/include/sot/storage.hxx
index b51afe43e6e6..de6e0c7c27e3 100644
--- a/include/sot/storage.hxx
+++ b/include/sot/storage.hxx
@@ -26,12 +26,12 @@
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/embed/XStorage.hpp>
#include <sot/object.hxx>
-#include <sot/factory.hxx>
#include <tools/stream.hxx>
#include <tools/errcode.hxx>
#include <sot/storinfo.hxx>
#include <sot/sotdllapi.h>
+class SotFactory;
class SotStorage;
enum class SotClipboardFormatId : sal_uLong;
@@ -56,10 +56,6 @@ public:
SotStorageStream( BaseStorageStream *pStm );
SotStorageStream();
-private:
- static SotFactory ** GetFactoryAdress()
- { return &(SOTDATA()->pSotStorageStreamFactory); }
-public:
static SotFactory * ClassFactory();
virtual void * Cast( const SotFactory * ) override;
@@ -108,10 +104,6 @@ public:
SotStorage( SvStream * pStm, bool bDelete );
SotStorage();
-private:
- static SotFactory ** GetFactoryAdress()
- { return &(SOTDATA()->pSotStorageFactory); }
-public:
static SotFactory * ClassFactory();
virtual void * Cast( const SotFactory * ) override;