summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorMarcos Paulo de Souza <marcos.souza.org@gmail.com>2013-01-05 12:13:57 -0200
committerLuboš Luňák <l.lunak@suse.cz>2013-01-07 13:59:02 +0000
commitaea18e985ed07691bca39aae3dc3c58d33ae3dd5 (patch)
treeb81e5b499de00bd8a63797b41c0645d7ff911a49 /chart2
parentdbfc8777bf73872d1b96f956b9e778d9099d52b3 (diff)
fdo#57950: Remove some chained appends in chart2 and more
Removed a not needed variable; Removed some rt:: prefixes Change-Id: I24a7a0c5adcee17eab4c9d6442b472a5992f261e Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/1549 Reviewed-by: Luboš Luňák <l.lunak@suse.cz> Tested-by: Luboš Luňák <l.lunak@suse.cz>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/accessibility/AccessibleBase.cxx11
-rw-r--r--chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx20
-rw-r--r--chart2/source/tools/DataSeriesHelper.cxx1
-rw-r--r--chart2/source/tools/MeanValueRegressionCurveCalculator.cxx7
4 files changed, 17 insertions, 22 deletions
diff --git a/chart2/source/controller/accessibility/AccessibleBase.cxx b/chart2/source/controller/accessibility/AccessibleBase.cxx
index 9c38b847e463..86716738669a 100644
--- a/chart2/source/controller/accessibility/AccessibleBase.cxx
+++ b/chart2/source/controller/accessibility/AccessibleBase.cxx
@@ -578,13 +578,10 @@ Reference< XAccessible > AccessibleBase::ImplGetAccessibleChildById( sal_Int32 i
i < 0 ||
static_cast< ChildListVectorType::size_type >( i ) >= m_aChildList.size() )
{
- OUStringBuffer aBuf;
- aBuf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "Index " ));
- aBuf.append( i );
- aBuf.appendAscii( RTL_CONSTASCII_STRINGPARAM( " is invalid for range [ 0, " ));
- aBuf.append( static_cast< sal_Int32 >( m_aChildList.size() - 1 ) );
- aBuf.appendAscii( RTL_CONSTASCII_STRINGPARAM( " ]" ) );
- lang::IndexOutOfBoundsException aEx( aBuf.makeStringAndClear(),
+ OUString aBuf = "Index " + OUString::valueOf( i ) + " is invalid for range [ 0, " +
+ OUString::valueOf( static_cast< sal_Int32 >( m_aChildList.size() - 1 ) ) +
+ " ]";
+ lang::IndexOutOfBoundsException aEx( aBuf,
const_cast< ::cppu::OWeakObject * >(
static_cast< const ::cppu::OWeakObject * >( this )));
throw aEx;
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
index 16a0d24f858d..4671811d74c1 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
@@ -149,17 +149,17 @@ void LightSourceInfo::initButtonFromSource()
namespace
{
- rtl::OUString lcl_makeColorName( Color rColor )
+ OUString lcl_makeColorName( Color rColor )
{
- rtl::OUStringBuffer aStr(SVX_RESSTR(RID_SVXFLOAT3D_FIX_R));
- aStr.append((sal_Int32)rColor.GetRed());
- aStr.append(' ');
- aStr.append(SVX_RESSTR(RID_SVXFLOAT3D_FIX_G));
- aStr.append((sal_Int32)rColor.GetGreen());
- aStr.append(' ');
- aStr.append(SVX_RESSTR(RID_SVXFLOAT3D_FIX_B));
- aStr.append((sal_Int32)rColor.GetBlue());
- return aStr.makeStringAndClear();
+ OUString aStr = SVX_RESSTR(RID_SVXFLOAT3D_FIX_R) +
+ OUString::valueOf((sal_Int32)rColor.GetRed()) +
+ " " +
+ SVX_RESSTR(RID_SVXFLOAT3D_FIX_G) +
+ OUString::valueOf((sal_Int32)rColor.GetGreen()) +
+ " " +
+ SVX_RESSTR(RID_SVXFLOAT3D_FIX_B) +
+ OUString::valueOf((sal_Int32)rColor.GetBlue());
+ return aStr;
}
void lcl_selectColor( ColorListBox& rListBox, const Color& rColor )
{
diff --git a/chart2/source/tools/DataSeriesHelper.cxx b/chart2/source/tools/DataSeriesHelper.cxx
index b5fa3055997f..15ea9151e1e2 100644
--- a/chart2/source/tools/DataSeriesHelper.cxx
+++ b/chart2/source/tools/DataSeriesHelper.cxx
@@ -273,7 +273,6 @@ OUString lcl_getDataSequenceLabel( const Reference< chart2::data::XDataSequence
Sequence< OUString > aSeq( xTextSeq->getTextualData());
const sal_Int32 nMax = aSeq.getLength() - 1;
- OUString aVal;
OUStringBuffer aBuf;
for( sal_Int32 i = 0; i <= nMax; ++i )
diff --git a/chart2/source/tools/MeanValueRegressionCurveCalculator.cxx b/chart2/source/tools/MeanValueRegressionCurveCalculator.cxx
index 3caef43c1866..0551cbdbb901 100644
--- a/chart2/source/tools/MeanValueRegressionCurveCalculator.cxx
+++ b/chart2/source/tools/MeanValueRegressionCurveCalculator.cxx
@@ -123,11 +123,10 @@ OUString MeanValueRegressionCurveCalculator::ImplGetRepresentation(
const uno::Reference< util::XNumberFormatter >& xNumFormatter,
::sal_Int32 nNumberFormatKey ) const
{
- OUStringBuffer aBuf( C2U( "f(x) = " ));
+ OUString aBuf = "f(x) = " +
+ getFormattedString( xNumFormatter, nNumberFormatKey, m_fMeanValue );
- aBuf.append( getFormattedString( xNumFormatter, nNumberFormatKey, m_fMeanValue ));
-
- return aBuf.makeStringAndClear();
+ return aBuf;
}
} // namespace chart