convert a slice of editeng and svx from String to OUString
specifically the aRepresentation field/methods in EditFieldInfo and the CalcFieldValue method in SdrTextObj, because they have a tricky dependency. Change-Id: Id1f9dc6d7cacc075983bd224d11dd4de1085a9c1
This commit is contained in:
@@ -505,7 +505,7 @@ private:
|
||||
Color* pTxtColor;
|
||||
Color* pFldColor;
|
||||
|
||||
String aRepresentation;
|
||||
OUString aRepresentation;
|
||||
|
||||
sal_Int32 nPara;
|
||||
xub_StrLen nPos;
|
||||
@@ -551,9 +551,9 @@ public:
|
||||
sal_Bool IsSimpleClick() const { return bSimpleClick; }
|
||||
void SetSimpleClick( sal_Bool bSimple ) { bSimpleClick = bSimple; }
|
||||
|
||||
const String& GetRepresentation() const { return aRepresentation; }
|
||||
String& GetRepresentation() { return aRepresentation; }
|
||||
void SetRepresentation( const String& rStr ) { aRepresentation = rStr; }
|
||||
const OUString& GetRepresentation() const { return aRepresentation; }
|
||||
OUString& GetRepresentation() { return aRepresentation; }
|
||||
void SetRepresentation( const OUString& rStr ){ aRepresentation = rStr; }
|
||||
|
||||
void SetSdrPage( SdrPage* pPage ) { mpSdrPage = pPage; }
|
||||
SdrPage* GetSdrPage() const { return mpSdrPage; }
|
||||
|
@@ -145,7 +145,7 @@ public:
|
||||
virtual OutlinerParaObject* GetOutlinerParaObject() const;
|
||||
|
||||
virtual bool CalcFieldValue(const SvxFieldItem& rField, sal_Int32 nPara, sal_uInt16 nPos,
|
||||
bool bEdit, Color*& rpTxtColor, Color*& rpFldColor, String& rRet) const;
|
||||
bool bEdit, Color*& rpTxtColor, Color*& rpFldColor, OUString& rRet) const;
|
||||
|
||||
// #i97878#
|
||||
virtual sal_Bool TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx::B2DPolyPolygon& rPolyPolygon) const;
|
||||
|
@@ -474,7 +474,7 @@ public:
|
||||
virtual void ReformatText();
|
||||
|
||||
virtual bool CalcFieldValue(const SvxFieldItem& rField, sal_Int32 nPara, sal_uInt16 nPos,
|
||||
bool bEdit, Color*& rpTxtColor, Color*& rpFldColor, String& rRet) const;
|
||||
bool bEdit, Color*& rpTxtColor, Color*& rpFldColor, OUString& rRet) const;
|
||||
|
||||
virtual SdrObject* DoConvertToPolyObj(sal_Bool bBezier, bool bAddText) const;
|
||||
|
||||
|
@@ -475,8 +475,8 @@ IMPL_LINK(SdrObjEditView,ImpOutlinerStatusEventHdl,EditStatus*,pEditStat)
|
||||
IMPL_LINK(SdrObjEditView,ImpOutlinerCalcFieldValueHdl,EditFieldInfo*,pFI)
|
||||
{
|
||||
bool bOk=false;
|
||||
String& rStr=pFI->GetRepresentation();
|
||||
rStr.Erase();
|
||||
OUString& rStr=pFI->GetRepresentation();
|
||||
rStr = "";
|
||||
SdrTextObj* pTextObj = dynamic_cast< SdrTextObj* >( mxTextEditObj.get() );
|
||||
if (pTextObj!=NULL) {
|
||||
Color* pTxtCol=NULL;
|
||||
@@ -499,7 +499,7 @@ IMPL_LINK(SdrObjEditView,ImpOutlinerCalcFieldValueHdl,EditFieldInfo*,pFI)
|
||||
Link aDrawOutlLink=rDrawOutl.GetCalcFieldValueHdl();
|
||||
if (!bOk && aDrawOutlLink.IsSet()) {
|
||||
aDrawOutlLink.Call(pFI);
|
||||
bOk = (sal_Bool)rStr.Len();
|
||||
bOk = !rStr.isEmpty();
|
||||
}
|
||||
if (!bOk && aOldCalcFieldValueLink.IsSet()) {
|
||||
return aOldCalcFieldValueLink.Call(pFI);
|
||||
|
@@ -587,7 +587,7 @@ basegfx::B2DPolyPolygon SdrMeasureObj::ImpCalcXPoly(const ImpMeasurePoly& rPol)
|
||||
|
||||
bool SdrMeasureObj::CalcFieldValue(const SvxFieldItem& rField, sal_Int32 nPara, sal_uInt16 nPos,
|
||||
bool bEdit,
|
||||
Color*& rpTxtColor, Color*& rpFldColor, XubString& rRet) const
|
||||
Color*& rpTxtColor, Color*& rpFldColor, OUString& rRet) const
|
||||
{
|
||||
const SvxFieldData* pField=rField.GetField();
|
||||
SdrMeasureField* pMeasureField=PTR_CAST(SdrMeasureField,pField);
|
||||
|
@@ -41,7 +41,7 @@ void SdrRegisterFieldClasses()
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
bool SdrTextObj::CalcFieldValue(const SvxFieldItem& /*rField*/, sal_Int32 /*nPara*/, sal_uInt16 /*nPos*/,
|
||||
bool /*bEdit*/, Color*& /*rpTxtColor*/, Color*& /*rpFldColor*/, XubString& /*rRet*/) const
|
||||
bool /*bEdit*/, Color*& /*rpTxtColor*/, Color*& /*rpFldColor*/, OUString& /*rRet*/) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@@ -78,7 +78,7 @@ OUString SdrOutliner::CalcFieldValue(const SvxFieldItem& rField, sal_Int32 nPara
|
||||
Color*& rpTxtColor, Color*& rpFldColor)
|
||||
{
|
||||
bool bOk = false;
|
||||
XubString aRet;
|
||||
OUString aRet;
|
||||
|
||||
if(mpTextObj.is())
|
||||
bOk = static_cast< SdrTextObj* >( mpTextObj.get())->CalcFieldValue(rField, nPara, nPos, sal_False, rpTxtColor, rpFldColor, aRet);
|
||||
|
Reference in New Issue
Block a user