Kaydet (Commit) add80418 authored tarafından Armin Le Grand's avatar Armin Le Grand Kaydeden (comit) Caolán McNamara

Resolves: #i122720# Adapted HasText() to SdrObject

(cherry picked from commit 880138a7)

Conflicts:
	cui/source/tabpages/swpossizetabpage.cxx
	cui/source/tabpages/textattr.cxx
	cui/source/tabpages/transfrm.cxx
	svx/inc/svx/svdobj.hxx
	svx/inc/svx/svdotable.hxx
	svx/inc/svx/svdotext.hxx
	svx/source/svdraw/svdobj.cxx

Change-Id: Ic2564b845425ba63e6ae2ad6a80f3bfdb8a2f287
üst 3e312f72
...@@ -1832,9 +1832,7 @@ void SvxSwPosSizeTabPage::SetView( const SdrView* pSdrView ) ...@@ -1832,9 +1832,7 @@ void SvxSwPosSizeTabPage::SetView( const SdrView* pSdrView )
SdrObjKind eKind = (SdrObjKind) pObj->GetObjIdentifier(); SdrObjKind eKind = (SdrObjKind) pObj->GetObjIdentifier();
if( ( pObj->GetObjInventor() == SdrInventor ) && if( ( pObj->GetObjInventor() == SdrInventor ) &&
( eKind==OBJ_TEXT || eKind==OBJ_TITLETEXT || eKind==OBJ_OUTLINETEXT) && ( eKind==OBJ_TEXT || eKind==OBJ_TITLETEXT || eKind==OBJ_OUTLINETEXT) &&
// #i121917# The original ((SdrTextObj*)pObj)->HasText() will fail badly with SdrVirtObjs from Writer pObj->HasText() )
0 != dynamic_cast< const SdrTextObj* >(pObj) &&
static_cast< const SdrTextObj* >(pObj)->HasText() )
{ {
OSL_FAIL("AutoWidth/AutoHeight should be enabled"); OSL_FAIL("AutoWidth/AutoHeight should be enabled");
} }
......
...@@ -494,9 +494,7 @@ void SvxTextAttrPage::Construct() ...@@ -494,9 +494,7 @@ void SvxTextAttrPage::Construct()
case OBJ_OUTLINETEXT : case OBJ_OUTLINETEXT :
case OBJ_CAPTION : case OBJ_CAPTION :
{ {
if( // #i121917# The original ((SdrTextObj*)pObj)->HasText() will fail badly with SdrVirtObjs from Writer if(pObj->HasText())
0 != dynamic_cast< const SdrTextObj* >(pObj) &&
static_cast< const SdrTextObj* >(pObj)->HasText() )
{ {
// contour NOT possible for pure text objects // contour NOT possible for pure text objects
bContourEnabled = sal_False; bContourEnabled = sal_False;
......
...@@ -788,9 +788,7 @@ void SvxPositionSizeTabPage::Construct() ...@@ -788,9 +788,7 @@ void SvxPositionSizeTabPage::Construct()
if((pObj->GetObjInventor() == SdrInventor) && if((pObj->GetObjInventor() == SdrInventor) &&
(OBJ_TEXT == eKind || OBJ_TITLETEXT == eKind || OBJ_OUTLINETEXT == eKind) && (OBJ_TEXT == eKind || OBJ_TITLETEXT == eKind || OBJ_OUTLINETEXT == eKind) &&
// #i121917# The original ((SdrTextObj*)pObj)->HasText() will fail badly with SdrVirtObjs from Writer pObj->HasText())
0 != dynamic_cast< const SdrTextObj* >(pObj) &&
static_cast< const SdrTextObj* >(pObj)->HasText())
{ {
mbAdjustDisabled = false; mbAdjustDisabled = false;
maFlAdjust.Enable(); maFlAdjust.Enable();
......
...@@ -1050,6 +1050,9 @@ public: ...@@ -1050,6 +1050,9 @@ public:
/// @see mbDoNotInsertIntoPageAutomatically /// @see mbDoNotInsertIntoPageAutomatically
bool IsDoNotInsertIntoPageAutomatically() const; bool IsDoNotInsertIntoPageAutomatically() const;
// #i121917#
virtual bool HasText() const;
protected: protected:
/** Sets a new UNO shape /** Sets a new UNO shape
* *
......
...@@ -172,7 +172,9 @@ public: ...@@ -172,7 +172,9 @@ public:
/** returns the index of the text that contains the given point or -1 */ /** returns the index of the text that contains the given point or -1 */
virtual sal_Int32 CheckTextHit(const Point& rPnt) const; virtual sal_Int32 CheckTextHit(const Point& rPnt) const;
// #i121917#
virtual bool HasText() const; virtual bool HasText() const;
sal_Bool IsTextEditActive() const { return (pEdtOutl != 0L); } sal_Bool IsTextEditActive() const { return (pEdtOutl != 0L); }
bool IsTextEditActive( const sdr::table::CellPos& rPos ); bool IsTextEditActive( const sdr::table::CellPos& rPos );
......
...@@ -336,7 +336,9 @@ public: ...@@ -336,7 +336,9 @@ public:
bool IsFitToSize() const; bool IsFitToSize() const;
SdrObjKind GetTextKind() const { return eTextKind; } SdrObjKind GetTextKind() const { return eTextKind; }
// #i121917#
virtual bool HasText() const; virtual bool HasText() const;
bool HasEditText() const; bool HasEditText() const;
sal_Bool IsTextEditActive() const { return (pEdtOutl != 0L); } sal_Bool IsTextEditActive() const { return (pEdtOutl != 0L); }
......
...@@ -3270,6 +3270,11 @@ bool SdrObject::IsDoNotInsertIntoPageAutomatically() const ...@@ -3270,6 +3270,11 @@ bool SdrObject::IsDoNotInsertIntoPageAutomatically() const
return mbDoNotInsertIntoPageAutomatically; return mbDoNotInsertIntoPageAutomatically;
} }
// #i121917#
bool SdrObject::HasText() const
{
return false;
}
SdrObjFactory::SdrObjFactory(sal_uInt32 nInvent, sal_uInt16 nIdent, SdrPage* pNewPage, SdrModel* pNewModel) SdrObjFactory::SdrObjFactory(sal_uInt32 nInvent, sal_uInt16 nIdent, SdrPage* pNewPage, SdrModel* pNewModel)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment