Commit graph

490472 commits

Author SHA1 Message Date
Christian Lohmaier
b4e7ebebd5 vscode-ide-integration: add license-header template (snippet)
Change-Id: Iea7837c87fd5803b225d9e18733a67c40fa915d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158887
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2023-11-06 13:55:12 +01:00
Samuel Mehrbrodt
d6eb8b5637 Improve presentation options layout
* Sort presentations options, put similiar options next to each other.
* Move non-document option (Navigation bar) to "Display" area.

Also improve wording a little bit for more clarity

Change-Id: I18de6b95ea26033ef78709845db40e428a1d6c84
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158831
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2023-11-06 12:35:18 +01:00
Miklos Vajna
da99d57e03 svx: prefix members of SdrObjCustomShape
See tdf#94879 for motivation.

Change-Id: I589bba671fc7ad4282d18c35666ace80fff9ed77
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158969
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2023-11-06 10:56:49 +01:00
Julien Nabet
c37022ff57 "SyntaxVersion" has been declared as "sal_Int16" in unomodel
not "sal_uInt16"
See "aModelPropertyInfoMap" var in starmath/source/unomodel.cxx

It fixes this message when loading https://bugs.documentfoundation.org/attachment.cgi?id=55799
warn:legacy.osl:19853:19853:xmloff/source/core/SettingsExportHelper.cxx:176: this type is not implemented now

Change-Id: I18779b122555681f7544e64745c8074775e27277
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158952
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-11-06 10:25:09 +01:00
Balazs Varga
16737129e0 tdf#158002 - UI: Part 19 - Unify lockdown behavior of Options dialog
for LanguageTool Page.

Change-Id: Ib1255dd7a67eae7e9c1f2cf6da984ba614f3453a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158931
Tested-by: Jenkins
Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
2023-11-06 10:17:28 +01:00
Szymon Kłos
019917b145 lok: notebookbar: reduce calls to SfxNotebookBar::IsActive
- in LOK case toolbars in core doesn't make any difference
- SfxNotebookBar::IsActive which reads config
  makes doc_setView slower, avoid it in LOK case then
- it was used for hiding contextual toolbars
- introduced in commit 9bc1ffa215
  tdf#125040 Make single mode toolbar context aware

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I63de48faf2f7e7f30f8b509455061ac20a788f8a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158939
Tested-by: Jenkins
2023-11-06 10:05:00 +01:00
Szymon Kłos
b9159cf17b lok: notebookbar: query SID_NOTEBOOKBAR only when requested to switch UI
commit 5bd2931b57
tdf#102063 Notebookbar wont appear on launch

introduced some Query hack to SfxDispatcher::Update_Impl what
causes many updates on lots of different actions.
It breaks multi-view state of notebookbar in LOK case,
so don't do that. It should be reviewed for regular case too.

Change-Id: I8f26bddc6cff991c56a1172893d83b90fb225acd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158937
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2023-11-06 10:04:39 +01:00
Szymon Kłos
6bf428d354 lok: notebookbar: handle multiple sessions
This fixes regression from commit db5a78c8ab
lok: notebookbar: don't recreate toolbars too often

When we had 2 sessions with notebookbar and one of them switched
to compact mode - other session's notebookbar didn't work.

Before previous change we recreated notebookbar and its welded wrapper
on every StateMethod call for LOK case. So when it become destroyed
we made it working again. But now we need to introduce better management
and not rely on single instence we get from SystemWindow.

Also it's bad idea to rely 100% on SfxNotebookBar::IsActive in LOK
case as when other view will turn notebookbar off, but QueryState
will be trigerred in our session - we will think that it should be
destroyed (it reads config state which is shared between views).
So trust only "true" value (it happens after calling SID_TOOLBAR_MODE),
but destroy notebookbar only after explicit call of
SfxNotebookBar::CloseMethod. It seems to have good result when tested
with multiple views in Online. Maybe we can track Notebookbar state
per view later to make things simpler in LOK case.

Change-Id: Ie739c6441ca05884b0ef20bff23751467706b562
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158936
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2023-11-06 10:04:31 +01:00
Samuel Mehrbrodt
e0334e1a77 tdf#157788 Move "Show navigation panel" back to Presentation settings
Instead of hiding it in the general options dialog.

