summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)AuthorFilesLines
2015-08-31switch to 64-bit checksum: now BitmapChecksum is a sal_uInt64Marco Cecchetti1-1/+1
Changed hardcoded checksum value in ooxmlimport unit test (testN777345). Change-Id: Ied43bf626be82c0e7f6c62e965d0704fc645ac19
2015-08-31Added support for computing 64-bit checksum of bitmap in OpenGLMarco Cecchetti1-1/+1
Added a C++ and a GLSL implementation of a 64-bit CRC algorithm. Changed hardcoded checksum value in ooxmlimport unit test (testN777345). Change-Id: I16bb985a14866775efda49e21fe033ff64645896
2015-08-29ODF import: workaround dubious draw:fill="solid" on frame stylesMichael Stahl2-0/+22
Since the gradient frame backgrounds were added in LO 4.1, we export this: fo:background-color="transparent" draw:fill="solid" Which doesn't make a whole lot of sense as this is really a "none" fill, and now with the backward compatibility stuff in the style import code we get the pool default color added when setting the BackTransparent property, and with the draw:fill="solid" it becomes visible and the background color is now Sky Blue 1. So try to detect draw:fill="solid" without draw:fill-color attribute and contradicting transparent legacy attribute and nerf it. This way we also export draw:fill="none" again, although still with a bogus draw:fill-color but that shouldn't cause any harm. Change-Id: I1c2bea46ba7d9a3f042b875df0ca12c7f6037909 (cherry picked from commit 68efa6f5128abf4cd097ae81a4cfd7fecbcb2a80) Reviewed-on: https://gerrit.libreoffice.org/18040 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-29related: tdf#92379: sw: backward compatible ODF export of overridingMichael Stahl2-1/+22
... frame/paragraph backgrounds. If a style is set to have draw:fill="solid" and a derived style to draw:fill="none" then the derived one must have fo:background-color="transparent" to override the parent for old consumers like LO <= 4.3/AOO <= 4.1 that don't understand draw:fill. Change-Id: I5b56c7ace927338239195c6bfcfef1950544c8d2 (cherry picked from commit 25c50a71ffdf7c43f8f3dd10736188271cc75ef0) Reviewed-on: https://gerrit.libreoffice.org/18039 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-29tdf#92379: sw: ODF import: fix fo:background-color="transparent"Michael Stahl3-2/+73
The problem is that if the FillStyle is NONE, setting only ParaBackTransparent but not ParaBackColor does absolutely nothing. This means that if a parent style sets a background color, then a derived style cannot override it to be transparent. Cause is that getSvxBrushItemFromSourceSet() defaults to setting a 0xFF transparency on the SvxBrushItem. There is still a problem that getSvxBrushItemFromSourceSet() sets the pool default item's color and that is also exported to ODF again as draw:fill-color, but together with draw:fill="none" it should not cause harm, at least for consumers that prefer draw:fill attributes like LO >= 4.4. (regression from 7d9bb549d498d6beed2c4050c402d09643febdfa) Change-Id: I5312901166a0e6f0cf02369b173dc8498e4113ed (cherry picked from commit f38f018053a43d1f7b473103e936abe2d4d8fa05) Reviewed-on: https://gerrit.libreoffice.org/18038 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-29tdf#92379: svx: don't overwrite fo:background-color on ODF importMichael Stahl4-2/+76
getSvxBrushItemFromSourceSet() is called once for each property of a frame style that is set, and the "solid" fill-style is set by first applying the BackColorRGB and then BackTransparency property. So there is an intermediate state that has fill-style NONE but a XFillColorItem set - don't reset the color to white in that case! Apparently writerfilter generally relies on the current reset-to-AUTO implementation (loads of test failures), so for now limit the fix for when we know that a frame style is imported from ODF. (regression from 3d399b0e45720354fc64dc3d121ee486e01eff89) (cherry picked from commit 79fb61efb847405fa47235002b52ee8efad5e339) tdf#92379: sw: unit test for frame style background color (cherry picked from commit 982537d77c2db463cc053cfdcd522530a3834c9e) Change-Id: Ia987fe586ec819a1f3cd85acdbfb03c74ca0ec2c Reviewed-on: https://gerrit.libreoffice.org/18037 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-29sw: Flat ODF import: set the InReading and InXMLImport flagsMichael Stahl1-0/+12
Flat ODF Import does not use SwReader but uses SwXMLImport::startDocument() and SwXMLImport::endDocument() to set up the document, so make sure those set the import relevant SwDoc flags. Change-Id: Ife3e58eeebd73ad895fe328662822b847cf9bfec (cherry picked from commit 27a02d1708be7812668a84ea956edc8ecb312246) Reviewed-on: https://gerrit.libreoffice.org/18036 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-28tdf#93353: fix copy fluy in flyBjoern Michaelsen1-7/+10
- prevents flys in inlcuded docs in a master doc from disappearing - fixes a regression from 3fcb0c3aa8d58a819aa21eb9743eaa6da7394819 Change-Id: If211d8dbf423e2a33a258b43ab7092e1a010206f Reviewed-on: https://gerrit.libreoffice.org/18106 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2015-08-26behave like the native format filter for non-insert modeCaolán McNamara1-0/+4
just shove the unneeded pam into dead space Change-Id: Id0a3d550cd9d54394888e6b2d62e21eaded24a7c (cherry picked from commit d9edac5d58aa3c4f15cf4022a1faf776d3003e78) Reviewed-on: https://gerrit.libreoffice.org/17998 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-08-26we only need the PaM for its Point and only to create a uno cursorCaolán McNamara3-23/+25
so do that in the ctor and drop the arg from a bunch of places (cherry picked from commit 3d992d77d8ae319b31dca808e8c08f439a1bc9c3) Change-Id: Iaad71e9854b38d8632df057dfe9c96468d1d0098 Reviewed-on: https://gerrit.libreoffice.org/17997 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-08-26ensure editeng str len is in sync with attributesCaolán McNamara3-11/+59
for the duration of inserting attributes, and excess dos newline chars can be removed safely afterwards Change-Id: If70e34fec1c0819f827f483d3d7ac4f19b3caef8 (cherry picked from commit cc596d8d0f2f896d000833ffcba0035e3812c657) Reviewed-on: https://gerrit.libreoffice.org/17983 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-08-26there may be no storage available in older formatsCaolán McNamara2-2/+7
Change-Id: I23cbaf7fc1320168eb75ca33fd6d704125508785 (cherry picked from commit 666fb214e93d542dd80e48b9e008727129b5764f) Reviewed-on: https://gerrit.libreoffice.org/17982 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-08-25Fix tdf#77514 CJK ruby text in RTL( vertical ) base line issue.Mark Hung1-1/+1
Change-Id: Id670e83db01efe6bcd5fb6bb374ab9cb92898f88 Reviewed-on: https://gerrit.libreoffice.org/17460 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> (cherry picked from commit b14861e1dfb9f83d26d6032ae96b664845528f2a) Reviewed-on: https://gerrit.libreoffice.org/17994 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-25Handle non-aligned FFNsStephan Bergmann1-24/+123
...as found by UBSan in CppunitTest_sw_filters_test (see below), and at the same time limit reads within the pA array to its bounds. > Testing file:///.../sw/qa/core/data/ww6/pass/crash-2.doc: > sw/source/filter/ww8/ww8scan.cxx:6473:32: runtime error: upcast of misaligned address 0x6200000e70e7 for type 'WW8_FFN_Ver6', which requires 2 byte alignment > 0x6200000e70e7: note: pointer points here > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0e 00 00 6a 00 00 00 00 0e 00 00 6a 00 00 00 6a > ^ > WW8Fonts::WW8Fonts(SvStream&, WW8Fib&) sw/source/filter/ww8/ww8scan.cxx:6473:32 > SwWW8ImplReader::CoreLoad(WW8Glossary*, SwPosition const&) sw/source/filter/ww8/ww8par.cxx:4961:20 > SwWW8ImplReader::LoadThroughDecryption(SwPaM&, WW8Glossary*) sw/source/filter/ww8/ww8par.cxx:5767:19 > SwWW8ImplReader::LoadDoc(SwPaM&, WW8Glossary*) sw/source/filter/ww8/ww8par.cxx:6039:19 > WW8Reader::Read(SwDoc&, rtl::OUString const&, SwPaM&, rtl::OUString const&) sw/source/filter/ww8/ww8par.cxx:6157:20 > SwReader::Read(Reader const&) sw/source/filter/basflt/shellio.cxx:175:18 > SwDocShell::ConvertFrom(SfxMedium&) sw/source/uibase/app/docsh.cxx:258:22 > SfxObjectShell::DoLoad(SfxMedium*) sfx2/source/doc/objstor.cxx:790:23 > SwFiltersTest::filter(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) sw/qa/core/filters-test.cxx:112:20 > SwFiltersTest::load(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int) sw/qa/core/filters-test.cxx:71:12 > test::FiltersTest::recursiveScan(test::filterStatus, rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) unotest/source/cpp/filters-test.cxx:129:20 > test::FiltersTest::testDir(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) unotest/source/cpp/filters-test.cxx:154:5 > SwFiltersTest::testCVEs() sw/qa/core/filters-test.cxx:154:5 (cherry picked from commit 6373886870503a981b65f204f9113aebff540ab8) Change-Id: I31ac8dc11d985745785c9dda1cec8a11a41098bb Reviewed-on: https://gerrit.libreoffice.org/17985 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-25tdf#91969: Parts of paragraph border is missingZolnai Tamás1-2/+2
...when border is around more than one paragraph Regression from: 16f637dab3c1b5f7ac9eacf2c57347800d3fdf09 Change-Id: Iea9455dd7cc3c301c3e2d5d7903c98d98e515595 (cherry picked from commit 8d933132ab01f0070225fae6cf704c9a1982e8f8) Reviewed-on: https://gerrit.libreoffice.org/17979 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-25consider validity of m_nDrawCpOCaolán McNamara3-3/+5
(cherry picked from commit 8329eb5e4a368f29501cfdf060f96e52df912dd2) Change-Id: Ifbd131440bad6d840d369c99628cb8904697ad96 Reviewed-on: https://gerrit.libreoffice.org/17971 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-08-25Handle GetBaseCp overflowStephan Bergmann3-29/+52
...as found by UBSan in CppunitTest_sw_filters_test (see below); note the TODOs how best to report the errors up the call stack. > Testing file:///.../sw/qa/core/data/ww6/pass/crash-3.doc: > sw/source/filter/ww8/ww8scan.cxx:5240:63: runtime error: signed integer overflow: 1766665948 + 1768712052 cannot be represented in type 'int' > WW8Fib::GetBaseCp(ManTypes) const sw/source/filter/ww8/ww8scan.cxx:5240:63 > SwWW8ImplReader::Read_GrafLayer(long) sw/source/filter/ww8/ww8graf.cxx:2393:18 > SwWW8ImplReader::ReadChar(long, long) sw/source/filter/ww8/ww8par.cxx:3630:17 > SwWW8ImplReader::ReadChars(int&, int, long, long) sw/source/filter/ww8/ww8par.cxx:3432:27 > SwWW8ImplReader::ReadText(int, int, ManTypes) sw/source/filter/ww8/ww8par.cxx:3970:22 > SwWW8ImplReader::CoreLoad(WW8Glossary*, SwPosition const&) sw/source/filter/ww8/ww8par.cxx:5169:9 > SwWW8ImplReader::LoadThroughDecryption(SwPaM&, WW8Glossary*) sw/source/filter/ww8/ww8par.cxx:5767:19 > SwWW8ImplReader::LoadDoc(SwPaM&, WW8Glossary*) sw/source/filter/ww8/ww8par.cxx:6039:19 > WW8Reader::Read(SwDoc&, rtl::OUString const&, SwPaM&, rtl::OUString const&) sw/source/filter/ww8/ww8par.cxx:6157:20 > SwReader::Read(Reader const&) sw/source/filter/basflt/shellio.cxx:175:18 > SwDocShell::ConvertFrom(SfxMedium&) sw/source/uibase/app/docsh.cxx:258:22 > SfxObjectShell::DoLoad(SfxMedium*) sfx2/source/doc/objstor.cxx:790:23 > SwFiltersTest::filter(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) sw/qa/core/filters-test.cxx:112:20 > SwFiltersTest::load(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int) sw/qa/core/filters-test.cxx:71:12 > test::FiltersTest::recursiveScan(test::filterStatus, rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) unotest/source/cpp/filters-test.cxx:129:20 > test::FiltersTest::testDir(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) unotest/source/cpp/filters-test.cxx:154:5 > SwFiltersTest::testCVEs() sw/qa/core/filters-test.cxx:154:5 Change-Id: I0b14f5c1e025565eb131e64590b7d5ff0135e767 Reviewed-on: https://gerrit.libreoffice.org/17965 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit d281b4607638231b8a3716bdc80846c24ce55cc7) Reviewed-on: https://gerrit.libreoffice.org/17969 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-08-25Handle zero nPLCFStephan Bergmann1-1/+2
...as found by ASan in CppunitTest_sw_filters_test: > Testing file:///.../sw/qa/core/data/ww6/pass/crash-1.doc: > ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6020009382b0 at pc 0x2b1dcb5eabac bp 0x7fffe8ccbdb0 sp 0x7fffe8ccbda8 > READ of size 4 at 0x6020009382b0 thread T0 > WW8PLCF::SeekPos(int) sw/source/filter/ww8/ww8scan.cxx:2219:14 > WW8PLCF::WW8PLCF(SvStream&, int, int, int, int, int, int) sw/source/filter/ww8/ww8scan.cxx:2080:9 > WW8PLCFx_Fc_FKP::WW8PLCFx_Fc_FKP(SvStream*, SvStream*, SvStream*, WW8Fib const&, ePLCFT, int) sw/source/filter/ww8/ww8scan.cxx:2883:21 > WW8PLCFx_Cp_FKP::WW8PLCFx_Cp_FKP(SvStream*, SvStream*, SvStream*, WW8ScannerBase const&, ePLCFT) sw/source/filter/ww8/ww8scan.cxx:3088:7 > WW8ScannerBase::WW8ScannerBase(SvStream*, SvStream*, SvStream*, WW8Fib*) sw/source/filter/ww8/ww8scan.cxx:1588:20 > SwWW8ImplReader::CoreLoad(WW8Glossary*, SwPosition const&) sw/source/filter/ww8/ww8par.cxx:5022:20 > SwWW8ImplReader::LoadThroughDecryption(SwPaM&, WW8Glossary*) sw/source/filter/ww8/ww8par.cxx:5767:19 > SwWW8ImplReader::LoadDoc(SwPaM&, WW8Glossary*) sw/source/filter/ww8/ww8par.cxx:6039:19 > WW8Reader::Read(SwDoc&, rtl::OUString const&, SwPaM&, rtl::OUString const&) sw/source/filter/ww8/ww8par.cxx:6157:20 > SwReader::Read(Reader const&) sw/source/filter/basflt/shellio.cxx:175:18 > SwDocShell::ConvertFrom(SfxMedium&) sw/source/uibase/app/docsh.cxx:258:22 > SfxObjectShell::DoLoad(SfxMedium*) sfx2/source/doc/objstor.cxx:790:23 > SwFiltersTest::filter(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) sw/qa/core/filters-test.cxx:112:20 > SwFiltersTest::load(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int) sw/qa/core/filters-test.cxx:71:12 > test::FiltersTest::recursiveScan(test::filterStatus, rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) unotest/source/cpp/filters-test.cxx:129:20 > test::FiltersTest::testDir(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) unotest/source/cpp/filters-test.cxx:154:5 > SwFiltersTest::testCVEs() sw/qa/core/filters-test.cxx:154:5 > 0x6020009382b1 is located 0 bytes to the right of 1-byte region [0x6020009382b0,0x6020009382b1) > allocated by thread T0 here: > operator new[](unsigned long) /home/sbergman/clang/trunk/src/projects/compiler-rt/lib/asan/asan_new_delete.cc:64 > WW8PLCF::ReadPLCF(SvStream&, int, unsigned int) sw/source/filter/ww8/ww8scan.cxx:2091:26 > WW8PLCF::WW8PLCF(SvStream&, int, int, int, int, int, int) sw/source/filter/ww8/ww8scan.cxx:2075:9 > WW8PLCFx_Fc_FKP::WW8PLCFx_Fc_FKP(SvStream*, SvStream*, SvStream*, WW8Fib const&, ePLCFT, int) sw/source/filter/ww8/ww8scan.cxx:2883:21 > WW8PLCFx_Cp_FKP::WW8PLCFx_Cp_FKP(SvStream*, SvStream*, SvStream*, WW8ScannerBase const&, ePLCFT) sw/source/filter/ww8/ww8scan.cxx:3088:7 > WW8ScannerBase::WW8ScannerBase(SvStream*, SvStream*, SvStream*, WW8Fib*) sw/source/filter/ww8/ww8scan.cxx:1588:20 > SwWW8ImplReader::CoreLoad(WW8Glossary*, SwPosition const&) sw/source/filter/ww8/ww8par.cxx:5022:20 > SwWW8ImplReader::LoadThroughDecryption(SwPaM&, WW8Glossary*) sw/source/filter/ww8/ww8par.cxx:5767:19 > SwWW8ImplReader::LoadDoc(SwPaM&, WW8Glossary*) sw/source/filter/ww8/ww8par.cxx:6039:19 > WW8Reader::Read(SwDoc&, rtl::OUString const&, SwPaM&, rtl::OUString const&) sw/source/filter/ww8/ww8par.cxx:6157:20 > SwReader::Read(Reader const&) sw/source/filter/basflt/shellio.cxx:175:18 > SwDocShell::ConvertFrom(SfxMedium&) sw/source/uibase/app/docsh.cxx:258:22 > SfxObjectShell::DoLoad(SfxMedium*) sfx2/source/doc/objstor.cxx:790:23 > SwFiltersTest::filter(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) sw/qa/core/filters-test.cxx:112:20 > SwFiltersTest::load(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int) sw/qa/core/filters-test.cxx:71:12 > test::FiltersTest::recursiveScan(test::filterStatus, rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) unotest/source/cpp/filters-test.cxx:129:20 > test::FiltersTest::testDir(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) unotest/source/cpp/filters-test.cxx:154:5 > SwFiltersTest::testCVEs() sw/qa/core/filters-test.cxx:154:5 Change-Id: I97d995aad621b829b6fb6ee4622d386fec0bedea Reviewed-on: https://gerrit.libreoffice.org/17963 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 1a871f9de6b23730e26fc6e4196723f67704ac8d) Reviewed-on: https://gerrit.libreoffice.org/17967 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-08-25loop over successfully read bookmarksCaolán McNamara2-3/+2
not over the amount that should be there Change-Id: Ia2c353f9d7e274a5bebf405e1743ef1d1872b4de (cherry picked from commit 02e9b490a9401744a8a0699ad5dd10281b6b0b30) Reviewed-on: https://gerrit.libreoffice.org/17958 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-08-25limit seeks to valid areaCaolán McNamara2-5/+4
(cherry picked from commit c0c9075163f06c0b5c2ad9cf428f1cfacf9fe1fb) Change-Id: I401d93491999a3fc3db4f597eea9c4fe5b9bc926 Reviewed-on: https://gerrit.libreoffice.org/17955 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-08-25guard against hangs with bogus unsorted plcfsCaolán McNamara3-0/+18
This reverts commit 6d21cbd1238556535ec1bb1adf35b25bc8eb898b. Change-Id: I309302ab5357b8404ee4c75bd0bfcb4f816e0588 (cherry picked from commit 74c0f74422671f8005f2cfc0ae94e5656bcea31e) Reviewed-on: https://gerrit.libreoffice.org/17951 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-08-24dismiss bad seek offsets earlyCaolán McNamara1-1/+2
Change-Id: Ia88bc1833d362547f45e073028203a4de581f3e2 (cherry picked from commit 8657e3795d2e0ef0653835e2d56c53512dd43aea) Reviewed-on: https://gerrit.libreoffice.org/17945 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com>
2015-08-24fix crash with empty booknamesCaolán McNamara1-3/+4
Change-Id: Ifadb2129be53530720cb2023cdc0782b6e737f18 (cherry picked from commit 11e73a0880f64c99aec5059ff6122b831bc1de74) Reviewed-on: https://gerrit.libreoffice.org/17944 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-08-23check for bad locationsCaolán McNamara2-8/+18
Change-Id: I635585f664e700047d92821fb965d42b803a8a15 (cherry picked from commit b164d08f0c12a3434fad1b40900ddc8cb510370c) Reviewed-on: https://gerrit.libreoffice.org/17938 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-08-23check that src index is in doc rangeCaolán McNamara2-3/+10
Change-Id: Ic81e7a14701ff30aa46a9293dd6db351bd350ba5 (cherry picked from commit 3230c8cf1cf2dc486f038d369e7f4f44ffd6b0a7) check that dest index is in doc range Change-Id: I3006cf03cf97399a6c418162178acdb1d41c3b23 (cherry picked from commit cd6c9aef7468120dd5ea5c747f35c98baf214613) Reviewed-on: https://gerrit.libreoffice.org/17925 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-08-21avoid hang in certain ww6 docsCaolán McNamara2-1/+1
Change-Id: Ife15f6a6e4b31c6e226a154dd708290266e86a2e (cherry picked from commit d0813b432f94d214a6961cb6a1eb11f65399e59b) Reviewed-on: https://gerrit.libreoffice.org/17911 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-08-21don't crash due to earlier short readsCaolán McNamara2-0/+3
Change-Id: I682a9bf72cbe18999c0c5acc495e813727e0e372 (cherry picked from commit 0030efe09ad9447933ac3b1875c270ed1649aee7) Reviewed-on: https://gerrit.libreoffice.org/17909 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-08-21fix another ww6 crashCaolán McNamara2-0/+1
Change-Id: I47b4ffb1d96041d51dde313c080ed1d9cd4000be (cherry picked from commit 6405203750f7f779a3655bc5f415e8e0a2071d1b) Reviewed-on: https://gerrit.libreoffice.org/17908 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-08-21if read string was truncated, then truncate attributes range to matchCaolán McNamara3-8/+9
Change-Id: I3501d31e0310481a5872e537bf53ad2faaf25779 (cherry picked from commit 6071feec26743dacff1060658e57d5cf62cde2a8) Reviewed-on: https://gerrit.libreoffice.org/17907 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-08-21add ww6 test dir and fix a crashCaolán McNamara6-13/+20
Change-Id: Id08176640672095c03e0b124cd65a9dce26ac2db (cherry picked from commit 42a709d1ef647aab9a1c9422b4e25ecaee857aba) Reviewed-on: https://gerrit.libreoffice.org/17892 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-08-21clip text to skip to max text availableCaolán McNamara2-1/+2
Change-Id: I5c5c033954d5b6f869a05f19f312f9330df74efb (cherry picked from commit 684a210dd44ba5bb239eb07842ced767059a3fb8) Reviewed-on: https://gerrit.libreoffice.org/17885 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-08-20tdf#92324 Fixed MailMerge printing with values from databaseVasily Melenchuk3-1/+18
Locking of ExpFields is required to lock current state of fields and database cursor: generation of print preview and some other operations can cause changing of current database record, especially if document contains nextrecord fields. Reviewed-on: https://gerrit.libreoffice.org/17857 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit 959a5043ccb4bb027e0149a56d31ebb78d5eb862) Conflicts: sw/source/uibase/dbui/dbmgr.cxx Change-Id: If0466ef2489d96264380b5978ef7d7cf3f545c23 Reviewed-on: https://gerrit.libreoffice.org/17877 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Katarina Behrens <Katarina.Behrens@cib.de>
2015-08-20it's no use to check for stream status after a seekCaolán McNamara1-0/+0
seek resets failures, need to check after a read and before a seek Change-Id: Ia249e258c51af5efc838f92c4ead6237b403c701 (cherry picked from commit 170ff56b1b99ec451e9adbc9ae9c2a94dd47a692) Reviewed-on: https://gerrit.libreoffice.org/17866 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2015-08-20sanitize lcbCmds lengthCaolán McNamara4-12/+11
Change-Id: I795ac35c80d7b61d7a9afbeae0d6d4bb789e16f8 (cherry picked from commit 721f5b054e013cc2867051bef75d6488fdb583a8) Reviewed-on: https://gerrit.libreoffice.org/17869 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2015-08-18tdf#93096 sw: fix selection with keyboard outside current viewMiklos Vajna1-1/+19
Regression from commit c9175a1bd3249ad573ae6827bf19963a3ebe2fbc (SwViewShell::ImplEndAction: avoid direct PaintDesktop(), 2015-07-03), the problem is that while going via InvalidateWindows() is fine for the double-buffering case, it has side effects when painting directly, so revert back to the old code in that case. Change-Id: Ib1e3b143f5cfe2c6ab8b102a1a2064900282f136 (cherry picked from commit 222f10e773ba51a19880be1b798990260c198147) Reviewed-on: https://gerrit.libreoffice.org/17835 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-18tdf#93284 vcl: fix VirtualDevice leaks in the WMF filterMiklos Vajna1-0/+0
We attempted to have 8884 VirtualDevices in parallel. This number is now 12 after fixing the leaks. The original bugdoc has 135 images, 76 is enough to make Writer on Windows crash. The minimized document has the same WMF data for all the images, but still duplicated inside the ZIP container, so we trigger the resource limit, but the document is still just 99K. Change-Id: I4c6b3853eaf688302323daf67ff7b62dd64fc412 (cherry picked from commit 047ebb1dadcc0219a268455f74fc03a23aa3d86d) Reviewed-on: https://gerrit.libreoffice.org/17825 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-17tdf#87922 SwDrawTextInfo::ApplyAutoColor: handle fill attributesMiklos Vajna1-0/+10
With this, if page background is set to e.g. black, then automatic color of text is again white, not black. Change-Id: I8246fa4b7834f60872b0737f03906ccc86948cc1 (cherry picked from commit d48d0e81971266ff4625721b0f069a62ec7014e2) Reviewed-on: https://gerrit.libreoffice.org/17814 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-17tdf#87924 DOCX import: rot=90 and vert=vert270 means no text rotationMiklos Vajna2-0/+8
If the shape is rotated 90 degrees clockwise and the text is further rotated 270 degrees clockwise that means we shouldn't do anything with the text and the result will be correct. Also: cid#1315264 incorrect expression (cherry picked from commit dbfed66eebde65f5844a0f1a2cfe548ad4eda962 and 1c09657c5c25cf941588610eeab653217399f9b5) Change-Id: I7c65319258136288520bd24fa2bf8e3c598b0878 Reviewed-on: https://gerrit.libreoffice.org/17807 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-17tdf#88986 sw: add missing XPropertyList pool items on TextFrame insertionMiklos Vajna4-5/+18
Regression from commit 6e61ecd09679a66060f932835622821d39e92f01 (Merge back branch alg_writerframes to trunk, 2014-03-19), the problem was while SwFrameShell::Execute() was modified to put the various pool items related to fill types (colors, gradients, etc) to the item set of the dialog, the same was missing in SwTextShell::ExecInsert(), so colors were missing on inserting a new frame, but not when editing an existing one. Change-Id: Id009f914c1c3b6509e31a4887e32a00624678cf4 (cherry picked from commit 6c3ca675509101732d3d878d6ceb6226026cd9ac) Reviewed-on: https://gerrit.libreoffice.org/17753 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-17clip Sttbf to available dataCaolán McNamara2-0/+2
Change-Id: Iaa6a8a8505a28cf3c24a48f832bfc618b39c3f32 (cherry picked from commit 12143f8f84b07057d67d5cd6cc9ff6063dfa41f8) Reviewed-on: https://gerrit.libreoffice.org/17784 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-08-17convert pPieceGrpprls to vector and merge calc and load loops togetherCaolán McNamara2-48/+16
we retain the max-short limit but no longer add a null terminating entry (cherry picked from commit 4466a7949af63621a2b180715de2ae3675343715) Change-Id: Ie195e0c244cc08643a9c22518c85d70a883752b7 Reviewed-on: https://gerrit.libreoffice.org/17780 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-08-17skip importing properties if the desired start pos is invalidCaolán McNamara2-12/+15
Change-Id: Iae650d63ccdb95a0a74674b8689813069b750b60 (cherry picked from commit b4a718583a3311dda7abd3010938c847b16e5f30) Reviewed-on: https://gerrit.libreoffice.org/17761 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-08-13wrong row/col count limitsCaolán McNamara1-5/+4
thanks to ccsheller for noticing Change-Id: Idb0f39c48173445b750e0b85ac20b3f6b43691a7 (cherry picked from commit 348cc2ce1e932f0fcaf90f9cf4d6dc9594f3f8a2) Reviewed-on: https://gerrit.libreoffice.org/17692 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-08-13convert pStatus to vector and use at to check offsetsCaolán McNamara2-11/+11
Change-Id: I5186f6a65bb9d5ed8a0d1ab1d71f7e2c13865411 (cherry picked from commit ea70088895ed45dc60abf18319acc1b4fa3018dd) Reviewed-on: https://gerrit.libreoffice.org/17693 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com>
2015-08-13tdf#93384 editeng rendercontext: don't paint spellcheck result directlyMiklos Vajna1-2/+2
E.g. in Writer create a new comment, type a word that is not in the dictionary, then a space to trigger the spelling, and that painted the spelling error indicator outside Paint(). (cherry picked from commits 71aed9185fb17ee27bdc38b4ac650713c4cabb8b and 89bd30cf426ca54fc9e46295a60551b5bb2d3232) Change-Id: I8f72486189e04a5596729fb52b6af39772f8e002 Reviewed-on: https://gerrit.libreoffice.org/17690 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-13tdf#92885 - Incorrect cell border drawing in DOC file after saving in 5.0Noel Grandin2-8/+16
caused by commit 4b66829390b286010b37b37ec1537a320d8cea8f "convert BOX_LINE and BOXINFO_LINE to enum class" (cherry picked from commit 78446df26f45e2a71187873726388c9d2f6ba6e5) Conflicts: sw/source/filter/ww8/wrtww8gr.cxx Change-Id: I23eb359a40035dd40bdb60703de567b1c328e793 Reviewed-on: https://gerrit.libreoffice.org/17691 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-12tdf#92305: Revert "tdf#90150 : Page numbering in the status bar ..."Jan Holesovsky3-10/+2
Unfortunately the original commit caused a regression. The fix of tdf#90150 is also problematic from the UX point of view - with that, the user is never sure what page he/she is looking at. Should we do any changes there, then it should show the range of visible pages, like "Pages 2-3 of 5." or "Pages 1-4 of 8." etc. This reverts commit 1622b67e4b2bc8ecc5dd3ededc0a6e5adb936a6e. Change-Id: I371bb326da14b621a5116295ed1dc0de208f309d Reviewed-on: https://gerrit.libreoffice.org/17662 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-12tdf#89720 sw: do not create text range overlay for reply annotationsMiklos Vajna3-1/+23
Regression from commit 0761f81643a6890457e9ef7d913ab5c88c2593a4 (123792: complete annotations on text ranges feature, 2013-12-19), the problem was that in case a comment had a reply, then both comments produced its range overlay, and this repeated semi-transparent overlay resulted in dark color. Go back to the old behavior of just painting the overlay for the non-reply comment; for real, partly overlapping comments showing the exact boundaries of the overlapping overlays still makes sense. (cherry picked from commit 780dd8c1cf5302ca503cf7b55357dace4d69beb9) Conflicts: sw/qa/extras/uiwriter/uiwriter.cxx Change-Id: Ic2673a1a41146ff547262ba681b34a63f41aa8ff Reviewed-on: https://gerrit.libreoffice.org/17669 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-12avoid another hang with certain .docsCaolán McNamara2-2/+2
(cherry picked from commit 0592da19b625975886d3442477f4399660736a69) Change-Id: If16e90c5ba1a43ceb9702e752835928da7b3ef32 Reviewed-on: https://gerrit.libreoffice.org/17657 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-08-12avoid hang with certain .docsCaolán McNamara4-10/+21
Change-Id: I4dc93242be76dc2d7f7504457967c8d390afe9c8 (cherry picked from commit 9b0cd9196e05ab465ebf14a6264d087df224fb55) Reviewed-on: https://gerrit.libreoffice.org/17647 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com>