Related: tdf#125531 use RemoveTabPage for removing a tab page

which removes the tab cross-platform

Change-Id: If2584cc75350fb0106f1a1f5190abb74b0ee0ccf
Reviewed-on: https://gerrit.libreoffice.org/78871
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
Caolán McNamara
2019-09-13 11:19:56 +01:00
parent 183206ee09
commit bcaeebd98a
4 changed files with 13 additions and 13 deletions

View File

@@ -48,12 +48,12 @@ class CalcDocumentProperties(UITestCase):
xCommentsText.executeAction("TYPE", mkPropertyValues({"TEXT":"Comments text"})) xCommentsText.executeAction("TYPE", mkPropertyValues({"TEXT":"Comments text"}))
#Font tab #Font tab
select_pos(xTabs, "5") #tab Fonts select_pos(xTabs, "4") #tab Fonts
xFontEmbedCheckbox = xDialog.getChild("embedFonts") xFontEmbedCheckbox = xDialog.getChild("embedFonts")
xFontEmbedCheckbox.executeAction("CLICK", tuple()) xFontEmbedCheckbox.executeAction("CLICK", tuple())
#Security tab #Security tab
select_pos(xTabs, "4") #tab Security select_pos(xTabs, "3") #tab Security
xReadOnlyCheckbox = xDialog.getChild("readonly") xReadOnlyCheckbox = xDialog.getChild("readonly")
xReadOnlyCheckbox.executeAction("CLICK", tuple()) xReadOnlyCheckbox.executeAction("CLICK", tuple())
xRecordChangesCheckbox = xDialog.getChild("recordchanges") xRecordChangesCheckbox = xDialog.getChild("recordchanges")
@@ -74,7 +74,7 @@ class CalcDocumentProperties(UITestCase):
xAddBtn = xDialog.getChild("add") xAddBtn = xDialog.getChild("add")
xAddBtn.executeAction("CLICK", tuple()) xAddBtn.executeAction("CLICK", tuple())
select_pos(xTabs, "6") #tab Statistics select_pos(xTabs, "5") #tab Statistics
xOkBtn = xDialog.getChild("ok") xOkBtn = xDialog.getChild("ok")
xOkBtn.executeAction("CLICK", tuple()) xOkBtn.executeAction("CLICK", tuple())

View File

@@ -52,12 +52,12 @@ class ImpressDocumentProperties(UITestCase):
xCommentsText.executeAction("TYPE", mkPropertyValues({"TEXT":"Comments text"})) xCommentsText.executeAction("TYPE", mkPropertyValues({"TEXT":"Comments text"}))
#Font tab #Font tab
select_pos(xTabs, "5") #tab Fonts select_pos(xTabs, "4") #tab Fonts
xFontEmbedCheckbox = xDialog.getChild("embedFonts") xFontEmbedCheckbox = xDialog.getChild("embedFonts")
xFontEmbedCheckbox.executeAction("CLICK", tuple()) xFontEmbedCheckbox.executeAction("CLICK", tuple())
#Security tab #Security tab
select_pos(xTabs, "4") #tab Security select_pos(xTabs, "3") #tab Security
xReadOnlyCheckbox = xDialog.getChild("readonly") xReadOnlyCheckbox = xDialog.getChild("readonly")
xReadOnlyCheckbox.executeAction("CLICK", tuple()) xReadOnlyCheckbox.executeAction("CLICK", tuple())

View File

@@ -1127,13 +1127,13 @@ SfxDocumentInfoDialog::SfxDocumentInfoDialog(weld::Window* pParent, const SfxIte
AddTabPage("general", SfxDocumentPage::Create, nullptr); AddTabPage("general", SfxDocumentPage::Create, nullptr);
AddTabPage("description", SfxDocumentDescPage::Create, nullptr); AddTabPage("description", SfxDocumentDescPage::Create, nullptr);
AddTabPage("customprops", SfxCustomPropertiesPage::Create, nullptr); AddTabPage("customprops", SfxCustomPropertiesPage::Create, nullptr);
if (rInfoItem.isCmisDocument())
AddTabPage("cmisprops", SfxCmisPropertiesPage::Create, nullptr); AddTabPage("cmisprops", SfxCmisPropertiesPage::Create, nullptr);
if (!rInfoItem.isCmisDocument()) else
m_xTabCtrl->get_page("cmisprops")->hide(); RemoveTabPage("cmisprops");
AddTabPage("security", SfxSecurityPage::Create, nullptr); AddTabPage("security", SfxSecurityPage::Create, nullptr);
} }
void SfxDocumentInfoDialog::PageCreated(const OString& rId, SfxTabPage &rPage) void SfxDocumentInfoDialog::PageCreated(const OString& rId, SfxTabPage &rPage)
{ {
if (rId == "general") if (rId == "general")

View File

@@ -53,12 +53,12 @@ class documentProperties(UITestCase):
#Font tab #Font tab
select_pos(xTabs, "5") #tab Fonts select_pos(xTabs, "4") #tab Fonts
xFontEmbedCheckbox = xDialog.getChild("embedFonts") xFontEmbedCheckbox = xDialog.getChild("embedFonts")
xFontEmbedCheckbox.executeAction("CLICK", tuple()) xFontEmbedCheckbox.executeAction("CLICK", tuple())
#Security tab #Security tab
select_pos(xTabs, "4") #tab Security select_pos(xTabs, "3") #tab Security
xReadOnlyCheckbox = xDialog.getChild("readonly") xReadOnlyCheckbox = xDialog.getChild("readonly")
xReadOnlyCheckbox.executeAction("CLICK", tuple()) xReadOnlyCheckbox.executeAction("CLICK", tuple())
xRecordChangesCheckbox = xDialog.getChild("recordchanges") xRecordChangesCheckbox = xDialog.getChild("recordchanges")
@@ -80,7 +80,7 @@ class documentProperties(UITestCase):
xAddBtn = xDialog.getChild("add") xAddBtn = xDialog.getChild("add")
xAddBtn.executeAction("CLICK", tuple()) xAddBtn.executeAction("CLICK", tuple())
select_pos(xTabs, "6") #tab Statistics select_pos(xTabs, "5") #tab Statistics
xUpdateBtn = xDialog.getChild("update") xUpdateBtn = xDialog.getChild("update")
xUpdateBtn.executeAction("CLICK", tuple()) xUpdateBtn.executeAction("CLICK", tuple())