As written in https://bugs.documentfoundation.org/show_bug.cgi?id=157788#c4
"The options in Slide Show Settings should all apply to the workstation";
the options which are saved per user/workstation and not per document, should not be moved
away from that dialog.
Instead the other options should also be saved per user/workstation.

Change-Id: I720c949f08877abb8ef8f94dbcfa6c85f349631d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158808
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2023-11-06 09:43:28 +01:00
Samuel Mehrbrodt
496f324b8f tdf#135089 Move Presenter console settings to Slide Show settings
Change-Id: I0aeb180ee132bff359d46d963985196f5a24610f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158798
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2023-11-06 09:43:04 +01:00
Xisco Fauli
c45b45acef bin: remove no longer needed script
After 8c39af455c
"uitest oneprocess mode: default to this and clean up one test"

Change-Id: I3da187055cc8ac239d6a4592f3050440630e051c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158654
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-11-06 09:30:56 +01:00
Xisco Fauli
07b602edbc uitest: Clean up redundant usage of gb_UITest_use_oneprocess
After 8c39af455c
"uitest oneprocess mode: default to this and clean up one test"

Change-Id: Ib6e0fc3de2997beebc650253ae3ea19a3314ae09
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158844
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-11-06 09:26:43 +01:00
Sarper Akdemir
806656ce4b tdf#157518: vcl: add native macOS rendering support for LevelBar control
Uses NSLevelIndicator to render LevelBar control on macOS.
Closely follows the existing implementation for ControlType::Progress

Change-Id: Ibd38e172b8b6297e6322cfe9d5a1b0a6ef0f0656
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158504
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2023-11-06 09:04:01 +01:00
Sarper Akdemir
b1e24664de tdf#157518: add password policy and strength meter to save with password dialog
Introduces new configuration options PasswordPolicy and
PasswordPolicyErrorMessage.

PasswordPolicy takes a regular expression. When set, it only
accepts passwords that match that regular expression.

PasswordPolicyErrorMessage is the label displayed when the
password does not meet the PasswordPolicy.
In the ideal case, it should contain an explainer of the
PasswordPolicy, so the user is aware of the requirements.

Save with password dialog had maximum password length enforcing
bits depending on the requirements of the saved file format.
These are still applicable in combination with the password
policy.

Also introduces a visual password meter under the password
entries. If the password policy isn't satisfied the password
strength meter is capped at 70%.

The entropy bits to password quality is taken as a linear range.
Where the range of [0, 112] entropy bits is mapped to percentage
[0, 100]. Entropy bits ≥ 112 are mapped to 100% since, according
to KeePass' info page, ≥ 112 entropy bits correspond to a strong
password: <https://keepass.info/help/kb/pw_quality_est.html>

Change-Id: I2e70adacf271916661219f702dfc217292a1b59f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158453
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2023-11-06 09:03:47 +01:00
Chris Sherlock
383f666bca tdf#43157 vcl: remove DBG_ASSERT() from BreakLinesWithIterator()
Change-Id: I2ab54966c8a8b5e5a15f78481330365725b6ef30
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158073
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-11-06 07:22:51 +01:00
Chris Sherlock
183973ece6 vcl: flatten TextLayoutHelper::GetNewsEllipsisString()
Change-Id: Ie94ce7c75ab96b8f7186f9f0c455dfa3a9f1683f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158072
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-11-06 07:21:23 +01:00
Chris Sherlock
5886a6faad vcl: split out functions from TextLayoutCommon::GetEllipsisString()
Change-Id: Ifced331b65e27a02d9a3b3e220e22c279c6fc496
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158071
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-11-06 07:20:28 +01:00
Gabor Kelemen
026be6f62f tdf#146619 Recheck include/t* with IWYU
Change-Id: I005257e458351285b1b35ffe49c8b42834a6db68
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156990
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-11-06 00:33:57 +01:00
Stephan Bergmann
5fb20ede2f loplugin:ostr: Warn about literals that could be string_view
...inspired by d4f4a40186 "This function takes a
string view - no need in OUString literal", but this found no further cases

