[Libreoffice-commits] core.git: Branch 'feature/gsoc-uitest-2019' - include/vcl vcl/source

2019-08-18 Thread Markus Mohrhard (via logerrit)
Rebased ref, commits from common ancestor:
commit 68973ed3d9d5e125fc7142e512c10d97dd41b865
Author: Markus Mohrhard 
AuthorDate: Sun Aug 18 23:34:32 2019 +0800
Commit: Markus Mohrhard 
CommitDate: Mon Aug 19 00:35:10 2019 +0800

uitest: fixed for formatting and plugin stringconstant

Change-Id: Id657c19223f20d1175f9a774357e8b1f11344fdf

diff --git a/include/vcl/uitest/logger.hxx b/include/vcl/uitest/logger.hxx
index 6c8c5008541a..450285c5c247 100644
--- a/include/vcl/uitest/logger.hxx
+++ b/include/vcl/uitest/logger.hxx
@@ -15,10 +15,32 @@
 #include 
 #include 
 
-namespace com { namespace sun { namespace star {
-namespace beans { struct PropertyValue; }
-} } }
-namespace com { namespace sun { namespace star { namespace uno { template 
 class Sequence; } } } }
+namespace com
+{
+namespace sun
+{
+namespace star
+{
+namespace beans
+{
+struct PropertyValue;
+}
+}
+}
+}
+namespace com
+{
+namespace sun
+{
+namespace star
+{
+namespace uno
+{
+template  class Sequence;
+}
+}
+}
+}
 
 struct EventDescription;
 class Control;
@@ -27,7 +49,6 @@ class KeyEvent;
 class UITEST_DLLPUBLIC UITestLogger
 {
 private:
-
 SvFileStream maStream;
 
 bool mbValid;
@@ -35,29 +56,24 @@ private:
 OUString app_name;
 
 public:
-
 UITestLogger();
 
-void logCommand(const OUString& rAction, const 
css::uno::Sequence& rArgs);
+void logCommand(const OUString& rAction,
+const css::uno::Sequence& 
rArgs);
 
-void logAction(VclPtr const & xUIElement, VclEventId nEvent);
+void logAction(VclPtr const& xUIElement, VclEventId nEvent);
 
 void log(const OUString& rString);
 
-void logKeyInput(VclPtr const & xUIElement, const KeyEvent& 
rEvent);
+void logKeyInput(VclPtr const& xUIElement, const KeyEvent& 
rEvent);
 
 void logEvent(const EventDescription& rDescription);
 
 static UITestLogger& getInstance();
 
-void setAppName(OUString name){
-app_name=name;
-}
-
-OUString getAppName(){
-return app_name;
-}
+void setAppName(OUString name) { app_name = name; }
 
+OUString getAppName() { return app_name; }
 };
 
 #endif
diff --git a/vcl/source/uitest/logger.cxx b/vcl/source/uitest/logger.cxx
index 0ecd673f9879..03c439fcbd7c 100644
--- a/vcl/source/uitest/logger.cxx
+++ b/vcl/source/uitest/logger.cxx
@@ -20,9 +20,9 @@
 #include 
 #include 
 
