diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-12-22 00:38:03 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-12-23 19:41:52 +0100 |
commit | d42c73d0bc064633a51db8c1d5fa9e2f60cba5e8 (patch) | |
tree | c8fc8ee5be9eb5b8aef7226efad3e2c2f8b59643 /sw/source/uibase/uitest | |
parent | 5edafb22331b7dbd2225be56a91bb2918471de68 (diff) |
tdf#136578: uitest: add wrapper for PageBreakWin
Change-Id: I1536f2f03da9ec64627bd1e2e1776cf130717aff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108143
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sw/source/uibase/uitest')
-rw-r--r-- | sw/source/uibase/uitest/uiobject.cxx | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/sw/source/uibase/uitest/uiobject.cxx b/sw/source/uibase/uitest/uiobject.cxx index 44b995dcf588..fc62fa157cf1 100644 --- a/sw/source/uibase/uitest/uiobject.cxx +++ b/sw/source/uibase/uitest/uiobject.cxx @@ -255,6 +255,31 @@ OUString CommentUIObject::get_name() const return "CommentUIObject"; } +PageBreakUIObject::PageBreakUIObject(const VclPtr<SwPageBreakWin>& xPageBreakUIObject): + WindowUIObject(xPageBreakUIObject), + mxPageBreakUIObject(xPageBreakUIObject) +{ +} +void PageBreakUIObject::execute(const OUString& rAction, + const StringMap& rParameters) +{ + if (rAction == "DELETE" || rAction == "EDIT") + mxPageBreakUIObject->execute(rAction.toAsciiLowerCase().toUtf8()); + else + WindowUIObject::execute(rAction, rParameters); +} + +std::unique_ptr<UIObject> PageBreakUIObject::create(vcl::Window* pWindow) +{ + SwPageBreakWin* pPageBreakWin = dynamic_cast<SwPageBreakWin*>(pWindow); + assert(pPageBreakWin); + return std::unique_ptr<UIObject>(new PageBreakUIObject(pPageBreakWin)); +} + +OUString PageBreakUIObject::get_name() const +{ + return "PageBreakUIObject"; +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |