Pergunte aqui

Perfil de doug - atividade

2020-08-22 19:28:47 +0100 Medalha recebida  Pajé (fonte)
2020-08-07 07:39:06 +0100 Medalha recebida  Pajé (fonte)
2020-05-08 18:01:37 +0100 Medalha recebida  Resposta legal (fonte)
2019-09-01 22:47:51 +0100 Resposta comentada Clear direct formatting ignores Character Styles

@ajlittoz Yes, I am seeing there are benefits to the LO styles implementation. The confusing thing here is that the c

2019-09-01 22:47:16 +0100 Resposta comentada Clear direct formatting ignores Character Styles

@ajlittoz Yes, I am seeing there are benefits to the LO styles implementation. The confusing thing here is that the '

2019-09-01 18:18:36 +0100 Resposta comentada Clear direct formatting ignores Character Styles

This is a great explanation of a positively terrible implementation of styles in LibreOffice. LO devs take note: if th

2019-09-01 18:07:40 +0100 Resposta comentada Writer: Paragraph style does not apply font type

Wait. So you can, at the same time apply to the same text a paragraph style that contains font formatting as well as an

2018-09-20 11:03:54 +0100 Medalha recebida  Resposta legal (fonte)
2018-03-26 14:39:53 +0100 Medalha recebida  Pajé (fonte)
2017-12-07 04:20:34 +0100 Medalha recebida  Pergunta boa (fonte)
2017-11-05 02:29:34 +0100 Marcada como a melhor resposta Base: How to change ListBox SelectedValue via LO Basic

Trying to use LO Basic macro to change value of List Box in LO Base form. The ListBox is on a grid control on the form.

short problem: when I change the .SelectedValue = newvalue, it does not change the list. This operation does change the .currentvalue (can see this by printing), whch when queried on other lines with saved values, returns the list value. However, the form is not actually refreshing or recognizing the list position when I change it. I tried .refresh, but that did not seem to do anything.

to get started:

dim new_val
dim frm, ofForm, oControl
frm = ThisComponent.Drawpage.Forms
ofForm = frm.getByName("MyForm")
oControl = ofForm.GetByName("MainForm_Grid")

looking for the ListBox equivalent of :

oControl.GetByName("text1").text = new_val


oControl.GetByName("list1").SelectedValue = new_val

this sort of worked, because when I then

print oControl.GetByName("list1").currentvalue

it returns new_val, which suggests the operation was successful.

However, on the actual form, the new_val was not saved or displayed, remained blank, no effect. May be a bug, or I may be missing something.

The SDK reference is here.

2017-11-05 02:29:34 +0100 Medalha recebida  Pajé (fonte)
2017-11-05 02:29:34 +0100 Medalha recebida  Autodidata (fonte)
2017-05-10 06:08:55 +0100 Medalha recebida  Estudante (fonte)
2017-04-29 00:35:00 +0100 Medalha recebida  Pajé (fonte)
2017-01-22 03:02:33 +0100 Medalha recebida  Pajé (fonte)
2017-01-11 02:24:45 +0100 Respondeu uma pergunta How do I set up a ODBC connector for MariaDB in Base?

The answer for you may vary. The MariaDB ODBC driver ver 2 does seem to perform competently connecting other applications, but it does not work with LibreOffice. For me, it required both the 64-bit and 32-bit drivers-- this was an architecture thing, and once configured it was able to retrieve the table list for LibreOffice. This was an improvement over the ver 1 driver, which immediately crashed as you described. However, for my database I could load no further data because of data type mismatches of some kind. I have bug-reported type mismatch problems in the past involving MariaDB, connectors (MariaDB report here, LO bugzilla report here) but this is a connector and apparently the teams do not completely see eye-to-eye on how to do that. I don't really know whether there is a direct connection between the reported problems and the current error message, and have stuck with MySQL connectors, which have become increasingly tenuous (the installer for the most recent version does not work for me). My hope is that MaraDB and LibreOffice generate a viable community-supported ODBC connector.

2017-01-09 02:08:03 +0100 Pergunta comentada --convert-to does not convert data from DDE links

Looks like a similar question went unanswered on this forum. Are the DDE links in the document absoloute paths? I do not replicate with a =DDE() function in a spreadsheet, works fine for me with conversion. Haven't quite figured out yet how to replicate in Writer.

2017-01-09 01:12:20 +0100 Pergunta comentada I have LibreOffice 5.2. All of a sudden it will not load. Error message is it is not responding. I have Windows 10 on my computer. Help!

