Commit Graph

34943 Commits

Author SHA1 Message Date
68c9515daf pParagraphMarkerProperties can easily be a reference
Change-Id: Ida4309aeb69bde43f70415211490db657c7c7567
2014-10-17 21:26:51 +02:00
4bb872b192 DOCX export: fix handling of paragraph mark on empty paragraphs
The problem was that in case a paragraph is empty, and it has both a
character style and direct formatting, then the doc model created by the
ODT and DOCX import is like this:

<text>
  <attrset>
    <item whichId="8" which="character font size" value="nHeight: 240, nProp: 100"/>
  </attrset>
  <hints>
    <hint end="0" whichId="52" which="character format" value="name: hello"/>
  </hints>
</text>

I.e. the direct formatting is stored in the attribute set of the text
node directly, while the character style is stored as a hint.

MSWordExportBase::OutputTextNode() tried to read the hints and if there
were not any, then tried to read the attribute set, while in this
situation we need both.

Change-Id: I71fd10f6d00246348e77fee5431cb4e2a7c9b349
2014-10-17 18:27:16 +02:00
be31503ef8 coverity#1242778 Untrusted value as argument
Change-Id: I34d5a5e7c5f0eef51d941c65ab73d5421d5a36cb
2014-10-17 15:19:55 +01:00
8ba198465a coverity#1247640 Uncaught exception
Change-Id: Iccb18ddc9333b7812b747b142272f4394e4eca80
2014-10-17 15:19:51 +01:00
6bb741b7f4 coverity#1247638 Uncaught exception
Change-Id: Ibdda31c2a8d8c3314173f381b60800ccfbcc25f7
2014-10-17 15:19:49 +01:00
b0a91289a0 coverity#1247634 Uncaught exception
Change-Id: I0d7326533a4daf9d4cb37ce73e85c6a089eed33d
2014-10-17 15:19:46 +01:00
331f4663e4 coverity#1247631 Uncaught exception
Change-Id: I92e59b18cef0828040c88ffbde150de6bb0d16a5
2014-10-17 15:19:44 +01:00
c45fa7f54d coverity#1247648 Uninitialized pointer read
Change-Id: Id9faf897cedd976491520178aad8015398f7d018
2014-10-17 15:19:39 +01:00
51d86c9e62 Consistency around SdrAngleItem in svx/sxciaitm.hxx
...similar to what has been done for svx/sdtmfitm.hxx in
68969cc61adecac481ae9656978ef952f435b310 "Consistency around SdrMetricItem."

Change-Id: I8e76e4751e50f5952c6dfff9ee10362166bf0523
2014-10-17 15:36:13 +02:00
0828003419 SwTxtNode::dumpAsXml: handle RES_TXTATR_CHARFMT
Change-Id: I29d8eb9ab6d6428f699a92b6cd9d58ed8b3b7e48
2014-10-17 12:47:56 +02:00
582ef22d3e fdo#84854 it seems long is not enough on 32 bit
Fraction used BigInt internally for computations, rational does nothing
like that.

Change-Id: I3e9b25074f979bc291208f7c6362c3c40eb77ff5
2014-10-16 17:44:44 +02:00
d2ed493a4c WaE: Unreferenced function definition
Change-Id: Ibc28879d303fc768014df89df8022e1fd13634dd
2014-10-16 08:59:22 +03:00
40e043ca9e sw: remove more dead code from SwIoSystem::GetFileFilter()
Change-Id: I53cadf01246faf3c4b54ee360db19bde2dcb98cc
2014-10-15 23:44:55 +02:00
3ec25899e0 sw: fix temp file leak in SwIoSystem::GetFileFilter()
Change-Id: Id483d58a9de27a247880aedfe6bb3fe1d410129c
2014-10-15 23:44:55 +02:00
a1a33bc181 fdo#75757: remove inheritance to std::vector
from SwRedlineSaveDatas

Change-Id: Ie178983496891c8bd964b37536058d2e6b310c29
Reviewed-on: https://gerrit.libreoffice.org/11947
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-10-15 19:41:20 +00:00
53d4966421 sw: WW8 import: delete leaked SdrGrafObj (and temp file)
The SdrObject returned from SvxMSDffManager::GetShape() is owned by the
caller; since it's not inserted anywhere it has to be deleted.