-namespace{
-
-bool isDialogWindow(vcl::Window const * pWindow)
+namespace
+{
+bool isDialogWindow(vcl::Window const* pWindow)
 {
 WindowType nType = pWindow->GetType();
 // DIALOG to MODALDIALOG
@@ -39,7 +39,7 @@ bool isDialogWindow(vcl::Window const * pWindow)
 return false;
 }
 
-bool isTopWindow(vcl::Window const * pWindow)
+bool isTopWindow(vcl::Window const* pWindow)
 {
 WindowType eType = pWindow->GetType();
 if (eType == WindowType::FLOATINGWINDOW)
@@ -60,17 +60,16 @@ vcl::Window* get_top_parent(vcl::Window* pWindow)
 
 return get_top_parent(pParent);
 }
-
-
 }
-UITestLogger::UITestLogger():
-maStream(),
-mbValid(false)
+UITestLogger::UITestLogger()
+: maStream()
+, mbValid(false)
 {
 static const char* pFile = std::getenv("LO_COLLECT_UIINFO");
 if (pFile)
 {
-OUString aDirPath("${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" 
SAL_CONFIGFILE("bootstrap") ":UserInstallation}/uitest/");
+OUString aDirPath("${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER
+  "/" SAL_CONFIGFILE("bootstrap") 
":UserInstallation}/uitest/");
 rtl::Bootstrap::expandMacros(aDirPath);
 osl::Directory::createPath(aDirPath);
 OUString aFilePath = aDirPath + OUString::fromUtf8(pFile);
@@ -80,7 +79,8 @@ UITestLogger::UITestLogger():
 }
 }
 
-void UITestLogger::logCommand(const OUString& rAction, const 
css::uno::Sequence< css::beans::PropertyValue >& rArgs)
+void UITestLogger::logCommand(const OUString& rAction,
+  const 
css::uno::Sequence& rArgs)
 {
 if (!mbValid)
 return;
@@ -126,10 +126,10 @@ void UITestLogger::logCommand(const OUString& rAction, 
const css::uno::Sequence<
 maStream.WriteLine(OUStringToOString(aCommand, RTL_TEXTENCODING_UTF8));
 }
 
-namespace {
-
+namespace
+{
 // most likely this should be recursive
-bool child_windows_have_focus(VclPtr const & xUIElement)
+bool child_windows_have_focus(VclPtr const& xUIElement)
 {
 sal_Int32 nCount = xUIElement->GetChildCount();
 for (sal_Int32 i = 0; i < nCount; ++i)
@@ -144,10 +144,9 @@ bool child_windows_have_focus(VclPtr const & 
xUIElement)
 }
 return false;
 }
-
 }
 
-void UITestLogger::logAction(VclPtr const & xUIElement, VclEventId 
nEvent)
+void UITestLogger::logAction(VclPtr const& xUIElement, VclEventId 
nEvent)
 {
 if (!mbValid)
 return;
@@ -177,14 +176,14 @@ void UITestLogger::log(const OUString& rString)
 maStream.WriteLine(OUStringToOString(rString, RTL_TEXTENCODING_UTF8));
 }
 
-void UITestLogger::logKeyInput(VclPtr const & xUIElement, const 
KeyEvent& 

[Libreoffice-commits] core.git: Branch 'feature/gsoc-uitest-2019' - include/vcl vcl/source

2019-08-18 Thread Markus Mohrhard (via logerrit)
Rebased ref, commits from common ancestor:
commit 94e98f8fae5283eecdb56dc84c56739fc9d7d75e
Author: Markus Mohrhard 
AuthorDate: Sun Aug 18 23:34:32 2019 +0800
Commit: Markus Mohrhard 
CommitDate: Mon Aug 19 00:16:37 2019 +0800

uitest: fixed for formatting and plugin stringconstant

Change-Id: Id657c19223f20d1175f9a774357e8b1f11344fdf

diff --git a/include/vcl/uitest/logger.hxx b/include/vcl/uitest/logger.hxx
index 6c8c5008541a..450285c5c247 100644
--- a/include/vcl/uitest/logger.hxx
+++ b/include/vcl/uitest/logger.hxx
@@ -15,10 +15,32 @@
 #include 
 #include 
 
-namespace com { namespace sun { namespace star {
-namespace beans { struct PropertyValue; }
-} } }
-namespace com { namespace sun { namespace star { namespace uno { template 
 class Sequence; } } } }
+namespace com
+{
+namespace sun
+{
+namespace star
+{
+namespace beans
+{
+struct PropertyValue;
+}
+}
+}
+}
+namespace com
+{
+namespace sun
+{
+namespace star
+{
+namespace uno
+{
+template  class Sequence;
+}
+}
+}
+}
 
 struct EventDescription;
 class Control;
@@ -27,7 +49,6 @@ class KeyEvent;
 class UITEST_DLLPUBLIC UITestLogger
 {
 private:
-
 SvFileStream maStream;
 
 bool mbValid;
@@ -35,29 +56,24 @@ private:
 OUString app_name;
 
 public:
-
 UITestLogger();
 
-void logCommand(const OUString& rAction, const 
css::uno::Sequence& rArgs);
+void logCommand(const OUString& rAction,
+const css::uno::Sequence& 
rArgs);
 
-void logAction(VclPtr const & xUIElement, VclEventId nEvent);
+void logAction(VclPtr const& xUIElement, VclEventId nEvent);
 
 void log(const OUString& rString);
 
-void logKeyInput(VclPtr const & xUIElement, const KeyEvent& 
rEvent);
+void logKeyInput(VclPtr const& xUIElement, const KeyEvent& 
rEvent);
 
 void logEvent(const EventDescription& rDescription);
 
 static UITestLogger& getInstance();
 
-void setAppName(OUString name){
-app_name=name;
-}
-
-OUString getAppName(){
-return app_name;
-}
+void setAppName(OUString name) { app_name = name; }
 
+OUString getAppName() { return app_name; }
 };
 
 #endif
diff --git a/vcl/source/uitest/logger.cxx b/vcl/source/uitest/logger.cxx
index 0ecd673f9879..03c439fcbd7c 100644
--- a/vcl/source/uitest/logger.cxx
+++ b/vcl/source/uitest/logger.cxx
@@ -20,9 +20,9 @@
 #include 
 #include 
 
-namespace{
-
-bool isDialogWindow(vcl::Window const * pWindow)
+namespace
+{
+bool isDialogWindow(vcl::Window const* pWindow)
 {
 WindowType nType = pWindow->GetType();
 // DIALOG to MODALDIALOG
@@ -39,7 +39,7 @@ bool isDialogWindow(vcl::Window const * pWindow)
 return false;
 }
 
-bool isTopWindow(vcl::Window const * pWindow)
+bool isTopWindow(vcl::Window const* pWindow)
 {
 WindowType eType = pWindow->GetType();
 if (eType == WindowType::FLOATINGWINDOW)
@@ -60,17 +60,16 @@ vcl::Window* get_top_parent(vcl::Window* pWindow)
 
 return get_top_parent(pParent);
 }
-
-
 }
-UITestLogger::UITestLogger():
-maStream(),
-mbValid(false)
+UITestLogger::UITestLogger()
+: maStream()
+, mbValid(false)
 {
 static const char* pFile = std::getenv("LO_COLLECT_UIINFO");
 if (pFile)
 {
-OUString aDirPath("${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" 
SAL_CONFIGFILE("bootstrap") ":UserInstallation}/uitest/");
+OUString aDirPath("${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER
+  "/" SAL_CONFIGFILE("bootstrap") 
":UserInstallation}/uitest/");
 rtl::Bootstrap::expandMacros(aDirPath);
 osl::Directory::createPath(aDirPath);
 OUString aFilePath = aDirPath + OUString::fromUtf8(pFile);
@@ -80,7 +79,8 @@ UITestLogger::UITestLogger():
 }
 }
 
-void UITestLogger::logCommand(const OUString& rAction, const 
css::uno::Sequence< css::beans::PropertyValue >& rArgs)
+void UITestLogger::logCommand(const OUString& rAction,
+  const 
css::uno::Sequence& rArgs)
 {
 if (!mbValid)
 return;
@@ -126,10 +126,10 @@ void UITestLogger::logCommand(const OUString& rAction, 
const css::uno::Sequence<
 maStream.WriteLine(OUStringToOString(aCommand, RTL_TEXTENCODING_UTF8));
 }
 
-namespace {
-
+namespace
+{
 // most likely this should be recursive
-bool child_windows_have_focus(VclPtr const & xUIElement)
+bool child_windows_have_focus(VclPtr const& xUIElement)
 {
 sal_Int32 nCount = xUIElement->GetChildCount();
 for (sal_Int32 i = 0; i < nCount; ++i)
@@ -144,10 +144,9 @@ bool child_windows_have_focus(VclPtr const & 
xUIElement)
 }
 return false;
 }
-
 }
 
-void UITestLogger::logAction(VclPtr const & xUIElement, VclEventId 
nEvent)
+void UITestLogger::logAction(VclPtr const& xUIElement, VclEventId 
nEvent)
 {
 if (!mbValid)
 return;
@@ -177,14 +176,14 @@ void UITestLogger::log(const OUString& rString)
 maStream.WriteLine(OUStringToOString(rString, RTL_TEXTENCODING_UTF8));
 }
 
-void UITestLogger::logKeyInput(VclPtr const & xUIElement, const 
KeyEvent& 

[Libreoffice-commits] core.git: Branch 'feature/gsoc-uitest-2019' - include/vcl vcl/source

2019-08-18 Thread Markus Mohrhard (via logerrit)
 include/vcl/uitest/logger.hxx |   48 +++--
 vcl/source/uitest/logger.cxx  |  344 +++---
 2 files changed, 227 insertions(+), 165 deletions(-)

New commits:
commit e30c3c783b5d610407e63fbfe991552289f732d5
Author: Markus Mohrhard 
AuthorDate: Sun Aug 18 23:34:32 2019 +0800
Commit: Markus Mohrhard 
CommitDate: Sun Aug 18 23:36:09 2019 +0800

uitest: fixed for formatting and plugin stringconstant

Change-Id: Id657c19223f20d1175f9a774357e8b1f11344fdf

diff --git a/include/vcl/uitest/logger.hxx b/include/vcl/uitest/logger.hxx
index 6c8c5008541a..450285c5c247 100644
--- a/include/vcl/uitest/logger.hxx
+++ b/include/vcl/uitest/logger.hxx
@@ -15,10 +15,32 @@
 #include 
 #include 
 
-namespace com { namespace sun { namespace star {
-namespace beans { struct PropertyValue; }
-} } }
-namespace com { namespace sun { namespace star { namespace uno { template 
 class Sequence; } } } }
+namespace com
+{
+namespace sun
+{
+namespace star
+{
+namespace beans
+{
+struct PropertyValue;
+}
+}
+}
+}
+namespace com
+{
+namespace sun
+{
+namespace star
+{
+namespace uno
+{
+template  class Sequence;
+}
+}
+}
+}
 
 struct EventDescription;
 class Control;
@@ -27,7 +49,6 @@ class KeyEvent;
 class UITEST_DLLPUBLIC UITestLogger
 {
 private:
-
 SvFileStream maStream;
 
 bool mbValid;
@@ -35,29 +56,24 @@ private:
 OUString app_name;
 
 public:
-
 UITestLogger();
 
-void logCommand(const OUString& rAction, const 
css::uno::Sequence& rArgs);
+void logCommand(const OUString& rAction,
+const css::uno::Sequence& 
rArgs);
 
-void logAction(VclPtr const & xUIElement, VclEventId nEvent);
+void logAction(VclPtr const& xUIElement, VclEventId nEvent);
 
 void log(const OUString& rString);
 
-void logKeyInput(VclPtr const & xUIElement, const KeyEvent& 
rEvent);
+void logKeyInput(VclPtr const& xUIElement, const KeyEvent& 
rEvent);
 
 void logEvent(const EventDescription& rDescription);
 
 static UITestLogger& getInstance();
 
-void setAppName(OUString name){
-app_name=name;
-}
-
-OUString getAppName(){
-return app_name;
-}
+void setAppName(OUString name) { app_name = name; }
 
+OUString getAppName() { return app_name; }
 };
 
 #endif
diff --git a/vcl/source/uitest/logger.cxx b/vcl/source/uitest/logger.cxx
index 0ecd673f9879..5ea440216980 100644
--- a/vcl/source/uitest/logger.cxx
+++ b/vcl/source/uitest/logger.cxx
@@ -20,9 +20,9 @@
 #include 
 #include 
 
-namespace{
-
-bool isDialogWindow(vcl::Window const * pWindow)
+namespace
+{
+bool isDialogWindow(vcl::Window const* pWindow)
 {
 WindowType nType = pWindow->GetType();
 // DIALOG to MODALDIALOG
@@ -39,7 +39,7 @@ bool isDialogWindow(vcl::Window const * pWindow)
 return false;
 }
 
-bool isTopWindow(vcl::Window const * pWindow)
+bool isTopWindow(vcl::Window const* pWindow)
 {
 WindowType eType = pWindow->GetType();
 if (eType == WindowType::FLOATINGWINDOW)
@@ -60,17 +60,16 @@ vcl::Window* get_top_parent(vcl::Window* pWindow)
 
 return get_top_parent(pParent);
 }
-
-
 }
-UITestLogger::UITestLogger():
-maStream(),
-mbValid(false)
+UITestLogger::UITestLogger()
+: maStream()
+, mbValid(false)
 {
 static const char* pFile = std::getenv("LO_COLLECT_UIINFO");
 if (pFile)
 {
-OUString aDirPath("${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" 
SAL_CONFIGFILE("bootstrap") ":UserInstallation}/uitest/");
+OUString aDirPath("${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER
+  "/" SAL_CONFIGFILE("bootstrap") 
":UserInstallation}/uitest/");
 rtl::Bootstrap::expandMacros(aDirPath);
 osl::Directory::createPath(aDirPath);
 OUString aFilePath = aDirPath + OUString::fromUtf8(pFile);
@@ -80,7 +79,8 @@ UITestLogger::UITestLogger():
 }
 }
 
-void UITestLogger::logCommand(const OUString& rAction, const 
css::uno::Sequence< css::beans::PropertyValue >& rArgs)
+void UITestLogger::logCommand(const OUString& rAction,
+  const 
css::uno::Sequence& rArgs)
 {
 if (!mbValid)
 return;
@@ -126,10 +126,10 @@ void UITestLogger::logCommand(const OUString& rAction, 
const css::uno::Sequence<
 maStream.WriteLine(OUStringToOString(aCommand, RTL_TEXTENCODING_UTF8));
 }
 
-namespace {
-
+namespace
+{
 // most likely this should be recursive
-bool child_windows_have_focus(VclPtr const & xUIElement)
+bool child_windows_have_focus(VclPtr const& xUIElement)
 {
 sal_Int32 nCount = xUIElement->GetChildCount();
 for (sal_Int32 i = 0; i < nCount; ++i)
@@ -144,10 +144,9 @@ bool child_windows_have_focus(VclPtr const & 
xUIElement)
 }
 return false;
 }
-
 }
 
-void UITestLogger::logAction(VclPtr const & xUIElement, VclEventId 
nEvent)
+void UITestLogger::logAction(VclPtr const& xUIElement, VclEventId 
nEvent)
 {
 if (!mbValid)
 return;
@@ -177,14 +176,14 @@ void UITestLogger::log(const OUString& rString)