[Libreoffice] [PATCH] Making default tab prefix name configurable in Calc

Michael Meeks michael.meeks at suse.com
Thu Jan 26 03:07:03 PST 2012

Hi Albert,

On Wed, 2012-01-25 at 21:48 +0100, Albert Thuswaldner wrote:
> Can you give me any pointers on how to intercept a input value change
> event. I've done some digging (looking for an event listener) but
> haven't found it quite yet.

	Let me help de-tangle a bit (if I can). It rather depends on the widget
that is being used, and who is sub-classing it to do whatever madness on
the way. Anyhow; assuming it is the 'rename' context menu on a tab; the
code goes:

source/ui/view/tabvwshf.cxx-                    AbstractScStringInputDlg* pDlg = pFact->CreateScStringInputDlg(
source/ui/view/tabvwshf.cxx-                        GetDialogParent(), aDlgTitle, String(ScResId(SCSTR_NAME)),

	Which ends up with a generic string input:

sc/source/ui/inc/strindlg.hxx:class ScStringInputDlg : public ModalDialog
    Edit            aEdInput;

	So we have an 'Edit' being used.


	Shows a number of likely candidates; connecting to the 'ModifyHdl'
and running the validator on the name, removing characters if it not valid
might work; but of course.

	git grep SetModifyHdl

	for some instances of that; possibly we don't want to stop user input,
but have a FixedLine that says "invalid entry, last valid name was
'foo'" or whatever (?).

	Anyhow - thanks for polishing this ! :-)



michael.meeks at suse.com  <><, Pseudo Engineer, itinerant idiot

More information about the LibreOffice mailing list