Change-Id: Iaac6467592ec4151173a586a6dc71f9bc44b44f0
2014-10-15 18:03:17 +02:00
a4c9c8b3fb sw: simplify the temp-file leaking debug code in mail-merge
Change-Id: Ib0de8cc5977a8721511e62f39bf3a86a6a76250a
2014-10-15 18:03:16 +02:00
569bf818cb fix indent
Change-Id: If9f7154b204a1f5c0a0c6475988cf965fb5aadfe
2014-10-15 16:56:59 +01:00
169433f294 coverity#1242817 Untrusted loop bound
Change-Id: I974a80644f70c024f93d081a87204df8cadfa012
2014-10-15 16:56:59 +01:00
1c118a9536 coverity#1242879 Untrusted value as argument
Change-Id: Iedcd30fc27e9984407c6752577a3ecb35d7dc075
2014-10-15 16:56:58 +01:00
159ea0e04e coverity#1242719 Untrusted value as argument
Change-Id: I444233dcf0a1e5e3792089be605b340b24882c89
2014-10-15 16:56:58 +01:00
e178c45a47 coverity#1242692 Untrusted value as argument
Change-Id: If0019caa34168b758f23e88363b94e91f8bd4c8a
2014-10-15 16:56:58 +01:00
0fc5d67a84 fix up indent
Change-Id: Icaa9b84aa0c3617248d8e52fcccfca928accaea1
2014-10-15 16:56:57 +01:00
ad9498f8b8 More -Werror,-Wunused-private-field
...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-15 15:58:56 +02:00
3d0988b8ca coverity#982478 Dereference after null check
maybe sort of can be considered a regression from
commit 733b831970204059b9d89eff203551d6d3bf4bbe
Date:   Tue Jan 5 16:37:41 2010 +0100
    swunolocking1: swtypes.hxx: rename frame anchor types
     enum RndStdIds: rename frame anchor types (FLY_*) to be more intuitive.

where

if (0 == (pAnchorPos = pAnch->GetCntntAnchor()))
    bCallMake = sal_False;

turned to

if (pAnchorPos)
    bCallMake = sal_False;

but there would always be a following de-ref of a potential NULL pAnchorPos
which wasn't FLY_AT_PAGE

Change-Id: I808b4f178887ab6149e38bab6e36eb68d7a1eb29
2014-10-15 13:49:09 +01:00
ecc5cbc69e fdo#82860 RTF export: if shape has textbox, export its contents as shape text
See 8c677716c4707ccd86b152ae504841affb393cc0 (DOCX drawingML export: if
shape has textbox, export its contents as shape text, 2014-06-06).

Change-Id: I5b1afae4d1b80c9b225096677f7d7ae77ff90f5b
2014-10-15 13:19:08 +02:00
f57ed7edd4 fdo#82860 RTF export: don't export textboxes of shapes twice
See 96965fb39d6d376e91030a01c11f16f9428ddf2e (DOCX drawingML export:
don't export textboxes of shapes twice, 2014-06-06).

Change-Id: I89c039debeca5f88f172479b9f8ecbaec2dc7bc4
2014-10-15 13:19:08 +02:00
d9fa1247be fdo#84938: replace SYMBOL_TYPE constants with enum
Change-Id: Ib3763f20d74c22e28d519a9ac47f6f3ab4e31f51
Reviewed-on: https://gerrit.libreoffice.org/11983
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-15 10:13:04 +00:00
0d6f453775 coverity#1212509 Logically dead code
this look very wrong, surely this is what was meant

Change-Id: I461fc1a67770c733aee2f4379dcc252abd09b641
2014-10-15 10:53:52 +01:00
dd6d9fd5db ww8: warning C4701: potentially uninitialized local variable
Apparently xmloff supports at least one value that has no equivalent in
OOXML; just use "none" for now.

Change-Id: I76d2802c7c91ea756125e66c229ec5fdb2e7ec3b
2014-10-15 00:04:31 +02:00
091742e86a do not forward-declare templates
Change-Id: I3b0a145f70406f0c8a12b6c4b7876c4148f76e93
2014-10-14 17:56:23 +02:00
2d35baed5e bnc#800714 SwTxtFrm::FormatAdjust: still call SplitFrm if we have columns
Regression from c5a8a2c3cbcee0175127a0662e3d820ea4deea22 (sw34bf05:
i#84870 - method <SwTxtFrm::FormatAdjust(..)> - do not split text frame
which only contains on as-character anchored object, 2011-03-11), the
i#84870 fix was for a document which didn't have columns, and didn't
consider that this causes a layout loop in case:

1) There are two paragraphs in a section, having multiple columns.

2) The second paragraph has fo:keep-together="always".

In this case originally we tried to call SplitFrm(), realized that it
didn't help, and then gave up. But after the change, we kept trying to
satisfy the two conflicting requirements (balance content in the 3
columns vs keep the second paragraph with the first one).

