summaryrefslogtreecommitdiff
path: root/accessibility
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-04-28 11:41:31 +0100
committerMichael Meeks <michael.meeks@collabora.com>2015-04-28 15:08:48 +0100
commite8b97a52c96df9c8e8055407b1e40ed7cb9cfc67 (patch)
treeb322529f4a54a6427862cb20cb4cf87fb6a5d065 /accessibility
parent2b0be6c0e9d23f1b8535ba7033732ae2e3bfb5c9 (diff)
parent0cde74f788a054fa2b65107a030dd463b8d11c7a (diff)
Merge remote-tracking branch 'origin/feature/vclptr'
Resolve several thousand lines of conflicts. Conflicts: accessibility/source/extended/accessiblelistbox.cxx accessibility/source/standard/vclxaccessiblecombobox.cxx accessibility/source/standard/vclxaccessibledropdowncombobox.cxx accessibility/source/standard/vclxaccessibledropdownlistbox.cxx accessibility/source/standard/vclxaccessiblelistbox.cxx accessibility/source/standard/vclxaccessibletextfield.cxx basctl/source/basicide/basidesh.cxx cui/source/inc/chardlg.hxx cui/source/tabpages/tpbitmap.cxx dbaccess/source/ui/dlg/UserAdmin.cxx dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx extensions/source/propctrlr/propertyeditor.hxx extensions/source/scanner/sanedlg.cxx filter/source/pdf/impdialog.cxx include/sfx2/mgetempl.hxx include/sfx2/sidebar/SidebarToolBox.hxx include/sfx2/viewsh.hxx include/svtools/brwbox.hxx include/svtools/filectrl.hxx include/svtools/scrwin.hxx include/svx/dlgctrl.hxx include/svx/sidebar/Popup.hxx include/svx/sidebar/PopupContainer.hxx include/svx/sidebar/PopupControl.hxx include/svx/sidebar/SidebarDialControl.hxx include/svx/sidebar/ValueSetWithTextControl.hxx sc/source/ui/condformat/condformatdlgentry.cxx sc/source/ui/navipi/navipi.cxx sc/source/ui/sidebar/CellBorderStyleControl.hxx sd/source/ui/animations/CustomAnimationDialog.cxx sd/source/ui/inc/DrawViewShell.hxx sd/source/ui/inc/Ruler.hxx sd/source/ui/inc/SlideSorter.hxx sd/source/ui/inc/ViewTabBar.hxx sd/source/ui/inc/Window.hxx sd/source/ui/inc/morphdlg.hxx sd/source/ui/inc/sdpreslt.hxx sd/source/ui/sidebar/CurrentMasterPagesSelector.hxx sd/source/ui/sidebar/LayoutMenu.hxx sd/source/ui/sidebar/MasterPagesSelector.hxx sd/source/ui/sidebar/NavigatorWrapper.hxx sd/source/ui/sidebar/PanelBase.hxx sd/source/ui/sidebar/RecentMasterPagesSelector.cxx sd/source/ui/sidebar/RecentMasterPagesSelector.hxx sd/source/ui/slideshow/showwindow.hxx sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx sd/source/ui/slidesorter/view/SlsLayeredDevice.hxx sd/source/ui/view/ViewShellBase.cxx sd/source/ui/view/drviewsa.cxx sfx2/source/appl/fileobj.hxx sfx2/source/appl/opengrf.cxx sfx2/source/control/thumbnailviewacc.hxx sfx2/source/dialog/securitypage.cxx sfx2/source/dialog/templdlg.cxx sfx2/source/doc/docinsert.cxx sfx2/source/doc/guisaveas.cxx sfx2/source/inc/alienwarn.hxx sfx2/source/sidebar/Deck.cxx sfx2/source/sidebar/Deck.hxx sfx2/source/sidebar/DeckTitleBar.cxx sfx2/source/sidebar/DeckTitleBar.hxx sfx2/source/sidebar/MenuButton.cxx sfx2/source/sidebar/MenuButton.hxx sfx2/source/sidebar/Panel.cxx sfx2/source/sidebar/Panel.hxx sfx2/source/sidebar/PanelTitleBar.hxx sfx2/source/sidebar/SidebarDockingWindow.hxx sfx2/source/sidebar/SidebarToolBox.cxx sfx2/source/sidebar/TabBar.hxx sfx2/source/sidebar/TabItem.cxx sfx2/source/sidebar/TabItem.hxx sfx2/source/sidebar/TitleBar.hxx sfx2/source/toolbox/imgmgr.cxx starmath/inc/edit.hxx starmath/inc/smmod.hxx starmath/qa/cppunit/test_starmath.cxx starmath/source/edit.cxx starmath/source/smmod.cxx svtools/source/brwbox/brwbox1.cxx svtools/source/brwbox/datwin.hxx svtools/source/contnr/fileview.cxx svtools/source/contnr/simptabl.cxx svtools/source/control/filectrl.cxx svtools/source/control/valueimp.hxx svx/inc/GalleryControl.hxx svx/source/dialog/dlgctrl.cxx svx/source/dialog/swframeexample.cxx svx/source/fmcomp/fmgridif.cxx svx/source/gallery2/GalleryControl.cxx svx/source/sidebar/EmptyPanel.hxx svx/source/sidebar/area/AreaPropertyPanel.hxx svx/source/sidebar/area/AreaTransparencyGradientControl.hxx svx/source/sidebar/graphic/GraphicPropertyPanel.hxx svx/source/sidebar/insert/InsertPropertyPanel.cxx svx/source/sidebar/insert/InsertPropertyPanel.hxx svx/source/sidebar/line/LinePropertyPanel.hxx svx/source/sidebar/line/LineWidthControl.cxx svx/source/sidebar/line/LineWidthControl.hxx svx/source/sidebar/line/LineWidthValueSet.hxx svx/source/sidebar/paragraph/ParaPropertyPanel.hxx svx/source/sidebar/possize/SidebarDialControl.cxx svx/source/sidebar/text/TextCharacterSpacingPopup.hxx svx/source/sidebar/text/TextPropertyPanel.hxx svx/source/sidebar/tools/PopupContainer.cxx svx/source/sidebar/tools/PopupControl.cxx svx/source/sidebar/tools/ValueSetWithTextControl.cxx svx/source/svdraw/svdfmtf.hxx svx/source/svdraw/svdibrow.cxx svx/source/tbxctrls/colrctrl.cxx svx/source/tbxctrls/tbcontrl.cxx sw/source/ui/dbui/mmaddressblockpage.cxx sw/source/ui/dialog/uiregionsw.cxx sw/source/ui/index/cnttab.cxx sw/source/uibase/inc/drpcps.hxx sw/source/uibase/sidebar/PageColumnControl.hxx sw/source/uibase/sidebar/PageMarginControl.hxx sw/source/uibase/sidebar/PageOrientationControl.hxx sw/source/uibase/sidebar/PagePropertyPanel.hxx sw/source/uibase/sidebar/PageSizeControl.hxx sw/source/uibase/uiview/view2.cxx sw/source/uibase/utlui/navipi.cxx vcl/inc/svdata.hxx vcl/source/control/combobox.cxx vcl/source/control/lstbox.cxx vcl/source/window/dockwin.cxx vcl/source/window/winproc.cxx Change-Id: I056cf3026ff17d65cca0b6e6588bda4a88fa8d95
Diffstat (limited to 'accessibility')
-rw-r--r--accessibility/inc/accessibility/extended/accessibleiconchoicectrl.hxx6
-rw-r--r--accessibility/inc/accessibility/extended/accessibleiconchoicectrlentry.hxx3
-rw-r--r--accessibility/inc/accessibility/extended/accessiblelistbox.hxx2
-rw-r--r--accessibility/inc/accessibility/extended/accessibletabbarbase.hxx3
-rw-r--r--accessibility/inc/accessibility/extended/accessibletablistbox.hxx2
-rw-r--r--accessibility/inc/accessibility/extended/accessibletablistboxtable.hxx2
-rw-r--r--accessibility/inc/accessibility/extended/listboxaccessible.hxx5
-rw-r--r--accessibility/inc/accessibility/extended/textwindowaccessibility.hxx2
-rw-r--r--accessibility/inc/accessibility/standard/vclxaccessiblemenubar.hxx3
-rw-r--r--accessibility/inc/accessibility/standard/vclxaccessiblestatusbar.hxx3
-rw-r--r--accessibility/inc/accessibility/standard/vclxaccessiblestatusbaritem.hxx8
-rw-r--r--accessibility/inc/accessibility/standard/vclxaccessibletabcontrol.hxx3
-rw-r--r--accessibility/inc/accessibility/standard/vclxaccessibletabpage.hxx3
-rw-r--r--accessibility/inc/accessibility/standard/vclxaccessibletabpagewindow.hxx5
-rw-r--r--accessibility/inc/accessibility/standard/vclxaccessibletoolboxitem.hxx13
-rw-r--r--accessibility/source/extended/AccessibleToolPanelDeck.cxx6
-rw-r--r--accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx4
-rw-r--r--accessibility/source/extended/AccessibleToolPanelDeckTabBarItem.cxx4
-rw-r--r--accessibility/source/extended/accessibleiconchoicectrl.cxx5
-rw-r--r--accessibility/source/extended/accessibleiconchoicectrlentry.cxx2
-rw-r--r--accessibility/source/extended/accessiblelistbox.cxx10
-rw-r--r--accessibility/source/extended/textwindowaccessibility.cxx6
-rw-r--r--accessibility/source/helper/acc_factory.cxx4
-rw-r--r--accessibility/source/standard/vclxaccessiblebox.cxx24
-rw-r--r--accessibility/source/standard/vclxaccessiblebutton.cxx10
-rw-r--r--accessibility/source/standard/vclxaccessiblecheckbox.cxx4
-rw-r--r--accessibility/source/standard/vclxaccessiblecombobox.cxx9
-rw-r--r--accessibility/source/standard/vclxaccessibledropdowncombobox.cxx8
-rw-r--r--accessibility/source/standard/vclxaccessibledropdownlistbox.cxx9
-rw-r--r--accessibility/source/standard/vclxaccessibleedit.cxx8
-rw-r--r--accessibility/source/standard/vclxaccessiblelist.cxx22
-rw-r--r--accessibility/source/standard/vclxaccessiblelistbox.cxx12
-rw-r--r--accessibility/source/standard/vclxaccessibleradiobutton.cxx8
-rw-r--r--accessibility/source/standard/vclxaccessiblescrollbar.cxx2
-rw-r--r--accessibility/source/standard/vclxaccessiblestatusbar.cxx2
-rw-r--r--accessibility/source/standard/vclxaccessibletabcontrol.cxx2
-rw-r--r--accessibility/source/standard/vclxaccessibletabpagewindow.cxx4
-rw-r--r--accessibility/source/standard/vclxaccessibletextcomponent.cxx4
-rw-r--r--accessibility/source/standard/vclxaccessibletextfield.cxx10
-rw-r--r--accessibility/source/standard/vclxaccessibletoolbox.cxx44
40 files changed, 127 insertions, 159 deletions
diff --git a/accessibility/inc/accessibility/extended/accessibleiconchoicectrl.hxx b/accessibility/inc/accessibility/extended/accessibleiconchoicectrl.hxx
index 92c8cc3087b7..9fc58e200b6b 100644
--- a/accessibility/inc/accessibility/extended/accessibleiconchoicectrl.hxx
+++ b/accessibility/inc/accessibility/extended/accessibleiconchoicectrl.hxx
@@ -30,11 +30,8 @@
class SvtIconChoiceCtrl;
-
namespace accessibility
{
-
-
typedef ::cppu::ImplHelper2< ::com::sun::star::accessibility::XAccessible
, ::com::sun::star::accessibility::XAccessibleSelection> AccessibleIconChoiceCtrl_BASE;
@@ -55,7 +52,8 @@ namespace accessibility
virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) SAL_OVERRIDE;
virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) SAL_OVERRIDE;
- SvtIconChoiceCtrl* getCtrl();
+ VclPtr< SvtIconChoiceCtrl > getCtrl();
+
public:
/** OAccessibleBase needs a valid view
@param _rIconCtrl
diff --git a/accessibility/inc/accessibility/extended/accessibleiconchoicectrlentry.hxx b/accessibility/inc/accessibility/extended/accessibleiconchoicectrlentry.hxx
index da1a386b1643..b56ca82df4a8 100644
--- a/accessibility/inc/accessibility/extended/accessibleiconchoicectrlentry.hxx
+++ b/accessibility/inc/accessibility/extended/accessibleiconchoicectrlentry.hxx
@@ -35,6 +35,7 @@
#include <comphelper/broadcasthelper.hxx>
#include <comphelper/accessibletexthelper.hxx>
#include <tools/gen.hxx>
+#include <vcl/vclptr.hxx>
// forward
@@ -63,7 +64,7 @@ namespace accessibility
{
private:
/** The treelistbox control */
- SvtIconChoiceCtrl* m_pIconCtrl;
+ VclPtr<SvtIconChoiceCtrl> m_pIconCtrl;
sal_Int32 m_nIndex;
protected:
diff --git a/accessibility/inc/accessibility/extended/accessiblelistbox.hxx b/accessibility/inc/accessibility/extended/accessiblelistbox.hxx
index 3032a8b9b578..ac5bbe69c157 100644
--- a/accessibility/inc/accessibility/extended/accessiblelistbox.hxx
+++ b/accessibility/inc/accessibility/extended/accessiblelistbox.hxx
@@ -62,7 +62,7 @@ namespace accessibility
virtual void ProcessWindowChildEvent( const VclWindowEvent& rVclWindowEvent ) SAL_OVERRIDE;
virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) SAL_OVERRIDE;
- SvTreeListBox* getListBox() const;
+ VclPtr< SvTreeListBox > getListBox() const;
void RemoveChildEntries(SvTreeListEntry*);
diff --git a/accessibility/inc/accessibility/extended/accessibletabbarbase.hxx b/accessibility/inc/accessibility/extended/accessibletabbarbase.hxx
index 81401f177564..ed920c89399d 100644
--- a/accessibility/inc/accessibility/extended/accessibletabbarbase.hxx
+++ b/accessibility/inc/accessibility/extended/accessibletabbarbase.hxx
@@ -22,6 +22,7 @@
#include <comphelper/accessiblecomponenthelper.hxx>
#include <tools/link.hxx>
+#include <vcl/vclptr.hxx>
class TabBar;
class VCLExternalSolarLock;
@@ -57,7 +58,7 @@ private:
protected:
VCLExternalSolarLock* m_pExternalLock;
- TabBar* m_pTabBar;
+ VclPtr<TabBar> m_pTabBar;
};
diff --git a/accessibility/inc/accessibility/extended/accessibletablistbox.hxx b/accessibility/inc/accessibility/extended/accessibletablistbox.hxx
index e5e16809b038..f6e1d416bf30 100644
--- a/accessibility/inc/accessibility/extended/accessibletablistbox.hxx
+++ b/accessibility/inc/accessibility/extended/accessibletablistbox.hxx
@@ -43,7 +43,7 @@ class AccessibleTabListBox
,public ::svt::IAccessibleTabListBox
{
private:
- SvHeaderTabListBox* m_pTabListBox;
+ VclPtr<SvHeaderTabListBox> m_pTabListBox;
public:
/** ctor()
diff --git a/accessibility/inc/accessibility/extended/accessibletablistboxtable.hxx b/accessibility/inc/accessibility/extended/accessibletablistboxtable.hxx
index 272f3fcc7e22..8c47222f2ff2 100644
--- a/accessibility/inc/accessibility/extended/accessibletablistboxtable.hxx
+++ b/accessibility/inc/accessibility/extended/accessibletablistboxtable.hxx
@@ -37,7 +37,7 @@ typedef ::cppu::ImplHelper1< ::com::sun::star::accessibility::XAccessibleSelecti
class AccessibleTabListBoxTable : public AccessibleBrowseBoxTable, public AccessibleTabListBoxTableImplHelper
{
private:
- SvHeaderTabListBox* m_pTabListBox;
+ VclPtr<SvHeaderTabListBox> m_pTabListBox;
::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > m_xCurChild;
diff --git a/accessibility/inc/accessibility/extended/listboxaccessible.hxx b/accessibility/inc/accessibility/extended/listboxaccessible.hxx
index fc3bb245b2c4..4ce38c5090b6 100644
--- a/accessibility/inc/accessibility/extended/listboxaccessible.hxx
+++ b/accessibility/inc/accessibility/extended/listboxaccessible.hxx
@@ -22,6 +22,7 @@
#include <com/sun/star/uno/RuntimeException.hpp>
#include <tools/link.hxx>
+#include <vcl/vclptr.hxx>
class SvTreeListBox;
class VclSimpleEvent;
@@ -41,7 +42,7 @@ namespace accessibility
class ListBoxAccessibleBase
{
private:
- SvTreeListBox* m_pWindow;
+ VclPtr<SvTreeListBox> m_pWindow;
protected:
inline SvTreeListBox* getListBox() const
@@ -49,7 +50,7 @@ namespace accessibility
return const_cast< ListBoxAccessibleBase* >( this )->m_pWindow;
}
- inline bool isAlive() const { return NULL != m_pWindow; }
+ inline bool isAlive() const { return nullptr != m_pWindow; }
public:
ListBoxAccessibleBase( SvTreeListBox& _rWindow );
diff --git a/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx b/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx
index 1f2b65c99a8d..d64254608271 100644
--- a/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx
+++ b/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx
@@ -99,7 +99,7 @@ public:
private:
::Link m_aListener;
- vcl::Window * m_pNotifier;
+ VclPtr<vcl::Window> m_pNotifier;
};
class ParagraphInfo
diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblemenubar.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblemenubar.hxx
index 2ca6def7ba42..b6dc89864fec 100644
--- a/accessibility/inc/accessibility/standard/vclxaccessiblemenubar.hxx
+++ b/accessibility/inc/accessibility/standard/vclxaccessiblemenubar.hxx
@@ -21,6 +21,7 @@
#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLEMENUBAR_HXX
#include <accessibility/standard/accessiblemenucomponent.hxx>
+#include <vcl/vclptr.hxx>
class VclSimpleEvent;
class VclWindowEvent;
@@ -34,7 +35,7 @@ namespace vcl { class Window; }
class VCLXAccessibleMenuBar : public OAccessibleMenuComponent
{
protected:
- vcl::Window* m_pWindow;
+ VclPtr<vcl::Window> m_pWindow;
virtual bool IsFocused() SAL_OVERRIDE;
diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblestatusbar.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblestatusbar.hxx
index a07e4502c111..249f5cafa6ec 100644
--- a/accessibility/inc/accessibility/standard/vclxaccessiblestatusbar.hxx
+++ b/accessibility/inc/accessibility/standard/vclxaccessiblestatusbar.hxx
@@ -21,6 +21,7 @@
#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLESTATUSBAR_HXX
#include <toolkit/awt/vclxaccessiblecomponent.hxx>
+#include <vcl/vclptr.hxx>
#include <vector>
@@ -36,7 +37,7 @@ private:
typedef ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > > AccessibleChildren;
AccessibleChildren m_aAccessibleChildren;
- StatusBar* m_pStatusBar;
+ VclPtr<StatusBar> m_pStatusBar;
protected:
void UpdateShowing( sal_Int32 i, bool bShowing );
diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblestatusbaritem.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblestatusbaritem.hxx
index f720374f3af5..0432abc9db7a 100644
--- a/accessibility/inc/accessibility/standard/vclxaccessiblestatusbaritem.hxx
+++ b/accessibility/inc/accessibility/standard/vclxaccessiblestatusbaritem.hxx
@@ -24,7 +24,7 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <comphelper/accessibletexthelper.hxx>
#include <cppuhelper/implbase2.hxx>
-
+#include <vcl/vclptr.hxx>
class StatusBar;
class VCLExternalSolarLock;
@@ -51,14 +51,14 @@ class VCLXAccessibleStatusBarItem : public AccessibleTextHelper_BASE,
private:
VCLExternalSolarLock* m_pExternalLock;
- StatusBar* m_pStatusBar;
+ VclPtr<StatusBar> m_pStatusBar;
sal_uInt16 m_nItemId;
OUString m_sItemName;
OUString m_sItemText;
- bool m_bShowing;
+ bool m_bShowing;
protected:
- bool IsShowing();
+ bool IsShowing();
void SetShowing( bool bShowing );
void SetItemName( const OUString& sItemName );
OUString GetItemName();
diff --git a/accessibility/inc/accessibility/standard/vclxaccessibletabcontrol.hxx b/accessibility/inc/accessibility/standard/vclxaccessibletabcontrol.hxx
index b4e7b54fd197..358213855df2 100644
--- a/accessibility/inc/accessibility/standard/vclxaccessibletabcontrol.hxx
+++ b/accessibility/inc/accessibility/standard/vclxaccessibletabcontrol.hxx
@@ -22,6 +22,7 @@
#include <toolkit/awt/vclxaccessiblecomponent.hxx>
#include <com/sun/star/accessibility/XAccessibleSelection.hpp>
+#include <vcl/vclptr.hxx>
#include <vector>
@@ -42,7 +43,7 @@ private:
typedef ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > > AccessibleChildren;
AccessibleChildren m_aAccessibleChildren;
- TabControl* m_pTabControl;
+ VclPtr<TabControl> m_pTabControl;
protected:
void UpdateFocused();
diff --git a/accessibility/inc/accessibility/standard/vclxaccessibletabpage.hxx b/accessibility/inc/accessibility/standard/vclxaccessibletabpage.hxx
index 182235a0ad12..8c0aa5dcac5b 100644
--- a/accessibility/inc/accessibility/standard/vclxaccessibletabpage.hxx
+++ b/accessibility/inc/accessibility/standard/vclxaccessibletabpage.hxx
@@ -24,6 +24,7 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <comphelper/accessibletexthelper.hxx>
#include <cppuhelper/implbase2.hxx>
+#include <vcl/vclptr.hxx>
class TabControl;
@@ -51,7 +52,7 @@ class VCLXAccessibleTabPage : public AccessibleTextHelper_BASE,
private:
VCLExternalSolarLock* m_pExternalLock;
- TabControl* m_pTabControl;
+ VclPtr<TabControl> m_pTabControl;
sal_uInt16 m_nPageId;
bool m_bFocused;
bool m_bSelected;
diff --git a/accessibility/inc/accessibility/standard/vclxaccessibletabpagewindow.hxx b/accessibility/inc/accessibility/standard/vclxaccessibletabpagewindow.hxx
index 0fb8f614bd0c..9393579b6883 100644
--- a/accessibility/inc/accessibility/standard/vclxaccessibletabpagewindow.hxx
+++ b/accessibility/inc/accessibility/standard/vclxaccessibletabpagewindow.hxx
@@ -21,6 +21,7 @@
#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLETABPAGEWINDOW_HXX
#include <toolkit/awt/vclxaccessiblecomponent.hxx>
+#include <vcl/vclptr.hxx>
class TabControl;
@@ -34,8 +35,8 @@ class TabPage;
class VCLXAccessibleTabPageWindow : public VCLXAccessibleComponent
{
private:
- TabControl* m_pTabControl;
- TabPage* m_pTabPage;
+ VclPtr<TabControl> m_pTabControl;
+ VclPtr<TabPage> m_pTabPage;
sal_uInt16 m_nPageId;
protected:
diff --git a/accessibility/inc/accessibility/standard/vclxaccessibletoolboxitem.hxx b/accessibility/inc/accessibility/standard/vclxaccessibletoolboxitem.hxx
index b7d3c15fd3f8..a05f31b89d1f 100644
--- a/accessibility/inc/accessibility/standard/vclxaccessibletoolboxitem.hxx
+++ b/accessibility/inc/accessibility/standard/vclxaccessibletoolboxitem.hxx
@@ -30,6 +30,7 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <cppuhelper/implbase4.hxx>
#include <comphelper/accessibletexthelper.hxx>
+#include <vcl/vclptr.hxx>
class ToolBox;
@@ -46,13 +47,13 @@ class VCLXAccessibleToolBoxItem : public AccessibleTextHelper_BASE,
{
private:
OUString m_sOldName;
- ToolBox* m_pToolBox;
+ VclPtr<ToolBox> m_pToolBox;
VCLExternalSolarLock* m_pExternalLock;
sal_Int32 m_nIndexInParent;
sal_Int16 m_nRole;
- sal_uInt16 m_nItemId;
- bool m_bHasFocus;
- bool m_bIsChecked;
+ sal_uInt16 m_nItemId;
+ bool m_bHasFocus;
+ bool m_bIsChecked;
bool m_bIndeterminate;
::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > m_xChild;
@@ -80,9 +81,9 @@ public:
VCLXAccessibleToolBoxItem( ToolBox* _pToolBox, sal_Int32 _nPos );
void SetFocus( bool _bFocus );
- inline bool HasFocus() const { return m_bHasFocus; }
+ inline bool HasFocus() const { return m_bHasFocus; }
void SetChecked( bool _bCheck );
- inline bool IsChecked() const { return m_bIsChecked; }
+ inline bool IsChecked() const { return m_bIsChecked; }
void SetIndeterminate( bool _bIndeterminate );
inline bool IsIndeterminate() const { return m_bIndeterminate; }
inline void ReleaseToolBox() { m_pToolBox = NULL; }
diff --git a/accessibility/source/extended/AccessibleToolPanelDeck.cxx b/accessibility/source/extended/AccessibleToolPanelDeck.cxx
index dfb8ede26120..4f69764bcf29 100644
--- a/accessibility/source/extended/AccessibleToolPanelDeck.cxx
+++ b/accessibility/source/extended/AccessibleToolPanelDeck.cxx
@@ -76,7 +76,7 @@ namespace accessibility
);
void checkDisposed();
- bool isDisposed() const { return m_pPanelDeck == NULL; }
+ bool isDisposed() const { return m_pPanelDeck == nullptr; }
void dispose();
virtual ~AccessibleToolPanelDeck_Impl();
@@ -95,7 +95,7 @@ namespace accessibility
public:
AccessibleToolPanelDeck& m_rAntiImpl;
Reference< XAccessible > m_xAccessibleParent;
- ::svt::ToolPanelDeck* m_pPanelDeck;
+ VclPtr<::svt::ToolPanelDeck> m_pPanelDeck;
Reference< XAccessible > m_xActivePanelAccessible;
};
@@ -141,7 +141,7 @@ namespace accessibility
{
ENSURE_OR_RETURN_VOID( !isDisposed(), "disposed twice" );
m_pPanelDeck->RemoveListener( *this );
- m_pPanelDeck = NULL;
+ m_pPanelDeck.clear();
m_xAccessibleParent.clear();
}
diff --git a/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx b/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx
index 757c45257c6e..1700aed946b1 100644
--- a/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx
+++ b/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx
@@ -120,7 +120,7 @@ namespace accessibility
AccessibleToolPanelTabBar& m_rAntiImpl;
Reference< XAccessible > m_xAccessibleParent;
::svt::IToolPanelDeck* m_pPanelDeck;
- ::svt::PanelTabBar* m_pTabBar;
+ VclPtr<::svt::PanelTabBar> m_pTabBar;
::std::vector< Reference< XAccessible > > m_aChildren;
};
@@ -163,7 +163,7 @@ namespace accessibility
m_pTabBar->GetScrollButton( true ).RemoveEventListener( LINK( this, AccessibleToolPanelTabBar_Impl, OnWindowEvent ) );
m_pTabBar->GetScrollButton( false ).RemoveEventListener( LINK( this, AccessibleToolPanelTabBar_Impl, OnWindowEvent ) );
- m_pTabBar = NULL;
+ m_pTabBar.clear();
m_xAccessibleParent.clear();
}
diff --git a/accessibility/source/extended/AccessibleToolPanelDeckTabBarItem.cxx b/accessibility/source/extended/AccessibleToolPanelDeckTabBarItem.cxx
index 33bca93ae759..f89cb3d7f807 100644
--- a/accessibility/source/extended/AccessibleToolPanelDeckTabBarItem.cxx
+++ b/accessibility/source/extended/AccessibleToolPanelDeckTabBarItem.cxx
@@ -105,7 +105,7 @@ namespace accessibility
AccessibleToolPanelDeckTabBarItem& m_rAntiImpl;
Reference< XAccessible > m_xAccessibleParent;
::svt::IToolPanelDeck* m_pPanelDeck;
- ::svt::PanelTabBar* m_pTabBar;
+ VclPtr<::svt::PanelTabBar> m_pTabBar;
size_t m_nItemPos;
};
@@ -139,7 +139,7 @@ namespace accessibility
m_xAccessibleParent.clear();
m_pPanelDeck->RemoveListener( *this );
m_pPanelDeck = NULL;
- m_pTabBar = NULL;
+ m_pTabBar.clear();
}
Reference< XAccessibleComponent > AccessibleToolPanelDeckTabBarItem_Impl::getParentAccessibleComponent() const
diff --git a/accessibility/source/extended/accessibleiconchoicectrl.cxx b/accessibility/source/extended/accessibleiconchoicectrl.cxx
index 5ed05d9c27e1..1d512aa0631c 100644
--- a/accessibility/source/extended/accessibleiconchoicectrl.cxx
+++ b/accessibility/source/extended/accessibleiconchoicectrl.cxx
@@ -367,12 +367,11 @@ namespace accessibility
}
}
- SvtIconChoiceCtrl* AccessibleIconChoiceCtrl::getCtrl()
+ VclPtr< SvtIconChoiceCtrl > AccessibleIconChoiceCtrl::getCtrl()
{
- return static_cast<SvtIconChoiceCtrl*>(GetWindow());
+ return GetAs<SvtIconChoiceCtrl >();
}
-
}// namespace accessibility
diff --git a/accessibility/source/extended/accessibleiconchoicectrlentry.cxx b/accessibility/source/extended/accessibleiconchoicectrlentry.cxx
index 8a5e6efef8ba..811fca30f4b5 100644
--- a/accessibility/source/extended/accessibleiconchoicectrlentry.cxx
+++ b/accessibility/source/extended/accessibleiconchoicectrlentry.cxx
@@ -91,7 +91,7 @@ throw(RuntimeException, std::exception)
if ( _rSource.Source == m_xParent )
{
dispose();
- OSL_ENSURE( !m_xParent.is() && ( NULL == m_pIconCtrl ), "" );
+ OSL_ENSURE( !m_xParent.is() && ( nullptr == m_pIconCtrl ), "" );
}
}
diff --git a/accessibility/source/extended/accessiblelistbox.cxx b/accessibility/source/extended/accessiblelistbox.cxx
index 2c33734abd30..22cc0202e7bb 100644
--- a/accessibility/source/extended/accessiblelistbox.cxx
+++ b/accessibility/source/extended/accessiblelistbox.cxx
@@ -67,11 +67,6 @@ namespace accessibility
IMPLEMENT_FORWARD_XINTERFACE2(AccessibleListBox, VCLXAccessibleComponent, AccessibleListBox_BASE)
IMPLEMENT_FORWARD_XTYPEPROVIDER2(AccessibleListBox, VCLXAccessibleComponent, AccessibleListBox_BASE)
- SvTreeListBox* AccessibleListBox::getListBox() const
- {
- return static_cast< SvTreeListBox* >( GetWindow() );
- }
-
void AccessibleListBox::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
{
if ( isAlive() )
@@ -592,7 +587,10 @@ namespace accessibility
}
}
-
+ VclPtr< SvTreeListBox > AccessibleListBox::getListBox() const
+ {
+ return GetAs< SvTreeListBox >();
+ }
}// namespace accessibility
diff --git a/accessibility/source/extended/textwindowaccessibility.cxx b/accessibility/source/extended/textwindowaccessibility.cxx
index 2dd16ace0380..fbe72a0e9d07 100644
--- a/accessibility/source/extended/textwindowaccessibility.cxx
+++ b/accessibility/source/extended/textwindowaccessibility.cxx
@@ -47,17 +47,17 @@ void SfxListenerGuard::endListening()
void WindowListenerGuard::startListening(vcl::Window & rNotifier)
{
- OSL_ENSURE(m_pNotifier == 0, "called more than once");
+ OSL_ENSURE(m_pNotifier == nullptr, "called more than once");
m_pNotifier = &rNotifier;
m_pNotifier->AddEventListener(m_aListener);
}
void WindowListenerGuard::endListening()
{
- if (m_pNotifier != 0)
+ if (m_pNotifier)
{
m_pNotifier->RemoveEventListener(m_aListener);
- m_pNotifier = 0;
+ m_pNotifier = nullptr;
}
}
diff --git a/accessibility/source/helper/acc_factory.cxx b/accessibility/source/helper/acc_factory.cxx
index 34e29e5f27a7..ef67482170a3 100644
--- a/accessibility/source/helper/acc_factory.cxx
+++ b/accessibility/source/helper/acc_factory.cxx
@@ -257,7 +257,7 @@ Reference< XAccessibleContext > AccessibleFactory::createAccessibleContext( VCLX
Reference< XAccessibleContext > AccessibleFactory::createAccessibleContext( VCLXListBox* _pXWindow )
{
bool bIsDropDownBox = false;
- ListBox* pBox = static_cast< ListBox* >( _pXWindow->GetWindow() );
+ VclPtr< ListBox > pBox = _pXWindow->GetAs< ListBox >();
if ( pBox )
bIsDropDownBox = ( ( pBox->GetStyle() & WB_DROPDOWN ) == WB_DROPDOWN );
@@ -290,7 +290,7 @@ Reference< XAccessibleContext > AccessibleFactory::createAccessibleContext( VCLX
Reference< XAccessibleContext > AccessibleFactory::createAccessibleContext( VCLXComboBox* _pXWindow )
{
bool bIsDropDownBox = false;
- ComboBox* pBox = static_cast< ComboBox* >( _pXWindow->GetWindow() );
+ VclPtr< ComboBox > pBox = _pXWindow->GetAs< ComboBox >();
if ( pBox )
bIsDropDownBox = ( ( pBox->GetStyle() & WB_DROPDOWN ) == WB_DROPDOWN );
diff --git a/accessibility/source/standard/vclxaccessiblebox.cxx b/accessibility/source/standard/vclxaccessiblebox.cxx
index 95d8258ce501..1e801a86e8fb 100644
--- a/accessibility/source/standard/vclxaccessiblebox.cxx
+++ b/accessibility/source/standard/vclxaccessiblebox.cxx
@@ -75,8 +75,8 @@ void VCLXAccessibleBox::ProcessWindowChildEvent( const VclWindowEvent& rVclWindo
// be removed in a short time.
if (m_aBoxType==COMBOBOX)
{
- ComboBox* pComboBox = static_cast<ComboBox*>(GetWindow());
- if ( ( pComboBox != NULL ) && ( pChildWindow != NULL ) )
+ VclPtr< ComboBox > pComboBox = GetAs< ComboBox >();
+ if ( ( pComboBox != nullptr ) && ( pChildWindow != NULL ) )
if (pChildWindow == pComboBox->GetSubEdit())
{
if (rVclWindowEvent.GetId() == VCLEVENT_WINDOW_SHOW)
@@ -327,8 +327,8 @@ Reference<XAccessible> SAL_CALL VCLXAccessibleBox::getAccessibleChild (sal_Int32
{
if (m_aBoxType==COMBOBOX)
{
- ComboBox* pComboBox = static_cast<ComboBox*>(GetWindow());
- if (pComboBox!=NULL && pComboBox->GetSubEdit()!=NULL)
+ VclPtr< ComboBox > pComboBox = GetAs< ComboBox >();
+ if (pComboBox!=nullptr && pComboBox->GetSubEdit()!=NULL)
//Set the edit's acc name the same as parent
{
pComboBox->GetSubEdit()->SetAccessibleName(getAccessibleName());
@@ -398,8 +398,8 @@ sal_Bool SAL_CALL VCLXAccessibleBox::doAccessibleAction (sal_Int32 nIndex)
if (m_aBoxType == COMBOBOX)
{
- ComboBox* pComboBox = static_cast< ComboBox* >( GetWindow() );
- if (pComboBox != NULL)
+ VclPtr< ComboBox > pComboBox = GetAs< ComboBox >();
+ if (pComboBox != nullptr)
{
pComboBox->ToggleDropDown();
bNotify = true;
@@ -407,8 +407,8 @@ sal_Bool SAL_CALL VCLXAccessibleBox::doAccessibleAction (sal_Int32 nIndex)
}
else if (m_aBoxType == LISTBOX)
{
- ListBox* pListBox = static_cast< ListBox* >( GetWindow() );
- if (pListBox != NULL)
+ VclPtr< ListBox > pListBox = GetAs< ListBox >();
+ if (pListBox != nullptr)
{
pListBox->ToggleDropDown();
bNotify = true;
@@ -532,8 +532,8 @@ void VCLXAccessibleBox::FillAccessibleStateSet( utl::AccessibleStateSetHelper& r
{
OUString sText;
sal_Int32 nEntryCount = 0;
- ComboBox* pComboBox = static_cast<ComboBox*>(GetWindow());
- if (pComboBox != NULL)
+ VclPtr< ComboBox > pComboBox = GetAs< ComboBox >();
+ if (pComboBox != nullptr)
{
Edit* pSubEdit = pComboBox->GetSubEdit();
if ( pSubEdit)
@@ -546,8 +546,8 @@ void VCLXAccessibleBox::FillAccessibleStateSet( utl::AccessibleStateSetHelper& r
else if (m_aBoxType == LISTBOX && m_bIsDropDownBox)
{
sal_Int32 nSelectedEntryCount = 0;
- ListBox* pListBox = static_cast< ListBox* >( GetWindow() );
- if (pListBox != NULL && pListBox->GetEntryCount() > 0)
+ VclPtr< ListBox > pListBox = GetAs< ListBox >();
+ if (pListBox != nullptr && pListBox->GetEntryCount() > 0)
{
nSelectedEntryCount = pListBox->GetSelectEntryCount();
if ( nSelectedEntryCount == 0)
diff --git a/accessibility/source/standard/vclxaccessiblebutton.cxx b/accessibility/source/standard/vclxaccessiblebutton.cxx
index 622565a8d6f3..ae3698d6b298 100644
--- a/accessibility/source/standard/vclxaccessiblebutton.cxx
+++ b/accessibility/source/standard/vclxaccessiblebutton.cxx
@@ -65,7 +65,7 @@ void VCLXAccessibleButton::ProcessWindowEvent( const VclWindowEvent& rVclWindowE
Any aOldValue;
Any aNewValue;
- PushButton* pButton = static_cast<PushButton*>( GetWindow() );
+ VclPtr< PushButton > pButton = GetAs< PushButton >();
if ( pButton && pButton->GetState() == TRISTATE_TRUE )
aNewValue <<= AccessibleStateType::CHECKED;
else
@@ -85,7 +85,7 @@ void VCLXAccessibleButton::FillAccessibleStateSet( utl::AccessibleStateSetHelper
{
VCLXAccessibleTextComponent::FillAccessibleStateSet( rStateSet );
- PushButton* pButton = static_cast<PushButton*>( GetWindow() );
+ VclPtr< PushButton > pButton = GetAs< PushButton >();
if ( pButton )
{
rStateSet.AddState( AccessibleStateType::FOCUSABLE );
@@ -196,7 +196,7 @@ sal_Bool VCLXAccessibleButton::doAccessibleAction ( sal_Int32 nIndex ) throw (In
if ( nIndex < 0 || nIndex >= getAccessibleActionCount() )
throw IndexOutOfBoundsException();
- PushButton* pButton = static_cast<PushButton*>( GetWindow() );
+ VclPtr< PushButton > pButton = GetAs< PushButton >();
if ( pButton )
pButton->Click();
@@ -264,7 +264,7 @@ Any VCLXAccessibleButton::getCurrentValue( ) throw (RuntimeException, std::exce
Any aValue;
- PushButton* pButton = static_cast<PushButton*>( GetWindow() );
+ VclPtr< PushButton > pButton = GetAs< PushButton >();
if ( pButton )
aValue <<= (sal_Int32) pButton->IsPressed();
@@ -279,7 +279,7 @@ sal_Bool VCLXAccessibleButton::setCurrentValue( const Any& aNumber ) throw (Runt
bool bReturn = false;
- PushButton* pButton = static_cast<PushButton*>( GetWindow() );
+ VclPtr< PushButton > pButton = GetAs< PushButton >();
if ( pButton )
{
sal_Int32 nValue = 0;
diff --git a/accessibility/source/standard/vclxaccessiblecheckbox.cxx b/accessibility/source/standard/vclxaccessiblecheckbox.cxx
index 327510ee1d1c..377fe9a96d1d 100644
--- a/accessibility/source/standard/vclxaccessiblecheckbox.cxx
+++ b/accessibility/source/standard/vclxaccessiblecheckbox.cxx
@@ -198,7 +198,7 @@ sal_Bool VCLXAccessibleCheckBox::doAccessibleAction ( sal_Int32 nIndex ) throw (
if ( nIndex < 0 || nIndex >= getAccessibleActionCount() )
throw IndexOutOfBoundsException();
- CheckBox* pCheckBox = static_cast<CheckBox*>(GetWindow());
+ VclPtr< CheckBox > pCheckBox = GetAs< CheckBox >();
VCLXCheckBox* pVCLXCheckBox = static_cast< VCLXCheckBox* >( GetVCLXWindow() );
if ( pCheckBox && pVCLXCheckBox )
{
@@ -328,7 +328,7 @@ Any VCLXAccessibleCheckBox::getMaximumValue( ) throw (RuntimeException, std::ex
Any aValue;
- CheckBox* pCheckBox = static_cast<CheckBox*>(GetWindow());
+ VclPtr< CheckBox > pCheckBox = GetAs< CheckBox >();
if ( pCheckBox && pCheckBox->IsTriStateEnabled() )
aValue <<= (sal_Int32) 2;
else
diff --git a/accessibility/source/standard/vclxaccessiblecombobox.cxx b/accessibility/source/standard/vclxaccessiblecombobox.cxx
index 25ed8f65c279..de97daac0cc1 100644
--- a/accessibility/source/standard/vclxaccessiblecombobox.cxx
+++ b/accessibility/source/standard/vclxaccessiblecombobox.cxx
@@ -43,18 +43,11 @@ VCLXAccessibleComboBox::~VCLXAccessibleComboBox()
{
}
-
-
-
bool VCLXAccessibleComboBox::IsValid() const
{
- return static_cast<ComboBox*>(GetWindow()) != NULL;
-
+ return GetWindow().get() != NULL;
}
-
-
-
void VCLXAccessibleComboBox::ProcessWindowEvent (const VclWindowEvent& rVclWindowEvent)
{
VCLXAccessibleBox::ProcessWindowEvent( rVclWindowEvent );
diff --git a/accessibility/source/standard/vclxaccessibledropdowncombobox.cxx b/accessibility/source/standard/vclxaccessibledropdowncombobox.cxx
index 9659e5e4afcd..0e50ac8c8ea3 100644
--- a/accessibility/source/standard/vclxaccessibledropdowncombobox.cxx
+++ b/accessibility/source/standard/vclxaccessibledropdowncombobox.cxx
@@ -57,17 +57,11 @@ VCLXAccessibleDropDownComboBox::~VCLXAccessibleDropDownComboBox()
{
}
-
-
bool VCLXAccessibleDropDownComboBox::IsValid() const
{
- return static_cast<ComboBox*>(GetWindow()) != NULL;
-
+ return GetWindow().get() != NULL;
}
-
-
-
void VCLXAccessibleDropDownComboBox::ProcessWindowEvent (const VclWindowEvent& rVclWindowEvent)
{
switch ( rVclWindowEvent.GetId() )
diff --git a/accessibility/source/standard/vclxaccessibledropdownlistbox.cxx b/accessibility/source/standard/vclxaccessibledropdownlistbox.cxx
index 23e44f0b2bbd..2875852fd82d 100644
--- a/accessibility/source/standard/vclxaccessibledropdownlistbox.cxx
+++ b/accessibility/source/standard/vclxaccessibledropdownlistbox.cxx
@@ -56,18 +56,11 @@ VCLXAccessibleDropDownListBox::~VCLXAccessibleDropDownListBox()
{
}
-
-
-
bool VCLXAccessibleDropDownListBox::IsValid() const
{
- return static_cast<ListBox*>(GetWindow()) != NULL;
-
+ return GetWindow().get() != NULL;
}
-
-
-
void VCLXAccessibleDropDownListBox::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
{
VCLXAccessibleBox::ProcessWindowEvent (rVclWindowEvent);
diff --git a/accessibility/source/standard/vclxaccessibleedit.cxx b/accessibility/source/standard/vclxaccessibleedit.cxx
index 1b9027dd05c3..7cc89bb58229 100644
--- a/accessibility/source/standard/vclxaccessibleedit.cxx
+++ b/accessibility/source/standard/vclxaccessibleedit.cxx
@@ -133,7 +133,7 @@ OUString VCLXAccessibleEdit::implGetText()
{
OUString aText;
- Edit* pEdit = static_cast< Edit* >( GetWindow() );
+ VclPtr< Edit > pEdit = GetAs< Edit >();
if ( pEdit )
{
aText = OutputDevice::GetNonMnemonicString( pEdit->GetText() );
@@ -225,7 +225,7 @@ sal_Int16 VCLXAccessibleEdit::getAccessibleRole( ) throw (RuntimeException, std
OExternalLockGuard aGuard( this );
sal_Int16 nRole;
- Edit* pEdit = static_cast< Edit* >( GetWindow() );
+ VclPtr< Edit > pEdit = GetAs< Edit >();
if ( pEdit && ( ( pEdit->GetStyle() & WB_PASSWORD ) || pEdit->GetEchoChar() ) )
nRole = AccessibleRole::PASSWORD_TEXT;
else
@@ -336,7 +336,7 @@ awt::Rectangle VCLXAccessibleEdit::getCharacterBounds( sal_Int32 nIndex ) throw
if ( !implIsValidRange( nIndex, nIndex, nLength ) )
throw IndexOutOfBoundsException();
- Control* pControl = static_cast< Control* >( GetWindow() );
+ VclPtr< Control > pControl = GetAs< Control >();
if ( pControl )
{
if ( nIndex == nLength )
@@ -425,7 +425,7 @@ sal_Bool VCLXAccessibleEdit::setSelection( sal_Int32 nStartIndex, sal_Int32 nEnd
throw IndexOutOfBoundsException();
VCLXEdit* pVCLXEdit = static_cast< VCLXEdit* >( GetVCLXWindow() );
- Edit* pEdit = static_cast< Edit* >( GetWindow() );
+ VclPtr< Edit > pEdit = GetAs< Edit >();
if ( pVCLXEdit && pEdit && pEdit->IsEnabled() )
{
pVCLXEdit->setSelection( awt::Selection( nStartIndex, nEndIndex ) );
diff --git a/accessibility/source/standard/vclxaccessiblelist.cxx b/accessibility/source/standard/vclxaccessiblelist.cxx
index cb70d1a3711d..f494d4b8629f 100644
--- a/accessibility/source/standard/vclxaccessiblelist.cxx
+++ b/accessibility/source/standard/vclxaccessiblelist.cxx
@@ -72,16 +72,16 @@ VCLXAccessibleList::VCLXAccessibleList (VCLXWindow* pVCLWindow, BoxType aBoxType
{
case COMBOBOX:
{
- ComboBox* pBox = static_cast<ComboBox*>(GetWindow());
- if ( pBox != NULL )
+ VclPtr< ComboBox > pBox = GetAs< ComboBox >();
+ if ( pBox )
m_pListBoxHelper = new VCLListBoxHelper<ComboBox> (*pBox);
break;
}
case LISTBOX:
{
- ListBox* pBox = static_cast<ListBox*>(GetWindow());
- if ( pBox != NULL )
+ VclPtr< ListBox > pBox = GetAs< ListBox >();
+ if ( pBox )
m_pListBoxHelper = new VCLListBoxHelper<ListBox> (*pBox);
break;
}
@@ -189,8 +189,8 @@ void VCLXAccessibleList::UpdateSelection_Acc (const ::rtl::OUString& sTextOfSele
{
if ( m_aBoxType == COMBOBOX )
{
- ComboBox* pBox = static_cast<ComboBox*>(GetWindow());
- if ( pBox != NULL )
+ VclPtr< ComboBox > pBox = GetAs< ComboBox >();
+ if ( pBox )
{
// Find the index of the selected item inside the VCL control...
sal_Int32 nIndex = pBox->GetEntryPos(sTextOfSelectedItem);
@@ -458,7 +458,7 @@ void VCLXAccessibleList::ProcessWindowEvent (const VclWindowEvent& rVclWindowEve
void VCLXAccessibleList::FillAccessibleRelationSet( utl::AccessibleRelationSetHelper& rRelationSet )
{
- ListBox* pBox = static_cast<ListBox*>(GetWindow());
+ VclPtr< ListBox > pBox = GetAs< ListBox >();
if( m_aBoxType == LISTBOX )
{
if (m_pListBoxHelper && (m_pListBoxHelper->GetStyle() & WB_DROPDOWN ) != WB_DROPDOWN)
@@ -483,8 +483,8 @@ void VCLXAccessibleList::UpdateSelection (const OUString& sTextOfSelectedItem)
{
if ( m_aBoxType == COMBOBOX )
{
- ComboBox* pBox = static_cast<ComboBox*>(GetWindow());
- if ( pBox != NULL )
+ VclPtr< ComboBox > pBox = GetAs< ComboBox >();
+ if ( pBox )
{
// Find the index of the selected item inside the VCL control...
sal_Int32 nIndex = pBox->GetEntryPos(sTextOfSelectedItem);
@@ -930,7 +930,7 @@ awt::Rectangle VCLXAccessibleList::implGetBounds() throw (uno::RuntimeException)
aBounds.Y = 0;
if ( m_aBoxType == COMBOBOX )
{
- ComboBox* pBox = static_cast<ComboBox*>(GetWindow());
+ VclPtr< ComboBox > pBox = GetAs< ComboBox >();
if ( pBox )
{
Size aSize = pBox->GetSubEdit()->GetSizePixel();
@@ -960,7 +960,7 @@ awt::Point VCLXAccessibleList::getLocationOnScreen( ) throw (uno::RuntimeExcept
aPos = VCLXAccessibleComponent::getLocationOnScreen();
if ( m_aBoxType == COMBOBOX )
{
- ComboBox* pBox = static_cast<ComboBox*>(GetWindow());
+ VclPtr< ComboBox > pBox = GetAs< ComboBox >();
if ( pBox )
{
aPos.Y += pBox->GetSubEdit()->GetSizePixel().Height();
diff --git a/accessibility/source/standard/vclxaccessiblelistbox.cxx b/accessibility/source/standard/vclxaccessiblelistbox.cxx
index 3fb9b1be3081..bc48680703ae 100644
--- a/accessibility/source/standard/vclxaccessiblelistbox.cxx
+++ b/accessibility/source/standard/vclxaccessiblelistbox.cxx
@@ -54,26 +54,16 @@ VCLXAccessibleListBox::~VCLXAccessibleListBox()
{
}
-
-
-
bool VCLXAccessibleListBox::IsValid() const
{
- return static_cast<ListBox*>(GetWindow()) != NULL;
-
+ return GetWindow().get() != NULL;
}
-
-
-
void VCLXAccessibleListBox::ProcessWindowEvent (const VclWindowEvent& rVclWindowEvent)
{
VCLXAccessibleBox::ProcessWindowEvent( rVclWindowEvent );
}
-
-
-
//===== XServiceInfo ========================================================
OUString VCLXAccessibleListBox::getImplementationName()
diff --git a/accessibility/source/standard/vclxaccessibleradiobutton.cxx b/accessibility/source/standard/vclxaccessibleradiobutton.cxx
index baabdd5555f1..23d8a92b268b 100644
--- a/accessibility/source/standard/vclxaccessibleradiobutton.cxx
+++ b/accessibility/source/standard/vclxaccessibleradiobutton.cxx
@@ -90,16 +90,16 @@ void VCLXAccessibleRadioButton::FillAccessibleRelationSet( utl::AccessibleRelati
{
VCLXAccessibleTextComponent::FillAccessibleRelationSet( rRelationSet );
- RadioButton* pRadioButton = dynamic_cast< RadioButton* >( GetWindow() );
+ VclPtr< RadioButton > pRadioButton = GetAsDynamic< RadioButton >();
if ( pRadioButton )
{
- ::std::vector< RadioButton* > aGroup(pRadioButton->GetRadioButtonGroup(true));
+ ::std::vector< VclPtr<RadioButton> > aGroup(pRadioButton->GetRadioButtonGroup(true));
if (!aGroup.empty())
{
sal_Int32 i = 0;
Sequence< Reference< XInterface > > aSequence( static_cast< sal_Int32 >( aGroup.size() ) );
- ::std::vector< RadioButton* >::const_iterator aEndItr = aGroup.end();
- for ( ::std::vector< RadioButton* >::const_iterator aItr = aGroup.begin(); aItr < aEndItr; ++aItr )
+ auto aEndItr = aGroup.end();
+ for ( auto aItr = aGroup.begin(); aItr < aEndItr; ++aItr )
{
aSequence[i++] = (*aItr)->GetAccessible();
}
diff --git a/accessibility/source/standard/vclxaccessiblescrollbar.cxx b/accessibility/source/standard/vclxaccessiblescrollbar.cxx
index 44faa7ed8ba9..76e58a67537d 100644
--- a/accessibility/source/standard/vclxaccessiblescrollbar.cxx
+++ b/accessibility/source/standard/vclxaccessiblescrollbar.cxx
@@ -139,7 +139,7 @@ sal_Bool VCLXAccessibleScrollBar::doAccessibleAction ( sal_Int32 nIndex ) throw
throw IndexOutOfBoundsException();
bool bReturn = false;
- ScrollBar* pScrollBar = static_cast< ScrollBar* >( GetWindow() );
+ VclPtr< ScrollBar > pScrollBar = GetAs< ScrollBar >();
if ( pScrollBar )
{
ScrollType eScrollType;
diff --git a/accessibility/source/standard/vclxaccessiblestatusbar.cxx b/accessibility/source/standard/vclxaccessiblestatusbar.cxx
index 921c7075f7f1..42d1db5eb38e 100644
--- a/accessibility/source/standard/vclxaccessiblestatusbar.cxx
+++ b/accessibility/source/standard/vclxaccessiblestatusbar.cxx
@@ -38,7 +38,7 @@ using namespace ::comphelper;
VCLXAccessibleStatusBar::VCLXAccessibleStatusBar( VCLXWindow* pVCLXWindow )
:VCLXAccessibleComponent( pVCLXWindow )
{
- m_pStatusBar = static_cast< StatusBar* >( GetWindow() );
+ m_pStatusBar = static_cast< StatusBar *>( GetWindow().get() );
if ( m_pStatusBar )
m_aAccessibleChildren.assign( m_pStatusBar->GetItemCount(), Reference< XAccessible >() );
diff --git a/accessibility/source/standard/vclxaccessibletabcontrol.cxx b/accessibility/source/standard/vclxaccessibletabcontrol.cxx
index 268a6f335d80..26ffc8ebd81e 100644
--- a/accessibility/source/standard/vclxaccessibletabcontrol.cxx
+++ b/accessibility/source/standard/vclxaccessibletabcontrol.cxx
@@ -43,7 +43,7 @@ using namespace ::comphelper;
VCLXAccessibleTabControl::VCLXAccessibleTabControl( VCLXWindow* pVCLXWindow )
:VCLXAccessibleComponent( pVCLXWindow )
{
- m_pTabControl = static_cast< TabControl* >( GetWindow() );
+ m_pTabControl = static_cast< TabControl* >( GetWindow().get() );
if ( m_pTabControl )
m_aAccessibleChildren.assign( m_pTabControl->GetPageCount(), Reference< XAccessible >() );
diff --git a/accessibility/source/standard/vclxaccessibletabpagewindow.cxx b/accessibility/source/standard/vclxaccessibletabpagewindow.cxx
index 6b43aa3d4b2c..3edb2b815864 100644
--- a/accessibility/source/standard/vclxaccessibletabpagewindow.cxx
+++ b/accessibility/source/standard/vclxaccessibletabpagewindow.cxx
@@ -36,7 +36,7 @@ using namespace ::comphelper;
VCLXAccessibleTabPageWindow::VCLXAccessibleTabPageWindow( VCLXWindow* pVCLXWindow )
:VCLXAccessibleComponent( pVCLXWindow )
{
- m_pTabPage = static_cast< TabPage* >( GetWindow() );
+ m_pTabPage = static_cast< TabPage* >( GetWindow().get() );
m_pTabControl = 0;
m_nPageId = 0;
if ( m_pTabPage )
@@ -50,7 +50,7 @@ VCLXAccessibleTabPageWindow::VCLXAccessibleTabPageWindow( VCLXWindow* pVCLXWindo
for ( sal_uInt16 i = 0, nCount = m_pTabControl->GetPageCount(); i < nCount; ++i )
{
sal_uInt16 nPageId = m_pTabControl->GetPageId( i );
- if ( m_pTabControl->GetTabPage( nPageId ) == m_pTabPage )
+ if ( m_pTabControl->GetTabPage( nPageId ) == m_pTabPage.get() )
m_nPageId = nPageId;
}
}
diff --git a/accessibility/source/standard/vclxaccessibletextcomponent.cxx b/accessibility/source/standard/vclxaccessibletextcomponent.cxx
index 1bfa1891cddc..7fbe48ab018f 100644
--- a/accessibility/source/standard/vclxaccessibletextcomponent.cxx
+++ b/accessibility/source/standard/vclxaccessibletextcomponent.cxx
@@ -254,7 +254,7 @@ awt::Rectangle VCLXAccessibleTextComponent::getCharacterBounds( sal_Int32 nIndex
throw IndexOutOfBoundsException();
awt::Rectangle aRect;
- Control* pControl = static_cast< Control* >( GetWindow() );
+ VclPtr< Control > pControl = GetAs< Control >();
if ( pControl )
aRect = AWTRectangle( pControl->GetCharacterBounds( nIndex ) );
@@ -277,7 +277,7 @@ sal_Int32 VCLXAccessibleTextComponent::getIndexAtPoint( const awt::Point& aPoint
OExternalLockGuard aGuard( this );
sal_Int32 nIndex = -1;
- Control* pControl = static_cast< Control* >( GetWindow() );
+ VclPtr< Control > pControl = GetAs< Control >();
if ( pControl )
nIndex = pControl->GetIndexForPoint( VCLPoint( aPoint ) );
diff --git a/accessibility/source/standard/vclxaccessibletextfield.cxx b/accessibility/source/standard/vclxaccessibletextfield.cxx
index 82e27f87eb60..44461225ffdd 100644
--- a/accessibility/source/standard/vclxaccessibletextfield.cxx
+++ b/accessibility/source/standard/vclxaccessibletextfield.cxx
@@ -53,22 +53,16 @@ VCLXAccessibleTextField::~VCLXAccessibleTextField()
{
}
-
-
-
OUString VCLXAccessibleTextField::implGetText()
{
OUString aText;
- ListBox* pListBox = static_cast<ListBox*>(GetWindow());
- if (pListBox!=NULL && !pListBox->IsInDropDown())
+ VclPtr< ListBox > pListBox = GetAs< ListBox >();
+ if (pListBox && !pListBox->IsInDropDown())
aText = pListBox->GetSelectEntry();
return aText;
}
-
-
-
IMPLEMENT_FORWARD_XINTERFACE2(VCLXAccessibleTextField, VCLXAccessibleTextComponent, VCLXAccessible_BASE)
IMPLEMENT_FORWARD_XTYPEPROVIDER2(VCLXAccessibleTextField, VCLXAccessibleTextComponent, VCLXAccessible_BASE)
diff --git a/accessibility/source/standard/vclxaccessibletoolbox.cxx b/accessibility/source/standard/vclxaccessibletoolbox.cxx
index 3dc32a1e1795..bbb4e26f2efa 100644
--- a/accessibility/source/standard/vclxaccessibletoolbox.cxx
+++ b/accessibility/source/standard/vclxaccessibletoolbox.cxx
@@ -184,7 +184,7 @@ VCLXAccessibleToolBox::~VCLXAccessibleToolBox()
VCLXAccessibleToolBoxItem* VCLXAccessibleToolBox::GetItem_Impl( sal_Int32 _nPos, bool _bMustHaveFocus )
{
VCLXAccessibleToolBoxItem* pItem = NULL;
- ToolBox* pToolBox = static_cast< ToolBox* >( GetWindow() );
+ VclPtr< ToolBox > pToolBox = GetAs< ToolBox >();
if ( pToolBox && ( !_bMustHaveFocus || pToolBox->HasFocus() ) )
{
ToolBoxItemsMap::iterator aIter = m_aAccessibleChildren.find( _nPos );
@@ -198,7 +198,7 @@ VCLXAccessibleToolBoxItem* VCLXAccessibleToolBox::GetItem_Impl( sal_Int32 _nPos,
void VCLXAccessibleToolBox::UpdateFocus_Impl()
{
- ToolBox* pToolBox = static_cast< ToolBox* >( GetWindow() );
+ VclPtr< ToolBox > pToolBox = GetAs< ToolBox >();
if( !pToolBox )
return;
@@ -250,7 +250,7 @@ void VCLXAccessibleToolBox::UpdateFocus_Impl()
void VCLXAccessibleToolBox::ReleaseFocus_Impl( sal_Int32 _nPos )
{
- ToolBox* pToolBox = static_cast< ToolBox* >( GetWindow() );
+ VclPtr< ToolBox > pToolBox = GetAs< ToolBox >();
if ( pToolBox ) // #107124#, do not check for focus because this message is also handled in losefocus
{
ToolBoxItemsMap::iterator aIter = m_aAccessibleChildren.find( _nPos );
@@ -266,7 +266,7 @@ void VCLXAccessibleToolBox::ReleaseFocus_Impl( sal_Int32 _nPos )
void VCLXAccessibleToolBox::UpdateChecked_Impl( sal_Int32 _nPos )
{
- ToolBox* pToolBox = static_cast< ToolBox* >( GetWindow() );
+ VclPtr< ToolBox > pToolBox = GetAs< ToolBox >();
if ( pToolBox )
{
sal_uInt16 nFocusId = pToolBox->GetItemId( (sal_uInt16)_nPos );
@@ -291,7 +291,7 @@ void VCLXAccessibleToolBox::UpdateChecked_Impl( sal_Int32 _nPos )
void VCLXAccessibleToolBox::UpdateIndeterminate_Impl( sal_Int32 _nPos )
{
- ToolBox* pToolBox = static_cast< ToolBox* >( GetWindow() );
+ VclPtr< ToolBox > pToolBox = GetAs< ToolBox >();
if ( pToolBox )
{
sal_uInt16 nItemId = pToolBox->GetItemId( (sal_uInt16)_nPos );
@@ -347,7 +347,7 @@ void VCLXAccessibleToolBox::UpdateItem_Impl( sal_Int32 _nPos, bool _bItemAdded )
return;
}
- ToolBox* pToolBox = static_cast< ToolBox* >( GetWindow() );
+ VclPtr< ToolBox > pToolBox = GetAs< ToolBox >();
if ( pToolBox )
{
if ( !_bItemAdded )
@@ -403,7 +403,7 @@ void VCLXAccessibleToolBox::UpdateItem_Impl( sal_Int32 _nPos, bool _bItemAdded )
void VCLXAccessibleToolBox::UpdateAllItems_Impl()
{
- ToolBox* pToolBox = static_cast< ToolBox* >( GetWindow() );
+ VclPtr< ToolBox > pToolBox = GetAs< ToolBox >();
if ( pToolBox )
{
// deregister the old items
@@ -427,7 +427,7 @@ void VCLXAccessibleToolBox::UpdateAllItems_Impl()
void VCLXAccessibleToolBox::UpdateCustomPopupItemp_Impl( vcl::Window* pWindow, bool bOpen )
{
- ToolBox* pToolBox = static_cast< ToolBox* >( GetWindow() );
+ VclPtr< ToolBox > pToolBox = GetAs< ToolBox >();
if( pWindow && pToolBox )
{
const sal_uInt16 nDownItem = pToolBox->GetDownItemId();
@@ -465,7 +465,7 @@ void VCLXAccessibleToolBox::UpdateItemEnabled_Impl( sal_Int32 _nPos )
void VCLXAccessibleToolBox::HandleSubToolBarEvent( const VclWindowEvent& rVclWindowEvent, bool _bShow )
{
vcl::Window* pChildWindow = static_cast<vcl::Window *>(rVclWindowEvent.GetData());
- ToolBox* pToolBox = static_cast< ToolBox* >( GetWindow() );
+ VclPtr< ToolBox > pToolBox = GetAs< ToolBox >();
if ( pChildWindow
&& pToolBox
&& pToolBox == pChildWindow->GetParent()
@@ -486,7 +486,7 @@ void VCLXAccessibleToolBox::HandleSubToolBarEvent( const VclWindowEvent& rVclWin
void VCLXAccessibleToolBox::ReleaseSubToolBox( ToolBox* _pSubToolBox )
{
- ToolBox* pToolBox = static_cast< ToolBox* >( GetWindow() );
+ VclPtr< ToolBox > pToolBox = GetAs< ToolBox >();
if ( !pToolBox )
return;
@@ -512,7 +512,7 @@ void VCLXAccessibleToolBox::FillAccessibleStateSet( utl::AccessibleStateSetHelpe
{
VCLXAccessibleComponent::FillAccessibleStateSet( rStateSet );
- ToolBox* pToolBox = static_cast< ToolBox* >( GetWindow() );
+ VclPtr< ToolBox > pToolBox = GetAs< ToolBox >();
if ( pToolBox )
{
rStateSet.AddState( AccessibleStateType::FOCUSABLE );
@@ -533,7 +533,7 @@ void VCLXAccessibleToolBox::ProcessWindowEvent( const VclWindowEvent& rVclWindow
case VCLEVENT_TOOLBOX_CLICK:
case VCLEVENT_TOOLBOX_SELECT:
{
- ToolBox* pToolBox = static_cast< ToolBox* >( GetWindow() );
+ VclPtr< ToolBox > pToolBox = GetAs< ToolBox >();
if ( rVclWindowEvent.GetData() )
{
UpdateChecked_Impl( (sal_Int32)reinterpret_cast<sal_IntPtr>(rVclWindowEvent.GetData()) );
@@ -617,14 +617,14 @@ void VCLXAccessibleToolBox::ProcessWindowEvent( const VclWindowEvent& rVclWindow
case VCLEVENT_OBJECT_DYING :
{
// if this toolbox is a subtoolbox, we have to relese it from its parent
- vcl::Window * pWin = GetWindow();
+ VclPtr< vcl::Window > pWin = GetAs< vcl::Window >();
if ( pWin && pWin->GetParent() &&
pWin->GetParent()->GetType() == WINDOW_TOOLBOX )
{
VCLXAccessibleToolBox* pParent = static_cast< VCLXAccessibleToolBox* >(
pWin->GetParent()->GetAccessible()->getAccessibleContext().get() );
if ( pParent )
- pParent->ReleaseSubToolBox(static_cast<ToolBox *>(pWin));
+ pParent->ReleaseSubToolBox(static_cast<ToolBox *>(pWin.get()));
}
// dispose all items
@@ -704,7 +704,7 @@ sal_Int32 SAL_CALL VCLXAccessibleToolBox::getAccessibleChildCount( ) throw (Run
comphelper::OExternalLockGuard aGuard( this );
sal_Int32 nCount = 0;
- ToolBox* pToolBox = static_cast< ToolBox* >( GetWindow() );
+ VclPtr< ToolBox > pToolBox = GetAs< ToolBox >();
if ( pToolBox )
nCount = pToolBox->GetItemCount();
@@ -718,7 +718,7 @@ Reference< XAccessible > SAL_CALL VCLXAccessibleToolBox::getAccessibleChild( sal
comphelper::OExternalLockGuard aGuard( this );
- ToolBox* pToolBox = static_cast< ToolBox* >( GetWindow() );
+ VclPtr< ToolBox > pToolBox = GetAs< ToolBox >();
if ( pToolBox )
{
Reference< XAccessible > xChild;
@@ -763,7 +763,7 @@ Reference< XAccessible > SAL_CALL VCLXAccessibleToolBox::getAccessibleAtPoint( c
comphelper::OExternalLockGuard aGuard( this );
Reference< XAccessible > xAccessible;
- ToolBox* pToolBox = static_cast< ToolBox* >( GetWindow() );
+ VclPtr< ToolBox > pToolBox = GetAs< ToolBox >();
if ( pToolBox )
{
sal_uInt16 nItemPos = pToolBox->GetItemPos( VCLPoint( _rPoint ) );
@@ -778,7 +778,7 @@ Reference< XAccessible > VCLXAccessibleToolBox::GetItemWindowAccessible( const V
{
Reference< XAccessible > xReturn;
vcl::Window* pChildWindow = static_cast<vcl::Window *>(rVclWindowEvent.GetData());
- ToolBox* pToolBox = static_cast< ToolBox* >( GetWindow() );
+ VclPtr< ToolBox > pToolBox = GetAs< ToolBox >();
if ( pChildWindow && pToolBox )
{
sal_uInt16 nCount = pToolBox->GetItemCount();
@@ -808,7 +808,7 @@ void VCLXAccessibleToolBox::selectAccessibleChild( sal_Int32 nChildIndex ) throw
OExternalLockGuard aGuard( this );
if ( nChildIndex < 0 || nChildIndex >= getAccessibleChildCount() )
throw IndexOutOfBoundsException();
- ToolBox * pToolBox = static_cast < ToolBox * > ( GetWindow() );
+ VclPtr< ToolBox > pToolBox = GetAs< ToolBox >();
sal_uInt16 nPos = static_cast < sal_uInt16 > (nChildIndex);
pToolBox->ChangeHighlight( nPos );
}
@@ -818,9 +818,9 @@ sal_Bool VCLXAccessibleToolBox::isAccessibleChildSelected( sal_Int32 nChildIndex
OExternalLockGuard aGuard( this );
if ( nChildIndex < 0 || nChildIndex >= getAccessibleChildCount() )
throw IndexOutOfBoundsException();
- ToolBox * pToolBox = static_cast < ToolBox * > ( GetWindow() );
+ VclPtr< ToolBox > pToolBox = GetAs< ToolBox >();
sal_uInt16 nPos = static_cast < sal_uInt16 > (nChildIndex);
- if ( pToolBox != NULL && pToolBox->GetHighlightItemId() == pToolBox->GetItemId( nPos ) )
+ if ( pToolBox && pToolBox->GetHighlightItemId() == pToolBox->GetItemId( nPos ) )
return true;
else
return false;
@@ -829,7 +829,7 @@ sal_Bool VCLXAccessibleToolBox::isAccessibleChildSelected( sal_Int32 nChildIndex
void VCLXAccessibleToolBox::clearAccessibleSelection( ) throw (RuntimeException, std::exception)
{
OExternalLockGuard aGuard( this );
- ToolBox * pToolBox = static_cast < ToolBox * > ( GetWindow() );
+ VclPtr< ToolBox > pToolBox = GetAs< ToolBox >();
pToolBox -> LoseFocus();
}