diff options
-rw-r--r-- | include/vcl/uitest/logger.hxx | 10 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/controller/SlsSlotManager.cxx | 22 | ||||
-rw-r--r-- | uitest/ui_logger_dsl/Special_commands.tx | 14 | ||||
-rw-r--r-- | uitest/ui_logger_dsl/dsl_core.py | 2 | ||||
-rw-r--r-- | vcl/source/uitest/logger.cxx | 11 | ||||
-rw-r--r-- | vcl/source/uitest/uiobject.cxx | 8 |
6 files changed, 63 insertions, 4 deletions
diff --git a/include/vcl/uitest/logger.hxx b/include/vcl/uitest/logger.hxx index f707049040fe..6c8c5008541a 100644 --- a/include/vcl/uitest/logger.hxx +++ b/include/vcl/uitest/logger.hxx @@ -32,6 +32,8 @@ private: bool mbValid; + OUString app_name; + public: UITestLogger(); @@ -48,6 +50,14 @@ public: static UITestLogger& getInstance(); + void setAppName(OUString name){ + app_name=name; + } + + OUString getAppName(){ + return app_name; + } + }; #endif diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx index 8c40b7647807..adcc0da4ad82 100644 --- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx @@ -67,6 +67,9 @@ #include <sdabstdlg.hxx> #include <sdmod.hxx> +#include <vcl/uitest/logger.hxx> +#include <vcl/uitest/eventdescription.hxx> + #include <sfx2/request.hxx> #include <sfx2/viewfrm.hxx> #include <sfx2/bindings.hxx> @@ -84,6 +87,7 @@ #include <com/sun/star/drawing/XDrawPages.hpp> #include <vcl/svapp.hxx> + #include <memory> using namespace ::com::sun::star; @@ -106,6 +110,23 @@ SlideExclusionState GetSlideExclusionState (model::PageEnumeration& rPageSet); } // end of anonymous 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); +} + +} + SlotManager::SlotManager (SlideSorter& rSlideSorter) : mrSlideSorter(rSlideSorter) { @@ -1079,6 +1100,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"); } void SlotManager::DuplicateSelectedSlides (SfxRequest& rRequest) diff --git a/uitest/ui_logger_dsl/Special_commands.tx b/uitest/ui_logger_dsl/Special_commands.tx index 5fbd9972a275..1d11067424a9 100644 --- a/uitest/ui_logger_dsl/Special_commands.tx +++ b/uitest/ui_logger_dsl/Special_commands.tx @@ -128,17 +128,19 @@ select_options: This part for all the impress log statments: 1) Type - 2) Set zoom + 2) Insert New Page then we can add whatever we need in the future */ impress_command: - impress_Type_command + impress_Type_command | impress_Insert_Slide ; impress_Type_command: 'Type on impress ' what_to_type=Type_options ; - +impress_Insert_Slide: + 'Insert New Slide at Position ' position_num=INT +; //=================================================================// /* This part for all the math log statments: @@ -163,12 +165,16 @@ math_Type_command: This part for all the draw log statments: 1) Type + 2) Insert New Page then we can add whatever we need in the future */ draw_command: - draw_Type_command + draw_Type_command | draw_Insert_Page ; draw_Type_command: 'Type on draw ' what_to_type=Type_options +; +draw_Insert_Page: + 'Insert New Page at Position ' position_num=INT ;
\ No newline at end of file diff --git a/uitest/ui_logger_dsl/dsl_core.py b/uitest/ui_logger_dsl/dsl_core.py index 8d5a8a82ac0b..9a5f375b5aa9 100644 --- a/uitest/ui_logger_dsl/dsl_core.py +++ b/uitest/ui_logger_dsl/dsl_core.py @@ -101,6 +101,8 @@ class ul_Compiler: 'calc_Copy_Cells':self.do_nothing, 'calc_Merge_Cells':self.do_nothing, 'calc_UNMerge_Cells':self.do_nothing, + 'impress_Insert_Slide':self.do_nothing, + 'draw_Insert_Page':self.do_nothing, }) self.log_lines=self.get_log_file(self.input_address) diff --git a/vcl/source/uitest/logger.cxx b/vcl/source/uitest/logger.cxx index cf2cd8fcefe4..b9b86fdc92c5 100644 --- a/vcl/source/uitest/logger.cxx +++ b/vcl/source/uitest/logger.cxx @@ -370,6 +370,16 @@ void UITestLogger::logEvent(const EventDescription& rDescription) aLogLine = "Delete the merged " + aParameterString; } } + else if(rDescription.aID=="impress_win_or_draw_win"){ + if(rDescription.aAction=="Insert_New_Page_or_Slide"){ + if(UITestLogger::getInstance().getAppName()=="impress"){ + aLogLine = "Insert New Slide at Position " + GetValueInMapWithIndex(rDescription.aParameters,0); + } + else if(UITestLogger::getInstance().getAppName()=="draw"){ + aLogLine = "Insert New Page at Position " + GetValueInMapWithIndex(rDescription.aParameters,0); + } + } + } else if(rDescription.aParent=="element_selector"){ aLogLine ="Select element no " + rDescription.aID + " From " + rDescription.aParent; @@ -395,4 +405,5 @@ UITestLogger& UITestLogger::getInstance() return *pSVData->maWinData.m_pUITestLogger; } + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/uitest/uiobject.cxx b/vcl/source/uitest/uiobject.cxx index 0c331aa96bba..1919da040f1f 100644 --- a/vcl/source/uitest/uiobject.cxx +++ b/vcl/source/uitest/uiobject.cxx @@ -19,6 +19,8 @@ #include <vcl/dialog.hxx> #include <vcl/edit.hxx> #include <vcl/vclmedit.hxx> +#include <vcl/uitest/logger.hxx> +#include <vcl/uitest/eventdescription.hxx> #include <comphelper/string.hxx> @@ -591,26 +593,32 @@ OUString ButtonUIObject::get_action(VclEventId nEvent) const { if(mxButton->get_id()=="writer_all") { + UITestLogger::getInstance().setAppName("writer"); return "Start writer" ; } else if(mxButton->get_id()=="calc_all") { + UITestLogger::getInstance().setAppName("calc"); return "Start calc" ; } else if(mxButton->get_id()=="impress_all") { + UITestLogger::getInstance().setAppName("impress"); return "Start impress" ; } else if(mxButton->get_id()=="draw_all") { + UITestLogger::getInstance().setAppName("draw"); return "Start draw" ; } else if(mxButton->get_id()=="math_all") { + UITestLogger::getInstance().setAppName("math"); return "Start math" ; } else if(mxButton->get_id()=="database_all") { + UITestLogger::getInstance().setAppName("database"); return "Start database" ; } else{ |