summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAriel Constenla-Haile <arielch@apache.org>2013-05-25 22:10:31 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-05-26 20:39:03 +0100
commit16db62a9c0894e655d8ecc82c8ed64db94187c75 (patch)
treef663b2eee4338924c8712e54b6b057b4f1941b32
parent1e85fc5b2d8aeafb12f414c6bf0692fb2ca221eb (diff)
Recent file list: small fix when no documents
(cherry picked from commit da18984094aa5ae4a66731bf581103298b133738) Change-Id: I56413b68d28b206212561dcbf662940862cebeb7
-rw-r--r--framework/source/uielement/recentfilesmenucontroller.cxx4
1 files changed, 3 insertions, 1 deletions
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 );
}
}
}