[Libreoffice-commits] core.git: vcl/win
vcl/win/app/salinst.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit c112868f6cc6a3ba937778435dcca1fe986bf124 Author: Stephan Bergmann AuthorDate: Fri Apr 30 08:04:40 2021 +0200 Commit: Stephan Bergmann CommitDate: Fri Apr 30 08:43:46 2021 +0200 loplugin:stringadd (clang-cl) Change-Id: I132643eb73129e1319af36b7c8aac36a516714b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114896 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/vcl/win/app/salinst.cxx b/vcl/win/app/salinst.cxx index 18605f2f17d4..1771120e42c8 100644 --- a/vcl/win/app/salinst.cxx +++ b/vcl/win/app/salinst.cxx @@ -908,7 +908,7 @@ OUString WinSalInstance::getOSVersion() + OUString::number(vi2.dwMinorVersion)); aVer.append(" "); if (vi2.szCSDVersion[0]) -aVer.append(o3tl::toU(vi2.szCSDVersion)).append(" "); +aVer.append(OUString::Concat(o3tl::toU(vi2.szCSDVersion)) + " "); aVer.append("Build " + OUString::number(vi2.dwBuildNumber)); bHaveVerFromRtlGetVersion = true; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/inc sw/source
sw/inc/bitmaps.hlst|1 sw/inc/strings.hrc |2 sw/source/uibase/inc/content.hxx | 16 +++ sw/source/uibase/inc/swcont.hxx|3 sw/source/uibase/utlui/content.cxx | 181 +++-- 5 files changed, 195 insertions(+), 8 deletions(-) New commits: commit 18e5e948dd66e41f17b0a63bf631d98aee84a03b Author: Jim Raykowski AuthorDate: Sun Mar 7 21:24:17 2021 -0900 Commit: Jim Raykowski CommitDate: Fri Apr 30 01:52:06 2021 +0200 tdf#137741 SW: Add fields content type to Navigator also makes Comments category be tracked Change-Id: I038ba87d6ae0b96bae2d7a213ec5df92ac7d566d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112560 Tested-by: Jenkins Reviewed-by: Jim Raykowski diff --git a/sw/inc/bitmaps.hlst b/sw/inc/bitmaps.hlst index a486eb386238..7643989dd2e9 100644 --- a/sw/inc/bitmaps.hlst +++ b/sw/inc/bitmaps.hlst @@ -87,6 +87,7 @@ #define RID_BMP_NAVI_INDEX "sw/res/nc20009.png" #define RID_BMP_NAVI_POSTIT "sw/res/nc20010.png" #define RID_BMP_NAVI_DRAWOBJECT "sw/res/nc20011.png" +#define RID_BMP_NAVI_TEXTFIELD "sw/res/nc20005.png" #define RID_BMP_DROP_REGION "sw/res/sc20235.png" #define RID_BMP_DROP_LINK "sw/res/sc20238.png" #define RID_BMP_DROP_COPY "sw/res/sc20239.png" diff --git a/sw/inc/strings.hrc b/sw/inc/strings.hrc index ade17282c17f..e45a3ed1f848 100644 --- a/sw/inc/strings.hrc +++ b/sw/inc/strings.hrc @@ -370,6 +370,7 @@ #define STR_CONTENT_TYPE_REFERENCE NC_("STR_CONTENT_TYPE_REFERENCE", "References") #define STR_CONTENT_TYPE_INDEX NC_("STR_CONTENT_TYPE_INDEX", "Indexes") #define STR_CONTENT_TYPE_DRAWOBJECT NC_("STR_CONTENT_TYPE_DRAWOBJECT", "Drawing objects") +#define STR_CONTENT_TYPE_TEXTFIELD NC_("STR_CONTENT_TYPE_TEXTFIELD", "Fields") #define STR_CONTENT_TYPE_POSTIT NC_("STR_CONTENT_TYPE_POSTIT", "Comments") #define STR_IDXEXAMPLE_IDXTXT_HEADING1 NC_("STR_IDXEXAMPLE_IDXTXT_HEADING1", "Heading 1") #define STR_IDXEXAMPLE_IDXTXT_ENTRY1 NC_("STR_IDXEXAMPLE_IDXTXT_ENTRY1", "This is the content from the first chapter. This is a user directory entry.") @@ -398,6 +399,7 @@ #define STR_CONTENT_TYPE_SINGLE_INDEX NC_("STR_CONTENT_TYPE_SINGLE_INDEX", "Index") #define STR_CONTENT_TYPE_SINGLE_POSTIT NC_("STR_CONTENT_TYPE_SINGLE_POSTIT", "Comment") #define STR_CONTENT_TYPE_SINGLE_DRAWOBJECT NC_("STR_CONTENT_TYPE_SINGLE_DRAWOBJECT", "Draw object") +#define STR_CONTENT_TYPE_SINGLE_TEXTFIELD NC_("STR_CONTENT_TYPE_SINGLE_TEXTFIELD", "Field") #define STR_DEFINE_NUMBERFORMAT NC_("STR_DEFINE_NUMBERFORMAT", "Additional formats...") #define RID_STR_SYSTEM NC_("RID_STR_SYSTEM", "[System]") #define STR_MULT_INTERACT_HYPH_WARN NC_("STR_MULT_INTERACT_HYPH_WARN", "The interactive hyphenation is already active\nin a different document") diff --git a/sw/source/uibase/inc/content.hxx b/sw/source/uibase/inc/content.hxx index dfb1350a4424..69f9696158ee 100644 --- a/sw/source/uibase/inc/content.hxx +++ b/sw/source/uibase/inc/content.hxx @@ -88,6 +88,22 @@ public: const SwTextINetFormat* GetINetAttr() const { return pINetAttr; } }; +class SwTextFieldContent final : public SwContent +{ +const SwFormatField* m_pFormatField; +public: +SwTextFieldContent(const SwContentType* pCnt, + const OUString& rName, + const SwFormatField* pFormatField, + tools::Long nYPos) +: SwContent(pCnt, rName, nYPos), + m_pFormatField(pFormatField) +{} + +const SwFormatField* GetFormatField() const {return m_pFormatField;} +virtual bool IsProtect() const override; +}; + class SwPostItContent final : public SwContent { const SwFormatField* pField; diff --git a/sw/source/uibase/inc/swcont.hxx b/sw/source/uibase/inc/swcont.hxx index 9b8d95d1d637..d65c4fa59aca 100644 --- a/sw/source/uibase/inc/swcont.hxx +++ b/sw/source/uibase/inc/swcont.hxx @@ -40,7 +40,8 @@ enum class ContentTypeId INDEX = 9, POSTIT = 10, DRAWOBJECT = 11, -LAST = DRAWOBJECT, +TEXTFIELD = 12, +LAST = TEXTFIELD, UNKNOWN= -1 }; diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 2b3b057ab7b2..d6486712d8f8 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -89,6 +89,15 @@ #include +#include +#include +#include +#include +#include +#include +#include +#include + #define CTYPE_CNT 0 #define CTYPE_CTT 1 @@ -202,6 +211,11 @@ bool SwContent::IsProtect() const return false; } +bool SwTextFieldContent::IsProtect() const
[Libreoffice-commits] core.git: sw/source
sw/source/uibase/app/docst.cxx | 11 --- 1 file changed, 11 deletions(-) New commits: commit 43c47f0cc133782ed6c4037df38df0d0c82123b8 Author: Jim Raykowski AuthorDate: Sat Jan 30 11:16:54 2021 -0900 Commit: Jim Raykowski CommitDate: Fri Apr 30 01:41:27 2021 +0200 tdf#133548 don't change outline level attrib and list style attrib when a new paragraph style is created based on a "to outline style assigned" paragraph style Change-Id: Ia757ca375e0e8749a24c27ad8e3f40daff7ef55d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112255 Tested-by: Jenkins Reviewed-by: Jim Raykowski diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx index d642e140f6f7..43cebe917a2a 100644 --- a/sw/source/uibase/app/docst.cxx +++ b/sw/source/uibase/app/docst.cxx @@ -794,17 +794,6 @@ void SwDocShell::Edit( } pDStyle->GetCollection()->SetDerivedFrom( pColl ); pDStyle->PresetParent( rParent ); - - /*When a new paragraph style is created based on a "to outline style -assigned" paragraph style, the outline level attribute and the list -style attribute of the new paragraph style have to be set to 0 -respectively "".*/ -if (pColl && pColl->IsAssignedToListLevelOfOutlineStyle()) -{ -SwNumRuleItem aItem; -pDStyle->GetCollection()->SetFormatAttr( aItem ); -pDStyle->GetCollection()->SetAttrOutlineLevel( 0 ); -} } else { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
Rico Tzschichholz license statement
All of my past & future contributions to LibreOffice may be licensed under the MPLv2/LGPLv3+ dual license. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - desktop/source
desktop/source/lib/init.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 8ab3f5a0e6e1465aeb0cd780a26ccb6ce4f8282a Author: Tor Lillqvist AuthorDate: Thu Apr 29 12:06:24 2021 +0300 Commit: Tor Lillqvist CommitDate: Thu Apr 29 22:13:58 2021 +0200 Let's call it "traceeventrecording" and not "profilezonerecording" It is not just ProfileZone events any longer that are recorded. Change-Id: I9c2b5817fca8f8a23ebd571cbaccb9ac063ec73b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114873 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tor Lillqvist diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index f46530ebc803..fecf7871f69b 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -3865,7 +3865,7 @@ static void lo_setOption(LibreOfficeKit* /*pThis*/, const char *pOption, const c { static char* pCurrentSalLogOverride = nullptr; -if (strcmp(pOption, "profilezonerecording") == 0) +if (strcmp(pOption, "traceeventrecording") == 0) { if (strcmp(pValue, "start") == 0) comphelper::TraceEvent::startRecording(); ___ 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-6.4' - include/comphelper
include/comphelper/profilezone.hxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 86f84bc3475358aed4d6154a04554dd0064ec61f Author: Tor Lillqvist AuthorDate: Thu Apr 29 11:24:56 2021 +0300 Commit: Tor Lillqvist CommitDate: Thu Apr 29 22:13:38 2021 +0200 cid#1477405 Initialize members Change-Id: I6e546875cf61394e0001000994fccbd8d6626428 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114872 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist diff --git a/include/comphelper/profilezone.hxx b/include/comphelper/profilezone.hxx index a8570a36e9ba..6274617f9f70 100644 --- a/include/comphelper/profilezone.hxx +++ b/include/comphelper/profilezone.hxx @@ -38,6 +38,8 @@ class COMPHELPER_DLLPUBLIC ProfileZone : public NamedEvent // lifetime. ProfileZone(const char* sName) : NamedEvent(sName) +, m_nPid(-1) +, m_nNesting(-1) { if (s_bRecording) { ___ 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-6.4' - comphelper/qa include/comphelper include/sal
comphelper/qa/unit/test_traceevent.cxx |7 +++ include/comphelper/profilezone.hxx | 14 +++--- include/sal/log-areas.dox |1 + 3 files changed, 19 insertions(+), 3 deletions(-) New commits: commit 76451767b9c6bb90704265d109fc32c861a3c7cd Author: Tor Lillqvist AuthorDate: Thu Apr 29 11:07:18 2021 +0300 Commit: Tor Lillqvist CommitDate: Thu Apr 29 22:12:40 2021 +0200 Add SAL_WARN in case ProfileZones are overlapping and not hierarchical Change-Id: Id09904db762b6d931ab23cce16e55d5213079516 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114851 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tor Lillqvist diff --git a/comphelper/qa/unit/test_traceevent.cxx b/comphelper/qa/unit/test_traceevent.cxx index e170e8aaeb18..29094b14f01b 100644 --- a/comphelper/qa/unit/test_traceevent.cxx +++ b/comphelper/qa/unit/test_traceevent.cxx @@ -122,6 +122,13 @@ void trace_event_test() // object that has already had its 'e' event generated. } +// This incorrect use of overlapping (not nested) ProfileZones +// will generate a SAL_WARN but should not crash +auto p1 = new comphelper::ProfileZone("error1"); +auto p2 = new comphelper::ProfileZone("error2"); +delete p1; +delete p2; + // Nothing is generated from this pAsync7Locked.reset(); } diff --git a/include/comphelper/profilezone.hxx b/include/comphelper/profilezone.hxx index e8b2ce99472b..a8570a36e9ba 100644 --- a/include/comphelper/profilezone.hxx +++ b/include/comphelper/profilezone.hxx @@ -12,6 +12,8 @@ #include +#include + #include // implementation of XToolkitExperimental profiling API @@ -56,10 +58,16 @@ class COMPHELPER_DLLPUBLIC ProfileZone : public NamedEvent if (m_nCreateTime > 0) { s_nNesting--; -assert(m_nNesting == s_nNesting); -if (s_bRecording) -addRecording(); +if (m_nNesting != s_nNesting) +{ +SAL_WARN("comphelper.traceevent", "Incorrect ProfileZone nesting for " << m_sName); +} +else +{ +if (s_bRecording) +addRecording(); +} } } diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox index 517008da6983..a6cc5ab8e9db 100644 --- a/include/sal/log-areas.dox +++ b/include/sal/log-areas.dox @@ -100,6 +100,7 @@ certain functionality. @li @c comphelper.container - EmbeddedObjectContainer @li @c comphelper.crypto @li @c comphelper.lok +@li @c comphelper.traceevent @section cppu ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sc/source
sc/source/core/data/table4.cxx |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) New commits: commit 80d111c948d1553e9e0015738289b471cfe137f1 Author: Mike Kaganski AuthorDate: Thu Apr 29 13:19:43 2021 +0200 Commit: Xisco Fauli CommitDate: Thu Apr 29 21:31:58 2021 +0200 tdf#141970 Revert "tdf#129606: Round the mean of the two subtractions" This reverts commit d5ebe7c3089ab9f4d3fe0707169fc1ce024cdb70, and brings number of inexact values in testing back to lower numbers (see test document in the bug). Change-Id: I5cfb34b7260fc6e4866585af6a2a50e79696eea2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114861 Tested-by: Mike Kaganski Reviewed-by: Mike Kaganski (cherry picked from commit aa096331ba468f19951e43e2550105d4dcf50053) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114865 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx index 392eb8847028..37f88e218193 100644 --- a/sc/source/core/data/table4.cxx +++ b/sc/source/core/data/table4.cxx @@ -208,8 +208,7 @@ double approxDiff( double a, double b ) // tdf#129606: Limit precision to the 16th significant digit of the least precise argument. // Cf. mnMaxGeneralPrecision in sc/source/core/data/column3.cxx. const int nExpArg = static_cast(floor(log10(std::max(aa, ab - 15; -// Round the mean of the two subtractions -return rtl::math::round((c + d) / 2, -std::max(nExp, nExpArg)); +return rtl::math::round(c, -std::max(nExp, nExpArg)); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
Re: CppCheck Report on vm140 Not Running
On Thu, 29 Apr 2021 at 18:26:27 +, Luke Benes wrote: > Whether Maaten misremembered, there was a net spit, or > problem with your search, he did reach out to the dev list: > http://document-foundation-mail-archive.969070.n3.nabble.com/Automated-cppcheck-reports-not-running-tt4290186.html > Which is not a channel to reach the infra team, see https://tdf.io/infra . I for one don't read that mailing list :-P It is, however, probably the best place to gauge developer interest in having that service (it's not up to the infra team to decide whether there in interest in this or that service). Can only assume that if the service was relied upon by many then someone would have forwarded the message; like bugzilla issues reported to the QA list, weblate issues reported to the l10n list, any issue reported to the localized lists, etc. >> I'm very much against re-hooking a box > > A box that ran for years without any issues. When Maartin informed > us that he lost his vm140 ssh-key in his very first email weeks ago, > you said all you could do is reboot it from the hypervisor. Please don't change the narrative. I didn't write that's all I *could* do, only that “I'm not taking care of that VM. Rebooted it again, but that's I'll do for now.” And the message you're referring to appears to be what prompted you to write to Maarten in the first place — it was sent *before* Maarten's reply. > Why that was fix acceptable at the time? How is having a vm with a > lost ssh key preferable to resetting it? I didn't realize that the box was actually unmaintained, my bad. That fact indeed came to light early in the other thread, and the box is shut down since then. > It’s strange that all these emails and 2 weeks later, this new excuse > comes out of nowhere. Out of nowhere? On April 15 already you got a message from Florian which says a fresh setup would likely be preferable. Followed by two parallels threads discussing the usefulness of that service, and my reading is that there is little interest in reviving the service. See yesterday's message from Florian for the summary. > We are volunteers. Poor communication and artificial roadblocks only > discourages outside help. I disagree about the “artificial” qualification. Sorry to hear that you'd prefer having that service live but again see Florian's summary, there doesn't appear to have enough interest *at this point in time* to justify the extra work. Compare that with a Wiki plugin that's only use by a handful of pages and that causes us headaches during each upgrade because it's not maintained upstream — at some point it's worth asking ourselves if we're not better off without it (been there). -- Guilhem. signature.asc Description: PGP signature ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: sw/qa sw/source
sw/qa/extras/htmlexport/data/reqif-objdata-presentationdatasize.odt |binary sw/qa/extras/htmlexport/htmlexport.cxx | 23 ++ sw/source/filter/html/htmlreqifreader.cxx |4 - 3 files changed, 25 insertions(+), 2 deletions(-) New commits: commit 58607e1c410ee89ddfd47dcd128abfa00e0ac839 Author: Miklos Vajna AuthorDate: Thu Apr 29 17:21:54 2021 +0200 Commit: Miklos Vajna CommitDate: Thu Apr 29 21:04:07 2021 +0200 sw html/reqif export: fix size of presentation data for "real" OLE2 embedding InsertOLE1Header() can either take its OLE1 presentation data (preview) from OLE2 or from RTF (SwOLENode). The presentation data size we wrote was incorrect in the OLE2 case case: nPresentationData is the RTF size, nBytes is the actual buffer size. In practice this made the embedded object non-editable in Word (when trying to edit the RTF fragment). This went wrong in commit 0d027abbc5609b096d2a954e77aa7354a55928ab (sw reqif-xhtml export, embedded objects: take OLE1 pres data from rtf if needed, 2020-09-02). Change-Id: I89019202c9a8b40c1b9a21f611f1190fd50073a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114889 Reviewed-by: Miklos Vajna Tested-by: Jenkins diff --git a/sw/qa/extras/htmlexport/data/reqif-objdata-presentationdatasize.odt b/sw/qa/extras/htmlexport/data/reqif-objdata-presentationdatasize.odt new file mode 100644 index ..231a7c572a3a Binary files /dev/null and b/sw/qa/extras/htmlexport/data/reqif-objdata-presentationdatasize.odt differ diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx index 69dbc5b615b2..200aa3f9d3d9 100644 --- a/sw/qa/extras/htmlexport/htmlexport.cxx +++ b/sw/qa/extras/htmlexport/htmlexport.cxx @@ -1363,6 +1363,29 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testReqifAscharObjsize) CPPUNIT_ASSERT_EQUAL(static_cast(4116), xReader->GetObjh()); } +CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testReqifObjdataPresentationDataSize) +{ +// Given a document with an OLE2 embedded object, containing a preview: +OUString aURL += m_directories.getURLFromSrc(DATA_DIRECTORY) + "reqif-objdata-presentationdatasize.odt"; +mxComponent = loadFromDesktop(aURL, "com.sun.star.text.TextDocument", {}); + +// When exporting to ReqIF: +ExportToReqif(); + +// Then make sure that the PresentationDataSize in the RTF's objdata blob is correct: +OUString aRtfUrl = GetOlePath(); +SvMemoryStream aOle1; +ParseOle1FromRtfUrl(aRtfUrl, aOle1); +OLE1Reader aOle1Reader(aOle1); +// Without the accompanying fix in place, this test would have failed with: +// - Expected: 565994 +// - Actual : 330240 (Linux) +// - Actual : 566034 (Windows, when Word is installed) +// because PresentationData was taken from the OLE2 stream but its size was taken from RTF. +CPPUNIT_ASSERT_EQUAL(static_cast(565994), aOle1Reader.m_nPresentationDataSize); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/html/htmlreqifreader.cxx b/sw/source/filter/html/htmlreqifreader.cxx index 6c9155fbc556..253e3f44cb22 100644 --- a/sw/source/filter/html/htmlreqifreader.cxx +++ b/sw/source/filter/html/htmlreqifreader.cxx @@ -341,8 +341,8 @@ OString InsertOLE1Header(SvStream& rOle2, SvStream& rOle1, sal_uInt32& nWidth, s rOle1.WriteUInt32(nWidth); // Height. rOle1.WriteUInt32(nHeight * -1); -// PresentationDataSize -rOle1.WriteUInt32(8 + nPresentationData); +// PresentationDataSize: size of (reserved fields + pBytes). +rOle1.WriteUInt32(8 + nBytes); // Reserved1-4. rOle1.WriteUInt16(0x0008); rOle1.WriteUInt16(0x31b1); ___ 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/gtk3gtkframe.cxx | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) New commits: commit b96797dd2e6578e8e1a4cea0fa2f3a17bc194a1c Author: Caolán McNamara AuthorDate: Thu Apr 29 14:17:40 2021 +0100 Commit: Caolán McNamara CommitDate: Thu Apr 29 20:58:48 2021 +0200 tdf#141963 put focus in vcl parent during Function key processing Change-Id: Ib63567c9ce208cb7dd522a1bce9d99fa44a72554 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114883 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx index d33704743b84..fa46f1372fe1 100644 --- a/vcl/unx/gtk3/gtk3gtkframe.cxx +++ b/vcl/unx/gtk3/gtk3gtkframe.cxx @@ -94,6 +94,12 @@ sal_uInt16 GtkSalFrame::GetMouseModCode( guint state ) return nCode; } +// KEY_F26 is the last function key known to keycodes.hxx +static bool IsFunctionKeyVal(guint keyval) +{ +return keyval >= GDK_KEY_F1 && keyval <= GDK_KEY_F26; +} + sal_uInt16 GtkSalFrame::GetKeyCode(guint keyval) { sal_uInt16 nCode = 0; @@ -105,8 +111,7 @@ sal_uInt16 GtkSalFrame::GetKeyCode(guint keyval) nCode = KEY_A + (keyval-GDK_KEY_A ); else if( keyval >= GDK_KEY_a && keyval <= GDK_KEY_z ) nCode = KEY_A + (keyval-GDK_KEY_a ); -else if( keyval >= GDK_KEY_F1 && keyval <= GDK_KEY_F26 ) -// KEY_F26 is the last function key known to keycodes.hxx +else if (IsFunctionKeyVal(keyval)) { switch( keyval ) { @@ -3271,8 +3276,9 @@ gboolean GtkSalFrame::signalKey(GtkWidget* pWidget, GdkEventKey* pEvent, gpointe // InterimItemWindow and send unconsumed keystrokes to it to // support ctrl-q etc shortcuts. Only bother to search for the // InterimItemWindow if it is a toplevel that fills its frame, or -// the keystroke is F6 to switch between task-panels -if (pThis->IsCycleFocusOutDisallowed() || pEvent->keyval == GDK_KEY_F6) +// the keystroke is sufficiently special its worth passing on, +// e.g. F6 to switch between task-panels or F5 to close a navigator +if (pThis->IsCycleFocusOutDisallowed() || IsFunctionKeyVal(pEvent->keyval)) { GtkWidget* pSearch = pFocusWindow; while (pSearch) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - include/xmloff sc/source xmloff/source
include/xmloff/XMLEventsImportContext.hxx |2 sc/source/filter/xml/xmlcvali.cxx | 78 +++- sc/source/filter/xml/xmlimprt.cxx | 37 +++ sc/source/filter/xml/xmlimprt.hxx | 16 xmloff/source/script/XMLEventsImportContext.cxx |5 - 5 files changed, 103 insertions(+), 35 deletions(-) New commits: commit 6ac038c54121ec307ed75f8fb45f591cca9f8519 Author: Xisco Fauli AuthorDate: Thu Apr 29 09:33:35 2021 +0200 Commit: Noel Grandin CommitDate: Thu Apr 29 20:42:43 2021 +0200 tdf#137945: Revert "use more FastParser in ScXMLContentValidationContext" This reverts commit ae854970bf9c734df132797c0f23a7829efd167c. This is only reverted in libreoffice-7-0 branch. See https://bugs.documentfoundation.org/show_bug.cgi?id=137945#c2 Besides, this commit partially reverts d32289d715f7182b9e82a4d3fde9cfcf87517da3 < loplugin:unusedmethods > and be9f45ad69a510185971957e7643fd64b873e98d < loplugin:unusedenumconstants > since some methods and enumerations are needed after reverting the commit Change-Id: Ia71257a37d384e7eb6ba904a6a13f8ae5603a79b Change-Id: I04c74ceb6e38c54ea41464b8337016bb5f81d90d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114882 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/include/xmloff/XMLEventsImportContext.hxx b/include/xmloff/XMLEventsImportContext.hxx index 4fb08ffb9d40..b85363e1b57d 100644 --- a/include/xmloff/XMLEventsImportContext.hxx +++ b/include/xmloff/XMLEventsImportContext.hxx @@ -67,8 +67,6 @@ public: sal_uInt16 nPrfx, const OUString& rLocalName); -XMLEventsImportContext(SvXMLImport& rImport); - XMLEventsImportContext( SvXMLImport& rImport, sal_uInt16 nPrfx, diff --git a/sc/source/filter/xml/xmlcvali.cxx b/sc/source/filter/xml/xmlcvali.cxx index 658f8007d0e7..e6835fb80c4a 100644 --- a/sc/source/filter/xml/xmlcvali.cxx +++ b/sc/source/filter/xml/xmlcvali.cxx @@ -62,6 +62,10 @@ public: ScXMLContentValidationContext( ScXMLImport& rImport, const rtl::Reference& rAttrList ); +virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, + const OUString& rLocalName, + const css::uno::Reference& xAttrList ) override; + virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override; @@ -87,9 +91,9 @@ public: const rtl::Reference& rAttrList, ScXMLContentValidationContext* pValidationContext); -virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( -sal_Int32 nElement, -const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override; +virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, + const OUString& rLocalName, + const css::uno::Reference& xAttrList ) override; virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override; }; @@ -110,9 +114,9 @@ public: const rtl::Reference& rAttrList, ScXMLContentValidationContext* pValidationContext); -virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( -sal_Int32 nElement, -const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override; +virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, + const OUString& rLocalName, + const css::uno::Reference& xAttrList ) override; virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override; }; @@ -128,9 +132,9 @@ public: const rtl::Reference& rAttrList, ScXMLContentValidationContext* pValidationContext); -virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( -sal_Int32 nElement, -const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override; +virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, + const OUString& rLocalName, + const css::uno::Reference& xAttrList ) override; virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override; }; @@ -214,6 +218,24 @@ ScXMLContentValidationContext::ScXMLContentValidationContext( ScXMLImport& rImpo } } +SvXMLImportContextRef ScXMLContentValidationContext::CreateChildContext( sal_uInt16 nPrefix, +
Re: CppCheck Report on vm140 Not Running
Whether Maaten misremembered, there was a net spit, or problem with your search, he did reach out to the dev list: http://document-foundation-mail-archive.969070.n3.nabble.com/Automated-cppcheck-reports-not-running-tt4290186.html > I'm very much against re-hooking a box A box that ran for years without any issues. When Maartin informed us that he lost his vm140 ssh-key in his very first email weeks ago, you said all you could do is reboot it from the hypervisor. Why that was fix acceptable at the time? How is having a vm with a lost ssh key preferable to resetting it? I was told to file a Redmond ticket, where again, no one from infra mentioned this, only the issue with credentials. https://redmine.documentfoundation.org/issues/3520#change-21592 It’s strange that all these emails and 2 weeks later, this new excuse comes out of nowhere. We are volunteers. Poor communication and artificial roadblocks only discourages outside help. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: sfx2/source
sfx2/source/devtools/DevelopmentToolChildWindow.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 3c6692f88df3f7447138fc953f11d8587d51f093 Author: Gülşah Köse AuthorDate: Wed Apr 28 13:00:57 2021 +0300 Commit: Gülşah Köse CommitDate: Thu Apr 29 20:07:55 2021 +0200 tdf#141422 Set inital height of the develepment tool window. Change-Id: I703edc227ee163e2a7b8fb9b03c71f055c6e0a3b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114775 Tested-by: Jenkins Reviewed-by: Gülşah Köse diff --git a/sfx2/source/devtools/DevelopmentToolChildWindow.cxx b/sfx2/source/devtools/DevelopmentToolChildWindow.cxx index 6a196d45e9a3..6b160bfa092a 100644 --- a/sfx2/source/devtools/DevelopmentToolChildWindow.cxx +++ b/sfx2/source/devtools/DevelopmentToolChildWindow.cxx @@ -23,6 +23,7 @@ DevelopmentToolChildWindow::DevelopmentToolChildWindow(vcl::Window* pParentWindo = VclPtr::Create(pBindings, this, pParentWindow); SetWindow(pWin); SetAlignment(SfxChildAlignment::BOTTOM); +pWin->SetSizePixel(Size(0, 290)); pWin->Initialize(pInfo); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
Re: CppCheck Report on vm140 Not Running
Hi Maarten, On Thu, 29 Apr 2021 at 19:37:45 +0200, Maarten Hoes wrote: > On Thu, Apr 29, 2021 at 7:30 PM Guilhem Moulin > wrote: > Thanks for searching through the logs to see if I indeed posted on IRC > about this. So it looks like my memory is failing me on this point. You might have posted about it, all I'm saying is that if you did then I didn't see it :-) -- Guilhem. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: Branch 'feature/wasm' - config_host.mk.in configure.ac solenv/gbuild
config_host.mk.in |1 + configure.ac| 13 + solenv/gbuild/gbuild.mk |4 3 files changed, 18 insertions(+) New commits: commit a8c79eebcaba484dc2900988597f426abf18c156 Author: Jan-Marek Glogowski AuthorDate: Thu Apr 29 19:40:14 2021 +0200 Commit: Jan-Marek Glogowski CommitDate: Thu Apr 29 19:40:18 2021 +0200 Add --enable-wasm-strip Will just set enable wasm strip for cross-target Change-Id: I0840b843794e4fab694df26608619a7bf06f5e5f diff --git a/config_host.mk.in b/config_host.mk.in index 5cc02e393589..d45511061037 100644 --- a/config_host.mk.in +++ b/config_host.mk.in @@ -200,6 +200,7 @@ export ENABLE_SKIA=@ENABLE_SKIA@ export ENABLE_SKIA_DEBUG=@ENABLE_SKIA_DEBUG@ export ENABLE_SYMBOLS_FOR=@ENABLE_SYMBOLS_FOR@ export ENABLE_VALGRIND=@ENABLE_VALGRIND@ +export ENABLE_WASM_STRIP=@ENABLE_WASM_STRIP@ export ENABLE_WERROR=@ENABLE_WERROR@ export ENDIANNESS=@ENDIANNESS@ export EPM=@EPM@ diff --git a/configure.ac b/configure.ac index 96fa11de367e..a7c82b3bca34 100644 --- a/configure.ac +++ b/configure.ac @@ -1894,6 +1894,12 @@ AC_ARG_ENABLE(curl, [Disable CURL support.]), ,enable_curl=yes) +AC_ARG_ENABLE(wasm-strip, +AS_HELP_STRING([--enable-wasm-strip], +[Strip the static build like for WASM/emscripten platform.]), +,enable_wasm_strip=yes) + + dnl === dnl Optional Packages (--with/without-) dnl === @@ -3713,13 +3719,19 @@ if test "$_os" = "iOS" -o "$build_cpu" != "$host_cpu" -o -n "$DISABLE_DYNLOADING cross_compiling="yes" fi fi + +ENABLE_WASM_STRIP='' if test "$cross_compiling" = "yes"; then export CROSS_COMPILING=TRUE +if test "$enable_dynamic_loading" != yes -a "$enable_wasm_strip" = yes; then +ENABLE_WASM_STRIP=TRUE +fi else CROSS_COMPILING= BUILD_TYPE="$BUILD_TYPE NATIVE" fi AC_SUBST(CROSS_COMPILING) +AC_SUBST(ENABLE_WASM_STRIP) # Use -isystem (gcc) if possible, to avoid warnings in 3rd party headers. # NOTE: must _not_ be used for bundled external libraries! @@ -5298,6 +5310,7 @@ if test "$cross_compiling" = "yes"; then test -n "$TARFILE_LOCATION" && sub_conf_opts="$sub_conf_opts --with-external-tar=$TARFILE_LOCATION" test "$with_system_icu_for_build" = "yes" -o "$with_system_icu_for_build" = "force" && sub_conf_opts="$sub_conf_opts --with-system-icu" test "$with_galleries" = "no" -o -z "$WITH_GALLERY_BUILD" && sub_conf_opts="$sub_conf_opts --with-galleries=no" +test "$enable_wasm_strip" = "yes" && sub_conf_opts="$sub_conf_opts --enable-wasm-strip" sub_conf_opts="$sub_conf_opts $with_build_platform_configure_options" # Don't bother having configure look for stuff not needed for the build platform anyway diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk index 1afa9e0451af..08c82f5e8d1f 100644 --- a/solenv/gbuild/gbuild.mk +++ b/solenv/gbuild/gbuild.mk @@ -220,6 +220,10 @@ gb_GLOBALDEFS := \ $(gb_COMPILERDEFS) \ $(gb_CPUDEFS) \ +ifeq ($(ENABLE_WASM_STRIP),TRUE) +gb_GLOBALDEFS += -DENABLE_WASM_STRIP +endif + ifeq ($(gb_ENABLE_DBGUTIL),$(true)) gb_GLOBALDEFS += -DDBG_UTIL ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
Re: CppCheck Report on vm140 Not Running
Hi, On Thu, Apr 29, 2021 at 7:30 PM Guilhem Moulin wrote: > On Thu, 29 Apr 2021 at 15:53:46 +, Luke Benes wrote: > > At the time, Maarten reported this on the dev IRC, infra IRC, and the > > mailing list. At the time, I assumed someone from infra would take > > care of it. > > As cloph wrote: > > | But also don't expect Infra team to browse the list for random > | infra-requests. For larger stuff a redmine ticket is the best way, for > | smaller bits here and there #tdf-infra on IRC or mail to > | hostmas...@documentfoundation.org. > > Also FWIW I don't see any relevant occurrence of cppcheck/vm140 in my > #tdf-infra and #libreoffice-dev 2020/2021 IRC logs. Might have happen > during a netsplit/disconnect/vacation, but IRC workflow is not “fire and > forget”, if the message is not acked then don't assume it's been seen > let alone will be acted upon. > > Thanks for searching through the logs to see if I indeed posted on IRC about this. So it looks like my memory is failing me on this point. Perhaps the posts were about the lcov reports instead (which also stopped running quite some time ago), or I just never went through with reporting it at all and now my memory of it is that I did do it. Again, sorry for the unintended confusion this may have caused. - Maarten ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: CppCheck Report on vm140 Not Running
On Thu, 29 Apr 2021 at 15:53:46 +, Luke Benes wrote: > At the time, Maarten reported this on the dev IRC, infra IRC, and the > mailing list. At the time, I assumed someone from infra would take > care of it. As cloph wrote: | But also don't expect Infra team to browse the list for random | infra-requests. For larger stuff a redmine ticket is the best way, for | smaller bits here and there #tdf-infra on IRC or mail to | hostmas...@documentfoundation.org. Also FWIW I don't see any relevant occurrence of cppcheck/vm140 in my #tdf-infra and #libreoffice-dev 2020/2021 IRC logs. Might have happen during a netsplit/disconnect/vacation, but IRC workflow is not “fire and forget”, if the message is not acked then don't assume it's been seen let alone will be acted upon. > Why can't you reset the user's password? I'm very much against re-hooking a box that has not been maintained for years to the main infrastructure and pretend all is well. > In the time, it took you to write that email, I could have rebooted > into recovery mode, dropped to root shell, and reset the root password > on the boxes I manage. This is a 30-second procedure. Every > hypervisor has some method to allow admins to boot guests into single > user. It's never been about being unable to regain access… -- Guilhem. signature.asc Description: PGP signature ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: CppCheck Report on vm140 Not Running
Hi, I wasn't subscribed to the dev mailing list up until just now, so when people stopped explicitly CC'ing me I missed some parts of this discussion. So here are some of my thoughts on the matter. I personally feel that if there is little interest in running cppcheck on the entire codebase regularly, I see little point of reviving the job. If there is/would be enough interest, I am willing to give it a shot to see if I can revive the job either on the current vm or on a new vm. No guarantees, other than to give it an honest attempt though. To me, Cloph made a fair point of at least documenting any manual steps that need to be taken. There are indeed a few manual steps, and I agree these would need to be documented at least and preferably automated in some fashion. I can't recall all the steps right now, but I'm fairly sure it will come back if I would try to revive the job. (For example, I created an gmail account and subscribed it to the dev mailing list so job success/failure emails could be send to the list.) To me, Luke made a fair argument that it might not be 'just' the 'code development team' that might be interested; he git grepped some and it looks like gsoc students (or other causal committers) have been using the tool to find 'easy hacks' or similar. These people might not be permanently watching mailing list messages or random irc chats when someone asks if anyone is interested in the job. I am personally not interested in maintaining the job (or the vm it runs on) in the long run. I do feel that the discussion has become a little overheated at the moment though, so perhaps it would be best if I just back off now. - Maarten -- Sent from: http://document-foundation-mail-archive.969070.n3.nabble.com/Dev-f1639786.html ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: desktop/source
desktop/source/deployment/misc/lockfile.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit d2b5e49c0b114fdf973e51b4387e232bd71f3838 Author: Julien Nabet AuthorDate: Thu Apr 29 15:37:07 2021 +0200 Commit: Julien Nabet CommitDate: Thu Apr 29 18:45:37 2021 +0200 Can use stack instead of heap (desktop/lockfile) Change-Id: I31f53436e31ca0dfe7de34bb252f104d4a1b34f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114885 Reviewed-by: Noel Grandin Reviewed-by: Julien Nabet Tested-by: Jenkins diff --git a/desktop/source/deployment/misc/lockfile.cxx b/desktop/source/deployment/misc/lockfile.cxx index 50da67e9706e..206da8286d76 100644 --- a/desktop/source/deployment/misc/lockfile.cxx +++ b/desktop/source/deployment/misc/lockfile.cxx @@ -52,9 +52,9 @@ static OString impl_getHostname() hostname by using the netbios name */ DWORD sz = MAX_COMPUTERNAME_LENGTH + 1; -auto szHost = std::make_unique(sz); -if (GetComputerNameA(szHost.get(), &sz)) -aHost = OString(szHost.get()); +TCHAR szHost[MAX_COMPUTERNAME_LENGTH + 1]; +if (GetComputerNameA(szHost, &sz)) +aHost = OString(szHost); else aHost = OString("UNKNOWN"); #else ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: bridges/source chart2/source connectivity/source dbaccess/source desktop/source extensions/source filter/source forms/source framework/source idlc/source idl/source io/
bridges/source/cpp_uno/shared/component.cxx | 21 - chart2/source/tools/ObjectIdentifier.cxx| 54 --- connectivity/source/commontools/dbconversion.cxx|5 connectivity/source/drivers/hsqldb/HView.cxx| 11 connectivity/source/drivers/mysqlc/mysqlc_resultsetmetadata.cxx |6 dbaccess/source/core/dataaccess/documentdefinition.cxx |6 dbaccess/source/core/misc/sdbcoretools.cxx |9 dbaccess/source/filter/hsqldb/parseschema.cxx |5 dbaccess/source/ui/app/AppDetailPageHelper.cxx |7 dbaccess/source/ui/app/DocumentInfoPreview.cxx |8 dbaccess/source/ui/misc/WCopyTable.cxx |8 dbaccess/source/ui/querydesign/QueryDesignView.cxx |9 desktop/source/app/dispatchwatcher.cxx | 17 - desktop/source/deployment/gui/dp_gui_dialog2.cxx|7 desktop/source/deployment/manager/dp_properties.cxx |9 desktop/source/deployment/registry/package/dp_package.cxx | 15 extensions/source/logging/simpletextformatter.cxx | 13 filter/source/xsltdialog/typedetectionexport.cxx| 37 +- forms/source/component/ComboBox.cxx | 12 framework/source/accelerators/presethandler.cxx | 12 framework/source/fwe/classes/addonsoptions.cxx | 152 -- framework/source/xml/acceleratorconfigurationreader.cxx | 12 framework/source/xml/imagesdocumenthandler.cxx |7 idl/source/prj/database.cxx |4 idlc/source/options.cxx |5 io/source/acceptor/acc_socket.cxx | 17 - io/source/connector/ctr_socket.cxx | 17 - linguistic/source/dicimp.cxx| 12 lotuswordpro/source/filter/lwptblformula.cxx| 10 oox/source/core/xmlfilterbase.cxx |4 oox/source/drawingml/chart/objectformatter.cxx |4 oox/source/export/vmlexport.cxx | 17 - oox/source/ppt/presentationfragmenthandler.cxx |5 oox/source/vml/vmlformatting.cxx|4 reportdesign/source/core/api/ReportEngineJFree.cxx |8 reportdesign/source/core/misc/reportformula.cxx |5 sc/inc/dputil.hxx |2 sc/source/core/data/dpcache.cxx |6 sc/source/core/data/dputil.cxx | 16 - sc/source/core/data/funcdesc.cxx| 10 sc/source/core/tool/chartarr.cxx|9 sc/source/filter/xml/XMLExportDatabaseRanges.cxx|6 sc/source/filter/xml/xmlimprt.cxx | 16 - sc/source/ui/app/inputhdl.cxx | 12 sc/source/ui/formdlg/dwfunctr.cxx | 12 sc/source/ui/view/gridwin.cxx | 34 +- scripting/source/provider/MasterScriptProvider.cxx | 13 scripting/source/provider/URIHelper.cxx | 26 - sd/source/ui/remotecontrol/ImagePreparer.cxx| 14 sdext/source/pdfimport/misc/pdfihelper.cxx | 12 sfx2/source/appl/appserv.cxx| 19 - sfx2/source/appl/macroloader.cxx| 11 sfx2/source/view/viewsh.cxx |9 stoc/source/uriproc/VndSunStarPkgUrlReferenceFactory.cxx|9 svx/source/engine3d/cube3d.cxx |9 svx/source/engine3d/extrud3d.cxx|9 svx/source/engine3d/lathe3d.cxx |9 svx/source/engine3d/obj3d.cxx |9 svx/source/engine3d/scene3d.cxx | 11 svx/source/engine3d/sphere3d.cxx|9 svx/source/form/fmshimp.cxx |8 svx/source/svdraw/svdoashp.cxx | 11 svx/source/svdraw/svdobj.cxx| 11 svx/source/svdraw/svdocapt.cxx | 11 svx/source/svdraw/svdocirc.cxx | 21 - svx/source/svdraw/svdoedge.cxx | 11 svx/source/svdraw/svdogrp.cxx | 15 svx/source/svdraw/svdomeas.cxx | 11 svx/so
[Libreoffice-commits] core.git: include/tools solenv/gdb
include/tools/color.hxx | 12 ++-- solenv/gdb/libreoffice/tl.py |6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) New commits: commit 76c793d2acf66f46e9edcda43d2f4327e8374841 Author: Noel Grandin AuthorDate: Thu Apr 29 15:39:02 2021 +0200 Commit: Noel Grandin CommitDate: Thu Apr 29 18:25:10 2021 +0200 rename A field in ::Color to T because it's actually transparency, not alpha, and having proper naming helps my limited brain keep track of stuff better when debugging And have both the stream operator and the debugging printer print out alpha values, for consistency. Change-Id: I9bc9ffcb71d554603591935e4043a3fb14646ebd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114886 Tested-by: Noel Grandin Reviewed-by: Noel Grandin diff --git a/include/tools/color.hxx b/include/tools/color.hxx index 4770efee7b0a..ac361474c228 100644 --- a/include/tools/color.hxx +++ b/include/tools/color.hxx @@ -55,7 +55,7 @@ class SAL_WARN_UNUSED TOOLS_DLLPUBLIC Color struct { #ifdef OSL_BIGENDIAN -sal_uInt8 A; +sal_uInt8 T; sal_uInt8 R; sal_uInt8 G; sal_uInt8 B; @@ -63,7 +63,7 @@ class SAL_WARN_UNUSED TOOLS_DLLPUBLIC Color sal_uInt8 B; sal_uInt8 G; sal_uInt8 R; -sal_uInt8 A; +sal_uInt8 T; #endif }; }; @@ -163,7 +163,7 @@ public: */ sal_uInt8 GetAlpha() const { -return 255 - A; +return 255 - T; } /** Is the color transparent? @@ -177,7 +177,7 @@ public: */ bool IsFullyTransparent() const { -return A == 255; +return T == 255; } /** Sets the red value. @@ -209,7 +209,7 @@ public: */ void SetAlpha(sal_uInt8 nAlpha) { -A = 255 - nAlpha; +T = 255 - nAlpha; } /** Returns the same color but ignoring the transparency value. @@ -495,7 +495,7 @@ template inline std::basic_ostream& operator <<(std::basic_ostream& rStream, const Color& rColor) { std::ios_base::fmtflags nOrigFlags = rStream.flags(); -rStream << "c[" << std::hex << std::setfill ('0') +rStream << "rgba[" << std::hex << std::setfill ('0') << std::setw(2) << static_cast(rColor.GetRed()) << std::setw(2) << static_cast(rColor.GetGreen()) << std::setw(2) << static_cast(rColor.GetBlue()) diff --git a/solenv/gdb/libreoffice/tl.py b/solenv/gdb/libreoffice/tl.py index 22ca3ba57c5f..8e15bfd47a0d 100644 --- a/solenv/gdb/libreoffice/tl.py +++ b/solenv/gdb/libreoffice/tl.py @@ -47,9 +47,9 @@ class ColorPrinter(object): r = self.val['R'] g = self.val['G'] b = self.val['B'] -a = self.val['A'] -if a: -return "rgba(%d, %d, %d, %d)" % (r, g, b, a) +t = self.val['T'] +if t: +return "rgba(%d, %d, %d, %d)" % (r, g, b, 255 - t) else: return "rgb(%d, %d, %d)" % (r, g, b) ___ 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 debac007038aeebd395119ba2ad4a9cc5d88 Author: Alain Romedenne AuthorDate: Thu Apr 29 18:15:58 2021 +0200 Commit: Gerrit Code Review CommitDate: Thu Apr 29 18:15:58 2021 +0200 Update git submodules * Update helpcontent2 from branch 'master' to 4ee2f0f82f99a865e765309eda367d5fc016674b - sf_basic py2bas bridge It includes Basic functions rework in order to - share content, - correct Basic keywords argument names tdf#141474 - accommodate Python lowercased arguments. Change-Id: If59a82444a8e001b02d085f5e10e0053666f8485 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/114008 Tested-by: Jenkins Reviewed-by: Alain Romedenne diff --git a/helpcontent2 b/helpcontent2 index c8cf56ede34c..4ee2f0f82f99 16 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit c8cf56ede34cc13a90a930aab505828ee196005c +Subproject commit 4ee2f0f82f99a865e765309eda367d5fc016674b ___ 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/sbasic/python/python_programming.xhp |4 source/text/sbasic/shared/03/sf_basic.xhp| 480 +++ source/text/sbasic/shared/03010101.xhp |8 source/text/sbasic/shared/03010201.xhp | 14 source/text/sbasic/shared/03010305.xhp |8 source/text/sbasic/shared/03030102.xhp | 40 + source/text/sbasic/shared/03030120.xhp |9 source/text/sbasic/shared/03120301.xhp | 53 +- 8 files changed, 557 insertions(+), 59 deletions(-) New commits: commit 4ee2f0f82f99a865e765309eda367d5fc016674b Author: Alain Romedenne AuthorDate: Thu Apr 15 11:47:57 2021 +0200 Commit: Alain Romedenne CommitDate: Thu Apr 29 18:15:58 2021 +0200 sf_basic py2bas bridge It includes Basic functions rework in order to - share content, - correct Basic keywords argument names tdf#141474 - accommodate Python lowercased arguments. Change-Id: If59a82444a8e001b02d085f5e10e0053666f8485 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/114008 Tested-by: Jenkins Reviewed-by: Alain Romedenne diff --git a/source/text/sbasic/python/python_programming.xhp b/source/text/sbasic/python/python_programming.xhp index 5efa8df15..96deb8606 100644 --- a/source/text/sbasic/python/python_programming.xhp +++ b/source/text/sbasic/python/python_programming.xhp @@ -11,14 +11,16 @@ Python : Programming with Python -/text/sbasic/python/python_programming.xhp +/text/sbasic/python/python_programming.xhp Python;Programming XSCRIPTCONTEXT;Python +XSCRIPTCONTEXT;getComponentContext() uno.py +uno.py;getComponentContext() Programming with Python Scripts diff --git a/source/text/sbasic/shared/03/sf_basic.xhp b/source/text/sbasic/shared/03/sf_basic.xhp new file mode 100644 index 0..9ebae2bec --- /dev/null +++ b/source/text/sbasic/shared/03/sf_basic.xhp @@ -0,0 +1,480 @@ + + + + + +ScriptForge.Basic service +/text/sbasic/shared/03/sf_basic.xhp + + + + + + Basic service + + + +ScriptForge.Basic service + The ScriptForge.Basic service proposes a collection of %PRODUCTNAME Basic methods to be executed in a Python context. Basic service methods reproduce the exact syntax and behaviour of Basic builtin functions. + + + + Typical example: + + svc.MsgBox('This has to be displayed in a message box') + + ScriptForge.Basic service is limited to Python scripts. + Service invocation + Before using the Basic service, import the CreateScriptService() method from the scriptforge module: + +from scriptforge import CreateScriptService +svc = CreateScriptService("Basic") + + Properties + + + Name + ReadOnly + Type + Description + + + + MB_OK, MB_OKCANCEL, MB_RETRYCANCEL, MB_YESNO, MB_YESNOCANCEL + + + Yes + + + integer + + + Values: 0, 1, 5, 4, 3 + + + + + MB_ICONEXCLAMATION, MB_ICONINFORMATION, MB_ICONQUESTION, MB_ICONSTOP + + + Yes + + + integer + + + Values: 48, 64, 32, 16 + + + + + MB_ABORTRETRYIGNORE, MB_DEFBUTTON1, MB_DEFBUTTON2, MB_DEFBUTTON3 + + + Yes + + + integer + + + Values: 2, 128, 256, 512 + + + + + IDABORT, IDCANCEL, IDIGNORE, IDNO, IDOK, IDRETRY, IDYES + + + Yes + + + integer + + + Values: 3, 2, 5, 7, 1, 4, 6Constants indicating MsgBox selected button. + + + + + StarDesktop + + + Yes + + + UNOobject + + + StarDesktop object represents LibreOfficeDev Start Center. + + + + + + List of Methods in the Basic Service + + + + + ConvertFromUrl + ConvertToUrl + CreateUnoService + DateAdd + DateDiff + DatePart + + + + + DateValue + Format + GetDefaultContext + GetGuiType + GetPathSeparator + GetSystemTicks + + + + + InputBox + MsgBox + Now + RGB + Xray + + + + + + ConvertFromUrl - + +Basic service;ConvertFromUrl + + ConvertFromUrl + Returns a system path file name for the given file: URL. + + svc.ConvertFromUrl(url: str): str + + u
[Libreoffice-commits] core.git: svx/source
svx/source/dialog/rubydialog.cxx |5 + 1 file changed, 5 insertions(+) New commits: commit 04f72656705905be13a006004dc18ac6cff4832b Author: Caolán McNamara AuthorDate: Thu Apr 29 12:32:37 2021 +0100 Commit: Caolán McNamara CommitDate: Thu Apr 29 17:57:37 2021 +0200 tdf#141967 bail early in Activate if disposing because focus bounces around the dialog as its being torn down widget by widget Change-Id: I2afd094bb13929c25268168175c142ca8e0074e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114880 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx index 439b4fbab178..f080f03521e9 100644 --- a/svx/source/dialog/rubydialog.cxx +++ b/svx/source/dialog/rubydialog.cxx @@ -271,6 +271,11 @@ void SvxRubyDialog::Close() void SvxRubyDialog::Activate() { SfxModelessDialogController::Activate(); +if (!m_xContentArea) +{ +// tdf#141967 if Activate is called during tear down bail early +return; +} //get selection from current view frame SfxViewFrame* pCurFrm = SfxViewFrame::Current(); Reference xCtrl = pCurFrm->GetFrame().GetController(); ___ 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/ui/app/inputhdl.cxx |5 +++-- sc/source/ui/unoobj/docuno.cxx |5 + 2 files changed, 8 insertions(+), 2 deletions(-) New commits: commit 0dc9da5df470b9c345e78dbe9553d81b9e4a7435 Author: Jan Holesovsky AuthorDate: Wed Mar 24 15:39:05 2021 +0100 Commit: Jan Holesovsky CommitDate: Thu Apr 29 17:53:57 2021 +0200 lok: Disable the "AutoInput" again. This partially reverts "lok: sc - suppress LOK editengine events for the calc input bar." The feature itself is very problematic in Online: 1) causes unwanted jumps to other cells, 2) causes the selection blinking in the cell when typing, and 3) it is very annoying in the form that in which it is implemented in LibreOffice anyway, compared to other office suites. Let's disable it, and enable again when we address the above issues. This (partially) reverts commit 91319ad56887f932b2da334db560d5d0a79a0280. Change-Id: I2234455c29069f74d13896474f3499035935931b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113047 Tested-by: Jenkins CollaboraOffice Reviewed-by: Jan Holesovsky (cherry picked from commit 65990058f041c3f1d280a69d411eb4ceacf5a721) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113112 Tested-by: Jenkins diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index 3abf07641963..bca87cd88aaa 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -801,7 +801,6 @@ ScInputHandler::ScInputHandler() if (comphelper::LibreOfficeKit::isActive()) { ScInputHandler::bOptLoaded = true;// Evaluate App options -ScInputHandler::bAutoComplete = true; // Is set in KeyInput } } @@ -2707,7 +2706,9 @@ void ScInputHandler::UpdateFormulaMode() if (pInputWin) pInputWin->SetFormulaMode(true); -if ( bAutoComplete ) +// in LOK, we always need to perform the GetFormulaData() call so +// that the formula insertion works +if (bAutoComplete || comphelper::LibreOfficeKit::isActive()) GetFormulaData(); UpdateParenthesis(); diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 371cb395e139..1729c2ca1cdb 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -1179,6 +1179,11 @@ void ScModelObj::initializeForTiledRendering(const css::uno::SequenceGetAppOptions() ); +aAppOptions.SetAutoComplete(false); +SC_MOD()->SetAppOptions(aAppOptions); + for (const beans::PropertyValue& rValue : rArguments) { if (rValue.Name == ".uno:SpellOnline" && rValue.Value.has()) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
Re: CppCheck Report on vm140 Not Running
Cloph, > But given that the job had stopped so many months ago without anyone > complaining At the time, Maarten reported this on the dev IRC, infra IRC, and the mailing list. At the time, I assumed someone from infra would take care of it. > Recreating it is always an option Why can't you reset the user's password? In the time, it took you to write that email, I could have rebooted into recovery mode, dropped to root shell, and reset the root password on the boxes I manage. This is a 30-second procedure. Every hypervisor has some method to allow admins to boot guests into single user. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: officecfg/registry vcl/source
officecfg/registry/schema/org/openoffice/Office/Common.xcs | 10 -- vcl/source/window/printdlg.cxx | 11 --- 2 files changed, 21 deletions(-) New commits: commit e53ac4207d2f9e53f7bfe4f927961ebe2bd17182 Author: Xisco Fauli AuthorDate: Thu Apr 29 12:02:06 2021 +0200 Commit: Xisco Fauli CommitDate: Thu Apr 29 17:20:12 2021 +0200 vcl: print dialog: remove broken code This was introduced in 149807eb6100090e178505ba4a264bb38eba1e0c < Resolves tdf#127782 - Print dialog height > trying to fix the problem of the window size not being remembered after reopening the dialog, however, the problem is still reproducible in master with GEN, thus, remove this code Change-Id: I65f327fa692cd3e2b5597d04e9e15abc952fe6d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114874 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs index ca7a467c2cca..908decfc99e0 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs @@ -3524,16 +3524,6 @@ false - - -Stores the width of the print dialog. - - - - -Stores the height of the print dialog. - - diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index be53d3511365..9f5906310799 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -732,15 +732,6 @@ PrintDialog::PrintDialog(weld::Window* i_pWindow, const std::shared_ptrget_preferred_size().Width() + mxScrolledWindow->get_scroll_thickness(), 450); -// restore dialog size -std::optional aWidth = officecfg::Office::Common::Print::Dialog::Width::get(); -std::optional aHeight = officecfg::Office::Common::Print::Dialog::Height::get(); -WindowStateData aState; -if (aWidth) aState.SetWidth(*aWidth); else aWidth = -1; -if (aHeight) aState.SetHeight(*aHeight); else aHeight = -1; -aState.SetMask(WindowStateMask::Width | WindowStateMask::Height); -m_xDialog->set_window_state(aState.ToStr()); - m_xDialog->set_centered_on_parent(true); } @@ -749,8 +740,6 @@ PrintDialog::~PrintDialog() std::shared_ptr batch(comphelper::ConfigurationChanges::create()); officecfg::Office::Common::Print::Dialog::RangeSectionExpanded::set(mxRangeExpander->get_expanded(), batch); officecfg::Office::Common::Print::Dialog::LayoutSectionExpanded::set(mxLayoutExpander->get_expanded(), batch); - officecfg::Office::Common::Print::Dialog::Width::set(m_xDialog->get_size().getWidth(), batch); - officecfg::Office::Common::Print::Dialog::Height::set(m_xDialog->get_size().getHeight(), batch); batch->commit(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
Re: Fwd: Drawing vertical text glyphs
Hi Lubos, Luboš Luňák 於 2021年4月29日 週四 上午1:19寫道: > On Wednesday 28 of April 2021, Mark Hung wrote: > > Anyway, if you need someone to verify text layout results with vertical > > writing or > > , don't hesitate to ask. > > > > I can definitely help. I can also verify patches on Windows. > > There is also a telegram group of TDF members from the CJK area if you > > prefer. > > The Skia VCL backend code for text drawing is > SkiaSalGraphicsImpl::drawGenericLayout(). For non-vertical glyphs, the > code > is easy, just iterate over all glyphs and pass them to Skia with their > positions, possibly rotated. That approach doesn't work well for vertical > glyphs, for the tdf#103785 document I get [1], with the glyphs being > positioned too high. If I apply the attached patch that moves all vertical > glyphs down based on the glyph height, then I get [2], which appears to be > at > least roughly acceptable, although it doesn't look to be completely > correct. > > And I don't know how to make it correct. First of all, I don't know how > to > visually identify what is correct. At [3] I've uploaded screenshots of the > document rendered by LO/Cairo, LO/GDI and Word2013. They are all > different, > both in X and Y positioning. Cairo draws them slightly to the left of the > latin alphabet characters, GDI is roughly centered, Word draws them to the > right. Vertically they also differ, I made sure to include cursor in all > the > screenshots and e.g. with the first glyph (中) the cursor doesn't touch the > glyph with Word, it touches it with GDI and it overlaps the glyph with > Cairo > (the image may need zooming to see it clearly). Which of those are correct? > > To be honest, I can only verify from the point of view of a user who can read Chinese. The cursor which overlaps the position doesn't seem right. It's not a big problem as long as it does not strike through the glyph in the middle. But the inconsistence among platforms might be a problem. I would have tested fullwidth punctuations. It went wrong in vertical writing before. > Second, I would need to express the correct positioning in the code. Do > you > know how to do that? I copied the glyph-size change in the attached patch > from Cairo, it also moves in X direction by the font descent, but I'd > prefer > not to do random modifications without understanding them. > > I tried to make a patch to highlight the relative positions, and find out something that I added to fix the issue - of course it can not complete fix the problem, but it may make more sense. https://gerrit.libreoffice.org/c/core/+/114887 ( the image of the test of the patch is also attached. ) Vertical positioning there is more correct to me. It also doesn't overlap with the cursor. It introduce horizontal offset issue unfortunately. Hope that helps. > [1] https://people.collabora.com/~llunak/skia/skia_current.png > [2] https://people.collabora.com/~llunak/skia/skia_vert1.png > [3] https://people.collabora.com/~llunak/skia/ > > -- > Luboš Luňák > l.lu...@collabora.com > -- Mark Hung ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: sc/source
sc/source/core/data/table4.cxx |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) New commits: commit aa096331ba468f19951e43e2550105d4dcf50053 Author: Mike Kaganski AuthorDate: Thu Apr 29 13:19:43 2021 +0200 Commit: Mike Kaganski CommitDate: Thu Apr 29 16:48:23 2021 +0200 tdf#141970 Revert "tdf#129606: Round the mean of the two subtractions" This reverts commit d5ebe7c3089ab9f4d3fe0707169fc1ce024cdb70, and brings number of inexact values in testing back to lower numbers (see test document in the bug). Change-Id: I5cfb34b7260fc6e4866585af6a2a50e79696eea2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114861 Tested-by: Mike Kaganski Reviewed-by: Mike Kaganski diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx index e3407715152f..0f1f7193fe59 100644 --- a/sc/source/core/data/table4.cxx +++ b/sc/source/core/data/table4.cxx @@ -210,8 +210,7 @@ double approxDiff( double a, double b ) // tdf#129606: Limit precision to the 16th significant digit of the least precise argument. // Cf. mnMaxGeneralPrecision in sc/source/core/data/column3.cxx. const int nExpArg = static_cast(floor(log10(std::max(aa, ab - 15; -// Round the mean of the two subtractions -return rtl::math::round((c + d) / 2, -std::max(nExp, nExpArg)); +return rtl::math::round(c, -std::max(nExp, nExpArg)); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
ESC meeting minutes: 2021-04-29
* Present: + Caolan, Cloph, Stephan, Heiko, Michael S, Olivier, Miklos, Eike, Xisco * Completed Action Items: + None * Pending Action Items: + ESC bug stats, chart ranges don’t show data past 2019-08-13 (Xisco) * Release Engineering update (Cloph) + 7.2 alpha 1 in 2nd week of May (feature freeze start of June) + 7.1 status: 7.1.3 rc2 has been tagged yesterday, Windows build is running + 7.0 status: 7.0.6 rc2 next week; last planned release of 7.0.6 line + Remotes: Android, iOS + Android viewer * Documentation (Olivier) + New Help (no news) + Helpcontent2 + New pages on ScriptForge (LibreOfficiant, R. Lima) + Bug squash (ohallot, S. Horacek, fitoshido, A. Gelmini) + Guides + Updating guides + Online reading + https://books.libreoffice.org/en/WG71/WG7100-Preface.html + also packing these in a ZIP to have it offline + custom extension is used to create the framed layout * UX Update (Heiko) + Bugzilla (topicUI) statistics 249(249) (topicUI) bugs open, 242(242) (needsUXEval) needs to be evaluated by the UXteam + Updates: BZ changes 1 week1 month 3 months 12 months added 16(2) 31(12)46(8) 117(8) commented 107(20) 399(53) 898(70)3919(83) removed 1(1) 3(1) 12(-1) 27(-2) resolved 13(3) 54(9)125(5) 513(10) + top 10 contributors: Heiko Tietze made 216 changes in 1 month, and 2376 changes in 1 year Dieter made 87 changes in 1 month, and 434 changes in 1 year Eyal Rozenberg made 65 changes in 1 month, and 72 changes in 1 year Ilmari Lauhakangas made 60 changes in 1 month, and 404 changes in 1 year Foote, V Stuart made 47 changes in 1 month, and 636 changes in 1 year Xisco Fauli made 43 changes in 1 month, and 229 changes in 1 year Telesto made 27 changes in 1 month, and 946 changes in 1 year Kaganski, Mike made 21 changes in 1 month, and 175 changes in 1 year Roman Kuznetsov made 19 changes in 1 month, and 189 changes in 1 year Timur made 19 changes in 1 month, and 168 changes in 1 year + 18 new tickets requesting UX evaluation + [Bug 141839] Non-adjacent table rows with unequal column widths snap to same width when adjusted * Crash Testing (Caolan) + 21(+9) import failure, 5(+1) export failures + 3 coverity issues + 18 ossfuzz issues * Crash Reporting (Xisco) + https://crashreport.libreoffice.org/stats/version/7.0.5.2 + (+146) 2072 1926 1878 1425 1392 1100 358 0 + https://crashreport.libreoffice.org/stats/version/7.1.0.3 + (+84) 4391 4307 4637 4077 4695 5822 7276 8505 10520 8732 6625 4863 452 0 + https://crashreport.libreoffice.org/stats/version/7.1.1.2 + (-908) 5533 6441 7402 7644 8944 8025 5645 2706 0 + https://crashreport.libreoffice.org/stats/version/7.1.2.2 + (+1934) 7429 5495 3968 2046 0 + https://crashreport.libreoffice.org/stats/signature/sfx2::RecentDocsView::ExecuteHdl_Impl + Since 7.1 without steps to reproduce it + may be specific to gtk3, not sure * Mentoring/easyhack update committer... 1 week 1 month 3 months12 months open 87(23) 133(10) 134(4) 141(4) reviews 434(110) 1286(-26) 2172(296)2198(296) merged 307(26)1263(-69) 2258(306)2258(306) abandoned 42(18) 94(-2) 155(42) 155(42) own commits 201(-20)909(-92) 3158(-91) 13845(-137) review commits 55(3) 267(-63) 1198(-50)4742(-55) contributor... 1 week1 month 3 months12 months open 31(11) 71(3)74(3) 77(3) reviews 840(92) 2962(-200) 5286(624) 5304(624) merged 14(1) 72(-14) 204(14) 204(14) abandoned 17(12) 36(-57) 123(17) 123(17) own commits 16(4) 106(-24) 584(-24) 2240(-12) review commits 0(0) 0(0) 0(0)0(0) + easyHack statistics: needsDevEval 8(8) needsUXEval 3(3) cleanup_comments 248(248) total 293(293) assigned 28(28) open 239(239) + top 10 contributors: Johnny_M made 42 patches in 1 month, and 750 patches in 1 year Dante DM made 4 patches in 1 month, and 83 patches in 1 year Steve Fanning made 4 patches in 1 month, and 118 patches in 1 year scito made 3 patches in 1 month, and 4 patches in 1 year Ahmet, Hakan Çelik made 3 patches in 1 month, and 5 patches in 1 year Attila Bakos made 3 patches in 1 month, and 45 patches in 1 year Hossein made 3 patches in 1 month, and 4 patches in 1 ye
[Libreoffice-commits] core.git: helpcontent2
helpcontent2 |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit a7520ce3b4dacf8e3f3ca88110783c5419095a1d Author: Rafael Lima AuthorDate: Thu Apr 29 16:22:32 2021 +0200 Commit: Gerrit Code Review CommitDate: Thu Apr 29 16:22:32 2021 +0200 Update git submodules * Update helpcontent2 from branch 'master' to c8cf56ede34cc13a90a930aab505828ee196005c - Create SFDocuments.Base service help page Change-Id: I2bf6bb4e28ed4390c26f94092aabd1dc878a Reviewed-on: https://gerrit.libreoffice.org/c/help/+/114509 Tested-by: Jenkins Reviewed-by: Rafael Lima diff --git a/helpcontent2 b/helpcontent2 index a4aacdb16a5c..c8cf56ede34c 16 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit a4aacdb16a5c386147c6e7a2c1c1f47843b3a805 +Subproject commit c8cf56ede34cc13a90a930aab505828ee196005c ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] help.git: AllLangHelp_sbasic.mk source/text
AllLangHelp_sbasic.mk|1 source/text/sbasic/shared/03/lib_ScriptForge.xhp |6 source/text/sbasic/shared/03/sf_base.xhp | 228 +++ source/text/sbasic/shared/03/sf_database.xhp |3 4 files changed, 236 insertions(+), 2 deletions(-) New commits: commit c8cf56ede34cc13a90a930aab505828ee196005c Author: Rafael Lima AuthorDate: Fri Apr 23 16:23:19 2021 +0200 Commit: Rafael Lima CommitDate: Thu Apr 29 16:22:32 2021 +0200 Create SFDocuments.Base service help page Change-Id: I2bf6bb4e28ed4390c26f94092aabd1dc878a Reviewed-on: https://gerrit.libreoffice.org/c/help/+/114509 Tested-by: Jenkins Reviewed-by: Rafael Lima diff --git a/AllLangHelp_sbasic.mk b/AllLangHelp_sbasic.mk index 0b8165024..84f2b3859 100644 --- a/AllLangHelp_sbasic.mk +++ b/AllLangHelp_sbasic.mk @@ -79,6 +79,7 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,sbasic,\ helpcontent2/source/text/sbasic/shared/03/lib_script \ helpcontent2/source/text/sbasic/shared/03/lib_ScriptForge \ helpcontent2/source/text/sbasic/shared/03/sf_array \ +helpcontent2/source/text/sbasic/shared/03/sf_base \ helpcontent2/source/text/sbasic/shared/03/sf_calc \ helpcontent2/source/text/sbasic/shared/03/sf_database \ helpcontent2/source/text/sbasic/shared/03/sf_dialog \ diff --git a/source/text/sbasic/shared/03/lib_ScriptForge.xhp b/source/text/sbasic/shared/03/lib_ScriptForge.xhp index d08f47d41..dc3c9674f 100644 --- a/source/text/sbasic/shared/03/lib_ScriptForge.xhp +++ b/source/text/sbasic/shared/03/lib_ScriptForge.xhp @@ -69,13 +69,14 @@ + Base Calc Database - Document + Document Form FormControl @@ -119,6 +120,9 @@ + + + diff --git a/source/text/sbasic/shared/03/sf_base.xhp b/source/text/sbasic/shared/03/sf_base.xhp new file mode 100644 index 0..e59da8cbd --- /dev/null +++ b/source/text/sbasic/shared/03/sf_base.xhp @@ -0,0 +1,228 @@ + + + + + + +SFDocuments.Base service +/text/sbasic/shared/03/sf_base.xhp + + + + + + +Base service + + SFDocuments.Base service + + The Base service provides a number of methods and properties to facilitate the management and handling of %PRODUCTNAME Base documents. + This service is closely related to the Document service, which provides generic methods for handling %PRODUCTNAME documents, including Base documents. Hence, the Base service extends the Document service and provides additional methods that are specific for Base documents, enabling users to: + + +Get access to the database contained in a Base document. + + +Open form documents stored in a Base document. + + +Check if a form document from a Base document is currently loaded. + + + + + + Refer to the Document service to learn more about methods and properties that can be used to manage %PRODUCTNAME documents. + + Service invocation + The Base service can be invoked in a variety of ways. The code snippet below uses the method CreateBaseDocument from the UI service to create a new Base file. + Note that in all examples the object oDoc is an instance of the Base service. + +Dim ui As Object, oDoc As Object +Set ui = CreateScriptService("UI") +Set oDoc = ui.CreateBaseDocument("C:\Documents\MyFile.odb") + + The Base service can also be instantiated while opening an existing Base file, as shown below: + +Set oDoc = ui.OpenBaseDocument("C:\Documents\MyFile.odb") + + If a Base document is already open, it is possible to instantiate the Base service directly: + +Dim oDoc As Object +Set oDoc = CreateScriptService("SFDocuments.Document", "MyFile.odb") + + The use of the "SFDocuments." substring in the previous example is optional. + + + + + List of Methods in the Base Service + + + + + + FormDocuments + Forms + + + + + GetDatabase + IsLoaded + + + + + OpenFormDocument + + + + + + + FormDocuments --- + +Base service;FormDocuments + + FormDocuments + Returns an array with the full names (path/name) of all form documents in the Base document as an zero-based Array of strings. + + +oDoc.FormDocuments() As Variant + + + The code snippet below prints the names of all form documents in the current Base document. + +Dim oDoc as Object, myForms as Object, formName as String +Set oDoc = CreateScriptService("Document", ThisDataBaseDocument) +Set myForms = oDoc.Fo
[Libreoffice-commits] core.git: cppcanvas/source drawinglayer/source include/svx include/vcl sd/qa svx/source vcl/source
cppcanvas/source/mtfrenderer/implrenderer.cxx |6 - drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx | 53 +--- include/svx/xdash.hxx | 22 ++--- include/vcl/lineinfo.hxx | 26 +++--- sd/qa/unit/export-tests-ooxml2.cxx |6 - sd/qa/unit/uiimpress.cxx | 24 + svx/source/xoutdev/xattr.cxx | 12 +- vcl/source/filter/idxf/dxfvec.cxx |6 - vcl/source/gdi/lineinfo.cxx| 55 +++-- vcl/source/outdev/polyline.cxx |8 - 10 files changed, 122 insertions(+), 96 deletions(-) New commits: commit b71d9a6d15cfb8a50afdea5ac064f40d84c561f8 Author: Luboš Luňák AuthorDate: Tue Apr 27 11:44:48 2021 +0200 Commit: Luboš Luňák CommitDate: Thu Apr 29 16:05:53 2021 +0200 do not apply line dashing in drawinglayer (tdf#136957) basegfx::utils::applyLineDashing() is not as good as the actual VCL backend dashing, and there are some rounding errors because of all the canvas transformation matrices or whatever, which leads to the drawing problem. So use LineInfo to carry the dashing information. As a part of this change, also make LineInfo use doubles instead of ints. The use of transformation matrices means that the values may be fractional and less than one. Change-Id: Ia5ac7d266cab344b7137052c81fbd96c1ce28003 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114710 Tested-by: Jenkins Reviewed-by: Luboš Luňák diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx index 24f7f3fbf969..a9df9eb2c6b8 100644 --- a/cppcanvas/source/mtfrenderer/implrenderer.cxx +++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx @@ -161,13 +161,13 @@ namespace // interpret dash info only if explicitly enabled as // style const ::basegfx::B2DSize aDistance( rLineInfo.GetDistance(), 0 ); -const double nDistance( (rState.mapModeTransform * aDistance).getX() ); +const double nDistance( (rState.mapModeTransform * aDistance).getLength() ); const ::basegfx::B2DSize aDashLen( rLineInfo.GetDashLen(), 0 ); -const double nDashLen( (rState.mapModeTransform * aDashLen).getX() ); +const double nDashLen( (rState.mapModeTransform * aDashLen).getLength() ); const ::basegfx::B2DSize aDotLen( rLineInfo.GetDotLen(), 0 ); -const double nDotLen( (rState.mapModeTransform * aDotLen).getX() ); +const double nDotLen( (rState.mapModeTransform * aDotLen).getLength() ); const sal_Int32 nNumArryEntries( 2*rLineInfo.GetDashCount() + 2*rLineInfo.GetDotCount() ); diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx index 6f690ca55f46..0dc0904015f0 100644 --- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx @@ -1574,31 +1574,60 @@ void VclMetafileProcessor2D::processPolygonStrokePrimitive2D( if (basegfx::fTools::more(rLine.getWidth(), 0.0)) { const attribute::StrokeAttribute& rStroke = rStrokePrimitive.getStrokeAttribute(); -basegfx::B2DPolyPolygon aHairLinePolyPolygon; +const basegfx::BColor aHairlineColor( +maBColorModifierStack.getModifiedColor(rLine.getColor())); +mpOutputDevice->SetLineColor(Color(aHairlineColor)); +mpOutputDevice->SetFillColor(); + +// use the transformed line width +LineInfo aLineInfo(LineStyle::Solid, + basegfx::fround(getTransformedLineWidth(rLine.getWidth(; +aLineInfo.SetLineJoin(rLine.getLineJoin()); +aLineInfo.SetLineCap(rLine.getLineCap()); + +basegfx::B2DPolyPolygon aHairLinePolyPolygon; if (0.0 == rStroke.getFullDotDashLen()) { aHairLinePolyPolygon.append(rBasePolygon); } +else if (rStroke.getDotDashArray().size() == 2) +{ +aHairLinePolyPolygon.append(rBasePolygon); +// This will be used by setupStrokeAttributes() in cppcanvas. +aLineInfo.SetStyle(LineStyle::Dash); +aLineInfo.SetDashCount(1); +aLineInfo.SetDashLen( + basegfx::fround(getTransformedLineWidth(rStroke.getDotDashArray()[0]))); +aLineInfo.SetDistance( + basegfx::fround(getTransformedLineWidth(rStroke.getDotDashArray()[1]))); +} +else if (rStroke.getDotDashArray().size() == 4 + && rStroke.getDotDashArray()[1] == rS
[Libreoffice-commits] core.git: oox/source sd/qa
oox/source/drawingml/lineproperties.cxx |4 ++-- oox/source/export/drawingml.cxx |4 ++-- sd/qa/unit/uiimpress.cxx| 14 ++ 3 files changed, 6 insertions(+), 16 deletions(-) New commits: commit 5d4e450a7d64d3dc1caf34544dbfa35f4641d5c3 Author: Luboš Luňák AuthorDate: Mon Apr 26 15:16:49 2021 +0200 Commit: Luboš Luňák CommitDate: Thu Apr 29 16:05:34 2021 +0200 Revert "tdf#136957 Use bigger dots for better handling in presentation mode." This change was a workaround and a follow-up commit will handle the problem in a better way. This reverts commit 5d80f679e1891f98ef964efa1166c90d001c5806. Change-Id: I24a98a0828d3b6fbd014d58f37bf4da40d7dfdfd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114711 Tested-by: Jenkins Reviewed-by: Luboš Luňák diff --git a/oox/source/drawingml/lineproperties.cxx b/oox/source/drawingml/lineproperties.cxx index 87c502f96f6b..451da4c6aa26 100644 --- a/oox/source/drawingml/lineproperties.cxx +++ b/oox/source/drawingml/lineproperties.cxx @@ -470,9 +470,9 @@ void LineProperties::pushToPropMap( ShapePropertyMap& rPropMap, // Cannot use -100 because that results in 0 length in some cases and // LibreOffice interprets 0 length as 100%. if (aLineDash.DotLen >= 100 || aLineDash.DashLen >= 100) -aLineDash.Distance += 96; +aLineDash.Distance += 99; if (aLineDash.DotLen >= 100) -aLineDash.DotLen -= 96; +aLineDash.DotLen -= 99; if (aLineDash.DashLen >= 100) aLineDash.DashLen -= 99; } diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 07dad1fb8b75..5b16931da1d3 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -974,8 +974,8 @@ void DrawingML::WriteOutline( const Reference& rXPropSet, Referenc sal_uInt32 nDistance = aLineDash.Distance; if (aLineCap != LineCap_BUTT && nDistance >= 99) { -nDistance -= 96; -nDotLen += 96; +nDistance -= 99; +nDotLen += 99; if (nDashLen > 0) nDashLen += 99; } diff --git a/sd/qa/unit/uiimpress.cxx b/sd/qa/unit/uiimpress.cxx index 4f2501da991a..9a1ab0a52c82 100644 --- a/sd/qa/unit/uiimpress.cxx +++ b/sd/qa/unit/uiimpress.cxx @@ -650,19 +650,9 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf134053) // Because 0% is not possible as dash length (as of June 2020) 1% is used in the fix. // For that a larger delta is here allowed to the ideal value than needed for // rounding errors. +CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Distance", 2117, fDistance, 12); CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Dot length", 706, fDotLength, 12); - -// tdf#136957 (dotted lines are disappearing in presentation mode) -// Test value used as 2089 instead of 2117 for tdf#136957 workaround. -// If this test fails as Expected: 2089 Actual:2117 -// plaese test tdf#136957 manually and use 2117 as test value again. -CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Distance", 2089, fDistance, 12); - -// tdf#136957 (dotted lines are disappearing in presentation mode) -// Test value used as 2854 instead of 2822 for tdf#136957 workaround. -// If this test fails as Expected: 2854 Actual:2822 -// plaese test tdf#136957 manually and use 2822 as test value again. -CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Dash length", 2854, fDashLength, 12); +CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Dash length", 2822, fDashLength, 12); } CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testSpellOnlineParameter) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: starmath/qa
starmath/qa/cppunit/test_starmath.cxx | 57 -- 1 file changed, 28 insertions(+), 29 deletions(-) New commits: commit 1d036d1a58a46d46ca38eaa8ba438015a54008f6 Author: Caolán McNamara AuthorDate: Thu Apr 29 09:29:01 2021 +0100 Commit: Caolán McNamara CommitDate: Thu Apr 29 15:56:55 2021 +0200 reuse SmEditWindow already present in SmCmdBoxWindow in tests Change-Id: I48f15d584e15269336b289c8204588384f2f6998 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114838 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/starmath/qa/cppunit/test_starmath.cxx b/starmath/qa/cppunit/test_starmath.cxx index 37bc23489a55..ba1d6c81e56d 100644 --- a/starmath/qa/cppunit/test_starmath.cxx +++ b/starmath/qa/cppunit/test_starmath.cxx @@ -99,7 +99,6 @@ private: SfxBindings m_aBindings; std::unique_ptr m_pDispatcher; VclPtr m_pSmCmdBoxWindow; -VclPtr m_pEditWindow; SmDocShellRef m_xDocShRef; SmViewShell *m_pViewShell; }; @@ -130,14 +129,12 @@ void Test::setUp() m_aBindings.EnterRegistrations(); m_pSmCmdBoxWindow.reset(VclPtr::Create(&m_aBindings, nullptr, nullptr)); m_aBindings.LeaveRegistrations(); -m_pEditWindow = VclPtr::Create(*m_pSmCmdBoxWindow); -m_pViewShell = m_pEditWindow->GetView(); +m_pViewShell = m_pSmCmdBoxWindow->GetView(); CPPUNIT_ASSERT_MESSAGE("Should have a SmViewShell", m_pViewShell); } void Test::tearDown() { -m_pEditWindow.disposeAndClear(); m_pSmCmdBoxWindow.disposeAndClear(); m_pDispatcher.reset(); m_xDocShRef->DoClose(); @@ -179,54 +176,55 @@ void Test::testSmTmpDeviceRestoreFont() void Test::editMarker() { +SmEditWindow& rEditWindow = m_pSmCmdBoxWindow->GetEditWindow(); { OUString sMarkedText(" under under "); -m_pEditWindow->SetText(sMarkedText); -m_pEditWindow->Flush(); -OUString sFinalText = m_pEditWindow->GetText(); +rEditWindow.SetText(sMarkedText); +rEditWindow.Flush(); +OUString sFinalText = rEditWindow.GetText(); CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be equal text", sMarkedText, sFinalText); } { ESelection aSelection; -m_pEditWindow->SelNextMark(); -m_pEditWindow->Delete(); -m_pEditWindow->InsertText("a"); +rEditWindow.SelNextMark(); +rEditWindow.Delete(); +rEditWindow.InsertText("a"); -m_pEditWindow->SelNextMark(); -m_pEditWindow->SelNextMark(); -m_pEditWindow->Delete(); -m_pEditWindow->InsertText("c"); +rEditWindow.SelNextMark(); +rEditWindow.SelNextMark(); +rEditWindow.Delete(); +rEditWindow.InsertText("c"); // should be safe i.e. do nothing -m_pEditWindow->SelNextMark(); -aSelection = m_pEditWindow->GetSelection(); +rEditWindow.SelNextMark(); +aSelection = rEditWindow.GetSelection(); CPPUNIT_ASSERT_EQUAL(sal_Int32(0), aSelection.nStartPara); CPPUNIT_ASSERT_EQUAL(sal_Int32(19), aSelection.nStartPos); CPPUNIT_ASSERT_EQUAL(sal_Int32(0), aSelection.nEndPara); CPPUNIT_ASSERT_EQUAL(sal_Int32(19), aSelection.nEndPos); -m_pEditWindow->SelPrevMark(); -m_pEditWindow->Delete(); -m_pEditWindow->InsertText("b"); +rEditWindow.SelPrevMark(); +rEditWindow.Delete(); +rEditWindow.InsertText("b"); // tdf#106116: should be safe i.e. do nothing -m_pEditWindow->SelPrevMark(); -aSelection = m_pEditWindow->GetSelection(); +rEditWindow.SelPrevMark(); +aSelection = rEditWindow.GetSelection(); CPPUNIT_ASSERT_EQUAL(sal_Int32(0), aSelection.nStartPara); CPPUNIT_ASSERT_EQUAL(sal_Int32(9), aSelection.nStartPos); CPPUNIT_ASSERT_EQUAL(sal_Int32(0), aSelection.nEndPara); CPPUNIT_ASSERT_EQUAL(sal_Int32(9), aSelection.nEndPos); -m_pEditWindow->Flush(); -OUString sFinalText = m_pEditWindow->GetText(); +rEditWindow.Flush(); +OUString sFinalText = rEditWindow.GetText(); CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be a under b under c", OUString("a under b under c"), sFinalText); } { -m_pEditWindow->SetText(OUString()); -m_pEditWindow->Flush(); +rEditWindow.SetText(OUString()); +rEditWindow.Flush(); } } @@ -436,12 +434,13 @@ void Test::editUndoRedo() void Test::replacePlaceholder() { +SmEditWindow& rEditWindow = m_pSmCmdBoxWindow->GetEditWindow(); // Test the placeholder replacement. In this case, testing 'a + b', it // should return '+a + b' when selecting '+' in ElementsDock -m_pEditWindow->SetText("a + b"); -m_pEditWindow->SelectAll(); -m_pEditWindow->InsertText("+"); -OUString sFinalText = m_pEditWindow->GetText(); +rEditWindow.SetText("a + b"); +rEditWindow.SelectAll(); +rEditWindow.InsertText("+"); +OUS
[Libreoffice-commits] core.git: svx/source
svx/source/dialog/weldeditview.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit 41dbc48a71717d3d4703c707a4491020ecc12b1a Author: Noel Grandin AuthorDate: Thu Apr 29 13:13:45 2021 +0200 Commit: Noel Grandin CommitDate: Thu Apr 29 15:43:15 2021 +0200 can stack-allocate this Change-Id: I53de9926bb3eb662ab6f9065bf1d9190df76c0c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114879 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/svx/source/dialog/weldeditview.cxx b/svx/source/dialog/weldeditview.cxx index 38d69111c7a0..d59aab1877a6 100644 --- a/svx/source/dialog/weldeditview.cxx +++ b/svx/source/dialog/weldeditview.cxx @@ -188,8 +188,8 @@ void WeldEditView::DoPaint(vcl::RenderContext& rRenderContext, const tools::Rect const SvtOptionsDrawinglayer aSvtOptionsDrawinglayer; const Color aHighlight(aSvtOptionsDrawinglayer.getHilightColor()); -auto xCursorOverlay = std::make_unique( -sdr::overlay::OverlayType::Transparent, aHighlight, aLogicRanges, true); +sdr::overlay::OverlaySelection aCursorOverlay(sdr::overlay::OverlayType::Transparent, + aHighlight, aLogicRanges, true); const drawinglayer::geometry::ViewInformation2D aViewInformation2D( basegfx::B2DHomMatrix(), rRenderContext.GetViewTransformation(), @@ -200,7 +200,7 @@ void WeldEditView::DoPaint(vcl::RenderContext& rRenderContext, const tools::Rect drawinglayer::processor2d::createProcessor2DFromOutputDevice(rRenderContext, aViewInformation2D)); - xProcessor->process(xCursorOverlay->getOverlayObjectPrimitive2DSequence()); + xProcessor->process(aCursorOverlay.getOverlayObjectPrimitive2DSequence()); } rRenderContext.Pop(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: svx/source
svx/source/svdraw/svdedxv.cxx | 20 +--- 1 file changed, 9 insertions(+), 11 deletions(-) New commits: commit 610d8d3ca470d13159c017cdc3f86310bf5cd1ef Author: Noel Grandin AuthorDate: Thu Apr 29 13:13:20 2021 +0200 Commit: Noel Grandin CommitDate: Thu Apr 29 15:43:02 2021 +0200 use unique_ptr in TextEditOverlayObject Change-Id: I0deb52ee36a16aad91a5f945a6d92c1aa18a58a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114878 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index fa04f309e86d..e3c5379e54a5 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -394,7 +394,7 @@ class TextEditOverlayObject : public sdr::overlay::OverlayObject { protected: /// local access to associated sdr::overlay::OverlaySelection -sdr::overlay::OverlaySelection* mpOverlaySelection; +std::unique_ptr mxOverlaySelection; /// local definition depends on active OutlinerView OutlinerView& mrOutlinerView; @@ -420,7 +420,10 @@ public: virtual ~TextEditOverlayObject() override; // data read access -const sdr::overlay::OverlaySelection* getOverlaySelection() const { return mpOverlaySelection; } +const sdr::overlay::OverlaySelection* getOverlaySelection() const +{ +return mxOverlaySelection.get(); +} const OutlinerView& getOutlinerView() const { return mrOutlinerView; } /// override to check conditions for last createOverlayObjectPrimitive2DSequence @@ -460,7 +463,6 @@ TextEditOverlayObject::createOverlayObjectPrimitive2DSequence() TextEditOverlayObject::TextEditOverlayObject(const Color& rColor, OutlinerView& rOutlinerView, bool bVisualizeSurroundingFrame) : OverlayObject(rColor) -, mpOverlaySelection(nullptr) , mrOutlinerView(rOutlinerView) , maLastRange() , maRange() @@ -474,17 +476,13 @@ TextEditOverlayObject::TextEditOverlayObject(const Color& rColor, OutlinerView& // create local OverlaySelection - this is an integral part of EditText // visualization const std::vector aEmptySelection{}; -mpOverlaySelection = new sdr::overlay::OverlaySelection(sdr::overlay::OverlayType::Transparent, -rColor, aEmptySelection, true); +mxOverlaySelection.reset(new sdr::overlay::OverlaySelection( +sdr::overlay::OverlayType::Transparent, rColor, aEmptySelection, true)); } TextEditOverlayObject::~TextEditOverlayObject() { -if (getOverlaySelection()) -{ -delete mpOverlaySelection; -mpOverlaySelection = nullptr; -} +mxOverlaySelection.reset(); if (getOverlayManager()) { @@ -604,7 +602,7 @@ void TextEditOverlayObject::checkSelectionChange() aRect.Right() + aLogicPixel.Width(), aRect.Bottom() + aLogicPixel.Height()); } -mpOverlaySelection->setRanges(aLogicRanges); +mxOverlaySelection->setRanges(aLogicRanges); } } // end of anonymous namespace ___ 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-6.4' - comphelper/qa include/comphelper
comphelper/qa/unit/test_traceevent.cxx | 136 ++--- include/comphelper/traceevent.hxx | 61 +++--- 2 files changed, 121 insertions(+), 76 deletions(-) New commits: commit 43075227198e2aef027446611b6cbe9dfec895cb Author: Tor Lillqvist AuthorDate: Wed Apr 28 17:27:50 2021 +0300 Commit: Tor Lillqvist CommitDate: Thu Apr 29 15:35:19 2021 +0200 Make the nested AsyncEvent work more reliably We must take into consideration that somebody might hold on to a hard reference to such an object. Thus it is not enough to drop the references to it from its parent, that is not necessarily enough to make it destruct. Instead have the parent explicitly cann a function on the children than generates their end events. Also add some documentation. Change-Id: I38180c85072c76af8964c48fa19132b8e1178ee1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114813 Tested-by: Jenkins Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114850 Tested-by: Tor Lillqvist diff --git a/comphelper/qa/unit/test_traceevent.cxx b/comphelper/qa/unit/test_traceevent.cxx index 226171b0e097..e170e8aaeb18 100644 --- a/comphelper/qa/unit/test_traceevent.cxx +++ b/comphelper/qa/unit/test_traceevent.cxx @@ -31,87 +31,99 @@ namespace { void trace_event_test() { -// When we start recording is off and this will not generate any 'X' event when we leave the scope -comphelper::ProfileZone aZone0("test0"); +std::shared_ptr pAsync7Locked; -// This will not generate any 'b' and 'e' events either -auto pAsync1(std::make_shared("async1")); - -std::weak_ptr pAsync2; { -// No 'X' by this either -comphelper::ProfileZone aZone1("block1"); +// When we start recording is off and this will not generate any 'X' event when we leave the scope +comphelper::ProfileZone aZone0("test0"); -// Now we turn on recording -comphelper::TraceEvent::startRecording(); +// This will not generate any 'b' and 'e' events either +auto pAsync1(std::make_shared("async1")); -// As this is nested in the parent that was created with recording turned off, -// this will not generate any 'b' and 'e' events either even if recording is now on. -pAsync2 = comphelper::AsyncEvent::createWithParent("async2in1", pAsync1); -} +std::weak_ptr pAsync2; +{ +// No 'X' by this either +comphelper::ProfileZone aZone1("block1"); -// This will generate an 'i' event for instant1 -comphelper::TraceEvent::addInstantEvent("instant1"); +// Now we turn on recording +comphelper::TraceEvent::startRecording(); -std::shared_ptr pAsync25; -{ -comphelper::ProfileZone aZone2("block2"); +// As this is nested in the parent that was created with recording turned off, +// this will not generate any 'b' and 'e' events either even if recording is now on. +pAsync2 = comphelper::AsyncEvent::createWithParent("async2in1", pAsync1); +} -// This does not generate any 'e' event as it was created when recording was off -// And the nested async2 object will thus not generate anything either -pAsync1.reset(); +// This will generate an 'i' event for instant1 +comphelper::TraceEvent::addInstantEvent("instant1"); -// This will generate 'b' event and an 'e' event when the pointer is reset or goes out of scope -pAsync25 = std::make_shared("async2.5"); +std::shared_ptr pAsync25; +{ +comphelper::ProfileZone aZone2("block2"); -// Leaving this scope will generate an 'X' event for block2 -} +// This does not generate any 'e' event as it was created when recording was off +// And the nested async2 object will thus not generate anything either +pAsync1.reset(); -// Verify that the weak_ptr to pAsync2 has expired as its parent pAsync1 has been finished off -CPPUNIT_ASSERT(pAsync2.expired()); +// This will generate 'b' event and an 'e' event when the pointer is reset or goes out of scope +pAsync25 = std::make_shared("async2.5"); -// This will generate a 'b' event for async3 -auto pAsync3(std::make_shared("async3")); +// Leaving this scope will generate an 'X' event for block2 +} -std::weak_ptr pAsync4; +// Verify that the weak_ptr to pAsync2 has expired as its parent pAsync1 has been finished off +CPPUNIT_ASSERT(pAsync2.expired()); -{ -comphelper::ProfileZone aZone3("block3"); +// This will generate a 'b' event for async3 +auto pAsync3(std::make_shared("async3")); -pAsync4 = comphelper::AsyncEvent::createWithParent("async4in3", pAsync3); +std::weak_ptr pAsync4;
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - comphelper/qa include/comphelper
comphelper/qa/unit/test_traceevent.cxx | 93 + include/comphelper/traceevent.hxx | 18 +- 2 files changed, 76 insertions(+), 35 deletions(-) New commits: commit 347ef2de1be9fe4c34545c205826817f79342a5a Author: Tor Lillqvist AuthorDate: Wed Apr 28 12:19:35 2021 +0300 Commit: Tor Lillqvist CommitDate: Thu Apr 29 15:34:20 2021 +0200 Add AsyncEvent::finish() to end a nested AsyncEvent before its parent ends Add unit testing of that, too. Change-Id: Iae5fb6da0b7fcabe8f555d800f065b6f5b4b9982 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114786 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist diff --git a/comphelper/qa/unit/test_traceevent.cxx b/comphelper/qa/unit/test_traceevent.cxx index 11e1f0b3a2e8..226171b0e097 100644 --- a/comphelper/qa/unit/test_traceevent.cxx +++ b/comphelper/qa/unit/test_traceevent.cxx @@ -31,66 +31,87 @@ namespace { void trace_event_test() { -// When we start recording is off and this will not generate any 'X' event -comphelper::ProfileZone aZone0("test().0"); +// When we start recording is off and this will not generate any 'X' event when we leave the scope +comphelper::ProfileZone aZone0("test0"); // This will not generate any 'b' and 'e' events either -auto pAsync1(std::make_shared("async 1")); +auto pAsync1(std::make_shared("async1")); std::weak_ptr pAsync2; { // No 'X' by this either -comphelper::ProfileZone aZone1("block 1"); +comphelper::ProfileZone aZone1("block1"); // Now we turn on recording comphelper::TraceEvent::startRecording(); // As this is nested in the parent that was created with recording turned off, -// this will not generate any 'b' and 'e' events either -pAsync2 = comphelper::AsyncEvent::createWithParent("async 2", pAsync1); +// this will not generate any 'b' and 'e' events either even if recording is now on. +pAsync2 = comphelper::AsyncEvent::createWithParent("async2in1", pAsync1); } -// This will generate an 'i' event -comphelper::TraceEvent::addInstantEvent("instant 1"); +// This will generate an 'i' event for instant1 +comphelper::TraceEvent::addInstantEvent("instant1"); std::shared_ptr pAsync25; { -comphelper::ProfileZone aZone2("block 2"); +comphelper::ProfileZone aZone2("block2"); // This does not generate any 'e' event as it was created when recording was off -// And the nested "async 2" object will thus not generate anything either +// And the nested async2 object will thus not generate anything either pAsync1.reset(); // This will generate 'b' event and an 'e' event when the pointer is reset or goes out of scope -pAsync25 = std::make_shared("async 2.5"); +pAsync25 = std::make_shared("async2.5"); -// Leaving this scope will generate an 'X' event for "block 2" +// Leaving this scope will generate an 'X' event for block2 } // Verify that the weak_ptr to pAsync2 has expired as its parent pAsync1 has been finished off CPPUNIT_ASSERT(pAsync2.expired()); -// This will generate a 'b' event -auto pAsync3(std::make_shared("async 3")); +// This will generate a 'b' event for async3 +auto pAsync3(std::make_shared("async3")); std::weak_ptr pAsync4; + { -comphelper::ProfileZone aZone3("block 3"); +comphelper::ProfileZone aZone3("block3"); -pAsync4 = comphelper::AsyncEvent::createWithParent("async 4", pAsync3); +pAsync4 = comphelper::AsyncEvent::createWithParent("async4in3", pAsync3); -// Leaving this scope will generate an 'X' event for "block 3" +// Leaving this scope will generate an 'X' event for block3 } -// This will generate an 'e' event for "async 2.5" +// This will generate an 'e' event for async2.5 pAsync25.reset(); -comphelper::ProfileZone aZone4("test().2"); +comphelper::ProfileZone aZone4("test2"); + +// This will generate an 'i' event for instant2" +comphelper::TraceEvent::addInstantEvent("instant2"); + +std::weak_ptr pAsync5; +{ +auto pAsync4Locked = pAsync4.lock(); +CPPUNIT_ASSERT(pAsync4Locked); +// This will generate a 'b' event for async5in4 +pAsync5 = comphelper::AsyncEvent::createWithParent("async5in4", pAsync4Locked); +} + +CPPUNIT_ASSERT(!pAsync5.expired()); + +// This will generate a 'b' event for async6in5 +std::weak_ptr pAsync6( +comphelper::AsyncEvent::createWithParent("async6in5", pAsync5.lock())); +CPPUNIT_ASSERT(!pAsync6.expired()); + +// This will generate an 'e' event for async6in5 and async5in4 +pAsync5.lock()->finish(); -// This will generate an 'i' event -comphelper::TraceEvent::addInstantEvent("instant 2"); +CPPUNIT_ASSERT(pAsync6.expire
[Libreoffice-commits] help.git: source/text
source/text/sbasic/shared/03/avail_release.xhp |4 ++-- source/text/sbasic/shared/03/sf_string.xhp | 23 +++ 2 files changed, 25 insertions(+), 2 deletions(-) New commits: commit a4aacdb16a5c386147c6e7a2c1c1f47843b3a805 Author: Alain Romedenne AuthorDate: Tue Apr 27 14:03:04 2021 +0200 Commit: Alain Romedenne CommitDate: Thu Apr 29 15:30:15 2021 +0200 document SF_String isIBAN() 7.2 method Change-Id: Icdf0bdc74ea5deced0f31ee01061e46ff8b805f1 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/114713 Tested-by: Jenkins Reviewed-by: Rafael Lima Reviewed-by: Alain Romedenne diff --git a/source/text/sbasic/shared/03/avail_release.xhp b/source/text/sbasic/shared/03/avail_release.xhp index 29f4bd1f4..0a02b37aa 100644 --- a/source/text/sbasic/shared/03/avail_release.xhp +++ b/source/text/sbasic/shared/03/avail_release.xhp @@ -28,9 +28,9 @@ These methods are available from %PRODUCTNAME 7.2 onwards. - + This control is available from %PRODUCTNAME 7.2 onwards. diff --git a/source/text/sbasic/shared/03/sf_string.xhp b/source/text/sbasic/shared/03/sf_string.xhp index 80d228c31..a400c492d 100644 --- a/source/text/sbasic/shared/03/sf_string.xhp +++ b/source/text/sbasic/shared/03/sf_string.xhp @@ -283,6 +283,7 @@ IsFileName IsHexDigit + IsIBAN IsIPv4 IsLike IsLower @@ -711,6 +712,28 @@ + + IsIBAN -- + + String service;IsIBAN + + IsIBAN +Returns True if the string is a valid International Bank Account Number (IBAN). The comparison is not case-sensitive. + + + +SF_String.IsIBAN(InputStr As String) As Boolean + + + InputStr: The string to be checked. If empty, the method returns False. + + True if the string contains a valid IBAN number. + + +MsgBox SF_String.IsIBAN("BR15 1093 2840 814 P2") 'returns True + + + IsIPv4 -- ___ 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 9224109de3cf2b620ff1165d31e9fb2a4cd680cf Author: Alain Romedenne AuthorDate: Thu Apr 29 15:30:15 2021 +0200 Commit: Gerrit Code Review CommitDate: Thu Apr 29 15:30:15 2021 +0200 Update git submodules * Update helpcontent2 from branch 'master' to a4aacdb16a5c386147c6e7a2c1c1f47843b3a805 - document SF_String isIBAN() 7.2 method Change-Id: Icdf0bdc74ea5deced0f31ee01061e46ff8b805f1 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/114713 Tested-by: Jenkins Reviewed-by: Rafael Lima Reviewed-by: Alain Romedenne diff --git a/helpcontent2 b/helpcontent2 index 914fe5ffbb1a..a4aacdb16a5c 16 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit 914fe5ffbb1a3fde750cf37cbc44008994cf3b42 +Subproject commit a4aacdb16a5c386147c6e7a2c1c1f47843b3a805 ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/nisz/libreoffice-7-0' - sc/qa sc/source
sc/qa/uitest/autofilter/tdf36383.py | 68 sc/source/ui/view/viewfunc.cxx | 22 ++- 2 files changed, 88 insertions(+), 2 deletions(-) New commits: commit ce0fc9b59726f09e4ecbec540c3cf646d20f949e Author: Tünde Tóth AuthorDate: Fri Mar 5 10:20:03 2021 +0100 Commit: Gabor Kelemen CommitDate: Thu Apr 29 15:09:03 2021 +0200 tdf#36383 sc AutoFilter: fix changing row height Changing row height showed the rows hidden by AutoFilter, removing the result of the filtering. Change-Id: Ie2cba567c1fa4b479bd351693ae6dd3fd604ffc8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112006 Tested-by: László Németh Reviewed-by: László Németh (cherry picked from commit 3678e0efcb8bedc58dd329a430da0ac3b1572df8) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114863 Tested-by: Gabor Kelemen Reviewed-by: Gabor Kelemen diff --git a/sc/qa/uitest/autofilter/tdf36383.py b/sc/qa/uitest/autofilter/tdf36383.py new file mode 100644 index ..d55db21837b3 --- /dev/null +++ b/sc/qa/uitest/autofilter/tdf36383.py @@ -0,0 +1,68 @@ +# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*- +# +# 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/. +# +from uitest.framework import UITestCase +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.uno.propertyvalue import mkPropertyValues +from libreoffice.calc.document import get_row + +#Bug 36383 - EDITING auto row height or change row height removes AutoFilter result + +class tdf36383(UITestCase): +def test_tdf36383_row_height(self): +self.ui_test.create_doc_in_start_center("calc") +document = self.ui_test.get_component() +calcDoc = self.xUITest.getTopFocusWindow() +gridwin = calcDoc.getChild("grid_window") +document = self.ui_test.get_component() + +enter_text_to_cell(gridwin, "A1", "A") +enter_text_to_cell(gridwin, "A2", "1") +enter_text_to_cell(gridwin, "A3", "2") +enter_text_to_cell(gridwin, "A4", "3") + +gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:A4"})) + +self.xUITest.executeCommand(".uno:DataFilterAutoFilter") + +gridwin.executeAction("LAUNCH", mkPropertyValues({"AUTOFILTER": "", "COL": "0", "ROW": "0"})) +xFloatWindow = self.xUITest.getFloatWindow() +xCheckListMenu = xFloatWindow.getChild("check_list_menu") +xList = xCheckListMenu.getChild("check_list_box") +xEntry = xList.getChild("1") +xEntry.executeAction("CLICK", tuple()) + +xOkButton = xFloatWindow.getChild("ok") +xOkButton.executeAction("CLICK", tuple()) + +row = get_row(document, 2) +self.assertFalse(row.getPropertyValue("IsVisible")) + +#row height +self.ui_test.execute_dialog_through_command(".uno:RowHeight") +xDialog = self.xUITest.getTopFocusWindow() +xvalue = xDialog.getChild("value") +xvalue.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) +xvalue.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"})) +xvalue.executeAction("TYPE", mkPropertyValues({"TEXT":"1 cm"})) + +xOk = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xOk) + +self.assertFalse(row.getPropertyValue("IsVisible")) + +#optimal row height +self.ui_test.execute_dialog_through_command(".uno:SetOptimalRowHeight") +xDialog = self.xUITest.getTopFocusWindow() + +xOk = xDialog.getChild("ok") +self.ui_test.close_dialog_through_button(xOk) + +self.assertFalse(row.getPropertyValue("IsVisible")) + +self.ui_test.close_doc() + +# vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx index 6e4be285c073..ae60a5cb06e5 100644 --- a/sc/source/ui/view/viewfunc.cxx +++ b/sc/source/ui/view/viewfunc.cxx @@ -2158,7 +2158,17 @@ void ScViewFunc::SetWidthOrHeight( aCxt.setExtraHeight(nSizeTwips); rDoc.SetOptimalHeight(aCxt, nStartNo, nEndNo, nTab); if (bAll) -rDoc.ShowRows( nStartNo, nEndNo, nTab, true ); +{ +for (SCROW nRow = nStartNo; nRow <= nEndNo; ++nRow) +{ +SCROW nLastRow = nRow; +// tdf#36383 skip consecutive rows hidden by AutoFilter +if (rDoc.RowFiltered(nRow, nTab, nullptr, &nLastRow)) +nRow = nLastRow; +else +rDoc.ShowRow(nRow, nTab, true); +} +}
[Libreoffice-commits] core.git: sw/uiconfig
sw/uiconfig/sglobal/toolbar/textstylebar.xml | 26 - sw/uiconfig/swriter/toolbar/textstylebar.xml | 28 +-- 2 files changed, 27 insertions(+), 27 deletions(-) New commits: commit 8bde607cae2d9c0edb013aae975bde1ddba388a8 Author: Olivier Hallot AuthorDate: Wed Apr 28 20:43:31 2021 -0300 Commit: Olivier Hallot CommitDate: Thu Apr 29 15:08:09 2021 +0200 tdf#141954 Enable l10n in Formatting bar customization Change-Id: I3683b947ca9c431febb18fd01ea4a13660e4e07d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114825 Tested-by: Jenkins Tested-by: Gabor Kelemen Reviewed-by: Gabor Kelemen diff --git a/sw/uiconfig/sglobal/toolbar/textstylebar.xml b/sw/uiconfig/sglobal/toolbar/textstylebar.xml index e5dc9410bf7c..f0b48b061e72 100644 --- a/sw/uiconfig/sglobal/toolbar/textstylebar.xml +++ b/sw/uiconfig/sglobal/toolbar/textstylebar.xml @@ -31,21 +31,21 @@ - + - - - - - - - - - + + + + + + + + + - + @@ -54,7 +54,7 @@ - + @@ -71,7 +71,7 @@ - + diff --git a/sw/uiconfig/swriter/toolbar/textstylebar.xml b/sw/uiconfig/swriter/toolbar/textstylebar.xml index 83f3463211a7..746ceb4c73b2 100644 --- a/sw/uiconfig/swriter/toolbar/textstylebar.xml +++ b/sw/uiconfig/swriter/toolbar/textstylebar.xml @@ -24,28 +24,28 @@ - +T - + - - - - - - - - - + + + + + + + + + - + @@ -54,7 +54,7 @@ - + @@ -71,7 +71,7 @@ - + ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: chart2/source cui/source include/svx sd/source svx/source
chart2/source/controller/drawinglayer/DrawViewWrapper.cxx |2 +- cui/source/tabpages/transfrm.cxx |6 +++--- include/svx/sderitm.hxx |2 +- include/svx/strings.hrc |2 +- include/svx/svddef.hxx|2 +- include/svx/unoshprp.hxx |2 +- sd/source/ui/view/sdview3.cxx |2 +- svx/source/sdr/contact/viewcontactofsdrrectobj.cxx|2 +- svx/source/svdraw/svdattr.cxx |4 ++-- svx/source/svdraw/svdedtv1.cxx| 10 +- svx/source/svdraw/svdfmtf.cxx |4 ++-- svx/source/svdraw/svdotext.cxx|2 +- svx/source/unodraw/unoshape.cxx |2 +- 13 files changed, 21 insertions(+), 21 deletions(-) New commits: commit e4fdf7f5bf40ee289ac3441eb8b8963c10caf6a1 Author: Noel Grandin AuthorDate: Thu Apr 29 10:39:22 2021 +0200 Commit: Noel Grandin CommitDate: Thu Apr 29 14:57:06 2021 +0200 rename ECKEN -> CORNER Change-Id: I24438213431bd2866e2bcefc8a054a03bc975ef4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114841 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx index ced8421d211b..66769a1dee91 100644 --- a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx +++ b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx @@ -256,7 +256,7 @@ SfxItemSet DrawViewWrapper::getPositionAndSizeItemSetFromMarkedObject() const SfxItemSet aFullSet( GetModel()->GetItemPool(), svl::Items< -SDRATTR_ECKENRADIUS, SDRATTR_ECKENRADIUS, +SDRATTR_CORNER_RADIUS, SDRATTR_CORNER_RADIUS, SID_ATTR_TRANSFORM_POS_X, SID_ATTR_TRANSFORM_ANGLE, SID_ATTR_TRANSFORM_PROTECT_POS, SID_ATTR_TRANSFORM_AUTOHEIGHT, SID_ATTR_METRIC, SID_ATTR_METRIC>{}); diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx index a76f1413c39c..fe684f446e44 100644 --- a/cui/source/tabpages/transfrm.cxx +++ b/cui/source/tabpages/transfrm.cxx @@ -73,8 +73,8 @@ const sal_uInt16 SvxAngleTabPage::pAngleRanges[] = const sal_uInt16 SvxSlantTabPage::pSlantRanges[] = { -SDRATTR_ECKENRADIUS, -SDRATTR_ECKENRADIUS, +SDRATTR_CORNER_RADIUS, +SDRATTR_CORNER_RADIUS, SID_ATTR_TRANSFORM_SHEAR, SID_ATTR_TRANSFORM_SHEAR_VERTICAL, SID_ATTR_TRANSFORM_INTERN, @@ -578,7 +578,7 @@ void SvxSlantTabPage::Reset(const SfxItemSet* rAttrs) } else { -pItem = GetItem( *rAttrs, SDRATTR_ECKENRADIUS ); +pItem = GetItem( *rAttrs, SDRATTR_CORNER_RADIUS ); if( pItem ) { diff --git a/include/svx/sderitm.hxx b/include/svx/sderitm.hxx index 954e2286d6e5..2afd50ef80ad 100644 --- a/include/svx/sderitm.hxx +++ b/include/svx/sderitm.hxx @@ -24,7 +24,7 @@ inline SdrMetricItem makeSdrEckenradiusItem(tools::Long nRadius) { -return SdrMetricItem(SDRATTR_ECKENRADIUS, nRadius); +return SdrMetricItem(SDRATTR_CORNER_RADIUS, nRadius); } #endif diff --git a/include/svx/strings.hrc b/include/svx/strings.hrc index 466c276b0d7c..35fa94d665cb 100644 --- a/include/svx/strings.hrc +++ b/include/svx/strings.hrc @@ -380,7 +380,7 @@ #define SIP_SA_CAPTIONESCABS NC_("SIP_SA_CAPTIONESCABS", "Absolute exit of legend") #define SIP_SA_CAPTIONLINELEN NC_("SIP_SA_CAPTIONLINELEN", "Legend line length") #define SIP_SA_CAPTIONFITLINELEN NC_("SIP_SA_CAPTIONFITLINELEN", "AutoLength of legend lines") -#define SIP_SA_ECKENRADIUS NC_("SIP_SA_ECKENRADIUS", "Corner radius") +#define SIP_SA_CORNER_RADIUS NC_("SIP_SA_CORNER_RADIUS", "Corner radius") #define SIP_SA_TEXT_MINFRAMEHEIGHT NC_("SIP_SA_TEXT_MINFRAMEHEIGHT", "Minimal frame height") #define SIP_SA_TEXT_AUTOGROWHEIGHT NC_("SIP_SA_TEXT_AUTOGROWHEIGHT", "AutoFit height") #define SIP_SA_TEXT_FITTOSIZE NC_("SIP_SA_TEXT_FITTOSIZE", "Fit text to frame") diff --git a/include/svx/svddef.hxx b/include/svx/svddef.hxx index 30031e20dde2..6061293f9421 100644 --- a/include/svx/svddef.hxx +++ b/include/svx/svddef.hxx @@ -204,7 +204,7 @@ constexpr TypedWhichId SDRATTR_CAPTIONFITLINELEN (SDRA constexpr sal_uInt16 SDRATTR_CAPTION_LAST (SDRATTR_CAPTIONFITLINELEN); /* 1094 */ /* 1094 */ /* 1077 */ /* Pool V1: 1050 */ constexpr sal_uInt16 SDRATTR_MISC_FIRST (SDRATTR_CAPTION_LAST + 1); /* 1097 */ /* 1097 */ /* 1080 */ /* Pool V1:
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sc/source
sc/source/ui/inc/content.hxx|4 +++- sc/source/ui/inc/navipi.hxx |1 + sc/source/ui/navipi/content.cxx | 10 +- sc/source/ui/navipi/navipi.cxx | 17 ++--- 4 files changed, 27 insertions(+), 5 deletions(-) New commits: commit 5f5cf0d66d14ff246a4fce681459eb605d6c5f39 Author: Caolán McNamara AuthorDate: Mon Apr 26 10:44:55 2021 +0100 Commit: Caolán McNamara CommitDate: Thu Apr 29 14:57:08 2021 +0200 Related: tdf#130326 skip calling Refresh if its already just called Change-Id: I80d3ae7f10b56dfe53a4ab5101ae771b47848092 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114877 Reviewed-by: Noel Grandin Reviewed-by: Caolán McNamara Tested-by: Jenkins diff --git a/sc/source/ui/inc/content.hxx b/sc/source/ui/inc/content.hxx index f91636802901..985b4665dfc8 100644 --- a/sc/source/ui/inc/content.hxx +++ b/sc/source/ui/inc/content.hxx @@ -151,7 +151,9 @@ public: voidSetRootType( ScContentId nNew ); ScContentId GetRootType() const { return nRootType; } -voidActiveDocChanged(); +// return true if Refresh was called to allow detecting that the navigator +// tree is now up to date +boolActiveDocChanged(); voidResetManualDoc(); voidSetManualDoc(const OUString& rName); voidLoadFile(const OUString& rUrl); diff --git a/sc/source/ui/inc/navipi.hxx b/sc/source/ui/inc/navipi.hxx index 43d48dc74f59..61c4e6da4f4f 100644 --- a/sc/source/ui/inc/navipi.hxx +++ b/sc/source/ui/inc/navipi.hxx @@ -142,6 +142,7 @@ private: voidSetCurrentObject( const OUString& rName ); voidSetCurrentDoc( const OUString& rDocName ); voidUpdateSelection(); +voidContentUpdated(); // stop aContentIdle because content is up to date static ScTabViewShell* GetTabViewShell(); static ScNavigatorSettings* GetNavigatorSettings(); diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx index 692894ec8270..1fb9697c6fca 100644 --- a/sc/source/ui/navipi/content.cxx +++ b/sc/source/ui/navipi/content.cxx @@ -1409,10 +1409,15 @@ void ScContentTree::ResetManualDoc() ActiveDocChanged(); } -void ScContentTree::ActiveDocChanged() +bool ScContentTree::ActiveDocChanged() { +bool bRefreshed = false; + if ( !bHiddenDoc && aManualDoc.isEmpty() ) +{ Refresh(); // content only if automatic +bRefreshed = true; +} // if flag active Listbox must be updated @@ -1430,12 +1435,15 @@ void ScContentTree::ActiveDocChanged() aManualDoc.clear(); // again automatically Refresh(); +bRefreshed = true; pSh = GetManualOrCurrent(); // should be active now if (pSh) aCurrent = pSh->GetTitle(); } } pParentWindow->GetDocNames( &aCurrent );// select + +return bRefreshed; } void ScContentTree::SetManualDoc(const OUString& rName) diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx index f9f196d3717b..16e546b8d1c9 100644 --- a/sc/source/ui/navipi/navipi.cxx +++ b/sc/source/ui/navipi/navipi.cxx @@ -484,8 +484,14 @@ void ScNavigatorDlg::Notify( SfxBroadcaster&, const SfxHint& rHint ) if (pHint->GetEventId() == SfxEventHintId::ActivateDoc) { UpdateSheetLimits(); -m_xLbEntries->ActiveDocChanged(); -UpdateAll(); +bool bRefreshed = m_xLbEntries->ActiveDocChanged(); +// UpdateAll just possibly calls Refresh (and always +// ContentUpdated) so if ActiveDocChanged already called Refresh +// skip re-calling it +if (bRefreshed) +ContentUpdated(); +else +UpdateAll(); } } else @@ -750,7 +756,12 @@ void ScNavigatorDlg::UpdateAll() break; } -aContentIdle.Stop(); // not again +ContentUpdated(); // not again +} + +void ScNavigatorDlg::ContentUpdated() +{ +aContentIdle.Stop(); } void ScNavigatorDlg::SetListMode(NavListMode eMode) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sfx2/source
sfx2/source/control/charmapcontrol.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 31736f5f0abc09eb4066d09fd9e7394d844f9748 Author: Mike Kaganski AuthorDate: Wed Apr 28 11:25:18 2021 +0200 Commit: Xisco Fauli CommitDate: Thu Apr 29 14:39:57 2021 +0200 tdf#135997: fix toolbar control This is the same as fc7b4bfeba39a2479c9a2c9c8ef5ced5ab3c0de7, just for the toolbar control (the older one was for special character dialog). The problem was present since 800ac37021e3f8859a52c5eebca261a5d3bc5a11. Change-Id: Ib86aa7336a3078ff28b417de37fbd5bc492c85c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114719 Tested-by: Mike Kaganski Reviewed-by: Mike Kaganski (cherry picked from commit b27de500b1412bacefc7144b5222c307ca1ae0fe) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114853 Reviewed-by: Michael Stahl Tested-by: Jenkins diff --git a/sfx2/source/control/charmapcontrol.cxx b/sfx2/source/control/charmapcontrol.cxx index 69e1a197d4ee..50a716a25ad6 100644 --- a/sfx2/source/control/charmapcontrol.cxx +++ b/sfx2/source/control/charmapcontrol.cxx @@ -128,7 +128,7 @@ void SfxCharmapCtrl::updateFavCharControl() { int i = 0; for ( std::deque< OUString >::iterator it = m_aFavCharList.begin(), it2 = m_aFavCharFontList.begin(); -it != m_aFavCharList.end() || it2 != m_aFavCharFontList.end(); +it != m_aFavCharList.end() && it2 != m_aFavCharFontList.end(); ++it, ++it2, i++) { m_aFavCharView[i].SetText(*it); @@ -160,7 +160,7 @@ void SfxCharmapCtrl::updateRecentCharControl() { int i = 0; for ( std::deque< OUString >::iterator it = m_aRecentCharList.begin(), it2 = m_aRecentCharFontList.begin(); -it != m_aRecentCharList.end() || it2 != m_aRecentCharFontList.end(); +it != m_aRecentCharList.end() && it2 != m_aRecentCharFontList.end(); ++it, ++it2, i++) { m_aRecentCharView[i].SetText(*it); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sc/source sw/source
sc/source/ui/inc/content.hxx |2 - sc/source/ui/navipi/content.cxx| 55 + sc/source/ui/navipi/navipi.cxx |5 --- sw/source/uibase/utlui/content.cxx |4 +- 4 files changed, 4 insertions(+), 62 deletions(-) New commits: commit f275e019199baa931f1e4681e1bf29d68aae7a32 Author: Caolán McNamara AuthorDate: Mon Apr 26 09:36:14 2021 +0100 Commit: Caolán McNamara CommitDate: Thu Apr 29 14:32:09 2021 +0200 Related: tdf#130326 drop ScContentTree::ObjectFresh this was introduced as part of the large IA2 integration commit b41332475783c31136673fb44cf4c411bb0148f8 Author: Steve Yin Date: Mon Dec 2 15:54:29 2013 + Integrate branch of IAccessible2 Both calc and writer gained the feature that "space" in the navigator for drawing objects selects the highlighted object, extending the selection of another one is already selected. (notably impress was left unchanged) In calc, but not writer, an ObjectFresh was added which fires on every SfxHintId::ScKillEditView which is broadcast on every exit of the cursor from a cell. Its purpose seems to be primarily to re-highlight the last selected-by-keyboard entry on a content refresh. As far as I can tell this doesn't seem necessary and we already refresh content on SfxHintId::ScDrawChanged events so we shouldn't need to additionally refresh on ScKillEditView and refreshing on every ScKillEditView is very slow on navigating through a calc document with a lot of drawing objects. Change-Id: I64b2840f8510d474314d108e657fc3367f8ab6c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114876 Reviewed-by: Noel Grandin Reviewed-by: Caolán McNamara Tested-by: Jenkins diff --git a/sc/source/ui/inc/content.hxx b/sc/source/ui/inc/content.hxx index 1c0d2c27c4d5..f91636802901 100644 --- a/sc/source/ui/inc/content.hxx +++ b/sc/source/ui/inc/content.hxx @@ -55,7 +55,6 @@ class ScContentTree ScDocument* pHiddenDocument;// temporary boolbisInNavigatoeDlg; boolm_bFreeze; -OUStringsKeyString; ImplSVEvent*m_nAsyncMouseReleaseId; o3tl::enumarray pPosList; // for the sequence @@ -124,7 +123,6 @@ public: ScContentTree(std::unique_ptr xTreeView, ScNavigatorDlg* pNavigatorDlg); ~ScContentTree(); -void ObjectFresh(ScContentId nType, const weld::TreeIter* pEntry = nullptr); void SetNavigatorDlgFlag(bool isInNavigateDlg){ bisInNavigatoeDlg=isInNavigateDlg;}; voidset_selection_mode(SelectionMode eMode) diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx index 9ec35128176b..692894ec8270 100644 --- a/sc/source/ui/navipi/content.cxx +++ b/sc/source/ui/navipi/content.cxx @@ -451,7 +451,8 @@ IMPL_LINK(ScContentTree, KeyInputHdl, const KeyEvent&, rKEvt, bool) break; } } -//Make KEY_SPACE has same function as DoubleClick +//Make KEY_SPACE has same function as DoubleClick, and realize +//multi-selection. if ( bisInNavigatoeDlg ) { if(aCode.GetCode() == KEY_SPACE ) @@ -469,7 +470,6 @@ IMPL_LINK(ScContentTree, KeyInputHdl, const KeyEvent&, rKEvt, bool) if ( bHiddenDoc ) return true;//! later... OUString aText(m_xTreeView->get_text(*xEntry)); -sKeyString = aText; if (!aManualDoc.isEmpty()) pParentWindow->SetCurrentDoc( aManualDoc ); switch (nType) @@ -503,7 +503,6 @@ IMPL_LINK(ScContentTree, KeyInputHdl, const KeyEvent&, rKEvt, bool) } if (!bHasMakredObject && pScTabViewShell) pScTabViewShell->SetDrawShell(false); -ObjectFresh(nType, xEntry.get()); } break; } @@ -663,56 +662,6 @@ ScDocument* ScContentTree::GetSourceDocument() return nullptr; } -//Move along and draw "*" sign . -void ScContentTree::ObjectFresh(ScContentId nType, const weld::TreeIter* pEntry) -{ -if (bHiddenDoc && !pHiddenDocument) -return; // other document displayed - -if (!(nType == ScContentId::GRAPHIC || nType == ScContentId::OLEOBJECT || nType == ScContentId::DRAWING)) -return; - -auto nOldChildren = m_aRootNodes[nType] ? m_xTreeView->iter_n_children(*m_aRootNodes[nType]) : 0; -auto nOldPos = m_xTreeView->vadjustment_get_value(); - -freeze(); -ClearType( nType ); -GetDrawNames( nType/*, nId*/ ); -thaw(); - -auto nNewChildren = m_aRootNodes[nType] ? m_xTreeView->iter_n_children(*m_aRootNodes[nType]) : 0; -bool bRestorePos = nOldChildren == nNewChildren; - -if (!pEntry) -ApplyNaviga
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - desktop/source
desktop/source/lib/init.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 4419c19197280973d9bc6934e85bc08828871448 Author: Tor Lillqvist AuthorDate: Thu Apr 29 12:06:24 2021 +0300 Commit: Tor Lillqvist CommitDate: Thu Apr 29 14:17:32 2021 +0200 Let's call it "traceeventrecording" and not "profilezonerecording" It is not just ProfileZone events any longer that are recorded. Change-Id: I9c2b5817fca8f8a23ebd571cbaccb9ac063ec73b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114849 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tor Lillqvist diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index c0839e63f778..fcc260ee66a0 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -3847,7 +3847,7 @@ static void lo_setOption(LibreOfficeKit* /*pThis*/, const char *pOption, const c { static char* pCurrentSalLogOverride = nullptr; -if (strcmp(pOption, "profilezonerecording") == 0) +if (strcmp(pOption, "traceeventrecording") == 0) { if (strcmp(pValue, "start") == 0) comphelper::TraceEvent::startRecording(); ___ 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-6.4' - comphelper/qa include/comphelper
comphelper/qa/unit/test_traceevent.cxx | 12 ++-- include/comphelper/traceevent.hxx |4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) New commits: commit 414b40408acf7688d9ce9f9ee8c5ab4b2226a2ae Author: Tor Lillqvist AuthorDate: Wed Apr 28 12:01:06 2021 +0300 Commit: Tor Lillqvist CommitDate: Thu Apr 29 14:16:41 2021 +0200 Fix syntax error in generated JSON Change-Id: I035a86aa587302985416e65dc6063090f99b49b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114785 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tor Lillqvist diff --git a/comphelper/qa/unit/test_traceevent.cxx b/comphelper/qa/unit/test_traceevent.cxx index e7e97b2032a5..11e1f0b3a2e8 100644 --- a/comphelper/qa/unit/test_traceevent.cxx +++ b/comphelper/qa/unit/test_traceevent.cxx @@ -104,16 +104,16 @@ void TestTraceEvent::test() } CPPUNIT_ASSERT(aEvents[0].startsWith("{\"name:\"instant 1\",\"ph\":\"i\",")); -CPPUNIT_ASSERT(aEvents[1].startsWith("{\"name\":\"async 2.5\",\"ph\":\"b\",\"id\":1\",")); +CPPUNIT_ASSERT(aEvents[1].startsWith("{\"name\":\"async 2.5\",\"ph\":\"b\",\"id\":1,")); CPPUNIT_ASSERT(aEvents[2].startsWith("{\"name\":\"block 2\",\"ph\":\"X\",")); -CPPUNIT_ASSERT(aEvents[3].startsWith("{\"name\":\"async 3\",\"ph\":\"b\",\"id\":2\",")); -CPPUNIT_ASSERT(aEvents[4].startsWith("{\"name\":\"async 4\",\"ph\":\"b\",\"id\":2\",")); +CPPUNIT_ASSERT(aEvents[3].startsWith("{\"name\":\"async 3\",\"ph\":\"b\",\"id\":2,")); +CPPUNIT_ASSERT(aEvents[4].startsWith("{\"name\":\"async 4\",\"ph\":\"b\",\"id\":2,")); CPPUNIT_ASSERT(aEvents[5].startsWith("{\"name\":\"block 3\",\"ph\":\"X\",")); -CPPUNIT_ASSERT(aEvents[6].startsWith("{\"name\":\"async 2.5\",\"ph\":\"e\",\"id\":1\",")); +CPPUNIT_ASSERT(aEvents[6].startsWith("{\"name\":\"async 2.5\",\"ph\":\"e\",\"id\":1,")); CPPUNIT_ASSERT(aEvents[7].startsWith("{\"name:\"instant 2\",\"ph\":\"i\",")); CPPUNIT_ASSERT(aEvents[8].startsWith("{\"name\":\"test().2\",\"ph\":\"X\"")); -CPPUNIT_ASSERT(aEvents[9].startsWith("{\"name\":\"async 4\",\"ph\":\"e\",\"id\":2\",")); -CPPUNIT_ASSERT(aEvents[10].startsWith("{\"name\":\"async 3\",\"ph\":\"e\",\"id\":2\",")); +CPPUNIT_ASSERT(aEvents[9].startsWith("{\"name\":\"async 4\",\"ph\":\"e\",\"id\":2,")); +CPPUNIT_ASSERT(aEvents[10].startsWith("{\"name\":\"async 3\",\"ph\":\"e\",\"id\":2,")); } CPPUNIT_TEST_SUITE_REGISTRATION(TestTraceEvent); diff --git a/include/comphelper/traceevent.hxx b/include/comphelper/traceevent.hxx index 3d3c748ec278..33eaf04c7047 100644 --- a/include/comphelper/traceevent.hxx +++ b/include/comphelper/traceevent.hxx @@ -104,7 +104,7 @@ class COMPHELPER_DLLPUBLIC AsyncEvent : public NamedEvent, "," "\"id\":" + OUString::number(m_nId) - + "\"," + + "," "\"ts\":" + OUString::number(nNow) + "," @@ -139,7 +139,7 @@ public: "," "\"id\":" + OUString::number(m_nId) - + "\"," + + "," "\"ts\":" + OUString::number(nNow) + "," ___ 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-6.4' - comphelper/CppunitTest_comphelper_test.mk comphelper/qa comphelper/source include/comphelper
comphelper/CppunitTest_comphelper_test.mk |1 comphelper/qa/unit/test_traceevent.cxx| 121 ++ comphelper/source/misc/traceevent.cxx | 31 +++ include/comphelper/profilezone.hxx|5 - include/comphelper/traceevent.hxx | 115 5 files changed, 251 insertions(+), 22 deletions(-) New commits: commit 0ca29b80530887d41e9c98e4bcf410efe4042d3e Author: Tor Lillqvist AuthorDate: Tue Apr 27 18:43:16 2021 +0300 Commit: Tor Lillqvist CommitDate: Thu Apr 29 14:16:12 2021 +0200 Introduce Async trace events and a unit test Async events are ones that emit separate 'b' (begin) and 'e' (end) traces. (Compare to the Complete event that emit a single 'X' trace that contains both the start timstamp and the duration.) There are two kinds of Async events: Freestanding ones that are not related to other events at all, and nested ones that have to be nested between the 'b' and 'e' events of a parent Async event. Still needs some work, at least a way to end a nested AsyncEvent (cause it to emit the 'e' event) before it gets destructed thanks to the parent being destructed. Change-Id: I3721fa701ad32639b1edc1cfa8db7acde5caf9b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114784 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tor Lillqvist diff --git a/comphelper/CppunitTest_comphelper_test.mk b/comphelper/CppunitTest_comphelper_test.mk index 8bb335aa24dc..39a08fbd17cb 100644 --- a/comphelper/CppunitTest_comphelper_test.mk +++ b/comphelper/CppunitTest_comphelper_test.mk @@ -16,6 +16,7 @@ $(eval $(call gb_CppunitTest_add_exception_objects,comphelper_test, \ comphelper/qa/unit/base64_test \ comphelper/qa/unit/types_test \ comphelper/qa/unit/test_guards \ +comphelper/qa/unit/test_traceevent \ )) $(eval $(call gb_CppunitTest_use_sdk_api,comphelper_test)) diff --git a/comphelper/qa/unit/test_traceevent.cxx b/comphelper/qa/unit/test_traceevent.cxx new file mode 100644 index ..e7e97b2032a5 --- /dev/null +++ b/comphelper/qa/unit/test_traceevent.cxx @@ -0,0 +1,121 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * 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/. + */ + +#include + +#include +#include + +#include + +#include +#include + +class TestTraceEvent : public CppUnit::TestFixture +{ +public: +void test(); + +CPPUNIT_TEST_SUITE(TestTraceEvent); +CPPUNIT_TEST(test); +CPPUNIT_TEST_SUITE_END(); +}; + +namespace +{ +void trace_event_test() +{ +// When we start recording is off and this will not generate any 'X' event +comphelper::ProfileZone aZone0("test().0"); + +// This will not generate any 'b' and 'e' events either +auto pAsync1(std::make_shared("async 1")); + +std::weak_ptr pAsync2; +{ +// No 'X' by this either +comphelper::ProfileZone aZone1("block 1"); + +// Now we turn on recording +comphelper::TraceEvent::startRecording(); + +// As this is nested in the parent that was created with recording turned off, +// this will not generate any 'b' and 'e' events either +pAsync2 = comphelper::AsyncEvent::createWithParent("async 2", pAsync1); +} + +// This will generate an 'i' event +comphelper::TraceEvent::addInstantEvent("instant 1"); + +std::shared_ptr pAsync25; +{ +comphelper::ProfileZone aZone2("block 2"); + +// This does not generate any 'e' event as it was created when recording was off +// And the nested "async 2" object will thus not generate anything either +pAsync1.reset(); + +// This will generate 'b' event and an 'e' event when the pointer is reset or goes out of scope +pAsync25 = std::make_shared("async 2.5"); + +// Leaving this scope will generate an 'X' event for "block 2" +} + +// Verify that the weak_ptr to pAsync2 has expired as its parent pAsync1 has been finished off +CPPUNIT_ASSERT(pAsync2.expired()); + +// This will generate a 'b' event +auto pAsync3(std::make_shared("async 3")); + +std::weak_ptr pAsync4; +{ +comphelper::ProfileZone aZone3("block 3"); + +pAsync4 = comphelper::AsyncEvent::createWithParent("async 4", pAsync3); + +// Leaving this scope will generate an 'X' event for "block 3" +} + +// This will generate an 'e' event for "async 2.5" +pAsync25.reset(); + +comphelper::ProfileZone aZone4("test().2"); + +// This will generate an 'i' event +comphelper::TraceEvent::addInstantEvent("instant 2"); + +// Leaving this scope will generate 'X' events for "test().2" and a 'e' event for pAsync4
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - comphelper/source include/comphelper
comphelper/source/misc/traceevent.cxx |6 +++--- include/comphelper/profilezone.hxx|7 +++ include/comphelper/traceevent.hxx | 15 ++- 3 files changed, 20 insertions(+), 8 deletions(-) New commits: commit 04f41048afd7af36428ef6dd849ea3d7c61e2ec9 Author: Tor Lillqvist AuthorDate: Tue Apr 27 16:42:15 2021 +0300 Commit: Tor Lillqvist CommitDate: Thu Apr 29 14:15:46 2021 +0200 Introduce a new class NamedEvent to be used by the upcoming AsyncEvent, too Don't use the term "profile id" as what we mean is the event *name* (as used in the Chrome Trace Event format). Change-Id: Id58a10f4c5f8a095ae75b9bf74131b70659ee701 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114783 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist diff --git a/comphelper/source/misc/traceevent.cxx b/comphelper/source/misc/traceevent.cxx index d95cb1fd9067..bd8a336d37ea 100644 --- a/comphelper/source/misc/traceevent.cxx +++ b/comphelper/source/misc/traceevent.cxx @@ -42,7 +42,7 @@ void TraceEvent::addRecording(const OUString& sObject) g_aRecording.emplace_back(sObject); } -void TraceEvent::addInstantEvent(const char* sProfileId) +void TraceEvent::addInstantEvent(const char* sName) { TimeValue aSystemTime; osl_getSystemTime(&aSystemTime); @@ -57,7 +57,7 @@ void TraceEvent::addInstantEvent(const char* sProfileId) addRecording("{" "\"name:\"" - + OUString(sProfileId, strlen(sProfileId), RTL_TEXTENCODING_UTF8) + + OUString(sName, strlen(sName), RTL_TEXTENCODING_UTF8) + "\"," "\"ph\":\"i\"," "\"ts\":" @@ -106,7 +106,7 @@ void ProfileZone::addRecording() // Generate a single "Complete Event" (type X) TraceEvent::addRecording("{" "\"name\":\"" - + OUString(m_sProfileId, strlen(m_sProfileId), RTL_TEXTENCODING_UTF8) + + OUString(m_sName, strlen(m_sName), RTL_TEXTENCODING_UTF8) + "\"," "\"ph\":\"X\"," "\"ts\":" diff --git a/include/comphelper/profilezone.hxx b/include/comphelper/profilezone.hxx index de38a0dad985..2e0777295aa6 100644 --- a/include/comphelper/profilezone.hxx +++ b/include/comphelper/profilezone.hxx @@ -19,11 +19,10 @@ namespace comphelper { -class COMPHELPER_DLLPUBLIC ProfileZone : public TraceEvent +class COMPHELPER_DLLPUBLIC ProfileZone : public NamedEvent { static int s_nNesting; // level of nested zones. -const char *m_sProfileId; long long m_nCreateTime; int m_nPid; int m_nNesting; @@ -35,8 +34,8 @@ class COMPHELPER_DLLPUBLIC ProfileZone : public TraceEvent // Note that the char pointer is stored as such in the ProfileZone object and used in the // destructor, so be sure to pass a pointer that stays valid for the duration of the object's // lifetime. -ProfileZone(const char *sProfileId) -: m_sProfileId(sProfileId ? sProfileId : "(null)") +ProfileZone(const char* sName) +: NamedEvent(sName) { if (s_bRecording) { diff --git a/include/comphelper/traceevent.hxx b/include/comphelper/traceevent.hxx index ff66a834e639..7e988bd063f0 100644 --- a/include/comphelper/traceevent.hxx +++ b/include/comphelper/traceevent.hxx @@ -13,6 +13,8 @@ #include #include +#include +#include #include #include @@ -32,7 +34,7 @@ protected: static void addRecording(const OUString& sObject); public: -static void addInstantEvent(const char* sProfileId); +static void addInstantEvent(const char* sName); static void startRecording(); static void stopRecording(); @@ -40,6 +42,17 @@ public: static css::uno::Sequence getRecordingAndClear(); }; +class COMPHELPER_DLLPUBLIC NamedEvent : public TraceEvent +{ +protected: +const char* m_sName; + +NamedEvent(const char* sName) +: m_sName(sName ? sName : "(null)") +{ +} +}; + } // namespace comphelper #endif // INCLUDED_COMPHELPER_TRACEEVENT_HXX ___ 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-6.4' - comphelper/source
comphelper/source/misc/traceevent.cxx |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit 576082417393d8be35aea998a13fd3f79551db1c Author: Tor Lillqvist AuthorDate: Tue Apr 27 14:02:43 2021 +0300 Commit: Tor Lillqvist CommitDate: Thu Apr 29 14:13:27 2021 +0200 Enable turning on trace event recording in a dbgutil build with an env var Change-Id: Ie0efdd2d5da0a45ba5e82be455d36dc777b5efb9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114782 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist diff --git a/comphelper/source/misc/traceevent.cxx b/comphelper/source/misc/traceevent.cxx index 30bc3d51e2d8..d95cb1fd9067 100644 --- a/comphelper/source/misc/traceevent.cxx +++ b/comphelper/source/misc/traceevent.cxx @@ -22,8 +22,11 @@ namespace comphelper { +#ifdef DBG_UTIL +std::atomic TraceEvent::s_bRecording = (getenv("TRACE_EVENT_RECORDING") != nullptr); +#else std::atomic TraceEvent::s_bRecording = false; - +#endif int ProfileZone::s_nNesting = 0; namespace ___ 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-6.4' - comphelper/source include/comphelper
comphelper/source/misc/traceevent.cxx |3 +-- include/comphelper/profilezone.hxx| 12 +--- include/comphelper/traceevent.hxx |1 - 3 files changed, 10 insertions(+), 6 deletions(-) New commits: commit 7afd3d08093371e797506c6b75223d0c2bead352 Author: Tor Lillqvist AuthorDate: Tue Apr 27 13:32:19 2021 +0300 Commit: Tor Lillqvist CommitDate: Thu Apr 29 14:12:53 2021 +0200 Re-think what the nesting means in ProfileZones The "Complete" type of Trace Events should be properly nested. Use the nesting counter to verify that. Add a nesting level indication to the ProfileZone object. Assert that it is used properly. Change-Id: I3a1f0e55ea6054dab9baf8550097446f07b0fbf3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114781 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist diff --git a/comphelper/source/misc/traceevent.cxx b/comphelper/source/misc/traceevent.cxx index 59191884374c..30bc3d51e2d8 100644 --- a/comphelper/source/misc/traceevent.cxx +++ b/comphelper/source/misc/traceevent.cxx @@ -24,7 +24,7 @@ namespace comphelper { std::atomic TraceEvent::s_bRecording = false; -int TraceEvent::s_nNesting = 0; // level of overlapped zones +int ProfileZone::s_nNesting = 0; namespace { @@ -70,7 +70,6 @@ void TraceEvent::addInstantEvent(const char* sProfileId) void TraceEvent::startRecording() { ::osl::MutexGuard aGuard(g_aMutex); -s_nNesting = 0; s_bRecording = true; } diff --git a/include/comphelper/profilezone.hxx b/include/comphelper/profilezone.hxx index cb5e32547d7c..de38a0dad985 100644 --- a/include/comphelper/profilezone.hxx +++ b/include/comphelper/profilezone.hxx @@ -21,9 +21,12 @@ namespace comphelper class COMPHELPER_DLLPUBLIC ProfileZone : public TraceEvent { +static int s_nNesting; // level of nested zones. + const char *m_sProfileId; long long m_nCreateTime; int m_nPid; +int m_nNesting; void addRecording(); @@ -46,7 +49,7 @@ class COMPHELPER_DLLPUBLIC ProfileZone : public TraceEvent if (osl_getProcessInfo(nullptr, osl_Process_IDENTIFIER, &aProcessInfo) == osl_Process_E_None) m_nPid = aProcessInfo.Ident; -s_nNesting++; +m_nNesting = s_nNesting++; } else m_nCreateTime = 0; @@ -54,10 +57,13 @@ class COMPHELPER_DLLPUBLIC ProfileZone : public TraceEvent ~ProfileZone() { -if (s_bRecording) +if (m_nCreateTime > 0) { s_nNesting--; -addRecording(); +assert(m_nNesting == s_nNesting); + +if (s_bRecording) +addRecording(); } } diff --git a/include/comphelper/traceevent.hxx b/include/comphelper/traceevent.hxx index 14e25da9b791..ff66a834e639 100644 --- a/include/comphelper/traceevent.hxx +++ b/include/comphelper/traceevent.hxx @@ -28,7 +28,6 @@ class COMPHELPER_DLLPUBLIC TraceEvent { protected: static std::atomic s_bRecording; // true during recording -static int s_nNesting; static void addRecording(const OUString& sObject); ___ 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-6.4' - comphelper/source desktop/source include/comphelper toolkit/source
comphelper/source/misc/traceevent.cxx | 35 +- desktop/source/lib/init.cxx |8 +++ include/comphelper/profilezone.hxx|5 include/comphelper/traceevent.hxx |5 toolkit/source/awt/vclxtoolkit.cxx|4 +-- 5 files changed, 29 insertions(+), 28 deletions(-) New commits: commit d3805da9617c07c368088ba50329b19da1895193 Author: Tor Lillqvist AuthorDate: Tue Apr 27 10:48:09 2021 +0300 Commit: Tor Lillqvist CommitDate: Thu Apr 29 14:12:15 2021 +0200 Move some static functions from ProfileZone to TraceEvent where they belong Change-Id: I35f3d5d8c0a69a224cf7d3a2decba9c8e13c7dc1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114780 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist diff --git a/comphelper/source/misc/traceevent.cxx b/comphelper/source/misc/traceevent.cxx index b1313271f89b..59191884374c 100644 --- a/comphelper/source/misc/traceevent.cxx +++ b/comphelper/source/misc/traceevent.cxx @@ -67,14 +67,30 @@ void TraceEvent::addInstantEvent(const char* sProfileId) + OUString::number(osl_getThreadIdentifier(nullptr)) + "},"); } -void ProfileZone::startRecording() +void TraceEvent::startRecording() { ::osl::MutexGuard aGuard(g_aMutex); s_nNesting = 0; s_bRecording = true; } -void ProfileZone::stopRecording() { s_bRecording = false; } +void TraceEvent::stopRecording() { s_bRecording = false; } + +css::uno::Sequence TraceEvent::getRecordingAndClear() +{ +bool bRecording; +std::vector aRecording; +{ +::osl::MutexGuard aGuard(g_aMutex); +bRecording = s_bRecording; +stopRecording(); +aRecording.swap(g_aRecording); +} +// reset start time and nesting level +if (bRecording) +startRecording(); +return ::comphelper::containerToSequence(aRecording); +} void ProfileZone::addRecording() { @@ -104,21 +120,6 @@ void ProfileZone::addRecording() + OUString::number(osl_getThreadIdentifier(nullptr)) + "},"); } -css::uno::Sequence ProfileZone::getRecordingAndClear() -{ -bool bRecording; -std::vector aRecording; -{ -::osl::MutexGuard aGuard(g_aMutex); -bRecording = s_bRecording; -stopRecording(); -aRecording.swap(g_aRecording); -} -// reset start time and nesting level -if (bRecording) -startRecording(); -return ::comphelper::containerToSequence(aRecording); -} } // namespace comphelper diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index b646356a9365..f46530ebc803 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -3868,9 +3868,9 @@ static void lo_setOption(LibreOfficeKit* /*pThis*/, const char *pOption, const c if (strcmp(pOption, "profilezonerecording") == 0) { if (strcmp(pValue, "start") == 0) -comphelper::ProfileZone::startRecording(); +comphelper::TraceEvent::startRecording(); else if (strcmp(pValue, "stop") == 0) -comphelper::ProfileZone::stopRecording(); +comphelper::TraceEvent::stopRecording(); } else if (strcmp(pOption, "sallogoverride") == 0) { @@ -6129,7 +6129,7 @@ public: virtual void Invoke() override { const css::uno::Sequence aEvents = -comphelper::ProfileZone::getRecordingAndClear(); +comphelper::TraceEvent::getRecordingAndClear(); OStringBuffer aOutput; for (const auto &s : aEvents) { @@ -6209,7 +6209,7 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char // Turn profile zones on early if (bProfileZones && eStage == SECOND_INIT) { -comphelper::ProfileZone::startRecording(); +comphelper::TraceEvent::startRecording(); new ProfileZoneDumper(); } diff --git a/include/comphelper/profilezone.hxx b/include/comphelper/profilezone.hxx index 22fe107a3bf1..cb5e32547d7c 100644 --- a/include/comphelper/profilezone.hxx +++ b/include/comphelper/profilezone.hxx @@ -63,11 +63,6 @@ class COMPHELPER_DLLPUBLIC ProfileZone : public TraceEvent ProfileZone(const ProfileZone&) = delete; void operator=(const ProfileZone&) = delete; - -static void startRecording(); -static void stopRecording(); - -static css::uno::Sequence getRecordingAndClear(); }; } // namespace comphelper diff --git a/include/comphelper/traceevent.hxx b/include/comphelper/traceevent.hxx index 5c922b281487..14e25da9b791 100644 --- a/include/comphelper/traceevent.hxx +++ b/include/comphelper/traceevent.hxx @@ -34,6 +34,11 @@ protected: public: static void addInstantEvent(const char* sProfileId); + +static void startRecording(); +static void stopRecording(); + +static css::uno::Sequence getRecordingAndClear(); }; } // namespace comphelper diff --git a/toolkit/source/awt/vclxtoolkit.cxx b
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - include/comphelper
include/comphelper/profilezone.hxx |4 1 file changed, 4 insertions(+) New commits: commit 9302478952df0bc5456c9e36b5659626d1da31b3 Author: Tor Lillqvist AuthorDate: Tue Apr 27 09:49:21 2021 +0300 Commit: Tor Lillqvist CommitDate: Thu Apr 29 14:11:41 2021 +0200 Make ProfileZone non-copyable Change-Id: Ia1fe5311751bcb2b2f2bde3408aac836db75e98a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114779 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist diff --git a/include/comphelper/profilezone.hxx b/include/comphelper/profilezone.hxx index bddf313f62d2..22fe107a3bf1 100644 --- a/include/comphelper/profilezone.hxx +++ b/include/comphelper/profilezone.hxx @@ -51,6 +51,7 @@ class COMPHELPER_DLLPUBLIC ProfileZone : public TraceEvent else m_nCreateTime = 0; } + ~ProfileZone() { if (s_bRecording) @@ -60,6 +61,9 @@ class COMPHELPER_DLLPUBLIC ProfileZone : public TraceEvent } } +ProfileZone(const ProfileZone&) = delete; +void operator=(const ProfileZone&) = delete; + static void startRecording(); static void stopRecording(); ___ 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-6.4' - comphelper/Library_comphelper.mk comphelper/source include/comphelper
comphelper/Library_comphelper.mk |2 comphelper/source/misc/profilezone.cxx | 84 -- comphelper/source/misc/traceevent.cxx | 125 + include/comphelper/profilezone.hxx | 13 --- include/comphelper/traceevent.hxx | 43 +++ 5 files changed, 171 insertions(+), 96 deletions(-) New commits: commit ef865bba15aa351dd32b909eedac55d1e2a1771b Author: Tor Lillqvist AuthorDate: Tue Apr 27 09:20:32 2021 +0300 Commit: Tor Lillqvist CommitDate: Thu Apr 29 14:10:53 2021 +0200 Extend the trace event API with instant events As a preparetion for further work, refactor ProfileZone into a base class TraceEvent and a derived class ProfileZone. Change-Id: I3a93c79f46ffc5768ddaf338789fe2daa225ef4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114776 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist diff --git a/comphelper/Library_comphelper.mk b/comphelper/Library_comphelper.mk index 7388c88f3be4..943aac679af4 100644 --- a/comphelper/Library_comphelper.mk +++ b/comphelper/Library_comphelper.mk @@ -123,7 +123,7 @@ $(eval $(call gb_Library_add_exception_objects,comphelper,\ comphelper/source/misc/numberedcollection \ comphelper/source/misc/numbers \ comphelper/source/misc/officerestartmanager \ -comphelper/source/misc/profilezone \ +comphelper/source/misc/traceevent \ comphelper/source/misc/proxyaggregation \ comphelper/source/misc/random \ comphelper/source/misc/SelectionMultiplex \ diff --git a/comphelper/source/misc/profilezone.cxx b/comphelper/source/misc/profilezone.cxx deleted file mode 100644 index 7b59aa7cc8f7.. --- a/comphelper/source/misc/profilezone.cxx +++ /dev/null @@ -1,84 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * 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/. - */ - -#include - -#include - -#include -#include -#include -#include - -namespace comphelper -{ - -std::atomic ProfileZone::s_bRecording = false; - -int ProfileZone::s_nNesting = 0; // level of overlapped zones - -namespace -{ -std::vector g_aRecording; // recorded data -::osl::Mutex g_aMutex; -} - -void ProfileZone::startRecording() -{ -::osl::MutexGuard aGuard(g_aMutex); -s_nNesting = 0; -s_bRecording = true; -} - -void ProfileZone::stopRecording() -{ -s_bRecording = false; -} - -void ProfileZone::addRecording() -{ -assert(s_bRecording); - -TimeValue aSystemTime; -osl_getSystemTime(&aSystemTime); -long long nNow = static_cast(aSystemTime.Seconds) * 100 + aSystemTime.Nanosec/1000; - - // Generate a single "Complete Event" (type X) -OUString sRecordingData("{" -"\"name\":\"" + OUString(m_sProfileId, strlen(m_sProfileId), RTL_TEXTENCODING_UTF8) + "\"," -"\"ph\":\"X\"," -"\"ts\":" + OUString::number(m_nCreateTime) + "," -"\"dur\":" + OUString::number(nNow - m_nCreateTime) + "," -"\"pid\":" + OUString::number(m_nPid) + "," -"\"tid\":" + OUString::number(osl_getThreadIdentifier(nullptr)) + -"},"); -::osl::MutexGuard aGuard(g_aMutex); - -g_aRecording.emplace_back(sRecordingData); -} - -css::uno::Sequence ProfileZone::getRecordingAndClear() -{ -bool bRecording; -std::vector aRecording; -{ -::osl::MutexGuard aGuard( g_aMutex ); -bRecording = s_bRecording; -stopRecording(); -aRecording.swap(g_aRecording); -} -// reset start time and nesting level -if (bRecording) -startRecording(); -return ::comphelper::containerToSequence(aRecording); -} - -} // namespace comphelper - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/traceevent.cxx b/comphelper/source/misc/traceevent.cxx new file mode 100644 index ..b1313271f89b --- /dev/null +++ b/comphelper/source/misc/traceevent.cxx @@ -0,0 +1,125 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * 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/. + */ + +#include + +#include +#include +#include + +#include +#include +#include + +#include +#include + +namespace comphelper +{ +std::atomic TraceEvent::s_bRecording = false; + +int TraceEvent::s_nNesting = 0; // level of overlapped zones + +namespace +{ +std::vector g_aRecording; // recorded data +::osl::M
New Defects reported by Coverity Scan for LibreOffice
Hi, Please find the latest report on new defect(s) introduced to LibreOffice found with Coverity Scan. 1 new defect(s) introduced to LibreOffice found with Coverity Scan. New defect(s) Reported-by: Coverity Scan Showing 1 of 1 defect(s) ** CID 1477405:(UNINIT_CTOR) /include/comphelper/profilezone.hxx: 70 in comphelper::ProfileZone::ProfileZone(const char *, bool)() /include/comphelper/profilezone.hxx: 70 in comphelper::ProfileZone::ProfileZone(const char *, bool)() *** CID 1477405:(UNINIT_CTOR) /include/comphelper/profilezone.hxx: 70 in comphelper::ProfileZone::ProfileZone(const char *, bool)() 64 m_nPid = aProcessInfo.Ident; 65 66 m_nNesting = s_nNesting++; 67 } 68 else 69 m_nCreateTime = 0; >>> CID 1477405:(UNINIT_CTOR) >>> Non-static class member "m_nNesting" is not initialized in this >>> constructor nor in any functions that it calls. 70 } 71 72 ~ProfileZone() 73 { 74 if (m_nCreateTime > 0) 75 { /include/comphelper/profilezone.hxx: 70 in comphelper::ProfileZone::ProfileZone(const char *, bool)() 64 m_nPid = aProcessInfo.Ident; 65 66 m_nNesting = s_nNesting++; 67 } 68 else 69 m_nCreateTime = 0; >>> CID 1477405:(UNINIT_CTOR) >>> Non-static class member "m_nPid" is not initialized in this constructor >>> nor in any functions that it calls. 70 } 71 72 ~ProfileZone() 73 { 74 if (m_nCreateTime > 0) 75 { To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3D5e58_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJiKCz3e-2FtK20eEWgyPgjEFG-2F2HWxv3tQNI11acMDT7c5MwRLItI-2FlDHwr2NPHLf7sO0EWhgk0AGUrANs7L8n3AMmxXVBdIL7SFsOOsFqgIznC4ga-2B4TWIx-2FE-2FcAUztegnV2d8pg0Nzy-2BKHs5hmm8iS8L3HmM3WoIF5bAVuPVvGDp0-3D ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: Branch 'distro/nisz/libreoffice-7-0' - sw/qa writerfilter/source
sw/qa/extras/ooxmlexport/data/tdf140182_extraPagebreak.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport13.cxx | 11 +++ writerfilter/source/dmapper/DomainMapper.cxx|5 +++-- writerfilter/source/dmapper/DomainMapper_Impl.cxx |7 +++ writerfilter/source/dmapper/DomainMapper_Impl.hxx |3 +++ 5 files changed, 24 insertions(+), 2 deletions(-) New commits: commit b83fc213bc90d00ca7304e7de964b4437fce5867 Author: Attila Szűcs AuthorDate: Fri Feb 26 11:19:01 2021 +0100 Commit: Gabor Kelemen CommitDate: Thu Apr 29 14:08:02 2021 +0200 tdf#140182 DOCX table import: fix extra page break Hack with m_bDummyParaAddedForTableInSection didn't handle the case, when a page break (empty w:p with a w:br) after the table followed by a paragraph with a section break, resulting 2 page breaks after the table instead of a single one. Co-authored-by: Tibor Nagy (NISZ) Change-Id: Ibd8ab5444becdfd09d0d05eb246e6853914e1f05 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111600 Tested-by: László Németh Reviewed-by: László Németh (cherry picked from commit 9dfaf0fa1977f70341e4b9add2ecd2afb35bf1f2) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114859 Tested-by: Gabor Kelemen Reviewed-by: Gabor Kelemen diff --git a/sw/qa/extras/ooxmlexport/data/tdf140182_extraPagebreak.docx b/sw/qa/extras/ooxmlexport/data/tdf140182_extraPagebreak.docx new file mode 100644 index ..be47d79c5b0a Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf140182_extraPagebreak.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx index cbdc5e2df8d8..3d0c044d2a2c 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx @@ -90,6 +90,17 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf121666_lostPage, "tdf121666_lostPage. assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr/w:sectPr/w:type", "val", "nextPage"); } +DECLARE_OOXMLEXPORT_TEST(testTdf140182_extraPagebreak, "tdf140182_extraPagebreak.docx") +{ +// Table, page break, section break should be only 2 pages +// 2 breaks would normally results in 3 pages, but page break + section break is a special case +// that is handled so to break only 1 page that result only 2 pages. +// Because of the table, a hack (m_bDummyParaAddedForTableInSection) is set for the entire section, +// that canceled the page break + section break special case handling, resulting 3 pages. +// The accompanying fix eliminates this cancelation. +CPPUNIT_ASSERT_EQUAL(2, getPages()); +} + DECLARE_OOXMLEXPORT_TEST(testTdf95848, "tdf95848.docx") { OUString listId; diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index 1bada3877e29..e31c9e7d9246 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -3197,7 +3197,8 @@ void DomainMapper::lcl_text(const sal_uInt8 * data_, size_t len) m_pImpl->SetFieldLocked(); return; case 0x0c: //page break -m_pImpl->deferBreak(PAGE_BREAK); +m_pImpl->deferBreak(PAGE_BREAK); + m_pImpl->SetIsDummyParaAddedForTableInSectionPage(false); return; case 0x0e: //column break m_pImpl->deferBreak(COLUMN_BREAK); @@ -3509,7 +3510,7 @@ void DomainMapper::lcl_utext(const sal_uInt8 * data_, size_t len) bool bRemove = (!m_pImpl->GetParaChanged() && m_pImpl->GetRemoveThisPara()) || (!m_pImpl->GetParaChanged() && m_pImpl->GetParaSectpr() && !bSingleParagraphAfterRedline -&& !m_pImpl->GetIsDummyParaAddedForTableInSection() +&& (!m_pImpl->GetIsDummyParaAddedForTableInSectionPage()) && !( pSectionContext && pSectionContext->GetBreakType() != -1 && pContext && pContext->isSet(PROP_BREAK_TYPE) ) && !m_pImpl->GetIsPreviousParagraphFramed() && !m_pImpl->IsParaWithInlineObject()); diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 16b3743ee2fc..7ed43f9a062f 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -284,6 +284,7 @@ DomainMapper_Impl::DomainMapper_Impl( m_bIsFirstParaInSection( true ), m_bIsFirstParaInSectionAfterRedline( true ), m_bDummyParaAddedForTableInSection( false ), +m_bDummyParaAddedForTableInSectionPage( false ), m_bTextFrameInserted(false), m_bIsPreviousParagraphFram
[Libreoffice-commits] core.git: include/sfx2 sfx2/sdi sfx2/source
include/sfx2/sfxsids.hrc |2 +- sfx2/sdi/appslots.sdi|2 +- sfx2/sdi/sfx.sdi |2 +- sfx2/source/appl/appserv.cxx |4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) New commits: commit 5e58cc6fa84ba77b948cd603e83ad817cedfeb03 Author: Julien Nabet AuthorDate: Thu Apr 29 10:32:54 2021 +0200 Commit: Julien Nabet CommitDate: Thu Apr 29 13:00:15 2021 +0200 Fix typo SID_TEMPLATE_ADDRESSBOKSOURCE->SID_TEMPLATE_ADDRESSBOOKSOURCE Change-Id: I6a23cdd71dc3476c415e710dad4a33c9d0c20202 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114839 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/include/sfx2/sfxsids.hrc b/include/sfx2/sfxsids.hrc index 3f9d4a232fb7..c6073a795b80 100644 --- a/include/sfx2/sfxsids.hrc +++ b/include/sfx2/sfxsids.hrc @@ -327,7 +327,7 @@ class SvxSearchItem; // Floating Window Template #define SID_STYLE_DESIGNER (SID_SFX_START + 539) -#define SID_TEMPLATE_ADDRESSBOKSOURCE (SID_SFX_START + 1655) +#define SID_TEMPLATE_ADDRESSBOOKSOURCE (SID_SFX_START + 1655) // Ruby dialog #define SID_RUBY_DIALOG (SID_SFX_START + 1656) diff --git a/sfx2/sdi/appslots.sdi b/sfx2/sdi/appslots.sdi index 5dbee7376b6e..f5ffb700388a 100644 --- a/sfx2/sdi/appslots.sdi +++ b/sfx2/sdi/appslots.sdi @@ -95,7 +95,7 @@ interface Application ExecMethod = MiscExec_Impl ; StateMethod = MiscState_Impl ; ] -SID_TEMPLATE_ADDRESSBOKSOURCE // ole(no) api(final/play/rec) +SID_TEMPLATE_ADDRESSBOOKSOURCE // ole(no) api(final/play/rec) [ ExecMethod = MiscExec_Impl ; StateMethod = MiscState_Impl ; diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi index 425724440d13..ae37ce14448f 100644 --- a/sfx2/sdi/sfx.sdi +++ b/sfx2/sdi/sfx.sdi @@ -265,7 +265,7 @@ SfxVoidItem CharmapControl SID_CHARMAP_CONTROL ] -SfxVoidItem AddressBookSource SID_TEMPLATE_ADDRESSBOKSOURCE +SfxVoidItem AddressBookSource SID_TEMPLATE_ADDRESSBOOKSOURCE () [ AutoUpdate = FALSE, diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index b58d4f891a53..3ae22dedd324 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -633,7 +633,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) break; } -case SID_TEMPLATE_ADDRESSBOKSOURCE: +case SID_TEMPLATE_ADDRESSBOOKSOURCE: { svt::AddressBookSourceDialog aDialog(rReq.GetFrameWeld(), ::comphelper::getProcessComponentContext()); aDialog.run(); @@ -1046,7 +1046,7 @@ void SfxApplication::MiscState_Impl(SfxItemSet &rSet) { switch(nWhich) { -case SID_TEMPLATE_ADDRESSBOKSOURCE: +case SID_TEMPLATE_ADDRESSBOOKSOURCE: if ( !SvtModuleOptions().IsModuleInstalled(SvtModuleOptions::EModule::DATABASE) ) rSet.Put(SfxVisibilityItem(nWhich, false)); break; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/inc sc/qa sc/source
sc/inc/dbdata.hxx |3 + sc/qa/uitest/autofilter/tdf48025.py | 72 sc/source/core/tool/dbdata.cxx | 24 +++- 3 files changed, 96 insertions(+), 3 deletions(-) New commits: commit edb64cc363e782470870089041c48993d7c34de5 Author: Tünde Tóth AuthorDate: Thu Apr 22 14:19:41 2021 +0200 Commit: László Németh CommitDate: Thu Apr 29 12:58:52 2021 +0200 tdf#48025 sc: fix broken filter criteria when deleting columns The autofilter criteria weren't remain with the filtered column when we deleted a column left of the filtered column or the filtered column itself. Change-Id: I0eb103ea5569d82eac4d81bce1b31b0c3bbcbf41 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114483 Tested-by: László Németh Reviewed-by: László Németh diff --git a/sc/inc/dbdata.hxx b/sc/inc/dbdata.hxx index 39ae2835e0f8..c1e714fc3e9f 100644 --- a/sc/inc/dbdata.hxx +++ b/sc/inc/dbdata.hxx @@ -124,7 +124,8 @@ public: voidGetArea(SCTAB& rTab, SCCOL& rCol1, SCROW& rRow1, SCCOL& rCol2, SCROW& rRow2) const; SC_DLLPUBLIC void GetArea(ScRange& rRange) const; voidSetArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2); -voidMoveTo(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2); +voidMoveTo(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, + SCCOL nUpdateCol = -1); voidSetByRow(bool bByR) { bByRow = bByR; } boolHasHeader() const { return bHasHeader; } voidSetHeader(bool bHasH) { bHasHeader = bHasH; } diff --git a/sc/qa/uitest/autofilter/tdf48025.py b/sc/qa/uitest/autofilter/tdf48025.py new file mode 100644 index ..c5d5c711da5f --- /dev/null +++ b/sc/qa/uitest/autofilter/tdf48025.py @@ -0,0 +1,72 @@ +# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*- +# +# 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/. +# +from uitest.framework import UITestCase +from uitest.uihelper.calc import enter_text_to_cell +from libreoffice.uno.propertyvalue import mkPropertyValues + +#Bug 48025 - EDITING AUTOFILTER: Autofilter settings stay with the column number when deleting columns + +class tdf48025(UITestCase): +def test_tdf48025_deleted_columns(self): +self.ui_test.create_doc_in_start_center("calc") +document = self.ui_test.get_component() +calcDoc = self.xUITest.getTopFocusWindow() +gridwin = calcDoc.getChild("grid_window") +document = self.ui_test.get_component() + +enter_text_to_cell(gridwin, "A1", "A") +enter_text_to_cell(gridwin, "A2", "1") +enter_text_to_cell(gridwin, "A3", "2") +enter_text_to_cell(gridwin, "A4", "3") + +enter_text_to_cell(gridwin, "B1", "B") +enter_text_to_cell(gridwin, "B2", "4") +enter_text_to_cell(gridwin, "B3", "5") +enter_text_to_cell(gridwin, "B4", "6") + +enter_text_to_cell(gridwin, "C1", "C") +enter_text_to_cell(gridwin, "C2", "7") +enter_text_to_cell(gridwin, "C3", "8") +enter_text_to_cell(gridwin, "C4", "9") + +gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:C4"})) + +self.xUITest.executeCommand(".uno:DataFilterAutoFilter") + +gridwin.executeAction("LAUNCH", mkPropertyValues({"AUTOFILTER": "", "COL": "1", "ROW": "0"})) +xFloatWindow = self.xUITest.getFloatWindow() +xCheckListMenu = xFloatWindow.getChild("check_list_menu") +xList = xCheckListMenu.getChild("check_list_box") +xEntry = xList.getChild("1") +xEntry.executeAction("CLICK", tuple()) + +xOkButton = xFloatWindow.getChild("ok") +xOkButton.executeAction("CLICK", tuple()) + +gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"})) + +self.xUITest.executeCommand(".uno:DeleteColumns") + +gridwin.executeAction("LAUNCH", mkPropertyValues({"AUTOFILTER": "", "COL": "0", "ROW": "0"})) +xFloatWindow = self.xUITest.getFloatWindow() +xCheckListMenu = xFloatWindow.getChild("check_list_menu") +xList = xCheckListMenu.getChild("check_list_box") +self.assertEqual(3, len(xList.getChildren())) +xCloseBtn = xFloatWindow.getChild("cancel") +xCloseBtn.executeAction("CLICK", tuple()) + +gridwin.executeAction("LAUNCH", mkPropertyValues({"AUTOFILTER": "", "COL": "1", "ROW": "0"})) +xFloatWindow = self.xUITest.getFloatWindow() +xCheckListMenu = xFloatWindow.getChild("check_list_menu") +xList = xCheckListMenu.getChild("check_list_box") +self.assertEqual(2, len(xList.getChildren())) +xCloseBtn = xFloatWindow.getChild("cancel") +xCloseBtn.
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - vcl/source
vcl/source/window/toolbox2.cxx | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) New commits: commit 312191c32af99eb46934df71807f3a1723b61fa7 Author: Szymon Kłos AuthorDate: Wed Apr 28 15:20:35 2021 +0200 Commit: Szymon Kłos CommitDate: Thu Apr 29 12:58:55 2021 +0200 jsdialog: dump toolbox item's window if present Change-Id: Ia882bcadb844993f2b761bd91c6f6f60c9e1b2ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114807 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index 360fa312640d..2e442923899b 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx @@ -1739,11 +1739,20 @@ void ToolBox::DumpAsPropertyTree(tools::JsonWriter& rJsonWriter) { auto childNode = rJsonWriter.startStruct(); int nId = GetItemId(i); -if (!IsItemVisible(nId)) -continue; -rJsonWriter.put("type", "toolitem"); -rJsonWriter.put("text", GetItemText(nId)); -rJsonWriter.put("command", GetItemCommand(nId)); + +vcl::Window* pWindow = GetItemWindow(nId); +if (pWindow) +{ +pWindow->DumpAsPropertyTree(rJsonWriter); +} +else +{ +if (!IsItemVisible(nId)) +continue; +rJsonWriter.put("type", "toolitem"); +rJsonWriter.put("text", GetItemText(nId)); +rJsonWriter.put("command", GetItemCommand(nId)); +} } } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/uiconfig
sd/uiconfig/simpress/ui/optimpressgeneralpage.ui | 713 +++ 1 file changed, 357 insertions(+), 356 deletions(-) New commits: commit b49eca55210d3f7e731f32f2f20bd12bfd729ec6 Author: Gabor Kelemen AuthorDate: Wed Apr 21 17:16:40 2021 +0200 Commit: László Németh CommitDate: Thu Apr 29 12:46:43 2021 +0200 tdf#131162 Rearrange Impress/Draw General settings page so that checkbox labels fit in languages where they have long translations such as French, German, Hungarian Change-Id: I44107df00fbd969cd3afca016c96e4a1af86842d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114445 Tested-by: Jenkins Tested-by: László Németh Reviewed-by: Heiko Tietze diff --git a/sd/uiconfig/simpress/ui/optimpressgeneralpage.ui b/sd/uiconfig/simpress/ui/optimpressgeneralpage.ui index 95344ee7cf44..61cfb8e7111c 100644 --- a/sd/uiconfig/simpress/ui/optimpressgeneralpage.ui +++ b/sd/uiconfig/simpress/ui/optimpressgeneralpage.ui @@ -1,65 +1,65 @@ - + 5 200 5 -1 -5 +1 +5 100 -1 -10 +1 +10 100 -1 -10 +1 +10 100 -1 -10 +1 +10 100 -1 -10 +1 +10 - + True -False -6 -12 -24 +False +6 +12 +24 True -False -0 -none +False +0 +none True -False -True -6 -12 +False 12 6 +True +6 +12 Start with _Template Selection True -True -False -True -True +True +False +True +True Specifies whether to activate the Select a Template window when opening a presentation with File - New - Presentation. @@ -67,8 +67,8 @@ -0 -0 +0 +0 @@ -76,7 +76,7 @@ True -False +False New Document @@ -85,72 +85,144 @@ -0 -0 +0 +0 - + True -False -True -0 -none +False +0 +none - - + + True -False -6 -12 +False 12 6 +True +6 +12 - -Allow quick editing + +Enable Presenter Console True -True -False -True -True +True +False +True +True - -If on, you can edit text immediately after clicking a text object. If off, you must double-click to edit text. + +Specifies that you want to enable the Presenter Console during slideshows. -0 -0 +0 +1 - -Only text area selectable + +Enable remote control True -True -False -True -right -True +True +False +True +True - -Specifies whether to select a text box by clicking the text. + +Specifies that you want to enable Bluetooth remote control while Impress is running. -0 -1 +0 +0 - + True -False -Text Objects +False +Presentation + + + + + + + +1 +0 + + + + +True +False +0 +none + + + +True +False +12 +6 +6 +12 +
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - include/comphelper
include/comphelper/profilezone.hxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit d5d1869ba4db302225f374ffa83c344a78839239 Author: Tor Lillqvist AuthorDate: Thu Apr 29 11:24:56 2021 +0300 Commit: Tor Lillqvist CommitDate: Thu Apr 29 12:41:47 2021 +0200 cid#1477405 Initialize members Change-Id: I6e546875cf61394e0001000994fccbd8d6626428 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114844 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tor Lillqvist diff --git a/include/comphelper/profilezone.hxx b/include/comphelper/profilezone.hxx index 127e42d4daa3..86bbce20fc9b 100644 --- a/include/comphelper/profilezone.hxx +++ b/include/comphelper/profilezone.hxx @@ -52,6 +52,8 @@ class COMPHELPER_DLLPUBLIC ProfileZone : public NamedEvent ProfileZone(const char* sName, bool bConsole = false) : NamedEvent(sName) , m_bConsole(bConsole) +, m_nPid(-1) +, m_nNesting(-1) { if (s_bRecording || m_bConsole) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - comphelper/qa include/comphelper include/sal
comphelper/qa/unit/test_traceevent.cxx |7 +++ include/comphelper/profilezone.hxx | 14 +++--- include/sal/log-areas.dox |1 + 3 files changed, 19 insertions(+), 3 deletions(-) New commits: commit 481df1125871de9cb1ce1a38b459b9710a56324b Author: Tor Lillqvist AuthorDate: Thu Apr 29 11:07:18 2021 +0300 Commit: Tor Lillqvist CommitDate: Thu Apr 29 12:41:24 2021 +0200 Add SAL_WARN in case ProfileZones are overlapping and not hierarchical Change-Id: Id09904db762b6d931ab23cce16e55d5213079516 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114843 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tor Lillqvist diff --git a/comphelper/qa/unit/test_traceevent.cxx b/comphelper/qa/unit/test_traceevent.cxx index e170e8aaeb18..29094b14f01b 100644 --- a/comphelper/qa/unit/test_traceevent.cxx +++ b/comphelper/qa/unit/test_traceevent.cxx @@ -122,6 +122,13 @@ void trace_event_test() // object that has already had its 'e' event generated. } +// This incorrect use of overlapping (not nested) ProfileZones +// will generate a SAL_WARN but should not crash +auto p1 = new comphelper::ProfileZone("error1"); +auto p2 = new comphelper::ProfileZone("error2"); +delete p1; +delete p2; + // Nothing is generated from this pAsync7Locked.reset(); } diff --git a/include/comphelper/profilezone.hxx b/include/comphelper/profilezone.hxx index 953ef09e0bc8..127e42d4daa3 100644 --- a/include/comphelper/profilezone.hxx +++ b/include/comphelper/profilezone.hxx @@ -12,6 +12,8 @@ #include +#include + #include // implementation of XToolkitExperimental profiling API @@ -70,10 +72,16 @@ class COMPHELPER_DLLPUBLIC ProfileZone : public NamedEvent if (m_nCreateTime > 0) { s_nNesting--; -assert(m_nNesting == s_nNesting); -if (s_bRecording) -addRecording(); +if (m_nNesting != s_nNesting) +{ +SAL_WARN("comphelper.traceevent", "Incorrect ProfileZone nesting for " << m_sName); +} +else +{ +if (s_bRecording) +addRecording(); +} if (m_bConsole) stopConsole(); diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox index 94733ff414ad..f46f3fa059e2 100644 --- a/include/sal/log-areas.dox +++ b/include/sal/log-areas.dox @@ -100,6 +100,7 @@ certain functionality. @li @c comphelper.container - EmbeddedObjectContainer @li @c comphelper.crypto @li @c comphelper.lok +@li @c comphelper.traceevent @section cppu ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/nisz/libreoffice-7-0' - sc/source
sc/source/ui/cctrl/dpcontrol.cxx |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) New commits: commit f2e8d04cf4b960f1fd21b4f557e9e1f3849dd815 Author: Tünde Tóth AuthorDate: Fri Mar 12 11:33:54 2021 +0100 Commit: Gabor Kelemen CommitDate: Thu Apr 29 12:30:00 2021 +0200 tdf#140955 sc UI: highlight active autofilter dropdown arrow by inverting its colors, as suggested by Heiko Tietze. The small difference in the active and inactive arrow shapes (a dot in the corner) is much more visible this way. Change-Id: I784fcb809549b22930037d28e007c2a42dcff337 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112378 Tested-by: László Németh Reviewed-by: László Németh (cherry picked from commit aad8b94ed6494e19611a779aed74adca931d14aa) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114858 Tested-by: Gabor Kelemen Reviewed-by: Gabor Kelemen diff --git a/sc/source/ui/cctrl/dpcontrol.cxx b/sc/source/ui/cctrl/dpcontrol.cxx index 2ca413055000..b4542aca75f7 100644 --- a/sc/source/ui/cctrl/dpcontrol.cxx +++ b/sc/source/ui/cctrl/dpcontrol.cxx @@ -168,12 +168,14 @@ void ScDPFieldButton::drawPopupButton() // Background & outer black border mpOutDev->SetLineColor(COL_BLACK); -Color aBackgroundColor = mbPopupPressed ? mpStyle->GetShadowColor() : mpStyle->GetFaceColor(); +Color aBackgroundColor += mbHasHiddenMember ? mpStyle->GetHighlightColor() +: mbPopupPressed ? mpStyle->GetShadowColor() : mpStyle->GetFaceColor(); mpOutDev->SetFillColor(aBackgroundColor); mpOutDev->DrawRect(tools::Rectangle(aPos, aSize)); // the arrowhead -Color aArrowColor = mbHasHiddenMember ? mpStyle->GetHighlightLinkColor() : mpStyle->GetButtonTextColor(); +Color aArrowColor = mbHasHiddenMember ? mpStyle->GetHighlightTextColor() : mpStyle->GetButtonTextColor(); mpOutDev->SetLineColor(aArrowColor); mpOutDev->SetFillColor(aArrowColor); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/nisz/libreoffice-7-0' - oox/source sw/qa
oox/source/drawingml/shape.cxx |9 -- sw/qa/extras/ooxmlimport/data/tdf118693.docx |binary sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 12 +--- sw/qa/extras/ooxmlimport/ooxmlimport2.cxx| 37 +++ 4 files changed, 40 insertions(+), 18 deletions(-) New commits: commit fe2a5e1c51f538d4d2457efe6bc42192edc8d54f Author: Xisco Fauli AuthorDate: Thu Mar 18 00:48:49 2021 +0100 Commit: Gabor Kelemen CommitDate: Thu Apr 29 12:28:06 2021 +0200 tdf#118693: no need to use convertMm100ToTwip() for line shapes anymore It was introduced in 11129d89b152db54c86bb2bda58c24b8abb6c5a8 < tdf#85232 WPG import: fix handling of line shapes > and later in 36bade04d3780bc54c51b46bb0b63e69789658a5 < tdf106792 Get rid of SvxShapePolyPolygonBezier > ForceMetricToItemPoolMetric was added to SvxShapePolyPolygon::setPropertyValueImpl to convert from 100thmm to twips as can be read in the comment in testTdf85232 With this change, xShape->getPosition().X in testTdf85232 is 2267, which was already in twips Change-Id: I30b757885327a477213f96f8f84541971f435164 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112663 Tested-by: Jenkins Reviewed-by: Miklos Vajna (cherry picked from commit c9e5640c8fcad7beb42a66f9bee0252eee9fe323) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112619 Reviewed-by: Xisco Fauli Signed-off-by: Xisco Fauli Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112671 (cherry picked from commit ddf13fc815903238c90aa963af7e0ea96fe7280d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114857 Tested-by: Gabor Kelemen Reviewed-by: Gabor Kelemen diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index a69404094db1..e583ac438607 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -846,7 +846,6 @@ Reference< XShape > const & Shape::createAndInsert( uno::Sequence< awt::Point > aPointSequence( nNumPoints ); awt::Point* pPoints = aPointSequence.getArray(); uno::Reference xModelInfo(rFilterBase.getModel(), uno::UNO_QUERY); -bool bIsWriter = xModelInfo->supportsService("com.sun.star.text.TextDocument"); for( i = 0; i < nNumPoints; ++i ) { const basegfx::B2DPoint aPoint( aPoly.getB2DPoint( i ) ); @@ -854,13 +853,7 @@ Reference< XShape > const & Shape::createAndInsert( // tdf#106792 Not needed anymore due to the change in SdrPathObj::NbcResize: // tdf#96674: Guard against zero width or height. -if (bIsWriter && bNoTranslation) -// Writer's draw page is in twips, and these points get passed -// to core without any unit conversion when Writer -// postprocesses only the group shape itself. -pPoints[i] = awt::Point(static_cast(convertMm100ToTwip(aPoint.getX())), static_cast(convertMm100ToTwip(aPoint.getY(; -else -pPoints[i] = awt::Point(static_cast(aPoint.getX()), static_cast(aPoint.getY())); +pPoints[i] = awt::Point(static_cast(aPoint.getX()), static_cast(aPoint.getY())); } uno::Sequence< uno::Sequence< awt::Point > > aPolyPolySequence( 1 ); aPolyPolySequence.getArray()[ 0 ] = aPointSequence; diff --git a/sw/qa/extras/ooxmlimport/data/tdf118693.docx b/sw/qa/extras/ooxmlimport/data/tdf118693.docx new file mode 100644 index ..4e832398bcd5 Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/tdf118693.docx differ diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 3ed3e2b6bc24..cf75df9fe5b7 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -1315,16 +1315,8 @@ DECLARE_OOXMLIMPORT_TEST(testTdf85232, "tdf85232.docx") // Make sure we're not testing the ellipse child. CPPUNIT_ASSERT_EQUAL(OUString("com.sun.star.drawing.LineShape"), xShapeDescriptor->getShapeType()); -// tdf#106792 checked that during load of tdf85232.docx the method -// SvxShapePolyPolygon::setPropertyValueImpl is used three times. In -// that method, a call to ForceMetricToItemPoolMetric was missing so -// that the import did not convert the input values from 100thmm -// to twips what is needed due to the object residing in Writer. The -// UNO API by definition is in 100thmm. Result is that in SwXShape::getPosition -// the offset (aOffset) now is (0, 0) instead of an existing offset in -// the load of the document before (what is plausible for a GroupObject). -// Thus, I will adapt the result value here to the now (hopefully) correct one. -CPPUNIT_ASSERT_EQUAL(static_cast(1630), xShape->getPosition().X); // was: 2267 +// This was 2900: horizontal position of the line was incorrect, the 3 children were n
[Libreoffice-commits] core.git: codemaker/source
codemaker/source/cppumaker/cppumaker.cxx |1 + codemaker/source/javamaker/javamaker.cxx |1 + 2 files changed, 2 insertions(+) New commits: commit b550d72293582e37112dcc1349e845a69bfe1414 Author: Caolán McNamara AuthorDate: Wed Apr 28 19:43:32 2021 +0100 Commit: Caolán McNamara CommitDate: Thu Apr 29 12:17:00 2021 +0200 cid#1473812 Untrusted value as argument Change-Id: I95877c014d16426622e7114384c8e189c140943c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114836 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/codemaker/source/cppumaker/cppumaker.cxx b/codemaker/source/cppumaker/cppumaker.cxx index b1769eda87a6..384e2b5aa079 100644 --- a/codemaker/source/cppumaker/cppumaker.cxx +++ b/codemaker/source/cppumaker/cppumaker.cxx @@ -36,6 +36,7 @@ #include "cppuoptions.hxx" #include "cpputype.hxx" +// coverity[tainted_data] - this is a build time tool SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) { CppuOptions options; try { diff --git a/codemaker/source/javamaker/javamaker.cxx b/codemaker/source/javamaker/javamaker.cxx index 3a35be56a39b..044292bf6b8f 100644 --- a/codemaker/source/javamaker/javamaker.cxx +++ b/codemaker/source/javamaker/javamaker.cxx @@ -36,6 +36,7 @@ #include "javaoptions.hxx" #include "javatype.hxx" +// coverity[tainted_data] - this is a build time tool SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) { JavaOptions options; try { ___ 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/lib/init.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 857dee030f0a45cb3e28a0f3870b02a97fd8e280 Author: Tor Lillqvist AuthorDate: Thu Apr 29 12:06:24 2021 +0300 Commit: Tor Lillqvist CommitDate: Thu Apr 29 11:59:29 2021 +0200 Let's call it "traceeventrecording" and not "profilezonerecording" It is not just ProfileZone events any longer that are recorded. Change-Id: I9c2b5817fca8f8a23ebd571cbaccb9ac063ec73b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114848 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 6ebe3a1ce686..a8c0f078c6a7 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -3849,7 +3849,7 @@ static void lo_setOption(LibreOfficeKit* /*pThis*/, const char *pOption, const c { static char* pCurrentSalLogOverride = nullptr; -if (strcmp(pOption, "profilezonerecording") == 0) +if (strcmp(pOption, "traceeventrecording") == 0) { if (strcmp(pValue, "start") == 0) comphelper::TraceEvent::startRecording(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: include/comphelper
include/comphelper/profilezone.hxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit c1c4d50d08eff7a38617839a896392a34c5183a2 Author: Tor Lillqvist AuthorDate: Thu Apr 29 11:24:56 2021 +0300 Commit: Tor Lillqvist CommitDate: Thu Apr 29 11:57:57 2021 +0200 cid#1477405 Initialize members Change-Id: I6e546875cf61394e0001000994fccbd8d6626428 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114837 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist diff --git a/include/comphelper/profilezone.hxx b/include/comphelper/profilezone.hxx index 8eda2d773ac0..3431c20efcea 100644 --- a/include/comphelper/profilezone.hxx +++ b/include/comphelper/profilezone.hxx @@ -51,6 +51,8 @@ public: ProfileZone(const char* sName, bool bConsole = false) : NamedEvent(sName) , m_bConsole(bConsole) +, m_nPid(-1) +, m_nNesting(-1) { if (s_bRecording || m_bConsole) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - cui/source include/cui sfx2/source
cui/source/dialogs/cuicharmap.cxx | 93 - include/cui/cuicharmap.hxx | 17 -- sfx2/source/control/charmapcontrol.cxx | 13 3 files changed, 85 insertions(+), 38 deletions(-) New commits: commit b672adaf5a4604aa09322034e4f5c151a4dc1314 Author: Mike Kaganski AuthorDate: Wed Apr 28 12:37:19 2021 +0200 Commit: Michael Stahl CommitDate: Thu Apr 29 11:38:57 2021 +0200 tdf#135997: make sure that the two lists are same length This fixes the strange assumption that when searching the two lists (character names and font names) independently, the two found positions will necessarily correspond to each other. Instead, the positions of the match must be the same, which is implemented now. Also the input from configuration is sanitized. Change-Id: I920de7414387e181e11183b8a22776a72b6be419 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114722 Tested-by: Jenkins Reviewed-by: Mike Kaganski (cherry picked from commit b6ab5914d8b2fc7041430796890f086f8e3e6369) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114852 Reviewed-by: Michael Stahl diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx index d674cda9c48f..ed0200c54cc3 100644 --- a/cui/source/dialogs/cuicharmap.cxx +++ b/cui/source/dialogs/cuicharmap.cxx @@ -185,7 +185,7 @@ short SvxCharacterMap::run() if( SvxShowCharSet::getSelectedChar() == ' ') { m_xOKBtn->set_sensitive(false); -setFavButtonState(OUString(), OUString()); +setFavButtonState(u"", u""); } else { @@ -235,6 +235,11 @@ void SvxCharacterMap::getRecentCharacterList() { maRecentCharFontList.push_back(s); } + +// tdf#135997: make sure that the two lists are same length +const auto nCommonLength = std::min(maRecentCharList.size(), maRecentCharFontList.size()); +maRecentCharList.resize(nCommonLength); +maRecentCharFontList.resize(nCommonLength); } @@ -255,11 +260,46 @@ void SvxCharacterMap::getFavCharacterList() { maFavCharFontList.push_back(s); } + +// tdf#135997: make sure that the two lists are same length +const auto nCommonLength = std::min(maFavCharList.size(), maFavCharFontList.size()); +maFavCharList.resize(nCommonLength); +maFavCharFontList.resize(nCommonLength); +} + +static std::pair::const_iterator, std::deque::const_iterator> +findInPair(std::u16string_view str1, const std::deque& rContainer1, + std::u16string_view str2, const std::deque& rContainer2) +{ +assert(rContainer1.size() == rContainer2.size()); + +if (auto it1 = std::find(rContainer1.begin(), rContainer1.end(), str1); +it1 != rContainer1.end()) +{ +auto it2 = rContainer2.begin() + (it1 - rContainer1.begin()); +if (*it2 == str2) +return { it1, it2 }; +} +return { rContainer1.end(), rContainer2.end() }; +} + +std::pair::const_iterator, std::deque::const_iterator> +SvxCharacterMap::getRecentChar(std::u16string_view sTitle, std::u16string_view rFont) const +{ +return findInPair(sTitle, maRecentCharList, rFont, maRecentCharFontList); +} + +std::pair::const_iterator, std::deque::const_iterator> +SvxCharacterMap::getFavChar(std::u16string_view sTitle, std::u16string_view rFont) const +{ +return findInPair(sTitle, maFavCharList, rFont, maFavCharFontList); } void SvxCharacterMap::updateRecentCharControl() { +assert(maRecentCharList.size() == maRecentCharFontList.size()); + int i = 0; for ( std::deque< OUString >::iterator it = maRecentCharList.begin(), it2 = maRecentCharFontList.begin(); it != maRecentCharList.end() && it2 != maRecentCharFontList.end(); @@ -281,12 +321,9 @@ void SvxCharacterMap::updateRecentCharControl() void SvxCharacterMap::updateRecentCharacterList(const OUString& sTitle, const OUString& rFont) { -auto itChar = std::find(maRecentCharList.begin(), maRecentCharList.end(), sTitle); - -auto itChar2 = std::find(maRecentCharFontList.begin(), maRecentCharFontList.end(), rFont); - // if recent char to be added is already in list, remove it -if( itChar != maRecentCharList.end() && itChar2 != maRecentCharFontList.end() ) +if( const auto& [itChar, itChar2] = getRecentChar(sTitle, rFont); +itChar != maRecentCharList.end() && itChar2 != maRecentCharFontList.end() ) { maRecentCharList.erase( itChar ); maRecentCharFontList.erase( itChar2); @@ -321,12 +358,9 @@ void SvxCharacterMap::updateRecentCharacterList(const OUString& sTitle, const OU void SvxCharacterMap::updateFavCharacterList(const OUString& sTitle, const OUString& rFont) { -auto itChar = std::find(maFavCharList.begin(), maFavCharList.end(), sTitle); - -auto itChar2 = std::find(maFavCharFontList.begin(), maFavCharFontList.end(), rFont); - // if Fav char to be added is already in list,
[Libreoffice-commits] core.git: Branch 'distro/nisz/libreoffice-7-0' - sw/source
sw/source/core/doc/notxtfrm.cxx | 52 1 file changed, 1 insertion(+), 51 deletions(-) New commits: commit 11e93c63ac8a232ce0b5242dd1de532dc33daf8b Author: Xisco Fauli AuthorDate: Thu Mar 11 12:42:47 2021 +0100 Commit: Gabor Kelemen CommitDate: Thu Apr 29 11:35:32 2021 +0200 Revert "tdf#114076: Expand ClipRange to next PixelBound" ... and "tdf#124272 use ClipRegion's geometry if not a rectangle" This commit reverts c1230cede19ae3633e51c7ca780cb34d9dbaa20f and 362c1cf2bd580f6dc8bf27bdcd79174111bc1b5c tdf#114076, or any of its duplicates, is not reproducible in master if c1230cede19ae3633e51c7ca780cb34d9dbaa20f ("tdf#114076: Expand ClipRange to next PixelBound") is reverted. (Tested on Linux and Windows) So, if we revert it, we no longer need 362c1cf2bd580f6dc8bf27bdcd79174111bc1b5c ("tdf#124272 use ClipRegion's geometry if not a rectangle"), which was a follow-up fix for a regression introduced by the first commit. This also fixes tdf#129085 and all the duplicates, which were introduced by the follow-up commit. I plan to add the unittests in a different commit Change-Id: Ie4328c15b24b521127c1b653bd621bfc92ac39cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112340 Tested-by: Jenkins Reviewed-by: Xisco Fauli Signed-off-by: Xisco Fauli Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112398 Reviewed-by: Armin Le Grand (cherry picked from commit 8926d9282fe84793ce909471b5caec3583fd3ec9) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112530 Reviewed-by: Caolán McNamara (cherry picked from commit cf453e399c94f3af49a614c266f7c2e9a1ad45fa) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114855 Tested-by: Gabor Kelemen Reviewed-by: Gabor Kelemen diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx index 550f0df508db..291608431bfa 100644 --- a/sw/source/core/doc/notxtfrm.cxx +++ b/sw/source/core/doc/notxtfrm.cxx @@ -982,59 +982,9 @@ void paintGraphicUsingPrimitivesHelper( if(0 != aClip.count()) { -// tdf#114076: Expand ClipRange to next PixelBound -// Do this by going to basegfx::B2DRange, adding a -// single pixel size and using floor/ceil to go to -// full integer (as needed for pixels). Also need -// to go back to basegfx::B2DPolyPolygon for the -// creation of the needed MaskPrimitive2D. -// The general problem is that Writer is scrolling -// using blitting the unchanged parts, this forces -// this part of the scroll to pixel coordinate steps, -// while the ViewTransformation for paint nowadays has -// a sub-pixel precision. This results in an offset -// up to one pixel in radius. To solve this for now, -// we need to expand to the next outer pixel bound. -// Hopefully in the future we will someday be able to -// stay on the full available precision, but this -// will need a change in the repaint/scroll paradigm. -const basegfx::B2DRange aClipRange(aClip.getB2DRange()); -const basegfx::B2DVector aSinglePixelXY(rOutputDevice.GetInverseViewTransformation() * basegfx::B2DVector(1.0, 1.0)); -const basegfx::B2DRange aExpandedClipRange( -floor(aClipRange.getMinX() - aSinglePixelXY.getX()), -floor(aClipRange.getMinY() - aSinglePixelXY.getY()), -ceil(aClipRange.getMaxX() + aSinglePixelXY.getX()), -ceil(aClipRange.getMaxY() + aSinglePixelXY.getY())); - -// create the enclosing rectangle as polygon -basegfx::B2DPolyPolygon aTarget(basegfx::utils::createPolygonFromRect(aExpandedClipRange)); - -// tdf#124272 the fix above (tdf#114076) was too rough - the -// clip region used may be a PolyPolygon. In that case that -// PolyPolygon would have to be scaled to mentioned PixelBounds. -// Since that is not really possible geometrically (would need -// more some 'grow in outside direction' but with unequal grow -// values in all directions - just maaany problems -// involved), use a graphical trick: The topology of the -// PolyPolygon uses the standard FillRule, so adding the now -// guaranteed to be bigger or equal bounding (enclosing) -// rectangle twice as polygon will expand the BoundRange, but -// not change the geometry visualization at all -if(!rOutputDevice.GetClipRegion().IsRectangle()) -{ -// double the outer rectangle range polygon to have it -// included twice -aTarget.append(aTarget.getB2DPolygon(0)); - -// add the ori
[Libreoffice-commits] core.git: icon-themes/karasa_jaga icon-themes/karasa_jaga_svg
icon-themes/karasa_jaga/cmd/32/pasteaslink.png |binary icon-themes/karasa_jaga/cmd/lc_pasteaslink.png |binary icon-themes/karasa_jaga/cmd/sc_pasteaslink.png |binary icon-themes/karasa_jaga_svg/cmd/32/pasteaslink.svg |1 + icon-themes/karasa_jaga_svg/cmd/lc_pasteaslink.svg |1 + icon-themes/karasa_jaga_svg/cmd/sc_pasteaslink.svg |1 + 6 files changed, 3 insertions(+) New commits: commit e0d0399da64021b6029618371d816bcbfd874f01 Author: Rizal Muttaqin AuthorDate: Wed Apr 28 16:49:04 2021 +0700 Commit: Rizal Muttaqin CommitDate: Thu Apr 29 11:33:56 2021 +0200 KJ: tdf#141885 New Paste As Link icons Change-Id: I3022897dcdc4ce50c44f483a688787ec47b9b8b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114827 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin diff --git a/icon-themes/karasa_jaga/cmd/32/pasteaslink.png b/icon-themes/karasa_jaga/cmd/32/pasteaslink.png new file mode 100644 index ..0494a39950a2 Binary files /dev/null and b/icon-themes/karasa_jaga/cmd/32/pasteaslink.png differ diff --git a/icon-themes/karasa_jaga/cmd/lc_pasteaslink.png b/icon-themes/karasa_jaga/cmd/lc_pasteaslink.png new file mode 100644 index ..ab3591a0aa6a Binary files /dev/null and b/icon-themes/karasa_jaga/cmd/lc_pasteaslink.png differ diff --git a/icon-themes/karasa_jaga/cmd/sc_pasteaslink.png b/icon-themes/karasa_jaga/cmd/sc_pasteaslink.png new file mode 100644 index ..e7a6596b92db Binary files /dev/null and b/icon-themes/karasa_jaga/cmd/sc_pasteaslink.png differ diff --git a/icon-themes/karasa_jaga_svg/cmd/32/pasteaslink.svg b/icon-themes/karasa_jaga_svg/cmd/32/pasteaslink.svg new file mode 100644 index ..57f1b09d7d85 --- /dev/null +++ b/icon-themes/karasa_jaga_svg/cmd/32/pasteaslink.svg @@ -0,0 +1 @@ +http://www.w3.org/2000/svg"; xmlns:xlink="http://www.w3.org/1999/xlink";>< filter id="E" height="1.232813" width="1.128976" x="-.064488" y="-.116406"> \ No newline at end of file diff --git a/icon-themes/karasa_jaga_svg/cmd/lc_pasteaslink.svg b/icon-themes/karasa_jaga_svg/cmd/lc_pasteaslink.svg new file mode 100644 index ..c5c85e4c0f8b --- /dev/null +++ b/icon-themes/karasa_jaga_svg/cmd/lc_pasteaslink.svg @@ -0,0 +1 @@ +http://www.w3.org/2000/svg"; xmlns:xlink="http://www.w3.org/1999/xlink";> \ No newline at end of file diff --git a/icon-themes/karasa_jaga_svg/cmd/sc_pasteaslink.svg b/icon-themes/karasa_jaga_svg/cmd/sc_pasteaslink.svg new file mode 100644 index ..9371121f7f05 --- /dev/null +++ b/icon-themes/karasa_jaga_svg/cmd/sc_pasteaslink.svg @@ -0,0 +1 @@ +http://www.w3.org/2000/svg"; xmlns:xlink="http://www.w3.org/1999/xlink";> \ No newline at end of file ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
sw/source/uibase/docvw/edtdd.cxx |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) New commits: commit a559e6e6574b84c061fb5a90291276819f3b0c33 Author: Caolán McNamara AuthorDate: Wed Apr 28 17:19:30 2021 +0100 Commit: Michael Stahl CommitDate: Thu Apr 29 11:29:31 2021 +0200 tdf#116384 only drag hyperlink if user's not currently setting the selection which is what writer does for normal text. Under gtk its common on selecting by dragging the mouse over a hyperlink for one or two letters of the hyperlink to get selected before that selection then gets dragged as dnd. Under gen StartDragWidth is 2 by default so the drag kicks in before enough text has been selected for writer to select anything, but under gtk gtk-dnd-drag-threshold is used for StartDragWidth and that is 8 by default making it easy to select one or two characters before the gesture is recognized as a possible drag. it seems sane to do the same as for normal text and not dnd if the user is still using the mouse to set a selection Change-Id: I971d429acaf8a5a656c5ce58f52632979b94e40a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114726 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/sw/source/uibase/docvw/edtdd.cxx b/sw/source/uibase/docvw/edtdd.cxx index 31594da032af..a9d80375b51e 100644 --- a/sw/source/uibase/docvw/edtdd.cxx +++ b/sw/source/uibase/docvw/edtdd.cxx @@ -83,7 +83,8 @@ void SwEditWin::StartDrag( sal_Int8 /*nAction*/, const Point& rPosPixel ) bool bStart = false, bDelSelect = false; SdrObject *pObj = nullptr; Point aDocPos( PixelToLogic( rPosPixel ) ); -if ( !rSh.IsInSelect() && rSh.TestCurrPam( aDocPos, true)) +const bool bInSelect = rSh.IsInSelect(); +if (!bInSelect && rSh.TestCurrPam(aDocPos, true)) //We are not selecting and aren't at a selection bStart = true; else if ( !g_bFrameDrag && rSh.IsSelFrameMode() && @@ -109,7 +110,7 @@ void SwEditWin::StartDrag( sal_Int8 /*nAction*/, const Point& rPosPixel ) else rSh.UnlockPaint(); } -else +else if (!bInSelect)// tdf#116384 only drag hyperlink if user's not currently setting the selection { SwContentAtPos aSwContentAtPos( IsAttrAtPos::InetAttr ); bStart = rSh.GetContentAtPos( aDocPos, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - comphelper/qa include/comphelper
comphelper/qa/unit/test_traceevent.cxx | 136 ++--- include/comphelper/traceevent.hxx | 61 +++--- 2 files changed, 121 insertions(+), 76 deletions(-) New commits: commit 096c9598d7f9dba153eb997db57c54c8c33d1823 Author: Tor Lillqvist AuthorDate: Wed Apr 28 17:27:50 2021 +0300 Commit: Tor Lillqvist CommitDate: Thu Apr 29 11:27:56 2021 +0200 Make the nested AsyncEvent work more reliably We must take into consideration that somebody might hold on to a hard reference to such an object. Thus it is not enough to drop the references to it from its parent, that is not necessarily enough to make it destruct. Instead have the parent explicitly cann a function on the children than generates their end events. Also add some documentation. Change-Id: I38180c85072c76af8964c48fa19132b8e1178ee1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114813 Tested-by: Jenkins Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114842 Tested-by: Jenkins CollaboraOffice diff --git a/comphelper/qa/unit/test_traceevent.cxx b/comphelper/qa/unit/test_traceevent.cxx index 226171b0e097..e170e8aaeb18 100644 --- a/comphelper/qa/unit/test_traceevent.cxx +++ b/comphelper/qa/unit/test_traceevent.cxx @@ -31,87 +31,99 @@ namespace { void trace_event_test() { -// When we start recording is off and this will not generate any 'X' event when we leave the scope -comphelper::ProfileZone aZone0("test0"); +std::shared_ptr pAsync7Locked; -// This will not generate any 'b' and 'e' events either -auto pAsync1(std::make_shared("async1")); - -std::weak_ptr pAsync2; { -// No 'X' by this either -comphelper::ProfileZone aZone1("block1"); +// When we start recording is off and this will not generate any 'X' event when we leave the scope +comphelper::ProfileZone aZone0("test0"); -// Now we turn on recording -comphelper::TraceEvent::startRecording(); +// This will not generate any 'b' and 'e' events either +auto pAsync1(std::make_shared("async1")); -// As this is nested in the parent that was created with recording turned off, -// this will not generate any 'b' and 'e' events either even if recording is now on. -pAsync2 = comphelper::AsyncEvent::createWithParent("async2in1", pAsync1); -} +std::weak_ptr pAsync2; +{ +// No 'X' by this either +comphelper::ProfileZone aZone1("block1"); -// This will generate an 'i' event for instant1 -comphelper::TraceEvent::addInstantEvent("instant1"); +// Now we turn on recording +comphelper::TraceEvent::startRecording(); -std::shared_ptr pAsync25; -{ -comphelper::ProfileZone aZone2("block2"); +// As this is nested in the parent that was created with recording turned off, +// this will not generate any 'b' and 'e' events either even if recording is now on. +pAsync2 = comphelper::AsyncEvent::createWithParent("async2in1", pAsync1); +} -// This does not generate any 'e' event as it was created when recording was off -// And the nested async2 object will thus not generate anything either -pAsync1.reset(); +// This will generate an 'i' event for instant1 +comphelper::TraceEvent::addInstantEvent("instant1"); -// This will generate 'b' event and an 'e' event when the pointer is reset or goes out of scope -pAsync25 = std::make_shared("async2.5"); +std::shared_ptr pAsync25; +{ +comphelper::ProfileZone aZone2("block2"); -// Leaving this scope will generate an 'X' event for block2 -} +// This does not generate any 'e' event as it was created when recording was off +// And the nested async2 object will thus not generate anything either +pAsync1.reset(); -// Verify that the weak_ptr to pAsync2 has expired as its parent pAsync1 has been finished off -CPPUNIT_ASSERT(pAsync2.expired()); +// This will generate 'b' event and an 'e' event when the pointer is reset or goes out of scope +pAsync25 = std::make_shared("async2.5"); -// This will generate a 'b' event for async3 -auto pAsync3(std::make_shared("async3")); +// Leaving this scope will generate an 'X' event for block2 +} -std::weak_ptr pAsync4; +// Verify that the weak_ptr to pAsync2 has expired as its parent pAsync1 has been finished off +CPPUNIT_ASSERT(pAsync2.expired()); -{ -comphelper::ProfileZone aZone3("block3"); +// This will generate a 'b' event for async3 +auto pAsync3(std::make_shared("async3")); -pAsync4 = comphelper::AsyncEvent::createWithParent("async4in3", pAsync3); +std::weak_ptr p
[Libreoffice-commits] core.git: comphelper/qa include/comphelper include/sal
comphelper/qa/unit/test_traceevent.cxx |7 +++ include/comphelper/profilezone.hxx | 14 +++--- include/sal/log-areas.dox |1 + 3 files changed, 19 insertions(+), 3 deletions(-) New commits: commit 7e8960caa8b49c75e4f1d21ebffe2378359fee69 Author: Tor Lillqvist AuthorDate: Thu Apr 29 11:07:18 2021 +0300 Commit: Tor Lillqvist CommitDate: Thu Apr 29 11:26:52 2021 +0200 Add SAL_WARN in case ProfileZones are overlapping and not hierarchical Change-Id: Id09904db762b6d931ab23cce16e55d5213079516 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114834 Tested-by: Jenkins Reviewed-by: Tor Lillqvist diff --git a/comphelper/qa/unit/test_traceevent.cxx b/comphelper/qa/unit/test_traceevent.cxx index e170e8aaeb18..29094b14f01b 100644 --- a/comphelper/qa/unit/test_traceevent.cxx +++ b/comphelper/qa/unit/test_traceevent.cxx @@ -122,6 +122,13 @@ void trace_event_test() // object that has already had its 'e' event generated. } +// This incorrect use of overlapping (not nested) ProfileZones +// will generate a SAL_WARN but should not crash +auto p1 = new comphelper::ProfileZone("error1"); +auto p2 = new comphelper::ProfileZone("error2"); +delete p1; +delete p2; + // Nothing is generated from this pAsync7Locked.reset(); } diff --git a/include/comphelper/profilezone.hxx b/include/comphelper/profilezone.hxx index 40e2ee97e502..8eda2d773ac0 100644 --- a/include/comphelper/profilezone.hxx +++ b/include/comphelper/profilezone.hxx @@ -12,6 +12,8 @@ #include +#include + #include // implementation of XToolkitExperimental profiling API @@ -70,10 +72,16 @@ public: if (m_nCreateTime > 0) { s_nNesting--; -assert(m_nNesting == s_nNesting); -if (s_bRecording) -addRecording(); +if (m_nNesting != s_nNesting) +{ +SAL_WARN("comphelper.traceevent", "Incorrect ProfileZone nesting for " << m_sName); +} +else +{ +if (s_bRecording) +addRecording(); +} if (m_bConsole) stopConsole(); diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox index c3b1a80a20b1..edd2da37d9d8 100644 --- a/include/sal/log-areas.dox +++ b/include/sal/log-areas.dox @@ -97,6 +97,7 @@ certain functionality. @li @c comphelper.container - EmbeddedObjectContainer @li @c comphelper.crypto @li @c comphelper.lok +@li @c comphelper.traceevent @section cppu ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sfx2/source
sfx2/source/control/charmapcontrol.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 1cbb39dc112117c4038ac63074c17154baa1d593 Author: Mike Kaganski AuthorDate: Wed Apr 28 11:25:18 2021 +0200 Commit: Xisco Fauli CommitDate: Thu Apr 29 11:07:18 2021 +0200 tdf#135997: fix toolbar control This is the same as fc7b4bfeba39a2479c9a2c9c8ef5ced5ab3c0de7, just for the toolbar control (the older one was for special character dialog). The problem was present since 800ac37021e3f8859a52c5eebca261a5d3bc5a11. Change-Id: Ib86aa7336a3078ff28b417de37fbd5bc492c85c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114719 Tested-by: Mike Kaganski Reviewed-by: Mike Kaganski (cherry picked from commit b27de500b1412bacefc7144b5222c307ca1ae0fe) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114731 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/sfx2/source/control/charmapcontrol.cxx b/sfx2/source/control/charmapcontrol.cxx index 56af57524a88..ce580f1618b7 100644 --- a/sfx2/source/control/charmapcontrol.cxx +++ b/sfx2/source/control/charmapcontrol.cxx @@ -128,7 +128,7 @@ void SfxCharmapCtrl::updateFavCharControl() { int i = 0; for ( std::deque< OUString >::iterator it = m_aFavCharList.begin(), it2 = m_aFavCharFontList.begin(); -it != m_aFavCharList.end() || it2 != m_aFavCharFontList.end(); +it != m_aFavCharList.end() && it2 != m_aFavCharFontList.end(); ++it, ++it2, i++) { m_aFavCharView[i].SetText(*it); @@ -160,7 +160,7 @@ void SfxCharmapCtrl::updateRecentCharControl() { int i = 0; for ( std::deque< OUString >::iterator it = m_aRecentCharList.begin(), it2 = m_aRecentCharFontList.begin(); -it != m_aRecentCharList.end() || it2 != m_aRecentCharFontList.end(); +it != m_aRecentCharList.end() && it2 != m_aRecentCharFontList.end(); ++it, ++it2, i++) { m_aRecentCharView[i].SetText(*it); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - configure.ac
configure.ac |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 640d3ef7e2b1981499d7519765ec7679e1fd9846 Author: Tor Lillqvist AuthorDate: Tue Jan 26 23:01:30 2021 +0200 Commit: Xisco Fauli CommitDate: Thu Apr 29 11:05:51 2021 +0200 Accept iOS SDK 14.5 We can also surely drop iOS SDKs 12.* now. Change-Id: I57bfcf40e823551021b58a74ef0e78a5781f5b0e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114806 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/configure.ac b/configure.ac index ce77ba849516..65fe7f890988 100644 --- a/configure.ac +++ b/configure.ac @@ -3415,8 +3415,8 @@ dnl === if test $_os = iOS; then AC_MSG_CHECKING([what iOS SDK to use]) -current_sdk_ver=14.3 -older_sdk_vers="14.2 14.1 14.0 13.7 13.6 13.5 13.4 13.2 13.1 13.0 12.4 12.2" +current_sdk_ver=14.5 +older_sdk_vers="14.4 14.3 14.2 14.1 14.0 13.7" if test "$enable_ios_simulator" = "yes"; then platform=iPhoneSimulator versionmin=-mios-simulator-version-min=12.2 ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: oox/source sd/qa
oox/source/drawingml/hyperlinkcontext.cxx |2 +- sd/qa/unit/data/pptx/tdf65724.pptx|binary sd/qa/unit/import-tests.cxx | 28 3 files changed, 29 insertions(+), 1 deletion(-) New commits: commit d0550d1c5d0e27b8fe9d93e2c7a6dc7ffc4f8c21 Author: Tibor Nagy AuthorDate: Thu Apr 15 12:12:47 2021 +0200 Commit: László Németh CommitDate: Thu Apr 29 11:03:09 2021 +0200 tdf#65724 PPTX import: fix internal hyperlink to slide Internal hyperlinks were lost, if they refer slides using their names. Change-Id: Ic464300adb1e6e50bd4d61d957306592b7b22b14 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114139 Tested-by: László Németh Reviewed-by: László Németh diff --git a/oox/source/drawingml/hyperlinkcontext.cxx b/oox/source/drawingml/hyperlinkcontext.cxx index 7ea5d5d10b53..0221e3875d31 100644 --- a/oox/source/drawingml/hyperlinkcontext.cxx +++ b/oox/source/drawingml/hyperlinkcontext.cxx @@ -96,7 +96,7 @@ HyperLinkContext::HyperLinkContext( ContextHandler2Helper const & rParent, } else if ( aPPAction.match( "hlinksldjump" ) ) { -sURL.clear(); +sHref = sURL; sal_Int32 nIndex2 = 0; while ( nIndex2 < sHref.getLength() ) diff --git a/sd/qa/unit/data/pptx/tdf65724.pptx b/sd/qa/unit/data/pptx/tdf65724.pptx new file mode 100644 index ..fef2d9f2dde7 Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf65724.pptx differ diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index cbe6c061d90e..bbdc8b5a19cd 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -119,6 +119,7 @@ public: virtual void setUp() override; void testDocumentLayout(); +void testInternalHyperlink(); void testHyperlinkColor(); void testSmoketest(); void testTdf131269(); @@ -236,6 +237,7 @@ public: CPPUNIT_TEST_SUITE(SdImportTest); CPPUNIT_TEST(testDocumentLayout); +CPPUNIT_TEST(testInternalHyperlink); CPPUNIT_TEST(testHyperlinkColor); CPPUNIT_TEST(testSmoketest); CPPUNIT_TEST(testTdf131269); @@ -429,6 +431,32 @@ void SdImportTest::testDocumentLayout() } } +void SdImportTest::testInternalHyperlink() +{ +::sd::DrawDocShellRef xDocShRef += loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf65724.pptx"), PPTX); + +uno::Reference< beans::XPropertySet > xShape( getShapeFromPage( 1, 0, xDocShRef ) ); + +// Get first paragraph +uno::Reference const xParagraph( getParagraphFromShape( 0, xShape ) ); + +// first chunk of text +uno::Reference xRun( getRunFromParagraph( 0, xParagraph ) ); +uno::Reference< beans::XPropertySet > xPropSet( xRun, uno::UNO_QUERY_THROW ); + +uno::Reference xField; +xPropSet->getPropertyValue("TextField") >>= xField; +CPPUNIT_ASSERT_MESSAGE("The text field is missing!", xField.is() ); + +xPropSet.set(xField, uno::UNO_QUERY); +OUString aURL; +xPropSet->getPropertyValue("URL") >>= aURL; +CPPUNIT_ASSERT_EQUAL_MESSAGE("URLs don't match", OUString("#Slide2"), aURL); + +xDocShRef->DoClose(); +} + void SdImportTest::testHyperlinkColor() { ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf137367.pptx"), PPTX); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: wizards/source
wizards/source/scriptforge/SF_PythonHelper.xba | 37 +-- wizards/source/scriptforge/python/scriptforge.py | 116 ++- 2 files changed, 101 insertions(+), 52 deletions(-) New commits: commit 225ee785520bbbee5b2d9bd63915db7197ee7ccc Author: Jean-Pierre Ledure AuthorDate: Wed Apr 28 17:16:43 2021 +0200 Commit: Jean-Pierre Ledure CommitDate: Thu Apr 29 11:02:47 2021 +0200 ScriptForge - (scriptforge.py) dates passed as UNO dates In replacement of the ISO format, to avoid any misinterpretation of strings containing accidentally a date, from now on, dates are exchanged between Basic and Python as com.sun.star.util.DateTime structures. The year boundaries are [1900 - ]. The code managing the Python-Basic protocol has been changed on both sides. The Basic service receives the - CDateFromUnoDateTime() - CDateToUnoDateTime() methods, equivalent with their Basic homonyms. Change-Id: Ib6ded20c24ff71d3349d242f72bd7b88f69a2661 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114815 Tested-by: Jean-Pierre Ledure Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure diff --git a/wizards/source/scriptforge/SF_PythonHelper.xba b/wizards/source/scriptforge/SF_PythonHelper.xba index 46c28293415b..b7d8141325b2 100644 --- a/wizards/source/scriptforge/SF_PythonHelper.xba +++ b/wizards/source/scriptforge/SF_PythonHelper.xba @@ -177,11 +177,15 @@ Check: SF_Utils._EnterFunction(cstThisSub, cstSubArgs) Try: - vDate = SF_Utils._CStrToDate(DateArg) + If VarType(DateArg) = V_OBJECT Then + vDate = CDateFromUnoDateTime(DateArg) + Else + vDate = SF_Utils._CStrToDate(DateArg) + End If vNewDate = DateAdd(Add, Count, vDate) Finally: - If VarType(vNewDate) = V_DATE Then PyDateAdd = SF_Utils._CDateToIso(vNewDate) Else PyDateAdd = vNewDate + If VarType(vNewDate) = V_DATE Then PyDateAdd = CDateToUnoDateTime(vNewDate) Else PyDateAdd = vNewDate SF_Utils._ExitFunction(cstThisSub) Exit Function Catch: @@ -219,8 +223,16 @@ Check: SF_Utils._EnterFunction(cstThisSub, cstSubArgs) Try: - vDate1 = SF_Utils._CStrToDate(Date1) - vDate2 = SF_Utils._CStrToDate(Date2) + If VarType(Date1) = V_OBJECT Then + vDate1 = CDateFromUnoDateTime(Date1) + Else + vDate1 = SF_Utils._CStrToDate(Date1) + End If + If VarType(Date2) = V_OBJECT Then + vDate2 = CDateFromUnoDateTime(Date2) + Else + vDate2 = SF_Utils._CStrToDate(Date2) + End If lDiff = DateDiff(Add, vDate1, vDate2, WeekStart, YearStart) @@ -261,7 +273,11 @@ Check: SF_Utils._EnterFunction(cstThisSub, cstSubArgs) Try: - vDate = SF_Utils._CStrToDate(DateArg) + If VarType(DateArg) = V_OBJECT Then + vDate = CDateFromUnoDateTime(DateArg) + Else + vDate = SF_Utils._CStrToDate(DateArg) + End If lPart = DatePart(Add, vDate, WeekStart, YearStart) @@ -297,7 +313,7 @@ Try: vDate = DateValue(DateArg) Finally: - If VarType(vDate) = V_DATE Then PyDateValue = SF_Utils._CDateToIso(vDate) Else PyDateValue = vDate + If VarType(vDate) = V_DATE Then PyDateValue = CDateToUnoDateTime(vDate) Else PyDateValue = vDate SF_Utils._ExitFunction(cstThisSub) Exit Function Catch: @@ -329,7 +345,7 @@ Check: SF_Utils._EnterFunction(cstThisSub, cstSubArgs) Try: - If VarType(Value) = V_DATE Then vValue = SF_Utils._CStrToDate(Value) ELse vValue = Value + If VarType(Value) = V_OBJECT Then vValue = CDateFromUnoDateTime(Value) ELse vValue = Value If IsEmpty(Pattern) Or Len(Pattern) = 0 Then sFormat = Str(vValue) Else sFormat = Format(vValue, Pattern) @@ -600,10 +616,9 @@ Check: vArg = Null ElseIf vArg = cstSymMissing Then Exit For' Next arguments must be missing also - ElseIf ( CallType And cstDateArg ) = cstDateArg Then' Arguments might be dates - vArg = SF_Utils._CStrToDate(vArg) - If vArg < 0 Then vArg = Args(i) ' Conversion of iso format failed => reset End If + ElseIf VarType(vArg) = V_OBJECT Then + If ( CallType And cstDateArg ) = cstDateArg Then vArg = CDateFromUnoDateTime(vArg) End If iNbArgs = iNbArgs + 1 @@ -810,7 +825,7 @@ Try: End If Else' Scalar or Nothing ReDim vReturnArray(0 To 1) - If VarType(vReturn) = V_DATE Then vReturnArray(0) = SF_Utils._CDateToIso(vReturn) Else vReturnArray(
Re: [Solved] Parameter for addShape for a child of a group in oox import
Hi all, Overnight, I found a much easier way. I only need to apply the rotation of the child shape around its center after applying the parent transformation. Please excuse me for bothering you with this problem. Kind regards Regina ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: include/vcl vcl/inc vcl/source vcl/unx
include/vcl/weld.hxx | 12 vcl/inc/salvtables.hxx|4 + vcl/source/app/salvtables.cxx | 39 --- vcl/unx/gtk3/gtk3gtkinst.cxx | 105 ++ 4 files changed, 113 insertions(+), 47 deletions(-) New commits: commit 5753386c2353ad4866e7c5dd9e8751ccaa58e93c Author: Caolán McNamara AuthorDate: Sat Apr 24 19:15:47 2021 +0100 Commit: Caolán McNamara CommitDate: Thu Apr 29 10:56:41 2021 +0200 allow push/pop multiple levels of freeze/thaw so can freely protect a block with freeze/thaw regardless of current freeze/thaw state Change-Id: I1bd60bfc02fe784e36ae371a737f4fdfb15a0888 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114615 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx index c055ee0e87b3..9821005fb9e6 100644 --- a/include/vcl/weld.hxx +++ b/include/vcl/weld.hxx @@ -284,7 +284,19 @@ public: virtual bool get_direction() const = 0; virtual void set_direction(bool bRTL) = 0; +/* Increases the freeze count on widget. + + If the freeze count is non-zero, emission of the widget's notifications + is stopped. The notifications are queued until the freeze count is + decreased to zero. Duplicate notifications may be squashed together. +*/ virtual void freeze() = 0; + +/* Reverts the effect of a previous call to freeze. + + The freeze count is decreased on the widget and when it reaches zero, + queued notifications are emitted. +*/ virtual void thaw() = 0; /* push/pop busy mouse cursor state diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx index f71ce7a055b2..c274b4bd234c 100644 --- a/vcl/inc/salvtables.hxx +++ b/vcl/inc/salvtables.hxx @@ -185,6 +185,7 @@ private: bool m_bKeyEventListener; bool m_bMouseEventListener; int m_nBlockNotify; +int m_nFreezeCount; protected: void ensure_event_listener(); @@ -198,6 +199,9 @@ protected: // so use this variant, we will need to filter them later void ensure_mouse_listener(); +bool IsFirstFreeze() const { return m_nFreezeCount == 0; } +bool IsLastThaw() const { return m_nFreezeCount == 1; } + virtual void HandleEventListener(VclWindowEvent& rEvent); virtual bool HandleKeyEventListener(VclWindowEvent& rEvent); virtual void HandleMouseEventListener(VclSimpleEvent& rEvent); diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 585fbebda541..f482d4ee7145 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -249,6 +249,7 @@ SalInstanceWidget::SalInstanceWidget(vcl::Window* pWidget, SalInstanceBuilder* p , m_bKeyEventListener(false) , m_bMouseEventListener(false) , m_nBlockNotify(0) +, m_nFreezeCount(0) { } @@ -484,9 +485,19 @@ bool SalInstanceWidget::get_direction() const { return m_xWidget->IsRTLEnabled() void SalInstanceWidget::set_direction(bool bRTL) { m_xWidget->EnableRTL(bRTL); } -void SalInstanceWidget::freeze() { m_xWidget->SetUpdateMode(false); } +void SalInstanceWidget::freeze() +{ +if (m_nFreezeCount == 0) +m_xWidget->SetUpdateMode(false); +++m_nFreezeCount; +} -void SalInstanceWidget::thaw() { m_xWidget->SetUpdateMode(true); } +void SalInstanceWidget::thaw() +{ +--m_nFreezeCount; +if (m_nFreezeCount == 0) +m_xWidget->SetUpdateMode(true); +} void SalInstanceWidget::set_busy_cursor(bool bBusy) { @@ -3704,15 +3715,23 @@ void SalInstanceTreeView::columns_autosize() void SalInstanceTreeView::freeze() { +bool bIsFirstFreeze = IsFirstFreeze(); SalInstanceWidget::freeze(); -m_xTreeView->SetUpdateMode(false); -m_xTreeView->GetModel()->EnableInvalidate(false); +if (bIsFirstFreeze) +{ +m_xTreeView->SetUpdateMode(false); +m_xTreeView->GetModel()->EnableInvalidate(false); +} } void SalInstanceTreeView::thaw() { -m_xTreeView->GetModel()->EnableInvalidate(true); -m_xTreeView->SetUpdateMode(true); +bool bIsLastThaw = IsLastThaw(); +if (bIsLastThaw) +{ +m_xTreeView->GetModel()->EnableInvalidate(true); +m_xTreeView->SetUpdateMode(true); +} SalInstanceWidget::thaw(); } @@ -5144,13 +5163,17 @@ SalInstanceIconView::SalInstanceIconView(::IconView* pIconView, SalInstanceBuild void SalInstanceIconView::freeze() { +bool bIsFirstFreeze = IsFirstFreeze(); SalInstanceWidget::freeze(); -m_xIconView->SetUpdateMode(false); +if (bIsFirstFreeze) +m_xIconView->SetUpdateMode(false); } void SalInstanceIconView::thaw() { -m_xIconView->SetUpdateMode(true); +bool bIsLastThaw = IsLastThaw(); +if (bIsLastThaw) +m_xIconView->SetUpdateMode(true); SalInstanceWidget::thaw(); } diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 43189617bf63..af252ea05bfa 100644 --- a/vcl/u
[Libreoffice-commits] core.git: Branch 'distro/nisz/libreoffice-7-0' - include/vcl vcl/source
include/vcl/treelistbox.hxx |1 vcl/source/treelist/treelistbox.cxx | 41 +++- 2 files changed, 41 insertions(+), 1 deletion(-) New commits: commit 23dc7994f0219db282e32bf77f36315174c98905 Author: Attila Szűcs AuthorDate: Fri Feb 26 21:09:10 2021 +0100 Commit: Gabor Kelemen CommitDate: Thu Apr 29 10:50:37 2021 +0200 tdf#140136 sc: fix tree list expansion in AutoFilter Now clicking on +/- buttons (i.e. before the checkbox) only expands/collapses the tree without toggling the associated checkboxes, using the new GetItemPos() to get the position (and width) of the checkbox in the actual list item. Regression from commit 2471d6f44c7e8ecbe86a90eeb593b899a08a7408 "tdf#116675 vcl tree list: toggle by label click (e.g. in AutoFilter)". Note: Use generic VCL plugin to test it on Linux: SAL_USE_VCLPLUGIN=gen instdir/program/soffice Co-authored-by: Tibor Nagy (NISZ) Change-Id: Iceb17bc9b235d297c313361429ee89f04d809e96 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111668 Tested-by: László Németh Reviewed-by: László Németh (cherry picked from commit 216f32464ccb0f096e5fdf77f82baf30ae7bab5f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112308 Tested-by: Jenkins Reviewed-by: Attila Szűcs Reviewed-by: Adolfo Jayme Barrientos Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114840 Tested-by: Gabor Kelemen Reviewed-by: Gabor Kelemen diff --git a/include/vcl/treelistbox.hxx b/include/vcl/treelistbox.hxx index 288314af8232..2da5fa5f41b2 100644 --- a/include/vcl/treelistbox.hxx +++ b/include/vcl/treelistbox.hxx @@ -673,6 +673,7 @@ public: voidInvalidateEntry( SvTreeListEntry* ); SvLBoxItem* GetItem( SvTreeListEntry*, long nX, SvLBoxTab** ppTab); SvLBoxItem* GetItem( SvTreeListEntry*, long nX ); +std::pair GetItemPos(SvTreeListEntry* pEntry, sal_uInt16 nTabIdx); voidSetDragDropMode( DragDropMode ); voidSetSelectionMode( SelectionMode ); diff --git a/vcl/source/treelist/treelistbox.cxx b/vcl/source/treelist/treelistbox.cxx index bbece8b674d9..6680f4828e0b 100644 --- a/vcl/source/treelist/treelistbox.cxx +++ b/vcl/source/treelist/treelistbox.cxx @@ -2343,7 +2343,7 @@ void SvTreeListBox::MouseButtonUp( const MouseEvent& rMEvt ) { SvLBoxButton* pItemCheckBox = static_cast(pEntry->GetFirstItem(SvLBoxItemType::Button)); -if (pItemCheckBox) +if (pItemCheckBox && GetItemPos(pEntry, 0).first < aPnt.X() - GetMapMode().GetOrigin().X()) { pItemCheckBox->ClickHdl(pEntry); InvalidateEntry(pEntry); @@ -3085,6 +3085,45 @@ SvLBoxItem* SvTreeListBox::GetItem_Impl( SvTreeListEntry* pEntry, long nX, return pItemClicked; } +std::pair SvTreeListBox::GetItemPos(SvTreeListEntry* pEntry, sal_uInt16 nTabIdx) +{ +sal_uInt16 nTabCount = aTabs.size(); +sal_uInt16 nItemCount = pEntry->ItemCount(); +if (nTabIdx >= nItemCount || nTabIdx >= nTabCount) +return std::make_pair(-1, -1); + +SvLBoxTab* pTab = aTabs.front().get(); +SvLBoxItem* pItem = &pEntry->GetItem(nTabIdx); +sal_uInt16 nNextItem = nTabIdx + 1; + +long nRealWidth = pImpl->GetOutputSize().Width(); +nRealWidth -= GetMapMode().GetOrigin().X(); + +SvLBoxTab* pNextTab = nNextItem < nTabCount ? aTabs[nNextItem].get() : nullptr; +long nStart = GetTabPos(pEntry, pTab); + +long nNextTabPos; +if (pNextTab) +nNextTabPos = GetTabPos(pEntry, pNextTab); +else +{ +nNextTabPos = nRealWidth; +if (nStart > nRealWidth) +nNextTabPos += 50; +} + +auto nItemWidth(pItem->GetWidth(this, pEntry)); +nStart += pTab->CalcOffset(nItemWidth, nNextTabPos - nStart); +auto nLen = nItemWidth; +if (pNextTab) +{ +long nTabWidth = GetTabPos(pEntry, pNextTab) - nStart; +if (nTabWidth < nLen) +nLen = nTabWidth; +} +return std::make_pair(nStart, nLen); +} + long SvTreeListBox::getPreferredDimensions(std::vector &rWidths) const { long nHeight = 0; ___ 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-6.2' - vcl/source
vcl/source/app/salvtables.cxx |3 ++- vcl/source/control/button.cxx |2 +- vcl/source/window/dialog.cxx |2 +- 3 files changed, 4 insertions(+), 3 deletions(-) New commits: commit 07c19a0c04305ce28612f45aef293f3f538b5535 Author: Szymon Kłos AuthorDate: Thu Dec 17 14:44:51 2020 +0100 Commit: Andras Timar CommitDate: Thu Apr 29 10:50:41 2021 +0200 lok: don't use focus window to request help Use clicked button instead - what leads to the correct window. If only focused window was taken into account sometimes it caused incorrect help link to be used. Change-Id: I645dc1ffa6a6d6d363ea5f9874fa830c441516c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107882 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos (cherry picked from commit 70f2fc7a10f41204e353bd3487377983a1018b53) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114728 Reviewed-by: Andras Timar diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index c47d46422b53..2b8474f5c0cf 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -53,6 +53,7 @@ #include #include #include +#include SalFrame::SalFrame() : m_pWindow(nullptr) @@ -3484,7 +3485,7 @@ void SalInstanceWindow::help() { //show help for widget with keyboard focus vcl::Window* pWidget = ImplGetSVData()->mpWinData->mpFocusWin; -if (!pWidget) +if (!pWidget || comphelper::LibreOfficeKit::isActive()) pWidget = m_xWindow; OString sHelpId = pWidget->GetHelpId(); while (sHelpId.isEmpty()) diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index 845c397b0eef..d9ce10ae4549 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -1846,7 +1846,7 @@ void HelpButton::Click() if ( !GetClickHdl() ) { vcl::Window* pFocusWin = Application::GetFocusWindow(); -if ( !pFocusWin ) +if ( !pFocusWin || comphelper::LibreOfficeKit::isActive() ) pFocusWin = this; HelpEvent aEvt( pFocusWin->GetPointerPosPixel(), HelpEventMode::CONTEXT ); diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index 209179cc9591..db183d7ca1d9 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -1421,7 +1421,7 @@ IMPL_LINK(Dialog, ResponseHdl, Button*, pButton, void) if (nResponse == RET_HELP) { vcl::Window* pFocusWin = Application::GetFocusWindow(); -if (!pFocusWin) +if (!pFocusWin || comphelper::LibreOfficeKit::isActive()) pFocusWin = pButton; HelpEvent aEvt(pFocusWin->GetPointerPosPixel(), HelpEventMode::CONTEXT); pFocusWin->RequestHelp(aEvt); ___ 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-6.2' - vcl/source
vcl/source/window/window.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 4e3186e82891c8a8108a45d31dea2a32472a2733 Author: Ashod Nakashian AuthorDate: Sun Nov 8 09:15:25 2020 -0500 Commit: Andras Timar CommitDate: Thu Apr 29 10:49:24 2021 +0200 vcl: lok: don't use window impl after destroy When destroying floating windows, accessing the GetLOKNotifier can segfault. The following is the stack-trace from such a case. /usr/bin/loolforkit(_ZN7SigUtil13dumpBacktraceEv+0x5e)[0x55cbf9da62fe] /usr/bin/loolforkit(+0x1d0af5)[0x55cbf9da6af5] /lib/x86_64-linux-gnu/libpthread.so.0(+0x128a0)[0x7fe0a125f8a0] /opt/collaboraoffice6.4/program/libmergedlo.so(_ZNK3vcl6Window14GetLOKNotifierEv+0x7)[0x7fe09e67b827] /opt/collaboraoffice6.4/program/libmergedlo.so(_ZN3vcl6Window24GetParentWithLOKNotifierEv+0x2b)[0x7fe09e67b86b] /opt/collaboraoffice6.4/program/libmergedlo.so(_ZN14FloatingWindow12StateChangedE16StateChangedType+0x43)[0x7fe09e609a13] /opt/collaboraoffice6.4/program/libmergedlo.so(_ZN3vcl6Window4ShowEb9ShowFlags+0x2ba)[0x7fe09e67cd5a] /opt/collaboraoffice6.4/program/libmergedlo.so(_Z21ImplDestroyHelpWindowR14ImplSVHelpDatab+0xe3)[0x7fe09e90c193] /opt/collaboraoffice6.4/program/libmergedlo.so(_ZN9Scheduler21ProcessTaskSchedulingEv+0x8ea)[0x7fe09e93817a] /opt/collaboraoffice6.4/program/libmergedlo.so(_ZN14SvpSalInstance12CheckTimeoutEb+0x107)[0x7fe09ea06807] /opt/collaboraoffice6.4/program/libmergedlo.so(_ZN14SvpSalInstance7DoYieldEbb+0x85)[0x7fe09ea06905] /opt/collaboraoffice6.4/program/libmergedlo.so(+0x2f5d6fb)[0x7fe09e94f6fb] /opt/collaboraoffice6.4/program/libmergedlo.so(_ZN11Application7ExecuteEv+0x45)[0x7fe09e950295] /opt/collaboraoffice6.4/program/libmergedlo.so(+0x1f6d545)[0x7fe09d95f545] /opt/collaboraoffice6.4/program/libmergedlo.so(_Z10ImplSVMainv+0x51)[0x7fe09e957321] /opt/collaboraoffice6.4/program/libmergedlo.so(soffice_main+0x98)[0x7fe09d980b88] /opt/collaboraoffice6.4/program/libmergedlo.so(+0x1f9e7c1)[0x7fe09d9907c1] /usr/bin/loolforkit(_Z10lokit_mainRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_S6_S6_S6_m+0x2562)[0x55cbf9d4c792] /usr/bin/loolforkit(+0x15fc77)[0x55cbf9d35c77] /usr/bin/loolforkit(_Z18forkLibreOfficeKitRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_S6_S6_i+0xb44)[0x55cbf9d36b24] /usr/bin/loolforkit(main+0x18a7)[0x55cbf9d00e17] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7)[0x7fe0a0e7db97] /usr/bin/loolforkit(_start+0x2a)[0x55cbf9d07efa] Change-Id: Ia467d51896d1ac657bde5ae2803fcb2557ebd3fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105445 Tested-by: Jenkins CollaboraOffice Reviewed-by: Michael Meeks (cherry picked from commit 5a3837034960327743154887732c4cae04cfc971) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114727 Reviewed-by: Andras Timar diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 10638fa43957..bf270d6f2ffb 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -3236,12 +3236,12 @@ void Window::ReleaseLOKNotifier() const vcl::ILibreOfficeKitNotifier* Window::GetLOKNotifier() const { -return mpWindowImpl->mpLOKNotifier; +return mpWindowImpl ? mpWindowImpl->mpLOKNotifier : nullptr; } vcl::LOKWindowId Window::GetLOKWindowId() const { -return mpWindowImpl->mnLOKWindowId; +return mpWindowImpl ? mpWindowImpl->mnLOKWindowId : 0; } VclPtr Window::GetParentWithLOKNotifier() ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/qa sd/source
sd/qa/unit/data/pptx/LostPlaceholder.odp |binary sd/qa/unit/export-tests-ooxml1.cxx | 35 ++- sd/source/filter/eppt/pptx-epptooxml.cxx | 17 +++ 3 files changed, 47 insertions(+), 5 deletions(-) New commits: commit b6b02e0b4c9d739836e1f61a886ea45b01e6696e Author: Attila Bakos (NISZ) AuthorDate: Tue Apr 20 13:02:44 2021 +0200 Commit: László Németh CommitDate: Thu Apr 29 10:48:27 2021 +0200 tdf#111903 tdf#137152 PPTX export: fix placeholders Empty placeholders were exported as white empty custom shapes, losing their visibility and usability. Note: export of properties hasn't been implemented, yet. Change-Id: Ie8bd6a611f5fb43bcaa55f6b2f5b07daf731b163 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114331 Tested-by: László Németh Reviewed-by: László Németh diff --git a/sd/qa/unit/data/pptx/LostPlaceholder.odp b/sd/qa/unit/data/pptx/LostPlaceholder.odp new file mode 100644 index ..80ead189f260 Binary files /dev/null and b/sd/qa/unit/data/pptx/LostPlaceholder.odp differ diff --git a/sd/qa/unit/export-tests-ooxml1.cxx b/sd/qa/unit/export-tests-ooxml1.cxx index fded47a1c2c9..0be65e22ee13 100644 --- a/sd/qa/unit/export-tests-ooxml1.cxx +++ b/sd/qa/unit/export-tests-ooxml1.cxx @@ -69,6 +69,7 @@ public: void testN828390_4(); void testN828390_5(); void testFdo71961(); +void testLostPlaceholders(); void testN828390(); void testBnc880763(); void testBnc862510_5(); @@ -122,6 +123,7 @@ public: CPPUNIT_TEST(testN828390_4); CPPUNIT_TEST(testN828390_5); CPPUNIT_TEST(testFdo71961); +CPPUNIT_TEST(testLostPlaceholders); CPPUNIT_TEST(testN828390); CPPUNIT_TEST(testBnc880763); CPPUNIT_TEST(testBnc862510_5); @@ -370,6 +372,37 @@ void SdOOXMLExportTest1::testN828390_5() xDocShRef->DoClose(); } +void SdOOXMLExportTest1::testLostPlaceholders() +{ +::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/LostPlaceholder.odp"), ODP); +CPPUNIT_ASSERT(xDocShRef.is()); + +xDocShRef = saveAndReload( xDocShRef.get(), PPTX ); +CPPUNIT_ASSERT(xDocShRef.is()); + +auto pDoc = xDocShRef->GetDoc(); +CPPUNIT_ASSERT(pDoc); +auto pPage = pDoc->GetPage(1); +CPPUNIT_ASSERT(pPage); +auto pObj = pPage->GetObj(1); +CPPUNIT_ASSERT(pObj); +uno::Reference xShp (pObj->getUnoShape(), uno::UNO_QUERY); +CPPUNIT_ASSERT(xShp); + +CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong ShapeType!", OUString(u"com.sun.star.presentation.OutlinerShape"), xShp->getShapeType()); +uno::Reference xShpProps(xShp, uno::UNO_QUERY); +// Without the fix in place there will be the following error: +// Expected: com.sun.star.presentation.OutlinerShape +// Actual: com.sun.star.drawing.CustomShape + +CPPUNIT_ASSERT_EQUAL_MESSAGE("It must be a placeholder!", true, xShpProps->getPropertyValue("IsPresentationObject").get()); +// Without the fix in place this will the following: +// Expected: true +// Actual: false + +xDocShRef->DoClose(); +} + void SdOOXMLExportTest1::testFdo71961() { ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/fdo71961.odp"), ODP); @@ -379,7 +412,7 @@ void SdOOXMLExportTest1::testFdo71961() // Export to .pptx changes all text frames to custom shape objects, which obey TextWordWrap property // (which is false for text frames otherwise and is ignored). Check that frames that should wrap still do. -SdrObjCustomShape *pTxtObj = dynamic_cast( pPage->GetObj( 1 )); +auto pTxtObj = pPage->GetObj( 1 ); CPPUNIT_ASSERT_MESSAGE( "no text object", pTxtObj != nullptr); CPPUNIT_ASSERT_EQUAL( OUString( "Text to be always wrapped" ), pTxtObj->GetOutlinerParaObject()->GetTextObject().GetText(0)); CPPUNIT_ASSERT_EQUAL( true, pTxtObj->GetMergedItem(SDRATTR_TEXT_WORDWRAP).GetValue()); diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index d87f51a07712..fa1a55ac6b5f 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -1439,13 +1439,22 @@ ShapeExport& PowerPointShapeExport::WritePageShape(const Reference< XShape >& xS bool PowerPointShapeExport::WritePlaceholder(const Reference< XShape >& xShape, PlaceholderType ePlaceholder, bool bMaster) { SAL_INFO("sd.eppt", "WritePlaceholder " << bMaster << " " << ShapeExport::NonEmptyText(xShape)); -if (bMaster && ShapeExport::NonEmptyText(xShape)) +if (!xShape) +return false; +try { -WritePlaceholderShape(xShape, ePlaceholder); +Reference xShapeProps(xShape, UNO_QUERY); +if (xShapeProps->getPropertyValue("IsPresentationObject").get()) +{ +WritePlaceholderShape(xShape, ePlaceholder); -return true; +return true; +} +} +catch (Except
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - comphelper/qa include/comphelper
comphelper/qa/unit/test_traceevent.cxx | 93 + include/comphelper/traceevent.hxx | 18 +- 2 files changed, 76 insertions(+), 35 deletions(-) New commits: commit e8c48afa77eb89ce34b03c559b279277384e28ae Author: Tor Lillqvist AuthorDate: Wed Apr 28 12:19:35 2021 +0300 Commit: Tor Lillqvist CommitDate: Thu Apr 29 10:39:42 2021 +0200 Add AsyncEvent::finish() to end a nested AsyncEvent before its parent ends Add unit testing of that, too. Change-Id: Iae5fb6da0b7fcabe8f555d800f065b6f5b4b9982 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114800 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tor Lillqvist diff --git a/comphelper/qa/unit/test_traceevent.cxx b/comphelper/qa/unit/test_traceevent.cxx index 11e1f0b3a2e8..226171b0e097 100644 --- a/comphelper/qa/unit/test_traceevent.cxx +++ b/comphelper/qa/unit/test_traceevent.cxx @@ -31,66 +31,87 @@ namespace { void trace_event_test() { -// When we start recording is off and this will not generate any 'X' event -comphelper::ProfileZone aZone0("test().0"); +// When we start recording is off and this will not generate any 'X' event when we leave the scope +comphelper::ProfileZone aZone0("test0"); // This will not generate any 'b' and 'e' events either -auto pAsync1(std::make_shared("async 1")); +auto pAsync1(std::make_shared("async1")); std::weak_ptr pAsync2; { // No 'X' by this either -comphelper::ProfileZone aZone1("block 1"); +comphelper::ProfileZone aZone1("block1"); // Now we turn on recording comphelper::TraceEvent::startRecording(); // As this is nested in the parent that was created with recording turned off, -// this will not generate any 'b' and 'e' events either -pAsync2 = comphelper::AsyncEvent::createWithParent("async 2", pAsync1); +// this will not generate any 'b' and 'e' events either even if recording is now on. +pAsync2 = comphelper::AsyncEvent::createWithParent("async2in1", pAsync1); } -// This will generate an 'i' event -comphelper::TraceEvent::addInstantEvent("instant 1"); +// This will generate an 'i' event for instant1 +comphelper::TraceEvent::addInstantEvent("instant1"); std::shared_ptr pAsync25; { -comphelper::ProfileZone aZone2("block 2"); +comphelper::ProfileZone aZone2("block2"); // This does not generate any 'e' event as it was created when recording was off -// And the nested "async 2" object will thus not generate anything either +// And the nested async2 object will thus not generate anything either pAsync1.reset(); // This will generate 'b' event and an 'e' event when the pointer is reset or goes out of scope -pAsync25 = std::make_shared("async 2.5"); +pAsync25 = std::make_shared("async2.5"); -// Leaving this scope will generate an 'X' event for "block 2" +// Leaving this scope will generate an 'X' event for block2 } // Verify that the weak_ptr to pAsync2 has expired as its parent pAsync1 has been finished off CPPUNIT_ASSERT(pAsync2.expired()); -// This will generate a 'b' event -auto pAsync3(std::make_shared("async 3")); +// This will generate a 'b' event for async3 +auto pAsync3(std::make_shared("async3")); std::weak_ptr pAsync4; + { -comphelper::ProfileZone aZone3("block 3"); +comphelper::ProfileZone aZone3("block3"); -pAsync4 = comphelper::AsyncEvent::createWithParent("async 4", pAsync3); +pAsync4 = comphelper::AsyncEvent::createWithParent("async4in3", pAsync3); -// Leaving this scope will generate an 'X' event for "block 3" +// Leaving this scope will generate an 'X' event for block3 } -// This will generate an 'e' event for "async 2.5" +// This will generate an 'e' event for async2.5 pAsync25.reset(); -comphelper::ProfileZone aZone4("test().2"); +comphelper::ProfileZone aZone4("test2"); + +// This will generate an 'i' event for instant2" +comphelper::TraceEvent::addInstantEvent("instant2"); + +std::weak_ptr pAsync5; +{ +auto pAsync4Locked = pAsync4.lock(); +CPPUNIT_ASSERT(pAsync4Locked); +// This will generate a 'b' event for async5in4 +pAsync5 = comphelper::AsyncEvent::createWithParent("async5in4", pAsync4Locked); +} + +CPPUNIT_ASSERT(!pAsync5.expired()); + +// This will generate a 'b' event for async6in5 +std::weak_ptr pAsync6( +comphelper::AsyncEvent::createWithParent("async6in5", pAsync5.lock())); +CPPUNIT_ASSERT(!pAsync6.expired()); + +// This will generate an 'e' event for async6in5 and async5in4 +pAsync5.lock()->finish(); -// This will generate an 'i' event -comphelper::TraceEvent::addInstantEvent("instant 2"); +CPPUNIT_ASSERT(pAsy
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - comphelper/CppunitTest_comphelper_test.mk comphelper/qa comphelper/source include/comphelper
comphelper/CppunitTest_comphelper_test.mk |1 comphelper/qa/unit/test_traceevent.cxx| 121 ++ comphelper/source/misc/traceevent.cxx | 31 +++ include/comphelper/profilezone.hxx|5 - include/comphelper/traceevent.hxx | 115 5 files changed, 251 insertions(+), 22 deletions(-) New commits: commit 7d83006821fe4bfbe5e5aabc45e7d4e2731c Author: Tor Lillqvist AuthorDate: Tue Apr 27 18:43:16 2021 +0300 Commit: Tor Lillqvist CommitDate: Thu Apr 29 10:39:09 2021 +0200 Introduce Async trace events and a unit test Async events are ones that emit separate 'b' (begin) and 'e' (end) traces. (Compare to the Complete event that emit a single 'X' trace that contains both the start timstamp and the duration.) There are two kinds of Async events: Freestanding ones that are not related to other events at all, and nested ones that have to be nested between the 'b' and 'e' events of a parent Async event. Still needs some work, at least a way to end a nested AsyncEvent (cause it to emit the 'e' event) before it gets destructed thanks to the parent being destructed. Change-Id: I3721fa701ad32639b1edc1cfa8db7acde5caf9b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114798 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tor Lillqvist diff --git a/comphelper/CppunitTest_comphelper_test.mk b/comphelper/CppunitTest_comphelper_test.mk index ef795f1664d1..de4ee90818f2 100644 --- a/comphelper/CppunitTest_comphelper_test.mk +++ b/comphelper/CppunitTest_comphelper_test.mk @@ -16,6 +16,7 @@ $(eval $(call gb_CppunitTest_add_exception_objects,comphelper_test, \ comphelper/qa/unit/base64_test \ comphelper/qa/unit/types_test \ comphelper/qa/unit/test_guards \ +comphelper/qa/unit/test_traceevent \ )) $(eval $(call gb_CppunitTest_use_sdk_api,comphelper_test)) diff --git a/comphelper/qa/unit/test_traceevent.cxx b/comphelper/qa/unit/test_traceevent.cxx new file mode 100644 index ..e7e97b2032a5 --- /dev/null +++ b/comphelper/qa/unit/test_traceevent.cxx @@ -0,0 +1,121 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * 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/. + */ + +#include + +#include +#include + +#include + +#include +#include + +class TestTraceEvent : public CppUnit::TestFixture +{ +public: +void test(); + +CPPUNIT_TEST_SUITE(TestTraceEvent); +CPPUNIT_TEST(test); +CPPUNIT_TEST_SUITE_END(); +}; + +namespace +{ +void trace_event_test() +{ +// When we start recording is off and this will not generate any 'X' event +comphelper::ProfileZone aZone0("test().0"); + +// This will not generate any 'b' and 'e' events either +auto pAsync1(std::make_shared("async 1")); + +std::weak_ptr pAsync2; +{ +// No 'X' by this either +comphelper::ProfileZone aZone1("block 1"); + +// Now we turn on recording +comphelper::TraceEvent::startRecording(); + +// As this is nested in the parent that was created with recording turned off, +// this will not generate any 'b' and 'e' events either +pAsync2 = comphelper::AsyncEvent::createWithParent("async 2", pAsync1); +} + +// This will generate an 'i' event +comphelper::TraceEvent::addInstantEvent("instant 1"); + +std::shared_ptr pAsync25; +{ +comphelper::ProfileZone aZone2("block 2"); + +// This does not generate any 'e' event as it was created when recording was off +// And the nested "async 2" object will thus not generate anything either +pAsync1.reset(); + +// This will generate 'b' event and an 'e' event when the pointer is reset or goes out of scope +pAsync25 = std::make_shared("async 2.5"); + +// Leaving this scope will generate an 'X' event for "block 2" +} + +// Verify that the weak_ptr to pAsync2 has expired as its parent pAsync1 has been finished off +CPPUNIT_ASSERT(pAsync2.expired()); + +// This will generate a 'b' event +auto pAsync3(std::make_shared("async 3")); + +std::weak_ptr pAsync4; +{ +comphelper::ProfileZone aZone3("block 3"); + +pAsync4 = comphelper::AsyncEvent::createWithParent("async 4", pAsync3); + +// Leaving this scope will generate an 'X' event for "block 3" +} + +// This will generate an 'e' event for "async 2.5" +pAsync25.reset(); + +comphelper::ProfileZone aZone4("test().2"); + +// This will generate an 'i' event +comphelper::TraceEvent::addInstantEvent("instant 2"); + +// Leaving this scope will generate 'X' events for "test().2" and a 'e' event for pAsync4
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - comphelper/qa include/comphelper
comphelper/qa/unit/test_traceevent.cxx | 12 ++-- include/comphelper/traceevent.hxx |4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) New commits: commit b20ebb0c057e7d05a74e827fc215839283bebb50 Author: Tor Lillqvist AuthorDate: Wed Apr 28 12:01:06 2021 +0300 Commit: Tor Lillqvist CommitDate: Thu Apr 29 10:39:25 2021 +0200 Fix syntax error in generated JSON Change-Id: I035a86aa587302985416e65dc6063090f99b49b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114799 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tor Lillqvist diff --git a/comphelper/qa/unit/test_traceevent.cxx b/comphelper/qa/unit/test_traceevent.cxx index e7e97b2032a5..11e1f0b3a2e8 100644 --- a/comphelper/qa/unit/test_traceevent.cxx +++ b/comphelper/qa/unit/test_traceevent.cxx @@ -104,16 +104,16 @@ void TestTraceEvent::test() } CPPUNIT_ASSERT(aEvents[0].startsWith("{\"name:\"instant 1\",\"ph\":\"i\",")); -CPPUNIT_ASSERT(aEvents[1].startsWith("{\"name\":\"async 2.5\",\"ph\":\"b\",\"id\":1\",")); +CPPUNIT_ASSERT(aEvents[1].startsWith("{\"name\":\"async 2.5\",\"ph\":\"b\",\"id\":1,")); CPPUNIT_ASSERT(aEvents[2].startsWith("{\"name\":\"block 2\",\"ph\":\"X\",")); -CPPUNIT_ASSERT(aEvents[3].startsWith("{\"name\":\"async 3\",\"ph\":\"b\",\"id\":2\",")); -CPPUNIT_ASSERT(aEvents[4].startsWith("{\"name\":\"async 4\",\"ph\":\"b\",\"id\":2\",")); +CPPUNIT_ASSERT(aEvents[3].startsWith("{\"name\":\"async 3\",\"ph\":\"b\",\"id\":2,")); +CPPUNIT_ASSERT(aEvents[4].startsWith("{\"name\":\"async 4\",\"ph\":\"b\",\"id\":2,")); CPPUNIT_ASSERT(aEvents[5].startsWith("{\"name\":\"block 3\",\"ph\":\"X\",")); -CPPUNIT_ASSERT(aEvents[6].startsWith("{\"name\":\"async 2.5\",\"ph\":\"e\",\"id\":1\",")); +CPPUNIT_ASSERT(aEvents[6].startsWith("{\"name\":\"async 2.5\",\"ph\":\"e\",\"id\":1,")); CPPUNIT_ASSERT(aEvents[7].startsWith("{\"name:\"instant 2\",\"ph\":\"i\",")); CPPUNIT_ASSERT(aEvents[8].startsWith("{\"name\":\"test().2\",\"ph\":\"X\"")); -CPPUNIT_ASSERT(aEvents[9].startsWith("{\"name\":\"async 4\",\"ph\":\"e\",\"id\":2\",")); -CPPUNIT_ASSERT(aEvents[10].startsWith("{\"name\":\"async 3\",\"ph\":\"e\",\"id\":2\",")); +CPPUNIT_ASSERT(aEvents[9].startsWith("{\"name\":\"async 4\",\"ph\":\"e\",\"id\":2,")); +CPPUNIT_ASSERT(aEvents[10].startsWith("{\"name\":\"async 3\",\"ph\":\"e\",\"id\":2,")); } CPPUNIT_TEST_SUITE_REGISTRATION(TestTraceEvent); diff --git a/include/comphelper/traceevent.hxx b/include/comphelper/traceevent.hxx index 3d3c748ec278..33eaf04c7047 100644 --- a/include/comphelper/traceevent.hxx +++ b/include/comphelper/traceevent.hxx @@ -104,7 +104,7 @@ class COMPHELPER_DLLPUBLIC AsyncEvent : public NamedEvent, "," "\"id\":" + OUString::number(m_nId) - + "\"," + + "," "\"ts\":" + OUString::number(nNow) + "," @@ -139,7 +139,7 @@ public: "," "\"id\":" + OUString::number(m_nId) - + "\"," + + "," "\"ts\":" + OUString::number(nNow) + "," ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - comphelper/source include/comphelper
comphelper/source/misc/traceevent.cxx |8 include/comphelper/profilezone.hxx|7 +++ include/comphelper/traceevent.hxx | 15 ++- 3 files changed, 21 insertions(+), 9 deletions(-) New commits: commit c7536b17a3bad0b493f940116127e06cf69694c1 Author: Tor Lillqvist AuthorDate: Tue Apr 27 16:42:15 2021 +0300 Commit: Tor Lillqvist CommitDate: Thu Apr 29 10:38:50 2021 +0200 Introduce a new class NamedEvent to be used by the upcoming AsyncEvent, too Don't use the term "profile id" as what we mean is the event *name* (as used in the Chrome Trace Event format). Change-Id: Id58a10f4c5f8a095ae75b9bf74131b70659ee701 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114797 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tor Lillqvist diff --git a/comphelper/source/misc/traceevent.cxx b/comphelper/source/misc/traceevent.cxx index efe1378d9364..9febf71e2db7 100644 --- a/comphelper/source/misc/traceevent.cxx +++ b/comphelper/source/misc/traceevent.cxx @@ -42,7 +42,7 @@ void TraceEvent::addRecording(const OUString& sObject) g_aRecording.emplace_back(sObject); } -void TraceEvent::addInstantEvent(const char* sProfileId) +void TraceEvent::addInstantEvent(const char* sName) { TimeValue aSystemTime; osl_getSystemTime(&aSystemTime); @@ -57,7 +57,7 @@ void TraceEvent::addInstantEvent(const char* sProfileId) addRecording("{" "\"name:\"" - + OUString(sProfileId, strlen(sProfileId), RTL_TEXTENCODING_UTF8) + + OUString(sName, strlen(sName), RTL_TEXTENCODING_UTF8) + "\"," "\"ph\":\"i\"," "\"ts\":" @@ -106,7 +106,7 @@ void ProfileZone::addRecording() // Generate a single "Complete Event" (type X) TraceEvent::addRecording("{" "\"name\":\"" - + OUString(m_sProfileId, strlen(m_sProfileId), RTL_TEXTENCODING_UTF8) + + OUString(m_sName, strlen(m_sName), RTL_TEXTENCODING_UTF8) + "\"," "\"ph\":\"X\"," "\"ts\":" @@ -125,7 +125,7 @@ void ProfileZone::addRecording() void ProfileZone::stopConsole() { sal_uInt32 nEndTime = osl_getGlobalTimer(); -std::cerr << "comphelper::ProfileZone: " << m_sProfileId << " finished in " +std::cerr << "comphelper::ProfileZone: " << m_sName << " finished in " << nEndTime - m_nCreateTime << " ms" << std::endl; } diff --git a/include/comphelper/profilezone.hxx b/include/comphelper/profilezone.hxx index 767a00de08e0..e1597db66b61 100644 --- a/include/comphelper/profilezone.hxx +++ b/include/comphelper/profilezone.hxx @@ -18,11 +18,10 @@ namespace comphelper { -class COMPHELPER_DLLPUBLIC ProfileZone : public TraceEvent +class COMPHELPER_DLLPUBLIC ProfileZone : public NamedEvent { static int s_nNesting; // level of nested zones. -const char *m_sProfileId; long long m_nCreateTime; bool m_bConsole; void stopConsole(); @@ -48,8 +47,8 @@ class COMPHELPER_DLLPUBLIC ProfileZone : public TraceEvent * Similar to the DEBUG macro in sal/log.hxx, don't forget to remove these lines before * committing. */ -ProfileZone(const char* sProfileId, bool bConsole = false) -: m_sProfileId(sProfileId ? sProfileId : "(null)") +ProfileZone(const char* sName, bool bConsole = false) +: NamedEvent(sName) , m_bConsole(bConsole) { if (s_bRecording || m_bConsole) diff --git a/include/comphelper/traceevent.hxx b/include/comphelper/traceevent.hxx index ff66a834e639..7e988bd063f0 100644 --- a/include/comphelper/traceevent.hxx +++ b/include/comphelper/traceevent.hxx @@ -13,6 +13,8 @@ #include #include +#include +#include #include #include @@ -32,7 +34,7 @@ protected: static void addRecording(const OUString& sObject); public: -static void addInstantEvent(const char* sProfileId); +static void addInstantEvent(const char* sName); static void startRecording(); static void stopRecording(); @@ -40,6 +42,17 @@ public: static css::uno::Sequence getRecordingAndClear(); }; +class COMPHELPER_DLLPUBLIC NamedEvent : public TraceEvent +{ +protected: +const char* m_sName; + +NamedEvent(const char* sName) +: m_sName(sName ? sName : "(null)") +{ +} +}; + } // namespace comphelper #endif // INCLUDED_COMPHELPER_TRACEEVENT_HXX ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - comphelper/source
comphelper/source/misc/traceevent.cxx |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit 7a3d898a4391e092196d661c9fe3a4fb8df3e22b Author: Tor Lillqvist AuthorDate: Tue Apr 27 14:02:43 2021 +0300 Commit: Tor Lillqvist CommitDate: Thu Apr 29 10:38:33 2021 +0200 Enable turning on trace event recording in a dbgutil build with an env var Change-Id: Ie0efdd2d5da0a45ba5e82be455d36dc777b5efb9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114796 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tor Lillqvist diff --git a/comphelper/source/misc/traceevent.cxx b/comphelper/source/misc/traceevent.cxx index 2cd2db829169..efe1378d9364 100644 --- a/comphelper/source/misc/traceevent.cxx +++ b/comphelper/source/misc/traceevent.cxx @@ -22,8 +22,11 @@ namespace comphelper { +#ifdef DBG_UTIL +std::atomic TraceEvent::s_bRecording = (getenv("TRACE_EVENT_RECORDING") != nullptr); +#else std::atomic TraceEvent::s_bRecording = false; - +#endif int ProfileZone::s_nNesting = 0; namespace ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - comphelper/source include/comphelper
comphelper/source/misc/traceevent.cxx |3 +-- include/comphelper/profilezone.hxx| 26 ++ include/comphelper/traceevent.hxx |1 - 3 files changed, 15 insertions(+), 15 deletions(-) New commits: commit b9c12bcf9b442e43fbc535c30caab513d07b9067 Author: Tor Lillqvist AuthorDate: Tue Apr 27 13:32:19 2021 +0300 Commit: Tor Lillqvist CommitDate: Thu Apr 29 10:38:01 2021 +0200 Re-think what the nesting means in ProfileZones The "Complete" type of Trace Events should be properly nested. Use the nesting counter to verify that. Add a nesting level indication to the ProfileZone object. Assert that it is used properly. Change-Id: I3a1f0e55ea6054dab9baf8550097446f07b0fbf3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114795 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tor Lillqvist diff --git a/comphelper/source/misc/traceevent.cxx b/comphelper/source/misc/traceevent.cxx index 325ba59b131d..2cd2db829169 100644 --- a/comphelper/source/misc/traceevent.cxx +++ b/comphelper/source/misc/traceevent.cxx @@ -24,7 +24,7 @@ namespace comphelper { std::atomic TraceEvent::s_bRecording = false; -int TraceEvent::s_nNesting = 0; // level of overlapped zones +int ProfileZone::s_nNesting = 0; namespace { @@ -70,7 +70,6 @@ void TraceEvent::addInstantEvent(const char* sProfileId) void TraceEvent::startRecording() { ::osl::MutexGuard aGuard(g_aMutex); -s_nNesting = 0; s_bRecording = true; } diff --git a/include/comphelper/profilezone.hxx b/include/comphelper/profilezone.hxx index b401ddbdc6be..767a00de08e0 100644 --- a/include/comphelper/profilezone.hxx +++ b/include/comphelper/profilezone.hxx @@ -20,11 +20,14 @@ namespace comphelper { class COMPHELPER_DLLPUBLIC ProfileZone : public TraceEvent { +static int s_nNesting; // level of nested zones. + const char *m_sProfileId; long long m_nCreateTime; bool m_bConsole; void stopConsole(); int m_nPid; +int m_nNesting; void addRecording(); @@ -54,31 +57,30 @@ class COMPHELPER_DLLPUBLIC ProfileZone : public TraceEvent TimeValue systemTime; osl_getSystemTime( &systemTime ); m_nCreateTime = static_cast(systemTime.Seconds) * 100 + systemTime.Nanosec/1000; -} -else -m_nCreateTime = 0; -if (s_bRecording) -{ oslProcessInfo aProcessInfo; aProcessInfo.Size = sizeof(oslProcessInfo); if (osl_getProcessInfo(nullptr, osl_Process_IDENTIFIER, &aProcessInfo) == osl_Process_E_None) m_nPid = aProcessInfo.Ident; -s_nNesting++; +m_nNesting = s_nNesting++; } +else +m_nCreateTime = 0; } ~ProfileZone() { -if (s_bRecording) +if (m_nCreateTime > 0) { s_nNesting--; -addRecording(); -} -if (m_bConsole) -{ -stopConsole(); +assert(m_nNesting == s_nNesting); + +if (s_bRecording) +addRecording(); + +if (m_bConsole) +stopConsole(); } } diff --git a/include/comphelper/traceevent.hxx b/include/comphelper/traceevent.hxx index 14e25da9b791..ff66a834e639 100644 --- a/include/comphelper/traceevent.hxx +++ b/include/comphelper/traceevent.hxx @@ -28,7 +28,6 @@ class COMPHELPER_DLLPUBLIC TraceEvent { protected: static std::atomic s_bRecording; // true during recording -static int s_nNesting; static void addRecording(const OUString& sObject); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - comphelper/source include/comphelper
comphelper/source/misc/traceevent.cxx |2 -- include/comphelper/profilezone.hxx| 14 ++ 2 files changed, 6 insertions(+), 10 deletions(-) New commits: commit 2f5c9ab2c95c6489121206a56da7e76d6fc745d8 Author: Tor Lillqvist AuthorDate: Tue Apr 27 11:14:07 2021 +0300 Commit: Tor Lillqvist CommitDate: Thu Apr 29 10:37:41 2021 +0200 Make the console logging in ProfileZone work more sanely Do not re-assing a value to the m_nCreateTime if bConsole is true. Just use the same code that sets it in the constructor as in the case when recording is on. Change-Id: I1ca3c5aa00e2f8f0faa7ca3433e1eb066413c2a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114794 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tor Lillqvist diff --git a/comphelper/source/misc/traceevent.cxx b/comphelper/source/misc/traceevent.cxx index 6e86c3f03993..325ba59b131d 100644 --- a/comphelper/source/misc/traceevent.cxx +++ b/comphelper/source/misc/traceevent.cxx @@ -120,8 +120,6 @@ void ProfileZone::addRecording() + OUString::number(osl_getThreadIdentifier(nullptr)) + "},"); } -void ProfileZone::startConsole() { m_nCreateTime = osl_getGlobalTimer(); } - void ProfileZone::stopConsole() { sal_uInt32 nEndTime = osl_getGlobalTimer(); diff --git a/include/comphelper/profilezone.hxx b/include/comphelper/profilezone.hxx index 7525b6322152..b401ddbdc6be 100644 --- a/include/comphelper/profilezone.hxx +++ b/include/comphelper/profilezone.hxx @@ -23,7 +23,6 @@ class COMPHELPER_DLLPUBLIC ProfileZone : public TraceEvent const char *m_sProfileId; long long m_nCreateTime; bool m_bConsole; -void startConsole(); void stopConsole(); int m_nPid; @@ -50,12 +49,17 @@ class COMPHELPER_DLLPUBLIC ProfileZone : public TraceEvent : m_sProfileId(sProfileId ? sProfileId : "(null)") , m_bConsole(bConsole) { -if (s_bRecording) +if (s_bRecording || m_bConsole) { TimeValue systemTime; osl_getSystemTime( &systemTime ); m_nCreateTime = static_cast(systemTime.Seconds) * 100 + systemTime.Nanosec/1000; +} +else +m_nCreateTime = 0; +if (s_bRecording) +{ oslProcessInfo aProcessInfo; aProcessInfo.Size = sizeof(oslProcessInfo); if (osl_getProcessInfo(nullptr, osl_Process_IDENTIFIER, &aProcessInfo) == osl_Process_E_None) @@ -63,12 +67,6 @@ class COMPHELPER_DLLPUBLIC ProfileZone : public TraceEvent s_nNesting++; } -else -m_nCreateTime = 0; -if (m_bConsole) -{ -startConsole(); -} } ~ProfileZone() ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - comphelper/source desktop/source include/comphelper toolkit/source
comphelper/source/misc/traceevent.cxx | 36 +- desktop/source/lib/init.cxx |8 +++ include/comphelper/profilezone.hxx|5 include/comphelper/traceevent.hxx |5 toolkit/source/awt/vclxtoolkit.cxx|4 +-- 5 files changed, 29 insertions(+), 29 deletions(-) New commits: commit 3ed51f7b24eac38e4263da8d5bfa10ab6e6d3161 Author: Tor Lillqvist AuthorDate: Tue Apr 27 10:48:09 2021 +0300 Commit: Tor Lillqvist CommitDate: Thu Apr 29 10:37:22 2021 +0200 Move some static functions from ProfileZone to TraceEvent where they belong Change-Id: I35f3d5d8c0a69a224cf7d3a2decba9c8e13c7dc1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114792 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tor Lillqvist diff --git a/comphelper/source/misc/traceevent.cxx b/comphelper/source/misc/traceevent.cxx index aa99e8bf7e39..6e86c3f03993 100644 --- a/comphelper/source/misc/traceevent.cxx +++ b/comphelper/source/misc/traceevent.cxx @@ -67,14 +67,30 @@ void TraceEvent::addInstantEvent(const char* sProfileId) + OUString::number(osl_getThreadIdentifier(nullptr)) + "},"); } -void ProfileZone::startRecording() +void TraceEvent::startRecording() { ::osl::MutexGuard aGuard(g_aMutex); s_nNesting = 0; s_bRecording = true; } -void ProfileZone::stopRecording() { s_bRecording = false; } +void TraceEvent::stopRecording() { s_bRecording = false; } + +css::uno::Sequence TraceEvent::getRecordingAndClear() +{ +bool bRecording; +std::vector aRecording; +{ +::osl::MutexGuard aGuard(g_aMutex); +bRecording = s_bRecording; +stopRecording(); +aRecording.swap(g_aRecording); +} +// reset start time and nesting level +if (bRecording) +startRecording(); +return ::comphelper::containerToSequence(aRecording); +} void ProfileZone::addRecording() { @@ -104,22 +120,6 @@ void ProfileZone::addRecording() + OUString::number(osl_getThreadIdentifier(nullptr)) + "},"); } -css::uno::Sequence ProfileZone::getRecordingAndClear() -{ -bool bRecording; -std::vector aRecording; -{ -::osl::MutexGuard aGuard(g_aMutex); -bRecording = s_bRecording; -stopRecording(); -aRecording.swap(g_aRecording); -} -// reset start time and nesting level -if (bRecording) -startRecording(); -return ::comphelper::containerToSequence(aRecording); -} - void ProfileZone::startConsole() { m_nCreateTime = osl_getGlobalTimer(); } void ProfileZone::stopConsole() diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index e92c916f1e5f..c0839e63f778 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -3850,9 +3850,9 @@ static void lo_setOption(LibreOfficeKit* /*pThis*/, const char *pOption, const c if (strcmp(pOption, "profilezonerecording") == 0) { if (strcmp(pValue, "start") == 0) -comphelper::ProfileZone::startRecording(); +comphelper::TraceEvent::startRecording(); else if (strcmp(pValue, "stop") == 0) -comphelper::ProfileZone::stopRecording(); +comphelper::TraceEvent::stopRecording(); } else if (strcmp(pOption, "sallogoverride") == 0) { @@ -6110,7 +6110,7 @@ public: virtual void Invoke() override { const css::uno::Sequence aEvents = -comphelper::ProfileZone::getRecordingAndClear(); +comphelper::TraceEvent::getRecordingAndClear(); OStringBuffer aOutput; for (const auto &s : aEvents) { @@ -6192,7 +6192,7 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char // Turn profile zones on early if (bProfileZones && eStage == SECOND_INIT) { -comphelper::ProfileZone::startRecording(); +comphelper::TraceEvent::startRecording(); new ProfileZoneDumper(); } diff --git a/include/comphelper/profilezone.hxx b/include/comphelper/profilezone.hxx index bd54667b1980..7525b6322152 100644 --- a/include/comphelper/profilezone.hxx +++ b/include/comphelper/profilezone.hxx @@ -86,11 +86,6 @@ class COMPHELPER_DLLPUBLIC ProfileZone : public TraceEvent ProfileZone(const ProfileZone&) = delete; void operator=(const ProfileZone&) = delete; - -static void startRecording(); -static void stopRecording(); - -static css::uno::Sequence getRecordingAndClear(); }; } // namespace comphelper diff --git a/include/comphelper/traceevent.hxx b/include/comphelper/traceevent.hxx index 5c922b281487..14e25da9b791 100644 --- a/include/comphelper/traceevent.hxx +++ b/include/comphelper/traceevent.hxx @@ -34,6 +34,11 @@ protected: public: static void addInstantEvent(const char* sProfileId); + +static void startRecording(); +static void stopRecording(); + +static css::uno::Sequence getRecordingAnd
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - include/comphelper
include/comphelper/profilezone.hxx |4 1 file changed, 4 insertions(+) New commits: commit 27c89553b3a02a8d00b19d0a2e305553e270348a Author: Tor Lillqvist AuthorDate: Tue Apr 27 09:49:21 2021 +0300 Commit: Tor Lillqvist CommitDate: Thu Apr 29 10:37:03 2021 +0200 Make ProfileZone non-copyable Change-Id: Ia1fe5311751bcb2b2f2bde3408aac836db75e98a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114791 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tor Lillqvist diff --git a/include/comphelper/profilezone.hxx b/include/comphelper/profilezone.hxx index 8ed591852807..bd54667b1980 100644 --- a/include/comphelper/profilezone.hxx +++ b/include/comphelper/profilezone.hxx @@ -70,6 +70,7 @@ class COMPHELPER_DLLPUBLIC ProfileZone : public TraceEvent startConsole(); } } + ~ProfileZone() { if (s_bRecording) @@ -83,6 +84,9 @@ class COMPHELPER_DLLPUBLIC ProfileZone : public TraceEvent } } +ProfileZone(const ProfileZone&) = delete; +void operator=(const ProfileZone&) = delete; + static void startRecording(); static void stopRecording(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - comphelper/Library_comphelper.mk comphelper/source include/comphelper
comphelper/Library_comphelper.mk |2 comphelper/source/misc/profilezone.cxx | 95 --- comphelper/source/misc/traceevent.cxx | 134 + include/comphelper/profilezone.hxx | 13 --- include/comphelper/traceevent.hxx | 43 ++ 5 files changed, 180 insertions(+), 107 deletions(-) New commits: commit 6aed228d77738a7e94610c3d114218d760ebaf48 Author: Tor Lillqvist AuthorDate: Tue Apr 27 09:20:32 2021 +0300 Commit: Tor Lillqvist CommitDate: Thu Apr 29 10:36:38 2021 +0200 Extend the trace event API with instant events Change-Id: I3a93c79f46ffc5768ddaf338789fe2daa225ef4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114790 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tor Lillqvist diff --git a/comphelper/Library_comphelper.mk b/comphelper/Library_comphelper.mk index 46527d164abb..1da5e7daa658 100644 --- a/comphelper/Library_comphelper.mk +++ b/comphelper/Library_comphelper.mk @@ -116,7 +116,7 @@ $(eval $(call gb_Library_add_exception_objects,comphelper,\ comphelper/source/misc/numberedcollection \ comphelper/source/misc/numbers \ comphelper/source/misc/officerestartmanager \ -comphelper/source/misc/profilezone \ +comphelper/source/misc/traceevent \ comphelper/source/misc/proxyaggregation \ comphelper/source/misc/random \ comphelper/source/misc/SelectionMultiplex \ diff --git a/comphelper/source/misc/profilezone.cxx b/comphelper/source/misc/profilezone.cxx deleted file mode 100644 index 298e46e66d36.. --- a/comphelper/source/misc/profilezone.cxx +++ /dev/null @@ -1,95 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * 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/. - */ - -#include - -#include -#include -#include - -#include -#include -#include -#include - -namespace comphelper -{ - -std::atomic ProfileZone::s_bRecording = false; - -int ProfileZone::s_nNesting = 0; // level of overlapped zones - -namespace -{ -std::vector g_aRecording; // recorded data -::osl::Mutex g_aMutex; -} - -void ProfileZone::startRecording() -{ -::osl::MutexGuard aGuard(g_aMutex); -s_nNesting = 0; -s_bRecording = true; -} - -void ProfileZone::stopRecording() -{ -s_bRecording = false; -} - -void ProfileZone::addRecording() -{ -assert(s_bRecording); - -TimeValue aSystemTime; -osl_getSystemTime(&aSystemTime); -long long nNow = static_cast(aSystemTime.Seconds) * 100 + aSystemTime.Nanosec/1000; - - // Generate a single "Complete Event" (type X) -OUString sRecordingData("{" -"\"name\":\"" + OUString(m_sProfileId, strlen(m_sProfileId), RTL_TEXTENCODING_UTF8) + "\"," -"\"ph\":\"X\"," -"\"ts\":" + OUString::number(m_nCreateTime) + "," -"\"dur\":" + OUString::number(nNow - m_nCreateTime) + "," -"\"pid\":" + OUString::number(m_nPid) + "," -"\"tid\":" + OUString::number(osl_getThreadIdentifier(nullptr)) + -"},"); -::osl::MutexGuard aGuard(g_aMutex); - -g_aRecording.emplace_back(sRecordingData); -} - -css::uno::Sequence ProfileZone::getRecordingAndClear() -{ -bool bRecording; -std::vector aRecording; -{ -::osl::MutexGuard aGuard( g_aMutex ); -bRecording = s_bRecording; -stopRecording(); -aRecording.swap(g_aRecording); -} -// reset start time and nesting level -if (bRecording) -startRecording(); -return ::comphelper::containerToSequence(aRecording); -} - -void ProfileZone::startConsole() { m_nCreateTime = osl_getGlobalTimer(); } - -void ProfileZone::stopConsole() -{ -sal_uInt32 nEndTime = osl_getGlobalTimer(); -std::cerr << "comphelper::ProfileZone: " << m_sProfileId << " finished in " - << nEndTime - m_nCreateTime << " ms" << std::endl; -} - -} // namespace comphelper - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/source/misc/traceevent.cxx b/comphelper/source/misc/traceevent.cxx new file mode 100644 index ..aa99e8bf7e39 --- /dev/null +++ b/comphelper/source/misc/traceevent.cxx @@ -0,0 +1,134 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * 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/. + */ + +#include + +#include +#include +#include + +#include +#include +#include + +#include +
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - sw/qa sw/source
sw/qa/core/doc/data/textbox-makeflyframe.docx |binary sw/qa/core/doc/doc.cxx| 36 ++ sw/source/core/doc/DocumentLayoutManager.cxx |8 + sw/source/core/txtnode/atrflyin.cxx |9 ++ 4 files changed, 53 insertions(+) New commits: commit e8bba2f28851c8826f003f893dcad75115017940 Author: Miklos Vajna AuthorDate: Mon Apr 26 21:01:45 2021 +0200 Commit: Miklos Vajna CommitDate: Thu Apr 29 10:29:19 2021 +0200 tdf#138604 sw textbox copy: fix missing fly frames of as-char draw frame Regression from commit 682e0488df819c191c13a03758fad0690706e508 (tdf#134099 sw: fix textbox anchors on copy-paste and undo, 2020-06-29), now that we don't copy draw+fly format pairs more than once, the fly frame of a fly format was missing. This was broken because sw::DocumentContentOperationsManager::CopyFlyInFlyImpl() calls CopyLayoutFormat() with bMakeFrames=true, but the frame format list doesn't contain as-char frames. For as-char frames CopyLayoutFormat() is called by SwTextFlyCnt::CopyFlyFormat() instead, but with bMakeFrames=false, so the fly frame's layout frame were never made. Fix the problem by explicitly making frames in DocumentLayoutManager::CopyLayoutFormat(), which also requires delete+make in SwTextFlyCnt::SetAnchor(). [ This is now consistent with the start of SwTextFlyCnt::SetAnchor(), which also deletes frames for fly frame formats. Otherwise CppunitTest_sw_core_txtnode would crash in testTextBoxCopyAnchor. ] (cherry picked from commit feeaa5d3ca0c784344549816fbaab2c8716b4105) Change-Id: I87003ee09ca75b9fecd70a1aa5c42f762f715be8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114832 Tested-by: Jenkins CollaboraOffice Reviewed-by: Miklos Vajna diff --git a/sw/qa/core/doc/data/textbox-makeflyframe.docx b/sw/qa/core/doc/data/textbox-makeflyframe.docx new file mode 100644 index ..9e26cda3c6a6 Binary files /dev/null and b/sw/qa/core/doc/data/textbox-makeflyframe.docx differ diff --git a/sw/qa/core/doc/doc.cxx b/sw/qa/core/doc/doc.cxx index 1bd9b4207444..14f724328fe0 100644 --- a/sw/qa/core/doc/doc.cxx +++ b/sw/qa/core/doc/doc.cxx @@ -16,6 +16,8 @@ #include #include #include +#include +#include #include #include @@ -24,6 +26,9 @@ #include #include #include +#include +#include +#include char const DATA_DIRECTORY[] = "/sw/qa/core/doc/data/"; @@ -129,6 +134,37 @@ CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testTextBoxZOrder) CPPUNIT_ASSERT_EQUAL(static_cast(2), pEllipseShape->GetOrdNum()); } +CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testTextBoxMakeFlyFrame) +{ +// Given a document with an as-char textbox (as-char draw format + at-char fly format): +SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "textbox-makeflyframe.docx"); + +// When cutting the textbox and pasting it to a new document: +SwView* pView = pDoc->GetDocShell()->GetView(); +pView->GetViewFrame()->GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, SfxCallMode::SYNCHRON); +pView->StopShellTimer(); +SwDocShell* pDocShell = pDoc->GetDocShell(); +SwWrtShell* pWrtShell = pDocShell->GetWrtShell(); +rtl::Reference pTransfer = new SwTransferable(*pWrtShell); +pTransfer->Cut(); +TransferableDataHelper aHelper(pTransfer.get()); +uno::Reference xDoc2 += loadFromDesktop("private:factory/swriter", "com.sun.star.text.TextDocument", {}); +SwXTextDocument* pTextDoc2 = dynamic_cast(xDoc2.get()); +SwDocShell* pDocShell2 = pTextDoc2->GetDocShell(); +SwWrtShell* pWrtShell2 = pDocShell2->GetWrtShell(); +SwTransferable::Paste(*pWrtShell2, aHelper); + +// Then make sure its fly frame is created. +mxComponent->dispose(); +mxComponent = xDoc2; +xmlDocUniquePtr pLayout = parseLayoutDump(); +// Without the accompanying fix in place, this test would have failed, because the first text +// frame in the body frame had an SwAnchoredDrawObject anchored to it, but not a fly frame, so +// a blank square was painted, not the image. +assertXPath(pLayout, "/root/page/body/txt/anchored/fly", 1); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/doc/DocumentLayoutManager.cxx b/sw/source/core/doc/DocumentLayoutManager.cxx index 7df5d2871f91..08dcdc80b540 100644 --- a/sw/source/core/doc/DocumentLayoutManager.cxx +++ b/sw/source/core/doc/DocumentLayoutManager.cxx @@ -474,6 +474,14 @@ SwFrameFormat *DocumentLayoutManager::CopyLayoutFormat( // presumably these anchors are supported though not sure assert(RndStdIds::FLY_AT_CHAR == boxAnchor.GetAnchorId() || RndStdIds::FLY_AT_PARA == boxAnchor.GetAnchorId() || boxAnchor.GetAnchorId() == RndStdIds::FLY_AT_PAGE); + +if (!bMakeFrames && rNewAnchor.GetAnchorId() == RndStdIds::FLY_AS_CHAR) +{ +
GSoC Student Engagement
Hello, This is Nick Vidal from Rocket.Chat We’ve been part of GSoC for 5 years now, and as a way to celebrate and give back to the open source community, this year we are reaching out to other GSoC organizations to provide assistance on setting up Rocket.Chat to engage with students (pro bono). Rocket.Chat is a leading open source chat platform, and we’ve been using the platform itself to engage with our own GSoC students. With Rocket.Chat, it’s possible to create private/public channels for each student/project so that mentors and students can communicate, share ideas, and keep track of progress both asynchronously and in real time. It’s also possible to create integrations to display pull requests, mergers, and issues directly on these channels. Please let me know if you would be interested in trying Rocket.Chat to engage with your GSoC students. Myself and the Community Engagement team are at your full disposal to help. Our mission is to serve the open source community! Kind regards, Nick -- Rocket.Chat https://rocket.chat ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - sfx2/source
sfx2/source/sidebar/Deck.cxx |9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) New commits: commit 46b7d1d707b47e03163c5bcbbaa54ca49980f64a Author: Szymon Kłos AuthorDate: Wed Dec 30 15:04:05 2020 +0100 Commit: Szymon Kłos CommitDate: Thu Apr 29 09:53:47 2021 +0200 Fix json structure for decks Change-Id: I7f203c29a03af917f50192946ee794f6e01b16e0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109029 Tested-by: Jenkins Reviewed-by: Szymon Kłos Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114803 Tested-by: Jenkins CollaboraOffice diff --git a/sfx2/source/sidebar/Deck.cxx b/sfx2/source/sidebar/Deck.cxx index e20ef9be1794..f8bb54a8ef73 100644 --- a/sfx2/source/sidebar/Deck.cxx +++ b/sfx2/source/sidebar/Deck.cxx @@ -220,8 +220,13 @@ void Deck::DumpAsPropertyTree(tools::JsonWriter& rJsonWriter) rJsonWriter.put("text", it->GetText()); rJsonWriter.put("enabled", it->IsEnabled()); -auto children2Node = rJsonWriter.startArray("children"); -pWindow->DumpAsPropertyTree(rJsonWriter); +{ +auto children2Node = rJsonWriter.startArray("children"); +{ +auto child2Node = rJsonWriter.startStruct(); +pWindow->DumpAsPropertyTree(rJsonWriter); +} +} } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - sfx2/source
sfx2/source/sidebar/Deck.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit 4fde580fc3d30723220a90853eea5c564bc825a5 Author: Henry Castro AuthorDate: Tue Dec 8 09:06:45 2020 -0400 Commit: Szymon Kłos CommitDate: Thu Apr 29 09:53:02 2021 +0200 lok: fix "children" node type In order to build the dialog on the client side, the "children" object should be constructed with array type. Change-Id: Iccde39aa9ff2f423fd4a67072ca0bf25e406d220 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107413 Tested-by: Jenkins Reviewed-by: Henry Castro Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114802 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/sfx2/source/sidebar/Deck.cxx b/sfx2/source/sidebar/Deck.cxx index 9c0c37041f58..e20ef9be1794 100644 --- a/sfx2/source/sidebar/Deck.cxx +++ b/sfx2/source/sidebar/Deck.cxx @@ -200,7 +200,7 @@ void Deck::DumpAsPropertyTree(tools::JsonWriter& rJsonWriter) rJsonWriter.put("text", GetText()); rJsonWriter.put("enabled", IsEnabled()); -auto childrenNode = rJsonWriter.startNode("children"); +auto childrenNode = rJsonWriter.startArray("children"); for (auto &it : maPanels) { if (it->IsLurking()) @@ -214,13 +214,13 @@ void Deck::DumpAsPropertyTree(tools::JsonWriter& rJsonWriter) if (!pWindow) continue; -auto childNode = rJsonWriter.startNode(""); +auto childNode = rJsonWriter.startStruct(); rJsonWriter.put("id", it->GetId()); rJsonWriter.put("type", "panel"); rJsonWriter.put("text", it->GetText()); rJsonWriter.put("enabled", it->IsEnabled()); -auto children2Node = rJsonWriter.startNode("children"); +auto children2Node = rJsonWriter.startArray("children"); pWindow->DumpAsPropertyTree(rJsonWriter); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits