Monday, November 18, 2019

Automatic row numbering in the Writer tables

Often we have a Writer table with some numbering in its first column. And when you delete some rows from the table, then you should to make your numbering in first column anew.
There is a beautiful method for that case special for you! After that you shouldn't re-create your numbering in the table.
Just make next steps:
1. Create a table in Writer
2. Select needed column or several cells in column
3. Press Toggle Numbered List icon on toolbar (or select some list style on the Sidebar)
4. Now you have AUTOMATIC numbering of table rows!
For example, you created a numbering for 10 rows. Try delete 5th and 6th row. Your numbering is updated automatic and you have numbering from 1 to 8. And if you insert two row between existing rows with numbering, then you'll get numbering from 1 to 10 automatic also.
You can disable that numbering using the same way as when you created it. Just select cells with numbering and press Toggle Numbered List icon.
The same Russian post is here.

Sunday, November 17, 2019

LibreOffice 6.4 beta 1 is available

LibreOffice 6.4 beta 1 is available for downloading now. There are builds for all main OS for 64 bit. There is a 32 bit build for Windows also.
These builds are only for testing.
Links for downloading below:
Source code
Description of fixed bugs in LibreOffice 6.4 beta 1 compare with LibreOffice 6.4 alpha 1 is by link.
If you found a bug in LibreOffice 6.4 beta 1, then please file a bug reprort in our Bugzilla.

Tuesday, November 12, 2019

Calculations inside of Writer tables

Possibly, not all people know it can to make calculations inside Writer tables like in the Calc. But there are only 25 functions for use inside Writer tables, but Calc has over 400 functions.
To start use functions inside Writer tables you should left click into cell and then press key F2 or "=" on keyboard, or use "Formula" icon on Table toolbar. It shows a Formula bar like in the Calc.
There are Cell address field, Functions drop-down list, Cancel button, Apply button, Formula field on that bar.
Note, links to cells in Writer tables look as <A1> or <B3>. Cell ranges look as <A1:A10> or <A1:D12>.
After the Formula bar appeared you can select functions from drop-down list or can write a formula manually inside the Formula field after equal sign at once.
You can make calculates not only inside one Writer table. You can use values from many tables inside one Writer document. Use link to cell with table name like <Table2.A1>.
Attention! If you made in your formula a link to cell from another table and then changed that table's name, then you'll see an error in the cell like "** Expression is faulty **"! So, you should rename all your tables before you start create formulas inside these tables.
MS Word allows calculations in its native table too. But there are some differences between MS Word and LO Writer in that case.
First - difference between functions sets:

Writer table`s functions
Word table`s functions

Second - in the Writer you type a formula into Formula bar like in the Calc, but in the MS Word you type a formula into the different dialog window.
Third - you can click on cells in the Writer tables when you create a formula, but in the MS Word you can't make it
Fourth - Writer can automatically recalculate result of formula when you change source values, but MS Word can't.
ps: if there is a formula inside a Writer table, then you'll never know about it wihout tooltip! Cell with formula looks like any another cell without formula in the table=(

Sunday, November 10, 2019

The best LibreOffice Extensions. Remove Duplicates Fast

There are many good extensions for LibreOffice. You can find it all on site I want to tell you about the best from it.
So, there is an enhancement 85976 about adding of Remove Duplicates feature to LibreOffice Calc. That is really useful function and LibreOffice Calc isn't having it now.
However, there is Remove Duplicates Fast extension that adds need feature to Calc. It's a fork of another extension Remove Duplicates.
RDF allows you delete all row duplicates from selected range using values from one or more column. Just download it by link above, install and use it from Data menu.
Thanks to Mike Kaganski for great code writing.

Friday, November 8, 2019

Footnotes and Endnotes in LibreOffice Writer

