[Libreoffice-commits] core.git: 2 commits - include/sfx2 sfx2/source sfx2/uiconfig

Tamas Zolnai tamas.zolnai at collabora.co.uk
Fri Jan 10 08:46:37 PST 2014


2014 Január 10, Péntek 15:24 GMT dátummal, Stephan Bergmann <sbergman at redhat.com> ezt írta: 
 
> On 01/10/2014 02:13 PM, Zolnai Tamás wrote:
> > commit 60c7ed80643a6c397feebdd1492d6c3ef4d810be
> > Author: Zolnai Tamás <tamas.zolnai at collabora.com>
> > Date:   Fri Jan 10 03:31:46 2014 +0100
> >
> >      fdo#72947 Startcenter: display more userfriendly file urls in tooltips
> >
> >      Use INetURLObject to get a readable url (it displayes special characters
> >      too). It is a side effect that 'file:///' prefix disappear
> >      which seems a good thing.
> >      Plus some cleanup: remove second INetURLObject.
> >
> >      Change-Id: I4aab5e2546ae70e5a3d85b12e26e021bfa244999
> >
> > diff --git a/include/sfx2/recentdocsviewitem.hxx b/include/sfx2/recentdocsviewitem.hxx
> > index be94b78..410e74b 100644
> > --- a/include/sfx2/recentdocsviewitem.hxx
> > +++ b/include/sfx2/recentdocsviewitem.hxx
> > @@ -23,6 +23,9 @@ public:
> >       virtual OUString getHelpText() const;
> >
> >       OUString maURL;
> > +
> > +private:
> > +    OUString m_sHelpText;
> >   };
> >
> >   #endif // INCLUDED_SFX2_RECENTDOCSVIEWITEM_HXX
> > diff --git a/sfx2/source/control/recentdocsviewitem.cxx b/sfx2/source/control/recentdocsviewitem.cxx
> > index c35c16b..d741675 100644
> > --- a/sfx2/source/control/recentdocsviewitem.cxx
> > +++ b/sfx2/source/control/recentdocsviewitem.cxx
> > @@ -21,6 +21,7 @@ RecentDocsViewItem::RecentDocsViewItem(ThumbnailView &rView, const OUString &rUR
> >   {
> >       OUString aTitle(rTitle);
> >       INetURLObject aURLObj(rURL);
> > +    m_sHelpText = aURLObj.GetURLPath();
> 
> If m_sHelpText is what gets displayed in the "bubble help" when hovering 
> over a document in start center, I'd suggest against unconditionally > displaying merely the URL's path component (which can be rather 
> meaningless).  How about first trying 
> INetURLObject::getFSysPath(INetURLObject::FSYS_DETECT) to get a pathname 
> for file URLs and if that fails (i.e., returns an empty string) use > INetURLObject::GetURLNoPass() to get the full (non-file) URL (where > "NoPass" strips any password from the authority component, just in case).

You're right. I correct it using your idea.

Thanks!
Tamás 
 
 



More information about the LibreOffice mailing list