[Libreoffice-commits] core.git: include/comphelper

2021-11-01 Thread Mike Kaganski (via logerrit)
 include/comphelper/sequence.hxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 509b2039f72ff35c79bb6ff2f49525b9d1e9226c
Author: Mike Kaganski 
AuthorDate: Mon Nov 1 18:48:04 2021 +0200
Commit: Mike Kaganski 
CommitDate: Tue Nov 2 06:49:21 2021 +0100

Use braces to workaround a strange GCC bug

Using gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04):

[CXX] ucb/source/ucp/cmis/certvalidation_handler.cxx
In file included from 
/home/user/core.git/workdir/UnpackedTarball/boost/boost/lexical_cast/detail/converter_lexical_streams.hpp:62,
 from 
/home/user/core.git/workdir/UnpackedTarball/boost/boost/lexical_cast/detail/converter_lexical.hpp:54,
 from 
/home/user/core.git/workdir/UnpackedTarball/boost/boost/lexical_cast/try_lexical_convert.hpp:44,
 from 
/home/user/core.git/workdir/UnpackedTarball/boost/boost/lexical_cast.hpp:32,
 from 
/home/user/core.git/external/boost/include/boost/lexical_cast.hpp:30,
 from 
/home/user/core.git/workdir/UnpackedTarball/boost/boost/date_time/format_date_parser.hpp:14,
 from 
/home/user/core.git/workdir/UnpackedTarball/boost/boost/date_time/date_generator_parser.hpp:20,
 from 
/home/user/core.git/workdir/UnpackedTarball/boost/boost/date_time/date_facet.hpp:25,
 from 
/home/user/core.git/workdir/UnpackedTarball/boost/boost/date_time/gregorian/gregorian_io.hpp:16,
 from 
/home/user/core.git/workdir/UnpackedTarball/boost/boost/date_time/gregorian/gregorian.hpp:31,
 from 
/home/user/core.git/workdir/UnpackedTarball/boost/boost/date_time/posix_time/time_formatters.hpp:12,
 from 
/home/user/core.git/workdir/UnpackedTarball/boost/boost/date_time/posix_time/posix_time.hpp:24,
 from 
/home/user/core.git/external/boost/include/boost/date_time/posix_time/posix_time.hpp:30,
 from 
/home/user/core.git/workdir/UnpackedTarball/boost/boost/date_time/local_time/local_time.hpp:11,
 from 
/home/user/core.git/workdir/UnpackedTarball/boost/boost/date_time.hpp:15,
 from 
/home/user/core.git/external/boost/include/boost/date_time.hpp:30,
 from 
/home/user/core.git/workdir/UnpackedTarball/libcmis/inc/libcmis/object.hxx:40,
 from 
/home/user/core.git/workdir/UnpackedTarball/libcmis/inc/libcmis/document.hxx:39,
 from 
/home/user/core.git/workdir/UnpackedTarball/libcmis/inc/libcmis/libcmis.hxx:34,
 from 
/home/user/core.git/ucb/source/ucp/cmis/certvalidation_handler.hxx:19,
 from 
/home/user/core.git/ucb/source/ucp/cmis/certvalidation_handler.cxx:23:

/home/user/core.git/workdir/UnpackedTarball/boost/boost/lexical_cast/detail/lcast_unsigned_converters.hpp:
 In member function ‘CharT* boost::detail::lcast_put_unsigned::main_convert_loop()’:

/home/user/core.git/workdir/UnpackedTarball/boost/boost/lexical_cast/detail/lcast_unsigned_converters.hpp:149:17:
 error: this ‘while’ clause does not guard... [-Werror=misleading-indentation]
  149 | inline CharT* main_convert_loop() BOOST_NOEXCEPT {
  | ^

/home/user/core.git/workdir/UnpackedTarball/boost/boost/lexical_cast/detail/lcast_unsigned_converters.hpp:150:17:
 note: ...this statement, but the latter is misleadingly indented as if it were 
guarded by the ‘while’
  150 | while (main_convert_iteration());
  | ^~

It surfaced after commit 00a76942e423589e3fdd4e059be753eab3393344,
apparently showing some version-specific compiler bug.

Change-Id: I92a989726cea5eafd762f724cfc0b3c1f986824c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124474
Reviewed-by: Aron Budea 
Reviewed-by: Mike Kaganski 
Tested-by: Mike Kaganski 

diff --git a/include/comphelper/sequence.hxx b/include/comphelper/sequence.hxx
index 1aa3fbea803d..bc67559dfbee 100644
--- a/include/comphelper/sequence.hxx
+++ b/include/comphelper/sequence.hxx
@@ -122,7 +122,9 @@ namespace comphelper
 inline css::uno::Sequence< DstType > arrayToSequence( const SrcType* 
i_pArray, sal_Int32 nNum )
 {
 if constexpr (std::is_same_v< DstType, SrcType >)
+{
 return css::uno::Sequence< DstType >( i_pArray, nNum );
+}
 else
 {
 css::uno::Sequence< DstType > result( nNum );


[Libreoffice-bugs] [Bug 145499] CALC AUTOFILTER Numerical values duplicated in the drop down pane

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145499

--- Comment #6 from Colin  ---
(In reply to Mike Kaganski from comment #5)
> (In reply to Colin from comment #4)

> 
> It does. E.g., in the example that I suggested, if you round the formula in
> K1755 like '=ROUND(IF(G1755>0;G1755-I1755;"");1)', the double '73.6' entry
> in the autofilter list will disappear.

Don't misunderstand - not a criticism.

I developed the sheet in Libre because it is the more user friendly and
intuitive package but in daily use, it has been converted to Excel and then
uploaded to Google sheets - simply because Google doesn't play well with ods
files.

The only reason for the tortuous route is that the "open in google drive"
doesn't work and for me, having the sheet on the GDrive absolves me of the
issue of preserving a constantly changing sheet against mishap. Being able to
access it from other locations is a bonus.

My point is that the error doesn't manifest in the GSheets version - is their
stuff "open source"? Can it be inspected for inspiration in the resolution of
the long decimal anomaly?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 145490] Bitdefender flagged the 2021.10.31 download of LO Dev infected with a virus

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145490

--- Comment #12 from Mike Kaganski  ---
(In reply to Mike Kaganski from comment #11)

Or maybe the antivirus vendor is smart enough to detect LibreOffice,
recognizing the *released* versions like 7.2.2, not scaring users with the
false positives; but indeed, it would not detect a debug daily build, and then
clueless users that for some unknown reason using alpha-stage dailies would
again blame something that don't understand. Or many other reasons ... and the
aggression that some users show in their reports shows that not everyone can be
reasonable.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 145490] Bitdefender flagged the 2021.10.31 download of LO Dev infected with a virus

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145490

--- Comment #11 from Mike Kaganski  ---
(In reply to xordevoreaux from comment #10)
> Another interesting detail -- why did Bitdefender only identify a virus in
> LO Dev, but not in LO 7.2.2, which I also have installed?

That's exactly the problem that *you* try to put on *us*. The code didn't
change; but *the build* is different - e.g., containing debug symbols, etc -
and the antivirus uses its imperfect (it is never perfect!) heuristics and
"detects" some pattern in these bytes, generated from the same code with
different compiler settings. Antivirus heuristics always have *some* level of
false positives - it is known fact to everyone, antivirus authors included.
Only you seem to not understand that fact, trying to blame something you don't
understand.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 145499] CALC AUTOFILTER Numerical values duplicated in the drop down pane

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145499

--- Comment #5 from Mike Kaganski  ---
(In reply to Colin from comment #4)
> Now I'm really confused; Does the formula you prescribed fix the error for
> me or just prove the error exists

It is to show that the numbers are different, so for the latter.

> AND demonstrate that once again I've
> learned two new things today.
> Rounding the preceding values to try to eliminate the .001
> anomaly doesn't solve the problem

It does. E.g., in the example that I suggested, if you round the formula in
K1755 like '=ROUND(IF(G1755>0;G1755-I1755;"");1)', the double '73.6' entry in
the autofilter list will disappear.

As to the bug: note another manifestation of the wrong behavior, when selecting
*both* '73.6' entries, then opening the filter list again, shows only *one* of
these entries selected.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 145128] Setting the "PerformFileCheckExt" setting via the Windows Registry does not work correctly: Final is not applied

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145128

QA Administrators  changed:

   What|Removed |Added

 Whiteboard| QA:needsComment|

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 145213] Table Of Linked images getting displayed corrupted

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145213

QA Administrators  changed:

   What|Removed |Added

 Whiteboard|| QA:needsComment

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 145211] Object Border Shadow distance is always rounded to 0.10 cm and can not be smaller

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145211

QA Administrators  changed:

   What|Removed |Added

 Whiteboard|| QA:needsComment

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 145210] Many dialog have very slow response to changes

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145210

QA Administrators  changed:

   What|Removed |Added

 Whiteboard|| QA:needsComment

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 145206] numbering paragraphs resets after pasting table

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145206

QA Administrators  changed:

   What|Removed |Added

 Whiteboard|| QA:needsComment

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 145205] Errormessage when I try to open a certain database table via LibreOffice 7.2 Database.

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145205

QA Administrators  changed:

   What|Removed |Added

 Whiteboard|| QA:needsComment

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 145195] Artifacts when working with input string

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145195

QA Administrators  changed:

   What|Removed |Added

 Whiteboard|| QA:needsComment

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 145192] Spell checker doesn't mark some line of 'text' as dirty

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145192

QA Administrators  changed:

   What|Removed |Added

 Whiteboard|| QA:needsComment

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 145096] Writer [Collected Words] ignores tick box – (When closing a document, remove the words collected from it, from the list.)

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145096

QA Administrators  changed:

   What|Removed |Added

 Whiteboard|| QA:needsComment

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 142104] Copy & paste not working correctly

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=142104

--- Comment #2 from QA Administrators  ---
Dear paul chaundy,

This bug has been in NEEDINFO status with no change for at least
6 months. Please provide the requested information as soon as
possible and mark the bug as UNCONFIRMED. Due to regular bug
tracker maintenance, if the bug is still in NEEDINFO status with
no change in 30 days the QA team will close the bug as INSUFFICIENTDATA
due to lack of needed information.

For more information about our NEEDINFO policy please read the
wiki located here:
https://wiki.documentfoundation.org/QA/Bugzilla/Fields/Status/NEEDINFO

If you have already provided the requested information, please
mark the bug as UNCONFIRMED so that the QA team knows that the
bug is ready to be confirmed.

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-NeedInfo-Ping

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 142089] LIbreoffice crashes at opening a document

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=142089

--- Comment #7 from QA Administrators  ---
Dear Jerzy Orlowski,

This bug has been in NEEDINFO status with no change for at least
6 months. Please provide the requested information as soon as
possible and mark the bug as UNCONFIRMED. Due to regular bug
tracker maintenance, if the bug is still in NEEDINFO status with
no change in 30 days the QA team will close the bug as INSUFFICIENTDATA
due to lack of needed information.

For more information about our NEEDINFO policy please read the
wiki located here:
https://wiki.documentfoundation.org/QA/Bugzilla/Fields/Status/NEEDINFO

If you have already provided the requested information, please
mark the bug as UNCONFIRMED so that the QA team knows that the
bug is ready to be confirmed.

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-NeedInfo-Ping

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 142085] LibreOffice Impress fails to properly display .tif image files even with hardware accel. disabled

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=142085

--- Comment #5 from QA Administrators  ---
Dear brian.is...@gmail.com,

This bug has been in NEEDINFO status with no change for at least
6 months. Please provide the requested information as soon as
possible and mark the bug as UNCONFIRMED. Due to regular bug
tracker maintenance, if the bug is still in NEEDINFO status with
no change in 30 days the QA team will close the bug as INSUFFICIENTDATA
due to lack of needed information.

For more information about our NEEDINFO policy please read the
wiki located here:
https://wiki.documentfoundation.org/QA/Bugzilla/Fields/Status/NEEDINFO

If you have already provided the requested information, please
mark the bug as UNCONFIRMED so that the QA team knows that the
bug is ready to be confirmed.

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-NeedInfo-Ping

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 137574] The image selection frame lagging behind when moving they image with arrow keys

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=137574

--- Comment #3 from QA Administrators  ---
Dear Telesto,

This bug has been in NEEDINFO status with no change for at least
6 months. Please provide the requested information as soon as
possible and mark the bug as UNCONFIRMED. Due to regular bug
tracker maintenance, if the bug is still in NEEDINFO status with
no change in 30 days the QA team will close the bug as INSUFFICIENTDATA
due to lack of needed information.

For more information about our NEEDINFO policy please read the
wiki located here:
https://wiki.documentfoundation.org/QA/Bugzilla/Fields/Status/NEEDINFO

If you have already provided the requested information, please
mark the bug as UNCONFIRMED so that the QA team knows that the
bug is ready to be confirmed.

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-NeedInfo-Ping

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 98435] dBase accepts invalid column name in select list

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=98435

--- Comment #8 from QA Administrators  ---
Dear Terrence Enger,

To make sure we're focusing on the bugs that affect our users today,
LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed
bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this
bug report. During that time, it's possible that the bug has been fixed, or the
details of the problem have changed. We'd really appreciate your help in
getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice
from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information
from Help - About LibreOffice.

If the bug is NOT present, please set the bug's Status field to
RESOLVED-WORKSFORME and leave a comment that includes the information from Help
- About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular
meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a
REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your
bug pertains to a feature added after 3.3) from
https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat:
https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 88162] Listbox typeahead breaks when using diacritics on OSX

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=88162

--- Comment #10 from QA Administrators  ---
Dear Tony,

To make sure we're focusing on the bugs that affect our users today,
LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed
bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this
bug report. During that time, it's possible that the bug has been fixed, or the
details of the problem have changed. We'd really appreciate your help in
getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice
from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information
from Help - About LibreOffice.

If the bug is NOT present, please set the bug's Status field to
RESOLVED-WORKSFORME and leave a comment that includes the information from Help
- About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular
meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a
REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your
bug pertains to a feature added after 3.3) from
https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat:
https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 84748] Selected area not correctly displayed after the Find bar is closed

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=84748

--- Comment #11 from QA Administrators  ---
Dear B.J. Herbison,

To make sure we're focusing on the bugs that affect our users today,
LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed
bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this
bug report. During that time, it's possible that the bug has been fixed, or the
details of the problem have changed. We'd really appreciate your help in
getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice
from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information
from Help - About LibreOffice.

If the bug is NOT present, please set the bug's Status field to
RESOLVED-WORKSFORME and leave a comment that includes the information from Help
- About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular
meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a
REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your
bug pertains to a feature added after 3.3) from
https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat:
https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 70841] FILESAVE: export to Excel 2003 XML (aka XMLSS) format issues

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=70841

--- Comment #15 from QA Administrators  ---
Dear dg,

To make sure we're focusing on the bugs that affect our users today,
LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed
bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this
bug report. During that time, it's possible that the bug has been fixed, or the
details of the problem have changed. We'd really appreciate your help in
getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice
from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information
from Help - About LibreOffice.

If the bug is NOT present, please set the bug's Status field to
RESOLVED-WORKSFORME and leave a comment that includes the information from Help
- About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular
meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a
REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your
bug pertains to a feature added after 3.3) from
https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat:
https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 61345] Options dialog: last checked date/time doesn't update

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=61345

--- Comment #8 from QA Administrators  ---
Dear Thomas van der Meulen,

To make sure we're focusing on the bugs that affect our users today,
LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed
bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this
bug report. During that time, it's possible that the bug has been fixed, or the
details of the problem have changed. We'd really appreciate your help in
getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice
from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information
from Help - About LibreOffice.

If the bug is NOT present, please set the bug's Status field to
RESOLVED-WORKSFORME and leave a comment that includes the information from Help
- About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular
meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a
REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your
bug pertains to a feature added after 3.3) from
https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat:
https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 59526] libcdr: Stretched rectangle fault import

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=59526

--- Comment #10 from QA Administrators  ---
Dear ralf.krapf,

To make sure we're focusing on the bugs that affect our users today,
LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed
bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this
bug report. During that time, it's possible that the bug has been fixed, or the
details of the problem have changed. We'd really appreciate your help in
getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice
from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information
from Help - About LibreOffice.

If the bug is NOT present, please set the bug's Status field to
RESOLVED-WORKSFORME and leave a comment that includes the information from Help
- About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular
meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a
REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your
bug pertains to a feature added after 3.3) from
https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat:
https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 58929] Paste action disables cell navigation with Enter and Tab

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=58929

--- Comment #13 from QA Administrators  ---
Dear sworddragon2,

To make sure we're focusing on the bugs that affect our users today,
LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed
bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this
bug report. During that time, it's possible that the bug has been fixed, or the
details of the problem have changed. We'd really appreciate your help in
getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice
from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information
from Help - About LibreOffice.

If the bug is NOT present, please set the bug's Status field to
RESOLVED-WORKSFORME and leave a comment that includes the information from Help
- About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular
meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a
REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your
bug pertains to a feature added after 3.3) from
https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat:
https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 50045] FILESAVE Cannot 'Save graphics' from OLE object

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=50045

--- Comment #8 from QA Administrators  ---
Dear Pavel Kysilka,

To make sure we're focusing on the bugs that affect our users today,
LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed
bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this
bug report. During that time, it's possible that the bug has been fixed, or the
details of the problem have changed. We'd really appreciate your help in
getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice
from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information
from Help - About LibreOffice.

If the bug is NOT present, please set the bug's Status field to
RESOLVED-WORKSFORME and leave a comment that includes the information from Help
- About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular
meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a
REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your
bug pertains to a feature added after 3.3) from
https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat:
https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 47516] EDITING cannot drag and drop selected text from one cell to another in a table

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=47516

--- Comment #12 from QA Administrators  ---
Dear rreno56,

To make sure we're focusing on the bugs that affect our users today,
LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed
bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this
bug report. During that time, it's possible that the bug has been fixed, or the
details of the problem have changed. We'd really appreciate your help in
getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice
from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information
from Help - About LibreOffice.

If the bug is NOT present, please set the bug's Status field to
RESOLVED-WORKSFORME and leave a comment that includes the information from Help
- About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular
meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a
REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your
bug pertains to a feature added after 3.3) from
https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat:
https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 128392] Libreoffice for Mac OS X does not respect Dvorak-QWERTY keyboard layout for command keys.

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=128392

--- Comment #11 from QA Administrators  ---
Dear bugzilla,

To make sure we're focusing on the bugs that affect our users today,
LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed
bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this
bug report. During that time, it's possible that the bug has been fixed, or the
details of the problem have changed. We'd really appreciate your help in
getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice
from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information
from Help - About LibreOffice.

If the bug is NOT present, please set the bug's Status field to
RESOLVED-WORKSFORME and leave a comment that includes the information from Help
- About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular
meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a
REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your
bug pertains to a feature added after 3.3) from
https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat:
https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 113066] Writer wrongly shows graphics semicircles from CAD that were pasted as GDI (preview in MSO fine but same issue if edited)

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=113066

--- Comment #12 from QA Administrators  ---
Dear archie,

To make sure we're focusing on the bugs that affect our users today,
LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed
bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this
bug report. During that time, it's possible that the bug has been fixed, or the
details of the problem have changed. We'd really appreciate your help in
getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice
from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information
from Help - About LibreOffice.

If the bug is NOT present, please set the bug's Status field to
RESOLVED-WORKSFORME and leave a comment that includes the information from Help
- About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular
meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a
REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your
bug pertains to a feature added after 3.3) from
https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat:
https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 100197] Scenario Hyperlinks do not work.

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=100197

--- Comment #5 from QA Administrators  ---
Dear mrelwood,

To make sure we're focusing on the bugs that affect our users today,
LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed
bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this
bug report. During that time, it's possible that the bug has been fixed, or the
details of the problem have changed. We'd really appreciate your help in
getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice
from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information
from Help - About LibreOffice.

If the bug is NOT present, please set the bug's Status field to
RESOLVED-WORKSFORME and leave a comment that includes the information from Help
- About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular
meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a
REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your
bug pertains to a feature added after 3.3) from
https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat:
https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 143611] File \ Wizards \ Letter - "AttributeError: 'NoneType' object has no attribute 'DocumentProperties'"

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=143611

--- Comment #10 from Anton F  ---
(In reply to James Beddek from comment #9)
> I can reproduce this with 7.2.2.2, though I'm not sure where the issue comes
> from in terms of Java or Python versions. Anton, what python version are you
> using for the build/runtime?

I have two of them. How to understand which one is used for the
office(build/runtime)?

nafanz@nafanz-desktop:~$ python --version
Python 2.7.17
nafanz@nafanz-desktop:~$ python3 --version
Python 3.9.2

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 145378] [META] Issues related to weld annotation window

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145378

--- Comment #2 from Aron Budea  ---
For regressions from:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=69c546e1e7a697217f273baa7c1729ff823efd76
author  Caolán McNamara 2020-12-04 16:30:31
+
committer   Caolán McNamara 2021-02-06 12:16:04
+0100

weld annotation window

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 106179] [META] Writer comment bugs and enhancements

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=106179