Change-Id: I1429950afdb6fff8ed1d28f5fbb4c445fb6bfb12
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158954
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-05 23:20:55 +01:00
Bogdan B
1ad81f7e69 tdf#158067 Replace OUStringLiteral in accdoc
Change-Id: I88bfdf41137adf34ca5af4e73cf6ca487d8fe5ef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158899
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-11-05 22:24:47 +01:00
Thorsten Behrens
389def8718 reprobuild: don't include build machine setup in binaries
The configure line can leak data from the building machine (path
names, level of parallelism etc), which leads to non-reproducible
build results.

Change-Id: I042afc3d7bad19e8e274147be2a9eb0abcf5436e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158871
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-11-05 21:25:18 +01:00
Thorsten Behrens
d2b0c48ca0 reprobuild: don't use any build-time dependent values
Even taking the current year from the build system makes a build
non-reproducible (if you run it again the next year).

Change-Id: I4a2ef0fe997c20d1c8ec954378f46adb5aad04df
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158870
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-11-05 21:24:11 +01:00
Thorsten Behrens
1d939b7822 reprobuild: don't write nondeterministic textencoding
No need to write this legacy int16, that we ignore on read anyway.

Change-Id: I5ee071aa0562b8e2718a1a83dffc543c9a104360
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158942
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-11-05 21:21:27 +01:00
Mike Kaganski
b65f295698 tdf#158068: an example of "abc" -> u"abc"_ustr conversion
Change-Id: I1225548ebc313cac98c4b924a8fb53f53bada76d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158946
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-11-05 19:54:18 +01:00
Mike Kaganski
eae5559af6 tdf#158067: an example of OUStringLiteral -> operator u""_ustr replacement
Change-Id: I0a15d1d30ee59d8f574a5a9c79ab11e316dbe76c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158945
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-11-05 19:54:11 +01:00
Andrea Gelmini
24e1d6dbd2 Fix typo
Change-Id: Ie41ca6c56bf44b04bd2d65b6cb64594d66295f24
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158951
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-11-05 17:51:48 +01:00
Andrea Gelmini
0053dfbabd Fix typo
Change-Id: I84186bee245a95a74e92c974ca94bb81c31ee1ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158950
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-11-05 17:51:31 +01:00
Marco A.G.Pinto
d0d94ec8b8 Update git submodules
* Update dictionaries from branch 'master'
  to d154315b75b46b8bf26d4d2b3465064da273b18a
  - Updated the English dictionaries: GB
    
    Change-Id: I9950273688ccb0d9743d168b1a928e91942c38a3
    Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/158833
    Tested-by: Aron Budea <aron.budea@collabora.com>
    Reviewed-by: Aron Budea <aron.budea@collabora.com>
2023-11-05 12:26:15 +01:00
Christian Lohmaier
edf6c155b0 limit parallelism during msi packaging stage to avoid cscript failures
with high parallelism there's a high risk of running into random
failures when calling WiLangId.vbs via cscript.

The limiter doesn't use make's jobserver since it is too easy to
deadlock the build since all jobs are started at once, consuming all
slots, but in addition all wait for an additional slot that never is
made available because all jobs are blocked waiting....
All jobs being started at once and all jobs getting started from that
point on getting put under the limiter's control makes this simple
approach with separate grab/release calls possible. If they were spread
out the semaphore wouldn't be available (gets closed/removed as soon as
nothing waits for it anymore)

Change-Id: I345f2904a1d7e8989720722415fb51282ab3b05b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158886
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2023-11-05 12:19:39 +01:00
Christian Lohmaier
2486803ee2 move macOS specific entitlements file templates to sysui/desktop/macosx
generated location is kept to not have further changes in existing
scripts using those files.

Change-Id: Ia14864bd6f9c69e2c77d39806e733f50155d12b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158791
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2023-11-05 12:18:59 +01:00
Noel Grandin
cfd7cffb00 tdf#158014 Skia adds filled white areas in .svg when exporting to PDF
So my strategy here is to assume that ProcessAndBlurAlphaMask
was doing the right thing before
    commit 81994cb2b8
    Date:   Fri Apr 16 20:33:10 2021 +0200
    Convert internal vcl bitmap formats transparency->alpha (II)
