Age | Commit message (Collapse) | Author | Files | Lines |
|
In VBA, it is Single, not Double. See VBA documentation:
https://learn.microsoft.com/en-us/office/vba/api/word.table.bottompadding
https://learn.microsoft.com/en-us/office/vba/api/word.table.leftpadding
https://learn.microsoft.com/en-us/office/vba/api/word.table.rightpadding
https://learn.microsoft.com/en-us/office/vba/api/word.table.toppadding
Change-Id: I9262462424fc11b5c062a61754ab0fab9103f549
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169763
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
|
|
Add option to check data validity with case sensitive and case
insensitive. The default set would remain the original case insensitive
mode for data validity.
Change-Id: Ic4fe56e2b31b7fc348b742f3b95fb44cd35bc49d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167280
Tested-by: Jenkins
Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
|
|
Originally, CentimetersToPoints was implemented as a base method for
Writer and Calc. They are both using the same implementation,
which is correct for Writer, but wrong for Calc.
Since their behavior should be different,
I remove the base method and implement a correct one for Calc.
Change-Id: If957accdd9be86a96ca6fb711502e49a79bf3223
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148745
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
This allows Word. to prefix global commands.
While this is superfluous to use this profix in a DOC/X,
the purpose is to allow the spreadsheet to call
Word.<whatever> macro calls that execute in a word processor.
At this point, it is simply added to SwVbaGlobals
to allow macro calls to run without raising an error.
make CppunitTest_sw_macros_test
Change-Id: Ibeda67d458d4757be809d8669a4e424c4e6c3458
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147682
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
|
|
This allows ActiveDocument.ActiveWindow.View.ShowAll = true
ShowAll affects "View -> Formatting Marks"
make CppunitTest_sw_macros_test
Change-Id: I735eb42b0d53c34a4c4770c148f6ab7ac597fd84
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147667
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
|
|
This allows ActiveDocument.ActiveWindow.*
It already works as a global, and as Aplication.ActiveWindow
Unit test will follow when some of the * items are added.
Change-Id: I7fb18df9f6259ec4b9d60516b2da704098831dfc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147665
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
|
|
Add ExportAsFixedFormat VBA function for calc.
Works fine with Workbook/Worksheet/Range objects
Optional parameters:
- Type: works but only with xlTypePDF. (xlTypeXPS not supperted by LO)
- FileName: works but not clear the xlQualityStandard or xlQualityMinimum real value,
so just used the lossless export in case of xlQualityStandard and 70% JPEG compression quality
for xlQualityMinimum.
- IncludeDocProperties: works
- IgnorePrintAreas: TODO
- From: works
- To: works
- OpenAfterPublish: works
- FixedFormatExtClassPtr: TODO?
Change-Id: I128fd880a82a5dd315897496c6f21bb9a7c2270b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146512
Tested-by: Jenkins
Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
|
|
Msgbox (FormFields("text1").Range.Text)
Change-Id: Iac195e09bd3f9619890b336a0cb537a1acd00049
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144136
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
make CppunitTest_sw_macros_test CPPUNIT_TEST_NAME=testVba
This now allows MS Word's modern content control list boxes
(combobox and dropbox) to be controlled by VBA basic.
-allows getting and setting the selected list entry
-allows adding/deleting/renaming/moving list entries
If .DropdownListEntries.Count <> 3 Then GoTo errorhandler:
.DropdownListEntries.Item(2).Select
.DropdownListEntries.Item(2).Delete
If .DropdownListEntries.Item(2).Text <> "infinity"
If .DropdownListEntries.Item(2).Value <> "infinity and beyond"
'With .DropdownListEntries.Add("third", "3rd", 2)
Dim LE As ContentControlListEntry
Set LE = .DropdownListEntries.Add("third", "3rd", 2)
With LE
If LE.Index <> 2 Then GoTo errorhandler:
If LE.Value <> "3rd" Then GoTo errorhandler:
.MoveUp
.MoveUp
.MoveUp
If .Index <> 1 Then GoTo errorhandler:
.MoveDown
.MoveDown
If .Index <> 3 Then GoTo errorhandler:
End With 'LE
If .DropdownListEntries.Item(3).Text <> "third" Then GoTo errorhandler:
End With 'Item 1
runOnceDropDown:
With ActiveDocument.ContentControls.Item(4)
If .Type <> wdContentControlComboBox Then GoTo errorhandler:
.DropdownListEntries.Clear
End With
Change-Id: Iffebb2bd69abec1cbcfaed05b58f940664852eae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143082
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
This adds basic VBA macro support for accessing
the modern content controls used for creating forms.
I ran out of time to make it fully functional.
TODO
-Invalidation: the screen isn't updating the modified results until
interaction from the user (mouse click, etc.)
-Unlike FormFields, content controls really depend on having
Range working. I didn't have time to look into that.
-I was hoping to check that my approach could accommodate the other
methods that create a filtered ContentControls object:
* Document.SelectLinkedControls,
* Document.SelectUnlinkedControls
* Range.ContentControls.
I guess it will be left up to whoever needs these to add the bits
that will create an appropriate collection for these limited sets.
-setType: changing one type to another - both LO and Word allow
limited use of this - depending on the text contents fitting
the new type.
What works:
-getByIndex - which probably is the "normal" way to do it,
since the UI doesn't provide a name/ID; just got via msgbox .ID.
-full checkbox support (minus the visual invalidation)
-VBA accepts almost all properties/methods that are requested.
make CppunitTest_sw_macros_test CPPUNIT_TEST_NAME=testVba
If Not ActiveDocument.ContentControls(1).Checked
If ActiveDocument.ContentControls(2).Checked
'If ActiveDocument.ContentControls(2).Range.Text <> "$"
ActiveDocument.SelectContentControlsByTag("checkboxes").Item(1).Checked
= ActiveDocument.SelectContentControlsByTag("checkboxes").Item(2).Checked
ActiveDocument.SelectContentControlsByTag("checkboxes")
.Item(2).SetUncheckedSymbol (8364) '€
With ActiveDocument.SelectContentControlsByTitle("listbox").Item(1)
If Not .ShowingPlaceholderText
'If .Range.Text <> "Choose an item."
If .Type <> wdContentControlDropdownList
End With
With ActiveDocument.ContentControls.Item(5)
'If Not .Temporary Then GoTo errorhandler:
If .Temporary <> False Then GoTo errorhandler:
If .Tag <> "" Then GoTo errorhandler:
If .Title <> "" Then GoTo errorhandler:
End With
With ActiveDocument.ContentControls.Item(6)
If .Type <> wdContentControlText
If .MultiLine Then GoTo errorhandler:
If ActiveDocument.ContentControls.Count <> 7
.Delete 'Doesn't actually Delete in LO yet - unsafe
' If ActiveDocument.ContentControls.Count <> 6
End With
' Change to 6 when delete is working safely
With ActiveDocument.ContentControls.Item(7)
If .Type <> wdContentControlDate Then GoTo errorhandler:
.Color = wdColorBlueGray 'unknown to Word 2010
If .Color <> wdColorBlueGray Then GoTo errorhandler:
If .DateDisplayFormat <> "mm/yy/dd" Then GoTo errorhandler:
If .DateCalendarType <> wdCalendarWestern Then GoTo errorhandler:
If .LockContents <> False Then GoTo errorhandler:
End With
Change-Id: I1c636f671de81e0283c040a578838a0433ef1f5b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143080
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
|
|
make CppunitTest_sw_macros_test CPPUNIT_TEST_NAME=testVba
This now allows MS Word Basic legacy list box form fields
to be controlled by VBA basic.
-allows getting and setting the text string/list entry
-allows adding and deleting list entries
Change-Id: Ia772c62395c40a6aa0afae2549f15f4ea3304dbf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142396
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Change-Id: Ib625049e93949b247ca20a83dcca16fecda29216
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142703
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
make CppunitTest_sw_macros_test CPPUNIT_TEST_NAME=testVba
This now allows MS Word Basic legacy text form fields
to be controlled by VBA basic.
-allows getting and setting the text string
Change-Id: Ib4601d4e087233a3db257728374b362bb34d1ecb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142262
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
|
|
make CppunitTest_sw_macros_test CPPUNIT_TEST_NAME=testVba
This now allows MS Word Basic legacy checkbox form fields
to be controlled by VBA basic.
-allows getting and setting the checkbox value
TODO:
-wire up entry and exit macros
-wire up StarBASIC support (hmm, how would that be different?)
-probably completely ignore this. formfields hidden from
normal writer - only activeX and content controls shown.
-setup tri-state for checkboxes: with a separate default value
Change-Id: Ied47a507dd9acc2c8dfd1472e6704e9dd571b480
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142253
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Change-Id: Id924e4747d6a3d81b69da28910c8e096565b9b68
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142538
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Unit tests will come in the following commits that represent
actual FormFields that have content/results.
This lays the foundation for adding
Checkboxes, Textinputs, and Dropdowns.
Change-Id: If85ae25f881198d5a0699b3350a7eb20b1735c45
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142507
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
|
|
The unit test just consists of adding a
"WordBasic.MsgBox()" to the vba code in testVBA.docm.
make CppunitTest_sw_macros_test
or just open the file manually for an easy-to-run experience.
Change-Id: I38edfee42649fcc85f0f535a2c9861c45038fa0e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141347
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Change-Id: I3d074c224b77eff9f4ab1ea6bade6d66828fc88c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141273
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
This allows WordBasic to also be run directly,
instead of only working with Application.WordBasic.*.
Change-Id: I60c3beaa1fce9a8bf25786cc0b2ed6ef6deda2f5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141200
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Change-Id: I920799321f245c015a527c816272c1038cc04544
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137851
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
Change-Id: Ic0de06699a647565deca7985742965a72614df16
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137787
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
|
|
Change-Id: I021ad15b81ce55c4f9e9e9b515be1ddaaca8d07d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137630
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
|
|
Change-Id: I0d8d02c555fd113b96661085b339b12d83c6010f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137109
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
Change-Id: I0e5f1ae0757a2ad8f58f011df435c30c577d8a79
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137006
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
Updated XRange to include XFind
Change-Id: If9570fbb5de8d14063a72a4c4c55fcfd491dd496
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137004
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
Value2 ignores date formatting in a way that Value does not.
Extended vba.xls to test this too.
Change-Id: Id75a3dafae2166221731847b7c81e93e8ad835fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133645
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
...which were used by ildc, which is gone since
a8485d558fab53291e2530fd9a1be581c1628deb "[API CHANGE] Remove deprecated idlc
and regmerge from the SDK", and have always been ignored as legacy by its
unoidl-write replacement.
This change has been carried out (making use of GNU sed extensions) with
> for i in $(git ls-files \*.idl); do sed -i -z -E -e 's/\n\n((#[^\n]*\n)+\n)*(#[^\n]*\n)+\n?/\n\n/g' -e 's/\n(#[^\n]*\n)+/\n/g' "$i"; done && git checkout extensions/source/activex/so_activex.idl odk/examples/OLE/activex/so_activex.idl
which apparently happened to do the work. (The final two files are not UNOIDL
source files.)
Change-Id: Ic9369e05d46e8f7e8a304ab01740b171b92335cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135683
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
This just delegates the get/set calls to ActiveWindow.WindowState
which is already supported, but calling it directly on Application
is also possible.
Change-Id: Ibf6f55581a5c66a47ec4dd21cc8d0fe3558330ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129013
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
Opens the file dialog and returns the selected filename.
Change-Id: I4eccd34a7fbb892c0950b2f7c34977cf2aad6f89
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128721
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
The VBA compatibility Range.Formula and Range.FormulaR1C1
properties wrongly used localized formula expressions as if they
were Range.FormulaLocal and Range.FormulaR1C1Local. That worked in
English UI and locales, but not in translated UI or with locale
dependent different separators, imported Excel documents using
these properties failed there.
Instead, use English formula expressions and separators, and
additionally implement Range.FormulaLocal and
Range.FormulaR1C1Local for localized formula expressions.
See
https://docs.microsoft.com/en-us/office/vba/api/excel.range.formula
https://docs.microsoft.com/en-us/office/vba/api/excel.range.formular1c1
https://docs.microsoft.com/en-us/office/vba/api/excel.range.formulalocal
https://docs.microsoft.com/en-us/office/vba/api/excel.range.formular1c1local
Unfortunately this change means for macros created in LibreOffice
that relied on the erroneous beaviour in a localized environment
those macros will cease to work, the remedy in these cases is to
replace setting Formula and FormulaR1C1 attributes with
FormulaLocal and FormulaR1C1Local instead. Obtaining formulas
never worked reliably unless the document's native grammar was
very similar to the API grammar (English UI function names,
English locale and separators, address convention).
For this to work a prerequisite is
commit d0b4719ca3d4608bcb7431dbeb097146dd5a5127
CommitDate: Wed Apr 7 02:22:54 2021 +0200
Related: tdf#128334 Make VBA Range getFormula(R1C1) work not only by accident
Change-Id: Ifce9ac7557b6a3703d47ee81b57dd8246f3fc3ca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113846
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
|
|
Previously, all of the README files have been renamed to README.md
and now, the contents of these files were changed to use Markdown
format. Other than format inconsistency, some README.md files lacked
information about modules, or were out of date. By using LibreOffice
/ OpenOffice wiki and other documentation websites, these files were
updated. Now every README.md file has a title, and some description.
The top-level README.md file is changed to add links to the modules.
The result of processing the Markdown format README.md files can be
seen at: https://docs.libreoffice.org/
Change-Id: Ic3b0c3c064a2498d6a435253b041df010cd7797a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113424
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
|
|
Renaming all README files for all top level modules to README.md,
applying no content change at this stage to be able to track history
of the files. These files should be edited to use correct Markdown
syntax later.
Change-Id: I542fa3f3d32072156f16eaad2211a397cc212665
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112977
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
|
|
It passed "make check" on Linux
Change-Id: Ibaaa3bbce3f2d502073803035aaacdad07bb170c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101810
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: Iee87dbb1a2e02891728a0aad2361fce60a479433
Reviewed-on: https://gerrit.libreoffice.org/83821
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Will be needed in COLEAT. And seems like a fairly obviously missing
API otherwise, too.
Change-Id: I990c605a7e3f9cff3b72f20a626477d010da9852
Reviewed-on: https://gerrit.libreoffice.org/81369
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
(cherry picked from commit b0b0788ba040be2bf42aa19313759ba9f4811d38)
Reviewed-on: https://gerrit.libreoffice.org/83660
(cherry picked from commit 1562900446a99623a30fa9e719322a8c24132f9d)
|
|
Change-Id: Ibf4d175b4b4a0b9f168401e52af6b0459aacd046
Reviewed-on: https://gerrit.libreoffice.org/81368
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
(cherry picked from commit 61a656cb9c7db1863e56d1183cb82c7e8be63cc5)
(cherry picked from commit 5c5034a6d5d411fedf1fb00e736c55b7bdd6f840)
|
|
This is for COLEAT's internal use.
Change-Id: If1ac2a5b251129e4431d3c0bde82529d6bdc7ccc
Reviewed-on: https://gerrit.libreoffice.org/72809
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
|
|
Factor out the setFilterPropsFromFormat() also used by
SwVbaDocument::SaveAs2000() to a header file of its own.
Change-Id: I4bc9e1e420719a115036beb7e82a4ac3feac05f0
Reviewed-on: https://gerrit.libreoffice.org/70980
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
|
|
Possibly this is more in line with what callers expect.
Change-Id: Ie84b05a0bdb5ef1cb3e1f9fb7df6772831ff4980
Reviewed-on: https://gerrit.libreoffice.org/70975
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
|
|
Change-Id: I7e1d83539153eede300b2b24f2fa6796859d299c
|
|
Change-Id: If7e45e2f791a7806e6cf8e7fc9693e19e87d2dbb
|
|
Change-Id: I52d75427fe30945293f347e3f49d21bc2016edae
|
|
Change-Id: I134101d1be5922051e34352331a49f5706030ff2
|
|
Change-Id: Ia9e78c331d2cb711653ee3e64597ebf2824e0eeb
|
|
Change-Id: I14379c5732c1921b8f52293045d01acf99e0b840
|
|
Change-Id: I972f9446560cc8ac51031dbc36fc05d438d150e7
|
|
Change-Id: I4606e5a3717c3717d105dd2e63c9fd7d2e1abf83
|
|
Change-Id: Ifc48e5fbcc212f0e80cf6877e2781910e38e5e54
|
|
Change-Id: Ic049f78fddcaabafbe6be18b92a87b56352c1a4c
|
|
Change-Id: Ifd472f4ca79ab97a1d6d5c5007537375121f6f58
|