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
|
|
|
|
2003-03-27 14:45:43 +00:00
|
|
|
#include <vcl/svapp.hxx>
|
2013-11-29 13:03:27 +00:00
|
|
|
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
|
2011-06-01 22:40:08 +01:00
|
|
|
#include <comphelper/servicehelper.hxx>
|
2013-12-05 19:17:18 -02:00
|
|
|
#include <cppuhelper/supportsservice.hxx>
|
2002-07-10 15:53:35 +00:00
|
|
|
#include "access.hrc"
|
2002-05-22 10:48:43 +00:00
|
|
|
#include <accpreview.hxx>
|
|
|
|
|
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;
|
|
|
|
|
2007-09-27 07:23:51 +00:00
|
|
|
SwAccessiblePreview::SwAccessiblePreview( SwAccessibleMap *pMp ) :
|
|
|
|
SwAccessibleDocumentBase( pMp )
|
2002-05-22 10:48:43 +00:00
|
|
|
{
|
2013-11-29 13:03:27 +00:00
|
|
|
SetName( GetResource( STR_ACCESS_PREVIEW_DOC_NAME ) );
|
2002-05-22 10:48:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SwAccessiblePreview::~SwAccessiblePreview()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
OUString SwAccessiblePreview::getImplementationName( )
|
2014-02-25 21:31:58 +01:00
|
|
|
throw( RuntimeException, std::exception )
|
2002-05-22 10:48:43 +00:00
|
|
|
{
|
2013-03-01 13:50:58 +01:00
|
|
|
return OUString( sImplementationName );
|
2002-05-22 10:48:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
sal_Bool SwAccessiblePreview::supportsService( const OUString& rServiceName )
|
2014-02-25 21:31:58 +01:00
|
|
|
throw( RuntimeException, std::exception )
|
2002-05-22 10:48:43 +00:00
|
|
|
{
|
2013-12-05 19:17:18 -02:00
|
|
|
return cppu::supportsService(this, rServiceName);
|
2002-05-22 10:48:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Sequence<OUString> SwAccessiblePreview::getSupportedServiceNames( )
|
2014-02-25 21:31:58 +01:00
|
|
|
throw( RuntimeException, std::exception )
|
2002-05-22 10:48:43 +00:00
|
|
|
{
|
2002-07-09 11:51:33 +00:00
|
|
|
Sequence<OUString> aSeq( 2 );
|
2013-12-05 19:17:18 -02:00
|
|
|
aSeq[0] = "com.sun.star.text.AccessibleTextDocumentPageView";
|
2014-12-18 13:35:13 +01:00
|
|
|
aSeq[1] = sAccessibleServiceName;
|
2002-05-22 10:48:43 +00:00
|
|
|
return aSeq;
|
|
|
|
}
|
2002-08-15 09:25:23 +00:00
|
|
|
|
|
|
|
Sequence< sal_Int8 > SAL_CALL SwAccessiblePreview::getImplementationId()
|
2014-02-25 21:31:58 +01:00
|
|
|
throw(RuntimeException, std::exception)
|
2002-08-15 09:25:23 +00:00
|
|
|
{
|
2014-03-10 16:24:57 +01:00
|
|
|
return css::uno::Sequence<sal_Int8>();
|
2002-08-15 09:25:23 +00:00
|
|
|
}
|
2010-10-14 08:30:41 +02:00
|
|
|
|
2015-04-14 12:44:47 +02:00
|
|
|
OUString SAL_CALL SwAccessiblePreview::getAccessibleDescription() throw (com::sun::star::uno::RuntimeException, std::exception)
|
2013-11-29 13:03:27 +00:00
|
|
|
{
|
|
|
|
return GetResource( STR_ACCESS_PREVIEW_DOC_NAME );
|
|
|
|
}
|
|
|
|
|
2015-04-14 12:44:47 +02:00
|
|
|
OUString SAL_CALL SwAccessiblePreview::getAccessibleName() throw (::com::sun::star::uno::RuntimeException, std::exception)
|
2013-11-29 13:03:27 +00:00
|
|
|
{
|
|
|
|
OUString sLclName = SwAccessibleDocumentBase::getAccessibleName();
|
|
|
|
sLclName += " ";
|
|
|
|
sLclName += GetResource( STR_ACCESS_PREVIEW_DOC_SUFFIX );
|
|
|
|
return sLclName;
|
|
|
|
}
|
|
|
|
|
|
|
|
void SwAccessiblePreview::_InvalidateFocus()
|
|
|
|
{
|
2014-04-25 14:00:35 +02:00
|
|
|
FireStateChangedEvent( ::com::sun::star::accessibility::AccessibleStateType::FOCUSED, true );
|
2013-11-29 13:03:27 +00:00
|
|
|
}
|
|
|
|
|
2010-10-14 08:30:41 +02:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|