What kind of security system? Is there a pop-under window seeking permission to run LO? In the security system is there a list of allowed programs? What if you run 'Writer' directly, rather than trying to open from the LibreOffice application window?

2017-01-09 01:07:56 +0100 Pergunta editada I have LibreOffice 5.2. All of a sudden it will not load. Error message is it is not responding. I have Windows 10 on my computer. Help!

Put a new security system on, it did work after that was installed, but now is unresponsive.

* UPDATE 1/8/2017 * Thanks, Doug. I did that. What happens is I click on the Libre program to open it. Up comes the the Libre title page. Then a blank white page with Libreoffice in small print in the upper left corner. The little o in the middle of the screen just keeps spinning and nothing happens. I click to close and a box comes up that says the program is not responding, and do I want to close it out. So I do.

I don't know if I should uninstall and reinstall, if that would correct it. I don't want to lose any documents. Any suggestions?

2017-01-07 23:44:18 +0100 Resposta comentada Concatenating text from 3 cells into a usable formula

It works if you enclose A1 in its own CONCATENATE function. Thus, your last statement would be =DDE("soffice"; CONCATENATE(A1); "Job Summary.B5")

2017-01-07 01:14:29 +0100 Resposta comentada libre at work

Yes, see comments to 51004.

2017-01-05 12:03:07 +0100 Pergunta comentada Strange visual behaviors after upgrade to

try reinstalling LO

2017-01-03 19:14:52 +0100 Resposta comentada I am ready to abandon MS Word for my 1500 page document with over 200 PNG files. Can LibreOffice handle a document like this?

For a long time I maintained a text-only ODF with LO, which was over 2500 lines or I guess 125 pages. Was plagued by a rendering error I assume based on LO handling of limited HW resources. I absolutely would convert the project per answer of @m.a.riosv and would not use a consolidated document.

2017-01-03 18:53:31 +0100 Resposta comentada Is the odt format inferior to docx?

the key interoperability problem from my perspective is handling of Styles. MS hits the nail on the head there: "There is an increase in the number of styles after you save the document in .odt format, and all formatting in ODF is style based."

2017-01-02 20:52:31 +0100 Pergunta comentada base reports slow

For me the slowness is not quite that slow. For anything more detailed, will need more detail about what is in the reports, what is your setup, what versions of LO and Java, etc.

2017-01-02 19:30:41 +0100 Resposta editada How do I run an SQL file in Base

I have been trying to convert MS Access databases to Base with HSQLDB back end. The first step using a Base front end and an Access back end was not too bad apart from the usual syntax peculiarities.

Getting INSERT queries to work from macros with the HSQLdb back end was another matter, until I found this useful post. Here is my modification of whalleys code above:

Sub doSql (s as string)

Rem Runs an SQL command, including INSERT as well as SELECT

Dim oStatement as object

 if IsNull(ThisComponent.CurrentController.ActiveConnection) then



  oStatement = ThisComponent.CurrentController.ActiveConnection.createStatement()


end sub

'and a little test to show the syntax of the command:

Sub testdoSQL

dim str as string

  str =  "INSERT INTO ""T1"" (""ID"", ""Val"")  VALUES (3,'c')"


end sub

Now all you have to do is pop the required sql statement into a string variable and use the doSql sub to run it. Sorry if this is a bot late for allan, but it might help someone else.

2017-01-02 18:36:57 +0100 Pergunta comentada --convert-to does not convert data from DDE links

can you give a little more step-by-step detail of the method you are using to 'convert automatically to PDF'?

2017-01-02 04:06:09 +0100 Pergunta editada LibreOffice Base, iMac: error: 'no JRE' despite installing Oracle JDK

Base does not work on my iMac (iOS 10.12.2) - the error message claims there is no JRE yet my iMac has the latest installed. This problem also occurs on another Mac - exactly the same error message.

2017-01-02 02:56:16 +0100 Pergunta comentada I have LibreOffice 5.2. All of a sudden it will not load. Error message is it is not responding. I have Windows 10 on my computer. Help!

have you tried to kill the background process soffice.bin using the task manager available via ctrl+alt+delete? There may be a few of them.

2017-01-02 02:03:35 +0100 Respondeu uma pergunta Concatenating text from 3 cells into a usable formula

The worksheet reference you are using converts easily to a DDE() spreadsheet function, which can be used in a CONCATENATE() statement. Thus, your cell reference becomes:

=DDE("soffice"; "file:///C:/Users/PB/Documents/Timesheets/517.TimeKeeping.xlsx"; "Job Summary.B5")

And then the concatenation function becomes:

