diff options
Diffstat (limited to 'oox/source/drawingml')
23 files changed, 71 insertions, 71 deletions
diff --git a/oox/source/drawingml/chart/chartconverter.cxx b/oox/source/drawingml/chart/chartconverter.cxx index 261494327efd..12d48129dead 100644 --- a/oox/source/drawingml/chart/chartconverter.cxx +++ b/oox/source/drawingml/chart/chartconverter.cxx @@ -148,7 +148,7 @@ Reference< XDataSequence > ChartConverter::createDataSequence( const Reference< aRangeRep = lclGenerateApiArray( aMatrix ); } - if( aRangeRep.getLength() > 0 ) try + if( !aRangeRep.isEmpty() ) try { // create the data sequence xDataSeq = rxDataProvider->createDataSequenceByRangeRepresentation( aRangeRep ); diff --git a/oox/source/drawingml/chart/chartspaceconverter.cxx b/oox/source/drawingml/chart/chartspaceconverter.cxx index 822ac520d66b..bee3d7c089a7 100644 --- a/oox/source/drawingml/chart/chartspaceconverter.cxx +++ b/oox/source/drawingml/chart/chartspaceconverter.cxx @@ -129,9 +129,9 @@ void ChartSpaceConverter::convertFromModel( const Reference< XShapes >& rxExtern /* If the title model is missing, but the chart shows exactly one series, the series title is shown as chart title. */ OUString aAutoTitle = aPlotAreaConv.getAutomaticTitle(); - if( mrModel.mxTitle.is() || (aAutoTitle.getLength() > 0) ) + if( mrModel.mxTitle.is() || !aAutoTitle.isEmpty() ) { - if( aAutoTitle.getLength() == 0 ) + if( aAutoTitle.isEmpty() ) aAutoTitle = CREATE_OUSTRING( "Chart Title" ); Reference< XTitled > xTitled( getChartDocument(), UNO_QUERY_THROW ); TitleConverter aTitleConv( *this, mrModel.mxTitle.getOrCreate() ); @@ -184,7 +184,7 @@ void ChartSpaceConverter::convertFromModel( const Reference< XShapes >& rxExtern } // embedded drawing shapes - if( mrModel.maDrawingPath.getLength() > 0 ) try + if( !mrModel.maDrawingPath.isEmpty() ) try { /* Get the internal draw page of the chart document, if no external drawing page has been passed. */ diff --git a/oox/source/drawingml/chart/objectformatter.cxx b/oox/source/drawingml/chart/objectformatter.cxx index 1b07ae33c494..7aca5b8f958c 100644 --- a/oox/source/drawingml/chart/objectformatter.cxx +++ b/oox/source/drawingml/chart/objectformatter.cxx @@ -1141,7 +1141,7 @@ void ObjectFormatter::convertNumberFormat( PropertySet& rPropSet, const NumberFo if( mxData->mxNumFmts.is() ) { sal_Int32 nPropId = bPercentFormat ? PROP_PercentageNumberFormat : PROP_NumberFormat; - if( rNumberFormat.mbSourceLinked || (rNumberFormat.maFormatCode.getLength() == 0) ) + if( rNumberFormat.mbSourceLinked || rNumberFormat.maFormatCode.isEmpty() ) { rPropSet.setAnyProperty( nPropId, Any() ); } diff --git a/oox/source/drawingml/chart/seriesconverter.cxx b/oox/source/drawingml/chart/seriesconverter.cxx index 3ed07e6b914a..052237675caa 100644 --- a/oox/source/drawingml/chart/seriesconverter.cxx +++ b/oox/source/drawingml/chart/seriesconverter.cxx @@ -374,7 +374,7 @@ Reference< XLabeledDataSequence > ErrorBarConverter::createLabeledDataSequence( } break; } - OSL_ENSURE( aRole.getLength() > 0, "ErrorBarConverter::createLabeledDataSequence - invalid error bar direction" ); + OSL_ENSURE( !aRole.isEmpty(), "ErrorBarConverter::createLabeledDataSequence - invalid error bar direction" ); return lclCreateLabeledDataSequence( *this, mrModel.maSources.get( eSourceType ).get(), aRole ); } @@ -422,7 +422,7 @@ void TrendlineConverter::convertFromModel( const Reference< XDataSeries >& rxDat case XML_power: aServiceName = CREATE_OUSTRING( "com.sun.star.chart2.PotentialRegressionCurve" ); break; default: OSL_FAIL( "TrendlineConverter::convertFromModel - unknown trendline type" ); } - if( aServiceName.getLength() > 0 ) + if( !aServiceName.isEmpty() ) { Reference< XRegressionCurve > xRegCurve( createInstance( aServiceName ), UNO_QUERY_THROW ); PropertySet aPropSet( xRegCurve ); diff --git a/oox/source/drawingml/chart/titleconverter.cxx b/oox/source/drawingml/chart/titleconverter.cxx index 5699a0d3f4b8..9ed69fe4fde5 100644 --- a/oox/source/drawingml/chart/titleconverter.cxx +++ b/oox/source/drawingml/chart/titleconverter.cxx @@ -109,11 +109,11 @@ Sequence< Reference< XFormattedString > > TextConverter::createStringSequence( if( mrModel.mxDataSeq.is() && !mrModel.mxDataSeq->maData.empty() ) mrModel.mxDataSeq->maData.begin()->second >>= aString; // no linked string -> fall back to default string - if( aString.getLength() == 0 ) + if( aString.isEmpty() ) aString = rDefaultText; // create formatted string object - if( aString.getLength() > 0 ) + if( !aString.isEmpty() ) { Reference< XFormattedString > xFmtStr = appendFormattedString( aStringVec, aString, false ); PropertySet aPropSet( xFmtStr ); diff --git a/oox/source/drawingml/customshapegeometry.cxx b/oox/source/drawingml/customshapegeometry.cxx index cd752859d288..b5c7290dd42d 100644 --- a/oox/source/drawingml/customshapegeometry.cxx +++ b/oox/source/drawingml/customshapegeometry.cxx @@ -236,7 +236,7 @@ rtl::OUString GetFormulaParameter( const EnhancedCustomShapeParameter& rParamete static EnhancedCustomShapeParameter GetAdjCoordinate( CustomShapeProperties& rCustomShapeProperties, const::rtl::OUString& rValue, sal_Bool bNoSymbols = sal_True ) { com::sun::star::drawing::EnhancedCustomShapeParameter aRet; - if ( rValue.getLength() ) + if ( !rValue.isEmpty() ) { sal_Bool bConstant = sal_True; sal_Int32 nConstant = -1; @@ -412,7 +412,7 @@ static EnhancedCustomShapeParameter GetAdjCoordinate( CustomShapeProperties& rCu sal_Unicode n = rValue[ 0 ]; if ( ( n == '+' ) || ( n == '-' ) ) { - if ( rValue.getLength() > 0 ) + if ( !rValue.isEmpty() ) n = rValue[ 1 ]; } if ( ( n >= '0' ) && ( n <= '9' ) ) @@ -483,7 +483,7 @@ static rtl::OUString convertToOOEquation( CustomShapeProperties& rCustomShapePro do { rtl::OUString aToken( rSource.getToken( 0, ' ', nIndex ) ); - if ( aToken.getLength() ) + if ( !aToken.isEmpty() ) aTokens.push_back( aToken ); } while ( nIndex >= 0 ); diff --git a/oox/source/drawingml/diagram/diagram.cxx b/oox/source/drawingml/diagram/diagram.cxx index ad53443ac6cb..91a475f63468 100644 --- a/oox/source/drawingml/diagram/diagram.cxx +++ b/oox/source/drawingml/diagram/diagram.cxx @@ -138,10 +138,10 @@ static sal_Int32 calcDepth( const rtl::OUString& rNodeName, const dgm::Connections::const_iterator aEndCxn( rCnx.end() ); while( aCurrCxn != aEndCxn ) { - if( aCurrCxn->msParTransId.getLength() && - aCurrCxn->msSibTransId.getLength() && - aCurrCxn->msSourceId.getLength() && - aCurrCxn->msDestId.getLength() && + if( !aCurrCxn->msParTransId.isEmpty() && + !aCurrCxn->msSibTransId.isEmpty() && + !aCurrCxn->msSourceId.isEmpty() && + !aCurrCxn->msDestId.isEmpty() && aCurrCxn->mnType != XML_presOf && aCurrCxn->mnType != XML_presParOf && rNodeName == aCurrCxn->msDestId ) @@ -176,7 +176,7 @@ void Diagram::build( ) << normalizeDotName(aCurrPoint->msModelId).getStr() << "["; - if( aCurrPoint->msPresentationLayoutName.getLength() ) + if( !aCurrPoint->msPresentationLayoutName.isEmpty() ) output << "label=\"" << rtl::OUStringToOString( aCurrPoint->msPresentationLayoutName, @@ -230,7 +230,7 @@ void Diagram::build( ) OSL_ENSURE(bInserted1,"Diagram::build(): non-unique point model id"); - if( aCurrPoint->msPresentationLayoutName.getLength() ) + if( !aCurrPoint->msPresentationLayoutName.isEmpty() ) { DiagramData::PointsNameMap::value_type::second_type& rVec= getData()->getPointsPresNameMap()[aCurrPoint->msPresentationLayoutName]; @@ -244,11 +244,11 @@ void Diagram::build( ) while( aCurrCxn != aEndCxn ) { #if OSL_DEBUG_LEVEL > 1 - if( aCurrCxn->msParTransId.getLength() || - aCurrCxn->msSibTransId.getLength() ) + if( !aCurrCxn->msParTransId.isEmpty() || + !aCurrCxn->msSibTransId.isEmpty() ) { - if( aCurrCxn->msSourceId.getLength() || - aCurrCxn->msDestId.getLength() ) + if( !aCurrCxn->msSourceId.isEmpty() || + !aCurrCxn->msDestId.isEmpty() ) { output << "\t" << normalizeDotName(aCurrCxn->msSourceId).getStr() @@ -279,8 +279,8 @@ void Diagram::build( ) << "\"];" << std::endl; } } - else if( aCurrCxn->msSourceId.getLength() || - aCurrCxn->msDestId.getLength() ) + else if( !aCurrCxn->msSourceId.isEmpty() || + !aCurrCxn->msDestId.isEmpty() ) output << "\t" << normalizeDotName(aCurrCxn->msSourceId).getStr() << " -> " @@ -391,7 +391,7 @@ void loadDiagram( ShapePtr& pShape, pDiagram->setLayout( pLayout ); // data - if( rDataModelPath.getLength() > 0 ) + if( !rDataModelPath.isEmpty() ) { rtl::Reference< core::FragmentHandler > xRef( new DiagramDataFragmentHandler( rFilter, rDataModelPath, pData )); @@ -408,7 +408,7 @@ void loadDiagram( ShapePtr& pShape, } // layout - if( rLayoutPath.getLength() > 0 ) + if( !rLayoutPath.isEmpty() ) { rtl::Reference< core::FragmentHandler > xRef( new DiagramLayoutFragmentHandler( rFilter, rLayoutPath, pLayout )); @@ -420,7 +420,7 @@ void loadDiagram( ShapePtr& pShape, } // style - if( rQStylePath.getLength() > 0 ) + if( !rQStylePath.isEmpty() ) { rtl::Reference< core::FragmentHandler > xRef( new DiagramQStylesFragmentHandler( rFilter, rQStylePath, pDiagram->getStyles() )); @@ -432,7 +432,7 @@ void loadDiagram( ShapePtr& pShape, } // colors - if( rColorStylePath.getLength() > 0 ) + if( !rColorStylePath.isEmpty() ) { rtl::Reference< core::FragmentHandler > xRef( new ColorFragmentHandler( rFilter, rColorStylePath, pDiagram->getColors() )); diff --git a/oox/source/drawingml/diagram/diagramdefinitioncontext.cxx b/oox/source/drawingml/diagram/diagramdefinitioncontext.cxx index 22aa2992b1f2..73338576c563 100644 --- a/oox/source/drawingml/diagram/diagramdefinitioncontext.cxx +++ b/oox/source/drawingml/diagram/diagramdefinitioncontext.cxx @@ -48,7 +48,7 @@ DiagramDefinitionContext::DiagramDefinitionContext( ContextHandler& rParent, OSL_TRACE( "OOX: DiagramDefinitionContext::DiagramDefinitionContext()" ); mpLayout->setDefStyle( xAttributes->getOptionalValue( XML_defStyle ) ); OUString sValue = xAttributes->getOptionalValue( XML_minVer ); - if( sValue.getLength() == 0 ) + if( sValue.isEmpty() ) { sValue = CREATE_OUSTRING( "http://schemas.openxmlformats.org/drawingml/2006/diagram" ); } diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx index 16b9420edcf1..5bad9f544769 100644 --- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx +++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx @@ -468,7 +468,7 @@ bool LayoutNode::setupShape( const ShapePtr& rShape, const Diagram& rDgm, sal_uI // TODO(Q1): apply styling & coloring - taking // layout node's styleLbl for both style & color // now, but docs are a bit unclear on this - if( msStyleLabel.getLength() ) + if( !msStyleLabel.isEmpty() ) { OSL_TRACE("setting style with label %s", OUSTRING_TO_CSTR( msStyleLabel ) ); diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx index bf9361260fc2..ad6cf4b112c7 100644 --- a/oox/source/drawingml/fillproperties.cxx +++ b/oox/source/drawingml/fillproperties.cxx @@ -310,7 +310,7 @@ void FillProperties::pushToPropMap( ShapePropertyMap& rPropMap, OUString aGraphicUrl = rGraphicHelper.createGraphicObject( maBlipProps.mxGraphic ); // push bitmap or named bitmap to property map - if( (aGraphicUrl.getLength() > 0) && rPropMap.setProperty( SHAPEPROP_FillBitmapUrl, aGraphicUrl ) ) + if( !aGraphicUrl.isEmpty() && rPropMap.setProperty( SHAPEPROP_FillBitmapUrl, aGraphicUrl ) ) eFillStyle = FillStyle_BITMAP; // set other bitmap properties, if bitmap has been inserted into the map @@ -404,7 +404,7 @@ void GraphicProperties::pushToPropMap( PropertyMap& rPropMap, const GraphicHelpe } OUString aGraphicUrl = rGraphicHelper.createGraphicObject( xGraphic ); - if( aGraphicUrl.getLength() > 0 ) + if( !aGraphicUrl.isEmpty() ) rPropMap[ PROP_GraphicURL ] <<= aGraphicUrl; // cropping diff --git a/oox/source/drawingml/fillpropertiesgroupcontext.cxx b/oox/source/drawingml/fillpropertiesgroupcontext.cxx index 82a2f5906923..ef5cbc3502a1 100644 --- a/oox/source/drawingml/fillpropertiesgroupcontext.cxx +++ b/oox/source/drawingml/fillpropertiesgroupcontext.cxx @@ -170,7 +170,7 @@ BlipContext::BlipContext( ContextHandler& rParent, { // internal picture URL OUString aFragmentPath = getFragmentPathFromRelId( aAttribs.getString( R_TOKEN( embed ), OUString() ) ); - if( aFragmentPath.getLength() > 0 ) + if( !aFragmentPath.isEmpty() ) mrBlipProps.mxGraphic = getFilter().getGraphicHelper().importEmbeddedGraphic( aFragmentPath ); } else if( aAttribs.hasAttribute( R_TOKEN( link ) ) ) diff --git a/oox/source/drawingml/graphicshapecontext.cxx b/oox/source/drawingml/graphicshapecontext.cxx index 5f7385a2d98d..016fbf3af38a 100644 --- a/oox/source/drawingml/graphicshapecontext.cxx +++ b/oox/source/drawingml/graphicshapecontext.cxx @@ -155,7 +155,7 @@ OleObjectGraphicDataContext::~OleObjectGraphicDataContext() { /* Register the OLE shape at the VML drawing, this prevents that the related VML shape converts the OLE object by itself. */ - if( mrOleObjectInfo.maShapeId.getLength() > 0 ) + if( !mrOleObjectInfo.maShapeId.isEmpty() ) if( ::oox::vml::Drawing* pVmlDrawing = getFilter().getVmlDrawing() ) pVmlDrawing->registerOleObject( mrOleObjectInfo ); } @@ -182,7 +182,7 @@ Reference< XFastContextHandler > OleObjectGraphicDataContext::createFastChildCon else { OUString aFragmentPath = getFragmentPathFromRelation( *pRelation ); - if( aFragmentPath.getLength() > 0 ) + if( !aFragmentPath.isEmpty() ) getFilter().importBinaryData( mrOleObjectInfo.maEmbeddedData, aFragmentPath ); } } diff --git a/oox/source/drawingml/hyperlinkcontext.cxx b/oox/source/drawingml/hyperlinkcontext.cxx index 1975561ab808..06958aa13de8 100644 --- a/oox/source/drawingml/hyperlinkcontext.cxx +++ b/oox/source/drawingml/hyperlinkcontext.cxx @@ -50,24 +50,24 @@ HyperLinkContext::HyperLinkContext( ContextHandler& rParent, { OUString sURL, sHref; OUString aRelId = xAttributes->getOptionalValue( R_TOKEN( id ) ); - if ( aRelId.getLength() ) + if ( !aRelId.isEmpty() ) { OSL_TRACE("OOX: URI rId %s", ::rtl::OUStringToOString (aRelId, RTL_TEXTENCODING_UTF8).pData->buffer); sHref = getRelations().getExternalTargetFromRelId( aRelId ); - if( sHref.getLength() > 0 ) + if( !sHref.isEmpty() ) { OSL_TRACE("OOX: URI href %s", ::rtl::OUStringToOString (sHref, RTL_TEXTENCODING_UTF8).pData->buffer); sURL = getFilter().getAbsoluteUrl( sHref ); } } OUString sTooltip = xAttributes->getOptionalValue( R_TOKEN( tooltip ) ); - if ( sTooltip.getLength() ) + if ( !sTooltip.isEmpty() ) maProperties[ PROP_Representation ] <<= sTooltip; OUString sFrame = xAttributes->getOptionalValue( R_TOKEN( tgtFrame ) ); - if( sFrame.getLength() ) + if( !sFrame.isEmpty() ) maProperties[ PROP_TargetFrame ] <<= sFrame; OUString aAction = xAttributes->getOptionalValue( XML_action ); - if ( aAction.getLength() ) + if ( !aAction.isEmpty() ) { // reserved values of the unrestricted string aAction: // ppaction://customshow?id=SHOW_ID // custom presentation @@ -140,7 +140,7 @@ HyperLinkContext::HyperLinkContext( ContextHandler& rParent, } } } - if ( sURL.getLength() ) + if ( !sURL.isEmpty() ) maProperties[ PROP_URL ] <<= sURL; // TODO unhandled diff --git a/oox/source/drawingml/lineproperties.cxx b/oox/source/drawingml/lineproperties.cxx index 4bfdcad76433..9676795ffe21 100644 --- a/oox/source/drawingml/lineproperties.cxx +++ b/oox/source/drawingml/lineproperties.cxx @@ -327,7 +327,7 @@ void lclPushMarkerProperties( ShapePropertyMap& rPropMap, } // push the properties (filled aNamedMarker.Name indicates valid marker) - if( aNamedMarker.Name.getLength() > 0 ) + if( !aNamedMarker.Name.isEmpty() ) { if( bLineEnd ) { diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index f551b85ce757..54d9527e03d3 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -210,12 +210,12 @@ void Shape::addShape( try { rtl::OUString sServiceName( msServiceName ); - if( sServiceName.getLength() ) + if( !sServiceName.isEmpty() ) { basegfx::B2DHomMatrix aMatrix( aTransformation ); Reference< XShape > xShape( createAndInsert( rFilterBase, sServiceName, pTheme, rxShapes, pShapeRect, sal_False, aMatrix ) ); - if( pShapeMap && msId.getLength() ) + if( pShapeMap && !msId.isEmpty() ) { (*pShapeMap)[ msId ] = shared_from_this(); } @@ -429,7 +429,7 @@ Reference< XShape > Shape::createAndInsert( Reference< XPropertySet > xSet( mxShape, UNO_QUERY ); if( mxShape.is() && xSet.is() ) { - if( msName.getLength() ) + if( !msName.isEmpty() ) { Reference< container::XNamed > xNamed( mxShape, UNO_QUERY ); if( xNamed.is() ) @@ -618,13 +618,13 @@ OUString Shape::finalizeServiceName( XmlFilterBase& rFilter, const OUString& rSe // get the path to the representation graphic OUString aGraphicPath; - if( mxOleObjectInfo->maShapeId.getLength() > 0 ) + if( !mxOleObjectInfo->maShapeId.isEmpty() ) if( ::oox::vml::Drawing* pVmlDrawing = rFilter.getVmlDrawing() ) if( const ::oox::vml::ShapeBase* pVmlShape = pVmlDrawing->getShapes().getShapeById( mxOleObjectInfo->maShapeId, true ) ) aGraphicPath = pVmlShape->getGraphicPath(); // import and store the graphic - if( aGraphicPath.getLength() > 0 ) + if( !aGraphicPath.isEmpty() ) { Reference< graphic::XGraphic > xGraphic = rFilter.getGraphicHelper().importEmbeddedGraphic( aGraphicPath ); if( xGraphic.is() ) @@ -644,8 +644,8 @@ void Shape::finalizeXShape( XmlFilterBase& rFilter, const Reference< XShapes >& { case FRAMETYPE_CHART: { - OSL_ENSURE( mxChartShapeInfo->maFragmentPath.getLength() > 0, "Shape::finalizeXShape - missing chart fragment" ); - if( mxShape.is() && (mxChartShapeInfo->maFragmentPath.getLength() > 0) ) try + OSL_ENSURE( !mxChartShapeInfo->maFragmentPath.isEmpty(), "Shape::finalizeXShape - missing chart fragment" ); + if( mxShape.is() && !mxChartShapeInfo->maFragmentPath.isEmpty() ) try { // set the chart2 OLE class ID at the OLE shape PropertySet aShapeProp( mxShape ); diff --git a/oox/source/drawingml/shapepropertymap.cxx b/oox/source/drawingml/shapepropertymap.cxx index fe625230416c..f05153c74dba 100644 --- a/oox/source/drawingml/shapepropertymap.cxx +++ b/oox/source/drawingml/shapepropertymap.cxx @@ -130,7 +130,7 @@ bool ShapePropertyMap::setAnyProperty( ShapePropertyId ePropId, const Any& rValu bool ShapePropertyMap::setLineMarker( sal_Int32 nPropId, const Any& rValue ) { NamedValue aNamedMarker; - if( (rValue >>= aNamedMarker) && (aNamedMarker.Name.getLength() > 0) ) + if( (rValue >>= aNamedMarker) && !aNamedMarker.Name.isEmpty() ) { // push line marker explicitly if( !maShapePropInfo.mbNamedLineMarker ) @@ -154,7 +154,7 @@ bool ShapePropertyMap::setLineDash( sal_Int32 nPropId, const Any& rValue ) if( rValue.has< LineDash >() ) { OUString aDashName = mrModelObjHelper.insertLineDash( rValue.get< LineDash >() ); - return (aDashName.getLength() > 0) && setProperty( nPropId, aDashName ); + return !aDashName.isEmpty() && setProperty( nPropId, aDashName ); } return false; @@ -170,7 +170,7 @@ bool ShapePropertyMap::setFillGradient( sal_Int32 nPropId, const Any& rValue ) if( rValue.has< Gradient >() ) { OUString aGradientName = mrModelObjHelper.insertFillGradient( rValue.get< Gradient >() ); - return (aGradientName.getLength() > 0) && setProperty( nPropId, aGradientName ); + return !aGradientName.isEmpty() && setProperty( nPropId, aGradientName ); } return false; @@ -182,7 +182,7 @@ bool ShapePropertyMap::setGradientTrans( sal_Int32 nPropId, const Any& rValue ) if( rValue.has< Gradient >() ) { OUString aGradientName = mrModelObjHelper.insertTransGrandient( rValue.get< Gradient >() ); - return ( aGradientName.getLength() > 0 ) && setProperty( nPropId, aGradientName ); + return !aGradientName.isEmpty() && setProperty( nPropId, aGradientName ); } return false; @@ -198,7 +198,7 @@ bool ShapePropertyMap::setFillBitmapUrl( sal_Int32 nPropId, const Any& rValue ) if( rValue.has< OUString >() ) { OUString aBitmapUrlName = mrModelObjHelper.insertFillBitmapUrl( rValue.get< OUString >() ); - return (aBitmapUrlName.getLength() > 0) && setProperty( nPropId, aBitmapUrlName ); + return !aBitmapUrlName.isEmpty() && setProperty( nPropId, aBitmapUrlName ); } return false; diff --git a/oox/source/drawingml/table/tableproperties.cxx b/oox/source/drawingml/table/tableproperties.cxx index a6434c64c294..7fbd4bd5d431 100644 --- a/oox/source/drawingml/table/tableproperties.cxx +++ b/oox/source/drawingml/table/tableproperties.cxx @@ -119,7 +119,7 @@ const TableStyle& TableProperties::getUsedTableStyle( const ::oox::core::XmlFilt else if ( rBase.getTableStyles() ) { const std::vector< TableStyle >& rTableStyles( rBase.getTableStyles()->getTableStyles() ); - const rtl::OUString aStyleId( getStyleId().getLength() ? getStyleId() : rBase.getTableStyles()->getDefaultStyleId() ); + const rtl::OUString aStyleId( getStyleId().isEmpty() ? rBase.getTableStyles()->getDefaultStyleId() : getStyleId() ); std::vector< TableStyle >::const_iterator aIter( rTableStyles.begin() ); while( aIter != rTableStyles.end() ) { diff --git a/oox/source/drawingml/textbodypropertiescontext.cxx b/oox/source/drawingml/textbodypropertiescontext.cxx index 3c77a35309f0..ea84306a3bb9 100644 --- a/oox/source/drawingml/textbodypropertiescontext.cxx +++ b/oox/source/drawingml/textbodypropertiescontext.cxx @@ -66,23 +66,23 @@ TextBodyPropertiesContext::TextBodyPropertiesContext( ContextHandler& rParent, // ST_Coordinate OUString sValue; sValue = xAttributes->getOptionalValue( XML_lIns ); - if( sValue.getLength() ) { - sal_Int32 nLeftInset = ( sValue.getLength() != 0 ? GetCoordinate( sValue ) : 91440 / 360 ); + if( !sValue.isEmpty() ) { + sal_Int32 nLeftInset = ( !sValue.isEmpty() ? GetCoordinate( sValue ) : 91440 / 360 ); mrTextBodyProp.maPropertyMap[ PROP_TextLeftDistance ] <<= static_cast< sal_Int32 >( nLeftInset ); } sValue = xAttributes->getOptionalValue( XML_tIns ); - if( sValue.getLength() ) { - sal_Int32 nTopInset = ( sValue.getLength() != 0 ? GetCoordinate( sValue ) : 91440 / 360 ); + if( !sValue.isEmpty() ) { + sal_Int32 nTopInset = ( !sValue.isEmpty() ? GetCoordinate( sValue ) : 91440 / 360 ); mrTextBodyProp.maPropertyMap[ PROP_TextUpperDistance ] <<= static_cast< sal_Int32 >( nTopInset ); } sValue = xAttributes->getOptionalValue( XML_rIns ); - if( sValue.getLength() ) { - sal_Int32 nRightInset = ( sValue.getLength() != 0 ? GetCoordinate( sValue ) : 91440 / 360 ); + if( !sValue.isEmpty() ) { + sal_Int32 nRightInset = ( !sValue.isEmpty() ? GetCoordinate( sValue ) : 91440 / 360 ); mrTextBodyProp.maPropertyMap[ PROP_TextRightDistance ] <<= static_cast< sal_Int32 >( nRightInset ); } sValue = xAttributes->getOptionalValue( XML_bIns ); - if( sValue.getLength() ) { - sal_Int32 nBottonInset = ( sValue.getLength() != 0 ? GetCoordinate( sValue ) : 45720 / 360 ); + if( !sValue.isEmpty() ) { + sal_Int32 nBottonInset = ( !sValue.isEmpty() ? GetCoordinate( sValue ) : 45720 / 360 ); mrTextBodyProp.maPropertyMap[ PROP_TextLowerDistance ] <<= static_cast< sal_Int32 >( nBottonInset ); } diff --git a/oox/source/drawingml/textcharacterproperties.cxx b/oox/source/drawingml/textcharacterproperties.cxx index fb4b0690bc80..adfa2fe095ec 100644 --- a/oox/source/drawingml/textcharacterproperties.cxx +++ b/oox/source/drawingml/textcharacterproperties.cxx @@ -101,7 +101,7 @@ void TextCharacterProperties::assignUsed( const TextCharacterProperties& rSource if( maCharColor.isUsed() ) rPropMap[ PROP_CharColor ] <<= maCharColor.getColor( rFilter.getGraphicHelper() ); - if( moLang.has() && (moLang.get().getLength() > 0) ) + if( moLang.has() && !moLang.get().isEmpty() ) { lang::Locale aLocale; sal_Int32 nSepPos = moLang.get().indexOf( sal_Unicode( '-' ), 0 ); diff --git a/oox/source/drawingml/textfont.cxx b/oox/source/drawingml/textfont.cxx index 5cd0fe2b996f..9503db839e39 100644 --- a/oox/source/drawingml/textfont.cxx +++ b/oox/source/drawingml/textfont.cxx @@ -77,7 +77,7 @@ void TextFont::setAttributes( const AttributeList& rAttribs ) void TextFont::assignIfUsed( const TextFont& rTextFont ) { - if( rTextFont.maTypeface.getLength() > 0 ) + if( !rTextFont.maTypeface.isEmpty() ) *this = rTextFont; } @@ -94,7 +94,7 @@ bool TextFont::implGetFontData( OUString& rFontName, sal_Int16& rnFontPitch, sal rFontName = maTypeface; rnFontPitch = lclGetFontPitch( extractValue< sal_Int16 >( mnPitch, 0, 4 ) ); rnFontFamily = lclGetFontFamily( extractValue< sal_Int16 >( mnPitch, 4, 4 ) ); - return rFontName.getLength() > 0; + return !rFontName.isEmpty(); } // ============================================================================ diff --git a/oox/source/drawingml/textparagraphpropertiescontext.cxx b/oox/source/drawingml/textparagraphpropertiescontext.cxx index 0bee2766e673..2164bf2ee11e 100644 --- a/oox/source/drawingml/textparagraphpropertiescontext.cxx +++ b/oox/source/drawingml/textparagraphpropertiescontext.cxx @@ -100,7 +100,7 @@ TextParagraphPropertiesContext::TextParagraphPropertiesContext( ContextHandler& if ( xAttribs->hasAttribute( XML_indent ) ) { sValue = xAttribs->getOptionalValue( XML_indent ); - mrTextParagraphProperties.getFirstLineIndentation() = boost::optional< sal_Int32 >( sValue.getLength() == 0 ? 0 : GetCoordinate( sValue ) ); + mrTextParagraphProperties.getFirstLineIndentation() = boost::optional< sal_Int32 >( sValue.isEmpty() ? 0 : GetCoordinate( sValue ) ); } // ST_TextIndentLevelType @@ -123,14 +123,14 @@ TextParagraphPropertiesContext::TextParagraphPropertiesContext( ContextHandler& if ( xAttribs->hasAttribute( XML_marL ) ) { sValue = xAttribs->getOptionalValue( XML_marL ); - mrTextParagraphProperties.getParaLeftMargin() = boost::optional< sal_Int32 >( sValue.getLength() == 0 ? 0 : GetCoordinate( sValue ) ); + mrTextParagraphProperties.getParaLeftMargin() = boost::optional< sal_Int32 >( sValue.isEmpty() ? 0 : GetCoordinate( sValue ) ); } // ParaRightMargin if ( xAttribs->hasAttribute( XML_marR ) ) { sValue = xAttribs->getOptionalValue( XML_marR ); - sal_Int32 nMarR = ( sValue.getLength() == 0 ? 0 : GetCoordinate( sValue ) ); + sal_Int32 nMarR = sValue.isEmpty() ? 0 : GetCoordinate( sValue ) ; rPropertyMap[ PROP_ParaRightMargin ] <<= nMarR; } diff --git a/oox/source/drawingml/textrun.cxx b/oox/source/drawingml/textrun.cxx index 3c5b99c419fd..93c9ca76bbf3 100644 --- a/oox/source/drawingml/textrun.cxx +++ b/oox/source/drawingml/textrun.cxx @@ -87,7 +87,7 @@ sal_Int32 TextRun::insertAt( if ( !aTextCharacterProps.maSymbolFont.getFontData( aSymbolFontName, nSymbolFontPitch, nSymbolFontFamily, rFilterBase ) ) xText->insertString( xStart, getText(), sal_False ); - else if ( getText().getLength() ) + else if ( !getText().isEmpty() ) { // !!#i113673<<< sal_Int16 nLatinFontPitch = 0, nLatinFontFamily = 0; aTextCharacterProps.maLatinFont.getFontData( aLatinFontName, nLatinFontPitch, nLatinFontFamily, rFilterBase ); diff --git a/oox/source/drawingml/texttabstoplistcontext.cxx b/oox/source/drawingml/texttabstoplistcontext.cxx index 4e3340f7f192..9aae5924d55b 100644 --- a/oox/source/drawingml/texttabstoplistcontext.cxx +++ b/oox/source/drawingml/texttabstoplistcontext.cxx @@ -70,7 +70,7 @@ namespace oox { namespace drawingml { OUString sValue; TabStop aTabStop; sValue = xAttribs->getOptionalValue( XML_pos ); - if( sValue.getLength() ) + if( !sValue.isEmpty() ) { aTabStop.Position = GetCoordinate( sValue ); } |