summaryrefslogtreecommitdiffstats
path: root/sfx2
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedric.bosdonnat@free.fr>2012-12-12 22:46:22 +0100
committerCédric Bosdonnat <cedric.bosdonnat@free.fr>2012-12-12 22:46:56 +0100
commit2316fe0dfdac3a295ec982a4f34648d0de367951 (patch)
tree2bdd5b4010283d331dd2f3c728073532c66a6c45 /sfx2
parentTemplate manager: filter on extensions, file type is localized (diff)
downloadcore-2316fe0dfdac3a295ec982a4f34648d0de367951.tar.gz
core-2316fe0dfdac3a295ec982a4f34648d0de367951.zip
Template manager: no need to extract file type description
Change-Id: I18d01542f009a5c6c1f688a8df04c14d3c8edc9e
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/inc/sfx2/templateproperties.hxx1
-rw-r--r--sfx2/inc/sfx2/templateviewitem.hxx5
-rw-r--r--sfx2/source/control/templatelocalview.cxx7
-rw-r--r--sfx2/source/control/templateremoteview.cxx2
-rw-r--r--sfx2/source/control/templateview.cxx1
5 files changed, 0 insertions, 16 deletions
diff --git a/sfx2/inc/sfx2/templateproperties.hxx b/sfx2/inc/sfx2/templateproperties.hxx
index ffa9003955a8..0760f604242d 100644
--- a/sfx2/inc/sfx2/templateproperties.hxx
+++ b/sfx2/inc/sfx2/templateproperties.hxx
@@ -20,7 +20,6 @@ struct TemplateItemProperties
sal_uInt16 nRegionId;
rtl::OUString aName;
rtl::OUString aPath;
- rtl::OUString aType;
BitmapEx aThumbnail;
};
diff --git a/sfx2/inc/sfx2/templateviewitem.hxx b/sfx2/inc/sfx2/templateviewitem.hxx
index 9a7d35850c1b..b19a06060421 100644
--- a/sfx2/inc/sfx2/templateviewitem.hxx
+++ b/sfx2/inc/sfx2/templateviewitem.hxx
@@ -32,10 +32,6 @@ public:
const rtl::OUString& getKeywords () const { return maKeywords; }
- void setFileType (const rtl::OUString &rType) { maFileType = rType; }
-
- const rtl::OUString& getFileType () const { return maFileType; }
-
void setSubTitle (const rtl::OUString &rTitle) { maSubTitle = rTitle; }
const rtl::OUString& getSubTitle () const { return maSubTitle; }
@@ -51,7 +47,6 @@ private:
rtl::OUString maPath;
rtl::OUString maAuthor;
rtl::OUString maKeywords;
- rtl::OUString maFileType;
rtl::OUString maSubTitle;
Point maSubTitlePos;
diff --git a/sfx2/source/control/templatelocalview.cxx b/sfx2/source/control/templatelocalview.cxx
index b77a57421a63..c5fb8a007760 100644
--- a/sfx2/source/control/templatelocalview.cxx
+++ b/sfx2/source/control/templatelocalview.cxx
@@ -15,7 +15,6 @@
#include <sfx2/templateview.hxx>
#include <sfx2/templateviewitem.hxx>
#include <svl/inettype.hxx>
-#include <svtools/imagemgr.hxx>
#include <tools/urlobj.hxx>
#include <unotools/ucbstreamhelper.hxx>
#include <vcl/pngread.hxx>
@@ -122,7 +121,6 @@ void TemplateLocalView::Populate ()
{
OUString aName = mpDocTemplates->GetName(i,j);
OUString aURL = mpDocTemplates->GetPath(i,j);
- OUString aType = SvFileInformationManager::GetDescription(INetURLObject(aURL));
if ((sal_uInt32)aName.getLength() > mpItemAttrs->nMaxTextLenght)
{
@@ -136,7 +134,6 @@ void TemplateLocalView::Populate ()
aProperties.nRegionId = i;
aProperties.aName = aName;
aProperties.aPath = aURL;
- aProperties.aType = aType;
aProperties.aThumbnail = TemplateAbstractView::fetchThumbnail(aURL,
TEMPLATE_THUMBNAIL_MAX_WIDTH,
TEMPLATE_THUMBNAIL_MAX_HEIGHT);
@@ -372,7 +369,6 @@ bool TemplateLocalView::moveTemplate (const ThumbnailViewItem *pItem, const sal_
aTemplateItem.nRegionId = nTargetRegion;
aTemplateItem.aName = pViewItem->maTitle;
aTemplateItem.aPath = pViewItem->getPath();
- aTemplateItem.aType = pViewItem->getFileType();
aTemplateItem.aThumbnail = pViewItem->maPreview1;
pTarget->maTemplates.push_back(aTemplateItem);
@@ -467,7 +463,6 @@ bool TemplateLocalView::moveTemplates(std::set<const ThumbnailViewItem *> &rItem
aTemplateItem.nRegionId = nTargetRegion;
aTemplateItem.aName = pViewItem->maTitle;
aTemplateItem.aPath = pViewItem->getPath();
- aTemplateItem.aType = pViewItem->getFileType();
aTemplateItem.aThumbnail = pViewItem->maPreview1;
pTarget->maTemplates.push_back(aTemplateItem);
@@ -541,7 +536,6 @@ bool TemplateLocalView::copyFrom(const sal_uInt16 nRegionItemId, const BitmapEx
aTemplate.aName = aPath;
aTemplate.aThumbnail = rThumbnail;
aTemplate.aPath = mpDocTemplates->GetPath(nRegionId,nDocId);
- aTemplate.aType = SvFileInformationManager::GetDescription(INetURLObject(aTemplate.aPath));
TemplateLocalViewItem *pItem =
static_cast<TemplateLocalViewItem*>(mItemList[i]);
@@ -584,7 +578,6 @@ bool TemplateLocalView::copyFrom (TemplateLocalViewItem *pItem, const OUString &
TEMPLATE_THUMBNAIL_MAX_WIDTH,
TEMPLATE_THUMBNAIL_MAX_HEIGHT);
aTemplate.aPath = rPath;
- aTemplate.aType = SvFileInformationManager::GetDescription(INetURLObject(rPath));
pItem->maTemplates.push_back(aTemplate);
diff --git a/sfx2/source/control/templateremoteview.cxx b/sfx2/source/control/templateremoteview.cxx
index 24ee41d36542..4f9f1e0639b3 100644
--- a/sfx2/source/control/templateremoteview.cxx
+++ b/sfx2/source/control/templateremoteview.cxx
@@ -227,8 +227,6 @@ bool TemplateRemoteView::loadRepository (const sal_uInt16 nRepositoryId, bool bR
{}
}
- aTemplateItem.aType = SvFileInformationManager::GetFileDescription(INetURLObject(sRealURL));
-
pItem->insertTemplate(aTemplateItem);
aItems.push_back(aTemplateItem);
++nIdx;
diff --git a/sfx2/source/control/templateview.cxx b/sfx2/source/control/templateview.cxx
index ff0e906c4d0d..ce3100314b41 100644
--- a/sfx2/source/control/templateview.cxx
+++ b/sfx2/source/control/templateview.cxx
@@ -126,7 +126,6 @@ void TemplateView::InsertItems (const std::vector<TemplateItemProperties> &rTemp
pItem->mnId = pCur->nId;
pItem->maTitle = pCur->aName;
pItem->setPath(pCur->aPath);
- pItem->setFileType(pCur->aType);
pItem->maPreview1 = pCur->aThumbnail;
pItem->setSelectClickHdl(LINK(this,ThumbnailView,OnItemSelected));