diff options
author | Noel Grandin <noel@peralex.com> | 2016-04-12 16:39:03 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-04-18 07:37:31 +0000 |
commit | 789055bc2acb4c71483fd60ea258d158bd5aec10 (patch) | |
tree | 7849de841a71f667a30b2a971ad0c3d406110396 /oox | |
parent | 150ac9cf05ed9da6a2af5bc3f820280fd853e519 (diff) |
clang-tidy performance-unnecessary-copy-initialization
probably not much performance benefit, but it sure is good at
identifying leftover intermediate variables from previous
refactorings.
Change-Id: I3ce16fe496ac2733c1cb0a35f74c0fc9193cc657
Reviewed-on: https://gerrit.libreoffice.org/24026
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/drawingml/shape3dproperties.cxx | 2 | ||||
-rw-r--r-- | oox/source/ole/axcontrol.cxx | 32 |
2 files changed, 16 insertions, 18 deletions
diff --git a/oox/source/drawingml/shape3dproperties.cxx b/oox/source/drawingml/shape3dproperties.cxx index 00e6bb59c55a..cf1930afdafe 100644 --- a/oox/source/drawingml/shape3dproperties.cxx +++ b/oox/source/drawingml/shape3dproperties.cxx @@ -323,7 +323,7 @@ css::uno::Sequence< css::beans::PropertyValue > Shape3DProperties::getColorAttri const Color& rColor, const GraphicHelper& rGraphicHelper, sal_Int32 rPhClr ) { css::uno::Sequence<css::beans::PropertyValue> aSeq(2); - OUString sColorScheme = rColor.getSchemeName(); + const OUString& sColorScheme = rColor.getSchemeName(); if( sColorScheme.isEmpty() ) { // RGB color and transparency value diff --git a/oox/source/ole/axcontrol.cxx b/oox/source/ole/axcontrol.cxx index 7ba5d357a6a8..64993a28bb1b 100644 --- a/oox/source/ole/axcontrol.cxx +++ b/oox/source/ole/axcontrol.cxx @@ -2616,23 +2616,21 @@ EmbeddedControl::~EmbeddedControl() ControlModelBase* EmbeddedControl::createModelFromGuid( const OUString& rClassId ) { - OUString aClassId = rClassId;//.toAsciiUpperCase(); - - if( aClassId.equalsIgnoreAsciiCase( AX_GUID_COMMANDBUTTON ) ) return &createModel< AxCommandButtonModel >(); - if( aClassId.equalsIgnoreAsciiCase( AX_GUID_LABEL ) ) return &createModel< AxLabelModel >(); - if( aClassId.equalsIgnoreAsciiCase( AX_GUID_IMAGE ) ) return &createModel< AxImageModel >(); - if( aClassId.equalsIgnoreAsciiCase( AX_GUID_TOGGLEBUTTON ) ) return &createModel< AxToggleButtonModel >(); - if( aClassId.equalsIgnoreAsciiCase( AX_GUID_CHECKBOX ) ) return &createModel< AxCheckBoxModel >(); - if( aClassId.equalsIgnoreAsciiCase( AX_GUID_OPTIONBUTTON ) ) return &createModel< AxOptionButtonModel >(); - if( aClassId.equalsIgnoreAsciiCase( AX_GUID_TEXTBOX ) ) return &createModel< AxTextBoxModel >(); - if( aClassId.equalsIgnoreAsciiCase( AX_GUID_LISTBOX ) ) return &createModel< AxListBoxModel >(); - if( aClassId.equalsIgnoreAsciiCase( AX_GUID_COMBOBOX ) ) return &createModel< AxComboBoxModel >(); - if( aClassId.equalsIgnoreAsciiCase( AX_GUID_SPINBUTTON ) ) return &createModel< AxSpinButtonModel >(); - if( aClassId.equalsIgnoreAsciiCase( AX_GUID_SCROLLBAR ) ) return &createModel< AxScrollBarModel >(); - if( aClassId.equalsIgnoreAsciiCase( AX_GUID_FRAME ) ) return &createModel< AxFrameModel >(); - if( aClassId.equalsIgnoreAsciiCase( COMCTL_GUID_SCROLLBAR_60 ) ) return &createModel< ComCtlScrollBarModel >( COMCTL_VERSION_60 ); - if( aClassId.equalsIgnoreAsciiCase( HTML_GUID_SELECT ) ) return &createModel< HtmlSelectModel >(); - if( aClassId.equalsIgnoreAsciiCase( HTML_GUID_TEXTBOX ) ) return &createModel< HtmlTextBoxModel >(); + if( rClassId.equalsIgnoreAsciiCase( AX_GUID_COMMANDBUTTON ) ) return &createModel< AxCommandButtonModel >(); + if( rClassId.equalsIgnoreAsciiCase( AX_GUID_LABEL ) ) return &createModel< AxLabelModel >(); + if( rClassId.equalsIgnoreAsciiCase( AX_GUID_IMAGE ) ) return &createModel< AxImageModel >(); + if( rClassId.equalsIgnoreAsciiCase( AX_GUID_TOGGLEBUTTON ) ) return &createModel< AxToggleButtonModel >(); + if( rClassId.equalsIgnoreAsciiCase( AX_GUID_CHECKBOX ) ) return &createModel< AxCheckBoxModel >(); + if( rClassId.equalsIgnoreAsciiCase( AX_GUID_OPTIONBUTTON ) ) return &createModel< AxOptionButtonModel >(); + if( rClassId.equalsIgnoreAsciiCase( AX_GUID_TEXTBOX ) ) return &createModel< AxTextBoxModel >(); + if( rClassId.equalsIgnoreAsciiCase( AX_GUID_LISTBOX ) ) return &createModel< AxListBoxModel >(); + if( rClassId.equalsIgnoreAsciiCase( AX_GUID_COMBOBOX ) ) return &createModel< AxComboBoxModel >(); + if( rClassId.equalsIgnoreAsciiCase( AX_GUID_SPINBUTTON ) ) return &createModel< AxSpinButtonModel >(); + if( rClassId.equalsIgnoreAsciiCase( AX_GUID_SCROLLBAR ) ) return &createModel< AxScrollBarModel >(); + if( rClassId.equalsIgnoreAsciiCase( AX_GUID_FRAME ) ) return &createModel< AxFrameModel >(); + if( rClassId.equalsIgnoreAsciiCase( COMCTL_GUID_SCROLLBAR_60 ) ) return &createModel< ComCtlScrollBarModel >( COMCTL_VERSION_60 ); + if( rClassId.equalsIgnoreAsciiCase( HTML_GUID_SELECT ) ) return &createModel< HtmlSelectModel >(); + if( rClassId.equalsIgnoreAsciiCase( HTML_GUID_TEXTBOX ) ) return &createModel< HtmlTextBoxModel >(); mxModel.reset(); return nullptr; |