summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-04-20 09:14:08 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-04-20 10:38:02 +0200
commit8e4453c2117b6c3bb15be6b949a0a8a43df66647 (patch)
tree73cf2208d992c5406777be3edc4efe5fc28963ce /xmloff
parent2ddf33f78fbc4ce0f49752e4adb9357c1fb69833 (diff)
use more FastAttributeIter::toView
Change-Id: I8a8ad5456fea349a45fca0aa468313cb04aa02f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133198 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/chart/SchXMLCalculationSettingsContext.cxx2
-rw-r--r--xmloff/source/chart/SchXMLPlotAreaContext.cxx2
-rw-r--r--xmloff/source/draw/animationimport.cxx20
-rw-r--r--xmloff/source/draw/animimp.cxx2
-rw-r--r--xmloff/source/draw/ximp3dscene.cxx4
-rw-r--r--xmloff/source/draw/ximpcustomshape.cxx12
-rw-r--r--xmloff/source/draw/ximpshap.cxx6
-rw-r--r--xmloff/source/draw/ximpshow.cxx2
-rw-r--r--xmloff/source/style/GradientStyle.cxx4
-rw-r--r--xmloff/source/style/HatchStyle.cxx2
-rw-r--r--xmloff/source/style/xmlnumfi.cxx2
-rw-r--r--xmloff/source/style/xmltabi.cxx4
-rw-r--r--xmloff/source/text/XMLTextFrameContext.cxx2
-rw-r--r--xmloff/source/text/XMLTextShapeImportHelper.cxx2
14 files changed, 33 insertions, 33 deletions
diff --git a/xmloff/source/chart/SchXMLCalculationSettingsContext.cxx b/xmloff/source/chart/SchXMLCalculationSettingsContext.cxx
index 07d828c5de4c..9365a791c901 100644
--- a/xmloff/source/chart/SchXMLCalculationSettingsContext.cxx
+++ b/xmloff/source/chart/SchXMLCalculationSettingsContext.cxx
@@ -44,7 +44,7 @@ SchXMLCalculationSettingsContext::SchXMLCalculationSettingsContext( SvXMLImport&
if ( aIter.getToken() == XML_ELEMENT(TABLE, XML_DATE_VALUE) )
{
util::DateTime aNullDate;
- ::sax::Converter::parseDateTime(aNullDate, aIter.toString());
+ ::sax::Converter::parseDateTime(aNullDate, aIter.toView());
m_aNullDate <<= aNullDate;
}
else
diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
index e1ca44503506..7e0fe67602f8 100644
--- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx
+++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
@@ -1211,7 +1211,7 @@ void SchXMLStatisticsObjectContext::startFastElement (sal_Int32 /*Element*/,
sAutoStyleName = aIter.toString();
break;
case XML_ELEMENT(CHART, XML_DIMENSION):
- bYError = aIter.toString() == "y";
+ bYError = aIter.toView() == "y";
break;
case XML_ELEMENT(CHART, XML_ERROR_UPPER_RANGE):
aPosRange = aIter.toString();
diff --git a/xmloff/source/draw/animationimport.cxx b/xmloff/source/draw/animationimport.cxx
index 094dc94f52c5..8a4cd27d24b5 100644
--- a/xmloff/source/draw/animationimport.cxx
+++ b/xmloff/source/draw/animationimport.cxx
@@ -115,8 +115,8 @@ public:
Any convertTarget( const OUString& rValue );
static Any convertPath( const OUString& rValue );
Any convertTiming( const OUString& rValue );
- static Sequence< double > convertKeyTimes( std::u16string_view rValue );
- static Sequence< TimeFilterPair > convertTimeFilter( std::u16string_view rValue );
+ static Sequence< double > convertKeyTimes( std::string_view rValue );
+ static Sequence< TimeFilterPair > convertTimeFilter( std::string_view rValue );
};
AnimationsImportHelperImpl::AnimationsImportHelperImpl( SvXMLImport& rImport )
@@ -378,7 +378,7 @@ Any AnimationsImportHelperImpl::convertTiming( const OUString& rValue )
return aAny;
}
-Sequence< double > AnimationsImportHelperImpl::convertKeyTimes( std::u16string_view rValue )
+Sequence< double > AnimationsImportHelperImpl::convertKeyTimes( std::string_view rValue )
{
const sal_Int32 nElements { comphelper::string::getTokenCount(rValue, ';') };
@@ -394,7 +394,7 @@ Sequence< double > AnimationsImportHelperImpl::convertKeyTimes( std::u16string_v
return aKeyTimes;
}
-Sequence< TimeFilterPair > AnimationsImportHelperImpl::convertTimeFilter( std::u16string_view rValue )
+Sequence< TimeFilterPair > AnimationsImportHelperImpl::convertTimeFilter( std::string_view rValue )
{
const sal_Int32 nElements { comphelper::string::getTokenCount(rValue, ';') };
@@ -405,14 +405,14 @@ Sequence< TimeFilterPair > AnimationsImportHelperImpl::convertTimeFilter( std::u
TimeFilterPair* pValues = aTimeFilter.getArray();
for (sal_Int32 nIndex = 0; nIndex >= 0; )
{
- const std::u16string_view aToken( o3tl::getToken(rValue, 0, ';', nIndex ) );
+ const std::string_view aToken( o3tl::getToken(rValue, 0, ';', nIndex ) );
size_t nPos = aToken.find( ',' );
- if( nPos != std::u16string_view::npos )
+ if( nPos != std::string_view::npos )
{
- pValues->Time = rtl_math_uStringToDouble(
+ pValues->Time = rtl_math_stringToDouble(
aToken.data(), aToken.data() + nPos, '.', 0, nullptr, nullptr);
- pValues->Progress = rtl_math_uStringToDouble(
+ pValues->Progress = rtl_math_stringToDouble(
aToken.data() + nPos + 1, aToken.data() + aToken.size(), '.', 0,
nullptr, nullptr);
}
@@ -842,7 +842,7 @@ void AnimationNodeContext::init_node( const css::uno::Reference< css::xml::sax:
case XML_ELEMENT(SMIL_SO52, XML_KEYTIMES):
{
if( xAnimate.is() )
- xAnimate->setKeyTimes( AnimationsImportHelperImpl::convertKeyTimes( aIter.toString() ) );
+ xAnimate->setKeyTimes( AnimationsImportHelperImpl::convertKeyTimes( aIter.toView() ) );
}
break;
@@ -908,7 +908,7 @@ void AnimationNodeContext::init_node( const css::uno::Reference< css::xml::sax:
case XML_ELEMENT(SMIL_SO52, XML_KEYSPLINES):
{
if( xAnimate.is() )
- xAnimate->setTimeFilter( AnimationsImportHelperImpl::convertTimeFilter( aIter.toString() ) );
+ xAnimate->setTimeFilter( AnimationsImportHelperImpl::convertTimeFilter( aIter.toView() ) );
}
break;
diff --git a/xmloff/source/draw/animimp.cxx b/xmloff/source/draw/animimp.cxx
index de189cab7d22..94dff040c288 100644
--- a/xmloff/source/draw/animimp.cxx
+++ b/xmloff/source/draw/animimp.cxx
@@ -455,7 +455,7 @@ XMLAnimationsEffectContext::XMLAnimationsEffectContext( SvXMLImport& rImport,
maShapeId = aIter.toString();
break;
case XML_ELEMENT(DRAW, XML_COLOR):
- ::sax::Converter::convertColor(maDimColor, aIter.toString());
+ ::sax::Converter::convertColor(maDimColor, aIter.toView());
break;
case XML_ELEMENT(PRESENTATION, XML_EFFECT):
diff --git a/xmloff/source/draw/ximp3dscene.cxx b/xmloff/source/draw/ximp3dscene.cxx
index c1519346db88..31da3652e3b0 100644
--- a/xmloff/source/draw/ximp3dscene.cxx
+++ b/xmloff/source/draw/ximp3dscene.cxx
@@ -53,13 +53,13 @@ SdXML3DLightContext::SdXML3DLightContext(
{
case XML_ELEMENT(DR3D, XML_DIFFUSE_COLOR):
{
- ::sax::Converter::convertColor(maDiffuseColor, aIter.toString());
+ ::sax::Converter::convertColor(maDiffuseColor, aIter.toView());
break;
}
case XML_ELEMENT(DR3D, XML_DIRECTION):
{
::basegfx::B3DVector aVal;
- SvXMLUnitConverter::convertB3DVector(aVal, aIter.toString());
+ SvXMLUnitConverter::convertB3DVector(aVal, aIter.toView());
if (!std::isnan(aVal.getX()) && !std::isnan(aVal.getY()) && !std::isnan(aVal.getZ()))
{
maDirection = aVal;
diff --git a/xmloff/source/draw/ximpcustomshape.cxx b/xmloff/source/draw/ximpcustomshape.cxx
index 5e32cdba6763..c8b90dcf26df 100644
--- a/xmloff/source/draw/ximpcustomshape.cxx
+++ b/xmloff/source/draw/ximpcustomshape.cxx
@@ -441,14 +441,14 @@ static void GetPosition3D( std::vector< css::beans::PropertyValue >& rDest,
}
static void GetDoubleSequence( std::vector< css::beans::PropertyValue >& rDest, // e.g. draw:glue-point-leaving-directions
- std::u16string_view rValue, const EnhancedCustomShapeTokenEnum eDestProp )
+ std::string_view rValue, const EnhancedCustomShapeTokenEnum eDestProp )
{
std::vector< double > vDirection;
sal_Int32 nIndex = 0;
do
{
double fAttrDouble;
- std::u16string_view aToken( o3tl::getToken(rValue, 0, ',', nIndex ) );
+ std::string_view aToken( o3tl::getToken(rValue, 0, ',', nIndex ) );
if (!::sax::Converter::convertDouble( fAttrDouble, aToken ))
break;
else
@@ -466,14 +466,14 @@ static void GetDoubleSequence( std::vector< css::beans::PropertyValue >& rDest,
}
static void GetSizeSequence( std::vector< css::beans::PropertyValue >& rDest,
- std::u16string_view rValue, const EnhancedCustomShapeTokenEnum eDestProp )
+ std::string_view rValue, const EnhancedCustomShapeTokenEnum eDestProp )
{
std::vector< sal_Int32 > vNum;
sal_Int32 nIndex = 0;
do
{
sal_Int32 n;
- std::u16string_view aToken( o3tl::getToken(rValue, 0, ' ', nIndex ) );
+ std::string_view aToken( o3tl::getToken(rValue, 0, ' ', nIndex ) );
if (!::sax::Converter::convertNumber( n, aToken ))
break;
else
@@ -892,7 +892,7 @@ void XMLEnhancedCustomShapeContext::startFastElement(
}
break;
case EAS_sub_view_size:
- GetSizeSequence( maPath, aIter.toString(), EAS_SubViewSize );
+ GetSizeSequence( maPath, aIter.toView(), EAS_SubViewSize );
break;
case EAS_text_rotate_angle :
GetDouble( mrCustomShapeGeometry, aIter.toView(), EAS_TextRotateAngle );
@@ -1093,7 +1093,7 @@ void XMLEnhancedCustomShapeContext::startFastElement(
GetEnum( maPath, aIter.toView(), EAS_GluePointType, *aXML_GluePointEnumMap );
break;
case EAS_glue_point_leaving_directions :
- GetDoubleSequence( maPath, aIter.toString(), EAS_GluePointLeavingDirections );
+ GetDoubleSequence( maPath, aIter.toView(), EAS_GluePointLeavingDirections );
break;
case EAS_text_path :
GetBool( maTextPath, aIter.toView(), EAS_TextPath );
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index 27a90b9ddf3f..d0e400a8de33 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -274,12 +274,12 @@ void SdXMLShapeContext::addGluePoint( const uno::Reference< xml::sax::XFastAttri
case XML_ELEMENT(SVG, XML_X):
case XML_ELEMENT(SVG_COMPAT, XML_X):
GetImport().GetMM100UnitConverter().convertMeasureToCore(
- aGluePoint.Position.X, aIter.toString());
+ aGluePoint.Position.X, aIter.toView());
break;
case XML_ELEMENT(SVG, XML_Y):
case XML_ELEMENT(SVG_COMPAT, XML_Y):
GetImport().GetMM100UnitConverter().convertMeasureToCore(
- aGluePoint.Position.Y, aIter.toString());
+ aGluePoint.Position.Y, aIter.toView());
break;
case XML_ELEMENT(DRAW, XML_ID):
nId = aIter.toInt32();
@@ -2884,7 +2884,7 @@ void SdXMLPluginShapeContext::startFastElement (sal_Int32 /*nElement*/,
{
if( aIter.getToken() == XML_ELEMENT(DRAW, XML_MIME_TYPE) )
{
- if( aIter.toString() == "application/vnd.sun.star.media" )
+ if( aIter.toView() == "application/vnd.sun.star.media" )
mbMedia = true;
// leave this loop
break;
diff --git a/xmloff/source/draw/ximpshow.cxx b/xmloff/source/draw/ximpshow.cxx
index a59b68ab0fd1..f89d4d9fb71a 100644
--- a/xmloff/source/draw/ximpshow.cxx
+++ b/xmloff/source/draw/ximpshow.cxx
@@ -94,7 +94,7 @@ SdXMLShowsContext::SdXMLShowsContext( SdXMLImport& rImport, const Reference< XFa
case XML_ELEMENT(PRESENTATION, XML_PAUSE):
{
Duration aDuration;
- if (!::sax::Converter::convertDuration(aDuration, aIter.toString()))
+ if (!::sax::Converter::convertDuration(aDuration, aIter.toView()))
continue;
const sal_Int32 nMS = (aDuration.Hours * 60 +
diff --git a/xmloff/source/style/GradientStyle.cxx b/xmloff/source/style/GradientStyle.cxx
index f3fbfb01ec24..81ccd84d2b55 100644
--- a/xmloff/source/style/GradientStyle.cxx
+++ b/xmloff/source/style/GradientStyle.cxx
@@ -100,10 +100,10 @@ void XMLGradientStyleImport::importXML(
aGradient.YOffset = static_cast< sal_Int16 >( nTmpValue );
break;
case XML_ELEMENT(DRAW, XML_START_COLOR):
- ::sax::Converter::convertColor(aGradient.StartColor, aIter.toString());
+ ::sax::Converter::convertColor(aGradient.StartColor, aIter.toView());
break;
case XML_ELEMENT(DRAW, XML_END_COLOR):
- ::sax::Converter::convertColor(aGradient.EndColor, aIter.toString());
+ ::sax::Converter::convertColor(aGradient.EndColor, aIter.toView());
break;
case XML_ELEMENT(DRAW, XML_START_INTENSITY):
::sax::Converter::convertPercent( nTmpValue, aIter.toView() );
diff --git a/xmloff/source/style/HatchStyle.cxx b/xmloff/source/style/HatchStyle.cxx
index f49fc4a5af13..a70ee506ed3b 100644
--- a/xmloff/source/style/HatchStyle.cxx
+++ b/xmloff/source/style/HatchStyle.cxx
@@ -87,7 +87,7 @@ void XMLHatchStyleImport::importXML(
break;
case XML_ELEMENT(DRAW, XML_COLOR):
case XML_ELEMENT(DRAW_OOO, XML_COLOR):
- ::sax::Converter::convertColor(aHatch.Color, aIter.toString());
+ ::sax::Converter::convertColor(aHatch.Color, aIter.toView());
break;
case XML_ELEMENT(DRAW, XML_DISTANCE):
case XML_ELEMENT(DRAW_OOO, XML_DISTANCE):
diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx
index e4083d3517ba..9e40fada98fa 100644
--- a/xmloff/source/style/xmlnumfi.cxx
+++ b/xmloff/source/style/xmlnumfi.cxx
@@ -424,7 +424,7 @@ SvXMLNumFmtPropContext::SvXMLNumFmtPropContext( SvXMLImport& rImport,
{
case XML_ELEMENT(FO, XML_COLOR):
case XML_ELEMENT(FO_COMPAT, XML_COLOR):
- bColSet = ::sax::Converter::convertColor( m_nColor, aIter.toString() );
+ bColSet = ::sax::Converter::convertColor( m_nColor, aIter.toView() );
break;
default:
XMLOFF_WARN_UNKNOWN("xmloff", aIter);
diff --git a/xmloff/source/style/xmltabi.cxx b/xmloff/source/style/xmltabi.cxx
index 601c3f5fd191..0c470a4891c7 100644
--- a/xmloff/source/style/xmltabi.cxx
+++ b/xmloff/source/style/xmltabi.cxx
@@ -93,7 +93,7 @@ SvxXMLTabStopContext_Impl::SvxXMLTabStopContext_Impl(
break;
case XML_ELEMENT(STYLE, XML_CHAR):
if( !aIter.isEmpty() )
- aTabStop.DecimalChar = aIter.toString()[0];
+ aTabStop.DecimalChar = aIter.toView()[0];
break;
case XML_ELEMENT(STYLE, XML_LEADER_STYLE):
if( IsXMLToken( aIter, XML_NONE ) )
@@ -105,7 +105,7 @@ SvxXMLTabStopContext_Impl::SvxXMLTabStopContext_Impl(
break;
case XML_ELEMENT(STYLE, XML_LEADER_TEXT):
if( !aIter.isEmpty() )
- cTextFillChar = aIter.toString()[0];
+ cTextFillChar = aIter.toView()[0];
break;
default:
XMLOFF_WARN_UNKNOWN("xmloff", aIter);
diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx
index 354bda7c8ce7..27a803b42a0b 100644
--- a/xmloff/source/text/XMLTextFrameContext.cxx
+++ b/xmloff/source/text/XMLTextFrameContext.cxx
@@ -1471,7 +1471,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > XMLTextFrameContext::c
{
if( aIter.getToken() == XML_ELEMENT(DRAW, XML_MIME_TYPE) )
{
- if( aIter.toString() == "application/vnd.sun.star.media" )
+ if( aIter.toView() == "application/vnd.sun.star.media" )
bMedia = true;
// leave this loop
diff --git a/xmloff/source/text/XMLTextShapeImportHelper.cxx b/xmloff/source/text/XMLTextShapeImportHelper.cxx
index f4a62f4ad9b7..21c6c3134c16 100644
--- a/xmloff/source/text/XMLTextShapeImportHelper.cxx
+++ b/xmloff/source/text/XMLTextShapeImportHelper.cxx
@@ -109,7 +109,7 @@ void XMLTextShapeImportHelper::addShape(
break;
case XML_ELEMENT(SVG, XML_Y):
case XML_ELEMENT(SVG_COMPAT, XML_Y):
- rImport.GetMM100UnitConverter().convertMeasureToCore( nY, aIter.toString() );
+ rImport.GetMM100UnitConverter().convertMeasureToCore( nY, aIter.toView() );
break;
}
}