Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
72cc18f2
Kaydet (Commit)
72cc18f2
authored
Nis 09, 2010
tarafından
Frank Schoenheit [fs]
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
slidecopy: merge CWS wth MWS-m76
üst
1b192bd3
b7b7e92d
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
1659 additions
and
20 deletions
+1659
-20
AccessibleToolPanelDeck.hxx
...ty/inc/accessibility/extended/AccessibleToolPanelDeck.hxx
+91
-0
AccessibleToolPanelDeckTabBar.hxx
.../accessibility/extended/AccessibleToolPanelDeckTabBar.hxx
+92
-0
AccessibleToolPanelDeckTabBarItem.hxx
...essibility/extended/AccessibleToolPanelDeckTabBarItem.hxx
+107
-0
accessiblestrings.hrc
accessibility/inc/accessibility/helper/accessiblestrings.hrc
+2
-1
AccessibleToolPanelDeck.cxx
accessibility/source/extended/AccessibleToolPanelDeck.cxx
+408
-0
AccessibleToolPanelDeckTabBar.cxx
...ibility/source/extended/AccessibleToolPanelDeckTabBar.cxx
+459
-0
AccessibleToolPanelDeckTabBarItem.cxx
...ity/source/extended/AccessibleToolPanelDeckTabBarItem.cxx
+456
-0
makefile.mk
accessibility/source/extended/makefile.mk
+4
-1
acc_factory.cxx
accessibility/source/helper/acc_factory.cxx
+32
-8
accessiblestrings.src
accessibility/source/helper/accessiblestrings.src
+4
-0
hldoctp.cxx
cui/source/dialogs/hldoctp.cxx
+4
-10
No files found.
accessibility/inc/accessibility/extended/AccessibleToolPanelDeck.hxx
0 → 100755
Dosyayı görüntüle @
72cc18f2
/*************************************************************************
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef ACC_ACCESSIBLETOOLPANELDECK_HXX
#define ACC_ACCESSIBLETOOLPANELDECK_HXX
/** === begin UNO includes === **/
/** === end UNO includes === **/
#include <cppuhelper/implbase1.hxx>
#include <toolkit/awt/vclxaccessiblecomponent.hxx>
#include <boost/scoped_ptr.hpp>
namespace
svt
{
class
ToolPanelDeck
;
}
//......................................................................................................................
namespace
accessibility
{
//......................................................................................................................
//==================================================================================================================
//= AccessibleToolPanelDeck
//==================================================================================================================
class
AccessibleToolPanelDeck_Impl
;
typedef
VCLXAccessibleComponent
AccessibleToolPanelDeck_Base
;
class
AccessibleToolPanelDeck
:
public
AccessibleToolPanelDeck_Base
{
public
:
AccessibleToolPanelDeck
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
accessibility
::
XAccessible
>&
i_rAccessibleParent
,
::
svt
::
ToolPanelDeck
&
i_rPanelDeck
);
using
AccessibleToolPanelDeck_Base
::
NotifyAccessibleEvent
;
protected
:
virtual
~
AccessibleToolPanelDeck
();
// XAccessibleContext
virtual
sal_Int32
SAL_CALL
getAccessibleChildCount
(
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
accessibility
::
XAccessible
>
SAL_CALL
getAccessibleChild
(
sal_Int32
i
)
throw
(
::
com
::
sun
::
star
::
lang
::
IndexOutOfBoundsException
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
accessibility
::
XAccessible
>
SAL_CALL
getAccessibleParent
(
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
sal_Int16
SAL_CALL
getAccessibleRole
(
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
// XAccessibleComponent
virtual
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
accessibility
::
XAccessible
>
SAL_CALL
getAccessibleAtPoint
(
const
::
com
::
sun
::
star
::
awt
::
Point
&
aPoint
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
void
SAL_CALL
grabFocus
(
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
// OComponentHelper
virtual
void
SAL_CALL
disposing
();
// VCLXAccessibleComponent
virtual
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
accessibility
::
XAccessible
>
GetChildAccessible
(
const
VclWindowEvent
&
i_rVclWindowEvent
);
virtual
void
FillAccessibleStateSet
(
::
utl
::
AccessibleStateSetHelper
&
i_rStateSet
);
private
:
::
boost
::
scoped_ptr
<
AccessibleToolPanelDeck_Impl
>
m_pImpl
;
};
//......................................................................................................................
}
// namespace accessibility
//......................................................................................................................
#endif // ACC_ACCESSIBLETOOLPANELDECK_HXX
accessibility/inc/accessibility/extended/AccessibleToolPanelDeckTabBar.hxx
0 → 100644
Dosyayı görüntüle @
72cc18f2
/*************************************************************************
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef ACC_ACCESSIBLETOOLPANELTABBAR_HXX
#define ACC_ACCESSIBLETOOLPANELTABBAR_HXX
/** === begin UNO includes === **/
/** === end UNO includes === **/
#include <cppuhelper/implbase1.hxx>
#include <toolkit/awt/vclxaccessiblecomponent.hxx>
#include <boost/scoped_ptr.hpp>
namespace
svt
{
class
IToolPanelDeck
;
class
PanelTabBar
;
}
//......................................................................................................................
namespace
accessibility
{
//......................................................................................................................
//==================================================================================================================
//= AccessibleToolPanelTabBar
//==================================================================================================================
class
AccessibleToolPanelTabBar_Impl
;
typedef
VCLXAccessibleComponent
AccessibleToolPanelTabBar_Base
;
class
AccessibleToolPanelTabBar
:
public
AccessibleToolPanelTabBar_Base
{
public
:
AccessibleToolPanelTabBar
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
accessibility
::
XAccessible
>&
i_rAccessibleParent
,
::
svt
::
IToolPanelDeck
&
i_rPanelDeck
,
::
svt
::
PanelTabBar
&
i_rTabBar
);
using
AccessibleToolPanelTabBar_Base
::
NotifyAccessibleEvent
;
protected
:
virtual
~
AccessibleToolPanelTabBar
();
// XAccessibleContext
virtual
sal_Int32
SAL_CALL
getAccessibleChildCount
(
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
accessibility
::
XAccessible
>
SAL_CALL
getAccessibleChild
(
sal_Int32
i
)
throw
(
::
com
::
sun
::
star
::
lang
::
IndexOutOfBoundsException
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
accessibility
::
XAccessible
>
SAL_CALL
getAccessibleParent
(
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
sal_Int16
SAL_CALL
getAccessibleRole
(
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
// XAccessibleComponent
virtual
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
accessibility
::
XAccessible
>
SAL_CALL
getAccessibleAtPoint
(
const
::
com
::
sun
::
star
::
awt
::
Point
&
aPoint
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
// OComponentHelper
virtual
void
SAL_CALL
disposing
();
// VCLXAccessibleComponent
virtual
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
accessibility
::
XAccessible
>
GetChildAccessible
(
const
VclWindowEvent
&
i_rVclWindowEvent
);
virtual
void
FillAccessibleStateSet
(
::
utl
::
AccessibleStateSetHelper
&
i_rStateSet
);
private
:
::
boost
::
scoped_ptr
<
AccessibleToolPanelTabBar_Impl
>
m_pImpl
;
};
//......................................................................................................................
}
// namespace accessibility
//......................................................................................................................
#endif // ACC_ACCESSIBLETOOLPANELTABBAR_HXX
accessibility/inc/accessibility/extended/AccessibleToolPanelDeckTabBarItem.hxx
0 → 100644
Dosyayı görüntüle @
72cc18f2
/*************************************************************************
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef ACC_ACCESSIBLETOOLPANELDECKTABBARITEM_HXX
#define ACC_ACCESSIBLETOOLPANELDECKTABBARITEM_HXX
/** === begin UNO includes === **/
/** === end UNO includes === **/
#include <comphelper/accessiblecomponenthelper.hxx>
#include <cppuhelper/implbase1.hxx>
#include <boost/scoped_ptr.hpp>
namespace
svt
{
class
IToolPanelDeck
;
class
PanelTabBar
;
}
//......................................................................................................................
namespace
accessibility
{
//......................................................................................................................
//==================================================================================================================
//= AccessibleToolPanelDeckTabBarItem
//==================================================================================================================
class
AccessibleToolPanelDeckTabBarItem_Impl
;
typedef
::
comphelper
::
OAccessibleExtendedComponentHelper
AccessibleToolPanelDeckTabBarItem_Base
;
class
AccessibleToolPanelDeckTabBarItem
:
public
AccessibleToolPanelDeckTabBarItem_Base
{
public
:
AccessibleToolPanelDeckTabBarItem
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
accessibility
::
XAccessible
>&
i_rAccessibleParent
,
::
svt
::
IToolPanelDeck
&
i_rPanelDeck
,
::
svt
::
PanelTabBar
&
i_rTabBar
,
const
size_t
i_nItemPos
);
using
AccessibleToolPanelDeckTabBarItem_Base
::
NotifyAccessibleEvent
;
using
AccessibleToolPanelDeckTabBarItem_Base
::
lateInit
;
protected
:
virtual
~
AccessibleToolPanelDeckTabBarItem
();
public
:
// XAccessibleContext
virtual
sal_Int32
SAL_CALL
getAccessibleChildCount
(
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
accessibility
::
XAccessible
>
SAL_CALL
getAccessibleChild
(
sal_Int32
i
)
throw
(
::
com
::
sun
::
star
::
lang
::
IndexOutOfBoundsException
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
accessibility
::
XAccessible
>
SAL_CALL
getAccessibleParent
(
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
sal_Int16
SAL_CALL
getAccessibleRole
(
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
::
rtl
::
OUString
SAL_CALL
getAccessibleDescription
(
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
::
rtl
::
OUString
SAL_CALL
getAccessibleName
(
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
accessibility
::
XAccessibleRelationSet
>
SAL_CALL
getAccessibleRelationSet
(
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
accessibility
::
XAccessibleStateSet
>
SAL_CALL
getAccessibleStateSet
(
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
// XAccessibleComponent
virtual
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
accessibility
::
XAccessible
>
SAL_CALL
getAccessibleAtPoint
(
const
::
com
::
sun
::
star
::
awt
::
Point
&
aPoint
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
void
SAL_CALL
grabFocus
(
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
::
sal_Int32
SAL_CALL
getForeground
(
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
::
sal_Int32
SAL_CALL
getBackground
(
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
// XAccessibleExtendedComponent
virtual
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
awt
::
XFont
>
SAL_CALL
getFont
(
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
::
rtl
::
OUString
SAL_CALL
getTitledBorderText
(
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
::
rtl
::
OUString
SAL_CALL
getToolTipText
(
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
protected
:
// OCommonAccessibleComponent
virtual
::
com
::
sun
::
star
::
awt
::
Rectangle
SAL_CALL
implGetBounds
(
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
// OComponentHelper
virtual
void
SAL_CALL
disposing
();
protected
:
::
boost
::
scoped_ptr
<
AccessibleToolPanelDeckTabBarItem_Impl
>
m_pImpl
;
};
//......................................................................................................................
}
// namespace accessibility
//......................................................................................................................
#endif // ACC_ACCESSIBLETOOLPANELDECKTABBARITEM_HXX
accessibility/inc/accessibility/helper/accessiblestrings.hrc
Dosyayı görüntüle @
72cc18f2
...
@@ -45,7 +45,8 @@
...
@@ -45,7 +45,8 @@
#define RID_STR_ACC_ACTION_DECBLOCK ( RID_TK_ACC_START + 6 )
#define RID_STR_ACC_ACTION_DECBLOCK ( RID_TK_ACC_START + 6 )
#define RID_STR_ACC_NAME_BROWSEBUTTON ( RID_TK_ACC_START + 1000 )
#define RID_STR_ACC_NAME_BROWSEBUTTON ( RID_TK_ACC_START + 100 )
#define RID_STR_ACC_DESC_PANELDECL_TABBAR ( RID_TK_ACC_START + 101 )
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
...
...
accessibility/source/extended/AccessibleToolPanelDeck.cxx
0 → 100755
Dosyayı görüntüle @
72cc18f2
/*************************************************************************
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#include "precompiled_accessibility.hxx"
#include "accessibility/extended/AccessibleToolPanelDeck.hxx"
/** === begin UNO includes === **/
#include <com/sun/star/accessibility/AccessibleRole.hpp>
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
/** === end UNO includes === **/
#include <svtools/toolpanel/toolpaneldeck.hxx>
#include <toolkit/awt/vclxwindow.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <vcl/svapp.hxx>
#include <vos/mutex.hxx>
#include <unotools/accessiblestatesethelper.hxx>
#include <tools/diagnose_ex.h>
#include <boost/noncopyable.hpp>
#include <vector>
//......................................................................................................................
namespace
accessibility
{
//......................................................................................................................
/** === begin UNO using === **/
using
::
com
::
sun
::
star
::
uno
::
Reference
;
using
::
com
::
sun
::
star
::
uno
::
XInterface
;
using
::
com
::
sun
::
star
::
uno
::
UNO_QUERY
;
using
::
com
::
sun
::
star
::
uno
::
UNO_QUERY_THROW
;
using
::
com
::
sun
::
star
::
uno
::
UNO_SET_THROW
;
using
::
com
::
sun
::
star
::
uno
::
Exception
;
using
::
com
::
sun
::
star
::
uno
::
RuntimeException
;
using
::
com
::
sun
::
star
::
uno
::
Any
;
using
::
com
::
sun
::
star
::
uno
::
makeAny
;
using
::
com
::
sun
::
star
::
uno
::
Sequence
;
using
::
com
::
sun
::
star
::
uno
::
Type
;
using
::
com
::
sun
::
star
::
accessibility
::
XAccessible
;
using
::
com
::
sun
::
star
::
accessibility
::
XAccessibleContext
;
using
::
com
::
sun
::
star
::
lang
::
DisposedException
;
using
::
com
::
sun
::
star
::
lang
::
IndexOutOfBoundsException
;
using
::
com
::
sun
::
star
::
lang
::
Locale
;
using
::
com
::
sun
::
star
::
accessibility
::
XAccessibleRelationSet
;
using
::
com
::
sun
::
star
::
accessibility
::
XAccessibleStateSet
;
using
::
com
::
sun
::
star
::
accessibility
::
IllegalAccessibleComponentStateException
;
using
::
com
::
sun
::
star
::
awt
::
XFont
;
/** === end UNO using === **/
namespace
AccessibleRole
=
::
com
::
sun
::
star
::
accessibility
::
AccessibleRole
;
namespace
AccessibleEventId
=
::
com
::
sun
::
star
::
accessibility
::
AccessibleEventId
;
namespace
AccessibleStateType
=
::
com
::
sun
::
star
::
accessibility
::
AccessibleStateType
;
typedef
::
com
::
sun
::
star
::
awt
::
Rectangle
UnoRectangle
;
typedef
::
com
::
sun
::
star
::
awt
::
Point
UnoPoint
;
//==================================================================================================================
//= AccessibleToolPanelDeck_Impl - declaration
//==================================================================================================================
class
AccessibleToolPanelDeck_Impl
:
public
::
boost
::
noncopyable
,
public
::
svt
::
IToolPanelDeckListener
{
public
:
AccessibleToolPanelDeck_Impl
(
AccessibleToolPanelDeck
&
i_rAntiImpl
,
const
Reference
<
XAccessible
>&
i_rAccessibleParent
,
::
svt
::
ToolPanelDeck
&
i_rPanelDeck
);
void
checkDisposed
();
bool
isDisposed
()
const
{
return
m_pPanelDeck
==
NULL
;
}
void
dispose
();
~
AccessibleToolPanelDeck_Impl
();
Reference
<
XAccessible
>
getOwnAccessible
()
const
;
Reference
<
XAccessible
>
getActivePanelAccessible
();
protected
:
// IToolPanelDeckListener
virtual
void
PanelInserted
(
const
::
svt
::
PToolPanel
&
i_pPanel
,
const
size_t
i_nPosition
);
virtual
void
PanelRemoved
(
const
size_t
i_nPosition
);
virtual
void
ActivePanelChanged
(
const
::
boost
::
optional
<
size_t
>&
i_rOldActive
,
const
::
boost
::
optional
<
size_t
>&
i_rNewActive
);
virtual
void
LayouterChanged
(
const
::
svt
::
PDeckLayouter
&
i_rNewLayouter
);
virtual
void
Dying
();
public
:
AccessibleToolPanelDeck
&
m_rAntiImpl
;
Reference
<
XAccessible
>
m_xAccessibleParent
;
::
svt
::
ToolPanelDeck
*
m_pPanelDeck
;
typedef
::
std
::
vector
<
Reference
<
XAccessible
>
>
AccessibleChildren
;
Reference
<
XAccessible
>
m_xActivePanelAccessible
;
};
//==================================================================================================================
//= MethodGuard
//==================================================================================================================
namespace
{
class
MethodGuard
{
public
:
MethodGuard
(
AccessibleToolPanelDeck_Impl
&
i_rImpl
)
:
m_aGuard
(
Application
::
GetSolarMutex
()
)
{
i_rImpl
.
checkDisposed
();
}
~
MethodGuard
()
{
}
void
clear
()
{
m_aGuard
.
clear
();
}
private
:
::
vos
::
OClearableGuard
m_aGuard
;
};
}
//==================================================================================================================
//= AccessibleToolPanelDeck_Impl - implementation
//==================================================================================================================
//------------------------------------------------------------------------------------------------------------------
AccessibleToolPanelDeck_Impl
::
AccessibleToolPanelDeck_Impl
(
AccessibleToolPanelDeck
&
i_rAntiImpl
,
const
Reference
<
XAccessible
>&
i_rAccessibleParent
,
::
svt
::
ToolPanelDeck
&
i_rPanelDeck
)
:
m_rAntiImpl
(
i_rAntiImpl
)
,
m_xAccessibleParent
(
i_rAccessibleParent
)
,
m_pPanelDeck
(
&
i_rPanelDeck
)
,
m_xActivePanelAccessible
()
{
m_pPanelDeck
->
AddListener
(
*
this
);
}
//------------------------------------------------------------------------------------------------------------------
AccessibleToolPanelDeck_Impl
::~
AccessibleToolPanelDeck_Impl
()
{
if
(
!
isDisposed
()
)
dispose
();
}
//------------------------------------------------------------------------------------------------------------------
void
AccessibleToolPanelDeck_Impl
::
dispose
()
{
ENSURE_OR_RETURN_VOID
(
!
isDisposed
(),
"disposed twice"
);
m_pPanelDeck
->
RemoveListener
(
*
this
);
m_pPanelDeck
=
NULL
;
m_xAccessibleParent
.
clear
();
}
//------------------------------------------------------------------------------------------------------------------
void
AccessibleToolPanelDeck_Impl
::
checkDisposed
()
{
if
(
isDisposed
()
)
throw
DisposedException
(
::
rtl
::
OUString
(),
*&
m_rAntiImpl
);
}
//------------------------------------------------------------------------------------------------------------------
Reference
<
XAccessible
>
AccessibleToolPanelDeck_Impl
::
getOwnAccessible
()
const
{
Reference
<
XAccessible
>
xOwnAccessible
(
static_cast
<
XAccessible
*
>
(
m_rAntiImpl
.
GetVCLXWindow
()
)
);
OSL_ENSURE
(
xOwnAccessible
->
getAccessibleContext
()
==
Reference
<
XAccessibleContext
>
(
&
m_rAntiImpl
),
"AccessibleToolPanelDeck_Impl::getOwnAccessible: could not retrieve proper XAccessible for /myself!"
);
return
xOwnAccessible
;
}
//------------------------------------------------------------------------------------------------------------------
Reference
<
XAccessible
>
AccessibleToolPanelDeck_Impl
::
getActivePanelAccessible
()
{
ENSURE_OR_RETURN
(
!
isDisposed
(),
"AccessibleToolPanelDeck_Impl::getActivePanelAccessible: already disposed!"
,
NULL
);
if
(
!
m_xActivePanelAccessible
.
is
()
)
{
::
boost
::
optional
<
size_t
>
aActivePanel
(
m_pPanelDeck
->
GetActivePanel
()
);
ENSURE_OR_RETURN
(
!!
aActivePanel
,
"AccessibleToolPanelDeck_Impl::getActivePanelAccessible: this should not be called without an active panel!"
,
NULL
);
::
svt
::
PToolPanel
pActivePanel
(
m_pPanelDeck
->
GetPanel
(
*
aActivePanel
)
);
ENSURE_OR_RETURN
(
pActivePanel
.
get
()
!=
NULL
,
"AccessibleToolPanelDeck_Impl::getActivePanelAccessible: no active panel!"
,
NULL
);
m_xActivePanelAccessible
=
pActivePanel
->
CreatePanelAccessible
(
getOwnAccessible
()
);
}
return
m_xActivePanelAccessible
;
}
//------------------------------------------------------------------------------------------------------------------
void
AccessibleToolPanelDeck_Impl
::
PanelInserted
(
const
::
svt
::
PToolPanel
&
i_pPanel
,
const
size_t
i_nPosition
)
{
(
void
)
i_pPanel
;
(
void
)
i_nPosition
;
}
//------------------------------------------------------------------------------------------------------------------
void
AccessibleToolPanelDeck_Impl
::
PanelRemoved
(
const
size_t
i_nPosition
)
{
(
void
)
i_nPosition
;
}
//------------------------------------------------------------------------------------------------------------------
void
AccessibleToolPanelDeck_Impl
::
ActivePanelChanged
(
const
::
boost
::
optional
<
size_t
>&
i_rOldActive
,
const
::
boost
::
optional
<
size_t
>&
i_rNewActive
)
{
if
(
!!
i_rOldActive
)
{
if
(
!
m_xActivePanelAccessible
.
is
()
)
{
// again, this might in theory happen if the XAccessible for the active panel has never before been requested.
// In this case, just say that all our children are invalid, so they all must be re-requested.
m_rAntiImpl
.
NotifyAccessibleEvent
(
AccessibleEventId
::
INVALIDATE_ALL_CHILDREN
,
Any
(),
Any
()
);
}
else
{
m_rAntiImpl
.
NotifyAccessibleEvent
(
AccessibleEventId
::
CHILD
,
makeAny
(
m_xActivePanelAccessible
),
Any
()
);
}
}
m_xActivePanelAccessible
.
clear
();
if
(
!!
i_rNewActive
)
{
m_rAntiImpl
.
NotifyAccessibleEvent
(
AccessibleEventId
::
CHILD
,
Any
(),
makeAny
(
getActivePanelAccessible
()
)
);
}
}
//------------------------------------------------------------------------------------------------------------------
void
AccessibleToolPanelDeck_Impl
::
LayouterChanged
(
const
::
svt
::
PDeckLayouter
&
i_rNewLayouter
)
{
MethodGuard
aGuard
(
*
this
);
(
void
)
i_rNewLayouter
;
m_rAntiImpl
.
NotifyAccessibleEvent
(
AccessibleEventId
::
INVALIDATE_ALL_CHILDREN
,
Any
(),
Any
()
);
}
//------------------------------------------------------------------------------------------------------------------
void
AccessibleToolPanelDeck_Impl
::
Dying
()
{
// the tool panel deck is dying, so dispose ourself
m_rAntiImpl
.
dispose
();
}
//==================================================================================================================
//= AccessibleToolPanelDeck
//==================================================================================================================
//------------------------------------------------------------------------------------------------------------------
AccessibleToolPanelDeck
::
AccessibleToolPanelDeck
(
const
Reference
<
XAccessible
>&
i_rAccessibleParent
,
::
svt
::
ToolPanelDeck
&
i_rPanelDeck
)
:
AccessibleToolPanelDeck_Base
(
i_rPanelDeck
.
GetWindowPeer
()
)
,
m_pImpl
(
new
AccessibleToolPanelDeck_Impl
(
*
this
,
i_rAccessibleParent
,
i_rPanelDeck
)
)
{
}
//------------------------------------------------------------------------------------------------------------------
AccessibleToolPanelDeck
::~
AccessibleToolPanelDeck
()
{
}
//------------------------------------------------------------------------------------------------------------------
sal_Int32
SAL_CALL
AccessibleToolPanelDeck
::
getAccessibleChildCount
(
)
throw
(
RuntimeException
)
{
MethodGuard
aGuard
(
*
m_pImpl
);
sal_Int32
nChildCount
(
m_pImpl
->
m_pPanelDeck
->
GetLayouter
()
->
GetAccessibleChildCount
()
);
::
boost
::
optional
<
size_t
>
aActivePanel
(
m_pImpl
->
m_pPanelDeck
->
GetActivePanel
()
);
if
(
!!
aActivePanel
)
return
++
nChildCount
;
return
nChildCount
;
}
//------------------------------------------------------------------------------------------------------------------
Reference
<
XAccessible
>
SAL_CALL
AccessibleToolPanelDeck
::
getAccessibleChild
(
sal_Int32
i_nIndex
)
throw
(
IndexOutOfBoundsException
,
RuntimeException
)
{
MethodGuard
aGuard
(
*
m_pImpl
);
const
sal_Int32
nChildCount
(
getAccessibleChildCount
()
);
if
(
(
i_nIndex
<
0
)
||
(
i_nIndex
>=
nChildCount
)
)
throw
IndexOutOfBoundsException
(
::
rtl
::
OUString
(),
*
this
);
// first "n" children are provided by the layouter
const
size_t
nLayouterCount
(
m_pImpl
->
m_pPanelDeck
->
GetLayouter
()
->
GetAccessibleChildCount
()
);
if
(
size_t
(
i_nIndex
)
<
nLayouterCount
)
return
m_pImpl
->
m_pPanelDeck
->
GetLayouter
()
->
GetAccessibleChild
(
size_t
(
i_nIndex
),
m_pImpl
->
getOwnAccessible
()
);
// the last child is the XAccessible of the active panel
return
m_pImpl
->
getActivePanelAccessible
();
}
//------------------------------------------------------------------------------------------------------------------
Reference
<
XAccessible
>
SAL_CALL
AccessibleToolPanelDeck
::
getAccessibleParent
(
)
throw
(
RuntimeException
)
{
MethodGuard
aGuard
(
*
m_pImpl
);
return
m_pImpl
->
m_xAccessibleParent
;
}
//------------------------------------------------------------------------------------------------------------------
sal_Int16
SAL_CALL
AccessibleToolPanelDeck
::
getAccessibleRole
(
)
throw
(
RuntimeException
)
{
MethodGuard
aGuard
(
*
m_pImpl
);
return
AccessibleRole
::
PANEL
;
}
//------------------------------------------------------------------------------------------------------------------
Reference
<
XAccessible
>
SAL_CALL
AccessibleToolPanelDeck
::
getAccessibleAtPoint
(
const
UnoPoint
&
i_rPoint
)
throw
(
RuntimeException
)
{
MethodGuard
aGuard
(
*
m_pImpl
);
const
::
Point
aRequestedPoint
(
VCLUnoHelper
::
ConvertToVCLPoint
(
i_rPoint
)
);
// check the panel window itself
const
::
Window
&
rActivePanelAnchor
(
m_pImpl
->
m_pPanelDeck
->
GetPanelWindowAnchor
()
);
const
Rectangle
aPanelAnchorArea
(
rActivePanelAnchor
.
GetPosPixel
(),
rActivePanelAnchor
.
GetOutputSizePixel
()
);
if
(
aPanelAnchorArea
.
IsInside
(
aRequestedPoint
)
)
// note that this assumes that the Window which actually implements the concrete panel covers
// the complete area of its "anchor" Window. But this is ensured by the ToolPanelDeck implementation.
return
m_pImpl
->
getActivePanelAccessible
();
// check the XAccessible instances provided by the layouter
try
{
const
::
svt
::
PDeckLayouter
pLayouter
(
m_pImpl
->
m_pPanelDeck
->
GetLayouter
()
);
ENSURE_OR_THROW
(
pLayouter
.
get
()
!=
NULL
,
"invalid layouter"
);
const
size_t
nLayouterChildren
=
pLayouter
->
GetAccessibleChildCount
();
for
(
size_t
i
=
0
;
i
<
nLayouterChildren
;
++
i
)
{
const
Reference
<
XAccessible
>
xLayoutItemAccessible
(
pLayouter
->
GetAccessibleChild
(
i
,
m_pImpl
->
getOwnAccessible
()
),
UNO_SET_THROW
);
const
Reference
<
XAccessibleComponent
>
xLayoutItemComponent
(
xLayoutItemAccessible
->
getAccessibleContext
(),
UNO_QUERY_THROW
);
const
::
Rectangle
aLayoutItemBounds
(
VCLUnoHelper
::
ConvertToVCLRect
(
xLayoutItemComponent
->
getBounds
()
)
);
if
(
aLayoutItemBounds
.
IsInside
(
aRequestedPoint
)
)
return
xLayoutItemAccessible
;
}
}
catch
(
const
Exception
&
)
{
DBG_UNHANDLED_EXCEPTION
();
}
return
NULL
;
}
//------------------------------------------------------------------------------------------------------------------
void
SAL_CALL
AccessibleToolPanelDeck
::
grabFocus
(
)
throw
(
RuntimeException
)
{
MethodGuard
aGuard
(
*
m_pImpl
);
m_pImpl
->
m_pPanelDeck
->
GrabFocus
();
}
//------------------------------------------------------------------------------------------------------------------
void
SAL_CALL
AccessibleToolPanelDeck
::
disposing
()
{
AccessibleToolPanelDeck_Base
::
disposing
();
m_pImpl
->
dispose
();
}
//------------------------------------------------------------------------------------------------------------------
Reference
<
XAccessible
>
AccessibleToolPanelDeck
::
GetChildAccessible
(
const
VclWindowEvent
&
i_rVclWindowEvent
)
{
// don't let the base class generate any A11Y events from VclWindowEvent, we completely manage those
// A11Y events ourself
(
void
)
i_rVclWindowEvent
;
return
NULL
;
}
//------------------------------------------------------------------------------------------------------------------
void
AccessibleToolPanelDeck
::
FillAccessibleStateSet
(
::
utl
::
AccessibleStateSetHelper
&
i_rStateSet
)
{
AccessibleToolPanelDeck_Base
::
FillAccessibleStateSet
(
i_rStateSet
);
if
(
m_pImpl
->
isDisposed
()
)
{
i_rStateSet
.
AddState
(
AccessibleStateType
::
DEFUNC
);
}
else
{
i_rStateSet
.
AddState
(
AccessibleStateType
::
FOCUSABLE
);
}
}
//......................................................................................................................
}
// namespace accessibility
//......................................................................................................................
accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx
0 → 100644
Dosyayı görüntüle @
72cc18f2
/*************************************************************************
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#include "precompiled_accessibility.hxx"
#include "accessibility/extended/AccessibleToolPanelDeckTabBar.hxx"
#include "accessibility/extended/AccessibleToolPanelDeckTabBarItem.hxx"
#include "accessibility/helper/accresmgr.hxx"
#include "accessibility/helper/accessiblestrings.hrc"
/** === begin UNO includes === **/
#include <com/sun/star/accessibility/AccessibleRole.hpp>
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
/** === end UNO includes === **/
#include <svtools/toolpanel/toolpaneldeck.hxx>
#include <svtools/toolpanel/paneltabbar.hxx>
#include <unotools/accessiblestatesethelper.hxx>
#include <toolkit/awt/vclxwindow.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <vcl/svapp.hxx>
#include <vcl/button.hxx>
#include <vos/mutex.hxx>
#include <tools/diagnose_ex.h>
#include <vector>
//......................................................................................................................
namespace
accessibility
{
//......................................................................................................................
/** === begin UNO using === **/
using
::
com
::
sun
::
star
::
uno
::
Reference
;
using
::
com
::
sun
::
star
::
uno
::
XInterface
;
using
::
com
::
sun
::
star
::
uno
::
UNO_QUERY
;
using
::
com
::
sun
::
star
::
uno
::
UNO_QUERY_THROW
;
using
::
com
::
sun
::
star
::
uno
::
UNO_SET_THROW
;
using
::
com
::
sun
::
star
::
uno
::
Exception
;
using
::
com
::
sun
::
star
::
uno
::
RuntimeException
;
using
::
com
::
sun
::
star
::
uno
::
Any
;
using
::
com
::
sun
::
star
::
uno
::
makeAny
;
using
::
com
::
sun
::
star
::
uno
::
Sequence
;
using
::
com
::
sun
::
star
::
uno
::
Type
;
using
::
com
::
sun
::
star
::
accessibility
::
XAccessible
;
using
::
com
::
sun
::
star
::
lang
::
DisposedException
;
using
::
com
::
sun
::
star
::
lang
::
IndexOutOfBoundsException
;
using
::
com
::
sun
::
star
::
accessibility
::
XAccessibleContext
;
/** === end UNO using === **/
namespace
AccessibleRole
=
::
com
::
sun
::
star
::
accessibility
::
AccessibleRole
;
namespace
AccessibleEventId
=
::
com
::
sun
::
star
::
accessibility
::
AccessibleEventId
;
namespace
AccessibleStateType
=
::
com
::
sun
::
star
::
accessibility
::
AccessibleStateType
;
typedef
::
com
::
sun
::
star
::
awt
::
Point
UnoPoint
;
typedef
::
com
::
sun
::
star
::
awt
::
Size
UnoSize
;
typedef
::
com
::
sun
::
star
::
awt
::
Rectangle
UnoRectangle
;
//==================================================================================================================
//= AccessibleWrapper
//==================================================================================================================
typedef
::
cppu
::
WeakImplHelper1
<
XAccessible
>
AccessibleWrapper_Base
;
class
AccessibleWrapper
:
public
AccessibleWrapper_Base
{
public
:
AccessibleWrapper
(
const
Reference
<
XAccessibleContext
>&
i_rContext
)
:
m_xContext
(
i_rContext
)
{
}
// XAccessible
virtual
Reference
<
XAccessibleContext
>
SAL_CALL
getAccessibleContext
(
)
throw
(
RuntimeException
)
{
return
m_xContext
;
}
private
:
const
Reference
<
XAccessibleContext
>
m_xContext
;
};
//==================================================================================================================
//= AccessibleToolPanelTabBar_Impl
//==================================================================================================================
class
AccessibleToolPanelTabBar_Impl
:
public
::
boost
::
noncopyable
,
public
::
svt
::
IToolPanelDeckListener
{
public
:
AccessibleToolPanelTabBar_Impl
(
AccessibleToolPanelTabBar
&
i_rAntiImpl
,
const
Reference
<
XAccessible
>&
i_rAccessibleParent
,
::
svt
::
IToolPanelDeck
&
i_rPanelDeck
,
::
svt
::
PanelTabBar
&
i_rTabBar
);
~
AccessibleToolPanelTabBar_Impl
();
void
checkDisposed
();
bool
isDisposed
()
const
{
return
m_pPanelDeck
==
NULL
;
}
void
dispose
();
::
svt
::
IToolPanelDeck
*
getPanelDeck
()
const
{
return
m_pPanelDeck
;
}
::
svt
::
PanelTabBar
*
getTabBar
()
const
{
return
m_pTabBar
;
}
const
Reference
<
XAccessible
>&
getAccessibleParent
()
const
{
return
m_xAccessibleParent
;
}
Reference
<
XAccessible
>
getAccessiblePanelItem
(
size_t
i_nPosition
);
Reference
<
XAccessible
>
getOwnAccessible
()
const
;
protected
:
// IToolPanelDeckListener
virtual
void
PanelInserted
(
const
::
svt
::
PToolPanel
&
i_pPanel
,
const
size_t
i_nPosition
);
virtual
void
PanelRemoved
(
const
size_t
i_nPosition
);
virtual
void
ActivePanelChanged
(
const
::
boost
::
optional
<
size_t
>&
i_rOldActive
,
const
::
boost
::
optional
<
size_t
>&
i_rNewActive
);
virtual
void
LayouterChanged
(
const
::
svt
::
PDeckLayouter
&
i_rNewLayouter
);
virtual
void
Dying
();
DECL_LINK
(
OnWindowEvent
,
const
VclSimpleEvent
*
);
private
:
AccessibleToolPanelTabBar
&
m_rAntiImpl
;
Reference
<
XAccessible
>
m_xAccessibleParent
;
::
svt
::
IToolPanelDeck
*
m_pPanelDeck
;
::
svt
::
PanelTabBar
*
m_pTabBar
;
::
std
::
vector
<
Reference
<
XAccessible
>
>
m_aChildren
;
};
//------------------------------------------------------------------------------------------------------------------
AccessibleToolPanelTabBar_Impl
::
AccessibleToolPanelTabBar_Impl
(
AccessibleToolPanelTabBar
&
i_rAntiImpl
,
const
Reference
<
XAccessible
>&
i_rAccessibleParent
,
::
svt
::
IToolPanelDeck
&
i_rPanelDeck
,
::
svt
::
PanelTabBar
&
i_rTabBar
)
:
m_rAntiImpl
(
i_rAntiImpl
)
,
m_xAccessibleParent
(
i_rAccessibleParent
)
,
m_pPanelDeck
(
&
i_rPanelDeck
)
,
m_pTabBar
(
&
i_rTabBar
)
,
m_aChildren
()
{
m_pPanelDeck
->
AddListener
(
*
this
);
m_aChildren
.
resize
(
m_pPanelDeck
->
GetPanelCount
()
);
const
String
sAccessibleDescription
(
TK_RES_STRING
(
RID_STR_ACC_DESC_PANELDECL_TABBAR
)
);
i_rTabBar
.
SetAccessibleName
(
sAccessibleDescription
);
i_rTabBar
.
SetAccessibleDescription
(
sAccessibleDescription
);
i_rTabBar
.
GetScrollButton
(
true
).
AddEventListener
(
LINK
(
this
,
AccessibleToolPanelTabBar_Impl
,
OnWindowEvent
)
);
i_rTabBar
.
GetScrollButton
(
false
).
AddEventListener
(
LINK
(
this
,
AccessibleToolPanelTabBar_Impl
,
OnWindowEvent
)
);
}
//------------------------------------------------------------------------------------------------------------------
void
AccessibleToolPanelTabBar_Impl
::
checkDisposed
()
{
if
(
isDisposed
()
)
throw
DisposedException
(
::
rtl
::
OUString
(),
*&
m_rAntiImpl
);
}
//------------------------------------------------------------------------------------------------------------------
AccessibleToolPanelTabBar_Impl
::~
AccessibleToolPanelTabBar_Impl
()
{
if
(
!
isDisposed
()
)
dispose
();
}
//------------------------------------------------------------------------------------------------------------------
void
AccessibleToolPanelTabBar_Impl
::
dispose
()
{
ENSURE_OR_RETURN_VOID
(
!
isDisposed
(),
"disposed twice"
);
m_pPanelDeck
->
RemoveListener
(
*
this
);
m_pPanelDeck
=
NULL
;
m_pTabBar
->
GetScrollButton
(
true
).
RemoveEventListener
(
LINK
(
this
,
AccessibleToolPanelTabBar_Impl
,
OnWindowEvent
)
);
m_pTabBar
->
GetScrollButton
(
false
).
RemoveEventListener
(
LINK
(
this
,
AccessibleToolPanelTabBar_Impl
,
OnWindowEvent
)
);
m_pTabBar
=
NULL
;
m_xAccessibleParent
.
clear
();
}
//------------------------------------------------------------------------------------------------------------------
Reference
<
XAccessible
>
AccessibleToolPanelTabBar_Impl
::
getAccessiblePanelItem
(
size_t
i_nPosition
)
{
ENSURE_OR_RETURN
(
!
isDisposed
(),
"AccessibleToolPanelTabBar_Impl::getAccessiblePanelItem: already disposed!"
,
NULL
);
ENSURE_OR_RETURN
(
i_nPosition
<
m_aChildren
.
size
(),
"AccessibleToolPanelTabBar_Impl::getAccessiblePanelItem: invalid index!"
,
NULL
);
Reference
<
XAccessible
>&
rAccessibleChild
(
m_aChildren
[
i_nPosition
]
);
if
(
!
rAccessibleChild
.
is
()
)
{
::
rtl
::
Reference
<
AccessibleToolPanelDeckTabBarItem
>
pAccesibleItemContext
(
new
AccessibleToolPanelDeckTabBarItem
(
getOwnAccessible
(),
*
m_pPanelDeck
,
*
m_pTabBar
,
i_nPosition
)
);
rAccessibleChild
.
set
(
new
AccessibleWrapper
(
pAccesibleItemContext
.
get
()
)
);
pAccesibleItemContext
->
lateInit
(
rAccessibleChild
);
}
return
rAccessibleChild
;
}
//------------------------------------------------------------------------------------------------------------------
Reference
<
XAccessible
>
AccessibleToolPanelTabBar_Impl
::
getOwnAccessible
()
const
{
Reference
<
XAccessible
>
xOwnAccessible
(
static_cast
<
XAccessible
*
>
(
m_rAntiImpl
.
GetVCLXWindow
()
)
);
OSL_ENSURE
(
xOwnAccessible
->
getAccessibleContext
()
==
Reference
<
XAccessibleContext
>
(
&
m_rAntiImpl
),
"AccessibleToolPanelTabBar_Impl::getOwnAccessible: could not retrieve proper XAccessible for /myself!"
);
return
xOwnAccessible
;
}
//------------------------------------------------------------------------------------------------------------------
void
AccessibleToolPanelTabBar_Impl
::
PanelInserted
(
const
::
svt
::
PToolPanel
&
i_pPanel
,
const
size_t
i_nPosition
)
{
ENSURE_OR_RETURN_VOID
(
i_nPosition
<=
m_aChildren
.
size
(),
"AccessibleToolPanelTabBar_Impl::PanelInserted: illegal position (or invalid cache!)"
);
(
void
)
i_pPanel
;
m_aChildren
.
insert
(
m_aChildren
.
begin
()
+
i_nPosition
,
NULL
);
m_rAntiImpl
.
NotifyAccessibleEvent
(
AccessibleEventId
::
CHILD
,
Any
(),
makeAny
(
getAccessiblePanelItem
(
i_nPosition
)
)
);
}
//------------------------------------------------------------------------------------------------------------------
void
AccessibleToolPanelTabBar_Impl
::
PanelRemoved
(
const
size_t
i_nPosition
)
{
ENSURE_OR_RETURN_VOID
(
i_nPosition
<
m_aChildren
.
size
(),
"AccessibleToolPanelTabBar_Impl::PanelInserted: illegal position (or invalid cache!)"
);
const
Reference
<
XAccessible
>
xOldChild
(
getAccessiblePanelItem
(
i_nPosition
)
);
m_aChildren
.
erase
(
m_aChildren
.
begin
()
+
i_nPosition
);
m_rAntiImpl
.
NotifyAccessibleEvent
(
AccessibleEventId
::
CHILD
,
makeAny
(
xOldChild
),
Any
()
);
}
//------------------------------------------------------------------------------------------------------------------
void
AccessibleToolPanelTabBar_Impl
::
ActivePanelChanged
(
const
::
boost
::
optional
<
size_t
>&
i_rOldActive
,
const
::
boost
::
optional
<
size_t
>&
i_rNewActive
)
{
(
void
)
i_rOldActive
;
(
void
)
i_rNewActive
;
}
//------------------------------------------------------------------------------------------------------------------
void
AccessibleToolPanelTabBar_Impl
::
LayouterChanged
(
const
::
svt
::
PDeckLayouter
&
i_rNewLayouter
)
{
(
void
)
i_rNewLayouter
;
m_rAntiImpl
.
dispose
();
}
//------------------------------------------------------------------------------------------------------------------
void
AccessibleToolPanelTabBar_Impl
::
Dying
()
{
m_rAntiImpl
.
dispose
();
}
//------------------------------------------------------------------------------------------------------------------
IMPL_LINK
(
AccessibleToolPanelTabBar_Impl
,
OnWindowEvent
,
const
VclSimpleEvent
*
,
i_pEvent
)
{
ENSURE_OR_RETURN
(
!
isDisposed
(),
"AccessibleToolPanelTabBar_Impl::OnWindowEvent: already disposed!"
,
0L
);
const
VclWindowEvent
*
pWindowEvent
(
dynamic_cast
<
const
VclWindowEvent
*
>
(
i_pEvent
)
);
if
(
!
pWindowEvent
)
return
0L
;
const
bool
bForwardButton
=
(
pWindowEvent
->
GetWindow
()
==
&
m_pTabBar
->
GetScrollButton
(
true
)
);
const
bool
bBackwardButton
=
(
pWindowEvent
->
GetWindow
()
==
&
m_pTabBar
->
GetScrollButton
(
false
)
);
ENSURE_OR_RETURN
(
bForwardButton
||
bBackwardButton
,
"AccessibleToolPanelTabBar_Impl::OnWindowEvent: where does this come from?"
,
0L
);
const
bool
bShow
=
(
i_pEvent
->
GetId
()
==
VCLEVENT_WINDOW_SHOW
);
const
bool
bHide
=
(
i_pEvent
->
GetId
()
==
VCLEVENT_WINDOW_HIDE
);
if
(
!
bShow
&&
!
bHide
)
// not interested in events other than visibility changes
return
0L
;
const
Reference
<
XAccessible
>
xButtonAccessible
(
m_pTabBar
->
GetScrollButton
(
bForwardButton
).
GetAccessible
()
);
const
Any
aOldChild
(
bHide
?
xButtonAccessible
:
Reference
<
XAccessible
>
()
);
const
Any
aNewChild
(
bShow
?
xButtonAccessible
:
Reference
<
XAccessible
>
()
);
m_rAntiImpl
.
NotifyAccessibleEvent
(
AccessibleEventId
::
CHILD
,
aOldChild
,
aNewChild
);
return
1L
;
}
//==================================================================================================================
//= MethodGuard
//==================================================================================================================
namespace
{
class
MethodGuard
{
public
:
MethodGuard
(
AccessibleToolPanelTabBar_Impl
&
i_rImpl
)
:
m_aGuard
(
Application
::
GetSolarMutex
()
)
{
i_rImpl
.
checkDisposed
();
}
~
MethodGuard
()
{
}
void
clear
()
{
m_aGuard
.
clear
();
}
private
:
::
vos
::
OClearableGuard
m_aGuard
;
};
}
//==================================================================================================================
//= AccessibleToolPanelTabBar
//==================================================================================================================
//------------------------------------------------------------------------------------------------------------------
AccessibleToolPanelTabBar
::
AccessibleToolPanelTabBar
(
const
Reference
<
XAccessible
>&
i_rAccessibleParent
,
::
svt
::
IToolPanelDeck
&
i_rPanelDeck
,
::
svt
::
PanelTabBar
&
i_rTabBar
)
:
AccessibleToolPanelTabBar_Base
(
i_rTabBar
.
GetWindowPeer
()
)
,
m_pImpl
(
new
AccessibleToolPanelTabBar_Impl
(
*
this
,
i_rAccessibleParent
,
i_rPanelDeck
,
i_rTabBar
)
)
{
}
//------------------------------------------------------------------------------------------------------------------
AccessibleToolPanelTabBar
::~
AccessibleToolPanelTabBar
()
{
}
//------------------------------------------------------------------------------------------------------------------
sal_Int32
SAL_CALL
AccessibleToolPanelTabBar
::
getAccessibleChildCount
(
)
throw
(
RuntimeException
)
{
MethodGuard
aGuard
(
*
m_pImpl
);
const
bool
bHasScrollBack
=
m_pImpl
->
getTabBar
()
->
GetScrollButton
(
false
).
IsVisible
();
const
bool
bHasScrollForward
=
m_pImpl
->
getTabBar
()
->
GetScrollButton
(
true
).
IsVisible
();
return
m_pImpl
->
getPanelDeck
()
->
GetPanelCount
()
+
(
bHasScrollBack
?
1
:
0
)
+
(
bHasScrollForward
?
1
:
0
);
}
//------------------------------------------------------------------------------------------------------------------
Reference
<
XAccessible
>
SAL_CALL
AccessibleToolPanelTabBar
::
getAccessibleChild
(
sal_Int32
i_nIndex
)
throw
(
IndexOutOfBoundsException
,
RuntimeException
)
{
MethodGuard
aGuard
(
*
m_pImpl
);
const
bool
bHasScrollBack
=
m_pImpl
->
getTabBar
()
->
GetScrollButton
(
false
).
IsVisible
();
const
bool
bHasScrollForward
=
m_pImpl
->
getTabBar
()
->
GetScrollButton
(
true
).
IsVisible
();
const
bool
bScrollBackRequested
=
(
bHasScrollBack
&&
(
i_nIndex
==
0
)
);
const
bool
bScrollForwardRequested
=
(
bHasScrollForward
&&
(
i_nIndex
==
getAccessibleChildCount
()
-
1
)
);
OSL_ENSURE
(
!
(
bScrollBackRequested
&&
bScrollForwardRequested
),
"AccessibleToolPanelTabBar::getAccessibleChild: ouch!"
);
if
(
bScrollBackRequested
||
bScrollForwardRequested
)
{
Reference
<
XAccessible
>
xScrollButtonAccessible
(
m_pImpl
->
getTabBar
()
->
GetScrollButton
(
bScrollForwardRequested
).
GetAccessible
()
);
ENSURE_OR_RETURN
(
xScrollButtonAccessible
.
is
(),
"AccessibleToolPanelTabBar::getAccessibleChild: invalid button accessible!"
,
NULL
);
#if OSL_DEBUG_LEVEL > 0
Reference
<
XAccessibleContext
>
xScrollButtonContext
(
xScrollButtonAccessible
->
getAccessibleContext
()
);
ENSURE_OR_RETURN
(
xScrollButtonContext
.
is
(),
"AccessibleToolPanelTabBar::getAccessibleChild: invalid button accessible context!"
,
xScrollButtonAccessible
);
OSL_ENSURE
(
xScrollButtonContext
->
getAccessibleParent
()
==
m_pImpl
->
getOwnAccessible
(),
"AccessibleToolPanelTabBar::getAccessibleChild: wrong parent at the button's accesible!"
);
#endif
return
xScrollButtonAccessible
;
}
return
m_pImpl
->
getAccessiblePanelItem
(
i_nIndex
-
(
bHasScrollBack
?
1
:
0
)
);
}
//------------------------------------------------------------------------------------------------------------------
Reference
<
XAccessible
>
SAL_CALL
AccessibleToolPanelTabBar
::
getAccessibleParent
(
)
throw
(
RuntimeException
)
{
MethodGuard
aGuard
(
*
m_pImpl
);
return
m_pImpl
->
getAccessibleParent
();
}
//------------------------------------------------------------------------------------------------------------------
sal_Int16
SAL_CALL
AccessibleToolPanelTabBar
::
getAccessibleRole
(
)
throw
(
RuntimeException
)
{
MethodGuard
aGuard
(
*
m_pImpl
);
return
AccessibleRole
::
PAGE_TAB_LIST
;
}
//------------------------------------------------------------------------------------------------------------------
namespace
{
bool
lcl_covers
(
const
::
Window
&
i_rWindow
,
const
::
Point
&
i_rPoint
)
{
const
Rectangle
aWindowBounds
(
i_rWindow
.
GetWindowExtentsRelative
(
i_rWindow
.
GetParent
()
)
);
return
aWindowBounds
.
IsInside
(
i_rPoint
);
}
}
//------------------------------------------------------------------------------------------------------------------
Reference
<
XAccessible
>
SAL_CALL
AccessibleToolPanelTabBar
::
getAccessibleAtPoint
(
const
UnoPoint
&
i_rPoint
)
throw
(
RuntimeException
)
{
MethodGuard
aGuard
(
*
m_pImpl
);
// check the tab items
const
UnoPoint
aOwnScreenPos
(
getLocationOnScreen
()
);
const
::
Point
aRequestedScreenPoint
(
i_rPoint
.
X
+
aOwnScreenPos
.
X
,
i_rPoint
.
Y
+
aOwnScreenPos
.
Y
);
for
(
size_t
i
=
0
;
i
<
m_pImpl
->
getPanelDeck
()
->
GetPanelCount
();
++
i
)
{
const
::
Rectangle
aItemScreenRect
(
m_pImpl
->
getTabBar
()
->
GetItemScreenRect
(
i
)
);
if
(
aItemScreenRect
.
IsInside
(
aRequestedScreenPoint
)
)
return
m_pImpl
->
getAccessiblePanelItem
(
i
);
}
// check the scroll buttons
const
::
Point
aRequestedClientPoint
(
VCLUnoHelper
::
ConvertToVCLPoint
(
i_rPoint
)
);
const
bool
bHasScrollBack
=
m_pImpl
->
getTabBar
()
->
GetScrollButton
(
false
).
IsVisible
();
if
(
bHasScrollBack
&&
lcl_covers
(
m_pImpl
->
getTabBar
()
->
GetScrollButton
(
false
),
aRequestedClientPoint
)
)
return
m_pImpl
->
getTabBar
()
->
GetScrollButton
(
false
).
GetAccessible
();
const
bool
bHasScrollForward
=
m_pImpl
->
getTabBar
()
->
GetScrollButton
(
true
).
IsVisible
();
if
(
bHasScrollForward
&&
lcl_covers
(
m_pImpl
->
getTabBar
()
->
GetScrollButton
(
true
),
aRequestedClientPoint
)
)
return
m_pImpl
->
getTabBar
()
->
GetScrollButton
(
true
).
GetAccessible
();
// no hit
return
NULL
;
}
//------------------------------------------------------------------------------------------------------------------
void
SAL_CALL
AccessibleToolPanelTabBar
::
disposing
()
{
AccessibleToolPanelTabBar_Base
::
disposing
();
m_pImpl
->
dispose
();
}
//------------------------------------------------------------------------------------------------------------------
Reference
<
XAccessible
>
AccessibleToolPanelTabBar
::
GetChildAccessible
(
const
VclWindowEvent
&
i_rVclWindowEvent
)
{
// don't let the base class generate any A11Y events from VclWindowEvent, we completely manage those
// A11Y events ourself
(
void
)
i_rVclWindowEvent
;
return
NULL
;
}
//------------------------------------------------------------------------------------------------------------------
void
AccessibleToolPanelTabBar
::
FillAccessibleStateSet
(
::
utl
::
AccessibleStateSetHelper
&
i_rStateSet
)
{
AccessibleToolPanelTabBar_Base
::
FillAccessibleStateSet
(
i_rStateSet
);
i_rStateSet
.
AddState
(
AccessibleStateType
::
FOCUSABLE
);
ENSURE_OR_RETURN_VOID
(
!
m_pImpl
->
isDisposed
(),
"AccessibleToolPanelTabBar::FillAccessibleStateSet: already disposed!"
);
if
(
m_pImpl
->
getTabBar
()
->
IsVertical
()
)
i_rStateSet
.
AddState
(
AccessibleStateType
::
VERTICAL
);
else
i_rStateSet
.
AddState
(
AccessibleStateType
::
HORIZONTAL
);
}
//......................................................................................................................
}
// namespace accessibility
//......................................................................................................................
accessibility/source/extended/AccessibleToolPanelDeckTabBarItem.cxx
0 → 100644
Dosyayı görüntüle @
72cc18f2
/*************************************************************************
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#include "precompiled_accessibility.hxx"
#include "accessibility/extended/AccessibleToolPanelDeckTabBarItem.hxx"
/** === begin UNO includes === **/
#include <com/sun/star/accessibility/AccessibleRole.hpp>
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
/** === end UNO includes === **/
#include <svtools/toolpanel/toolpaneldeck.hxx>
#include <svtools/toolpanel/paneltabbar.hxx>
#include <unotools/accessiblestatesethelper.hxx>
#include <unotools/accessiblerelationsethelper.hxx>
#include <tools/diagnose_ex.h>
#include <vcl/svapp.hxx>
#include <vos/mutex.hxx>
//......................................................................................................................
namespace
accessibility
{
//......................................................................................................................
typedef
::
com
::
sun
::
star
::
awt
::
Rectangle
UnoRectangle
;
typedef
::
com
::
sun
::
star
::
awt
::
Point
UnoPoint
;
/** === begin UNO using === **/
using
::
com
::
sun
::
star
::
uno
::
Reference
;
using
::
com
::
sun
::
star
::
uno
::
XInterface
;
using
::
com
::
sun
::
star
::
uno
::
UNO_QUERY
;
using
::
com
::
sun
::
star
::
uno
::
UNO_QUERY_THROW
;
using
::
com
::
sun
::
star
::
uno
::
UNO_SET_THROW
;
using
::
com
::
sun
::
star
::
uno
::
Exception
;
using
::
com
::
sun
::
star
::
uno
::
RuntimeException
;
using
::
com
::
sun
::
star
::
uno
::
Any
;
using
::
com
::
sun
::
star
::
uno
::
makeAny
;
using
::
com
::
sun
::
star
::
uno
::
Sequence
;
using
::
com
::
sun
::
star
::
uno
::
Type
;
using
::
com
::
sun
::
star
::
accessibility
::
XAccessible
;
using
::
com
::
sun
::
star
::
lang
::
DisposedException
;
using
::
com
::
sun
::
star
::
lang
::
IndexOutOfBoundsException
;
using
::
com
::
sun
::
star
::
accessibility
::
XAccessibleRelationSet
;
using
::
com
::
sun
::
star
::
accessibility
::
XAccessibleStateSet
;
using
::
com
::
sun
::
star
::
accessibility
::
XAccessibleComponent
;
using
::
com
::
sun
::
star
::
accessibility
::
XAccessibleExtendedComponent
;
using
::
com
::
sun
::
star
::
awt
::
XFont
;
/** === end UNO using === **/
namespace
AccessibleRole
=
::
com
::
sun
::
star
::
accessibility
::
AccessibleRole
;
namespace
AccessibleStateType
=
::
com
::
sun
::
star
::
accessibility
::
AccessibleStateType
;
namespace
AccessibleEventId
=
::
com
::
sun
::
star
::
accessibility
::
AccessibleEventId
;
//==================================================================================================================
//= AccessibleToolPanelDeckTabBarItem_Impl
//==================================================================================================================
class
AccessibleToolPanelDeckTabBarItem_Impl
:
public
::
svt
::
IToolPanelDeckListener
{
public
:
AccessibleToolPanelDeckTabBarItem_Impl
(
AccessibleToolPanelDeckTabBarItem
&
i_rAntiImpl
,
const
Reference
<
XAccessible
>&
i_rAccessibleParent
,
::
svt
::
IToolPanelDeck
&
i_rPanelDeck
,
::
svt
::
PanelTabBar
&
i_rTabBar
,
const
size_t
i_nItemPos
);
~
AccessibleToolPanelDeckTabBarItem_Impl
();
::
svt
::
PanelTabBar
*
getTabBar
()
const
{
return
m_pTabBar
;
}
// IToolPanelDeckListener
virtual
void
PanelInserted
(
const
::
svt
::
PToolPanel
&
i_pPanel
,
const
size_t
i_nPosition
);
virtual
void
PanelRemoved
(
const
size_t
i_nPosition
);
virtual
void
ActivePanelChanged
(
const
::
boost
::
optional
<
size_t
>&
i_rOldActive
,
const
::
boost
::
optional
<
size_t
>&
i_rNewActive
);
virtual
void
LayouterChanged
(
const
::
svt
::
PDeckLayouter
&
i_rNewLayouter
);
virtual
void
Dying
();
public
:
bool
isDisposed
()
const
{
return
m_pPanelDeck
==
NULL
;
}
void
checkDisposed
()
const
;
void
dispose
();
const
Reference
<
XAccessible
>&
getAccessibleParent
()
const
{
return
m_xAccessibleParent
;
}
size_t
getItemPos
()
const
{
return
m_nItemPos
;
}
Reference
<
XAccessibleComponent
>
getParentAccessibleComponent
()
const
;
::
svt
::
IToolPanelDeck
*
getPanelDeck
()
const
{
return
m_pPanelDeck
;
}
::
rtl
::
OUString
getPanelDisplayName
();
private
:
void
impl_notifyBoundRectChanges
();
void
impl_notifyStateChange
(
const
sal_Int16
i_nLostState
,
const
sal_Int16
i_nGainedState
);
private
:
AccessibleToolPanelDeckTabBarItem
&
m_rAntiImpl
;
Reference
<
XAccessible
>
m_xAccessibleParent
;
::
svt
::
IToolPanelDeck
*
m_pPanelDeck
;
::
svt
::
PanelTabBar
*
m_pTabBar
;
size_t
m_nItemPos
;
};
//==================================================================================================================
//= AccessibleToolPanelDeckTabBarItem_Impl
//==================================================================================================================
//------------------------------------------------------------------------------------------------------------------
AccessibleToolPanelDeckTabBarItem_Impl
::
AccessibleToolPanelDeckTabBarItem_Impl
(
AccessibleToolPanelDeckTabBarItem
&
i_rAntiImpl
,
const
Reference
<
XAccessible
>&
i_rAccessibleParent
,
::
svt
::
IToolPanelDeck
&
i_rPanelDeck
,
::
svt
::
PanelTabBar
&
i_rTabBar
,
const
size_t
i_nItemPos
)
:
m_rAntiImpl
(
i_rAntiImpl
)
,
m_xAccessibleParent
(
i_rAccessibleParent
)
,
m_pPanelDeck
(
&
i_rPanelDeck
)
,
m_pTabBar
(
&
i_rTabBar
)
,
m_nItemPos
(
i_nItemPos
)
{
m_pPanelDeck
->
AddListener
(
*
this
);
}
//------------------------------------------------------------------------------------------------------------------
AccessibleToolPanelDeckTabBarItem_Impl
::~
AccessibleToolPanelDeckTabBarItem_Impl
()
{
}
//------------------------------------------------------------------------------------------------------------------
void
AccessibleToolPanelDeckTabBarItem_Impl
::
checkDisposed
()
const
{
if
(
isDisposed
()
)
throw
DisposedException
(
::
rtl
::
OUString
(),
*&
m_rAntiImpl
);
}
//------------------------------------------------------------------------------------------------------------------
void
AccessibleToolPanelDeckTabBarItem_Impl
::
dispose
()
{
ENSURE_OR_RETURN_VOID
(
!
isDisposed
(),
"AccessibleToolPanelDeckTabBarItem_Impl::dispose: disposed twice!"
);
m_xAccessibleParent
.
clear
();
m_pPanelDeck
->
RemoveListener
(
*
this
);
m_pPanelDeck
=
NULL
;
m_pTabBar
=
NULL
;
}
//------------------------------------------------------------------------------------------------------------------
Reference
<
XAccessibleComponent
>
AccessibleToolPanelDeckTabBarItem_Impl
::
getParentAccessibleComponent
()
const
{
Reference
<
XAccessible
>
xAccessibleParent
(
m_rAntiImpl
.
getAccessibleParent
(),
UNO_QUERY_THROW
);
return
Reference
<
XAccessibleComponent
>
(
xAccessibleParent
->
getAccessibleContext
(),
UNO_QUERY
);
}
//------------------------------------------------------------------------------------------------------------------
::
rtl
::
OUString
AccessibleToolPanelDeckTabBarItem_Impl
::
getPanelDisplayName
()
{
const
::
svt
::
PToolPanel
pPanel
(
m_pPanelDeck
->
GetPanel
(
getItemPos
()
)
);
if
(
pPanel
.
get
()
==
NULL
)
throw
DisposedException
();
return
pPanel
->
GetDisplayName
();
}
//------------------------------------------------------------------------------------------------------------------
void
AccessibleToolPanelDeckTabBarItem_Impl
::
impl_notifyBoundRectChanges
()
{
m_rAntiImpl
.
NotifyAccessibleEvent
(
AccessibleEventId
::
BOUNDRECT_CHANGED
,
Any
(),
Any
()
);
}
//------------------------------------------------------------------------------------------------------------------
void
AccessibleToolPanelDeckTabBarItem_Impl
::
impl_notifyStateChange
(
const
sal_Int16
i_nLostState
,
const
sal_Int16
i_nGainedState
)
{
m_rAntiImpl
.
NotifyAccessibleEvent
(
AccessibleEventId
::
STATE_CHANGED
,
i_nLostState
>
-
1
?
makeAny
(
i_nLostState
)
:
Any
(),
i_nGainedState
>
-
1
?
makeAny
(
i_nGainedState
)
:
Any
()
);
}
//------------------------------------------------------------------------------------------------------------------
void
AccessibleToolPanelDeckTabBarItem_Impl
::
PanelInserted
(
const
::
svt
::
PToolPanel
&
i_pPanel
,
const
size_t
i_nPosition
)
{
(
void
)
i_pPanel
;
if
(
i_nPosition
<=
m_nItemPos
)
++
m_nItemPos
;
impl_notifyBoundRectChanges
();
}
//------------------------------------------------------------------------------------------------------------------
void
AccessibleToolPanelDeckTabBarItem_Impl
::
PanelRemoved
(
const
size_t
i_nPosition
)
{
if
(
i_nPosition
==
m_nItemPos
)
{
m_rAntiImpl
.
dispose
();
}
else
if
(
i_nPosition
<
m_nItemPos
)
{
--
m_nItemPos
;
impl_notifyBoundRectChanges
();
}
}
//------------------------------------------------------------------------------------------------------------------
void
AccessibleToolPanelDeckTabBarItem_Impl
::
ActivePanelChanged
(
const
::
boost
::
optional
<
size_t
>&
i_rOldActive
,
const
::
boost
::
optional
<
size_t
>&
i_rNewActive
)
{
if
(
m_nItemPos
==
i_rOldActive
)
{
impl_notifyStateChange
(
AccessibleStateType
::
ACTIVE
,
-
1
);
impl_notifyStateChange
(
AccessibleStateType
::
SELECTED
,
-
1
);
}
else
if
(
m_nItemPos
==
i_rNewActive
)
{
impl_notifyStateChange
(
-
1
,
AccessibleStateType
::
ACTIVE
);
impl_notifyStateChange
(
-
1
,
AccessibleStateType
::
SELECTED
);
}
}
//------------------------------------------------------------------------------------------------------------------
void
AccessibleToolPanelDeckTabBarItem_Impl
::
LayouterChanged
(
const
::
svt
::
PDeckLayouter
&
i_rNewLayouter
)
{
(
void
)
i_rNewLayouter
;
// if the tool panel deck has a new layouter, then the old layouter, and thus all items it was
// responsible for, died. So do we.
dispose
();
}
//------------------------------------------------------------------------------------------------------------------
void
AccessibleToolPanelDeckTabBarItem_Impl
::
Dying
()
{
// if the tool panel deck is dying, then its layouter dies, so should we.
dispose
();
}
//==================================================================================================================
//= ItemMethodGuard
//==================================================================================================================
class
ItemMethodGuard
{
public
:
ItemMethodGuard
(
AccessibleToolPanelDeckTabBarItem_Impl
&
i_rImpl
)
:
m_aGuard
(
Application
::
GetSolarMutex
()
)
{
i_rImpl
.
checkDisposed
();
}
~
ItemMethodGuard
()
{
}
void
clear
()
{
m_aGuard
.
clear
();
}
private
:
::
vos
::
OClearableGuard
m_aGuard
;
};
//==================================================================================================================
//= AccessibleToolPanelDeckTabBarItem
//==================================================================================================================
//------------------------------------------------------------------------------------------------------------------
AccessibleToolPanelDeckTabBarItem
::
AccessibleToolPanelDeckTabBarItem
(
const
Reference
<
XAccessible
>&
i_rAccessibleParent
,
::
svt
::
IToolPanelDeck
&
i_rPanelDeck
,
::
svt
::
PanelTabBar
&
i_rTabBar
,
const
size_t
i_nItemPos
)
:
m_pImpl
(
new
AccessibleToolPanelDeckTabBarItem_Impl
(
*
this
,
i_rAccessibleParent
,
i_rPanelDeck
,
i_rTabBar
,
i_nItemPos
)
)
{
}
//------------------------------------------------------------------------------------------------------------------
AccessibleToolPanelDeckTabBarItem
::~
AccessibleToolPanelDeckTabBarItem
()
{
}
//--------------------------------------------------------------------
sal_Int32
SAL_CALL
AccessibleToolPanelDeckTabBarItem
::
getAccessibleChildCount
(
)
throw
(
RuntimeException
)
{
return
0
;
}
//--------------------------------------------------------------------
Reference
<
XAccessible
>
SAL_CALL
AccessibleToolPanelDeckTabBarItem
::
getAccessibleChild
(
sal_Int32
i
)
throw
(
IndexOutOfBoundsException
,
RuntimeException
)
{
(
void
)
i
;
throw
IndexOutOfBoundsException
(
::
rtl
::
OUString
(),
*
this
);
}
//--------------------------------------------------------------------
Reference
<
XAccessible
>
SAL_CALL
AccessibleToolPanelDeckTabBarItem
::
getAccessibleParent
(
)
throw
(
RuntimeException
)
{
ItemMethodGuard
aGuard
(
*
m_pImpl
);
return
m_pImpl
->
getAccessibleParent
();
}
//--------------------------------------------------------------------
sal_Int16
SAL_CALL
AccessibleToolPanelDeckTabBarItem
::
getAccessibleRole
(
)
throw
(
RuntimeException
)
{
return
AccessibleRole
::
PAGE_TAB
;
}
//--------------------------------------------------------------------
::
rtl
::
OUString
SAL_CALL
AccessibleToolPanelDeckTabBarItem
::
getAccessibleDescription
(
)
throw
(
RuntimeException
)
{
ItemMethodGuard
aGuard
(
*
m_pImpl
);
return
m_pImpl
->
getPanelDisplayName
();
}
//--------------------------------------------------------------------
::
rtl
::
OUString
SAL_CALL
AccessibleToolPanelDeckTabBarItem
::
getAccessibleName
(
)
throw
(
RuntimeException
)
{
ItemMethodGuard
aGuard
(
*
m_pImpl
);
return
m_pImpl
->
getPanelDisplayName
();
}
//--------------------------------------------------------------------
Reference
<
XAccessibleRelationSet
>
SAL_CALL
AccessibleToolPanelDeckTabBarItem
::
getAccessibleRelationSet
(
)
throw
(
RuntimeException
)
{
ItemMethodGuard
aGuard
(
*
m_pImpl
);
::
utl
::
AccessibleRelationSetHelper
*
pRelationSet
=
new
utl
::
AccessibleRelationSetHelper
;
return
pRelationSet
;
}
//--------------------------------------------------------------------
Reference
<
XAccessibleStateSet
>
SAL_CALL
AccessibleToolPanelDeckTabBarItem
::
getAccessibleStateSet
(
)
throw
(
RuntimeException
)
{
ItemMethodGuard
aGuard
(
*
m_pImpl
);
::
utl
::
AccessibleStateSetHelper
*
pStateSet
(
new
::
utl
::
AccessibleStateSetHelper
);
pStateSet
->
AddState
(
AccessibleStateType
::
FOCUSABLE
);
pStateSet
->
AddState
(
AccessibleStateType
::
SELECTABLE
);
pStateSet
->
AddState
(
AccessibleStateType
::
ICONIFIED
);
if
(
m_pImpl
->
getItemPos
()
==
m_pImpl
->
getPanelDeck
()
->
GetActivePanel
()
)
{
pStateSet
->
AddState
(
AccessibleStateType
::
ACTIVE
);
pStateSet
->
AddState
(
AccessibleStateType
::
SELECTED
);
}
if
(
m_pImpl
->
getItemPos
()
==
m_pImpl
->
getTabBar
()
->
GetFocusedPanelItem
()
)
pStateSet
->
AddState
(
AccessibleStateType
::
FOCUSED
);
if
(
m_pImpl
->
getTabBar
()
->
IsEnabled
()
)
pStateSet
->
AddState
(
AccessibleStateType
::
ENABLED
);
if
(
m_pImpl
->
getTabBar
()
->
IsVisible
()
)
{
pStateSet
->
AddState
(
AccessibleStateType
::
SHOWING
);
pStateSet
->
AddState
(
AccessibleStateType
::
VISIBLE
);
}
return
pStateSet
;
}
//--------------------------------------------------------------------
Reference
<
XAccessible
>
SAL_CALL
AccessibleToolPanelDeckTabBarItem
::
getAccessibleAtPoint
(
const
UnoPoint
&
i_rLocation
)
throw
(
RuntimeException
)
{
ItemMethodGuard
aGuard
(
*
m_pImpl
);
// we do not have children ...
(
void
)
i_rLocation
;
return
NULL
;
}
//--------------------------------------------------------------------
void
SAL_CALL
AccessibleToolPanelDeckTabBarItem
::
grabFocus
(
)
throw
(
RuntimeException
)
{
ItemMethodGuard
aGuard
(
*
m_pImpl
);
m_pImpl
->
getTabBar
()
->
FocusPanelItem
(
m_pImpl
->
getItemPos
()
);
}
//--------------------------------------------------------------------
::
sal_Int32
SAL_CALL
AccessibleToolPanelDeckTabBarItem
::
getForeground
(
)
throw
(
RuntimeException
)
{
ItemMethodGuard
aGuard
(
*
m_pImpl
);
Reference
<
XAccessibleComponent
>
xParentComponent
(
m_pImpl
->
getParentAccessibleComponent
(),
UNO_SET_THROW
);
return
xParentComponent
->
getForeground
();
}
//--------------------------------------------------------------------
::
sal_Int32
SAL_CALL
AccessibleToolPanelDeckTabBarItem
::
getBackground
(
)
throw
(
RuntimeException
)
{
ItemMethodGuard
aGuard
(
*
m_pImpl
);
Reference
<
XAccessibleComponent
>
xParentComponent
(
m_pImpl
->
getParentAccessibleComponent
(),
UNO_SET_THROW
);
return
xParentComponent
->
getBackground
();
}
//--------------------------------------------------------------------
Reference
<
XFont
>
SAL_CALL
AccessibleToolPanelDeckTabBarItem
::
getFont
(
)
throw
(
RuntimeException
)
{
ItemMethodGuard
aGuard
(
*
m_pImpl
);
Reference
<
XAccessibleExtendedComponent
>
xParentComponent
(
m_pImpl
->
getParentAccessibleComponent
(),
UNO_QUERY_THROW
);
// TODO: strictly, this is not correct: The TabBar implementation of the TabLayouter might use
// a different font ...
return
xParentComponent
->
getFont
();
}
//--------------------------------------------------------------------
::
rtl
::
OUString
SAL_CALL
AccessibleToolPanelDeckTabBarItem
::
getTitledBorderText
(
)
throw
(
RuntimeException
)
{
ItemMethodGuard
aGuard
(
*
m_pImpl
);
// no support
return
::
rtl
::
OUString
();
}
//--------------------------------------------------------------------
::
rtl
::
OUString
SAL_CALL
AccessibleToolPanelDeckTabBarItem
::
getToolTipText
(
)
throw
(
RuntimeException
)
{
ItemMethodGuard
aGuard
(
*
m_pImpl
);
return
m_pImpl
->
getPanelDisplayName
();
}
//--------------------------------------------------------------------
UnoRectangle
SAL_CALL
AccessibleToolPanelDeckTabBarItem
::
implGetBounds
()
throw
(
RuntimeException
)
{
ItemMethodGuard
aGuard
(
*
m_pImpl
);
const
::
Rectangle
aItemScreenRect
(
m_pImpl
->
getTabBar
()
->
GetItemScreenRect
(
m_pImpl
->
getItemPos
()
)
);
Reference
<
XAccessibleComponent
>
xParentComponent
(
m_pImpl
->
getParentAccessibleComponent
(),
UNO_SET_THROW
);
const
UnoPoint
aParentLocation
(
xParentComponent
->
getLocationOnScreen
()
);
return
UnoRectangle
(
aItemScreenRect
.
Left
()
-
aParentLocation
.
X
,
aItemScreenRect
.
Top
()
-
aParentLocation
.
Y
,
aItemScreenRect
.
GetWidth
(),
aItemScreenRect
.
GetHeight
()
);
return
UnoRectangle
();
}
//--------------------------------------------------------------------
void
SAL_CALL
AccessibleToolPanelDeckTabBarItem
::
disposing
()
{
ItemMethodGuard
aGuard
(
*
m_pImpl
);
m_pImpl
->
dispose
();
}
//......................................................................................................................
}
// namespace accessibility
//......................................................................................................................
accessibility/source/extended/makefile.mk
100644 → 100755
Dosyayı görüntüle @
72cc18f2
...
@@ -70,7 +70,10 @@ SLOFILES=\
...
@@ -70,7 +70,10 @@ SLOFILES=\
$(SLO)$/
AccessibleGridControlHeader.obj
\
$(SLO)$/
AccessibleGridControlHeader.obj
\
$(SLO)$/
AccessibleGridControlTableCell.obj
\
$(SLO)$/
AccessibleGridControlTableCell.obj
\
$(SLO)$/
AccessibleGridControlHeaderCell.obj
\
$(SLO)$/
AccessibleGridControlHeaderCell.obj
\
$(SLO)$/
AccessibleGridControlTable.obj
$(SLO)$/
AccessibleGridControlTable.obj
\
$(SLO)$/
AccessibleToolPanelDeck.obj
\
$(SLO)$/
AccessibleToolPanelDeckTabBar.obj
\
$(SLO)$/
AccessibleToolPanelDeckTabBarItem.obj
# --- Targets -------------------------------------------------------
# --- Targets -------------------------------------------------------
...
...
accessibility/source/helper/acc_factory.cxx
100644 → 100755
Dosyayı görüntüle @
72cc18f2
...
@@ -29,18 +29,12 @@
...
@@ -29,18 +29,12 @@
#include "precompiled_accessibility.hxx"
#include "precompiled_accessibility.hxx"
#include <accessibility/helper/acc_factory.hxx>
#include <accessibility/helper/acc_factory.hxx>
#ifndef _TOOLKIT_AWT_VCLXWINDOWS_HXX
#include <toolkit/awt/vclxwindows.hxx>
#include <toolkit/awt/vclxwindows.hxx>
#endif
#include <accessibility/standard/vclxaccessiblebutton.hxx>
#include <accessibility/standard/vclxaccessiblebutton.hxx>
#include <accessibility/standard/vclxaccessiblecheckbox.hxx>
#include <accessibility/standard/vclxaccessiblecheckbox.hxx>
#ifndef ACCESSIBILITY_STANDARD_VCLXACCESSIBLEDROPDOWCOMBOBOX_HXX
#include <accessibility/standard/vclxaccessibledropdowncombobox.hxx>
#include <accessibility/standard/vclxaccessibledropdowncombobox.hxx>
#endif
#include <accessibility/standard/vclxaccessiblecombobox.hxx>
#include <accessibility/standard/vclxaccessiblecombobox.hxx>
#ifndef ACCESSIBILITY_STANDARD_VCLXACCESSIBLEDROPDOWLISTBOX_HXX
#include <accessibility/standard/vclxaccessibledropdownlistbox.hxx>
#include <accessibility/standard/vclxaccessibledropdownlistbox.hxx>
#endif
#include <accessibility/standard/vclxaccessibleedit.hxx>
#include <accessibility/standard/vclxaccessibleedit.hxx>
#include <accessibility/standard/vclxaccessiblefixedhyperlink.hxx>
#include <accessibility/standard/vclxaccessiblefixedhyperlink.hxx>
#include <accessibility/standard/vclxaccessiblefixedtext.hxx>
#include <accessibility/standard/vclxaccessiblefixedtext.hxx>
...
@@ -67,13 +61,17 @@
...
@@ -67,13 +61,17 @@
#include <accessibility/extended/AccessibleBrowseBoxHeaderCell.hxx>
#include <accessibility/extended/AccessibleBrowseBoxHeaderCell.hxx>
#include <accessibility/extended/AccessibleBrowseBoxCheckBoxCell.hxx>
#include <accessibility/extended/AccessibleBrowseBoxCheckBoxCell.hxx>
#include <accessibility/extended/accessibleeditbrowseboxcell.hxx>
#include <accessibility/extended/accessibleeditbrowseboxcell.hxx>
#include <accessibility/extended/AccessibleToolPanelDeck.hxx>
#include <accessibility/extended/AccessibleToolPanelDeckTabBar.hxx>
#include <accessibility/extended/AccessibleToolPanelDeckTabBarItem.hxx>
#include <vcl/lstbox.hxx>
#include <vcl/lstbox.hxx>
#include <vcl/combobox.hxx>
#include <vcl/combobox.hxx>
#include <accessibility/extended/AccessibleGridControl.hxx>
#include <accessibility/extended/AccessibleGridControl.hxx>
#include <svtools/accessibletable.hxx>
#include <svtools/accessibletable.hxx>
#include "vcl/popupmenuwindow.hxx"
#include <vcl/popupmenuwindow.hxx>
#include <cppuhelper/implbase1.hxx>
#include
<floatingwindowaccessible.hxx>
#include
"floatingwindowaccessible.hxx"
//........................................................................
//........................................................................
namespace
accessibility
namespace
accessibility
...
@@ -227,6 +225,18 @@ inline bool hasFloatingChild(Window *pWindow)
...
@@ -227,6 +225,18 @@ inline bool hasFloatingChild(Window *pWindow)
sal_uInt16
_nColPos
sal_uInt16
_nColPos
)
const
;
)
const
;
virtual
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
accessibility
::
XAccessibleContext
>
createAccessibleToolPanelDeck
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
accessibility
::
XAccessible
>&
i_rAccessibleParent
,
::
svt
::
ToolPanelDeck
&
i_rPanelDeck
);
virtual
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
accessibility
::
XAccessibleContext
>
createAccessibleToolPanelTabBar
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
accessibility
::
XAccessible
>&
i_rAccessibleParent
,
::
svt
::
IToolPanelDeck
&
i_rPanelDeck
,
::
svt
::
PanelTabBar
&
i_rTabBar
);
protected
:
protected
:
virtual
~
AccessibleFactory
();
virtual
~
AccessibleFactory
();
};
};
...
@@ -508,6 +518,20 @@ inline bool hasFloatingChild(Window *pWindow)
...
@@ -508,6 +518,20 @@ inline bool hasFloatingChild(Window *pWindow)
_rxFocusWindow
,
_rBrowseBox
,
_nRowPos
,
_nColPos
);
_rxFocusWindow
,
_rBrowseBox
,
_nRowPos
,
_nColPos
);
}
}
//--------------------------------------------------------------------
Reference
<
XAccessibleContext
>
AccessibleFactory
::
createAccessibleToolPanelDeck
(
const
Reference
<
XAccessible
>&
i_rAccessibleParent
,
::
svt
::
ToolPanelDeck
&
i_rPanelDeck
)
{
return
new
AccessibleToolPanelDeck
(
i_rAccessibleParent
,
i_rPanelDeck
);
}
//--------------------------------------------------------------------
Reference
<
XAccessibleContext
>
AccessibleFactory
::
createAccessibleToolPanelTabBar
(
const
Reference
<
XAccessible
>&
i_rAccessibleParent
,
::
svt
::
IToolPanelDeck
&
i_rPanelDeck
,
::
svt
::
PanelTabBar
&
i_rTabBar
)
{
return
new
AccessibleToolPanelTabBar
(
i_rAccessibleParent
,
i_rPanelDeck
,
i_rTabBar
);
}
//........................................................................
//........................................................................
}
// namespace accessibility
}
// namespace accessibility
//........................................................................
//........................................................................
...
...
accessibility/source/helper/accessiblestrings.src
Dosyayı görüntüle @
72cc18f2
...
@@ -70,3 +70,7 @@ String RID_STR_ACC_NAME_BROWSEBUTTON
...
@@ -70,3 +70,7 @@ String RID_STR_ACC_NAME_BROWSEBUTTON
Text [ en-US ] = "Browse";
Text [ en-US ] = "Browse";
};
};
String RID_STR_ACC_DESC_PANELDECL_TABBAR
{
Text [ en-US ] = "Panel Deck Tab Bar";
};
cui/source/dialogs/hldoctp.cxx
Dosyayı görüntüle @
72cc18f2
...
@@ -39,7 +39,6 @@
...
@@ -39,7 +39,6 @@
sal_Char
__READONLY_DATA
sHash
[]
=
"#"
;
sal_Char
__READONLY_DATA
sHash
[]
=
"#"
;
sal_Char
__READONLY_DATA
sFileScheme
[]
=
INET_FILE_SCHEME
;
sal_Char
__READONLY_DATA
sFileScheme
[]
=
INET_FILE_SCHEME
;
sal_Char
__READONLY_DATA
sPortalFileScheme
[]
=
"vnd.sun.star.wfs://"
;
sal_Char
__READONLY_DATA
sNewsSRVScheme
[]
=
"news://"
;
sal_Char
__READONLY_DATA
sNewsSRVScheme
[]
=
"news://"
;
// TODO news:// is nonsense
// TODO news:// is nonsense
sal_Char
__READONLY_DATA
sHTTPScheme
[]
=
INET_HTTP_SCHEME
;
sal_Char
__READONLY_DATA
sHTTPScheme
[]
=
INET_HTTP_SCHEME
;
...
@@ -170,8 +169,7 @@ void SvxHyperlinkDocTp::GetCurentItemData ( String& aStrURL, String& aStrName,
...
@@ -170,8 +169,7 @@ void SvxHyperlinkDocTp::GetCurentItemData ( String& aStrURL, String& aStrName,
// get data from standard-fields
// get data from standard-fields
aStrURL
=
GetCurrentURL
();
aStrURL
=
GetCurrentURL
();
if
(
aStrURL
.
EqualsIgnoreCaseAscii
(
sFileScheme
)
||
if
(
aStrURL
.
EqualsIgnoreCaseAscii
(
sFileScheme
)
)
aStrURL
.
EqualsIgnoreCaseAscii
(
sPortalFileScheme
)
)
aStrURL
=
aEmptyStr
;
aStrURL
=
aEmptyStr
;
GetDataFromCommonFields
(
aStrName
,
aStrIntName
,
aStrFrame
,
eMode
);
GetDataFromCommonFields
(
aStrName
,
aStrIntName
,
aStrFrame
,
eMode
);
...
@@ -212,8 +210,7 @@ IMPL_LINK ( SvxHyperlinkDocTp, ClickFileopenHdl_Impl, void *, EMPTYARG )
...
@@ -212,8 +210,7 @@ IMPL_LINK ( SvxHyperlinkDocTp, ClickFileopenHdl_Impl, void *, EMPTYARG )
com
::
sun
::
star
::
ui
::
dialogs
::
TemplateDescription
::
FILEOPEN_SIMPLE
,
0
,
com
::
sun
::
star
::
ui
::
dialogs
::
TemplateDescription
::
FILEOPEN_SIMPLE
,
0
,
GetParent
()
);
GetParent
()
);
String
aOldURL
(
GetCurrentURL
()
);
String
aOldURL
(
GetCurrentURL
()
);
if
(
aOldURL
.
EqualsIgnoreCaseAscii
(
sFileScheme
,
0
,
sizeof
(
sFileScheme
)
-
1
)
||
if
(
aOldURL
.
EqualsIgnoreCaseAscii
(
sFileScheme
,
0
,
sizeof
(
sFileScheme
)
-
1
)
)
aOldURL
.
EqualsIgnoreCaseAscii
(
sPortalFileScheme
,
0
,
sizeof
(
sFileScheme
)
-
1
)
)
{
{
aDlg
.
SetDisplayDirectory
(
aOldURL
);
aDlg
.
SetDisplayDirectory
(
aOldURL
);
}
}
...
@@ -250,15 +247,13 @@ IMPL_LINK ( SvxHyperlinkDocTp, ClickTargetHdl_Impl, void *, EMPTYARG )
...
@@ -250,15 +247,13 @@ IMPL_LINK ( SvxHyperlinkDocTp, ClickTargetHdl_Impl, void *, EMPTYARG )
if
(
GetPathType
(
maStrURL
)
==
Type_ExistsFile
||
if
(
GetPathType
(
maStrURL
)
==
Type_ExistsFile
||
maStrURL
==
aEmptyStr
||
maStrURL
==
aEmptyStr
||
maStrURL
.
EqualsIgnoreCaseAscii
(
sFileScheme
)
||
maStrURL
.
EqualsIgnoreCaseAscii
(
sFileScheme
)
||
maStrURL
.
EqualsIgnoreCaseAscii
(
sPortalFileScheme
)
||
maStrURL
.
SearchAscii
(
sHash
)
==
0
)
maStrURL
.
SearchAscii
(
sHash
)
==
0
)
{
{
mpMarkWnd
->
SetError
(
LERR_NOERROR
);
mpMarkWnd
->
SetError
(
LERR_NOERROR
);
EnterWait
();
EnterWait
();
if
(
maStrURL
.
EqualsIgnoreCaseAscii
(
sFileScheme
)
||
if
(
maStrURL
.
EqualsIgnoreCaseAscii
(
sFileScheme
)
)
maStrURL
.
EqualsIgnoreCaseAscii
(
sPortalFileScheme
)
)
mpMarkWnd
->
RefreshTree
(
aEmptyStr
);
mpMarkWnd
->
RefreshTree
(
aEmptyStr
);
else
else
mpMarkWnd
->
RefreshTree
(
maStrURL
);
mpMarkWnd
->
RefreshTree
(
maStrURL
);
...
@@ -305,8 +300,7 @@ IMPL_LINK ( SvxHyperlinkDocTp, TimeoutHdl_Impl, Timer *, EMPTYARG )
...
@@ -305,8 +300,7 @@ IMPL_LINK ( SvxHyperlinkDocTp, TimeoutHdl_Impl, Timer *, EMPTYARG )
{
{
EnterWait
();
EnterWait
();
if
(
maStrURL
.
EqualsIgnoreCaseAscii
(
sFileScheme
)
||
if
(
maStrURL
.
EqualsIgnoreCaseAscii
(
sFileScheme
)
)
maStrURL
.
EqualsIgnoreCaseAscii
(
sPortalFileScheme
)
)
mpMarkWnd
->
RefreshTree
(
aEmptyStr
);
mpMarkWnd
->
RefreshTree
(
aEmptyStr
);
else
else
mpMarkWnd
->
RefreshTree
(
maStrURL
);
mpMarkWnd
->
RefreshTree
(
maStrURL
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment