From 9c94045bd2802a3f7e8c286b4082a55fe43a666d Mon Sep 17 00:00:00 2001 From: Rafael Dominguez Date: Tue, 21 Aug 2012 18:00:39 -0430 Subject: Rename class from TemplateOnlineView to TemplateRemoteView. Change-Id: I3d1cc00274c4f758cb4e8e6a09cea9cb63b0a733 --- sfx2/inc/sfx2/templateonlineview.hxx | 64 -------------------------------- sfx2/inc/sfx2/templateonlineviewitem.hxx | 42 --------------------- sfx2/inc/sfx2/templateremoteview.hxx | 64 ++++++++++++++++++++++++++++++++ sfx2/inc/sfx2/templateremoteviewitem.hxx | 42 +++++++++++++++++++++ sfx2/inc/templatedlg.hxx | 4 +- 5 files changed, 108 insertions(+), 108 deletions(-) delete mode 100644 sfx2/inc/sfx2/templateonlineview.hxx delete mode 100644 sfx2/inc/sfx2/templateonlineviewitem.hxx create mode 100644 sfx2/inc/sfx2/templateremoteview.hxx create mode 100644 sfx2/inc/sfx2/templateremoteviewitem.hxx (limited to 'sfx2/inc') diff --git a/sfx2/inc/sfx2/templateonlineview.hxx b/sfx2/inc/sfx2/templateonlineview.hxx deleted file mode 100644 index d64f94762ebe..000000000000 --- a/sfx2/inc/sfx2/templateonlineview.hxx +++ /dev/null @@ -1,64 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -#ifndef __SFX2_TEMPLATEONLINEVIEW_HXX__ -#define __SFX2_TEMPLATEONLINEVIEW_HXX__ - -#include -#include - -#include - -class TemplateOnlineViewItem; - -class TemplateOnlineView : public TemplateAbstractView -{ -public: - - TemplateOnlineView (Window *pParent, WinBits nWinStyle, bool bDisableTransientChildren); - - virtual ~TemplateOnlineView (); - - // Load repositories from user settings. - virtual void Populate (); - - virtual void reload (); - - virtual void filterTemplatesByApp (const FILTER_APPLICATION &eApp); - - virtual void showOverlay (bool bVisible); - - void setOverlayChangeNameHdl (const Link &rLink); - - bool loadRepository (const sal_uInt16 nRepositoryId, bool bRefresh); - - const std::vector& getRepositories () const { return maRepositories; } - - bool insertRepository (const OUString &rName, const OUString &rURL); - - bool deleteRepository (const sal_uInt16 nRepositoryId); - - void syncRepositories () const; - -private: - - DECL_LINK(ChangeNameHdl, TemplateView*); - -private: - - bool mbIsSynced; - Link maChangeNameHdl; - std::vector maRepositories; - com::sun::star::uno::Reference< com::sun::star::ucb::XCommandEnvironment > m_xCmdEnv; -}; - -#endif // __SFX2_TEMPLATEONLINEVIEW_HXX__ - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/inc/sfx2/templateonlineviewitem.hxx b/sfx2/inc/sfx2/templateonlineviewitem.hxx deleted file mode 100644 index 07996b382946..000000000000 --- a/sfx2/inc/sfx2/templateonlineviewitem.hxx +++ /dev/null @@ -1,42 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -#ifndef __SFX2_TEMPLATEONLINEVIEWITEM_HXX__ -#define __SFX2_TEMPLATEONLINEVIEWITEM_HXX__ - -#include -#include - -class TemplateOnlineViewItem : public ThumbnailViewItem -{ -public: - - TemplateOnlineViewItem (ThumbnailView &rView, Window *pParent); - - virtual ~TemplateOnlineViewItem (); - - void setURL (const rtl::OUString &rURL) { maUrl = rURL; } - - const rtl::OUString& getURL () const { return maUrl; } - - void insertTemplate (const TemplateItemProperties &prop) { maTemplates.push_back(prop); } - - void clearTemplates () { maTemplates.clear(); } - - const std::vector& getTemplates () const { return maTemplates; } - -private: - - rtl::OUString maUrl; - std::vector maTemplates; -}; - -#endif // __SFX2_TEMPLATEONLINEVIEWITEM_HXX__ - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/inc/sfx2/templateremoteview.hxx b/sfx2/inc/sfx2/templateremoteview.hxx new file mode 100644 index 000000000000..bbea147415b5 --- /dev/null +++ b/sfx2/inc/sfx2/templateremoteview.hxx @@ -0,0 +1,64 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef __SFX2_TEMPLATEREMOTEVIEW_HXX__ +#define __SFX2_TEMPLATEREMOTEVIEW_HXX__ + +#include +#include + +#include + +class TemplateRemoteViewItem; + +class TemplateRemoteView : public TemplateAbstractView +{ +public: + + TemplateRemoteView (Window *pParent, WinBits nWinStyle, bool bDisableTransientChildren); + + virtual ~TemplateRemoteView (); + + // Load repositories from user settings. + virtual void Populate (); + + virtual void reload (); + + virtual void filterTemplatesByApp (const FILTER_APPLICATION &eApp); + + virtual void showOverlay (bool bVisible); + + void setOverlayChangeNameHdl (const Link &rLink); + + bool loadRepository (const sal_uInt16 nRepositoryId, bool bRefresh); + + const std::vector& getRepositories () const { return maRepositories; } + + bool insertRepository (const OUString &rName, const OUString &rURL); + + bool deleteRepository (const sal_uInt16 nRepositoryId); + + void syncRepositories () const; + +private: + + DECL_LINK(ChangeNameHdl, TemplateView*); + +private: + + bool mbIsSynced; + Link maChangeNameHdl; + std::vector maRepositories; + com::sun::star::uno::Reference< com::sun::star::ucb::XCommandEnvironment > m_xCmdEnv; +}; + +#endif // __SFX2_TEMPLATEREMOTEVIEW_HXX__ + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/inc/sfx2/templateremoteviewitem.hxx b/sfx2/inc/sfx2/templateremoteviewitem.hxx new file mode 100644 index 000000000000..396b9652e4ee --- /dev/null +++ b/sfx2/inc/sfx2/templateremoteviewitem.hxx @@ -0,0 +1,42 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef __SFX2_TEMPLATEREMOTEVIEWITEM_HXX__ +#define __SFX2_TEMPLATEREMOTEVIEWITEM_HXX__ + +#include +#include + +class TemplateRemoteViewItem : public ThumbnailViewItem +{ +public: + + TemplateRemoteViewItem (ThumbnailView &rView, Window *pParent); + + virtual ~TemplateRemoteViewItem (); + + void setURL (const rtl::OUString &rURL) { maUrl = rURL; } + + const rtl::OUString& getURL () const { return maUrl; } + + void insertTemplate (const TemplateItemProperties &prop) { maTemplates.push_back(prop); } + + void clearTemplates () { maTemplates.clear(); } + + const std::vector& getTemplates () const { return maTemplates; } + +private: + + rtl::OUString maUrl; + std::vector maTemplates; +}; + +#endif // __SFX2_TEMPLATEREMOTEVIEWITEM_HXX__ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/inc/templatedlg.hxx b/sfx2/inc/templatedlg.hxx index 7d6940cf9428..5ba2a8741d4b 100644 --- a/sfx2/inc/templatedlg.hxx +++ b/sfx2/inc/templatedlg.hxx @@ -20,7 +20,7 @@ class PopupMenu; class SfxTemplateInfoDlg; class TemplateAbstractView; class TemplateLocalView; -class TemplateOnlineView; +class TemplateRemoteView; class TemplateSearchView; class ThumbnailView; class ThumbnailViewItem; @@ -132,7 +132,7 @@ private: TemplateSearchView *mpSearchView; TemplateAbstractView *mpCurView; TemplateLocalView *maView; - TemplateOnlineView *mpOnlineView; + TemplateRemoteView *mpOnlineView; PopupMenu *mpActionMenu; PopupMenu *mpRepositoryMenu; PopupMenu *mpTemplateDefaultMenu; -- cgit