Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : :
29 : :
30 : : #include <vcl/svapp.hxx>
31 : : #include <comphelper/servicehelper.hxx>
32 : : #include "access.hrc"
33 : : #include <accpreview.hxx>
34 : :
35 : : const sal_Char sServiceName[] = "com.sun.star.text.AccessibleTextDocumentPageView";
36 : : const sal_Char sImplementationName[] = "com.sun.star.comp.Writer.SwAccessibleDocumentPageView";
37 : :
38 : : using ::com::sun::star::lang::IndexOutOfBoundsException;
39 : : using ::com::sun::star::uno::RuntimeException;
40 : : using ::com::sun::star::uno::Sequence;
41 : : using ::rtl::OUString;
42 : :
43 : : //
44 : : // SwAccessiblePreview
45 : : //
46 : :
47 : 0 : SwAccessiblePreview::SwAccessiblePreview( SwAccessibleMap *pMp ) :
48 : 0 : SwAccessibleDocumentBase( pMp )
49 : : {
50 [ # # ]: 0 : SetName( GetResource( STR_ACCESS_DOC_NAME ) );
51 : 0 : }
52 : :
53 : 0 : SwAccessiblePreview::~SwAccessiblePreview()
54 : : {
55 [ # # ]: 0 : }
56 : :
57 : 0 : OUString SwAccessiblePreview::getImplementationName( )
58 : : throw( RuntimeException )
59 : : {
60 : 0 : return OUString( RTL_CONSTASCII_USTRINGPARAM( sImplementationName ) );
61 : : }
62 : :
63 : 0 : sal_Bool SwAccessiblePreview::supportsService( const OUString& rServiceName )
64 : : throw( RuntimeException )
65 : : {
66 [ # # ][ # # ]: 0 : return rServiceName == sServiceName || rServiceName == sAccessibleServiceName;
67 : : }
68 : :
69 : 0 : Sequence<OUString> SwAccessiblePreview::getSupportedServiceNames( )
70 : : throw( RuntimeException )
71 : : {
72 : 0 : Sequence<OUString> aSeq( 2 );
73 [ # # ][ # # ]: 0 : aSeq[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( sServiceName ) );
74 [ # # ][ # # ]: 0 : aSeq[1] = OUString( RTL_CONSTASCII_USTRINGPARAM( sAccessibleServiceName ) );
75 : 0 : return aSeq;
76 : : }
77 : :
78 : : namespace
79 : : {
80 : : class theSwAccessiblePreviewImplementationId : public rtl::Static< UnoTunnelIdInit, theSwAccessiblePreviewImplementationId > {};
81 : : }
82 : :
83 : 0 : Sequence< sal_Int8 > SAL_CALL SwAccessiblePreview::getImplementationId()
84 : : throw(RuntimeException)
85 : : {
86 : 0 : return theSwAccessiblePreviewImplementationId::get().getSeq();
87 : : }
88 : :
89 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|