summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2011-11-23 08:15:35 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2011-11-23 09:01:39 +0100
commit717438333eaa48898728ddc1f6b1394651dab48c (patch)
tree914f8d04eeb97f200df89fa213de6d472ced5bbd /sc
parent577c7ea310fa0417d2f2ca273f5541605883d2fd (diff)
ManageNames: disable paste buttons if table is empty
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/namedlg/namepast.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sc/source/ui/namedlg/namepast.cxx b/sc/source/ui/namedlg/namepast.cxx
index 9c5706142d2a..861330851626 100644
--- a/sc/source/ui/namedlg/namepast.cxx
+++ b/sc/source/ui/namedlg/namepast.cxx
@@ -70,6 +70,12 @@ ScNamePasteDlg::ScNamePasteDlg( Window * pParent, ScDocShell* pShell, bool )
maBtnPasteAll.SetClickHdl( LINK( this, ScNamePasteDlg, ButtonHdl));
maBtnClose.SetClickHdl( LINK( this, ScNamePasteDlg, ButtonHdl));
+ if (!mpTable->GetEntryCount())
+ {
+ maBtnPaste.Disable();
+ maBtnPasteAll.Disable();
+ }
+
FreeResource();
}