It's translation of my Russian post about Footnotes and Endnotes to English.
What's Footnote? Wiki says us next:
A note is a string of text placed at the bottom of a page in a book or document or at the end of a chapter, volume or the whole text. The note can provide an author's comments on the main text or citations of a reference work in support of the text. Footnotes are notes at the foot of the page while endnotes are collected under a separate heading at the end of a chapter, volume, or entire work.
It looks in the text document so:
Note, the notes in the text are highlight by gray color. It made for help of users and will not be print on paper.
LibreOffice Writer can insert both types of notes: Footnotes and Endnotes.
On image above you see that footnotes places in bottom of page and endnotes places on latest page in the document. Page with endnotes is always latest page in the document. If you have last "empty" page in your document with even only one empty paragraph, then the endnotes page will be next page anyway.
Font size for footnotes and endnotes is smaller than basic font size in text body by default.
Use menu "Insert->Footnote and Endnote->Footnote" and "Insert->Footnote and Endnote->Endnote" to insert notes.
Notes have own options. You can find it in "Tools->Footnotes and Endnotes...". I think it needs to rename that item to something like "Foot/Endnotes settings".
The dialog has two tabs:
Here can set up numbering type, for Footnotes can to set up counting per page, per chapter or per document, can select paragraph ans symbol styles, etc.
Footnotes have else one place with some parameters. It's "Page style" dialog, "Footnote" tab:
Look at two options in Footnote area section. Its are responsible for footnotes area height on the page. If you select "Maximum footnote height" with small value and your footnote's text will be too long, then that text could be move to next page to its footnotes area. It may be unwanted. Also here you can customize Separator line between text body and footnotes area.
Next place with some parameters for notes is "Paragraph style" dialog for Footnote or Endnote. Select your Footnote (or Endnote), open Styles tab in the Sidebar, select Footnote (or Endnote) in the list of styles, right click and select "Modify":
Here you can change many options for text of footnotes.
Note, you can select any paragraph style for footnotes (or endnotes) text. Just for your convenience LibreOffice already has predefined styles. Footnote paragraph style is just style by default for footnotes.
Next thing that you'll want customize is note number view in the text body. Use options of Footnote (or Endnote) anchor symbol style. Find that style in the list of symbol styles in the Sidebar, right click on style name and select "Modify". Use "Font" and "Position" tabs in the dialog to customize view of note number.
Also Footnote text in bottom of the page has a number. If you want customize that number view, then use changing of "Footnote (or Endnote) characters" character style.
And, finally, there are pair of lifehacks for work with Footnotes and Endnotes in Writer text document.
First. Possibly you'll want to have two or more the same footnote number in the text body that will be link with only one footnote text in bottom of the page:
Make follow steps:
1. Insert first Footnote using menu "Insert->Footnote and Endnote->Footnote"
2. Second and all next the same number we'll be insert using dialog "Insert->Cross-reference...". In "Type" list select "Footnote", in "Insert reference to" list select "Reference, then press "Insert" button. You got link to the same footnote. But it looks like text body text. So...
3. Select your second footnote number in text body and apply to it "Footnote anchor" symbol style!
Second. Normally Endnotes place on latest page of the document. But there is a method for placing of Endnotes after end of text body at once.
1. Make sure you have all need Endnotes in the your document. 
2. Select all text using Ctrl+A.
3. Select menu "Insert->Section"
4. Go to Footnotes/Endnotes tab
5. Check "Collect at end of section" in Endnotes section
6. Press "Insert" button
Voila, we have Endnotes after text body at once.

Wednesday, November 6, 2019

New Table section was added to Writer Sidebar

Tamás Zolnai from Collabora added to Writer Sidebar new Table section. Now when you click inside a Writer table then you'll see in Sidebar new section with controls for handling of the table like "Add row", "Add column", etc.
It will be available in LibreOffice 6.4 that will be release in February 2020 year

Tuesday, November 5, 2019

Changing of cairo to skia inside LibreOffice

Developers of LibreOffice are making an experiment. They make changing of cairo to skia inside LibreOffice.
That change will be merge in to the master after branch of LibreOffice 6.4

Thursday, July 4, 2019

Changing of fonts in windows installer dialog of LibreOffice

