diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-02-07 15:32:07 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-02-07 18:43:30 +0100 |
commit | 2b04d0a17f74a5e8b2f81521710ee91d4daa267f (patch) | |
tree | 4d8bedfc45bf8ec1ca80596b0213a72a816c4998 /accessibility/source/standard/vclxaccessiblemenuitem.cxx | |
parent | 115457292ff792b151994303e8bbbb2b9c98bd72 (diff) |
Avoid unnecessary heap allocation
Change-Id: I7bc1a0960cc100c51b90c50838a5ef620f3c763f
Diffstat (limited to 'accessibility/source/standard/vclxaccessiblemenuitem.cxx')
-rw-r--r-- | accessibility/source/standard/vclxaccessiblemenuitem.cxx | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/accessibility/source/standard/vclxaccessiblemenuitem.cxx b/accessibility/source/standard/vclxaccessiblemenuitem.cxx index a8f76edb4f3f..cc426a9d6561 100644 --- a/accessibility/source/standard/vclxaccessiblemenuitem.cxx +++ b/accessibility/source/standard/vclxaccessiblemenuitem.cxx @@ -36,9 +36,6 @@ #include <vcl/menu.hxx> #include <vcl/unohelp2.hxx> -#include <memory> - - using namespace ::com::sun::star::accessibility; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; @@ -239,7 +236,6 @@ Sequence< PropertyValue > VCLXAccessibleMenuItem::getCharacterAttributes( sal_In { OExternalLockGuard aGuard( this ); - Sequence< PropertyValue > aValues; OUString sText( implGetText() ); if ( !implIsValidIndex( nIndex, sText.getLength() ) ) @@ -248,10 +244,8 @@ Sequence< PropertyValue > VCLXAccessibleMenuItem::getCharacterAttributes( sal_In Font aFont = Application::GetSettings().GetStyleSettings().GetMenuFont(); sal_Int32 nBackColor = getBackground(); sal_Int32 nColor = getForeground(); - ::std::auto_ptr< CharacterAttributesHelper > pHelper( new CharacterAttributesHelper( aFont, nBackColor, nColor ) ); - aValues = pHelper->GetCharacterAttributes( aRequestedAttributes ); - - return aValues; + return CharacterAttributesHelper( aFont, nBackColor, nColor ) + .GetCharacterAttributes( aRequestedAttributes ); } // ----------------------------------------------------------------------------- |