[Libreoffice-commits] core.git: external/libepubgen filter/source include/svtools include/vcl svtools/source sw/source vcl/source writerperfect/qa writerperfect/source
external/libepubgen/libepubgen-epub3.patch.1| 158 filter/source/graphic/GraphicExportFilter.cxx |2 include/svtools/DocumentToGraphicRenderer.hxx | 10 include/vcl/pdfextoutdevdata.hxx|2 svtools/source/filter/DocumentToGraphicRenderer.cxx | 26 + svtools/source/filter/exportdialog.cxx |2 sw/source/uibase/uno/unotxdoc.cxx |5 vcl/source/gdi/pdfextoutdevdata.cxx |4 writerperfect/qa/unit/EPUBExportTest.cxx|7 writerperfect/qa/unit/data/writer/epubexport/fxl-2page.fodt |7 writerperfect/source/writer/EPUBExportFilter.cxx| 12 writerperfect/source/writer/EPUBExportFilter.hxx|4 writerperfect/source/writer/exp/xmlimp.cxx | 32 +- writerperfect/source/writer/exp/xmlimp.hxx | 17 - 14 files changed, 261 insertions(+), 27 deletions(-) New commits: commit a54787669b9283efdfdd18b0cbafc3184cdde58f Author: Miklos Vajna Date: Mon Jan 22 15:18:45 2018 +0100 EPUB export, fixed layout: add chapter names to the navigation document Extend vcl::PDFExtOutDevData so that it's possible to use it outside the PDF export; this way the EPUB export can know which chapters start on which page. This means fixed and reflowable layout has the same table of contents, instead of just Page in the fixed layout case. Change-Id: I935fb23c66ec747431b91e83b0e677d4e5f704b9 Reviewed-on: https://gerrit.libreoffice.org/48332 Reviewed-by: Miklos Vajna Tested-by: Jenkins diff --git a/external/libepubgen/libepubgen-epub3.patch.1 b/external/libepubgen/libepubgen-epub3.patch.1 index 4b7fe5215f05..bcec187b5218 100644 --- a/external/libepubgen/libepubgen-epub3.patch.1 +++ b/external/libepubgen/libepubgen-epub3.patch.1 @@ -197,3 +197,161 @@ index bdf3bf0..cb4efee 100644 -- 2.13.6 +From c081609849b18113340c39a73b6af432a103a102 Mon Sep 17 00:00:00 2001 +From: Miklos Vajna +Date: Mon, 22 Jan 2018 14:39:19 +0100 +Subject: [PATCH] fixed layout: allow defining chapter names + +Fixed layout normally just works with SVG images (one image / page), but +readable navigation document is still expected, e.g. PDF provides it. So +add a way to mention what chapters start on a given page. +--- + src/lib/EPUBHTMLManager.cpp| 25 + + src/lib/EPUBHTMLManager.h | 3 +++ + src/lib/EPUBPath.cpp | 11 +++ + src/lib/EPUBPath.h | 4 + src/lib/EPUBTextGenerator.cpp | 15 +++ + src/test/EPUBTextGeneratorTest.cpp | 37 + + 6 files changed, 95 insertions(+) + +diff --git a/src/lib/EPUBHTMLManager.cpp b/src/lib/EPUBHTMLManager.cpp +index 5e96d1d..d35bc3f 100644 +--- a/src/lib/EPUBHTMLManager.cpp b/src/lib/EPUBHTMLManager.cpp +@@ -93,6 +93,23 @@ void EPUBHTMLManager::writeTocTo(EPUBXMLSink &sink, const EPUBPath &tocPath, int + { + for (std::vector::size_type i = 0; m_paths.size() != i; ++i) + { ++ const std::vector &chapters = m_paths[i].getChapters(); ++ if (!chapters.empty()) ++ { ++for (const auto &chapter : chapters) ++{ ++ sink.openElement("li"); ++ librevenge::RVNGPropertyList anchorAttrs; ++ anchorAttrs.insert("href", m_paths[i].relativeTo(tocPath).str().c_str()); ++ sink.openElement("a", anchorAttrs); ++ std::ostringstream label; ++ sink.insertCharacters(chapter.c_str()); ++ sink.closeElement("a"); ++ sink.closeElement("li"); ++} ++continue; ++ } ++ + sink.openElement("li"); + librevenge::RVNGPropertyList anchorAttrs; + anchorAttrs.insert("href", m_paths[i].relativeTo(tocPath).str().c_str()); +@@ -140,6 +157,14 @@ void EPUBHTMLManager::insertHeadingText(const std::string &text) + m_paths.back().appendTitle(text); + } + ++void EPUBHTMLManager::addChapterName(const std::string &text) ++{ ++ if (m_paths.empty()) ++return; ++ ++ m_paths.back().addChapter(text); ++} ++ + bool EPUBHTMLManager::hasHeadingText() const + { + if (m_paths.empty()) +diff --git a/src/lib/EPUBHTMLManager.h b/src/lib/EPUBHTMLManager.h +index 157896b..d48ddf2 100644 +--- a/src/lib/EPUBHTMLManager.h b/src/lib/EPUBHTMLManager.h +@@ -51,6 +51,9 @@ public: + /// Appends text to the title of the current heading. + void insertHeadingText(const std::string &text); + ++ /// Registers a chapter name for the current page (fixed layout case). ++ void addChapterName(const std::string &text); ++ + /// If the current heading has a title. + bool hasHeadingText() const; + +diff --git a/src/lib/EPUBPath.cpp b/src/lib/EPUBPath.cpp +index e1c05ed..be24de5 100644 +--- a/src/lib/EPUBPath.cpp b/src/lib/EPUBPath.cpp +@@ -54,6 +54,7 @@ EPUBPath::Relat
[Libreoffice-commits] core.git: external/libepubgen writerperfect/Module_writerperfect.mk
external/libepubgen/libepubgen-epub3.patch.1 | 68 +++ writerperfect/Module_writerperfect.mk|2 2 files changed, 69 insertions(+), 1 deletion(-) New commits: commit 90ae1e1bbbce7be9b2ff7add75923b1891e65df6 Author: Miklos Vajna Date: Mon Jan 22 16:00:10 2018 +0100 EPUB export, fxl: silence Page toc entries when have chapter names The EPUB ToC is now on par with the PDF ToC. Change-Id: Iea714fdb68c825aa14345037e909c354bbd7cf00 Reviewed-on: https://gerrit.libreoffice.org/48346 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/external/libepubgen/libepubgen-epub3.patch.1 b/external/libepubgen/libepubgen-epub3.patch.1 index bcec187b5218..f102eaefe7a6 100644 --- a/external/libepubgen/libepubgen-epub3.patch.1 +++ b/external/libepubgen/libepubgen-epub3.patch.1 @@ -355,3 +355,71 @@ index 8e88adb..38ddcdf 100644 -- 2.13.6 +From b6081f659e3000d9f3d5851278d8abdd33448353 Mon Sep 17 00:00:00 2001 +From: Miklos Vajna +Date: Mon, 22 Jan 2018 15:54:43 +0100 +Subject: [PATCH] fixed layout: avoid Page entries when chapter names are + provided + +--- + src/lib/EPUBHTMLManager.cpp| 31 ++- + src/test/EPUBTextGeneratorTest.cpp | 16 + 2 files changed, 34 insertions(+), 13 deletions(-) + +diff --git a/src/lib/EPUBHTMLManager.cpp b/src/lib/EPUBHTMLManager.cpp +index d35bc3f..35d82e8 100644 +--- a/src/lib/EPUBHTMLManager.cpp b/src/lib/EPUBHTMLManager.cpp +@@ -7,6 +7,7 @@ + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + ++#include + #include + #include + #include +@@ -91,24 +92,28 @@ void EPUBHTMLManager::writeTocTo(EPUBXMLSink &sink, const EPUBPath &tocPath, int + { + if (version >= 30) + { ++bool hasChapterNames = std::find_if(m_paths.begin(), m_paths.end(), [](const EPUBPath &path) ++{ ++ return !path.getChapters().empty(); ++}) != m_paths.end(); + for (std::vector::size_type i = 0; m_paths.size() != i; ++i) + { + const std::vector &chapters = m_paths[i].getChapters(); +- if (!chapters.empty()) ++ for (const auto &chapter : chapters) + { +-for (const auto &chapter : chapters) +-{ +- sink.openElement("li"); +- librevenge::RVNGPropertyList anchorAttrs; +- anchorAttrs.insert("href", m_paths[i].relativeTo(tocPath).str().c_str()); +- sink.openElement("a", anchorAttrs); +- std::ostringstream label; +- sink.insertCharacters(chapter.c_str()); +- sink.closeElement("a"); +- sink.closeElement("li"); +-} +-continue; ++sink.openElement("li"); ++librevenge::RVNGPropertyList anchorAttrs; ++anchorAttrs.insert("href", m_paths[i].relativeTo(tocPath).str().c_str()); ++sink.openElement("a", anchorAttrs); ++std::ostringstream label; ++sink.insertCharacters(chapter.c_str()); ++sink.closeElement("a"); ++sink.closeElement("li"); + } ++ if (hasChapterNames) ++// Chapter names are provided for this document, so never write Page ++// entries. ++continue; + + sink.openElement("li"); + librevenge::RVNGPropertyList anchorAttrs; +-- +2.13.6 + diff --git a/writerperfect/Module_writerperfect.mk b/writerperfect/Module_writerperfect.mk index 6fa274bc8ce5..01f8a0dc5e59 100644 --- a/writerperfect/Module_writerperfect.mk +++ b/writerperfect/Module_writerperfect.mk @@ -40,7 +40,7 @@ $(eval $(call gb_Module_add_check_targets,writerperfect,\ $(eval $(call gb_Module_add_slowcheck_targets,writerperfect,\ CppunitTest_writerperfect_calc \ CppunitTest_writerperfect_draw \ - CppunitTest_writerperfect_epubexport \ + $(if $(SYSTEM_EPUBGEN),,CppunitTest_writerperfect_epubexport) \ CppunitTest_writerperfect_import \ CppunitTest_writerperfect_impress \ CppunitTest_writerperfect_writer \ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/source xmlsecurity/qa
vcl/source/filter/ipdf/pdfdocument.cxx|9 + xmlsecurity/qa/unit/pdfsigning/data/tdf114460.pdf |binary xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx |2 ++ 3 files changed, 11 insertions(+) New commits: commit f58a16d5987c8e8c16580c514ce0c7b0895b4105 Author: Miklos Vajna Date: Mon Jan 22 22:12:04 2018 +0100 tdf#114460 vcl: handle nested parentheses in PDF roundtrip The roundtrip of the pdf image failed due to this. Change-Id: I88a9657e242dd2659f9bf06233e5fcbfeb43ceb5 Reviewed-on: https://gerrit.libreoffice.org/48362 Reviewed-by: Miklos Vajna Tested-by: Jenkins diff --git a/vcl/source/filter/ipdf/pdfdocument.cxx b/vcl/source/filter/ipdf/pdfdocument.cxx index 6921683d5054..af1eea1f57cf 100644 --- a/vcl/source/filter/ipdf/pdfdocument.cxx +++ b/vcl/source/filter/ipdf/pdfdocument.cxx @@ -2015,11 +2015,20 @@ bool PDFLiteralStringElement::Read(SvStream& rStream) nPrevCh = ch; rStream.ReadChar(ch); +// Start with 1 nesting level as we read a '(' above already. +int nDepth = 1; OStringBuffer aBuf; while (!rStream.eof()) { +if (ch == '(' && nPrevCh != '\\') +++nDepth; + if (ch == ')' && nPrevCh != '\\') +--nDepth; + +if (nDepth == 0) { +// ')' of the outermost '(' is reached. m_aValue = aBuf.makeStringAndClear(); SAL_INFO("vcl.filter", "PDFLiteralStringElement::Read: m_aValue is '" << m_aValue << "'"); return true; diff --git a/xmlsecurity/qa/unit/pdfsigning/data/tdf114460.pdf b/xmlsecurity/qa/unit/pdfsigning/data/tdf114460.pdf new file mode 100644 index ..a736e5bb90cd Binary files /dev/null and b/xmlsecurity/qa/unit/pdfsigning/data/tdf114460.pdf differ diff --git a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx index b36d926a4a34..cb7fd4cfe945 100644 --- a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx +++ b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx @@ -450,6 +450,8 @@ void PDFSigningTest::testTokenize() // File that's intentionally smaller than 1024 bytes. "small.pdf", "tdf107149.pdf", +// Nested parentheses were not handled. +"tdf114460.pdf", }; for (const auto& rName : aNames) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
Re: spam in our bugzilla
Hi Lionel, El 22/01/18 a les 11:19, Lionel Elie Mamane ha escrit: > Where are we supposed to report spam in our bugzilla? Please send me an email or ping me in IRC and I will ban the user in Bugzilla, and as for the comment, we just add the tag 'spam' to hide it. > > see > https://bugs.documentfoundation.org/show_bug.cgi?id=104905#c14 > ___ > LibreOffice mailing list > LibreOffice@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/libreoffice Regards -- Xisco Faulí Libreoffice QA Team IRC: x1sc0 ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
UITest_writerperfect_epubexport hang (only sometimes)
Hi Markus, I've added UITest_writerperfect_epubexport a while ago, and while I did not see it hanging in the recent past, both Noel and Stephan run into a hang of it from time to time. The code is here: writerperfect/qa/uitest/epubexport/epubexport.py The backtrace always looks like this: self.ui_test.execute_blocking_action() gets an UNO method where invoking it opens a dialog and the python method also gets a callback. When the hang happens, then it seems the problem is that the Python thread waits for the dialog to be closed, but in fact it's already closed, so it waits forever joining the python thread. I don't think there is anything really special in this test, rather I guess the problem happens here more frequently (than elsewhere) because normally these dialogs are invoked via UNO commands, where we just execute the UNO command, wait for the dialog to appear then work with it. (I did not look at the implementation, perhaps in this case there is no Python thread involved?) So I wonder -- do you think it would be possible or would make sense to have a way similar to self.xUITest.executeCommand (execute a blocking command async), but for UNO methods that open a dialog? I.e. also similar to self.ui_test.execute_blocking_action, but without an actual callback. Perhaps that would be a fix for these strange hangs. Backtraces: - python: https://pastebin.ca/3942603 - native one: https://pastebin.ca/3942628 (From a run that resulted in a hang for Noel.) Thanks, Miklos signature.asc Description: Digital signature ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: vcl/osx
vcl/osx/vclnsapp.mm |5 + 1 file changed, 5 insertions(+) New commits: commit ce88f2a7374bb8c53d57e8263e0701db19d62f30 Author: Telesto Date: Mon Jan 22 15:16:52 2018 +0200 tdf#114985: Tell NSWindow to never use automatic window tabbing Based on https://codereview.chromium.org/2325313002/ Change-Id: I8838449d57b1d1b010491a405c87645d38199fdf Reviewed-on: https://gerrit.libreoffice.org/48330 Tested-by: Jenkins Reviewed-by: Tor Lillqvist diff --git a/vcl/osx/vclnsapp.mm b/vcl/osx/vclnsapp.mm index f805df6959d4..26f826467677 100644 --- a/vcl/osx/vclnsapp.mm +++ b/vcl/osx/vclnsapp.mm @@ -75,6 +75,11 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH SAL_WNODEPRECATED_DECLARATIONS_POP assert( pEvent ); [NSApp postEvent: pEvent atStart: NO]; + +if( [NSWindow respondsToSelector:@selector(allowsAutomaticWindowTabbing)] ) +{ +NSWindow.allowsAutomaticWindowTabbing = NO; +} } -(void)sendEvent:(NSEvent*)pEvent ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/osx
vcl/osx/salnativewidgets.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 44af50465a02b6f5566be45913a34fdbdba90133 Author: Telesto Date: Mon Jan 22 16:49:21 2018 +0200 tdf#112153: Set button theme properly Change-Id: I0665880c0d0348fcbb3bcf04d9172405c8e31eb7 Reviewed-on: https://gerrit.libreoffice.org/48334 Tested-by: Jenkins Reviewed-by: Tor Lillqvist diff --git a/vcl/osx/salnativewidgets.cxx b/vcl/osx/salnativewidgets.cxx index d311526c0168..811960f1b92e 100644 --- a/vcl/osx/salnativewidgets.cxx +++ b/vcl/osx/salnativewidgets.cxx @@ -106,11 +106,11 @@ static ThemeButtonValue ImplGetButtonValue( ButtonValue aButtonValue ) break; case ButtonValue::Off: +case ButtonValue::DontKnow: return kThemeButtonOff; break; case ButtonValue::Mixed: -case ButtonValue::DontKnow: default: return kThemeButtonMixed; break; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - sysui/desktop
sysui/desktop/apparmor/program.oosplash |3 +++ 1 file changed, 3 insertions(+) New commits: commit c75166942832c75ca7ab540dc4636ee0b18080cd Author: Rene Engelhard Date: Thu Jan 18 23:11:38 2018 +0100 deb#887593 add #include to oosplash apparmor profile This quashes commit 616af7d9bd2e75e4bf9224ef8301c7e6b1b4d972 Author: Rene Engelhard Date: Thu Jan 18 23:11:38 2018 +0100 deb#887593 add #include to oosplash apparmor profile Change-Id: Ib9595b1e0fe888a6698c3c508a24390d3798b3e4 and parts of commit d4440ce6b5964d08be1e5841ed301112b260823d Author: Rene Engelhard Date: Thu Jan 18 23:19:46 2018 +0100 update copyright years Change-Id: I634c1132265295f90f624a53b93dddb2b18eabd5 Change-Id: If1409c4c9e0f27c95e1fb57e557153b358774da0 Reviewed-on: https://gerrit.libreoffice.org/48239 Tested-by: Jenkins Reviewed-by: Thorsten Behrens diff --git a/sysui/desktop/apparmor/program.oosplash b/sysui/desktop/apparmor/program.oosplash index fef54b7ee384..e044c1afce26 100644 --- a/sysui/desktop/apparmor/program.oosplash +++ b/sysui/desktop/apparmor/program.oosplash @@ -1,12 +1,14 @@ # -- # #Copyright (C) 2016 Canonical Ltd. +#Copyright (C) 2018 Software in the Public Interest, Inc. # #This Source Code Form is subject to the terms of the Mozilla Public #License, v. 2.0. If a copy of the MPL was not distributed with this #file, You can obtain one at http://mozilla.org/MPL/2.0/. # #Author: Bryan Quigley +#Rene Engelhard # # -- @@ -14,6 +16,7 @@ profile libreoffice-oopslash INSTDIR-program/oosplash { #include + #include /etc/libreoffice/ r, /etc/libreoffice/** r, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - sysui/desktop
sysui/desktop/apparmor/program.oosplash|1 + sysui/desktop/apparmor/program.soffice.bin |1 + 2 files changed, 2 insertions(+) New commits: commit 88704209e5e97230af626732a657a720fee516af Author: Vincas Dargis Date: Sun Jan 21 16:16:43 2018 +0200 deb#887593 apparmor: allow reading device information * Add file read rule for paths like /sys/devices/virtual/block/dm-0/queue/rotational used by isRotational() in desktop/unx/source/pagenin.c. * Add file read rule for paths like /sys/dev/char/226:128/device/uevent used by libdrm. Change-Id: Ic41365b478c817b6766e25adadd6761fa03ff055 Reviewed-on: https://gerrit.libreoffice.org/48265 Tested-by: Rene Engelhard Reviewed-by: Rene Engelhard Tested-by: Jenkins Reviewed-on: https://gerrit.libreoffice.org/48278 Reviewed-by: Thorsten Behrens diff --git a/sysui/desktop/apparmor/program.oosplash b/sysui/desktop/apparmor/program.oosplash index e044c1afce26..bcc06914d112 100644 --- a/sysui/desktop/apparmor/program.oosplash +++ b/sysui/desktop/apparmor/program.oosplash @@ -23,6 +23,7 @@ profile libreoffice-oopslash INSTDIR-program/oosplash { /etc/passwd r, /etc/nsswitch.confr, /run/nscd/passwd r, + /sys/devices/{virtual,pci[0-9]*}/**/queue/rotational r, # for isRotational() in desktop/unx/source/pagein.c /usr/lib{,32,64}/ure/bin/javaldx rmpux, /usr/share/libreoffice/program/* r, INSTDIR-program/** r, diff --git a/sysui/desktop/apparmor/program.soffice.bin b/sysui/desktop/apparmor/program.soffice.bin index 93fc7ee537e6..44cb61be97ec 100644 --- a/sysui/desktop/apparmor/program.soffice.bin +++ b/sysui/desktop/apparmor/program.soffice.bin @@ -160,6 +160,7 @@ profile libreoffice-soffice INSTDIR-program/soffice.bin { #Likely moving to abstractions in the future owner @{HOME}/.icons/*/cursors/* r, + /sys/devices/pci[0-9]*/**/{device,subsystem_device,subsystem_vendor,uevent,vendor} r, # for libdrm /usr/share/*-fonts/conf.avail/*.conf r, /usr/share/fonts-config/conf.avail/*.conf r, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/dist
loleaflet/dist/toolbar.css|5 +++-- loleaflet/dist/toolbar/toolbar.js |4 2 files changed, 7 insertions(+), 2 deletions(-) New commits: commit 30b44bf37349f9a0d42182f018f377d6d3ce9066 Author: Aditya Dewan Date: Sat Dec 16 02:15:35 2017 +0530 show/hide of document name on top right Change-Id: I83ae0256c0fdd1c9f61495638ecf9d69f5473790 Reviewed-on: https://gerrit.libreoffice.org/46576 Reviewed-by: pranavk Tested-by: pranavk diff --git a/loleaflet/dist/toolbar.css b/loleaflet/dist/toolbar.css index 31d3d209..daf08ecc 100644 --- a/loleaflet/dist/toolbar.css +++ b/loleaflet/dist/toolbar.css @@ -77,9 +77,8 @@ z-index: 1050; right: 35px; top: 2px; -width: 200px; +width: 135px; font-size: 16px; -//font-weight: bold; border: 1px solid transparent; background-color: transparent; } @@ -95,6 +94,8 @@ background-image: url('../images/lc_editdoc.svg'); background-position: right; background-repeat: no-repeat; +padding-right: 20px; +width: 120px; } #closebuttonwrapper { diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index 52ffb251..1bd8bb3d 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -74,6 +74,8 @@ function _mobilify() { oneUser = '1'; noUser = '0'; updateUserListCount(); + + $('#document-name-input').hide(); } function _unmobilify() { @@ -105,6 +107,8 @@ function _unmobilify() { oneUser = _('1 user'); noUser = _('0 users'); updateUserListCount(); + + $('#document-name-input').show(); } function resizeToolbar() { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/source
vcl/source/gdi/pdfwriter_impl.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 551e6881538189d03604730456ddd5563b1872dd Author: Caolán McNamara Date: Mon Jan 22 17:37:33 2018 + its defineresource not define resource regression from commit 64d624b65124ac02d8ee59b135593fd9d8eb9067 Date: Sat Jan 9 22:55:28 2016 +0100 Fix typos Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86 Reviewed-on: https://gerrit.libreoffice.org/21209 Tested-by: Jenkins Change-Id: Ifdf45e97b81523c84c73b93d14ed75b7b6909f77 Reviewed-on: https://gerrit.libreoffice.org/48355 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index fc3ef412cb34..7d0d12772c42 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -3058,7 +3058,7 @@ sal_Int32 PDFWriterImpl::createToUnicodeCMap( sal_uInt8 const * pEncoding, } aContents.append( "endbfchar\n" "endcmap\n" - "CMapName currentdict /CMap define resource pop\n" + "CMapName currentdict /CMap defineresource pop\n" "end\n" "end\n" ); SvMemoryStream aStream; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/source
sw/source/filter/html/htmltab.cxx |3 +++ sw/source/filter/html/swhtml.cxx | 31 +++ sw/source/filter/html/swhtml.hxx |1 + 3 files changed, 23 insertions(+), 12 deletions(-) New commits: commit 8b1a83bffe35ae0e71735569512c1586bcb37b25 Author: Michael Stahl Date: Mon Jan 22 19:48:06 2018 +0100 ofz#5566 sw: HTML import: ignore in table structure elements Looking at the HTML4 DTD https://www.w3.org/TR/html4/sgml/dtd.html, inside TABLE only various elements defining the structure of the table allowed, except inside cells (TD and TH elements). DIV in a table but outside cells may cause cursor positions to go off the rails, so better ignore such invalid DIV tags. Change-Id: Ia6195d80670631669c252d572242874b13642b74 Reviewed-on: https://gerrit.libreoffice.org/48359 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx index d2fff4c1a907..8ed2ca32707e 100644 --- a/sw/source/filter/html/htmltab.cxx +++ b/sw/source/filter/html/htmltab.cxx @@ -19,6 +19,7 @@ #include #include +#include #include #include #include @@ -3133,6 +3134,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions, if( !IsParserWorking() && !m_pPendStack ) return; +::comphelper::FlagRestorationGuard g(m_isInTableStructure, false); std::unique_ptr xSaveStruct; HtmlTokenId nToken = HtmlTokenId::NONE; @@ -4946,6 +4948,7 @@ std::shared_ptr SwHTMLParser::BuildTable(SvxAdjust eParentAdjust, if (!IsParserWorking() && !m_pPendStack) return std::shared_ptr(); +::comphelper::FlagRestorationGuard g(m_isInTableStructure, true); HtmlTokenId nToken = HtmlTokenId::NONE; bool bPending = false; std::unique_ptr xSaveStruct; diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index aad798936453..4d939b4cba8d 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -300,6 +300,7 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, SwPaM& rCursor, SvStream& rIn, m_bRemoveHidden( false ), m_bBodySeen( false ), m_bReadingHeaderOrFooter( false ), +m_isInTableStructure(false), m_nTableDepth( 0 ), m_pTempViewFrame(nullptr) { @@ -1557,26 +1558,32 @@ void SwHTMLParser::NextToken( HtmlTokenId nToken ) // divisions case HtmlTokenId::DIVISION_ON: case HtmlTokenId::CENTER_ON: -if( m_nOpenParaToken != HtmlTokenId::NONE ) +if (!m_isInTableStructure) { -if( IsReadPRE() ) -m_nOpenParaToken = HtmlTokenId::NONE; -else -EndPara(); +if (m_nOpenParaToken != HtmlTokenId::NONE) +{ +if (IsReadPRE()) +m_nOpenParaToken = HtmlTokenId::NONE; +else +EndPara(); +} +NewDivision( nToken ); } -NewDivision( nToken ); break; case HtmlTokenId::DIVISION_OFF: case HtmlTokenId::CENTER_OFF: -if( m_nOpenParaToken != HtmlTokenId::NONE ) +if (!m_isInTableStructure) { -if( IsReadPRE() ) -m_nOpenParaToken = HtmlTokenId::NONE; -else -EndPara(); +if (m_nOpenParaToken != HtmlTokenId::NONE) +{ +if (IsReadPRE()) +m_nOpenParaToken = HtmlTokenId::NONE; +else +EndPara(); +} +EndDivision(); } -EndDivision(); break; case HtmlTokenId::MULTICOL_ON: diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx index cd43c8f3f065..9674a8892eaf 100644 --- a/sw/source/filter/html/swhtml.hxx +++ b/sw/source/filter/html/swhtml.hxx @@ -492,6 +492,7 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient bool m_bBodySeen : 1; bool m_bReadingHeaderOrFooter : 1; +bool m_isInTableStructure; sal_Int32 m_nTableDepth; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - sw/source
sw/source/filter/html/htmlctxt.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit ee1ff57f901b976a1be12c57c800ca78a8427b81 Author: Michael Stahl Date: Thu Jan 18 17:31:22 2018 +0100 ofz#4754 sw: HTML import: fix invalid tables being created This 75-byte horror creates 2 nested tables, where one SwTableBox is in the SwTableLine of the inner SwTable but in the SwSortBoxes of the outer table, which is of course invalid. The root cause is that in SwHTMLParser::SplitAttrTab(), we move the m_pPam backward once and forward twice, moving it ouside the inner table. Change-Id: I63f6508afe1270ccdeb05da6f222b0aba5259889 (cherry picked from commit e1a4a8c180f98aac0ab21a22a6a03d2109c712be) Reviewed-on: https://gerrit.libreoffice.org/48145 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/source/filter/html/htmlctxt.cxx b/sw/source/filter/html/htmlctxt.cxx index f93e5ffee1d0..e501ca63d00f 100644 --- a/sw/source/filter/html/htmlctxt.cxx +++ b/sw/source/filter/html/htmlctxt.cxx @@ -163,6 +163,7 @@ void SwHTMLParser::SplitAttrTab( const SwPosition& rNewPos ) { m_pPam->Move( fnMoveForward ); nOldEndCnt = m_pPam->GetPoint()->nContent.GetIndex(); +bMoveBack = false; } if( (RES_PARATR_BEGIN <= nWhich && bMoveBack) || ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sw/source
sw/source/filter/html/htmlctxt.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 01f4bfdc21dbee3599943b82c96266d5f9aa6a2a Author: Michael Stahl Date: Thu Jan 18 17:31:22 2018 +0100 ofz#4754 sw: HTML import: fix invalid tables being created This 75-byte horror creates 2 nested tables, where one SwTableBox is in the SwTableLine of the inner SwTable but in the SwSortBoxes of the outer table, which is of course invalid. The root cause is that in SwHTMLParser::SplitAttrTab(), we move the m_pPam backward once and forward twice, moving it ouside the inner table. Change-Id: I63f6508afe1270ccdeb05da6f222b0aba5259889 (cherry picked from commit e1a4a8c180f98aac0ab21a22a6a03d2109c712be) Reviewed-on: https://gerrit.libreoffice.org/48146 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/source/filter/html/htmlctxt.cxx b/sw/source/filter/html/htmlctxt.cxx index 423f2b670155..421dcead0afc 100644 --- a/sw/source/filter/html/htmlctxt.cxx +++ b/sw/source/filter/html/htmlctxt.cxx @@ -160,6 +160,7 @@ void SwHTMLParser::SplitAttrTab( const SwPosition& rNewPos ) { m_pPam->Move( fnMoveForward ); nOldEndCnt = m_pPam->GetPoint()->nContent.GetIndex(); +bMoveBack = false; } if( (RES_PARATR_BEGIN <= nWhich && bMoveBack) || ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'refs/notes/commits' - 57/aca14ae30f2876a348c7dc06a609f68d10d7ee
57/aca14ae30f2876a348c7dc06a609f68d10d7ee |1 + 1 file changed, 1 insertion(+) New commits: commit ee841aed42ccf08d60ed56489191d36c89422a72 Author: Caolán McNamara Date: Tue Jan 23 09:02:10 2018 + Notes added by 'git notes add' diff --git a/57/aca14ae30f2876a348c7dc06a609f68d10d7ee b/57/aca14ae30f2876a348c7dc06a609f68d10d7ee new file mode 100644 index ..8e5c182e7789 --- /dev/null +++ b/57/aca14ae30f2876a348c7dc06a609f68d10d7ee @@ -0,0 +1 @@ +ignore: aoo ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: include/svx
include/svx/gallery.hxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 8d37253e50aca502a1f80ef648deb6f5178c4c46 Author: Matthias Seidel Date: Fri Jan 19 18:45:59 2018 + Fixed wording (cherry picked from commit 106d959da4cccda4c0342715cc06854f152c99d1) Change-Id: I51c86dfef0e0eff59ce2892d8ea07dd066fd9667 diff --git a/include/svx/gallery.hxx b/include/svx/gallery.hxx index cb2da0a856ba..19a2c9e226c7 100644 --- a/include/svx/gallery.hxx +++ b/include/svx/gallery.hxx @@ -44,7 +44,7 @@ // * share/gallery (theme files are identified by id) // // Since galleries may be copied from older offices to newer, do *never* change -// this IDs except adding new ones (and adapting GALLERY_THEME_LAST). The ID +// these IDs except adding new ones (and adapting GALLERY_THEME_LAST). The ID // *is* written into the binary file *.thm (which is a gallery theme combined // of three files, *.thm, *.sdv and *.sdg) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'refs/notes/commits' - 10/6d959da4cccda4c0342715cc06854f152c99d1
10/6d959da4cccda4c0342715cc06854f152c99d1 |1 + 1 file changed, 1 insertion(+) New commits: commit c7e78cae077cf4542f8451697a3dae0c2c5b33d4 Author: Caolán McNamara Date: Tue Jan 23 09:06:27 2018 + Notes added by 'git notes add' diff --git a/10/6d959da4cccda4c0342715cc06854f152c99d1 b/10/6d959da4cccda4c0342715cc06854f152c99d1 new file mode 100644 index ..22b3719564b3 --- /dev/null +++ b/10/6d959da4cccda4c0342715cc06854f152c99d1 @@ -0,0 +1 @@ +merged as: 8d37253e50aca502a1f80ef648deb6f5178c4c46 ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/source
sc/source/core/tool/interpr4.cxx | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) New commits: commit ea20bc176cbf575e39c602a91dd3e6919b3fc31e Author: Stephan Bergmann Date: Mon Jan 22 18:49:40 2018 +0100 USHRT_MAX -> SAL_MAX_UINT16 ...that had presumably been forgotten when the surrounding code had been changed from USHORT to sal_uInt16 in cd42389ad67b403a07a0dda8e2a6e213def49251 "removetooltypes01: #i112600# remove tooltypes from sc". Plus, turning the preprocessor checks into static_asserts. Change-Id: I78271f7027af701699865913813d6dea8b0c570b Reviewed-on: https://gerrit.libreoffice.org/48358 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx index bedeaa75c7c9..f08c09ce69eb 100644 --- a/sc/source/core/tool/interpr4.cxx +++ b/sc/source/core/tool/interpr4.cxx @@ -284,10 +284,8 @@ bool ScInterpreter::CreateDoubleArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, { // Old Add-Ins are hard limited to sal_uInt16 values. -#if MAXCOLCOUNT_DEFINE > USHRT_MAX -#error Add check for columns > USHRT_MAX! -#endif -if (nRow1 > USHRT_MAX || nRow2 > USHRT_MAX) +static_assert(MAXCOLCOUNT <= SAL_MAX_UINT16, "Add check for columns > SAL_MAX_UINT16!"); +if (nRow1 > SAL_MAX_UINT16 || nRow2 > SAL_MAX_UINT16) return false; sal_uInt16 nCount = 0; @@ -369,10 +367,8 @@ bool ScInterpreter::CreateStringArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, { // Old Add-Ins are hard limited to sal_uInt16 values. -#if MAXCOLCOUNT_DEFINE > USHRT_MAX -#error Add check for columns > USHRT_MAX! -#endif -if (nRow1 > USHRT_MAX || nRow2 > USHRT_MAX) +static_assert(MAXCOLCOUNT <= SAL_MAX_UINT16, "Add check for columns > SAL_MAX_UINT16!"); +if (nRow1 > SAL_MAX_UINT16 || nRow2 > SAL_MAX_UINT16) return false; sal_uInt16 nCount = 0; @@ -468,10 +464,8 @@ bool ScInterpreter::CreateCellArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, { // Old Add-Ins are hard limited to sal_uInt16 values. -#if MAXCOLCOUNT_DEFINE > USHRT_MAX -#error Add check for columns > USHRT_MAX! -#endif -if (nRow1 > USHRT_MAX || nRow2 > USHRT_MAX) +static_assert(MAXCOLCOUNT <= SAL_MAX_UINT16, "Add check for columns > SAL_MAX_UINT16!"); +if (nRow1 > SAL_MAX_UINT16 || nRow2 > SAL_MAX_UINT16) return false; sal_uInt16 nCount = 0; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/BorderlineFix' - sc/source svx/source
sc/source/ui/inc/output.hxx |7 +-- sc/source/ui/view/gridwin4.cxx |4 sc/source/ui/view/output.cxx |3 +++ svx/source/dialog/framelinkarray.cxx | 27 +-- 4 files changed, 29 insertions(+), 12 deletions(-) New commits: commit 5184115ea2c8f0096b2948908c012c73ca4cf681 Author: Armin Le Grand Date: Tue Jan 23 10:29:44 2018 +0100 BorderlineFix: Corrected handling for 'rotated' CellBorders CellBorders can be rotated (including their Text) and need special visualization that is based on an own sheared/rotated coordinate system. Currently only possible for single cells (not merged ones) and needs to handle all borders (also bottom-right directly in the rotated cell, not in the neighboured ones to have the geometry, plus avoiding these in the non-rotated neighbour cells. Also corrected adding CellRotation data to svx::frame::Array in calc using SetCellRotations() which now gets called in the ScOutputData constructor to ensure it gets called in all places where it is used. Change-Id: I47bdfc29ba5ca76bbc07d98cb64733f867b1ee20 diff --git a/sc/source/ui/inc/output.hxx b/sc/source/ui/inc/output.hxx index f23dabae3de0..c41433609b9e 100644 --- a/sc/source/ui/inc/output.hxx +++ b/sc/source/ui/inc/output.hxx @@ -255,6 +255,11 @@ private: long SetEngineTextAndGetWidth( DrawEditParam& rParam, const OUString& rSetString, long& rNeededPixel, long nAddWidthPixels ); +// Check for and set cell rotations at OutputData to have it available +// in the svx tooling to render the borders. Moved to private section +// and the single call to end of constructor to be sure this always happens +voidSetCellRotations(); + public: /** * @param nNewScrX: X-Offset in the output device for the table @@ -311,8 +316,6 @@ public: // with logic MapMode set! voidDrawEdit(bool bPixelToLogic); - -voidSetCellRotations(); voidDrawRotated(bool bPixelToLogic);// logical voidDrawClear(); diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index 22e07763decb..64cd440e9902 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -696,10 +696,6 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI pContentDev->SetMapMode(aCurrentMapMode); } -// check for and set cell rotations at OutputData to have it available -// in the svx tooling to render the borders -aOutputData.SetCellRotations(); - if ( rDoc.HasBackgroundDraw( nTab, aDrawingRectLogic ) ) { pContentDev->SetMapMode(MapMode(MapUnit::MapPixel)); diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx index bd3687cd1cd3..064bb14ce1a1 100644 --- a/sc/source/ui/view/output.cxx +++ b/sc/source/ui/view/output.cxx @@ -214,6 +214,9 @@ ScOutputData::ScOutputData( OutputDevice* pNewDev, ScOutputType eNewType, bTabProtected = mpDoc->IsTabProtected( nTab ); bLayoutRTL = mpDoc->IsLayoutRTL( nTab ); + +// always needed, so call at the end of the constructor +SetCellRotations(); } ScOutputData::~ScOutputData() diff --git a/svx/source/dialog/framelinkarray.cxx b/svx/source/dialog/framelinkarray.cxx index 096216210585..ab6db75799e3 100644 --- a/svx/source/dialog/framelinkarray.cxx +++ b/svx/source/dialog/framelinkarray.cxx @@ -1092,9 +1092,21 @@ drawinglayer::primitive2d::Primitive2DContainer Array::CreateB2DPrimitiveRange( const bool bFirstRow(nRow == nFirstRow); const bool bLastRow(nRow == nLastRow); +// handle rotation: If cell is rotated, handle lower/right edge inside +// this local geometry due to the created CoordinateSystem already representing +// the needed transformations. +const bool bRotated(rCell.IsRotated()); + +// Additionally avoid double-handling by supressing handling when self not roated, +// but above/left is rotated and thus already handled. Two directly connected +// rotated will paint/create both edges, they might be rotated differently. +const bool bSuppressAbove(!bRotated && nRow > nFirstRow && CELL(nCol, nRow - 1).IsRotated()); +const bool bSupressLeft(!bRotated && nCol > nFirstCol && CELL(nCol - 1, nRow).IsRotated()); + // create upper line for this Cell -if (!bOverlapY // true for first line in merged cells or cells -|| bFirstRow) // true for non_Calc usages of this tooling +if ((!bOverlapY // true for first line in merged cells or cells +|| bFirstRow) // true for non_Calc usages of this tooling +&& !bSuppressAbove) // true when above i
[Libreoffice-commits] core.git: comphelper/source compilerplugins/clang desktop/source editeng/source forms/source sc/source sdext/source sd/source solenv/CompilerTest_compilerplugins_clang.mk sw/qa s
comphelper/source/property/property.cxx |2 compilerplugins/clang/check.cxx |9 compilerplugins/clang/check.hxx |2 compilerplugins/clang/pointerbool.cxx | 124 compilerplugins/clang/test/pointerbool.cxx | 32 +++ desktop/source/deployment/dp_persmap.cxx|2 editeng/source/items/numitem.cxx|2 forms/source/xforms/submission/serialization_urlencoded.cxx |2 sc/source/filter/excel/impop.cxx|2 sc/source/filter/excel/xecontent.cxx|2 sc/source/ui/navipi/navipi.cxx |2 sc/source/ui/pagedlg/tptable.cxx|8 sc/source/ui/view/tabview5.cxx |2 sd/source/ui/animations/CustomAnimationPane.cxx |2 sdext/source/pdfimport/wrapper/wrapper.cxx |2 solenv/CompilerTest_compilerplugins_clang.mk|1 sw/qa/core/uwriter.cxx |2 sw/source/core/text/pormulti.cxx| 18 - sw/source/filter/ww8/ww8par.cxx |2 sw/source/filter/ww8/ww8par3.cxx|2 sw/source/filter/ww8/ww8par6.cxx|2 sw/source/uibase/fldui/fldmgr.cxx |2 sw/source/uibase/lingu/olmenu.cxx |2 sw/source/uibase/utlui/navipi.cxx |2 toolkit/source/controls/unocontrols.cxx |2 vcl/source/control/combobox.cxx |2 vcl/source/control/edit.cxx |2 vcl/unx/gtk/gtksalframe.cxx |2 vcl/unx/gtk3/gtk3gtkframe.cxx |2 29 files changed, 203 insertions(+), 35 deletions(-) New commits: commit 91b4e4531621b7afb2dbab1a8aa62c92da66951a Author: Noel Grandin Date: Sun Jan 21 13:07:10 2018 +0200 new loplugin: pointerbool look for possibly bogus implicit conversions to bool when passing (normally pointer) args to bool params. this plugin comes in the wake of a couple of bugs caused by refactoring, where some of the call sites were not currently updated. Of the changes, the following are real bugs: desktop/../dp_persmap.cxx StartInputFieldDlg in sw/../fldmgr.cxx which occurred as a result of commit 39d719a80d8c87856c84e3ecd569d45fa6f8a30e Date: Tue May 3 11:39:37 2016 +0200 tdf#99529 sw: don't pop up input field dialog before inserting field CSerializationURLEncoded::encode_and_append in forms/../serialization_urlencoded.cxx XclExpCFImpl::XclExpCFImpl in sc/../xecontent.cxx I have no idea how to properly fix this, just made a guess. SwDocTest::test64kPageDescs in sw/qa/core/uwriter.cxx which looks like a simple copy/paste error. Change-Id: I795ebd5ef485a1d36863dc27fe13832989f5a441 Reviewed-on: https://gerrit.libreoffice.org/48291 Reviewed-by: Noel Grandin Tested-by: Noel Grandin diff --git a/comphelper/source/property/property.cxx b/comphelper/source/property/property.cxx index 8f222f56f8de..6a795d76479a 100644 --- a/comphelper/source/property/property.cxx +++ b/comphelper/source/property/property.cxx @@ -101,7 +101,7 @@ void copyProperties(const Reference& _rxSource, } else { -aBuffer.append( typeid( *_rxDest.get() ).name() ); +aBuffer.append( OUString::createFromAscii(typeid( *_rxDest.get() ).name()) ); } aBuffer.append( "' implementation).\n" ); diff --git a/compilerplugins/clang/check.cxx b/compilerplugins/clang/check.cxx index 2a7b0a978348..8b3e409be2d1 100644 --- a/compilerplugins/clang/check.cxx +++ b/compilerplugins/clang/check.cxx @@ -138,6 +138,15 @@ TypeCheck TypeCheck::NotSubstTemplateTypeParmType() const { ? *this : TypeCheck(); } +TypeCheck TypeCheck::SubstTemplateTypeParmType() const { +if (!type_.isNull()) { +if (auto const t = type_->getAs()) { +return TypeCheck(t->desugar()); +} +} +return TypeCheck(); +} + ContextCheck DeclCheck::Operator(clang::OverloadedOperatorKind op) const { assert(op != clang::OO_None); auto f = llvm::dyn_cast_or_null(decl_); diff --git a/compilerplugins/clang/check.hxx b/compilerplugins/clang/check.hxx index af6e8263df39..f31599f1b153 100644 --- a/compilerplugins/clang/check.hxx +++ b/compilerplugins/clang/check.hxx @@ -72,6 +72,8 @@ public: TypeCheck NotSubstTemplateTypeParmType() const; +TypeCheck SubstTemplateTypeParmType() c
[Libreoffice-commits] core.git: ios/LibreOfficeLight
ios/LibreOfficeLight/LibreOfficeLight.xcodeproj/project.pbxproj |8 ios/LibreOfficeLight/LibreOfficeLight/ButtonScrollView.swift | 145 ++ ios/LibreOfficeLight/LibreOfficeLight/DocumentController.swift | 39 ++ ios/LibreOfficeLight/LibreOfficeLight/LOKit/DocumentHolder.swift | 14 ios/LibreOfficeLight/LibreOfficeLight/UIViewExtensions.swift | 74 + ios/LibreOfficeLight/LibreOfficeLight/en.lproj/Main.storyboard |6 6 files changed, 281 insertions(+), 5 deletions(-) New commits: commit 810dfda5556c5e0f0cc65f01c9634996951fd3e5 Author: Jon Nermut Date: Tue Jan 23 15:18:42 2018 +1100 iOS: implement tabs for spreadsheets Change-Id: I210d68f013e56efd90da004891b872434ce65f68 Reviewed-on: https://gerrit.libreoffice.org/48368 Reviewed-by: jan iversen Tested-by: jan iversen diff --git a/ios/LibreOfficeLight/LibreOfficeLight.xcodeproj/project.pbxproj b/ios/LibreOfficeLight/LibreOfficeLight.xcodeproj/project.pbxproj index 315d4d18151b..4897f40a1641 100644 --- a/ios/LibreOfficeLight/LibreOfficeLight.xcodeproj/project.pbxproj +++ b/ios/LibreOfficeLight/LibreOfficeLight.xcodeproj/project.pbxproj @@ -35,6 +35,8 @@ 39EF4E2F1FA500C9001914AC /* PropertiesController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39EF4E2E1FA500C9001914AC /* PropertiesController.swift */; }; FC31D01E2012F65500E7F402 /* DocumentHolder.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC31D01D2012F65500E7F402 /* DocumentHolder.swift */; }; FC31D0202012F6D300E7F402 /* RenderCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC31D01F2012F6D300E7F402 /* RenderCache.swift */; }; + FC31D02B2013500E00E7F402 /* ButtonScrollView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC31D02A2013500E00E7F402 /* ButtonScrollView.swift */; }; + FC31D02D2015DE1700E7F402 /* UIViewExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC31D02C2015DE1700E7F402 /* UIViewExtensions.swift */; }; FCAB1CB82009DB6900F1CC34 /* DocumentOverlaysView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCAB1CB72009DB6900F1CC34 /* DocumentOverlaysView.swift */; }; FCC2E3FA2004A01500CEB504 /* Document.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCC2E3F62004A01400CEB504 /* Document.swift */; }; FCC2E3FC2004A01500CEB504 /* LibreOfficeKitWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCC2E3F82004A01400CEB504 /* LibreOfficeKitWrapper.swift */; }; @@ -87,6 +89,8 @@ FC31D0132012EE4A00E7F402 /* LibreOfficeKitTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LibreOfficeKitTypes.h; sourceTree = ""; }; FC31D01D2012F65500E7F402 /* DocumentHolder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DocumentHolder.swift; sourceTree = ""; }; FC31D01F2012F6D300E7F402 /* RenderCache.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RenderCache.swift; sourceTree = ""; }; + FC31D02A2013500E00E7F402 /* ButtonScrollView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ButtonScrollView.swift; sourceTree = ""; }; + FC31D02C2015DE1700E7F402 /* UIViewExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIViewExtensions.swift; sourceTree = ""; }; FCAB1CB72009DB6900F1CC34 /* DocumentOverlaysView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DocumentOverlaysView.swift; sourceTree = ""; }; FCC2E3F62004A01400CEB504 /* Document.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Document.swift; sourceTree = ""; }; FCC2E3F82004A01400CEB504 /* LibreOfficeKitWrapper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LibreOfficeKitWrapper.swift; sourceTree = ""; }; @@ -172,11 +176,13 @@ 39EE81531FA644E800B73AB8 /* Info.plist */, 39503A6F1F94C4AC00F19C78 /* lokit-Bridging-Header.h */, 397E08FD1E597BD8001374E0 /* AppDelegate.swift */, + FC31D02A2013500E00E7F402 /* ButtonScrollView.swift */, 3992D8591E5B762A00BEA987 /* DocumentController.swift */, FCAB1CB72009DB6900F1CC34 /* DocumentOverlaysView.swift */, FCC2E3FE2004B59B00CEB504 /* DocumentTiledView.swift */, 39284DB21FA5F207006F43E4 /* DocumentActions.swift */, 39EF4E2E1FA500C9001914AC /* PropertiesController.swift */, + FC31D02C2015DE1700E
[Libreoffice-commits] online.git: debian/control loolwsd.spec.in loolwsd.xml.in Makefile.am wsd/FileServer.cpp wsd/LOOLWSD.cpp
Makefile.am|2 - debian/control |2 - loolwsd.spec.in|4 ++ loolwsd.xml.in |5 +- wsd/FileServer.cpp | 89 +++-- wsd/LOOLWSD.cpp|3 + 6 files changed, 90 insertions(+), 15 deletions(-) New commits: commit a2e25cc7d31f3daa011df7f7b4e40fc540d91d2a Author: Andras Timar Date: Mon Jan 22 11:57:39 2018 +0100 Add PAM support Possibilities are endless. With a simple /etc/pam.d/loolwsd config below, the user which runs loolwsd ('lool' in production environment) can login to admin console with normal linux password. auth required pam_unix.so accountrequired pam_unix.so Change-Id: I354a7e9b4705e8fe346d17d6b6041d1406198b37 Reviewed-on: https://gerrit.libreoffice.org/48307 Reviewed-by: Andras Timar Tested-by: Andras Timar diff --git a/Makefile.am b/Makefile.am index 3d751207..d0e2ae2d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -36,7 +36,7 @@ if !ENABLE_DEBUG AM_CPPFLAGS += -DNDEBUG endif -AM_LDFLAGS = -pthread -Wl,-E,-rpath,/snap/loolwsd/current/usr/lib $(ZLIB_LIBS) +AM_LDFLAGS = -pthread -Wl,-E,-rpath,/snap/loolwsd/current/usr/lib -lpam $(ZLIB_LIBS) if ENABLE_SSL AM_LDFLAGS += -lssl -lcrypto diff --git a/debian/control b/debian/control index b89cb7ca..30bdfe04 100644 --- a/debian/control +++ b/debian/control @@ -1,7 +1,7 @@ Source: loolwsd Section: web Priority: optional -Maintainer: Tor Lillqvist +Maintainer: Andras Timar Build-Depends: debhelper (>= 9), dh-systemd (>= 1.3), libcap-dev, libcap2-bin, libpcre3-dev, libpng-dev, libpoco-dev (>= 1.7.5), linux-libc-dev Standards-Version: 3.9.7 diff --git a/loolwsd.spec.in b/loolwsd.spec.in index f7355b17..0933b1a3 100644 --- a/loolwsd.spec.in +++ b/loolwsd.spec.in @@ -88,6 +88,9 @@ install -D -m 644 sysconfig.loolwsd %{buildroot}/var/adm/fillup-templates mkdir -p %{buildroot}/etc/cron.d echo "#Remove old tiles once every 10 days at midnight" > %{buildroot}/etc/cron.d/loolwsd.cron echo "0 0 */1 * * root find /var/cache/loolwsd -name \"*.png\" -a -atime +10 -exec rm {} \;" >> %{buildroot}/etc/cron.d/loolwsd.cron +mkdir -p %{buildroot}/etc/pam.d +echo "auth required pam_unix.so" > %{buildroot}/etc/pam.d/loolwsd +echo "accountrequired pam_unix.so" >> %{buildroot}/etc/pam.d/loolwsd %files /usr/bin/loolwsd @@ -116,6 +119,7 @@ echo "0 0 */1 * * root find /var/cache/loolwsd -name \"*.png\" -a -atime +10 -ex %endif %config(noreplace) /etc/cron.d/loolwsd.cron +%config(noreplace) /etc/pam.d/loolwsd %config(noreplace) %attr(640, lool, root) /etc/loolwsd/loolwsd.xml %config /etc/loolwsd/loolkitconfig.xcu diff --git a/loolwsd.xml.in b/loolwsd.xml.in index 1609c7bc..31ab1a07 100644 --- a/loolwsd.xml.in +++ b/loolwsd.xml.in @@ -100,8 +100,9 @@ true - - +true + + diff --git a/wsd/FileServer.cpp b/wsd/FileServer.cpp index 9f788818..ad4b890d 100644 --- a/wsd/FileServer.cpp +++ b/wsd/FileServer.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #include @@ -53,6 +54,62 @@ using Poco::Util::Application; std::map> FileServerRequestHandler::FileHash; +namespace { + +int functionConversation(int /*num_msg*/, const struct pam_message** /*msg*/, + struct pam_response **reply, void *appdata_ptr) +{ +*reply = (struct pam_response *)malloc(sizeof(struct pam_response)); +(*reply)[0].resp = strdup(static_cast(appdata_ptr)); +(*reply)[0].resp_retcode = 0; + +return PAM_SUCCESS; +} + +bool isPamAuthOk(const std::string user, const std::string pass) +{ +struct pam_conv localConversation { functionConversation, nullptr }; +pam_handle_t *localAuthHandle = NULL; +int retval; + +localConversation.appdata_ptr = const_cast(pass.c_str()); + +retval = pam_start("loolwsd", user.c_str(), &localConversation, &localAuthHandle); + +if (retval != PAM_SUCCESS) +{ +LOG_ERR("pam_start returned " << retval); +return false; +} + +retval = pam_authenticate(localAuthHandle, 0); + +if (retval != PAM_SUCCESS) +{ + if (retval == PAM_AUTH_ERR) + { + LOG_ERR("PAM authentication failure for user \"" << user << "\"."); + } + else + { + LOG_ERR("pam_authenticate returned " << retval); + } + return false; +} + +LOG_INF("PAM authentication success for user \"" << user << "\"."); + +retval = pam_end(localAuthHandle, retval); + +if (retval != PAM_SUCCESS) +{ +LOG_WRN("pam_end returned " << retval); +} + +return true; +} +} + bool FileServerRequestHandler::isAdminLoggedIn(const HTTPRequest& request, HTTPResponse &response) { @@ -81,10 +138,12 @@ bool FileServerRequestHandler::isAdminLoggedIn(const HTTPRequest& request, HTTPBasicCredentials credentials(request)
[Libreoffice-commits] core.git: shell/source
0 files changed New commits: commit 53c304789eb8da8f5a7b2209ece68eeaec819a8f Author: Tor Lillqvist Date: Tue Jan 23 12:08:18 2018 +0200 chmod -x Change-Id: I05021e1d86412c3a0703e71f43fe2238bb094762 diff --git a/shell/source/win32/shlxthandler/propsheets/listviewbuilder.cxx b/shell/source/win32/shlxthandler/propsheets/listviewbuilder.cxx old mode 100755 new mode 100644 ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sfx2/source
sfx2/source/doc/doctemplates.cxx | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) New commits: commit 18bc0ea4f26eb3ce020597d9feef9ee852a26096 Author: Noel Grandin Date: Tue Jan 16 15:47:16 2018 +0200 loplugin:useuniqueptr in SfxDocTplService_Impl Change-Id: Iacda2920f632a6f21d852d843e97086a23479bbd Reviewed-on: https://gerrit.libreoffice.org/48370 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx index eee0ac0363ac..61bf957b5713 100644 --- a/sfx2/source/doc/doctemplates.cxx +++ b/sfx2/source/doc/doctemplates.cxx @@ -185,7 +185,7 @@ class SfxDocTplService_Impl Sequence< OUString >maTemplateDirs; Sequence< OUString >maInternalTemplateDirs; OUStringmaRootURL; -std::vector< NamePair_Impl* > maNames; +std::vector< std::unique_ptr > maNames; lang::LocalemaLocale; Content maRootContent; boolmbIsInitialized : 1; @@ -506,11 +506,11 @@ void SfxDocTplService_Impl::readFolderList() const size_t nCount = std::min(SAL_N_ELEMENTS(TEMPLATE_SHORT_NAMES_ARY), SAL_N_ELEMENTS(TEMPLATE_LONG_NAMES_ARY)); for (size_t i = 0; i < nCount; ++i) { -NamePair_Impl* pPair = new NamePair_Impl; +std::unique_ptr pPair( new NamePair_Impl ); pPair->maShortName = OUString::createFromAscii(TEMPLATE_SHORT_NAMES_ARY[i]); pPair->maLongName = SfxResId(TEMPLATE_LONG_NAMES_ARY[i]); -maNames.push_back( pPair ); +maNames.push_back( std::move(pPair) ); } } @@ -519,7 +519,7 @@ OUString SfxDocTplService_Impl::getLongName( const OUString& rShortName ) { OUString aRet; -for (NamePair_Impl* pPair : maNames) +for (auto const & pPair : maNames) { if ( pPair->maShortName == rShortName ) { @@ -1086,9 +1086,6 @@ SfxDocTplService_Impl::SfxDocTplService_Impl( const uno::Reference< XComponentCo SfxDocTplService_Impl::~SfxDocTplService_Impl() { ::osl::MutexGuard aGuard( maMutex ); - -for (NamePair_Impl* p : maNames) -delete p; maNames.clear(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] help.git: CustomTarget_html.mk help3xsl/default.css help3xsl/get_bookmark.xsl help3xsl/get_media.sh help3xsl/help.js help3xsl/list.min.js help3xsl/online_transform.xsl help3xsl/x
CustomTarget_html.mk | 20 --- Package_html_static.mk|1 help3xsl/default.css | 115 -- help3xsl/get_bookmark.xsl |8 +- help3xsl/get_media.sh |1 help3xsl/help.js | 33 help3xsl/list.min.js |2 help3xsl/online_transform.xsl | 108 +++ help3xsl/xhp2html.sh |1 9 files changed, 195 insertions(+), 94 deletions(-) New commits: commit 995f740adfff22aff1105a7e1b2801dfdab43434 Author: Ilmari Lauhakangas Date: Mon Jan 22 16:48:08 2018 +0200 Use list.js for Index listing and search List.js - http://listjs.com/ - allows us to paginate the results so the height does not get out of hand. Fuzzy search would be cool: http://listjs.com/docs/fuzzysearch/ ...but it gives too big of a perf hit with our 5700 items. Might try to bribe the creator to look into perf. Thanks a lot to David Tardon for the makefile solution and to Christian Lohmaier for playing a rubber duck. Change-Id: I359eed541470ccaa309b0b6ff5d809a796d9befd Reviewed-on: https://gerrit.libreoffice.org/48335 Reviewed-by: Olivier Hallot Tested-by: Olivier Hallot diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk index 85ae29b2a..0c71db255 100644 --- a/CustomTarget_html.mk +++ b/CustomTarget_html.mk @@ -12,7 +12,7 @@ $(eval $(call gb_CustomTarget_CustomTarget,helpcontent2/help3xsl)) # HACK!! html_TREE_MODULES := sbasic scalc schart shared simpress smath swriter html_TEXT_MODULES := $(html_TREE_MODULES) sdatabase sdraw -html_BMARK_MODULES := scalc:CALC schart:CHART swriter:WRITER sdraw:DRAW simpress:IMPRESS smath:MATH sbasic:BASIC shared:SHARED shared/explorer/database:BASE +html_BMARK_MODULES := swriter:writer scalc:calc simpress:impress sdraw:draw shared/explorer/database:base smath:math schart:chart sbasic:basic shared:shared $(eval $(call gb_CustomTarget_register_targets,helpcontent2/help3xsl,\ hid2file.js \ @@ -113,7 +113,11 @@ $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/html.text : \ $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/bookmarks.js : $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),CAT,2) $(call gb_Helper_abbreviate_dirs,\ - cat $(filter %.part,$^) > $@ \ + ( \ + echo 'document.getElementById("Bookmarks").getElementsByClassName( "list" )[0].innerHTML='"'"'\' \ + && cat $(filter %.part,$^) \ + && echo "'" \ + ) > $@ \ ) define html__gen_bookmarks_lang_dep @@ -150,11 +154,10 @@ $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/bookmarks.part : \ $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),XSL,1) $(call gb_Helper_abbreviate_dirs,\ ( \ - echo "document.getElementById(\"bookmark$(APP)\").innerHTML='\\" \ - && find $(if $(filter en-US,$(HELP_LANG)),$(SRCDIR),$(call gb_HelpTranslatePartTarget_get_workdir,$(HELP_LANG)))/helpcontent2/source/text/$(APPDIR) -name "*.xhp" \ - | while read xhp; do \ - $(call gb_ExternalExecutable_get_command,xsltproc) \ - --stringparam app $(APP) \ + find $(if $(filter en-US,$(HELP_LANG)),$(SRCDIR),$(call gb_HelpTranslatePartTarget_get_workdir,$(HELP_LANG)))/helpcontent2/source/text/$(APPDIR) -name "*.xhp" \ + | while read xhp; do \ + $(call gb_ExternalExecutable_get_command,xsltproc) \ + --stringparam app $(APP) \ --stringparam Language $(HELP_LANG) \ --stringparam productversion $(PRODUCTVERSION) \ $(SRCDIR)/helpcontent2/help3xsl/get_bookmark.xsl \ @@ -162,8 +165,7 @@ $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/bookmarks.part : \ ; done \ | sort -k3b -t\> -s \ | awk 'NF' \ - && echo "'" \ ) > $@ \ - ) + ) # vim: set noet sw=4 ts=4: diff --git a/Package_html_static.mk b/Package_html_static.mk index e6767f6a6..32d4b05fe 100644 --- a/Package_html_static.mk +++ b/Package_html_static.mk @@ -19,6 +19,7 @@ $(eval $(call gb_Package_add_file,helpcontent2_html_static,$(LIBO_SHARE_HELP_FOL $(eval $(call gb_Package_add_files,helpcontent2_html_static,$(LIBO_SHARE_HELP_FOLDER)/$(PRODUCTVERSION),\ help.js \ jquery-3.1.1.min.js \ + list.min.js \ normalize.css \ default.css \ )) diff --git a/help3xsl/default.css b/help3xsl/default.css index 9efce4d33..70af31efb 100644 --- a/he
[Libreoffice-commits] core.git: sc/source
sc/source/core/tool/rangelst.cxx | 76 +-- 1 file changed, 41 insertions(+), 35 deletions(-) New commits: commit 73049e5dbf9430df077dd26bed9d01435f745544 Author: Eike Rathke Date: Mon Jan 22 21:41:51 2018 +0100 Flatten ScRangePairList::Join() recursion Similar to ScRangeList::Join() done before. Change-Id: Ie513b4c72bc211c196e13761b63446174321a389 Reviewed-on: https://gerrit.libreoffice.org/48361 Reviewed-by: Eike Rathke Tested-by: Jenkins diff --git a/sc/source/core/tool/rangelst.cxx b/sc/source/core/tool/rangelst.cxx index e04a45f06e45..3f56e5337e73 100644 --- a/sc/source/core/tool/rangelst.cxx +++ b/sc/source/core/tool/rangelst.cxx @@ -1440,53 +1440,49 @@ void ScRangePairList::Join( const ScRangePair& r, bool bIsInList ) Append( r ); return ; } -const ScRange& r1 = r.GetRange(0); -const ScRange& r2 = r.GetRange(1); -SCCOL nCol1 = r1.aStart.Col(); -SCROW nRow1 = r1.aStart.Row(); -SCTAB nTab1 = r1.aStart.Tab(); -SCCOL nCol2 = r1.aEnd.Col(); -SCROW nRow2 = r1.aEnd.Row(); -SCTAB nTab2 = r1.aEnd.Tab(); -ScRangePair* pOver = const_cast(&r); // nasty but true when bInList -size_t nOldPos = 0; -if ( bIsInList ) -{ -// Find the current position of this range. -for ( size_t i = 0, nPairs = maPairs.size(); i < nPairs; ++i ) -{ -if ( maPairs[i] == pOver ) -{ -nOldPos = i; -break; -} -} -} + bool bJoinedInput = false; +const ScRangePair* pOver = &r; -for ( size_t i = 0; i < maPairs.size() && pOver; ++i ) +Label_RangePair_Join: + +assert(pOver); +const ScRange& r1 = pOver->GetRange(0); +const ScRange& r2 = pOver->GetRange(1); +const SCCOL nCol1 = r1.aStart.Col(); +const SCROW nRow1 = r1.aStart.Row(); +const SCTAB nTab1 = r1.aStart.Tab(); +const SCCOL nCol2 = r1.aEnd.Col(); +const SCROW nRow2 = r1.aEnd.Row(); +const SCTAB nTab2 = r1.aEnd.Tab(); + +size_t nOverPos = std::numeric_limits::max(); +for (size_t i = 0; i < maPairs.size(); ++i) { ScRangePair* p = maPairs[ i ]; if ( p == pOver ) +{ +nOverPos = i; continue; // the same one, continue with the next +} bool bJoined = false; ScRange& rp1 = p->GetRange(0); ScRange& rp2 = p->GetRange(1); if ( rp2 == r2 ) { // only if Range2 is equal if ( rp1.In( r1 ) ) -{ // RangePair r included in or identical to RangePair p +{ // RangePair pOver included in or identical to RangePair p if ( bIsInList ) -bJoined = true; // do away with RangePair r +bJoined = true; // do away with RangePair pOver else { // that was all then -bJoinedInput = true;// don't attach +bJoinedInput = true;// don't append break; // for } } else if ( r1.In( rp1 ) ) -{ // RangePair p included in RangePair r, make r the new RangePair -*p = r; +{ // RangePair p included in RangePair pOver, make pOver the new RangePair +*p = *pOver; bJoined = true; } } @@ -1536,15 +1532,25 @@ void ScRangePairList::Join( const ScRangePair& r, bool bIsInList ) if ( bJoined ) { if ( bIsInList ) -{ // delete RangePair within the list -Remove( nOldPos ); -i--; -pOver = nullptr; -if ( nOldPos ) -nOldPos--; // configure seek correctly +{ // delete RangePair pOver within the list +if (nOverPos != std::numeric_limits::max()) +Remove(nOverPos); +else +{ +for (size_t nOver = 0, nPairs = maPairs.size(); nOver < nPairs; ++nOver) +{ +if (maPairs[nOver] == pOver) +{ +Remove(nOver); +break; +} +} +} } bJoinedInput = true; -Join( *p, true ); // recursive! +pOver = p; +bIsInList = true; +goto Label_RangePair_Join; } } if ( !bIsInList && !bJoinedInput ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/source
sc/source/core/tool/rangelst.cxx | 86 +-- 1 file changed, 47 insertions(+), 39 deletions(-) New commits: commit 03f429665b4d57f63b8e2862a55e5c4273bc7a2b Author: Eike Rathke Date: Mon Jan 22 19:55:38 2018 +0100 Flatten ScRangeList::Join() recursion Joining an existing list of identical ranges could end up in a very deep (but not infinite) recursion which could lead to stack exhaustion. Recursion is unnecessary if we re-enter the loop with the picked range. Continuing the loop as it was done after recursion isn't necessary either, to the contrary, as long as there is one join try the entire list again. Commit f6eefd96cb16a9b5607fe59bdbf9b1121c9b56e8 pointed this out as the UBSan build runs with ulimit -s 8192 Change-Id: Ibbc542fc8ae6d1509744aa731771eb6e32a38841 Reviewed-on: https://gerrit.libreoffice.org/48360 Reviewed-by: Eike Rathke Tested-by: Jenkins diff --git a/sc/source/core/tool/rangelst.cxx b/sc/source/core/tool/rangelst.cxx index a0f8ebe552c0..e04a45f06e45 100644 --- a/sc/source/core/tool/rangelst.cxx +++ b/sc/source/core/tool/rangelst.cxx @@ -207,12 +207,6 @@ void ScRangeList::Join( const ScRange& r, bool bIsInList ) Append( r ); return ; } -SCCOL nCol1 = r.aStart.Col(); -SCROW nRow1 = r.aStart.Row(); -SCTAB nTab1 = r.aStart.Tab(); -SCCOL nCol2 = r.aEnd.Col(); -SCROW nRow2 = r.aEnd.Row(); -SCTAB nTab2 = r.aEnd.Tab(); // One common usage is to join ranges that actually are top to bottom // appends but the caller doesn't exactly know about it, e.g. when invoked @@ -225,6 +219,7 @@ void ScRangeList::Join( const ScRange& r, bool bIsInList ) if (!bIsInList) { +const SCROW nRow1 = r.aStart.Row(); if (nRow1 > mnMaxRowUsed + 1) { Append( r ); @@ -235,9 +230,10 @@ void ScRangeList::Join( const ScRange& r, bool bIsInList ) // Check if we can simply enlarge the last range. ScRange* p = maRanges.back(); if (p->aEnd.Row() + 1 == nRow1 && -p->aStart.Col() == nCol1 && p->aEnd.Col() == nCol2 && -p->aStart.Tab() == nTab1 && p->aEnd.Tab() == nTab2) +p->aStart.Col() == r.aStart.Col() && p->aEnd.Col() == r.aEnd.Col() && +p->aStart.Tab() == r.aStart.Tab() && p->aEnd.Tab() == r.aEnd.Tab()) { +const SCROW nRow2 = r.aEnd.Row(); p->aEnd.SetRow( nRow2 ); mnMaxRowUsed = nRow2; return; @@ -245,43 +241,45 @@ void ScRangeList::Join( const ScRange& r, bool bIsInList ) } } -ScRange* pOver = const_cast(&r); // nasty but true when bInList -size_t nOldPos = 0; -if ( bIsInList ) -{ -// Find the current position of this range. -for ( size_t i = 0, nRanges = maRanges.size(); i < nRanges; ++i ) -{ -if ( maRanges[i] == pOver ) -{ -nOldPos = i; -break; -} -} -} bool bJoinedInput = false; +const ScRange* pOver = &r; + +Label_Range_Join: -// We need to query the size of the container dynamically since its size -// may change during the loop. -for ( size_t i = 0; i < maRanges.size() && pOver; ++i ) +assert(pOver); +const SCCOL nCol1 = pOver->aStart.Col(); +const SCROW nRow1 = pOver->aStart.Row(); +const SCCOL nTab1 = pOver->aStart.Tab(); +const SCCOL nCol2 = pOver->aEnd.Col(); +const SCROW nRow2 = pOver->aEnd.Row(); +const SCCOL nTab2 = pOver->aEnd.Tab(); + +size_t nOverPos = std::numeric_limits::max(); +for (size_t i = 0; i < maRanges.size(); ++i) { ScRange* p = maRanges[i]; if ( p == pOver ) +{ +nOverPos = i; continue; // the same one, continue with the next +} bool bJoined = false; -if ( p->In( r ) ) -{ //range r included in or identical to range p +if ( p->In( *pOver ) ) +{ // range pOver included in or identical to range p +// XXX if we never used Append() before Join() we could remove +// pOver and end processing, but it is not guranteed and there can +// be duplicates. if ( bIsInList ) -bJoined = true; // do away with range r +bJoined = true; // do away with range pOver else { // that was all then -bJoinedInput = true;// don't attach +bJoinedInput = true;// don't append break; // for } } -else if ( r.In( *p ) ) -{ // range p included in range r, make r the new range -*p = r; +else if ( pOver->In( *p ) ) +{ // range p included in range pOver, make pOver the new ran
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3-0' - debian/changelog loolwsd.spec.in
debian/changelog |6 ++ loolwsd.spec.in |2 +- 2 files changed, 7 insertions(+), 1 deletion(-) New commits: commit 1afb5e0bb1c01a5d076ef717c39b968c3d606457 Author: Andras Timar Date: Tue Jan 23 12:13:03 2018 +0100 Bump package version to 3.0.0-5 Change-Id: Ie26a2fc09f04302c762ac4c09bcf977c4602ab36 diff --git a/debian/changelog b/debian/changelog index e87841d1..e8f25a95 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +loolwsd (3.0.0-5) unstable; urgency=medium + + * see the git log: http://col.la/cool30 + + -- Andras Timar Tue, 23 Jan 2018 12:10:00 +0100 + loolwsd (3.0.0-4) unstable; urgency=medium * see the git log: http://col.la/cool30 diff --git a/loolwsd.spec.in b/loolwsd.spec.in index 15b5ff22..17abf38a 100644 --- a/loolwsd.spec.in +++ b/loolwsd.spec.in @@ -12,7 +12,7 @@ Name: loolwsd%{name_suffix} Name: loolwsd %endif Version:@PACKAGE_VERSION@ -Release:4%{?dist} +Release:5%{?dist} %if 0%{?suse_version} == 1110 Group: Productivity/Office/Suite BuildRoot: %{_tmppath}/%{name}-%{version}-build ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] help.git: source/text
source/text/shared/00/0208.xhp | 362 - 1 file changed, 198 insertions(+), 164 deletions(-) New commits: commit 94375babd75d8b611311bab682f9017e0485d19b Author: Laurent BP Date: Sun Dec 17 22:07:36 2017 +0100 tdf#113979 Skip empty cells option Add help for this new option. Correction help link for "Quoted text" option Change-Id: I8ce8ac8108408c9feb55a0b5dffbb44dea988c05 Reviewed-on: https://gerrit.libreoffice.org/46996 Reviewed-by: Olivier Hallot Tested-by: Olivier Hallot diff --git a/source/text/shared/00/0208.xhp b/source/text/shared/00/0208.xhp index 3ede289ea..24a6e0742 100644 --- a/source/text/shared/00/0208.xhp +++ b/source/text/shared/00/0208.xhp @@ -1,7 +1,5 @@ - - - + - +--> - - -Text Import -/text/shared/00/0208.xhp - + +Text Import +/text/shared/00/0208.xhp + + -Text Import -Sets the import options for delimited data. + + + +Text Import +Sets the import options for delimited data. + - + - + + -Import -Character Set -Specifies the character set to be used in the imported file. - - -Language -Determines how the number strings are imported. -If Language is set to Default (for CSV import) or Automatic (for HTML import), Calc will use the globally set language. If Language is set to a specific language, that language will be used when importing numbers. -When importing an HTML document, the Language selection can conflict with the global HTML option Use 'English (USA)' locale for numbers. The global HTML option is effective only when the Automatic language option is selected. If you select a specific language in the HTML Import Options dialog, the global HTML option is ignored. - - -From Row -Specifies the row where you want to start the import. The rows are visible in the preview window at the bottom of the dialog. -Separator Options -Specifies whether your data uses separators or fixed widths as delimiters. -Fixed width -Separates fixed-width data (equal number of characters) into columns. Click on the ruler in the preview window to set the width. -Separated by -Select the separator used in your data. -Tab -Separates data delimited by tabs into columns. -Semicolon -Separates data delimited by semicolons into columns. -Comma -Separates data delimited by commas into columns. -Space -Separates data delimited by spaces into columns. + +Import + + +Character Set +Specifies the character set to be used in the imported file. + + +Language +Determines how the number strings are imported. +If Language is set to Default (for CSV import) or Automatic (for HTML import), Calc will use the globally set language. If Language is set to a specific language, that language will be used when importing numbers. +When importing an HTML document, the Language selection can conflict with the global HTML option Use 'English (USA)' locale for numbers. The global HTML option is effective only when the Automatic language option is selected. If you select a specific language in the HTML Import Options dialog, the global HTML option is ignored. + + +From Row +Specifies the row where you want to start the import. The rows are visible in the preview window at the bottom of the dialog. + +Separator Options +Specifies whether your data uses separators or fixed widths as delimiters. + + +Fixed width +Separates fixed-width data (equal number of characters) into columns. Click on the ruler in the preview window to set the width. + + +Separated by +Select the separator used in your data. + + +Tab +Separates data delimited by tabs into columns. + + +Semicolon +Separates data delimited by semicolons into columns. + + +Comma +Separates data delimited by commas into columns. + + +Space +Separates data delimited by spaces into columns. -Other -Separates data into columns using the custom separator that you specify. Note: The custom separator must also be contained in your data. -Merge delimiters -Combines consecutive delimiters and removes blank data fields. -Text delimiter -Select a character to delimit text data. You can can also enter a character in the text box. + + +Other +Separates data into columns using the custom separator that you specify. Note: The custom separator must also be contained in your data. + +Merge delimiters +Combines consecutive delimiters and removes blank data fields. + +Text delimiter +Select a character to delimit text data. You can can also enter a character in the text box. -Other options -Sets some other import options. - -Quoted fields as text -When this option is enabled, fields or cells whose values are quoted in their entirety (the first and last characters of the value equal the text delimiter) are imported as text. +Other options +Sets some other import options. + +Quoted fields as text +When this option is enabled, fields or cells whose values are quoted in their ent
[Libreoffice-commits] core.git: sfx2/source
sfx2/source/explorer/nochaos.cxx | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) New commits: commit 746c89bf919d579fde0ff96eb379fa5d46601fae Author: Noel Grandin Date: Tue Jan 16 15:58:39 2018 +0200 loplugin:useuniqueptr in CntStaticPoolDefaults_Impl Change-Id: I8d7766d473499b4d154debc1aafaf03359078aa3 Reviewed-on: https://gerrit.libreoffice.org/48372 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sfx2/source/explorer/nochaos.cxx b/sfx2/source/explorer/nochaos.cxx index 2ba551d4662a..edb1a560765d 100644 --- a/sfx2/source/explorer/nochaos.cxx +++ b/sfx2/source/explorer/nochaos.cxx @@ -37,7 +37,7 @@ class CntItemPool; class CntStaticPoolDefaults_Impl { static const sal_uInt32 m_nItems = 1; -std::vector* m_pDefaults; +std::vector mvDefaults; std::unique_ptr m_pItemInfos; private: @@ -49,7 +49,7 @@ public: CntStaticPoolDefaults_Impl(const CntStaticPoolDefaults_Impl&) = delete; CntStaticPoolDefaults_Impl& operator=(const CntStaticPoolDefaults_Impl&) = delete; -std::vector* GetDefaults() const { return m_pDefaults; } +std::vector* GetDefaults() { return &mvDefaults; } const SfxItemInfo* GetItemInfos() const { return m_pItemInfos.get(); } }; @@ -161,7 +161,7 @@ inline void CntStaticPoolDefaults_Impl::Insert( { sal_uInt16 nPos = pItem->Which() - WID_CHAOS_START; -(*m_pDefaults)[ nPos ] = pItem; +mvDefaults[ nPos ] = pItem; m_pItemInfos[ nPos ]._nSID = 0; m_pItemInfos[ nPos ]._bPoolable = true; } @@ -170,14 +170,12 @@ inline void CntStaticPoolDefaults_Impl::Insert( CntStaticPoolDefaults_Impl::~CntStaticPoolDefaults_Impl() { for ( sal_uInt32 n = 0; n < m_nItems; ++n ) -delete (*m_pDefaults)[ n ]; - -delete m_pDefaults; +delete mvDefaults[ n ]; } CntStaticPoolDefaults_Impl::CntStaticPoolDefaults_Impl() -: m_pDefaults( new std::vector( m_nItems, nullptr ) ), +: mvDefaults( m_nItems, nullptr ), m_pItemInfos( new SfxItemInfo [ m_nItems ] ) { memset( m_pItemInfos.get(), 0, sizeof( SfxItemInfo ) * m_nItems ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Changes to 'refs/tags/CODE-3.0.0.1'
Tag 'CODE-3.0.0.1' created by Andras Timar at 2018-01-23 11:18 + CODE-3.0.0.1 Changes since CODE-3.0.0-63: --- 0 files changed --- ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: helpcontent2
helpcontent2 |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit f74cec2457664f4b32abcde7e874061b60ad665d Author: Laurent BP Date: Sun Dec 17 22:07:36 2017 +0100 Updated core Project: help 94375babd75d8b611311bab682f9017e0485d19b tdf#113979 Skip empty cells option Add help for this new option. Correction help link for "Quoted text" option Change-Id: I8ce8ac8108408c9feb55a0b5dffbb44dea988c05 Reviewed-on: https://gerrit.libreoffice.org/46996 Reviewed-by: Olivier Hallot Tested-by: Olivier Hallot diff --git a/helpcontent2 b/helpcontent2 index 995f740adfff..94375babd75d 16 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit 995f740adfff22aff1105a7e1b2801dfdab43434 +Subproject commit 94375babd75d8b611311bab682f9017e0485d19b ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/BorderlineFix' - 152 commits - accessibility/source android/source avmedia/source basctl/source basic/qa basic/source bridges/source canvas/source chart
Rebased ref, commits from common ancestor: commit 3789ce8e92f99ab438844ec31a7854d9489a88e0 Author: Armin Le Grand Date: Tue Jan 23 10:29:44 2018 +0100 BorderlineFix: Corrected handling for 'rotated' CellBorders CellBorders can be rotated (including their Text) and need special visualization that is based on an own sheared/rotated coordinate system. Currently only possible for single cells (not merged ones) and needs to handle all borders (also bottom-right directly in the rotated cell, not in the neighboured ones to have the geometry, plus avoiding these in the non-rotated neighbour cells. Also corrected adding CellRotation data to svx::frame::Array in calc using SetCellRotations() which now gets called in the ScOutputData constructor to ensure it gets called in all places where it is used. Change-Id: I47bdfc29ba5ca76bbc07d98cb64733f867b1ee20 diff --git a/sc/source/ui/inc/output.hxx b/sc/source/ui/inc/output.hxx index f23dabae3de0..c41433609b9e 100644 --- a/sc/source/ui/inc/output.hxx +++ b/sc/source/ui/inc/output.hxx @@ -255,6 +255,11 @@ private: long SetEngineTextAndGetWidth( DrawEditParam& rParam, const OUString& rSetString, long& rNeededPixel, long nAddWidthPixels ); +// Check for and set cell rotations at OutputData to have it available +// in the svx tooling to render the borders. Moved to private section +// and the single call to end of constructor to be sure this always happens +voidSetCellRotations(); + public: /** * @param nNewScrX: X-Offset in the output device for the table @@ -311,8 +316,6 @@ public: // with logic MapMode set! voidDrawEdit(bool bPixelToLogic); - -voidSetCellRotations(); voidDrawRotated(bool bPixelToLogic);// logical voidDrawClear(); diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index 22e07763decb..64cd440e9902 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -696,10 +696,6 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI pContentDev->SetMapMode(aCurrentMapMode); } -// check for and set cell rotations at OutputData to have it available -// in the svx tooling to render the borders -aOutputData.SetCellRotations(); - if ( rDoc.HasBackgroundDraw( nTab, aDrawingRectLogic ) ) { pContentDev->SetMapMode(MapMode(MapUnit::MapPixel)); diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx index bd3687cd1cd3..064bb14ce1a1 100644 --- a/sc/source/ui/view/output.cxx +++ b/sc/source/ui/view/output.cxx @@ -214,6 +214,9 @@ ScOutputData::ScOutputData( OutputDevice* pNewDev, ScOutputType eNewType, bTabProtected = mpDoc->IsTabProtected( nTab ); bLayoutRTL = mpDoc->IsLayoutRTL( nTab ); + +// always needed, so call at the end of the constructor +SetCellRotations(); } ScOutputData::~ScOutputData() diff --git a/svx/source/dialog/framelinkarray.cxx b/svx/source/dialog/framelinkarray.cxx index 096216210585..ab6db75799e3 100644 --- a/svx/source/dialog/framelinkarray.cxx +++ b/svx/source/dialog/framelinkarray.cxx @@ -1092,9 +1092,21 @@ drawinglayer::primitive2d::Primitive2DContainer Array::CreateB2DPrimitiveRange( const bool bFirstRow(nRow == nFirstRow); const bool bLastRow(nRow == nLastRow); +// handle rotation: If cell is rotated, handle lower/right edge inside +// this local geometry due to the created CoordinateSystem already representing +// the needed transformations. +const bool bRotated(rCell.IsRotated()); + +// Additionally avoid double-handling by supressing handling when self not roated, +// but above/left is rotated and thus already handled. Two directly connected +// rotated will paint/create both edges, they might be rotated differently. +const bool bSuppressAbove(!bRotated && nRow > nFirstRow && CELL(nCol, nRow - 1).IsRotated()); +const bool bSupressLeft(!bRotated && nCol > nFirstCol && CELL(nCol - 1, nRow).IsRotated()); + // create upper line for this Cell -if (!bOverlapY // true for first line in merged cells or cells -|| bFirstRow) // true for non_Calc usages of this tooling +if ((!bOverlapY // true for first line in merged cells or cells +|| bFirstRow) // true for non_Calc usages of this tooling +&& !bSuppressAbove) // true when above is not rotated, so edge is already handled (see bRotated) { // get CellStyle - method will take care to get the correct one, e.g. // for merged cells (it uses ORIGCELL that works with top
[Libreoffice-commits] core.git: helpcontent2
helpcontent2 |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 3f161c012dd68ff08ff3538ef69f2800bd84640d Author: Ilmari Lauhakangas Date: Mon Jan 22 16:48:08 2018 +0200 Updated core Project: help 995f740adfff22aff1105a7e1b2801dfdab43434 Use list.js for Index listing and search List.js - http://listjs.com/ - allows us to paginate the results so the height does not get out of hand. Fuzzy search would be cool: http://listjs.com/docs/fuzzysearch/ ...but it gives too big of a perf hit with our 5700 items. Might try to bribe the creator to look into perf. Thanks a lot to David Tardon for the makefile solution and to Christian Lohmaier for playing a rubber duck. Change-Id: I359eed541470ccaa309b0b6ff5d809a796d9befd Reviewed-on: https://gerrit.libreoffice.org/48335 Reviewed-by: Olivier Hallot Tested-by: Olivier Hallot diff --git a/helpcontent2 b/helpcontent2 index d8623712ce85..995f740adfff 16 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit d8623712ce8523cd6d29116a5bd903e1d7edbd62 +Subproject commit 995f740adfff22aff1105a7e1b2801dfdab43434 ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - vcl/osx
vcl/osx/salnativewidgets.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 2b6db99279fcfbbe3ba3720f92c36b8ecd49635a Author: Telesto Date: Mon Jan 22 16:49:21 2018 +0200 tdf#112153: Set button theme properly Change-Id: I0665880c0d0348fcbb3bcf04d9172405c8e31eb7 Reviewed-on: https://gerrit.libreoffice.org/48334 Tested-by: Jenkins Reviewed-by: Tor Lillqvist (cherry picked from commit 44af50465a02b6f5566be45913a34fdbdba90133) Reviewed-on: https://gerrit.libreoffice.org/48385 diff --git a/vcl/osx/salnativewidgets.cxx b/vcl/osx/salnativewidgets.cxx index 42add9e30d5a..7db66ac1ac77 100644 --- a/vcl/osx/salnativewidgets.cxx +++ b/vcl/osx/salnativewidgets.cxx @@ -106,11 +106,11 @@ static ThemeButtonValue ImplGetButtonValue( ButtonValue aButtonValue ) break; case ButtonValue::Off: +case ButtonValue::DontKnow: return kThemeButtonOff; break; case ButtonValue::Mixed: -case ButtonValue::DontKnow: default: return kThemeButtonMixed; break; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - config_host/config_gtk3_kde5.h.in config_host/config_vclplug.h.in config_host.mk.in configure.ac postprocess/Rdb_services.mk Repository.mk shell/Library_kde
Repository.mk |7 config_host.mk.in |1 config_host/config_gtk3_kde5.h.in | 10 config_host/config_vclplug.h.in|1 configure.ac | 31 + postprocess/Rdb_services.mk|3 shell/Library_kde5be.mk| 32 + shell/Module_shell.mk |6 shell/source/backends/desktopbe/desktopbackend.cxx |4 shell/source/backends/kde5be/kde5access.cxx| 316 +++ shell/source/backends/kde5be/kde5access.hxx| 48 + shell/source/backends/kde5be/kde5backend.cxx | 252 + shell/source/backends/kde5be/kde5be1.component | 25 vcl/CustomTarget_gtk3_kde5_moc.mk | 22 vcl/Executable_lo_kde5filepicker.mk| 99 +++ vcl/Library_vclplug_gtk3_kde5.mk | 128 vcl/Module_vcl.mk |7 vcl/unx/generic/plugadapt/salplug.cxx |5 vcl/unx/gtk3_kde5/FPServiceInfo.hxx| 28 + vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkaction.cxx | 12 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkbridge.cxx | 12 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkcomponent.cxx | 12 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkeditabletext.cxx | 12 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkfactory.cxx| 12 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkhypertext.cxx | 12 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkimage.cxx | 12 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atklistener.cxx | 12 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkregistry.cxx | 12 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkselection.cxx | 12 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atktable.cxx | 12 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atktext.cxx | 12 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atktextattributes.cxx | 12 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkutil.cxx | 12 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkvalue.cxx | 12 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkwindow.cxx | 12 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkwrapper.cxx| 12 vcl/unx/gtk3_kde5/filepicker_ipc_commands.hxx | 170 ++ vcl/unx/gtk3_kde5/gtk3_kde5_a11y.cxx | 38 + vcl/unx/gtk3_kde5/gtk3_kde5_cairo.cxx | 22 vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx | 456 + vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.hxx | 139 + vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx | 201 +++ vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.hxx | 109 vcl/unx/gtk3_kde5/gtk3_kde5_folderpicker.cxx | 88 +++ vcl/unx/gtk3_kde5/gtk3_kde5_folderpicker.hxx | 61 ++ vcl/unx/gtk3_kde5/gtk3_kde5_gloactiongroup.cxx | 22 vcl/unx/gtk3_kde5/gtk3_kde5_glomenu.cxx| 22 vcl/unx/gtk3_kde5/gtk3_kde5_gtkdata.cxx| 22 vcl/unx/gtk3_kde5/gtk3_kde5_gtkframe.cxx | 22 vcl/unx/gtk3_kde5/gtk3_kde5_gtkinst.cxx| 55 ++ vcl/unx/gtk3_kde5/gtk3_kde5_gtkobject.cxx | 22 vcl/unx/gtk3_kde5/gtk3_kde5_gtksalmenu.cxx | 22 vcl/unx/gtk3_kde5/gtk3_kde5_gtksys.cxx | 22 vcl/unx/gtk3_kde5/gtk3_kde5_hudawareness.cxx | 22 vcl/unx/gtk3_kde5/gtk3_kde5_printwrapper.cxx | 22 vcl/unx/gtk3_kde5/gtk3_kde5_salnativewidgets-gtk.cxx | 22 vcl/unx/gtk3_kde5/gtk3_kde5_salprn-gtk.cxx | 22 vcl/unx/gtk3_kde5/kde5_filepicker.cxx | 283 ++ vcl/unx/gtk3_kde5/kde5_filepicker.hxx | 113 vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx | 223 vcl/unx/gtk3_kde5/kde5_filepicker_ipc.hxx | 45 + vcl/unx/gtk3_kde5/kde5_lo_filepicker_main.cxx | 39 + 62 files changed, 3508 insertions(+), 5 deletions(-) New commits: commit ecb5fcff336c8b0e5ad2503f0880c439a6c323a5 Author: Milian Wolff Date: Wed Jan 10 17:50:43 2018 +0100 Introduce gtk3_kde5 vcl plugin This is a hybrid plugin which mostly wraps the GTK3 vclplug. Only the file and folder picker are replaced by KDE dialogs. This gives us a well-maintained GTK LO base with basic KDE integration with minimum effort. To prevent issues with nested event loops, the KDE dialogs are launched from a separate process, the new lo_kde5filepicker helper executable. A trivial stdin/stdout IPC mechanism transfers the data between LO and the Qt/KDE helper. The usage of an external process also allows us to copy'n'paste between LO and the KDE file dialog without freezing the UI, as would happen when one would do this in-process. This is in general also the architecture
[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - vcl/source
vcl/source/gdi/pdfwriter_impl.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 905edcb273c629a149e7bcd212376e2c962a1c0b Author: Caolán McNamara Date: Mon Jan 22 17:37:33 2018 + its defineresource not define resource regression from commit 64d624b65124ac02d8ee59b135593fd9d8eb9067 Date: Sat Jan 9 22:55:28 2016 +0100 Fix typos Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86 Reviewed-on: https://gerrit.libreoffice.org/21209 Tested-by: Jenkins Change-Id: Ifdf45e97b81523c84c73b93d14ed75b7b6909f77 Reviewed-on: https://gerrit.libreoffice.org/48356 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 34161b7ca35a..03b1a1d9e12d 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -3082,7 +3082,7 @@ sal_Int32 PDFWriterImpl::createToUnicodeCMap( sal_uInt8 const * pEncoding, } aContents.append( "endbfchar\n" "endcmap\n" - "CMapName currentdict /CMap define resource pop\n" + "CMapName currentdict /CMap defineresource pop\n" "end\n" "end\n" ); SvMemoryStream aStream; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - configure.ac vcl/unx
configure.ac |4 ++ vcl/unx/gtk3_kde5/kde5_filepicker.cxx | 45 ++ vcl/unx/gtk3_kde5/kde5_filepicker.hxx |3 -- vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx | 27 ++ 4 files changed, 35 insertions(+), 44 deletions(-) New commits: commit f1b60bd62daff4aaf6465caadd4ad0c447521102 Author: Milian Wolff Date: Mon Jan 22 17:06:00 2018 +0100 Support opening of (some) remote URLs through the KDE file dialog LO already supports http, https, webdav and webdavs through the WebDAVContentProvider. Ftp is supported via FTPContentProvider and then finally we have the GIOContentProvider that can potentially support SMB, if the dependencies for that are met. We now configure the KDE file dialog to allow these remote protocols. Note that this filtering depends on https://phabricator.kde.org/D10024 and https://phabricator.kde.org/D10025 to have any effect. Then we rewrite the URLs we receive from KIO to a format that is supported by LO. Most notably, we prepend `vnd.sun.star.` to the webdav URL schemes, such that they get picked up by the WebDAVContentProvider. Then finally, we clear the username from the smb:// URLs we get from KIO, as that prevents GIO from opening them. In all cases, the user will get prompted a second time for the credentials required to access the remote resource. This is unfortunate, but better than nothing. In the future, we may solve this issue through either a separate KIO UCP or by getting support for the FDO Secret Service specification in KWallet. Change-Id: I91df28434b115639c2698968e2a672b3320bf8e2 Reviewed-on: https://gerrit.libreoffice.org/48350 Tested-by: Jenkins Reviewed-by: Thorsten Behrens diff --git a/vcl/unx/gtk3_kde5/kde5_filepicker.cxx b/vcl/unx/gtk3_kde5/kde5_filepicker.cxx index db7d04cf7d4a..456ba645808b 100644 --- a/vcl/unx/gtk3_kde5/kde5_filepicker.cxx +++ b/vcl/unx/gtk3_kde5/kde5_filepicker.cxx @@ -32,17 +32,6 @@ #include #include -// The dialog should check whether LO also supports the protocol -// provided by KIO, and KFileWidget::dirOperator() is only 4.3+ . -// Moreover it's only in this somewhat internal KFileWidget class, -// which may not necessarily be what QFileDialog::fileWidget() returns, -// but that's hopefully not a problem in practice. -//#if Qt_VERSION_MAJOR == 4 && Qt_VERSION_MINOR >= 2 -//#define ALLOW_REMOTE_URLS 1 -//#else -#define ALLOW_REMOTE_URLS 0 -//#endif - // KDE5FilePicker KDE5FilePicker::KDE5FilePicker(QObject* parent) @@ -53,16 +42,15 @@ KDE5FilePicker::KDE5FilePicker(QObject* parent) , _winId(0) , allowRemoteUrls(false) { -#if ALLOW_REMOTE_URLS -if (KFileWidget* fileWidget = dynamic_cast(_dialog->fileWidget())) -{ -allowRemoteUrls = true; -// Use finishedLoading signal rather than e.g. urlEntered, because if there's a problem -// such as the URL being mistyped, there's no way to prevent two message boxes about it, -// one from us and one from Qt code. -connect(fileWidget->dirOperator(), SIGNAL(finishedLoading()), SLOT(checkProtocol())); -} -#endif +_dialog->setSupportedSchemes({ +QStringLiteral("file"), +QStringLiteral("ftp"), +QStringLiteral("http"), +QStringLiteral("https"), +QStringLiteral("webdav"), +QStringLiteral("webdavs"), +QStringLiteral("smb"), +}); setMultiSelectionMode(false); @@ -245,21 +233,6 @@ void SAL_CALL KDE5FilePicker::initialize(bool saveDialog) } } -void KDE5FilePicker::checkProtocol() -{ -// There's no libreoffice.desktop :(, so find a matching one. -/* -KService::List services = KServiceTypeTrader::self()->query( "Application", "Exec =~ 'libreoffice %U'" ); -QStringList protocols; -if( !services.isEmpty()) -protocols = services[ 0 ]->property( "X-Qt-Protocols" ).toStringList(); -if( protocols.isEmpty()) // incorrect (developer?) installation ? -protocols << "file" << "http"; -if( !protocols.contains( _dialog->baseUrl().protocol()) && !protocols.contains( "KIO" )) -KMessageBox::error( _dialog, KIO::buildErrorString( KIO::ERR_UNSUPPORTED_PROTOCOL, _dialog->baseUrl().protocol())); -*/ -} - void KDE5FilePicker::setWinId(sal_uIntPtr winId) { _winId = winId; } bool KDE5FilePicker::eventFilter(QObject* o, QEvent* e) diff --git a/vcl/unx/gtk3_kde5/kde5_filepicker.hxx b/vcl/unx/gtk3_kde5/kde5_filepicker.hxx index 8b364832c6af..25c7454f86b5 100644 --- a/vcl/unx/gtk3_kde5/kde5_filepicker.hxx +++ b/vcl/unx/gtk3_kde5/kde5_filepicker.hxx @@ -102,9 +102,6 @@ private: protected: bool eventFilter(QObject* watched, QEvent* event) override; -private Q_SLOTS: -void checkProtocol(); - Q_SIGNALS: void filterChanged(); void selectionChanged(); diff --git a/vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx b
[Libreoffice-commits] core.git: vcl/unx
vcl/unx/kde5/KDE5SalDisplay.cxx |2 +- vcl/unx/kde5/KDE5XLib.cxx | 16 +--- vcl/unx/kde5/KDE5XLib.hxx |2 +- vcl/unx/kde5/main.cxx |2 +- 4 files changed, 12 insertions(+), 10 deletions(-) New commits: commit 0e2e5d247ababc8aeb0c041364938cd5cf9e55c2 Author: Katarina Behrens Date: Thu Jan 18 10:31:55 2018 +0100 Band aid fix build --with-kde5 Change-Id: Ifbcfdbb74bffaf88296351ec72536e16a4073b60 Reviewed-on: https://gerrit.libreoffice.org/48102 Tested-by: Jenkins Reviewed-by: Thorsten Behrens diff --git a/vcl/unx/kde5/KDE5SalDisplay.cxx b/vcl/unx/kde5/KDE5SalDisplay.cxx index 319f475317eb..dbb44aff648a 100644 --- a/vcl/unx/kde5/KDE5SalDisplay.cxx +++ b/vcl/unx/kde5/KDE5SalDisplay.cxx @@ -58,7 +58,7 @@ void SalKDE5Display::Yield() if (XEventsQueued( pDisp_, QueuedAfterReading ) == 0) return; -DBG_ASSERT( static_cast(GetSalData()->m_pInstance->GetYieldMutex())->GetThreadId() == +DBG_ASSERT( GetSalData()->m_pInstance->GetYieldMutex()->IsCurrentThread() == osl::Thread::getCurrentIdentifier(), "will crash soon since solar mutex not locked in SalKDE5Display::Yield" ); diff --git a/vcl/unx/kde5/KDE5XLib.cxx b/vcl/unx/kde5/KDE5XLib.cxx index a9c43ee7c752..952254176edd 100644 --- a/vcl/unx/kde5/KDE5XLib.cxx +++ b/vcl/unx/kde5/KDE5XLib.cxx @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include @@ -96,7 +96,7 @@ KDE5XLib::~KDE5XLib() void KDE5XLib::Init() { -m_pInputMethod = new SalI18N_InputMethod; +m_pInputMethod.reset(new SalI18N_InputMethod); m_pInputMethod->SetLocale(); XrmInitialize(); @@ -208,7 +208,7 @@ static GPollFunc old_gpoll = nullptr; static gint gpoll_wrapper( GPollFD* ufds, guint nfds, gint timeout ) { -SalYieldMutexReleaser release; // release YieldMutex (and re-acquire at block end) +SolarMutexReleaser release; // release YieldMutex (and re-acquire at block end) return old_gpoll( ufds, nfds, timeout ); } #endif @@ -304,7 +304,7 @@ bool KDE5XLib::Yield( bool bWait, bool bHandleAllCurrentEvents ) // release the yield lock to prevent deadlock with the main thread // (it's ok to release it here, since even normal processYield() would // temporarily do it while checking for new events) -SalYieldMutexReleaser aReleaser; +SolarMutexReleaser aReleaser; Q_EMIT processYieldSignal( bWait, bHandleAllCurrentEvents ); return false; } @@ -370,10 +370,10 @@ void KDE5XLib::Wakeup() QAbstractEventDispatcher::instance( qApp->thread())->wakeUp(); // main thread event loop } -void KDE5XLib::PostUserEvent() +void KDE5XLib::TriggerUserEventProcessing() { if( !m_isGlibEventLoopType ) -return SalXLib::PostUserEvent(); +return SalXLib::TriggerUserEventProcessing(); QApplication::postEvent(this, new QEvent(QEvent::Type( m_postUserEventId ))); } @@ -394,9 +394,11 @@ uno::Reference< ui::dialogs::XFilePicker2 > KDE5XLib::createFilePicker( { #if QT5_HAVE_GLIB if( qApp->thread() != QThread::currentThread()) { -SalYieldMutexReleaser aReleaser; +SolarMutexReleaser aReleaser; return Q_EMIT createFilePickerSignal( xMSF ); } + +return nullptr; //return uno::Reference< ui::dialogs::XFilePicker2 >( new KDE4FilePicker( xMSF ) ); #else (void)xMSF; diff --git a/vcl/unx/kde5/KDE5XLib.hxx b/vcl/unx/kde5/KDE5XLib.hxx index 4bd99ab3bbd7..867a55a3f269 100644 --- a/vcl/unx/kde5/KDE5XLib.hxx +++ b/vcl/unx/kde5/KDE5XLib.hxx @@ -84,7 +84,7 @@ class KDE5XLib : public QObject, public QAbstractNativeEventFilter, public SalXL virtual void StartTimer( sal_uLong nMS ) override; virtual void StopTimer() override; virtual void Wakeup() override; -virtual void PostUserEvent() override; +virtual void TriggerUserEventProcessing(); void doStartup(); bool allowKdeDialogs() { return m_allowKdeDialogs; } diff --git a/vcl/unx/kde5/main.cxx b/vcl/unx/kde5/main.cxx index 654a9d654ee8..ad9b8234eb1d 100644 --- a/vcl/unx/kde5/main.cxx +++ b/vcl/unx/kde5/main.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include +#include #include "KDE5Data.hxx" #include "KDE5SalInstance.hxx" ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - sw/source
sw/source/filter/html/htmlsect.cxx |7 ++- sw/source/filter/html/swhtml.cxx |1 + sw/source/filter/html/swhtml.hxx | 11 +-- 3 files changed, 16 insertions(+), 3 deletions(-) New commits: commit 6fde78f1904243a4121c75f7c96711ed54cf787f Author: Caolán McNamara Date: Tue Jan 2 17:19:32 2018 + ofz: assert on trying to insert footer when already inserting the footer Reviewed-on: https://gerrit.libreoffice.org/47272 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara (cherry picked from commit 834cebd153573eea3cc321eca5bcb572b4776dec) Change-Id: I1fd91cca4aec91700f7db233b420fe27752d659b Reviewed-on: https://gerrit.libreoffice.org/48380 Reviewed-by: Michael Stahl Tested-by: Jenkins diff --git a/sw/source/filter/html/htmlsect.cxx b/sw/source/filter/html/htmlsect.cxx index 436508a5e377..a63b788137fb 100644 --- a/sw/source/filter/html/htmlsect.cxx +++ b/sw/source/filter/html/htmlsect.cxx @@ -138,8 +138,11 @@ void SwHTMLParser::NewDivision( HtmlTokenId nToken ) } } -if( !bPositioned && (bHeader || bFooter) && IsNewDoc() ) +if (!bPositioned && (bHeader || bFooter) && IsNewDoc() && !m_bReadingHeaderOrFooter) { +m_bReadingHeaderOrFooter = true; +pCntxt->SetHeaderOrFooter(true); + SwPageDesc *pPageDesc = m_pCSS1Parser->GetMasterPageDesc(); SwFrameFormat& rPageFormat = pPageDesc->GetMaster(); @@ -402,6 +405,8 @@ void SwHTMLParser::EndDivision() // close attribute EndContext( pCntxt ); SetAttr(); // set paragraph attributes really fast because of JavaScript +if (pCntxt->IsHeaderOrFooter()) +m_bReadingHeaderOrFooter = false; delete pCntxt; } diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index 057dc3ad4c04..3b18ef33328a 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -297,6 +297,7 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, SwPaM& rCursor, SvStream& rIn, m_bIgnoreHTMLComments( bNoHTMLComments ), m_bRemoveHidden( false ), m_bBodySeen( false ), +m_bReadingHeaderOrFooter( false ), m_pTempViewFrame(nullptr) { m_nEventId = nullptr; diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx index 66f7837704ae..450f7ddbde56 100644 --- a/sw/source/filter/html/swhtml.hxx +++ b/sw/source/filter/html/swhtml.hxx @@ -225,6 +225,7 @@ class HTMLAttrContext boolbRestartPRE : 1; boolbRestartXMP : 1; boolbRestartListing : 1; +boolbHeaderOrFooter : 1; public: void ClearSaveDocContext(); @@ -249,7 +250,8 @@ public: bFinishPREListingXMP( false ), bRestartPRE( false ), bRestartXMP( false ), -bRestartListing( false ) +bRestartListing( false ), +bHeaderOrFooter( false ) {} explicit HTMLAttrContext( HtmlTokenId nTokn ) : @@ -270,7 +272,8 @@ public: bFinishPREListingXMP( false ), bRestartPRE( false ), bRestartXMP( false ), -bRestartListing( false ) +bRestartListing( false ), +bHeaderOrFooter( false ) {} ~HTMLAttrContext() { ClearSaveDocContext(); } @@ -320,6 +323,9 @@ public: void SetRestartListing( bool bSet ) { bRestartListing = bSet; } bool IsRestartListing() const { return bRestartListing; } +void SetHeaderOrFooter( bool bSet ) { bHeaderOrFooter = bSet; } +bool IsHeaderOrFooter() const { return bHeaderOrFooter; } + void SetAppendMode( SwHTMLAppendMode eMode ) { eAppend = eMode; } SwHTMLAppendMode GetAppendMode() const { return eAppend; } }; @@ -473,6 +479,7 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient bool m_bRemoveHidden : 1; // the filter implementation might set the hidden flag bool m_bBodySeen : 1; +bool m_bReadingHeaderOrFooter : 1; /// the names corresponding to the DOCINFO field subtypes INFO[1-4] OUString m_InfoNames[4]; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sfx2/source
sfx2/source/bastyp/bitset.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit fa193512431c71b3230b29deda4fc7d8ba5a99a1 Author: Stephan Bergmann Date: Tue Jan 23 08:39:29 2018 +0100 Translate German SAL_WARN message Change-Id: Ica04ee68f18ec6c1e0cd59a0f35ab35ce3c05745 Reviewed-on: https://gerrit.libreoffice.org/48374 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sfx2/source/bastyp/bitset.cxx b/sfx2/source/bastyp/bitset.cxx index f13461c32de1..d0b5ddaeaf57 100644 --- a/sfx2/source/bastyp/bitset.cxx +++ b/sfx2/source/bastyp/bitset.cxx @@ -103,7 +103,7 @@ sal_uInt16 IndexBitSet::GetFreeIndex() *this|=i; return i; } - SAL_WARN( "sfx", "IndexBitSet enthaelt mehr als SAL_MAX_UINT16 Eintraege"); + SAL_WARN( "sfx", "IndexBitSet contains more than SAL_MAX_UINT16 entries"); return 0; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - vcl/source
vcl/source/gdi/pdfwriter_impl.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 75520f7c427237e10f751c685012dcb86a345836 Author: Caolán McNamara Date: Mon Jan 22 17:37:33 2018 + its defineresource not define resource regression from commit 64d624b65124ac02d8ee59b135593fd9d8eb9067 Date: Sat Jan 9 22:55:28 2016 +0100 Fix typos Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86 Reviewed-on: https://gerrit.libreoffice.org/21209 Tested-by: Jenkins Change-Id: Ifdf45e97b81523c84c73b93d14ed75b7b6909f77 Reviewed-on: https://gerrit.libreoffice.org/48357 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 025adf8afd6d..62f75b8a82ae 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -3117,7 +3117,7 @@ sal_Int32 PDFWriterImpl::createToUnicodeCMap( sal_uInt8* pEncoding, } aContents.append( "endbfchar\n" "endcmap\n" - "CMapName currentdict /CMap define resource pop\n" + "CMapName currentdict /CMap defineresource pop\n" "end\n" "end\n" ); SvMemoryStream aStream; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - vcl/osx
vcl/osx/vclnsapp.mm |5 + 1 file changed, 5 insertions(+) New commits: commit 5163257c0d194f534887d92c6c9658640eeef3e1 Author: Telesto Date: Mon Jan 22 15:16:52 2018 +0200 tdf#114985: Tell NSWindow to never use automatic window tabbing Based on https://codereview.chromium.org/2325313002/ Change-Id: I8838449d57b1d1b010491a405c87645d38199fdf Reviewed-on: https://gerrit.libreoffice.org/48330 Tested-by: Jenkins Reviewed-by: Tor Lillqvist (cherry picked from commit ce88f2a7374bb8c53d57e8263e0701db19d62f30) Reviewed-on: https://gerrit.libreoffice.org/48384 diff --git a/vcl/osx/vclnsapp.mm b/vcl/osx/vclnsapp.mm index 473c8d7f9a30..a4f00e32c4f0 100644 --- a/vcl/osx/vclnsapp.mm +++ b/vcl/osx/vclnsapp.mm @@ -75,6 +75,11 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH SAL_WNODEPRECATED_DECLARATIONS_POP assert( pEvent ); [NSApp postEvent: pEvent atStart: NO]; + +if( [NSWindow respondsToSelector:@selector(allowsAutomaticWindowTabbing)] ) +{ +NSWindow.allowsAutomaticWindowTabbing = NO; +} } -(void)sendEvent:(NSEvent*)pEvent ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: xmlreader/source
xmlreader/source/xmlreader.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit a6b53b5461c7d1ad2895d25691661f865bdb183e Author: Stephan Bergmann Date: Tue Jan 23 14:17:03 2018 +0100 Silence -Werror=implicit-fallthrough= (upcoming GCC 8) Earlier GCC already require a similar workaround to silence -Werror=return-type ("control reaches end of non-void function") a few lines further down, so it's rather consequential that GCC now also warns about the potential fall-through here (i.e., for these warnings, GCC apparently assumes that an enum can take on all of the values from its range of values, not just those denoted by an enumerator). Change-Id: I1537a7f6975f900861225ee7a521366a5e57046a diff --git a/xmlreader/source/xmlreader.cxx b/xmlreader/source/xmlreader.cxx index d6fe61f8363f..8e544b6a07d0 100644 --- a/xmlreader/source/xmlreader.cxx +++ b/xmlreader/source/xmlreader.cxx @@ -134,7 +134,7 @@ XmlReader::Result XmlReader::nextItem(Text reportText, Span * data, int * nsId) return handleSkippedText(data, nsId); case Text::Raw: return handleRawText(data); -case Text::Normalized: +default: // Text::Normalized return handleNormalizedText(data); } case State::StartTag: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3-0' - debian/control loolwsd.spec.in
debian/control |2 +- loolwsd.spec.in |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit 7e087932cc1245e93c69ffec101836bdb75bb2c7 Author: Andras Timar Date: Tue Jan 23 12:15:41 2018 +0100 Require Collabora Office 5.3-37 Change-Id: Id68d34985db010f4e6ce0909b5a9f8f7d186e2dc diff --git a/debian/control b/debian/control index d82f9908..70c3b78b 100644 --- a/debian/control +++ b/debian/control @@ -8,7 +8,7 @@ Standards-Version: 3.9.7 Package: loolwsd Section: web Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, fontconfig, libsm6, libxinerama1, libgl1-mesa-glx, libcups2, cpio, libcap2-bin, libxcb-render0, libxcb-shm0, libxrandr2, collaboraofficebasis5.3-calc (>= 5.3.10.36), collaboraofficebasis5.3-core (>= 5.3.10.36), collaboraofficebasis5.3-graphicfilter (>= 5.3.10.36), collaboraofficebasis5.3-images (>= 5.3.10.36), collaboraofficebasis5.3-impress (>= 5.3.10.36), collaboraofficebasis5.3-ooofonts (>= 5.3.10.36), collaboraofficebasis5.3-writer (>= 5.3.10.36), collaboraoffice5.3 (>= 5.3.10.36), collaboraoffice5.3-ure (>= 5.3.10.36), collaboraofficebasis5.3-en-us (>= 5.3.10.36), collaboraofficebasis5.3-en-us-calc (>= 5.3.10.36), collaboraofficebasis5.3-en-us-res (>= 5.3.10.36), collaboraofficebasis5.3-noto-fonts (>= 5.3.10.36), collaboraofficebasis5.3-draw (>= 5.3.10.36), collaboraofficebasis5.3-extension-pdf-import (>= 5.3.10.36), collaboraofficebasis5.3-filter-data (>= 5.3.10.36) +Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, fontconfig, libsm6, libxinerama1, libgl1-mesa-glx, libcups2, cpio, libcap2-bin, libxcb-render0, libxcb-shm0, libxrandr2, collaboraofficebasis5.3-calc (>= 5.3.10.37), collaboraofficebasis5.3-core (>= 5.3.10.37), collaboraofficebasis5.3-graphicfilter (>= 5.3.10.37), collaboraofficebasis5.3-images (>= 5.3.10.37), collaboraofficebasis5.3-impress (>= 5.3.10.37), collaboraofficebasis5.3-ooofonts (>= 5.3.10.37), collaboraofficebasis5.3-writer (>= 5.3.10.37), collaboraoffice5.3 (>= 5.3.10.37), collaboraoffice5.3-ure (>= 5.3.10.37), collaboraofficebasis5.3-en-us (>= 5.3.10.37), collaboraofficebasis5.3-en-us-calc (>= 5.3.10.37), collaboraofficebasis5.3-en-us-res (>= 5.3.10.37), collaboraofficebasis5.3-noto-fonts (>= 5.3.10.37), collaboraofficebasis5.3-draw (>= 5.3.10.37), collaboraofficebasis5.3-extension-pdf-import (>= 5.3.10.37), collaboraofficebasis5.3-filter-data (>= 5.3.10.37) Conflicts: collaboraofficebasis5.3-gnome-integration, collaboraofficebasis5.3-kde-integration Description: LibreOffice Online WebSocket Daemon LOOLWSD is a daemon that talks to web browser clients and provides LibreOffice diff --git a/loolwsd.spec.in b/loolwsd.spec.in index 17abf38a..7d269f7f 100644 --- a/loolwsd.spec.in +++ b/loolwsd.spec.in @@ -38,7 +38,7 @@ BuildRequires: libcap-progs linux-glibc-devel systemd-rpm-macros BuildRequires: libcap-progs %endif -Requires: collaboraoffice5.3 >= 5.3.10.36 collaboraoffice5.3-ure >= 5.3.10.36 collaboraofficebasis5.3-core >= 5.3.10.36 collaboraofficebasis5.3-writer >= 5.3.10.36 collaboraofficebasis5.3-impress >= 5.3.10.36 collaboraofficebasis5.3-graphicfilter >= 5.3.10.36 collaboraofficebasis5.3-en-US >= 5.3.10.36 collaboraofficebasis5.3-calc >= 5.3.10.36 collaboraofficebasis5.3-en-US-res >= 5.3.10.36 collaboraofficebasis5.3-en-US-calc >= 5.3.10.36 collaboraofficebasis5.3-ooofonts >= 5.3.10.36 collaboraofficebasis5.3-images >= 5.3.10.36 collaboraofficebasis5.3-noto-fonts >= 5.3.10.36 collaboraofficebasis5.3-draw >= 5.3.10.36 collaboraofficebasis5.3-extension-pdf-import >= 5.3.10.36 collaboraofficebasis5.3-filter-data >= 5.3.10.36 +Requires: collaboraoffice5.3 >= 5.3.10.37 collaboraoffice5.3-ure >= 5.3.10.37 collaboraofficebasis5.3-core >= 5.3.10.37 collaboraofficebasis5.3-writer >= 5.3.10.37 collaboraofficebasis5.3-impress >= 5.3.10.37 collaboraofficebasis5.3-graphicfilter >= 5.3.10.37 collaboraofficebasis5.3-en-US >= 5.3.10.37 collaboraofficebasis5.3-calc >= 5.3.10.37 collaboraofficebasis5.3-en-US-res >= 5.3.10.37 collaboraofficebasis5.3-en-US-calc >= 5.3.10.37 collaboraofficebasis5.3-ooofonts >= 5.3.10.37 collaboraofficebasis5.3-images >= 5.3.10.37 collaboraofficebasis5.3-noto-fonts >= 5.3.10.37 collaboraofficebasis5.3-draw >= 5.3.10.37 collaboraofficebasis5.3-extension-pdf-import >= 5.3.10.37 collaboraofficebasis5.3-filter-data >= 5.3.10.37 Conflicts: collaboraofficebasis5.3-kde-integration collaboraofficebasis5.3-gnome-integration Requires(post): coreutils grep sed %if 0%{?rhel} == 6 ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: config_host/config_kde5.h.in config_host/config_vclplug.h.in config_host.mk.in configure.ac RepositoryExternal.mk Repository.mk scp2/InstallScript_setup_osl.mk scp2/Mod
Repository.mk |1 + RepositoryExternal.mk | 35 +++ config_host.mk.in |4 config_host/config_kde5.h.in| 10 ++ config_host/config_vclplug.h.in |1 + configure.ac| 27 --- scp2/InstallScript_setup_osl.mk |2 +- scp2/Module_scp2.mk |2 +- vcl/Module_vcl.mk |1 + 9 files changed, 78 insertions(+), 5 deletions(-) New commits: commit 4d78cf97d7b1629556df68fc461922fda930d9ec Author: Milian Wolff Date: Wed Jan 10 16:26:10 2018 +0100 Extend build system to support linking against KDE Frameworks 5 Pass --enable-kde5 to autogen.sh to enable this feature. Then add kde5 to the list of externals to link against KF5. I will introduce other code that depends on KF5 though which will leverage this feature. Change-Id: I17e434a53ac769000b0f805b1f41cdc5c2c84ee2 Reviewed-on: https://gerrit.libreoffice.org/47715 Tested-by: Jenkins Reviewed-by: Thorsten Behrens diff --git a/Repository.mk b/Repository.mk index dcb201a904b9..d7b1847591c4 100644 --- a/Repository.mk +++ b/Repository.mk @@ -299,6 +299,7 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,kde, \ $(if $(ENABLE_KDE4),kde4be1) \ $(if $(USING_X11), \ $(if $(ENABLE_KDE4),vclplug_kde4) \ + $(if $(ENABLE_KDE5),vclplug_kde5) \ $(if $(ENABLE_QT5),vclplug_qt5) \ ) \ )) diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk index a795db70e4a0..94f2bd333d28 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -3066,6 +3066,41 @@ endef endif # ENABLE_KDE4 + +ifeq ($(ENABLE_KDE5),TRUE) + +define gb_LinkTarget__use_kde5 +$(call gb_LinkTarget_set_include,$(1),\ + $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS \ + $$(INCLUDE) \ +) + +$(call gb_LinkTarget_add_defs,$(1),\ + $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS))) \ +) + +$(call gb_LinkTarget_add_libs,$(1),\ + $(KF5_LIBS) \ +) + +ifeq ($(COM),GCC) +$(call gb_LinkTarget_add_cxxflags,$(1),\ + -Wno-shadow \ +) +endif + +endef + +else # !ENABLE_KDE5 + +define gb_LinkTarget__use_kde5 + +endef + +endif # ENABLE_KDE5 + + + ifeq ($(ENABLE_QT5),TRUE) define gb_LinkTarget__use_qt5 diff --git a/config_host.mk.in b/config_host.mk.in index cf9cefbd0fc8..d5630a5b4537 100644 --- a/config_host.mk.in +++ b/config_host.mk.in @@ -157,6 +157,7 @@ export ENABLE_PCH=@ENABLE_PCH@ export ENABLE_PDFIMPORT=@ENABLE_PDFIMPORT@ export ENABLE_PDFIUM=@ENABLE_PDFIUM@ export ENABLE_QT5=@ENABLE_QT5@ +export ENABLE_KDE5=@ENABLE_KDE5@ export ENABLE_RANDR=@ENABLE_RANDR@ export ENABLE_RELEASE_BUILD=@ENABLE_RELEASE_BUILD@ export ENABLE_REPORTBUILDER=@ENABLE_REPORTBUILDER@ @@ -299,6 +300,9 @@ export KDE4_GLIB_LIBS=$(gb_SPACE)@KDE4_GLIB_LIBS@ export KDE4_HAVE_GLIB=@KDE4_HAVE_GLIB@ export KF5_CFLAGS=$(gb_SPACE)@KF5_CFLAGS@ export KF5_LIBS=$(gb_SPACE)@KF5_LIBS@ +export KF5_GLIB_CFLAGS=$(gb_SPACE)@KF5_GLIB_CFLAGS@ +export KF5_GLIB_LIBS=$(gb_SPACE)@KF5_GLIB_LIBS@ +export KF5_HAVE_GLIB=@KF5_HAVE_GLIB@ export KRB5_LIBS=@KRB5_LIBS@ export LCMS2_CFLAGS=$(gb_SPACE)@LCMS2_CFLAGS@ export LCMS2_LIBS=$(gb_SPACE)@LCMS2_LIBS@ diff --git a/config_host/config_kde5.h.in b/config_host/config_kde5.h.in new file mode 100644 index ..af42a5edcf6a --- /dev/null +++ b/config_host/config_kde5.h.in @@ -0,0 +1,10 @@ +/* +Settings for KDE5 integration. +*/ + +#ifndef CONFIG_KDE5_H +#define CONFIG_KDE5_H + +#define KDE5_HAVE_GLIB 0 + +#endif diff --git a/config_host/config_vclplug.h.in b/config_host/config_vclplug.h.in index 510d0d25229c..b7b9624cdf79 100644 --- a/config_host/config_vclplug.h.in +++ b/config_host/config_vclplug.h.in @@ -9,5 +9,6 @@ Settings about which X11 desktops have support enabled. #define ENABLE_GTK 0 #define ENABLE_KDE4 0 +#define ENABLE_KDE5 0 #endif diff --git a/configure.ac b/configure.ac index e60822d9df26..ce9b28feba0f 100644 --- a/configure.ac +++ b/configure.ac @@ -593,6 +593,7 @@ linux-gnu*|k*bsd*-gnu*) build_gstreamer_1_0=yes build_gstreamer_0_10=yes test_kde4=yes +test_kde5=yes test_qt5=yes if test "$enable_fuzzers" != yes; then test_freetype=yes @@ -688,6 +689,7 @@ freebsd*) build_gstreamer_1_0=yes build_gstreamer_0_10=yes test_kde4=yes +test_kde5=yes test_qt5=yes test_freetype=yes AC_MSG_CHECKING([the FreeBSD operating system release]) @@ -717,6 +719,7 @@ freebsd*) build_gstreamer_1_0=yes build_gstreamer_0_10=yes test_kde4=yes +test_kde5=yes test_qt5=yes test_freetype=yes PTHREAD_LIBS="-pthread -lpthread" @@ -743,6 +746,7 @@ dragonfly*) build_gstreamer_1_0=yes build_gstreamer_0_10=yes test_kde4=yes +test_kde5=yes test_qt5=yes test_freetype=yes PT
[Libreoffice-commits] core.git: vcl/inc vcl/quartz
vcl/inc/quartz/salgdi.h |3 +-- vcl/quartz/ctfonts.cxx | 14 +++--- 2 files changed, 8 insertions(+), 9 deletions(-) New commits: commit 43836528f445061d622b8edc7773ee40798d3a59 Author: Tor Lillqvist Date: Mon Jan 22 20:57:24 2018 +0200 The CT prefix is used by the CoreText API Surely we should not be using it for our own things in our Quartz code, that is misleading. Also bin a silly typedef. Change-Id: Ie932e8784128246ca449608aad3dc96a575ec9d5 diff --git a/vcl/inc/quartz/salgdi.h b/vcl/inc/quartz/salgdi.h index 17faec998c26..4016fcb4a2cc 100644 --- a/vcl/inc/quartz/salgdi.h +++ b/vcl/inc/quartz/salgdi.h @@ -126,8 +126,7 @@ private: CTFontCollectionRef mpCTFontCollection; CFArrayRef mpCTFontArray; -typedef std::unordered_map CTFontContainer; -CTFontContainer maFontContainer; +std::unordered_map maFontContainer; }; diff --git a/vcl/quartz/ctfonts.cxx b/vcl/quartz/ctfonts.cxx index b7389c895568..fbdf2efe89a3 100644 --- a/vcl/quartz/ctfonts.cxx +++ b/vcl/quartz/ctfonts.cxx @@ -441,7 +441,7 @@ FontAttributes DevFontFromCTFontDescriptor( CTFontDescriptorRef pFD, bool* bFont return rDFA; } -static void CTFontEnumCallBack( const void* pValue, void* pContext ) +static void fontEnumCallBack( const void* pValue, void* pContext ) { CTFontDescriptorRef pFD = static_cast(pValue); @@ -464,8 +464,8 @@ SystemFontList::SystemFontList() SystemFontList::~SystemFontList() { -CTFontContainer::const_iterator it = maFontContainer.begin(); -for(; it != maFontContainer.end(); ++it ) +auto it = maFontContainer.cbegin(); +for(; it != maFontContainer.cend(); ++it ) { delete (*it).second; } @@ -489,8 +489,8 @@ void SystemFontList::AddFont( CoreTextFontFace* pFontData ) void SystemFontList::AnnounceFonts( PhysicalFontCollection& rFontCollection ) const { -CTFontContainer::const_iterator it = maFontContainer.begin(); -for(; it != maFontContainer.end(); ++it ) +auto it = maFontContainer.cbegin(); +for(; it != maFontContainer.cend(); ++it ) { rFontCollection.Add( (*it).second->Clone() ); } @@ -498,7 +498,7 @@ void SystemFontList::AnnounceFonts( PhysicalFontCollection& rFontCollection ) co CoreTextFontFace* SystemFontList::GetFontDataFromId( sal_IntPtr nFontId ) const { -CTFontContainer::const_iterator it = maFontContainer.find( nFontId ); +auto it = maFontContainer.find( nFontId ); if( it == maFontContainer.end() ) { return nullptr; @@ -522,7 +522,7 @@ bool SystemFontList::Init() const int nFontCount = CFArrayGetCount( mpCTFontArray ); const CFRange aFullRange = CFRangeMake( 0, nFontCount ); -CFArrayApplyFunction( mpCTFontArray, aFullRange, CTFontEnumCallBack, this ); +CFArrayApplyFunction( mpCTFontArray, aFullRange, fontEnumCallBack, this ); return true; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sal/qa
sal/qa/rtl/math/test-rtl-math.cxx | 71 ++ 1 file changed, 71 insertions(+) New commits: commit f16fdfa559ab62ccde2c2c0cbe1fc9e5ca2f3630 Author: Takeshi Abe Date: Sun Dec 10 01:17:49 2017 +0900 Add unit tests for rtl::math's inverse hyperbolic functions based on i#97605's test cases. Change-Id: Id7e57914553ba8801a624f667979badc191108e5 Reviewed-on: https://gerrit.libreoffice.org/46152 Tested-by: Jenkins Reviewed-by: Eike Rathke diff --git a/sal/qa/rtl/math/test-rtl-math.cxx b/sal/qa/rtl/math/test-rtl-math.cxx index 116cc6009fcc..3e718940b097 100644 --- a/sal/qa/rtl/math/test-rtl-math.cxx +++ b/sal/qa/rtl/math/test-rtl-math.cxx @@ -25,6 +25,7 @@ #include #include #include +#include CPPUNIT_NS_BEGIN @@ -344,6 +345,73 @@ public: CPPUNIT_ASSERT_EQUAL(true,rtl::math::isNan(res)); } +void test_acosh() { +double res; + +res = rtl::math::acosh(-1.0); // NaN +CPPUNIT_ASSERT(rtl::math::isNan(res)); + +res = rtl::math::acosh(0.0); // NaN +CPPUNIT_ASSERT(rtl::math::isNan(res)); + +res = rtl::math::acosh(0.5); // NaN +CPPUNIT_ASSERT(rtl::math::isNan(res)); + +CPPUNIT_ASSERT_EQUAL(0.0, rtl::math::acosh(1.0)); + +res = rtl::math::acosh(std::numeric_limits::infinity()); // +Inf +CPPUNIT_ASSERT(!rtl::math::isSignBitSet(res)); +CPPUNIT_ASSERT(rtl::math::isInf(res)); + +// #i97605 +CPPUNIT_ASSERT_DOUBLES_EQUAL(692.56728736744176, rtl::math::acosh(3e+300), 1e-15); +CPPUNIT_ASSERT_DOUBLES_EQUAL(0.014142017775252324, rtl::math::acosh(1.0001), 1e-15); +} + +void test_asinh() { +double res; + +res = rtl::math::asinh(-std::numeric_limits::infinity()); // -Inf +CPPUNIT_ASSERT(rtl::math::isSignBitSet(res)); +CPPUNIT_ASSERT(rtl::math::isInf(res)); + +CPPUNIT_ASSERT_EQUAL(0.0, rtl::math::asinh(0.0)); + +res = rtl::math::asinh(std::numeric_limits::infinity()); // +Inf +CPPUNIT_ASSERT(!rtl::math::isSignBitSet(res)); +CPPUNIT_ASSERT(rtl::math::isInf(res)); + +// #i97605 +CPPUNIT_ASSERT_DOUBLES_EQUAL(691.67568924815798, rtl::math::asinh(1.23e+300), 1e-15); +CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0350378961923076, rtl::math::asinh(1.23), 1e-16); +CPPUNIT_ASSERT_DOUBLES_EQUAL(1.23e-300, rtl::math::asinh(1.23e-300), 1e-303); + +// asinh is an odd function +CPPUNIT_ASSERT_EQUAL(-rtl::math::asinh(1.23e+300), rtl::math::asinh(-1.23e+300)); +CPPUNIT_ASSERT_EQUAL(-rtl::math::asinh(1.23), rtl::math::asinh(-1.23)); +CPPUNIT_ASSERT_EQUAL(-rtl::math::asinh(1.23e-300), rtl::math::asinh(-1.23e-300)); +} + +void test_atanh() { +double res; + +res = rtl::math::atanh(-2.0); // NaN +CPPUNIT_ASSERT(rtl::math::isNan(res)); + +res = rtl::math::atanh(-1.0); // -Inf +CPPUNIT_ASSERT(rtl::math::isSignBitSet(res)); +CPPUNIT_ASSERT(rtl::math::isInf(res)); + +CPPUNIT_ASSERT_EQUAL(0.0, rtl::math::atanh(0.0)); + +res = rtl::math::atanh(1.0); // +Inf +CPPUNIT_ASSERT(!rtl::math::isSignBitSet(res)); +CPPUNIT_ASSERT(rtl::math::isInf(res)); + +res = rtl::math::atanh(2.0); // NaN +CPPUNIT_ASSERT(rtl::math::isNan(res)); +} + CPPUNIT_TEST_SUITE(Test); CPPUNIT_TEST(test_stringToDouble_good); CPPUNIT_TEST(test_stringToDouble_bad); @@ -354,6 +422,9 @@ public: CPPUNIT_TEST(test_expm1); CPPUNIT_TEST(test_log1p); CPPUNIT_TEST(test_approx); +CPPUNIT_TEST(test_acosh); +CPPUNIT_TEST(test_asinh); +CPPUNIT_TEST(test_atanh); CPPUNIT_TEST_SUITE_END(); }; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: external/boost
external/boost/include/boost/process/child.hpp | 26 + 1 file changed, 26 insertions(+) New commits: commit 862d2fc5c3736c6bb0c1ee54bd195c502fe17d28 Author: Stephan Bergmann Date: Tue Jan 23 15:04:03 2018 +0100 Silence -Werror,-Wundef in external/boost > [CXX] vcl/unx/gtk3_kde5/gtk3_kde5_folderpicker.cxx > In file included from vcl/unx/gtk3_kde5/gtk3_kde5_folderpicker.cxx:20: > In file included from vcl/unx/gtk3_kde5/gtk3_kde5_folderpicker.hxx:30: > In file included from vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.hxx:29: > In file included from workdir/UnpackedTarball/boost/boost/process/child.hpp:22: > In file included from workdir/UnpackedTarball/boost/boost/process/detail/execute_impl.hpp:24: > workdir/UnpackedTarball/boost/boost/process/detail/posix/executor.hpp:446:5: error: 'BOOST_POSIX_HAS_VFORK' is not defined, evaluates to 0 [-Werror,-Wundef] > #if BOOST_POSIX_HAS_VFORK > ^ under --enable-gtk3-kde5 Change-Id: Ib4648d1337a493c35b35897dc71c5e971c6eb214 diff --git a/external/boost/include/boost/process/child.hpp b/external/boost/include/boost/process/child.hpp new file mode 100644 index ..ac32598b7370 --- /dev/null +++ b/external/boost/include/boost/process/child.hpp @@ -0,0 +1,26 @@ +/* generated by bin/gen-boost-headers, do not edit! */ +#pragma once +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wpragmas" /* first! for GCC */ +#pragma GCC diagnostic ignored "-Wunknown-warning-option" // second! for Clang 5 +#pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor" +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#pragma GCC diagnostic ignored "-Wextra" +#pragma GCC diagnostic ignored "-Wignored-qualifiers" +#pragma GCC diagnostic ignored "-Wimplicit-fallthrough" +#pragma GCC diagnostic ignored "-Winvalid-constexpr" +#pragma GCC diagnostic ignored "-Wmicrosoft-unqualified-friend" +#pragma GCC diagnostic ignored "-Wnon-virtual-dtor" +#pragma GCC diagnostic ignored "-Wplacement-new" +#pragma GCC diagnostic ignored "-Wreturn-type" +#pragma GCC diagnostic ignored "-Wshadow" +#pragma GCC diagnostic ignored "-Wstrict-aliasing" +#pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" +#pragma GCC diagnostic ignored "-Wtype-limits" +#pragma GCC diagnostic ignored "-Wundef" +#pragma GCC diagnostic ignored "-Wunused-local-typedefs" +#pragma GCC diagnostic ignored "-Wunused-macros" +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wunused-variable" +#include_next +#pragma GCC diagnostic pop ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/unx
vcl/unx/gtk3_kde5/filepicker_ipc_commands.hxx | 13 +--- vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx | 27 - vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.hxx |4 +-- vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx | 14 ++-- vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.hxx | 12 ++- vcl/unx/gtk3_kde5/gtk3_kde5_folderpicker.hxx |2 - 6 files changed, 28 insertions(+), 44 deletions(-) New commits: commit e3ee065312e295300fb25457e18344225eeffbd4 Author: Stephan Bergmann Date: Tue Jan 23 15:06:52 2018 +0100 Various loplugin in --enable-gtk3-kde5 code Change-Id: Ic12464f01950a5037bb6819a2722aba5a7e3e2e6 diff --git a/vcl/unx/gtk3_kde5/filepicker_ipc_commands.hxx b/vcl/unx/gtk3_kde5/filepicker_ipc_commands.hxx index 3aef6da858b1..8ce8cfa9e78d 100644 --- a/vcl/unx/gtk3_kde5/filepicker_ipc_commands.hxx +++ b/vcl/unx/gtk3_kde5/filepicker_ipc_commands.hxx @@ -80,13 +80,7 @@ inline void readIpcArg(std::istream& stream, Commands& value) value = static_cast(v); } -inline void readIpcArg(std::istream& stream, sal_Bool& value) -{ -bool v = false; -stream >> v; -value = v; -stream.ignore(); // skip space -} +void readIpcArg(std::istream&, sal_Bool) = delete; inline void readIpcArg(std::istream& stream, bool& value) { @@ -133,10 +127,7 @@ inline void sendIpcArg(std::ostream& stream, Commands value) stream << static_cast(value) << ' '; } -inline void sendIpcArg(std::ostream& stream, sal_Bool value) -{ -stream << static_cast(value) << ' '; -} +void sendIpcArg(std::ostream&, sal_Bool) = delete; inline void sendIpcArg(std::ostream& stream, bool value) { stream << value << ' '; } diff --git a/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx b/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx index 28c0af2047aa..7372d476f55e 100644 --- a/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx +++ b/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx @@ -38,9 +38,9 @@ #undef Region -#include "unx/geninst.h" +#include -#include "strings.hrc" +#include #include @@ -64,7 +64,7 @@ namespace bf = boost::filesystem; namespace { -uno::Sequence SAL_CALL FilePicker_getSupportedServiceNames() +uno::Sequence FilePicker_getSupportedServiceNames() { uno::Sequence aRet(3); aRet[0] = "com.sun.star.ui.dialogs.FilePicker"; @@ -107,7 +107,7 @@ sal_Int16 SAL_CALL Gtk3KDE5FilePicker::execute() { return m_ipc.execute(); } void SAL_CALL Gtk3KDE5FilePicker::setMultiSelectionMode(sal_Bool multiSelect) { -m_ipc.sendCommand(Commands::SetMultiSelectionMode, multiSelect); +m_ipc.sendCommand(Commands::SetMultiSelectionMode, bool(multiSelect)); } void SAL_CALL Gtk3KDE5FilePicker::setDefaultName(const OUString& name) @@ -176,9 +176,9 @@ void SAL_CALL Gtk3KDE5FilePicker::appendFilterGroup(const OUString& /*rGroupTitl void SAL_CALL Gtk3KDE5FilePicker::setValue(sal_Int16 controlId, sal_Int16 nControlAction, const uno::Any& value) { -if (value.has()) +if (value.has()) { -m_ipc.sendCommand(Commands::SetValue, controlId, nControlAction, value.get()); +m_ipc.sendCommand(Commands::SetValue, controlId, nControlAction, value.get()); } else { @@ -198,7 +198,7 @@ uno::Any SAL_CALL Gtk3KDE5FilePicker::getValue(sal_Int16 controlId, sal_Int16 nC auto id = m_ipc.sendCommand(Commands::GetValue, controlId, nControlAction); -sal_Bool value = false; +bool value = false; m_ipc.readResponse(id, value); return uno::Any(value); @@ -206,7 +206,7 @@ uno::Any SAL_CALL Gtk3KDE5FilePicker::getValue(sal_Int16 controlId, sal_Int16 nC void SAL_CALL Gtk3KDE5FilePicker::enableControl(sal_Int16 controlId, sal_Bool enable) { -m_ipc.sendCommand(Commands::EnableControl, controlId, enable); +m_ipc.sendCommand(Commands::EnableControl, controlId, bool(enable)); } void SAL_CALL Gtk3KDE5FilePicker::setLabel(sal_Int16 controlId, const OUString& label) @@ -284,7 +284,7 @@ void Gtk3KDE5FilePicker::addCustomControl(sal_Int16 controlId) { // the checkbox is created even for CHECKBOX_AUTOEXTENSION to simplify // code, but the checkbox is hidden and ignored -sal_Bool hidden = controlId == CHECKBOX_AUTOEXTENSION; +bool hidden = controlId == CHECKBOX_AUTOEXTENSION; m_ipc.sendCommand(Commands::AddCheckBox, controlId, hidden, getResString(resId)); @@ -308,8 +308,7 @@ void SAL_CALL Gtk3KDE5FilePicker::initialize(const uno::Sequence& args uno::Any arg; if (args.getLength() == 0) { -throw lang::IllegalArgumentException(OUString("no arguments"), - static_cast(this), 1); +throw lang::IllegalArgumentException("no arguments", static_cast(this), 1); } arg = args[0]; @@ -317,14 +316,14 @@ void SAL_CALL Gtk3KDE5FilePicker::initialize(const uno::Sequence& args if ((arg.
[Libreoffice-commits] online.git: Branch 'libreoffice-6-0' - loleaflet/dist
loleaflet/dist/loleaflet.html |2 ++ 1 file changed, 2 insertions(+) New commits: commit 22f840b75cf422989194b8ab74cb063e46420eaf Author: Tor Lillqvist Date: Tue Jan 16 14:16:06 2018 +0200 Add closing tag that was accidentally removed in 328df11a689684be0e13b1778b67d5a7648e9989 Change-Id: I0d0c1eda84f421838c55c223731898167f497ec7 (cherry picked from commit 149714f5b3cd7fff87da08ba0ab2554cc78071e5) Reviewed-on: https://gerrit.libreoffice.org/48419 Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist diff --git a/loleaflet/dist/loleaflet.html b/loleaflet/dist/loleaflet.html index 83c93898..28f54a20 100644 --- a/loleaflet/dist/loleaflet.html +++ b/loleaflet/dist/loleaflet.html @@ -23,6 +23,8 @@ + +
[Libreoffice-commits] online.git: Branch 'libreoffice-6-0' - loleaflet/src
loleaflet/src/control/Toolbar.js |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit c02008ad919c35af6fed8f499bc56b4bb465a19c Author: Jan Holesovsky Date: Tue Jan 9 11:47:34 2018 +0100 loleaflet: The document name must not contain spaces. Change-Id: Icd6815c5644d42c009bb003cecc100527f6ee0a4 Reviewed-on: https://gerrit.libreoffice.org/47650 Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky (cherry picked from commit be59061b6d29ae37ec530aee55f02b103d8988b0) Reviewed-on: https://gerrit.libreoffice.org/48420 Reviewed-by: Andras Timar Tested-by: Andras Timar diff --git a/loleaflet/src/control/Toolbar.js b/loleaflet/src/control/Toolbar.js index 337188a0..6d5e7ae9 100644 --- a/loleaflet/src/control/Toolbar.js +++ b/loleaflet/src/control/Toolbar.js @@ -73,7 +73,7 @@ L.Map.include({ this.showBusy(_('Downloading...'), false); this._socket.sendMessage('downloadas ' + - 'name=' + name + ' ' + + 'name=' + encodeURIComponent(name) + ' ' + 'id=' + id + ' ' + 'format=' + format + ' ' + 'options=' + options); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
Re: Render differences of DOCX between Word and LO/AOO
Hi Jens, Jens Tröger schrieb am 23.01.2018 um 04:26: Hello, I am not sure if this forum is the right place to bring up this topic for discussion, or if another one is more appropriate; please advise. This list is for developers to discuss problems in the code. For discussion about using LibreOffice use the list us...@global.libreoffice.org or use Ask. https://www.libreoffice.org/get-help/mailing-lists/ https://wiki.documentfoundation.org/Ask/Getting_Started If you speak about a specific document, you should make the document available somewhere. The us...@global.libreoffice.org list does not allow attachments. Kind regards Regina ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: vcl/quartz
vcl/quartz/ctfonts.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 407546e7c3f8c732ccf60e5fb3844f6efb86f932 Author: Tor Lillqvist Date: Tue Jan 23 15:04:00 2018 +0200 tdf#69254: Tweak mapping from CoreText weight to our FontWeight a bit Make the mapping of light weights more likely to hit different enum values for slightly different weights. We want to be able to distinguish between for instance Overpass Light (with weight -0.4) and Overpass ExtraLight (with weight -0.5). Change-Id: If83fbce68149b267a49ef9bcb6624d8790de7c56 Reviewed-on: https://gerrit.libreoffice.org/48409 Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist diff --git a/vcl/quartz/ctfonts.cxx b/vcl/quartz/ctfonts.cxx index fbdf2efe89a3..dbe4eb2cb96e 100644 --- a/vcl/quartz/ctfonts.cxx +++ b/vcl/quartz/ctfonts.cxx @@ -392,7 +392,7 @@ FontAttributes DevFontFromCTFontDescriptor( CTFontDescriptorRef pFD, bool* bFont } else if( fWeight < 0 ) { -nInt = rint(WEIGHT_NORMAL + fWeight * ((WEIGHT_NORMAL - WEIGHT_THIN)/0.9)); +nInt = rint(WEIGHT_NORMAL + fWeight * ((WEIGHT_NORMAL - WEIGHT_THIN)/0.8)); if( nInt < WEIGHT_THIN ) { nInt = WEIGHT_THIN; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sc/qa sc/source
sc/qa/unit/rangelst_test.cxx | 57 +++ sc/source/core/tool/rangelst.cxx | 12 +--- 2 files changed, 65 insertions(+), 4 deletions(-) New commits: commit c0c65bfa65f33d9756ba1e4f58ebc691e321089f Author: Tor Lillqvist Date: Thu Sep 14 21:11:27 2017 +0300 Handle also the case where a range extends an existing one with overlap Check for a new range being joined Extending an existing one in any of four directions (up, right, down, left), within a tab (sheet), that is. And add unit test for this. Reviewed-on: https://gerrit.libreoffice.org/42304 Reviewed-by: Eike Rathke Tested-by: Eike Rathke (cherry picked from commit 596efaad51735a130e7b7bd27dbc34dc07f32f68) Change-Id: I4bd0525c2837f8b4b9d5a8967e0d5d661c6a5e2f Reviewed-on: https://gerrit.libreoffice.org/48410 Tested-by: Jenkins Reviewed-by: Tor Lillqvist diff --git a/sc/qa/unit/rangelst_test.cxx b/sc/qa/unit/rangelst_test.cxx index dce700164ecd..79c57364e209 100644 --- a/sc/qa/unit/rangelst_test.cxx +++ b/sc/qa/unit/rangelst_test.cxx @@ -44,6 +44,8 @@ public: void testDeleteArea_0Ranges(); void testJoin_Case1(); void testJoin_Case2(); +void testJoin_Case3(); +void testJoin_Case4(); void testGetIntersectedRange(); void testUpdateReference_DeleteRow(); @@ -72,6 +74,8 @@ public: CPPUNIT_TEST(testDeleteArea_0Ranges); CPPUNIT_TEST(testJoin_Case1); CPPUNIT_TEST(testJoin_Case2); +CPPUNIT_TEST(testJoin_Case3); +CPPUNIT_TEST(testJoin_Case4); CPPUNIT_TEST(testUpdateReference_DeleteRow); CPPUNIT_TEST(testUpdateReference_DeleteLastRow); CPPUNIT_TEST(testUpdateReference_DeleteCol); @@ -424,6 +428,59 @@ void Test::testJoin_Case2() CPPUNIT_ASSERT_EQUAL(ScRange(1,1,0,9,3,0), *aList[0]); } +void Test::testJoin_Case3() +{ +ScRangeList aList; +aList.Join(ScRange(1,1,0,6,6,0)); +aList.Join(ScRange(3,3,0,4,4,0)); + +// The second one should have been swallowed by the first one +CPPUNIT_ASSERT_EQUAL(static_cast(1), aList.size()); +CPPUNIT_ASSERT_EQUAL(ScRange(1,1,0,6,6,0), *aList[0]); + +// Add a disjoint one +aList.Join(ScRange(8,8,0,9,9,0)); + +// Should be two ones now +CPPUNIT_ASSERT_EQUAL(static_cast(2), aList.size()); +// The first one should still be as is +CPPUNIT_ASSERT_EQUAL(ScRange(1,1,0,6,6,0), *aList[0]); +// Ditto for the second one +CPPUNIT_ASSERT_EQUAL(ScRange(8,8,0,9,9,0), *aList[1]); +} + +void Test::testJoin_Case4() +{ +ScRangeList aList; +aList.Join(ScRange(1,1,0,2,6,0)); +// Join a range that overlaps it and extends it vertically +aList.Join(ScRange(1,4,0,2,8,0)); + +// The one range in the list should have been extended +CPPUNIT_ASSERT_EQUAL(static_cast(1), aList.size()); +CPPUNIT_ASSERT_EQUAL(ScRange(1,1,0,2,8,0), *aList[0]); + +// Join a range that overlaps it and extends it horizontally +aList.Join(ScRange(2,1,0,4,8,0)); + +// Again, should have just been extended +CPPUNIT_ASSERT_EQUAL(static_cast(1), aList.size()); +CPPUNIT_ASSERT_EQUAL(ScRange(1,1,0,4,8,0), *aList[0]); + +// And then the same but on top / to the left of existing range +ScRangeList aList2; +aList2.Join(ScRange(4,4,0,8,8,0)); +aList2.Join(ScRange(4,1,0,8,6,0)); + +CPPUNIT_ASSERT_EQUAL(static_cast(1), aList2.size()); +CPPUNIT_ASSERT_EQUAL(ScRange(4,1,0,8,8,0), *aList2[0]); + +aList2.Join(ScRange(1,1,0,6,8,0)); + +CPPUNIT_ASSERT_EQUAL(static_cast(1), aList2.size()); +CPPUNIT_ASSERT_EQUAL(ScRange(1,1,0,8,8,0), *aList2[0]); +} + void Test::testUpdateReference_DeleteRow() { ScRangeList aList(ScRange(1,1,0,4,4,0)); diff --git a/sc/source/core/tool/rangelst.cxx b/sc/source/core/tool/rangelst.cxx index 5ae74f9c0f3d..19fed29aba75 100644 --- a/sc/source/core/tool/rangelst.cxx +++ b/sc/source/core/tool/rangelst.cxx @@ -299,12 +299,14 @@ void ScRangeList::Join( const ScRange& r, bool bIsInList ) { // 2D if ( p->aStart.Col() == nCol1 && p->aEnd.Col() == nCol2 ) { -if ( p->aStart.Row() == nRow2+1 ) +if ( p->aStart.Row() <= nRow2+1 && + p->aStart.Row() >= nRow1 ) { // top p->aStart.SetRow( nRow1 ); bJoined = true; } -else if ( p->aEnd.Row() == nRow1-1 ) +else if ( p->aEnd.Row() >= nRow1-1 && + p->aEnd.Row() <= nRow2 ) { // bottom p->aEnd.SetRow( nRow2 ); bJoined = true; @@ -312,12 +314,14 @@ void ScRangeList::Join( const ScRange& r, bool bIsInList ) } else if ( p->aStart.Row() == nRow1 && p->aEnd.Row() == nRow2 ) { -if ( p->aStart.Col() == nCol2+1 ) +if ( p->aStart.Col() <= nCol2+1 && + p->aSt
[Libreoffice-commits] core.git: vcl/unx
vcl/unx/gtk3_kde5/kde5_filepicker.cxx | 44 ++ vcl/unx/gtk3_kde5/kde5_filepicker.hxx | 30 - vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx |7 ++-- vcl/unx/gtk3_kde5/kde5_filepicker_ipc.hxx |2 - vcl/unx/gtk3_kde5/kde5_lo_filepicker_main.cxx |4 +- 5 files changed, 39 insertions(+), 48 deletions(-) New commits: commit c73f88de8bc6f892ff1215c5f634ff0bfca04553 Author: Stephan Bergmann Date: Tue Jan 23 15:49:40 2018 +0100 Various loplugin in --enable-gtk3-kde5 code Change-Id: I006e7fddcb58edb597867e0dd6f2b81ddac3457e diff --git a/vcl/unx/gtk3_kde5/kde5_filepicker.cxx b/vcl/unx/gtk3_kde5/kde5_filepicker.cxx index 456ba645808b..9b3f21db92e9 100644 --- a/vcl/unx/gtk3_kde5/kde5_filepicker.cxx +++ b/vcl/unx/gtk3_kde5/kde5_filepicker.cxx @@ -72,9 +72,9 @@ KDE5FilePicker::~KDE5FilePicker() delete _dialog; } -void SAL_CALL KDE5FilePicker::setTitle(const QString& title) { _dialog->setWindowTitle(title); } +void KDE5FilePicker::setTitle(const QString& title) { _dialog->setWindowTitle(title); } -bool SAL_CALL KDE5FilePicker::execute() +bool KDE5FilePicker::execute() { if (!_filters.isEmpty()) _dialog->setNameFilters(_filters); @@ -86,29 +86,20 @@ bool SAL_CALL KDE5FilePicker::execute() return _dialog->exec() == QFileDialog::Accepted; } -void SAL_CALL KDE5FilePicker::setMultiSelectionMode(bool multiSelect) +void KDE5FilePicker::setMultiSelectionMode(bool multiSelect) { _dialog->setFileMode(multiSelect ? QFileDialog::ExistingFiles : QFileDialog::ExistingFile); } -void SAL_CALL KDE5FilePicker::setDefaultName(const QString& name) -{ -_dialog->selectUrl(QUrl(name)); -} +void KDE5FilePicker::setDefaultName(const QString& name) { _dialog->selectUrl(QUrl(name)); } -void SAL_CALL KDE5FilePicker::setDisplayDirectory(const QString& dir) -{ -_dialog->selectUrl(QUrl(dir)); -} +void KDE5FilePicker::setDisplayDirectory(const QString& dir) { _dialog->selectUrl(QUrl(dir)); } -QString SAL_CALL KDE5FilePicker::getDisplayDirectory() const -{ -return _dialog->directoryUrl().url(); -} +QString KDE5FilePicker::getDisplayDirectory() const { return _dialog->directoryUrl().url(); } -QList SAL_CALL KDE5FilePicker::getSelectedFiles() const { return _dialog->selectedUrls(); } +QList KDE5FilePicker::getSelectedFiles() const { return _dialog->selectedUrls(); } -void SAL_CALL KDE5FilePicker::appendFilter(const QString& title, const QString& filter) +void KDE5FilePicker::appendFilter(const QString& title, const QString& filter) { QString t = title; QString f = filter; @@ -126,12 +117,12 @@ void SAL_CALL KDE5FilePicker::appendFilter(const QString& title, const QString& _titleToFilters[t] = _filters.constLast(); } -void SAL_CALL KDE5FilePicker::setCurrentFilter(const QString& title) +void KDE5FilePicker::setCurrentFilter(const QString& title) { _currentFilter = _titleToFilters.value(title); } -QString SAL_CALL KDE5FilePicker::getCurrentFilter() const +QString KDE5FilePicker::getCurrentFilter() const { QString filter = _titleToFilters.key(_dialog->selectedNameFilter()); @@ -142,8 +133,7 @@ QString SAL_CALL KDE5FilePicker::getCurrentFilter() const return filter; } -void SAL_CALL KDE5FilePicker::setValue(sal_Int16 controlId, sal_Int16 /*nControlAction*/, - bool value) +void KDE5FilePicker::setValue(sal_Int16 controlId, sal_Int16 /*nControlAction*/, bool value) { if (_customWidgets.contains(controlId)) { @@ -155,7 +145,7 @@ void SAL_CALL KDE5FilePicker::setValue(sal_Int16 controlId, sal_Int16 /*nControl qWarning() << "set value on unknown control" << controlId; } -bool SAL_CALL KDE5FilePicker::getValue(sal_Int16 controlId, sal_Int16 /*nControlAction*/) const +bool KDE5FilePicker::getValue(sal_Int16 controlId, sal_Int16 /*nControlAction*/) const { bool ret = false; if (_customWidgets.contains(controlId)) @@ -170,7 +160,7 @@ bool SAL_CALL KDE5FilePicker::getValue(sal_Int16 controlId, sal_Int16 /*nControl return ret; } -void SAL_CALL KDE5FilePicker::enableControl(sal_Int16 controlId, sal_Bool enable) +void KDE5FilePicker::enableControl(sal_Int16 controlId, bool enable) { if (_customWidgets.contains(controlId)) _customWidgets.value(controlId)->setEnabled(enable); @@ -178,7 +168,7 @@ void SAL_CALL KDE5FilePicker::enableControl(sal_Int16 controlId, sal_Bool enable qWarning() << "enable on unknown control" << controlId; } -void SAL_CALL KDE5FilePicker::setLabel(sal_Int16 controlId, const QString& label) +void KDE5FilePicker::setLabel(sal_Int16 controlId, const QString& label) { if (_customWidgets.contains(controlId)) { @@ -190,7 +180,7 @@ void SAL_CALL KDE5FilePicker::setLabel(sal_Int16 controlId, const QString& label qWarning() << "set label on unknown control" << controlId; } -QString SAL_CALL KDE5FilePicker::getLabe
[Libreoffice-commits] core.git: Branch 'private/swe/libreoffice-5-2+backports' - 2 commits - sw/qa writerfilter/source
Rebased ref, commits from common ancestor: commit 3c23efb49c501ad9e4f99e33dd80fc2fdd7b7ba6 Author: Thorsten Behrens Date: Tue Jan 23 15:31:31 2018 +0100 We don't need this Change-Id: Ide67559b13016e764c6753b9f5a4ec237bc283f3 diff --git a/sw/qa/core/data/ooxml/pass/ofz4825-1.docx b/sw/qa/core/data/ooxml/pass/ofz4825-1.docx deleted file mode 100644 index ce8e6493af45.. Binary files a/sw/qa/core/data/ooxml/pass/ofz4825-1.docx and /dev/null differ commit f24db79e31c86181c603ca0ee1c1d82d30652c2e Author: Justin Luth Date: Tue Dec 20 12:19:43 2016 +0300 related to tdf#97417: fix unit test page count The unit test should have been showing a blank page before the content page. Non-section paragraphs should not remove the first/last status. Frames were already excluded, now this patch also excludes header/footer paragraphs. This is in preparation for tdf#104710. Change-Id: I686944843302160d6f6bbbcb73f01c836179aa9f Reviewed-on: https://gerrit.libreoffice.org/32234 Reviewed-by: Justin Luth Tested-by: Justin Luth tdf#102466 Added unit test: ensure 1st page is not missing Change-Id: Icbc97d6a69447575aa2980a700a663ece226f781 Reviewed-on: https://gerrit.libreoffice.org/44273 Tested-by: Jenkins Reviewed-by: Serge Krot (CIB) Reviewed-on: https://gerrit.libreoffice.org/48300 Reviewed-by: Thorsten Behrens Tested-by: Thorsten Behrens diff --git a/sw/qa/extras/ooxmlexport/data/tdf102466.docx b/sw/qa/extras/ooxmlexport/data/tdf102466.docx new file mode 100644 index ..68a88799ce66 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf102466.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx index 0fdfe003e161..a4c8cbdcd511 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx @@ -1039,6 +1039,40 @@ DECLARE_OOXMLEXPORT_TEST(testTdf92521, "tdf92521.odt") assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:pPr/w:sectPr", 1); } +DECLARE_OOXMLEXPORT_TEST(testTdf102466, "tdf102466.docx") +{ +// the problem was: file is truncated: the first page is missing. + +// check how much pages we have +CPPUNIT_ASSERT_EQUAL(10, getPages()); + +// check content of the first page +{ +uno::Reference xDrawPageSupplier(mxComponent, uno::UNO_QUERY); +uno::Reference xIndexAccess(xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY); +uno::Reference xFrame(xIndexAccess->getByIndex(0), uno::UNO_QUERY); + +// no border +CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty(xFrame, "LineWidth")); +} + +// Make sure we have 19 tables created +{ +uno::Reference xTablesSupplier(mxComponent, uno::UNO_QUERY); +uno::Reference xTables(xTablesSupplier->getTextTables( ), uno::UNO_QUERY); +CPPUNIT_ASSERT_EQUAL(sal_Int32(19), xTables->getCount( )); + +// check the text inside first cell of the first table +uno::Reference xTable(xTables->getByIndex(0), uno::UNO_QUERY); +uno::Reference xCell(xTable->getCellByName("A1"), uno::UNO_QUERY); + +const OUString aMustHaveText = "Requerimientos del Cliente"; +const OUString aActualText = xCell->getString(); + +CPPUNIT_ASSERT(aActualText.indexOf(aMustHaveText) > 0); +} +} + DECLARE_OOXMLEXPORT_TEST(testTdf81345_045Original,"tdf81345.docx") { //Header wasn't replaced and columns were missing because no new style was created. diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index f41e406409dc..82a202109613 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -1203,7 +1203,7 @@ void DomainMapper_Impl::finishParagraph( const PropertyMapPtr& pPropertyMap ) } m_bParaChanged = false; -if( !IsInShape() && (!pParaContext || !pParaContext->IsFrameMode()) ) +if( !IsInHeaderFooter() && !IsInShape() && (!pParaContext || !pParaContext->IsFrameMode()) ) { // If the paragraph is in a frame, shape or header/footer, it's not a paragraph of the section itself. SetIsFirstParagraphInSection(false); SetIsLastParagraphInSection(false); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/BorderlineFix' - svx/source
svx/source/dialog/framelinkarray.cxx | 31 ++- 1 file changed, 26 insertions(+), 5 deletions(-) New commits: commit 05bf23a988683605a0b0317708154e53b362dcc5 Author: Armin Le Grand Date: Tue Jan 23 16:06:19 2018 +0100 BorderlineFix: Fixed visual updates when scrolling For Cells with DoubleLine the connections to perpendicular DoubleLine-Styles may have to be displayed in a Cell which is 'around' the orig cell in a Cell-Border of one. To represent that and to avoid repaint errors when scrolling in, the preparation of Primitives has to take accordingly more neighbour cells into account. Tested this change with the usages in Calc, UI (Dialogs) and Calc exports Print/PrintPreview/PDF. This does not affect Tables in Writer and/or Draw/Impress. Change-Id: I3bcc68cdf7b4fc1825a87a9773892c359421024e diff --git a/svx/source/dialog/framelinkarray.cxx b/svx/source/dialog/framelinkarray.cxx index ab6db75799e3..bc8a50a3d3cf 100644 --- a/svx/source/dialog/framelinkarray.cxx +++ b/svx/source/dialog/framelinkarray.cxx @@ -1061,18 +1061,39 @@ drawinglayer::primitive2d::Primitive2DContainer Array::CreateB2DPrimitiveRange( DBG_FRAME_CHECK_COLROW( nFirstCol, nFirstRow, "CreateB2DPrimitiveRange" ); DBG_FRAME_CHECK_COLROW( nLastCol, nLastRow, "CreateB2DPrimitiveRange" ); +// It may be necessary to extend the loop ranges by one cell to the outside, +// when possible. This is needed e.g. when there is in Calc a Cell with an +// upper CellBorder using DoubleLine and that is right/left connected upwards +// to also DoubleLine. These upper DoubleLines will be extended to meet the +// lower of the upper CellBorder and thus have graphical parts that are +// displayed one cell below and right/left of the target cell - analog to +// other examples in all other directions. +// It would be possible to explicitely test this (if possible by indices at all) +// looping and testing the styles in the outer cells to detect this, but since +// for other usages (e.g. UI) usually nFirstRow==0 and nLastRow==GetRowCount()-1 +// (and analog for Col) it is okay to just expand the range when available. +// Do *not* change nFirstRow/nLastRow due to these needed to the boolean tests +// below (!) +// Checked usages, this method is used in Calc EditView/Print/Export stuff and +// in UI (Dialog), not for Writer Tables and Draw/Impress tables. All usages +// seem okay with this change, so I will add it. +const size_t nStartRow(nFirstRow > 0 ? nFirstRow - 1 : nFirstRow); +const size_t nEndRow(nLastRow < GetRowCount() - 1 ? nLastRow + 1 : nLastRow); +const size_t nStartCol(nFirstCol > 0 ? nFirstCol - 1 : nFirstCol); +const size_t nEndCol(nLastCol < GetColCount() - 1 ? nLastCol + 1 : nLastCol); + // various primitive sequences to collect the different border types drawinglayer::primitive2d::Primitive2DContainer aHorizontalSequence; -std::vector< drawinglayer::primitive2d::Primitive2DContainer > aVerticalSequences(nLastCol - nFirstCol + 1); +std::vector< drawinglayer::primitive2d::Primitive2DContainer > aVerticalSequences(nEndCol - nStartCol + 1); drawinglayer::primitive2d::Primitive2DContainer aCrossSequence; // remember for which merged cells crossed lines were already created. To // do so, hold the size_t cell index in a set for fast check std::set< size_t > aMergedCells; -for (size_t nRow = nFirstRow; nRow <= nLastRow; ++nRow) +for (size_t nRow(nStartRow); nRow <= nEndRow; ++nRow) { -for (size_t nCol = nFirstCol; nCol <= nLastCol; ++nCol) +for (size_t nCol(nStartCol); nCol <= nEndCol; ++nCol) { // get Cell and CoordinateSystem (*only* for this Cell, do *not* expand for // merged cells (!)), check if used (non-empty vectors) @@ -1139,7 +1160,7 @@ drawinglayer::primitive2d::Primitive2DContainer Array::CreateB2DPrimitiveRange( if(rLeft.IsUsed()) { -HelperCreateVerticalEntry(*this, rLeft, nCol, nRow, aOrigin, aX, aY, aVerticalSequences[nCol - nFirstCol], true, pForceColor); +HelperCreateVerticalEntry(*this, rLeft, nCol, nRow, aOrigin, aX, aY, aVerticalSequences[nCol - nStartCol], true, pForceColor); } } @@ -1151,7 +1172,7 @@ drawinglayer::primitive2d::Primitive2DContainer Array::CreateB2DPrimitiveRange( if(rRight.IsUsed()) { -HelperCreateVerticalEntry(*this, rRight, nCol + 1, nRow, aOrigin, aX, aY, aVerticalSequences[nCol - nFirstCol], false, pForceColor); +HelperCreateVerticalEntry(*this, rRight, nCol + 1, nRow, aOrigin, aX, aY, aVerticalSequences[nCol - nStartCol], false, pForceColor); } } __
[Libreoffice-commits] core.git: sd/source
sd/source/ui/view/DocumentRenderer.cxx | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) New commits: commit 57991f885e60d04e93bf5004d4fdceee7d29f3d8 Author: Vasily Melenchuk Date: Tue Dec 12 11:32:06 2017 +0300 tdf#91362: Use document paper size for printing slides. By default for priniting slides we use not default A4, but size provided in slide properties. Additinally renamed IsPageSize() -> IsPaperSize(): it is less ambiguous. Change-Id: Iaf38dedb32b14cd6fbdd2ad355ecf3208e32663e Reviewed-on: https://gerrit.libreoffice.org/46407 Tested-by: Jenkins Reviewed-by: Thorsten Behrens diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx index 4a4399c83ee1..8572f566b739 100644 --- a/sd/source/ui/view/DocumentRenderer.cxx +++ b/sd/source/ui/view/DocumentRenderer.cxx @@ -144,7 +144,7 @@ namespace { return nQuality; } -bool IsPageSize() const +bool IsPaperSize() const { return GetBoolValue("PageOptions", sal_Int32(1)); } @@ -164,10 +164,10 @@ namespace { return GetBoolValue("PrintProspect", false); } -bool IsPrinterPreferred(DocumentType eDocType) const +bool IsPrinterPreferred() const { -bool bIsDraw = eDocType == DocumentType::Draw; -return IsTilePage() || IsPageSize() || IsBooklet() || (!bIsDraw && !IsNotes()); +return IsTilePage() || IsPaperSize() || IsBooklet() || +IsNotes() || IsHandout() || IsOutline(); } bool IsPrintExcluded() const @@ -1352,7 +1352,7 @@ private: // Draw and Notes should usually abide by their specified paper size Size aPaperSize; -if (!mpOptions->IsPrinterPreferred(pDocument->GetDocumentType())) +if (!mpOptions->IsPrinterPreferred()) { aPaperSize.setWidth(rInfo.maPageSize.Width()); aPaperSize.setHeight(rInfo.maPageSize.Height()); @@ -1365,7 +1365,7 @@ private: maPrintSize = awt::Size(aPaperSize.Width(), aPaperSize.Height()); -if (mpOptions->IsPrinterPreferred(pDocument->GetDocumentType())) +if (mpOptions->IsPrinterPreferred()) { if( (rInfo.meOrientation == Orientation::Landscape && (aPaperSize.Width() < aPaperSize.Height())) @@ -1428,7 +1428,7 @@ private: aInfo.msTimeDate += GetSdrGlobalData().GetLocaleData()->getTime( ::tools::Time( ::tools::Time::SYSTEM ), false ); // Draw and Notes should usually use specified paper size when printing -if (!mpOptions->IsPrinterPreferred(mrBase.GetDocShell()->GetDocumentType())) +if (!mpOptions->IsPrinterPreferred()) { aInfo.maPrintSize = mrBase.GetDocument()->GetSdPage(0, PageKind::Standard)->GetSize(); maPrintSize = awt::Size(aInfo.maPrintSize.Width(), @@ -1741,7 +1741,7 @@ private: OSL_ASSERT(pDocument != nullptr); SdPage& rHandoutPage (*pDocument->GetSdPage(0, PageKind::Handout)); -const bool bScalePage (mpOptions->IsPageSize()); +const bool bScalePage (mpOptions->IsPaperSize()); sal_uInt16 nPaperBin; if ( ! mpOptions->IsPaperBin()) @@ -1902,7 +1902,7 @@ private: // is it possible that the page size changed? const Size aPageSize = pPage->GetSize(); -if (mpOptions->IsPageSize()) +if (mpOptions->IsPrinterPreferred()) { const double fHorz (static_cast(rInfo.maPrintSize.Width()) / aPageSize.Width()); const double fVert (static_cast(rInfo.maPrintSize.Height()) / aPageSize.Height()); @@ -2133,7 +2133,7 @@ private: //(without the unprintable borders). // 3. Split the page into parts of the size of the // printable area. -const bool bScalePage (mpOptions->IsPageSize()); +const bool bScalePage (mpOptions->IsPaperSize()); const bool bCutPage (mpOptions->IsCutPage()); MapMode aMap (rInfo.maMap); if (bScalePage || bCutPage) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
Re: Render differences of DOCX between Word and LO/AOO
On 01/23/2018 03:26 AM, Jens Tröger wrote: > Any explanation of the different word and character counts? Depending upon how one counts, there are either three, or four different definitions of what constitutes a character. Microsoft Word and LibreOffice use different definitions, which consequently results in a different character count for the same text. Each language has between two and seven ways of defining what constitutes a word, and, consequently, how to count the number of words in a document. LibreOffice and Microsoft Office selected different definitions of what constitutes a word, which results in each program claiming a different number of words in the same document. The simple fix would be an extension that supplies the number of characters, according to each of those definitions, and then provides the number of words, according to each of the various rule sets used be each language. Assuming the extension drops languages not used in the document, you'd have a page displaying five lines of character counts and between five and ten lines of word counts. Incorporating such an extension into LibO would be counter-productive, because it would confuse far more people than it would help. Regina wrote: >to discuss problems in the code. The question reflects an issue with the code. More specifically, why German word counts are used, instead of malformed US_English word counts. jonathon signature.asc Description: OpenPGP digital signature ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: sfx2/source
sfx2/source/doc/docfilt.cxx | 27 +-- 1 file changed, 5 insertions(+), 22 deletions(-) New commits: commit b07e38b2028a5ebc7dd078f7282c0bd3274c897e Author: Stephan Bergmann Date: Mon Jan 22 15:54:01 2018 +0100 Remove dead code from SfxFilter ctor In fd069bee7e57ad529c3c0974559fd2d84ec3151a "initial import" the code was: +void SfxFilter::InitMembers_Impl() +{ +String aExts = GetWildcard()(); +String aShort, aLong; +String aRet; +sal_uInt16 nMaxLength = +#if defined( WIN ) || defined( OS2 ) +3 +#else +USHRT_MAX +#endif +; +String aTest; +sal_uInt16 nPos = 0; +while( ( aRet = aExts.GetToken( nPos++, ';' ) ).Len() ) +{ +aTest = aRet; +aTest.SearchAndReplace( DEFINE_CONST_UNICODE( "*." ), String() ); +if( aTest.Len() <= nMaxLength ) +{ +if( aShort.Len() ) aShort += ';'; +aShort += aRet; +} +else +{ +if( aLong.Len() ) aLong += ';'; +aLong += aRet; +} +} +if( aShort.Len() && aLong.Len() ) +{ +aShort += ';'; +aShort += aLong; +} +aWildCard = aShort; + +nVersion = SOFFICE_FILEFORMAT_NOW; +bPlugDataSearched = 0; +pPlugData = 0; + +aName = pContainer->GetName(); +aName += DEFINE_CONST_UNICODE( ": " ); +aName += aFilterName; + +aUIName = aFilterName; +} where USHRT_MAX apparently effectively meant "arbitrarily large". But when b7c596059dfa9a808f587af9f30b01489e75fb0e "INTEGRATION: CWS sfxcleanup" removed the WIN/OS2 special case it didn't remove all the other code that was now effectively useless. Change-Id: I883759f13e0267a189ad176c2ffcc1c78680b0a5 Reviewed-on: https://gerrit.libreoffice.org/48336 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/sfx2/source/doc/docfilt.cxx b/sfx2/source/doc/docfilt.cxx index 7dddb700e60d..b3d931124f4c 100644 --- a/sfx2/source/doc/docfilt.cxx +++ b/sfx2/source/doc/docfilt.cxx @@ -67,33 +67,16 @@ SfxFilter::SfxFilter( const OUString &rName, lFormat(lFmt) { OUString aExts = GetWildcard().getGlob(); -OUString aShort, aLong; +OUString glob; OUString aRet; -OUString aTest; sal_uInt16 nPos = 0; while (!(aRet = aExts.getToken(nPos++, ';')).isEmpty() ) { -aTest = aRet; -aTest = aTest.replaceFirst( "*." , "" ); -if( aTest.getLength() <= USHRT_MAX ) -{ -if (!aShort.isEmpty()) -aShort += ";"; -aShort += aRet; -} -else -{ -if (!aLong.isEmpty()) -aLong += ";"; -aLong += aRet; -} -} -if (!aShort.isEmpty() && !aLong.isEmpty()) -{ -aShort += ";"; -aShort += aLong; +if (!glob.isEmpty()) +glob += ";"; +glob += aRet; } -aWildCard.setGlob(aShort); +aWildCard.setGlob(glob); } SfxFilter::~SfxFilter() ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-0-0' - sw/qa sw/source
sw/qa/extras/uiwriter/data/tdf114536.odt |binary sw/qa/extras/uiwriter/uiwriter.cxx |9 + sw/source/core/text/itrform2.cxx | 13 + 3 files changed, 22 insertions(+) New commits: commit 044df60773eb74e90f63dc256e1ba09aa0a1af49 Author: Miklos Vajna Date: Mon Jan 15 22:29:31 2018 +0100 tdf#114536 sw: fix use-after-free in SwTextFormatter::MergeCharacterBorder() SwTextFormatter::Underflow() truncated a line portion, which deletes the rest of the line portions, but left m_pFirstOfBorderMerge unchanged, leading to a crash when SwTextFormatter::MergeCharacterBorder() tried to access it. Fix the problem by updating the non-owning m_pFirstOfBorderMerge accordingly when truncating the line portion. (cherry picked from commit ecd855794b22c0f7e6fb2f362b566c4d9c5f624a) Conflicts: sw/qa/extras/uiwriter/uiwriter.cxx Change-Id: I5e445bbe2424d70d60c363fa4e3a00636e282325 Reviewed-on: https://gerrit.libreoffice.org/47989 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara (cherry picked from commit 968348dfe3f151ee41163006e7748777a0379e65) Reviewed-on: https://gerrit.libreoffice.org/48132 Reviewed-by: Michael Stahl Reviewed-by: Eike Rathke diff --git a/sw/qa/extras/uiwriter/data/tdf114536.odt b/sw/qa/extras/uiwriter/data/tdf114536.odt new file mode 100644 index ..4ad9c7f1f494 Binary files /dev/null and b/sw/qa/extras/uiwriter/data/tdf114536.odt differ diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index 0398e15e6ebe..a81d236d8277 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -288,6 +288,7 @@ public: void testTdf99689TableOfTables(); void testTdf113790(); void testTdf114306(); +void testTdf114536(); CPPUNIT_TEST_SUITE(SwUiWriterTest); CPPUNIT_TEST(testReplaceForward); @@ -457,6 +458,7 @@ public: CPPUNIT_TEST(testTdf99689TableOfTables); CPPUNIT_TEST(testTdf113790); CPPUNIT_TEST(testTdf114306); +CPPUNIT_TEST(testTdf114536); CPPUNIT_TEST_SUITE_END(); private: @@ -5448,6 +5450,13 @@ void SwUiWriterTest::testSectionInTableInTable() createDoc("tdf112109.fodt"); } +void SwUiWriterTest::testTdf114536() +{ +// This crashed in SwTextFormatter::MergeCharacterBorder() due to a +// use after free. +createDoc("tdf114536.odt"); +} + void SwUiWriterTest::testSectionInTableInTable2() { createDoc("split-section-in-nested-table.fodt"); diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx index d25fcc2ba0b1..730237e3b4d3 100644 --- a/sw/source/core/text/itrform2.cxx +++ b/sw/source/core/text/itrform2.cxx @@ -268,6 +268,19 @@ SwLinePortion *SwTextFormatter::Underflow( SwTextFormatInfo &rInf ) pPor = m_pCurr; } } + +// Make sure that m_pFirstOfBorderMerge does not point to a portion which +// will be deleted by Truncate() below. +SwLinePortion* pNext = pPor->GetPortion(); +while (pNext) +{ +if (pNext == m_pFirstOfBorderMerge) +{ +m_pFirstOfBorderMerge = nullptr; +break; +} +pNext = pNext->GetPortion(); +} pPor->Truncate(); SwLinePortion *const pRest( rInf.GetRest() ); if (pRest && pRest->InFieldGrp() && ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: shell/source
shell/source/backends/kde5be/kde5access.cxx |6 +++--- shell/source/backends/kde5be/kde5backend.cxx | 15 +++ 2 files changed, 10 insertions(+), 11 deletions(-) New commits: commit 8b6c90098f69870231a315df192b44e6507adcfc Author: Stephan Bergmann Date: Tue Jan 23 17:29:35 2018 +0100 Various loplugin in --enable-gtk3-kde5 code Change-Id: I5d5bb6b57a9e9ed2c66d304c18fe7ef233aae072 diff --git a/shell/source/backends/kde5be/kde5access.cxx b/shell/source/backends/kde5be/kde5access.cxx index 5c4c0a0173f1..0f2218551d5f 100644 --- a/shell/source/backends/kde5be/kde5access.cxx +++ b/shell/source/backends/kde5be/kde5access.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include "sal/config.h" +#include #include "kde5access.hxx" @@ -290,7 +290,7 @@ css::beans::Optional getValue(OUString const& id) } else if (id == "ooInetProxyType") { -int nProxyType; +sal_Int32 nProxyType; switch (KProtocolManager::proxyType()) { case KProtocolManager::ManualProxy: // Proxies are manually configured @@ -303,7 +303,7 @@ css::beans::Optional getValue(OUString const& id) default: // No proxy is used nProxyType = 0; } -return css::beans::Optional(true, uno::makeAny((sal_Int32)nProxyType)); +return css::beans::Optional(true, uno::makeAny(nProxyType)); } else { diff --git a/shell/source/backends/kde5be/kde5backend.cxx b/shell/source/backends/kde5be/kde5backend.cxx index c89869579159..0c0472b0233a 100644 --- a/shell/source/backends/kde5be/kde5backend.cxx +++ b/shell/source/backends/kde5be/kde5backend.cxx @@ -56,12 +56,12 @@ namespace { -OUString SAL_CALL getServiceImplementationName() +OUString getServiceImplementationName() { return OUString("com.sun.star.comp.configuration.backend.KDE5Backend"); } -css::uno::Sequence SAL_CALL getServiceSupportedServiceNames() +css::uno::Sequence getServiceSupportedServiceNames() { OUString name("com.sun.star.configuration.backend.KDE5Backend"); return css::uno::Sequence(&name, 1); @@ -74,7 +74,7 @@ public: Service(); private: -virtual ~Service() {} +virtual ~Service() override {} virtual OUString SAL_CALL getImplementationName() override { @@ -204,7 +204,7 @@ Service::Service() void Service::setPropertyValue(OUString const&, css::uno::Any const&) { -throw css::lang::IllegalArgumentException(OUString("setPropertyValue not supported"), +throw css::lang::IllegalArgumentException("setPropertyValue not supported", static_cast(this), -1); } @@ -231,7 +231,7 @@ css::uno::Any Service::getPropertyValue(OUString const& PropertyName) } css::uno::Reference -SAL_CALL createInstance(css::uno::Reference const&) +createInstance(css::uno::Reference const&) { return static_cast(new Service); } @@ -242,9 +242,8 @@ static cppu::ImplementationEntry const services[] { nullptr, nullptr, nullptr, nullptr, nullptr, 0 } }; } -extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL kde5be1_component_getFactory(char const* pImplName, - void* pServiceManager, - void* pRegistryKey) +extern "C" SAL_DLLPUBLIC_EXPORT void* +kde5be1_component_getFactory(char const* pImplName, void* pServiceManager, void* pRegistryKey) { return cppu::component_getFactoryHelper(pImplName, pServiceManager, pRegistryKey, services); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: lotuswordpro/source
lotuswordpro/source/filter/lwppara.cxx | 22 -- lotuswordpro/source/filter/lwppara.hxx |4 ++-- lotuswordpro/source/filter/lwppara1.cxx | 18 +++--- 3 files changed, 17 insertions(+), 27 deletions(-) New commits: commit c36547d16e1ea4f085880d480e7a6381108ff7d8 Author: Caolán McNamara Date: Tue Jan 23 13:11:24 2018 + ofz: Direct leak Change-Id: Ide16aad0cadd393ce28425ed54c5e77f93d61317 Reviewed-on: https://gerrit.libreoffice.org/48412 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/lotuswordpro/source/filter/lwppara.cxx b/lotuswordpro/source/filter/lwppara.cxx index d831268d8711..56d3100d7c14 100644 --- a/lotuswordpro/source/filter/lwppara.cxx +++ b/lotuswordpro/source/filter/lwppara.cxx @@ -109,7 +109,6 @@ LwpPara::LwpPara(LwpObjectHeader const & objHdr, LwpSvStream* pStrm) , m_AllText("") , m_bHasBullet(false) , m_pSilverBullet(nullptr) -, m_pBullOver(nullptr) , m_bBullContinue(false) , m_SectionStyleName("") , m_bHasDropcap(false) @@ -128,11 +127,6 @@ LwpPara::~LwpPara() m_pBreaks = nullptr; } -if (m_pBullOver) -{ -delete m_pBullOver; -m_pBullOver = nullptr; -} delete m_pIndentOverride; LwpParaProperty* pNextProp; @@ -531,9 +525,9 @@ void LwpPara::RegisterStyle() { m_aBulletStyleName = m_pSilverBullet->GetBulletStyleName(); } -else if (!m_pBullOver->IsEditable()) +else if (!m_xBullOver->IsEditable()) { -m_aBulletStyleName = pBulletStyleMgr->RegisterBulletStyle(this, m_pBullOver, m_pIndentOverride); +m_aBulletStyleName = pBulletStyleMgr->RegisterBulletStyle(this, m_xBullOver.get(), m_pIndentOverride); } // test codes @@ -618,7 +612,7 @@ void LwpPara::RegisterStyle() } // Don't bump the number if this bullet is skipped -if (m_pBullOver->IsSkip()) +if (m_xBullOver->IsSkip()) ; else if ( pParaSilverBullet && pParaSilverBullet->GetObjectID() == m_pSilverBullet->GetObjectID() @@ -690,13 +684,13 @@ void LwpPara::RegisterStyle() LwpStory* pMyStory = GetStory(); if (pMyStory) { -if (pMyStory->IsBullStyleUsedBefore(m_aBulletStyleName, m_pParaNumbering->GetPosition())) +if (pMyStory->IsBullStyleUsedBefore(m_aBulletStyleName, m_xParaNumbering->GetPosition())) { //m_bBullContinue = sal_True; } else { - pMyStory->AddBullStyleName2List(m_aBulletStyleName, m_pParaNumbering->GetPosition()); + pMyStory->AddBullStyleName2List(m_aBulletStyleName, m_xParaNumbering->GetPosition()); } } @@ -897,17 +891,17 @@ rtl::Reference LwpPara::AddBulletList(XFContentContainer* pC } if (m_pSilverBullet->HasName()) { -nLevel = m_pParaNumbering->GetPosition(); +nLevel = m_xParaNumbering->GetPosition(); m_nLevel = nLevel;//for get para level } return pBulletStyleMgr->AddBulletList(pCont, bOrdered, m_aBulletStyleName, -nLevel, m_pBullOver->IsSkip()); +nLevel, m_xBullOver->IsSkip()); } LwpNumberingOverride* LwpPara::GetParaNumbering() { -return m_pParaNumbering.get(); +return m_xParaNumbering.get(); } void LwpForked3NotifyList::Read(LwpObjectStream* pObjStrm) diff --git a/lotuswordpro/source/filter/lwppara.hxx b/lotuswordpro/source/filter/lwppara.hxx index c18b9dee9d03..701cb7daeb59 100644 --- a/lotuswordpro/source/filter/lwppara.hxx +++ b/lotuswordpro/source/filter/lwppara.hxx @@ -218,8 +218,8 @@ protected: bool m_bHasBullet; LwpObjectID m_aSilverBulletID; LwpSilverBullet* m_pSilverBullet; -LwpBulletOverride* m_pBullOver; -std::unique_ptr m_pParaNumbering; +std::unique_ptr m_xBullOver; +std::unique_ptr m_xParaNumbering; OUString m_aBulletStyleName; bool m_bBullContinue; //end add diff --git a/lotuswordpro/source/filter/lwppara1.cxx b/lotuswordpro/source/filter/lwppara1.cxx index fc5c46a3e979..21b341df589a 100644 --- a/lotuswordpro/source/filter/lwppara1.cxx +++ b/lotuswordpro/source/filter/lwppara1.cxx @@ -445,7 +445,7 @@ void LwpPara::OverrideParaBullet(LwpParaProperty* pProps) if (pProps) { -m_pBullOver = new LwpBulletOverride(); +m_xBullOver.reset(new LwpBulletOverride); // get local bulletoverride LwpBulletOverride* pLocalBullet = static_cast(pProps)->GetLocalP
[Libreoffice-commits] core.git: lotuswordpro/source
lotuswordpro/source/filter/lwpstory.cxx |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) New commits: commit ebfcf40d9a6508f0ca6a608d15d82a4fc9bf1238 Author: Caolán McNamara Date: Tue Jan 23 13:21:24 2018 + ofz: better loop detect Change-Id: I7c33d2a64a6b4968e8a83f53f5c893eb5ba268b7 Reviewed-on: https://gerrit.libreoffice.org/48415 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/lotuswordpro/source/filter/lwpstory.cxx b/lotuswordpro/source/filter/lwpstory.cxx index 491977516c7a..88e8e7b50b7c 100644 --- a/lotuswordpro/source/filter/lwpstory.cxx +++ b/lotuswordpro/source/filter/lwpstory.cxx @@ -67,6 +67,8 @@ #include #include "lwppagelayout.hxx" +#include + LwpStory::LwpStory(LwpObjectHeader const &objHdr, LwpSvStream* pStrm) : LwpContent(objHdr, pStrm) @@ -100,15 +102,17 @@ void LwpStory::XFConvert(XFContentContainer* pCont) //process para list XFContentContainer* pParaCont = pCont; rtl::Reference xPara(dynamic_cast(GetFirstPara().obj().get())); +std::set aConverted; while (xPara.is()) { xPara->SetFoundry(m_pFoundry); xPara->XFConvert(pParaCont); +aConverted.insert(xPara.get()); //Get the xfcontainer for the next para pParaCont = xPara->GetXFContainer(); rtl::Reference xNext(dynamic_cast(xPara->GetNext().obj().get())); -if (xPara == xNext) +if (aConverted.find(xNext.get()) != aConverted.end()) throw std::runtime_error("loop in conversion"); xPara = xNext; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/BorderlineFix' - sw/source
sw/source/core/layout/paintfrm.cxx | 22 ++ 1 file changed, 22 insertions(+) New commits: commit a099056c226277b0eacf95fb20b4f8c31d1960ce Author: Armin Le Grand Date: Tue Jan 23 17:38:34 2018 +0100 BorderlineFix: Fix WriterPaint if scrolling CellTableBorders Similar to CalcBorders in Writer the overlap regions for FrameBorders have to be taken into account when repainting the CellBordes of WriterTables Change-Id: I488ba158e1de579bfb06b9c8353adaa2cac706c6 diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 70781515d300..dc2837e2eed9 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -2439,11 +2439,33 @@ void SwTabFramePainter::PaintLines(OutputDevice& rDev, const SwRect& rRect) cons { aRepaintRect.Height( 2 * nRepaintRectSize ); aRepaintRect.Pos().Y() -= nRepaintRectSize; + +// To decide on visibility it is also necessary to expand the RepaintRect +// to left/right according existing BorderLine overlap matchings, else there +// will be repaint errors when scrolling in e.t TripleLine BorderLines. +// aStyles[1] == aLFromT, aStyles[3] == aLFromB, aStyles[4] == aRFromT, aStyles[6] == aRFromB +if(aStyles[1].IsUsed() || aStyles[3].IsUsed() || aStyles[4].IsUsed() || aStyles[6].IsUsed()) +{ +const double fLineWidthMaxLeft(std::max(aStyles[1].GetWidth(), aStyles[3].GetWidth())); +const double fLineWidthMaxRight(std::max(aStyles[4].GetWidth(), aStyles[6].GetWidth())); +aRepaintRect.Width(aRepaintRect.Width() + (fLineWidthMaxLeft + fLineWidthMaxRight)); +aRepaintRect.Pos().X() -= fLineWidthMaxLeft; +} } else { aRepaintRect.Width( 2 * nRepaintRectSize ); aRepaintRect.Pos().X() -= nRepaintRectSize; + +// Accordingly to horizontal case, but for top/bottom +// aStyles[3] == aTFromR, aStyles[1] == aTFromL, aStyles[6] == aBFromR, aStyles[4] == aBFromL +if(aStyles[3].IsUsed() || aStyles[1].IsUsed() || aStyles[6].IsUsed() || aStyles[4].IsUsed()) +{ +const double fLineWidthMaxTop(std::max(aStyles[3].GetWidth(), aStyles[1].GetWidth())); +const double fLineWidthMaxBottom(std::max(aStyles[6].GetWidth(), aStyles[4].GetWidth())); +aRepaintRect.Height(aRepaintRect.Height() + (fLineWidthMaxTop + fLineWidthMaxBottom)); +aRepaintRect.Pos().Y() -= fLineWidthMaxTop; +} } if (!rRect.IsOver(aRepaintRect)) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/unx
vcl/unx/kde5/KDE5XLib.cxx |1 - 1 file changed, 1 deletion(-) New commits: commit 5b9d0d4a999ffeec47cedb09599e458a632a4946 Author: Andrea Gelmini Date: Tue Jan 23 16:22:05 2018 +0100 Removed duplicated include Change-Id: I20d4304013e12035e522fd1b1e0c201d49961114 Reviewed-on: https://gerrit.libreoffice.org/48434 Reviewed-by: Julien Nabet Tested-by: Julien Nabet diff --git a/vcl/unx/kde5/KDE5XLib.cxx b/vcl/unx/kde5/KDE5XLib.cxx index 952254176edd..ec62f5a19e45 100644 --- a/vcl/unx/kde5/KDE5XLib.cxx +++ b/vcl/unx/kde5/KDE5XLib.cxx @@ -22,7 +22,6 @@ #include #include #include -#include #include ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: ios/LibreOfficeLight sc/source
ios/LibreOfficeLight/LibreOfficeLight/ButtonScrollView.swift |2 +- sc/source/core/tool/rangelst.cxx |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit 508e973bc56b0f6213276ffd38b492ee101b589b Author: Andrea Gelmini Date: Tue Jan 23 16:30:54 2018 +0100 Fix typos Change-Id: I17e617d89d1b5ad92c5c8218958e86ca722b13e2 Reviewed-on: https://gerrit.libreoffice.org/48435 Reviewed-by: Julien Nabet Tested-by: Julien Nabet diff --git a/ios/LibreOfficeLight/LibreOfficeLight/ButtonScrollView.swift b/ios/LibreOfficeLight/LibreOfficeLight/ButtonScrollView.swift index 279ad22123b6..724a08d42f02 100644 --- a/ios/LibreOfficeLight/LibreOfficeLight/ButtonScrollView.swift +++ b/ios/LibreOfficeLight/LibreOfficeLight/ButtonScrollView.swift @@ -50,7 +50,7 @@ open class ButtonScrollView: UIScrollView } } -/// Horizontally layed out buttons, living within the owned scroll view +/// Horizontally laid out buttons, living within the owned scroll view open class ButtonList: UIView { let labels: [String] diff --git a/sc/source/core/tool/rangelst.cxx b/sc/source/core/tool/rangelst.cxx index 3f56e5337e73..0513d258a634 100644 --- a/sc/source/core/tool/rangelst.cxx +++ b/sc/source/core/tool/rangelst.cxx @@ -267,7 +267,7 @@ Label_Range_Join: if ( p->In( *pOver ) ) { // range pOver included in or identical to range p // XXX if we never used Append() before Join() we could remove -// pOver and end processing, but it is not guranteed and there can +// pOver and end processing, but it is not guaranteed and there can // be duplicates. if ( bIsInList ) bJoined = true; // do away with range pOver ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: svx/source vcl/unx
svx/source/dialog/rubydialog.cxx |2 +- vcl/unx/generic/app/saldata.cxx |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit 843b26a6dba07fdda451d3d576553df132e30a8a Author: Andrea Gelmini Date: Mon Jan 22 14:41:17 2018 +0100 Fix typos Change-Id: I05a1234d7bcbae6f4851abd34ff7acec5853f5f5 Reviewed-on: https://gerrit.libreoffice.org/48329 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx index 6507fecd9fa2..6527d8fdb6f2 100644 --- a/svx/source/dialog/rubydialog.cxx +++ b/svx/source/dialog/rubydialog.cxx @@ -815,7 +815,7 @@ void RubyPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectang long nLeftStart = nCenter - nHalfWidth; long nRightEnd = nCenter + nHalfWidth; -// Deafult values for TOP or no selection +// Default values for TOP or no selection long nYRuby = aWinSize.Height() / 4 - nTextHeight / 2; long nYBase = aWinSize.Height() * 3 / 4 - nTextHeight / 2; diff --git a/vcl/unx/generic/app/saldata.cxx b/vcl/unx/generic/app/saldata.cxx index a424dc5e05ef..3a87ca9d0e8b 100644 --- a/vcl/unx/generic/app/saldata.cxx +++ b/vcl/unx/generic/app/saldata.cxx @@ -572,7 +572,7 @@ struct YieldEntry { int fd; // file descriptor for reading void* data; // data for predicate and callback -YieldFunc pending;// predicate (determins pending events) +YieldFunc pending;// predicate (determines pending events) YieldFunc queued; // read and queue up events YieldFunc handle; // handle pending events ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: compilerplugins/clang
compilerplugins/clang/check.cxx |9 - compilerplugins/clang/check.hxx |2 -- 2 files changed, 11 deletions(-) New commits: commit 659109609ba2a7a827a4920c9456432b70cb001a Author: Stephan Bergmann Date: Tue Jan 23 11:04:07 2018 +0100 Remove unused TypeCheck::SubstTemplateTypeParmType ...introduced unused with 91b4e4531621b7afb2dbab1a8aa62c92da66951a "new loplugin: pointerbool" Change-Id: I3af0ce878f1f2742223d66bcdade4e9c144162cd Reviewed-on: https://gerrit.libreoffice.org/48387 Reviewed-by: Noel Grandin Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/compilerplugins/clang/check.cxx b/compilerplugins/clang/check.cxx index 8b3e409be2d1..2a7b0a978348 100644 --- a/compilerplugins/clang/check.cxx +++ b/compilerplugins/clang/check.cxx @@ -138,15 +138,6 @@ TypeCheck TypeCheck::NotSubstTemplateTypeParmType() const { ? *this : TypeCheck(); } -TypeCheck TypeCheck::SubstTemplateTypeParmType() const { -if (!type_.isNull()) { -if (auto const t = type_->getAs()) { -return TypeCheck(t->desugar()); -} -} -return TypeCheck(); -} - ContextCheck DeclCheck::Operator(clang::OverloadedOperatorKind op) const { assert(op != clang::OO_None); auto f = llvm::dyn_cast_or_null(decl_); diff --git a/compilerplugins/clang/check.hxx b/compilerplugins/clang/check.hxx index f31599f1b153..af6e8263df39 100644 --- a/compilerplugins/clang/check.hxx +++ b/compilerplugins/clang/check.hxx @@ -72,8 +72,6 @@ public: TypeCheck NotSubstTemplateTypeParmType() const; -TypeCheck SubstTemplateTypeParmType() const; - private: TypeCheck() = default; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: offapi/com sc/inc sc/source
offapi/com/sun/star/sheet/SheetCell.idl | 23 ++- sc/inc/cellsuno.hxx |3 +- sc/inc/unonames.hxx |2 + sc/inc/unowids.hxx |4 ++ sc/source/ui/unoobj/cellsuno.cxx| 48 +--- 5 files changed, 72 insertions(+), 8 deletions(-) New commits: commit cceaece18a42405190941865908636522e0ee4cb Author: Jens Carl Date: Tue Jan 23 01:45:21 2018 + offapi: Add properties FormulaResultType2 and CellContentType Add two new properties to SheetCell.idl "FormulaResultType2" and "CellContentType", because the "FormulaResultType" is returning the wrong value (com::sun::star::table::CellContentType instead of com::sun::star::sheet::FormulaResult). Also documeted the curiosity. Change-Id: Icc6538e155ba27fb9d097d8790ac9b4b230c1446 Reviewed-on: https://gerrit.libreoffice.org/48367 Tested-by: Jenkins Reviewed-by: Jens Carl diff --git a/offapi/com/sun/star/sheet/SheetCell.idl b/offapi/com/sun/star/sheet/SheetCell.idl index 77411c4b68f2..8d85585d0c74 100644 --- a/offapi/com/sun/star/sheet/SheetCell.idl +++ b/offapi/com/sun/star/sheet/SheetCell.idl @@ -43,6 +43,7 @@ #include #include +#include #include #include #include @@ -179,9 +180,11 @@ published service SheetCell [optional, property] string FormulaLocal; -/** contains the result type of a formula. +/** contains the content type of the cell. -@see com::sun::star::sheet::FormulaResult +This property returns not com::sun::star::sheet::FormulaResult +but instead com::sun::star::table::CellContentType. Use FormulaResult2 +if the correct property is needed. */ [readonly, property] long FormulaResultType; @@ -233,6 +236,22 @@ published service SheetCell /** Returns the absolute address of the range as string, e.g. "$Sheet1.$B$2". */ [optional, readonly, property] string AbsoluteName; + + +/** contains the content type of the cell. + +@see com::sun::star::table::CellContentType +@since LibreOffice 6.1 +*/ +[optional, readonly, property] com::sun::star::table::CellContentType CellContentType; + + +/** contains the result type of a formula. + +@see com::sun::star::sheet::FormulaResult +@since LibreOffice 6.1 + */ +[optional, readonly, property] long FormulaResultType2; }; diff --git a/sc/inc/cellsuno.hxx b/sc/inc/cellsuno.hxx index b654141dcab5..8e0a80668dec 100644 --- a/sc/inc/cellsuno.hxx +++ b/sc/inc/cellsuno.hxx @@ -653,7 +653,8 @@ private: voidSetString_Impl(const OUString& rString, bool bInterpret, bool bEnglish); double GetValue_Impl() const; voidSetValue_Impl(double fValue); -css::table::CellContentType GetResultType_Impl(); +css::table::CellContentType GetContentType_Impl(); +sal_Int32 GetResultType_Impl(); protected: virtual const SfxItemPropertyMap& GetItemPropertyMap() override; diff --git a/sc/inc/unonames.hxx b/sc/inc/unonames.hxx index f8bf85968615..0f61dcd2a7d4 100644 --- a/sc/inc/unonames.hxx +++ b/sc/inc/unonames.hxx @@ -209,6 +209,8 @@ #define SC_UNONAME_VALIXML "ValidationXML" #define SC_UNONAME_FORMLOC "FormulaLocal" #define SC_UNONAME_FORMRT "FormulaResultType" +#define SC_UNONAME_FORMRT2 "FormulaResultType2" +#define SC_UNONAME_CELLCONTENTTYPE "CellContentType" #define SC_UNONAME_USERDEF "UserDefinedAttributes" #define SC_UNONAME_TEXTUSER "TextUserDefinedAttributes" diff --git a/sc/inc/unowids.hxx b/sc/inc/unowids.hxx index e099dd2c27fb..492972941c63 100644 --- a/sc/inc/unowids.hxx +++ b/sc/inc/unowids.hxx @@ -73,7 +73,9 @@ #define SC_WID_UNO_TBLBORD2 ( SC_WID_UNO_START + 43 ) #define SC_WID_UNO_CONDFORMAT ( SC_WID_UNO_START + 44 ) #define SC_WID_UNO_FORMATID ( SC_WID_UNO_START + 45 ) -#define SC_WID_UNO_END ( SC_WID_UNO_START + 45 ) +#define SC_WID_UNO_FORMRT2 ( SC_WID_UNO_START + 46 ) +#define SC_WID_UNO_CELLCONTENTTYPE ( SC_WID_UNO_START + 47 ) +#define SC_WID_UNO_END ( SC_WID_UNO_START + 47 ) inline bool IsScUnoWid( sal_uInt16 nWid ) { diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index 2ee12640cd04..2731e69cfc79 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -442,6 +442,8 @@ static const SfxItemPropertySet* lcl_GetCellPropertySet() {OUString(SC_UNONAME_DIAGONAL_TLBR2), ATTR_BORDER_TLBR, ::cppu::UnoType::get(), 0, 0 | CONVERT_TWIPS }, {OUString(SC_UNONAME_FORMLOC), SC_WID_UNO_FORMLOC, cppu::UnoType::get(),0, 0 }, {OUString(SC_UNONAME_FORMRT), SC_WID_UNO_FORMRT, cppu::UnoType::get(), 0 | beans::PropertyAttribute::READONLY, 0 }, +{OUString(SC_UNONAME_CELLCONTENTTYPE), SC_WID_UNO_CELLCONTENTTYPE, cppu::UnoType::get(), 0 | be
[Libreoffice-commits] core.git: i18nlangtag/source
i18nlangtag/source/isolang/langid.pl | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) New commits: commit 429072614e3c1d4bc0f9ca706414a43040464fe4 Author: Eike Rathke Date: Tue Jan 23 19:42:07 2018 +0100 Adapt to svtools/inc/langtab.hrc svtools/source/misc/langtab.src is dead since a while. Change-Id: I373f715d337a47f6ea1e935a7a50565f0e6b3ba2 diff --git a/i18nlangtag/source/isolang/langid.pl b/i18nlangtag/source/isolang/langid.pl index 521a693795a2..ace514a839b3 100755 --- a/i18nlangtag/source/isolang/langid.pl +++ b/i18nlangtag/source/isolang/langid.pl @@ -29,7 +29,7 @@ sub Usage() print STDERR "\n", "langid - a hackish utility to lookup lang.h language defines and LangIDs,\n", -"isolang.cxx ISO639/ISO3166 mapping, locale data files, langtab.src language\n", +"isolang.cxx ISO639/ISO3166 mapping, locale data files, langtab.hrc language\n", "listbox entries, langlist.mk, file_ooo.scp registry name, languages.pm and\n", "msi-encodinglist.txt\n\n", @@ -41,7 +41,7 @@ sub Usage() "If the language string expression matches more than one define,\n", "e.g. as in 'german', all matching defines will be processed.\n", "If the language string does not match a define or an identifier in\n", -"langtab.src, a generic string match of the listbox entries will be tried.\n\n", +"langtab.hrc, a generic string match of the listbox entries will be tried.\n\n", "Numeric values of LangID,primarylanguage,sublanguage can be given\n", "decimal, hexadecimal (leading 0x), octal (leading 0) or binary (leading 0b).\n", @@ -423,16 +423,17 @@ sub main() "$SRC_ROOT", "i18nlangtag", "source/isolang/mslangid.cxx", 1, ()); my $module = "svtools"; -my $name = "source/misc/langtab.src"; +my $name = "inc/langtab.hrc"; +#{ NC_("STR_ARR_SVT_LANGUAGE_TABLE", "Afrikaans (South Africa)") , LANGUAGE_AFRIKAANS }, # < "Afrikaans" ; LANGUAGE_AFRIKAANS ; > ; # lookup define @resultlist = grepFile( -$modifier . '^\s*<\s*".*"\s*;\s*.*' . $grepdef . '.*\s*;\s*>\s*;', +$modifier . '^\s*\{\s*NC_\(\s*"[^"]*"\s*,\s*".*"\s*\)\s*,.*' . $grepdef . '.*\}', "$SRC_ROOT", $module, $name, 1, ()); # lookup string if (!@resultlist) { grepFile( -$modifier . '^\s*<\s*".*' . $grepdef . '.*"\s*;\s*.*\s*;\s*>\s*;', +$modifier . '^\s*\{\s*NC_\(\s*"[^"]*"\s*,\s*".*' . $grepdef . '.*"\s*\)\s*,.*\}', "$SRC_ROOT", $module, $name, 1, ()); } for my $langtag (@langtaggreplist) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: basic/source include/basic
basic/source/sbx/sbxvalue.cxx | 16 +--- include/basic/sbxvar.hxx | 12 2 files changed, 17 insertions(+), 11 deletions(-) New commits: commit ad9871a5d1119593068f7e3a01d4249b4dff982a Author: Stephan Bergmann Date: Tue Jan 23 11:06:22 2018 +0100 Introduce SbxValues::clear ...to avoid upcoming GCC 8 -Werror=class-memaccess ("clearing an object of non- trivial type ‘struct SbxValues’") Change-Id: Icf610e692b81030bfd6f2f940c43ee8bf6f1d4e0 Reviewed-on: https://gerrit.libreoffice.org/48389 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx index dcf336544c3e..0f609d866135 100644 --- a/basic/source/sbx/sbxvalue.cxx +++ b/basic/source/sbx/sbxvalue.cxx @@ -44,8 +44,7 @@ SbxValue::SbxValue( SbxDataType t ) : SbxBase() n = SbxEMPTY; else SetFlag( SbxFlagBits::Fixed ); -memset( &aData, 0, sizeof( SbxValues ) ); -aData.eType = SbxDataType( n ); +aData.clear(SbxDataType( n )); } SbxValue::SbxValue( const SbxValue& r ) @@ -172,8 +171,7 @@ void SbxValue::Clear() default: { SbxValues aEmpty; -memset( &aEmpty, 0, sizeof( SbxValues ) ); -aEmpty.eType = GetType(); +aEmpty.clear(GetType()); Put( aEmpty ); } } @@ -341,8 +339,7 @@ bool SbxValue::Get( SbxValues& rRes ) const { // Object contained itself SbxDataType eTemp = rRes.eType; -memset( &rRes, 0, sizeof( SbxValues ) ); -rRes.eType = eTemp; +rRes.clear(eTemp); } } if( !IsError() ) @@ -753,9 +750,7 @@ bool SbxValue::SetType( SbxDataType t ) break; default: break; } -// This works always, because the Float representations are 0 as well. -memset( &aData, 0, sizeof( SbxValues ) ); -aData.eType = t; +aData.clear(t); } } return true; @@ -1502,9 +1497,8 @@ bool SbxValue::LoadData( SvStream& r, sal_uInt16 ) case SbxWCHAR: break; default: -memset (&aData,0,sizeof(aData)); +aData.clear(SbxNULL); ResetFlag(SbxFlagBits::Fixed); -aData.eType = SbxNULL; SAL_WARN( "basic.sbx", "Loaded a non-supported data type" ); return false; diff --git a/include/basic/sbxvar.hxx b/include/basic/sbxvar.hxx index b189d4e32c26..1908ce83b73e 100644 --- a/include/basic/sbxvar.hxx +++ b/include/basic/sbxvar.hxx @@ -24,6 +24,9 @@ #include #include #include + +#include +#include #include @@ -71,6 +74,15 @@ struct SbxValues SbxValues(): pData( nullptr ), eType(SbxEMPTY) {} SbxValues( SbxDataType e ): eType(e) {} SbxValues( double _nDouble ): nDouble( _nDouble ), eType(SbxDOUBLE) {} + +void clear(SbxDataType type) { +// A hacky way of zeroing the union value corresponding to the given type (even though the +// relevant zero value need not be represented by all-zero bits, in general) without evoking +// GCC 8 -Wclass-memaccess, and without having to turn the anonymous union into a non- +// anonymous one: +std::memset(static_cast(this), 0, offsetof(SbxValues, eType)); +eType = type; +} }; class BASIC_DLLPUBLIC SbxValue : public SbxBase ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - vcl/source xmlsecurity/qa
vcl/source/filter/ipdf/pdfdocument.cxx|9 + xmlsecurity/qa/unit/pdfsigning/data/tdf114460.pdf |binary xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx |2 ++ 3 files changed, 11 insertions(+) New commits: commit e45ca13634ba51a6133a231f74db76be06bb4d95 Author: Miklos Vajna Date: Mon Jan 22 22:12:04 2018 +0100 tdf#114460 vcl: handle nested parentheses in PDF roundtrip The roundtrip of the pdf image failed due to this. (cherry picked from commit f58a16d5987c8e8c16580c514ce0c7b0895b4105) Change-Id: I88a9657e242dd2659f9bf06233e5fcbfeb43ceb5 Reviewed-on: https://gerrit.libreoffice.org/48378 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/vcl/source/filter/ipdf/pdfdocument.cxx b/vcl/source/filter/ipdf/pdfdocument.cxx index 56e90cf7adf3..11c4519e44cf 100644 --- a/vcl/source/filter/ipdf/pdfdocument.cxx +++ b/vcl/source/filter/ipdf/pdfdocument.cxx @@ -2021,11 +2021,20 @@ bool PDFLiteralStringElement::Read(SvStream& rStream) nPrevCh = ch; rStream.ReadChar(ch); +// Start with 1 nesting level as we read a '(' above already. +int nDepth = 1; OStringBuffer aBuf; while (!rStream.eof()) { +if (ch == '(' && nPrevCh != '\\') +++nDepth; + if (ch == ')' && nPrevCh != '\\') +--nDepth; + +if (nDepth == 0) { +// ')' of the outermost '(' is reached. m_aValue = aBuf.makeStringAndClear(); SAL_INFO("vcl.filter", "PDFLiteralStringElement::Read: m_aValue is '" << m_aValue << "'"); return true; diff --git a/xmlsecurity/qa/unit/pdfsigning/data/tdf114460.pdf b/xmlsecurity/qa/unit/pdfsigning/data/tdf114460.pdf new file mode 100644 index ..a736e5bb90cd Binary files /dev/null and b/xmlsecurity/qa/unit/pdfsigning/data/tdf114460.pdf differ diff --git a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx index 642a034ae5e1..c989af96f1b3 100644 --- a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx +++ b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx @@ -448,6 +448,8 @@ void PDFSigningTest::testTokenize() // File that's intentionally smaller than 1024 bytes. "small.pdf", "tdf107149.pdf", +// Nested parentheses were not handled. +"tdf114460.pdf", }; for (const auto& rName : aNames) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - vcl/unx
vcl/unx/gtk/gtksalframe.cxx |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) New commits: commit 8fdf126e4b8c49093cd33f921b675d40fe98eafe Author: Caolán McNamara Date: Fri Jan 19 15:40:50 2018 + Resolves: tdf#115106 don't assume fullscreen is impress writer can too, so revert this part of commit 277395b6266c57a7709c3c47986f135f6789c8e7 Author: Caolán McNamara Date: Tue Jun 13 18:09:08 2017 +0100 make opengl transitions under X flicker free on enter/leave which should restore matters to its former glory, at this point gtk3 opengl transition support now works so it all moot to me now. Change-Id: I78a8a774aead6482d0541575dbf10ad977ceccc0 Reviewed-on: https://gerrit.libreoffice.org/48208 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/vcl/unx/gtk/gtksalframe.cxx b/vcl/unx/gtk/gtksalframe.cxx index c0bbf1303b1a..ff540dc8fd1d 100644 --- a/vcl/unx/gtk/gtksalframe.cxx +++ b/vcl/unx/gtk/gtksalframe.cxx @@ -2868,9 +2868,7 @@ gboolean GtkSalFrame::signalExpose( GtkWidget*, GdkEventExpose* pEvent, gpointer { GtkSalFrame* pThis = static_cast(frame); -const bool bImmediate = OpenGLHelper::isVCLOpenGLEnabled() || pThis->m_bFullscreen; - -struct SalPaintEvent aEvent( pEvent->area.x, pEvent->area.y, pEvent->area.width, pEvent->area.height, bImmediate ); +struct SalPaintEvent aEvent( pEvent->area.x, pEvent->area.y, pEvent->area.width, pEvent->area.height, OpenGLHelper::isVCLOpenGLEnabled() ); pThis->CallCallback( SalEvent::Paint, &aEvent ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - include/vcl sc/source sd/source sw/source
include/vcl/abstdlg.hxx |4 ++-- include/vcl/dialog.hxx |5 ++--- sc/source/ui/view/tabvwsha.cxx |2 +- sd/source/ui/func/fuarea.cxx|2 +- sd/source/ui/func/fuline.cxx|2 +- sd/source/ui/func/futransf.cxx |2 +- sw/source/uibase/app/docst.cxx |2 +- sw/source/uibase/shells/textsh1.cxx |4 ++-- sw/source/uibase/shells/txtnum.cxx |2 +- 9 files changed, 12 insertions(+), 13 deletions(-) New commits: commit 92d7a58b8cafd80308b9a72bb7269e09f98d30db Author: Noel Grandin Date: Mon Jan 22 10:44:20 2018 +0200 StartExecuteAsync doesn't need a second param we can just use this to store a keep-alive reference in AsyncContext Change-Id: I0152aef5386aa9753b48afdfc958790f10d13560 Reviewed-on: https://gerrit.libreoffice.org/48294 Reviewed-by: Michael Meeks Reviewed-by: Jan Holesovsky Tested-by: Jenkins Reviewed-on: https://gerrit.libreoffice.org/48459 Tested-by: Jan Holesovsky diff --git a/include/vcl/abstdlg.hxx b/include/vcl/abstdlg.hxx index 55260f51aef3..4ecf4df7087a 100644 --- a/include/vcl/abstdlg.hxx +++ b/include/vcl/abstdlg.hxx @@ -48,10 +48,10 @@ public: bool isSet() { return !!maEndDialogFn; } }; -bool StartExecuteAsync(const std::function &rEndDialogFn, VclPtr xOwner) +bool StartExecuteAsync(const std::function &rEndDialogFn) { AsyncContext aCtx; -aCtx.mxOwner = xOwner; +aCtx.mxOwner = this; aCtx.maEndDialogFn = rEndDialogFn; return StartExecuteAsync(aCtx); } diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx index aa837f741c2c..7a69b6c48618 100644 --- a/include/vcl/dialog.hxx +++ b/include/vcl/dialog.hxx @@ -129,11 +129,10 @@ public: // FIXME: Need to remove old StartExecuteModal in favour of this one. /// Returns true of the dialog successfully starts -bool StartExecuteAsync(const std::function &rEndDialogFn, - VclPtr xOwner = VclPtr()) +bool StartExecuteAsync(const std::function &rEndDialogFn) { VclAbstractDialog::AsyncContext aCtx; -aCtx.mxOwner = xOwner; +aCtx.mxOwner = this; aCtx.maEndDialogFn = rEndDialogFn; return StartExecuteAsync(aCtx); } diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx index 97f2c252722f..fc305eda401b 100644 --- a/sc/source/ui/view/tabvwsha.cxx +++ b/sc/source/ui/view/tabvwsha.cxx @@ -565,7 +565,7 @@ void ScTabViewShell::ExecuteCellFormatDlg(SfxRequest& rReq, const OString &rName pRequest->Done(*pOutSet); } -}, pDlg); +}); } bool ScTabViewShell::IsRefInputMode() const diff --git a/sd/source/ui/func/fuarea.cxx b/sd/source/ui/func/fuarea.cxx index b7764c4893d4..fa6c773b434c 100644 --- a/sd/source/ui/func/fuarea.cxx +++ b/sd/source/ui/func/fuarea.cxx @@ -90,7 +90,7 @@ void FuArea::DoExecute( SfxRequest& rReq ) mpViewShell->GetViewFrame()->GetBindings().Invalidate( SidArray ); } -}, pDlg); +}); } void FuArea::Activate() diff --git a/sd/source/ui/func/fuline.cxx b/sd/source/ui/func/fuline.cxx index 7e94d51dc806..7e804262cc98 100644 --- a/sd/source/ui/func/fuline.cxx +++ b/sd/source/ui/func/fuline.cxx @@ -107,7 +107,7 @@ void FuLine::DoExecute( SfxRequest& rReq ) mpViewShell->GetViewFrame()->GetBindings().Invalidate( SidArray ); } mpViewShell->Cancel(); -}, pDlg); +}); } void FuLine::Activate() diff --git a/sd/source/ui/func/futransf.cxx b/sd/source/ui/func/futransf.cxx index 1651ed5267bf..a9e05c9346df 100644 --- a/sd/source/ui/func/futransf.cxx +++ b/sd/source/ui/func/futransf.cxx @@ -153,7 +153,7 @@ void FuTransform::DoExecute( SfxRequest& rReq ) mpViewShell->Invalidate(SID_RULER_OBJECT); mpViewShell->Cancel(); -}, pDlg); +}); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx index 41a21853194a..5b7f809a11a5 100644 --- a/sw/source/uibase/app/docst.cxx +++ b/sw/source/uibase/app/docst.cxx @@ -866,7 +866,7 @@ void SwDocShell::Edit( if (pRequest) pRequest->Done(); -}, pDlg); +}); } else { diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index 08da7496a15c..51909fa43504 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -212,7 +212,7 @@ void sw_CharDialog(SwWrtShell &rWrtSh, bool bUseDialog, sal_uInt16 nSlot, const { sw_CharDialogResult(pDlg->GetOutputItemSet(), rWrtSh, pCoreSet, bSel, bSelectionPut, pRequest.get()); } -}, pDlg); +}); } else if (pArgs) { @@ -1139,7 +1139,7 @@ void SwTextShell::Execute(SfxRequest &rReq) sw_ParagraphDialogResult(pSe
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - sw/source
sw/source/uibase/shells/tabsh.cxx | 58 ++ 1 file changed, 35 insertions(+), 23 deletions(-) New commits: commit 89d777a6b8e3f6ab4ec97491e35f5135edd0d9f5 Author: Jan Holesovsky Date: Tue Jan 23 18:13:01 2018 +0100 lokdialog: Convert the Table -> Properties... to async exec. Change-Id: Iac937f5032ddaa614f8364a85b0b8db2a0828cbd Reviewed-on: https://gerrit.libreoffice.org/48460 Reviewed-by: Andras Timar Tested-by: Andras Timar diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx index b2286fa09538..9324394cd16a 100644 --- a/sw/source/uibase/shells/tabsh.cxx +++ b/sw/source/uibase/shells/tabsh.cxx @@ -584,7 +584,7 @@ void SwTableShell::Execute(SfxRequest &rReq) FieldUnit eMetric = ::GetDfltMetric(dynamic_cast( &rSh.GetView()) != nullptr ); SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric))); -std::unique_ptr pTableRep(::lcl_TableParamToItemSet( aCoreSet, rSh )); +std::shared_ptr pTableRep(::lcl_TableParamToItemSet(aCoreSet, rSh)); aCoreSet.Put(SfxUInt16Item(SID_HTML_MODE, ::GetHtmlMode(GetView().GetDocShell(; rSh.GetTableAttr(aCoreSet); @@ -595,37 +595,49 @@ void SwTableShell::Execute(SfxRequest &rReq) else aCoreSet.InvalidateItem( RES_BACKGROUND ); -ScopedVclPtr pDlg; -{ -SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); -OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); +SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); +OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - pDlg.disposeAndReset(pFact->CreateSwTableTabDlg(GetView().GetWindow(), GetPool(), &aCoreSet, &rSh)); -OSL_ENSURE(pDlg, "Dialog creation failed!"); +VclPtr pDlg(pFact->CreateSwTableTabDlg(GetView().GetWindow(), GetPool(), &aCoreSet, &rSh)); +OSL_ENSURE(pDlg, "Dialog creation failed!"); +if (pDlg) +{ if (pItem) pDlg->SetCurPageId(OUStringToOString(static_cast(pItem)->GetValue(), RTL_TEXTENCODING_UTF8)); -} +std::shared_ptr pRequest(new SfxRequest(rReq)); +rReq.Ignore(); // the 'old' request is not relevant any more -if ( (!pDlg && rReq.GetArgs()) || (pDlg && pDlg->Execute() == RET_OK) ) +pDlg->StartExecuteAsync([pDlg, pRequest, pTableRep, &rBindings, &rSh](sal_Int32 nResult){ +if (RET_OK == nResult) +{ +const SfxItemSet* pOutSet = pDlg->GetOutputItemSet(); + +//to record FN_INSERT_TABLE correctly +pRequest->SetSlot(FN_FORMAT_TABLE_DLG); +pRequest->Done(*pOutSet); + +ItemSetToTableParam(*pOutSet, rSh); +} + +rBindings.Update(SID_RULER_BORDERS); +rBindings.Update(SID_ATTR_TABSTOP); +rBindings.Update(SID_RULER_BORDERS_VERTICAL); +rBindings.Update(SID_ATTR_TABSTOP_VERTICAL); +}); +} +else { -const SfxItemSet* pOutSet = pDlg ? pDlg->GetOutputItemSet() : rReq.GetArgs(); -if ( pDlg ) -{ -//to record FN_INSERT_TABLE correctly -rReq.SetSlot(FN_FORMAT_TABLE_DLG); -rReq.Done( *pOutSet ); -} -ItemSetToTableParam( *pOutSet, rSh ); +if (rReq.GetArgs()) +ItemSetToTableParam(*rReq.GetArgs(), rSh); + +rBindings.Update(SID_RULER_BORDERS); +rBindings.Update(SID_ATTR_TABSTOP); +rBindings.Update(SID_RULER_BORDERS_VERTICAL); +rBindings.Update(SID_ATTR_TABSTOP_VERTICAL); } -pDlg.disposeAndClear(); -pTableRep.reset(); -rBindings.Update(SID_RULER_BORDERS); -rBindings.Update(SID_ATTR_TABSTOP); -rBindings.Update(SID_RULER_BORDERS_VERTICAL); -rBindings.Update(SID_ATTR_TABSTOP_VERTICAL); break; } case SID_ATTR_BRUSH: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - desktop/source svx/source
desktop/source/app/app.cxx | 34 ++--- desktop/source/app/officeipcthread.cxx | 19 +--- svx/source/inc/docrecovery.hxx |1 svx/source/unodraw/recoveryui.cxx | 38 + 4 files changed, 85 insertions(+), 7 deletions(-) New commits: commit 30f07eb1d412fd53da70f350322034aae5b9c561 Author: Mike Kaganski Date: Sun Jan 21 22:10:09 2018 +0300 tdf#38915: set cProcessed condition on any process outcome When application is initializing, initially request handler is not processing requests (its state is Starting). Requests processing is enabled in Desktop::OpenClients() after recovery had been processed. If another soffice process is started, it communicates over already established pipe, and sends a request to the first process. In IpcThread::process(), it is decided if the request needs to be checked for completion (e.g., if a file or specific module was requested to be open). After that, the prepared request is posted for processing. In case when the completion should be checked, PipeIpcThread::execute() then waits for Processed condition indefinitely. Request is processed in RequestHandler::ExecuteCmdLineRequests, which first checks that handler's state is RequestsEnabled, and if it isn't, then returns. Otherwise, after processing, Processed condition is set. The problem is, thus, in case when the request comes before requests processing is enabled (e.g., when recovery dialog is open): request handler thread waits indefinitely, but the processed condition will not be set. This will not allow to close the pipe to second process, and it will hang indefinitely. The IPC thread will be hung even after user closes recovery dialog, and continues working with program. So, subsequent attempts to open files from file manager (launching new process) will fail, and new zombie soffice processes will wait the first indefinitely. Also, when first process will be closed by user, the deinit sequence will attempt to wait for the IPC thread to finish (in RequestHandler::Disable(), after all visible windows had been closed), which will leave the first process hung, preventing all subsequent attempts to open LibreOffice. This patch ensures that the Processed condition is set at any outcome in RequestHandler::ExecuteCmdLineRequests. Also, it brings (possibly hidden) recovery dialog to front, making the reason why following attempts to open files fail apparent to user. Change-Id: Ibddf7483e5b1d6167ac7f307ea2442119f446129 Reviewed-on: https://gerrit.libreoffice.org/48280 Tested-by: Jenkins Reviewed-by: Aron Budea Reviewed-by: Mike Kaganski (cherry picked from commit cf333a878ceed18d0343520a2c65be69fc433b1f) Reviewed-on: https://gerrit.libreoffice.org/48289 Reviewed-by: Michael Stahl diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index d66fb1658054..192793ea42f1 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -982,6 +982,15 @@ void impl_checkRecoveryState(bool& bCrashed , bSessionDataExists = elements && session; } +Reference< css::frame::XSynchronousDispatch > g_xRecoveryUI; + +template +struct RefClearGuard +{ +Ref& m_Ref; +RefClearGuard(Ref& ref) : m_Ref(ref) {} +~RefClearGuard() { m_Ref.clear(); } +}; /* @short start the recovery wizard. @@ -996,12 +1005,13 @@ bool impl_callRecoveryUI(bool bEmergencySave , css::uno::Reference< css::uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext(); -Reference< css::frame::XSynchronousDispatch > xRecoveryUI( +g_xRecoveryUI.set( xContext->getServiceManager()->createInstanceWithContext("com.sun.star.comp.svx.RecoveryUI", xContext), css::uno::UNO_QUERY_THROW); +RefClearGuard> refClearGuard(g_xRecoveryUI); Reference< css::util::XURLTransformer > xURLParser = - css::util::URLTransformer::create(::comphelper::getProcessComponentContext()); +css::util::URLTransformer::create(xContext); css::util::URL aURL; if (bEmergencySave) @@ -1013,6 +1023,24 @@ bool impl_callRecoveryUI(bool bEmergencySave , xURLParser->parseStrict(aURL); +css::uno::Any aRet = g_xRecoveryUI->dispatchWithReturnValue(aURL, css::uno::Sequence< css::beans::PropertyValue >()); +bool bRet = false; +aRet >>= bRet; +return bRet; +} + +bool impl_bringToFrontRecoveryUI() +{ +Reference< css::frame::XSynchronousDispatch > xRecoveryUI(g_xRecoveryUI); +if (!xRecoveryUI.is()) +return false; + +css::util::URL aURL; +aURL.Complete = "vnd.sun.star.autorecovery:/doBringToFront"; +Reference< css::util::XURLTransformer > xURLParser = + css::util::URLTransformer::create(::comphelper::getProcessComponentCont
[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - vcl/source
vcl/source/control/ctrl.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 4e00b175e2c222bc320ec16caa90aa1bd2c1b7a7 Author: Maxim Monastirsky Date: Sat Jan 20 19:51:34 2018 +0200 tdf#115023 Check mpControlData for nullptr Control::ImplClearLayoutData happens to be called post dispose, but Control::dispose already destroyed mpControlData. So put back the nullptr check that was removed in e8b49f09074fe184374bee5062715357427ae044 ("new loplugin: useuniqueptr: vcl"). (But IMHO it's odd that we even try to send lose focus events to disposing windows. So maybe it would make sense to replace the "! pOldFocusWindow->IsDisposed()" check inside Window::ImplGrabFocus with "isDisposed()" which comes from VclReferenceBase, and set much earlier?) Change-Id: Iddaf7e05d6cb56c28a34884876770753fcf7179e Reviewed-on: https://gerrit.libreoffice.org/48246 Reviewed-by: Noel Grandin Tested-by: Jenkins Reviewed-by: Maxim Monastirsky (cherry picked from commit 2a2b37202a735b34da914c03b2f6e1495f833b51) Reviewed-on: https://gerrit.libreoffice.org/48251 Reviewed-by: Michael Stahl diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx index b62c90563d46..5f3d23901b0a 100644 --- a/vcl/source/control/ctrl.cxx +++ b/vcl/source/control/ctrl.cxx @@ -328,7 +328,8 @@ void Control::SetLayoutDataParent( const Control* pParent ) const void Control::ImplClearLayoutData() const { -mpControlData->mpLayoutData.reset(); +if (mpControlData) +mpControlData->mpLayoutData.reset(); } void Control::ImplDrawFrame( OutputDevice* pDev, tools::Rectangle& rRect ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - vcl/source
vcl/source/control/ctrl.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 034bd06589fc667307b15124da791f0fedc7619d Author: Maxim Monastirsky Date: Sat Jan 20 19:51:34 2018 +0200 tdf#115023 Check mpControlData for nullptr Control::ImplClearLayoutData happens to be called post dispose, but Control::dispose already destroyed mpControlData. So put back the nullptr check that was removed in e8b49f09074fe184374bee5062715357427ae044 ("new loplugin: useuniqueptr: vcl"). (But IMHO it's odd that we even try to send lose focus events to disposing windows. So maybe it would make sense to replace the "! pOldFocusWindow->IsDisposed()" check inside Window::ImplGrabFocus with "isDisposed()" which comes from VclReferenceBase, and set much earlier?) Change-Id: Iddaf7e05d6cb56c28a34884876770753fcf7179e Reviewed-on: https://gerrit.libreoffice.org/48246 Reviewed-by: Noel Grandin Tested-by: Jenkins Reviewed-by: Maxim Monastirsky (cherry picked from commit 2a2b37202a735b34da914c03b2f6e1495f833b51) Reviewed-on: https://gerrit.libreoffice.org/48252 Reviewed-by: Michael Stahl diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx index 3e4c0d56afb8..b8b7830b54a7 100644 --- a/vcl/source/control/ctrl.cxx +++ b/vcl/source/control/ctrl.cxx @@ -325,7 +325,8 @@ void Control::SetLayoutDataParent( const Control* pParent ) const void Control::ImplClearLayoutData() const { -mpControlData->mpLayoutData.reset(); +if (mpControlData) +mpControlData->mpLayoutData.reset(); } void Control::ImplDrawFrame( OutputDevice* pDev, tools::Rectangle& rRect ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - vcl/source xmlsecurity/qa
vcl/source/filter/ipdf/pdfdocument.cxx|9 + xmlsecurity/qa/unit/pdfsigning/data/tdf114460.pdf |binary xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx |2 ++ 3 files changed, 11 insertions(+) New commits: commit 2e0204bec154e50916d26b4f4e855f7d84235592 Author: Miklos Vajna Date: Mon Jan 22 22:12:04 2018 +0100 tdf#114460 vcl: handle nested parentheses in PDF roundtrip The roundtrip of the pdf image failed due to this. (cherry picked from commit f58a16d5987c8e8c16580c514ce0c7b0895b4105) Change-Id: I88a9657e242dd2659f9bf06233e5fcbfeb43ceb5 Reviewed-on: https://gerrit.libreoffice.org/48453 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/vcl/source/filter/ipdf/pdfdocument.cxx b/vcl/source/filter/ipdf/pdfdocument.cxx index 105800974532..cd6bf4659b87 100644 --- a/vcl/source/filter/ipdf/pdfdocument.cxx +++ b/vcl/source/filter/ipdf/pdfdocument.cxx @@ -2084,11 +2084,20 @@ bool PDFLiteralStringElement::Read(SvStream& rStream) nPrevCh = ch; rStream.ReadChar(ch); +// Start with 1 nesting level as we read a '(' above already. +int nDepth = 1; OStringBuffer aBuf; while (!rStream.IsEof()) { +if (ch == '(' && nPrevCh != '\\') +++nDepth; + if (ch == ')' && nPrevCh != '\\') +--nDepth; + +if (nDepth == 0) { +// ')' of the outermost '(' is reached. m_aValue = aBuf.makeStringAndClear(); SAL_INFO("vcl.filter", "PDFLiteralStringElement::Read: m_aValue is '" << m_aValue << "'"); return true; diff --git a/xmlsecurity/qa/unit/pdfsigning/data/tdf114460.pdf b/xmlsecurity/qa/unit/pdfsigning/data/tdf114460.pdf new file mode 100644 index ..a736e5bb90cd Binary files /dev/null and b/xmlsecurity/qa/unit/pdfsigning/data/tdf114460.pdf differ diff --git a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx index 59ff206e2c28..08e41dfc997e 100644 --- a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx +++ b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx @@ -416,6 +416,8 @@ void PDFSigningTest::testTokenize() // File that's intentionally smaller than 1024 bytes. "small.pdf", "tdf107149.pdf", +// Nested parentheses were not handled. +"tdf114460.pdf", }; for (const auto& rName : aNames) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/source
sc/source/core/data/pagepar.cxx |8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) New commits: commit d1016591f42b47ea52d96ce9f09ed01749b97d77 Author: Stephan Bergmann Date: Tue Jan 23 11:46:44 2018 +0100 Use a more conventional way of clearing ScRange variables ...to avoid upcoming GCC 8 -Werror=class-memaccess ("clearing an object of type ‘class ScRange’ with no trivial copy-assignment") Change-Id: I2178697082b1c284d26cedaa64c73b92d9e6aecb Reviewed-on: https://gerrit.libreoffice.org/48393 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/sc/source/core/data/pagepar.cxx b/sc/source/core/data/pagepar.cxx index 97d0d03eb54a..9853e4ac52a5 100644 --- a/sc/source/core/data/pagepar.cxx +++ b/sc/source/core/data/pagepar.cxx @@ -17,8 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include - #include // struct ScPageTableParam: @@ -59,9 +57,9 @@ void ScPageAreaParam::Reset() { bPrintArea = bRepeatRow = bRepeatCol = false; -memset( &aPrintArea, 0, sizeof(ScRange) ); -memset( &aRepeatRow, 0, sizeof(ScRange) ); -memset( &aRepeatCol, 0, sizeof(ScRange) ); +aPrintArea = ScRange(); +aRepeatRow = ScRange(); +aRepeatCol = ScRange(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sal/osl
sal/osl/unx/security.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit a886fbfb54b1b770e57862a4ce58f99dbdb368fa Author: Stephan Bergmann Date: Tue Jan 23 11:18:00 2018 +0100 Silence upcoming GCC 8 -Werror=sizeof-pointer-memaccess ...("error: argument to ‘sizeof’ in ‘char* strncpy(char*, const char*, size_t)’ call is the same expression as the source; did you mean to use the size of the destination?") in a place where the use of strncpy instead of strcpy (introduced with 9276f7d5740a28b342db2a9bcd8644ff2f4f5742 "fdo#32263") doesn't help prevent any buffer overflows anyway (the target's size already having been checked to be sufficiently large). Change-Id: I70773538f4092f1306fb00f1fa7f9138e06894e5 Reviewed-on: https://gerrit.libreoffice.org/48391 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/sal/osl/unx/security.cxx b/sal/osl/unx/security.cxx index 9b76060f40a2..49a0320bc023 100644 --- a/sal/osl/unx/security.cxx +++ b/sal/osl/unx/security.cxx @@ -365,7 +365,7 @@ static bool osl_psz_getConfigDir(oslSecurity Security, sal_Char* pszDirectory, s n = strlen(pszDirectory); if (n + sizeof(DOT_CONFIG) < nMax) { -strncpy(pszDirectory+n, DOT_CONFIG, sizeof(DOT_CONFIG)); +strcpy(pszDirectory+n, DOT_CONFIG); // safe // try to create dir if not present bool dirOK = true; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/source
sd/source/filter/eppt/pptexanimations.cxx |2 -- 1 file changed, 2 deletions(-) New commits: commit 6b75c472cb93a635403317f937df4f543d9b82cf Author: Stephan Bergmann Date: Tue Jan 23 11:48:30 2018 +0100 AnimationNode default ctor already zero-initializes the members Change-Id: I9725189846a38860550c651b2428296564824ba8 Reviewed-on: https://gerrit.libreoffice.org/48394 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/sd/source/filter/eppt/pptexanimations.cxx b/sd/source/filter/eppt/pptexanimations.cxx index 4e8ea36a0965..23b24910db16 100644 --- a/sd/source/filter/eppt/pptexanimations.cxx +++ b/sd/source/filter/eppt/pptexanimations.cxx @@ -538,7 +538,6 @@ void AnimationExporter::exportNode( SvStream& rStrm, Reference< XAnimationNode > { EscherExAtom aAnimNodeExAtom( rStrm, DFF_msofbtAnimNode ); AnimationNode aAnim; -memset( &aAnim, 0, sizeof( aAnim ) ); aAnim.mnGroupType = mso_Anim_GroupType_PAR; aAnim.mnNodeType = 1; // attribute Restart @@ -784,7 +783,6 @@ void AnimationExporter::exportAnimNode( SvStream& rStrm, const Reference< XAnima { EscherExAtomaAnimNodeExAtom( rStrm, DFF_msofbtAnimNode ); AnimationNode aAnim; -memset( &aAnim, 0, sizeof( aAnim ) ); // attribute Restart switch( xNode->getRestart() ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: tools/source
tools/source/generic/poly.cxx |6 +- 1 file changed, 1 insertion(+), 5 deletions(-) New commits: commit de694ba260e1b48ca06ea88c03f8f5f97ac4990e Author: Stephan Bergmann Date: Tue Jan 23 11:59:41 2018 +0100 Point default ctor already zero-initializes the members Change-Id: I9cb59c77a420c975933070eea691cda52b066b0b Reviewed-on: https://gerrit.libreoffice.org/48397 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx index ce1156bac990..3c78b5a04bc8 100644 --- a/tools/source/generic/poly.cxx +++ b/tools/source/generic/poly.cxx @@ -496,7 +496,6 @@ void ImplPolygon::ImplInitSize(sal_uInt16 nInitSize, bool bFlags) if (nInitSize) { mxPointAry.reset(new Point[nInitSize]); -memset(mxPointAry.get(), 0, nInitSize * sizeof(Point)); } if (bFlags) @@ -525,9 +524,8 @@ void ImplPolygon::ImplSetSize( sal_uInt16 nNewSize, bool bResize ) // Copy the old points if ( mnPoints < nNewSize ) { -// New points initialized to zero +// New points are already implicitly initialized to zero const std::size_t nOldSz(mnPoints * sizeof(Point)); -memset(xNewAry.get() + mnPoints, 0, nNewSz - nOldSz); if (mxPointAry) memcpy(xNewAry.get(), mxPointAry.get(), nOldSz); } @@ -606,8 +604,6 @@ bool ImplPolygon::ImplSplit( sal_uInt16 nPos, sal_uInt16 nSpace, ImplPolygon con if( pInitPoly ) memcpy(xNewAry.get() + nPos, pInitPoly->mxPointAry.get(), nSpaceSize); -else -memset(xNewAry.get() + nPos, 0, nSpaceSize); memcpy(xNewAry.get() + nSecPos, mxPointAry.get() + nPos, nRest * sizeof(Point)); mxPointAry = std::move(xNewAry); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/source
sw/source/filter/ww8/ww8par.cxx |1 - sw/source/filter/ww8/ww8par2.cxx |1 - 2 files changed, 2 deletions(-) New commits: commit 3dfc300a142446c91ec5e81e685b5a47408d9056 Author: Stephan Bergmann Date: Tue Jan 23 11:54:46 2018 +0100 WW8PLCFxSaveAll/WW8_SHD default ctors already zero-initialize their members Change-Id: I690e6e812d52344faef93b2856ce0f4a22509d2c Reviewed-on: https://gerrit.libreoffice.org/48396 Reviewed-by: Stephan Bergmann Tested-by: Stephan Bergmann diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index dd74a48b4056..6484a3606cff 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -6406,7 +6406,6 @@ bool SwMSDffManager::GetOLEStorageName(sal_uInt32 nOLEId, OUString& rStorageName static_cast(nOLEId & 0x)) ) { WW8PLCFxSaveAll aSave; -memset( &aSave, 0, sizeof( aSave ) ); rReader.m_xPlcxMan->SaveAllPLCFx( aSave ); nStartCp += rReader.m_nDrawCpO; diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index 02ec5bd8150a..59abfb5e8eca 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -1665,7 +1665,6 @@ void WW8TabBandDesc::ReadShd(const sal_uInt8* pS ) if( !pSHDs ) { pSHDs = new WW8_SHD[nWwCols]; -memset( pSHDs, 0, nWwCols * sizeof( WW8_SHD ) ); } short nCount = nLen >> 1; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 3 commits - configure.ac svx/source
configure.ac| 16 +--- svx/source/dialog/framelink.cxx |2 +- 2 files changed, 14 insertions(+), 4 deletions(-) New commits: commit 81a1882d62ca26a28f70289e0134f6b78f1c21f2 Author: Michael Stahl Date: Tue Jan 23 18:29:13 2018 +0100 configure: if WiLangId.vbs isn't found but is required, error out Change-Id: I8a145c1024a522a17c6ac2bf961cb4f07f3e7be9 diff --git a/configure.ac b/configure.ac index aec4c88f9e95..3de79ab4d192 100644 --- a/configure.ac +++ b/configure.ac @@ -5340,9 +5340,16 @@ the Windows SDK are installed.]) if ! test -e "$WINDOWS_SDK_WILANGID" ; then WINDOWS_SDK_WILANGID=$(cygpath -sm "C:/Program Files (x86)/Windows Kits/8.1/bin/$WINDOWS_SDK_ARCH/WiLangId.vbs") fi -if ! test -e "$WINDOWS_SDK_WILANGID" ; then -AC_MSG_WARN([WiLangId.vbs not found - building translated packages will fail]) -add_warning "WiLangId.vbs not found - building translated packages will fail" +fi +if test -n "$with_lang" -a "$with_lang" != "en-US"; then +if test -n "$with_package_format" -a "$with_package_format" != no; then +for i in "$with_package_format"; do +if test "$i" = "msi"; then +if ! test -e "$WINDOWS_SDK_WILANGID" ; then +AC_MSG_ERROR([WiLangId.vbs not found - building translated packages will fail]) +fi +fi +done fi fi fi commit 112c931ff3a7aa263481b659931dfd172e75aafc Author: Michael Stahl Date: Tue Jan 23 18:27:25 2018 +0100 configure: find WiLangId.vbs where SDK 10.0.16299.0 hides it Change-Id: I71d27f3f97e257b4e45261004088ce3435f82090 diff --git a/configure.ac b/configure.ac index 6edc010762de..aec4c88f9e95 100644 --- a/configure.ac +++ b/configure.ac @@ -5332,6 +5332,9 @@ the Windows SDK are installed.]) if test -z "$WINDOWS_SDK_WILANGID" -a -n "$WINDOWS_SDK_HOME"; then WINDOWS_SDK_WILANGID=$WINDOWS_SDK_HOME/Samples/sysmgmt/msi/scripts/WiLangId.vbs if ! test -e "$WINDOWS_SDK_WILANGID" ; then + WINDOWS_SDK_WILANGID="${WINDOWS_SDK_HOME}/bin/${WINDOWS_SDK_LIB_SUBDIR}/${WINDOWS_SDK_ARCH}/WiLangId.vbs" +fi +if ! test -e "$WINDOWS_SDK_WILANGID" ; then WINDOWS_SDK_WILANGID=$WINDOWS_SDK_HOME/bin/$WINDOWS_SDK_ARCH/WiLangId.vbs fi if ! test -e "$WINDOWS_SDK_WILANGID" ; then commit dba57e8db1c51ad0a0dc4a4859ff6d64a4982226 Author: Michael Stahl Date: Tue Jan 23 18:24:36 2018 +0100 svx::frame::Style::operator< does not implement strict weak order ... at least since other single line styles than SOLID and DASHED were added some years ago. This causes an assertion from MSVC std::max in CppunitTest_sw_odfexport. Change-Id: I2e0833b3d5c5afab259108be1c8782c4c4d26978 diff --git a/svx/source/dialog/framelink.cxx b/svx/source/dialog/framelink.cxx index 827def10ed2f..1501fca0022d 100644 --- a/svx/source/dialog/framelink.cxx +++ b/svx/source/dialog/framelink.cxx @@ -318,7 +318,7 @@ bool Style::operator<( const Style& rOther) const if( (Secn() && rOther.Secn()) && !rtl::math::approxEqual(Dist(), rOther.Dist()) ) return Dist() > rOther.Dist(); // both lines single and 1 unit thick, only one is dotted -> this rOther.Type(); // seem to be equal return false; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-0-0' - sw/qa writerfilter/source
sw/qa/extras/ooxmlimport/data/tdf113946.docx |binary sw/qa/extras/ooxmlimport/ooxmlimport.cxx |7 ++ writerfilter/source/dmapper/GraphicHelpers.cxx | 86 - 3 files changed, 51 insertions(+), 42 deletions(-) New commits: commit dc8665445e81891eafcbe8a25a5b5b80db330375 Author: Patrick Jaap Date: Mon Jan 15 16:43:07 2018 +0100 tdf#113946 add 'topMargin' to GraphicHelpers import The case '...topMargin' was not caught for setting a relative vertical position in GraphicHelpers. The test file demands a '7' here, which stands for 'PAGE_FRAME'. The '7' was overwritten in GraphicImport in case 'LN_CT_Anchor_positionV' by a call of 'resolve'. For a better overview a switch is inserted here. Change-Id: Ie98209fe445ecbba15c3dafe5980ca52421126f8 Reviewed-on: https://gerrit.libreoffice.org/47905 Tested-by: Jenkins Reviewed-by: Thorsten Behrens (cherry picked from commit ff8826d438a9fd080e8e61f8e66b3d3b2c8d752b) Reviewed-on: https://gerrit.libreoffice.org/48288 Reviewed-by: Miklos Vajna Reviewed-by: Michael Stahl Tested-by: Michael Stahl diff --git a/sw/qa/extras/ooxmlimport/data/tdf113946.docx b/sw/qa/extras/ooxmlimport/data/tdf113946.docx new file mode 100644 index ..060df76ecc2a Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/tdf113946.docx differ diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 4d65beeb90c4..449dae04ac59 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -1567,6 +1567,13 @@ DECLARE_OOXMLIMPORT_TEST(testTdf112443, "tdf112443.docx") CPPUNIT_ASSERT_EQUAL( OUString("30624"), aTop ); } + +DECLARE_OOXMLIMPORT_TEST(testTdf113946, "tdf113946.docx") +{ +OUString aTop = parseDump("/root/page/body/txt/anchored/SwAnchoredDrawObject/bounds", "top"); +CPPUNIT_ASSERT_EQUAL( OUString("1696"), aTop ); +} + // tests should only be added to ooxmlIMPORT *if* they fail round-tripping in ooxmlEXPORT CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/writerfilter/source/dmapper/GraphicHelpers.cxx b/writerfilter/source/dmapper/GraphicHelpers.cxx index 8108445d24fb..a7ce01868714 100644 --- a/writerfilter/source/dmapper/GraphicHelpers.cxx +++ b/writerfilter/source/dmapper/GraphicHelpers.cxx @@ -63,57 +63,59 @@ void PositionHandler::lcl_attribute( Id aName, Value& rVal ) { case NS_ooxml::LN_CT_PosV_relativeFrom: { -// TODO There are some other unhandled values -static const Id pVertRelValues[] = +switch ( nIntValue ) { - NS_ooxml::LN_Value_wordprocessingDrawing_ST_RelFromV_margin, -NS_ooxml::LN_Value_wordprocessingDrawing_ST_RelFromV_page, - NS_ooxml::LN_Value_wordprocessingDrawing_ST_RelFromV_paragraph, -NS_ooxml::LN_Value_wordprocessingDrawing_ST_RelFromV_line -}; +case NS_ooxml::LN_Value_wordprocessingDrawing_ST_RelFromV_margin: +m_nRelation = text::RelOrientation::PAGE_PRINT_AREA; +break; -static const sal_Int16 pVertRelations[] = -{ -text::RelOrientation::PAGE_PRINT_AREA, -text::RelOrientation::PAGE_FRAME, -text::RelOrientation::FRAME, -text::RelOrientation::TEXT_LINE -}; +case NS_ooxml::LN_Value_wordprocessingDrawing_ST_RelFromV_page: +case NS_ooxml::LN_Value_wordprocessingDrawing_ST_RelFromV_topMargin: // fallthrough intended +m_nRelation = text::RelOrientation::PAGE_FRAME; +break; -for ( int i = 0; i < 4; i++ ) -{ -if ( pVertRelValues[i] == sal_uInt32( nIntValue ) ) -m_nRelation = pVertRelations[i]; +case NS_ooxml::LN_Value_wordprocessingDrawing_ST_RelFromV_paragraph: +m_nRelation = text::RelOrientation::FRAME; +break; + +case NS_ooxml::LN_Value_wordprocessingDrawing_ST_RelFromV_line: +m_nRelation = text::RelOrientation::TEXT_LINE; +break; + +// TODO There are some other unhandled values } } break; + case NS_ooxml::LN_CT_PosH_relativeFrom: { -// TODO There are some other unhandled values -static const Id pHoriRelValues[] = +switch ( nIntValue ) { - NS_ooxml::LN_Value_wordprocessingDrawing_ST_RelFromH_margin, -NS_ooxml::LN_Value_wordprocessingDrawing_ST_RelFromH_page, -
[Libreoffice-commits] core.git: vcl/inc
vcl/inc/salusereventlist.hxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 77a535285f0fd5f2464430abdc67cf99be024868 Author: Stephan Bergmann Date: Tue Jan 23 12:17:17 2018 +0100 -Werror=ignored-qualifiers (upcoming GCC 8) Change-Id: Ibcbfd951d2a7c7862fbc7e6b17c89344ae5bf930 Reviewed-on: https://gerrit.libreoffice.org/48399 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/vcl/inc/salusereventlist.hxx b/vcl/inc/salusereventlist.hxx index 52a195a68f82..92aaada771b3 100644 --- a/vcl/inc/salusereventlist.hxx +++ b/vcl/inc/salusereventlist.hxx @@ -36,7 +36,7 @@ enum class SalEvent; struct SalFrameHash : public std::hash { size_t operator()(const SalFrame* frame) const -{ return std::hash::operator()( reinterpret_cast(frame) ); } +{ return std::hash::operator()( reinterpret_cast(frame) ); } }; typedef std::unordered_set< SalFrame*, SalFrameHash > SalFrameSet; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - vcl/osx
vcl/osx/salnativewidgets.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 10763c32352af5e9998e430d4069fa26e087ec18 Author: Telesto Date: Mon Jan 22 16:49:21 2018 +0200 tdf#112153: Set button theme properly Change-Id: I0665880c0d0348fcbb3bcf04d9172405c8e31eb7 Reviewed-on: https://gerrit.libreoffice.org/48334 Tested-by: Jenkins Reviewed-by: Tor Lillqvist (cherry picked from commit 44af50465a02b6f5566be45913a34fdbdba90133) Reviewed-on: https://gerrit.libreoffice.org/48455 diff --git a/vcl/osx/salnativewidgets.cxx b/vcl/osx/salnativewidgets.cxx index 7c91d058c292..198d84d77cd2 100644 --- a/vcl/osx/salnativewidgets.cxx +++ b/vcl/osx/salnativewidgets.cxx @@ -106,11 +106,11 @@ static ThemeButtonValue ImplGetButtonValue( ButtonValue aButtonValue ) break; case ButtonValue::Off: +case ButtonValue::DontKnow: return kThemeButtonOff; break; case ButtonValue::Mixed: -case ButtonValue::DontKnow: default: return kThemeButtonMixed; break; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - sw/qa writerfilter/source
sw/qa/extras/ooxmlimport/data/tdf113946.docx |binary sw/qa/extras/ooxmlimport/ooxmlimport.cxx |7 ++ writerfilter/source/dmapper/GraphicHelpers.cxx | 86 - 3 files changed, 51 insertions(+), 42 deletions(-) New commits: commit ada232a67fbb3acf60b104a4916719dbdb891819 Author: Patrick Jaap Date: Mon Jan 15 16:43:07 2018 +0100 tdf#113946 add 'topMargin' to GraphicHelpers import The case '...topMargin' was not caught for setting a relative vertical position in GraphicHelpers. The test file demands a '7' here, which stands for 'PAGE_FRAME'. The '7' was overwritten in GraphicImport in case 'LN_CT_Anchor_positionV' by a call of 'resolve'. For a better overview a switch is inserted here. Change-Id: Ie98209fe445ecbba15c3dafe5980ca52421126f8 Reviewed-on: https://gerrit.libreoffice.org/47908 Tested-by: Jenkins Reviewed-by: Thorsten Behrens diff --git a/sw/qa/extras/ooxmlimport/data/tdf113946.docx b/sw/qa/extras/ooxmlimport/data/tdf113946.docx new file mode 100644 index ..060df76ecc2a Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/tdf113946.docx differ diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 4d65beeb90c4..449dae04ac59 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -1567,6 +1567,13 @@ DECLARE_OOXMLIMPORT_TEST(testTdf112443, "tdf112443.docx") CPPUNIT_ASSERT_EQUAL( OUString("30624"), aTop ); } + +DECLARE_OOXMLIMPORT_TEST(testTdf113946, "tdf113946.docx") +{ +OUString aTop = parseDump("/root/page/body/txt/anchored/SwAnchoredDrawObject/bounds", "top"); +CPPUNIT_ASSERT_EQUAL( OUString("1696"), aTop ); +} + // tests should only be added to ooxmlIMPORT *if* they fail round-tripping in ooxmlEXPORT CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/writerfilter/source/dmapper/GraphicHelpers.cxx b/writerfilter/source/dmapper/GraphicHelpers.cxx index 8108445d24fb..a7ce01868714 100644 --- a/writerfilter/source/dmapper/GraphicHelpers.cxx +++ b/writerfilter/source/dmapper/GraphicHelpers.cxx @@ -63,57 +63,59 @@ void PositionHandler::lcl_attribute( Id aName, Value& rVal ) { case NS_ooxml::LN_CT_PosV_relativeFrom: { -// TODO There are some other unhandled values -static const Id pVertRelValues[] = +switch ( nIntValue ) { - NS_ooxml::LN_Value_wordprocessingDrawing_ST_RelFromV_margin, -NS_ooxml::LN_Value_wordprocessingDrawing_ST_RelFromV_page, - NS_ooxml::LN_Value_wordprocessingDrawing_ST_RelFromV_paragraph, -NS_ooxml::LN_Value_wordprocessingDrawing_ST_RelFromV_line -}; +case NS_ooxml::LN_Value_wordprocessingDrawing_ST_RelFromV_margin: +m_nRelation = text::RelOrientation::PAGE_PRINT_AREA; +break; -static const sal_Int16 pVertRelations[] = -{ -text::RelOrientation::PAGE_PRINT_AREA, -text::RelOrientation::PAGE_FRAME, -text::RelOrientation::FRAME, -text::RelOrientation::TEXT_LINE -}; +case NS_ooxml::LN_Value_wordprocessingDrawing_ST_RelFromV_page: +case NS_ooxml::LN_Value_wordprocessingDrawing_ST_RelFromV_topMargin: // fallthrough intended +m_nRelation = text::RelOrientation::PAGE_FRAME; +break; -for ( int i = 0; i < 4; i++ ) -{ -if ( pVertRelValues[i] == sal_uInt32( nIntValue ) ) -m_nRelation = pVertRelations[i]; +case NS_ooxml::LN_Value_wordprocessingDrawing_ST_RelFromV_paragraph: +m_nRelation = text::RelOrientation::FRAME; +break; + +case NS_ooxml::LN_Value_wordprocessingDrawing_ST_RelFromV_line: +m_nRelation = text::RelOrientation::TEXT_LINE; +break; + +// TODO There are some other unhandled values } } break; + case NS_ooxml::LN_CT_PosH_relativeFrom: { -// TODO There are some other unhandled values -static const Id pHoriRelValues[] = +switch ( nIntValue ) { - NS_ooxml::LN_Value_wordprocessingDrawing_ST_RelFromH_margin, -NS_ooxml::LN_Value_wordprocessingDrawing_ST_RelFromH_page, - NS_ooxml::LN_Value_wordprocessingDrawing_ST_RelFromH_column, - NS_ooxml::LN_Value_wordprocessingDrawing_ST_RelFromH_character, - NS_ooxml::LN_Value_wordprocessingDrawing_ST_Rel
[Libreoffice-commits] core.git: Branch 'private/swe/libreoffice-5-2+backports' - 2 commits - chart2/source sc/source sd/source
chart2/source/controller/main/ChartController.cxx | 19 --- chart2/source/controller/main/ControllerCommandDispatch.cxx |4 +- sc/source/ui/unoobj/docuno.cxx |4 -- sd/source/ui/view/DocumentRenderer.cxx | 20 ++-- 4 files changed, 21 insertions(+), 26 deletions(-) New commits: commit 23cde162a20198a480262e26b5b32c7d40154b59 Author: Vasily Melenchuk Date: Tue Jan 16 11:34:51 2018 +0300 tdf#113572: removed redundant calc service calc service introduced previously in commit 0074951704022d173a5fdb9df933f47be1dcbb91 is not required, interface is enough for feature implementation. Reviewed-on: https://gerrit.libreoffice.org/47960 Tested-by: Jenkins Reviewed-by: Thorsten Behrens Conflicts: sc/source/ui/unoobj/docuno.cxx Change-Id: I9cf30f2201619465da9061c7ef1e574209062cf9 Reviewed-on: https://gerrit.libreoffice.org/48432 Reviewed-by: Thorsten Behrens Tested-by: Thorsten Behrens diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx index c19edd0bd471..8ba455cbab6e 100644 --- a/chart2/source/controller/main/ChartController.cxx +++ b/chart2/source/controller/main/ChartController.cxx @@ -1406,8 +1406,9 @@ void ChartController::executeDispatch_SourceData() if ( rModel.hasInternalDataProvider() ) { // Check if we will able to create data provider later -Reference< lang::XServiceInfo > xParentServiceInfo( rModel.getParent(), uno::UNO_QUERY ); -if ( !xParentServiceInfo.is() || !xParentServiceInfo->supportsService("com.sun.star.chart2.XDataProviderAccess") ) +css::uno::Reference< com::sun::star::chart2::XDataProviderAccess > xCreatorDoc( +rModel.getParent(), uno::UNO_QUERY); +if (!xCreatorDoc.is()) return; SolarMutexGuard aSolarGuard; @@ -1422,18 +1423,12 @@ void ChartController::executeDispatch_SourceData() rModel.removeDataProviders(); // Ask parent document to create new data provider -css::uno::Reference< com::sun::star::chart2::XDataProviderAccess > xCreatorDoc( -rModel.getParent(), uno::UNO_QUERY ); -SAL_WARN_IF( !xCreatorDoc.is(), "chart2.main", "Invalid XDataProviderAccess" ); -if ( xCreatorDoc.is() ) +uno::Reference< data::XDataProvider > xDataProvider = xCreatorDoc->createDataProvider(); +SAL_WARN_IF( !xDataProvider.is(), "chart2.main", "Data provider was not created" ); +if (xDataProvider.is()) { -uno::Reference< data::XDataProvider > xDataProvider = xCreatorDoc->createDataProvider(); -SAL_WARN_IF( !xDataProvider.is(), "chart2.main", "Data provider was not created" ); -if ( xDataProvider.is() ) -{ -rModel.attachDataProvider(xDataProvider); -} +rModel.attachDataProvider(xDataProvider); } } diff --git a/chart2/source/controller/main/ControllerCommandDispatch.cxx b/chart2/source/controller/main/ControllerCommandDispatch.cxx index cb0fb6f4a8ba..0dec06dbedcf 100644 --- a/chart2/source/controller/main/ControllerCommandDispatch.cxx +++ b/chart2/source/controller/main/ControllerCommandDispatch.cxx @@ -41,6 +41,7 @@ #include #include #include +#include // only needed until #i68864# is fixed #include @@ -554,7 +555,8 @@ void ControllerCommandDispatch::updateCommandAvailability() OSL_ENSURE(xParentServiceInfo.is(), "Invalid XServiceInfo"); if ( xParentServiceInfo.is() ) { -bCanCreateDataProvider = xParentServiceInfo->supportsService("com.sun.star.chart2.XDataProviderAccess"); +css::uno::Reference< com::sun::star::chart2::XDataProviderAccess > xCreatorDoc(rModel.getParent(), uno::UNO_QUERY); +bCanCreateDataProvider = xCreatorDoc.is(); } } } diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index d31a0e01b330..21955c2c1344 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -218,7 +218,6 @@ using sc::TwipsToHMM; #define SCMODELOBJ_SERVICE "com.sun.star.sheet.SpreadsheetDocument" #define SCDOCSETTINGS_SERVICE "com.sun.star.sheet.SpreadsheetDocumentSettings" #define SCDOC_SERVICE "com.sun.star.document.OfficeDocument" -#define SCDATAPROVIDERACCESS_SERVICE "com.sun.star.chart2.XDataProviderAccess" SC_SIMPLE_SERVICE_INFO( ScAnnotationsObj, "ScAnnotationsObj", "com.sun.star.sheet.CellAnnotations" ) SC_SIMPLE_SERVICE_INFO( ScDrawPagesObj, "ScDrawPagesObj", "com.sun.star.drawing.DrawPages" ) @@ -2613,11 +2612,10 @@ sal_Bool SAL_CALL ScModelObj::supportsService( const OUString& rServiceName ) uno::Sequence SAL_CALL ScModelObj::getSupportedServiceNames()
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - extensions/source
extensions/source/update/check/updatehdl.src |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 2fe2f41d1f15a980fb169accda71a192dbba8d72 Author: Matthias Seidel Date: Wed Jan 24 01:41:08 2018 + Deleted whitespace in update message diff --git a/extensions/source/update/check/updatehdl.src b/extensions/source/update/check/updatehdl.src index 3acd060a9573..88b7b50809ef 100644 --- a/extensions/source/update/check/updatehdl.src +++ b/extensions/source/update/check/updatehdl.src @@ -40,7 +40,7 @@ String RID_UPDATE_STR_NO_UPD_FOUND String RID_UPDATE_STR_UPD_FOUND { -Text [ en-US ] = "%PRODUCTNAME %NEXTVERSION is available.\n\nThe installed version is %PRODUCTNAME %PRODUCTVERSION.\n\nNote: Before downloading an update, please ensure that you have sufficient access rights to install it.\nA password, usually the administrator's or root password, may be required."; +Text [ en-US ] = "%PRODUCTNAME %NEXTVERSION is available.\n\nThe installed version is %PRODUCTNAME %PRODUCTVERSION.\n\nNote: Before downloading an update, please ensure that you have sufficient access rights to install it.\nA password, usually the administrator's or root password, may be required."; }; String RID_UPDATE_STR_DLG_TITLE ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: desktop/source
desktop/source/app/app.cxx |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) New commits: commit 6fc9d4a482ab50a1bf8fefb1dae2a6ded3c7e3dd Author: Mike Kaganski Date: Tue Jan 23 13:06:29 2018 +0100 Remove redundant variable Change-Id: I062ea13827d7d9744b0965b305877633485015fa Reviewed-on: https://gerrit.libreoffice.org/48405 Reviewed-by: Julien Nabet Tested-by: Jenkins diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index c95674d50211..da71a0aae2b7 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -473,11 +473,11 @@ void Desktop::Init() } // Check whether safe mode is enabled -CommandLineArgs& rCmdLine = GetCommandLineArgs(); +const CommandLineArgs& rCmdLineArgs = GetCommandLineArgs(); // Check if we are restarting from safe mode - in that case we don't want to enter it again if (sfx2::SafeMode::hasRestartFlag()) sfx2::SafeMode::removeRestartFlag(); -else if (rCmdLine.IsSafeMode() || sfx2::SafeMode::hasFlag()) +else if (rCmdLineArgs.IsSafeMode() || sfx2::SafeMode::hasFlag()) Application::EnableSafeMode(); // When we are in SafeMode we need to do changes before the configuration @@ -514,8 +514,6 @@ void Desktop::Init() if ( true ) { -const CommandLineArgs& rCmdLineArgs = GetCommandLineArgs(); - // start ipc thread only for non-remote offices RequestHandler::Status aStatus = RequestHandler::Enable(true); if ( aStatus == RequestHandler::IPC_STATUS_PIPE_ERROR ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/source
vcl/source/window/stacking.cxx | 25 ++--- 1 file changed, 10 insertions(+), 15 deletions(-) New commits: commit fa1caba2a82cc31f3d9c1c18e00325766aa1c90c Author: Mike Kaganski Date: Tue Jan 23 09:50:46 2018 +0100 Use std::unique_ptr in ImplCalcToTopData Change-Id: Ie43c633283be45e72259be5eedd253e403e9f664 Reviewed-on: https://gerrit.libreoffice.org/48377 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/vcl/source/window/stacking.cxx b/vcl/source/window/stacking.cxx index eacf642fd4dd..e32a93a001cc 100644 --- a/vcl/source/window/stacking.cxx +++ b/vcl/source/window/stacking.cxx @@ -46,9 +46,9 @@ using ::com::sun::star::awt::XTopWindow; struct ImplCalcToTopData { -ImplCalcToTopData* mpNext; -VclPtr mpWindow; -vcl::Region* mpInvalidateRegion; +std::unique_ptr mpNext; +VclPtrmpWindow; +std::unique_ptr mpInvalidateRegion; }; namespace vcl { @@ -227,10 +227,9 @@ void Window::ImplCalcToTop( ImplCalcToTopData* pPrevData ) if ( !aInvalidateRegion.IsEmpty() ) { ImplCalcToTopData* pData= new ImplCalcToTopData; -pPrevData->mpNext = pData; -pData->mpNext = nullptr; +pPrevData->mpNext.reset(pData); pData->mpWindow = this; -pData->mpInvalidateRegion = new vcl::Region( aInvalidateRegion ); +pData->mpInvalidateRegion.reset(new vcl::Region( aInvalidateRegion )); } } } @@ -317,7 +316,6 @@ void Window::ImplStartToTop( ToTopFlags nFlags ) { ImplCalcToTopData aStartData; ImplCalcToTopData* pCurData; -ImplCalcToTopData* pNextData; vcl::Window* pOverlapWindow; if ( ImplIsOverlapWindow() ) pOverlapWindow = this; @@ -332,7 +330,7 @@ void Window::ImplStartToTop( ToTopFlags nFlags ) { pTempOverlapWindow->ImplCalcToTop( pCurData ); if ( pCurData->mpNext ) -pCurData = pCurData->mpNext; +pCurData = pCurData->mpNext.get(); pTempOverlapWindow = pTempOverlapWindow->mpWindowImpl->mpOverlapWindow; } while ( !pTempOverlapWindow->mpWindowImpl->mbFrame ); @@ -342,7 +340,7 @@ void Window::ImplStartToTop( ToTopFlags nFlags ) { pTempOverlapWindow->ImplCalcToTop( pCurData ); if ( pCurData->mpNext ) -pCurData = pCurData->mpNext; +pCurData = pCurData->mpNext.get(); pTempOverlapWindow = pTempOverlapWindow->mpWindowImpl->mpNext; } @@ -355,14 +353,11 @@ void Window::ImplStartToTop( ToTopFlags nFlags ) } while ( !pTempOverlapWindow->mpWindowImpl->mbFrame ); // as last step invalidate the invalid areas -pCurData = aStartData.mpNext; +pCurData = aStartData.mpNext.get(); while ( pCurData ) { -pCurData->mpWindow->ImplInvalidateFrameRegion( pCurData->mpInvalidateRegion, InvalidateFlags::Children ); -pNextData = pCurData->mpNext; -delete pCurData->mpInvalidateRegion; -delete pCurData; -pCurData = pNextData; +pCurData->mpWindow->ImplInvalidateFrameRegion( pCurData->mpInvalidateRegion.get(), InvalidateFlags::Children ); +pCurData = pCurData->mpNext.get(); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - solenv/gbuild sw/source
solenv/gbuild/platform/com_GCC_defs.mk |7 +++ sw/source/filter/ww8/ww8par2.cxx |2 +- 2 files changed, 8 insertions(+), 1 deletion(-) New commits: commit e8efbffc83e926c2af0a92cc2c2d3d29cfaa7478 Author: Stephan Bergmann Date: Tue Jan 23 16:30:15 2018 +0100 Reuse WW8TabBandDesc::setcelldefaults Change-Id: Icdf57d962ae7b3e24cbed6aba4b05fa2136b3761 Reviewed-on: https://gerrit.libreoffice.org/48433 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index 59abfb5e8eca..99f65112fa26 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -2306,7 +2306,7 @@ void WW8TabDesc::CalcDefaults() if( !pR->pTCs ) { pR->pTCs = new WW8_TCell[ pR->nWwCols ]; -memset( pR->pTCs, 0, pR->nWwCols * sizeof( WW8_TCell ) ); +WW8TabBandDesc::setcelldefaults(pR->pTCs, pR->nWwCols); } for (int k = 0; k < pR->nWwCols; ++k) { commit ce99754e9b5b954be4360f39356ed7198b298265 Author: Stephan Bergmann Date: Tue Jan 23 16:23:20 2018 +0100 Globally disable -Wcast-function-type new with upcoming GCC 8 ...which unhelpfully even warns on reinterpret_cast, so causes failures like > [CXX] sal/osl/unx/signal.cxx > sal/osl/unx/signal.cxx: In function ‘bool onInitSignal()’: > sal/osl/unx/signal.cxx:267:50: error: cast between incompatible function types from ‘void (*)(int, siginfo_t*, void*)’ to ‘{anonymous}::Handler1’ {aka ‘void (*)(int)’} [-Werror=cast-function-type] > oact.sa_sigaction); > ^ And since all incompatible (but deliberate) casts between function types across our code base should already be written as reinterpret_cast, we shouldn't lose much by just disabling this new warning globally. Change-Id: If15e9606e8fdc676b61012e31d7369653951ceca Reviewed-on: https://gerrit.libreoffice.org/48431 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk index 68de52a41593..4dc10e5bfccc 100644 --- a/solenv/gbuild/platform/com_GCC_defs.mk +++ b/solenv/gbuild/platform/com_GCC_defs.mk @@ -96,6 +96,13 @@ gb_CXXFLAGS_COMMON += \ -Wunused-const-variable=1 endif +# GCC 8 -Wcast-function-type (included in -Wextra) unhelpfully even warns on reinterpret_cast +# between incompatible function types: +ifeq ($(shell expr '$(GCC_VERSION)' '>=' 800),1) +gb_CXXFLAGS_COMMON += \ +-Wno-cast-function-type +endif + ifeq ($(COM_IS_CLANG),TRUE) gb_CXXFLAGS_COMMON += -Wimplicit-fallthrough else ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - sc/qa sc/source sw/source
sc/qa/unit/parallelism.cxx | 23 +++ sc/source/core/tool/formulagroup.cxx | 16 +--- sw/source/uibase/dochdl/swdtflvr.cxx |2 +- 3 files changed, 37 insertions(+), 4 deletions(-) New commits: commit ff166845fa5ed178a97b54bb2deef4beb0cf3bdf Author: Dennis Francis Date: Tue Jan 23 19:53:19 2018 +0530 tdf#115093 : Do not reuse singleref tokens... ...in formula group computation if the formula contains only a single reference besides any ocOpen/ocClose pairs wrapping it as the sole content. In such a case the "result" formula token returned by ScInterpreter::GetResultToken() is the same as the original singleref token, so for each row of the formulagroup, we need to use a separate singleref token. Also added a unit test in sc/qa/unit/parallelism.cxx Change-Id: I6032efc5be9b51ca1e9daf9bdd19997a949d2f43 Reviewed-on: https://gerrit.libreoffice.org/48449 Reviewed-by: Michael Meeks Tested-by: Jenkins diff --git a/sc/qa/unit/parallelism.cxx b/sc/qa/unit/parallelism.cxx index 428d65a20bec..896b7c1d8382 100644 --- a/sc/qa/unit/parallelism.cxx +++ b/sc/qa/unit/parallelism.cxx @@ -46,12 +46,14 @@ public: void testDivision(); void testVLOOKUP(); void testVLOOKUPSUM(); +void testSingleRef(); CPPUNIT_TEST_SUITE(ScParallelismTest); CPPUNIT_TEST(testSUMIFS); CPPUNIT_TEST(testDivision); CPPUNIT_TEST(testVLOOKUP); CPPUNIT_TEST(testVLOOKUPSUM); +CPPUNIT_TEST(testSingleRef); CPPUNIT_TEST_SUITE_END(); private: @@ -296,6 +298,27 @@ void ScParallelismTest::testVLOOKUPSUM() m_pDoc->DeleteTab(0); } +void ScParallelismTest::testSingleRef() +{ +m_pDoc->InsertTab(0, "1"); + +const size_t nNumRows = 200; +for (size_t i = 0; i < nNumRows; ++i) +{ +m_pDoc->SetValue(0, i, 0, static_cast(i)); +m_pDoc->SetFormula(ScAddress(1, i, 0), "=A" + OUString::number(i+1), formula::FormulaGrammar::GRAM_NATIVE_UI); +} + +m_xDocShell->DoHardRecalc(); + +for (size_t i = 0; i < nNumRows; ++i) +{ +OString aMsg = "At row " + OString::number(i); +CPPUNIT_ASSERT_EQUAL_MESSAGE(aMsg.getStr(), i, static_cast(m_pDoc->GetValue(1, i, 0))); +} +m_pDoc->DeleteTab(0); +} + CPPUNIT_TEST_SUITE_REGISTRATION(ScParallelismTest); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sc/source/core/tool/formulagroup.cxx b/sc/source/core/tool/formulagroup.cxx index 57ad65d2b114..b494d25d1146 100644 --- a/sc/source/core/tool/formulagroup.cxx +++ b/sc/source/core/tool/formulagroup.cxx @@ -177,6 +177,7 @@ public: ScTokenArray aCode2; ScInterpreterContext aContext(mrDoc, mpFormatter); +sal_uInt16 nNumNonOpenClose = mrCode.GetLen(); for (SCROW i = mnIdx; i <= mnLastIdx; ++i, maBatchTopPos.IncRow()) { @@ -212,7 +213,7 @@ public: aCode2.AddString(rPool.intern(OUString(pStr))); else { -if ( pTargetTok->GetType() == formula::svString ) +if ( ( pTargetTok->GetType() == formula::svString ) && ( nNumNonOpenClose > 1 ) ) pTargetTok->SetString(rPool.intern(OUString(pStr))); else { @@ -226,7 +227,7 @@ public: // Value of NaN represents an empty cell. if ( !pTargetTok ) aCode2.AddToken(ScEmptyCellToken(false, false)); -else if ( pTargetTok->GetType() != formula::svEmptyCell ) +else if ( ( pTargetTok->GetType() != formula::svEmptyCell ) || ( nNumNonOpenClose == 1 ) ) { ScEmptyCellToken* pEmptyTok = new ScEmptyCellToken(false, false); aCode2.ReplaceToken(nTokIdx, pEmptyTok, formula::FormulaTokenArray::CODE_ONLY); @@ -239,7 +240,7 @@ public: aCode2.AddDouble(fVal); else { -if ( pTargetTok->GetType() == formula::svDouble ) +if ( ( pTargetTok->GetType() == formula::svDouble ) && ( nNumNonOpenClose > 1 ) ) pTargetTok->GetDoubleAsReference() = fVal; else { @@ -291,7 +292,16 @@ public: break; default: if ( !pTargetTok ) +{ +if ( p->GetType() == formula::svSep ) +{ +OpCode eOp = p->GetOpCode(); +if ( eOp == ocOpen || eOp == ocClose ) +
[Libreoffice-commits] core.git: 2 commits - sw/source
sw/source/filter/ww8/ww8scan.cxx |7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) New commits: commit 58401e6c8a9f53df96e84d3e1b73c84150890102 Author: Stephan Bergmann Date: Tue Jan 23 17:06:19 2018 +0100 This presumably always wanted to check for SAL_MAX_UINT16, not USHRT_MAX The check against USHRT_MAX was introduced together with a following nLen2 = static_cast(nLen); in 73f043c441af59da02c160d441b18a73725e62e4 "#96155# #i1858# merge branch and remove warnings" (and that UINT16 meanwhile replaced with sal_uInt16). Change-Id: I61346e4ffc90a4f8a97c2d3f822d619faa5b0008 Reviewed-on: https://gerrit.libreoffice.org/48441 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index 5cbaefdfd6fd..03696fb5208f 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -4170,8 +4170,8 @@ void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, sal_uInt32 nStart, sal_Int32 nLen { OSL_ENSURE(nLen2 == nLen, "Fib length and read length are different"); -if (nLen > USHRT_MAX) -nLen = USHRT_MAX; +if (nLen > SAL_MAX_UINT16) +nLen = SAL_MAX_UINT16; else if (nLen < 2 ) nLen = 2; nLen2 = static_cast(nLen); commit da67b0be49795ec09a2794dd0fb3e5b29f066dc3 Author: Stephan Bergmann Date: Tue Jan 23 16:49:08 2018 +0100 Remove presumably dead nLen < USHRT_MAX check The original code of 7b0b5cdfeed656b279bc32cd929630d5fc25878b "initial import" read +long nLen = ((nNextPieceCp < nBehindTextCp) +? nNextPieceCp +: nBehindTextCp +) +- nAktStartCp; + +if( 0 >= nLen ) break; + +if( nLen > USHRT_MAX - 1 ) +nLen = USHRT_MAX - 1; + +if( bIsUnicode ) +rStr.Append( WW8Read_xstz( rStrm, (USHORT)nLen, FALSE ) ); +else +{ +ByteString aByteStr;// Alloc methode automatically sets Zero at the end +sal_Char* pByteData = aByteStr.AllocBuffer( nLen ); + +sal_Size nWasRead = rStrm.Read( pByteData, nLen ); +if( nWasRead != nLen ) +aByteStr.ReleaseBufferAccess( nWasRead ); + +rStr += String( aByteStr, eEnc ); +} +nTotalRead += nLen; +nAktStartCp += nLen; +if( nTotalRead != rStr.Len() ) break; casting nLen to USHORT in the call to WW8Read_xstz, while the current code looks like it should work fine for larger nLen. Change-Id: Ie3a0d654ef45421cbbe8e823259e8dfd27bd27e2 Reviewed-on: https://gerrit.libreoffice.org/48437 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index dd8d2479233a..5cbaefdfd6fd 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -2050,9 +2050,6 @@ sal_Int32 WW8ScannerBase::WW8ReadString( SvStream& rStrm, OUString& rStr, if (bFail) break; -if( nLen > USHRT_MAX - 1 ) -nLen = USHRT_MAX - 1; - if( 0 >= nLen ) break; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/source
sw/source/core/layout/atrfrm.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 182a3c7e12a0f56d664deaf67d17bc51eef6299d Author: Stephan Bergmann Date: Tue Jan 23 17:13:21 2018 +0100 USHRT_MAX -> SAL_MAX_UINT16 ...presumably forgotten when the following casts of nTmp in the SetBaseHeight etc. calls were changed from USHORT to sal_uInt16 in 7f33ed417b2e29e5470724ea76967f64699a2662 "removetooltypes01: #i112600# Remove tools types from sw" Change-Id: I75809e677835910b09b366f755361a667d097402 Reviewed-on: https://gerrit.libreoffice.org/48442 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index dc16db754289..e8b8c79091cc 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -2322,7 +2322,7 @@ bool SwTextGridItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) sal_Int32 nTmp = 0; bRet = (rVal >>= nTmp); nTmp = convertMm100ToTwip( nTmp ); -if( bRet && (nTmp >= 0) && ( nTmp <= USHRT_MAX) ) +if( bRet && (nTmp >= 0) && ( nTmp <= SAL_MAX_UINT16) ) { // rhbz#1043551 round up to 5pt -- 0 causes divide-by-zero // in layout; 1pt ties the painting code up in knots for ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sfx2/source
sfx2/source/doc/doctemplates.cxx | 19 +-- 1 file changed, 5 insertions(+), 14 deletions(-) New commits: commit 7b7c388fe402e14486664e36eeb6c1f0fe1e02b9 Author: Noel Grandin Date: Tue Jan 16 15:49:15 2018 +0200 loplugin:useuniqueptr in GroupData_Impl Change-Id: Icddaf78a58b74338ac763c12c8ac06f464986cac Reviewed-on: https://gerrit.libreoffice.org/48371 Reviewed-by: Noel Grandin Tested-by: Noel Grandin diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx index 61bf957b5713..80d6ce983667 100644 --- a/sfx2/source/doc/doctemplates.cxx +++ b/sfx2/source/doc/doctemplates.cxx @@ -346,7 +346,7 @@ public: class GroupData_Impl { -vector< DocTemplates_EntryData_Impl* > maEntries; +std::vector< std::unique_ptr > maEntries; OUStringmaTitle; OUStringmaHierarchyURL; OUStringmaTargetURL; @@ -355,7 +355,6 @@ class GroupData_Impl public: explicitGroupData_Impl( const OUString& rTitle ); -~GroupData_Impl(); voidsetInUse() { mbInUse = true; } voidsetHierarchy( bool bInHierarchy ) { mbInHierarchy = bInHierarchy; } @@ -373,7 +372,7 @@ public: const OUString& rType, const OUString& rHierURL ); size_t count() { return maEntries.size(); } -DocTemplates_EntryData_Impl*getEntry( size_t nPos ) { return maEntries[ nPos ]; } +DocTemplates_EntryData_Impl*getEntry( size_t nPos ) { return maEntries[ nPos ].get(); } }; @@ -2641,14 +2640,6 @@ GroupData_Impl::GroupData_Impl( const OUString& rTitle ) } -GroupData_Impl::~GroupData_Impl() -{ -for (DocTemplates_EntryData_Impl* p : maEntries) -delete p; -maEntries.clear(); -} - - DocTemplates_EntryData_Impl* GroupData_Impl::addEntry( const OUString& rTitle, const OUString& rTargetURL, const OUString& rType, @@ -2657,9 +2648,9 @@ DocTemplates_EntryData_Impl* GroupData_Impl::addEntry( const OUString& rTitle, DocTemplates_EntryData_Impl* pData = nullptr; bool EntryFound = false; -for (DocTemplates_EntryData_Impl* p : maEntries) +for (auto const & p : maEntries) { -pData = p; +pData = p.get(); if ( pData->getTitle() == rTitle ) { EntryFound = true; @@ -2677,7 +2668,7 @@ DocTemplates_EntryData_Impl* GroupData_Impl::addEntry( const OUString& rTitle, pData->setHierarchyURL( rHierURL ); pData->setHierarchy( true ); } -maEntries.push_back( pData ); +maEntries.emplace_back( pData ); } else { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits