Small cleanup of initialization.

Change-Id: I62c0479414ab6748039498e1bc2b3bc9d7c4ef05
This commit is contained in:
Jan Holesovsky
2013-12-13 13:01:29 +01:00
parent 004b403d75
commit 4c8bfd06a6
+5 -8
View File
@@ -16,18 +16,16 @@
RecentDocsViewItem::RecentDocsViewItem(ThumbnailView &rView, const OUString &rURL,
const OUString &rTitle, sal_uInt16 nId)
: ThumbnailViewItem(rView, nId)
: ThumbnailViewItem(rView, nId),
maURL(rURL)
{
OUString aTitle(rTitle);
INetURLObject aURLObj(rURL);
RecentDocsView& rRecentView = dynamic_cast<RecentDocsView&>(rView);
long nThumbnailSize = rRecentView.GetThumbnailSize();
OUString aTitle = rTitle;
if( !aTitle.getLength() )
{
// If we have no title, get filename from the URL
INetURLObject aURLObj(rURL);
if (aTitle.isEmpty())
aTitle = aURLObj.GetName(INetURLObject::DECODE_WITH_CHARSET);
}
BitmapEx aThumbnail = ThumbnailView::readThumbnail(rURL);
if( aThumbnail.IsEmpty() )
@@ -57,7 +55,6 @@ RecentDocsViewItem::RecentDocsViewItem(ThumbnailView &rView, const OUString &rUR
&aExt);
}
maURL = rURL;
maTitle = aTitle;
maPreview1 = TemplateAbstractView::scaleImg(aThumbnail, nThumbnailSize, nThumbnailSize);
}