Avoid unnecessary heap allocation
Change-Id: I7bc1a0960cc100c51b90c50838a5ef620f3c763f
This commit is contained in:
@@ -36,9 +36,6 @@
|
|||||||
#include <vcl/menu.hxx>
|
#include <vcl/menu.hxx>
|
||||||
#include <vcl/unohelp2.hxx>
|
#include <vcl/unohelp2.hxx>
|
||||||
|
|
||||||
#include <memory>
|
|
||||||
|
|
||||||
|
|
||||||
using namespace ::com::sun::star::accessibility;
|
using namespace ::com::sun::star::accessibility;
|
||||||
using namespace ::com::sun::star::uno;
|
using namespace ::com::sun::star::uno;
|
||||||
using namespace ::com::sun::star::beans;
|
using namespace ::com::sun::star::beans;
|
||||||
@@ -239,7 +236,6 @@ Sequence< PropertyValue > VCLXAccessibleMenuItem::getCharacterAttributes( sal_In
|
|||||||
{
|
{
|
||||||
OExternalLockGuard aGuard( this );
|
OExternalLockGuard aGuard( this );
|
||||||
|
|
||||||
Sequence< PropertyValue > aValues;
|
|
||||||
OUString sText( implGetText() );
|
OUString sText( implGetText() );
|
||||||
|
|
||||||
if ( !implIsValidIndex( nIndex, sText.getLength() ) )
|
if ( !implIsValidIndex( nIndex, sText.getLength() ) )
|
||||||
@@ -248,10 +244,8 @@ Sequence< PropertyValue > VCLXAccessibleMenuItem::getCharacterAttributes( sal_In
|
|||||||
Font aFont = Application::GetSettings().GetStyleSettings().GetMenuFont();
|
Font aFont = Application::GetSettings().GetStyleSettings().GetMenuFont();
|
||||||
sal_Int32 nBackColor = getBackground();
|
sal_Int32 nBackColor = getBackground();
|
||||||
sal_Int32 nColor = getForeground();
|
sal_Int32 nColor = getForeground();
|
||||||
::std::auto_ptr< CharacterAttributesHelper > pHelper( new CharacterAttributesHelper( aFont, nBackColor, nColor ) );
|
return CharacterAttributesHelper( aFont, nBackColor, nColor )
|
||||||
aValues = pHelper->GetCharacterAttributes( aRequestedAttributes );
|
.GetCharacterAttributes( aRequestedAttributes );
|
||||||
|
|
||||||
return aValues;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
@@ -35,9 +35,6 @@
|
|||||||
#include <vcl/status.hxx>
|
#include <vcl/status.hxx>
|
||||||
#include <vcl/controllayout.hxx>
|
#include <vcl/controllayout.hxx>
|
||||||
|
|
||||||
#include <memory>
|
|
||||||
|
|
||||||
|
|
||||||
using namespace ::com::sun::star::accessibility;
|
using namespace ::com::sun::star::accessibility;
|
||||||
using namespace ::com::sun::star::uno;
|
using namespace ::com::sun::star::uno;
|
||||||
using namespace ::com::sun::star::lang;
|
using namespace ::com::sun::star::lang;
|
||||||
@@ -516,8 +513,8 @@ Sequence< PropertyValue > VCLXAccessibleStatusBarItem::getCharacterAttributes( s
|
|||||||
Font aFont = m_pStatusBar->GetFont();
|
Font aFont = m_pStatusBar->GetFont();
|
||||||
sal_Int32 nBackColor = getBackground();
|
sal_Int32 nBackColor = getBackground();
|
||||||
sal_Int32 nColor = getForeground();
|
sal_Int32 nColor = getForeground();
|
||||||
::std::auto_ptr< CharacterAttributesHelper > pHelper( new CharacterAttributesHelper( aFont, nBackColor, nColor ) );
|
aValues = CharacterAttributesHelper( aFont, nBackColor, nColor )
|
||||||
aValues = pHelper->GetCharacterAttributes( aRequestedAttributes );
|
.GetCharacterAttributes( aRequestedAttributes );
|
||||||
}
|
}
|
||||||
|
|
||||||
return aValues;
|
return aValues;
|
||||||
|
@@ -35,9 +35,6 @@
|
|||||||
#include <vcl/tabctrl.hxx>
|
#include <vcl/tabctrl.hxx>
|
||||||
#include <vcl/tabpage.hxx>
|
#include <vcl/tabpage.hxx>
|
||||||
|
|
||||||
#include <memory>
|
|
||||||
|
|
||||||
|
|
||||||
using namespace ::com::sun::star::accessibility;
|
using namespace ::com::sun::star::accessibility;
|
||||||
using namespace ::com::sun::star::uno;
|
using namespace ::com::sun::star::uno;
|
||||||
using namespace ::com::sun::star::lang;
|
using namespace ::com::sun::star::lang;
|
||||||
@@ -590,8 +587,8 @@ Sequence< PropertyValue > VCLXAccessibleTabPage::getCharacterAttributes( sal_Int
|
|||||||
Font aFont = m_pTabControl->GetFont();
|
Font aFont = m_pTabControl->GetFont();
|
||||||
sal_Int32 nBackColor = getBackground();
|
sal_Int32 nBackColor = getBackground();
|
||||||
sal_Int32 nColor = getForeground();
|
sal_Int32 nColor = getForeground();
|
||||||
::std::auto_ptr< CharacterAttributesHelper > pHelper( new CharacterAttributesHelper( aFont, nBackColor, nColor ) );
|
aValues = CharacterAttributesHelper( aFont, nBackColor, nColor )
|
||||||
aValues = pHelper->GetCharacterAttributes( aRequestedAttributes );
|
.GetCharacterAttributes( aRequestedAttributes );
|
||||||
}
|
}
|
||||||
|
|
||||||
return aValues;
|
return aValues;
|
||||||
|
@@ -32,7 +32,6 @@
|
|||||||
#include <vcl/unohelp2.hxx>
|
#include <vcl/unohelp2.hxx>
|
||||||
#include <vcl/ctrl.hxx>
|
#include <vcl/ctrl.hxx>
|
||||||
|
|
||||||
#include <memory>
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
using namespace ::com::sun::star;
|
using namespace ::com::sun::star;
|
||||||
@@ -237,9 +236,8 @@ Sequence< PropertyValue > VCLXAccessibleTextComponent::getCharacterAttributes( s
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
::std::auto_ptr< CharacterAttributesHelper > pHelper( new CharacterAttributesHelper( aFont, nBackColor, nColor ) );
|
aValues = CharacterAttributesHelper( aFont, nBackColor, nColor )
|
||||||
|
.GetCharacterAttributes( aRequestedAttributes );
|
||||||
aValues = pHelper->GetCharacterAttributes( aRequestedAttributes );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return aValues;
|
return aValues;
|
||||||
|
Reference in New Issue
Block a user