diff options
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/control/templatelocalview.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/control/templateview.cxx | 5 | ||||
-rw-r--r-- | sfx2/source/control/thumbnailview.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/control/thumbnailviewitem.cxx | 4 |
4 files changed, 9 insertions, 7 deletions
diff --git a/sfx2/source/control/templatelocalview.cxx b/sfx2/source/control/templatelocalview.cxx index e42f9c8a243d..0bb12dc9ce82 100644 --- a/sfx2/source/control/templatelocalview.cxx +++ b/sfx2/source/control/templatelocalview.cxx @@ -571,7 +571,7 @@ bool TemplateLocalView::isTemplateNameUnique(const sal_uInt16 nRegionItemId, con return true; } -void TemplateLocalView::renameItem(ThumbnailViewItem* pItem, rtl::OUString sNewTitle) +bool TemplateLocalView::renameItem(ThumbnailViewItem* pItem, rtl::OUString sNewTitle) { sal_uInt16 nRegionId = 0; sal_uInt16 nDocId = USHRT_MAX; @@ -586,7 +586,7 @@ void TemplateLocalView::renameItem(ThumbnailViewItem* pItem, rtl::OUString sNewT { nRegionId = pContainerItem->mnId - 1; } - mpDocTemplates->SetName( sNewTitle, nRegionId, nDocId ); + return mpDocTemplates->SetName( sNewTitle, nRegionId, nDocId ); } static void lcl_updateThumbnails (TemplateContainerItem *pItem) diff --git a/sfx2/source/control/templateview.cxx b/sfx2/source/control/templateview.cxx index 7073a6f90474..21b260389b0b 100644 --- a/sfx2/source/control/templateview.cxx +++ b/sfx2/source/control/templateview.cxx @@ -100,10 +100,11 @@ void TemplateView::Resize() ThumbnailView::Resize(); } -void TemplateView::renameItem(ThumbnailViewItem* pItem, rtl::OUString sNewTitle) +bool TemplateView::renameItem(ThumbnailViewItem* pItem, rtl::OUString sNewTitle) { if (mpMasterView) - mpMasterView->renameItem(pItem, sNewTitle); + return mpMasterView->renameItem(pItem, sNewTitle); + return false; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx index a1c08980161a..4cff5377cf64 100644 --- a/sfx2/source/control/thumbnailview.cxx +++ b/sfx2/source/control/thumbnailview.cxx @@ -969,9 +969,10 @@ void ThumbnailView::sortItems (const boost::function<bool (const ThumbnailViewIt Invalidate(); } -void ThumbnailView::renameItem(ThumbnailViewItem*, rtl::OUString) +bool ThumbnailView::renameItem(ThumbnailViewItem*, rtl::OUString) { // Do nothing by default + return false; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/control/thumbnailviewitem.cxx b/sfx2/source/control/thumbnailviewitem.cxx index c228babd21c5..2a83bc175774 100644 --- a/sfx2/source/control/thumbnailviewitem.cxx +++ b/sfx2/source/control/thumbnailviewitem.cxx @@ -187,8 +187,8 @@ void ThumbnailViewItem::updateTitleEditSize() void ThumbnailViewItem::setTitle (const rtl::OUString& rTitle) { - mrParent.renameItem(this, rTitle); - maTitle = rTitle; + if (mrParent.renameItem(this, rTitle)) + maTitle = rTitle; } uno::Reference< accessibility::XAccessible > ThumbnailViewItem::GetAccessible( bool bIsTransientChildrenDisabled ) |