but the subsequent naiving changing of its logic undermines it
because of some subtle interaction.

So take the brute force approach of reverting most of the code
to its prior state (i.e. working in the transparency domain),
and doing an Invert() before and after the original code.

This seems to fix all of the test files I have on hand
for this situation for both Skia and non-Skia cases.

Change-Id: If4c4d4c5351a4ec55897bed96b57d28eda88f5dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158793
Tested-by: Jenkins
Reviewed-by: Patrick Luby <plubius@neooffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-05 06:32:17 +01:00
Mike Kaganski
2b84c860b5 shared.hxx is unused
Change-Id: I35ca5471a0f2279a32a5150d6a09d1cd9a3d4278
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158941
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-11-05 00:21:10 +01:00
Mike Kaganski
2bf894e91a External data must be checked when parsed
Change-Id: I8bc5afb29fe22a4b06462a7c61b689c88c41003f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158938
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-11-04 20:06:26 +01:00
Mike Kaganski
e14a55c9aa LOK: Simplify a bit, and use more compile-time knowledge
Bring some C++20 goodness to LOK code: avoid lots of small memory
allocations when constructing OUString from ASCII char arrays;
use string lengths known at compile and run time; use safer and
cleaner syntax.

Change-Id: Ia59ed3c8d8ce521880bb8d70b69a64b2d3e73c14
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158927
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-11-04 15:42:28 +01:00
Balazs Varga
07590ff83e tdf#158001 - UI: Part 18 - Unify lockdown behavior of Options dialog
for Languages Page.

Change-Id: I3f4cf27980dd6d06da13f554feaca192ebd0b671
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158882
Tested-by: Jenkins
Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
2023-11-04 10:58:42 +01:00
Balazs Varga
918f2663e8 resave with newer glade version
Change-Id: I8c11067d813c2331e5f9ceae1cb780c73b45e0f5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158881
Tested-by: Jenkins
Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
2023-11-04 10:58:24 +01:00
Stephan Bergmann
5323c18753 Adapt to Clang 18 trunk Linkage rework
<8775947633>
"[clang][NFC] Refactor clang::Linkage"

Change-Id: I35e3a3c7e3de29e4f3b9ee8dfc34e39ba2aa1c70
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158919
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-04 09:51:18 +01:00
Andrea Gelmini
bfbf0b0991 Fix typo
Change-Id: I2fa6ef12d5035aaa21ab464a105085f38ce43423
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158914
Tested-by: Jenkins
Reviewed-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
2023-11-04 05:00:23 +01:00
Andrea Gelmini
eded77b8e0 Fix typo
Change-Id: I064aa3c54650904671a312eadbe8e77b26ae141a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158913
Tested-by: Jenkins
Reviewed-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
2023-11-04 04:59:53 +01:00
Taichi Haradaguchi
4acd25cced tdf#157588 fix extended_tip
"untrusted locations" -> "untrusted file locations"

Change-Id: I31810c8dc572086aa1378800cc2551bce2933a1b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158719
Tested-by: Jenkins
Reviewed-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
2023-11-04 04:59:13 +01:00
EMartinGube
d7a5e7643f tdf#114441 Convert use of sal_uLong to better integer types
Return type of GetColumnFormat() is changed to sal_uInt32. All the
values from the function calls inside GetCloumnFormat() which were
involved in the return value seem to be positive right now.

Change-Id: Id19b2982d8372e10fee5fc0fd4233576076ec3df
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155680
Tested-by: Hossein <hossein@libreoffice.org>
Reviewed-by: Hossein <hossein@libreoffice.org>
2023-11-04 02:34:56 +01:00
Ankit_Jaipuriar
e963da8716 tdf#114441 Convert sal_uLong to better data types
The function getLength() returns a value as sal_Int32, which is then
assigned to the variable nLinks.

Change-Id: I44d626e2a26e3d9eb15b0884500f0dfddff12e9a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157755
Tested-by: Hossein <hossein@libreoffice.org>
Reviewed-by: Hossein <hossein@libreoffice.org>
2023-11-03 22:53:01 +01:00
Caolán McNamara
11ebdfef16 add some protocols that don't make sense as floating frame targets
Change-Id: Id900a5eef248731d1184c1df501a2cf7a2de7eb9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158910
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-11-03 20:56:33 +01:00
Patrick Luby
9c0803edd1 tdf#155266 flush when scrolling or dragging
Delaying flushing until the dispatch level returns to zero causes
scrolling via the scrollwheel or mouse drag to appear laggy and
jerky.