Aron Budea  changed:

   What|Removed |Added

 Depends on||145378


Referenced Bugs:

https://bugs.documentfoundation.org/show_bug.cgi?id=145378
[Bug 145378] [META] Issues related to weld annotation window
-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 145378] [META] Issues related to weld annotation window

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145378

Aron Budea  changed:

   What|Removed |Added

 Blocks||106179
  Alias||Weld-Writer-Comments
 CC||ba...@caesar.elte.hu
 Depends on||140409, 143487, 142924,
   ||143088


Referenced Bugs:

https://bugs.documentfoundation.org/show_bug.cgi?id=106179
[Bug 106179] [META] Writer comment bugs and enhancements
https://bugs.documentfoundation.org/show_bug.cgi?id=140409
[Bug 140409] Zoom ignores the comment text
https://bugs.documentfoundation.org/show_bug.cgi?id=142924
[Bug 142924] Empty area when opening comment popup menu in Writer for the first
time
https://bugs.documentfoundation.org/show_bug.cgi?id=143088
[Bug 143088] Endless loop when opening file with many (change tracked) comments
https://bugs.documentfoundation.org/show_bug.cgi?id=143487
[Bug 143487] UI: Comment note box has a visual inner border box
-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 127629] UI: Question to open links when opening a master document in English but different UI language

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=127629

Aron Budea  changed:

   What|Removed |Added

 CC||ba...@caesar.elte.hu
   Keywords|bibisectRequest |

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 99746] [META] PDF import filter in Draw

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=99746

Aron Budea  changed:

   What|Removed |Added

 Depends on|144644  |


Referenced Bugs:

https://bugs.documentfoundation.org/show_bug.cgi?id=144644
[Bug 144644] LO doesn't open a PDF file from Start Center with a "General
input/output error" message
-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 144644] LO doesn't open a PDF file from Start Center with a "General input/output error" message

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=144644

Aron Budea  changed:

   What|Removed |Added

 Blocks|99746   |
   Keywords|bibisectRequest |
 CC||ba...@caesar.elte.hu


Referenced Bugs:

https://bugs.documentfoundation.org/show_bug.cgi?id=99746
[Bug 99746] [META] PDF import filter in Draw
-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 139223] FILESAVE DOC: Loosing parallel wrap on DOC export

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=139223

Aron Budea  changed:

   What|Removed |Added

 CC||ba...@caesar.elte.hu
   Keywords|bibisectRequest |

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 145483] Options causes LibreOffice to stop responding

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145483

--- Comment #26 from p...@bwt.com.de ---
Debug output: http://ix.io/3DET

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 65046] Threaded calculation of formula groups (multi-threading)

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=65046

--- Comment #32 from Aron Budea  ---
(In reply to fredgib from comment #31)
> I thought any resource-intensive task would show the problem. In case I was
> wrong and, as you suggest, it might depend on the nature of the task, here
> is what I daily struggle with:
> 1. create a 30,000-row and two-column file with:
>   - first column being unique integers
>   - second column being whatever text
> 2. create another similar file, this time with 300,000 rows.
> 3. In the second file, create a third column with a formula only having a
> VLOOKUP to fetch the second column's value in the first file, against the
> first column's integer.
> 4. monitor your CPU resource consumption (and have a cocktail): only one
> core is fully used, while the other are idle.
Please create a new report, and include sample files created based on the
description you gave. Set the new report to "block" the VLOOKUP meta bug: bug
109329.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 112587] Slideshow Animation Timings Ignored on Slower PC

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=112587

--- Comment #17 from Luke  ---
still reproducible on 7.3

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 145501] New: Calc print preview discards print selection

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145501

Bug ID: 145501
   Summary: Calc print preview discards print selection
   Product: LibreOffice
   Version: 7.2.0.4 release
  Hardware: x86-64 (AMD64)
OS: Windows (All)
Status: UNCONFIRMED
  Severity: normal
  Priority: medium
 Component: Printing and PDF export
  Assignee: libreoffice-bugs@lists.freedesktop.org
  Reporter: sarp...@aol.com

Description:
Selecting "File/Print Preview" discards the cell selection, which is often also
the area one wants to print.

Steps to Reproduce:
1. Select a small group of cells in the middle of a large sheet
2. Select "File/Print Preview" to see how the cells will look if printed.
3. Close the print preview

Actual Results:
1. the cells are selected. Selecting "File/Print" will show a preview of the
whole page by default, but will show a preview of printing the selection if the
"Print Selected Cells" option is selected.
2. The preview shows the entire sheet, with no option to view selected cells.
3. The cells are no longer selected, and editing commands, as well as
"File/Print" will no longer apply to them.

Expected Results:
1. Cells are selected.
2. The preview show the entire sheet, with an option for "print selected cells"
(there are better  options, but they're feature requests)
3. The selected cells are still selected, and edit commands will apply to them,
and "File/Print" will still print them.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Version: 7.2.2.2 (x64) / LibreOffice Community
Build ID: 02b2acce88a210515b4a5bb2e46cbfb63fe97d56
CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 145490] Bitdefender flagged the 2021.10.31 download of LO Dev infected with a virus

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145490

--- Comment #10 from xordevore...@gmail.com ---
Another interesting detail -- why did Bitdefender only identify a virus in LO
Dev, but not in LO 7.2.2, which I also have installed?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 143611] File \ Wizards \ Letter - "AttributeError: 'NoneType' object has no attribute 'DocumentProperties'"

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=143611

James Beddek  changed:

   What|Removed |Added

 CC||tel...@posteo.de

--- Comment #9 from James Beddek  ---
I can reproduce this with 7.2.2.2, though I'm not sure where the issue comes
from in terms of Java or Python versions. Anton, what python version are you
using for the build/runtime?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 90009] UI: button size inconsistent, the buttons are not the same height in the Chart Wizard and in the options dialog

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=90009

--- Comment #13 from cle...@gmail.com ---
still happens (that is: buttons are still not the same height)

Version: 7.2.2.2 (x64) / LibreOffice Community

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 140689] LOCALIZATION DE Page "Seite" in page style dialog needs update

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=140689

Julien Nabet  changed:

   What|Removed |Added

 CC||serval2...@yahoo.fr

--- Comment #1 from Julien Nabet  ---
About text translation itself.
Eg:
https://translations.documentfoundation.org/translate/libo_help-master/textshared01/de/?checksum=5294a5d28a0f9ffb=Gutter+position_by=-priority%2Cposition
I saw "Bundstegposition:" in cui/messages.po, ok for this?

https://translations.documentfoundation.org/translate/libo_help-master/textshared01/de/?q=Gutter_by=-priority%2Cposition=2
so "Bunsteg" here?

About translated screenshots in documentation, don't know at all how it works.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - sc/qa

2021-11-01 Thread Thorsten Behrens (via logerrit)
 sc/qa/uitest/autofilter/tdf46184.py |  116 ++--
 1 file changed, 59 insertions(+), 57 deletions(-)

New commits:
commit 8e591181f24df34e7d4fdf4097355eac01139336
Author: Thorsten Behrens 
AuthorDate: Mon Nov 1 18:35:18 2021 +0100
Commit: Thorsten Behrens 
CommitDate: Mon Nov 1 22:16:34 2021 +0100

Fix uitest for tdf#46184 sc AutoFilter: reset filter options

Some newer functions not available on this branch

Change-Id: Idb60ef42c71aff74e716c76fb8da81200ea2e13e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124562
Tested-by: Thorsten Behrens 
Reviewed-by: Thorsten Behrens 

diff --git a/sc/qa/uitest/autofilter/tdf46184.py 
b/sc/qa/uitest/autofilter/tdf46184.py
index 08dfc520b640..73605e29e151 100755
--- a/sc/qa/uitest/autofilter/tdf46184.py
+++ b/sc/qa/uitest/autofilter/tdf46184.py
@@ -6,79 +6,81 @@
 #
 from uitest.framework import UITestCase
 from uitest.uihelper.calc import enter_text_to_cell
-from uitest.uihelper.common import select_by_text, get_state_as_dict
+from uitest.uihelper.common import get_state_as_dict
 from libreoffice.uno.propertyvalue import mkPropertyValues
 from libreoffice.calc.document import get_row
+from time import sleep
 
 #Bug 46184 - [Calc] [AutoFilter] Option "Copy results to ..." remains 
activated in AutoFilter
 
 class tdf46184(UITestCase):
 def test_tdf46184_copy_results_to(self):
-with self.ui_test.create_doc_in_start_center("calc") as document:
-calcDoc = self.xUITest.getTopFocusWindow()
-gridwin = calcDoc.getChild("grid_window")
+self.ui_test.create_doc_in_start_center("calc")
+document = self.ui_test.get_component()
+calcDoc = self.xUITest.getTopFocusWindow()
+gridwin = calcDoc.getChild("grid_window")
 
-enter_text_to_cell(gridwin, "A1", "A")
-enter_text_to_cell(gridwin, "A2", "1")
-enter_text_to_cell(gridwin, "A3", "2")
-enter_text_to_cell(gridwin, "A4", "3")
+enter_text_to_cell(gridwin, "A1", "A")
+enter_text_to_cell(gridwin, "A2", "1")
+enter_text_to_cell(gridwin, "A3", "2")
+enter_text_to_cell(gridwin, "A4", "3")
 
-gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": 
"A1:A4"}))
+gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:A4"}))
 
-self.xUITest.executeCommand(".uno:DataFilterAutoFilter")
+self.xUITest.executeCommand(".uno:DataFilterAutoFilter")
 
-gridwin.executeAction("LAUNCH", mkPropertyValues({"AUTOFILTER": 
"", "COL": "0", "ROW": "0"}))
-xFloatWindow = self.xUITest.getFloatWindow()
-#Choose Standard Filter... button
-xMenu = xFloatWindow.getChild("menu")
-xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"}))
-xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"}))
-xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"}))
-xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"}))
-xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"}))
-xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"}))
-xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"}))
-self.assertEqual("Standard Filter...", 
get_state_as_dict(xMenu)['SelectEntryText'])
-xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"RETURN"}))
+gridwin.executeAction("LAUNCH", mkPropertyValues({"AUTOFILTER": "", 
"COL": "0", "ROW": "0"}))
+xFloatWindow = self.xUITest.getFloatWindow()
+#Choose Standard Filter... button
+xMenu = xFloatWindow.getChild("check_list_menu")
+xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"}))
+xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"}))
+xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"}))
+xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"}))
+xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"}))
+xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"}))
+xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"}))
+xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"}))
+xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"RETURN"}))
 
-xDialog = self.xUITest.getTopFocusWindow()
-xfield1 = xDialog.getChild("field1")
-xcond1 = xDialog.getChild("cond1")
-xval1 = xDialog.getChild("val1")
-xcopyresult = xDialog.getChild("copyresult")
-xedcopyarea = xDialog.getChild("edcopyarea")
-xdestpers = xDialog.getChild("destpers")
+xDialog = self.xUITest.getTopFocusWindow()
+xfield1 = xDialog.getChild("field1")
+xcond1 = xDialog.getChild("cond1")
+xval1 = 

[Libreoffice-bugs] [Bug 145473] Don't add a space after E# in ToC

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145473

--- Comment #5 from phv  ---
In my document, I apply the rule of a dash surrounded by thin space characters,
except in the table of contents which imposes a standard space even when I
don't want it.

So I support this change but it raises a usability issue since novice users
expect to have a blank space by default and may be confused by the TOC menu (I
find the "Structure and Formatting" customization tool very confusing).

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 145498] lightproof (grammar checker) for pt-BR does not save settings

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145498

--- Comment #3 from Julien Nabet  ---
No pb when trying to reproduce this on master sources updated some days ago on
Win10.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 145498] lightproof (grammar checker) for pt-BR does not save settings

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145498

Julien Nabet  changed:

   What|Removed |Added

Version|unspecified |6.0.1.1 release
 CC||serval2...@yahoo.fr

--- Comment #2 from Julien Nabet  ---
On pc Debian x86-64 with master sources updated today, I don't reproduce this.

Here the tests I did:
1)
- enabled all the options in Grammar Checking (Portuguese)
- clicked OK
- reopen Tools/Options/Grammar Checking (Portuguese)
all options are enabled

2)
- disabled all the options in Grammar Checking (Portuguese)
- clicked OK
- reopen Tools/Options/Grammar Checking (Portuguese)
all options are disabled

Did I miss something?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 145483] Options causes LibreOffice to stop responding

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145483

--- Comment #25 from Julien Nabet  ---
Ok so build pb and bugtracker pb seem not related.

So Do you have some security on kernel (apparmor) or something?
Search the network error message + Arch, I found this ref too
https://bugs.archlinux.org/task/61984 but it's been closed for a while :-(

You can try a verbose build for Firebird part with:
make GMAKE_OPTIONS='VERBOSE=1' firebird
to try to retrieve extra info.

Anyway, you can add this line on autogen.input for the moment:
--disable-firebird-sdbc
(+ launch autogen.sh again so it'll be taken into account)
in order to not build Firebird since your primary goal is to know why
Tools/Options make LO not respond.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 145500] Add the ability to select a single column or row at its header bar and request INSERT X preceding/following rows

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145500

--- Comment #1 from LeroyG  ---
https://ask.libreoffice.org/t/how-to-insert-a-variable-number-of-columns-or-rows/69928

By the way, Writer Tables has an option to insert an x numbers of rows.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-ux-advise] [Bug 145351] Please make the visual indicators of breaks more practical

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145351

--- Comment #6 from himajin100...@gmail.com ---
FYI:

https://opengrok.libreoffice.org/xref/core/sw/source/core/layout/paintfrm.cxx?r=cf739db1#3698

-- 
You are receiving this mail because:
You are on the CC list for the bug.

[Libreoffice-bugs] [Bug 145351] Please make the visual indicators of breaks more practical

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145351

--- Comment #6 from himajin100...@gmail.com ---
FYI:

https://opengrok.libreoffice.org/xref/core/sw/source/core/layout/paintfrm.cxx?r=cf739db1#3698

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 145483] Options causes LibreOffice to stop responding

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145483

--- Comment #24 from p...@bwt.com.de ---
Tried compiling under the other account and it got stuck at the same place as
well.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 145499] CALC AUTOFILTER Numerical values duplicated in the drop down pane

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145499

--- Comment #4 from Colin  ---
(In reply to Mike Kaganski from comment #3)
> (In reply to Mike Kaganski from comment #2)
> 
> Additionally, the difference here (-1.4E-14) is smaller than 15 significant
> digits of the two values; this is what makes the two numbers look the same,
> without trailing non-0 digits, even when 20 decimals shown. This looks like
> a bug, actually: it should use normal approximate equality check.

Now I'm really confused; Does the formula you prescribed fix the error for me
or just prove the error exists AND demonstrate that once again I've learned two
new things today.
Rounding the preceding values to try to eliminate the .001 anomaly
doesn't solve the problem
AND
Don't present (mistaken) assumptions as facts ;))

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 145499] CALC AUTOFILTER Numerical values duplicated in the drop down pane

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145499

Mike Kaganski  changed:

   What|Removed |Added

 CC||er...@redhat.com

--- Comment #3 from Mike Kaganski  ---
(In reply to Mike Kaganski from comment #2)

Additionally, the difference here (-1.4E-14) is smaller than 15 significant
digits of the two values; this is what makes the two numbers look the same,
without trailing non-0 digits, even when 20 decimals shown. This looks like a
bug, actually: it should use normal approximate equality check.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 145499] CALC AUTOFILTER Numerical values duplicated in the drop down pane

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145499

Mike Kaganski  changed:

   What|Removed |Added

   Keywords||needsUXEval

--- Comment #2 from Mike Kaganski  ---
(In reply to Colin from comment #0)
> I have even expanded the column width and formatted the maximum decimal
> places and it is NOT the notorious anomaly where some numbers have the final
> digit defined as 1 ie. 2,001 = 2

It is exactly it. To check:
1. Set column K's filter to display both cases of '73.6'
2. In T278, put formula '=RAWSUBTRACT($K$249;K278)'
3. Drag-copy it down to T1755
4. Observe that unlike other cells, T1755 displays -1.4210854715202E-14

However, I don't know if it's correct to display two entries "named" same, when
they denote different values. Either they must have enough precision to allow
user tell one from the other, or they should be grouped together. Otherwise,
it's impossible to use them in reasonable manner.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 145500] New: Add the ability to select a single column or row at its header bar and request INSERT X preceding/following rows

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145500

Bug ID: 145500
   Summary: Add the ability to select a single column or row at
its header bar and request INSERT  X
preceding/following rows
   Product: LibreOffice
   Version: 7.2.1.2 release
  Hardware: All
OS: Windows (All)
Status: UNCONFIRMED
  Severity: enhancement
  Priority: medium
 Component: Calc
  Assignee: libreoffice-bugs@lists.freedesktop.org
  Reporter: that.man.co...@gmail.com

Description:
When selecting a large number of columns or rows by mouse "dragging", the
moment all populated cells are off the monitor the scrolling speed rapidly
accelerates.
If the intention is to add say 372 rows/columns then generally, the display
overshoots the target location and it's just as tedious trying to reverse the
selection.
It would be far more productive if the facility existed to simply select one
header location and have the option to insert 372 rows/columns from this
location.
I have been apprised of the various alternatives which are quite clumsy
compared with the simple procedure - please insert x rows here,
See AskLibre "How to insert a variable number of columns or rows"
Motivation:
Libre Calc Charts define absolute addresses for the data range.
If that range "grows" by simply "dragging" the formulae for a few more rows
then the chart reference gets left behind - way behind if a couple of hundred
new rows become populated.
If the range is originally defined with two "overflow" rows then extended by
inserting more rows into the "overflow" margin then the chart range is
automatically adjusted to reflect the new end points.


Steps to Reproduce:
Enhancement

Actual Results:
No Procedure - yet

Expected Results:
Enhancement: Doesn't exist yet


Reproducible: Always


User Profile Reset: No



Additional Info:
[Information automatically included from LibreOffice]
Locale: en-GB
Module: SpreadsheetDocument
[Information guessed from browser]
OS: Windows (All)
OS is 64bit: no

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 145363] KDE Plasma: Enters loop when editing bullet style

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145363

--- Comment #14 from Commit Notification 
 ---
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/f4b353c1f52fc78a102413cac94c7fb24292bec6

Related: tdf#145363 provide an explicit parent for page format

It will be available in 7.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-commits] core.git: sw/inc sw/source

2021-11-01 Thread Caolán McNamara (via logerrit)
 sw/inc/docsh.hxx   |1 +
 sw/source/ui/misc/titlepage.cxx|2 +-
 sw/source/uibase/app/docst.cxx |3 ++-
 sw/source/uibase/docvw/HeaderFooterWin.cxx |2 +-
 sw/source/uibase/shells/basesh.cxx |2 +-
 5 files changed, 6 insertions(+), 4 deletions(-)

New commits:
commit f4b353c1f52fc78a102413cac94c7fb24292bec6
Author: Caolán McNamara 
AuthorDate: Mon Nov 1 16:53:07 2021 +
Commit: Caolán McNamara 
CommitDate: Mon Nov 1 20:36:05 2021 +0100

Related: tdf#145363 provide an explicit parent for page format

when launched from another dialog let it take that as the parent

Change-Id: I07bfe03717cbe140301060e6e85bdbdef953bf5d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124560
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx
index 73dc9cdee19d..018c46349c1a 100644
--- a/sw/inc/docsh.hxx
+++ b/sw/inc/docsh.hxx
@@ -263,6 +263,7 @@ public:
 /// @param nSlot
 /// Identifies slot by which the dialog is triggered. Used to activate 
