Ask Your Question
0

How do I add "Menu - Format Cells - Alignment - Shrink to fit cell size" to Toolbars or Keyboard Shortcut Keys in Calc?

asked 2017-02-02 04:13:24 +0200

LibreOfficer gravatar image

How do I add "Menu - Format Cells - Alignment - Shrink to fit cell size" to Toolbars or Keyboard Shortcut Keys in Calc?

I can't find "Shrink to fit cell size" in "Tools - Customize - Toolbars - Add - Commands" or "Tools - Customize - Keyboard - Functions".

(I use LibreOffice v5.2.1.2.)

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2017-02-02 04:30:58 +0200

Ratslinger gravatar image

updated 2017-02-02 05:55:50 +0200

You cannot find Shrink to fit cell size because it is not a menu item. Format Cells is a menu item which opens the dialog where Alignment tab contains Shrink to fit cell size.

Edit: Another alternative is to write your own macro and then create a toolbar item to execute the macro.

This routine is a toggle.. When run, if normal it will Shrink selected cells and if Shrink is on it will turn off.

Sub ToggleShrinkCells
   Dim oCurrSel As Object
  oCurrSel = ThisComponent.getCurrentSelection()
  If oCurrSel.ShrinkToFit Then
     oCurrSel.ShrinkToFit = False
  Else
    oCurrSel.ShrinkToFit = True
  End If
End Sub
edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-02-02 04:13:24 +0200

Seen: 129 times

Last updated: Feb 02 '17