summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZdeněk Crhonek <zcrhonek@gmail.com>2018-01-09 23:25:46 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2018-04-07 19:23:07 +0200
commit0cff17a62d16f295284cdb17040a03b176ca7cf0 (patch)
tree941441582c30c1d9ea8f3dcf06125e97ffe5c073
parent22e69d28bc293d49784701300795a64074ae99a6 (diff)
uitest - writer Document properties; tdf#49683; tdf#81457
Change-Id: If4a202a7b8ae9be11b8f8f05e50eb3202c5c655d Reviewed-on: https://gerrit.libreoffice.org/47685 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
-rw-r--r--sw/qa/uitest/writer_tests/data/tdf49683.rtf81
-rw-r--r--sw/qa/uitest/writer_tests/data/tdf81457.odtbin0 -> 51550 bytes
-rw-r--r--sw/qa/uitest/writer_tests/documentProperties.py118
-rw-r--r--sw/qa/uitest/writer_tests/tdf49683.py38
-rw-r--r--sw/qa/uitest/writer_tests/tdf81457.py35
5 files changed, 272 insertions, 0 deletions
diff --git a/sw/qa/uitest/writer_tests/data/tdf49683.rtf b/sw/qa/uitest/writer_tests/data/tdf49683.rtf
new file mode 100644
index 000000000000..6dd4739e7460
--- /dev/null
+++ b/sw/qa/uitest/writer_tests/data/tdf49683.rtf
@@ -0,0 +1,81 @@
+{\rtf1\ansi\deff4\adeflang1025
+{\fonttbl{\f0\froman\fprq2\fcharset0 Times New Roman;}{\f1\froman\fprq2\fcharset2 Symbol;}{\f2\fswiss\fprq2\fcharset0 Arial;}{\f3\froman\fprq2\fcharset128 Times New Roman;}{\f4\fswiss\fprq0\fcharset0 Arial;}{\f5\fswiss\fprq2\fcharset128 Arial Narrow;}{\f6\froman\fprq2\fcharset0 Garamond;}{\f7\fnil\fprq2\fcharset128 WenQuanYi Zen Hei;}{\f8\fswiss\fprq2\fcharset0 Lucida Sans Unicode;}{\f9\fnil\fprq2\fcharset0 MS Mincho;}{\f10\fnil\fprq2\fcharset128 Lohit Hindi;}{\f11\fnil\fprq0\fcharset128 Lohit Hindi;}}
+{\colortbl;\red0\green0\blue0;\red128\green128\blue128;}
+{\stylesheet{\s0\snext0\aspalpha\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\hich\af8\langfe255\dbch\af6\afs24\cf0\kerning1\lang1081\loch\f6\fs24\lang1043 Standaard;}
+{\s15\sbasedon0\snext16\aspalpha\sb240\sa120\keepn\hich\af7\langfe255\dbch\af10\afs28\loch\f5\fs28\lang1043 Kop;}
+{\s16\sbasedon0\snext16\aspalpha\sb0\sa120\hich\af8\langfe255\dbch\af6\afs24\loch\f6\fs24\lang1043 Tekstblok;}
+{\s17\sbasedon16\snext17\aspalpha\sb0\sa120\hich\af8\langfe255\dbch\af4\afs24\loch\f4\fs24\lang1043 Lijst;}
+{\s18\sbasedon0\snext18\aspalpha\sb120\sa120\noline\i\hich\af8\langfe255\dbch\af11\afs24\ai\loch\f6\fs24\lang1043 Bijschrift;}
+{\s19\sbasedon0\snext19\aspalpha\hich\af8\langfe255\dbch\af4\afs24\loch\f4\fs24\lang1043 Index;}
+{\s20\sbasedon0\snext16\aspalpha\sb240\sa120\keepn\hich\af9\langfe255\dbch\af2\afs28\loch\f2\fs28\lang1043 Heading;}
+{\s21\sbasedon0\snext21\aspalpha\sb120\sa120\i\hich\af8\langfe255\dbch\af4\afs24\ai\loch\f4\fs24\lang1043 caption;}
+{\s22\sbasedon0\snext16\aspalpha\sb240\sa120\keepn\hich\af9\langfe255\dbch\af2\afs28\loch\f2\fs28\lang1043 WW-Heading;}
+{\s23\sbasedon0\snext23\aspalpha\sb120\sa120\i\hich\af8\langfe255\dbch\af4\afs24\ai\loch\f4\fs24\lang1043 WW-caption;}
+{\s24\sbasedon0\snext24\tqc\tx4818\tqr\tx9637\aspalpha\hich\af8\langfe255\dbch\af6\afs24\loch\f6\fs24\lang1043 header;}
+{\s25\sbasedon0\snext25\qr\aspalpha\hich\af8\langfe255\dbch\af6\afs22\loch\f6\fs22\lang1043 _GegegRiagg;}
+{\s26\sbasedon0\snext26\tqc\tx4320\tqr\tx8640\aspalpha\hich\af8\langfe255\dbch\af6\afs24\loch\f6\fs24\lang1043 WW-header;}
+{\s27\sbasedon0\snext27\aspalpha\hich\af8\langfe255\dbch\af6\afs18\loch\f6\fs18\lang1043 _GegegDoc;}
+{\s28\sbasedon0\snext28\aspalpha\hich\af8\langfe255\dbch\af6\afs24\loch\f6\fs24\lang1043 Table Contents;}
+{\s29\sbasedon0\snext29\aspalpha\hich\af8\langfe255\dbch\af6\afs24\loch\f6\fs24\lang1043 WW-Table Contents;}
+{\s30\sbasedon27\snext30\aspalpha\hich\af8\langfe255\dbch\af6\afs22\loch\f6\fs22\lang1043 _GegegVast11;}
+{\s31\sbasedon30\snext31\aspalpha\b\hich\af8\langfe255\dbch\af6\afs22\ab\loch\f6\fs22\lang1043 _GegegVast11Vet;}
+{\s32\sbasedon29\snext32\qc\aspalpha\b\hich\af8\langfe255\dbch\af6\afs24\ab\loch\f6\fs24\lang1043 Table Heading;}
+{\s33\sbasedon0\snext33\tqc\tx4320\tqr\tx8640\aspalpha\noline\hich\af8\langfe255\dbch\af6\afs24\loch\f6\fs24\lang1043 Koptekst;}
+{\s34\sbasedon0\snext34\aspalpha\noline\hich\af8\langfe255\dbch\af6\afs24\loch\f6\fs24\lang1043 Inhoud tabel;}
+{\s35\sbasedon34\snext35\qc\aspalpha\noline\b\hich\af8\langfe255\dbch\af6\afs24\ab\loch\f6\fs24\lang1043 Tabelkop;}
+}{\info{\keywords bhavb}{\author Cor Nouws}{\creatim\yr2009\mo10\dy20\hr14\min33}{\revtim\yr2009\mo10\dy20\hr14\min47}{\printim\yr0\mo0\dy0\hr0\min0}{\comment LibreOffice 3.4.5}{\vern3400}}\deftab709\deftab709\deftab709\deftab709\deftab709\deftab709\deftab709\deftab709\deftab709\deftab709\deftab709\deftab709\deftab709\deftab709\deftab709\deftab709\deftab709\deftab709\deftab709\deftab709
+
+{\*\pgdsctbl
+{\pgdsc0\pgdscuse195\pgwsxn11906\pghsxn16838\marglsxn1417\margrsxn1417\margtsxn1247\headery709\margbsxn1134{\header\trowd\trql\trleft-1102\ltrrow\trpaddft3\trpaddt0\trpaddfl3\trpaddl0\trpaddfb3\trpaddb0\trpaddfr3\trpaddr0\cellx-270\cellx-89\cellx7970\pard\plain \s27\aspalpha\hich\af8\langfe255\dbch\af6\afs18\loch\f6\fs18\lang1043\intbl{\i0\b0\rtlch \ltrch\loch
+Kenmerk:}\cell\pard\plain \s27\aspalpha\hich\af8\langfe255\dbch\af6\afs18\loch\f6\fs18\lang1043\intbl{\rtlch \ltrch\loch
+}\cell\pard\plain \s28\aspalpha\hich\af8\langfe255\dbch\af6\afs24\loch\f6\fs24\lang1043\intbl{\rtlch \ltrch\loch
+*BriefReferentie*}\cell\row\pard\pard\plain \s0\aspalpha\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\hich\af8\langfe255\dbch\af6\afs24\cf0\kerning1\lang1081\loch\f6\fs24\lang1043{\afs4\rtlch \ltrch\loch\fs4
+}
+\par }\pgdscnxt0 Standard;}
+{\pgdsc1\pgdscuse195\pgndec\pgwsxn11906\pghsxn16838\marglsxn1417\margrsxn1417\margtsxn1247\margbsxn1134\pgdscnxt0 First Page;}
+{\pgdsc2\pgdscuse195\pgndec\pgwsxn11906\pghsxn16838\marglsxn1417\margrsxn1417\margtsxn1247\margbsxn1134\pgdscnxt0 First Page;}
+{\pgdsc3\pgdscuse195\pgndec\pgwsxn11906\pghsxn16838\marglsxn1417\margrsxn1417\margtsxn1247\margbsxn1134\pgdscnxt0 Eerste pagina;}}
+\formshade{\*\pgdscno3}\paperh16838\paperw11906\margl1417\margr1417\margt1247\margb1134\sectd\sbknone\sectunlocked1\pgndec\pgwsxn11906\pghsxn16838\marglsxn1417\margrsxn1417\margtsxn1247\headery709\margbsxn1134{\header\trowd\trql\trleft-1102\ltrrow\trpaddft3\trpaddt0\trpaddfl3\trpaddl0\trpaddfb3\trpaddb0\trpaddfr3\trpaddr0\cellx-270\cellx-89\cellx7970\pard\plain \s27\aspalpha\hich\af8\langfe255\dbch\af6\afs18\loch\f6\fs18\lang1043\intbl{\i0\b0\rtlch \ltrch\loch
+Kenmerk:}\cell\pard\plain \s27\aspalpha\hich\af8\langfe255\dbch\af6\afs18\loch\f6\fs18\lang1043\intbl{\rtlch \ltrch\loch
+}\cell\pard\plain \s28\aspalpha\hich\af8\langfe255\dbch\af6\afs24\loch\f6\fs24\lang1043\intbl{\rtlch \ltrch\loch
+*BriefReferentie*}\cell\row\pard\pard\plain \s0\aspalpha\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\hich\af8\langfe255\dbch\af6\afs24\cf0\kerning1\lang1081\loch\f6\fs24\lang1043{\afs4\rtlch \ltrch\loch\fs4
+}
+\par }\titlepg\ftnbj\ftnstart1\ftnrstcont\ftnnar\aenddoc\aftnrstcont\aftnstart1\aftnnrlc
+\trowd\trql\trleft0\ltrrow\trrh2098\trpaddft3\trpaddt0\trpaddfl3\trpaddl0\trpaddfb3\trpaddb0\trpaddfr3\trpaddr0\cellx4748\cellx9072\pgndec\pard\plain \s28\aspalpha\hich\af8\langfe255\dbch\af6\afs24\loch\f6\fs24\lang1043\intbl\ltrpar{\rtlch \ltrch\loch
+}\cell\pard\plain \s25\qr\aspalpha\hich\af8\langfe255\dbch\af6\afs22\loch\f6\fs22\lang1043\intbl\ltrpar{\rtlch \ltrch\loch
+}\cell\row\pard\trowd\trql\trleft0\ltrrow\trrh1191\trpaddft3\trpaddt0\trpaddfl3\trpaddl0\trpaddfb3\trpaddb0\trpaddfr3\trpaddr0\cellx4748\cellx9072\pard\plain \s28\aspalpha\hich\af8\langfe255\dbch\af6\afs24\loch\f6\fs24\lang1043\intbl\ltrpar{\rtlch \ltrch\loch
+*HuisartsNaam*}
+\par \pard\plain \s28\aspalpha\hich\af8\langfe255\dbch\af6\afs24\loch\f6\fs24\lang1043\intbl\ltrpar{\rtlch \ltrch\loch
+*HuisartsAdres*}
+\par \pard\plain \s28\aspalpha\hich\af8\langfe255\dbch\af6\afs24\loch\f6\fs24\lang1043\intbl\ltrpar{\rtlch \ltrch\loch
+*HuisartsPostcode* *HuisartsPlaats*}\cell\pard\plain \s28\aspalpha\hich\af8\langfe255\dbch\af6\afs24\loch\f6\fs24\lang1043\intbl\ltrpar{\rtlch \ltrch\loch
+}\cell\row\pard\trowd\trql\trleft0\ltrrow\trrh624\trpaddft3\trpaddt0\trpaddfl3\trpaddl0\trpaddfb3\trpaddb0\trpaddfr3\trpaddr0\cellx4748\cellx9072\pard\plain \s28\aspalpha\hich\af8\langfe255\dbch\af6\afs24\loch\f6\fs24\lang1043\intbl\ltrpar{\rtlch \ltrch\loch
+*ClientPostcode* *ClientPlaats*}\cell\pard\plain \s25\qr\aspalpha\hich\af8\langfe255\dbch\af6\afs22\loch\f6\fs22\lang1043\intbl\ltrpar{\rtlch \ltrch\loch
+*ClientAfdelingPlaatsLower*, *BriefDatum*}\cell\row\pard\pard\plain \s0\aspalpha\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\hich\af8\langfe255\dbch\af6\afs24\cf0\kerning1\lang1081\loch\f6\fs24\lang1043\ltrpar{\rtlch \ltrch\loch
+}
+\par \trowd\trql\trleft-1102\ltrrow\trpaddft3\trpaddt0\trpaddfl3\trpaddl0\trpaddfb3\trpaddb0\trpaddfr3\trpaddr0\cellx-270\cellx-89\cellx7970\pard\plain \s27\aspalpha\hich\af8\langfe255\dbch\af6\afs18\loch\f6\fs18\lang1043\intbl\ltrpar{\rtlch \ltrch\loch
+Betreft:}\cell\pard\plain \s27\aspalpha\hich\af8\langfe255\dbch\af6\afs18\loch\f6\fs18\lang1043\intbl\ltrpar{\rtlch \ltrch\loch
+}\cell\pard\plain \s28\aspalpha\hich\af8\langfe255\dbch\af6\afs24\loch\f6\fs24\lang1043\intbl\ltrpar{\b\ab\rtlch \ltrch\loch
+}\cell\row\pard\pard\plain \s0\aspalpha\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\hich\af8\langfe255\dbch\af6\afs24\cf0\kerning1\lang1081\loch\f6\fs24\lang1043\ltrpar{\rtlch \ltrch\loch
+}
+\par \trowd\trql\ltrrow\trpaddft3\trpaddt0\trpaddfl3\trpaddl0\trpaddfb3\trpaddb0\trpaddfr3\trpaddr0\cellx1245\cellx1365\cellx9072\pard\plain \s30\aspalpha\hich\af8\langfe255\dbch\af6\afs22\loch\f6\fs22\lang1043\intbl\ltrpar{\rtlch \ltrch\loch
+}\cell\pard\plain \s30\aspalpha\hich\af8\langfe255\dbch\af6\afs22\loch\f6\fs22\lang1043\intbl\ltrpar{\rtlch \ltrch\loch
+}\cell\pard\plain \s31\aspalpha\b\hich\af8\langfe255\dbch\af6\afs22\ab\loch\f6\fs22\lang1043\intbl\ltrpar{\rtlch \ltrch\loch
+}\cell\row\pard\trowd\trql\ltrrow\trpaddft3\trpaddt0\trpaddfl3\trpaddl0\trpaddfb3\trpaddb0\trpaddfr3\trpaddr0\cellx1245\cellx1365\cellx9072\pard\plain \s30\aspalpha\hich\af8\langfe255\dbch\af6\afs22\loch\f6\fs22\lang1043\intbl\ltrpar{\rtlch \ltrch\loch
+}\cell\pard\plain \s30\aspalpha\hich\af8\langfe255\dbch\af6\afs22\loch\f6\fs22\lang1043\intbl\ltrpar{\rtlch \ltrch\loch
+}\cell\pard\plain \s31\aspalpha\b\hich\af8\langfe255\dbch\af6\afs22\ab\loch\f6\fs22\lang1043\intbl\ltrpar{\rtlch \ltrch\loch
+}\cell\row\pard\trowd\trql\ltrrow\trpaddft3\trpaddt0\trpaddfl3\trpaddl0\trpaddfb3\trpaddb0\trpaddfr3\trpaddr0\cellx1245\cellx1365\cellx9072\pard\plain \s30\aspalpha\hich\af8\langfe255\dbch\af6\afs22\loch\f6\fs22\lang1043\intbl\ltrpar{\rtlch \ltrch\loch
+}\cell\pard\plain \s30\aspalpha\hich\af8\langfe255\dbch\af6\afs22\loch\f6\fs22\lang1043\intbl\ltrpar{\rtlch \ltrch\loch
+}\cell\pard\plain \s31\aspalpha\b\hich\af8\langfe255\dbch\af6\afs22\ab\loch\f6\fs22\lang1043\intbl\ltrpar{\rtlch \ltrch\loch
+}\cell\row\pard\pard\plain \s0\aspalpha\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\hich\af8\langfe255\dbch\af6\afs24\cf0\kerning1\lang1081\loch\f6\fs24\lang1043\ltrpar{\rtlch \ltrch\loch
+}
+\par \trowd\trql\trleft-1102\ltrrow\trpaddft3\trpaddt0\trpaddfl3\trpaddl0\trpaddfb3\trpaddb0\trpaddfr3\trpaddr0\cellx-270\cellx-89\cellx7970\pard\plain \s27\aspalpha\hich\af8\langfe255\dbch\af6\afs18\loch\f6\fs18\lang1043\intbl\ltrpar{\rtlch \ltrch\loch
+Kenmerk:}\cell\pard\plain \s27\aspalpha\hich\af8\langfe255\dbch\af6\afs18\loch\f6\fs18\lang1043\intbl\ltrpar{\rtlch \ltrch\loch
+}\cell\pard\plain \s28\aspalpha\hich\af8\langfe255\dbch\af6\afs24\loch\f6\fs24\lang1043\intbl\ltrpar{\rtlch \ltrch\loch
+*BriefReferentie*}\cell\row\pard\pard\plain \s0\aspalpha\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\hich\af8\langfe255\dbch\af6\afs24\cf0\kerning1\lang1081\loch\f6\fs24\lang1043\ltrpar{\rtlch \ltrch\loch
+}
+\par \pard\plain \s0\aspalpha\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\hich\af8\langfe255\dbch\af6\afs24\cf0\kerning1\lang1081\loch\f6\fs24\lang1043\ltrpar{\rtlch \ltrch\loch
+}
+\par \pard\plain \s0\aspalpha\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\hich\af8\langfe255\dbch\af6\afs24\cf0\kerning1\lang1081\loch\f6\fs24\lang1043\ltrpar{\rtlch \ltrch\loch
+}
+\par } \ No newline at end of file
diff --git a/sw/qa/uitest/writer_tests/data/tdf81457.odt b/sw/qa/uitest/writer_tests/data/tdf81457.odt
new file mode 100644
index 000000000000..04c18dd3a497
--- /dev/null
+++ b/sw/qa/uitest/writer_tests/data/tdf81457.odt
Binary files differ
diff --git a/sw/qa/uitest/writer_tests/documentProperties.py b/sw/qa/uitest/writer_tests/documentProperties.py
new file mode 100644
index 000000000000..0230decef350
--- /dev/null
+++ b/sw/qa/uitest/writer_tests/documentProperties.py
@@ -0,0 +1,118 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+from uitest.framework import UITestCase
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import get_state_as_dict
+import time
+from uitest.debug import sleep
+from uitest.uihelper.common import select_pos
+
+
+class documentProperties(UITestCase):
+
+ def test_open_documentProperties_writer(self):
+ self.ui_test.create_doc_in_start_center("writer")
+ self.ui_test.execute_dialog_through_command(".uno:SetDocumentProperties")
+ xDialog = self.xUITest.getTopFocusWindow()
+ xResetBtn = xDialog.getChild("reset")
+ xResetBtn.executeAction("CLICK", tuple())
+
+ xUserDataCheckbox = xDialog.getChild("userdatacb") # apply user data
+ xUserDataCheckbox.executeAction("CLICK", tuple())
+ xThumbSaveCheckbox = xDialog.getChild("thumbnailsavecb") # save preview image with document
+ xThumbSaveCheckbox.executeAction("CLICK", tuple())
+
+#digital signature
+ xDigSignBtn = xDialog.getChild("signature")
+
+ def handle_sign_dlg(dialog):
+ xNoBtn = dialog.getChild("no")
+ self.ui_test.close_dialog_through_button(xNoBtn)
+
+ self.ui_test.execute_blocking_action(xDigSignBtn.executeAction, args=('CLICK', ()),
+ dialog_handler=handle_sign_dlg)
+
+ xTabs = xDialog.getChild("tabcontrol")
+ select_pos(xTabs, "1") #tab Description
+
+ xTitleText = xDialog.getChild("title")
+ xTitleText.executeAction("TYPE", mkPropertyValues({"TEXT":"Title text"}))
+ xSubjectText = xDialog.getChild("subject")
+ xSubjectText.executeAction("TYPE", mkPropertyValues({"TEXT":"Subject text"}))
+ xKeywordsText = xDialog.getChild("keywords")
+ xKeywordsText.executeAction("TYPE", mkPropertyValues({"TEXT":"Keywords text"}))
+ xCommentsText = xDialog.getChild("comments")
+ xCommentsText.executeAction("TYPE", mkPropertyValues({"TEXT":"Comments text"}))
+
+
+#Font tab
+ select_pos(xTabs, "5") #tab Fonts
+ xFontEmbedCheckbox = xDialog.getChild("embedFonts")
+ xFontEmbedCheckbox.executeAction("CLICK", tuple())
+
+#Security tab
+ select_pos(xTabs, "4") #tab Security
+ xReadOnlyCheckbox = xDialog.getChild("readonly")
+ xReadOnlyCheckbox.executeAction("CLICK", tuple())
+ xRecordChangesCheckbox = xDialog.getChild("recordchanges")
+ xRecordChangesCheckbox.executeAction("CLICK", tuple())
+ xProtectBtn = xDialog.getChild("protect")
+ def handle_protect_dlg(dialog):
+ xOkBtn = dialog.getChild("ok")
+ xPasswordText = dialog.getChild("pass1ed")
+ xPasswordText.executeAction("TYPE", mkPropertyValues({"TEXT":"password"}))
+ xConfirmText = dialog.getChild("confirm1ed")
+ xConfirmText.executeAction("TYPE", mkPropertyValues({"TEXT":"password"}))
+ self.ui_test.close_dialog_through_button(xOkBtn)
+
+ self.ui_test.execute_blocking_action(xProtectBtn.executeAction, args=('CLICK', ()),
+ dialog_handler=handle_protect_dlg)
+
+ select_pos(xTabs, "2") #tab Custom properties
+#add custom properties ------>>>>>>>>>>> not supported
+ xAddBtn = xDialog.getChild("add")
+ xAddBtn.executeAction("CLICK", tuple())
+
+ select_pos(xTabs, "6") #tab Statistics
+ xUpdateBtn = xDialog.getChild("update")
+ xUpdateBtn.executeAction("CLICK", tuple())
+
+ xOkBtn = xDialog.getChild("ok")
+ xOkBtn.executeAction("CLICK", tuple())
+#now open the dialog again and read the properties
+ self.ui_test.execute_dialog_through_command(".uno:SetDocumentProperties")
+ xDialog = self.xUITest.getTopFocusWindow()
+ xTitleText = xDialog.getChild("title")
+ xSubjectText = xDialog.getChild("subject")
+ xKeywordsText = xDialog.getChild("keywords")
+ xCommentsText = xDialog.getChild("comments")
+ xReadOnlyCheckbox = xDialog.getChild("readonly")
+ xRecordChangesCheckbox = xDialog.getChild("recordchanges")
+ xFontEmbedCheckbox = xDialog.getChild("embedFonts")
+ xUserDataCheckbox = xDialog.getChild("userdatacb")
+ xThumbSaveCheckbox = xDialog.getChild("thumbnailsavecb")
+ self.assertEqual(get_state_as_dict(xTitleText)["Text"], "Title text")
+ self.assertEqual(get_state_as_dict(xSubjectText)["Text"], "Subject text")
+ self.assertEqual(get_state_as_dict(xKeywordsText)["Text"], "Keywords text")
+ self.assertEqual(get_state_as_dict(xReadOnlyCheckbox)["Selected"], "true")
+ self.assertEqual(get_state_as_dict(xRecordChangesCheckbox)["Selected"], "true")
+ self.assertEqual(get_state_as_dict(xReadOnlyCheckbox)["Selected"], "true")
+ self.assertEqual(get_state_as_dict(xFontEmbedCheckbox)["Selected"], "true")
+ self.assertEqual(get_state_as_dict(xUserDataCheckbox)["Selected"], "false")
+ self.assertEqual(get_state_as_dict(xThumbSaveCheckbox)["Selected"], "false")
+ self.assertEqual(get_state_as_dict(xCommentsText)["Text"], "Comments text")
+ xResetBtn = xDialog.getChild("reset")
+ xResetBtn.executeAction("CLICK", tuple())
+ xCancBtn = xDialog.getChild("cancel")
+ xCancBtn.executeAction("CLICK", tuple())
+
+ self.ui_test.close_doc()
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab: \ No newline at end of file
diff --git a/sw/qa/uitest/writer_tests/tdf49683.py b/sw/qa/uitest/writer_tests/tdf49683.py
new file mode 100644
index 000000000000..3d5af6a71f14
--- /dev/null
+++ b/sw/qa/uitest/writer_tests/tdf49683.py
@@ -0,0 +1,38 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+from uitest.framework import UITestCase
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.path import get_srcdir_url
+from uitest.uihelper.common import get_state_as_dict
+import time
+from uitest.debug import sleep
+from uitest.uihelper.common import select_pos
+
+def get_url_for_data_file(file_name):
+ return get_srcdir_url() + "/sw/qa/uitest/writer_tests/data/" + file_name
+
+class tdf49683(UITestCase):
+
+#tdf 49683
+ def test_open_documentProperties_tdf49683(self):
+ writer_doc = self.ui_test.load_file(get_url_for_data_file("tdf49683.rtf"))
+ self.ui_test.execute_dialog_through_command(".uno:SetDocumentProperties")
+ xDialog = self.xUITest.getTopFocusWindow()
+ xTabs = xDialog.getChild("tabcontrol")
+ select_pos(xTabs, "1") #tab description
+ xKeywordsText = xDialog.getChild("keywords")
+ self.assertEqual(get_state_as_dict(xKeywordsText)["Text"], "bhavb")
+
+ xOkBtn = xDialog.getChild("ok")
+ xOkBtn.executeAction("CLICK", tuple())
+
+ self.ui_test.close_doc()
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab: \ No newline at end of file
diff --git a/sw/qa/uitest/writer_tests/tdf81457.py b/sw/qa/uitest/writer_tests/tdf81457.py
new file mode 100644
index 000000000000..3b7108866ee3
--- /dev/null
+++ b/sw/qa/uitest/writer_tests/tdf81457.py
@@ -0,0 +1,35 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+from uitest.framework import UITestCase
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.path import get_srcdir_url
+from uitest.uihelper.common import get_state_as_dict
+import time
+from uitest.debug import sleep
+from uitest.uihelper.common import select_pos
+
+def get_url_for_data_file(file_name):
+ return get_srcdir_url() + "/sw/qa/uitest/writer_tests/data/" + file_name
+
+class tdf81457(UITestCase):
+
+#tdf 81457
+ def test_open_documentProperties_tdf81457(self):
+ writer_doc = self.ui_test.load_file(get_url_for_data_file("tdf81457.odt"))
+ self.ui_test.execute_dialog_through_command(".uno:SetDocumentProperties")
+ xDialog = self.xUITest.getTopFocusWindow()
+ xTabs = xDialog.getChild("tabcontrol")
+ select_pos(xTabs, "2") #tab Custom properties
+ xOkBtn = xDialog.getChild("ok")
+ xOkBtn.executeAction("CLICK", tuple())
+
+ self.ui_test.close_doc()
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab: \ No newline at end of file