summaryrefslogtreecommitdiff
path: root/chart2/source/view/main
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-11-18 10:10:40 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-11-24 09:45:04 +0100
commitbb06f51308428500c9c8d11ae05f0aa03ecc179c (patch)
treeb18620e8572ed6d4c43c8605660d59f5f7a7e531 /chart2/source/view/main
parent42e8e16cf93dcf944e5c1106f76aaa32057c0397 (diff)
loplugin:stringviewparam extend to comparison operators
which means that some call sites have to change to use unicode string literals i.e. u"foo" instead of "foo" Change-Id: Ie51c3adf56d343dd1d1710777f9d2a43ee66221c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/view/main')
-rw-r--r--chart2/source/view/main/LabelPositionHelper.cxx10
-rw-r--r--chart2/source/view/main/PropertyMapper.cxx2
-rw-r--r--chart2/source/view/main/VLegend.cxx2
-rw-r--r--chart2/source/view/main/VLegendSymbolFactory.cxx2
4 files changed, 8 insertions, 8 deletions
diff --git a/chart2/source/view/main/LabelPositionHelper.cxx b/chart2/source/view/main/LabelPositionHelper.cxx
index 35d19ebc5ab5..74fd1ed78174 100644
--- a/chart2/source/view/main/LabelPositionHelper.cxx
+++ b/chart2/source/view/main/LabelPositionHelper.cxx
@@ -61,7 +61,7 @@ void LabelPositionHelper::changeTextAdjustment( tAnySequence& rPropValues, const
eHorizontalAdjust = drawing::TextHorizontalAdjust_LEFT;
else if( eAlignment==LABEL_ALIGN_LEFT || eAlignment==LABEL_ALIGN_LEFT_TOP || eAlignment==LABEL_ALIGN_LEFT_BOTTOM )
eHorizontalAdjust = drawing::TextHorizontalAdjust_RIGHT;
- uno::Any* pHorizontalAdjustAny = PropertyMapper::getValuePointer(rPropValues,rPropNames,"TextHorizontalAdjust");
+ uno::Any* pHorizontalAdjustAny = PropertyMapper::getValuePointer(rPropValues,rPropNames,u"TextHorizontalAdjust");
if(pHorizontalAdjustAny)
*pHorizontalAdjustAny <<= eHorizontalAdjust;
}
@@ -73,7 +73,7 @@ void LabelPositionHelper::changeTextAdjustment( tAnySequence& rPropValues, const
eVerticalAdjust = drawing::TextVerticalAdjust_BOTTOM;
else if( eAlignment==LABEL_ALIGN_BOTTOM || eAlignment==LABEL_ALIGN_RIGHT_BOTTOM || eAlignment==LABEL_ALIGN_LEFT_BOTTOM )
eVerticalAdjust = drawing::TextVerticalAdjust_TOP;
- uno::Any* pVerticalAdjustAny = PropertyMapper::getValuePointer(rPropValues,rPropNames,"TextVerticalAdjust");
+ uno::Any* pVerticalAdjustAny = PropertyMapper::getValuePointer(rPropValues,rPropNames,u"TextVerticalAdjust");
if(pVerticalAdjustAny)
*pVerticalAdjustAny <<= eVerticalAdjust;
}
@@ -101,11 +101,11 @@ void LabelPositionHelper::doDynamicFontResize( tAnySequence& rPropValues
awt::Size aOldReferenceSize;
if( xAxisModelProps->getPropertyValue( "ReferencePageSize") >>= aOldReferenceSize )
{
- uno::Any* pAOldAndNewFontHeightAny = PropertyMapper::getValuePointer( rPropValues, rPropNames, "CharHeight" );
+ uno::Any* pAOldAndNewFontHeightAny = PropertyMapper::getValuePointer( rPropValues, rPropNames, u"CharHeight" );
lcl_doDynamicFontResize( pAOldAndNewFontHeightAny, aOldReferenceSize, rNewReferenceSize );
- pAOldAndNewFontHeightAny = PropertyMapper::getValuePointer( rPropValues, rPropNames, "CharHeightAsian" );
+ pAOldAndNewFontHeightAny = PropertyMapper::getValuePointer( rPropValues, rPropNames, u"CharHeightAsian" );
lcl_doDynamicFontResize( pAOldAndNewFontHeightAny, aOldReferenceSize, rNewReferenceSize );
- pAOldAndNewFontHeightAny = PropertyMapper::getValuePointer( rPropValues, rPropNames, "CharHeightComplex" );
+ pAOldAndNewFontHeightAny = PropertyMapper::getValuePointer( rPropValues, rPropNames, u"CharHeightComplex" );
lcl_doDynamicFontResize( pAOldAndNewFontHeightAny, aOldReferenceSize, rNewReferenceSize );
}
}
diff --git a/chart2/source/view/main/PropertyMapper.cxx b/chart2/source/view/main/PropertyMapper.cxx
index 8611cef5d43a..c7327974249a 100644
--- a/chart2/source/view/main/PropertyMapper.cxx
+++ b/chart2/source/view/main/PropertyMapper.cxx
@@ -159,7 +159,7 @@ void PropertyMapper::getMultiPropertyListsFromValueMap(
uno::Any* PropertyMapper::getValuePointer( tAnySequence& rPropValues
, const tNameSequence& rPropNames
- , const OUString& rPropName )
+ , std::u16string_view rPropName )
{
sal_Int32 nCount = rPropNames.getLength();
for( sal_Int32 nN = 0; nN < nCount; nN++ )
diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx
index 2a2048c35016..353fd4d9630c 100644
--- a/chart2/source/view/main/VLegend.cxx
+++ b/chart2/source/view/main/VLegend.cxx
@@ -291,7 +291,7 @@ awt::Size lcl_placeLegendEntries(
const sal_Int32 nSymbolToTextDistance = static_cast< sal_Int32 >( std::max( 100.0, fViewFontSize * 0.22 ) );//minimum 1mm
const sal_Int32 nSymbolPlusDistanceWidth = rMaxSymbolExtent.Width + nSymbolToTextDistance;
sal_Int32 nMaxTextWidth = rRemainingSpace.Width - nSymbolPlusDistanceWidth;
- uno::Any* pFrameWidthAny = PropertyMapper::getValuePointer( rTextProperties.second, rTextProperties.first, "TextMaximumFrameWidth");
+ uno::Any* pFrameWidthAny = PropertyMapper::getValuePointer( rTextProperties.second, rTextProperties.first, u"TextMaximumFrameWidth");
if(pFrameWidthAny)
{
if( eExpansion == css::chart::ChartLegendExpansion_HIGH )
diff --git a/chart2/source/view/main/VLegendSymbolFactory.cxx b/chart2/source/view/main/VLegendSymbolFactory.cxx
index 1ccc0de34324..8af21c374dba 100644
--- a/chart2/source/view/main/VLegendSymbolFactory.cxx
+++ b/chart2/source/view/main/VLegendSymbolFactory.cxx
@@ -60,7 +60,7 @@ void getPropNamesAndValues( const Reference< beans::XPropertySet >& xProp,
::chart::PropertyMapper::getMultiPropertyListsFromValueMap( rNames, rValues, aValueMap );
- uno::Any* pLineWidthAny = ::chart::PropertyMapper::getValuePointer(rValues,rNames,"LineWidth");
+ uno::Any* pLineWidthAny = ::chart::PropertyMapper::getValuePointer(rValues,rNames,u"LineWidth");
sal_Int32 nLineWidth = 0;
if( pLineWidthAny && (*pLineWidthAny>>=nLineWidth) )
{