Kaydet (Commit) 2818280e authored tarafından Serge Krot's avatar Serge Krot Kaydeden (comit) Thorsten Behrens

tdf#113807 Enable clicking on pathfile-names in "Links" dialog

Improved:
* Very long pathfilename now do not overwrite its label on the dialog
* Full pathfilename could be clicked to show attachment/image
with default viewer.

Change-Id: I6e5398ed2a2013aae0d9b51a719e694b3206dcce
Reviewed-on: https://gerrit.libreoffice.org/44689Reviewed-by: 's avatarThorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: 's avatarThorsten Behrens <Thorsten.Behrens@CIB.de>
üst 7d6f8b48
...@@ -243,6 +243,7 @@ IMPL_LINK( SvBaseLinksDlg, LinksSelectHdl, SvTreeListBox *, pSvTabListBox, void ...@@ -243,6 +243,7 @@ IMPL_LINK( SvBaseLinksDlg, LinksSelectHdl, SvTreeListBox *, pSvTabListBox, void
sfx2::LinkManager::GetDisplayNames( pLink, &sType, &aFileName, pLinkNm, pFilter ); sfx2::LinkManager::GetDisplayNames( pLink, &sType, &aFileName, pLinkNm, pFilter );
aFileName = INetURLObject::decode(aFileName, INetURLObject::DecodeMechanism::Unambiguous); aFileName = INetURLObject::decode(aFileName, INetURLObject::DecodeMechanism::Unambiguous);
m_pFtFullFileName->SetText( aFileName ); m_pFtFullFileName->SetText( aFileName );
m_pFtFullFileName->SetURL( aFileName );
m_pFtFullSourceName->SetText( sLink ); m_pFtFullSourceName->SetText( sLink );
m_pFtFullTypeName->SetText( sType ); m_pFtFullTypeName->SetText( sType );
} }
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include <vcl/edit.hxx> #include <vcl/edit.hxx>
#include <vcl/lstbox.hxx> #include <vcl/lstbox.hxx>
#include <vcl/idle.hxx> #include <vcl/idle.hxx>
#include <vcl/fixedhyper.hxx>
#include <svtools/svmedit.hxx> #include <svtools/svmedit.hxx>
#include <svtools/svtabbx.hxx> #include <svtools/svtabbx.hxx>
...@@ -45,7 +46,7 @@ class SvBaseLinksDlg : public ModalDialog ...@@ -45,7 +46,7 @@ class SvBaseLinksDlg : public ModalDialog
using Window::SetType; using Window::SetType;
VclPtr<SvTabListBox> m_pTbLinks; VclPtr<SvTabListBox> m_pTbLinks;
VclPtr<FixedText> m_pFtFullFileName; VclPtr<FixedHyperlink> m_pFtFullFileName;
VclPtr<FixedText> m_pFtFullSourceName; VclPtr<FixedText> m_pFtFullSourceName;
VclPtr<FixedText> m_pFtFullTypeName; VclPtr<FixedText> m_pFtFullTypeName;
VclPtr<RadioButton> m_pRbAutomatic; VclPtr<RadioButton> m_pRbAutomatic;
......
...@@ -297,16 +297,38 @@ ...@@ -297,16 +297,38 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel" id="FULL_FILE_NAME"> <object class="GtkBox" id="box_hexpand">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="xalign">0</property> <property name="hexpand">True</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkLinkButton" id="FULL_FILE_NAME">
<property name="label"></property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="has_tooltip">True</property>
<property name="relief">none</property>
<property name="focus_on_click">False</property>
<property name="xalign">0</property>
<property name="uri"></property>
</object>
<packing>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object> </object>
<packing> <packing>
<property name="left_attach">1</property> <property name="left_attach">1</property>
<property name="top_attach">0</property> <property name="top_attach">0</property>
<property name="width">1</property> <property name="width">1</property>
<property name="height">1</property> <property name="height">1</property>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing> </packing>
</child> </child>
<child> <child>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment