From 16db62a9c0894e655d8ecc82c8ed64db94187c75 Mon Sep 17 00:00:00 2001 From: Ariel Constenla-Haile Date: Sat, 25 May 2013 22:10:31 +0000 Subject: [PATCH] Recent file list: small fix when no documents (cherry picked from commit da18984094aa5ae4a66731bf581103298b133738) Change-Id: I56413b68d28b206212561dcbf662940862cebeb7 --- framework/source/uielement/recentfilesmenucontroller.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/framework/source/uielement/recentfilesmenucontroller.cxx b/framework/source/uielement/recentfilesmenucontroller.cxx index 2be91176217b..57cf1d258e2b 100644 --- a/framework/source/uielement/recentfilesmenucontroller.cxx +++ b/framework/source/uielement/recentfilesmenucontroller.cxx @@ -186,7 +186,9 @@ void RecentFilesMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > { // No recent documents => insert "no document" string pVCLPopupMenu->InsertItem( 1, String( FwkResId( STR_NODOCUMENT ) ) ); - pVCLPopupMenu->EnableItem( 1, sal_False ); + // Do not disable it, otherwise the Toolbar controller and MenuButton + // will display SV_RESID_STRING_NOSELECTIONPOSSIBLE instead of STR_NODOCUMENT + pVCLPopupMenu->SetItemBits( 1, pVCLPopupMenu->GetItemBits( 1 ) | MIB_NOSELECT ); } } }