summaryrefslogtreecommitdiffstats
path: root/sw/source
Commit message (Collapse)AuthorAgeFilesLines
* Convert indexOf->startsWith and lastIndexOf->endsWithNoel Grandin2013-10-313-4/+4
| | | | | | | | | | | | | | | | | | | | | | This is both an optimisation and a cleanup. This converts code like aStr.indexOf("XX") == 0 to aStr.startsWith("XX") and converts code like aStr.lastIndexOf("XXX") == aStr.getLength() - 3 to aStr.endsWith("XXX") Note that in general aStr.lastIndexOf("X") == aStr.getLength() - 1 converts to aStr.isEmpty() || aStr.endsWith("X") so I used the surrounding context to determine if aStr could be empty when modifying the code. Change-Id: I22cb8ca7c2a4d0288b001f72adb27fd63af87669
* -Werror,-Wmismatched-tagsStephan Bergmann2013-10-301-1/+1
| | | | Change-Id: Iec4f78de9e52144b84baaa739d97681343ae5a27
* DOCX filter: roundtrip more table style propertiesMiklos Vajna2013-10-301-1/+68
| | | | | | | | | Handle wordWrap, beforeLines, afterLines, beforeAutospacing, afterAutospacing, asciiTheme, hAnsiTheme, b, i, color, sz and vAlign. With this, the export filter is now in sync with the import one again. Change-Id: I7184447baf872374eaa69afdfcb149a7e6e45faa
* Factor out DocxTableStyleExport from DocxAttributeOutputMiklos Vajna2013-10-305-402/+511
| | | | | | | Also add a docxhelper, that contains stuff that was local to DocxAttributeOutput till now, but required by DocxTableStyleExport. Change-Id: I24dcc62d11862078202244c214b317e3bc600567
* DOCX export: initial w:tblStylePr handlingMiklos Vajna2013-10-301-0/+45
| | | | Change-Id: Ib368d558913149d7489ed320b459b66d3b1279a0
* Bin obsolete C30-only (some ancient Sun compiler) codeTor Lillqvist2013-10-301-5/+0
| | | | Change-Id: I8efa4de7c3348867274ee9d40a6e3b8ae0fb86f7
* cppcheck: fix Possible inefficient checking for emptinessJulien Nabet2013-10-291-1/+1
| | | | Change-Id: I4d98c7feb71daafeba95a493c71f3f5d520b3058
* sw: clone InputField dialog on input-field removalPierre-Eric Pelloux-Prayer2013-10-293-2/+42
| | | | | | | | | | | | | Setup a listener on RES_FIELD_DELETED event, and cancel dialog if a field is deleted. Add Cancellable capability to Input dialog too. Fixes a crasher that occurs when fields are removed (e.g: by an extension) while the InputField dialog is running. Change-Id: I9e132a109cba3127b934a3baecbf445a2bde1377 Reviewed-on: https://gerrit.libreoffice.org/6261 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* Resolves: fdo#69510 don't access beyond end of stringCaolán McNamara2013-10-291-1/+2
| | | | Change-Id: Ib5d60159ad75791371a7805ef8e211a4010d7608
* DOCX export: handle table style's pPr / rPr from InteropGrabBagMiklos Vajna2013-10-291-1/+100
| | | | Change-Id: I6dfb29db030212e55a207f39e79a1cf01d482e85
* cppcheck: Array index is used before limits checkJulien Nabet2013-10-291-1/+1
| | | | Change-Id: I51f7408a81a10e2c586cb05b863f20b13bb7b263
* cppcheck: Prefer prefix ++/-- operators for non-primitive typesJulien Nabet2013-10-292-7/+7
| | | | Change-Id: If9283c4c80ad955cc36ec93ee730927024ff37fa
* DOCX filter: roundtrip semiHidden and unhideWhenUsed for table stylesMiklos Vajna2013-10-281-1/+9
| | | | Change-Id: Ie7073a6346553650741a1631096342318d650890
* remove local css namespace definitionsThomas Arnhold2013-10-281-2/+0
| | | | | | As we have it globally in sal/types.h those are not necessary. Change-Id: I18bba2c763c4680c4fa7fde4c5158953b5cfad82
* fdo#69893 fix SwWrtShell::SelAll() to work with empty table at doc startMiklos Vajna2013-10-281-0/+6
| | | | | | | | | In theory, it was a problem to have the table cursor around when having the selection outside the table; but it didn't cause a problem so far. However, when the table has one or more empty cells, we really need to leave table mode, otherwise only the table gets selected. Change-Id: I766903ed624b9338f0612697b4c03f44de1d2e41
* Fingers slippedTor Lillqvist2013-10-281-1/+1
| | | | Change-Id: Ic8a11c9857c04533ff96f523f1b29b1518bb89c0
* Try a different way to not show the keyboard initially on iOSTor Lillqvist2013-10-281-8/+8
| | | | Change-Id: I978cfcb52297ace7e3916a63ce3dc9f179a6a208
* windows: warning 4355 is disabled globally in com_MSC_defs.mkThomas Arnhold2013-10-2810-84/+1
| | | | | | So there is no need to do this locally, too. Change-Id: I0fa1d0cd3e077ba0985848a9d2cbb061b123e8ad
* remove unused class SwItemPropertySetMatúš Kukan2013-10-261-6/+0
| | | | Change-Id: I6913d5ac9ce5082a8050da26c77a4b3bcb40a699
* sw: ViewShell -> SwViewShell renameMiklos Vajna2013-10-26167-829/+829
| | | | | | It's a public class, so it should have the 'Sw' prefix. Change-Id: I0040c1cc37ffcba7fc5f58b71c86f4a7cb0bfce4
* move OOXML_COLOR_AUTO from writerfilter to msfilter, we need it from swMiklos Vajna2013-10-251-0/+4
| | | | Change-Id: I145c08d17ccb36bfbf734306cd9d27e8423debdd
* DOCX export: table style export: initial cell hanglingMiklos Vajna2013-10-251-1/+39
| | | | Change-Id: I83ca33d87a016f8634ca6a87b81df20f6b4e0e30
* DOCX export: table style export: handle tblStyleRowBandSize, etc.Miklos Vajna2013-10-251-8/+60
| | | | | | Read these from InteropGrabBag, as the importer already put them there. Change-Id: I10745628c61841c168daa64bf46c51228cb38374
* fdo#44736 - set and fetch multiple properties concurrently 2Matúš Kukan2013-10-254-54/+38
| | | | | | | This fixes commit ee0bf5d58bc59052923c4ced928a989956e71456 Although it's a bit hacky. Change-Id: I4dfe9ff4a56b993fbcdc7acea29ee3700422f7b3
* fdo#70861 SwToSfxPageDescAttr: fix call to SvxExtParagraphTabPageMiklos Vajna2013-10-251-2/+3
| | | | | | | | | | | Regression from c2ccd20c0fd92bddfff76447754541705e3eb8f3 (fdo#44689: fix for specific case of page restart-value 0, 2013-08-29), the problem was that commit refactored starting page number handling, so that '0' is now also a valid value, and no longer means "no restart". However cui isn't updated yet, so always pass a 0 to it, like we used to do so before, that's better than a crash. Change-Id: I2adab43499bcdd5234da3f26559b0b384e533c2e
* fdo#54938: Remove SupportsServiceImpl from sw and use cppu insteadMarcos Paulo de Souza2013-10-249-57/+27
| | | | | Change-Id: I285a03f615e2f2a2656873a8f433a2599bd62c28 Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
* DOCX filter: initial table style export based on InteropGrabBagMiklos Vajna2013-10-242-0/+132
| | | | Change-Id: I7b31322b50c8c924e5df3c32e3c2da8093709938
* Don't allow selection handle movement to wrapTor Lillqvist2013-10-241-0/+27
| | | | Change-Id: Idc189a84da1aa0ac510e003134580eafc03b4b9a
* valgrind: bIsVirtPageNum uninitializedCaolán McNamara2013-10-241-2/+8
| | | | | | valgrind complains about this when viewing a help page Change-Id: I0f30f8b5121fa5e6ddbac0ea6e05005e40bc7fd9
* -Werror,-Wunused-const-variableStephan Bergmann2013-10-241-5/+0
| | | | Change-Id: I32b9d2398d2d734a0d96c937b2238d8ff9a74ef7
* Related: fdo#70571 allowing clicking on a hyperlink in a protected sectionCaolán McNamara2013-10-241-3/+4
| | | | Change-Id: I6104ee3bb0928275a0e4ffb9a7ca1be37ebc1f9e
* use MsLangId::isNonLatinWestern()Eike Rathke2013-10-241-19/+2
| | | | Change-Id: I3aba3f85face62e0b8d54aebb92412c350aa2923
* Related: fdo#70571 say [ctrl+]click to follow linkCaolán McNamara2013-10-246-18/+23
| | | | | | | as opposed to "hyperlink". Be more generic and consistent across both ctrl+click and click modes. Change-Id: I673ed59fc9f3408a0c4534c6490d9bbc3598bc08
* Resolves: fdo#70571 don't crash when clicking link in tocCaolán McNamara2013-10-241-1/+1
| | | | | | | | | when link is in a toc, and Cursor in protected areas is disabled, causing the cursor to leap before the toc before trying to see what's under the cursor in order to jump to it Change-Id: Iaf348e3621df02628b4d2ac8c1165df7082237ed
* Use static_cast instead of C-style castTor Lillqvist2013-10-241-1/+1
| | | | | | | Makes it more obvious to the code reader that nothing wrong is going on (or the compiler would have complained). Change-Id: I2ab420ffeb71f5c0b68e1b7db039cb9cde6af801
* Bin a few pointless commentsTor Lillqvist2013-10-242-15/+0
| | | | Change-Id: Ia8a47bcd07cf10302b5cf6f550627e5c7cd1d9f6
* Resolves: #i120879# import "Microsoft Word TOC bookmarks" as...Oliver-Rainer Wittmann2013-10-249-102/+233
| | | | | | | | | | | | | | | | | | | | | | | | | | | | cross reference bookmarks and suppress the import of unreferenced ones. Review by: zhengfan (cherry picked from commit e3a34e95823105fda68fd29a4ded22a9d52523fb) Conflicts: sw/source/core/crsr/crossrefbookmark.cxx sw/source/core/inc/crossrefbookmark.hxx sw/source/filter/inc/fltshell.hxx sw/source/filter/ww1/fltshell.cxx sw/source/filter/ww8/ww8par.cxx sw/source/filter/ww8/ww8par.hxx sw/source/filter/ww8/ww8par5.cxx Change-Id: I5898cbd33c9a17b9517040e19ca8eda4355a1eac also remove symbol-visibility problems in IDocumentMarkAccess.hxx (cherry picked from commit de9ea83df087ba3f8e614a69e8b18403d54b9589) Conflicts: sw/inc/IDocumentMarkAccess.hxx Change-Id: I2f51cc4412525c6e62d120df5c7fe1c223e35972
* fixed build breaker SerbianEike Rathke2013-10-241-1/+1
| | | | Change-Id: I5d8e0bc2c62f13d14f1be32786be8aec243c134a
* Fix indentationTor Lillqvist2013-10-231-49/+51
| | | | Change-Id: I8471214bb2d65d46f2123feb8ff33bf46bbba1d7
* WaE: statement aligned as second statement in if ... [loplugin]Tor Lillqvist2013-10-231-1/+2
| | | | | | | | | | | Full warning message: statement aligned as second statement in if body but not in a statement block. To make the warning go away, put braces around the if-ed statement (a for statement). Leaves the stuff afterwards still oddly indented but will fix that in a separate commit. Change-Id: I875569de8aa7ff587eda0da241723c900486dd43
* Resolves: #i119963#, #i120877# import and export actual TOC contentOliver-Rainer Wittmann2013-10-2316-495/+640
| | | | | | | | | | | | | | | | | | | | | | | Patch by: zhengfan, Oliver Review by: Oliver reintegrate from branch writer001 (cherry picked from commit 8f2a21eac4a904db3cc4c448179e2d2cf5878ef4) Conflicts: sw/inc/tox.hxx sw/source/core/tox/tox.cxx sw/source/filter/ww8/dump/ww8scan.cxx sw/source/filter/ww8/wrtw8nds.cxx sw/source/filter/ww8/wrtww8.cxx sw/source/filter/ww8/ww8atr.cxx sw/source/filter/ww8/ww8par.cxx sw/source/filter/ww8/ww8par.hxx sw/source/filter/ww8/ww8par5.cxx sw/source/filter/ww8/ww8par6.cxx Change-Id: I75b2971f23754afa0bcb0b549bfb820dd5924b3b
* clean up places accessing the NULL at the of an OUStringNoel Grandin2013-10-236-7/+7
| | | | | | | | | There were only a couple of real bugs fixed, but we're a little bit safer now. This also fixes the assert and the comment in OUString::operator[] about this. Change-Id: Ibe16b5794e0ba7ecd345fa0801586d25b015974c
* clean up some include guardsThomas Arnhold2013-10-234-12/+10
| | | | | | | | | | Conflicts: sw/source/ui/inc/content.hxx Change-Id: I58d81881271fc6e3320bf3b5f1321594b28614a6 Reviewed-on: https://gerrit.libreoffice.org/6388 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* convert code to use OUString::endsWithNoel Grandin2013-10-235-14/+12
| | | | | | | | | Convert places that call aStr[aStr.getLength()-1] == 'x' to use the shorter form aStr.endsWith("x") Change-Id: I1b3a19c0e89b8989cdbeed440f95fc76f9a4b6b6
* WaE: declaration shadows a member of 'this'Tor Lillqvist2013-10-231-2/+4
| | | | Change-Id: I1f5b3ffccb89a5b9111e60c0a1943e1642c3499b
* More work on selection handling in iOSTor Lillqvist2013-10-232-31/+58
| | | | | | | | | | | | | | | Got the selection start and end handle dragging working... The trick was not to call SwWrtShell::SetCursor(), but SwCrsrShell::SetCrsr(). Sounds easy but took a lot of guessing and experimentation to figure out. Anyway, now it does what I had expected it to do a few das ago already. There are glitches, especially in corner cases like if you move the start handle past the end handle or vice versa. more Change-Id: Id6c1d99a4052531789bccf0d48165cfb41b89cfe 9b94c0dd55b04a7b6b3c40654562a9c51fa9b450
* sw: try to fix Android tinderbox re StringMichael Stahl2013-10-221-1/+1
| | | | Change-Id: I73ab199eb12a89373ca75cb659a77550d3512653
* Bin comments that claim to say why some header is includedTor Lillqvist2013-10-22230-738/+738
| | | | | | They are practically always useless, often misleading or obsolete. Change-Id: I2d32182a31349c9fb3b982498fd22d93e84c0c0c
* vcl: mark more Image constructors as "explicit"Michael Stahl2013-10-224-29/+31
| | | | Change-Id: If59d7c75c89a102a573738d15d8593cb8ac5c486
* Bin useless swmod commentsTor Lillqvist2013-10-2256-130/+130
| | | | Change-Id: I65df74242453a907b1a1a50f391e7b017bec5fcb