From c083e0f22e2d5bcd7d3e686b18be5f415ffebdc6 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Tue, 10 Jul 2012 10:34:43 +0000 Subject: #119952# - method - do not provide width of text frame inclusive margins, if text frame is in its formatting. Found by: Yan Ji Patch by: qiuhuaidong at gmail dot com Review by: Oliver-Rainer Wittmann --- sw/source/core/layout/fly.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sw') diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx index 77c469216c68..42890b9d051b 100644 --- a/sw/source/core/layout/fly.cxx +++ b/sw/source/core/layout/fly.cxx @@ -2559,7 +2559,8 @@ static SwTwips lcl_CalcAutoWidth( const SwLayoutFrm& rFrm ) nMin = ((SwTxtFrm*)pFrm)->CalcFitToContent(); const SvxLRSpaceItem &rSpace = ((SwTxtFrm*)pFrm)->GetTxtNode()->GetSwAttrSet().GetLRSpace(); - nMin += rSpace.GetRight() + rSpace.GetTxtLeft() + rSpace.GetTxtFirstLineOfst(); + if (!((SwTxtFrm*)pFrm)->IsLocked()) + nMin += rSpace.GetRight() + rSpace.GetTxtLeft() + rSpace.GetTxtFirstLineOfst(); } else if ( pFrm->IsTabFrm() ) { -- cgit