summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAkshay Deep <akshaydeepiitr@gmail.com>2016-06-02 16:06:12 +0530
committerAkshay Deep <akshaydeepiitr@gmail.com>2016-06-07 01:14:14 +0000
commit58ac1f9e3f99493e41ad2750ea0c3d2ba7f43d28 (patch)
tree5c040bbf6e685a3c4c6b135c86f8785a6d9ac7b3 /include
parentfa4298e9b649e21d9fb309d66fabce89813143d4 (diff)
Mark Default Templates in Template Manager
Reviewed-on: https://gerrit.libreoffice.org/25816 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Conflicts: include/sfx2/templateviewitem.hxx Change-Id: I1dff486605efce09e862d2924b24949601ae0f17 Reviewed-on: https://gerrit.libreoffice.org/25974 Reviewed-by: Akshay Deep <akshaydeepiitr@gmail.com> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'include')
-rw-r--r--include/sfx2/templateabstractview.hxx4
-rw-r--r--include/sfx2/templateviewitem.hxx8
2 files changed, 10 insertions, 2 deletions
diff --git a/include/sfx2/templateabstractview.hxx b/include/sfx2/templateabstractview.hxx
index c9f1a330093f..33c9a7449daa 100644
--- a/include/sfx2/templateabstractview.hxx
+++ b/include/sfx2/templateabstractview.hxx
@@ -117,6 +117,8 @@ public:
long getThumbnailWidth() const { return mnThumbnailWidth;}
long getThumbnailHeight() const {return mnThumbnailHeight;}
+ void RemoveDefaultTemplateIcon( OUString rPath);
+
static BitmapEx scaleImg (const BitmapEx &rImg, long width, long height);
static BitmapEx getDefaultThumbnail( const OUString& rPath );
@@ -127,6 +129,8 @@ protected:
virtual void OnItemDblClicked(ThumbnailViewItem *pItem) override;
+ bool IsDefaultTemplate(const OUString& rPath);
+
protected:
sal_uInt16 mnCurRegionId;
diff --git a/include/sfx2/templateviewitem.hxx b/include/sfx2/templateviewitem.hxx
index c7e1b9330ec9..10d4634e4d52 100644
--- a/include/sfx2/templateviewitem.hxx
+++ b/include/sfx2/templateviewitem.hxx
@@ -24,6 +24,10 @@ public:
const OUString& getPath () const { return maPath; }
+ void showDefaultIcon(bool bVal) { mbIsDefaultTemplate = bVal; }
+
+ Rectangle getDefaultIconArea() const;
+
virtual void Paint (drawinglayer::processor2d::BaseProcessor2D *pProcessor,
const ThumbnailItemAttributes *pAttrs) override;
@@ -33,8 +37,8 @@ public:
private:
OUString maPath;
-
- Point maSubTitlePos;
+ BitmapEx maDefaultBitmap;
+ bool mbIsDefaultTemplate;
};
#endif // INCLUDED_SFX2_TEMPLATEVIEWITEM_HXX