summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)Author
2016-11-04unify color selectorsCaolán McNamara
Note: this removes the use of auto-color from writer's asian text grid, because its always invisible as far as I can see in practice. Change-Id: Ie850790d740a4d56c43015e493e093678cef3b4e
2016-11-04tdf#41542 globally allow padding without borders: layoutJustin Luth
Styles with borders do not have a requirement for visible borders in order to apply padding in the ODF specs. This was only an implementation design, so remove that layout restriction. So, padding will be allowed now for any border (not just textframes/cells) and it will be allowed for any format (not only those marked with the compatibility setting AllowPaddingWithoutBorders - which is now redefined to indicate whether the UI allows creating borderless padding). The global UI implementation to allow creating these types of documents will come in 5.4. Allow the layout already in 5.3 to enhance compatibility between supported versions. Change-Id: I75bab7cbfff23bf70406123f8531e2fea352ddda Reviewed-on: https://gerrit.libreoffice.org/30434 Reviewed-by: Justin Luth <justin_luth@sil.org> Tested-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-11-04sw: remove documentation for removed HasOtherCnt_impl()Miklos Vajna
Change-Id: Ib3a5c7116b1a877cfa33ca248b5a9b857f0a2999
2016-11-03there is a function for that: CalcLineSpace(xx, bEvenIfNoLine)Justin Luth
Change-Id: Ideeb031f20611bd9d2a01343bc75e1d0510ad6e9 Reviewed-on: https://gerrit.libreoffice.org/30513 Reviewed-by: Justin Luth <justin_luth@sil.org> Tested-by: Justin Luth <justin_luth@sil.org>
2016-11-03svx: add missing ~CONVERT_TWIPS mask in SvxPageItem::PutValue()Miklos Vajna
With this, it's possible to use AttributePage.* keys in macros. Change-Id: I3f0b1ea8fb6274e7c18511c2e80774205206a2ba
2016-11-03tdf#102308 sw redline tooltip: show secondsMiklos Vajna
Commit d9dca1eef91faa710112ffd20a2b2d36b48a9287 (tdf#102308 sw: improve redline timestamp precision) improved the manage changes dialog to show seconds of the redline timestamps, do the same with tooltips, when the mouse is hovered over a redline portion. Change-Id: I6ec42db49cb93d8bce0cdee02e37d871f8e7e2ce Reviewed-on: https://gerrit.libreoffice.org/30515 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-11-03remove pParentFrame from SfxFrameNoel Grandin
Found by the singlevalfields loplugin. Dead as least as far back as commit 93a7b558588be1f12e137329548b706daccc07df Author: Frank Schoenheit [fs] <frank.schoenheit@sun.com> Date: Fri Nov 27 21:16:24 2009 +0100 [CWS autorecovery] merged SfxTopFrame into SfxFrame SfxTopFrame was the only class deriving from the abstract class SfxFrame, so both can effectively be treated as one class. Arguably when that commit was done, SfxFrame should also have been renamed to SfxTopFrame, since that it was it now seems to be. Expanding the nullptr value off that field means that: SfxFrame::GetTopFrame always return this SfxFrame::IsParent always returns false SfxViewFrame::GetTopFrame is now the same as SfxViewFrame::GetFrame SfxViewFrame::GetParentViewFrame now returns null Change-Id: Iac088fa485c3d7299d1553845ced2f5ced3c85f2 Reviewed-on: https://gerrit.libreoffice.org/30485 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-02loplugin:singlevalfieldsNoel Grandin
Change-Id: I65f96d9cd24572c8d0946acf4d2d45eb3db83a76 Reviewed-on: https://gerrit.libreoffice.org/30476 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-02sw: prefix members of WW8TabDescMiklos Vajna
Change-Id: I8c6e52d40f497fb7cee3ef812e2974aa292a11a8
2016-11-02tdf#41542 PaddingWithoutBorders: allow UI changes if...Justin Luth
If the compatibility option is set, allow the border dialog for frames to be able to adjust the spacing values without enabling the border lines. That means it is only true for .doc and .docx right now. Change-Id: I4004a849f7369c993089d1c7b5d856cbea4f7780 Reviewed-on: https://gerrit.libreoffice.org/28602 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-11-02tdf#91222 VclBuilder constructor cleanupmelikeyurtoglu
Change-Id: I9a82ebc57c7e246841fda0262763fa9a7fbd5970 Signed-off-by: melikeyurtoglu <aysemelikeyurtoglu@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/29919 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-01style fixes for cppcheck noExplicitConstructorJochen Nitschke
Change-Id: I2a690caea7656f2a18beb6d09f53154178a30f34 Reviewed-on: https://gerrit.libreoffice.org/30460 Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2016-11-01Resolves: tdf#103556 the implicit convert to bare pointer hurts us hereCaolán McNamara
Change-Id: I2d91cf9b11027f76dbcbb5432f4cad71c56f53f2
2016-11-01Omit the default comparatorTakeshi Abe
Change-Id: Idea8ea8dab6a86d7be6394aef1cf7f25b75009e0 Reviewed-on: https://gerrit.libreoffice.org/30319 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-10-31loplugin:oncevar in swNoel Grandin
Change-Id: I81cd59b2a24bca533a27cc4138f1ac3acff65090 Reviewed-on: https://gerrit.libreoffice.org/30437 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-31SvxBrushItem::GetGraphicLink no longer returns a pointerStephan Bergmann
...since cfb4463d2afd36ca6d0fbb9e374bf5387fee84df "convert include/editeng/brushitem.hxx from String to OUString", which boldly changed it from returning a pointer to returning a reference, probably not even taking into account that that broke the value set (from string+null to just string). However, that change appears to have worked OK in practice, and there maybe wasn't a need after all to distinguish a null value from an empty string. These two places here were missed in the change, and happened to keep working, as they picked the operator ==(sal_Unicode const *, OUString const &) overload, that happens to treat a null first argument like an empty string. Change-Id: If2d76951fa4bf6c7821321327ad653bd0a95a788
2016-10-31MS formats allow padding without borders, regardless of display.Justin Luth
AllowPaddingWithoutBorders is about display / UI settings. Whether LO displays them or not, the border distance should be saved for proper round-tripping, so no need to test for compat setting (and which is always true anyway in this code segment). related to tdf#41542 and commit 52b29c60801cf75364fd8275a22e812797cb184d Change-Id: I3822d9ea50376b50b89dff37b7394286cab76fff Reviewed-on: https://gerrit.libreoffice.org/30426 Reviewed-by: Justin Luth <justin_luth@sil.org> Tested-by: Justin Luth <justin_luth@sil.org>
2016-10-31sw: bookmark names don't need cryptographic randomnessMichael Stahl
Change-Id: I6cecbf9b5a8b66de2e0e2d90fdecf6b389caad25
2016-10-31sw: RSID have no need for cryptographic randomnessMichael Stahl
Change-Id: I4a3c4e390a6d05059e27ca33f02c38cfb6bb2e47
2016-10-31sw: DocumentListsManager: no need for cryptographic randomness hereMichael Stahl
... or in SwDoc::GetUniqueNumRuleName() Change-Id: Ifd6df902f7feae9db77f38654d7eb246dfb3510a
2016-10-31fix logic error - still set zero padding if no border setJustin Luth
caused by commit 52b29c60801cf75364fd8275a22e812797cb184d originally, if there were no visible lines (bFirstLine), then any line distance was reset to zero, but with AllowPaddingWithoutBorders that should not be done. However, the case were there is no boxItem at all was missed - padding should still be initialized to zero in that case. Change-Id: I0a95ee1de6781089196a1ba40d2c0365d15926e2 Reviewed-on: https://gerrit.libreoffice.org/30412 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
2016-10-31Omit comparator which is the same as default std::less<key_type>Takeshi Abe
Change-Id: I72a0b618577caececaaf3eb4df53d4cb192251da Reviewed-on: https://gerrit.libreoffice.org/30369 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-10-30Let Menu dispose submenusMaxim Monastirsky
(I'm not sure about how good are the changes from ScopedVclPtr to non-scoped, and disposeAndClear to clear. They aren't really needed, because of the VclReferenceBase::mbDisposed logic. But at least they should be safe, as long as we have disposeOnce calls in Menu's dtor.) See also previous commits: 4433d95b374c13a3501cdf3a6e273f68eb49873a ("MenuItemData now properly disposes the submenu") 89c23b4aaef931b5d6009efaf44ce6e6c976e8d4 ("Sub menus no longer need manual disposing") Change-Id: I9d455a94590f5eec9b097947f6984f1b3e477b52
2016-10-29convert usages of DPIScalingFactor from int to floatTomaž Vajngerl
Change-Id: I049b3d2cde4dcb8c8c0690d75a015a43cb71b0c0 Reviewed-on: https://gerrit.libreoffice.org/30381 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2016-10-29surpress automatic scaling / conversion for document shadowTomaž Vajngerl
Change-Id: Ib020161db8d5e241e923dcd629a9a4e4bb4c23da Reviewed-on: https://gerrit.libreoffice.org/30342 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2016-10-29HiDPI: remove unneeded image scaling when HiDPI is enabledTomaž Vajngerl
We don't need to scale images for HiDPI mode anymore - this is now done automatically when the image is loaded. Change-Id: Ie285cf4d672f4c098a468d3f7560ee2700365b92 Reviewed-on: https://gerrit.libreoffice.org/30340 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2016-10-29tdf#103753: DOCX: Handle relative positions to left or right marginTamás Zolnai
Positioning relative to left or right margin in MS Word works the same as the positioning relative to left or right page border in LO Writer. Change-Id: I476a5e9e76f766b7fb7f1c7f4a068af8bb3c8813 Reviewed-on: https://gerrit.libreoffice.org/30376 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2016-10-29tdf#33278: Enable UI for vertical left-to-rightKhaled Hosny
Used mainly for traditional Mongolian. This has been disable since 2010 (shortly after the code was merged): commit faf68cc7565cb2662d4ed5b5902ec52975d99865 Author: Mathias Bauer <mba@openoffice.org> Date: Fri Jun 25 11:10:43 2010 +0200 CWS mongolianlayout: disable new direction until problems are fixed No idea what the problems are, but lets enable it and see what happens (the actual layout code have been enabled all the time and one can always manually craft ODT files that use it anyway). Change-Id: Id38d1735013d451f9fe116876483df3484dec051 Reviewed-on: https://gerrit.libreoffice.org/30364 Reviewed-by: Khaled Hosny <khaledhosny@eglug.org> Tested-by: Khaled Hosny <khaledhosny@eglug.org>
2016-10-29tdf#41542 rename variable to match LO5.4 terminologyJustin Luth
Changing /Allow_*Spacing_*Without_*Borders/I to AllowPaddingWithoutBorders related to tdf#103275 where "spacing to contents" is to be changed to Padding. Rename this already in LO53 to simplify potential backports and laying other groundwork for fixing this bug. Also, I can easily see setting AllowPaddingWithoutBorders globally in 5.3 for the purpose of being able to share documents when the UI in LO5.4 permits creation of padding without borders. Otherwise older versions will display significantly different formatting. Change-Id: I253173274f824a019ebc09a039c471d170c1be73 Reviewed-on: https://gerrit.libreoffice.org/30372 Reviewed-by: Justin Luth <justin_luth@sil.org> Tested-by: Justin Luth <justin_luth@sil.org>
2016-10-28tdf#103544: DOCX exp.: Image loss when have a frame anchored to the same para.Tamás Zolnai
Regression from: 83d51e5e52688c4c9bc0ad70a511458bb06a242d Partly revert the commit causes this regression. I checked the related bugs (tdf#78590,tdf#80748) intended to be fixed by this commit and reverting this part does not bring back the corruption. I guess something changed in frames' and text boxes' import in the meantime, because this MergeMarks::IGNORE is useless now. Change-Id: If17776e8628561961c7ce2a2994e3fc609f75639 Reviewed-on: https://gerrit.libreoffice.org/30351 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2016-10-28update unnecessaryoverride plugin to find pure forwarding methodsNoel Grandin
which can be replaced with using declarations. Is there a more efficient way to code the search? Seems to slow the build down a little. Change-Id: I08cda21fa70dce6572e1acc71bf5e6df36bb951f Reviewed-on: https://gerrit.libreoffice.org/30157 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-28fix leakCaolán McNamara
Change-Id: I5bc8efa8a9de6d7a2be99f6c816e3dfca4f2b390
2016-10-28ScopedVclPtr vs std::unique_ptr for VclAbstractDialog derivativesCaolán McNamara
Change-Id: I5e43312b6f42ce0c63946f366eaf1e6dcb9629b2 Reviewed-on: https://gerrit.libreoffice.org/30344 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-10-28convert std::unique_ptr<VclAbstractDialog> to VclPtrNoel Grandin
Change-Id: Ifdd2a0599efd701def02b4a4d2a1c489cb1b27fa
2016-10-28Don't crash under genMaxim Monastirsky
In gtk there is apparently GtkSalMenu which increases the refcount. Change-Id: I5c52c7b40d0a854e0007362a32a55f0ffed668c1
2016-10-28Reduce scopeMaxim Monastirsky
Change-Id: I06695b310d016751ec80f1aacbba8567a70088a5
2016-10-27Sub menus no longer need manual disposingMaxim Monastirsky
after: commit ee79a2dd7ea60e902cab3a9203e307b8a78fee23 Author: Caolán McNamara <caolanm@redhat.com> Date: Fri Jul 29 14:33:22 2016 +0100 Resolves: tdf#101169 crash using column menu in base Change-Id: I7c6e54dd5574c61cffd5884d1cf1b63075073001 Reviewed-on: https://gerrit.libreoffice.org/30343 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2016-10-27Fix insert special character crashMaxim Monastirsky
Change-Id: Id75567f5f6689d15d62f88ed0907c296434b8f0a
2016-10-27in msword the hard-break between image and caption has a widthCaolán McNamara
while for us it doesn't, make it invisible to give it zero width in both implementations to head off interoperability misery Change-Id: I0944006817944b20ef35502c8588357e7ee54810
2016-10-27fix writer insert caption crashCaolán McNamara
since... commit eca5ea9f79181d45cd7fbabe2313617d3025818a Date: Wed Sep 21 14:48:15 2016 +0200 Change-Id: I69b50df0ec19369fcd96d7d184c6d5f586a50b25
2016-10-27loplugin:literaltoboolconversionStephan Bergmann
Change-Id: I886f4fcb3de5a931f94b2f45f5f0cdb841af26d1
2016-10-27I'm testing inserting a rtf, but really want to test simple loadingCaolán McNamara
Change-Id: I13c6e8394de9b7214f3e4d448a7b18cbf3b637e9
2016-10-27loplugin:expandablemethods in swNoel Grandin
Change-Id: Ibc9edc28f4041235ab30c026bd3774bd74b7e960 Reviewed-on: https://gerrit.libreoffice.org/30287 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-27make the AbstractDialog stuff extend from VclReferenceBaseNoel Grandin
Because some stuff wants to multiple-inherit from VclAbstractDialog and OutputDevice-subclasses, and we'd prefer to keep all the lifetime management through a single smart pointer class (VclPtr) The change in msgbox.cxx and window.cxx is to workaround a bug in VS2013 to do with virtual inheritance and delegating constructors. Change-Id: I178e8983b7d20a7d2790aa283be838dca5d14773 Reviewed-on: https://gerrit.libreoffice.org/29140 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-26normalize existing emacs/vim mode-lines in python filesMichael Stahl
Bunch of these were setting C++ or Make modes and icky tabs... Also, reportedly Emacs can figure out to enable python-mode automatically. Change-Id: I50072488fb92cb4d27aa3f74f717a28ae3967543
2016-10-26assemble SfxStyleFamilies from more generic resource componentsCaolán McNamara
Change-Id: I25aa0d8bca1f16f5fc27d3b299709479a1635ea3
2016-10-25tdf#101814 sw: MSWord export: don't override first-page with heuristicsMichael Stahl
Revert commit dcea8ba3b4fc347e7b6d9e0d5ec2fd99bd77ce6f, and do the opposite. The added "titlePage" check makes no sense, because in that case there is already an explicit first-page style in the PageDesc, and overriding that cannot be right. The test added in that commit still succeeds, which suggests that the root cause of that bug was elsewhere and was fixed in the meantime. Change-Id: I9b21b6dc115be28cb0ee3360615c538d4cfee3cb
2016-10-25tdf#84678 DOCX import: fix handling of textbox marginsMiklos Vajna
Regression from commit d379d18666aa42031359ca8eb34b0021960347ae (oox: import WPS shape with text as shape with textbox, 2014-06-18), the problem for a long time was that in Writer text frames without borders couldn't have text margins, either. Recently a compat setting was added in the WW8 filter for this situation, so use that in the DOCX import as well, and improve SwTextBoxHelper to handle the margin properties. Change-Id: I472bbc414f21f2ec7334482c460a5c3be3e95e94 Reviewed-on: https://gerrit.libreoffice.org/30255 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-10-25tdf#44282 fix missing space for numbered lists in TOCAbhilash
Change-Id: I885ec27b46f2c0966e8ed38e5ca8eb03822190c7 Reviewed-on: https://gerrit.libreoffice.org/29913 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-10-25tdf#103389: Resaving a DOCX document with two canvases leads to a broken file.Tamás Zolnai
Make custom shape export more robust. In case of the test document, WriteCustomGeometry is called, but this call does not export anything, and so we get a shape without any geometry in the DOCX file, which causes problem to MS Word. Change-Id: Ie7a4e2b8a18bfddaeeb81425ae5f1de04140d43f Reviewed-on: https://gerrit.libreoffice.org/30241 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>