summaryrefslogtreecommitdiff
path: root/chart2/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-04-15 12:25:12 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-04-19 18:31:10 +0200
commitab699bfdb3375f7142a50cc35322e2924c9e5945 (patch)
tree8f935378a1ee272f4316a50f902e214d50ce8cc6 /chart2/source
parentf393785a146433cccd5bbecf1e49b5f1485ec5a7 (diff)
new loplugin:stringviewvar looks for OUString vars that can be
... that can be string_view Change-Id: I0ddf66725e08b58e866a764f57200dd188b9f639 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133066 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source')
-rw-r--r--chart2/source/controller/accessibility/AccessibleBase.cxx2
-rw-r--r--chart2/source/controller/main/ChartController_Properties.cxx2
-rw-r--r--chart2/source/controller/main/ChartController_Window.cxx4
-rw-r--r--chart2/source/controller/main/DragMethod_PieSegment.cxx2
-rw-r--r--chart2/source/tools/ObjectIdentifier.cxx16
5 files changed, 13 insertions, 13 deletions
diff --git a/chart2/source/controller/accessibility/AccessibleBase.cxx b/chart2/source/controller/accessibility/AccessibleBase.cxx
index 904c91e99365..4def612c215e 100644
--- a/chart2/source/controller/accessibility/AccessibleBase.cxx
+++ b/chart2/source/controller/accessibility/AccessibleBase.cxx
@@ -719,7 +719,7 @@ Color AccessibleBase::getColor( eColorType eColType )
if( eType == OBJECTTYPE_LEGEND_ENTRY )
{
// for colors get the data series/point properties
- OUString aParentParticle( ObjectIdentifier::getFullParentParticle( aObjectCID ));
+ std::u16string_view aParentParticle( ObjectIdentifier::getFullParentParticle( aObjectCID ));
aObjectCID = ObjectIdentifier::createClassifiedIdentifierForParticle( aParentParticle );
}
diff --git a/chart2/source/controller/main/ChartController_Properties.cxx b/chart2/source/controller/main/ChartController_Properties.cxx
index b04e43a82cfa..99c768da772e 100644
--- a/chart2/source/controller/main/ChartController_Properties.cxx
+++ b/chart2/source/controller/main/ChartController_Properties.cxx
@@ -678,7 +678,7 @@ OUString lcl_getFormatCIDforSelectedCID( const OUString& rSelectedCID )
// some legend entries are handled as if they were data series
if( eObjectType==OBJECTTYPE_LEGEND_ENTRY )
{
- OUString aParentParticle( ObjectIdentifier::getFullParentParticle( rSelectedCID ) );
+ std::u16string_view aParentParticle( ObjectIdentifier::getFullParentParticle( rSelectedCID ) );
aFormatCID = ObjectIdentifier::createClassifiedIdentifierForParticle( aParentParticle );
}
diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx
index a6bae9b002a7..8808da531bd2 100644
--- a/chart2/source/controller/main/ChartController_Window.cxx
+++ b/chart2/source/controller/main/ChartController_Window.cxx
@@ -711,7 +711,7 @@ void ChartController::execute_MouseButtonDown( const MouseEvent& rMEvt )
}
else
{
- OUString aDragMethodServiceName( ObjectIdentifier::getDragMethodServiceName( m_aSelection.getSelectedCID() ) );
+ std::u16string_view aDragMethodServiceName( ObjectIdentifier::getDragMethodServiceName( m_aSelection.getSelectedCID() ) );
if( aDragMethodServiceName == ObjectIdentifier::getPieSegmentDragMethodServiceName() )
pDragMethod = new DragMethod_PieSegment( *pDrawViewWrapper, m_aSelection.getSelectedCID(), getChartModel() );
}
@@ -1420,7 +1420,7 @@ bool ChartController::execute_KeyInput( const KeyEvent& rKEvt )
nCode == KEY_DOWN )
{
bDrag = true;
- OUString aParameter( ObjectIdentifier::getDragParameterString( m_aSelection.getSelectedCID() ));
+ std::u16string_view aParameter( ObjectIdentifier::getDragParameterString( m_aSelection.getSelectedCID() ));
sal_Int32 nOffsetPercentDummy( 0 );
awt::Point aMinimumPosition( 0, 0 );
awt::Point aMaximumPosition( 0, 0 );
diff --git a/chart2/source/controller/main/DragMethod_PieSegment.cxx b/chart2/source/controller/main/DragMethod_PieSegment.cxx
index 3adc6103e6ab..0859ada4ab23 100644
--- a/chart2/source/controller/main/DragMethod_PieSegment.cxx
+++ b/chart2/source/controller/main/DragMethod_PieSegment.cxx
@@ -46,7 +46,7 @@ DragMethod_PieSegment::DragMethod_PieSegment( DrawViewWrapper& rDrawViewWrapper
, m_aDragDirection(1000.0,1000.0)
, m_fDragRange( 1.0 )
{
- OUString aParameter( ObjectIdentifier::getDragParameterString( m_aObjectCID ) );
+ std::u16string_view aParameter( ObjectIdentifier::getDragParameterString( m_aObjectCID ) );
sal_Int32 nOffsetPercent(0);
awt::Point aMinimumPosition(0,0);
diff --git a/chart2/source/tools/ObjectIdentifier.cxx b/chart2/source/tools/ObjectIdentifier.cxx
index e1b05d023630..a117873b6e38 100644
--- a/chart2/source/tools/ObjectIdentifier.cxx
+++ b/chart2/source/tools/ObjectIdentifier.cxx
@@ -302,10 +302,10 @@ OUString ObjectIdentifier::createClassifiedIdentifierForObject(
OUString aRet;
enum ObjectType eObjectType = OBJECTTYPE_UNKNOWN;
- const OUString aObjectID;
+ const std::u16string_view aObjectID;
OUString aParentParticle;
- const OUString aDragMethodServiceName;
- const OUString aDragParameterString;
+ const std::u16string_view aDragMethodServiceName;
+ const std::u16string_view aDragParameterString;
try
{
@@ -697,8 +697,8 @@ bool ObjectIdentifier::isDragableObject( std::u16string_view rClassifiedIdentifi
bReturn = true;
break;
default:
- OUString aDragMethodServiceName( ObjectIdentifier::getDragMethodServiceName( rClassifiedIdentifier ) );
- bReturn = !aDragMethodServiceName.isEmpty();
+ std::u16string_view aDragMethodServiceName( ObjectIdentifier::getDragMethodServiceName( rClassifiedIdentifier ) );
+ bReturn = !aDragMethodServiceName.empty();
break;
}
return bReturn;
@@ -761,10 +761,10 @@ bool ObjectIdentifier::areSiblings( const OUString& rCID1, const OUString& rCID2
bRet=false;
else
{
- OUString aParent1( ObjectIdentifier::getFullParentParticle( rCID1 ) );
- if( !aParent1.isEmpty() )
+ std::u16string_view aParent1( ObjectIdentifier::getFullParentParticle( rCID1 ) );
+ if( !aParent1.empty() )
{
- OUString aParent2( ObjectIdentifier::getFullParentParticle( rCID2 ) );
+ std::u16string_view aParent2( ObjectIdentifier::getFullParentParticle( rCID2 ) );
bRet=aParent1 == aParent2;
}
//legend entries are special: