sd/source/ui/view/drviews2.cxx |    9 +++++++++
 1 file changed, 9 insertions(+)

New commits:
commit b523e20a8fb8c9c26e7ffdc1b3f5fd06c440985c
Author: Caolán McNamara <caol...@redhat.com>
Date:   Fri Jun 10 13:25:43 2016 +0100

    If we set TextFitToSize we have to unset TextAutoGrow[Height|Width]
    
    e.g. like ImpSetAttributesFitToSize and ImpSetAttributesFitToSizeVertical do
    otherwise you can right click on an outline->text change the value from its
    default of "fit to frame" to "fit to width" ok, then use rightclick->autofit
    to toggle "fit to frame" on and now revisit outline->text and all three
    are set and none can be toggled off
    
    Change-Id: I48e2f364679e055ac776f1e7c5a04efaa2b6d0d2
    (cherry picked from commit 8f04f1a1093f0cab56b9cd3872f7667011f9fcf4)

diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index bbfe30b..6a88b01 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -219,6 +219,15 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
 
                 
mpDrawView->AddUndo(GetDoc()->GetSdrUndoFactory().CreateUndoAttrObject(*pObj));
 
+                if (!bSet)
+                {
+                    //If we are turning on AutoFit we have to turn these off 
if already on
+                    if (static_cast<const 
SdrOnOffItem*>(pObj->GetMergedItemSet().GetItem(SDRATTR_TEXT_AUTOGROWHEIGHT))->GetValue())
+                        
pObj->SetMergedItem(makeSdrTextAutoGrowHeightItem(false));
+                    if (static_cast<const 
SdrOnOffItem*>(pObj->GetMergedItemSet().GetItem(SDRATTR_TEXT_AUTOGROWWIDTH))->GetValue())
+                        
pObj->SetMergedItem(makeSdrTextAutoGrowWidthItem(false));
+                }
+
                 pObj->SetMergedItem(SdrTextFitToSizeTypeItem(bSet ? 
SDRTEXTFIT_NONE : SDRTEXTFIT_AUTOFIT));
 
                 mpDrawView->EndUndo();
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to