summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorAhmed ElShreif <aelshreif7@gmail.com>2019-07-18 13:53:08 -0500
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2019-08-19 22:56:38 +0800
commit9545e8ac286d0e18d9526df95cbc6e7da4aca738 (patch)
tree931b690d459c08a3b324d5f3d2a64ab1572adfe4 /sw
parentbf94b044a11740323853933f0aedf55ceb143ee1 (diff)
uitest: log more events
for Calc: 1) Delete some Cells 2) Remove content from some cells 3) Insert Cells 4) Cut Cells 5) Copy Cells 6) Paste Cells 7) Merge Cells 8) Split Cell ( Delete Merge ) for Writer: 1) Insert Table 2) Copy Text 3) Cut Text 4) Paste Text 5) Inser Break Page Also, Solve some bugs in the UI logger and UNO Commands. Change-Id: Ic7cacbc20e1e400900a9760b61e8b45ae96c84ff
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/edit/edtab.cxx19
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx24
-rw-r--r--sw/source/uibase/wrtsh/wrtsh1.cxx17
3 files changed, 60 insertions, 0 deletions
diff --git a/sw/source/core/edit/edtab.cxx b/sw/source/core/edit/edtab.cxx
index fa522c6f301f..edb2510f8347 100644
--- a/sw/source/core/edit/edtab.cxx
+++ b/sw/source/core/edit/edtab.cxx
@@ -48,9 +48,25 @@
#include <mdiexp.hxx>
#include <unochart.hxx>
#include <itabenum.hxx>
+#include <vcl/uitest/logger.hxx>
+#include <vcl/uitest/eventdescription.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
+namespace {
+
+void collectUIInformation(const OUString action,const OUString aParameters)
+{
+ EventDescription aDescription;
+ aDescription.aAction = action;
+ aDescription.aParameters = {{"parameters",aParameters}};
+ aDescription.aID = "writer_edit";
+ aDescription.aKeyWord = "SwEditWinUIObject";
+ aDescription.aParent = "MainWindow";
+ UITestLogger::getInstance().logEvent(aDescription);
+}
+
+}
//Added for bug #i119954# Application crashed if undo/redo convert nest table to text
static bool ConvertTableToText( const SwTableNode *pTableNode, sal_Unicode cCh );
@@ -113,6 +129,9 @@ const SwTable& SwEditShell::InsertTable( const SwInsertTableOptions& rInsTableOp
EndUndo( SwUndoId::END );
EndAllAction();
+ OUString parameter = " Columns : " + OUString::number( nCols )+ " , Rows : " +OUString::number( nRows ) +" ";
+ collectUIInformation("CREATE_TABLE",parameter);
+
return *pTable;
}
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index f4b8bf904532..8a192441b769 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -138,6 +138,8 @@
#include <iodetect.hxx>
#include <unotextrange.hxx>
#include <unoframe.hxx>
+#include <vcl/uitest/logger.hxx>
+#include <vcl/uitest/eventdescription.hxx>
#include <vcl/GraphicNativeTransform.hxx>
#include <vcl/GraphicNativeMetadata.hxx>
@@ -161,6 +163,20 @@ using namespace ::svx;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::datatransfer;
+namespace {
+
+void collectUIInformation(const OUString action,const OUString aParameters)
+{
+ EventDescription aDescription;
+ aDescription.aAction = action;
+ aDescription.aParameters = {{"parameters",aParameters}};
+ aDescription.aID = "writer_edit";
+ aDescription.aKeyWord = "SwEditWinUIObject";
+ aDescription.aParent = "MainWindow";
+ UITestLogger::getInstance().logEvent(aDescription);
+}
+
+}
#define DDE_TXT_ENCODING osl_getThreadTextEncoding()
@@ -830,6 +846,7 @@ int SwTransferable::Cut()
int nRet = Copy( true );
if( nRet )
DeleteSelection();
+ collectUIInformation("CUT","parameter");
return nRet;
}
@@ -1094,6 +1111,11 @@ int SwTransferable::Copy( bool bIsCut )
{
CopyToClipboard( &m_pWrtShell->GetView().GetEditWin() );
}
+
+ if( !bIsCut ){
+ collectUIInformation("COPY","parameter");
+ }
+
return nRet;
}
@@ -1411,6 +1433,8 @@ bool SwTransferable::Paste(SwWrtShell& rSh, TransferableDataHelper& rData, RndSt
}
}
+ collectUIInformation("PASTE","parameter");
+
return EXCHG_INOUT_ACTION_NONE != nAction &&
SwTransferable::PasteData( rData, rSh, nAction, nActionFlags, nFormat,
nDestination, false, false, nullptr, 0, false, nAnchorType, bIgnoreComments, &aPasteContext );
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx
index c81e41d25c2a..87202b3cd219 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -100,6 +100,8 @@
#include <toolkit/helper/vclunohelper.hxx>
#include <sfx2/viewfrm.hxx>
+#include <vcl/uitest/logger.hxx>
+#include <vcl/uitest/eventdescription.hxx>
#include <PostItMgr.hxx>
#include <FrameControlsManager.hxx>
@@ -117,6 +119,20 @@
using namespace sw::mark;
using namespace com::sun::star;
+namespace {
+
+void collectUIInformation(const OUString action,const OUString aParameters)
+{
+ EventDescription aDescription;
+ aDescription.aAction = action;
+ aDescription.aParameters = {{"parameters",aParameters}};
+ aDescription.aID = "writer_edit";
+ aDescription.aKeyWord = "SwEditWinUIObject";
+ aDescription.aParent = "MainWindow";
+ UITestLogger::getInstance().logEvent(aDescription);
+}
+
+}
#define BITFLD_INI_LIST \
m_bClearMark = \
@@ -896,6 +912,7 @@ void SwWrtShell::InsertPageBreak(const OUString *pPageDesc, const ::boost::optio
SetAttrItem( SvxFormatBreakItem(SvxBreak::PageBefore, RES_BREAK) );
EndUndo(SwUndoId::UI_INSERT_PAGE_BREAK);
}
+ collectUIInformation("BREAK_PAGE","parameter");
}
// Insert hard page break;