summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)Author
2017-03-07convert RES_FIELDS to scoped enumNoel Grandin
and rename to SwFieldIds Change-Id: I50d2b7550f68b4b020ffc1603f931c671c8e1de6 Reviewed-on: https://gerrit.libreoffice.org/34924 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-03-06Notebookbar: fixed vertical alignmentSzymon Kłos
Change-Id: I19d06f9dd2d4ec65de687b36d8a80eb7c7beba22
2017-03-06sw: remove unnecessary upcastsJochen Nitschke
guess some broken compiler needed these Change-Id: If0132f6363555fea2ef880bd7af343c2d7b2a0a4 Reviewed-on: https://gerrit.libreoffice.org/34925 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-03-06sw: Bin unused vectorPranav Kant
Change-Id: I948d07c178344b66ea91eddf5771dc65b3ea9d30
2017-03-06convert SdrTextAniKind to scoped enumNoel Grandin
Change-Id: Ie79aaf96a0d89c96c4ecd4ee8ccb0eabd3456bd0 Reviewed-on: https://gerrit.libreoffice.org/34916 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-06doc/docx: make unit test for tdf#99120 round-tripableJustin Luth
When a page description is chained to a non-chained follow, it will only be used for a single page. Thus it might be able to be combined into the follow as a titlePage instead. However, if this page description has distinct even/odd pages, don't merge it as a titlepage. Change-Id: I62237a48c062e7c393a5224285a23597c479c1c9 Reviewed-on: https://gerrit.libreoffice.org/34889 Reviewed-by: Justin Luth <justin_luth@sil.org> Tested-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-03-06sw: prefix members of SwRectFnSetMiklos Vajna
Change-Id: I229620b9a96578f1f47132ff7bd4ea27e7611fec Reviewed-on: https://gerrit.libreoffice.org/34917 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-03-06convert HTMLTableRules to scoped enumNoel Grandin
Change-Id: Id8758955565579abd1f4687907d7fe06aaefa749
2017-03-06convert HTMLTableFrame to scoped enumNoel Grandin
Change-Id: I1353619ca11f867ca37dec3105e50ba9f3d70d54
2017-03-06convert HTMLInputType to scoped enumNoel Grandin
Change-Id: I3f6f6aadd813898ccff93154138a2fbf911b9c8f
2017-03-06convert HTMLScriptLanguage to scoped enumNoel Grandin
Change-Id: If87863b520da704410a6ad261330bbde7ef8008c
2017-03-06convert ScrollingMode to scoped enumNoel Grandin
Change-Id: Ice1628ba09998be455fd6a77a044cb403235d462 Reviewed-on: https://gerrit.libreoffice.org/34914 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-06make use of the SfxItemSet::GetItem<T> methodNoel Grandin
Change-Id: I8201429993129b019a6dd51c203a9f8dcbb2253e Reviewed-on: https://gerrit.libreoffice.org/34867 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-06remove some unnecessary use of OUString constructorNoel Grandin
found with git grep -nP '<<= OUString\(\w*[A-Za-z]+' Change-Id: I43354842f1e0418fb292f2e8e0cb30f1229d1c67 Reviewed-on: https://gerrit.libreoffice.org/34864 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-06templatize HTMLEnumOption::GetEnum methodsNoel Grandin
And consequently fix bug in htmlfld.cxx in the RES_DOCSTATFLD/SwDocStatSubType handling, where it was updating the m_bUpdateDocStat fields by comparing the wrong enum variable. Change-Id: If9a68699a9d375ace120a3bf4f4bf4d4ae20a8e0 Reviewed-on: https://gerrit.libreoffice.org/34857 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-06remove unnecessary castsJochen Nitschke
Change-Id: Ied96b8eea548771a71e69684ced1f1f3699ca237 Reviewed-on: https://gerrit.libreoffice.org/34910 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-04sw: translate german comments in atrftn.cxxMichael Stahl
Change-Id: I004dc0a28df0d5565e5096cf404584e6ea4e2925
2017-03-04sw: remove unused id RES_TXTATR_FLDCHGMichael Stahl
There is no evidence in git history of creating such a hint. Change-Id: Ie70b523835b2d1ecf34ae175af3e1d85fbaa5fc0
2017-03-04sw: translate german comments in atrfld.cxxMichael Stahl
Change-Id: Ice0e1410e5577ceccb32b252c26aff019ffbd194
2017-03-04sw: translate german comments in fntcap.cxxMichael Stahl
Change-Id: I14a549e81025bd978efe930812f919d40fd57783
2017-03-04sw: translate german comments in ndhints.cxxMichael Stahl
Change-Id: Ie33be6872b8b6c5bdd1481205ff2930b40438dff
2017-03-04sw: translate german comments in swfont.cxxMichael Stahl
Change-Id: Ic8944b96bfaa57ef87373e47bdd60ba30d183b39
2017-03-04sw: translate german comments in txtedt.cxxMichael Stahl
Change-Id: Id30445a2370946bdad274c90d777f98d06a7b3ac
2017-03-04sw: remove unused declarationsMichael Stahl
Change-Id: I3da3aa0823c5a37dd207778c6a825da0ab189766
2017-03-03Remove redundant 'inline' keywordStephan Bergmann
...from function definitions occurring within class definitions. Done with a rewriting Clang plugin (to be pushed later). Change-Id: I9c6f2818a57ccdb361548895a7743107cbacdff8 Reviewed-on: https://gerrit.libreoffice.org/34874 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-03-03tdf#106291: WW8 import: Properly treat column spansMike Kaganski
Previous code unconditionally treated all cells in merge groups as rows span, thus in some conditions it merged incorrectly when there were cells from same row. The fix is inspired by SwTable::PrepareMerge(). Also, fixed improper adjustment of too narrow cells in WW8TabDesc::CalcDefaults(), which also happens in files where column spans are represented by spanned 1-twip-wide cells. Unit test included. Change-Id: I6c3803635f006dd396805d6847daa4d80c97cad4 Reviewed-on: https://gerrit.libreoffice.org/34820 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-03-03drop SvxNumType and rename SvxExtNumType->SvxNumTypeNoel Grandin
Both of them are abstractions over the css::style::NumberingType constants. SvxNumType serves no useful purpose, since it's just a typedef to sal_Int16. At least SvxExtNumType wraps up the css::style::NumberingType constants in a nice enum. Change-Id: I7b3f97cd42b0aa23aff7a4db4930da86149d4f4e Reviewed-on: https://gerrit.libreoffice.org/34816 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-03Fix typosAndrea Gelmini
Change-Id: I95fc63af11c336cde9f5bef908e1389c2fb56f02 Reviewed-on: https://gerrit.libreoffice.org/34823 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-03sw: rework input field line breaking test to use portions directlyTomaž Vajngerl
Change-Id: I03cce0df2461964ce7402d32e6c5cc161b7f96ab Reviewed-on: https://gerrit.libreoffice.org/34684 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2017-03-03Remove uses of SAL_CONSTEXPR in LIBO_INTERNAL_ONLYStephan Bergmann
Change-Id: I9a7dc7c83302b3361f056fcf6636bbba7672f15f Reviewed-on: https://gerrit.libreoffice.org/34840 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-03-03use SvxExtNumType in SvxNumberTypeNoel Grandin
and follow the rabbit trail, fixing various other types in the process Change-Id: I8fc7df3b585df21578ffb28fdd7e5e427b3bfd9d Reviewed-on: https://gerrit.libreoffice.org/34814 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-03convert SfxEnumItem to type-safe template classNoel Grandin
and drop the SvxChartTextOrientItem class, unused. Change-Id: I99100837d1beb953450f57b2cda47d165df1620c Reviewed-on: https://gerrit.libreoffice.org/34747 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-03another test that seems to depend on the available fontsMarkus Mohrhard
See RandomConfig tb run #260. Change-Id: Ib2a12ffa9a42745ac4551eaca02d84d6921924f8 Reviewed-on: https://gerrit.libreoffice.org/34847 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-03-02the test seems to depend on our bundled fontsMarkus Mohrhard
Try to fix the "RandomConfig" tinderbox when --with-fonts=no is selected. E.g. run #255 Change-Id: Ie43953ad1511cd00bdc82717211f61edefa64b12 Reviewed-on: https://gerrit.libreoffice.org/34839 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-03-02tdf#101178 sw: DOCX export: fix crashMichael Stahl
These conditions in DocxAttributeOutput::EndRun() are apparently not mutually exclusive, so don't increment m_nFieldsInHyperlink twice. Whether the m_nFieldsInHyperlink makes any sense considering there are *2* hyperlinks then, i can't tell. Change-Id: I5030f3303bd83633fcb044573860bc8ecaacae32
2017-03-02sw: Fix STL assert on DOCX export of ooo29679-42.odtMichael Stahl
The problem was that the StartField_Impl() was called again and again on the same field (actually 0-length ToXmark with dummy char), or in other words, EndField_Impl() wasn't called and it wasn't removed from m_Fields. So tweak the south-pointing chariot DocxAttributeOutput::EndRun() again in the hope it will go another km or two before it starts pointing east. This doesn't actually produce the elements in the ideal order in some cases, but given that this code has clearly passed the complexity event horizon that is too much to ask for. Change-Id: I9b031ce8fae91d3e5af3cb1148390807574fb748
2017-03-02Clean up use of integer typesStephan Bergmann
Change-Id: I9b4f740e1c53de0ee90c3299970f774ace67323b
2017-03-02Fix typosAndrea Gelmini
Change-Id: Ib725427225fe95fb39a72f96bbd60d5464c9351a Reviewed-on: https://gerrit.libreoffice.org/34782 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-03-02Complete the transition of SwRedlineTable::size_typeStephan Bergmann
...from 9ca8a63fff65acf2ea13b391495ad232f4636548 "Use consistent integer types in the SwRedlineTable interface". This all started as an attempt to reduce the number of places a to-be-committed improved loplugin:loopvartoosmall complains about. Lets see where it ends... SwRedlineTable::size_type is now the size_type of the underlying std::vector, no longer sal_uInt16 from ancient times. I tried hard to find all places that are affected by this change, changing types of affected variables and non-static data members as needed. Some notes: * The original code used USHRT_MAX as a "not found" value. I replaced that with a new SwRedlineTable::npos, of type SwRedlineTable::size_type but still for now of value USHRT_MAX. This should eventually be changed to something more sensible, like std::numeric_limits<SwRedlineTable::size_type>::max() (which is best done after we have constexpr support in all toolchains, so that npos can be constexpr). It is important that the value of npos is towards positive infinity, as many places in the code use for (i = f(); // may return npos i < table.size(); ++i) table[i] ... * There are some borders where values of SwRedlineTable::size_type are converted into different types, for various reasons. But all of those other types should be large enough for practical purposes (at least 32 bits wide): MakrEntry::m_nIdx: long int SvxRedlinTable::InsertEntry: sal_uIntPtr nPos SwRangeRedline: size_t SwRedlineItr: sal_Int32 SwVbaRevision::GetPosition: sal_Int32 SwXRedlines: sal_Int32 * .uno:TrackedChangeIndex= transports textual representations of such values. libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx treats them purely as strings, while SwTiledRenderingTest converts them to int. * TODO: The one place I'm unsure about is SfxUInt16Items with IDs FN_REDLINE_ACCEPT_DIRECT, FN_REDLINE_REJECT_DIRECT, and FN_REDLINE_NEXT_CHANGE in sw/source/uibase/uiview/view2.cxx. For now, I kept those as SfxUInt16Items and take care to "map" USHRT_MAX to npos when reading from those items. But I have no idea where instances of those items would actually be created, and what it would mean to change those items' types? Change-Id: Ib7a14dc67e2b970766966e43f4732abd9f045ff8 Reviewed-on: https://gerrit.libreoffice.org/34775 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-03-02use std::vector::insert when inserting multiple of the same thingNoel Grandin
instead of looping Change-Id: I7b8c1663e303449302e0b96dc5b483367c2a52ba
2017-03-02bypass exception throwing and catchingNoel Grandin
instead of needlessly catching the exception that comphelper::getEnumAsINT32 generates, let's just call the same function that comphelper::getEnumAsINT32 uses Change-Id: Ibc7d79cc15c13d4124f5bd62a038804209cf5b07
2017-03-02elide the SwSurround enumNoel Grandin
no point in redeclaring an existing enum exactly Change-Id: I4fb367e4b27e36601f1f36b629097a87b5f00096 Reviewed-on: https://gerrit.libreoffice.org/34773 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-02sw: replace hardcoded 1 with TRISTATE_TRUEJochen Nitschke
Change-Id: I071f787f6a00acc9827fbce9e6993d33450ab7b5 Reviewed-on: https://gerrit.libreoffice.org/34764 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-02no need to use smart pointers for DataFlavorExVectorJochen Nitschke
DataFlavorExVector is a std::vector<..> typedef. remove odd void pointer in BrowseBox. return const references to keep getter const qualified. Change-Id: Iafd529a46b7511941c1dffc86d2066fdc4f07e28 Reviewed-on: https://gerrit.libreoffice.org/34767 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-01Resolves: tdf#106261 throw away old node map for tableCaolán McNamara
when generating a new one, otherwise on exporting the same table twice to two consecutive .doc footnotes will think the second export of the table is a level lower because it will find it in the map and WW8TableNodeInfo::Pointer_t WW8TableInfo::insertTableNodeInfo does pNodeInfo->setDepth(nDepth + pNodeInfo->getDepth()); using the cached pNodeInfo depth and not a new fresh pNodeInfo of depth 0 Change-Id: I7aa7ac6a19814910c1d19d78f04cfd9886c444c5
2017-03-01sw: remove some more hardcoded 1 with TRISTATE_TRUEMichael Stahl
Change-Id: I8cc89c66eb1c3f09e02ba312e6ea8c9379ff8a4d
2017-03-01tdf#77111 sw: fix page number offset on table dialog "Text Flow"Michael Stahl
Commit c2ccd20c0fd92bddfff76447754541705e3eb8f3 introduced 0 as a valid value for page number offset in sw core. Unfortunately the table dialog was not changed then; previously page number 0 would do automatic numbering, but since then 0 was set as the offset, and once you have a 0 offset there's no easy way to remove it, you have to remove the whole page break. * change the label before the text number edit widget to a checkbox that disables the edit widget * keep the id "pagenoft" so that translations still work * set initial value to 1; 0 is a really bad default since we can't export it to ODF * add a little bit of left margin so the line is indented below the upper line Change-Id: I70cf5a66d4191acd2c19b3d0a83609e2b348a886
2017-03-01reorg SwBreakIt to just create it at the startCaolán McNamara
Change-Id: Ie2b725e4e0c8d9b581ced74f9cdd08d97ab90e46 Reviewed-on: https://gerrit.libreoffice.org/34746 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-03-01remove UsedOrUnusedVirtObjPred and replace it with a small lambdaBjoern Michaelsen
Change-Id: I189e5b78aafe03a600194df206ad48076e27ff63 Reviewed-on: https://gerrit.libreoffice.org/34728 Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com> Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2017-03-01move GetOrdNumForNewRef() and CreateNewRef() ...Bjoern Michaelsen
... from SwFlyFrame to SwFlyDrawContact as that is the object they are doing most of the work. Also refactor a bit while at it. Change-Id: I9a08592afb15be32c2c36408e4126807871f77c8 Reviewed-on: https://gerrit.libreoffice.org/34733 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>