summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-06-10 13:25:43 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-06-10 13:30:02 +0100
commit8f04f1a1093f0cab56b9cd3872f7667011f9fcf4 (patch)
tree541f59f86062c516f006a703d79d5cf3f4ce5f77 /sd
parent189f2e52b8e194c12b182d9321f2efac4d04dfcd (diff)
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
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/view/drviews2.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index b78b8ce9c1a0..36f954df48cc 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();