Fix the problem by not calling SplitFrm() only in case we're not inside
columns.

Change-Id: I64e969ef5e8f519314f5613f8e6fae626ae085ce
2014-10-14 16:38:57 +02:00
7c7958ef45 Wrong unnecessarily deep downcasts
...to SwDrawContact instead of SwContact, ingoring that some objects involved
in e.g. CppunitTest_sw_uiwriter are of type SwFlyDrawContact.

Change-Id: Ie3b7726b3d47106db00b8aa11b702d505c369e00
2014-10-14 11:07:09 +02:00
dea7cb8a4f Remove confusing TableReference::operator=()
Confusing, because the class has 4 members, and only 2 was set in that
method.

Change-Id: I797872be8c60fa564cece66d8dd20e33248d4a0f
2014-10-14 09:16:30 +02:00
3ded687bef SwBasicEscherEx::WritePictures: improve comment
Change-Id: I6763d18efb2b61462b0a92f847495884716f18bb
2014-10-13 21:53:48 +02:00
8ef09a9219 coverity#704061 Unchecked return value
Change-Id: I460f258cb3b44949176561d397837184cd08bfbd
2014-10-13 16:54:25 +01:00
b1efc0e9ef coverity#1078466 Unchecked return value
Change-Id: Ia78578303cadda713b3c015cd0e30446cd6f8f25
2014-10-13 16:54:24 +01:00
38d87edeeb coverity#1078451 Unchecked return value
Change-Id: I7652c609228e90fa0c71a6d20852da111be77d3d
2014-10-13 16:54:23 +01:00
be4c913293 coverity#1078450 Unchecked return value
Change-Id: I1dce4448ccc1a3af143dc4435a00aa434b4114ae
2014-10-13 16:54:23 +01:00
900d3e33a2 coverity#982191 Unchecked return value
Change-Id: Ieb5607513b61b2a5436332bdd8a572fb6a739be7
2014-10-13 16:54:22 +01:00
af5ebbf783 create a macro library for implementing bit-flags types
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>,
changed from a macro- to a template-based solution.  (Unfortunately MSVC 2012
does not support explicit conversion operators.  Worked around that with
explicit #ifs rather than some HAVE_EXPLICIT_CONVERSION_OPERATORS and
SAL_EXPLICIT_CONVERSION_OPERATOR ainticipating we hopefully soon move to a
baseline that requires unconditional support for them.)

Change-Id: I4a89643b218d247e8e4a861faba458ec6dfe1396
2014-10-13 17:45:57 +02:00
edb6783c14 convert SW_TAB #defines to enum
Change-Id: I8f2c63dc381416af1eb74794a1bbc3417eb272d6
Reviewed-on: https://gerrit.libreoffice.org/11936
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-13 06:54:23 +00:00
c967872d46 convert SW_MOVE constants to enum
Change-Id: I504862618bfeeeed674c1cb816104a167cb2e27e
Reviewed-on: https://gerrit.libreoffice.org/11935
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-12 16:43:49 +00:00
b8c9366803 coverity#735337 Unchecked return value
Change-Id: Ib1f27e51934d7deb4f30d74409554dfeb14928ff
2014-10-12 16:39:54 +01:00
1119e4a98c coverity#735334 Unchecked return value
Change-Id: I8023e8c11e76def505568125703f30531161dfa7
2014-10-12 16:39:54 +01:00
7ec1643c9f coverity#1226478 Unchecked return value
Change-Id: Idcd3f35d1b5f097e61963083f11712e4ab87bdaa
2014-10-12 16:39:53 +01:00
06210e5ded coverity#1078484 Unchecked return value
Change-Id: Ia9ce3d94aa5b825e0b7ba28240f00733332e606c
2014-10-12 16:39:52 +01:00
f99ebf4681 RTF filter: fix \acc* handling
The exporter didn't write circle and underdot at all.

Change-Id: Ia8f45f2b03fb14e9a0027ec24ee7f36adc8c018d
2014-10-12 16:26:01 +02:00
997ce52eb7 DOCX filter: fix <w:em> handling
The real news here is that "comma" and "dot" was swapped on export, the
rest is just a fixup of recent breakage.

Change-Id: I54045f5837652dc38a30361e21ced25aeaf58257
2014-10-12 16:26:01 +02:00
4c12951a03 Typo: compatability->compatibility
Change-Id: If0b98a30452a9d1fcc340173deb6856755926471
2014-10-12 13:00:46 +02:00