2010-10-14 08:30:41 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2011-03-31 10:05:04 +02:00
|
|
|
/*
|
|
|
|
* 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 .
|
|
|
|
*/
|
2002-05-22 10:48:43 +00:00
|
|
|
|
2006-09-16 19:38:24 +00:00
|
|
|
|
2003-03-27 14:45:43 +00:00
|
|
|
#include <vcl/svapp.hxx>
|
2011-06-01 22:40:08 +01:00
|
|
|
#include <comphelper/servicehelper.hxx>
|
2002-07-10 15:53:35 +00:00
|
|
|
#include "access.hrc"
|
2002-05-22 10:48:43 +00:00
|
|
|
#include <accpreview.hxx>
|
|
|
|
|
2003-04-24 15:13:01 +00:00
|
|
|
const sal_Char sServiceName[] = "com.sun.star.text.AccessibleTextDocumentPageView";
|
2002-07-09 11:51:33 +00:00
|
|
|
const sal_Char sImplementationName[] = "com.sun.star.comp.Writer.SwAccessibleDocumentPageView";
|
2002-05-22 10:48:43 +00:00
|
|
|
|
|
|
|
using ::com::sun::star::lang::IndexOutOfBoundsException;
|
|
|
|
using ::com::sun::star::uno::RuntimeException;
|
|
|
|
using ::com::sun::star::uno::Sequence;
|
|
|
|
using ::rtl::OUString;
|
|
|
|
|
|
|
|
//
|
|
|
|
// SwAccessiblePreview
|
|
|
|
//
|
|
|
|
|
2007-09-27 07:23:51 +00:00
|
|
|
SwAccessiblePreview::SwAccessiblePreview( SwAccessibleMap *pMp ) :
|
|
|
|
SwAccessibleDocumentBase( pMp )
|
2002-05-22 10:48:43 +00:00
|
|
|
{
|
2002-07-10 15:53:35 +00:00
|
|
|
SetName( GetResource( STR_ACCESS_DOC_NAME ) );
|
2002-05-22 10:48:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SwAccessiblePreview::~SwAccessiblePreview()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
OUString SwAccessiblePreview::getImplementationName( )
|
|
|
|
throw( RuntimeException )
|
|
|
|
{
|
2002-07-09 11:51:33 +00:00
|
|
|
return OUString( RTL_CONSTASCII_USTRINGPARAM( sImplementationName ) );
|
2002-05-22 10:48:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
sal_Bool SwAccessiblePreview::supportsService( const OUString& rServiceName )
|
|
|
|
throw( RuntimeException )
|
|
|
|
{
|
2012-04-06 19:49:53 +02:00
|
|
|
return rServiceName == sServiceName || rServiceName == sAccessibleServiceName;
|
2002-05-22 10:48:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Sequence<OUString> SwAccessiblePreview::getSupportedServiceNames( )
|
|
|
|
throw( RuntimeException )
|
|
|
|
{
|
2002-07-09 11:51:33 +00:00
|
|
|
Sequence<OUString> aSeq( 2 );
|
2002-05-22 10:48:43 +00:00
|
|
|
aSeq[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( sServiceName ) );
|
2002-07-09 11:51:33 +00:00
|
|
|
aSeq[1] = OUString( RTL_CONSTASCII_USTRINGPARAM( sAccessibleServiceName ) );
|
2002-05-22 10:48:43 +00:00
|
|
|
return aSeq;
|
|
|
|
}
|
2002-08-15 09:25:23 +00:00
|
|
|
|
2011-06-01 22:40:08 +01:00
|
|
|
namespace
|
|
|
|
{
|
|
|
|
class theSwAccessiblePreviewImplementationId : public rtl::Static< UnoTunnelIdInit, theSwAccessiblePreviewImplementationId > {};
|
|
|
|
}
|
|
|
|
|
2002-08-15 09:25:23 +00:00
|
|
|
Sequence< sal_Int8 > SAL_CALL SwAccessiblePreview::getImplementationId()
|
|
|
|
throw(RuntimeException)
|
|
|
|
{
|
2011-06-01 22:40:08 +01:00
|
|
|
return theSwAccessiblePreviewImplementationId::get().getSeq();
|
2002-08-15 09:25:23 +00:00
|
|
|
}
|
2010-10-14 08:30:41 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|