diff options
Diffstat (limited to 'svx/source/svdraw')
-rw-r--r-- | svx/source/svdraw/svdcrtv.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdedtv1.cxx | 3 | ||||
-rw-r--r-- | svx/source/svdraw/svdedtv2.cxx | 9 | ||||
-rw-r--r-- | svx/source/svdraw/svdedxv.cxx | 3 | ||||
-rw-r--r-- | svx/source/svdraw/svdhdl.cxx | 6 | ||||
-rw-r--r-- | svx/source/svdraw/svdmodel.cxx | 18 | ||||
-rw-r--r-- | svx/source/svdraw/svdoashp.cxx | 10 | ||||
-rw-r--r-- | svx/source/svdraw/svdocapt.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdograf.cxx | 40 | ||||
-rw-r--r-- | svx/source/svdraw/svdomeas.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdoole2.cxx | 8 | ||||
-rw-r--r-- | svx/source/svdraw/svdopath.cxx | 64 | ||||
-rw-r--r-- | svx/source/svdraw/svdotext.cxx | 16 | ||||
-rw-r--r-- | svx/source/svdraw/svdotextdecomposition.cxx | 4 | ||||
-rw-r--r-- | svx/source/svdraw/svdotextpathdecomposition.cxx | 6 | ||||
-rw-r--r-- | svx/source/svdraw/svdotxat.cxx | 21 | ||||
-rw-r--r-- | svx/source/svdraw/svdotxed.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdouno.cxx | 4 | ||||
-rw-r--r-- | svx/source/svdraw/svdpntv.cxx | 3 | ||||
-rw-r--r-- | svx/source/svdraw/svdundo.cxx | 2 |
20 files changed, 110 insertions, 115 deletions
diff --git a/svx/source/svdraw/svdcrtv.cxx b/svx/source/svdraw/svdcrtv.cxx index 9e6ff2332ef6..564542edcd50 100644 --- a/svx/source/svdraw/svdcrtv.cxx +++ b/svx/source/svdraw/svdcrtv.cxx @@ -405,7 +405,7 @@ sal_Bool SdrCreateView::ImpBegCreateObj(sal_uInt32 nInvent, sal_uInt16 nIdent, c } if (pCreatePV!=NULL) { // otherwise no side registered! - String aLay(aAktLayer); + OUString aLay(aAktLayer); if(nInvent == SdrInventor && nIdent == OBJ_MEASURE && !aMeasureLayer.isEmpty()) { diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx index f62eb7ddba3b..7f0c5f1213c7 100644 --- a/svx/source/svdraw/svdedtv1.cxx +++ b/svx/source/svdraw/svdedtv1.cxx @@ -971,8 +971,7 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, sal_Bool bReplaceAll) } if(bHasEEFeatureItems) { - String aMessage; - aMessage.AppendAscii("SdrEditView::SetAttrToMarked(): Setting EE_FEATURE items at the SdrView does not make sense! It only leads to overhead and unreadable documents."); + OUString aMessage("SdrEditView::SetAttrToMarked(): Setting EE_FEATURE items at the SdrView does not make sense! It only leads to overhead and unreadable documents."); InfoBox(NULL, aMessage).Execute(); } } diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx index 547fa56782c9..b54e96162535 100644 --- a/svx/source/svdraw/svdedtv2.cxx +++ b/svx/source/svdraw/svdedtv2.cxx @@ -1183,7 +1183,7 @@ void SdrEditView::CombineMarkedObjects(sal_Bool bNoPolyPoly) // Undo-String will be set later if( bUndo ) - BegUndo(String(), String(), bNoPolyPoly ? SDRREPFUNC_OBJ_COMBINE_ONEPOLY : SDRREPFUNC_OBJ_COMBINE_POLYPOLY); + BegUndo("", "", bNoPolyPoly ? SDRREPFUNC_OBJ_COMBINE_ONEPOLY : SDRREPFUNC_OBJ_COMBINE_POLYPOLY); // #105899# First, guarantee that all objects are converted to polyobjects, // especially for SdrGrafObj with bitmap filling this is necessary to not @@ -1615,8 +1615,7 @@ void SdrEditView::DismantleMarkedObjects(sal_Bool bMakeLines) if( bUndo ) { // comment is constructed later - BegUndo(String(), String(), - bMakeLines ? SDRREPFUNC_OBJ_DISMANTLE_LINES : SDRREPFUNC_OBJ_DISMANTLE_POLYS); + BegUndo("", "", bMakeLines ? SDRREPFUNC_OBJ_DISMANTLE_LINES : SDRREPFUNC_OBJ_DISMANTLE_POLYS); } sal_uIntPtr nm; @@ -1791,7 +1790,7 @@ void SdrEditView::UnGroupMarked() const bool bUndo = IsUndoEnabled(); if( bUndo ) - BegUndo(String(), String(), SDRREPFUNC_OBJ_UNGROUP); + BegUndo("", "", SDRREPFUNC_OBJ_UNGROUP); sal_uIntPtr nCount=0; OUString aName1; @@ -1979,7 +1978,7 @@ void SdrEditView::DoImportMarkedMtf(SvdProgressInfo *pProgrInfo) const bool bUndo = IsUndoEnabled(); if( bUndo ) - BegUndo(String(), String(), SDRREPFUNC_OBJ_IMPORTMTF); + BegUndo("", "", SDRREPFUNC_OBJ_IMPORTMTF); SortMarkedObjects(); SdrMarkList aForTheDescription; diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index 95da6a413444..21a7ba22f7de 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -1517,8 +1517,7 @@ sal_Bool SdrObjEditView::SetAttributes(const SfxItemSet& rSet, sal_Bool bReplace if(bHasEEFeatureItems) { - String aMessage; - aMessage.AppendAscii("SdrObjEditView::SetAttributes(): Setting EE_FEATURE items at the SdrView does not make sense! It only leads to overhead and unreadable documents."); + OUString aMessage("SdrObjEditView::SetAttributes(): Setting EE_FEATURE items at the SdrView does not make sense! It only leads to overhead and unreadable documents."); InfoBox(NULL, aMessage).Execute(); } } diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx index 34f514901e57..c2f824f779b0 100644 --- a/svx/source/svdraw/svdhdl.cxx +++ b/svx/source/svdraw/svdhdl.cxx @@ -1196,7 +1196,7 @@ void SdrHdlGradient::FromIAOToItem(SdrObject* _pObj, sal_Bool bSetItemOnObject, GradTransGradient aGradTransGradient; GradTransVector aGradTransVector; - String aString; + OUString aString; aGradTransVector.maPositionA = basegfx::B2DPoint(GetPos().X(), GetPos().Y()); aGradTransVector.maPositionB = basegfx::B2DPoint(Get2ndPos().X(), Get2ndPos().Y()); @@ -1220,13 +1220,13 @@ void SdrHdlGradient::FromIAOToItem(SdrObject* _pObj, sal_Bool bSetItemOnObject, if(IsGradient()) { - aString = String(); + aString = ""; XFillGradientItem aNewGradItem(aString, aGradTransGradient.aGradient); aNewSet.Put(aNewGradItem); } else { - aString = String(); + aString = ""; XFillFloatTransparenceItem aNewTransItem(aString, aGradTransGradient.aGradient); aNewSet.Put(aNewTransItem); } diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx index 139182967a58..ae68c4b8eb96 100644 --- a/svx/source/svdraw/svdmodel.cxx +++ b/svx/source/svdraw/svdmodel.cxx @@ -536,7 +536,7 @@ void SdrModel::BegUndo() { if( mpImpl->mpUndoManager ) { - const String aEmpty; + const OUString aEmpty; mpImpl->mpUndoManager->EnterListAction(aEmpty,aEmpty); nUndoLevel++; } @@ -558,7 +558,7 @@ void SdrModel::BegUndo(const OUString& rComment) { if( mpImpl->mpUndoManager ) { - const String aEmpty; + const OUString aEmpty; mpImpl->mpUndoManager->EnterListAction( rComment, aEmpty ); nUndoLevel++; } @@ -581,7 +581,7 @@ void SdrModel::BegUndo(const OUString& rComment, const OUString& rObjDescr, SdrR { aComment = aComment.replaceFirst("%1", rObjDescr); } - const String aEmpty; + const OUString aEmpty; mpImpl->mpUndoManager->EnterListAction( aComment,aEmpty ); nUndoLevel++; } @@ -1173,7 +1173,7 @@ void SdrModel::TakeUnitStr(FieldUnit eUnit, OUString& rStr) case FUNIT_NONE : case FUNIT_CUSTOM : { - rStr = String(); + rStr = ""; break; } case FUNIT_100TH_MM: @@ -1327,10 +1327,10 @@ void SdrModel::TakeMetricStr(long nVal, OUString& rStr, bool bNoUnitChars, sal_I // if necessary, add separators before every third digit if( nVorKomma > 3 ) { - String aThoSep( rLoc.getNumThousandSep() ); - if ( aThoSep.Len() > 0 ) + OUString aThoSep( rLoc.getNumThousandSep() ); + if ( !aThoSep.isEmpty() ) { - sal_Unicode cTho( aThoSep.GetChar(0) ); + sal_Unicode cTho( aThoSep[0] ); sal_Int32 i(nVorKomma - 3); while(i > 0) @@ -1342,11 +1342,11 @@ void SdrModel::TakeMetricStr(long nVal, OUString& rStr, bool bNoUnitChars, sal_I } if (aBuf.isEmpty()) - aBuf.append(sal_Unicode('0')); + aBuf.append("0"); if(bNegative) { - aBuf.insert(0, sal_Unicode('-')); + aBuf.insert(0, "-"); } if(!bNoUnitChars) diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx index 3de2a643bf50..907f3d23a038 100644 --- a/svx/source/svdraw/svdoashp.cxx +++ b/svx/source/svdraw/svdoashp.cxx @@ -410,20 +410,20 @@ Reference< XCustomShapeEngine > SdrObjCustomShape::GetCustomShapeEngine() const if (mxCustomShapeEngine.is()) return mxCustomShapeEngine; - String aEngine(((SdrCustomShapeEngineItem&)GetMergedItem( SDRATTR_CUSTOMSHAPE_ENGINE )).GetValue()); - if ( !aEngine.Len() ) - aEngine = String( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.drawing.EnhancedCustomShapeEngine" ) ); + OUString aEngine(((SdrCustomShapeEngineItem&)GetMergedItem( SDRATTR_CUSTOMSHAPE_ENGINE )).GetValue()); + if ( aEngine.isEmpty() ) + aEngine = "com.sun.star.drawing.EnhancedCustomShapeEngine"; Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); Reference< XShape > aXShape = GetXShapeForSdrObject(const_cast<SdrObjCustomShape*>(this)); if ( aXShape.is() ) { - if ( aEngine.Len() ) + if ( !aEngine.isEmpty() ) { Sequence< Any > aArgument( 1 ); Sequence< PropertyValue > aPropValues( 1 ); - aPropValues[ 0 ].Name = OUString("CustomShape"); + aPropValues[ 0 ].Name = "CustomShape"; aPropValues[ 0 ].Value <<= aXShape; aArgument[ 0 ] <<= aPropValues; Reference< XInterface > xInterface( xContext->getServiceManager()->createInstanceWithArgumentsAndContext( aEngine, aArgument, xContext ) ); diff --git a/svx/source/svdraw/svdocapt.cxx b/svx/source/svdraw/svdocapt.cxx index b5de9891dd07..a41833ccf520 100644 --- a/svx/source/svdraw/svdocapt.cxx +++ b/svx/source/svdraw/svdocapt.cxx @@ -387,7 +387,7 @@ OUString SdrCaptionObj::getSpecialDragComment(const SdrDragStat& rDrag) const if(bCreateComment) { - return String(); + return OUString(); } else { diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index c54423a7ecdb..277833fdabc6 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -67,7 +67,7 @@ using namespace ::com::sun::star::io; #define SWAPGRAPHIC_TIMEOUT 5000 -const Graphic ImpLoadLinkedGraphic( const String aFileName, const String aFilterName ) +const Graphic ImpLoadLinkedGraphic( const OUString aFileName, const OUString aFilterName ) { Graphic aGraphic; @@ -80,12 +80,12 @@ const Graphic ImpLoadLinkedGraphic( const String aFileName, const String aFilter pInStrm->Seek( STREAM_SEEK_TO_BEGIN ); GraphicFilter& rGF = GraphicFilter::GetGraphicFilter(); - const sal_uInt16 nFilter = aFilterName.Len() && rGF.GetImportFormatCount() + const sal_uInt16 nFilter = !aFilterName.isEmpty() && rGF.GetImportFormatCount() ? rGF.GetImportFormatNumber( aFilterName ) : GRFILTER_FORMAT_DONTKNOW; - String aEmptyStr; - com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > aFilterData( 1 ); + OUString aEmptyStr; + css::uno::Sequence< css::beans::PropertyValue > aFilterData( 1 ); // TODO: Room for improvement: // As this is a linked graphic the GfxLink is not needed if saving/loading our own format. @@ -122,12 +122,12 @@ public: class SdrGraphicUpdater : public ::osl::Thread { public: - SdrGraphicUpdater( const String& rFileName, const String& rFilterName, SdrGraphicLink& ); + SdrGraphicUpdater( const OUString& rFileName, const OUString& rFilterName, SdrGraphicLink& ); virtual ~SdrGraphicUpdater( void ); void SAL_CALL Terminate( void ); - bool GraphicLinkChanged( const String& rFileName ){ return maFileName != rFileName; }; + bool GraphicLinkChanged( const OUString& rFileName ){ return maFileName != rFileName; }; protected: @@ -143,14 +143,14 @@ protected: private: - const String maFileName; - const String maFilterName; + const OUString maFileName; + const OUString maFilterName; SdrGraphicLink& mrGraphicLink; volatile bool mbIsTerminated; }; -SdrGraphicUpdater::SdrGraphicUpdater( const String& rFileName, const String& rFilterName, SdrGraphicLink& rGraphicLink ) +SdrGraphicUpdater::SdrGraphicUpdater( const OUString& rFileName, const OUString& rFilterName, SdrGraphicLink& rGraphicLink ) : maFileName( rFileName ) , maFilterName( rFilterName ) , mrGraphicLink( rGraphicLink ) @@ -277,9 +277,9 @@ sdr::contact::ViewContact* SdrGrafObj::CreateObjectSpecificViewContact() void SdrGrafObj::onGraphicChanged() { - String aName; - String aTitle; - String aDesc; + OUString aName; + OUString aTitle; + OUString aDesc; if(pGraphic) { @@ -308,17 +308,17 @@ void SdrGrafObj::onGraphicChanged() } } - if(aName.Len()) + if(!aName.isEmpty()) { SetName(aName); } - if(aTitle.Len()) + if(!aTitle.isEmpty()) { SetTitle(aTitle); } - if(aDesc.Len()) + if(!aDesc.isEmpty()) { SetDescription(aDesc); } @@ -563,7 +563,7 @@ void SdrGrafObj::ForceSwapIn() const if( mbIsPreview ) { // removing preview graphic - const String aUserData( pGraphic->GetUserData() ); + const OUString aUserData( pGraphic->GetUserData() ); Graphic aEmpty; pGraphic->SetGraphic( aEmpty ); @@ -1350,11 +1350,11 @@ IMPL_LINK( SdrGrafObj, ImpSwapHdl, GraphicObject*, pO ) com::sun::star::awt::Size aPreviewSizeHint( 64, 64 ); sal_Bool bAllowPartialStreamRead = true; sal_Bool bCreateNativeLink = false; - (*pFilterData)[ 0 ].Name = String( RTL_CONSTASCII_USTRINGPARAM( "PreviewSizeHint" ) ); + (*pFilterData)[ 0 ].Name = "PreviewSizeHint"; (*pFilterData)[ 0 ].Value <<= aPreviewSizeHint; - (*pFilterData)[ 1 ].Name = String( RTL_CONSTASCII_USTRINGPARAM( "AllowPartialStreamRead" ) ); + (*pFilterData)[ 1 ].Name = "AllowPartialStreamRead"; (*pFilterData)[ 1 ].Value <<= bAllowPartialStreamRead; - (*pFilterData)[ 2 ].Name = String( RTL_CONSTASCII_USTRINGPARAM( "CreateNativeLink" ) ); + (*pFilterData)[ 2 ].Name = "CreateNativeLink"; (*pFilterData)[ 2 ].Value <<= bCreateNativeLink; mbIsPreview = true; @@ -1364,7 +1364,7 @@ IMPL_LINK( SdrGrafObj, ImpSwapHdl, GraphicObject*, pO ) aGraphic, aUserData, *pStream, GRFILTER_FORMAT_DONTKNOW, NULL, 0, pFilterData)) { - const String aNewUserData( pGraphic->GetUserData() ); + const OUString aNewUserData( pGraphic->GetUserData() ); pGraphic->SetGraphic( aGraphic ); pGraphic->SetUserData( aNewUserData ); diff --git a/svx/source/svdraw/svdomeas.cxx b/svx/source/svdraw/svdomeas.cxx index d3b86b8c3da4..0a69261a1a0b 100644 --- a/svx/source/svdraw/svdomeas.cxx +++ b/svx/source/svdraw/svdomeas.cxx @@ -284,7 +284,7 @@ struct ImpMeasureRec : public SdrDragStatUserData FieldUnit eMeasureUnit; Fraction aMeasureScale; bool bShowUnit; - String aFormatString; + OUString aFormatString; bool bTextAutoAngle; long nTextAutoAngleView; bool bTextIsFixedAngle; diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx index 7a99354e3555..765ed1c698da 100644 --- a/svx/source/svdraw/svdoole2.cxx +++ b/svx/source/svdraw/svdoole2.cxx @@ -683,7 +683,7 @@ public: bool mbConnected; SdrEmbedObjectLink* mpObjectLink; - String maLinkURL; + OUString maLinkURL; SdrOle2ObjImpl() : pGraphicObject( NULL ) @@ -967,7 +967,7 @@ void SdrOle2Obj::BreakFileLink_Impl() uno::Reference< embed::XLinkageSupport > xLinkSupport( xObjRef.GetObject(), uno::UNO_QUERY_THROW ); xLinkSupport->breakLink( xStorage, mpImpl->aPersistName ); DisconnectFileLink_Impl(); - mpImpl->maLinkURL = String(); + mpImpl->maLinkURL = ""; } catch( ::com::sun::star::uno::Exception& ) { @@ -1005,8 +1005,8 @@ void SdrOle2Obj::CheckFileLink_Impl() uno::Reference< embed::XLinkageSupport > xLinkSupport( xObjRef.GetObject(), uno::UNO_QUERY ); if ( xLinkSupport.is() && xLinkSupport->isLink() ) { - String aLinkURL = xLinkSupport->getLinkURL(); - if ( aLinkURL.Len() ) + OUString aLinkURL = xLinkSupport->getLinkURL(); + if ( !aLinkURL.isEmpty() ) { // this is a file link so the model link manager should handle it sfx2::LinkManager* pLinkManager = pModel->GetLinkManager(); diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx index 6b1931fc9a3a..33f0888501ea 100644 --- a/svx/source/svdraw/svdopath.cxx +++ b/svx/source/svdraw/svdopath.cxx @@ -496,7 +496,7 @@ public: bool beginPathDrag( SdrDragStat& rDrag ) const; bool movePathDrag( SdrDragStat& rDrag ) const; bool endPathDrag( SdrDragStat& rDrag ); - String getSpecialDragComment(const SdrDragStat& rDrag) const; + OUString getSpecialDragComment(const SdrDragStat& rDrag) const; basegfx::B2DPolyPolygon getSpecialDragPoly(const SdrDragStat& rDrag) const; // create stuff @@ -906,9 +906,9 @@ bool ImpPathForDragAndCreate::endPathDrag(SdrDragStat& rDrag) return true; } -String ImpPathForDragAndCreate::getSpecialDragComment(const SdrDragStat& rDrag) const +OUString ImpPathForDragAndCreate::getSpecialDragComment(const SdrDragStat& rDrag) const { - XubString aStr; + OUString aStr; const SdrHdl* pHdl = rDrag.GetHdl(); const bool bCreateComment(rDrag.GetView() && &mrSdrPathObject == rDrag.GetView()->GetCreateObj()); @@ -930,41 +930,41 @@ String ImpPathForDragAndCreate::getSpecialDragComment(const SdrDragStat& rDrag) aNow = pU->aLineEnd; aNow -= aPrev; - aStr.AppendAscii(" ("); + aStr += " ("; OUString aMetr; if(pU->bCircle) { mrSdrPathObject.GetModel()->TakeWinkStr(std::abs(pU->nCircRelWink), aMetr); - aStr.Append(aMetr); - aStr.AppendAscii(" r="); + aStr += aMetr; + aStr += " r="; mrSdrPathObject.GetModel()->TakeMetricStr(pU->nCircRadius, aMetr, sal_True); - aStr.Append(aMetr); + aStr += aMetr; } - aStr.AppendAscii("dx="); + aStr += "dx="; mrSdrPathObject.GetModel()->TakeMetricStr(aNow.X(), aMetr, sal_True); - aStr.Append(aMetr); + aStr += aMetr; - aStr.AppendAscii(" dy="); + aStr += " dy="; mrSdrPathObject.GetModel()->TakeMetricStr(aNow.Y(), aMetr, sal_True); - aStr.Append(aMetr); + aStr += aMetr; if(!IsFreeHand(meObjectKind)) { sal_Int32 nLen(GetLen(aNow)); - aStr.AppendAscii(" l="); + aStr += " l="; mrSdrPathObject.GetModel()->TakeMetricStr(nLen, aMetr, sal_True); - aStr.Append(aMetr); + aStr += aMetr; sal_Int32 nWink(GetAngle(aNow)); - aStr += sal_Unicode(' '); + aStr += " "; mrSdrPathObject.GetModel()->TakeWinkStr(nWink, aMetr); - aStr.Append(aMetr); + aStr += aMetr; } - aStr += sal_Unicode(')'); + aStr += ")"; } else if(!mrSdrPathObject.GetModel() || !pHdl) { @@ -989,7 +989,7 @@ String ImpPathForDragAndCreate::getSpecialDragComment(const SdrDragStat& rDrag) if(!pDragData) { OSL_FAIL("ImpPathForDragAndCreate::MovDrag(): ImpSdrPathDragData is invalid."); - return String(); + return OUString(); } if(!pDragData->IsMultiPointDrag() && pDragData->bEliminate) @@ -1015,14 +1015,14 @@ String ImpPathForDragAndCreate::getSpecialDragComment(const SdrDragStat& rDrag) Point aBeg(rDrag.GetStart()); Point aNow(rDrag.GetNow()); - aStr = String(); - aStr.AppendAscii("dx="); + aStr = ""; + aStr += "dx="; mrSdrPathObject.GetModel()->TakeMetricStr(aNow.X() - aBeg.X(), aMetr, sal_True); - aStr.Append(aMetr); + aStr += aMetr; - aStr.AppendAscii(" dy="); + aStr += " dy="; mrSdrPathObject.GetModel()->TakeMetricStr(aNow.Y() - aBeg.Y(), aMetr, sal_True); - aStr.Append(aMetr); + aStr += aMetr; if(!pDragData->IsMultiPointDrag()) { @@ -1047,14 +1047,14 @@ String ImpPathForDragAndCreate::getSpecialDragComment(const SdrDragStat& rDrag) aNow -= rXPoly[nRef]; sal_Int32 nLen(GetLen(aNow)); - aStr.AppendAscii(" l="); + aStr += " l="; mrSdrPathObject.GetModel()->TakeMetricStr(nLen, aMetr, sal_True); - aStr.Append(aMetr); + aStr += aMetr; sal_Int32 nWink(GetAngle(aNow)); - aStr += sal_Unicode(' '); + aStr += " "; mrSdrPathObject.GetModel()->TakeWinkStr(nWink, aMetr); - aStr.Append(aMetr); + aStr += aMetr; } else if(nPntAnz > 1) { @@ -1093,12 +1093,12 @@ String ImpPathForDragAndCreate::getSpecialDragComment(const SdrDragStat& rDrag) aPt -= rXPoly[nPt1]; sal_Int32 nLen(GetLen(aPt)); - aStr.AppendAscii(" l="); + aStr += " l="; mrSdrPathObject.GetModel()->TakeMetricStr(nLen, aMetr, sal_True); aStr += aMetr; sal_Int32 nWink(GetAngle(aPt)); - aStr += sal_Unicode(' '); + aStr += " "; mrSdrPathObject.GetModel()->TakeWinkStr(nWink, aMetr); aStr += aMetr; } @@ -1106,20 +1106,20 @@ String ImpPathForDragAndCreate::getSpecialDragComment(const SdrDragStat& rDrag) if(bPt2) { if(bPt1) - aStr.AppendAscii(" / "); + aStr += " / "; else - aStr.AppendAscii(" "); + aStr += " "; Point aPt(aNow); aPt -= rXPoly[nPt2]; sal_Int32 nLen(GetLen(aPt)); - aStr.AppendAscii("l="); + aStr += "l="; mrSdrPathObject.GetModel()->TakeMetricStr(nLen, aMetr, sal_True); aStr += aMetr; sal_Int32 nWink(GetAngle(aPt)); - aStr += sal_Unicode(' '); + aStr += " "; mrSdrPathObject.GetModel()->TakeWinkStr(nWink, aMetr); aStr += aMetr; } diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index 86828e8fbabe..a9f8cdc0bfc6 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -1000,25 +1000,25 @@ OUString SdrTextObj::TakeObjNameSingul() const if(pOutlinerParaObject && eTextKind != OBJ_OUTLINETEXT) { // shouldn't currently cause any problems at OUTLINETEXT - XubString aStr2(comphelper::string::stripStart(pOutlinerParaObject->GetTextObject().GetText(0), ' ')); + OUString aStr2(comphelper::string::stripStart(pOutlinerParaObject->GetTextObject().GetText(0), ' ')); // avoid non expanded text portions in object name // (second condition is new) - if(aStr2.Len() && aStr2.Search(sal_Unicode(255)) == STRING_NOTFOUND) + if(!aStr2.isEmpty() && aStr2.indexOf(sal_Unicode(255)) == -1) { // space between ResStr and content text - aStr += sal_Unicode(' '); + aStr += " "; - aStr += sal_Unicode('\''); + aStr += "\'"; - if(aStr2.Len() > 10) + if(aStr2.getLength() > 10) { - aStr2.Erase(8); - aStr2.AppendAscii("...", 3); + aStr2 = aStr2.replaceAt(8, 1, ""); + aStr2 += "..."; } aStr += aStr2; - aStr += sal_Unicode('\''); + aStr += "\'"; } } diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx index 0365429203f2..75238f69ac68 100644 --- a/svx/source/svdraw/svdotextdecomposition.cxx +++ b/svx/source/svdraw/svdotextdecomposition.cxx @@ -468,11 +468,11 @@ namespace } else if(pPageField) { - pPrimitive = new drawinglayer::primitive2d::TextHierarchyFieldPrimitive2D(aSequence, drawinglayer::primitive2d::FIELD_TYPE_PAGE, String()); + pPrimitive = new drawinglayer::primitive2d::TextHierarchyFieldPrimitive2D(aSequence, drawinglayer::primitive2d::FIELD_TYPE_PAGE, ""); } else { - pPrimitive = new drawinglayer::primitive2d::TextHierarchyFieldPrimitive2D(aSequence, drawinglayer::primitive2d::FIELD_TYPE_COMMON, String()); + pPrimitive = new drawinglayer::primitive2d::TextHierarchyFieldPrimitive2D(aSequence, drawinglayer::primitive2d::FIELD_TYPE_COMMON, ""); } } diff --git a/svx/source/svdraw/svdotextpathdecomposition.cxx b/svx/source/svdraw/svdotextpathdecomposition.cxx index 097b47639177..513345c81358 100644 --- a/svx/source/svdraw/svdotextpathdecomposition.cxx +++ b/svx/source/svdraw/svdotextpathdecomposition.cxx @@ -71,7 +71,7 @@ namespace class impPathTextPortion { basegfx::B2DVector maOffset; - String maText; + OUString maText; xub_StrLen mnTextStart; xub_StrLen mnTextLength; sal_Int32 mnParagraph; @@ -124,7 +124,7 @@ namespace } const basegfx::B2DVector& getOffset() const { return maOffset; } - const String& getText() const { return maText; } + const OUString& getText() const { return maText; } xub_StrLen getTextStart() const { return mnTextStart; } xub_StrLen getTextLength() const { return mnTextLength; } sal_Int32 getParagraph() const { return mnParagraph; } @@ -481,7 +481,7 @@ namespace aNewTransformB.translate(aPerpendicular.getX(), aPerpendicular.getY()); } - if(pCandidate->getText().Len() && nNextGlyphLen) + if(!pCandidate->getText().isEmpty() && nNextGlyphLen) { const xub_StrLen nPortionIndex(pCandidate->getPortionIndex(nUsedTextLength, nNextGlyphLen)); ::std::vector< double > aNewDXArray; diff --git a/svx/source/svdraw/svdotxat.cxx b/svx/source/svdraw/svdotxat.cxx index 97c1bd413e57..bbb4f7f8f30e 100644 --- a/svx/source/svdraw/svdotxat.cxx +++ b/svx/source/svdraw/svdotxat.cxx @@ -224,7 +224,7 @@ void SdrTextObj::ImpSetTextStyleSheetListeners() SfxStyleSheetBasePool* pStylePool=pModel!=NULL ? pModel->GetStyleSheetPool() : NULL; if (pStylePool!=NULL) { - std::vector<XubString*> aStyleNames; + std::vector<OUString> aStyleNames; OutlinerParaObject* pOutlinerParaObject = GetOutlinerParaObject(); if (pOutlinerParaObject!=NULL) { @@ -256,12 +256,12 @@ void SdrTextObj::ImpSetTextStyleSheetListeners() { // we don't want duplicate stylesheets nNum--; - bFnd = aStyleName.equals(*aStyleNames[nNum]); + bFnd = aStyleName == aStyleNames[nNum]; } if(!bFnd) { - aStyleNames.push_back(new XubString(aStyleName)); + aStyleNames.push_back(aStyleName); } } } @@ -270,20 +270,19 @@ void SdrTextObj::ImpSetTextStyleSheetListeners() // now convert the strings in the vector from names to StyleSheet* std::set<SfxStyleSheet*> aStyleSheets; while (!aStyleNames.empty()) { - XubString* pName=aStyleNames.back(); + OUString aName = aStyleNames.back(); aStyleNames.pop_back(); - String aFam = pName->Copy(0, pName->Len() - 6); + OUString aFam = aName.copy(0, aName.getLength() - 6); - aFam.Erase(0,1); + aFam = aFam.copy(1); aFam = comphelper::string::stripEnd(aFam, ' '); - sal_uInt16 nFam = (sal_uInt16)aFam.ToInt32(); + sal_uInt16 nFam = (sal_uInt16)aFam.toInt32(); - SfxStyleFamily eFam=(SfxStyleFamily)nFam; - SfxStyleSheetBase* pStyleBase=pStylePool->Find(*pName,eFam); - SfxStyleSheet* pStyle=PTR_CAST(SfxStyleSheet,pStyleBase); - delete pName; + SfxStyleFamily eFam = (SfxStyleFamily)nFam; + SfxStyleSheetBase* pStyleBase = pStylePool->Find(aName,eFam); + SfxStyleSheet* pStyle = PTR_CAST(SfxStyleSheet,pStyleBase); if (pStyle!=NULL && pStyle!=GetStyleSheet()) { aStyleSheets.insert(pStyle); } diff --git a/svx/source/svdraw/svdotxed.cxx b/svx/source/svdraw/svdotxed.cxx index fa225fdfd9ad..f135b8707f7f 100644 --- a/svx/source/svdraw/svdotxed.cxx +++ b/svx/source/svdraw/svdotxed.cxx @@ -75,7 +75,7 @@ sal_Bool SdrTextObj::BegTextEdit(SdrOutliner& rOutl) { // Outliner has no text so we must set some // empty text so the outliner initialise itself - rOutl.SetText( String(), rOutl.GetParagraph( 0 ) ); + rOutl.SetText( "", rOutl.GetParagraph( 0 ) ); if(GetStyleSheet()) rOutl.SetStyleSheet( 0, GetStyleSheet()); diff --git a/svx/source/svdraw/svdouno.cxx b/svx/source/svdraw/svdouno.cxx index 927a414da873..b7c43ed370c3 100644 --- a/svx/source/svdraw/svdouno.cxx +++ b/svx/source/svdraw/svdouno.cxx @@ -316,7 +316,7 @@ SdrUnoObj& SdrUnoObj::operator= (const SdrUnoObj& rObj) OUString aStr; if( aValue >>= aStr ) - aUnoControlTypeName = String(aStr); + aUnoControlTypeName = aStr; } uno::Reference< lang::XComponent > xComp(xUnoControlModel, uno::UNO_QUERY); @@ -516,7 +516,7 @@ void SdrUnoObj::SetUnoControlModel( const uno::Reference< awt::XControlModel >& uno::Any aValue( xSet->getPropertyValue(String("DefaultControl", osl_getThreadTextEncoding())) ); OUString aStr; if( aValue >>= aStr ) - aUnoControlTypeName = String(aStr); + aUnoControlTypeName = aStr; } uno::Reference< lang::XComponent > xComp(xUnoControlModel, uno::UNO_QUERY); diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx index b7a42daa5196..f854be1ce471 100644 --- a/svx/source/svdraw/svdpntv.cxx +++ b/svx/source/svdraw/svdpntv.cxx @@ -1051,8 +1051,7 @@ void SdrPaintView::SetDefaultAttr(const SfxItemSet& rAttr, sal_Bool bReplaceAll) if(bHasEEFeatureItems) { - String aMessage; - aMessage.AppendAscii("SdrPaintView::SetDefaultAttr(): Setting EE_FEATURE items at the SdrView does not make sense! It only leads to overhead and unreadable documents."); + OUString aMessage("SdrPaintView::SetDefaultAttr(): Setting EE_FEATURE items at the SdrView does not make sense! It only leads to overhead and unreadable documents."); InfoBox(NULL, aMessage).Execute(); } } diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx index 5f6ee2d7633c..df7b1e6ad6f8 100644 --- a/svx/source/svdraw/svdundo.cxx +++ b/svx/source/svdraw/svdundo.cxx @@ -91,7 +91,7 @@ void SdrUndoAction::SdrRepeat(SdrView& /*rView*/) OUString SdrUndoAction::GetSdrRepeatComment(SdrView& /*rView*/) const { - return String(); + return OUString(); } //////////////////////////////////////////////////////////////////////////////////////////////////// |