summaryrefslogtreecommitdiff
path: root/sfx2/inc
diff options
context:
space:
mode:
authorRafael Dominguez <venccsralph@gmail.com>2012-08-01 07:13:38 -0430
committerRafael Dominguez <venccsralph@gmail.com>2012-08-02 22:24:31 -0430
commit3fa5a70375083e5f201d6b62f418e9778446e2f5 (patch)
tree3ef288d1658b13b9c1b8bc1797aee6ca415e7068 /sfx2/inc
parentf36adaa38ca7a04144c18902343ab52784f4fbae (diff)
Cache results for remote repositories.
- Only fetch template list when its the first time or when specified. Change-Id: I922e97dfcbf67cebdd66a85bd7ff204896757e52
Diffstat (limited to 'sfx2/inc')
-rw-r--r--sfx2/inc/sfx2/templateonlineview.hxx3
-rw-r--r--sfx2/inc/sfx2/templateonlineviewitem.hxx8
2 files changed, 10 insertions, 1 deletions
diff --git a/sfx2/inc/sfx2/templateonlineview.hxx b/sfx2/inc/sfx2/templateonlineview.hxx
index 36372e83d82b..035456033820 100644
--- a/sfx2/inc/sfx2/templateonlineview.hxx
+++ b/sfx2/inc/sfx2/templateonlineview.hxx
@@ -11,6 +11,7 @@
#define __SFX2_TEMPLATEONLINEVIEW_HXX__
#include <sfx2/templateabstractview.hxx>
+#include <sfx2/templateproperties.hxx>
#include <com/sun/star/ucb/XCommandEnvironment.hpp>
@@ -31,7 +32,7 @@ public:
virtual void showOverlay (bool bVisible);
- bool loadRepository (const sal_uInt16 nRepositoryId);
+ bool loadRepository (const sal_uInt16 nRepositoryId, bool bRefresh);
const std::vector<TemplateOnlineViewItem*>& getRepositories () const { return maRepositories; }
diff --git a/sfx2/inc/sfx2/templateonlineviewitem.hxx b/sfx2/inc/sfx2/templateonlineviewitem.hxx
index 1d9f9cd50abc..07996b382946 100644
--- a/sfx2/inc/sfx2/templateonlineviewitem.hxx
+++ b/sfx2/inc/sfx2/templateonlineviewitem.hxx
@@ -11,6 +11,7 @@
#define __SFX2_TEMPLATEONLINEVIEWITEM_HXX__
#include <sfx2/thumbnailviewitem.hxx>
+#include <sfx2/templateproperties.hxx>
class TemplateOnlineViewItem : public ThumbnailViewItem
{
@@ -24,9 +25,16 @@ public:
const rtl::OUString& getURL () const { return maUrl; }
+ void insertTemplate (const TemplateItemProperties &prop) { maTemplates.push_back(prop); }
+
+ void clearTemplates () { maTemplates.clear(); }
+
+ const std::vector<TemplateItemProperties>& getTemplates () const { return maTemplates; }
+
private:
rtl::OUString maUrl;
+ std::vector<TemplateItemProperties> maTemplates;
};
#endif // __SFX2_TEMPLATEONLINEVIEWITEM_HXX__