Similiar to afc41a467f ,
don't call getaddrinfo in getLocalHostname which calls DNS.
This causes a lag when creating the lockfile on opening a document
if the network is flaky/disabled.
See tdf#97931 and tdf#47179 for some problems caused by this.
For the one case where it is expected to call DNS, add a separate function
to restore the old behavior.
The (semantic) [API CHANGE] is in osl_getLocalHostname,
it does no longer return a FQDN.
Change-Id: I43455715a474ff6770351d1ce007c28aeb08f32e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107554
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
Showing them means that the layout is different from what is printed.
This probably shouldn't be the default.
The similiar HiddenCharacter is also false by default.
Change-Id: Id68408463ccbceab18b73ac78f24d1b4b4cbeaeb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107385
Tested-by: Jenkins
Reviewed-by: Oliver Brinzing <oliver.brinzing@gmx.de>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Calling 'gethostname' already gives us the current host name on Windows.
For some reason, if that name does not contain a dot, GetAddrInfoW is
called, which "provides protocol-independent translation from a Unicode
host name to an address".
So all this function does, is returning an address for a hostname,
while we still only need the hostname and not the address.
This causes a lag when creating the lockfile on opening a document
if the network is flaky/disabled.
See tdf#97931 and tdf#47179 for some problems caused by this.
Change-Id: I0c543ea12c23506b2daa50da40bae1a471f6fe16
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107513
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Needs to handle the "PrinterName" argument.
This can be used in macros to change the default printer.
Change-Id: I5d451843a5b15cda6db031c8a3a40bbc310d9107
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106653
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
When calling "uno:Printersetup" from a macro, allow preselecting a
printer in the printer setup dialog by passing the printer name
as an argument "PrinterName"
Change-Id: I6b435f52a4123dc7fd49f6d771052ff1b8e743c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106634
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Did you know you can install xcu files directly via extension manager?
Now it should be easier to discover...
Change-Id: I9a96708fd13f762b20916540e6fa9b87bb582677
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100176
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
This was introduced with da62b0feb6 to find
the best paper size for user defined page sizes.
However, this leads to problems with Impress: Slides have screen sizes which
have no relation to paper sizes. For the slide site "Screen (16:9)" the
page size "Executive" is the nearest matching size.
However, this paper is (though supported by printers), very uncommon.
We do not want the nearest matching paper size the printer supports, but
rather we want to fit the slide on the printer default paper.
Note that finding a matching print paper still works (and it even has some
fuzzy matching), so some sort of "nearest paper matching" still exists,
(but with sane limits).
Change-Id: Ie60023d64b251954aa50e8bbdd36f6a290b9f278
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98396
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
This reverts commit 6c102b0a12.
Reason for revert:
The Infobar has an "Edit Document" button which lets you edit the document without first saving it in another place.
So at least in that place this verbose message is confusing.
Change-Id: I3bcdd389a560ac4c8ee0f86ca13573bbc05f2ebb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98075
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Jenkins
Add a layout compat option to keep the spacing below the last paragraph
in the header in doc/docx files
Change-Id: I259511183a8252e04d9951357dbdd4f4832523ec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94577
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Add a java module named "org.libreoffice.unoloader" for this jar.
Require this module from org.libreoffice.uno
(libreoffice.jar has unoloader.jar in its classpath,
so add the same dependency to the modules)
Change-Id: I7471d65ac7a0d2c6a11c002027a21f0c441dd1f2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94419
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Add a java module named "org.libreoffice.uno" for this jar.
This needs to be compiled with Java 9.
But since we want to keep b/c with Java 8,
the rest of the jar has to be compiled with Java 8.
This bumps the *build* requirement to Java 9 while keeping
the *runtime* requirement at Java 8.
The gbuild JavaClassSet class is changed to invoke javac twice,
where the 2nd invocation compiles with --release 9 and a --patch-modules
argument so that it finds the results of the first invocation and also
the javamaker generated files in CustomTargets.
Change-Id: I888f5dbe097cc37136e68db5919939877c981862
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91105
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Import/export the paragraph tabs without any text offset,
tabs are relative to the text box anyway.
Change-Id: Ife3b762e7581548e65500c16259a4481cc07a88f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94101
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
This moves the classes from juh.jar and ridl.jar to libreoffice.jar
The goal is to have one single jar (and Java module, will be added later)
which developers can include to work with LO.
juh.jar and ridl.jar are kept as basically empty jars with libreoffice.jar
on its classpath to keep backwards compatibility.
This is a continuation of ae855bf481
and a preparation to have Java 9 module support.
Change-Id: Ifbbfb97f60373d14256e62ae3122913bd17d5bbb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91930
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
In some deployments users want to disable certain infobars
to not interfere with their workflows.
Also, there are individual users who want to disable certain infobars
for various reasons.
This could be a generic config setting where you can set a list
of Infobar IDs which should be disabled.
That however would require knowledge about the internal IDs which
are not exposed (and might even change over time).
So instead, add a config option for each known infobar where we suspect
users might want to turn it off.
This list might change over time.
Change-Id: I13f0456435b59aafe929a46498de5a8847f138e2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92638
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Autorecovery should save in the user profile
in the "backup" directory. However, when that directory
did not exist, the temp directory was used instead.
Fix this, and create the requested directory if it did not exist.
Change-Id: Ie298855a740932bc6e6c9f62d4b4bf1b52b80c58
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92402
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
... even when editing readonly docs was disabled.
Viewshell was not yet available at this point, so
move the code where it belongs, into the object shell.
Change-Id: I71cbaf9c912beeeb0b8177538999049f7f8b4e03
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91832
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
There are various cases where people don't want users to
be able to turn off readonly mode, so add a config option for it.
Setting this option will remove the "Edit document" button from
the readonly infobar and also disable the "Edit mode" menu entry.
Change-Id: I7988da5b181455f778a6ab148e6bf32182c72618
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91144
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
This adds an entry to the "Paste special" dialog to raise
the Text Import Dialog.
This way, users can correctly import CSV/TSV,
even when pasting just one line of formatted input.
Change-Id: Ic09d7d60a05b14906f166668b38ec0eb8ead2d19
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89886
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
The problem is that this is "plain text" from the clipboard format,
but actually contains TSV (tab separated values). So treat them accordingly,
so that each value gets its own cell.
Change-Id: I0029e6ace90fc542c3269dd82bb7531654157a69
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87194
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
File->Reload was displayed with a checkbox, suggesting the command would toggle something.
Of course it does not.
So remove this code which makes the command appear as toggle command.
Change-Id: I5dd87fd82524e211e0d3444b14bc22dc4469de2d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88731
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
In this case, the listbox is not used as a static widget,
also not as a combobox with dropdown.
Instead the listbox is placed in a popup to choose values from.
Need to handle this case similiar to the combobox dropdown
(Cursor movement only travels through items, Return selects one item).
Regression from 7de9417d5f
Change-Id: Idadc3da5847e12e1408203b13ab59eb53fe14eea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88581
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Commit b3edf85e0f added a warning on load
when a document binds events to a macro.
This adds an option to restore the old behavior, so that the warning only
appears when a document actually has Macros.
Change-Id: I5ad398d3d503a0954a746f4cba150f68630b820c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87961
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
jurt.jar and unoil.jar are kept as effectively empty jars, each with a
Class-Path: ridl.jar
in their meta-inf/manifest.mf, so that 3rd-party code loading them (with or
without also loading ridl.jar) will still have access to their content.
Conceptually, the UNOIDL entities in unoil.jar (corresponding to module offapi)
are not part of the URE, but are now made available by URE's ridl.jar. This
should probably not cause problems in practice.
At least for now, we seal exactly those packages in ridl.jar that were
originally sealed in jurt.jar. Ideally, all of ridl.jar could be sealed now,
but that would be mildly incompatible, as it would prevent 3rd-party code from
introducing additional UNOIDL entities in the relevant namespaces (even if that
is something we do not want 3rd-party code to do anyway).
However, some JunitTest_jurt_* define classes in those sealed packages. In the
past they got away with that by using gb_JunitTest_use_jar_classset,*,jurt.
Instead they now need to gb_JunitTest_use_jar_classset,*,ridl and drop the
gb_JunitTest_use_jar,*,ridl. But the former only makes available the classes
that are specified in ridljar/Jar_ridl.mk with gb_Jar_add_sourcefiles, not the
UNOIDL entities specified via gb_Jar_add_packagedirs. But the tests need the
udkapi UNOIDL entities, so introduce gb_JunitTest_add_classpath to let the tests
get them explicitly. (Curiously, JunitTest_jurt_uno and JnitTest_jurt_util use
gb_JunitTest_use_jar_classset,*,jurt but don't seem to acutally need it; lets
leave that for a follow-up clean up.)
As a follow-up clean up, relevant files could be moved from jurt/ to ridljar/.
Change-Id: I836f4e7bb47fb41f1306e3f223da90dba988eb9a
Co-authored-by: Stephan Bergmann <sbergman@redhat.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/84946
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Seen this happening in custom sidebars (from extensions).
When the text is too long for the button, it will get cut off
and there is no way to view the button text.
Change-Id: I86ce72154e0371bdf24480be41517855dc3ce050
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87692
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
This adds several lines of 'Extension x not found' when installing
an extension with 'unopkg add'.
Since it's expected that the extension is not yet there when installing it,
remove this logging.
Change-Id: Ifc2ea5fa04253a96fee60016a65505e0d1f2722c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86516
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
They are still used in other places in the API (XSlideShowView, XWindow).
Change-Id: I072f257b40e654d02a93249913cd8b60d36e75ab
Reviewed-on: https://gerrit.libreoffice.org/85071
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>