[Libreoffice-commits] .: chart2/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Jan 7 05:59:21 PST 2013
chart2/source/controller/accessibility/AccessibleBase.cxx | 11 ++----
chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx | 20 +++++------
chart2/source/tools/DataSeriesHelper.cxx | 1
chart2/source/tools/MeanValueRegressionCurveCalculator.cxx | 7 +--
4 files changed, 17 insertions(+), 22 deletions(-)
New commits:
commit aea18e985ed07691bca39aae3dc3c58d33ae3dd5
Author: Marcos Paulo de Souza <marcos.souza.org at gmail.com>
Date: Sat Jan 5 12:13:57 2013 -0200
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 at gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/1549
Reviewed-by: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Tested-by: LuboÅ¡ LuÅák <l.lunak at suse.cz>
diff --git a/chart2/source/controller/accessibility/AccessibleBase.cxx b/chart2/source/controller/accessibility/AccessibleBase.cxx
index 9c38b84..8671673 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 16a0d24..4671811 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 b5fa305..15ea915 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 3caef43..0551cbd 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
More information about the Libreoffice-commits
mailing list