summaryrefslogtreecommitdiff
path: root/sfx2/source/dialog/backingwindow.cxx
diff options
context:
space:
mode:
authorAkshay Deep <akshaydeepiitr@gmail.com>2016-06-17 12:59:44 +0530
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2016-06-17 08:05:15 +0000
commit59c45c8e6d16cb145f3551f9ecd1a3c45ca5d4d8 (patch)
treea34a92fd8c7ae7bce07c76f66a2aafdb4a6c11ec /sfx2/source/dialog/backingwindow.cxx
parent48b7176fc09279d06d12fbab5619770767faad60 (diff)
tdf#90577 Start Center: Clear List item should more accessible
Change-Id: Id7179ec32f2f9306fde98e1b7449861c809111f8 Reviewed-on: https://gerrit.libreoffice.org/26404 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'sfx2/source/dialog/backingwindow.cxx')
-rw-r--r--sfx2/source/dialog/backingwindow.cxx71
1 files changed, 41 insertions, 30 deletions
diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx
index 350dc4a55e46..730627ca1733 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -25,6 +25,7 @@
#include <vcl/virdev.hxx>
#include <unotools/dynamicmenuoptions.hxx>
+#include <unotools/historyoptions.hxx>
#include <svtools/openfiledroptargetlistener.hxx>
#include <svtools/colorcfg.hxx>
#include <svtools/langhelp.hxx>
@@ -260,6 +261,7 @@ void BackingWindow::initControls()
mpLocalView->Hide();
mpTemplateButton->SetMenuMode( MENUBUTTON_MENUMODE_TIMED );
+ mpRecentButton->SetMenuMode( MENUBUTTON_MENUMODE_TIMED );
//set handlers
mpLocalView->setCreateContextMenuHdl(LINK(this, BackingWindow, CreateContextMenuHdl));
@@ -587,43 +589,52 @@ IMPL_LINK_TYPED( BackingWindow, ClickHdl, Button*, pButton, void )
IMPL_LINK_TYPED( BackingWindow, MenuSelectHdl, MenuButton*, pButton, void )
{
- initializeLocalView();
-
- OString sId = pButton->GetCurItemIdent();
-
- if( sId == "filter_writer" )
+ if(pButton == mpRecentButton)
{
- mpLocalView->filterItems(ViewFilter_Application(FILTER_APPLICATION::WRITER));
- }
- else if( sId == "filter_calc" )
- {
- mpLocalView->filterItems(ViewFilter_Application(FILTER_APPLICATION::CALC));
- }
- else if( sId == "filter_impress" )
- {
- mpLocalView->filterItems(ViewFilter_Application(FILTER_APPLICATION::IMPRESS));
- }
- else if( sId == "filter_draw" )
- {
- mpLocalView->filterItems(ViewFilter_Application(FILTER_APPLICATION::DRAW));
+ SvtHistoryOptions().Clear(ePICKLIST);
+ mpAllRecentThumbnails->Reload();
+ return;
}
- else if( sId == "manage" )
+ else if(pButton == mpTemplateButton)
{
- Reference< XDispatchProvider > xFrame( mxFrame, UNO_QUERY );
+ initializeLocalView();
- Sequence< css::beans::PropertyValue > aArgs(1);
- PropertyValue* pArg = aArgs.getArray();
- pArg[0].Name = "Referer";
- pArg[0].Value <<= OUString("private:user");
+ OString sId = pButton->GetCurItemIdent();
- dispatchURL( ".uno:NewDoc", OUString(), xFrame, aArgs );
+ if( sId == "filter_writer" )
+ {
+ mpLocalView->filterItems(ViewFilter_Application(FILTER_APPLICATION::WRITER));
+ }
+ else if( sId == "filter_calc" )
+ {
+ mpLocalView->filterItems(ViewFilter_Application(FILTER_APPLICATION::CALC));
+ }
+ else if( sId == "filter_impress" )
+ {
+ mpLocalView->filterItems(ViewFilter_Application(FILTER_APPLICATION::IMPRESS));
+ }
+ else if( sId == "filter_draw" )
+ {
+ mpLocalView->filterItems(ViewFilter_Application(FILTER_APPLICATION::DRAW));
+ }
+ else if( sId == "manage" )
+ {
+ Reference< XDispatchProvider > xFrame( mxFrame, UNO_QUERY );
- }
+ Sequence< css::beans::PropertyValue > aArgs(1);
+ PropertyValue* pArg = aArgs.getArray();
+ pArg[0].Name = "Referer";
+ pArg[0].Value <<= OUString("private:user");
- mpAllRecentThumbnails->Hide();
- mpLocalView->Show();
- mpLocalView->reload();
- mpLocalView->GrabFocus();
+ dispatchURL( ".uno:NewDoc", OUString(), xFrame, aArgs );
+
+ }
+
+ mpAllRecentThumbnails->Hide();
+ mpLocalView->Show();
+ mpLocalView->reload();
+ mpLocalView->GrabFocus();
+ }
}
IMPL_LINK_TYPED(BackingWindow, CreateContextMenuHdl, ThumbnailViewItem*, pItem, void)