Index: src/text/fmt/xp/fp_EmbedRun.cpp =================================================================== RCS file: /cvsroot/abi/src/text/fmt/xp/fp_EmbedRun.cpp,v retrieving revision 1.16 diff -u -5 -r1.16 fp_EmbedRun.cpp --- src/text/fmt/xp/fp_EmbedRun.cpp 1 Jan 2006 07:54:41 -0000 1.16 +++ src/text/fmt/xp/fp_EmbedRun.cpp 16 Jan 2006 15:34:42 -0000 @@ -196,11 +196,11 @@ } void fp_EmbedRun::_drawResizeBox(UT_Rect box) { - _getView()->drawSelectionBox(box,true); + _getView()->drawSelectionBox(box,isResizeable()); } bool fp_EmbedRun::canBreakAfter(void) const { return true; @@ -356,10 +356,15 @@ bool fp_EmbedRun::isEdittable(void) { return getEmbedManager()->isEdittable(m_iEmbedUID); } +bool fp_EmbedRun::isResizeable(void) +{ + return getEmbedManager()->isResizeable(m_iEmbedUID); +} + void fp_EmbedRun::_draw(dg_DrawArgs* pDA) { GR_Graphics *pG = pDA->pG; #if 0 UT_DEBUGMSG(("Draw with class %x \n",pG)); Index: src/text/fmt/xp/fp_EmbedRun.h =================================================================== RCS file: /cvsroot/abi/src/text/fmt/xp/fp_EmbedRun.h,v retrieving revision 1.5 diff -u -5 -r1.5 fp_EmbedRun.h --- src/text/fmt/xp/fp_EmbedRun.h 23 Sep 2005 12:51:58 -0000 1.5 +++ src/text/fmt/xp/fp_EmbedRun.h 16 Jan 2006 15:34:42 -0000 @@ -45,10 +45,11 @@ virtual void updateVerticalMetric(); GR_EmbedManager * getEmbedManager(void); bool isEdittable(void); + bool isResizeable(void); const char * getDataID(void) const; UT_sint32 getUID(void) const { return m_iEmbedUID;} protected: virtual void _lookupProperties(const PP_AttrProp * pSpanAP, Index: src/text/fmt/xp/fv_InlineImage.cpp =================================================================== RCS file: /cvsroot/abi/src/text/fmt/xp/fv_InlineImage.cpp,v retrieving revision 1.11 diff -u -5 -r1.11 fv_InlineImage.cpp --- src/text/fmt/xp/fv_InlineImage.cpp 16 Aug 2005 04:48:29 -0000 1.11 +++ src/text/fmt/xp/fv_InlineImage.cpp 16 Jan 2006 15:34:42 -0000 @@ -24,10 +24,11 @@ #include "gr_Graphics.h" #include "ut_units.h" #include "fl_BlockLayout.h" #include "fp_Line.h" #include "fp_Run.h" +#include "fp_EmbedRun.h" #include "fl_TableLayout.h" #include "fp_TableContainer.h" #include "fv_View.h" #include "gr_Painter.h" #include "xap_Frame.h" @@ -758,13 +759,14 @@ return; } if(pRun->getType() == FPRUN_EMBED) { m_bIsEmbedded = true; + m_bEmbedCanResize = (static_cast(pRun))->isResizeable(); } else - { + { m_bIsEmbedded = false; } UT_sint32 xoff = 0, yoff = 0; pRun->getLine()->getScreenOffsets(pRun, xoff, yoff); // Sevior's infamous + 1.... @@ -1020,14 +1022,22 @@ bool bY = (iTop - ires < y) && (iBot + ires > y); bool bLeft = (iLeft - ires < x) && (x < iLeft + ires); bool bRight = (iRight - ires < x) && (x < iRight + ires); bool bTop = (iTop - ires < y) && (y < iTop + ires); bool bBot = (iBot - ires < y) && (y < iBot + ires); + +// +// Not resizeable embedded object +// + if (m_bIsEmbedded && !m_bEmbedCanResize) + { + m_iDraggingWhat = FV_Inline_DragWholeImage; + } // // top left // - if((iLeft < x) && (x < iLeft + ires) && (iTop < y) && (y < iTop + ires)) + else if((iLeft < x) && (x < iLeft + ires) && (iTop < y) && (y < iTop + ires)) { m_iDraggingWhat = FV_Inline_DragTopLeftCorner; } // // top Right Index: src/text/fmt/xp/fv_InlineImage.h =================================================================== RCS file: /cvsroot/abi/src/text/fmt/xp/fv_InlineImage.h,v retrieving revision 1.5 diff -u -5 -r1.5 fv_InlineImage.h --- src/text/fmt/xp/fv_InlineImage.h 16 Aug 2005 04:48:29 -0000 1.5 +++ src/text/fmt/xp/fv_InlineImage.h 16 Jan 2006 15:34:42 -0000 @@ -116,8 +116,9 @@ PP_AttrProp * m_pImageAP; GR_Image * m_screenCache; bool m_bFirstDragDone; UT_UTF8String m_sCopyName; bool m_bIsEmbedded; + bool m_bEmbedCanResize; }; #endif /* FV_VISUALINLINEIMAGE_H */