Change-Id: Ib70e7766435baa765dd0d1d704ba2fac87f7fccc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158853
Tested-by: Jenkins
Reviewed-by: Patrick Luby <plubius@neooffice.org>
2023-11-03 20:55:04 +01:00
Patrick Luby
e4821ce3e0 tdf#158014 make image immutable after using Skia to invert
I can't explain why inverting using Skia causes this bug on
macOS but not other platforms. My guess is that Skia on macOS
is sharing some data when different SkiaSalBitmap instances
are created from the same OutputDevice. So, mark this
SkiaSalBitmap instance's image as immutable so that successive
inversions are done with buffered bitmap data instead of Skia.

Change-Id: I8acf90561c48edba14a5f43d16f375f15f25820c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158880
Reviewed-by: Patrick Luby <plubius@neooffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2023-11-03 18:33:23 +01:00
Patrick Luby
2a5dac6d75 tdf#158047 allow the tdf#157635 fix for palettes with 64 entries
Change-Id: Ib4e4deb5f7e332a7ef3a9231e993231068c21c4f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158885
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Patrick Luby <plubius@neooffice.org>
2023-11-03 18:32:26 +01:00
Caolán McNamara
af9b546cf5 avoid the neeed to escape url passed to gstreamer
Change-Id: I13d0cee911a3c9af99b494dde16b8d51f78d954a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158889
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-11-03 18:15:51 +01:00
Stephan Bergmann
cef555e9a4 Make ExternalReferenceUriTranslator more robust against broken UTF-8
<https://lists.freedesktop.org/archives/libreoffice/2023-November/091151.html>
"CppunitTest_stoc_uriproc failed on Windows" reports that
translateToExternal("file:///abc/%feef") produces an empty string (indicating
failure) instead of "file:///abc/%FEef" (as expected in
stoc/test/uriproc/test_uriproc.cxx) when osl_getThreadTextEncoding() is Shift
JIS.

This was due to how the call to rtl::Uri::encode in
Translator::translateToExternal (in
stoc/source/uriproc/ExternalUriReferenceTranslator.cxx) behaved:  It internally
interpreted its input "%FE" as the single-byte Shift JIS character 0xFE.  Which
gets mapped to U+2122 as an extension (see "APPLE additions over SJIS, we
convert this like Apple, because I think, this gives better result, then [sic]
we take a replacement char" in sal/textenc/tcvtjp6.tab) in readUcs4, but which
in turn doesn't get mapped back to any Shift JIS character in writeEscapeChar.

Translator::translateToExternal is the only user of
rtl_UriEncodeStrictKeepEscapes, as introduced by
6ff5d3341d "INTEGRATION: CWS c07v013_SRC680
(1.4.40); FILE MERGED: 2007/06/21 13:00:56 sb 1.4.40.1: #b6550116# Made
XExternalUriReferenceTranslator.translateToExternal more robust when the input
URL contains spurious non--UTF-8 octets like %FE (which are now copied verbatim,
instead of signalling error)."

To make the claim true that such "spurious non--UTF-8 octets like %FE" are
always "copied verbatim", regardless of text encoding being used, repurpose
rtl_UriEncodeStrictKeepEscapes to always treat any escape sequences that are
present as (potentially broken) UTF-8.

Change-Id: I0fa0b14d3e3d44e4b5514e1b73c84c407a947ce9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158888
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-03 17:26:58 +01:00
Caolán McNamara
1e95b89f8f escape url passed to gstreamer
Change-Id: I3c93ee34800cc8563370f75ef3ef6f8a9220e6ec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158884
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-11-03 16:51:03 +01:00
Andrea Gelmini
b73cde1acb Fix typo
Change-Id: Ida31b30c64c8ba2be61e6f4a408e1346df48d1b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158875
Tested-by: Jenkins
Reviewed-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
2023-11-03 16:14:56 +01:00