=CONCATENATE(DDE("soffice"; "file:///path/filename.ods"; "Sheet1.A1"), A1)

Or you can perform any other function on the result, such as addition

=DDE("soffice"; "file:///path/filename.ods"; "Sheet1.A1") + A1

And you can force treatment of the data as a number via conversion function such as VALUE().

The & method of concatenation noted in your question does not work for me using the file reference syntax in the question.

2016-12-31 21:34:52 +0100 Resposta comentada Which Event Macro on spreadsheet contents change?

excellent answer here so I removed my partial response.

2016-12-30 23:21:22 +0100 Respondeu uma pergunta Which Event Macro on spreadsheet contents change?

There are events under the regular menu Tools --> Macros --> Organize Macros --> LibreOffice Basic, pick the Macro that you created and then say Assign. There is a Modified Status was Changed event in that list.

There also is an actual 'OnChange' event that you can see by executing a macro that says this:

oSheets = ThisComponent.getSheets(0)
oSheet = oSheets.getByIndex(0)
MsgBox oSheet.Events.ElementNames(5)

There may be better events that are accessible programmatically. This questions and answer might provide a technique for using them, which I myself have not tried.

I would think tracking the cursor also would be a cleaner solution. In Writer documents the cursor is an object or provided by the controller, provided by the document ... does not seem to be in Calc.

I'll update the answer if I crystallize either approach further.

2016-12-29 18:31:41 +0100 Pergunta comentada How to open my corrupted libreoffice document

If you had a hyperlink at the location where there was cutoff, try the solution indicated in Comment 9 for the Bug Report 55143. That would be accessing the .xml internals and deleting the link. Of course, work on an additional backup copy.

2016-12-29 18:10:05 +0100 Respondeu uma pergunta calc: show or hide columns based on cell value

This is indeed not possible using the 'conditional formatting' technique, AFAIK.

Hiding a row is possible using a macro. The fundamentals are invoking the Row object and setting the IsVisible property to False. This can be done whenever the String in a desired cell has a certain value, and you could iterate over all the cells and you could pick the desired event to trigger the macro.

The very simple barebones example below will examine the contents of Cell A1 in the first sheet in the workbook, and if that cell contains the text Hello, then the macro will hide the row. If, on the other hand, it does not say Hello it will unhide the row.

Sub MyDoLoop

Dim oCell as Object, oSheet as Variant, oSheets as Variant, oString as String

oSheets = ThisComponent.getSheets(0)
oSheet = oSheets.getByIndex(0)
oRows = oSheet.Rows
oRow = oRows.GetByIndex(0)

oCell = oSheet.GetCellByPosition(0, 0)
oString = oCell.getString()
If oString = "Hello" Then
  oRow.IsVisible = False
  oRow.IsVisible = True
End If

End Sub

You will need to scaffold code around this to trigger it at the right time, to iterate across the cells with the key values, etc. This is simply the core method. Hope this helps.

2016-11-17 22:54:27 +0100 Medalha recebida  Pajé (fonte)
2016-09-05 18:41:52 +0100 Pergunta comentada Issues with forms and autofill in Base

I have done forms that use functionality like this, but it always winds up taking much more macro coding than anticipated.

2016-09-05 18:39:38 +0100 Pergunta comentada Issues with forms and autofill in Base

The use of a ListBox on a MainForm to anchor and change the contents of SubForm also may require strategic use of reload for the SubForm, whenever the name in the ListBox changes. That is, it would require use of macros.

2016-09-05 18:37:13 +0100 Pergunta comentada Issues with forms and autofill in Base

try instead using a ListBox on the MainForm that binds on the CustomerID but that displays the text from the name columns using CONCAT("LastName", "FirstName").

2016-09-05 18:35:21 +0100 Pergunta comentada Issues with forms and autofill in Base

the problem is you want to use a FirstName control serve as the link to a subform with customer information. Technically possible if you move the FirstName control to the MainForm and then change the SubForm properties. However, you can't really identify your customers uniquely just by first name.

2016-09-05 16:44:38 +0100 Medalha recebida  Resposta legal (fonte)
2016-02-28 13:40:43 +0100 Pergunta comentada Base keeps crashing when I use find record function

Looks like it has not been reported to bugzilla. If you are using a current version, consider doing so. I see similar bug for old version 3.4 that was patched.

2016-02-23 03:15:53 +0100 Pergunta comentada Base reports freezing

There is a major bugfix for reports coming in LO I would suggest upgrading to either that, or to the most recent LO in the LO 4 branch. If that does not work, consider filing a bug report.