certain dialog pane
 void FormatPage(
+weld::Window* pDialogParent,
 const OUString& rPage,
 const OString& rPageId,
 SwWrtShell& rActShell,
diff --git a/sw/source/ui/misc/titlepage.cxx b/sw/source/ui/misc/titlepage.cxx
index 8925a60d0faf..c943b014ce2d 100644
--- a/sw/source/ui/misc/titlepage.cxx
+++ b/sw/source/ui/misc/titlepage.cxx
@@ -257,7 +257,7 @@ SwTitlePageDlg::~SwTitlePageDlg()
 IMPL_LINK_NOARG(SwTitlePageDlg, EditHdl, weld::Button&, void)
 {
 SwView& rView = mrSh.GetView();
-rView.GetDocShell()->FormatPage(m_xPagePropertiesLB->get_active_text(), 
"page", mrSh);
+rView.GetDocShell()->FormatPage(getDialog(), 
m_xPagePropertiesLB->get_active_text(), "page", mrSh);
 rView.InvalidateRulerPos();
 }
 
diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx
index f9514a81fc5c..44e42d6f58c3 100644
--- a/sw/source/uibase/app/docst.cxx
+++ b/sw/source/uibase/app/docst.cxx
@@ -1628,12 +1628,13 @@ void SwDocShell::LoadStyles_( SfxObjectShell& rSource, 
bool bPreserveCurrentDocu
 }
 
 void SwDocShell::FormatPage(
+weld::Window* pDialogParent,
 const OUString& rPage,
 const OString& rPageId,
 SwWrtShell& rActShell,
 SfxRequest* pRequest)
 {
-Edit(nullptr, rPage, OUString(), SfxStyleFamily::Page, 
SfxStyleSearchBits::Auto, false, rPageId, , pRequest);
+Edit(pDialogParent, rPage, OUString(), SfxStyleFamily::Page, 
SfxStyleSearchBits::Auto, false, rPageId, , pRequest);
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx 
b/sw/source/uibase/docvw/HeaderFooterWin.cxx
index 60ea0c1f08aa..d74c25084f14 100644
--- a/sw/source/uibase/docvw/HeaderFooterWin.cxx
+++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx
@@ -427,7 +427,7 @@ void SwHeaderFooterWin::ExecuteCommand(std::string_view 
rIdent)
 if (rIdent == "edit")
 {
 OString sPageId = m_bIsHeader ? OString("header") : OString("footer");
-rView.GetDocShell()->FormatPage(rStyleName, sPageId, rSh);
+rView.GetDocShell()->FormatPage(rView.GetFrameWeld(), rStyleName, 
sPageId, rSh);
 }
 else if (rIdent == "borderback")
 {
diff --git a/sw/source/uibase/shells/basesh.cxx 
b/sw/source/uibase/shells/basesh.cxx
index da474db91901..9db7e923bdd9 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -2639,7 +2639,7 @@ void SwBaseShell::ExecDlg(SfxRequest )
   sPageId = OUStringToOString(static_cast(pItem)->GetValue(), RTL_TEXTENCODING_UTF8);
 break;
 }
-rTempView.GetDocShell()->FormatPage(rPageDesc.GetName(), 
sPageId, rSh, );
+rTempView.GetDocShell()->FormatPage(rReq.GetFrameWeld(), 
rPageDesc.GetName(), sPageId, rSh, );
 rTempView.InvalidateRulerPos();
 
 bDone = true; // FormatPage() takes care of calling Done()


[Libreoffice-bugs] [Bug 145363] KDE Plasma: Enters loop when editing bullet style

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145363

--- Comment #13 from Commit Notification 
 ---
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/e78a519285a5d2ca5ccc9ae6a5fda81975fa38d7

tdf#145363 provide an explicit parent for numbering-style dialog

It will be available in 7.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-commits] core.git: sw/inc sw/source

2021-11-01 Thread Caolán McNamara (via logerrit)
 sw/inc/docsh.hxx |1 +
 sw/source/ui/chrdlg/numpara.cxx  |   11 +--
 sw/source/uibase/app/docst.cxx   |   14 ++
 sw/source/uibase/inc/numpara.hxx |4 ++--
 4 files changed, 22 insertions(+), 8 deletions(-)

New commits:
commit e78a519285a5d2ca5ccc9ae6a5fda81975fa38d7
Author: Caolán McNamara 
AuthorDate: Mon Nov 1 16:38:56 2021 +
Commit: Caolán McNamara 
CommitDate: Mon Nov 1 20:35:49 2021 +0100

tdf#145363 provide an explicit parent for numbering-style dialog

when launched from another dialog let it take that as the parent

Change-Id: I64247b0b670c3e44176b6323c074cfd0711feefb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124558
Tested-by: Jenkins
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 

diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx
index 5dd105e1fdb3..73dc9cdee19d 100644
--- a/sw/inc/docsh.hxx
+++ b/sw/inc/docsh.hxx
@@ -128,6 +128,7 @@ class SW_DLLPUBLIC SwDocShell
 /// Only used for nFamily == SfxStyleFamily::Page. Identifies optional 
Slot by which the edit is triggered.
 /// Used to activate certain dialog pane
 SAL_DLLPRIVATE void Edit(
+weld::Window* pDialogParent,
 const OUString ,
 const OUString& rParent,
 const SfxStyleFamily nFamily,
diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx
index e57009b3b1fb..95b533c9c6bb 100644
--- a/sw/source/ui/chrdlg/numpara.cxx
+++ b/sw/source/ui/chrdlg/numpara.cxx
@@ -30,6 +30,7 @@
 #include 
 
 #include 
+#include 
 #include 
 
 const WhichRangesContainer 
SwParagraphNumTabPage::aPageRg(svl::Items);
@@ -306,7 +307,6 @@ IMPL_LINK_NOARG(SwParagraphNumTabPage, 
EditNumStyleHdl_Impl, weld::Button&, void
 bool SwParagraphNumTabPage::ExecuteEditNumStyle_Impl(
 sal_uInt16 nId, const OUString , SfxStyleFamily nFamily)
 {
-
 SfxDispatcher  = *SfxViewShell::Current()->GetDispatcher();
 SfxStringItem aItem(nId, rStr);
 SfxUInt16Item aFamily(SID_STYLE_FAMILY, static_cast(nFamily));
@@ -318,9 +318,16 @@ bool SwParagraphNumTabPage::ExecuteEditNumStyle_Impl(
 
 pItems[ nCount++ ] = nullptr;
 
+// tdf#145363 we want the current dialog to be the parent of the new dialog
+weld::Window* pDialogParent = GetFrameWeld();
+css::uno::Any aAny(pDialogParent->GetXWindow());
+SfxUnoAnyItem aDialogParent(SID_DIALOG_PARENT, aAny);
+const SfxPoolItem* pInternalItems[ 1 ];
+pInternalItems[ 0 ] = 
+
 const SfxPoolItem* pItem = rDispatcher.Execute(
 nId, SfxCallMode::SYNCHRON | SfxCallMode::RECORD,
-pItems );
+pItems, 0, pInternalItems);
 
 return pItem != nullptr;
 
diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx
index 1654dfca3e36..f9514a81fc5c 100644
--- a/sw/source/uibase/app/docst.cxx
+++ b/sw/source/uibase/app/docst.cxx
@@ -319,7 +319,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
 if (sName.isEmpty() && m_xBasePool)
 sName = 
SfxStyleDialogController::GenerateUnusedName(*m_xBasePool, nFamily);
 
-Edit(sName, sParent, nFamily, nMask, true, OString(), nullptr, 
, nSlot);
+Edit(rReq.GetFrameWeld(), sName, sParent, nFamily, nMask, true, 
OString(), nullptr, , nSlot);
 }
 break;
 
@@ -491,7 +491,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
 switch(nSlot)
 {
 case SID_STYLE_EDIT:
-Edit(aParam, OUString(), nFamily, nMask, false, 
OString(), pActShell);
+Edit(rReq.GetFrameWeld(), aParam, OUString(), nFamily, 
nMask, false, OString(), pActShell);
 break;
 case SID_STYLE_DELETE:
 Delete(aParam, nFamily);
@@ -754,6 +754,7 @@ void syncEndnoteOrientation(const uno::Reference< 
style::XStyleFamiliesSupplier
 }
 
 void SwDocShell::Edit(
+weld::Window* pDialogParent,
 const OUString ,
 const OUString ,
 const SfxStyleFamily nFamily,
@@ -953,7 +954,12 @@ void SwDocShell::Edit(
 FieldUnit eMetric = ::GetDfltMetric(0 != (HTMLMODE_ON));
 SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< 
sal_uInt16 >(eMetric)));
 SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
-VclPtr 
pDlg(pFact->CreateTemplateDialog(GetView()->GetFrameWeld(),
+if (!pDialogParent)
+{
+SAL_WARN("sw.ui", "no parent for dialog supplied, assuming 
document frame is good enough");
+pDialogParent = GetView()->GetFrameWeld();
+}
+VclPtr 
pDlg(pFact->CreateTemplateDialog(pDialogParent,
 *xTmp, nFamily, sPage, 
pCurrShell, bNew));
 auto pApplyStyleHelper = std::make_shared(*this, bNew, 
xTmp, nFamily, pDlg.get(), m_xBasePool, bModified);
 pDlg->SetApplyHdl(LINK(pApplyStyleHelper.get(), ApplyStyle, 

[Libreoffice-bugs] [Bug 145499] CALC AUTOFILTER Numerical values duplicated in the drop down pane

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145499

--- Comment #1 from Colin  ---
Created attachment 176066
  --> https://bugs.documentfoundation.org/attachment.cgi?id=176066=edit
Zip with png and ods

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 145499] New: CALC AUTOFILTER Numerical values duplicated in the drop down pane

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145499

Bug ID: 145499
   Summary: CALC AUTOFILTER Numerical values duplicated in the
drop down pane
   Product: LibreOffice
   Version: 7.2.1.2 release
  Hardware: All
OS: Windows (All)
Status: UNCONFIRMED
  Severity: normal
  Priority: medium
 Component: Calc
  Assignee: libreoffice-bugs@lists.freedesktop.org
  Reporter: that.man.co...@gmail.com

Description:
Some numerical values are being presented in duplicate when the autofilter is
activated.
If everything apart from one of the duplicated values is deselected - keeping
both the duplicates selected - then all the resultant cells contain identical
data.
I have even expanded the column width and formatted the maximum decimal places
and it is NOT the notorious anomaly where some numbers have the final digit
defined as 1 ie. 2,001 = 2
If the autofilter pane is activated when the selection has been defined as just
the duplicated entry then the display still presents two versions of the same
number but only one is activated.

Steps to Reproduce:
Utilising the attached file, autofilter on column K
Observe that some of the numbers are duplicated
Clear all and then select both entries for the value 73,6 or any other obvious
duplicate
OK
Examine all the values to satisfy yourself they are indeed identical
Activate the filter again and observe that the chosen value is duplicated but
only one version is activated

Actual Results:
Duplicated values in the selection list

Expected Results:
No duplicated values


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
Version: 7.2.1.2 (x64) / LibreOffice Community
Build ID: 87b77fad49947c1441b67c559c339af8f3517e22
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: sv-SE (en_GB); UI: en-GB
Calc: threaded

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 145351] Please make the visual indicators of breaks more practical

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145351

--- Comment #5 from himajin100...@gmail.com ---
possible source code pointer

https://opengrok.libreoffice.org/xref/core/sw/source/uibase/docvw/PageBreakWin.cxx?r=dbd49cf9#123

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-ux-advise] [Bug 145351] Please make the visual indicators of breaks more practical

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145351

--- Comment #5 from himajin100...@gmail.com ---
possible source code pointer

https://opengrok.libreoffice.org/xref/core/sw/source/uibase/docvw/PageBreakWin.cxx?r=dbd49cf9#123

-- 
You are receiving this mail because:
You are on the CC list for the bug.

[Libreoffice-bugs] [Bug 145498] lightproof (grammar checker) for pt-BR does not save settings

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145498

Olivier Hallot  changed:

   What|Removed |Added

 Ever confirmed|0   |1
 Status|UNCONFIRMED |NEW

--- Comment #1 from Olivier Hallot  ---
Confirmed 

Version: 7.2.2.2 / LibreOffice Community
Build ID: 02b2acce88a210515b4a5bb2e46cbfb63fe97d56
CPU threads: 8; OS: Linux 5.13; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: pt-BR
Calc: threaded

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 145498] New: lightproof (grammar checker) for pt-BR does not save settings

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145498

Bug ID: 145498
   Summary: lightproof (grammar checker) for pt-BR does not save
settings
   Product: LibreOffice
   Version: unspecified
  Hardware: All
OS: All
Status: UNCONFIRMED
  Severity: normal
  Priority: medium
 Component: Linguistic
  Assignee: libreoffice-bugs@lists.freedesktop.org
  Reporter: olivier.hal...@libreoffice.org
CC: so...@libreoffice.org

Hello.
Changes to the options quoted below are not saving.

In Write, going to the menu “Tools\Options”
In the item "Language settings\Verifying sentences in Portuguese"

I change the items, but they don't work… when I return to the place, the
changes appear undone!!

obs.: I tested the item referring to English and it works normally, only in
Portuguese there is this problem. Other option items are also saving. What can
it be? how to solve?

LibreOffice Version: 6.0.1.1. (x64).
obs.: I had version 5 with the same problem, I updated to the latest one and it
has the same problem.
Windows 7 Professional x64 SP1 (original)

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 145473] Don't add a space after E# in ToC

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145473

Peter Roelofsen  changed:

   What|Removed |Added

 CC||floris...@gmail.com

--- Comment #4 from Peter Roelofsen  ---
Confirmed in Version: 7.2.1.2 / LibreOffice Community
Build ID: 2c9f9a7aa7c967a1b7ec3448959cff87b32f6580

This is definitely undesirable. The tool for building the TOC is really
powerful (once you got the hang of it), and allows you to configure the
formatting of the TOC items into fine detail, but this ruins it.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-commits] core.git: compilerplugins/clang

2021-11-01 Thread Stephan Bergmann (via logerrit)
 compilerplugins/clang/test/unusedmember.cxx |   30 +++-
 compilerplugins/clang/unusedmember.cxx  |   15 ++
 2 files changed, 40 insertions(+), 5 deletions(-)

New commits:
commit d1ff9c1d650ada0049c867d76ba38890633a444c
Author: Stephan Bergmann 
AuthorDate: Mon Nov 1 17:41:06 2021 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Nov 1 19:13:23 2021 +0100

loplugin:unusedmember: Work around more cases not marking an enum as 
referenced

...similar to the "For some reason..." workaround already present in
VisitElaboratedTypeLoc.  (Thanks to mst for finding this.)

Change-Id: Ic682e8290efa64093d3c4a831dfb4d23091b6056
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124559
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/compilerplugins/clang/test/unusedmember.cxx 
b/compilerplugins/clang/test/unusedmember.cxx
index 00b136249aca..a495b786919e 100644
--- a/compilerplugins/clang/test/unusedmember.cxx
+++ b/compilerplugins/clang/test/unusedmember.cxx
@@ -13,15 +13,35 @@ namespace
 {
 struct S
 {
-enum E
+enum E1
 {
-E1,
-E2
+E11,
+E12
+};
+E1 e1;
+enum E2
+{
+E21,
+E22
 };
-E e;
+E2 e2; // expected-error {{unused class member [loplugin:unusedmember]}}
+enum E3
+{
+E31,
+E32
+} e3;
+enum E4
+{
+E41,
+E42
+} e4; // expected-error {{unused class member [loplugin:unusedmember]}}
 };
 }
-void f(S s) { (void)s.e; }
+void f(S s)
+{
+(void)s.e1;
+(void)s.e3;
+}
 }
 
 namespace ElaboratedEnum
diff --git a/compilerplugins/clang/unusedmember.cxx 
b/compilerplugins/clang/unusedmember.cxx
index bfd4f591616d..8239b5ae1d8d 100644
--- a/compilerplugins/clang/unusedmember.cxx
+++ b/compilerplugins/clang/unusedmember.cxx
@@ -94,6 +94,21 @@ public:
 
 #endif
 
+bool VisitDeclaratorDecl(DeclaratorDecl const* decl)
+{
+// For declarations like
+//
+//   enum E { ... } e;
+//
+// it may be that the declaration of E is not marked as referenced 
even though the
+// declaration of e clearly references it:
+if (auto const t = decl->getType()->getAs())
+{
+deferred_.erase(t->getDecl());
+}
+return true;
+}
+
 bool VisitCXXRecordDecl(CXXRecordDecl const* decl) //TODO: non-CXX 
RecordDecl?
 {
 if (ignoreLocation(decl))


[Libreoffice-bugs] [Bug 145384] Lowercase cell references not tolerated in formulas for Writer table cells

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145384

--- Comment #5 from Dave McKellar  ---
Perhaps use standard functions for that code:

   if (!isalpha(cChar)) break
   if (islower(cChar)) cChar = toupper(cChar);
   cChar -= 'A';

To replace:

if ((cChar<'A' || cChar>'Z') && (cChar<'a' || cChar>'z'))
break;
cChar -= 'A';
if( cChar >= 26 )
cChar -= 'a' - '[';

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-commits] core.git: ucb/source

2021-11-01 Thread Michael Stahl (via logerrit)
 ucb/source/ucp/webdav-curl/CurlSession.cxx   |   20 ++--
 ucb/source/ucp/webdav-curl/CurlSession.hxx   |5 +++--
 ucb/source/ucp/webdav-curl/SerfLockStore.cxx |   17 ++---
 ucb/source/ucp/webdav-curl/SerfLockStore.hxx |1 -
 4 files changed, 15 insertions(+), 28 deletions(-)

New commits:
commit 34f5a5a5e482f47476f1a37684d837c1d21d79b0
Author: Michael Stahl 
AuthorDate: Thu Oct 28 16:56:35 2021 +0200
Commit: Michael Stahl 
CommitDate: Mon Nov 1 19:03:48 2021 +0100

ucb: webdav-curl: remove SerfLockStore::getLockToken()

Looking rather obsolete, plus NonInteractive_LOCK() can just get
the token as a parameter since it's called only by LockStore.

Change-Id: I4c5c84135592fbab20f36c93d0c99b80fccb0976
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124453
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx 
b/ucb/source/ucp/webdav-curl/CurlSession.cxx
index d7a0f62ce606..d075c67132c8 100644
--- a/ucb/source/ucp/webdav-curl/CurlSession.cxx
+++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx
@@ -1799,8 +1799,8 @@ auto CurlSession::PUT(OUString const& rURIReference,
 {
 throw uno::RuntimeException("curl_slist_append failed");
 }
-OUString const token(g_Init.LockStore.getLockToken(uri.GetURI()));
-if (!token.isEmpty())
+OUString const* const 
pToken(g_Init.LockStore.getLockTokenForURI(uri.GetURI(), nullptr));
+if (pToken)
 {
 OString const utf8If("If: "
 // disabled as Sharepoint 2013 workaround, it accepts only
@@ -1810,7 +1810,7 @@ auto CurlSession::PUT(OUString const& rURIReference,
  + "> "
 #endif
  "(<"
- + OUStringToOString(token, 
RTL_TEXTENCODING_ASCII_US) + ">)");
+ + OUStringToOString(*pToken, 
RTL_TEXTENCODING_ASCII_US) + ">)");
 pList.reset(curl_slist_append(pList.release(), utf8If.getStr()));
 if (!pList)
 {
@@ -2162,14 +2162,14 @@ auto CurlSession::LOCK(OUString const& rURIReference, 
ucb::Lock /*const*/& rLock
 auto CurlProcessor::Unlock(CurlSession& rSession, CurlUri const& rURI,
DAVRequestEnvironment const* const pEnv) -> void
 {
-OUString const token(g_Init.LockStore.getLockToken(rURI.GetURI()));
-if (token.isEmpty())
+OUString const* const 
pToken(g_Init.LockStore.getLockTokenForURI(rURI.GetURI(), nullptr));
+if (!pToken)
 {
 SAL_WARN("ucb.ucp.webdav.curl", "attempt to unlock but not locked");
 throw DAVException(DAVException::DAV_NOT_LOCKED);
 }
 OString const utf8LockToken("Lock-Token: <"
-+ OUStringToOString(token, 
RTL_TEXTENCODING_ASCII_US) + ">");
++ OUStringToOString(*pToken, 
RTL_TEXTENCODING_ASCII_US) + ">");
 ::std::unique_ptr> pList(
 curl_slist_append(nullptr, utf8LockToken.getStr()));
 if (!pList)
@@ -2197,7 +2197,7 @@ auto CurlSession::UNLOCK(OUString const& rURIReference, 
DAVRequestEnvironment co
 g_Init.LockStore.removeLock(uri.GetURI());
 }
 
-auto CurlSession::NonInteractive_LOCK(OUString const& rURI,
+auto CurlSession::NonInteractive_LOCK(OUString const& rURI, 
::std::u16string_view const rLockToken,
   sal_Int32& 
o_rLastChanceToSendRefreshRequest,
   bool& o_rIsAuthFailed) -> bool
 {
@@ -2211,9 +2211,9 @@ auto CurlSession::NonInteractive_LOCK(OUString const& 
rURI,
 ::std::unique_ptr> 
pList(
 curl_slist_append(nullptr, "Timeout: Second-180"));
 
-OUString const token(g_Init.LockStore.getLockToken(rURI));
-assert(!token.isEmpty()); // LockStore is the caller
-OString const utf8If("If: (<" + OUStringToOString(token, 
RTL_TEXTENCODING_ASCII_US) + ">)");
+assert(!rLockToken.empty()); // LockStore is the caller
+OString const utf8If("If: (<" + OUStringToOString(rLockToken, 
RTL_TEXTENCODING_ASCII_US)
+ + ">)");
 pList.reset(curl_slist_append(pList.release(), utf8If.getStr()));
 if (!pList)
 {
diff --git a/ucb/source/ucp/webdav-curl/CurlSession.hxx 
b/ucb/source/ucp/webdav-curl/CurlSession.hxx
index 73b32096f6ea..706aa54c19e5 100644
--- a/ucb/source/ucp/webdav-curl/CurlSession.hxx
+++ b/ucb/source/ucp/webdav-curl/CurlSession.hxx
@@ -134,8 +134,9 @@ public:
 
 virtual auto abort() -> void override;
 
-auto NonInteractive_LOCK(OUString const& rURI, sal_Int32& 
o_rLastChanceToSendRefreshRequest,
- bool& o_rIsAuthFailed) -> bool;
+auto NonInteractive_LOCK(OUString const& rURI, ::std::u16string_view 
rLockToken,
+ sal_Int32& o_rLastChanceToSendRefreshRequest, 
bool& o_rIsAuthFailed)
+-> bool;
 auto NonInteractive_UNLOCK(OUString const& rURI) -> 

[Libreoffice-commits] core.git: ucb/source

2021-11-01 Thread Michael Stahl (via logerrit)
 ucb/source/ucp/webdav-curl/CurlSession.cxx |   13 -
 1 file changed, 8 insertions(+), 5 deletions(-)

New commits:
commit a6c21346d4374ea9a0c1e4e1b05e443f48cef65b
Author: Michael Stahl 
AuthorDate: Mon Nov 1 13:27:36 2021 +0100
Commit: Michael Stahl 
CommitDate: Mon Nov 1 19:03:14 2021 +0100

ucb: webdav-curl: fix MOVE/COPY/DELETE crash

These need "nobody"; some errors like 401 will return a body that should
be ignored.

Change-Id: If2f726aa34d4d3fae1bd61bc87b62e2d55a7ff26
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124561
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx 
b/ucb/source/ucp/webdav-curl/CurlSession.cxx
index a3426f7ddd89..d7a0f62ce606 100644
--- a/ucb/source/ucp/webdav-curl/CurlSession.cxx
+++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx
@@ -1915,8 +1915,9 @@ auto CurlSession::MKCOL(OUString const& rURIReference, 
DAVRequestEnvironment con
 
 CurlUri const uri(CurlProcessor::URIReferenceToURI(*this, rURIReference));
 
-::std::vector const options{ { CURLOPT_CUSTOMREQUEST, "MKCOL",
-   "CURLOPT_CUSTOMREQUEST" } };
+::std::vector const options{
+{ CURLOPT_NOBODY, 1L, nullptr }, { CURLOPT_CUSTOMREQUEST, "MKCOL", 
"CURLOPT_CUSTOMREQUEST" }
+};
 
 CurlProcessor::ProcessRequest(*this, uri, options, , nullptr, 
nullptr, nullptr, nullptr);
 }
@@ -1943,8 +1944,9 @@ auto CurlProcessor::MoveOrCopy(CurlSession& rSession, 
OUString const& rSourceURI
 throw uno::RuntimeException("curl_slist_append failed");
 }
 
-::std::vector const options{ { CURLOPT_CUSTOMREQUEST, pMethod,
-   "CURLOPT_CUSTOMREQUEST" } };
+::std::vector const options{
+{ CURLOPT_NOBODY, 1L, nullptr }, { CURLOPT_CUSTOMREQUEST, pMethod, 
"CURLOPT_CUSTOMREQUEST" }
+};
 
 CurlProcessor::ProcessRequest(rSession, uriSource, options, , 
::std::move(pList), nullptr,
   nullptr, nullptr);
@@ -1974,7 +1976,8 @@ auto CurlSession::DESTROY(OUString const& rURIReference, 
DAVRequestEnvironment c
 
 CurlUri const uri(CurlProcessor::URIReferenceToURI(*this, rURIReference));
 
-::std::vector const options{ { CURLOPT_CUSTOMREQUEST, "DELETE",
+::std::vector const options{ { CURLOPT_NOBODY, 1L, nullptr },
+ { CURLOPT_CUSTOMREQUEST, "DELETE",
"CURLOPT_CUSTOMREQUEST" } };
 
 CurlProcessor::ProcessRequest(*this, uri, options, , nullptr, 
nullptr, nullptr, nullptr);


[Libreoffice-commits] core.git: ucb/source

2021-11-01 Thread Michael Stahl (via logerrit)
 ucb/source/ucp/webdav-curl/CurlSession.cxx | 1197 ++---
 1 file changed, 616 insertions(+), 581 deletions(-)

New commits:
commit d4acfea2fed8f999347e49ed76c3f5115952df5c
Author: Michael Stahl 
AuthorDate: Fri Oct 29 21:53:31 2021 +0200
Commit: Michael Stahl 
CommitDate: Mon Nov 1 19:02:16 2021 +0100

ucb: webdav-curl: rewrite authentication loop for reentrancy

Surprisingly calling authenticate() can lead to a reentrant call
via event loop, which fortunately deadlocks with non-recusive mutex,
or we'd have a much more difficult to debug problem:

 5  std::unique_lock::unique_lock()
 7  http_dav_ucp::CurlProcessor::PropFind()
 8  http_dav_ucp::CurlSession::PROPFIND() (this=0x391fe80, 
rURIReference="/testL.odt", depth=http_dav_ucp::DAVZERO, 
o_rResourceInfos=std::__debug::vector of length 0, capacity 0, rEnv=...)
 9  http_dav_ucp::DAVResourceAccess::PROPFIND() (this=0xab3bb00, 
nDepth=http_dav_ucp::DAVZERO, rResInfo=std::__debug::vector of length 0, 
capacity 0, xEnv=uno::Reference to (class ucbhelper::CommandEnvironment *) 
0x390b578)
 10 http_dav_ucp::Content::getProperties() (this=0xa8ba9a0, 
xEnv=uno::Reference to (class ucbhelper::CommandEnvironment *) 0x390b578)
 15 SfxBaseModel::isVersionable() (this=0x7159c90)
 19 SfxBindings::Update_Impl(SfxStateCache&)
 24 Timer::Invoke() (this=0x7394708)
 30 g_main_loop_run ()
 35 (anonymous namespace)::executeMasterPasswordDialog()
 40 (anonymous namespace)::UUIInteractionHandler::handle()
 41 PasswordContainer::RequestPasswordFromUser()
 42 PasswordContainer::GetMasterPassword()
 47 PasswordContainer::find()
 48 uui::PasswordContainerHelper::handleAuthenticationRequest()
 57 ucbhelper::InterceptedInteraction::handle()
 58 http_dav_ucp::DAVAuthListener_Impl::authenticate()
 59 http_dav_ucp::CurlProcessor::ProcessRequestImpl()
 60 http_dav_ucp::CurlProcessor::ProcessRequest()
 61 http_dav_ucp::CurlProcessor::PropFind()
 62 http_dav_ucp::CurlSession::PROPFIND() (this=0x391fe80, 
rURIReference="/testL.odt", depth=http_dav_ucp::DAVZERO, 
o_rResourceInfos=std::__debug::vector of length 0, capacity 0, rEnv=...)
 63 http_dav_ucp::DAVResourceAccess::PROPFIND() (this=0xab8c060, 
nDepth=http_dav_ucp::DAVZERO, rResInfo=std::__debug::vector of length 0, 
capacity 0, xEnv=uno::Reference to (class ucbhelper::CommandEnvironment *) 
0x390b578)
 64 http_dav_ucp::Content::getProperties() (this=0xa8ba9a0, 
xEnv=uno::Reference to (class ucbhelper::CommandEnvironment *) 0x390b578)
 67 ucbhelper::PropertySetInfo::hasPropertyByName() (this=0xa8d7a20, 
Name="TitleOnServer")
 68 SfxBaseModel::getTitle()
 74 framework::TitleHelper::impl_updateTitle()
 75 framework::TitleHelper::documentEventOccured()
 78 SfxBaseModel::postEvent_Impl() (this=0x7159c90, aName="OnModeChanged", 
xController=empty uno::Reference)
 79 SfxBaseModel::Notify()
 80 SfxBroadcaster::Broadcast()
 81 SfxObjectShell::SetModalMode_Impl()
 82 SfxViewFrame::SetModalMode(bool)
 83 SfxFrameWindow_Impl::ModalHierarchyHdl()
 86 SalFrame::NotifyModalHierarchy()
 88 SalGtkFilePicker::execute()
 92 ModelData_Impl::OutputFileDialog()
 93 SfxStoringHelper::GUIStoreModel()

Need to move authentication loop to the outer function, so that all the
option guards in ProcessRequestImpl() are reset/set again, and also
delay setting the option guards from the various callers so they can be
reset in ProcessRequest() before authenticate().

Change-Id: Id697b1459f94f80fc58cee7768c2bd388369b29c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124452
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx 
b/ucb/source/ucp/webdav-curl/CurlSession.cxx
index 6fb54998c531..a3426f7ddd89 100644
--- a/ucb/source/ucp/webdav-curl/CurlSession.cxx
+++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx
@@ -99,6 +99,72 @@ struct UploadSource
 }
 };
 
+auto GetErrorString(CURLcode const rc, char const* const pErrorBuffer = 
nullptr) -> OString
+{
+char const* const pMessage( // static fallback
+(pErrorBuffer && pErrorBuffer[0] != '\0') ? pErrorBuffer : 
curl_easy_strerror(rc));
+return OString::Concat("(") + OString::number(sal_Int32(rc)) + ") " + 
pMessage;
+}
+
+auto GetErrorStringMulti(CURLMcode const mc) -> OString
+{
+return OString::Concat("(") + OString::number(sal_Int32(mc)) + ") " + 
curl_multi_strerror(mc);
+}
+
+/// represent an option to be passed to curl_easy_setopt()
+struct CurlOption
+{
+CURLoption const Option;
+enum class Type
+{
+Pointer,
+Long,
+CurlOffT
+};
+Type const Tag;
+union {
+void const* const pValue;
+decltype(0L) const lValue;
+curl_off_t const cValue;
+};
+#if 0
+::std::variant const Value;
+#endif
+char const* const 

[Libreoffice-commits] core.git: external/curl RepositoryExternal.mk

2021-11-01 Thread Michael Stahl (via logerrit)
 RepositoryExternal.mk |2 +-
 external/curl/ExternalPackage_curl.mk |2 +-
 external/curl/ExternalProject_curl.mk |1 +
 external/curl/UnpackedTarball_curl.mk |1 +
 external/curl/curl-msvc-zlib.patch.1  |   16 
 5 files changed, 20 insertions(+), 2 deletions(-)

New commits:
commit 4b7f8f7cf3146317ae2770a766efe48f7a295f72
Author: Michael Stahl 
AuthorDate: Wed Oct 27 21:07:48 2021 +0200
Commit: Michael Stahl 
CommitDate: Mon Nov 1 19:01:49 2021 +0100

curl: build with zlib on WNT

Change-Id: I53eb6ed41fb8a17a79f72807df15822e9c1c6e88
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124290
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 23d4b2e63637..c28b049caef8 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -2763,7 +2763,7 @@ $(call gb_LinkTarget_set_include,$(1),\
 
 ifeq ($(COM),MSC)
 $(call gb_LinkTarget_add_libs,$(1),\
-   $(call 
gb_UnpackedTarball_get_dir,curl)/builds/libcurl-vc12-$(gb_MSBUILD_PLATFORM)-$(gb_MSBUILD_CONFIG)-dll-ipv6-sspi-schannel/lib/libcurl$(if
 $(MSVC_USE_DEBUG_RUNTIME),_debug).lib \
+   $(call 
gb_UnpackedTarball_get_dir,curl)/builds/libcurl-vc12-$(gb_MSBUILD_PLATFORM)-$(gb_MSBUILD_CONFIG)-dll-zlib-static-ipv6-sspi-schannel/lib/libcurl$(if
 $(MSVC_USE_DEBUG_RUNTIME),_debug).lib \
 )
 else
 $(call gb_LinkTarget_add_libs,$(1),\
diff --git a/external/curl/ExternalPackage_curl.mk 
b/external/curl/ExternalPackage_curl.mk
index 924fc53ebd62..0485dacb2d3b 100644
--- a/external/curl/ExternalPackage_curl.mk
+++ b/external/curl/ExternalPackage_curl.mk
@@ -14,7 +14,7 @@ $(eval $(call 
gb_ExternalPackage_use_external_project,curl,curl))
 ifneq ($(DISABLE_DYNLOADING),TRUE)
 
 ifeq ($(COM),MSC)
-$(eval $(call gb_ExternalPackage_add_file,curl,$(LIBO_LIB_FOLDER)/libcurl$(if 
$(MSVC_USE_DEBUG_RUNTIME),_debug).dll,builds/libcurl-vc12-$(gb_MSBUILD_PLATFORM)-$(gb_MSBUILD_CONFIG)-dll-ipv6-sspi-schannel/bin/libcurl$(if
 $(MSVC_USE_DEBUG_RUNTIME),_debug).dll))
+$(eval $(call gb_ExternalPackage_add_file,curl,$(LIBO_LIB_FOLDER)/libcurl$(if 
$(MSVC_USE_DEBUG_RUNTIME),_debug).dll,builds/libcurl-vc12-$(gb_MSBUILD_PLATFORM)-$(gb_MSBUILD_CONFIG)-dll-zlib-static-ipv6-sspi-schannel/bin/libcurl$(if
 $(MSVC_USE_DEBUG_RUNTIME),_debug).dll))
 else ifeq ($(OS),MACOSX)
 $(eval $(call 
gb_ExternalPackage_add_file,curl,$(LIBO_LIB_FOLDER)/libcurl.4.dylib,lib/.libs/libcurl.4.dylib))
 else ifeq ($(OS),AIX)
diff --git a/external/curl/ExternalProject_curl.mk 
b/external/curl/ExternalProject_curl.mk
index 11beda8c7c5c..d068f2dc36f2 100644
--- a/external/curl/ExternalProject_curl.mk
+++ b/external/curl/ExternalProject_curl.mk
@@ -88,6 +88,7 @@ $(call gb_ExternalProject_get_state_target,curl,build):
ENABLE_IPV6=yes \
ENABLE_SSPI=yes \
ENABLE_WINSSL=yes \
+   WITH_ZLIB=static \
,winbuild)
$(call gb_Trace_EndRange,curl,EXTERNAL)
 
diff --git a/external/curl/UnpackedTarball_curl.mk 
b/external/curl/UnpackedTarball_curl.mk
index 642dd3113730..f1244d0fd989 100644
--- a/external/curl/UnpackedTarball_curl.mk
+++ b/external/curl/UnpackedTarball_curl.mk
@@ -21,6 +21,7 @@ $(eval $(call gb_UnpackedTarball_fix_end_of_line,curl,\
 
 $(eval $(call gb_UnpackedTarball_add_patches,curl,\
external/curl/curl-msvc.patch.1 \
+   external/curl/curl-msvc-zlib.patch.1 \
external/curl/curl-msvc-disable-protocols.patch.1 \
external/curl/curl-7.26.0_win-proxy.patch \
external/curl/zlib.patch.0 \
diff --git a/external/curl/curl-msvc-zlib.patch.1 
b/external/curl/curl-msvc-zlib.patch.1
new file mode 100644
index ..654303c21874
--- /dev/null
+++ b/external/curl/curl-msvc-zlib.patch.1
@@ -0,0 +1,16 @@
+find internal zlib in nmake buildsystem
+
+--- curl/winbuild/MakefileBuild.vc.orig2   2021-10-27 20:44:48.685237000 
+0200
 curl/winbuild/MakefileBuild.vc 2021-10-27 20:47:23.792407400 +0200
+@@ -222,8 +222,9 @@
+ ZLIB_LIB_DIR = $(ZLIB_PATH)\lib
+ ZLIB_LFLAGS  = $(ZLIB_LFLAGS) "/LIBPATH:$(ZLIB_LIB_DIR)"
+ !ELSE
+-ZLIB_INC_DIR = $(DEVEL_INCLUDE)
+-ZLIB_LIB_DIR = $(DEVEL_LIB)
++ZLIB_INC_DIR = $(WORKDIR)/UnpackedTarball/zlib
++ZLIB_LIB_DIR = $(WORKDIR)/LinkTarget/StaticLibrary
++ZLIB_LFLAGS  = $(ZLIB_LFLAGS) "/LIBPATH:$(ZLIB_LIB_DIR)"
+ !ENDIF
+ 
+ # Depending on how zlib is built the libraries have different names, we


[Libreoffice-commits] core.git: ucb/source

2021-11-01 Thread Michael Stahl (via logerrit)
 ucb/source/ucp/webdav-curl/CurlSession.cxx   |   25 +--
 ucb/source/ucp/webdav-curl/CurlSession.hxx   |3 ++
 ucb/source/ucp/webdav-curl/DAVResourceAccess.cxx |   14 +---
 ucb/source/ucp/webdav-curl/DAVResourceAccess.hxx |2 -
 ucb/source/ucp/webdav-curl/webdavcontent.cxx |2 -
 5 files changed, 34 insertions(+), 12 deletions(-)

New commits:
commit 5d845fd02700c43352740cc9e675c91a6876e7d9
Author: Michael Stahl 
AuthorDate: Tue Oct 26 13:52:29 2021 +0200
Commit: Michael Stahl 
CommitDate: Mon Nov 1 19:01:33 2021 +0100

ucb: webdav-curl: implement CurlSession::abort()

It looks like libcurl has an API to wake up a transfer in another
thread, but have to use curl_multi_poll() instead of curl_multi_wait()
to enable that.

Change-Id: I728416eba45eb6665b0041955cdce8bee07e845e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124220
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx 
b/ucb/source/ucp/webdav-curl/CurlSession.cxx
index 76fdbce1bac5..6fb54998c531 100644
--- a/ucb/source/ucp/webdav-curl/CurlSession.cxx
+++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx
@@ -589,11 +589,16 @@ auto CurlSession::UsesProxy() -> bool
 
 auto CurlSession::abort() -> void
 {
-// this is using synchronous libcurl apis - no way to abort?
-// might be possible with more complexity and CURLOPT_CONNECT_ONLY
-// or curl_multi API, but is it worth the complexity?
-// ... it looks like CURLOPT_CONNECT_ONLY would disable all HTTP handling.
-// abort() was a no-op since OOo 3.2 and before that it crashed.
+// note: abort() was a no-op since OOo 3.2 and before that it crashed.
+bool expected(false);
+// it would be pointless to lock m_Mutex here as the other thread holds it
+if (m_AbortFlag.compare_exchange_strong(expected, true))
+{
+// This function looks safe to call without m_Mutex as long as the
+// m_pCurlMulti handle is not destroyed, and the caller must own a ref
+// to this object which keeps it alive; it should cause poll to return.
+curl_multi_wakeup(m_pCurlMulti.get());
+}
 }
 
 /// this is just a bunch of static member functions called from CurlSession
@@ -663,6 +668,10 @@ auto CurlProcessor::ProcessRequestImpl(
 ::std::pair<::std::vector const&, DAVResource&> const* const 
pRequestedHeaders)
 -> void
 {
+// Clear flag before transfer starts; only a transfer started before
+// calling abort() will be aborted, not one started later.
+rSession.m_AbortFlag.store(false);
+
 if (pEnv)
 { // add custom request headers passed by caller
 for (auto const& rHeader : pEnv->m_aRequestHeaders)
@@ -887,7 +896,7 @@ auto CurlProcessor::ProcessRequestImpl(
 break;
 }
 int nFDs;
-mc = curl_multi_wait(rSession.m_pCurlMulti.get(), nullptr, 0, 
rSession.m_nReadTimeout,
+mc = curl_multi_poll(rSession.m_pCurlMulti.get(), nullptr, 0, 
rSession.m_nReadTimeout,
  );
 if (mc != CURLM_OK)
 {
@@ -897,6 +906,10 @@ auto CurlProcessor::ProcessRequestImpl(
 DAVException::DAV_HTTP_CONNECT,
 ConnectionEndPointString(rSession.m_URI.GetHost(), 
rSession.m_URI.GetPort()));
 }
+if (rSession.m_AbortFlag.load())
+{ // flag was set by abort() -> not sure what exception to throw?
+throw DAVException(DAVException::DAV_HTTP_ERROR, "abort() was 
called", 0);
+}
 } while (nRunning != 0);
 // there should be exactly 1 CURLMsg now, but the interface is
 // extensible so future libcurl versions could yield additional things
diff --git a/ucb/source/ucp/webdav-curl/CurlSession.hxx 
b/ucb/source/ucp/webdav-curl/CurlSession.hxx
index 67e4e3616aab..73b32096f6ea 100644
--- a/ucb/source/ucp/webdav-curl/CurlSession.hxx
+++ b/ucb/source/ucp/webdav-curl/CurlSession.hxx
@@ -14,6 +14,7 @@
 
 #include 
 
+#include 
 #include 
 
 namespace http_dav_ucp
@@ -37,6 +38,8 @@ private:
 bool m_isAuthenticatedProxy = false;
 /// read timeout in milliseconds (connection timeout is stored in m_pCurl)
 int m_nReadTimeout = 0;
+/// flag to signal abort to transferring thread
+::std::atomic m_AbortFlag;
 
 /// libcurl multi handle
 ::std::unique_ptr> m_pCurlMulti;
diff --git a/ucb/source/ucp/webdav-curl/DAVResourceAccess.cxx 
b/ucb/source/ucp/webdav-curl/DAVResourceAccess.cxx
index a6bfd7d79642..248d65b8c60c 100644
--- a/ucb/source/ucp/webdav-curl/DAVResourceAccess.cxx
+++ b/ucb/source/ucp/webdav-curl/DAVResourceAccess.cxx
@@ -570,10 +570,16 @@ void DAVResourceAccess::GET(
 
 void DAVResourceAccess::abort()
 {
-// 17.11.09 (tkr): abort currently disabled caused by issue i106766
-// initialize();
-// m_xSession->abort();
-

[Libreoffice-bugs] [Bug 82744] WebDAV LOCK is released when document is saved

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=82744

--- Comment #15 from Commit Notification 
 ---
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/a1ce00dad942b459dc145d4ac5ab1d02893fff0b

ucb: webdav-curl: tdf#82744: fix WebDAV lock/unlock behaviour - part 4

It will be available in 7.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-commits] core.git: ucb/source

2021-11-01 Thread Michael Stahl (via logerrit)
 ucb/source/ucp/webdav-curl/webdavresponseparser.cxx |9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit eb7fecd8ef3c0507ac6f9f60cc25161d84349e93
Author: Michael Stahl 
AuthorDate: Mon Oct 25 17:49:40 2021 +0200
Commit: Michael Stahl 
CommitDate: Mon Nov 1 19:01:02 2021 +0100

ucb: webdav-curl: escape broken SharePoint 2016 URIs

[ reimplement commit 069aa870aadb9f9069e8715c8be30394410f0288 ]

Change-Id: I01a93e3a448e6dc921d1e0471ae01c8ac8feea11
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124218
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/ucb/source/ucp/webdav-curl/webdavresponseparser.cxx 
b/ucb/source/ucp/webdav-curl/webdavresponseparser.cxx
index 478e9090990e..9595d42a03b2 100644
--- a/ucb/source/ucp/webdav-curl/webdavresponseparser.cxx
+++ b/ucb/source/ucp/webdav-curl/webdavresponseparser.cxx
@@ -34,6 +34,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 using namespace com::sun::star;
@@ -551,7 +552,13 @@ namespace
 // href end, save it if we have whitespace
 if(whitespaceIsAvailable())
 {
-maHref = mpContext->getWhiteSpace();
+// Sharepoint 2016 workaround: apparently
+// the result is an IRI (RFC 3987 
possibly?)
+// so try to encode the non-ASCII chars
+// without changing anything else
+maHref = 
::rtl::Uri::encode(mpContext->getWhiteSpace(),
+rtl_UriCharClassUric, 
rtl_UriEncodeKeepEscapes,
+RTL_TEXTENCODING_UTF8);
 }
 break;
 }


[Libreoffice-commits] core.git: ucb/source

2021-11-01 Thread Michael Stahl (via logerrit)
 ucb/source/ucp/webdav-curl/CurlSession.cxx |   11 +--
 1 file changed, 9 insertions(+), 2 deletions(-)

New commits:
commit a1ce00dad942b459dc145d4ac5ab1d02893fff0b
Author: Michael Stahl 
AuthorDate: Mon Oct 25 17:45:41 2021 +0200
Commit: Michael Stahl 
CommitDate: Mon Nov 1 19:00:44 2021 +0100

ucb: webdav-curl: tdf#82744: fix WebDAV lock/unlock behaviour - part 4

[ reimplement Sharepoint 2013 workaround from commit
  fed2984281a85a5a2f308841ec810f218c75f2ab ]

Change-Id: Ib7f5a66e32d630e900f5f77c882ba791a9ab7aac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124217
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx 
b/ucb/source/ucp/webdav-curl/CurlSession.cxx
index 35e70b6d4908..76fdbce1bac5 100644
--- a/ucb/source/ucp/webdav-curl/CurlSession.cxx
+++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx
@@ -1689,8 +1689,15 @@ auto CurlSession::PUT(OUString const& rURIReference,
 OUString const token(g_Init.LockStore.getLockToken(uri.GetURI()));
 if (!token.isEmpty())
 {
-OString const utf8If("If: <" + OUStringToOString(rURIReference, 
RTL_TEXTENCODING_ASCII_US)
- + "> (<" + OUStringToOString(token, 
RTL_TEXTENCODING_ASCII_US) + ">)");
+OString const utf8If("If: "
+// disabled as Sharepoint 2013 workaround, it accepts only
+// "No-Tag-List", see fed2984281a85a5a2f308841ec810f218c75f2ab
+#if 0
+"<" + OUStringToOString(rURIReference, 
RTL_TEXTENCODING_ASCII_US)
+ + "> "
+#endif
+ "(<"
+ + OUStringToOString(token, 
RTL_TEXTENCODING_ASCII_US) + ">)");
 pList.reset(curl_slist_append(pList.release(), utf8If.getStr()));
 if (!pList)
 {


[Libreoffice-commits] core.git: ucb/source

2021-11-01 Thread Michael Stahl (via logerrit)
 ucb/source/ucp/webdav-curl/CurlSession.cxx |   84 +++--
 ucb/source/ucp/webdav-curl/CurlSession.hxx |4 +
 2 files changed, 84 insertions(+), 4 deletions(-)

New commits:
commit ebe2050da7f04e0e4b3c7d27ec25379604fc86da
Author: Michael Stahl 
AuthorDate: Tue Oct 26 12:18:11 2021 +0200
Commit: Michael Stahl 
CommitDate: Mon Nov 1 18:59:48 2021 +0100

ucb: webdav-curl: use curl_multi API to support read timeout

This enables passing timeout to the curl_multi_wait() function.

Change-Id: Ic0ab9afe955b3625be0a44304c69882eb896abf0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124219
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx 
b/ucb/source/ucp/webdav-curl/CurlSession.cxx
index 4c42985190ff..35e70b6d4908 100644
--- a/ucb/source/ucp/webdav-curl/CurlSession.cxx
+++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx
@@ -137,6 +137,11 @@ static auto GetErrorString(CURLcode const rc, char const* 
const pErrorBuffer = n
 return OString::Concat("(") + OString::number(sal_Int32(rc)) + ") " + 
pMessage;
 }
 
+static auto GetErrorStringMulti(CURLMcode const mc) -> OString
+{
+return OString::Concat("(") + OString::number(sal_Int32(mc)) + ") " + 
curl_multi_strerror(mc);
+}
+
 // libcurl callbacks:
 
 #if OSL_DEBUG_LEVEL > 0
@@ -445,6 +450,13 @@ 
CurlSession::CurlSession(uno::Reference const& xContext,
 , m_Proxy(rProxyDecider.getProxy(m_URI.GetScheme(), m_URI.GetHost(), 
m_URI.GetPort()))
 {
 assert(m_URI.GetScheme() == "http" || m_URI.GetScheme() == "https");
+m_pCurlMulti.reset(curl_multi_init());
+if (!m_pCurlMulti)
+{
+SAL_WARN("ucb.ucp.webdav.curl", "curl_multi_init failed");
+throw DAVException(DAVException::DAV_SESSION_CREATE,
+   ConnectionEndPointString(m_URI.GetHost(), 
m_URI.GetPort()));
+}
 m_pCurl.reset(curl_easy_init());
 if (!m_pCurl)
 {
@@ -504,10 +516,8 @@ 
CurlSession::CurlSession(uno::Reference const& xContext,
 throw DAVException(DAVException::DAV_SESSION_CREATE,
ConnectionEndPointString(m_URI.GetHost(), 
m_URI.GetPort()));
 }
-#if 0
 auto const 
readTimeout(officecfg::Inet::Settings::ReadTimeout::get(m_xContext));
-// TODO: read timeout??? does not map to this value?
-#endif
+m_nReadTimeout = ::std::max(20, ::std::min(readTimeout, 180)) * 
1000;
 // default is infinite
 rc = curl_easy_setopt(m_pCurl.get(), CURLOPT_TIMEOUT, 300L);
 if (rc != CURLE_OK)
@@ -837,8 +847,74 @@ auto CurlProcessor::ProcessRequestImpl(
 assert(rc == CURLE_OK);
 }
 rSession.m_ErrorBuffer[0] = '\0';
+
+// note: easy handle must be added for *every* transfer!
+// otherwise it gets stuck in MSTATE_MSGSENT forever after 1st transfer
+auto mc = curl_multi_add_handle(rSession.m_pCurlMulti.get(), 
rSession.m_pCurl.get());
+if (mc != CURLM_OK)
+{
+SAL_WARN("ucb.ucp.webdav.curl",
+ "curl_multi_add_handle failed: " << 
GetErrorStringMulti(mc));
+throw DAVException(
+DAVException::DAV_SESSION_CREATE,
+ConnectionEndPointString(rSession.m_URI.GetHost(), 
rSession.m_URI.GetPort()));
+}
+::comphelper::ScopeGuard const gg([&]() {
+mc = curl_multi_remove_handle(rSession.m_pCurlMulti.get(), 
rSession.m_pCurl.get());
+if (mc != CURLM_OK)
+{
+SAL_WARN("ucb.ucp.webdav.curl",
+ "curl_multi_remove_handle failed: " << 
GetErrorStringMulti(mc));
+}
+});
+
 // this is where libcurl actually does something
-rc = curl_easy_perform(rSession.m_pCurl.get());
+rc = CURL_LAST; // clear current value
+int nRunning;
+do
+{
+mc = curl_multi_perform(rSession.m_pCurlMulti.get(), );
+if (mc != CURLM_OK)
+{
+SAL_WARN("ucb.ucp.webdav.curl",
+ "curl_multi_perform failed: " << 
GetErrorStringMulti(mc));
+throw DAVException(
+DAVException::DAV_HTTP_CONNECT,
+ConnectionEndPointString(rSession.m_URI.GetHost(), 
rSession.m_URI.GetPort()));
+}
+if (nRunning == 0)
+{ // short request like HEAD on loopback could be done in first 
call
+break;
+}
+int nFDs;
+mc = curl_multi_wait(rSession.m_pCurlMulti.get(), nullptr, 0, 
rSession.m_nReadTimeout,
+ );
+if (mc != CURLM_OK)
+{
+SAL_WARN("ucb.ucp.webdav.curl",
+ "curl_multi_poll failed: " << 
GetErrorStringMulti(mc));
+throw DAVException(
+DAVException::DAV_HTTP_CONNECT,
+

[Libreoffice-commits] core.git: ucb/source

2021-11-01 Thread Michael Stahl (via logerrit)
 ucb/source/ucp/webdav-curl/CurlSession.cxx   |   17 -
 ucb/source/ucp/webdav-curl/CurlSession.hxx   |4 ++--
 ucb/source/ucp/webdav-curl/SerfLockStore.cxx |   19 +--
 3 files changed, 35 insertions(+), 5 deletions(-)

New commits:
commit 791f94a967560fb36cce06e673b115f3ffc707ae
Author: Michael Stahl 
AuthorDate: Mon Oct 25 15:26:55 2021 +0200
Commit: Michael Stahl 
CommitDate: Mon Nov 1 18:59:12 2021 +0100

ucb: webdav-curl: remove locks from LockStore after AUTH error

[ reimplement commit 94e4695bcfcb9356d37942c47359b94531ef7b95 ]

Change-Id: I15d1a95074dcad3f2c642bb0819741a2b0f734c7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124216
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx 
b/ucb/source/ucp/webdav-curl/CurlSession.cxx
index 3fe73b57f873..4c42985190ff 100644
--- a/ucb/source/ucp/webdav-curl/CurlSession.cxx
+++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx
@@ -2064,7 +2064,8 @@ auto CurlSession::UNLOCK(OUString const& rURIReference, 
DAVRequestEnvironment co
 }
 
 auto CurlSession::NonInteractive_LOCK(OUString const& rURI,
-  sal_Int32& 
o_rLastChanceToSendRefreshRequest) -> bool
+  sal_Int32& 
o_rLastChanceToSendRefreshRequest,
+  bool& o_rIsAuthFailed) -> bool
 {
 SAL_INFO("ucb.ucp.webdav.curl", "NonInteractive_LOCK: " << rURI);
 
@@ -2097,6 +2098,20 @@ auto CurlSession::NonInteractive_LOCK(OUString const& 
rURI,
 SAL_INFO("ucb.ucp.webdav.curl", "NonInteractive_LOCK succeeded on " << 
rURI);
 return true;
 }
+catch (DAVException const& rException)
+{
+SAL_INFO("ucb.ucp.webdav.curl", "NonInteractive_LOCK failed on " << 
rURI);
+switch (rException.getError())
+{
+case DAVException::DAV_HTTP_AUTH:
+case DAVException::DAV_HTTP_NOAUTH:
+o_rIsAuthFailed = true;
+break;
+default:
+break;
+}
+return false;
+}
 catch (...)
 {
 SAL_INFO("ucb.ucp.webdav.curl", "NonInteractive_LOCK failed on " << 
rURI);
diff --git a/ucb/source/ucp/webdav-curl/CurlSession.hxx 
b/ucb/source/ucp/webdav-curl/CurlSession.hxx
index 88496308a947..33288b312051 100644
--- a/ucb/source/ucp/webdav-curl/CurlSession.hxx
+++ b/ucb/source/ucp/webdav-curl/CurlSession.hxx
@@ -127,8 +127,8 @@ public:
 
 virtual auto abort() -> void override;
 
-auto NonInteractive_LOCK(OUString const& rURI, sal_Int32& 
o_rLastChanceToSendRefreshRequest)
--> bool;
+auto NonInteractive_LOCK(OUString const& rURI, sal_Int32& 
o_rLastChanceToSendRefreshRequest,
+ bool& o_rIsAuthFailed) -> bool;
 auto NonInteractive_UNLOCK(OUString const& rURI) -> void;
 };
 
diff --git a/ucb/source/ucp/webdav-curl/SerfLockStore.cxx 
b/ucb/source/ucp/webdav-curl/SerfLockStore.cxx
index 93cca865eb1b..ef9534dbe58f 100644
--- a/ucb/source/ucp/webdav-curl/SerfLockStore.cxx
+++ b/ucb/source/ucp/webdav-curl/SerfLockStore.cxx
@@ -135,8 +135,10 @@ void SerfLockStore::stopTicker(osl::ClearableMutexGuard & 
rGuard)
 
 rGuard.clear();
 
-if (pTickerThread.is())
+if (pTickerThread.is() && pTickerThread->getIdentifier() != 
osl::Thread::getCurrentIdentifier())
+{
 pTickerThread->join(); // without m_aMutex locked (to prevent deadlock)
+}
 }
 
 OUString SerfLockStore::getLockToken(const OUString& rURI)
@@ -238,6 +240,8 @@ void SerfLockStore::refreshLocks()
 {
 osl::MutexGuard aGuard( m_aMutex );
 
+::std::vector authFailedLocks;
+
 for ( auto& rLockInfo : m_aLockInfoMap )
 {
 LockInfo & rInfo = rLockInfo.second;
@@ -251,20 +255,31 @@ void SerfLockStore::refreshLocks()
 {
 // refresh the lock.
 sal_Int32 nlastChanceToSendRefreshRequest = -1;
+bool isAuthFailed(false);
 if (rInfo.m_xSession->NonInteractive_LOCK(
- rLockInfo.first, nlastChanceToSendRefreshRequest))
+ rLockInfo.first, nlastChanceToSendRefreshRequest,
+ isAuthFailed))
 {
 rInfo.m_nLastChanceToSendRefreshRequest
 = nlastChanceToSendRefreshRequest;
 }
 else
 {
+if (isAuthFailed)
+{
+authFailedLocks.push_back(rLockInfo.first);
+}
 // refresh failed. stop auto-refresh.
 rInfo.m_nLastChanceToSendRefreshRequest = -1;
 }
 }
 }
 }
+
+for (auto const& rLock : authFailedLocks)
+{
+removeLock(rLock);
+}
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


[Libreoffice-commits] core.git: ucb/source

2021-11-01 Thread Michael Stahl (via logerrit)
 ucb/source/ucp/webdav-curl/CurlSession.cxx |   16 
 1 file changed, 16 insertions(+)

New commits:
commit 7cd5647b9d02be7527f78a08d49c742be4c34c34
Author: Michael Stahl 
AuthorDate: Thu Oct 28 12:49:41 2021 +0200
Commit: Michael Stahl 
CommitDate: Mon Nov 1 18:57:58 2021 +0100

ucb: webdav-curl: convert hrefs in PROPFIND response to URI

curl_url_set(..., CURLUPART_URL, ...) doesn't work with relative URLs
that are absolute paths.

Change-Id: Ic67c99262fe5b399511f7a2e7b8592d7e065b2c3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124451
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx 
b/ucb/source/ucp/webdav-curl/CurlSession.cxx
index e5dcd1a2ea3c..3fe73b57f873 100644
--- a/ucb/source/ucp/webdav-curl/CurlSession.cxx
+++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx
@@ -1312,6 +1312,22 @@ auto CurlProcessor::PropFind(
 {
 *::std::get<1>(*o_pRequestedProperties)
 = parseWebDAVPropFindResponse(xResponseInStream);
+for (DAVResource& it : *::std::get<1>(*o_pRequestedProperties))
+{
+// caller will give these uris to CurlUri so can't be relative
+if (it.uri.startsWith("/"))
+{
+try
+{
+it.uri = 
rSession.m_URI.CloneWithRelativeRefPathAbsolute(it.uri).GetURI();
+}
+catch (DAVException const&)
+{
+SAL_INFO("ucb.ucp.webdav.curl",
+ "PROPFIND: exception parsing uri " << it.uri);
+}
+}
+}
 }
 else
 {


[Libreoffice-bugs] [Bug 145128] Setting the "PerformFileCheckExt" setting via the Windows Registry does not work correctly: Final is not applied

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145128

Gabor Kelemen (allotropia)  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-commits] core.git: ucb/source

2021-11-01 Thread Michael Stahl (via logerrit)
 ucb/source/ucp/webdav-curl/CurlSession.cxx  |   18 
 ucb/source/ucp/webdav-curl/UCBDeadPropertyValue.cxx |  403 ++--
 ucb/source/ucp/webdav-curl/UCBDeadPropertyValue.hxx |   12 
 ucb/source/ucp/webdav-curl/webdavresponseparser.cxx |   50 ++
 4 files changed, 126 insertions(+), 357 deletions(-)

New commits:
commit 68627126454762ddfb4605c0e58c634b54937ad0
Author: Michael Stahl 
AuthorDate: Fri Oct 22 20:52:48 2021 +0200
Commit: Michael Stahl 
CommitDate: Mon Nov 1 18:57:19 2021 +0100

ucb: webdav-curl: implement dead properties in PROPFIND/PROPPATCH

And delete a bunch of ghastly code.

Change-Id: I1a01bfda5f86202d537f87b97d83cc5c0a65ed0b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124079
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx 
b/ucb/source/ucp/webdav-curl/CurlSession.cxx
index 7c5bd5fe5973..e5dcd1a2ea3c 100644
--- a/ucb/source/ucp/webdav-curl/CurlSession.cxx
+++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx
@@ -11,6 +11,7 @@
 
 #include "SerfLockStore.hxx"
 #include "DAVProperties.hxx"
+#include "UCBDeadPropertyValue.hxx"
 #include "webdavresponseparser.hxx"
 
 #include 
@@ -1354,9 +1355,6 @@ auto CurlSession::PROPPATCH(OUString const& rURIReference,
 
 CurlUri const uri(CurlProcessor::URIReferenceToURI(*this, rURIReference));
 
-//FIXME why does toXML encode stuff which parser ignores
-//isUCBDeadProperty case not handled
-
 // TODO: either set CURLOPT_INFILESIZE_LARGE or chunked?
 ::std::unique_ptr> pList(
 curl_slist_append(nullptr, "Transfer-Encoding: chunked"));
@@ -1411,7 +1409,19 @@ auto CurlSession::PROPPATCH(OUString const& 
rURIReference,
 {
 if (DAVProperties::isUCBDeadProperty(name))
 {
-// TODO don't use UCBDeadPropertyValue::toXml, it's crazy
+::std::optional<::std::pair> const oProp(
+UCBDeadPropertyValue::toXML(rPropValue.value));
+if (oProp)
+{
+xWriter->startElement("ucbprop", nullptr);
+xWriter->startElement("type", nullptr);
+xWriter->characters(oProp->first);
+xWriter->endElement("type");
+xWriter->startElement("value", nullptr);
+xWriter->characters(oProp->second);
+xWriter->endElement("value");
+xWriter->endElement("ucbprop");
+}
 }
 else
 {
diff --git a/ucb/source/ucp/webdav-curl/UCBDeadPropertyValue.cxx 
b/ucb/source/ucp/webdav-curl/UCBDeadPropertyValue.cxx
index 987662313cfd..4f3460a26785 100644
--- a/ucb/source/ucp/webdav-curl/UCBDeadPropertyValue.cxx
+++ b/ucb/source/ucp/webdav-curl/UCBDeadPropertyValue.cxx
@@ -36,267 +36,6 @@ constexpr OUStringLiteral aTypeHyper = u"hyper";
 constexpr OUStringLiteral aTypeFloat = u"float";
 constexpr OUStringLiteral aTypeDouble = u"double";
 
-// static
-constexpr OUStringLiteral aXMLPre = u"";
-constexpr OUStringLiteral aXMLMid = u"";
-constexpr OUStringLiteral aXMLEnd = u"";
-
-/*
-
-#define STATE_TOP (1)
-
-#define STATE_UCBPROP   (STATE_TOP)
-#define STATE_TYPE  (STATE_TOP + 1)
-#define STATE_VALUE (STATE_TOP + 2)
-
-extern "C" int UCBDeadPropertyValue_startelement_callback(
-void *,
-int parent,
-const char * nspace,
-const char *name,
-const char ** )
-{
-if ( name != 0 )
-{
-switch ( parent )
-{
-case NE_XML_STATEROOT:
-if ( strcmp( name, "ucbprop" ) == 0 )
-return STATE_UCBPROP;
-break;
-
-case STATE_UCBPROP:
-if ( strcmp( name, "type" ) == 0 )
-return STATE_TYPE;
-else if ( strcmp( name, "value" ) == 0 )
-return STATE_VALUE;
-break;
-}
-}
-return NE_XML_DECLINE;
-}
-
-
-extern "C" int UCBDeadPropertyValue_chardata_callback(
-void *userdata,
-int state,
-const char *buf,
-size_t len )
-{
-UCBDeadPropertyValueParseContext * pCtx
-= static_cast< UCBDeadPropertyValueParseContext * >( userdata );
-
-switch ( state )
-{
-case STATE_TYPE:
-SAL_WARN_IF( pCtx->pType, "ucb.ucp.webdav",
-"UCBDeadPropertyValue_endelement_callback - "
-"Type already set!" );
-pCtx->pType
-= new OUString( buf, len, RTL_TEXTENCODING_ASCII_US );
-break;
-
-case STATE_VALUE:
-SAL_WARN_IF( pCtx->pValue, "ucb.ucp.webdav",
-"UCBDeadPropertyValue_endelement_callback - "
-"Value already set!" );
-pCtx->pValue
-= new OUString( buf, len, RTL_TEXTENCODING_ASCII_US );
-break;
-}
-return 0; // zero 

[Libreoffice-commits] core.git: ucb/source

2021-11-01 Thread Michael Stahl (via logerrit)
 ucb/source/ucp/webdav-curl/CurlUri.cxx|   21 ++---
 ucb/source/ucp/webdav-curl/CurlUri.hxx|3 ++-
 ucb/source/ucp/webdav-curl/DAVResourceAccess.cxx  |2 +-
 ucb/source/ucp/webdav-curl/webdavcontent.cxx  |6 +++---
 ucb/source/ucp/webdav-curl/webdavdatasupplier.cxx |2 +-
 5 files changed, 13 insertions(+), 21 deletions(-)

New commits:
commit 7110271f6a47dd19648864ad9e83e87a90f2d4fd
Author: Michael Stahl 
AuthorDate: Fri Oct 22 19:34:55 2021 +0200
Commit: Michael Stahl 
CommitDate: Mon Nov 1 18:56:29 2021 +0100

ucb: webdav-curl: clean up CurlUri m_Path mess

Fix the confused nonsense and add GetRelativeReference() for the cases
where the path+query+fragment is needed.

Change-Id: I663d20a686dcc787171ae7702d2a64451fa53807
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124078
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/ucb/source/ucp/webdav-curl/CurlUri.cxx 
b/ucb/source/ucp/webdav-curl/CurlUri.cxx
index 1c596dfcd299..44bbd806f267 100644
--- a/ucb/source/ucp/webdav-curl/CurlUri.cxx
+++ b/ucb/source/ucp/webdav-curl/CurlUri.cxx
@@ -89,16 +89,16 @@ void CurlUri::Init()
 assert(oPath);
 m_Path = *oPath;
 
-// TODO: why put this in *path* ? because before 2007, ne_uri path 
contained query/fragment as well :-/
+// note: this used to be added to m_Path because before 2007, ne_uri path 
contained query/fragment as well :-/
 auto const oQuery(GetURLComponent(*m_pUrl, CURLUPART_QUERY, 
CURLUE_NO_QUERY));
 if (oQuery)
 {
-m_Path += *oQuery;
+m_QueryAndFragment += *oQuery;
 }
 auto const oFragment(GetURLComponent(*m_pUrl, CURLUPART_FRAGMENT, 
CURLUE_NO_FRAGMENT));
 if (oFragment)
 {
-m_Path += *oFragment;
+m_QueryAndFragment += *oFragment;
 }
 }
 
@@ -146,6 +146,7 @@ CurlUri::CurlUri(CurlUri const& rOther)
 , m_Host(rOther.m_Host)
 , m_nPort(rOther.m_nPort)
 , m_Path(rOther.m_Path)
+, m_QueryAndFragment(rOther.m_QueryAndFragment)
 {
 assert(rOther.m_pUrl);
 if (!m_pUrl)
@@ -169,6 +170,7 @@ void CurlUri::operator=(CurlUri const& rOther)
 m_Host = rOther.m_Host;
 m_nPort = rOther.m_nPort;
 m_Path = rOther.m_Path;
+m_QueryAndFragment = rOther.m_QueryAndFragment;
 }
 
 bool CurlUri::operator==(CurlUri const& rOther) const { return m_URI == 
rOther.m_URI; }
@@ -187,17 +189,7 @@ OUString CurlUri::GetPathBaseName() const
 {
 return "/";
 }
-OUString aTemp(m_Path.copy(nPos + 1, m_Path.getLength() - nPos - 1 - 
nTrail));
-
-// query, fragment present?
-nPos = aTemp.indexOf('?');
-if (nPos == -1)
-nPos = aTemp.indexOf('#');
-
-if (nPos != -1)
-aTemp = aTemp.copy(0, nPos);
-
-return aTemp;
+return m_Path.copy(nPos + 1, m_Path.getLength() - nPos - 1 - nTrail);
 }
 
 OUString CurlUri::GetPathBaseNameUnescaped() const { return 
DecodeURI(GetPathBaseName()); }
@@ -224,7 +216,6 @@ void CurlUri::SetScheme(::std::u16string_view const rScheme)
 void CurlUri::AppendPath(::std::u16string_view const rPath)
 {
 OUStringBuffer path(m_Path);
-// FIXME: it is utter nonsense that m_Path contains query/fragment
 if (path.lastIndexOf('/') != path.getLength() - 1)
 {
 path.append("/");
diff --git a/ucb/source/ucp/webdav-curl/CurlUri.hxx 
b/ucb/source/ucp/webdav-curl/CurlUri.hxx
index 4071991c904e..2c7980176718 100644
--- a/ucb/source/ucp/webdav-curl/CurlUri.hxx
+++ b/ucb/source/ucp/webdav-curl/CurlUri.hxx
@@ -44,8 +44,8 @@ private:
 OUString m_Password;
 OUString m_Host;
 sal_uInt16 m_nPort = 0;
-/// FIXME very misleading
 OUString m_Path;
+OUString m_QueryAndFragment;
 
 void Init();
 
@@ -67,6 +67,7 @@ public:
 OUString const& GetHost() const { return m_Host; }
 sal_uInt16 GetPort() const { return m_nPort; }
 OUString const& GetPath() const { return m_Path; }
+OUString GetRelativeReference() const { return m_Path + 
m_QueryAndFragment; }
 
 OUString GetPathBaseName() const;
 
diff --git a/ucb/source/ucp/webdav-curl/DAVResourceAccess.cxx 
b/ucb/source/ucp/webdav-curl/DAVResourceAccess.cxx
index 291f0d580b8d..a6bfd7d79642 100644
--- a/ucb/source/ucp/webdav-curl/DAVResourceAccess.cxx
+++ b/ucb/source/ucp/webdav-curl/DAVResourceAccess.cxx
@@ -1022,7 +1022,7 @@ void DAVResourceAccess::initialize()
 if ( m_aPath.isEmpty() )
 {
 CurlUri const aURI( m_aURL );
-OUString aPath( aURI.GetPath() );
+OUString aPath( aURI.GetRelativeReference() );
 
 /* #134089# - Check URI */
 if ( aPath.isEmpty() )
diff --git a/ucb/source/ucp/webdav-curl/webdavcontent.cxx 
b/ucb/source/ucp/webdav-curl/webdavcontent.cxx
index 1fadd4560331..dc9b373ed5b1 100644
--- a/ucb/source/ucp/webdav-curl/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-curl/webdavcontent.cxx
@@ -2061,7 +2061,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
 

[Libreoffice-commits] core.git: ucb/source

2021-11-01 Thread Michael Stahl (via logerrit)
 ucb/source/ucp/webdav-curl/CurlSession.cxx   |  248 +++
 ucb/source/ucp/webdav-curl/CurlSession.hxx   |6 
 ucb/source/ucp/webdav-curl/CurlUri.cxx   |   41 
 ucb/source/ucp/webdav-curl/CurlUri.hxx   |5 
 ucb/source/ucp/webdav-curl/SerfLockStore.cxx |   22 +-
 ucb/source/ucp/webdav-curl/SerfLockStore.hxx |6 
 6 files changed, 207 insertions(+), 121 deletions(-)

New commits:
commit cd3daf7f6e7842e96f60a85cb791b18bfcc0d7b3
Author: Michael Stahl 
AuthorDate: Fri Oct 22 17:09:30 2021 +0200
Commit: Michael Stahl 
CommitDate: Mon Nov 1 18:56:07 2021 +0100

ucb: webdav-curl: convert URI reference to URI as early as possible

Ensure that LockStore uses the full URL as key, not just the path.

Change-Id: I84caf0d22e8c0ba176c19d004ee8ffcd2fdd05c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124077
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx 
b/ucb/source/ucp/webdav-curl/CurlSession.cxx
index b0c1c4c7e2ac..7c5bd5fe5973 100644
--- a/ucb/source/ucp/webdav-curl/CurlSession.cxx
+++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx
@@ -588,16 +588,17 @@ auto CurlSession::abort() -> void
 /// this is just a bunch of static member functions called from CurlSession
 struct CurlProcessor
 {
+static auto URIReferenceToURI(CurlSession& rSession, OUString const& 
rURIReference) -> CurlUri;
+
 static auto ProcessRequestImpl(
-CurlSession& rSession, ::std::u16string_view rURIReference,
-DAVRequestEnvironment const* pEnv,
+CurlSession& rSession, CurlUri const& rURI, DAVRequestEnvironment 
const* pEnv,
 ::std::unique_ptr> 
pRequestHeaderList,
 uno::Reference const* pxOutStream,
 uno::Reference const* pxInStream,
 ::std::pair<::std::vector const&, DAVResource&> const* 
pRequestedHeaders) -> void;
 
 static auto ProcessRequest(
-Guard& rGuard, CurlSession& rSession, OUString const& rURIReference,
+Guard& rGuard, CurlSession& rSession, CurlUri const& rURI,
 DAVRequestEnvironment const* pEnv,
 ::std::unique_ptr> 
pRequestHeaderList,
 uno::Reference const* pxOutStream,
@@ -605,7 +606,7 @@ struct CurlProcessor
 ::std::pair<::std::vector const&, DAVResource&> const* 
pRequestedHeaders) -> void;
 
 static auto
-PropFind(CurlSession& rSession, OUString const& rURIReference, Depth depth,
+PropFind(CurlSession& rSession, CurlUri const& rURI, Depth depth,
  ::std::tuple<::std::vector const&, 
::std::vector* const,
   ::std::vector* const> const* 
o_pRequestedProperties,
  ::std::vector* const o_pResourceInfos,
@@ -616,19 +617,35 @@ struct CurlProcessor
bool isOverwrite, char const* pMethod) -> void;
 
 static auto
-Lock(CurlSession& rSession, OUString const& rURIReference, 
DAVRequestEnvironment const* pEnv,
+Lock(CurlSession& rSession, CurlUri const& rURI, DAVRequestEnvironment 
const* pEnv,
  ::std::unique_ptr> 
pRequestHeaderList,
  uno::Reference const* pxInStream)
 -> ::std::vector<::std::pair>;
 
-static auto Unlock(CurlSession& rSession, OUString const& rURIReference,
+static auto Unlock(CurlSession& rSession, CurlUri const& rURI,
DAVRequestEnvironment const* pEnv) -> void;
 };
 
+auto CurlProcessor::URIReferenceToURI(CurlSession& rSession, OUString const& 
rURIReference)
+-> CurlUri
+{
+// No need to acquire rSession.m_Mutex because accessed members are const.
+if (rSession.UsesProxy())
+// very odd, but see DAVResourceAccess::getRequestURI() :-/
+{
+assert(rURIReference.startsWith("http://;) || 
rURIReference.startsWith("https://;));
+return CurlUri(rURIReference);
+}
+else
+{
+assert(rURIReference.startsWith("/") && 
!rURIReference.startsWith("//"));
+return rSession.m_URI.CloneWithRelativeRefPathAbsolute(rURIReference);
+}
+}
+
 /// main function to initiate libcurl requests
 auto CurlProcessor::ProcessRequestImpl(
-CurlSession& rSession, ::std::u16string_view const rURIReference,
-DAVRequestEnvironment const* const pEnv,
+CurlSession& rSession, CurlUri const& rURI, DAVRequestEnvironment const* 
const pEnv,
 ::std::unique_ptr> 
pRequestHeaderList,
 uno::Reference const* const pxOutStream,
 uno::Reference const* const pxInStream,
@@ -681,20 +698,7 @@ auto CurlProcessor::ProcessRequestImpl(
 (void)rc;
 }
 
-::std::unique_ptr> const pUrl(
-rSession.m_URI.CloneCURLU());
-OString const utf8URIRef(OUStringToOString(rURIReference, 
RTL_TEXTENCODING_UTF8));
-auto uc = curl_url_set(pUrl.get(),
-   // very odd, but see 
DAVResourceAccess::getRequestURI() :-/
-   rSession.UsesProxy() ? CURLUPART_URL : 
CURLUPART_PATH,
-   

[Libreoffice-bugs] [Bug 138691] Crash when trying to save a form using an image bigger than length of Binary fix field

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=138691

--- Comment #10 from Robert Großkopf  ---
(In reply to Julien Nabet from comment #9)
> Just thinking loudly, perhaps we should check image size just after having
> selected it?
> It's in OImageControlControl::implInsertGraphics (see
> https://opengrok.libreoffice.org/xref/core/forms/source/component/
> ImageControl.cxx?r=1875b3d9=23636=762#762)
> If the image size is > field size => error message and the action isn't done.

I would prefer this solution.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-commits] core.git: ucb/source

2021-11-01 Thread Michael Stahl (via logerrit)
 ucb/source/ucp/webdav-curl/webdavresponseparser.cxx |   21 +++-
 1 file changed, 20 insertions(+), 1 deletion(-)

New commits:
commit 3f2c3acfac2c699820f1a7e66a485ad98d5d92ab
Author: Michael Stahl 
AuthorDate: Thu Oct 21 21:08:38 2021 +0200
Commit: Michael Stahl 
CommitDate: Mon Nov 1 18:55:22 2021 +0100

ucb: webdav-curl: handle "depth" in WebDAVResponseParser

Also remove a spurious fall-through that probably doesn't matter in
practice because the "status" element follows the "prop" element that
contains "activelock" in the schema so at that time maStatus should
always be empty for a valid response.

Change-Id: If4cc8dbc75391d76ff497b83dd0f7fd00eb34a33
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124076
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/ucb/source/ucp/webdav-curl/webdavresponseparser.cxx 
b/ucb/source/ucp/webdav-curl/webdavresponseparser.cxx
index 1c24d63200a3..4b6d0f848b66 100644
--- a/ucb/source/ucp/webdav-curl/webdavresponseparser.cxx
+++ b/ucb/source/ucp/webdav-curl/webdavresponseparser.cxx
@@ -80,6 +80,7 @@ namespace
 WebDAVName_supportedlock,
 WebDAVName_lockentry,
 WebDAVName_lockscope,
+WebDAVName_depth,
 WebDAVName_locktoken,
 WebDAVName_exclusive,
 WebDAVName_locktype,
@@ -115,6 +116,7 @@ namespace
 
aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("supportedlock"), 
WebDAVName_supportedlock));
 
aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("lockentry"), 
WebDAVName_lockentry));
 
aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("lockscope"), 
WebDAVName_lockscope));
+
aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("depth"), 
WebDAVName_depth));
 
aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("locktoken"), 
WebDAVName_locktoken));
 
aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("exclusive"), 
WebDAVName_exclusive));
 
aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("locktype"), 
WebDAVName_locktype));
@@ -705,13 +707,30 @@ namespace
 }
 break;
 }
+case WebDAVName_depth:
+{
+OUString const 
chars(mpContext->getWhiteSpace());
+if (chars == "0")
+{
+maLock.Depth = ucb::LockDepth_ZERO;
+}
+else if (chars == "1")
+{
+maLock.Depth = ucb::LockDepth_ONE;
+}
+else if (chars == "infinity")
+{
+maLock.Depth = ucb::LockDepth_INFINITY;
+}
+break;
+}
 case WebDAVName_activelock:
 {
 maLock.Type = maLockType;
 maLock.Scope = maLockScope;
 maResult_Lock.push_back(maLock);
+break;
 }
-[[fallthrough]]; // I hope intentional?
 case WebDAVName_propstat:
 {
 // propstat end, check status


[Libreoffice-commits] core.git: ucb/source

2021-11-01 Thread Michael Stahl (via logerrit)
 ucb/source/ucp/webdav-curl/webdavcontent.cxx |   10 --
 1 file changed, 4 insertions(+), 6 deletions(-)

New commits:
commit f529a81a6158de68c0a244640f8ee6434e6e79a6
Author: Michael Stahl 
AuthorDate: Tue Oct 12 16:32:59 2021 +0200
Commit: Michael Stahl 
CommitDate: Mon Nov 1 18:55:02 2021 +0100

ucb: webdav-curl: Don't crash when accessing WebDAV resource after auth 
failed

[ replicate part of commit 162a472d55cf9fb9aaa6d5eae625b3da2273a516 ]

Change-Id: Ia48b95d27cc9da8688104a05a758f82415a2d2dc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123506
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/ucb/source/ucp/webdav-curl/webdavcontent.cxx 
b/ucb/source/ucp/webdav-curl/webdavcontent.cxx
index 75f9d0ca2ae9..1fadd4560331 100644
--- a/ucb/source/ucp/webdav-curl/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-curl/webdavcontent.cxx
@@ -1592,12 +1592,10 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
 
 if ( eType == DAV )
 {
-//xProps.reset(
-//new ContentProperties( aUnescapedTitle ) );
-xProps->addProperty(
-"Title",
-uno::makeAny( aUnescapedTitle ),
-true );
+if (!xProps)
+xProps.reset(new ContentProperties(aUnescapedTitle));
+else
+xProps->addProperty("Title", uno::makeAny(aUnescapedTitle), 
true);
 }
 else
 {


[Libreoffice-commits] core.git: 2 commits - ucb/source

2021-11-01 Thread Michael Stahl (via logerrit)
 ucb/source/ucp/webdav-curl/DAVTypes.hxx   |6 
 ucb/source/ucp/webdav-curl/webdavcontent.cxx  |  271 +-
 ucb/source/ucp/webdav-curl/webdavcontent.hxx  |2 
 ucb/source/ucp/webdav-curl/webdavcontentcaps.cxx  |9 
 ucb/source/ucp/webdav-curl/webdavdatasupplier.cxx |2 
 5 files changed, 177 insertions(+), 113 deletions(-)

New commits:
commit 06985b1024c2272c7bbfb26dd252a3be48e5d3d8
Author: Michael Stahl 
AuthorDate: Tue Oct 12 16:27:52 2021 +0200
Commit: Michael Stahl 
CommitDate: Mon Nov 1 18:54:24 2021 +0100

ucb: webdav-curl: loplugin:constfields in ucb

[ replicate commit d8f8b4375998b62431c8605004e7c7d5c921ccc9 ]

Change-Id: I720fdfbeab13e9dd210f11a613cb606e946d68e9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123505
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/ucb/source/ucp/webdav-curl/DAVTypes.hxx 
b/ucb/source/ucp/webdav-curl/DAVTypes.hxx
index e511bdcd31b7..ae3e5a076f60 100644
--- a/ucb/source/ucp/webdav-curl/DAVTypes.hxx
+++ b/ucb/source/ucp/webdav-curl/DAVTypes.hxx
@@ -188,9 +188,9 @@ namespace http_dav_ucp
 
 struct ProppatchValue
 {
-ProppatchOperation  operation;
-OUStringname;
-css::uno::Any   value;
+ProppatchOperation const  operation;
+OUString constname;
+css::uno::Any const   value;
 
 ProppatchValue( const ProppatchOperation o,
 const OUString & n,
diff --git a/ucb/source/ucp/webdav-curl/webdavcontent.hxx 
b/ucb/source/ucp/webdav-curl/webdavcontent.hxx
index bfc59d4646a2..43c275cd2e7f 100644
--- a/ucb/source/ucp/webdav-curl/webdavcontent.hxx
+++ b/ucb/source/ucp/webdav-curl/webdavcontent.hxx
@@ -82,7 +82,7 @@ class Content : public ::ucbhelper::ContentImplHelper,
 ResourceType  m_eResourceTypeForLocks;
 ContentProvider*  m_pProvider; // No need for a ref, base class holds 
object
 bool  m_bTransient;
-bool  m_bCollection;
+bool constm_bCollection;
 bool  m_bDidGetOrHead;
 std::vector< OUString > m_aFailedPropNames;
 // Options Cache lifetime
diff --git a/ucb/source/ucp/webdav-curl/webdavdatasupplier.cxx 
b/ucb/source/ucp/webdav-curl/webdavdatasupplier.cxx
index b7dfb86d167c..d7213a0d13ee 100644
--- a/ucb/source/ucp/webdav-curl/webdavdatasupplier.cxx
+++ b/ucb/source/ucp/webdav-curl/webdavdatasupplier.cxx
@@ -104,7 +104,7 @@ struct DataSupplier_Impl
 ResultList   m_Results;
 rtl::Reference< Content >m_xContent;
 uno::Reference< uno::XComponentContext > m_xContext;
-sal_Int32m_nOpenMode;
+sal_Int32 const  m_nOpenMode;
 bool m_bCountFinal;
 bool m_bThrowException;
 
commit cf64fe2d02dcb7f3126026dc1face21ce3562392
Author: Mike Kaganski 
AuthorDate: Tue Apr 4 18:42:51 2017 +0300
Commit: Michael Stahl 
CommitDate: Mon Nov 1 18:54:07 2021 +0100

ucb: webdav-curl: tdf#106955: Open WebDAV resources on which PROPFIND fails

When PROPFIND fails on a WebDAV resource, its IsDocument property
stays undefined, and so stream creation fails. Proposed solution
is to default to IsDocument=true for all WebDAV documents where
we cannot get the property from server.

Such resources also fail to return their locking options, so
defaulting to server properties. When later locking is attempted
on it, the attempt fails with user notification (a dialog saying
that getting information from server failed). Proposed solution
is to check Content-Disposition header in such resources, and in
case it's attachment, disable lock on this resource. The rationale
for this is that "In a regular HTTP response, the Content-Disposition
response header is a header indicating if the content is expected
to be displayed ... as an attachment, that is downloaded and saved
locally" (see MDN:
https://developer.mozilla.org/en/docs/Web/HTTP/Headers/Content-Disposition

Also, Content::getProperties wasn't ready for PROPFIND returning
empty result.

[ port of commit fbc04c97231d629c1b5e9e57203dbe8d8eb06714 ]

Change-Id: If0b4c10ef7b7b108a8779c773c65e25973d32b46
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123504
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/ucb/source/ucp/webdav-curl/webdavcontent.cxx 
b/ucb/source/ucp/webdav-curl/webdavcontent.cxx
index 974867e78685..75f9d0ca2ae9 100644
--- a/ucb/source/ucp/webdav-curl/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-curl/webdavcontent.cxx
@@ -1260,6 +1260,45 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
 return uno::Reference(xRow);
 }
 
+namespace {
+void GetPropsUsingHeadRequest(DAVResource& 

[Libreoffice-commits] core.git: ucb/source

2021-11-01 Thread Stephan Bergmann (via logerrit)
 ucb/source/ucp/webdav-curl/DAVTypes.hxx |   26 +-
 1 file changed, 13 insertions(+), 13 deletions(-)

New commits:
commit 71a016b6db2c409730594d59c565f5ad4e99eb8b
Author: Stephan Bergmann 
AuthorDate: Wed Oct 26 13:57:05 2016 +0200
Commit: Michael Stahl 
CommitDate: Mon Nov 1 18:53:48 2021 +0100

ucb: webdav-curl: const-ness fixes

[ port of commit 95cfef300eb1a32d700479d2cefddc3fc4d0b37c ]

Change-Id: Ic57525aa9a56c3d2f7f9cc5f0ca038bbfa8853a7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123503
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/ucb/source/ucp/webdav-curl/DAVTypes.hxx 
b/ucb/source/ucp/webdav-curl/DAVTypes.hxx
index cf87b0b1cf45..e511bdcd31b7 100644
--- a/ucb/source/ucp/webdav-curl/DAVTypes.hxx
+++ b/ucb/source/ucp/webdav-curl/DAVTypes.hxx
@@ -95,41 +95,41 @@ namespace http_dav_ucp
 
 virtual ~DAVOptions();
 
-bool isClass1() { return m_isClass1; };
+bool isClass1() const { return m_isClass1; };
 void setClass1( bool Class1 = true ) { m_isClass1 = Class1; };
 
-bool isClass2() { return m_isClass2; };
+bool isClass2() const { return m_isClass2; };
 void setClass2( bool Class2 = true ) { m_isClass2 = Class2; };
 
-bool isClass3() { return m_isClass3; };
+bool isClass3() const { return m_isClass3; };
 void setClass3( bool Class3 = true ) { m_isClass3 = Class3; };
 
-bool isHeadAllowed() { return m_isHeadAllowed; };
+bool isHeadAllowed() const { return m_isHeadAllowed; };
 void setHeadAllowed( bool HeadAllowed = true ) { m_isHeadAllowed = 
HeadAllowed; };
 
-sal_uInt32 getStaleTime() { return m_nStaleTime ; };
+sal_uInt32 getStaleTime() const { return m_nStaleTime ; };
 void setStaleTime( const sal_uInt32 nStaleTime ) { m_nStaleTime = 
nStaleTime; };
 
-sal_uInt32 getRequestedTimeLife() { return m_nRequestedTimeLife; };
+sal_uInt32 getRequestedTimeLife() const { return m_nRequestedTimeLife; 
};
 void setRequestedTimeLife( const sal_uInt32 nRequestedTimeLife ) { 
m_nRequestedTimeLife = nRequestedTimeLife; };
 
-const OUString & getURL() { return m_sURL; };
+const OUString & getURL() const { return m_sURL; };
 void setURL( const OUString & sURL ) { m_sURL = sURL; };
 
-const OUString & getRedirectedURL() { return m_sRedirectedURL; };
+const OUString & getRedirectedURL() const { return m_sRedirectedURL; };
 void setRedirectedURL( const OUString & sRedirectedURL ) { 
m_sRedirectedURL = sRedirectedURL; };
 
 void  setAllowedMethods( const OUString & aAllowedMethods ) { 
m_aAllowedMethods = aAllowedMethods; } ;
-const OUString & getAllowedMethods() { return m_aAllowedMethods; } ;
-bool isLockAllowed() { return ( m_aAllowedMethods.indexOf( "LOCK" ) != 
-1 ); };
+const OUString & getAllowedMethods() const { return m_aAllowedMethods; 
} ;
+bool isLockAllowed() const { return ( m_aAllowedMethods.indexOf( 
"LOCK" ) != -1 ); };
 
 void setLocked( bool locked = true ) { m_isLocked = locked; } ;
-bool isLocked() { return m_isLocked; };
+bool isLocked() const { return m_isLocked; };
 
-sal_uInt16 getHttpResponseStatusCode() { return 
m_nHttpResponseStatusCode; };
+sal_uInt16 getHttpResponseStatusCode() const { return 
m_nHttpResponseStatusCode; };
 void setHttpResponseStatusCode( const sal_uInt16 
nHttpResponseStatusCode ) { m_nHttpResponseStatusCode = 
nHttpResponseStatusCode; };
 
-const OUString & getHttpResponseStatusText() { return 
m_sHttpResponseStatusText; };
+const OUString & getHttpResponseStatusText() const { return 
m_sHttpResponseStatusText; };
 void setHttpResponseStatusText( const OUString & 
rHttpResponseStatusText ) { m_sHttpResponseStatusText = 
rHttpResponseStatusText; };
 
 void init() {


[Libreoffice-commits] core.git: ucb/source

2021-11-01 Thread Giuseppe Castagno (via logerrit)
 ucb/source/ucp/webdav-curl/DAVException.hxx  |5 +
 ucb/source/ucp/webdav-curl/webdavcontent.cxx |   74 +--
 ucb/source/ucp/webdav-curl/webdavcontent.hxx |4 +
 3 files changed, 77 insertions(+), 6 deletions(-)

New commits:
commit 62069267024a35e323e8685c3808bf80d64ddb5c
Author: Giuseppe Castagno 
AuthorDate: Fri Oct 14 17:13:20 2016 +0200
Commit: Michael Stahl 
CommitDate: Mon Nov 1 18:53:33 2021 +0100

ucb: webdav-curl: tdf#102499 (9): Fix eXo Platform WebDAV on 'Save Remote 
File'

[ port of commit 59d6d5579528a66e55b75987d2d959968db485a8 ]

Change-Id: I32c2bb8c3985ce8d8cf8cd0aeae513815ed40b6d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123502
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/ucb/source/ucp/webdav-curl/DAVException.hxx 
b/ucb/source/ucp/webdav-curl/DAVException.hxx
index c2f9f53acdd9..537b5a82fa2b 100644
--- a/ucb/source/ucp/webdav-curl/DAVException.hxx
+++ b/ucb/source/ucp/webdav-curl/DAVException.hxx
@@ -94,6 +94,11 @@ const sal_uInt16 SC_INSUFFICIENT_STORAGE = 507;
 // unofficial status codes only used internally by LO
 // used to cache the connection time out event
 const sal_uInt16 USC_CONNECTION_TIMED_OUT= 908;
+// name resolution failed
+const sal_uInt16 USC_LOOKUP_FAILED   = 909;
+const sal_uInt16 USC_AUTH_FAILED = 910;
+const sal_uInt16 USC_AUTHPROXY_FAILED= 911;
+
 
 
 class DAVException : public std::exception
diff --git a/ucb/source/ucp/webdav-curl/webdavcontent.cxx 
b/ucb/source/ucp/webdav-curl/webdavcontent.cxx
index b2d645bc1f23..974867e78685 100644
--- a/ucb/source/ucp/webdav-curl/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-curl/webdavcontent.cxx
@@ -3720,7 +3720,7 @@ Content::ResourceType Content::getResourceType(
 DAVOptions aDAVOptions;
 
 {
-getResourceOptions( xEnv, aDAVOptions, rResAccess );
+getResourceOptions( xEnv, aDAVOptions, rResAccess, 
networkAccessAllowed );
 
 // at least class one is needed
 if( aDAVOptions.isClass1() )
@@ -3931,7 +3931,8 @@ void Content::initOptsCacheLifeTime()
 void Content::getResourceOptions(
 const css::uno::Reference< css::ucb::XCommandEnvironment 
>& xEnv,
 DAVOptions& rDAVOptions,
-const std::unique_ptr< DAVResourceAccess > & rResAccess )
+const std::unique_ptr< DAVResourceAccess > & rResAccess,
+bool * networkAccessAllowed )
 {
 OUString aRedirURL;
 OUString aTargetURL = rResAccess->getURL();
@@ -3990,8 +3991,25 @@ void Content::getResourceOptions(
 // used only internally, so the text doesn't really 
matter..
 aStaticDAVOptionsCache.addDAVOptions( aDAVOptions,
   
m_nOptsCacheLifeNotFound );
-cancelCommandExecution( e, xEnv );
-// unreachable
+if ( networkAccessAllowed != nullptr )
+{
+*networkAccessAllowed = *networkAccessAllowed
+&& shouldAccessNetworkAfterException(e);
+}
+}
+break;
+case DAVException::DAV_HTTP_LOOKUP:
+{
+SAL_WARN( "ucb.ucp.webdav", "OPTIONS - DAVException: 
DAV_HTTP_LOOKUP for URL <" << m_xIdentifier->getContentIdentifier() << ">" );
+aDAVOptions.setHttpResponseStatusCode( USC_LOOKUP_FAILED );
+// used only internally, so the text doesn't really 
matter..
+aStaticDAVOptionsCache.addDAVOptions( aDAVOptions,
+  
m_nOptsCacheLifeNotFound );
+if ( networkAccessAllowed != nullptr )
+{
+*networkAccessAllowed = *networkAccessAllowed
+&& shouldAccessNetworkAfterException(e);
+}
 }
 break;
 case DAVException::DAV_HTTP_AUTH:
@@ -4002,6 +4020,29 @@ void Content::getResourceOptions(
 //   she cancelled the credentials request.
 //   this is not actually an error, it means only that for 
current user this is a standard web,
 //   though possibly DAV enabled
+aDAVOptions.setHttpResponseStatusCode( USC_AUTH_FAILED );
+// used only internally, so the text doesn't really 
matter..
+aStaticDAVOptionsCache.addDAVOptions( aDAVOptions,
+  
m_nOptsCacheLifeNotFound );
+if ( networkAccessAllowed != nullptr )
+{
+*networkAccessAllowed = *networkAccessAllowed
+

[Libreoffice-bugs] [Bug 145128] Setting the "PerformFileCheckExt" setting via the Windows Registry does not work correctly: Final is not applied

2021-11-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145128

--- Comment #1 from Gabor Kelemen (allotropia)  ---
Created attachment 176065
  --> https://bugs.documentfoundation.org/attachment.cgi?id=176065=edit
Example extension to turn off and lock the setting

Confirming with:

Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: e06ba31a037ea3ff192c9a00db6152179eb298a6
CPU threads: 8; OS: Windows 10.0 Build 19042; UI render: default; VCL: win
Locale: en-US (hu_HU); UI: en-US
Calc: threaded

Installing attached example extension turns off the "Perform check" checkbox,
but does not disable it as the finalize property should.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-commits] core.git: ucb/source

2021-11-01 Thread Giuseppe Castagno (via logerrit)
 ucb/source/ucp/webdav-curl/webdavcontent.cxx |   24 
 1 file changed, 24 insertions(+)

New commits:
commit 3665527ea9f003830eb47ecd221a950c35caf731
Author: Giuseppe Castagno 
AuthorDate: Fri Oct 21 15:53:53 2016 +0200
Commit: Michael Stahl 
CommitDate: Mon Nov 1 18:53:17 2021 +0100

ucb: webdav-curl: tdf#102499 (8): Return empty property when not present.

[ port of commit bb27b2ff87e534b6f4fb9583271db29d6bbae8b6 ]

Change-Id: I3375aff7e3b82bb41917b1d87432fd48af41a05c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123501
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/ucb/source/ucp/webdav-curl/webdavcontent.cxx 
b/ucb/source/ucp/webdav-curl/webdavcontent.cxx
index 01bc742f0e25..b2d645bc1f23 100644
--- a/ucb/source/ucp/webdav-curl/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-curl/webdavcontent.cxx
@@ -1621,6 +1621,30 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
  m_bCollection ) );
 }
 
+// Add a default for the properties requested but not found.
+// Determine still missing properties, add a default.
+// Some client function doesn't expect a void uno::Any,
+// but instead wants some sort of default.
+std::vector< OUString > aMissingProps;
+if ( !xProps->containsAllNames(
+rProperties, aMissingProps ) )
+{
+//
+for ( std::vector< rtl::OUString >::const_iterator it = 
aMissingProps.begin();
+  it != aMissingProps.end(); ++it )
+{
+// For the time being only a couple of properties need to be added
+if ( (*it) == "DateModified"  || (*it) == "DateCreated" )
+{
+util::DateTime aDate;
+xProps->addProperty(
+(*it),
+uno::makeAny( aDate ),
+true );
+}
+}
+}
+
 sal_Int32 nCount = rProperties.getLength();
 for ( sal_Int32 n = 0; n < nCount; ++n )
 {


[Libreoffice-commits] core.git: ucb/source

2021-11-01 Thread Michael Stahl (via logerrit)
 ucb/source/ucp/webdav-curl/DAVTypes.cxx |   53 
 ucb/source/ucp/webdav-curl/DAVTypes.hxx |   16 -
 2 files changed, 69 deletions(-)

New commits:
commit 09e159ba18989f8b5720205f0bdebdb277c5d067
Author: Michael Stahl 
AuthorDate: Tue Oct 12 14:58:05 2021 +0200
Commit: Michael Stahl 
CommitDate: Mon Nov 1 18:52:45 2021 +0100

ucb: webdav-curl: loplugin:unusedmethods

[ replicate commit 292560a957498bed70b625c992ec6bcf631dceb3 ]

Change-Id: I17a719756423f57a847d5c2f6833ac4d7033f5f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123500
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/ucb/source/ucp/webdav-curl/DAVTypes.cxx 
b/ucb/source/ucp/webdav-curl/DAVTypes.cxx
index 82be1807ed41..015c3520bf73 100644
--- a/ucb/source/ucp/webdav-curl/DAVTypes.cxx
+++ b/ucb/source/ucp/webdav-curl/DAVTypes.cxx
@@ -173,31 +173,6 @@ void DAVOptionsCache::addDAVOptions( DAVOptions & 
rDAVOptions, const sal_uInt32
 m_aTheCache[ aEncodedUrl ] = rDAVOptions;
 }
 
-sal_uInt16 DAVOptionsCache::getHttpResponseStatusCode( const OUString & rURL, 
OUString & rHttpResponseStatusText )
-{
-osl::MutexGuard aGuard( m_aMutex );
-OUString aEncodedUrl( ucb_impl::urihelper::encodeURI( DecodeURI(rURL) ) );
-normalizeURLLastChar( aEncodedUrl );
-
-DAVOptionsMap::iterator it;
-it = m_aTheCache.find( aEncodedUrl );
-if ( it != m_aTheCache.end() )
-{
-// first check for stale
-TimeValue t1;
-osl_getSystemTime(  );
-if( (*it).second.getStaleTime() < t1.Seconds )
-{
-m_aTheCache.erase( it );
-return 0;
-}
-
-rHttpResponseStatusText = (*it).second.getHttpResponseStatusText();
-return (*it).second.getHttpResponseStatusCode();
-}
-return 0;
-}
-
 void DAVOptionsCache::setHeadAllowed( const OUString & rURL, const bool 
HeadAllowed )
 {
 osl::MutexGuard aGuard( m_aMutex );
@@ -221,32 +196,4 @@ void DAVOptionsCache::setHeadAllowed( const OUString & 
rURL, const bool HeadAllo
 }
 }
 
-bool DAVOptionsCache::isHeadAllowed( const OUString & rURL )
-{
-osl::MutexGuard aGuard( m_aMutex );
-OUString aEncodedUrl( ucb_impl::urihelper::encodeURI( DecodeURI(rURL) ) );
-normalizeURLLastChar( aEncodedUrl );
-
-DAVOptionsMap::iterator it;
-it = m_aTheCache.find( aEncodedUrl );
-if ( it != m_aTheCache.end() )
-{
-// first check for stale
-TimeValue t1;
-osl_getSystemTime(  );
-if( (*it).second.getStaleTime() < t1.Seconds )
-{
-m_aTheCache.erase( it );
-return true; // to force again OPTIONS method
-}
-
-// check if the resource was present on server
-return (*it).second.isHeadAllowed();
-}
-// this value is needed because some web server don't implement
-// OPTIONS method, so the resource is considered found,
-// until detected otherwise
-return true;
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/ucb/source/ucp/webdav-curl/DAVTypes.hxx 
b/ucb/source/ucp/webdav-curl/DAVTypes.hxx
index 77e9d630bc0c..cf87b0b1cf45 100644
--- a/ucb/source/ucp/webdav-curl/DAVTypes.hxx
+++ b/ucb/source/ucp/webdav-curl/DAVTypes.hxx
@@ -170,22 +170,6 @@ namespace http_dav_ucp
 void removeDAVOptions( const OUString & rURL );
 void addDAVOptions( DAVOptions & rDAVOptions, const sal_uInt32 
nLifeTime );
 
-/** return the cached value of HTTP response status code
-If the cached value is found stale, it is removed.
-
-@param (in) OUString
-   the resource URL
-
-@return int
-the cached
-are not present (meaning the resource should be checked for
-presence anyway)
-false if resource was not found
-*/
-sal_uInt16 getHttpResponseStatusCode( const OUString & rURL, OUString 
& rHttpResponseStatusText );
-
-bool isHeadAllowed( const OUString & rURL );
-
 void setHeadAllowed( const OUString & rURL, bool HeadAllowed = true );
 
 private:


[Libreoffice-commits] core.git: ucb/source

2021-11-01 Thread Giuseppe Castagno (via logerrit)
 ucb/source/ucp/webdav-curl/DAVException.hxx  |4 
 ucb/source/ucp/webdav-curl/webdavcontent.cxx |   25 +
 2 files changed, 29 insertions(+)

New commits:
commit 2346a19dfeba7f0f2082888ab76c1c731e9e591c
Author: Giuseppe Castagno 
AuthorDate: Thu Oct 13 09:34:19 2016 +0200
Commit: Michael Stahl 
CommitDate: Mon Nov 1 18:52:18 2021 +0100

ucb: webdav-curl: tdf#102499 (7): Caching connect timeout or cannot connect.

An unofficial HTTP response status code is defined and used
internally in LibreOffice WebDAV ucp provider in order to
catch either the DAVException::DAV_HTTP_TIMEOUT state or the
DAVException::DAV_HTTP_CONNECT state.

[ port of commit 97cc70d7285526ae2ee3b3bac425eb031c4c0321 ]

Change-Id: Idd5d412dd10131199f34a047055d098a0f74cf7e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123499
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/ucb/source/ucp/webdav-curl/DAVException.hxx 
b/ucb/source/ucp/webdav-curl/DAVException.hxx
index 4da64420cc00..c2f9f53acdd9 100644
--- a/ucb/source/ucp/webdav-curl/DAVException.hxx
+++ b/ucb/source/ucp/webdav-curl/DAVException.hxx
@@ -91,6 +91,10 @@ const sal_uInt16 SC_HTTP_VERSION_NOT_SUPPORTED   = 505;
 // DAV extensions ()
 const sal_uInt16 SC_INSUFFICIENT_STORAGE = 507;
 
+// unofficial status codes only used internally by LO
+// used to cache the connection time out event
+const sal_uInt16 USC_CONNECTION_TIMED_OUT= 908;
+
 
 class DAVException : public std::exception
 {
diff --git a/ucb/source/ucp/webdav-curl/webdavcontent.cxx 
b/ucb/source/ucp/webdav-curl/webdavcontent.cxx
index 7866ce132632..01bc742f0e25 100644
--- a/ucb/source/ucp/webdav-curl/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-curl/webdavcontent.cxx
@@ -3813,6 +3813,25 @@ Content::ResourceType Content::getResourceType(
 {
 rResAccess->resetUri();
 
+// first check if the cached error can be mapped to 
DAVException::DAV_HTTP_TIMEOUT or mapped to DAVException::DAV_HTTP_CONNECT
+if ( aDAVOptions.getHttpResponseStatusCode() == 
USC_CONNECTION_TIMED_OUT )
+{
+// behave same as DAVException::DAV_HTTP_TIMEOUT or 
DAVException::DAV_HTTP_CONNECT was thrown
+try
+{
+// extract host name and connection port
+CurlUri   theUri( rResAccess->getURL() );
+OUString  aHostName  = theUri.GetHost();
+sal_Int32 nPort  = theUri.GetPort();
+throw DAVException( DAVException::DAV_HTTP_TIMEOUT,
+ConnectionEndPointString(aHostName, 
nPort) );
+}
+catch ( DAVException& exp )
+{
+cancelCommandExecution( exp, xEnv );
+}
+}
+
 if ( aDAVOptions.getHttpResponseStatusCode() != SC_NOT_FOUND &&
  aDAVOptions.getHttpResponseStatusCode() != SC_GONE ) // the 
cached OPTIONS can have SC_GONE
 {
@@ -3941,6 +3960,12 @@ void Content::getResourceOptions(
 // probably a new bit stating 'timed out' should be added 
to opts var?
 // in any case abort the command
 SAL_WARN( "ucb.ucp.webdav", "OPTIONS - DAVException: 
DAV_HTTP_TIMEOUT or DAV_HTTP_CONNECT for URL <" << 
m_xIdentifier->getContentIdentifier() << ">" );
+// cache the internal unofficial status code
+
+aDAVOptions.setHttpResponseStatusCode( 
USC_CONNECTION_TIMED_OUT );
+// used only internally, so the text doesn't really 
matter..
+aStaticDAVOptionsCache.addDAVOptions( aDAVOptions,
+  
m_nOptsCacheLifeNotFound );
 cancelCommandExecution( e, xEnv );
 // unreachable
 }


[Libreoffice-commits] core.git: ucb/source

2021-11-01 Thread Giuseppe Castagno (via logerrit)
 ucb/source/ucp/webdav-curl/DAVTypes.cxx  |   46 +++
 ucb/source/ucp/webdav-curl/DAVTypes.hxx  |7 ++--
 ucb/source/ucp/webdav-curl/webdavcontent.cxx |6 +--
 3 files changed, 21 insertions(+), 38 deletions(-)

New commits:
commit 805a4e9d3e03e1339e9149fa745ac14fe334ccdf
Author: Giuseppe Castagno 
AuthorDate: Tue Oct 11 15:21:23 2016 +0200
Commit: Michael Stahl 
CommitDate: Mon Nov 1 18:51:55 2021 +0100

ucb: webdav-curl: tdf#102499 (6): Cache OPTIONS if not present or if 
lifetime different

Add the OPTIONS information and response status code into the cache:
- if the OPTIONS information is already cached, update the cache only
  if the lifetime is different;
- if the OPTIONS information is not cached, cache it.

Add some new functions in DAVOptions to support the change and remove
a function no longer used.

[ port of commit 1ca68d386bc0345240bf288bec023faaba2e07af ]

Change-Id: I9c06e06ba807eff393052dc706cb45b2dfcef105
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123498
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/ucb/source/ucp/webdav-curl/DAVTypes.cxx 
b/ucb/source/ucp/webdav-curl/DAVTypes.cxx
index d16b7bacc3bd..82be1807ed41 100644
--- a/ucb/source/ucp/webdav-curl/DAVTypes.cxx
+++ b/ucb/source/ucp/webdav-curl/DAVTypes.cxx
@@ -29,6 +29,7 @@ DAVOptions::DAVOptions() :
 m_isLocked( false ),
 m_aAllowedMethods(),
 m_nStaleTime( 0 ),
+m_nRequestedTimeLife( 0 ),
 m_sURL(),
 m_sRedirectedURL(),
 m_nHttpResponseStatusCode( 0 ),
@@ -44,6 +45,7 @@ DAVOptions::DAVOptions( const DAVOptions & rOther ) :
 m_isLocked( rOther.m_isLocked ),
 m_aAllowedMethods( rOther.m_aAllowedMethods ),
 m_nStaleTime( rOther.m_nStaleTime ),
+m_nRequestedTimeLife( rOther.m_nRequestedTimeLife ),
 m_sURL( rOther.m_sURL ),
 m_sRedirectedURL( rOther.m_sRedirectedURL),
 m_nHttpResponseStatusCode( rOther.m_nHttpResponseStatusCode ),
@@ -64,6 +66,7 @@ DAVOptions & DAVOptions::operator=( const DAVOptions& rOpts )
 m_isHeadAllowed = rOpts.m_isHeadAllowed;
 m_aAllowedMethods = rOpts.m_aAllowedMethods;
 m_nStaleTime = rOpts.m_nStaleTime;
+m_nRequestedTimeLife = rOpts.m_nRequestedTimeLife;
 m_sURL = rOpts.m_sURL;
 m_sRedirectedURL = rOpts.m_sRedirectedURL;
 m_nHttpResponseStatusCode = rOpts.m_nHttpResponseStatusCode;
@@ -81,6 +84,7 @@ bool DAVOptions::operator==( const DAVOptions& rOpts ) const
 m_isHeadAllowed == rOpts.m_isHeadAllowed &&
 m_aAllowedMethods == rOpts.m_aAllowedMethods &&
 m_nStaleTime == rOpts.m_nStaleTime &&
+m_nRequestedTimeLife == rOpts.m_nRequestedTimeLife &&
 m_sURL == rOpts.m_sURL &&
 m_sRedirectedURL == rOpts.m_sRedirectedURL &&
 m_nHttpResponseStatusCode == rOpts.m_nHttpResponseStatusCode &&
@@ -149,26 +153,6 @@ void DAVOptionsCache::addDAVOptions( DAVOptions & 
rDAVOptions, const sal_uInt32
 normalizeURLLastChar( aEncodedUrl );
 rDAVOptions.setURL( aEncodedUrl );
 
-// unchanged, it may be used to access a server
-OUString aRedirURL( rDAVOptions.getRedirectedURL() );
-rDAVOptions.setRedirectedURL( aRedirURL );
-
-TimeValue t1;
-osl_getSystemTime(  );
-rDAVOptions.setStaleTime( t1.Seconds + nLifeTime );
-
-m_aTheCache[ aEncodedUrl ] = rDAVOptions;
-}
-
-void DAVOptionsCache::updateCachedOption( DAVOptions & rDAVOptions, const 
sal_uInt32 nLifeTime )
-{
-osl::MutexGuard aGuard( m_aMutex );
-OUString aURL( rDAVOptions.getURL() );
-
-OUString aEncodedUrl( ucb_impl::urihelper::encodeURI( DecodeURI(aURL) ) );
-normalizeURLLastChar( aEncodedUrl );
-rDAVOptions.setURL( aEncodedUrl );
-
 // unchanged, it may be used to access a server
 OUString aRedirURL( rDAVOptions.getRedirectedURL() );
 rDAVOptions.setRedirectedURL( aRedirURL );
@@ -177,20 +161,16 @@ void DAVOptionsCache::updateCachedOption( DAVOptions & 
rDAVOptions, const sal_uI
 DAVOptionsMap::iterator it;
 it = m_aTheCache.find( aEncodedUrl );
 if ( it != m_aTheCache.end() )
-{
-DAVOptions  = (*it).second;
-// exists, set new staletime, only if remaining time is higher
-TimeValue t1;
-osl_getSystemTime(  );
-
-if ( ( opts.getStaleTime() - t1.Seconds ) > nLifeTime )
-{
-opts.setStaleTime( t1.Seconds + nLifeTime );
-}
-// update relevant fields
-opts.setHttpResponseStatusCode( 
rDAVOptions.getHttpResponseStatusCode() );
-opts.setHttpResponseStatusText( 
rDAVOptions.getHttpResponseStatusText() );
+{ // already in cache, check LifeTime
+if ( (*it).second.getRequestedTimeLife() == nLifeTime )
+return; // same lifetime, do nothing
 }
+// not in cache, add it
+TimeValue t1;
+osl_getSystemTime(  );
+rDAVOptions.setStaleTime( t1.Seconds + nLifeTime );
+
+m_aTheCache[ aEncodedUrl ] = 

[Libreoffice-commits] core.git: ucb/source

2021-11-01 Thread Giuseppe Castagno (via logerrit)
 ucb/source/ucp/webdav-curl/DAVTypes.cxx  |   77 +++-
 ucb/source/ucp/webdav-curl/DAVTypes.hxx  |6 +
 ucb/source/ucp/webdav-curl/webdavcontent.cxx |  100 ++-
 3 files changed, 144 insertions(+), 39 deletions(-)

New commits:
commit 2afb51076c3f766ab39cbfc66d8469889a2b0a5c
Author: Giuseppe Castagno 
AuthorDate: Mon Sep 12 20:59:09 2016 +0200
Commit: Michael Stahl 
CommitDate: Mon Nov 1 18:51:27 2021 +0100

ucb: webdav-curl: tdf#102499 (5): Deal with HTTP unofficial response status 
codes

A reference can be found here:

(retrieved 2016-09-13).

Changes done:
Add set of 'HEAD method not available' before using fall back GET method.
Add new method in OPTIONS cache.
Add response status code if fall-back GET didn't succeeded.
Add copy-assignement operator to DAVOptions.
Fix behaviour of GET fall back when HEAD missing.

[ port of commit 16df731a30917a426df81d751a0bfd0ae5fcdd45 ]

Change-Id: I4dbf4ead49f72617fad0a13f75b8e361d1a8dba7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123497
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/ucb/source/ucp/webdav-curl/DAVTypes.cxx 
b/ucb/source/ucp/webdav-curl/DAVTypes.cxx
index ad39d0d46095..d16b7bacc3bd 100644
--- a/ucb/source/ucp/webdav-curl/DAVTypes.cxx
+++ b/ucb/source/ucp/webdav-curl/DAVTypes.cxx
@@ -36,7 +36,6 @@ DAVOptions::DAVOptions() :
 {
 }
 
-
 DAVOptions::DAVOptions( const DAVOptions & rOther ) :
 m_isClass1( rOther.m_isClass1 ),
 m_isClass2( rOther.m_isClass2 ),
@@ -52,11 +51,25 @@ DAVOptions::DAVOptions( const DAVOptions & rOther ) :
 {
 }
 
-
 DAVOptions::~DAVOptions()
 {
 }
 
+DAVOptions & DAVOptions::operator=( const DAVOptions& rOpts )
+{
+m_isClass1 = rOpts.m_isClass1;
+m_isClass2 = rOpts.m_isClass2;
+m_isClass3 = rOpts.m_isClass3;
+m_isLocked = rOpts.m_isLocked;
+m_isHeadAllowed = rOpts.m_isHeadAllowed;
+m_aAllowedMethods = rOpts.m_aAllowedMethods;
+m_nStaleTime = rOpts.m_nStaleTime;
+m_sURL = rOpts.m_sURL;
+m_sRedirectedURL = rOpts.m_sRedirectedURL;
+m_nHttpResponseStatusCode = rOpts.m_nHttpResponseStatusCode;
+m_sHttpResponseStatusText = rOpts.m_sHttpResponseStatusText;
+return *this;
+}
 
 bool DAVOptions::operator==( const DAVOptions& rOpts ) const
 {
@@ -81,12 +94,10 @@ DAVOptionsCache::DAVOptionsCache()
 {
 }
 
-
 DAVOptionsCache::~DAVOptionsCache()
 {
 }
 
-
 bool DAVOptionsCache::getDAVOptions( const OUString & rURL, DAVOptions & 
rDAVOptions )
 {
 osl::MutexGuard aGuard( m_aMutex );
@@ -115,7 +126,6 @@ bool DAVOptionsCache::getDAVOptions( const OUString & rURL, 
DAVOptions & rDAVOpt
 }
 }
 
-
 void DAVOptionsCache::removeDAVOptions( const OUString & rURL )
 {
 osl::MutexGuard aGuard( m_aMutex );
@@ -130,7 +140,6 @@ void DAVOptionsCache::removeDAVOptions( const OUString & 
rURL )
 }
 }
 
-
 void DAVOptionsCache::addDAVOptions( DAVOptions & rDAVOptions, const 
sal_uInt32 nLifeTime )
 {
 osl::MutexGuard aGuard( m_aMutex );
@@ -151,6 +160,39 @@ void DAVOptionsCache::addDAVOptions( DAVOptions & 
rDAVOptions, const sal_uInt32
 m_aTheCache[ aEncodedUrl ] = rDAVOptions;
 }
 
+void DAVOptionsCache::updateCachedOption( DAVOptions & rDAVOptions, const 
sal_uInt32 nLifeTime )
+{
+osl::MutexGuard aGuard( m_aMutex );
+OUString aURL( rDAVOptions.getURL() );
+
+OUString aEncodedUrl( ucb_impl::urihelper::encodeURI( DecodeURI(aURL) ) );
+normalizeURLLastChar( aEncodedUrl );
+rDAVOptions.setURL( aEncodedUrl );
+
+// unchanged, it may be used to access a server
+OUString aRedirURL( rDAVOptions.getRedirectedURL() );
+rDAVOptions.setRedirectedURL( aRedirURL );
+
+// check if already cached
+DAVOptionsMap::iterator it;
+it = m_aTheCache.find( aEncodedUrl );
+if ( it != m_aTheCache.end() )
+{
+DAVOptions  = (*it).second;
+// exists, set new staletime, only if remaining time is higher
+TimeValue t1;
+osl_getSystemTime(  );
+
+if ( ( opts.getStaleTime() - t1.Seconds ) > nLifeTime )
+{
+opts.setStaleTime( t1.Seconds + nLifeTime );
+}
+// update relevant fields
+opts.setHttpResponseStatusCode( 
rDAVOptions.getHttpResponseStatusCode() );
+opts.setHttpResponseStatusText( 
rDAVOptions.getHttpResponseStatusText() );
+}
+}
+
 sal_uInt16 DAVOptionsCache::getHttpResponseStatusCode( const OUString & rURL, 
OUString & rHttpResponseStatusText )
 {
 osl::MutexGuard aGuard( m_aMutex );
@@ -176,6 +218,29 @@ sal_uInt16 DAVOptionsCache::getHttpResponseStatusCode( 
const OUString & rURL, OU
 return 0;
 }
 
+void DAVOptionsCache::setHeadAllowed( const OUString & rURL, const bool 
HeadAllowed )
+{
+osl::MutexGuard aGuard( m_aMutex );
+OUString aEncodedUrl( ucb_impl::urihelper::encodeURI( DecodeURI(rURL) ) );
+normalizeURLLastChar( 

[Libreoffice-commits] core.git: ucb/source

2021-11-01 Thread Michael Stahl (via logerrit)
 ucb/source/ucp/webdav-curl/CurlSession.cxx   |1 
 ucb/source/ucp/webdav-curl/DAVTypes.cxx  |   30 +--
 ucb/source/ucp/webdav-curl/DAVTypes.hxx  |   38 ++--
 ucb/source/ucp/webdav-curl/webdavcontent.cxx |  240 +--
 4 files changed, 156 insertions(+), 153 deletions(-)

New commits:
commit e3c2294c351892ca864f7dd5827dbe04cfcc8021
Author: Michael Stahl 
AuthorDate: Tue Oct 12 13:37:08 2021 +0200
Commit: Michael Stahl 
CommitDate: Mon Nov 1 18:50:55 2021 +0100

ucb: webdav-curl: tdf#102499 (3): Change caching model for HTTP response 
status code

Instead of caching only a single status flag, now both the HTTP
response status code and the message accompanying it are cached.

[ port of commit f423a9d695814b1babf5f2c3f42821190adc7e53 ]

Change-Id: Ia77dc1d7575fc9d5517733687b8d3a1fdf9429dc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123496
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx 
b/ucb/source/ucp/webdav-curl/CurlSession.cxx
index 9700540d6565..b0c1c4c7e2ac 100644
--- a/ucb/source/ucp/webdav-curl/CurlSession.cxx
+++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx
@@ -1178,7 +1178,6 @@ auto CurlSession::OPTIONS(OUString const& rURIReference,
 }
 }
 }
-rOptions.setResourceFound();
 if (rOptions.isClass2() || rOptions.isClass3())
 {
 if (g_Init.LockStore.getLockTokenForURI(rURIReference, nullptr))
diff --git a/ucb/source/ucp/webdav-curl/DAVTypes.cxx 
b/ucb/source/ucp/webdav-curl/DAVTypes.cxx
index 39543c3dcf98..ad39d0d46095 100644
--- a/ucb/source/ucp/webdav-curl/DAVTypes.cxx
+++ b/ucb/source/ucp/webdav-curl/DAVTypes.cxx
@@ -22,7 +22,6 @@ using namespace com::sun::star;
 // DAVOptions implementation
 
 DAVOptions::DAVOptions() :
-m_isResourceFound( false ),
 m_isClass1( false ),
 m_isClass2( false ),
 m_isClass3( false ),
@@ -31,13 +30,14 @@ DAVOptions::DAVOptions() :
 m_aAllowedMethods(),
 m_nStaleTime( 0 ),
 m_sURL(),
-m_sRedirectedURL()
+m_sRedirectedURL(),
+m_nHttpResponseStatusCode( 0 ),
+m_sHttpResponseStatusText()
 {
 }
 
 
 DAVOptions::DAVOptions( const DAVOptions & rOther ) :
-m_isResourceFound( rOther.m_isResourceFound ),
 m_isClass1( rOther.m_isClass1 ),
 m_isClass2( rOther.m_isClass2 ),
 m_isClass3( rOther.m_isClass3 ),
@@ -46,7 +46,9 @@ DAVOptions::DAVOptions( const DAVOptions & rOther ) :
 m_aAllowedMethods( rOther.m_aAllowedMethods ),
 m_nStaleTime( rOther.m_nStaleTime ),
 m_sURL( rOther.m_sURL ),
-m_sRedirectedURL( rOther.m_sRedirectedURL)
+m_sRedirectedURL( rOther.m_sRedirectedURL),
+m_nHttpResponseStatusCode( rOther.m_nHttpResponseStatusCode ),
+m_sHttpResponseStatusText( rOther.m_sHttpResponseStatusText )
 {
 }
 
@@ -59,7 +61,6 @@ DAVOptions::~DAVOptions()
 bool DAVOptions::operator==( const DAVOptions& rOpts ) const
 {
 return
-m_isResourceFound == rOpts.m_isResourceFound &&
 m_isClass1 == rOpts.m_isClass1 &&
 m_isClass2 == rOpts.m_isClass2 &&
 m_isClass3 == rOpts.m_isClass3 &&
@@ -68,7 +69,9 @@ bool DAVOptions::operator==( const DAVOptions& rOpts ) const
 m_aAllowedMethods == rOpts.m_aAllowedMethods &&
 m_nStaleTime == rOpts.m_nStaleTime &&
 m_sURL == rOpts.m_sURL &&
-m_sRedirectedURL == rOpts.m_sRedirectedURL;
+m_sRedirectedURL == rOpts.m_sRedirectedURL &&
+m_nHttpResponseStatusCode == rOpts.m_nHttpResponseStatusCode &&
+m_sHttpResponseStatusText == rOpts.m_sHttpResponseStatusText;
 }
 
 
@@ -131,7 +134,6 @@ void DAVOptionsCache::removeDAVOptions( const OUString & 
rURL )
 void DAVOptionsCache::addDAVOptions( DAVOptions & rDAVOptions, const 
sal_uInt32 nLifeTime )
 {
 osl::MutexGuard aGuard( m_aMutex );
-
 OUString aURL( rDAVOptions.getURL() );
 
 OUString aEncodedUrl( ucb_impl::urihelper::encodeURI( DecodeURI(aURL) ) );
@@ -149,8 +151,7 @@ void DAVOptionsCache::addDAVOptions( DAVOptions & 
rDAVOptions, const sal_uInt32
 m_aTheCache[ aEncodedUrl ] = rDAVOptions;
 }
 
-
-bool DAVOptionsCache::isResourceFound( const OUString & rURL )
+sal_uInt16 DAVOptionsCache::getHttpResponseStatusCode( const OUString & rURL, 
OUString & rHttpResponseStatusText )
 {
 osl::MutexGuard aGuard( m_aMutex );
 OUString aEncodedUrl( ucb_impl::urihelper::encodeURI( DecodeURI(rURL) ) );
@@ -166,16 +167,13 @@ bool DAVOptionsCache::isResourceFound( const OUString & 
rURL )
 if( (*it).second.getStaleTime() < t1.Seconds )
 {
 m_aTheCache.erase( it );
-return true; // to force again OPTIONS method
+return 0;
 }
 
-// check if the resource was present on server
-return (*it).second.isResourceFound();
+rHttpResponseStatusText = (*it).second.getHttpResponseStatusText();
+return (*it).second.getHttpResponseStatusCode();
 }
-// 

  1   2   3   4   >