Bug 145197 - Remote open/save services always show unnecessary "share" field (only on Windows)
Summary: Remote open/save services always show unnecessary "share" field (only on Wind...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: reviewed:2023
Keywords: bibisectRequest, easyHack, skillDebug
Depends on:
Blocks: Dev-related
  Show dependency treegraph
 
Reported: 2021-10-18 09:02 UTC by Justin L
Modified: 2023-05-15 17:44 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
addRemoteService-extraShareInWindows.jpg: all services add this extra field (74.53 KB, image/jpeg)
2021-10-18 09:14 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Justin L 2021-10-18 09:02:57 UTC
Every service in "remote files" shows the "share" field - but only in Windows.

I assume it can be fixed in PlaceEditDialog.cxx with something like this:

// Remove Windows Share entry from dialog on Windows OS, where it's non-functional
#if defined(_WIN32)
    m_xLBServerType->remove(nPos + 3);
+   m_xEDShare->hide();
#else

I don't have a Windows compile/bibisect environment, so I can't test this.
Comment 1 Justin L 2021-10-18 09:14:25 UTC
Created attachment 175808 [details]
addRemoteService-extraShareInWindows.jpg: all services add this extra field
Comment 2 Justin L 2021-10-18 09:21:04 UTC
likely can be seen in bibisect 6.3 with 
commit f875364d5bf2207410814efe39e1b41f3c283356
Author: Aditya on Thu Jan 31 03:50:55 2019 +0530
    tdf#119812: Hide "Windows Share" server type in Windows OS.
Comment 3 Justin L 2021-10-20 07:28:02 UTC
Steps to access these dialogues
1.) File menu - open remote  (or save remote)
2.) manage service - add or edit
Comment 4 Mike Kaganski 2021-10-21 08:22:06 UTC
(In reply to Justin L from comment #2)
> likely can be seen in bibisect 6.3 with 
> commit f875364d5bf2207410814efe39e1b41f3c283356
> Author: Aditya on Thu Jan 31 03:50:55 2019 +0530
>     tdf#119812: Hide "Windows Share" server type in Windows OS.

Absolutely correct. The question is - why? The change doesn't touch the control directly. So there should be some code that is not not executing that hides it...
Comment 5 Justin L 2021-10-21 08:28:52 UTC
Setting to invisible is done in the CTOR (which is no longer being run).
svtools/source/dialogs/ServerDetailsControls.cxx.

SmbDetailsContainer::SmbDetailsContainer(PlaceEditDialog* pDialog)
    : DetailsContainer(pDialog)
{
    m_pDialog->m_xEDShare->connect_changed( LINK( this, DetailsContainer, ValueChangeHdl ) );

    set_visible( false );
}
Comment 6 Mike Kaganski 2021-10-21 09:20:48 UTC
(In reply to Justin L from comment #5)

Right! And SmbDetailsContainer::set_visible also operates on other elements, too.

Maybe another (IMO cleaner) approach would be to set all the elements to hidden in the UI file, so that every provided explicitly activate them as needed...
Comment 7 Hossein 2023-03-23 14:45:29 UTC
Re-evaluating the EasyHack in 2023

This EasyHack is still relevant. The issue is still reproducible with comparing Windows and Linux for LO 7.6 dev:

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: ed0372bac123b402fe3cd694a455e8328117752d
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: default; VCL: win
Locale: fa-IR (fa_IR); UI: fa-IR
Calc: threaded