summaryrefslogtreecommitdiff
path: root/svx/source/svdraw/svdocapt.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/svdraw/svdocapt.cxx')
-rw-r--r--svx/source/svdraw/svdocapt.cxx27
1 files changed, 18 insertions, 9 deletions
diff --git a/svx/source/svdraw/svdocapt.cxx b/svx/source/svdraw/svdocapt.cxx
index 7d41191c99a9..102b5b1eb824 100644
--- a/svx/source/svdraw/svdocapt.cxx
+++ b/svx/source/svdraw/svdocapt.cxx
@@ -401,26 +401,35 @@ bool SdrCaptionObj::applySpecialDrag(SdrDragStat& rDrag)
String SdrCaptionObj::getSpecialDragComment(const SdrDragStat& rDrag) const
{
- const SdrHdl* pHdl = rDrag.GetHdl();
+ const bool bCreateComment(rDrag.GetView() && this == rDrag.GetView()->GetCreateObj());
- if(pHdl && 0 == pHdl->GetPolyNum())
+ if(bCreateComment)
{
- return SdrRectObj::getSpecialDragComment(rDrag);
+ return String();
}
else
{
- XubString aStr;
+ const SdrHdl* pHdl = rDrag.GetHdl();
- if(!pHdl)
+ if(pHdl && 0 == pHdl->GetPolyNum())
{
- ImpTakeDescriptionStr(STR_DragCaptFram, aStr);
+ return SdrRectObj::getSpecialDragComment(rDrag);
}
else
{
- ImpTakeDescriptionStr(STR_DragCaptTail, aStr);
- }
+ XubString aStr;
+
+ if(!pHdl)
+ {
+ ImpTakeDescriptionStr(STR_DragCaptFram, aStr);
+ }
+ else
+ {
+ ImpTakeDescriptionStr(STR_DragCaptTail, aStr);
+ }
- return aStr;
+ return aStr;
+ }
}
}