summaryrefslogtreecommitdiff
path: root/accessibility/source/standard
diff options
context:
space:
mode:
Diffstat (limited to 'accessibility/source/standard')
-rw-r--r--accessibility/source/standard/accessiblemenubasecomponent.cxx7
-rw-r--r--accessibility/source/standard/accessiblemenucomponent.cxx6
-rw-r--r--accessibility/source/standard/accessiblemenuitemcomponent.cxx4
-rw-r--r--accessibility/source/standard/vclxaccessiblebox.cxx2
-rw-r--r--accessibility/source/standard/vclxaccessiblebutton.cxx5
-rw-r--r--accessibility/source/standard/vclxaccessiblecheckbox.cxx5
-rw-r--r--accessibility/source/standard/vclxaccessibleheaderbaritem.cxx9
-rw-r--r--accessibility/source/standard/vclxaccessiblelistitem.cxx11
-rw-r--r--accessibility/source/standard/vclxaccessiblemenuitem.cxx7
-rw-r--r--accessibility/source/standard/vclxaccessibleradiobutton.cxx5
-rw-r--r--accessibility/source/standard/vclxaccessiblestatusbaritem.cxx11
-rw-r--r--accessibility/source/standard/vclxaccessibletabpage.cxx11
-rw-r--r--accessibility/source/standard/vclxaccessibletextcomponent.cxx2
-rw-r--r--accessibility/source/standard/vclxaccessibletoolbox.cxx2
-rw-r--r--accessibility/source/standard/vclxaccessibletoolboxitem.cxx11
15 files changed, 37 insertions, 61 deletions
diff --git a/accessibility/source/standard/accessiblemenubasecomponent.cxx b/accessibility/source/standard/accessiblemenubasecomponent.cxx
index 4dbb71c554cf..7d5d2eebdd3e 100644
--- a/accessibility/source/standard/accessiblemenubasecomponent.cxx
+++ b/accessibility/source/standard/accessiblemenubasecomponent.cxx
@@ -313,7 +313,7 @@ Reference< XAccessible > OAccessibleMenuBaseComponent::GetChild( sal_Int32 i )
if ( m_pMenu )
{
// create a new child
- OAccessibleMenuBaseComponent* pChild;
+ rtl::Reference<OAccessibleMenuBaseComponent> pChild;
if ( m_pMenu->GetItemType( static_cast<sal_uInt16>(i) ) == MenuItemType::SEPARATOR )
{
@@ -691,8 +691,7 @@ Reference< XAccessibleStateSet > OAccessibleMenuBaseComponent::getAccessibleStat
{
OExternalLockGuard aGuard( this );
- utl::AccessibleStateSetHelper* pStateSetHelper = new utl::AccessibleStateSetHelper;
- Reference< XAccessibleStateSet > xSet = pStateSetHelper;
+ rtl::Reference<utl::AccessibleStateSetHelper> pStateSetHelper = new utl::AccessibleStateSetHelper;
if ( !rBHelper.bDisposed && !rBHelper.bInDispose )
{
@@ -703,7 +702,7 @@ Reference< XAccessibleStateSet > OAccessibleMenuBaseComponent::getAccessibleStat
pStateSetHelper->AddState( AccessibleStateType::DEFUNC );
}
- return xSet;
+ return pStateSetHelper;
}
diff --git a/accessibility/source/standard/accessiblemenucomponent.cxx b/accessibility/source/standard/accessiblemenucomponent.cxx
index ff927df47d14..be9b1e6f453e 100644
--- a/accessibility/source/standard/accessiblemenucomponent.cxx
+++ b/accessibility/source/standard/accessiblemenucomponent.cxx
@@ -212,9 +212,7 @@ Reference< XAccessibleRelationSet > OAccessibleMenuComponent::getAccessibleRelat
{
OExternalLockGuard aGuard( this );
- utl::AccessibleRelationSetHelper* pRelationSetHelper = new utl::AccessibleRelationSetHelper;
- Reference< XAccessibleRelationSet > xSet = pRelationSetHelper;
- return xSet;
+ return new utl::AccessibleRelationSetHelper;
}
@@ -307,7 +305,7 @@ Reference< awt::XFont > OAccessibleMenuComponent::getFont( )
if ( xDev.is() )
{
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
- VCLXFont* pVCLXFont = new VCLXFont;
+ rtl::Reference<VCLXFont> pVCLXFont = new VCLXFont;
pVCLXFont->Init( *xDev, rStyleSettings.GetMenuFont() );
xFont = pVCLXFont;
}
diff --git a/accessibility/source/standard/accessiblemenuitemcomponent.cxx b/accessibility/source/standard/accessiblemenuitemcomponent.cxx
index 951d913e20c3..4b0707291eff 100644
--- a/accessibility/source/standard/accessiblemenuitemcomponent.cxx
+++ b/accessibility/source/standard/accessiblemenuitemcomponent.cxx
@@ -354,9 +354,7 @@ Reference< XAccessibleRelationSet > OAccessibleMenuItemComponent::getAccessibleR
{
OExternalLockGuard aGuard( this );
- utl::AccessibleRelationSetHelper* pRelationSetHelper = new utl::AccessibleRelationSetHelper;
- Reference< XAccessibleRelationSet > xSet = pRelationSetHelper;
- return xSet;
+ return new utl::AccessibleRelationSetHelper;
}
diff --git a/accessibility/source/standard/vclxaccessiblebox.cxx b/accessibility/source/standard/vclxaccessiblebox.cxx
index d8edd7e206bf..50bb06247509 100644
--- a/accessibility/source/standard/vclxaccessiblebox.cxx
+++ b/accessibility/source/standard/vclxaccessiblebox.cxx
@@ -305,7 +305,7 @@ Reference<XAccessible> SAL_CALL VCLXAccessibleBox::getAccessibleChild (sal_Int32
// List.
if ( ! m_xList.is())
{
- VCLXAccessibleList* pList = new VCLXAccessibleList ( GetVCLXWindow(),
+ rtl::Reference<VCLXAccessibleList> pList = new VCLXAccessibleList ( GetVCLXWindow(),
(m_aBoxType == LISTBOX ? VCLXAccessibleList::LISTBOX : VCLXAccessibleList::COMBOBOX),
this);
pList->SetIndexInParent (i);
diff --git a/accessibility/source/standard/vclxaccessiblebutton.cxx b/accessibility/source/standard/vclxaccessiblebutton.cxx
index 4c912530f8bf..50e81669b86a 100644
--- a/accessibility/source/standard/vclxaccessiblebutton.cxx
+++ b/accessibility/source/standard/vclxaccessiblebutton.cxx
@@ -203,8 +203,7 @@ Reference< XAccessibleKeyBinding > VCLXAccessibleButton::getAccessibleActionKeyB
if ( nIndex != 0 )
throw IndexOutOfBoundsException();
- OAccessibleKeyBindingHelper* pKeyBindingHelper = new OAccessibleKeyBindingHelper();
- Reference< XAccessibleKeyBinding > xKeyBinding = pKeyBindingHelper;
+ rtl::Reference<OAccessibleKeyBindingHelper> pKeyBindingHelper = new OAccessibleKeyBindingHelper();
VclPtr<vcl::Window> pWindow = GetWindow();
if ( pWindow )
@@ -230,7 +229,7 @@ Reference< XAccessibleKeyBinding > VCLXAccessibleButton::getAccessibleActionKeyB
}
}
- return xKeyBinding;
+ return pKeyBindingHelper;
}
diff --git a/accessibility/source/standard/vclxaccessiblecheckbox.cxx b/accessibility/source/standard/vclxaccessiblecheckbox.cxx
index a15ae4013ceb..f38bc3881b87 100644
--- a/accessibility/source/standard/vclxaccessiblecheckbox.cxx
+++ b/accessibility/source/standard/vclxaccessiblecheckbox.cxx
@@ -226,8 +226,7 @@ Reference< XAccessibleKeyBinding > VCLXAccessibleCheckBox::getAccessibleActionKe
if ( nIndex != 0 )
throw IndexOutOfBoundsException();
- OAccessibleKeyBindingHelper* pKeyBindingHelper = new OAccessibleKeyBindingHelper();
- Reference< XAccessibleKeyBinding > xKeyBinding = pKeyBindingHelper;
+ rtl::Reference<OAccessibleKeyBindingHelper> pKeyBindingHelper = new OAccessibleKeyBindingHelper();
VclPtr<vcl::Window> pWindow = GetWindow();
if ( pWindow )
@@ -253,7 +252,7 @@ Reference< XAccessibleKeyBinding > VCLXAccessibleCheckBox::getAccessibleActionKe
}
}
- return xKeyBinding;
+ return pKeyBindingHelper;
}
diff --git a/accessibility/source/standard/vclxaccessibleheaderbaritem.cxx b/accessibility/source/standard/vclxaccessibleheaderbaritem.cxx
index a6fd0a7e3f8d..5c9bf5c9ad58 100644
--- a/accessibility/source/standard/vclxaccessibleheaderbaritem.cxx
+++ b/accessibility/source/standard/vclxaccessibleheaderbaritem.cxx
@@ -184,9 +184,7 @@ Reference< XAccessibleRelationSet > VCLXAccessibleHeaderBarItem::getAccessibleRe
{
OExternalLockGuard aGuard( this );
- utl::AccessibleRelationSetHelper* pRelationSetHelper = new utl::AccessibleRelationSetHelper;
- Reference< XAccessibleRelationSet > xSet = pRelationSetHelper;
- return xSet;
+ return new utl::AccessibleRelationSetHelper;
}
@@ -194,8 +192,7 @@ Reference< XAccessibleStateSet > VCLXAccessibleHeaderBarItem::getAccessibleState
{
OExternalLockGuard aGuard( this );
- utl::AccessibleStateSetHelper* pStateSetHelper = new utl::AccessibleStateSetHelper;
- Reference< XAccessibleStateSet > xSet = pStateSetHelper;
+ rtl::Reference<utl::AccessibleStateSetHelper> pStateSetHelper = new utl::AccessibleStateSetHelper;
if ( !rBHelper.bDisposed && !rBHelper.bInDispose )
{
@@ -206,7 +203,7 @@ Reference< XAccessibleStateSet > VCLXAccessibleHeaderBarItem::getAccessibleState
pStateSetHelper->AddState( AccessibleStateType::DEFUNC );
}
- return xSet;
+ return pStateSetHelper;
}
diff --git a/accessibility/source/standard/vclxaccessiblelistitem.cxx b/accessibility/source/standard/vclxaccessiblelistitem.cxx
index db783b2ccd65..e25c1070f8ed 100644
--- a/accessibility/source/standard/vclxaccessiblelistitem.cxx
+++ b/accessibility/source/standard/vclxaccessiblelistitem.cxx
@@ -237,17 +237,14 @@ OUString SAL_CALL VCLXAccessibleListItem::getAccessibleName( )
Reference< XAccessibleRelationSet > SAL_CALL VCLXAccessibleListItem::getAccessibleRelationSet( )
{
- utl::AccessibleRelationSetHelper* pRelationSetHelper = new utl::AccessibleRelationSetHelper;
- Reference< XAccessibleRelationSet > xSet = pRelationSetHelper;
- return xSet;
+ return new utl::AccessibleRelationSetHelper;
}
Reference< XAccessibleStateSet > SAL_CALL VCLXAccessibleListItem::getAccessibleStateSet( )
{
::osl::MutexGuard aGuard( m_aMutex );
- utl::AccessibleStateSetHelper* pStateSetHelper = new utl::AccessibleStateSetHelper;
- Reference< XAccessibleStateSet > xStateSet = pStateSetHelper;
+ rtl::Reference<utl::AccessibleStateSetHelper> pStateSetHelper = new utl::AccessibleStateSetHelper;
if ( !rBHelper.bDisposed && !rBHelper.bInDispose )
{
@@ -272,7 +269,7 @@ Reference< XAccessibleStateSet > SAL_CALL VCLXAccessibleListItem::getAccessibleS
else
pStateSetHelper->AddState( AccessibleStateType::DEFUNC );
- return xStateSet;
+ return pStateSetHelper;
}
Locale SAL_CALL VCLXAccessibleListItem::getLocale( )
@@ -545,7 +542,7 @@ sal_Bool SAL_CALL VCLXAccessibleListItem::copyText( sal_Int32 nStartIndex, sal_I
if ( xClipboard.is() )
{
OUString sText( getTextRange( nStartIndex, nEndIndex ) );
- vcl::unohelper::TextDataObject* pDataObj = new vcl::unohelper::TextDataObject( sText );
+ rtl::Reference<vcl::unohelper::TextDataObject> pDataObj = new vcl::unohelper::TextDataObject( sText );
SolarMutexReleaser aReleaser;
xClipboard->setContents( pDataObj, nullptr );
diff --git a/accessibility/source/standard/vclxaccessiblemenuitem.cxx b/accessibility/source/standard/vclxaccessiblemenuitem.cxx
index d278dae976e8..c12fdc985f7a 100644
--- a/accessibility/source/standard/vclxaccessiblemenuitem.cxx
+++ b/accessibility/source/standard/vclxaccessiblemenuitem.cxx
@@ -367,7 +367,7 @@ sal_Bool VCLXAccessibleMenuItem::copyText( sal_Int32 nStartIndex, sal_Int32 nEnd
{
OUString sText( getTextRange( nStartIndex, nEndIndex ) );
- vcl::unohelper::TextDataObject* pDataObj = new vcl::unohelper::TextDataObject( sText );
+ rtl::Reference<vcl::unohelper::TextDataObject> pDataObj = new vcl::unohelper::TextDataObject( sText );
SolarMutexReleaser aReleaser;
xClipboard->setContents( pDataObj, nullptr );
@@ -429,8 +429,7 @@ Reference< XAccessibleKeyBinding > VCLXAccessibleMenuItem::getAccessibleActionKe
if ( nIndex != 0 )
throw IndexOutOfBoundsException();
- OAccessibleKeyBindingHelper* pKeyBindingHelper = new OAccessibleKeyBindingHelper();
- Reference< XAccessibleKeyBinding > xKeyBinding = pKeyBindingHelper;
+ rtl::Reference<OAccessibleKeyBindingHelper> pKeyBindingHelper = new OAccessibleKeyBindingHelper();
if ( m_pParent )
{
@@ -494,7 +493,7 @@ Reference< XAccessibleKeyBinding > VCLXAccessibleMenuItem::getAccessibleActionKe
}
}
- return xKeyBinding;
+ return pKeyBindingHelper;
}
diff --git a/accessibility/source/standard/vclxaccessibleradiobutton.cxx b/accessibility/source/standard/vclxaccessibleradiobutton.cxx
index aae9c76731f7..49901a8fbe17 100644
--- a/accessibility/source/standard/vclxaccessibleradiobutton.cxx
+++ b/accessibility/source/standard/vclxaccessibleradiobutton.cxx
@@ -174,8 +174,7 @@ Reference< XAccessibleKeyBinding > VCLXAccessibleRadioButton::getAccessibleActio
if ( nIndex != 0 )
throw IndexOutOfBoundsException();
- OAccessibleKeyBindingHelper* pKeyBindingHelper = new OAccessibleKeyBindingHelper();
- Reference< XAccessibleKeyBinding > xKeyBinding = pKeyBindingHelper;
+ rtl::Reference<OAccessibleKeyBindingHelper> pKeyBindingHelper = new OAccessibleKeyBindingHelper();
VclPtr<vcl::Window> pWindow = GetWindow();
if ( pWindow )
@@ -201,7 +200,7 @@ Reference< XAccessibleKeyBinding > VCLXAccessibleRadioButton::getAccessibleActio
}
}
- return xKeyBinding;
+ return pKeyBindingHelper;
}
diff --git a/accessibility/source/standard/vclxaccessiblestatusbaritem.cxx b/accessibility/source/standard/vclxaccessiblestatusbaritem.cxx
index aee6f9e46737..b647036c316d 100644
--- a/accessibility/source/standard/vclxaccessiblestatusbaritem.cxx
+++ b/accessibility/source/standard/vclxaccessiblestatusbaritem.cxx
@@ -306,9 +306,7 @@ Reference< XAccessibleRelationSet > VCLXAccessibleStatusBarItem::getAccessibleRe
{
OExternalLockGuard aGuard( this );
- utl::AccessibleRelationSetHelper* pRelationSetHelper = new utl::AccessibleRelationSetHelper;
- Reference< XAccessibleRelationSet > xSet = pRelationSetHelper;
- return xSet;
+ return new utl::AccessibleRelationSetHelper;
}
@@ -316,8 +314,7 @@ Reference< XAccessibleStateSet > VCLXAccessibleStatusBarItem::getAccessibleState
{
OExternalLockGuard aGuard( this );
- utl::AccessibleStateSetHelper* pStateSetHelper = new utl::AccessibleStateSetHelper;
- Reference< XAccessibleStateSet > xSet = pStateSetHelper;
+ rtl::Reference<utl::AccessibleStateSetHelper> pStateSetHelper = new utl::AccessibleStateSetHelper;
if ( !rBHelper.bDisposed && !rBHelper.bInDispose )
{
@@ -328,7 +325,7 @@ Reference< XAccessibleStateSet > VCLXAccessibleStatusBarItem::getAccessibleState
pStateSetHelper->AddState( AccessibleStateType::DEFUNC );
}
- return xSet;
+ return pStateSetHelper;
}
@@ -565,7 +562,7 @@ sal_Bool VCLXAccessibleStatusBarItem::copyText( sal_Int32 nStartIndex, sal_Int32
{
OUString sText( implGetTextRange( GetItemText(), nStartIndex, nEndIndex ) );
- vcl::unohelper::TextDataObject* pDataObj = new vcl::unohelper::TextDataObject( sText );
+ rtl::Reference<vcl::unohelper::TextDataObject> pDataObj = new vcl::unohelper::TextDataObject( sText );
SolarMutexReleaser aReleaser;
xClipboard->setContents( pDataObj, nullptr );
diff --git a/accessibility/source/standard/vclxaccessibletabpage.cxx b/accessibility/source/standard/vclxaccessibletabpage.cxx
index ab981634a7db..3c0a9ada8e1d 100644
--- a/accessibility/source/standard/vclxaccessibletabpage.cxx
+++ b/accessibility/source/standard/vclxaccessibletabpage.cxx
@@ -372,9 +372,7 @@ Reference< XAccessibleRelationSet > VCLXAccessibleTabPage::getAccessibleRelation
{
OExternalLockGuard aGuard( this );
- utl::AccessibleRelationSetHelper* pRelationSetHelper = new utl::AccessibleRelationSetHelper;
- Reference< XAccessibleRelationSet > xSet = pRelationSetHelper;
- return xSet;
+ return new utl::AccessibleRelationSetHelper;
}
@@ -382,8 +380,7 @@ Reference< XAccessibleStateSet > VCLXAccessibleTabPage::getAccessibleStateSet(
{
OExternalLockGuard aGuard( this );
- utl::AccessibleStateSetHelper* pStateSetHelper = new utl::AccessibleStateSetHelper;
- Reference< XAccessibleStateSet > xSet = pStateSetHelper;
+ rtl::Reference<utl::AccessibleStateSetHelper> pStateSetHelper = new utl::AccessibleStateSetHelper;
if ( !rBHelper.bDisposed && !rBHelper.bInDispose )
{
@@ -394,7 +391,7 @@ Reference< XAccessibleStateSet > VCLXAccessibleTabPage::getAccessibleStateSet(
pStateSetHelper->AddState( AccessibleStateType::DEFUNC );
}
- return xSet;
+ return pStateSetHelper;
}
@@ -653,7 +650,7 @@ sal_Bool VCLXAccessibleTabPage::copyText( sal_Int32 nStartIndex, sal_Int32 nEndI
{
OUString sText( implGetTextRange( GetPageText(), nStartIndex, nEndIndex ) );
- vcl::unohelper::TextDataObject* pDataObj = new vcl::unohelper::TextDataObject( sText );
+ rtl::Reference<vcl::unohelper::TextDataObject> pDataObj = new vcl::unohelper::TextDataObject( sText );
SolarMutexReleaser aReleaser;
xClipboard->setContents( pDataObj, nullptr );
diff --git a/accessibility/source/standard/vclxaccessibletextcomponent.cxx b/accessibility/source/standard/vclxaccessibletextcomponent.cxx
index a84c810223c3..c5dba0df978a 100644
--- a/accessibility/source/standard/vclxaccessibletextcomponent.cxx
+++ b/accessibility/source/standard/vclxaccessibletextcomponent.cxx
@@ -352,7 +352,7 @@ sal_Bool VCLXAccessibleTextComponent::copyText( sal_Int32 nStartIndex, sal_Int32
{
OUString sText( OCommonAccessibleText::implGetTextRange( implGetText(), nStartIndex, nEndIndex ) );
- vcl::unohelper::TextDataObject* pDataObj = new vcl::unohelper::TextDataObject( sText );
+ rtl::Reference<vcl::unohelper::TextDataObject> pDataObj = new vcl::unohelper::TextDataObject( sText );
SolarMutexReleaser aReleaser;
xClipboard->setContents( pDataObj, nullptr );
diff --git a/accessibility/source/standard/vclxaccessibletoolbox.cxx b/accessibility/source/standard/vclxaccessibletoolbox.cxx
index 1b63c38b373b..b04f2a7417de 100644
--- a/accessibility/source/standard/vclxaccessibletoolbox.cxx
+++ b/accessibility/source/standard/vclxaccessibletoolbox.cxx
@@ -702,7 +702,7 @@ Reference< XAccessible > SAL_CALL VCLXAccessibleToolBox::getAccessibleChild( sal
sal_uInt16 nHighlightItemId = pToolBox->GetHighlightItemId();
vcl::Window* pItemWindow = pToolBox->GetItemWindow( nItemId );
// not found -> create a new child
- VCLXAccessibleToolBoxItem* pChild = new VCLXAccessibleToolBoxItem( pToolBox, i );
+ rtl::Reference<VCLXAccessibleToolBoxItem> pChild = new VCLXAccessibleToolBoxItem( pToolBox, i );
Reference< XAccessible> xParent = pChild;
if ( pItemWindow )
{
diff --git a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx
index 64a08300ce59..cc613bbe4ec3 100644
--- a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx
+++ b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx
@@ -381,17 +381,14 @@ Reference< XAccessibleRelationSet > SAL_CALL VCLXAccessibleToolBoxItem::getAcces
{
OContextEntryGuard aGuard( this );
- utl::AccessibleRelationSetHelper* pRelationSetHelper = new utl::AccessibleRelationSetHelper;
- Reference< XAccessibleRelationSet > xSet = pRelationSetHelper;
- return xSet;
+ return new utl::AccessibleRelationSetHelper;
}
Reference< XAccessibleStateSet > SAL_CALL VCLXAccessibleToolBoxItem::getAccessibleStateSet( )
{
OExternalLockGuard aGuard( this );
- utl::AccessibleStateSetHelper* pStateSetHelper = new utl::AccessibleStateSetHelper;
- Reference< XAccessibleStateSet > xStateSet = pStateSetHelper;
+ rtl::Reference<utl::AccessibleStateSetHelper> pStateSetHelper = new utl::AccessibleStateSetHelper;
if ( m_pToolBox && !rBHelper.bDisposed && !rBHelper.bInDispose )
{
@@ -415,7 +412,7 @@ Reference< XAccessibleStateSet > SAL_CALL VCLXAccessibleToolBoxItem::getAccessib
else
pStateSetHelper->AddState( AccessibleStateType::DEFUNC );
- return xStateSet;
+ return pStateSetHelper;
}
// XAccessibleText
@@ -539,7 +536,7 @@ sal_Bool SAL_CALL VCLXAccessibleToolBoxItem::copyText( sal_Int32 nStartIndex, sa
{
OUString sText( OCommonAccessibleText::implGetTextRange( implGetText(), nStartIndex, nEndIndex ) );
- vcl::unohelper::TextDataObject* pDataObj = new vcl::unohelper::TextDataObject( sText );
+ rtl::Reference<vcl::unohelper::TextDataObject> pDataObj = new vcl::unohelper::TextDataObject( sText );
SolarMutexReleaser aReleaser;
xClipboard->setContents( pDataObj, nullptr );