diff options
author | Cédric Bosdonnat <cedric.bosdonnat@free.fr> | 2012-12-17 22:23:46 +0100 |
---|---|---|
committer | Cédric Bosdonnat <cedric.bosdonnat@free.fr> | 2012-12-18 09:30:15 +0100 |
commit | 2a383bb7e3b9c3429cc6b7090fcd99c0209c4275 (patch) | |
tree | fb4a946c3d7d894a0543eee108048546aa577a00 /sfx2 | |
parent | sfx2: rename TemplateRemoteViewItem to TemplateRepository (diff) | |
download | core-2a383bb7e3b9c3429cc6b7090fcd99c0209c4275.tar.gz core-2a383bb7e3b9c3429cc6b7090fcd99c0209c4275.zip |
sfx2: renamed TemplateLocalViewItem into TemplateContainerItem
Change-Id: I8ff318a7bcad21c4fe8d5dda818fad5763a6ff02
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/inc/sfx2/templatelocalview.hxx | 6 | ||||
-rw-r--r-- | sfx2/inc/sfx2/templatelocalviewitem.hxx | 8 | ||||
-rw-r--r-- | sfx2/source/control/templatelocalview.cxx | 56 | ||||
-rw-r--r-- | sfx2/source/control/templatelocalviewitem.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/doc/templatedlg.cxx | 4 |
5 files changed, 39 insertions, 41 deletions
diff --git a/sfx2/inc/sfx2/templatelocalview.hxx b/sfx2/inc/sfx2/templatelocalview.hxx index dac7fedf8634..c5a1f848c875 100644 --- a/sfx2/inc/sfx2/templatelocalview.hxx +++ b/sfx2/inc/sfx2/templatelocalview.hxx @@ -16,7 +16,7 @@ #include <sfx2/templateproperties.hxx> class SfxDocumentTemplates; -class TemplateLocalViewItem; +class TemplateContainerItem; namespace com { namespace sun { namespace star { namespace frame { @@ -59,7 +59,7 @@ public: bool copyFrom (const sal_uInt16 nRegionItemId, const BitmapEx &rThumbnail, const OUString &rPath); - bool copyFrom(TemplateLocalViewItem *pItem, const OUString &rPath); + bool copyFrom(TemplateContainerItem *pItem, const OUString &rPath); bool exportTo (const sal_uInt16 nItemId, const sal_uInt16 nRegionItemId, const OUString &rName); @@ -67,7 +67,7 @@ public: com::sun::star::uno::Reference<com::sun::star::frame::XModel> &rModel, const OUString &rName); - bool saveTemplateAs (const TemplateLocalViewItem *pDstItem, + bool saveTemplateAs (const TemplateContainerItem *pDstItem, com::sun::star::uno::Reference<com::sun::star::frame::XModel> &rModel, const OUString &rName); diff --git a/sfx2/inc/sfx2/templatelocalviewitem.hxx b/sfx2/inc/sfx2/templatelocalviewitem.hxx index 739f70ed46af..2c2d18bafb51 100644 --- a/sfx2/inc/sfx2/templatelocalviewitem.hxx +++ b/sfx2/inc/sfx2/templatelocalviewitem.hxx @@ -13,18 +13,16 @@ #include <sfx2/templateproperties.hxx> #include <sfx2/thumbnailviewitem.hxx> -class TemplateViewItem; - -class TemplateLocalViewItem : public ThumbnailViewItem +class TemplateContainerItem : public ThumbnailViewItem { public: BitmapEx maPreview2; std::vector<TemplateItemProperties> maTemplates; - TemplateLocalViewItem (ThumbnailView &rView); + TemplateContainerItem (ThumbnailView &rView); - virtual ~TemplateLocalViewItem (); + virtual ~TemplateContainerItem (); const Point& getPrev2Pos () const { return maPrev2Pos; } diff --git a/sfx2/source/control/templatelocalview.cxx b/sfx2/source/control/templatelocalview.cxx index 749eaa0fbfde..5da77d6395f9 100644 --- a/sfx2/source/control/templatelocalview.cxx +++ b/sfx2/source/control/templatelocalview.cxx @@ -30,7 +30,7 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::frame; -static void lcl_updateThumbnails (TemplateLocalViewItem *pItem); +static void lcl_updateThumbnails (TemplateContainerItem *pItem); class FolderFilter_Application : public ViewFilter_Application { @@ -43,7 +43,7 @@ public: bool operator () (const ThumbnailViewItem *pItem) { - TemplateLocalViewItem *pFolderItem = (TemplateLocalViewItem*)pItem; + TemplateContainerItem *pFolderItem = (TemplateContainerItem*)pItem; std::vector<TemplateItemProperties> &rTemplates = pFolderItem->maTemplates; @@ -109,7 +109,7 @@ void TemplateLocalView::Populate () aRegionName += "..."; } - TemplateLocalViewItem* pItem = new TemplateLocalViewItem( *this ); + TemplateContainerItem* pItem = new TemplateContainerItem( *this ); pItem->mnId = i+1; pItem->maTitle = aRegionName; pItem->setSelectClickHdl(LINK(this,ThumbnailView,OnItemSelected)); @@ -168,7 +168,7 @@ void TemplateLocalView::reload () if (mItemList[i]->mnId == nItemId) { mpItemView->Clear(); - mpItemView->InsertItems(static_cast<TemplateLocalViewItem*>(mItemList[i])->maTemplates); + mpItemView->InsertItems(static_cast<TemplateContainerItem*>(mItemList[i])->maTemplates); break; } } @@ -228,7 +228,7 @@ TemplateLocalView::getFilteredItems(const boost::function<bool (const TemplateIt for (size_t i = 0; i < mItemList.size(); ++i) { - TemplateLocalViewItem *pFolderItem = static_cast<TemplateLocalViewItem*>(mItemList[i]); + TemplateContainerItem *pFolderItem = static_cast<TemplateContainerItem*>(mItemList[i]); for (size_t j = 0; j < pFolderItem->maTemplates.size(); ++j) { @@ -255,7 +255,7 @@ sal_uInt16 TemplateLocalView::createRegion(const OUString &rName) aRegionName += "..."; } - TemplateLocalViewItem* pItem = new TemplateLocalViewItem( *this ); + TemplateContainerItem* pItem = new TemplateContainerItem( *this ); pItem->mnId = nRegionId+1; pItem->maTitle = aRegionName; pItem->setSelectClickHdl(LINK(this,ThumbnailView,OnItemSelected)); @@ -290,7 +290,7 @@ bool TemplateLocalView::removeTemplate (const sal_uInt16 nItemId, const sal_uInt { if (mItemList[i]->mnId == nSrcItemId) { - TemplateLocalViewItem *pItem = static_cast<TemplateLocalViewItem*>(mItemList[i]); + TemplateContainerItem *pItem = static_cast<TemplateContainerItem*>(mItemList[i]); std::vector<TemplateItemProperties>::iterator pIter; for (pIter = pItem->maTemplates.begin(); pIter != pItem->maTemplates.end(); ++pIter) { @@ -328,15 +328,15 @@ bool TemplateLocalView::moveTemplate (const ThumbnailViewItem *pItem, const sal_ bool bRet = true; bool bRefresh = false; - TemplateLocalViewItem *pTarget = NULL; - TemplateLocalViewItem *pSrc = NULL; + TemplateContainerItem *pTarget = NULL; + TemplateContainerItem *pSrc = NULL; for (size_t i = 0, n = mItemList.size(); i < n; ++i) { if (mItemList[i]->mnId == nTargetItem) - pTarget = static_cast<TemplateLocalViewItem*>(mItemList[i]); + pTarget = static_cast<TemplateContainerItem*>(mItemList[i]); else if (mItemList[i]->mnId == nSrcItem) - pSrc = static_cast<TemplateLocalViewItem*>(mItemList[i]); + pSrc = static_cast<TemplateContainerItem*>(mItemList[i]); } if (pTarget && pSrc) @@ -417,15 +417,15 @@ bool TemplateLocalView::moveTemplates(std::set<const ThumbnailViewItem *> &rItem sal_uInt16 nSrcRegionId = mpItemView->getId(); sal_uInt16 nSrcRegionItemId = nSrcRegionId + 1; - TemplateLocalViewItem *pTarget = NULL; - TemplateLocalViewItem *pSrc = NULL; + TemplateContainerItem *pTarget = NULL; + TemplateContainerItem *pSrc = NULL; for (size_t i = 0, n = mItemList.size(); i < n; ++i) { if (mItemList[i]->mnId == nTargetItem) - pTarget = static_cast<TemplateLocalViewItem*>(mItemList[i]); + pTarget = static_cast<TemplateContainerItem*>(mItemList[i]); else if (mItemList[i]->mnId == nSrcRegionItemId) - pSrc = static_cast<TemplateLocalViewItem*>(mItemList[i]); + pSrc = static_cast<TemplateContainerItem*>(mItemList[i]); } if (pTarget && pSrc) @@ -512,8 +512,8 @@ bool TemplateLocalView::copyFrom(const sal_uInt16 nRegionItemId, const BitmapEx sal_uInt16 nId = 0; sal_uInt16 nDocId = 0; - TemplateLocalViewItem *pRegionItem = - static_cast<TemplateLocalViewItem*>(mItemList[i]); + TemplateContainerItem *pRegionItem = + static_cast<TemplateContainerItem*>(mItemList[i]); if (!pRegionItem->maTemplates.empty()) { @@ -533,8 +533,8 @@ bool TemplateLocalView::copyFrom(const sal_uInt16 nRegionItemId, const BitmapEx aTemplate.aThumbnail = rThumbnail; aTemplate.aPath = mpDocTemplates->GetPath(nRegionId,nDocId); - TemplateLocalViewItem *pItem = - static_cast<TemplateLocalViewItem*>(mItemList[i]); + TemplateContainerItem *pItem = + static_cast<TemplateContainerItem*>(mItemList[i]); pItem->maTemplates.push_back(aTemplate); @@ -550,7 +550,7 @@ bool TemplateLocalView::copyFrom(const sal_uInt16 nRegionItemId, const BitmapEx return false; } -bool TemplateLocalView::copyFrom (TemplateLocalViewItem *pItem, const OUString &rPath) +bool TemplateLocalView::copyFrom (TemplateContainerItem *pItem, const OUString &rPath) { sal_uInt16 nId = 0; sal_uInt16 nDocId = 0; @@ -595,8 +595,8 @@ bool TemplateLocalView::exportTo(const sal_uInt16 nItemId, const sal_uInt16 nReg { if (mItemList[i]->mnId == nRegionItemId) { - TemplateLocalViewItem *pRegItem = - static_cast<TemplateLocalViewItem*>(mItemList[i]); + TemplateContainerItem *pRegItem = + static_cast<TemplateContainerItem*>(mItemList[i]); std::vector<TemplateItemProperties>::iterator aIter; for (aIter = pRegItem->maTemplates.begin(); aIter != pRegItem->maTemplates.end(); ++aIter) @@ -627,7 +627,7 @@ bool TemplateLocalView::saveTemplateAs (sal_uInt16 nItemId, { if (mItemList[i]->mnId == nItemId) { - bRet = saveTemplateAs((const TemplateLocalViewItem*)mItemList[i],rModel,rName); + bRet = saveTemplateAs((const TemplateContainerItem*)mItemList[i],rModel,rName); break; } } @@ -635,7 +635,7 @@ bool TemplateLocalView::saveTemplateAs (sal_uInt16 nItemId, return bRet; } -bool TemplateLocalView::saveTemplateAs(const TemplateLocalViewItem *pDstItem, +bool TemplateLocalView::saveTemplateAs(const TemplateContainerItem *pDstItem, com::sun::star::uno::Reference<com::sun::star::frame::XModel> &rModel, const OUString &rName) { @@ -658,8 +658,8 @@ bool TemplateLocalView::isTemplateNameUnique(const sal_uInt16 nRegionItemId, con { if (mItemList[i]->mnId == nRegionItemId) { - TemplateLocalViewItem *pRegItem = - static_cast<TemplateLocalViewItem*>(mItemList[i]); + TemplateContainerItem *pRegItem = + static_cast<TemplateContainerItem*>(mItemList[i]); std::vector<TemplateItemProperties>::iterator aIter; for (aIter = pRegItem->maTemplates.begin(); aIter != pRegItem->maTemplates.end(); ++aIter) @@ -682,14 +682,14 @@ void TemplateLocalView::OnItemDblClicked (ThumbnailViewItem *pRegionItem) mpItemView->setId(nRegionId); mpItemView->setName(mpDocTemplates->GetRegionName(nRegionId)); - mpItemView->InsertItems(static_cast<TemplateLocalViewItem*>(pRegionItem)->maTemplates); + mpItemView->InsertItems(static_cast<TemplateContainerItem*>(pRegionItem)->maTemplates); mpItemView->filterItems(ViewFilter_Application(meFilterOption)); showOverlay(true); } -static void lcl_updateThumbnails (TemplateLocalViewItem *pItem) +static void lcl_updateThumbnails (TemplateContainerItem *pItem) { pItem->maPreview1.Clear(); pItem->maPreview2.Clear(); diff --git a/sfx2/source/control/templatelocalviewitem.cxx b/sfx2/source/control/templatelocalviewitem.cxx index 54ba37976453..f8d24c566f23 100644 --- a/sfx2/source/control/templatelocalviewitem.cxx +++ b/sfx2/source/control/templatelocalviewitem.cxx @@ -26,16 +26,16 @@ using namespace basegfx::tools; using namespace drawinglayer::attribute; using namespace drawinglayer::primitive2d; -TemplateLocalViewItem::TemplateLocalViewItem (ThumbnailView &rView) +TemplateContainerItem::TemplateContainerItem (ThumbnailView &rView) : ThumbnailViewItem(rView) { } -TemplateLocalViewItem::~TemplateLocalViewItem () +TemplateContainerItem::~TemplateContainerItem () { } -void TemplateLocalViewItem::Paint (drawinglayer::processor2d::BaseProcessor2D *pProcessor, +void TemplateContainerItem::Paint (drawinglayer::processor2d::BaseProcessor2D *pProcessor, const ThumbnailItemAttributes *pAttrs) { int nCount = 0; diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx index e400d2757003..b0ef5a25e6b7 100644 --- a/sfx2/source/doc/templatedlg.cxx +++ b/sfx2/source/doc/templatedlg.cxx @@ -807,7 +807,7 @@ void SfxTemplateManagerDlg::OnTemplateImport () for (pIter = maSelFolders.begin(); pIter != maSelFolders.end(); ++pIter) { OUString aTemplateList; - TemplateLocalViewItem *pFolder = (TemplateLocalViewItem*)(*pIter); + TemplateContainerItem *pFolder = (TemplateContainerItem*)(*pIter); for (size_t i = 0, n = aFiles.getLength(); i < n; ++i) { @@ -1175,7 +1175,7 @@ void SfxTemplateManagerDlg::OnTemplateSaveAs() std::set<const ThumbnailViewItem*>::const_iterator pIter; for (pIter = maSelFolders.begin(); pIter != maSelFolders.end(); ++pIter) { - TemplateLocalViewItem *pItem = (TemplateLocalViewItem*)(*pIter); + TemplateContainerItem *pItem = (TemplateContainerItem*)(*pIter); if (!maView->isTemplateNameUnique(pItem->mnId,aName)) { |