Kaydet (Commit) 488befae authored tarafından Andre Fischer's avatar Andre Fischer

122271: Added missing files.

üst 6055c2b5
/**************************************************************
*
* 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
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*************************************************************/
#include "precompiled_sfx2.hxx"
#include "Accessible.hxx"
using namespace css;
using namespace cssu;
namespace sfx2 { namespace sidebar {
Accessible::Accessible (
const Reference<accessibility::XAccessibleContext>& rxContext)
: AccessibleInterfaceBase(m_aMutex),
mxContext(rxContext)
{
}
Accessible::~Accessible (void)
{
}
void SAL_CALL Accessible::disposing (void)
{
Reference<XComponent> xComponent (mxContext, UNO_QUERY);
if (xComponent.is())
xComponent->dispose();
}
Reference<accessibility::XAccessibleContext> SAL_CALL Accessible::getAccessibleContext (void)
throw (cssu::RuntimeException)
{
return mxContext;
}
} } // end of namespace sfx2::sidebar
/**************************************************************
*
* 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
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*************************************************************/
#ifndef SFX_SIDEBAR_ACCESSIBLE_HXX
#define SFX_SIDEBAR_ACCESSIBLE_HXX
#include <com/sun/star/accessibility/XAccessible.hpp>
#include <com/sun/star/accessibility/XAccessibleContext.hpp>
#include <cppuhelper/compbase1.hxx>
#include <cppuhelper/basemutex.hxx>
namespace css = ::com::sun::star;
namespace cssu = ::com::sun::star::uno;
namespace
{
typedef ::cppu::WeakComponentImplHelper1 <
css::accessibility::XAccessible
> AccessibleInterfaceBase;
}
namespace sfx2 { namespace sidebar {
/** Simple implementation of the XAccessible interface.
Its getAccessibleContext() method returns a context object given
to its constructor.
*/
class Accessible
: private ::boost::noncopyable,
private ::cppu::BaseMutex,
public AccessibleInterfaceBase
{
public:
Accessible (
const cssu::Reference<css::accessibility::XAccessibleContext>& rxContext);
virtual ~Accessible (void);
virtual void SAL_CALL disposing (void);
// XAccessible
virtual cssu::Reference<css::accessibility::XAccessibleContext> SAL_CALL getAccessibleContext (void)
throw (cssu::RuntimeException);
private:
cssu::Reference<css::accessibility::XAccessibleContext> mxContext;
};
} } // end of namespace sfx2::sidebar
#endif
/**************************************************************
*
* 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
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*************************************************************/
#include "precompiled_sfx2.hxx"
#include "AccessibleTitleBar.hxx"
#include "Accessible.hxx"
#include "TitleBar.hxx"
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <unotools/accessiblestatesethelper.hxx>
using namespace css;
using namespace cssu;
namespace sfx2 { namespace sidebar {
Reference<accessibility::XAccessible> AccessibleTitleBar::Create (TitleBar& rTitleBar)
{
rTitleBar.GetComponentInterface(sal_True);
VCLXWindow* pWindow = rTitleBar.GetWindowPeer();
if (pWindow != NULL)
return new Accessible(new AccessibleTitleBar(pWindow));
else
return NULL;
}
AccessibleTitleBar::AccessibleTitleBar (VCLXWindow* pWindow)
: VCLXAccessibleComponent(pWindow)
{
}
AccessibleTitleBar::~AccessibleTitleBar (void)
{
}
void AccessibleTitleBar::FillAccessibleStateSet (utl::AccessibleStateSetHelper& rStateSet)
{
VCLXAccessibleComponent::FillAccessibleStateSet(rStateSet);
rStateSet.AddState(accessibility::AccessibleStateType::FOCUSABLE);
}
} } // end of namespace sfx2::sidebar
/**************************************************************
*
* 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
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*************************************************************/
#ifndef SFX_SIDEBAR_ACCESSIBLE_TITLE_BAR_HXX
#define SFX_SIDEBAR_ACCESSIBLE_TITLE_BAR_HXX
#include <toolkit/awt/vclxaccessiblecomponent.hxx>
#include <com/sun/star/accessibility/XAccessible.hpp>
namespace css = ::com::sun::star;
namespace cssu = ::com::sun::star::uno;
namespace sfx2 { namespace sidebar {
class TitleBar;
class AccessibleTitleBar
: public VCLXAccessibleComponent
{
public:
static cssu::Reference<css::accessibility::XAccessible> Create (TitleBar& rTitleBar);
protected:
virtual void FillAccessibleStateSet (utl::AccessibleStateSetHelper& rStateSet);
private:
AccessibleTitleBar (VCLXWindow* pWindow);
virtual ~AccessibleTitleBar (void);
};
} } // end of namespace sfx2::sidebar
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment