summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)Author
2015-09-14Don't read out-of-range ContentTypeId from configurationStephan Bergmann
officecfg/registry/schema/org/openoffice/Office/Writer.xcs specifies -1 as default for /org.openoffice.Office/Writer/Navigator/RootType, which now triggers the assert in o3tl::enumarray::operator[] during JunitTest_toolkit_unoapi_1. Regression introduced with cb45d0d4272da54f90cb2b03d2cdbe1a4eebc75c "convert CONTENT_TYPE to scoped enum." (A better fix might be to replace ContentTypeId::UNKNOWN with -1; to be followed-up upon.) Change-Id: Id12c775cee8936ef2fd411da25558acabb5fa0c9
2015-09-14silence bogus warningCaolán McNamara
Change-Id: Ib8f4bcebfbd1f25f426a5d7954c3a55248c3c315
2015-09-14sw: prefix members of SwTransferableMiklos Vajna
Change-Id: I2011bc44a4afbf41ecaadbbb4fa82b7dac130e27
2015-09-14tdf#92586 xmloff: fix import of stretched background imageMiklos Vajna
The bug document has: <style:page-layout-properties ... style:repeat="no-repeat"> <style:background-image ... style:repeat="stretch"/> </style:page-layout-properties> When a stretched background image is set on a page style using the Writer UI, then these two style:repeat attributes always match, but not in the bugdoc. The later used to have priority, till commit 7d9bb549d498d6beed2c4050c402d09643febdfa (Related: #i124638# Second step of DrawingLayer FillAttributes..., 2014-06-02). Fix the problem by extending XMLBackgroundImageContext::EndElement(): if we know that the <style:page-layout-properties> sets the FillBitmapMode property, then don't blindly set BackGraphicLocation, but try to overwrite the exiting FillBitmapMode one. Change-Id: I64ab4363b20cc95003d35acd63ea421472b1c071
2015-09-14convert EDIT_MODE to scoped enumNoel Grandin
Change-Id: I04efbfa9abc1975cec72c8a1119868d0a97142a2 Reviewed-on: https://gerrit.libreoffice.org/18537 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-09-14convert CONTENT_TYPE to scoped enumNoel Grandin
Change-Id: I84b6d595f3997207385355f2bb3a9b64e6c9977b Reviewed-on: https://gerrit.libreoffice.org/18536 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-09-14convert RegionMode to scoped enumNoel Grandin
Change-Id: I07041ce4d6571ac384390443293543368f11b7d6 Reviewed-on: https://gerrit.libreoffice.org/18535 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-09-13boost->stdCaolán McNamara
Change-Id: I9b4f884c6313a53fea543ea6f93175205351ad14 Reviewed-on: https://gerrit.libreoffice.org/18517 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-09-12Update many ListBox users to its sal_Int32 interfaceMatteo Casalin
Change-Id: I6469ac5e2d17406bee9bc434930e2471cb3bae9f
2015-09-11sw: replace boost::ptr_vector with std::vector<std::unique_ptr>Michael Stahl
Change-Id: I8baa909f5e3ddb6b227337f3731e4d4b4ca183e5
2015-09-11sw: replace boost::ptr_vector with std::vector<std::unique_ptr>Michael Stahl
Change-Id: I5316874cb8abe191da4fd385b281599d422a23ee
2015-09-11sw: add unit test for the redline frame duplication regressionMichael Stahl
Change-Id: I4b0f6199ebb8a9f462e53f3fdf8be871a267ba69
2015-09-11Revert "Fix single node CopyRange"Michael Stahl
This reverts commit 9099e21b89184bd4e39def497e483cac4a77ec5a. It causes the problem that frames anchored to the same node where redlines start or end get duplicated during Hide. Jan-Marek said that the original mail-merge related problem this change was fixing is now most likely fixed differently, and the test in testMultiPageAnchoredDraws() still passes. Change-Id: Ie84fed3f64be7696782bc557004eb18fccc5b64b
2015-09-11tdf#94045: negative margins in OOXML reenabledOliver Specht
OOXMLUniversalMeasureValue is an integer value and needs to be converted to a signed integer. unit test included Change-Id: I7fe3fdf4b8b12df55e9cea2a968b9537676687eb Reviewed-on: https://gerrit.libreoffice.org/18496 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2015-09-11tdf#93901: apply handling in style/edit dialog improvedOliver Specht
introduced SfxTabPage::ChangesApplied() to enable resetting values to their initial state while editing styles Change-Id: I60fd68d8464e12e795b0e0d2f2e53882a225c181 Reviewed-on: https://gerrit.libreoffice.org/18467 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-09-11sw: indentation fixesMiklos Vajna
Change-Id: I7cf97f06053275fa229bbd24a06f7b0104f024fb
2015-09-11convert Link<> to typedNoel Grandin
Change-Id: I85658fa35b9b85106a3b9c8ef303584cad6f39b0
2015-09-10loplugin:staticmethodsStephan Bergmann
Change-Id: I00acce39f94653ef8e2465f15ba572b619a1c7fb
2015-09-10coverity#1323757 Dereference before null checkCaolán McNamara
Change-Id: I5353b78b6961d28fb3f42e5f2073e9a83ac1037c
2015-09-10Related: tdf#93676 default to as-char inside captionsCaolán McNamara
This will (hopefull) improve round-tripping to doc[x] for new documents because word can only have as-char elements inside frames so we get a like-for-like conversion if the defaults are used. Change-Id: I3913b9b624dd5ba57ed07140bced8e3dca289cf5
2015-09-10split out useful code as standalone makeItemSetFromFormatAnchorCaolán McNamara
Change-Id: I385549b4841dfc715aa984bcc257d78c9f1c3ed4
2015-09-10GetCurFrameFormat->GetSelectedFrameFormatCaolán McNamara
Change-Id: I2f1eb4567b6e073991d95dbcecdc79b24010f2c1
2015-09-10GetSelectedFlyFrm+GetCurrFlyFrm -> GetSelectedOrCurrFlyFrmCaolán McNamara
Change-Id: I4348c4cf54dcd5504c52cf8ab550572257eef50b
2015-09-10bundle duplicate pattern into a GetCurrFlyFrm methodCaolán McNamara
Change-Id: Ib12b825ef9cc6e2b57e9320d435e3863d319cf0f
2015-09-10GetCurrFlyFrm just forwards to GetSelectedFlyFrmCaolán McNamara
Change-Id: Ia0b83a3aad71a72ae2135c5d7f6ddb6d9644b10b
2015-09-10this FindFlyFrm variant returns the Selected FlyFrmCaolán McNamara
the other one actively searches for the FlyFrm that matches the XEmbeddedObject argument Change-Id: I2f9271c01337b4a32d7b644f82d16d85c2dc5b51
2015-09-10convert Link<> to typedNoel Grandin
Change-Id: I603463d0486d4d0f21ebbdc6eca900db58bb090f
2015-09-10Wizzard->WizzardCaolán McNamara
Change-Id: Ib97387fac7f519ce255ab68b08438a71d753382d
2015-09-10sw: use std::unique_ptr<> in textMiklos Vajna
Change-Id: I0a4e0b5abbbbd58e7c0fc8235d88cf08a29a7c70
2015-09-09sw: replace boost::ptr_vector with std::vectorMichael Stahl
Change-Id: I6bef6fc863034b162459a46d332fa66a06916e7f
2015-09-09sw: Help vs 2015 with virtual base inheritanceDavid Ostrovsky
MSVC 14.0 was failing to compile IMark class an friends with: error C2280: 'SwModify &SwModify::operator =(const SwModify &)': attempting to reference a deleted function: [1]. After defining copy ctor and assignment operator in SwModify and derived classes as deleted the next failure was: error C2512: 'sw::mark::IMark::IMark': no appropriate default constructor available: [2]. Defining default ctor as default in IMark and derived classes seems to make all compilers happy. [1] http://paste.openstack.org/show/447854 [2] http://paste.openstack.org/show/447856 Change-Id: I2822e8ec4b98ca18d0a0128ed2ceeb38f347c5bf Reviewed-on: https://gerrit.libreoffice.org/18362 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2015-09-09tdf#92036: sw: fix idle spelling loopMichael Stahl
There is a sort of intentional infinite loop in the idle spell checking handler: while the user is typing a word, it should not be marked as invalid yet, in order not to annoy them with red underlines. So the word where the cursor is positioned always remained dirty, unless you happen to have a grammar checker enabled, which clears the paragraph's dirty flag from a separate thread. To avoid the infinite loop, add another spell checking state "PENDING" which is the same as dirty except that it should cancel the idle spell checking. The idle spell checking will run again when the user does the next editing operation. Notably this means if the user just moves the cursor out of the wrongly spelled word, it won't be underlined yet, but that appears a minor issue, and checking when the cursor leaves the word appears too hard to implement. Change-Id: Ifb3d6d17f94f9f1cfad82e70dfa79f1594c38647
2015-09-09no point in reminding me now, we shipped a while backCaolán McNamara
Change-Id: I728d4c0c6e271e3a97a95996f96ed43c00a3abc8
2015-09-09stray debugging linesCaolán McNamara
Change-Id: I525009b9d037387b236cb4605fe0b93c94858d89
2015-09-09sw: tdf#88206 replace cppu::WeakImplHelper* etc.Takeshi Abe
with the variadic variants. Change-Id: I1c423f98fba55c1ac5c3bd9a4e81ebd7eb6604b4 Reviewed-on: https://gerrit.libreoffice.org/18393 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-09-09convert Link<> to typedNoel Grandin
Change-Id: I3127752785b77672d37f99bc9eaa881377dabe7c Reviewed-on: https://gerrit.libreoffice.org/18431 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-09-09convert Link<> to typedNoel Grandin
Change-Id: I2aeda615e39db5a3cd39e168db34425e2912be8b
2015-09-09convert Link<> to typedNoel Grandin
Change-Id: I184d836e944d6dcfd17233a7a83680f1c1bff9bf
2015-09-09sw: use std::unique_ptr<> in undoMiklos Vajna
Change-Id: I327108c72d6f00575491de8ee1ebc470e6d18bb5
2015-09-08tdf#91523 sw: fix navigation to index markOliver Specht
Access pTextTox instead of pTextField in case of TEXTTOXMARK Change-Id: I92ece6f4c5d6a6427f89cbd43a15a4b0a3adb645 Reviewed-on: https://gerrit.libreoffice.org/18407 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-09-08Related: tdf#93676 msword wraps slightly differently than usCaolán McNamara
Change-Id: I688d4d193709d9c9829065c87f0d656a94fd9f16
2015-09-08loplugin:mergeclasses merge SwpHintsArray with SwpHintsNoel Grandin
and clean up the API a little, there were multiple versions of the same accessor with different names. Change-Id: I01e44a7a81c0d67cbb6135a6d196ee106cbf994a
2015-09-08sw: use std::unique_ptr<> in docfmtMiklos Vajna
Change-Id: I270785363bdd8e2242b185a26fa335e51bc2b8ce Reviewed-on: https://gerrit.libreoffice.org/18400 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2015-09-08convert Link<> to typedNoel Grandin
Change-Id: I7c7a4bbaa4670e873599ad2533a1c2de713cf53f
2015-09-08convert Link<> to typedNoel Grandin
Change-Id: Ia7bdaa3a02af8f81884d81d60c0f135af2f8aeae
2015-09-08convert Link<> to typedNoel Grandin
Change-Id: Ia2706c308c6297d05b2862e9f86fc0f2ee90e4f0
2015-09-08convert Link<> to typedNoel Grandin
Change-Id: I365a81a0a960f5da736c9a97aa056da16c99452f
2015-09-07sw: fix newly created document being modifiedMichael Stahl
After the document is created, an event is dispatched on the main loop that calls SfxPickList::Notify(), which modifies document properties. It tries to prevent setting the document to modified by calling SfxObjectShell::EnableSetModified(false), but Writer cunningly outwits it by simply having its own independent(?) modified flag that is set unconditionally in DocumentStatisticsManager::DocInfoChgd(). Let's assume that if the modified flag shouldn't be modified in SfxObjectShell, it shouldn't be modified in DocumentStatisticsManager. Somehow in 4.4 and 4.3 the same thing was going on, but it didn't result in a visibly enabled Save icon in the UI, but with 5.0 it does - cannot easily bisect why that changed due to tdf#91383. Change-Id: Id30fd831eb29910c9fb44ed3031bf8da23586bea
2015-09-07tdf#91383: sw: actually reset the modified status tooMichael Stahl
... when deleting the temporarily inserted styles in SwDocStyleSheet::FillStyleSheet(). Change-Id: Id4abc067ce10b41486f659350267c7e3933db472
2015-09-07Related: tdf#93676 msword wraps slightly differently than usCaolán McNamara
Change-Id: I91ba41cb052c38aa3b047cf079090b01bbe93b39