sw/source/core/layout/fly.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit c083e0f22e2d5bcd7d3e686b18be5f415ffebdc6
Author: Oliver-Rainer Wittmann <o...@apache.org>
Date:   Tue Jul 10 10:34:43 2012 +0000

    #119952# - method <lcl_CalcAutoWidth(..)> - 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

diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index 77c4692..42890b9 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() )
         {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to