diff options
Diffstat (limited to 'accessibility/source/standard/vclxaccessibletoolboxitem.cxx')
-rw-r--r-- | accessibility/source/standard/vclxaccessibletoolboxitem.cxx | 11 |
1 files changed, 4 insertions, 7 deletions
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 ); |