chart2/inc/SpecialUnicodes.hxx | 2 -- chart2/source/controller/dialogs/ObjectNameProvider.cxx | 6 ++---- chart2/source/tools/MeanValueRegressionCurveCalculator.cxx | 3 +-- chart2/source/tools/RegressionCurveCalculator.cxx | 6 ++---- chart2/source/view/charttypes/VSeriesPlotter.cxx | 4 ++-- 5 files changed, 7 insertions(+), 14 deletions(-)
New commits: commit 3b94a463c5dad278b3d8d8c19d4572ba603c3943 Author: Tor Lillqvist <t...@collabora.com> Date: Wed Feb 8 13:12:44 2017 +0200 The string "###" can be written as such, no need for a Special Const Variable Change-Id: Ib9737acc8e0a9845fc03ed2c7de7969cef41f27c diff --git a/chart2/inc/SpecialUnicodes.hxx b/chart2/inc/SpecialUnicodes.hxx index bbd1df6..446ea49 100644 --- a/chart2/inc/SpecialUnicodes.hxx +++ b/chart2/inc/SpecialUnicodes.hxx @@ -11,7 +11,6 @@ #define INCLUDED_CHART2_INC_SPECIALUNICODES_HXX const sal_Unicode aMinusSign = 0x2212; -const OUString aHashString ("###"); const sal_Unicode aSuperscriptFigures[10]={ 0x2070, 0x00B9, 0x00B2, 0x00B3, 0x2074, 0x2075, 0x2076, 0x2077, 0x2078, 0x2079 }; #endif diff --git a/chart2/source/tools/MeanValueRegressionCurveCalculator.cxx b/chart2/source/tools/MeanValueRegressionCurveCalculator.cxx index 592a201..6d662c1 100644 --- a/chart2/source/tools/MeanValueRegressionCurveCalculator.cxx +++ b/chart2/source/tools/MeanValueRegressionCurveCalculator.cxx @@ -23,7 +23,6 @@ #include <osl/diagnose.h> #include <rtl/math.hxx> #include <rtl/ustrbuf.hxx> -#include <SpecialUnicodes.hxx> using namespace ::com::sun::star; @@ -121,7 +120,7 @@ OUString MeanValueRegressionCurveCalculator::ImplGetRepresentation( { *pFormulaLength -= aBuf.getLength(); if ( *pFormulaLength <= 0 ) - return aHashString; + return OUString("###"); } return ( aBuf + getFormattedString( xNumFormatter, nNumberFormatKey, m_fMeanValue, pFormulaLength ) ); } diff --git a/chart2/source/tools/RegressionCurveCalculator.cxx b/chart2/source/tools/RegressionCurveCalculator.cxx index 4911078..b24df25 100644 --- a/chart2/source/tools/RegressionCurveCalculator.cxx +++ b/chart2/source/tools/RegressionCurveCalculator.cxx @@ -30,8 +30,6 @@ #include <comphelper/numbers.hxx> #include <comphelper/extract.hxx> -#include <SpecialUnicodes.hxx> - using namespace ::com::sun::star; using ::com::sun::star::uno::Reference; @@ -90,7 +88,7 @@ OUString RegressionCurveCalculator::getFormattedString( double fNumber, sal_Int32* pStringLength /* = nullptr */ ) { if ( pStringLength && *pStringLength <= 0 ) - return aHashString; + return OUString("###"); OUString aResult; if( xNumFormatter.is() ) commit 4df2bc90cc7bef84a826b8d261c08e71c3e1887d Author: Tor Lillqvist <t...@collabora.com> Date: Wed Feb 8 13:04:02 2017 +0200 A newline is not that special or hard to remember Change-Id: I2960a59283a5a04c5c804a57e43bdb633c0e45cf diff --git a/chart2/inc/SpecialUnicodes.hxx b/chart2/inc/SpecialUnicodes.hxx index 22ddc35..bbd1df6 100644 --- a/chart2/inc/SpecialUnicodes.hxx +++ b/chart2/inc/SpecialUnicodes.hxx @@ -11,7 +11,6 @@ #define INCLUDED_CHART2_INC_SPECIALUNICODES_HXX const sal_Unicode aMinusSign = 0x2212; -const OUString aNewLine ("\n"); const OUString aHashString ("###"); const sal_Unicode aSuperscriptFigures[10]={ 0x2070, 0x00B9, 0x00B2, 0x00B3, 0x2074, 0x2075, 0x2076, 0x2077, 0x2078, 0x2079 }; diff --git a/chart2/source/controller/dialogs/ObjectNameProvider.cxx b/chart2/source/controller/dialogs/ObjectNameProvider.cxx index 6e112ae..157ca91 100644 --- a/chart2/source/controller/dialogs/ObjectNameProvider.cxx +++ b/chart2/source/controller/dialogs/ObjectNameProvider.cxx @@ -487,10 +487,8 @@ OUString ObjectNameProvider::getHelpText( const OUString& rObjectCID, const Refe { if( bVerbose ) { - OUString aNewLine( "\n" ); - - aRet= SCH_RESSTR(STR_TIP_DATAPOINT_INDEX) + aNewLine - + SCH_RESSTR(STR_TIP_DATASERIES) + aNewLine + aRet= SCH_RESSTR(STR_TIP_DATAPOINT_INDEX) + "\n" + + SCH_RESSTR(STR_TIP_DATASERIES) + "\n" + SCH_RESSTR(STR_TIP_DATAPOINT_VALUES); } else diff --git a/chart2/source/tools/RegressionCurveCalculator.cxx b/chart2/source/tools/RegressionCurveCalculator.cxx index 5174b3d..4911078 100644 --- a/chart2/source/tools/RegressionCurveCalculator.cxx +++ b/chart2/source/tools/RegressionCurveCalculator.cxx @@ -200,7 +200,7 @@ void RegressionCurveCalculator::addStringToEquation( { if ( pMaxWidth && ( nLineLength + aAddString.getLength() > *pMaxWidth ) ) { // wrap line - aStrEquation.append( aNewLine + " " ); // start new line with a blank + aStrEquation.append( "\n " ); // start new line with a blank nLineLength = 1; } aStrEquation.append( aAddString ); diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx index 35bbe6f..afbe531 100644 --- a/chart2/source/view/charttypes/VSeriesPlotter.cxx +++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx @@ -1214,7 +1214,7 @@ sal_Int32 lcl_getOUStringMaxLineLength ( OUStringBuffer& aString ) for ( sal_Int32 i=0; i<nStringLength; i++ ) { - sal_Int32 indexSep = aString.indexOf( aNewLine, i ); + sal_Int32 indexSep = aString.indexOf( "\n", i ); if ( indexSep < 0 ) indexSep = nStringLength; sal_Int32 nLineLength = indexSep - i; @@ -1281,7 +1281,7 @@ void VSeriesPlotter::createRegressionCurveEquationShapes( if( bShowCorrCoeff ) { - aFormula.append( aNewLine ); + aFormula.append( "\n" ); } } if( bShowCorrCoeff ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits