Author: alg Date: Wed Jul 17 12:07:18 2013 New Revision: 1504082 URL: http://svn.apache.org/r1504082 Log: i122720 Adapted HasText() to SdrObject
Modified: openoffice/trunk/main/cui/source/tabpages/swpossizetabpage.cxx openoffice/trunk/main/cui/source/tabpages/textattr.cxx openoffice/trunk/main/cui/source/tabpages/transfrm.cxx openoffice/trunk/main/svx/inc/svx/svdobj.hxx openoffice/trunk/main/svx/inc/svx/svdotable.hxx openoffice/trunk/main/svx/inc/svx/svdotext.hxx openoffice/trunk/main/svx/source/svdraw/svdobj.cxx Modified: openoffice/trunk/main/cui/source/tabpages/swpossizetabpage.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/cui/source/tabpages/swpossizetabpage.cxx?rev=1504082&r1=1504081&r2=1504082&view=diff ============================================================================== --- openoffice/trunk/main/cui/source/tabpages/swpossizetabpage.cxx (original) +++ openoffice/trunk/main/cui/source/tabpages/swpossizetabpage.cxx Wed Jul 17 12:07:18 2013 @@ -1932,9 +1932,7 @@ void SvxSwPosSizeTabPage::SetView( const SdrObjKind eKind = (SdrObjKind) pObj->GetObjIdentifier(); if( ( pObj->GetObjInventor() == SdrInventor ) && ( eKind==OBJ_TEXT || eKind==OBJ_TITLETEXT || eKind==OBJ_OUTLINETEXT) && - // #121917# The original ((SdrTextObj*)pObj)->HasText() will fail badly with SdrVirtObjs from Writer - 0 != dynamic_cast< const SdrTextObj* >(pObj) && - static_cast< const SdrTextObj* >(pObj)->HasText() ) + pObj->HasText() ) { DBG_ERROR("AutoWidth/AutoHeight should be enabled"); } Modified: openoffice/trunk/main/cui/source/tabpages/textattr.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/cui/source/tabpages/textattr.cxx?rev=1504082&r1=1504081&r2=1504082&view=diff ============================================================================== --- openoffice/trunk/main/cui/source/tabpages/textattr.cxx (original) +++ openoffice/trunk/main/cui/source/tabpages/textattr.cxx Wed Jul 17 12:07:18 2013 @@ -547,9 +547,7 @@ void SvxTextAttrPage::Construct() case OBJ_OUTLINETEXT : case OBJ_CAPTION : { - if( // #121917# The original ((SdrTextObj*)pObj)->HasText() will fail badly with SdrVirtObjs from Writer - 0 != dynamic_cast< const SdrTextObj* >(pObj) && - static_cast< const SdrTextObj* >(pObj)->HasText() ) + if(pObj->HasText()) { // Konturfluss ist NICHT bei reinen Textobjekten m�glich bContourEnabled = sal_False; Modified: openoffice/trunk/main/cui/source/tabpages/transfrm.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/cui/source/tabpages/transfrm.cxx?rev=1504082&r1=1504081&r2=1504082&view=diff ============================================================================== --- openoffice/trunk/main/cui/source/tabpages/transfrm.cxx (original) +++ openoffice/trunk/main/cui/source/tabpages/transfrm.cxx Wed Jul 17 12:07:18 2013 @@ -842,9 +842,7 @@ void SvxPositionSizeTabPage::Construct() if((pObj->GetObjInventor() == SdrInventor) && (OBJ_TEXT == eKind || OBJ_TITLETEXT == eKind || OBJ_OUTLINETEXT == eKind) && - // #121917# The original ((SdrTextObj*)pObj)->HasText() will fail badly with SdrVirtObjs from Writer - 0 != dynamic_cast< const SdrTextObj* >(pObj) && - static_cast< const SdrTextObj* >(pObj)->HasText()) + pObj->HasText()) { mbAdjustDisabled = false; maFlAdjust.Enable(); Modified: openoffice/trunk/main/svx/inc/svx/svdobj.hxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svx/inc/svx/svdobj.hxx?rev=1504082&r1=1504081&r2=1504082&view=diff ============================================================================== --- openoffice/trunk/main/svx/inc/svx/svdobj.hxx (original) +++ openoffice/trunk/main/svx/inc/svx/svdobj.hxx Wed Jul 17 12:07:18 2013 @@ -1125,6 +1125,9 @@ public: Rectangle GetBLIPSizeRectangle() const; void SetBLIPSizeRectangle( const Rectangle& aRect ); + // #121917# + virtual bool HasText() const; + protected: void impl_setUnoShape( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxUnoShape ); Modified: openoffice/trunk/main/svx/inc/svx/svdotable.hxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svx/inc/svx/svdotable.hxx?rev=1504082&r1=1504081&r2=1504082&view=diff ============================================================================== --- openoffice/trunk/main/svx/inc/svx/svdotable.hxx (original) +++ openoffice/trunk/main/svx/inc/svx/svdotable.hxx Wed Jul 17 12:07:18 2013 @@ -184,7 +184,9 @@ public: /** returns the index of the text that contains the given point or -1 */ virtual sal_Int32 CheckTextHit(const Point& rPnt) const; - virtual bool HasText() const; + // #121917# + virtual bool HasText() const; + sal_Bool IsTextEditActive() const { return (pEdtOutl != 0L); } bool IsTextEditActive( const sdr::table::CellPos& rPos ); Modified: openoffice/trunk/main/svx/inc/svx/svdotext.hxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svx/inc/svx/svdotext.hxx?rev=1504082&r1=1504081&r2=1504082&view=diff ============================================================================== --- openoffice/trunk/main/svx/inc/svx/svdotext.hxx (original) +++ openoffice/trunk/main/svx/inc/svx/svdotext.hxx Wed Jul 17 12:07:18 2013 @@ -338,7 +338,9 @@ public: FASTBOOL IsOutlText() const { return bTextFrame && (eTextKind==OBJ_OUTLINETEXT || eTextKind==OBJ_TITLETEXT); } SdrObjKind GetTextKind() const { return eTextKind; } - virtual bool HasText() const; + // #121917# + virtual bool HasText() const; + FASTBOOL HasEditText() const; sal_Bool IsTextEditActive() const { return (pEdtOutl != 0L); } Modified: openoffice/trunk/main/svx/source/svdraw/svdobj.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svx/source/svdraw/svdobj.cxx?rev=1504082&r1=1504081&r2=1504082&view=diff ============================================================================== --- openoffice/trunk/main/svx/source/svdraw/svdobj.cxx (original) +++ openoffice/trunk/main/svx/source/svdraw/svdobj.cxx Wed Jul 17 12:07:18 2013 @@ -3179,6 +3179,12 @@ void SdrObject::SetContextWritingMode( c // this base class does not support different writing modes, so ignore the call } +// #121917# +bool SdrObject::HasText() const +{ + return false; +} + //////////////////////////////////////////////////////////////////////////////////////////////////// // // @@@@ @@@@@ @@@@@@ @@@@@ @@@@ @@@@ @@@@@@ @@@@ @@@@@ @@ @@