summaryrefslogtreecommitdiff
path: root/sw/inc/tblafmt.hxx
AgeCommit message (Collapse)Author
2024-11-07loplugin:passstuffbyref in swNoel Grandin
Change-Id: I22f4f4a0f2729b953669322eda803ce298eea236 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176202 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-09-09dont use GetItemSurrogates for gathering SvxOverlineItemNoel Grandin
which is very expensive these days Change-Id: I0ac24ba8ef4df9310b9e6ca5cfd7a132a61bb889 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173049 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-07-19(related tdf#126008) sw: when removing table auto format, don't...Michael Stahl
... change the formatting. Change-Id: I50fbb290f0a7f2cccc2559059859fa820d5c9aba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170688 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Jenkins
2024-05-13Revert "reduce symbol visibility in sw"Thorsten Behrens
This reverts commit 1a6711276f0c8abeb0028a47cc345a7453374a38. After some discussion and experiments, it turned out this rather fundamentally breaks clang's PCH build. Conclusion was: this change is not significant enough to warrant making life harder for developers. Excerpt of errors (affected were vbaswobj, msword & swui libs): - ld.lld: error: undefined symbol: SwFormat::~SwFormat() >>> referenced by fmtcol.hxx:37 (sw/inc/fmtcol.hxx:37) >>> core/workdir/CxxObject/sw/inc/pch/precompiled_vbaswobj.o:(SwFormatColl::~SwFormatColl()) - ld.lld: error: undefined symbol: SwFrameFormat::SetPositionLayoutDir(short) >>> referenced by precompiled_msword.cxx >>> core/workdir/CxxObject/sw/inc/pch/precompiled_msword.o:(vtable for sw::SpzFrameFormat) - ld.lld: error: undefined symbol: SwFrameFormat::SetLayoutDir(SwFrameFormat::tLayoutDir) >>> referenced by precompiled_swui.cxx >>> core/workdir/CxxObject/sw/inc/pch/precompiled_swui.o:(vtable for sw::SpzFrameFormat) Change-Id: I1dcf115cc191b1ebf1f8d5023c0c5015f891287a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167549 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-03-13reduce symbol visibility in swNoel Grandin
Change-Id: Ib3edefc365d3c605c3024e160572fa4030100ef1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164724 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-19use more concrete UNO type in SwTableAutoFormatNoel Grandin
Change-Id: I5c36a268a76afcf7af5829dc7f873f4410f68298 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150588 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-19use more concrete UNO type in SwBoxAutoFormatNoel Grandin
rather than hiding the relationship behind XInterface Change-Id: Ie5e6e527d39ab2b4a26ae7830a196b354d2a6f04 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150586 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-13tdf#153935 sw: PDF/UA export: guess table headers based on autoformatMichael Stahl
This is a bit of a disaster area because in contrast to SdrTableObj (see commit 0bc96b8805f2cfa2278729a9f3e56a350ddd69ad) the SwTableAutoFormat application doesn't have flags which "special" formattings like "first-row" etc. should be applied to the table. So add a horrible heuristic to guess depending on the content of its formatting attributes. Change-Id: Ie09538d37de6118409b04a4cec6ab46b74c4194d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148793 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-08-04clang-tidy modernize-pass-by-value in swNoel Grandin
Change-Id: Ie5c250c64f95e649d33d3f3da7b54e81a4b81d0b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137781 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-10Recheck sw headers with IWYUGabor Kelemen
See tdf#42949 for motivation Change-Id: I99558e6b6952b3f2c1ee32dd07354ff659ad9cd0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131183 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-07-15tdf#134452 sw: fix page break disappears after applying table styleBalazs Santha
After setting the break and pagedesc property of a table, applying a table style (autoformat) caused the loss of these settings. This was because, when applying a table style, the SwTableAutoFormat::RestoreTableProperties() overrid these settings with its own default settings. As the autoformats can never be modified, and they don't really use these two props, the easiest way to prevent any problem was to completely remove these properties and its uses. Unfortunately, m_aBreak couldn't be removed entirely, as the autoformats are stored in a binary file, and to be able to read and write these files the offset of the subsequent items must not be changed. Change-Id: Ieba439d3ba5da892b39f00f8b61c5c8467306635 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118662 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2020-11-24loplugin:stringviewparam extend to comparison operatorsNoel
which means that some call sites have to change to use unicode string literals i.e. u"foo" instead of "foo" Change-Id: Ie51c3adf56d343dd1d1710777f9d2a43ee66221c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-12sw: prefix members of SwFmDrawPage, SwNumRule, SwTableAutoFormat and ...Miklos Vajna
... WriterSpecificAutoFormatBlock See tdf#94879 for motivation. Change-Id: Ie740f07e1c65a6def6ba673529144d0e111b056e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100610 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-03-12comparison operators should be constNoel Grandin
Change-Id: Ifa76e004128223460945d58d1c59c4e23db0f108 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90370 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-12use covariant return type for SfxPoolItem::CloneCaolán McNamara
and can then remove some casting Change-Id: Id821c32ca2cbcdb7f57ef7a5fa1960042e630ffc Reviewed-on: https://gerrit.libreoffice.org/85022 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-11-19tdf#115576 sw: fix borders for single row/col autotable stylesJustin Luth
The 4*4 autostyle table matrix has no box format that can handle a table with a single column or single row. So the first and last row/column boxes need to be combined to get all of the necessary borders. This could easily be seen by setting one column and X rows using the default table style - missing right border. It could also be seen by setting one row and X columns using Box List yellow - missing bottom border. Change-Id: Ib2cf873b6d4e10ba5145e680ea7b3e2e3aea3970 Reviewed-on: https://gerrit.libreoffice.org/82998 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-10-17Remove some memset callsMike Kaganski
Replace them with default initialization or calloc Change-Id: I747f53c2ced2d0473fd5a5ede4f8520a0633dcc1 Reviewed-on: https://gerrit.libreoffice.org/80805 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-09-28loplugin:constmethod in swNoel Grandin
Change-Id: I73c3c6d2165287d2d581a04b23b1d3b48166a488 Reviewed-on: https://gerrit.libreoffice.org/79780 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-05tdf#42949 Fix IWYU warnings in sw/inc/*Gabor Kelemen
New IWYU and recent developments in f-u-i helped to identify some non self contained files and mostly those were fixed. Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I21550193293b987311c56d8f7c9c3145547d2c6d Reviewed-on: https://gerrit.libreoffice.org/74909 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-05-19Fix typosAndrea Gelmini
Change-Id: If0747801d2b955718aa96b97816307ce14cb11a1 Reviewed-on: https://gerrit.libreoffice.org/72547 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-18Adapt AutoFormatHelper to std::unique_ptrArmin Le Grand
Change-Id: I3087a7e95e73dbcda798ca62705f7941a6466ccb Reviewed-on: https://gerrit.libreoffice.org/72401 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2019-05-12sw: -Werror=deprecated-copy; restore SwBoxAutoFormat::operator=Michael Stahl
Presumably 1e2682235cded9a7cd90e55f0bfc60a1285e9a46 assumed that it's not called any more but evidently it is. Change-Id: I5b7bad52d0a0c40494b33c3a604c8af1ace2b090 Reviewed-on: https://gerrit.libreoffice.org/72173 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2019-04-25WIP: Further preparations for deeper Item changesArmin Le Grand
(1) Migrated all still existing binary load/save stuff in SfxPoolItem to legacy files. Isolated from Item implementations. Adapted all usages. No more methods Create/Store needed, also GetVersion removed (2) Removed operator= for SfxPoolItem. Adapted all usages. Goal ist to handle Items more as Objects ('Object-Oriented') in the sense to move/handle instances, not to copy one instance over another one (which is more and more problematic with hard to copy content as UNO API stuff or similar). This lead to much more usages of std::shared_ptr which correlates well with future plans fr Items (see dev branch). Next logic step will be to also remove copy constructor Linux build and corrections done Fixed Writer test and removed unused defines Fixed another unused m,acro Started to unify the AutoFormat stuff Changes to OUString constructor usages, tests completely No idea why, but SfxStringItem constructor which takes a OUString& now insists of not getting ::OUString's handed in - changed all 'SfxStringItem.*OUString.*".*"' accordingly Change-Id: Ibed7358b18fb019994a7490332b9d797a6694c29 Reviewed-on: https://gerrit.libreoffice.org/71075 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2019-01-28sw: prefix members of SwTableAutoFormatMiklos Vajna
Change-Id: I17515ea4e444986f50d554c864540a625a521970 Reviewed-on: https://gerrit.libreoffice.org/66984 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2018-11-22convert SwTableAutoFormat::UpdateFlags to scoped enumNoel Grandin
and remove unused UPDATE_ALL Change-Id: Ib8f21dcddec66947fff8e9cda63f10711da02883 Reviewed-on: https://gerrit.libreoffice.org/63748 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-28loplugin:useuniqueptr in SwCellStyleTableNoel Grandin
Change-Id: I9e589efa8ee8e11e6518f61f80f0e4c114867b4a Reviewed-on: https://gerrit.libreoffice.org/61001 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-08sw HTML import: apply default table autoformat on cells in reqif modeMiklos Vajna
The reqif xhtml subset doesn't allow formatting of cells, which means that the tables created with the UI and imported tables look different, e.g. the later ones have no borders. Fix this inconsistency by applying the default table autoformat during import (in reqif mode). The import result looks better this way, and the export will ignore it anyway. Change-Id: I310770594e7a00e62f23d9df8cb16c2b95e1e44a Reviewed-on: https://gerrit.libreoffice.org/58741 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins
2018-03-28sw: fix some IWYU warningsMiklos Vajna
Change-Id: I96a6401f0cc7bf9f219717671e41932d7d8570b7 Reviewed-on: https://gerrit.libreoffice.org/51972 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2018-01-30loplugin:unused-returns in swNoel Grandin
Change-Id: I753fcdd35d461880a8d8160213cabd465cfde967 Reviewed-on: https://gerrit.libreoffice.org/48189 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-23loplugin:includeform: swStephan Bergmann
Change-Id: Ifc3c4c31a31ee7189eeab6f1af30b94d64f2f92a
2017-08-03loplugin:constparams in sw part2Noel Grandin
Change-Id: I51ae0e8caaf46f141d3d15ace47612df1e476de7 Reviewed-on: https://gerrit.libreoffice.org/40735 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-20Added Test to check TableAutoFormat Style after Save/LoadVarun Dhall
Change-Id: I466d5c5536d4c4310356f38569f7a91e0f36ba1d Reviewed-on: https://gerrit.libreoffice.org/40104 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-09-22loplugin:unusedmethods in sc..vclNoel Grandin
Change-Id: I70fcf95dfd3db05b4fd6e5cee37866f673d3afa8 Reviewed-on: https://gerrit.libreoffice.org/29183 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-08-10GSoC Writer Table Styles; Create by example; fix undoJakub Trzebiatowski
- Create style by example, tracked by undo; - Fixed delete style, now is tracked by undo Change-Id: Ic39b549b0b970b1b15001d527a82fb26e4a630aa Reviewed-on: https://gerrit.libreoffice.org/27990 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-08-01GSoC Writer Table Styles; Table Styles PanelJakub Trzebiatowski
Table styles panel: + Added simple table style panel tab icon. icon-themes/galaxy/sw/imglst/sf06.png + Listing table styles (hierarchical, same order as in container) + Listing all table styles (sorted by name). + Listing applied table styles. + Listing custom styles. + Listing hidden styles. + Hide/show style. + Applying style by double clicking. + Highlight current table style. Everything else yet to be done. Table styles (SwTableAutoFormat): + "hidden" property. + "userDefined" property. "Default style" is not user defined. Styles loaded from tblauto.fmt are also not user defined. Styles loaded from .odt are user defined. Styles created manually (before binary load/save roundtrip) are user defined. Change-Id: I739a48ae1d7ae66f4f8c08076871437ca491bd4e Reviewed-on: https://gerrit.libreoffice.org/27638 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-07-07GSoC Writer Table Styles ImportJakub Trzebiatowski
This patch is implementing import of table styles (table-template). Modified shared code: Added "background" to the cell styles export. To make cell export properties map accessible by both export and import code, moved from xmloff/source/table/XMLTableExport.cxx to xmloff/txtprmap.hxx. To avoid export of default valued properties implemented XPropertyState for SwXTextCellStyle Change-Id: I8b4f12e4b51f478f8ce8fde1203cd4611d7ae852 Reviewed-on: https://gerrit.libreoffice.org/26721 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-06-24GSoC Table Style Family: insertByName, replaceByName, removeByNameJakub Trzebiatowski
- also implements SwXTextTableStyle::replaceByName - some refactorization + use std::unique_ptr - fixes some bugs: + posible nullptr dereference in tblafmt.cxx + SwXTextTableStyle::getName() returned translated name + remvoed unnecesary SetXObject in Cell Style Family replacebyName - tests Change-Id: Idd25d54695ab5a4bdd4daf7ebf37b05fbc2366e7 Reviewed-on: https://gerrit.libreoffice.org/26578 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-06-17GSoC Table Styles, Add TableStyle propertiesJakub Trzebiatowski
Added properties for the following odf attributes: table:first-row-end-column table:first-row-start-column table:last-row-end-column table:last-row-start-column Change-Id: Iac140e00a3439740623649ea234504f08146aaf3 Reviewed-on: https://gerrit.libreoffice.org/26359 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-06-13GSoC Table Styles, CellStyleJakub Trzebiatowski
- insertByName - replaceByName - removeByName Change-Id: I964aa0dc2e7f5a5be9eaec719b8944e847eb9d6a Reviewed-on: https://gerrit.libreoffice.org/26037 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-06-07sw UNO Cell Style family, SwXTextCellStyleJakub Trzebiatowski
Cell Family :: getByName Cell Family :: getElementNames Cell Family :: getCount Change-Id: I37d567ee284054f847c704d9fce370d174a0c48c Reviewed-on: https://gerrit.libreoffice.org/25896 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-05-31Sw UNO API SwXTextCellStyle; TableStyles createInstance, XNameAccessJakub Trzebiatowski
Making createInstance("com.sun.star.style.TableStyle") possible Making SwXTextTableStyle a XNameAccess container of SwXTextCellStyles Implementing basic SwXTextCellStyle CellStyleMap based on svx/source/table/tabledesign.cxx Change-Id: I5afff1f514582a63a6eb9f9fb44667665749855a Reviewed-on: https://gerrit.libreoffice.org/25558 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-05-26Sw UNO API TableStyles getByNameJakub Trzebiatowski
Implementing TableStyle family getByName, hasByName, getByIndex Implementing SwXTextTableStyle Implementing basic tests Change-Id: I256189db8631a713c4aae6b449409bbfaa776f24 Reviewed-on: https://gerrit.libreoffice.org/25410 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-04-22Avoid reserved identifiersStephan Bergmann
Change-Id: I27ff0f4f0eb395d7e0a60dd604758c220a3134c4
2016-04-14loplugin:passstuffbyref in swNoel Grandin
Change-Id: I124bdd4f28c7d7508e77b902dfa23c398454bf38
2016-01-19loplugin:unusedmethods in sw/Noel Grandin
Change-Id: Id452bfac5c83f130a138e06984a0c79c37af70ac
2016-01-10Fix typosAndrea Gelmini
Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86 Reviewed-on: https://gerrit.libreoffice.org/21209 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2015-11-10sw: prefix members of SwBoxAutoFormatMiklos Vajna
Change-Id: I9849dcd31dae2e5db9ce3178640d2bf605b78238
2015-09-27sw table styles: Implement table styles in Writer.Jan Holesovsky
This extends the table auto formats so that SwDoc keeps track of the auto formats used in the document. With this in mind, we can update the format of the table with every operation like adding/removing a line, splitting a table, etc. So far we only have the core functionality, and cover inserting a line in the table; more to come. Based on work of Alex Ivan <alexnivan@yahoo.com> during GSoC 2013 - thank you! Change-Id: I7839147e54c2f976988121a523331def9859f4c2
2015-09-16sw: replace boost::ptr_vector with std::vector<std::unique_ptr>Michael Stahl
Change-Id: I880526fdcce3be0f9e9149695812e048d95004e6
2015-08-07sw: use std::unique_ptr in sw-global includesMiklos Vajna
Change-Id: I7b1a313e6c36fd162878cfc9f17ae73f91a72665