Kaydet (Commit) 84841b11 authored tarafından Caolán McNamara's avatar Caolán McNamara

callcatcher: AtomServer unused

üst 19bf1de0
......@@ -93,25 +93,6 @@ namespace utl {
{ overrideAtom( atomClass, newDescription.atom, newDescription.description ); }
sal_Bool hasAtom( int atomClass, int atom ) const;
};
class AtomServer : public ::cppu::WeakAggImplHelper1< ::com::sun::star::util::XAtomServer >
{
private:
MultiAtomProvider m_aProvider;
::osl::Mutex m_aMutex;
public:
AtomServer();
virtual ~AtomServer();
const ::rtl::OUString& getString( int atomClass, int atom ) const
{ return m_aProvider.getString( atomClass, atom ); }
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::util::AtomDescription > SAL_CALL getClass( sal_Int32 atomClass ) throw();
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::util::AtomDescription > > SAL_CALL getClasses( const ::com::sun::star::uno::Sequence< sal_Int32 >& atomClasses ) throw();
virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getAtomDescriptions( const ::com::sun::star::uno::Sequence< ::com::sun::star::util::AtomClassRequest >& atoms ) throw();
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::util::AtomDescription > SAL_CALL getRecentAtoms( sal_Int32 atomClass, sal_Int32 atom ) throw();
virtual sal_Int32 SAL_CALL getAtom( sal_Int32 atomClass, const ::rtl::OUString& description, sal_Bool create ) throw();
};
}
#endif
......
......@@ -205,86 +205,4 @@ void MultiAtomProvider::overrideAtom( int atomClass, int atom, const ::rtl::OUSt
m_aAtomLists[ atomClass ]->overrideAtom( atom, description );
}
// -----------------------------------------------------------------------
AtomServer::AtomServer()
{
}
AtomServer::~AtomServer()
{
}
sal_Int32 AtomServer::getAtom( sal_Int32 atomClass, const ::rtl::OUString& description, sal_Bool create ) throw()
{
::osl::Guard< ::osl::Mutex > guard( m_aMutex );
return m_aProvider.getAtom( atomClass, description, create );
}
Sequence< Sequence< NMSP_UTIL::AtomDescription > > AtomServer::getClasses( const Sequence< sal_Int32 >& atomClasses ) throw()
{
::osl::Guard< ::osl::Mutex > guard( m_aMutex );
Sequence< Sequence< NMSP_UTIL::AtomDescription > > aRet( atomClasses.getLength() );
for( int i = 0; i < atomClasses.getLength(); i++ )
{
aRet.getArray()[i] = getClass( atomClasses.getConstArray()[i] );
}
return aRet;
}
Sequence< NMSP_UTIL::AtomDescription > AtomServer::getClass( sal_Int32 atomClass ) throw()
{
::osl::Guard< ::osl::Mutex > guard( m_aMutex );
::std::list< ::utl::AtomDescription > atoms;
m_aProvider.getClass( atomClass, atoms );
Sequence< NMSP_UTIL::AtomDescription > aRet( atoms.size() );
for( int i = aRet.getLength()-1; i >= 0; i-- )
{
aRet.getArray()[i].atom = atoms.back().atom;
aRet.getArray()[i].description = atoms.back().description;
atoms.pop_back();
}
return aRet;
}
Sequence< NMSP_UTIL::AtomDescription > AtomServer::getRecentAtoms( sal_Int32 atomClass, sal_Int32 atom ) throw()
{
::osl::Guard< ::osl::Mutex > guard( m_aMutex );
::std::list< ::utl::AtomDescription > atoms;
m_aProvider.getRecent( atomClass, atom, atoms );
Sequence< NMSP_UTIL::AtomDescription > aRet( atoms.size() );
for( int i = aRet.getLength()-1; i >= 0; i-- )
{
aRet.getArray()[i].atom = atoms.back().atom;
aRet.getArray()[i].description = atoms.back().description;
atoms.pop_back();
}
return aRet;
}
Sequence< ::rtl::OUString > AtomServer::getAtomDescriptions( const Sequence< AtomClassRequest >& atoms ) throw()
{
::osl::Guard< ::osl::Mutex > guard( m_aMutex );
int nStrings = 0, i;
for( i = 0; i < atoms.getLength(); i++ )
nStrings += atoms.getConstArray()[ i ].atoms.getLength();
Sequence< ::rtl::OUString > aRet( nStrings );
for( i = 0, nStrings = 0; i < atoms.getLength(); i++ )
{
const AtomClassRequest& rRequest = atoms.getConstArray()[i];
for( int n = 0; n < rRequest.atoms.getLength(); n++ )
aRet.getArray()[ nStrings++ ] = m_aProvider.getString( rRequest.atomClass, rRequest.atoms.getConstArray()[ n ] );
}
return aRet;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment