summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/slidesorter/controller/SlsSlotManager.cxx12
-rw-r--r--sd/source/ui/slidesorter/model/SlideSorterModel.cxx23
2 files changed, 31 insertions, 4 deletions
diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
index adcc0da4ad82..a97ccb7d0588 100644
--- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
@@ -113,11 +113,11 @@ SlideExclusionState GetSlideExclusionState (model::PageEnumeration& rPageSet);
namespace {
-void collectUIInformation(const OUString& num,const OUString& action)
+void collectUIInformation(const std::map<OUString, OUString>& aParameters,const OUString& action)
{
EventDescription aDescription;
aDescription.aID = "impress_win_or_draw_win";
- aDescription.aParameters = {{"POS", num}};
+ aDescription.aParameters = aParameters;
aDescription.aAction = action;
aDescription.aKeyWord = "ImpressWindowUIObject";
aDescription.aParent = "MainWindow";
@@ -918,6 +918,8 @@ void SlotManager::RenameSlide(const SfxRequest& rRequest)
ScopedVclPtr<AbstractSvxNameDialog> aNameDlg(pFact->CreateSvxNameDialog(
pWin ? pWin->GetFrameWeld() : nullptr,
aPageName, aDescr));
+ OUString aOldName;
+ aNameDlg->GetName( aOldName );
aNameDlg->SetText( aTitle );
aNameDlg->SetCheckNameHdl( LINK( this, SlotManager, RenameSlideHdl ), true );
aNameDlg->SetEditHelpId( HID_SD_NAMEDIALOG_PAGE );
@@ -934,6 +936,9 @@ void SlotManager::RenameSlide(const SfxRequest& rRequest)
DBG_ASSERT( bResult, "Couldn't rename slide" );
}
}
+ OUString aNewName;
+ aNameDlg->GetName( aNewName );
+ collectUIInformation({{"OldName",aOldName},{"NewName",aNewName}},"RENAME");
aNameDlg.disposeAndClear();
}
// Tell the slide sorter about the name change (necessary for
@@ -1100,7 +1105,7 @@ void SlotManager::InsertSlide (SfxRequest& rRequest)
PageSelector::UpdateLock aUpdateLock (mrSlideSorter);
mrSlideSorter.GetController().GetPageSelector().DeselectAllPages();
mrSlideSorter.GetController().GetPageSelector().SelectPage(pNewPage);
- collectUIInformation(OUString::number(nInsertionIndex+2),"Insert_New_Page_or_Slide");
+ collectUIInformation({{"POS", OUString::number(nInsertionIndex+2)}},"Insert_New_Page_or_Slide");
}
void SlotManager::DuplicateSelectedSlides (SfxRequest& rRequest)
@@ -1147,6 +1152,7 @@ void SlotManager::DuplicateSelectedSlides (SfxRequest& rRequest)
{
rSelector.SelectPage(it);
}
+ collectUIInformation({{"POS", OUString::number(nInsertPosition+2)}},"Duplicate");
}
void SlotManager::ChangeSlideExclusionState (
diff --git a/sd/source/ui/slidesorter/model/SlideSorterModel.cxx b/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
index 94e70833c4c6..7811c3b08e68 100644
--- a/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
+++ b/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
@@ -35,6 +35,9 @@
#include <com/sun/star/beans/UnknownPropertyException.hpp>
#include <com/sun/star/frame/XController.hpp>
+#include <vcl/uitest/logger.hxx>
+#include <vcl/uitest/eventdescription.hxx>
+
#include <ViewShellBase.hxx>
#include <DrawViewShell.hxx>
#include <DrawDocShell.hxx>
@@ -101,6 +104,22 @@ namespace {
}
}
+namespace {
+
+void collectUIInformation(const OUString& num,const OUString& action)
+{
+ EventDescription aDescription;
+ aDescription.aID = "impress_win_or_draw_win";
+ aDescription.aParameters = {{"POS", num}};
+ aDescription.aAction = action;
+ aDescription.aKeyWord = "ImpressWindowUIObject";
+ aDescription.aParent = "MainWindow";
+
+ UITestLogger::getInstance().logEvent(aDescription);
+}
+
+}
+
SlideSorterModel::SlideSorterModel (SlideSorter& rSlideSorter)
: maMutex(),
mrSlideSorter(rSlideSorter),
@@ -614,7 +633,9 @@ bool SlideSorterModel::DeleteSlide (const SdPage* pPage)
maPageDescriptors.erase(iter);
UpdateIndices(nIndex);
}
-
+ if(nIndex>=0){
+ collectUIInformation(OUString::number(nIndex+1),"Delete_Slide_or_Page");
+ }
return bMarkedSelected;
}