summaryrefslogtreecommitdiff
path: root/sd/source/filter
AgeCommit message (Collapse)AuthorFilesLines
2015-10-02check stream status and string lengthsCaolán McNamara3-42/+43
(cherry picked from commit 7af19f45b35c428d3e06972806e5a05489f45955) if nSize was 1 with unicode encoding nSize would wrap around in lcl_getMaxSafeStrLen (cherry picked from commit f6368c29bdc3a9017bcae3f064d2cd8c7e37ed10) rework this so we don't read the string, backup and re-read the string again (cherry picked from commit 8523e57e427ef5b0b7f7067dcdd07f01176d2160) Change-Id: I99f3d4a2ec760228f485d01fce856deb9c068431 Reviewed-on: https://gerrit.libreoffice.org/18691 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-10-02reusing i here from the outer loop is definitely bogusCaolán McNamara1-3/+3
(cherry picked from commit 637ad743bb74a826ddd4db5efbcd33779b9132cd) Change-Id: I4ee52c76b2c1723639185bc99b85d83be5b4fdd7 Reviewed-on: https://gerrit.libreoffice.org/18687 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-08-31check stream statusCaolán McNamara1-0/+8
Change-Id: I6b9537cf94ac1c5d996ba64ddf878745dadde254 (cherry picked from commit 452cd9e75de657e996e17510fe5d3539065489d1) Reviewed-on: https://gerrit.libreoffice.org/18129 Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2015-08-31check stream statusCaolán McNamara1-9/+25
Change-Id: I609c8c4f4e843601361b61f55e0325ad99db3c23 (cherry picked from commit dc1be62d75e654e17c2f4c02804b7fd48d5a2515) Reviewed-on: https://gerrit.libreoffice.org/18119 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-08-31guard against 0 item sizeCaolán McNamara1-2/+9
Change-Id: I9c4c2f0fe2d892615b3c70e08da0cab6da13338a (cherry picked from commit 2aadad1e89e96cb80c15fe1069cb6365f0cade1d) Reviewed-on: https://gerrit.libreoffice.org/18117 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-08-31check seeks and readsCaolán McNamara2-18/+32
Change-Id: I0c5c4784713376e0762bfbd197640f8d31b65562 (cherry picked from commit 1847753ab135f522df6a293a8539155437f0129f) Reviewed-on: https://gerrit.libreoffice.org/18116 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-08-31check for stream status after a read, not after a seekCaolán McNamara1-10/+15
Change-Id: I984e99c1a1484547aa4d60bf301167f3cbc9f716 (cherry picked from commit eea399ddd52a0de368321963bb828bc15632dd0b) Reviewed-on: https://gerrit.libreoffice.org/18075 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-08-31avoid loops in atom chainsCaolán McNamara1-1/+7
(cherry picked from commit de71eae5807ff94c8eace0eccaabf1ffa08e77b6) Change-Id: Icc40c0ee6c7d8d305cf7cc60cbf3e511c763aedd Reviewed-on: https://gerrit.libreoffice.org/18080 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-08-31check status of SeekToCaolán McNamara1-2/+4
(cherry picked from commit 932f6de91904f86f38d2914b9ce07b94dfadac0c) Change-Id: Ia2bb397c3fdd783cab77a6b0dbc31c9e3d19326b Reviewed-on: https://gerrit.libreoffice.org/18081 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-08-31clip strings to max available sizeCaolán McNamara1-7/+20
(cherry picked from commit 580d3837b26f09ed02fe3583de40fa045a3fde0f) Change-Id: Icc1378c9c27b9b6d229bcffc6a63017f82be70d4 Reviewed-on: https://gerrit.libreoffice.org/18101 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-08-31check seek for successCaolán McNamara1-1/+5
Change-Id: I02420ffb3af009d08ce54a0932e2c7a287703a72 (cherry picked from commit 1830b4f2e324090962a993315ce76752d24d4088) Reviewed-on: https://gerrit.libreoffice.org/18078 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-08-31avoid hang in certain pptsCaolán McNamara1-1/+1
Change-Id: Iedba71b72fc815b274ca5e0da0903a558947cb06 (cherry picked from commit 90dc4e38928fffc3ed5fcbed40109712eb97e203) Reviewed-on: https://gerrit.libreoffice.org/18076 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-08-31extend seek, loop ending tests to ppt specific codeCaolán McNamara1-14/+21
(cherry picked from commit c249f93d96ec87b0acbd25ffe087543d6fe9fb14) Change-Id: Id4419b6b902b742117e248870b6a663c9c58955f Reviewed-on: https://gerrit.libreoffice.org/18053 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-08-31various hangs, check seeks and record lengthsCaolán McNamara1-2/+4
(cherry picked from commit a8b2dc80c41022515c3a1df6f7ea245c3390dc39) Change-Id: Ided7f9376f41ee8cb1f6903e54a2d51e0e07e1a7 Reviewed-on: https://gerrit.libreoffice.org/18026 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-08-31don't hang on unreachable record endsCaolán McNamara1-1/+6
Change-Id: I288f7ff0327831603eda6e827c8acbae678dfaff (cherry picked from commit cadac8400a018c8c566379f7767ea5edff78523d) Reviewed-on: https://gerrit.libreoffice.org/18021 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2015-04-23fix re-export of novell590442-1.ppt to pptCaolán McNamara1-167/+181
we always open a container, so always close it the close container is inside the nRowCount != 0 condition, so remove that and always write the close (cherry picked from commit 7aa166da24c81b7c22a0ec5daf7e09640ffb009b) Conflicts: sd/source/filter/eppt/epptso.cxx fix re-export of novell590442-1.ppt to ppt we always close this container, even if we didn't open it original commit always opened the SpgrContainer, and always closed the SpgrContainer. (but seems to have a loophole, presumably never hit where the SpContainer could be opened and not closed) make a container guard which opens in ctor and closes in dtor. should make ppt export crash stats hit 0 (cherry picked from commit deaed8aff6de824a76d939a02edb0d2ff4a4ccec) squash patch here is unreadable, but component parts are fairly trivial, remove nRowCount guard and unindent block, and then add in helper and use that to push/pop containers Change-Id: If05677ae46e8873b8780794bdd84f29505ea4112 2aead7397448b674e433a4097c97285067a6dc6e Reviewed-on: https://gerrit.libreoffice.org/15478 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-04-16fix export of ooo120353-1.odp to pptx, mismatch of start and end elementCaolán McNamara1-1/+1
cut and paste error I guess from the block above it Change-Id: I121e1d1a9f08ea3731bb7f65c385f264b3c2d2f4 (cherry picked from commit 1d4e66a79453f7b020a3dcea328c03637407add9) Reviewed-on: https://gerrit.libreoffice.org/15308 Tested-by: Michael Stahl <mstahl@redhat.com> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2015-04-16fix assert on re-export of ooo48994-1.ppt to pptCaolán McNamara1-1/+1
Change-Id: Ic8274e7d060f315d7891f8f5cf576f834ca89117 (cherry picked from commit eece059c1f728059b536763bffd2d4fc3537833e) Reviewed-on: https://gerrit.libreoffice.org/15313 Tested-by: Michael Stahl <mstahl@redhat.com> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2014-11-17sal: clean up public headers with include-what-you-useMichael Stahl1-0/+1
Sadly cannot forward declare "struct {...} TimeValue;". rtl/(u)?string.hxx still include sal/log.hxx but removing osl/diagnose.h was painful enough for now... Change-Id: Id41e17f3870c4f24c53ce7b11f2c40a3d14d1f05
2014-11-14fdo#86023 - O[U]String needs a 'clear' methodBrij Mohan Lal Srivastava3-6/+7
Added clear() method to OString and OUString class, Updated appropriate call-sites. Change-Id: I0ba97fa6dc7af3e31b605953089a4e8e9c3e61ac Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2014-11-14vcl: move the Impl class of MapMode ...uhm... out of the public header?Michael Stahl1-0/+1
And remove the tools/fract.hxx include. grep -l -r fract.hxx workdir/Dep/*Object* |wc -l before: 4569 after: 1851 Shrinks some libraries, example from --enable-dbgutil Fedora gcc 4.8.3: libvcllo.so by 473k (0.35%) libswlo.so by ~1Mb (sadly that is just 0.2%) Change-Id: I09bd025d551a5d2c5528b938a68c6aa5f8f114a0
2014-11-13loplugin: cstylecastNoel Grandin4-37/+39
Change-Id: I071962c646199c30e842b9ec7673473de237ee45
2014-11-12Fix common typos. No automatic tools. Handmade…Andrea Gelmini3-3/+3
Change-Id: I1ab4e23b0539f8d39974787f226e57a21f96e959 Reviewed-on: https://gerrit.libreoffice.org/12164 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-11-12loplugin: cstylecastNoel Grandin2-23/+23
Change-Id: Ieffa7ae199b42545d307fba661ce205573cf4b41
2014-11-11strip off hard-coded numbering from outliner preview on loadCaolán McNamara1-1/+14
how to reproduce an outline which won't update wrt the numbering style file->new->presentation view->master->slide master select first entry of outliner, i.e. "Click to edit the outline text format" make it underlined, save, reload view->master->slide master now use bullet and numbering set level 1 to e.g. none, ok nothing happens to the outliner. It remains "stuck" with its default numbering Change-Id: I95708b1f1c9cc74ae5129dbfad8ca0d37b00fa13
2014-11-11iwyu: remove unneeded includes in sc, sd, swRiccardo Magliocchetti1-1/+0
Remove only include for files where iwyu does not suggest any includes to add. Change-Id: I58f3e956485ce058750c2635db9633736708d7f0 Reviewed-on: https://gerrit.libreoffice.org/12342 Reviewed-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com> Tested-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2014-11-07Resolves: rhbz#1161238 sync PRESOBJ_OUTLINE para depths to outline numberingCaolán McNamara1-0/+48
same problem as fdo#78151, except that pre-existing documents created before the bullet/numbering toggling UI change have PRESOBJ_OUTLINEs with paras in them with "numbering off" but the outline level they are a preview of still have numbering enabled. Leave the actual numbering styles alone in this case and toggle the PRESOBJ_OUTLINEs paras back to the level they "really" are Change-Id: I76508f88b5003afd1740feee3ec328326117f896
2014-11-06Revert "use the new OUString::fromUtf8 method"Stephan Bergmann2-2/+2
This reverts commit 05050cdb23de586870bf479a9df5ced06828d498, not all places that use e.g. OStringToOUString to convert potential UTF-8 are guaranteed to fulfil the prerequisites necessary to use fromUtf8 (and some places like e.g. in codemaker are happy with the best-effort effect of OStringToOUString's OSTRING_TO_OUSTRING_CVTFLAGS).
2014-11-06use the new OUString::fromUtf8 methodNoel Grandin2-2/+2
Change-Id: I771004b7ccab3344a67e827e45bc34c22ffa5f77
2014-11-05fdo#38835 strip out OUString globalsNoel Grandin1-7/+7
they are largely unnecessary these days, since our OUString infrastructure gained optimised handling for static char constants. Change-Id: I07f73484f82d0582252cb4324d4107c998432c37
2014-10-30Fixed typos. No automatic tools (sed, and so on).Andrea Gelmini1-1/+1
Change-Id: Ia43976d84eede6f699381bc4f3daf89b95e4cb4f Reviewed-on: https://gerrit.libreoffice.org/12150 Reviewed-by: Bryan Quigley <gquigs@gmail.com> Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2014-10-28fdo#84938: replace TIMEF_ constants with enumNoel Grandin1-1/+1
Change-Id: Ia6aa4e21fef46b20d1d8996d2f15855b8ba1776e Reviewed-on: https://gerrit.libreoffice.org/12114 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-23Fraction: Revert "fdo#81356: convert Fraction to boost::rational<long> - wip"Jan Holesovsky3-4/+4
This reverts commit 47a2d7642d249d70b5da0c330a73f3a0032e4bba. Conflicts: cui/source/tabpages/transfrm.cxx svx/source/svdraw/svdedtv1.cxx svx/source/svdraw/svdibrow.cxx sw/source/filter/ww1/w1filter.cxx tools/source/generic/rational.cxx Change-Id: I4849916f5f277a4afef0e279b0135c76b36b9d15
2014-10-23Fraction: Revert "fdo#84854 it seems long is not enough on 32 bit"Jan Holesovsky3-4/+4
This reverts commit 582ef22d3e8e30ffd58f092d37ffda30bd07bd9e. Conflicts: svx/source/svdraw/svdedtv1.cxx svx/source/svdraw/svdibrow.cxx sw/source/filter/ww1/w1filter.cxx Change-Id: I80abc7abdeddc267eaabc9f8ab49611bb3f8ae83
2014-10-23FastSerializer: Buffer output and write it only at the endMatúš Kukan1-0/+2
Use OSequenceOutputStream class to concatenate strings in a Sequence<sal_Int8> buffer. And write data to file only at the end. The design is a bit fragile, since all FSHelpers need to be destroyed before calling FilterBase::commitStorage(). Otherwise data is not written. Change-Id: I26b02335ef36011bfcda17484b560811d18c7657
2014-10-21fix debugging buildCaolán McNamara1-1/+1
Change-Id: I7264f670dd60f6121a23a4cb5524edc3bf1dcee7
2014-10-21fdo#84938: replace WINDOW_BORDER constants with enumNoel Grandin1-5/+5
Change-Id: I91ca8e09971aee26f16257a4fd01125cfb2ebcdb
2014-10-20coverity#704010 Unchecked return valueCaolán McNamara1-1/+1
Change-Id: I90750c51ce3b38defdba7ecdb7734172983efa8c
2014-10-17There is no ExportCGMStephan Bergmann1-23/+1
Change-Id: I84b0d4daa3a6090aadaa7f64bdb9277efbba371f
2014-10-17Pass args by const &Stephan Bergmann1-2/+2
Change-Id: I510e1aba6772e1f8d4013b235e95a1e5599fd601
2014-10-16fdo#84854 it seems long is not enough on 32 bitDavid Tardon3-4/+4
Fraction used BigInt internally for computations, rational does nothing like that. Change-Id: I3e9b25074f979bc291208f7c6362c3c40eb77ff5
2014-10-15More -Werror,-Wunused-private-fieldStephan Bergmann3-9/+1
...detected with a modified trunk Clang with > Index: lib/Sema/SemaDeclCXX.cpp > =================================================================== > --- lib/Sema/SemaDeclCXX.cpp (revision 219190) > +++ lib/Sema/SemaDeclCXX.cpp (working copy) > @@ -1917,9 +1917,10 @@ > const Type *T = FD.getType()->getBaseElementTypeUnsafe(); > // FIXME: Destruction of ObjC lifetime types has side-effects. > if (const CXXRecordDecl *RD = T->getAsCXXRecordDecl()) > - return !RD->isCompleteDefinition() || > - !RD->hasTrivialDefaultConstructor() || > - !RD->hasTrivialDestructor(); > + return !RD->hasAttr<WarnUnusedAttr>() && > + (!RD->isCompleteDefinition() || > + !RD->hasTrivialDefaultConstructor() || > + !RD->hasTrivialDestructor()); > return false; > } > > @@ -3517,9 +3518,11 @@ > bool addFieldInitializer(CXXCtorInitializer *Init) { > AllToInit.push_back(Init); > > +#if 0 > // Check whether this initializer makes the field "used". > if (Init->getInit()->HasSideEffects(S.Context)) > S.UnusedPrivateFields.remove(Init->getAnyMember()); > +#endif > > return false; > } to warn about members of SAL_WARN_UNUSED-annotated class types, and warn about initializations with side effects (cf. <http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-October/039602.html> "-Wunused-private-field distracted by side effects"). Change-Id: I3f3181c4eb8180ca28e1fa3dffc9dbe1002c6628
2014-10-14remove duplicate definitions of PPT_TRANSITION_TYPE constantsNoel Grandin1-25/+0
Change-Id: I8b6743c4f2c5c3d52c7df33953ed3dd7b32a1a46
2014-10-14fdo#84938: convert EPP_LAYOUT constants to enumNoel Grandin3-48/+51
Change-Id: Ibf43bf9ca241c6286659a16906a45bbafa798748 Reviewed-on: https://gerrit.libreoffice.org/11961 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-10coverity#1242757 Result is not floating-pointCaolán McNamara1-2/+2
there was two of these, see commit 164bd64255d71d96e35e908f6425acf8372795fb Date: Thu Oct 2 04:44:33 2014 -0500 coverity#1242757 Result is not floating-point Change-Id: I1f66191f329b2d87bdeb52aa1a7528ca662064a6
2014-10-10Unused PowerPointExport::mpMasterFSArray memberMatúš Kukan2-4/+0
Change-Id: I02b9c31146396a39a624fbb869a5880b176e0f9e
2014-10-09fdo#81356: convert Fraction to boost::rational<long> - wipJuan Picca3-4/+4
* Added rational util functions used by Fraction class not available in the boost::rational class. * Replaced usage of Fraction by boost::rational<long> * Removed code that relies on: 1. fraction.IsValid() -- rational only allow valid values, ie denominator() != 0 2. rational.denominator() == 0 -- always false 3. rational.denominator() < 0 -- always false but implementation detail: http://www.boost.org/doc/libs/release/libs/rational/rational.html#Internal%20representation * Simplified code that relies on: 1. rational.denominator() != 0 -- always true * BUGS EXIST because Fraction allows the creation of invalid values but boost::rational throws the exception boost::bad_rational Change-Id: I84970a4956afb3f91ac0c8f726547466319420f9 Reviewed-on: https://gerrit.libreoffice.org/11551 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2014-10-06fdo#75757: remove inheritance to std::vectorTakeshi Abe1-15/+14
from PptSlidePersistList. This also puts in assertions that every entry in a PptSlidePersistList is non-null. Cf. 9536a28ede89e8c29940e8ba225215a45667062c Change-Id: Iea35532ed668e58a3f02d3f3433a66c2d4e1fe2a Reviewed-on: https://gerrit.libreoffice.org/11807 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2014-10-04coverity#1242757 Result is not floating-pointNorbert Thiebaud1-2/+2
Change-Id: Iae8ac2ad9d1713512619c5c33eeee9a21b5835f1
2014-10-02coverity#1242520 silence Arguments in wrong orderCaolán McNamara1-1/+3
Change-Id: I88b96d42f5ee96641dc21e3e55415f6dc32b3951