summaryrefslogtreecommitdiff
path: root/dtrans/source/cnttype
diff options
context:
space:
mode:
Diffstat (limited to 'dtrans/source/cnttype')
-rw-r--r--dtrans/source/cnttype/mcnttfactory.cxx12
-rw-r--r--dtrans/source/cnttype/mcnttfactory.hxx6
-rw-r--r--dtrans/source/cnttype/mcnttype.cxx81
-rw-r--r--dtrans/source/cnttype/mcnttype.hxx3
-rw-r--r--dtrans/source/cnttype/mctfentry.cxx9
-rw-r--r--dtrans/source/cnttype/wbench/testcnttype.cxx21
6 files changed, 0 insertions, 132 deletions
diff --git a/dtrans/source/cnttype/mcnttfactory.cxx b/dtrans/source/cnttype/mcnttfactory.cxx
index 7bb69a31f1ae..e1bfc96dbdfc 100644
--- a/dtrans/source/cnttype/mcnttfactory.cxx
+++ b/dtrans/source/cnttype/mcnttfactory.cxx
@@ -24,10 +24,8 @@
#define MIMECONTENTTYPEFACTORY_IMPL_NAME "com.sun.star.datatransfer.MimeCntTypeFactory"
-
// namespace directives
-
using namespace ::rtl;
using namespace ::osl;
using namespace ::cppu;
@@ -35,10 +33,8 @@ using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
using namespace com::sun::star::datatransfer;
-
// helper functions
-
namespace
{
Sequence< OUString > SAL_CALL MimeContentTypeFactory_getSupportedServiceNames( )
@@ -49,18 +45,14 @@ namespace
}
}
-
// ctor
-
CMimeContentTypeFactory::CMimeContentTypeFactory()
{
}
-
// createMimeContentType
-
Reference< XMimeContentType > CMimeContentTypeFactory::createMimeContentType( const OUString& aContentType )
throw( IllegalArgumentException, RuntimeException )
{
@@ -68,10 +60,8 @@ Reference< XMimeContentType > CMimeContentTypeFactory::createMimeContentType( co
return Reference< XMimeContentType >( new CMimeContentType( aContentType ) );
}
-
// XServiceInfo
-
OUString SAL_CALL CMimeContentTypeFactory::getImplementationName( )
throw( RuntimeException )
{
@@ -85,10 +75,8 @@ sal_Bool SAL_CALL CMimeContentTypeFactory::supportsService( const OUString& Serv
return cppu::supportsService(this, ServiceName);
}
-
// XServiceInfo
-
Sequence< OUString > SAL_CALL CMimeContentTypeFactory::getSupportedServiceNames( )
throw( RuntimeException )
{
diff --git a/dtrans/source/cnttype/mcnttfactory.hxx b/dtrans/source/cnttype/mcnttfactory.hxx
index f849b133db16..2d2908ed2b4f 100644
--- a/dtrans/source/cnttype/mcnttfactory.hxx
+++ b/dtrans/source/cnttype/mcnttfactory.hxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#ifndef _MCNTTFACTORY_HXX_
#define _MCNTTFACTORY_HXX_
@@ -35,16 +34,12 @@ class CMimeContentTypeFactory : public
public:
CMimeContentTypeFactory();
- //------------------------------------------------
// XMimeContentTypeFactory
- //------------------------------------------------
virtual ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XMimeContentType > SAL_CALL createMimeContentType( const OUString& aContentType )
throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
- //------------------------------------------------
// XServiceInfo
- //------------------------------------------------
virtual OUString SAL_CALL getImplementationName( )
throw(::com::sun::star::uno::RuntimeException);
@@ -59,7 +54,6 @@ private:
::osl::Mutex m_aMutex;
};
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dtrans/source/cnttype/mcnttype.cxx b/dtrans/source/cnttype/mcnttype.cxx
index 7381e3660efa..c05d57488519 100644
--- a/dtrans/source/cnttype/mcnttype.cxx
+++ b/dtrans/source/cnttype/mcnttype.cxx
@@ -19,66 +19,43 @@
#include "mcnttype.hxx"
-
// namespace directives
-
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
using namespace com::sun::star::container;
using namespace std;
using namespace osl;
-
-
// constants
-
const char TSPECIALS[] = "()<>@,;:\\\"/[]?=";
const char TOKEN[] = "!#$%&'*+-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ^_`abcdefghijklmnopqrstuvwxyz{|}~.";
const char SPACE[] = " ";
const char SEMICOLON[] = ";";
-
// ctor
-
CMimeContentType::CMimeContentType( const OUString& aCntType )
{
init( aCntType );
}
-
-//
-
-
OUString SAL_CALL CMimeContentType::getMediaType( ) throw(RuntimeException)
{
return m_MediaType;
}
-
-//
-
-
OUString SAL_CALL CMimeContentType::getMediaSubtype( ) throw(RuntimeException)
{
return m_MediaSubtype;
}
-
-//
-
-
OUString SAL_CALL CMimeContentType::getFullMediaType( ) throw(RuntimeException)
{
return m_MediaType + "/" + m_MediaSubtype;
}
-
-//
-
-
Sequence< OUString > SAL_CALL CMimeContentType::getParameters( ) throw(RuntimeException)
{
MutexGuard aGuard( m_aMutex );
@@ -97,20 +74,12 @@ Sequence< OUString > SAL_CALL CMimeContentType::getParameters( ) throw(RuntimeEx
return seqParams;
}
-
-//
-
-
sal_Bool SAL_CALL CMimeContentType::hasParameter( const OUString& aName ) throw(RuntimeException)
{
MutexGuard aGuard( m_aMutex );
return ( m_ParameterMap.end( ) != m_ParameterMap.find( aName ) );
}
-
-//
-
-
OUString SAL_CALL CMimeContentType::getParameterValue( const OUString& aName ) throw(NoSuchElementException, RuntimeException)
{
MutexGuard aGuard( m_aMutex );
@@ -121,10 +90,6 @@ OUString SAL_CALL CMimeContentType::getParameterValue( const OUString& aName ) t
return m_ParameterMap.find( aName )->second;
}
-
-//
-
-
void SAL_CALL CMimeContentType::init( const OUString& aCntType ) throw( IllegalArgumentException )
{
if ( aCntType.isEmpty( ) )
@@ -136,10 +101,6 @@ void SAL_CALL CMimeContentType::init( const OUString& aCntType ) throw( IllegalA
type();
}
-
-//
-
-
void SAL_CALL CMimeContentType::getSym( void )
{
if ( m_nPos < m_ContentType.getLength( ) )
@@ -152,10 +113,6 @@ void SAL_CALL CMimeContentType::getSym( void )
m_nxtSym = OUString( );
}
-
-//
-
-
void SAL_CALL CMimeContentType::acceptSym( const OUString& pSymTlb )
{
if ( pSymTlb.indexOf( m_nxtSym ) < 0 )
@@ -164,20 +121,12 @@ void SAL_CALL CMimeContentType::acceptSym( const OUString& pSymTlb )
getSym();
}
-
-//
-
-
void SAL_CALL CMimeContentType::skipSpaces( void )
{
while (m_nxtSym == SPACE)
getSym( );
}
-
-//
-
-
void SAL_CALL CMimeContentType::type( void )
{
skipSpaces( );
@@ -207,10 +156,6 @@ void SAL_CALL CMimeContentType::type( void )
subtype( );
}
-
-//
-
-
void SAL_CALL CMimeContentType::subtype( void )
{
skipSpaces( );
@@ -237,10 +182,6 @@ void SAL_CALL CMimeContentType::subtype( void )
trailer();
}
-
-//
-
-
void SAL_CALL CMimeContentType::trailer( void )
{
OUString sToken(TOKEN);
@@ -282,10 +223,6 @@ void SAL_CALL CMimeContentType::trailer( void )
}
}
-
-//
-
-
OUString SAL_CALL CMimeContentType::pName( )
{
OUString pname;
@@ -305,10 +242,6 @@ OUString SAL_CALL CMimeContentType::pName( )
return pname;
}
-
-//
-
-
OUString SAL_CALL CMimeContentType::pValue( )
{
OUString pvalue;
@@ -339,12 +272,10 @@ OUString SAL_CALL CMimeContentType::pValue( )
return pvalue;
}
-
// the following combinations within a quoted value are not allowed:
// '";' (quote sign followed by semicolon) and '" ' (quote sign followed
// by space)
-
OUString SAL_CALL CMimeContentType::quotedPValue( )
{
OUString pvalue;
@@ -375,10 +306,6 @@ OUString SAL_CALL CMimeContentType::quotedPValue( )
return pvalue;
}
-
-//
-
-
OUString SAL_CALL CMimeContentType::nonquotedPValue( )
{
OUString pvalue;
@@ -398,10 +325,6 @@ OUString SAL_CALL CMimeContentType::nonquotedPValue( )
return pvalue;
}
-
-//
-
-
void SAL_CALL CMimeContentType::comment( void )
{
while ( !m_nxtSym.isEmpty( ) )
@@ -415,10 +338,6 @@ void SAL_CALL CMimeContentType::comment( void )
}
}
-
-//
-
-
sal_Bool SAL_CALL CMimeContentType::isInRange( const OUString& aChr, const OUString& aRange )
{
return ( aRange.indexOf( aChr ) > -1 );
diff --git a/dtrans/source/cnttype/mcnttype.hxx b/dtrans/source/cnttype/mcnttype.hxx
index 28cfa2efec0a..5f1d0435becd 100644
--- a/dtrans/source/cnttype/mcnttype.hxx
+++ b/dtrans/source/cnttype/mcnttype.hxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#ifndef _MCNTTYPE_HXX_
#define _MCNTTYPE_HXX_
@@ -35,9 +34,7 @@ class CMimeContentType : public
public:
CMimeContentType( const OUString& aCntType );
- //-------------------------------------------
// XMimeContentType
- //-------------------------------------------
virtual OUString SAL_CALL getMediaType( ) throw(::com::sun::star::uno::RuntimeException);
virtual OUString SAL_CALL getMediaSubtype( ) throw(::com::sun::star::uno::RuntimeException);
diff --git a/dtrans/source/cnttype/mctfentry.cxx b/dtrans/source/cnttype/mctfentry.cxx
index 87ff14bf872d..7ed64cb3cd2e 100644
--- a/dtrans/source/cnttype/mctfentry.cxx
+++ b/dtrans/source/cnttype/mctfentry.cxx
@@ -23,20 +23,16 @@
#include <com/sun/star/datatransfer/XMimeContentTypeFactory.hpp>
#include "mcnttfactory.hxx"
-
// some defines
-
// the service names
#define MIMECONTENTTYPEFACTORY_SERVICE_NAME "com.sun.star.datatransfer.MimeContentTypeFactory"
// the implementation names
#define MIMECONTENTTYPEFACTORY_IMPL_NAME "com.sun.star.datatransfer.MimeCntTypeFactory"
-
// namespace directives
-
using namespace ::rtl ;
using namespace ::cppu ;
using namespace ::com::sun::star::uno ;
@@ -44,19 +40,15 @@ using namespace ::com::sun::star::registry ;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::datatransfer;
-
// create a static object to initialize the shell9x library
-
namespace
{
-
// functions to create a new Clipboad instance; is needed by factory helper implementation
// @param rServiceManager - service manager, useful if the component needs other uno services
// so we should give it to every UNO-Implementation component
-
Reference< XInterface > SAL_CALL createInstance( const Reference< XMultiServiceFactory >& )
{
return Reference< XInterface >( static_cast< XMimeContentTypeFactory* >( new CMimeContentTypeFactory() ) );
@@ -69,7 +61,6 @@ extern "C"
// component_getFactory
// returns a factory to create XFilePicker-Services
-
SAL_DLLPUBLIC_EXPORT void* SAL_CALL mcnttype_component_getFactory( const sal_Char* pImplName, uno_Interface* pSrvManager, uno_Interface* /*pRegistryKey*/ )
{
void* pRet = 0;
diff --git a/dtrans/source/cnttype/wbench/testcnttype.cxx b/dtrans/source/cnttype/wbench/testcnttype.cxx
index 1c55c2b7f1a5..e1535fb2e81a 100644
--- a/dtrans/source/cnttype/wbench/testcnttype.cxx
+++ b/dtrans/source/cnttype/wbench/testcnttype.cxx
@@ -32,17 +32,13 @@
#include <vector>
-
// my defines
-
#define TEST_CLIPBOARD
#define RDB_SYSPATH "d:\\projects\\src621\\dtrans\\wntmsci7\\bin\\applicat.rdb"
-
// namesapces
-
using namespace ::rtl;
using namespace ::std;
using namespace ::cppu;
@@ -51,10 +47,6 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::container;
-
-//
-
-
void ShutdownServiceMgr( Reference< XMultiServiceFactory >& SrvMgr )
{
// Cast factory to XComponent
@@ -68,10 +60,6 @@ void ShutdownServiceMgr( Reference< XMultiServiceFactory >& SrvMgr )
SrvMgr.clear();
}
-
-//
-
-
sal_Bool readCntTypesFromFileIntoVector( char* fname, vector< string >& vecData )
{
FILE* fstream;
@@ -95,10 +83,6 @@ sal_Bool readCntTypesFromFileIntoVector( char* fname, vector< string >& vecData
return sal_True;
}
-
-//
-
-
sal_Bool processCntTypesAndWriteResultIntoFile( char* fname, vector< string >& vecData, Reference< XMimeContentTypeFactory > cnttypeFactory )
{
FILE* fstream;
@@ -152,16 +136,13 @@ sal_Bool processCntTypesAndWriteResultIntoFile( char* fname, vector< string >& v
return sal_True;
}
-
// main
-
int SAL_CALL main( int nArgc, char* argv[] )
{
if ( nArgc != 3 )
printf( "Start with: testcnttype input-file output-file\n" );
-
// get the global service-manager
OUString rdbName = OUString( RDB_SYSPATH );
@@ -198,10 +179,8 @@ int SAL_CALL main( int nArgc, char* argv[] )
ShutdownServiceMgr( g_xFactory );
}
-
// shutdown the service manager
-
ShutdownServiceMgr( g_xFactory );
return 0;