1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: ihwrapnofilter.cxx,v $
13 * This file is part of OpenOffice.org.
15 * OpenOffice.org is free software: you can redistribute it and/or modify
16 * it under the terms of the GNU Lesser General Public License version 3
17 * only, as published by the Free Software Foundation.
19 * OpenOffice.org is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU Lesser General Public License version 3 for more details
23 * (a copy is included in the LICENSE file that accompanied this code).
25 * You should have received a copy of the GNU Lesser General Public License
26 * version 3 along with OpenOffice.org. If not, see
27 * <http://www.openoffice.org/license.html>
28 * for a copy of the LGPLv3 License.
30 ************************************************************************/
32 #include "precompiled_comphelper.hxx"
34 #include "comphelper/ihwrapnofilter.hxx"
35 #include <com/sun/star/document/NoSuchFilterRequest.hpp>
37 //.........................................................................
40 //.........................................................................
42 using namespace ::com::sun::star
;
44 //----------------------------------------------------------------------------------------------------
45 OIHWrapNoFilterDialog::OIHWrapNoFilterDialog( uno::Reference
< task::XInteractionHandler
> xInteraction
)
46 :m_xInter( xInteraction
)
50 OIHWrapNoFilterDialog::~OIHWrapNoFilterDialog()
54 //----------------------------------------------------------------------------------------------------
55 uno::Sequence
< ::rtl::OUString
> SAL_CALL
OIHWrapNoFilterDialog::impl_staticGetSupportedServiceNames()
57 uno::Sequence
< ::rtl::OUString
> aRet(1);
58 aRet
[0] = ::rtl::OUString::createFromAscii("com.sun.star.task.InteractionHandlerWrapper");
62 ::rtl::OUString SAL_CALL
OIHWrapNoFilterDialog::impl_staticGetImplementationName()
64 return ::rtl::OUString::createFromAscii("com.sun.star.comp.task.InteractionHandlerWrapper");
67 //----------------------------------------------------------------------------------------------------
68 // XInteractionHandler
69 //----------------------------------------------------------------------------------------------------
70 void SAL_CALL
OIHWrapNoFilterDialog::handle( const uno::Reference
< task::XInteractionRequest
>& xRequest
)
71 throw( com::sun::star::uno::RuntimeException
)
76 uno::Any aRequest
= xRequest
->getRequest();
77 document::NoSuchFilterRequest aNoSuchFilterRequest
;
78 if ( aRequest
>>= aNoSuchFilterRequest
)
81 m_xInter
->handle( xRequest
);
84 //----------------------------------------------------------------------------------------------------
86 //----------------------------------------------------------------------------------------------------
87 void SAL_CALL
OIHWrapNoFilterDialog::initialize( const uno::Sequence
< uno::Any
>& )
88 throw ( uno::Exception
,
89 uno::RuntimeException
,
90 frame::DoubleInitializationException
)
94 //----------------------------------------------------------------------------------------------------
96 //----------------------------------------------------------------------------------------------------
98 ::rtl::OUString SAL_CALL
OIHWrapNoFilterDialog::getImplementationName()
99 throw ( uno::RuntimeException
)
101 return impl_staticGetImplementationName();
104 ::sal_Bool SAL_CALL
OIHWrapNoFilterDialog::supportsService( const ::rtl::OUString
& ServiceName
)
105 throw ( uno::RuntimeException
)
107 uno::Sequence
< ::rtl::OUString
> aSeq
= impl_staticGetSupportedServiceNames();
109 for ( sal_Int32 nInd
= 0; nInd
< aSeq
.getLength(); nInd
++ )
110 if ( ServiceName
.compareTo( aSeq
[nInd
] ) == 0 )
116 uno::Sequence
< ::rtl::OUString
> SAL_CALL
OIHWrapNoFilterDialog::getSupportedServiceNames()
117 throw ( uno::RuntimeException
)
119 return impl_staticGetSupportedServiceNames();