The additional methods of SO2_*_REF over SV_*_REF are now unused

so they can now be replaced by SV_*_REF now

Change-Id: I2207d6582cab5f41851064f3d0c773e9421c0078
This commit is contained in:
Caolán McNamara 2012-11-13 21:23:04 +00:00
parent a94b6ec2d5
commit c17f51c74c
22 changed files with 18 additions and 175 deletions

View File

@ -48,8 +48,6 @@
#include <boost/unordered_map.hpp>
#include <cppuhelper/implbase1.hxx>
#include <sot/sotref.hxx>
class ScEditEngineDefaulter;
class SfxStyleSheetBasePool;
class SfxStyleSheetHint;
@ -448,8 +446,8 @@ public:
void UpdateAcceptChangesDialog();
SO2_DECL_REF(ScDocShell)
SO2_IMPL_REF(ScDocShell)
SV_DECL_REF(ScDocShell)
SV_IMPL_REF(ScDocShell)
/** Create before modifications of the document and then destroy.

View File

@ -71,9 +71,6 @@ public:
void EndListeningAll();
};
//SO2_DECL_REF( ScServerObject )
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -55,11 +55,6 @@
namespace sd
{
#ifndef SO2_DECL_SVSTORAGE_DEFINED
#define SO2_DECL_SVSTORAGE_DEFINED
SO2_DECL_REF(SvStorage)
#endif
TYPEINIT1( FuPresentationLayout, FuPoor );
#define DOCUMENT_TOKEN (sal_Unicode('#'))

View File

@ -99,13 +99,6 @@ using ::com::sun::star::frame::XController;
namespace sd {
#ifndef SO2_DECL_SVINPLACEOBJECT_DEFINED
#define SO2_DECL_SVINPLACEOBJECT_DEFINED
SO2_DECL_REF(SvInPlaceObject)
#endif
/*************************************************************************
|*
|* SfxRequests fuer Controller bearbeiten

View File

@ -68,16 +68,6 @@
namespace sd {
#ifndef SO2_DECL_SVINPLACEOBJECT_DEFINED
#define SO2_DECL_SVINPLACEOBJECT_DEFINED
SO2_DECL_REF(SvInPlaceObject)
#endif
#ifndef SO2_DECL_SVSTORAGE_DEFINED
#define SO2_DECL_SVSTORAGE_DEFINED
SO2_DECL_REF(SvStorage)
#endif
/*************************************************************************
|*
|* SfxRequests fuer Gallery bearbeiten

View File

@ -91,11 +91,6 @@ using namespace com::sun::star;
using namespace com::sun::star::uno;
namespace sd {
#ifndef SO2_DECL_SVINPLACEOBJECT_DEFINED
#define SO2_DECL_SVINPLACEOBJECT_DEFINED
SO2_DECL_REF(SvInPlaceObject)
#endif
TYPEINIT1(View, FmFormView);
/*************************************************************************

View File

@ -68,15 +68,6 @@
namespace sd {
#ifndef SO2_DECL_SVINPLACEOBJECT_DEFINED
#define SO2_DECL_SVINPLACEOBJECT_DEFINED
SO2_DECL_REF(SvInPlaceObject)
#endif
#ifndef SO2_DECL_SVSTORAGE_DEFINED
#define SO2_DECL_SVSTORAGE_DEFINED
SO2_DECL_REF(SvStorage)
#endif
using namespace ::com::sun::star;
// ------------------------

View File

@ -84,11 +84,6 @@
#include "Window.hxx"
#include "fupoor.hxx"
#ifndef SO2_DECL_SVINPLACEOBJECT_DEFINED
#define SO2_DECL_SVINPLACEOBJECT_DEFINED
SO2_DECL_REF(SvInPlaceObject)
#endif
namespace sd { namespace ui { namespace table {
extern SfxShell* CreateTableObjectBar( ViewShell& rShell, ::sd::View* pView );
} } }

View File

@ -26,7 +26,6 @@ $(eval $(call gb_Package_add_file,sot_inc,inc/sot/formats.hxx,sot/formats.hxx))
$(eval $(call gb_Package_add_file,sot_inc,inc/sot/object.hxx,sot/object.hxx))
$(eval $(call gb_Package_add_file,sot_inc,inc/sot/sotdata.hxx,sot/sotdata.hxx))
$(eval $(call gb_Package_add_file,sot_inc,inc/sot/sotdllapi.h,sot/sotdllapi.h))
$(eval $(call gb_Package_add_file,sot_inc,inc/sot/sotref.hxx,sot/sotref.hxx))
$(eval $(call gb_Package_add_file,sot_inc,inc/sot/stg.hxx,sot/stg.hxx))
$(eval $(call gb_Package_add_file,sot_inc,inc/sot/storage.hxx,sot/storage.hxx))
$(eval $(call gb_Package_add_file,sot_inc,inc/sot/storinfo.hxx,sot/storinfo.hxx))

View File

@ -57,7 +57,6 @@ public:
void PutSuperClass( const SotFactory * );
virtual void * CreateInstance( SotObject ** ppObj = NULL ) const;
void * CastAndAddRef( SotObject * ) const;
sal_Bool Is( const SotFactory * pSuperClass ) const;
const SotFactory * GetSuper( sal_uInt16 nPos ) const

View File

@ -20,9 +20,9 @@
#ifndef _SOT_OBJECT_HXX
#define _SOT_OBJECT_HXX
#include <sot/sotref.hxx>
#include <sot/sotdata.hxx>
#include <tools/globname.hxx>
#include <tools/ref.hxx>
#include "sot/sotdllapi.h"
/*************************************************************************
@ -287,8 +287,6 @@ public:
sal_Bool Owner() const { return bOwner; }
void* CastAndAddRef( const SotFactory * pFact );
sal_uInt16 GetOwnerLockCount() const { return nOwnerLockCount; }
void OwnerLock( sal_Bool bLock );
@ -302,7 +300,7 @@ private:
};
//==================class SotObjectRef======================================
SV_IMPL_REF(SotObject)
SV_DECL_IMPL_REF(SotObject)
#endif // _IFACE_HXX

View File

@ -1,63 +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 _SOT_SOTREF_HXX
#define _SOT_SOTREF_HXX
#include <tools/ref.hxx>
//========================================================================
#ifndef SVT_DECL_SOTOBJECT_DEFINED
#define SVT_DECL_SOTOBJECT_DEFINED
class SotObject;
class SotObjectRef
{
PRV_SV_DECL_REF(SotObject)
};
#endif
//========================================================================
#define SO2_DECL_REF(ClassName) \
class ClassName; \
class ClassName##Ref \
{ \
PRV_SV_DECL_REF(ClassName) \
inline ClassName##Ref( const SotObjectRef & ); \
inline ClassName##Ref( SotObject * pObjP ); \
};
#define SO2_IMPL_REF(ClassName) \
SV_IMPL_REF(ClassName) \
inline ClassName##Ref::ClassName##Ref( const SotObjectRef & r ) \
{ \
pObj = (ClassName *)ClassName::ClassFactory()->CastAndAddRef( &r ); \
} \
inline ClassName##Ref::ClassName##Ref( SotObject * pObjP ) \
{ \
pObj = (ClassName *)ClassName::ClassFactory()->CastAndAddRef( pObjP );\
}
#define SO2_DECL_IMPL_REF(ClassName) \
SO2_DECL_REF(ClassName) \
SO2_IMPL_REF(ClassName)
#endif // _SO2REF_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -80,9 +80,9 @@ public:
#ifndef SOT_DECL_SOTSTORAGESTREAM_DEFINED
#define SOT_DECL_SOTSTORAGESTREAM_DEFINED
SO2_DECL_REF(SotStorageStream)
SV_DECL_REF(SotStorageStream)
#endif
SO2_IMPL_REF(SotStorageStream)
SV_IMPL_REF(SotStorageStream)
namespace ucbhelper
{
@ -210,9 +210,9 @@ public:
#ifndef SOT_DECL_SOTSTORAGE_DEFINED
#define SOT_DECL_SOTSTORAGE_DEFINED
SO2_DECL_REF(SotStorage)
SV_DECL_REF(SotStorage)
#endif
SO2_IMPL_REF(SotStorage)
SV_IMPL_REF(SotStorage)
#define SvStorage SotStorage
#define SvStorageRef SotStorageRef

View File

@ -195,35 +195,6 @@ void * SotFactory::CreateInstance( SotObject ** ppObj ) const
return pCreateFunc( ppObj );
}
//=========================================================================
void * SotFactory::CastAndAddRef
(
SotObject * pObj /* Das Objekt von dem der Typ gepr"uft wird. */
) const
/* [Beschreibung]
Ist eine Optimierung, damit die Ref-Klassen k"urzer implementiert
werden k"onnen. pObj wird auf den Typ der Factory gecastet.
In c++ (wenn es immer erlaubt w"are) w"urde der void * wie im
Beispiel gebildet.
Factory der Klasse SvPersist.
void * p = (void *)(SvPersist *)pObj;
[R"uckgabewert]
void *, NULL, pObj war NULL oder das Objekt war nicht vom Typ
der Factory.
Ansonsten wird pObj zuerst auf den Typ der Factory
gecastet und dann auf void *.
[Querverweise]
<SotObject::CastAndAddRef>
*/
{
return pObj ? pObj->CastAndAddRef( this ) : NULL;
}
/*************************************************************************
|* SotFactory::Is()
|*

View File

@ -72,19 +72,6 @@ IUnknown * SotObject::GetInterface( const SvGlobalName & )
return NULL;
}
/*************************************************************************
|* SotObject::CastAndAddRef()
|*
|* Beschreibung
*************************************************************************/
void* SotObject::CastAndAddRef( const SotFactory * pFact )
{
void * pCast = Cast( pFact );
if( pCast )
AddRef();
return pCast;
}
//=========================================================================
void SotObject::OwnerLock
(

View File

@ -26,7 +26,6 @@
#include <rtl/strbuf.hxx>
#include <sfx2/docfac.hxx>
#include <sfx2/objsh.hxx>
#include <sot/sotref.hxx>
#include <sot/storage.hxx>
#include <svl/lstner.hxx>
#include <vcl/jobset.hxx>

View File

@ -65,8 +65,8 @@ struct assertion_traits<String>
};
}
SO2_DECL_REF(SmDocShell)
SO2_IMPL_REF(SmDocShell)
SV_DECL_REF(SmDocShell)
SV_IMPL_REF(SmDocShell)
class TestOutputDevice : public OutputDevice
{

View File

@ -55,8 +55,8 @@
#include <sfx2/zoomitem.hxx>
SO2_DECL_REF(SmDocShell)
SO2_IMPL_REF(SmDocShell)
SV_DECL_REF(SmDocShell)
SV_IMPL_REF(SmDocShell)
using namespace ::com::sun::star;

View File

@ -50,8 +50,8 @@
#include "shellres.hxx"
#include "docufld.hxx"
SO2_DECL_REF(SwDocShell)
SO2_IMPL_REF(SwDocShell)
SV_DECL_REF(SwDocShell)
SV_IMPL_REF(SwDocShell)
using namespace ::com::sun::star;

View File

@ -50,8 +50,8 @@
#include "docsh.hxx"
SO2_DECL_REF(SwDocShell)
SO2_IMPL_REF(SwDocShell)
SV_DECL_REF(SwDocShell)
SV_IMPL_REF(SwDocShell)
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;

View File

@ -67,8 +67,8 @@
#include "modeltoviewhelper.hxx"
#include "scriptinfo.hxx"
SO2_DECL_REF(SwDocShell)
SO2_IMPL_REF(SwDocShell)
SV_DECL_REF(SwDocShell)
SV_IMPL_REF(SwDocShell)
using namespace ::com::sun::star;

View File

@ -13,7 +13,6 @@ ScVbaFormat<ooo::vba::excel::XRange>::setNumberFormat(com::sun::star::lang::Loca
ScVbaFormat<ooo::vba::excel::XStyle>::getAddIndent()
ScVbaFormat<ooo::vba::excel::XStyle>::setAddIndent(com::sun::star::uno::Any const&)
ScVbaFormat<ooo::vba::excel::XStyle>::setNumberFormat(com::sun::star::lang::Locale, rtl::OUString const&)
SotFactory::CastAndAddRef(SotObject*) const
String::String(unsigned short)
SvListView::GetModel() const
SvTreeList::GetChildIterators(SvTreeListEntry const*) const