Windows installer dialog of LibreOffice had old Tahoma font, but modern OS Windows (7 and newer) uses Segoe UI font for all UI elements. There is a bug about changing windows installer font in our bugzilla.
Our installer uses Windows MSI like many other Windows softwares. For changing any parameters of MSI it can use Orca tool. You can download it here.
After installing of Orca right click to LibreOffice installer file and select context menu item "Edit with Orca". It opens a dialog:
In left side of the dialog it shows the list of tables. Every table has some data (text of messages, size of controls, type of controls, etc). MSI uses these data for showing of installer dialogs.
To change of only font in the dialog we need TextStyle table. Select it:
On picture above you see a data for the TextStyle table. In this case it's just list of fonts. There are columns:
TextStyle - internal name (ID) for font. It using in other tables inside MSI.
FaceName - real font name as it's in your OS Windows.
Size - font size.
Color - font color.
StyleBits - format mark for font: 1 for bold, 2 for italic.
There are many different fonts in this table. But, in fact installer dialog windows use only three fonts from that list. I have checked it using Find dialog in the Orca tool.
Press shortcut Ctrl+F. It opens Find dialog. In a text field enter internal name of font and press Find button. Press F3 to find next occurence. You can see the dialog don't use, for example, any Arial fonts, because there are no that font name in any tables except TextStyle.
So, in fact we need only three type of font: Default, Default Bold and Heading.
I changed internal name of fonts and all another options and got follow view of TextStyle table:
Because I changed internal font's names my next step was to change it in need other tables:
- in the Property table in DefaultUIFont row in Value column type our new internal font name - DialogDefault
- the Control table and the RadioButton table both had links to fonts like {&Tahoma8} in start of text phrase. But after review of my patch I have knew that these tables have special ID instead
phrase. It have made for localization. I'll write about it some later.
In general it were all changings for adding new fonts in to installer dialogs.
But because Segoe UI font is bigger than Tahoma and because we used font size 9pt instead 8pt our text became out of special text area. It just crops by text areas border. All sizes of dialogs and text areas inside dialogs hard coded in the same MSI tables. Then we should change it too.
At first I checked view for all dialog windows using menu Tool->Dialog Preview. It opens follow window in Orca:
There are 31 dialog windows in the LibreOffice installer include some error and information messages. Select a dialog from the list (don't need to open sublevels) and push Preview button. Look at dialog preview. It created the preview using current values from MSI table. For close the preview just click out of preview or push Done button.
To show all text we should increase some text areas but text areas should fit inside dialog window. So we should increase size of dialog windows too.
I began from changing of size main dialog windows. It all had size 374x266 units (not pixels!).
Note: MSI uses for define of all sizes special installer unit. It equals 1/12 of MS Sans Serif 10pt size! It has made for scale of GUI opportunity in OS Windows.
Sizes of dialog windows are in the Dialog table in the Width and Height columns. For more easy next work I changed only width of main dialog windows, I increased it to 474 units.
Next step is size changing of the text areas and moving of controls inside dialog windows to new place because we increased width of the dialog windows. All values for it are in the Control table. We need next column in the table:
Dialog - an internal name of the dialog window
Control - an internal name of the control  
Type - a type of the control (image, text area, text field, button, checkbox, drop-down control or radiobutton)
Х - a distance from the left edge of the dialog window to the left edge of the control, in units
Y - a distance from the top edge of the dialog window to the top edge of the control, in units
Width - a width of the control, in units
Height - a height of the control, in units
Text - a label on the control. We'll look at this value to understand which control we are moving or changing.
I made follow:
- if I touched a button then I increased the X value by 100 units. (Button Help was an exception, because it is on the left part of the dialog window and shouldn't move anyway in our case). 
- if I touched other controls then I increased the Width value by 100 units.
After changing all values for one dialog window I looked at it using Preview function. If it was OK then I started change next.
In final I exported changed tables in to files using menu Tables->Export Tables. Select need tables in the list, select Output directory and push OK button.
There are the same tables with MSI options in the source code of LibreOffice. It's the most important thing. Now we can just change files with tables in the source code by our tables from Orca. Right? No!
Files in the source code almost the same, but it isn't the same as Orca shows! There are differences in file name, in inside structure. It's a link to all MSI tables in the source code of LibreOffice.
For minimize of changing in the source code my mentor Mike Kaganski asked me rework my first patch, special the file with Control table. It was difference in sorting of rows between source code file and my file.
And I changed else one file - Control.ulf (It's here) that we didn't touch in Orca. That file has all text strings from dialog windows with its ID. It's a part of localization mechanism for our windows installer.
And last problem was a banner. It's image from top part of the main dialog windows (the new dialog window is left):
Look at top image with 6 on the left window and compare it with the same on the right window.
We increased width of the dialog window and width of the image area, but we didn't change banner image! And our banner is stretchet now.
It's a link to banner in the source code. I downloaded it and changed it using the GIMP. Banner had width 499px (image uses pixels!) and I added width to 632px (just 499/374*474=632).
It's all. The patch was merged in to source code and you can look at new view of installer dialog windows yourself now.