Hi all,
"Store/Restore font dropdown MRU" is the required hack I worked on.
I attached the related patch.

From the Easy Hack web page:

Background: When you open a new document, use the font dropdown and select a number of different fonts then the 5 or so most recently used fonts are shown at the top of the list. But when you open a new document then the dropdown resets again. It would be nice to retain the MRU list when opening a new document, and also save and restore the MRU on exit and restart. Code for the dropdown is in svtools/source/control/ctrlbox.cxx, see vcl/unx/source/fontmanager.cxx and "m_aCacheFile" for a sample of the APIs to save/load from/to a file in the users config directories.

My work:
Now when you close a window where a FontNameBox control is provided
the most recent used (mru) entries for the font control are stored
in a file, the previous saved entry list is discarded; when a
document is opened or created the mru entry list of the FontNameBox
control is populated with the one saved in the file.

The file is saved under UserPath/config and is named
fontnameboxmruentries (is there a better place/name ?)

A possible enhancement could be to save the font name box mru entries
for the last 5/10 openened documents.
(How can I get the name of the current document/window ?)


While I was working on this hack I noticed that when two or more
documents are opened spurious resetting of the FontNameBox mru entry
list may happen, I did not get the cause of that, anyway as a
workaround I added a call to FontNameBox::GetMRUEntries at the begin
of the FontNameBox::Fill method and a call to FontNameBox::SetMRUEntries
to the end of the same method in this way even with spurious calls to
the FontNameBox::Fill method the font mru entries are preserved.


Cheers,
Marco


--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

Attachment: binJ9DCXjY2vZ.bin
Description: Binary data

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to