summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)AuthorFilesLines
2016-11-23tdf#103170 make blank button labels not translatableYousuf Philips1-2/+2
Change-Id: Ib919b9b5acfed3cce57c9e4d22f35141f485e749 Reviewed-on: https://gerrit.libreoffice.org/31079 Reviewed-by: Yousuf Philips <philipz85@hotmail.com> Tested-by: Yousuf Philips <philipz85@hotmail.com>
2016-11-23Carry fix over to CppunitTest_sw_dialogs_test_2Stephan Bergmann2-0/+27
...from 2ec76e5db5c194e133b6fee5c7f81c04357971f8 "Make sure swui's pSwResMgr is initialized in CppunitTest_sw_dialogs_test", across ignorant f888d17127557a8fd3867896dcfa1abbb9f6a53d "split sw screenshots test" Change-Id: I096e22433317186e1a78855532f2c67bd842f366
2016-11-23sw: clean up redundant initializers in rtfstringbufferMiklos Vajna2-13/+6
Change-Id: Ie4bb6689b3b9bdfcfaab1f1c9320792672fb847a Reviewed-on: https://gerrit.libreoffice.org/31107 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-11-23tdf#42949 Remove unnecessary headers from sw/source/filtersBartosz Kosiorek23-65/+3
Change-Id: I5f4d3fed6e8fd484ba5da835e2954f3c2042f33b Reviewed-on: https://gerrit.libreoffice.org/31087 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-23tdf#42949 Remove unused uno headers from /sw/source/uibaseBartosz Kosiorek57-171/+3
Change-Id: Iec10c5411814008f873868382faf245f38eeae1f Reviewed-on: https://gerrit.libreoffice.org/31097 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-23tdf#42949 Remove unused uno headers from /sw/source/coreBartosz Kosiorek47-100/+0
Change-Id: I0029144d049ad1c5ee3ff4d188ff969b6881712f Reviewed-on: https://gerrit.libreoffice.org/31095 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-22tdf#103982 DOCX export: make sure SdrObject margin is non-negativeMiklos Vajna3-4/+19
Regression from commit a5a836d8c43dc9cebbbf8af39bf0142de603a7c6 (DOCX filter: effect extent should be part of the margin, 2014-12-04), the effect extent is added to the nominal margin in DOCX, so we exclude that from the margin in our document model. But it shouldn't be ever negative, ST_WrapDistance is a restriction of the W3C XML Schema unsignedInt datatype. Change-Id: I82b3c1ba0e3a14f7c585b0d389264a2c12e454e7 Reviewed-on: https://gerrit.libreoffice.org/31064 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-11-21Revert "Revert "std::list<sal_uLong> to deque""Julien Nabet1-2/+3
+ use returned iterator by insert method call This reverts commit 1a583283d6b58c8951cb52faac82ecb24fdbf1b3. Change-Id: I02547663230fb7b5959df349c4d395bbadd74c3b Reviewed-on: https://gerrit.libreoffice.org/30439 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2016-11-21Delete the "Any-to-Any" template specializations for LIBO_INTERNAL_ONLYStephan Bergmann1-2/+2
i.e., css::uno::Any function template specializations Any::has<Any>() const Any::get(Any const &) const operator >>=(Any const &, Any &) operator <<=(Any &, Any const &) that don't make much sense (the first is always true, the rest can be replaced with operator =, which additionally supports move semantics). For 3rd-party compatibility, do this only for LIBO_INTERNAL_ONLY, however. However, some generic template code did benefit from operator >>= working also for Any, so make up for that with a new (LIBO_INTERNAL_ONLY, given that operator >>= still covers if fine for !LIBO_INTERNAL_ONLY) fromAny, complementing the existing toAny. Change-Id: I8b1b5f803f0b909808159916366d53c948206a88 Reviewed-on: https://gerrit.libreoffice.org/30022 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-11-21related: tdf#90362: remove option from Formatting AidsMike Kaganski10-60/+29
The option to ignore protection breaks expected functionality (protection, including sections protected with password), and may cause problems mentioned in original bug. This only should be used in specific recovery situations. Moving it from user-visible page to Expert Configuration. (Previously, changing it in Expert Configuration hadn't effect.) Change-Id: Ice2f20200584acd6b476e002eb783820fa823611 Reviewed-on: https://gerrit.libreoffice.org/30968 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-11-21introduce getValue(sKey) for SequenceAsHashMapJochen Nitschke2-41/+19
returns the plain value (Any) if it exists, else return an empty Any replaces some getUnpackedValueOrDefault calls in sw where is was not clear if the unpacked value exsisted or was default needed for removal of Any-to-Any template specialisations Change-Id: I618da7a7174143f5edef48e47e7aa1b6a52845e1 Reviewed-on: https://gerrit.libreoffice.org/30114 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-11-21convert inventorId to scoped enumNoel Grandin26-59/+50
SW_DRAWLAYER had the same value as SC_DRAWLAYER, so I merged it into the ScOrSwDraw enum constant Change-Id: I5c45d378c00364d11cc960c9e48a6e3f10928724 Reviewed-on: https://gerrit.libreoffice.org/31037 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-21cppcanvas, oox: add missing #include <osl/endian.h>Michael Stahl1-0/+1
These files use the macro OSL_BIGENDIAN but did not include the header that defines it. Found via: git grep -l OSL_.*ENDIAN | grep -E '\.h(xx)?$' | while read f; do grep -L endian\\.h $f ; done Change-Id: Iffb36336026e49a9c3d8fcf125a54ec857c7552e
2016-11-21sw: prefix members of WW8PLCFManMiklos Vajna2-194/+194
Change-Id: I806fc0bc9e09b5624dd91d7047eb0388026a6648
2016-11-21tdf#95699: allow copy FORMCHECKBOX and FORMDROPDOWN ...Mike Kaganski3-2/+24
... when they are selected alone (no adjacent text selected). Unit test included. Change-Id: Ia278ae2ea86a3e6d83e1a628880f770f1eb11cd7 Reviewed-on: https://gerrit.libreoffice.org/30954 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-11-21add missing depDavid Tardon1-0/+4
Change-Id: I932f1383f37a45c56dc3ae6d0b5485d80f3325ad
2016-11-21add missing depDavid Tardon1-0/+4
Change-Id: I518d86870a0970672d618379a6f965c69c04759d
2016-11-21add missing deps on ui filesDavid Tardon2-0/+8
Change-Id: I28bb2a33c02d8eadced584d3d3f2b62b2e847324
2016-11-21Remove redundant comparisonsMike Kaganski1-4/+0
Comparing IndexRegs is included into SwIndex comparison operators (see sw/inc/index.hxx), so no need to do it also explicitly. Change-Id: I7e3ea8ab9b8f852cd7e6f0d90afa26e75c734652 Reviewed-on: https://gerrit.libreoffice.org/30951 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-21tdf#104023 - fix wrong boolean logic for RedlineFlagsJustin Luth3-6/+3
commit 847e004e65ec3c35acff607588d15cd75a84f121 convert nsRedlineMode_t to typed_flags ...introduced some logical equivalency errors. A few static redline functions utilize the correct logic, so use them to simplify the code readability. Change-Id: I4f5715b71dd4c8f2a6cea0c816637b1784892c0d Reviewed-on: https://gerrit.libreoffice.org/30974 Reviewed-by: Justin Luth <justin_luth@sil.org> Tested-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-21split sw screenshots testNorbert Thiebaud4-0/+224
Change-Id: I32e6f1e11f9e245f8b67fa21799b1927bb209a0d Reviewed-on: https://gerrit.libreoffice.org/31030 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2016-11-20gbuild allow unitest to run once per lang in WITH_LANG_LISTNorbert Thiebaud1-1/+1
this is motivated by the new screenshot feature the initial proposed solution involved running make screenshot once per lang which took ~6 hours for --with-lang=ALL on tb68 a reasonnably big windows slavebot. with this patch, one can run make screenshot just once and get all the screenshot the elapsed time is 36 inutes on the same box/same config a 10x improvement. Change-Id: I4339caebf915c118aa455de2a7e56e1a4e413939 Reviewed-on: https://gerrit.libreoffice.org/30970 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2016-11-18coverity#1394416 ensure there's enough data to readCaolán McNamara1-1/+1
Change-Id: I9d2cf2e566dd10243a0ca72e6a9278bd2eaed57b
2016-11-18Missing XComponent.dispose calls in screenshot testsStephan Bergmann1-0/+8
Change-Id: I5df25a16303719593d40f08d1e7c15e4636a2d02
2016-11-18Blacklist for now some more problematic dialogs in CppunitTest_sw_dialogs_testStephan Bergmann1-3/+5
...where the instantiated SwEnvPreview expects to have a SwEnvDlg parent, and at least ASan/UBSan reports about that Change-Id: Ib21f0787e149547037a31a53d831d26b27aa5960
2016-11-18Make sure swui's pSwResMgr is initialized in CppunitTest_sw_dialogs_testStephan Bergmann1-0/+4
...to avoid -fsanitize=null at > sw/source/uibase/dbui/dbtree.cxx:147:18: runtime error: reference binding to null pointer of type 'ResMgr' > #0 0x7fd408581b70 in SwDBTreeList::SwDBTreeList(vcl::Window*, long) sw/source/uibase/dbui/dbtree.cxx:147:18 > #1 0x7fd408594596 in VclPtr<SwDBTreeList> VclPtr<SwDBTreeList>::Create<VclPtr<vcl::Window>&, long&>(VclPtr<vcl::Window>&, long&) include/vcl/vclptr.hxx:138:46 > #2 0x7fd4085827d8 in makeSwDBTreeList sw/source/uibase/dbui/dbtree.cxx:156:1 > #3 0x7fd443044214 in VclBuilder::makeObject(vcl::Window*, rtl::OString const&, rtl::OString const&, std::__debug::map<rtl::OString, rtl::OString, std::less<rtl::OString>, std::allocator<std::pair<rtl::OString const, rtl::OString> > >&) vcl/source/window/builder.cxx:1793:17 Change-Id: I02c5a0017b85254bf34f622b55f7db9d5d546b80
2016-11-18loplugin:datamembershadowNoel Grandin2-5/+2
Change-Id: I8a737a2f22c7be9630a1f7562b4309e687bb85f9 Reviewed-on: https://gerrit.libreoffice.org/30948 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-18Resolves: tdf#91916 different word 6/7 vers have ambiguous sprmsCaolán McNamara12-66/+174
See tdf#91916, #i8726, #i42685# there is an ambiguity around certain properties as to what they mean, which appears to be a problem with different versions of the file format where properties conflict, i.e. ooo40606-2.doc, magic is a699 : 0x6f 0x4 0x0 0x71 0x4 0x0 ooo40635-1.doc, magic is a699 : 0x6f 0x4 0x0 0x71 0x4 0x0 ooo31093/SIMPCHIN.doc, magic is a699 : 0x6f 0x2 0x0 0x70 0x0 0x0 0x71 0x2 0x0 : 0x6f 0x5 0x0 0x70 0x5 0x0 ooo31093/TRADCHIN.doc, magic is a699 : 0x6f 0x1 0x0 0x70 0x0 0x0 0x71 0x1 0x0 ooo31093/JAPANESE.doc, magic is a697 : 0x6f 0x2 0x0 0x70 0x0 0x0 0x71 0x2 0x0 ooo31093/KOREAN.doc, magic is a698 : 0x6f 0x2 0x0 0x70 0x0 0x0 0x71 0x2 0x0 ooo31093-1.doc, magic is a698 : 0x6f 0x5 0x0 0x70 0x5 0x0 ooo31093-1.doc, magic is a698 : 0x6f 0x5 0x0 0x70 0x5 0x0 meanwhile... ooo27954-1.doc, magic is a5dc : 0x6f 0x1 0x81 0x71 0x2 0x4 0x0 0x74 0x2 0x20 0x0 ooo33251-1.doc, magic is a5dc : 0x6f 0x1 0x81 0x71 0x2 0x3 0x0 0x74 0x2 0x1c 0x0 --- So we have the same sprm values, but different payloads, where the a5dc versions appear to use a len argument, followed by len bytes, while the a698<->a699 versions use a 2byte argument commit c2213db9ed70c1fd546482d22e36e4029c10aa45 INTEGRATION: CWS tl28 (1.169.24); FILE MERGED 2006/10/25 13:40:41 tl 1.169.24.2: RESYNC: (1.169-1.170); FILE MERGED 2006/09/20 11:55:50 hbrinkm 1.169.24.1: #i42685# applied patch changed 0x6f and 0x70 from Read_BoldBiDiUsw to Read_FontCode for all versions. In the Word for Window 2 spec we have... 78 //sprmCMajority 80 //sprmCFBoldBi 81 //sprmCFItalicBi 82 //sprmCFtcBi 83 //sprmClidBi 84 //sprmCIcoBi 85 //sprmCHpsBi as see in GetWW2SprmDispatcher, different numbers, but the sequence starts with the same sprmCMajority as appears before 0x6f in word 6/95 I think the easiest explanation is that the CJK Word for Window 95, or whatever the product was went rogue, and did their own things with at least first three slots after sprmCMajority to do a different thing. I have no reason to think Tono was wrong with what they do in the a698<->a699 versions versions, but with magic a5dc they probably did mean sprmCFBoldBi, sprmCFItalicBi cause they have that 0x81 pattern which has significance for those types of properties. Change-Id: I44aabf7443391bae21ed5adb074780a1c929a80d
2016-11-18includes should be at the top of the fileNoel Grandin12-40/+36
not randomly scattered through the code found with something like: git ls-files *.cpp | xargs grep -Pzl "(?s){.*#include" Change-Id: I9c242fa4ef99e8677f2800d7ec9f16d16e488351 Reviewed-on: https://gerrit.libreoffice.org/30952 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-18tdf#103944: Fix symbol font remappingKhaled Hosny3-11/+0
This reverts: commit 8556cd881270823865662e9a7700da58d11c2785 Author: Miklos Vajna <vmiklos@collabora.co.uk> Date: Thu Mar 6 09:48:54 2014 +0100 cp#1000039 DOC import: ignore symbol charset of the symbol font Otherwise characters unhandled by our OpenSymbol font (like Arabic 0-9 numbers) won't be rendered using an other font, as no other font provides the symbol charset. Do this in SwWW8ImplReader::GetFontParams(), where we already have font name -> font family mappings for a few well-known fonts. The DOCX filter does the same for quite some time, and that's how Arabic numbers in text using the Symbol font were rendered, instead of little rectangles. The reverted commit prevented remapping symbols supported by OpenSymbol, and it seems to have worked incidentally because of the fallback to the “Standard Symbols L” Type 1 font which we longer support. The bug doc is broken in master with or without this commit, but reverting this fixes tdf#103944. Change-Id: I17ac699fc5987e11e5c9e490895fc3c4967d3127 Reviewed-on: https://gerrit.libreoffice.org/30932 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-11-18Make sure swui's pSwResMgr is initialized in CppunitTest_sw_dialogs_testStephan Bergmann2-0/+27
...to avoid -fsanitize=null at > sw/source/ui/misc/glossary.cxx:840:17: runtime error: reference binding to null pointer of type 'ResMgr' > #0 0x7f980fc6b73f in SwGlTreeListBox::SwGlTreeListBox(vcl::Window*, long) sw/source/ui/misc/glossary.cxx:840:17 > #1 0x7f980fc80d56 in VclPtr<SwGlTreeListBox> VclPtr<SwGlTreeListBox>::Create<VclPtr<vcl::Window>&, long>(VclPtr<vcl::Window>&, long&&) include/vcl/vclptr.hxx:138:46 > #2 0x7f980fc6c5d2 in makeSwGlTreeListBox sw/source/ui/misc/glossary.cxx:851:1 > #3 0x7f985da4c3c4 in VclBuilder::makeObject(vcl::Window*, rtl::OString const&, rtl::OString const&, std::__debug::map<rtl::OString, rtl::OString, std::less<rtl::OString>, std::allocator<std::pair<rtl::OString const, rtl::OString> > >&) vcl/source/window/builder.cxx:1793:17 Change-Id: Ieb0d0f6b561e93acbee8208e1ba445879e99adc1
2016-11-18Fix comment about pSwResMgrStephan Bergmann1-1/+3
Change-Id: I567446ebb41c553cf1a0f6cfdba89857c018c6f2
2016-11-17Avoid -fsanitize=enumStephan Bergmann1-1/+4
...when doing Writer "Insert - Table of Contents and Index - Table of Contents, Index or Bibliography...": > sw/source/uibase/inc/cnttab.hxx:58:16: runtime error: load of value 65535, which is not a valid value for type 'TOXTypes' > #0 0x7fbed9c2c9c8 in CurTOXType::operator==(CurTOXType const&) sw/source/uibase/inc/cnttab.hxx:58:16 > #1 0x7fbed9b711b1 in SwTOXEntryTabPage::ActivatePage(SfxItemSet const&) sw/source/ui/index/cnttab.cxx:2071:25 > #2 0x7fc217524056 in SfxTabDialog::ActivatePageHdl(TabControl*) sfx2/source/dialog/tabdlg.cxx:1126:19 > #3 0x7fc217519ac3 in SfxTabDialog::LinkStubActivatePageHdl(void*, TabControl*) sfx2/source/dialog/tabdlg.cxx:1035:1 > #4 0x7fc1f15c0e37 in Link<TabControl*, void>::Call(TabControl*) const include/tools/link.hxx:84:45 > #5 0x7fc1f157cbaa in TabControl::ActivatePage() vcl/source/control/tabctrl.cxx:1601:19 Change-Id: I458e010b10dfdf3e944c389f61595869cc41036f
2016-11-17Avoid -fsanitize=signed-integer-overflowStephan Bergmann1-0/+4
Both Writer: "Table - Insert Table... - Insert", "Table - AutoFormat Styles..."; and Calc: select multiple cells, "Format - AutoFormat Styles..." cause > svx/source/dialog/framelinkarray.cxx:82:29: runtime error: signed integer overflow: -4702111234474983744 + -4702111234474983746 cannot be represented in type 'long' > #0 0x7f84ef0e36ba in svx::frame::lclRecalcCoordVec(std::__debug::vector<long, std::allocator<long> >&, std::__debug::vector<long, std::allocator<long> > const&) svx/source/dialog/framelinkarray.cxx:82:29 > #1 0x7f84ef0e780e in svx::frame::ArrayImpl::GetColPosition(unsigned long) const svx/source/dialog/framelinkarray.cxx:265:9 > #2 0x7f84ef0f95ae in svx::frame::Array::GetColPosition(unsigned long) const svx/source/dialog/framelinkarray.cxx:762:20 > #3 0x7f84ef0f9e56 in svx::frame::Array::GetWidth() const svx/source/dialog/framelinkarray.cxx:787:12 > #4 0x7f852e9df8fd in ScAutoFmtPreview::CalcCellArray(bool) sc/source/ui/miscdlgs/autofmt.cxx:429:32 > #5 0x7f852e9c7740 in ScAutoFmtPreview::Init() sc/source/ui/miscdlgs/autofmt.cxx:407:5 > #6 0x7f852e9c9102 in ScAutoFmtPreview::ScAutoFmtPreview(vcl::Window*) sc/source/ui/miscdlgs/autofmt.cxx:73:5 where -4702111234474983746 = 0xbebebebebebebebe is ASan's uninitialized value stored into ScAutoFmtPreview::mnLableColWidth et al. Those (overflowing, even) computations on uninitialized values appear to be harmless in practice, though, presumably because they are overwritten with "real" values soon after. Change-Id: I487fc4681afe79c4e8532595226cba4c9c0c9b2d
2016-11-17loplugin:unusedfieldsNoel Grandin1-4/+1
Change-Id: Id2dbbf384637223db3d334d95332251832918003 Reviewed-on: https://gerrit.libreoffice.org/30927 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-17chmod -xTor Lillqvist15-0/+0
Change-Id: Ie07ef2f9e9f6d0b31b513afa913b79d9c641e4f1
2016-11-17tdf#103965: set DisableFlags for SID_PARASPACE_INCREASE/DECREASEMike Kaganski3-0/+6
Change-Id: Ic60b987d16e3ef97413a38ec5a1ddd6d1d7f93f8 Reviewed-on: https://gerrit.libreoffice.org/30916 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2016-11-16sw: remove redundant initializer for members in rtfexportMiklos Vajna1-9/+4
Change-Id: I004ebe3bd214a7c35a286f10bb13aef6900f0f87 Reviewed-on: https://gerrit.libreoffice.org/30896 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-11-16make the element names in dumpAsXml match the class namesNoel Grandin26-54/+54
Change-Id: I955facfe3e901fcb76798dab342f96a67d5ac63f Reviewed-on: https://gerrit.libreoffice.org/30894 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-16new loplugin finalprotectedNoel Grandin3-8/+3
look for final classes, and make sure they don't have protected members Change-Id: I1fa810659bba02b61a5160dbfd8e24185ec9abf4 Reviewed-on: https://gerrit.libreoffice.org/30895 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-15Fix typosSamuel Mehrbrodt1-1/+1
Change-Id: I3e38b1d445c368c28e807202b94c603bd2b2c672 Reviewed-on: https://gerrit.libreoffice.org/30872 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-11-15loplugin:constantparamNoel Grandin32-152/+95
Change-Id: Iced8ff99d52d55e6b6c3126affafbea6786e94f0 Reviewed-on: https://gerrit.libreoffice.org/30858 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-15tdf#82824 DOCX import: fix at-char embedded object handlingMiklos Vajna2-0/+5
The anchor type of embedded object was simply not handled, we always assumed that it's as-char. When it's at-char set the anchor type accordingly, and also set the usual 6 properties determining the position of the anchored object. Change-Id: I3f8bede33c6f1a0bdc4f4d4ea59c4fc805802291 Reviewed-on: https://gerrit.libreoffice.org/30860 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-11-14Don't AlignToPixel in SwView::SetVisAreaStephan Bergmann1-5/+2
When e.g. inserting a Writer doc in a Calc doc ("Insert - Object - OLE Object... - Create new - LibreOffice 5.3 Text" in Calc), the resulting .ods contains the size of the embedded Writer doc in two places. First as <draw:frame svg:width=... svg:height=... ...> in content.xml, where the size is apparently the original rectangle's size, before it got aligned in SetVisArea. And a second time as <config:config-item config:name="ViewAreaWidth" config:type="long">...</config:config-item> <config:config-item config:name="ViewAreaHeight" config:type="long">...</config:config-item> in Object 1/settings.xml, where the size is apparently the aligned size. When the document is loaded again, at first the first size is used to display the inner Writer doc. But when the inner Writer doc is double-clicked (to make it editable), now the second size is used, and because they don't match, the whole document is erroneously considered modified (ScTabViewShell::ActivateObject -> SfxInPlaceClient::SetObjArea -> SfxInPlaceClient::Invalidate -> ScClient::ViewChanged -> ScDocShell::SetDrawModified -> ScDocShell::SetModified -> SfxObjectShell::SetModified), causing e.g. the "Save" icon to become "active". It is unclear to me whether these calls to AlignToPixel still serve any real purpose; lets see whether removing them causes any issues... Change-Id: I755dd9e8b2406f0b4b41d0f3d1281d6ad4b1b238
2016-11-14This RES_FRM_SIZE item is apparently SwFormatFrameSize, not SvxSizeItemStephan Bergmann1-2/+3
...as reported by -fsanitize=vptr when doing "Format - Page..." in Writer (though both types have a Size member at the same location, so didn't cause any real problems): > sw/source/ui/misc/pgfnote.cxx:283:32: runtime error: downcast of address 0x604000e23f50 which does not point to an object of type 'const SvxSizeItem' > 0x604000e23f50: note: object is of type 'SwFormatFrameSize' > 94 01 00 3d 90 ae ee 90 ff 7e 00 00 06 00 00 00 58 00 00 be d0 2f 00 00 00 00 00 00 e0 3d 00 00 > ^~~~~~~~~~~~~~~~~~~~~~~ > vptr for 'SwFormatFrameSize' > #0 0x7efd1c8d01e2 in SwFootNotePage::ActivatePage(SfxItemSet const&) sw/source/ui/misc/pgfnote.cxx:283:32 > #1 0x7efd1c8cbf07 in SwFootNotePage::Reset(SfxItemSet const*) sw/source/ui/misc/pgfnote.cxx:230:5 > #2 0x7f002e149560 in SfxTabDialog::ActivatePageHdl(TabControl*) sfx2/source/dialog/tabdlg.cxx:1117:19 > #3 0x7f002e1400e3 in SfxTabDialog::LinkStubActivatePageHdl(void*, TabControl*) sfx2/source/dialog/tabdlg.cxx:1035:1 > #4 0x7f0008248f37 in Link<TabControl*, void>::Call(TabControl*) const include/tools/link.hxx:84:45 > #5 0x7f0008204caa in TabControl::ActivatePage() vcl/source/control/tabctrl.cxx:1601:19 Change-Id: I73df2438565a7069153b22140197897df810b2aa
2016-11-14loplugin:unusedmethodsNoel Grandin2-13/+0
Checked a couple of them: StandardCheckVisisbilityRedirector is unused since commit b1f8cf37828d5f37527e54774aa4935610aa6325 Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Wed Nov 2 10:57:21 2016 +0200 loplugin:singlevalfields SfxQueryStatus is unused since commit 64a708cba9b954afe3331f63c58218eb53b3d0ce Author: Caolán McNamara <caolanm@redhat.com> Date: Sat Nov 5 20:28:27 2016 +0000 Revert "Reverts a commit series that cripple windows ci." Change-Id: If1c9fe26c3ebc573d8c53c8f060b05c27f2711e5 Reviewed-on: https://gerrit.libreoffice.org/30840 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-14warning C4701: potentially uninitialized local variableNoel Grandin1-5/+4
Change-Id: Ic3377b51faa2a83cd78bce43a56f323dc3a70085
2016-11-14sw: prefix members of CellSaveStructMiklos Vajna1-107/+107
Change-Id: I94cd8c0d8f58ec2cfe00c9468e38f7129cd490f1
2016-11-14coverity#703927 Unchecked return valueCaolán McNamara5-45/+38
make these less odd and simply return the thing they selected, rather than a bool that indicates that the rpObj arg was successfully set to non-null, so there's one flag to check not two which both mean the same thing. Change-Id: If70e412f98dea8b7114fb77f26a9c59aab93be50 Reviewed-on: https://gerrit.libreoffice.org/30794 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-11-13drop extra semicolonsDavid Tardon1-2/+2
Change-Id: Ie6713d1bdf0010e5bc0bb70ca995c4dd36408673