[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - vcl/inc vcl/source
vcl/inc/printdlg.hxx |1 + vcl/source/window/printdlg.cxx | 13 + 2 files changed, 6 insertions(+), 8 deletions(-) New commits: commit 85fb61fbbf3ee5b786e73a66ec1e1ce06500bbcc Author: Tor Lillqvist AuthorDate: Sat Dec 4 21:53:45 2021 +0200 Commit: Justin Luth CommitDate: Sat Dec 11 07:39:02 2021 +0100 Revert "tdf#145354: Ensure displayed paper name matches displayed paper ..." It causes tdf#146045. This reverts commit 65081542d2dabdf17820d62abdc5a22d3734e52d Change-Id: Id980701b1a823c8bf7cfb57e0b32cf5d672c3bfa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126373 Tested-by: Jenkins Reviewed-by: Tor Lillqvist (cherry picked from commit d2ca15952de167b6236139d53f6757a7c0d22d0a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126526 Reviewed-by: Justin Luth diff --git a/vcl/inc/printdlg.hxx b/vcl/inc/printdlg.hxx index d2ce1670a845..21aab3667d4e 100644 --- a/vcl/inc/printdlg.hxx +++ b/vcl/inc/printdlg.hxx @@ -65,6 +65,7 @@ namespace vcl virtual void Resize() override; void setPreview( const GDIMetaFile&, const Size& i_rPaperSize, + std::u16string_view i_rPaperName, const OUString& i_rNoPageString, sal_Int32 i_nDPIX, sal_Int32 i_nDPIY, bool i_bGreyscale diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index 12aa14628887..46cb72752bbf 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -207,6 +207,7 @@ bool PrintDialog::PrintPreviewWindow::Command( const CommandEvent& rEvt ) void PrintDialog::PrintPreviewWindow::setPreview( const GDIMetaFile& i_rNewPreview, const Size& i_rOrigSize, + std::u16string_view i_rPaperName, const OUString& i_rReplacement, sal_Int32 i_nDPIX, sal_Int32 i_nDPIY, @@ -234,18 +235,12 @@ void PrintDialog::PrintPreviewWindow::setPreview( const GDIMetaFile& i_rNewPrevi OUStringBuffer aBuf; aBuf.append( aNumText + " " ); aBuf.appendAscii( eUnit == MapUnit::MapMM ? "mm" : "in" ); - -// Look up the paper name from the dimensions -PaperInfo aPaperInfoFromSize(i_rOrigSize.getWidth(), i_rOrigSize.getHeight()); -aPaperInfoFromSize.doSloppyFit( true ); - -if (aPaperInfoFromSize.getPaper() != PAPER_USER) +if( !i_rPaperName.empty() ) { aBuf.append( " (" ); -aBuf.append( Printer::GetPaperName(aPaperInfoFromSize.getPaper()) ); +aBuf.append( i_rPaperName ); aBuf.append( ')' ); } - maHorzText = aBuf.makeStringAndClear(); aNumText = rLocWrap.getNum( aLogicPaperSize.Height(), nDigits ); @@ -959,6 +954,7 @@ void PrintDialog::preparePreview( bool i_bMayUseCache ) if ( !hasPreview() ) { mxPreview->setPreview( aMtf, aCurPageSize, +Printer::GetPaperName( mePaper ), maNoPreviewStr, aPrt->GetDPIX(), aPrt->GetDPIY(), aPrt->GetPrinterOptions().IsConvertToGreyscales() @@ -994,6 +990,7 @@ void PrintDialog::preparePreview( bool i_bMayUseCache ) } mxPreview->setPreview( aMtf, aCurPageSize, +Printer::GetPaperName( mePaper ), nPages > 0 ? OUString() : maNoPageStr, aPrt->GetDPIX(), aPrt->GetDPIY(), aPrt->GetPrinterOptions().IsConvertToGreyscales()
[Libreoffice-commits] core.git: sc/qa sc/source
sc/qa/unit/data/ods/tdf128895_emptyHiddenCols.ods |binary sc/qa/unit/subsequent_export_test.cxx | 18 ++ sc/source/filter/xml/xmlcoli.cxx |1 + 3 files changed, 19 insertions(+) New commits: commit 297ab561c6754f89326a1e8ce1751233669578d7 Author: Justin Luth AuthorDate: Wed Dec 8 14:22:01 2021 +0200 Commit: Justin Luth CommitDate: Sat Dec 11 07:20:35 2021 +0100 tdf#128895 sc xmlimport: create enough dynamic cols if props Since LO 6.3, only 64 columns are created by default, where previously it was a fixed 1024. A common user practice is to hide all columns not used, but this collapsed property was lost because only part of the columns were actually created and thus exported. In this example, import specifies 1017 hidden columns (H-AMJ), but since only 64 columns are created, export only specified 57. So ensure that on import, any column with defined properties is created - even if they don't contain any content. Change-Id: If928880baf5585613715a1f4361a9059584d1ad2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126540 Tested-by: Jenkins Reviewed-by: Justin Luth Reviewed-by: Bartosz Kosiorek diff --git a/sc/qa/unit/data/ods/tdf128895_emptyHiddenCols.ods b/sc/qa/unit/data/ods/tdf128895_emptyHiddenCols.ods new file mode 100644 index ..fa016369f206 Binary files /dev/null and b/sc/qa/unit/data/ods/tdf128895_emptyHiddenCols.ods differ diff --git a/sc/qa/unit/subsequent_export_test.cxx b/sc/qa/unit/subsequent_export_test.cxx index 355fdf4202ad..158323215660 100644 --- a/sc/qa/unit/subsequent_export_test.cxx +++ b/sc/qa/unit/subsequent_export_test.cxx @@ -143,6 +143,7 @@ public: #endif void testOutlineExportXLSX(); void testHiddenEmptyRowsXLSX(); +void testHiddenEmptyColsODS(); void testAllRowsHiddenXLSX(); void testLandscapeOrientationXLSX(); @@ -259,6 +260,7 @@ public: #endif CPPUNIT_TEST(testOutlineExportXLSX); CPPUNIT_TEST(testHiddenEmptyRowsXLSX); +CPPUNIT_TEST(testHiddenEmptyColsODS); CPPUNIT_TEST(testAllRowsHiddenXLSX); CPPUNIT_TEST(testLandscapeOrientationXLSX); CPPUNIT_TEST(testInlineArrayXLS); @@ -1525,6 +1527,22 @@ void ScExportTest::testHiddenEmptyRowsXLSX() xShell->DoClose(); } +void ScExportTest::testHiddenEmptyColsODS() +{ +//tdf#98106 FILESAVE: Hidden and empty rows became visible when export to .XLSX +ScDocShellRef xShell = loadDoc(u"tdf128895_emptyHiddenCols.", FORMAT_ODS); +CPPUNIT_ASSERT(xShell.is()); + +std::shared_ptr pXPathFile += ScBootstrapFixture::exportTo(&(*xShell), FORMAT_ODS); +xmlDocUniquePtr pSheet = XPathHelper::parseExport(pXPathFile, m_xSFactory, "content.xml"); +CPPUNIT_ASSERT(pSheet); +assertXPath(pSheet, "//table:table/table:table-column[2]"); +assertXPath(pSheet, "//table:table/table:table-column[2]", "number-columns-repeated", "1017"); + +xShell->DoClose(); +} + void ScExportTest::testLandscapeOrientationXLSX() { //tdf#48767 - Landscape page orientation is not loaded from .xlsx format with MS Excel, after export with Libre Office diff --git a/sc/source/filter/xml/xmlcoli.cxx b/sc/source/filter/xml/xmlcoli.cxx index 09224bb757a3..fc40a6f63c6b 100644 --- a/sc/source/filter/xml/xmlcoli.cxx +++ b/sc/source/filter/xml/xmlcoli.cxx @@ -93,6 +93,7 @@ void SAL_CALL ScXMLTableColContext::endFastElement( sal_Int32 /*nElement*/ ) nLastColumn = pDoc->MaxCol(); if (nCurrentColumn > pDoc->MaxCol()) nCurrentColumn = pDoc->MaxCol(); +pDoc->CreateColumnIfNotExists(nSheet, nLastColumn); uno::Reference xColumnRowRange (xSheet->getCellRangeByPosition(nCurrentColumn, 0, nLastColumn, 0), uno::UNO_QUERY); if (xColumnRowRange.is()) {
[Libreoffice-commits] core.git: vcl/inc vcl/unx
vcl/inc/unx/gtk/gtkdata.hxx |2 - vcl/unx/gtk3/gtkdata.cxx| 47 ++-- 2 files changed, 17 insertions(+), 32 deletions(-) New commits: commit 489d7298d2e609ee5900f05ba0064845a7a551ce Author: Hossein AuthorDate: Sun Dec 5 13:36:25 2021 +0100 Commit: Mike Kaganski CommitDate: Sat Dec 11 06:09:39 2021 +0100 Use g_get_real_time instead of g_get_current_time g_get_current_time() which is deprecated, is replaced by the newer function g_get_real_time() in which is available since glib 2.28. Function GLib > get_real_time https://docs.gtk.org/glib/func.get_real_time.html Change-Id: I371c2efc290e70410b84346ed47d721ae9547273 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126374 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/vcl/inc/unx/gtk/gtkdata.hxx b/vcl/inc/unx/gtk/gtkdata.hxx index 0c6b73cabadc..5a5f00336c01 100644 --- a/vcl/inc/unx/gtk/gtkdata.hxx +++ b/vcl/inc/unx/gtk/gtkdata.hxx @@ -214,7 +214,7 @@ public: virtual void Stop() override; bool Expired(); -sal_uLongm_nTimeoutMS; +sal_uInt64m_nTimeoutMS; }; class DocumentFocusListener final : diff --git a/vcl/unx/gtk3/gtkdata.cxx b/vcl/unx/gtk3/gtkdata.cxx index 861ae6e64743..8903c2e5e15c 100644 --- a/vcl/unx/gtk3/gtkdata.cxx +++ b/vcl/unx/gtk3/gtkdata.cxx @@ -641,40 +641,31 @@ extern "C" { struct SalGtkTimeoutSource { GSource aParent; -GTimeVal aFireTime; +gint64 aFireTime; GtkSalTimer *pInstance; }; static void sal_gtk_timeout_defer( SalGtkTimeoutSource *pTSource ) { -g_get_current_time( &pTSource->aFireTime ); -g_time_val_add( &pTSource->aFireTime, pTSource->pInstance->m_nTimeoutMS * 1000 ); +pTSource->aFireTime = g_get_real_time() + pTSource->pInstance->m_nTimeoutMS * 1000; } static gboolean sal_gtk_timeout_expired( SalGtkTimeoutSource *pTSource, - gint *nTimeoutMS, GTimeVal const *pTimeNow ) + gint *nTimeoutMS, gint64 const pTimeNow ) { -glong nDeltaSec = pTSource->aFireTime.tv_sec - pTimeNow->tv_sec; -glong nDeltaUSec = pTSource->aFireTime.tv_usec - pTimeNow->tv_usec; -if( nDeltaSec < 0 || ( nDeltaSec == 0 && nDeltaUSec < 0) ) +gint64 nDeltaUSec = pTSource->aFireTime - pTimeNow; +if( nDeltaUSec < 0 ) { *nTimeoutMS = 0; return true; } -if( nDeltaUSec < 0 ) -{ -nDeltaUSec += 100; -nDeltaSec -= 1; -} // if the clock changes backwards we need to cope ... -if( o3tl::make_unsigned(nDeltaSec) > 1 + ( pTSource->pInstance->m_nTimeoutMS / 1000 ) ) +if( o3tl::make_unsigned(nDeltaUSec) > 100 + ( pTSource->pInstance->m_nTimeoutMS / 1000 ) ) { sal_gtk_timeout_defer( pTSource ); return true; } - -*nTimeoutMS = MIN( G_MAXINT, ( nDeltaSec * 1000 + (nDeltaUSec + 999) / 1000 ) ); - +*nTimeoutMS = MIN( G_MAXINT, (nDeltaUSec + 999) / 1000 ); return *nTimeoutMS == 0; } @@ -682,22 +673,20 @@ extern "C" { { SalGtkTimeoutSource *pTSource = reinterpret_cast(pSource); -GTimeVal aTimeNow; -g_get_current_time( &aTimeNow ); +gint64 aTimeNow; +aTimeNow = g_get_real_time(); -return sal_gtk_timeout_expired( pTSource, nTimeoutMS, &aTimeNow ); +return sal_gtk_timeout_expired( pTSource, nTimeoutMS, aTimeNow ); } static gboolean sal_gtk_timeout_check( GSource *pSource ) { SalGtkTimeoutSource *pTSource = reinterpret_cast(pSource); -GTimeVal aTimeNow; -g_get_current_time( &aTimeNow ); +gint64 aTimeNow; +aTimeNow = g_get_real_time(); -return ( pTSource->aFireTime.tv_sec < aTimeNow.tv_sec || - ( pTSource->aFireTime.tv_sec == aTimeNow.tv_sec && - pTSource->aFireTime.tv_usec < aTimeNow.tv_usec ) ); +return ( pTSource->aFireTime < aTimeNow ); } static gboolean sal_gtk_timeout_dispatch( GSource *pSource, GSourceFunc, gpointer ) @@ -770,17 +759,13 @@ bool GtkSalTimer::Expired() return false; gint nDummy = 0; -GTimeVal aTimeNow; -g_get_current_time( &aTimeNow ); -return !!sal_gtk_timeout_expired( m_pTimeout, &nDummy, &aTimeNow); +gint64 aTimeNow; +aTimeNow = g_get_real_time(); +return !!sal_gtk_timeout_expired( m_pTimeout, &nDummy, aTimeNow); } void GtkSalTimer::Start( sal_uInt64 nMS ) { -// glib is not 64bit safe in this regard. -assert( nMS <= G_MAXINT ); -if ( nMS > G_MAXINT ) -nMS = G_MAXINT; m_nTimeoutMS = nMS; // for restarting Stop(); // FIXME: ideally re-use an existing m_pTimeout m_pTimeout = create_sal_gtk_timeout( th
[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - sw/source
sw/source/uibase/app/apphdl.cxx | 54 +++- 1 file changed, 37 insertions(+), 17 deletions(-) New commits: commit b1ab885437bfb08468601db9453cd036d6526de3 Author: Justin Luth AuthorDate: Thu Dec 9 19:48:46 2021 +0200 Commit: Mike Kaganski CommitDate: Sat Dec 11 06:07:02 2021 +0100 tdf#144680 mailmerge toolbar: enable icons unless no resultset which backports 7.4 commit 9a115a254171d702a56a93c5c7e320de755dc8e8 plus tdf#144680 mailmerge toolbar: disable all icons if no resultset (7.4 commit 16376cae68f4406ef9440bdcb7b9617de6a6f998) plus a backport-only paranoid check to ensure that xConfigItem exists. This fixes a problem introduced in LO 6.3 (backported to 6.1.5) via commit 60714a814847f6d10f00aa6809a3896a48741e0b tdf#121606: displaying Mail Merge toolbar shouldn't activate connection Before 6.1, a user needed to run the mailmerge wizard (or start the toolbar manually) in order to have the mailmerge toolbar become available. In either of those cases, the connection to the database was attempted and thus enabled or disabled the various buttons based on the status. All good. In 6.1, the toolbar was started on document load, as soon as database fields were detected. Sounds reasonable - good context sensitive UI. The problem is that databases can often be password protected, or on slow, remote sites. Thus the 6.3 commit mentioned above, which disabled most buttons until the connection was established. Well, having disabled buttons isn't too helpful, and basically put us back to needing the extra step of running the mail-merge wizard anyway. The only problem with leaving them enabled is that we need to ensure that we don't run the functions with bad results. So sure - this means that a user thinks they can use the mail-merge, attempt it, and then may find the buttons disable when it won't work. That is the same as the forward/backwards buttons though, so no big deal. Plus it is good feedback that something isn't right (which will rarely ever be true). The only time the buttons disable is for non-existant resultsets. [Note that buttons do NOT disable for a wrong password, or for a remote connection that can't be established. And that is what we want anyway, so that further attempts can be made after fixing the underlying problem.] Change-Id: I3e82d2d3b35d04632650933c768cb0b5c006cb6f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126625 Tested-by: Jenkins Reviewed-by: Justin Luth Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126633 Reviewed-by: Mike Kaganski diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx index dd2b943f476a..6532ff0c4907 100644 --- a/sw/source/uibase/app/apphdl.cxx +++ b/sw/source/uibase/app/apphdl.cxx @@ -210,12 +210,12 @@ void SwModule::StateOther(SfxItemSet &rSet) // #i51949# hide e-Mail option if e-Mail is not supported // #i63267# printing might be disabled +// Without attempting to open the database, (in case it is remote or passworded), +// hide everything after determining there are no valid results. tdf#121606 if (!xConfigItem || -!xConfigItem->GetConnection().is() || -xConfigItem->GetConnection()->isClosed() || -!xConfigItem->GetResultSet().is() || xConfigItem->GetCurrentDBData().sDataSource.isEmpty() || xConfigItem->GetCurrentDBData().sCommand.isEmpty() || +(xConfigItem->GetConnection().is() && !xConfigItem->GetConnection()->isClosed() && !xConfigItem->GetResultSet().is()) || (nWhich == FN_MAILMERGE_PRINT_DOCUMENTS && Application::GetSettings().GetMiscSettings().GetDisablePrinting()) || (nWhich == FN_MAILMERGE_EMAIL_DOCUMENTS && !xConfigItem->IsMailAvailable())) { @@ -806,27 +806,47 @@ void SwModule::ExecOther(SfxRequest& rReq) } break; case FN_MAILMERGE_CREATE_DOCUMENTS: -{ -std::shared_ptr xConfigItem = SwDBManager::PerformMailMerge(GetActiveView()); - -if (xConfigItem && xConfigItem->GetTargetView()) - xConfigItem->GetTargetView()->GetViewFrame()->GetFrame().Appear(); -} -break; case FN_MAILMERGE_SAVE_DOCUMENTS: case FN_MAILMERGE_PRINT_DOCUMENTS: case FN_MAILMERGE_EMAIL_DOCUMENTS: { std::shared_ptr xConfigItem = GetActiveView()->GetMailMergeConfigItem(); -if(!xConfigItem) +assert(xConfigItem); +if (!xConfigItem || !xConfigItem->GetResultSet().is()) +{ +// The connection has been attempted, but failed or no results fou
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - sd/source sw/source
sd/source/ui/annotations/annotationwindow.cxx |9 +++-- sw/source/uibase/docvw/AnnotationWin2.cxx |9 +++-- 2 files changed, 14 insertions(+), 4 deletions(-) New commits: commit c1f939c454d844d7a5d59a87f6d20c61b54fcb61 Author: Caolán McNamara AuthorDate: Fri Dec 10 16:25:45 2021 + Commit: Adolfo Jayme Barrientos CommitDate: Sat Dec 11 02:00:11 2021 +0100 Resolves: tdf#145974 reduce the papersize by scrollbar thickness if scrollbar required and scrollbar isn't an overlay one Change-Id: I839fd8c214febadb80f692b53dc156e251f506ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126603 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx index 0022b84c9625..21b3bb997ed6 100644 --- a/sd/source/ui/annotations/annotationwindow.cxx +++ b/sd/source/ui/annotations/annotationwindow.cxx @@ -390,8 +390,13 @@ void AnnotationWindow::DoResize() if( aTextHeight > aHeight ) { -// we need vertical scrollbars and have to reduce the width -aWidth -= mxVScrollbar->get_scroll_thickness(); +const int nThickness = mxVScrollbar->get_scroll_thickness(); +if (nThickness) +{ +// we need vertical scrollbars and have to reduce the width +aWidth -= nThickness; +mpOutliner->SetPaperSize(rDevice.PixelToLogic(Size(aWidth, aHeight))); +} mxVScrollbar->set_vpolicy(VclPolicyType::ALWAYS); } else diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx b/sw/source/uibase/docvw/AnnotationWin2.cxx index 70460686d03d..a64dd1ebc0bc 100644 --- a/sw/source/uibase/docvw/AnnotationWin2.cxx +++ b/sw/source/uibase/docvw/AnnotationWin2.cxx @@ -755,8 +755,13 @@ void SwAnnotationWin::DoResize() if (aTextHeight > aHeight) { -// we need vertical scrollbars and have to reduce the width -aWidth -= mxVScrollbar->get_scroll_thickness(); +const int nThickness = mxVScrollbar->get_scroll_thickness(); +if (nThickness) +{ +// we need vertical scrollbars and have to reduce the width +aWidth -= nThickness; +mpOutliner->SetPaperSize(PixelToLogic(Size(aWidth, aHeight))); +} mxVScrollbar->set_vpolicy(VclPolicyType::ALWAYS); } else
[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - helpcontent2
helpcontent2 |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 31dc62fc1b0f533e8f275a51a4220b5be4d4ee27 Author: Rafael Lima AuthorDate: Sat Dec 11 02:58:40 2021 +0200 Commit: Gerrit Code Review CommitDate: Sat Dec 11 01:58:40 2021 +0100 Update git submodules * Update helpcontent2 from branch 'libreoffice-7-3' to ca76e7f693ffe416833bea1e86689aa21646a980 - Silence strings for l10n in sbasic/shared (Part 1) These strings are appearing for translation in Weblate but they're pure Basic code/syntax that does not need translation. Change-Id: I8a3f16fcb23f18a2b2b46eb7eaf8bbf74023dd84 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126606 Tested-by: Adolfo Jayme Barrientos Reviewed-by: Adolfo Jayme Barrientos (cherry picked from commit bba53dc2eb06941ab4e9b9c22722b22c19cd3698) Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126667 Tested-by: Jenkins diff --git a/helpcontent2 b/helpcontent2 index 71216768639b..ca76e7f693ff 16 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit 71216768639b863e8e26598e76f12f630cb9232d +Subproject commit ca76e7f693ffe416833bea1e86689aa21646a980
[Libreoffice-commits] help.git: Branch 'libreoffice-7-3' - source/text
source/text/sbasic/python/python_2_basic.xhp |6 +++--- source/text/sbasic/python/python_document_events.xhp |2 +- source/text/sbasic/shared/03010301.xhp |2 +- source/text/sbasic/shared/03010302.xhp |2 +- source/text/sbasic/shared/03010303.xhp |2 +- source/text/sbasic/shared/03010304.xhp |4 ++-- source/text/sbasic/shared/03010305.xhp |4 ++-- source/text/sbasic/shared/03020101.xhp |2 +- source/text/sbasic/shared/03020201.xhp |2 +- source/text/sbasic/shared/03020204.xhp |2 +- source/text/sbasic/shared/03020301.xhp |2 +- source/text/sbasic/shared/03020302.xhp |4 ++-- source/text/sbasic/shared/03020303.xhp |4 ++-- source/text/sbasic/shared/03020304.xhp |4 ++-- source/text/sbasic/shared/03020305.xhp |2 +- 15 files changed, 22 insertions(+), 22 deletions(-) New commits: commit ca76e7f693ffe416833bea1e86689aa21646a980 Author: Rafael Lima AuthorDate: Sat Dec 11 00:03:35 2021 +0200 Commit: Adolfo Jayme Barrientos CommitDate: Sat Dec 11 01:58:38 2021 +0100 Silence strings for l10n in sbasic/shared (Part 1) These strings are appearing for translation in Weblate but they're pure Basic code/syntax that does not need translation. Change-Id: I8a3f16fcb23f18a2b2b46eb7eaf8bbf74023dd84 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126606 Tested-by: Adolfo Jayme Barrientos Reviewed-by: Adolfo Jayme Barrientos (cherry picked from commit bba53dc2eb06941ab4e9b9c22722b22c19cd3698) Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126667 Tested-by: Jenkins diff --git a/source/text/sbasic/python/python_2_basic.xhp b/source/text/sbasic/python/python_2_basic.xhp index 1c3820584..0ce9f4417 100644 --- a/source/text/sbasic/python/python_2_basic.xhp +++ b/source/text/sbasic/python/python_2_basic.xhp @@ -77,9 +77,9 @@ Python Syntax - results = script.invoke((prompt,buttons,title), (), ()) - script.invoke((message,), tuple, ()) - script.invoke((args), (), results) + results = script.invoke((prompt,buttons,title), (), ()) + script.invoke((message,), tuple, ()) + script.invoke((args), (), results) Examples of Personal or Shared Scripts Examples in Input/Output to Screen detail Python to Basic invocation calls. Monitoring Document Events illustrates the usage of *args Python idiom to print a variable number of parameters to Access2Base logging console dialog. At time of development you can interrupt Python script execution using https://berma.pagesperso-orange.fr/index2.html"; name ="Xray extension">Xray extension in order to inspect properties and methods of UNO objects. The APSO extension debugger allows object introspection using either Xray either MRI extensions. diff --git a/source/text/sbasic/python/python_document_events.xhp b/source/text/sbasic/python/python_document_events.xhp index f0785b1f2..814047b1b 100644 --- a/source/text/sbasic/python/python_document_events.xhp +++ b/source/text/sbasic/python/python_document_events.xhp @@ -64,7 +64,7 @@ XDocumentEventListener as AdapterPattern from com.sun.star.lang import EventObject - class UiDocument(unohelper.Base, AdapterPattern): + class UiDocument(unohelper.Base, AdapterPattern): """ Monitor document events """ ''' adapted from 'Python script to monitor OnSave event' at diff --git a/source/text/sbasic/shared/03010301.xhp b/source/text/sbasic/shared/03010301.xhp index 7fd30d055..a56a0e2a3 100644 --- a/source/text/sbasic/shared/03010301.xhp +++ b/source/text/sbasic/shared/03010301.xhp @@ -40,7 +40,7 @@ Syntax: -Blue (Color As Long) +Blue (Color As Long) Return value: diff --git a/source/text/sbasic/shared/03010302.xhp b/source/text/sbasic/shared/03010302.xhp index f5630fde7..aec9e1e10 100644 --- a/source/text/sbasic/shared/03010302.xhp +++ b/source/text/sbasic/shared/03010302.xhp @@ -40,7 +40,7 @@ Syntax: -Green (Color As Long) +Green (Color As Long) Return value: diff --git a/source/text/sbasic/shared/03010303.xhp b/source/text/sbasic/shared/03010303.xhp index 1dfc411f0..d7ac7717a 100644 --- a/source/text/sbasic/shared/03010303.xhp +++ b/source/text/sbasic/shared/03010303.xhp @@ -40,7 +40,7 @@ Syntax: -Red (ColorNumber As Long) +Red (ColorNumber As Long) Return value: diff --git a/source/text/sbasic/shared/03010304.xhp b/source/text/sbasic/shared/03010304.xhp index 2e78f7ccf..0a0b46b85 100644 --- a/source/text/sbasic/shared/03010304.xhp +++ b/source/text/sbasic/shared/03010304.xhp @@ -37,10 +37,10 @@ Syntax: -QBColor (ColorNumber As Integer) +QBColor (ColorNumber As Integer)
[Libreoffice-commits] core.git: helpcontent2
helpcontent2 |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 29db6dc9fbeb8314553d02a9519a4cb8161256f4 Author: Rafael Lima AuthorDate: Sat Dec 11 02:57:16 2021 +0200 Commit: Gerrit Code Review CommitDate: Sat Dec 11 01:57:16 2021 +0100 Update git submodules * Update helpcontent2 from branch 'master' to bba53dc2eb06941ab4e9b9c22722b22c19cd3698 - Silence strings for l10n in sbasic/shared (Part 1) These strings are appearing for translation in Weblate but they're pure Basic code/syntax that does not need translation. Change-Id: I8a3f16fcb23f18a2b2b46eb7eaf8bbf74023dd84 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126606 Tested-by: Adolfo Jayme Barrientos Reviewed-by: Adolfo Jayme Barrientos diff --git a/helpcontent2 b/helpcontent2 index 6fa6b45d603d..bba53dc2eb06 16 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit 6fa6b45d603d01cb30549cdf9d1c56fa9376aa67 +Subproject commit bba53dc2eb06941ab4e9b9c22722b22c19cd3698
[Libreoffice-commits] help.git: source/text
source/text/sbasic/python/python_2_basic.xhp |6 +++--- source/text/sbasic/python/python_document_events.xhp |2 +- source/text/sbasic/shared/03010301.xhp |2 +- source/text/sbasic/shared/03010302.xhp |2 +- source/text/sbasic/shared/03010303.xhp |2 +- source/text/sbasic/shared/03010304.xhp |4 ++-- source/text/sbasic/shared/03010305.xhp |4 ++-- source/text/sbasic/shared/03020101.xhp |2 +- source/text/sbasic/shared/03020201.xhp |2 +- source/text/sbasic/shared/03020204.xhp |2 +- source/text/sbasic/shared/03020301.xhp |2 +- source/text/sbasic/shared/03020302.xhp |4 ++-- source/text/sbasic/shared/03020303.xhp |4 ++-- source/text/sbasic/shared/03020304.xhp |4 ++-- source/text/sbasic/shared/03020305.xhp |2 +- 15 files changed, 22 insertions(+), 22 deletions(-) New commits: commit bba53dc2eb06941ab4e9b9c22722b22c19cd3698 Author: Rafael Lima AuthorDate: Sat Dec 11 00:03:35 2021 +0200 Commit: Adolfo Jayme Barrientos CommitDate: Sat Dec 11 01:57:15 2021 +0100 Silence strings for l10n in sbasic/shared (Part 1) These strings are appearing for translation in Weblate but they're pure Basic code/syntax that does not need translation. Change-Id: I8a3f16fcb23f18a2b2b46eb7eaf8bbf74023dd84 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126606 Tested-by: Adolfo Jayme Barrientos Reviewed-by: Adolfo Jayme Barrientos diff --git a/source/text/sbasic/python/python_2_basic.xhp b/source/text/sbasic/python/python_2_basic.xhp index 1c3820584..0ce9f4417 100644 --- a/source/text/sbasic/python/python_2_basic.xhp +++ b/source/text/sbasic/python/python_2_basic.xhp @@ -77,9 +77,9 @@ Python Syntax - results = script.invoke((prompt,buttons,title), (), ()) - script.invoke((message,), tuple, ()) - script.invoke((args), (), results) + results = script.invoke((prompt,buttons,title), (), ()) + script.invoke((message,), tuple, ()) + script.invoke((args), (), results) Examples of Personal or Shared Scripts Examples in Input/Output to Screen detail Python to Basic invocation calls. Monitoring Document Events illustrates the usage of *args Python idiom to print a variable number of parameters to Access2Base logging console dialog. At time of development you can interrupt Python script execution using https://berma.pagesperso-orange.fr/index2.html"; name ="Xray extension">Xray extension in order to inspect properties and methods of UNO objects. The APSO extension debugger allows object introspection using either Xray either MRI extensions. diff --git a/source/text/sbasic/python/python_document_events.xhp b/source/text/sbasic/python/python_document_events.xhp index f0785b1f2..814047b1b 100644 --- a/source/text/sbasic/python/python_document_events.xhp +++ b/source/text/sbasic/python/python_document_events.xhp @@ -64,7 +64,7 @@ XDocumentEventListener as AdapterPattern from com.sun.star.lang import EventObject - class UiDocument(unohelper.Base, AdapterPattern): + class UiDocument(unohelper.Base, AdapterPattern): """ Monitor document events """ ''' adapted from 'Python script to monitor OnSave event' at diff --git a/source/text/sbasic/shared/03010301.xhp b/source/text/sbasic/shared/03010301.xhp index 7fd30d055..a56a0e2a3 100644 --- a/source/text/sbasic/shared/03010301.xhp +++ b/source/text/sbasic/shared/03010301.xhp @@ -40,7 +40,7 @@ Syntax: -Blue (Color As Long) +Blue (Color As Long) Return value: diff --git a/source/text/sbasic/shared/03010302.xhp b/source/text/sbasic/shared/03010302.xhp index f5630fde7..aec9e1e10 100644 --- a/source/text/sbasic/shared/03010302.xhp +++ b/source/text/sbasic/shared/03010302.xhp @@ -40,7 +40,7 @@ Syntax: -Green (Color As Long) +Green (Color As Long) Return value: diff --git a/source/text/sbasic/shared/03010303.xhp b/source/text/sbasic/shared/03010303.xhp index 1dfc411f0..d7ac7717a 100644 --- a/source/text/sbasic/shared/03010303.xhp +++ b/source/text/sbasic/shared/03010303.xhp @@ -40,7 +40,7 @@ Syntax: -Red (ColorNumber As Long) +Red (ColorNumber As Long) Return value: diff --git a/source/text/sbasic/shared/03010304.xhp b/source/text/sbasic/shared/03010304.xhp index 2e78f7ccf..0a0b46b85 100644 --- a/source/text/sbasic/shared/03010304.xhp +++ b/source/text/sbasic/shared/03010304.xhp @@ -37,10 +37,10 @@ Syntax: -QBColor (ColorNumber As Integer) +QBColor (ColorNumber As Integer) Return value: -Long +Long Parameter: ColorNumber: Any integer expression that specifies the color value of the color passed from an older MS-DOS based p
[Libreoffice-commits] core.git: sc/qa
sc/qa/uitest/calc_tests3/tdf102506.py | 46 ++ 1 file changed, 46 insertions(+) New commits: commit b0e0c15f45a5667814b31ad5f792caf1a0a91308 Author: Xisco Fauli AuthorDate: Fri Dec 10 19:06:58 2021 +0100 Commit: Xisco Fauli CommitDate: Fri Dec 10 23:00:27 2021 +0100 tdf#102506: sc: Add UItest Change-Id: I3b104623289bb18d13f75b90bffcda4e65c6707d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126653 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/sc/qa/uitest/calc_tests3/tdf102506.py b/sc/qa/uitest/calc_tests3/tdf102506.py new file mode 100644 index ..cd2fb8ba0d7c --- /dev/null +++ b/sc/qa/uitest/calc_tests3/tdf102506.py @@ -0,0 +1,46 @@ +# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-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/. +# + +from uitest.framework import UITestCase +from libreoffice.uno.propertyvalue import mkPropertyValues +from uitest.uihelper.common import get_state_as_dict +from uitest.uihelper.calc import enter_text_to_cell + +class tdf102506(UITestCase): + +def test_tdf102506(self): + +with self.ui_test.create_doc_in_start_center("calc"): + +xCalcDoc = self.xUITest.getTopFocusWindow() +gridwin = xCalcDoc.getChild("grid_window") + +enter_text_to_cell(gridwin, "A1", "=2+3") + +# Go to a different cell +gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "C10"})) + +self.xUITest.executeCommand("vnd.sun.star.findbar:FocusToFindbar") + +xfind = xCalcDoc.getChild("find") +xfind.executeAction("TYPE", mkPropertyValues({"TEXT": "5"})) + +self.assertEqual("5", get_state_as_dict(xfind)['Text']) + +xfind_bar = xCalcDoc.getChild("FindBar") + +# Search Next +xfind_bar.executeAction("CLICK", mkPropertyValues({"POS": "3"})) + +# Without the fix in place, this test would have failed with +# AssertionError: '0' != '2' +self.assertEqual("0", get_state_as_dict(gridwin)["CurrentColumn"]) +self.assertEqual("0", get_state_as_dict(gridwin)["CurrentRow"]) + +# vim: set shiftwidth=4 softtabstop=4 expandtab:
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - include/svx svx/source
include/svx/sdr/contact/viewcontact.hxx |5 + svx/source/sdr/contact/viewcontact.cxx | 14 +- 2 files changed, 18 insertions(+), 1 deletion(-) New commits: commit 26259e4089ec0225e84ed99159d85e858f612022 Author: Noel Grandin AuthorDate: Wed Dec 8 11:14:47 2021 +0200 Commit: Caolán McNamara CommitDate: Fri Dec 10 22:53:09 2021 +0100 tdf#146108 Calc slow to change cell focus.. in a document with a big background image Revert "tdf#136058: remove some caching" This reverts commit 57c40329a2b469813a1f357de355a37c8e3077ae. And add some comments for future would-be optimisers. Change-Id: Ie8686edc38dcdbe7d9e78599c1a259aab68278a1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126527 Tested-by: Jenkins Reviewed-by: Noel Grandin Signed-off-by: Xisco Fauli Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126574 (cherry picked from commit 585bf5f2b223a1449dd8f6b65c5f0c0c00160af7) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126598 Reviewed-by: Caolán McNamara diff --git a/include/svx/sdr/contact/viewcontact.hxx b/include/svx/sdr/contact/viewcontact.hxx index c7119fcd93e2..eee3ea6f11cb 100644 --- a/include/svx/sdr/contact/viewcontact.hxx +++ b/include/svx/sdr/contact/viewcontact.hxx @@ -46,6 +46,11 @@ private: // Registering and de-registering is done in the VOC constructors/destructors. std::vector maViewObjectContactVector; +// Primitive2DContainer of the ViewContact. This contains all necessary information +// for the graphical visualisation and needs to be supported by all VCs which +// can be visualized. +drawinglayer::primitive2d::Primitive2DContainer mxViewIndependentPrimitive2DSequence; + // A new ViewObjectContact was created and shall be remembered. void AddViewObjectContact(ViewObjectContact& rVOContact); diff --git a/svx/source/sdr/contact/viewcontact.cxx b/svx/source/sdr/contact/viewcontact.cxx index 1723a6bb91e8..52cca39d7057 100644 --- a/svx/source/sdr/contact/viewcontact.cxx +++ b/svx/source/sdr/contact/viewcontact.cxx @@ -104,7 +104,9 @@ void ViewContact::RemoveViewObjectContact(ViewObjectContact& rVOContact) maViewObjectContactVector.begin(), maViewObjectContactVector.end(), &rVOContact); if (aFindResult != maViewObjectContactVector.end()) +{ maViewObjectContactVector.erase(aFindResult); +} } // Test if this ViewContact has ViewObjectContacts at all. This can @@ -229,6 +231,9 @@ ViewContact::createViewIndependentPrimitive2DSequence() const drawinglayer::primitive2d::Primitive2DContainer ViewContact::getViewIndependentPrimitive2DContainer() const { +/* Local up-to-date checks. Create new list and compare. +We cannot just always use the new data because the old data has cached bitmaps in it e.g. see the document in tdf#146108. +*/ drawinglayer::primitive2d::Primitive2DContainer xNew( createViewIndependentPrimitive2DSequence()); @@ -238,7 +243,14 @@ ViewContact::getViewIndependentPrimitive2DContainer() const xNew = embedToObjectSpecificInformation(std::move(xNew)); } -return xNew; +if (mxViewIndependentPrimitive2DSequence != xNew) +{ +// has changed, copy content +const_cast(this)->mxViewIndependentPrimitive2DSequence = std::move(xNew); +} + +// return current Primitive2DContainer +return mxViewIndependentPrimitive2DSequence; } // add Gluepoints (if available)
[Libreoffice-commits] core.git: svx/source sw/source
svx/source/svdraw/svdedxv.cxx |3 ++- sw/source/core/inc/frmtool.hxx|5 - sw/source/core/layout/frmtool.cxx |7 ++- 3 files changed, 12 insertions(+), 3 deletions(-) New commits: commit 93388cca19810b41cb45b3770dd6212345e65a14 Author: Caolán McNamara AuthorDate: Fri Dec 10 19:56:48 2021 + Commit: Caolán McNamara CommitDate: Fri Dec 10 22:49:12 2021 +0100 cid#1485150 suppress Uncaught exception Change-Id: I3baac0b02a3d1eef150cb78873ffbee51282b0db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126654 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index f046fb185057..6ba72c1c09f1 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -91,7 +92,7 @@ SdrObjEditView::~SdrObjEditView() mpTextEditWin = nullptr; // so there's no ShowCursor in SdrEndTextEdit assert(!IsTextEdit()); if (IsTextEdit()) -SdrEndTextEdit(); +suppress_fun_call_w_exception(SdrEndTextEdit()); mpTextEditOutliner.reset(); assert(nullptr == mpOldTextEditUndoManager); // should have been reset } diff --git a/sw/source/core/inc/frmtool.hxx b/sw/source/core/inc/frmtool.hxx index 29eec3495080..872944a75a50 100644 --- a/sw/source/core/inc/frmtool.hxx +++ b/sw/source/core/inc/frmtool.hxx @@ -224,6 +224,9 @@ void CalcContent( SwLayoutFrame *pLay, bool bNoColl = false ); // the necessary notifications in their destructor if needed class SwFrameNotify { +private: +void ImplDestroy(); + protected: SwFrame *mpFrame; const SwRect maFrame; @@ -236,7 +239,7 @@ protected: public: SwFrameNotify( SwFrame *pFrame ); -~SwFrameNotify() COVERITY_NOEXCEPT_FALSE; +~SwFrameNotify(); const SwRect &getFrameArea() const { return maFrame; } void SetInvaKeep() { mbInvaKeep = true; } diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index 6872360d646c..3f92694ff7a6 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -125,7 +125,12 @@ SwFrameNotify::SwFrameNotify( SwFrame *pF ) : mbHadFollow = pF->IsContentFrame() && static_cast(pF)->GetFollow(); } -SwFrameNotify::~SwFrameNotify() COVERITY_NOEXCEPT_FALSE +SwFrameNotify::~SwFrameNotify() +{ +suppress_fun_call_w_exception(ImplDestroy()); +} + +void SwFrameNotify::ImplDestroy() { SwRectFnSet aRectFnSet(mpFrame); const bool bAbsP = aRectFnSet.PosDiff(maFrame, mpFrame->getFrameArea());
[Libreoffice-commits] core.git: helpcontent2
helpcontent2 |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit bff9f1719a230d031f4914d3412d69701fcaf3d3 Author: Rafael Lima AuthorDate: Fri Dec 10 23:22:47 2021 +0200 Commit: Gerrit Code Review CommitDate: Fri Dec 10 22:22:47 2021 +0100 Update git submodules * Update helpcontent2 from branch 'master' to 6fa6b45d603d01cb30549cdf9d1c56fa9376aa67 - tdf#144133 Fix help target for Expert Config Edit dialog When the user opens the "Expert Configuration" dialog, selects a preference and double clicks it, another dialog is opened to edit the preference value. Clicking "Help" in this second dialog leads to a 404 page not found error. This patch changes this behavior so that clicking the Help button opens the "Expert Configuration" help page. Change-Id: I0104617153f710b09c7436b7f5e3faa78cddb2bd Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126507 Tested-by: Jenkins Reviewed-by: Olivier Hallot diff --git a/helpcontent2 b/helpcontent2 index 074f4a0f8b98..6fa6b45d603d 16 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit 074f4a0f8b985a01c970d3d0bd9329d4e3c2634a +Subproject commit 6fa6b45d603d01cb30549cdf9d1c56fa9376aa67
[Libreoffice-commits] help.git: source/text
source/text/shared/optionen/expertconfig.xhp |1 + 1 file changed, 1 insertion(+) New commits: commit 6fa6b45d603d01cb30549cdf9d1c56fa9376aa67 Author: Rafael Lima AuthorDate: Tue Dec 7 20:49:39 2021 +0200 Commit: Olivier Hallot CommitDate: Fri Dec 10 22:22:45 2021 +0100 tdf#144133 Fix help target for Expert Config Edit dialog When the user opens the "Expert Configuration" dialog, selects a preference and double clicks it, another dialog is opened to edit the preference value. Clicking "Help" in this second dialog leads to a 404 page not found error. This patch changes this behavior so that clicking the Help button opens the "Expert Configuration" help page. Change-Id: I0104617153f710b09c7436b7f5e3faa78cddb2bd Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126507 Tested-by: Jenkins Reviewed-by: Olivier Hallot diff --git a/source/text/shared/optionen/expertconfig.xhp b/source/text/shared/optionen/expertconfig.xhp index 5273d2979..004d0e9c2 100644 --- a/source/text/shared/optionen/expertconfig.xhp +++ b/source/text/shared/optionen/expertconfig.xhp @@ -27,6 +27,7 @@ + expert configuration;setting options
[Libreoffice-commits] core.git: chart2/qa
chart2/qa/extras/xshape/chart2xshape.cxx | 19 +-- chart2/qa/extras/xshape/data/reference/tolerance.xml | 15 +++ 2 files changed, 28 insertions(+), 6 deletions(-) New commits: commit ccce752f42adbabe04e221452ceb287b12b678e3 Author: Stephan Bergmann AuthorDate: Fri Dec 10 16:15:06 2021 +0100 Commit: Stephan Bergmann CommitDate: Fri Dec 10 21:05:08 2021 +0100 Allow for presumably more precise results of some layout calculations ...similar to 19559ebbee160d1625d06feec7e6566772dad231 "Allow for a presumably more precise result of BESSELY(80,9)", where at least on macOS ARM64 Clang 14 trunk (defaulting to -ffp-contract=on now) started to produce values that caused CppunitTest_chart2_xshape to fail with > Test name: Chart2XShapeTest::testPieChartLabels1 > double equality assertion failed > - Expected: 3819 > - Actual : 3820 > - Delta : 1e-08 > - Reference: chart2/qa/extras/xshape/data/reference/tdf90839-1.xml > - Node: /XShapes/XShape[2] > - Attr: positionY > > Test name: Chart2XShapeTest::testPieChartLabels2 > double equality assertion failed > - Expected: 3819 > - Actual : 3820 > - Delta : 1e-08 > - Reference: chart2/qa/extras/xshape/data/reference/tdf90839-2.xml > - Node: /XShapes/XShape[2]/XShapes/XShape[3]/XShapes/XShape[1] > - Attr: positionY > > Test name: Chart2XShapeTest::testPieChartLabels3 > double equality assertion failed > - Expected: 3819 > - Actual : 3820 > - Delta : 1e-08 > - Reference: chart2/qa/extras/xshape/data/reference/tdf90839-3.xml > - Node: /XShapes/XShape[2]/XShapes/XShape[3]/XShapes/XShape[1] > - Attr: positionY > > Test name: Chart2XShapeTest::testPieChartLabels4 > double equality assertion failed > - Expected: 3892 > - Actual : 3893 > - Delta : 1e-08 > - Reference: chart2/qa/extras/xshape/data/reference/tdf90839-4.xml > - Node: /XShapes/XShape[2]/XShapes/XShape[3]/XShapes/XShape[1] > - Attr: positionY and > Test name: Chart2XShapeTest::testPieChartLabels1 > double equality assertion failed > - Expected: 9723 > - Actual : 9722 > - Delta : 1e-08 > - Reference: chart2/qa/extras/xshape/data/reference/tdf90839-1.xml > - Node: /XShapes/XShape[2] > - Attr: sizeY > > Test name: Chart2XShapeTest::testPieChartLabels2 > double equality assertion failed > - Expected: 9723 > - Actual : 9722 > - Delta : 1e-08 > - Reference: chart2/qa/extras/xshape/data/reference/tdf90839-2.xml > - Node: /XShapes/XShape[2]/XShapes/XShape[3]/XShapes/XShape[1] > - Attr: sizeY > > Test name: Chart2XShapeTest::testPieChartLabels3 > double equality assertion failed > - Expected: 9723 > - Actual : 9722 > - Delta : 1e-08 > - Reference: chart2/qa/extras/xshape/data/reference/tdf90839-3.xml > - Node: /XShapes/XShape[2]/XShapes/XShape[3]/XShapes/XShape[1] > - Attr: sizeY > > Test name: Chart2XShapeTest::testPieChartLabels4 > double equality assertion failed > - Expected: 9577 > - Actual : 9576 > - Delta : 1e-08 > - Reference: chart2/qa/extras/xshape/data/reference/tdf90839-4.xml > - Node: /XShapes/XShape[2]/XShapes/XShape[3]/XShapes/XShape[1] > - Attr: sizeY and > Test name: Chart2XShapeTest::testPieChartLabels1 > double equality assertion failed > - Expected: 9724 > - Actual : 9723 > - Delta : 1e-08 > - Reference: chart2/qa/extras/xshape/data/reference/tdf90839-1.xml > - Node: /XShapes/XShape[2]/XShapes/XShape[2]/Transformation/Line2 > - Attr: column2 > > Test name: Chart2XShapeTest::testPieChartLabels2 > double equality assertion failed > - Expected: 4861 > - Actual : 4860 > - Delta : 1e-08 > - Reference: chart2/qa/extras/xshape/data/reference/tdf90839-2.xml > - Node: /XShapes/XShape[2]/XShapes/XShape[3]/XShapes/XShape[1]/XShapes/XShape[2]/XShapes/XShape/XShapes/XShape/XShapes/XShape[5]/Transformation/Line2 > - Attr: column2 > > Test name: Chart2XShapeTest::testPieChartLabels3 > double equality assertion failed > - Expected: 4861 > - Actual : 4860 > - Delta : 1e-08 > - Reference: chart2/qa/extras/xshape/data/reference/tdf90839-3.xml > - Node: /XShapes/XShape[2]/XShapes/XShape[3]/XShapes/XShape[1]/XShapes/XShape[2]/XShapes/XShape/XShapes/XShape/XShapes/XShape[5]/Transformation/Line2 > - Attr: column2 > > Test name: Chart2XShapeTest::testPieChartLabels4 > double equality assertion failed > - Expected: 4788 > - Actual : 4787 > - Delta : 1e-08 > - Reference: chart2/qa/extras/xshape/data/reference/tdf90839-4.xml > - Node: /XShapes/XShape[2]/XShapes/XShape[3]/XShapes/XShape[1]/XShapes/XShape[2]/XShapes/XShape/XShapes/XShape/XShapes/XShape[5]/Transformation/Line2
[Libreoffice-commits] core.git: sc/qa
sc/qa/unit/data/functions/financial/fods/rate.fods|2 +- sc/qa/unit/data/functions/statistical/fods/chisq.test.fods|2 +- sc/qa/unit/data/functions/statistical/fods/chisqinv.fods |2 +- sc/qa/unit/data/functions/statistical/fods/chitest.fods |2 +- sc/qa/unit/data/functions/statistical/fods/forecast.ets.mult.fods |2 +- 5 files changed, 5 insertions(+), 5 deletions(-) New commits: commit 04215f03492f6fce83d6bc64491749bf803c389a Author: Stephan Bergmann AuthorDate: Fri Dec 10 15:50:55 2021 +0100 Commit: Stephan Bergmann CommitDate: Fri Dec 10 21:04:08 2021 +0100 Allow for presumably more precices results of some more Calc function calls ...similar to 19559ebbee160d1625d06feec7e6566772dad231 "Allow for a presumably more precise result of BESSELY(80,9)", where at least on macOS ARM64 Clang 14 trunk (defaulting to -ffp-contract=on now) started to produce values that caused various CppunitTests to fail (and only one of which had been addressed in 19559ebbee160d1625d06feec7e6566772dad231, for starters). The discrepancies addressed by this commit are: * CppunitTest_sc_financial_functions_test: ** sc/qa/unit/data/functions/financial/fods/rate.fods: *** row 23: actual 0.25095659014 vs. expected 0.25092908987 * CppunitTest_sc_statistical_functions_test ** sc/qa/unit/data/functions/statistical/fods/chisq.test.fods: *** row 10: actual 1.66789802691648E-016 vs. expected 1.66789802691649E-16 ** sc/qa/unit/data/functions/statistical/fods/chisqinv.fods: *** row 58: actual 3.01E-001 vs. expected 0.299 ** sc/qa/unit/data/functions/statistical/fods/chitest.fods: *** row 10: actual 1.66789802691648E-016 vs. expected 1.66789802691649E-16 ** sc/qa/unit/data/functions/statistical/fods/forecast.ets.mult.fods: *** row 79: actual 268.59802115122 vs. expected 268.598021151221 Change-Id: I4439f59394feadd2d6406dc4c4f985f479cd8fe0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126640 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/sc/qa/unit/data/functions/financial/fods/rate.fods b/sc/qa/unit/data/functions/financial/fods/rate.fods index 87080a647c5e..1d854638c09d 100644 --- a/sc/qa/unit/data/functions/financial/fods/rate.fods +++ b/sc/qa/unit/data/functions/financial/fods/rate.fods @@ -2770,7 +2770,7 @@ 0.25092908987 - + TRUE diff --git a/sc/qa/unit/data/functions/statistical/fods/chisq.test.fods b/sc/qa/unit/data/functions/statistical/fods/chisq.test.fods index aaffa4a02a5e..7fb37b620a3c 100644 --- a/sc/qa/unit/data/functions/statistical/fods/chisq.test.fods +++ b/sc/qa/unit/data/functions/statistical/fods/chisq.test.fods @@ -4306,7 +4306,7 @@ 1.66789802691649E-16 - + TRUE diff --git a/sc/qa/unit/data/functions/statistical/fods/chisqinv.fods b/sc/qa/unit/data/functions/statistical/fods/chisqinv.fods index 4bb9cc65d9df..31eed0ec486e 100644 --- a/sc/qa/unit/data/functions/statistical/fods/chisqinv.fods +++ b/sc/qa/unit/data/functions/statistical/fods/chisqinv.fods @@ -5585,7 +5585,7 @@ 0.30 - + TRUE diff --git a/sc/qa/unit/data/functions/statistical/fods/chitest.fods b/sc/qa/unit/data/functions/statistical/fods/chitest.fods index f72361ae35f8..03a1a53b13b8 100644 --- a/sc/qa/unit/data/functions/statistical/fods/chitest.fods +++ b/sc/qa/unit/data/functions/statistical/fods/chitest.fods @@ -4306,7 +4306,7 @@ 1.66789802691649E-16 - + TRUE diff --git a/sc/qa/unit/data/functions/statistical/fods/forecast.ets.mult.fods b/sc/qa/unit/data/functions/statistical/fods/forecast.ets.mult.fods index 150ec6b68115..9654571a2828 100644 --- a/sc/qa/unit/data/functions/statistical/fods/forecast.ets.mult.fods +++ b/sc/qa/unit/data/functions/statistical/fods/forecast.ets.mult.fods @@ -9020,7 +9020,7 @@ 268.598021151221 - + TRUE
[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - external/zxing
external/zxing/0001-Use-a-patch-file-to-document-changes-from-upstream-s.patch | 35 external/zxing/0002-Update-stb_image_write-from-1.14-to-1.16.patch | 361 +++ external/zxing/0003-Update-stb_image-from-2.25-to-2.27.patch | 1162 ++ external/zxing/0004-Apply-stb-PR-1223-to-stb_image.patch | 98 external/zxing/UnpackedTarball_zxing.mk |4 5 files changed, 1660 insertions(+) New commits: commit 310c7ae8599a1bc4f78fb6d00eaf1e4aeab0e7a7 Author: Caolán McNamara AuthorDate: Fri Dec 10 16:40:14 2021 + Commit: Caolán McNamara CommitDate: Fri Dec 10 20:53:28 2021 +0100 merge fixes to zxing's copy of stb_image see: https://github.com/nu-book/zxing-cpp/pull/269 CVE-2021-28021 CVE-2021-42715 CVE-2021-42716 though it's unclear if there is any relevence to our usage of zxing-cpp Change-Id: I30fa7682af56c432b651d8c0385f1b85c3582101 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126604 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/external/zxing/0001-Use-a-patch-file-to-document-changes-from-upstream-s.patch b/external/zxing/0001-Use-a-patch-file-to-document-changes-from-upstream-s.patch new file mode 100644 index ..2ef284f53c28 --- /dev/null +++ b/external/zxing/0001-Use-a-patch-file-to-document-changes-from-upstream-s.patch @@ -0,0 +1,35 @@ +From 1d031966e08aef92ef742ae3cf91e1addaf95a47 Mon Sep 17 00:00:00 2001 +From: "Benjamin A. Beasley" +Date: Wed, 8 Dec 2021 18:14:54 -0500 +Subject: [PATCH 1/4] Use a patch file to document changes from upstream + stb_image.h + +--- + thirdparty/stb/stb_image.patch | 15 +++ + 1 file changed, 15 insertions(+) + create mode 100644 thirdparty/stb/stb_image.patch + +diff --git a/thirdparty/stb/stb_image.patch b/thirdparty/stb/stb_image.patch +new file mode 100644 +index 000..5153728 +--- /dev/null b/thirdparty/stb/stb_image.patch +@@ -0,0 +1,15 @@ ++diff -Naur upstream/stb_image.h zxing/stb_image.h ++--- upstream/stb_image.h 2021-12-08 18:11:28.170529096 -0500 + zxing/stb_image.h 2021-12-08 18:06:42.706717697 -0500 ++@@ -1644,7 +1644,11 @@ ++ ++ static stbi_uc stbi__compute_y(int r, int g, int b) ++ { +++#if 0 // ori ++return (stbi_uc) (((r*77) + (g*150) + (29*b)) >> 8); +++#else // zxing (see ReadBarcode.cpp:RGBToGray) +++ return (stbi_uc) ((306 * r + 601 * g + 117 * b + 0x200) >> 10); +++#endif ++ } ++ #endif ++ +-- +2.33.1 + diff --git a/external/zxing/0002-Update-stb_image_write-from-1.14-to-1.16.patch b/external/zxing/0002-Update-stb_image_write-from-1.14-to-1.16.patch new file mode 100644 index ..de62ff0a9ffb --- /dev/null +++ b/external/zxing/0002-Update-stb_image_write-from-1.14-to-1.16.patch @@ -0,0 +1,361 @@ +From 38f86eecd1e790329d56a4491ee0498d75d61c42 Mon Sep 17 00:00:00 2001 +From: "Benjamin A. Beasley" +Date: Wed, 8 Dec 2021 18:16:46 -0500 +Subject: [PATCH 2/4] Update stb_image_write from 1.14 to 1.16 + + 1.16 (2021-07-11) + make Deflate code emit uncompressed blocks when it would + otherwise expand support writing BMPs with alpha channel + 1.15 (2020-07-13) unknown +--- + thirdparty/stb/stb_image_write.h | 132 ++- + 1 file changed, 95 insertions(+), 37 deletions(-) + +diff --git a/thirdparty/stb/stb_image_write.h b/thirdparty/stb/stb_image_write.h +index cffd473..e4b32ed 100644 +--- a/thirdparty/stb/stb_image_write.h b/thirdparty/stb/stb_image_write.h +@@ -1,4 +1,4 @@ +-/* stb_image_write - v1.14 - public domain - http://nothings.org/stb ++/* stb_image_write - v1.16 - public domain - http://nothings.org/stb +writes out PNG/BMP/TGA/JPEG/HDR images to C stdio - Sean Barrett 2010-2015 + no warranty implied; use at your own risk + +@@ -140,6 +140,7 @@ CREDITS: + Ivan Tikhonov + github:ignotion + Adam Schackart ++ Andrew Kensler + + LICENSE + +@@ -166,9 +167,9 @@ LICENSE + #endif + + #ifndef STB_IMAGE_WRITE_STATIC // C++ forbids static forward declarations +-extern int stbi_write_tga_with_rle; +-extern int stbi_write_png_compression_level; +-extern int stbi_write_force_png_filter; ++STBIWDEF int stbi_write_tga_with_rle; ++STBIWDEF int stbi_write_png_compression_level; ++STBIWDEF int stbi_write_force_png_filter; + #endif + + #ifndef STBI_WRITE_NO_STDIO +@@ -178,7 +179,7 @@ STBIWDEF int stbi_write_tga(char const *filename, int w, int h, int comp, const + STBIWDEF int stbi_write_hdr(char const *filename, int w, int h, int comp, const float *data); + STBIWDEF int stbi_write_jpg(char const *filename, int x, int y, int comp, const void *data, int quality); + +-#ifdef STBI_WINDOWS_UTF8 ++#ifdef STBIW_WINDOWS_UTF8 + STBIWDEF int stbiw_convert_wchar_to_utf8(char *buffer, size_t bufferlen, const wchar_t* input); + #endif + #endif +@@ -267,6 +268,8 @@ typedef
[Libreoffice-commits] core.git: external/zxing
external/zxing/0001-Use-a-patch-file-to-document-changes-from-upstream-s.patch | 35 external/zxing/0002-Update-stb_image_write-from-1.14-to-1.16.patch | 361 +++ external/zxing/0003-Update-stb_image-from-2.25-to-2.27.patch | 1162 ++ external/zxing/0004-Apply-stb-PR-1223-to-stb_image.patch | 98 external/zxing/UnpackedTarball_zxing.mk |4 5 files changed, 1660 insertions(+) New commits: commit 69c62b009d220b7553374151f81149f8eec16f42 Author: Caolán McNamara AuthorDate: Fri Dec 10 16:40:14 2021 + Commit: Caolán McNamara CommitDate: Fri Dec 10 20:52:49 2021 +0100 merge fixes to zxing's copy of stb_image see: https://github.com/nu-book/zxing-cpp/pull/269 CVE-2021-28021 CVE-2021-42715 CVE-2021-42716 though it's unclear if there is any relevence to our usage of zxing-cpp Change-Id: I30fa7682af56c432b651d8c0385f1b85c3582101 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126647 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/external/zxing/0001-Use-a-patch-file-to-document-changes-from-upstream-s.patch b/external/zxing/0001-Use-a-patch-file-to-document-changes-from-upstream-s.patch new file mode 100644 index ..2ef284f53c28 --- /dev/null +++ b/external/zxing/0001-Use-a-patch-file-to-document-changes-from-upstream-s.patch @@ -0,0 +1,35 @@ +From 1d031966e08aef92ef742ae3cf91e1addaf95a47 Mon Sep 17 00:00:00 2001 +From: "Benjamin A. Beasley" +Date: Wed, 8 Dec 2021 18:14:54 -0500 +Subject: [PATCH 1/4] Use a patch file to document changes from upstream + stb_image.h + +--- + thirdparty/stb/stb_image.patch | 15 +++ + 1 file changed, 15 insertions(+) + create mode 100644 thirdparty/stb/stb_image.patch + +diff --git a/thirdparty/stb/stb_image.patch b/thirdparty/stb/stb_image.patch +new file mode 100644 +index 000..5153728 +--- /dev/null b/thirdparty/stb/stb_image.patch +@@ -0,0 +1,15 @@ ++diff -Naur upstream/stb_image.h zxing/stb_image.h ++--- upstream/stb_image.h 2021-12-08 18:11:28.170529096 -0500 + zxing/stb_image.h 2021-12-08 18:06:42.706717697 -0500 ++@@ -1644,7 +1644,11 @@ ++ ++ static stbi_uc stbi__compute_y(int r, int g, int b) ++ { +++#if 0 // ori ++return (stbi_uc) (((r*77) + (g*150) + (29*b)) >> 8); +++#else // zxing (see ReadBarcode.cpp:RGBToGray) +++ return (stbi_uc) ((306 * r + 601 * g + 117 * b + 0x200) >> 10); +++#endif ++ } ++ #endif ++ +-- +2.33.1 + diff --git a/external/zxing/0002-Update-stb_image_write-from-1.14-to-1.16.patch b/external/zxing/0002-Update-stb_image_write-from-1.14-to-1.16.patch new file mode 100644 index ..de62ff0a9ffb --- /dev/null +++ b/external/zxing/0002-Update-stb_image_write-from-1.14-to-1.16.patch @@ -0,0 +1,361 @@ +From 38f86eecd1e790329d56a4491ee0498d75d61c42 Mon Sep 17 00:00:00 2001 +From: "Benjamin A. Beasley" +Date: Wed, 8 Dec 2021 18:16:46 -0500 +Subject: [PATCH 2/4] Update stb_image_write from 1.14 to 1.16 + + 1.16 (2021-07-11) + make Deflate code emit uncompressed blocks when it would + otherwise expand support writing BMPs with alpha channel + 1.15 (2020-07-13) unknown +--- + thirdparty/stb/stb_image_write.h | 132 ++- + 1 file changed, 95 insertions(+), 37 deletions(-) + +diff --git a/thirdparty/stb/stb_image_write.h b/thirdparty/stb/stb_image_write.h +index cffd473..e4b32ed 100644 +--- a/thirdparty/stb/stb_image_write.h b/thirdparty/stb/stb_image_write.h +@@ -1,4 +1,4 @@ +-/* stb_image_write - v1.14 - public domain - http://nothings.org/stb ++/* stb_image_write - v1.16 - public domain - http://nothings.org/stb +writes out PNG/BMP/TGA/JPEG/HDR images to C stdio - Sean Barrett 2010-2015 + no warranty implied; use at your own risk + +@@ -140,6 +140,7 @@ CREDITS: + Ivan Tikhonov + github:ignotion + Adam Schackart ++ Andrew Kensler + + LICENSE + +@@ -166,9 +167,9 @@ LICENSE + #endif + + #ifndef STB_IMAGE_WRITE_STATIC // C++ forbids static forward declarations +-extern int stbi_write_tga_with_rle; +-extern int stbi_write_png_compression_level; +-extern int stbi_write_force_png_filter; ++STBIWDEF int stbi_write_tga_with_rle; ++STBIWDEF int stbi_write_png_compression_level; ++STBIWDEF int stbi_write_force_png_filter; + #endif + + #ifndef STBI_WRITE_NO_STDIO +@@ -178,7 +179,7 @@ STBIWDEF int stbi_write_tga(char const *filename, int w, int h, int comp, const + STBIWDEF int stbi_write_hdr(char const *filename, int w, int h, int comp, const float *data); + STBIWDEF int stbi_write_jpg(char const *filename, int x, int y, int comp, const void *data, int quality); + +-#ifdef STBI_WINDOWS_UTF8 ++#ifdef STBIW_WINDOWS_UTF8 + STBIWDEF int stbiw_convert_wchar_to_utf8(char *buffer, size_t bufferlen, const wchar_t* input); + #endif + #endif +@@ -267,6 +268,8 @@ typedef
[Libreoffice-commits] core.git: sc/uiconfig
sc/uiconfig/scalc/ui/filtersubdropdown.ui |1 - 1 file changed, 1 deletion(-) New commits: commit a298718eb807c1857cb488a2915126de331ccafa Author: Caolán McNamara AuthorDate: Fri Dec 10 15:47:20 2021 + Commit: Caolán McNamara CommitDate: Fri Dec 10 20:52:04 2021 +0100 Related: tdf#146018 constrain submenu to window like toplevel menu so under wayland it not go off-screen Change-Id: I69f4f71cffaf4e4ac4def87d71b947e2dd903a08 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126643 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sc/uiconfig/scalc/ui/filtersubdropdown.ui b/sc/uiconfig/scalc/ui/filtersubdropdown.ui index 2cb944e97861..7e57c1801d62 100644 --- a/sc/uiconfig/scalc/ui/filtersubdropdown.ui +++ b/sc/uiconfig/scalc/ui/filtersubdropdown.ui @@ -55,7 +55,6 @@ True right False -none True
[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - sd/source sw/source
sd/source/ui/annotations/annotationwindow.cxx |9 +++-- sw/source/uibase/docvw/AnnotationWin2.cxx |9 +++-- 2 files changed, 14 insertions(+), 4 deletions(-) New commits: commit 0b7fe09bef0ac324132528e1b93b7c4102f3e087 Author: Caolán McNamara AuthorDate: Fri Dec 10 16:25:45 2021 + Commit: Caolán McNamara CommitDate: Fri Dec 10 20:51:41 2021 +0100 Resolves: tdf#145974 reduce the papersize by scrollbar thickness if scrollbar required and scrollbar isn't an overlay one Change-Id: I839fd8c214febadb80f692b53dc156e251f506ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126602 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx index c3b797f239ce..42ebe77c306f 100644 --- a/sd/source/ui/annotations/annotationwindow.cxx +++ b/sd/source/ui/annotations/annotationwindow.cxx @@ -390,8 +390,13 @@ void AnnotationWindow::DoResize() if( aTextHeight > aHeight ) { -// we need vertical scrollbars and have to reduce the width -aWidth -= mxVScrollbar->get_scroll_thickness(); +const int nThickness = mxVScrollbar->get_scroll_thickness(); +if (nThickness) +{ +// we need vertical scrollbars and have to reduce the width +aWidth -= nThickness; +mpOutliner->SetPaperSize(rDevice.PixelToLogic(Size(aWidth, aHeight))); +} mxVScrollbar->set_vpolicy(VclPolicyType::ALWAYS); } else diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx b/sw/source/uibase/docvw/AnnotationWin2.cxx index 6cb5511a02fa..19f8620aeb96 100644 --- a/sw/source/uibase/docvw/AnnotationWin2.cxx +++ b/sw/source/uibase/docvw/AnnotationWin2.cxx @@ -752,8 +752,13 @@ void SwAnnotationWin::DoResize() if (aTextHeight > aHeight) { -// we need vertical scrollbars and have to reduce the width -aWidth -= mxVScrollbar->get_scroll_thickness(); +const int nThickness = mxVScrollbar->get_scroll_thickness(); +if (nThickness) +{ +// we need vertical scrollbars and have to reduce the width +aWidth -= nThickness; +mpOutliner->SetPaperSize(PixelToLogic(Size(aWidth, aHeight))); +} mxVScrollbar->set_vpolicy(VclPolicyType::ALWAYS); } else
[Libreoffice-commits] core.git: sd/source sw/source
sd/source/ui/annotations/annotationwindow.cxx |9 +++-- sw/source/uibase/docvw/AnnotationWin2.cxx |9 +++-- 2 files changed, 14 insertions(+), 4 deletions(-) New commits: commit f40390d98f45e6cb19ad896dc30eff07f746942f Author: Caolán McNamara AuthorDate: Fri Dec 10 16:25:45 2021 + Commit: Caolán McNamara CommitDate: Fri Dec 10 20:51:22 2021 +0100 Resolves: tdf#145974 reduce the papersize by scrollbar thickness if scrollbar required and scrollbar isn't an overlay one Change-Id: I839fd8c214febadb80f692b53dc156e251f506ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126645 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx index c3b797f239ce..42ebe77c306f 100644 --- a/sd/source/ui/annotations/annotationwindow.cxx +++ b/sd/source/ui/annotations/annotationwindow.cxx @@ -390,8 +390,13 @@ void AnnotationWindow::DoResize() if( aTextHeight > aHeight ) { -// we need vertical scrollbars and have to reduce the width -aWidth -= mxVScrollbar->get_scroll_thickness(); +const int nThickness = mxVScrollbar->get_scroll_thickness(); +if (nThickness) +{ +// we need vertical scrollbars and have to reduce the width +aWidth -= nThickness; +mpOutliner->SetPaperSize(rDevice.PixelToLogic(Size(aWidth, aHeight))); +} mxVScrollbar->set_vpolicy(VclPolicyType::ALWAYS); } else diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx b/sw/source/uibase/docvw/AnnotationWin2.cxx index 30e391182118..913430ed9822 100644 --- a/sw/source/uibase/docvw/AnnotationWin2.cxx +++ b/sw/source/uibase/docvw/AnnotationWin2.cxx @@ -752,8 +752,13 @@ void SwAnnotationWin::DoResize() if (aTextHeight > aHeight) { -// we need vertical scrollbars and have to reduce the width -aWidth -= mxVScrollbar->get_scroll_thickness(); +const int nThickness = mxVScrollbar->get_scroll_thickness(); +if (nThickness) +{ +// we need vertical scrollbars and have to reduce the width +aWidth -= nThickness; +mpOutliner->SetPaperSize(PixelToLogic(Size(aWidth, aHeight))); +} mxVScrollbar->set_vpolicy(VclPolicyType::ALWAYS); } else
[Libreoffice-commits] core.git: basic/source
basic/source/runtime/methods1.cxx | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) New commits: commit 70591eb5efb9f4e5596b32d1e3c9368b9e9726a4 Author: Caolán McNamara AuthorDate: Fri Dec 10 16:32:33 2021 + Commit: Caolán McNamara CommitDate: Fri Dec 10 20:50:56 2021 +0100 ofz#42182 oss-build failure since... commit 47aabde053a1472dc32770da29d68c8de5bd7919 Date: Thu Dec 2 12:37:07 2021 +0200 Make the tdf#97983 changes to BASIC optional where LibreOffice6FloatingPointMode is called from code not inside !HAVE_FEATURE_SCRIPTING [LNK] Executable/pptfuzzer basic/source/sbx/sbxvalue.cxx:1343: error: undefined reference to 'LibreOffice6FloatingPointMode()' basic/source/sbx/sbxvalue.cxx:1328: error: undefined reference to 'LibreOffice6FloatingPointMode()' basic/source/sbx/sbxvar.cxx:456: error: undefined reference to 'LibreOffice6FloatingPointMode()' basic/source/sbx/sbxvar.cxx:441: error: undefined reference to 'LibreOffice6FloatingPointMode()' clang-14: error: linker command failed with exit code 1 (use -v to see invocation) make[1]: *** [/src/libreoffice/vcl/Executable_pptfuzzer.mk:13: instdir/program/pptfuzzer] Error 1 make: *** [Makefile:170: Executable_pptfuzzer] Error 2 Change-Id: I8e635df26f30edf8acd9c148590d034e8b13c056 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126646 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx index 8e78776bc7f8..e1f68b950262 100644 --- a/basic/source/runtime/methods1.cxx +++ b/basic/source/runtime/methods1.cxx @@ -2973,13 +2973,6 @@ void SbRtl_CompatibilityMode(StarBASIC *, SbxArray & rPar, bool) rPar.Get(0)->PutBool(bEnabled); } -bool LibreOffice6FloatingPointMode() -{ -static bool bMode = std::getenv("LIBREOFFICE6FLOATINGPOINTMODE") != nullptr; - -return bMode || officecfg::Office::Scripting::Basic::Compatibility::UseLibreOffice6FloatingPointConversion::get(); -} - void SbRtl_Input(StarBASIC *, SbxArray & rPar, bool) { // 2 parameters needed @@ -3032,6 +3025,13 @@ void SbRtl_Me(StarBASIC *, SbxArray & rPar, bool) #endif +bool LibreOffice6FloatingPointMode() +{ +static bool bMode = std::getenv("LIBREOFFICE6FLOATINGPOINTMODE") != nullptr; + +return bMode || officecfg::Office::Scripting::Basic::Compatibility::UseLibreOffice6FloatingPointConversion::get(); +} + sal_Int16 implGetWeekDay( double aDate, bool bFirstDayParam, sal_Int16 nFirstDay ) { Date aRefDate( 1,1,1900 );
[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - sc/source vcl/source
sc/source/ui/view/gridwin.cxx | 11 +-- vcl/source/window/winproc.cxx |7 +++ 2 files changed, 16 insertions(+), 2 deletions(-) New commits: commit a102f574d8bf8bd37221440170c9f21da45dc651 Author: Armin Le Grand (Allotropia) AuthorDate: Thu Dec 9 16:13:12 2021 +0100 Commit: Thorsten Behrens CommitDate: Fri Dec 10 19:25:49 2021 +0100 tdf#127341 Do not activate TextEdit at right-klick on URL in calc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126618 Tested-by: Jenkins Reviewed-by: Armin Le Grand (cherry picked from commit 110d3504c1f738a1d7f740cc212064dafa4fb224) Change-Id: I1881c007a05f56d5cb7914da56243f551c2da1cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126597 Tested-by: Thorsten Behrens Reviewed-by: Thorsten Behrens diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 15ae09b7f31c..aa540b5d5134 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -3009,8 +3009,15 @@ void ScGridWindow::Command( const CommandEvent& rCEvt ) if ( !bEdit ) { -// Edit cell with spelling errors ? -if (bMouse && (GetEditUrl(aPosPixel) || bSpellError)) +// Edit cell with spelling errors ? +// tdf#127341 the formally used GetEditUrl(aPosPixel) addiionally +// to bSpellError acivated EditMode here for right-click on URL +// which prevents the regular contex-menu from appearing. Since this +// is more expeced than the context-menu for editing an URL I removed +// this. If this was wanted and can be argued his migh be re-acivated. +// For now, reduce to spelling errors - as the original comment above +// suggests. +if (bMouse && bSpellError) { // GetEditUrlOrError has already moved the Cursor diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index cb4c6cd35d9e..5ac478c86972 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -262,6 +262,13 @@ bool ImplHandleMouseEvent( const VclPtr& xWindow, MouseNotifyEvent long nX, long nY, sal_uInt64 nMsgTime, sal_uInt16 nCode, MouseEventModifiers nMode ) { +SAL_INFO( "vcl.debugevent", + "mouse event " + "(MouseNotifyEvent " << static_cast(nSVEvent) << ") " + "(MouseLeave " << bMouseLeave << ") " + "(X, Y " << nX << ", " << nY << ") " + "(Code " << nCode << ") " + "(Modifiers " << static_cast(nMode) << ")"); ImplSVData* pSVData = ImplGetSVData(); Point aMousePos( nX, nY ); VclPtr pChild;
[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - officecfg/registry svx/source
officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu |5 - svx/source/tbxctrls/tbunosearchcontrollers.cxx |2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) New commits: commit aec427fd124e73298b46f7b0423fa90f8e024f4b Author: Julien Nabet AuthorDate: Tue Dec 7 20:48:32 2021 +0100 Commit: Xisco Fauli CommitDate: Fri Dec 10 19:10:17 2021 +0100 Related tdf#102506: make Find Bar Ctrl+F searching by value by default Change-Id: I4c001b60eecbcdae95cde6d79cc91bb887d7a742 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126490 Reviewed-by: Julien Nabet (cherry picked from commit b60bc1e597032e598caf43d1a13409068b800f57) Change-Id: I95105ca522aa4905fa223b80828684810f0dccd7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126599 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu index 3fb594e55739..d615c04a0d00 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu @@ -1658,7 +1658,10 @@ bit 3 (0x8): #define UICOMMANDDESCRIPTION_PROPERTIES_TOGGLEBUTTON 8 - Find Text + Find Values + + + Find text in values, to search in formulas use the dialog diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx index 75a08ed16973..6deb930c18f2 100644 --- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx +++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx @@ -169,6 +169,8 @@ void impl_executeSearch( const css::uno::Reference< css::uno::XComponentContext auto aArgs( comphelper::InitPropertySequence( { { "SearchItem.SearchString", css::uno::makeAny( sFindText ) }, +// Related tdf#102506: make Find Bar Ctrl+F searching by value by default +{ "SearchItem.CellType", css::uno::makeAny( sal_Int16(SvxSearchCellType::VALUE) ) }, { "SearchItem.Backward", css::uno::makeAny( aSearchBackwards ) }, { "SearchItem.SearchFlags", css::uno::makeAny( sal_Int32(0) ) }, { "SearchItem.TransliterateFlags", css::uno::makeAny( static_cast(nFlags) ) },
[Libreoffice-commits] core.git: bin/find-can-be-private-symbols.functions.results canvas/source include/vcl vcl/headless vcl/inc vcl/qt5 vcl/quartz vcl/skia vcl/source vcl/unx vcl/win
bin/find-can-be-private-symbols.functions.results |2 canvas/source/vcl/canvashelper.cxx|2 include/vcl/outdev.hxx|8 +-- vcl/headless/svpgdi.cxx |5 ++ vcl/inc/headless/svpgdi.hxx |1 vcl/inc/qt5/QtGraphics.hxx|2 vcl/inc/quartz/salgdi.h |2 vcl/inc/salgdi.hxx| 15 --- vcl/inc/salgdiimpl.hxx|4 + vcl/inc/skia/gdiimpl.hxx |2 vcl/inc/unx/GenPspGfxBackend.hxx |2 vcl/inc/unx/salgdi.h |2 vcl/inc/win/salgdi.h |2 vcl/qt5/QtGraphics_GDI.cxx|3 - vcl/quartz/AquaGraphicsBackend.cxx|2 vcl/skia/gdiimpl.cxx |7 +++ vcl/source/gdi/salgdilayout.cxx | 46 +- vcl/source/outdev/bitmap.cxx | 12 + vcl/source/outdev/bitmapex.cxx|7 --- vcl/unx/generic/gdi/gdiimpl.cxx |5 ++ vcl/unx/generic/gdi/gdiimpl.hxx |2 vcl/unx/generic/gdi/salgdi2.cxx |9 ++-- vcl/unx/generic/print/GenPspGfxBackend.cxx|2 vcl/win/gdi/gdiimpl.cxx |5 ++ vcl/win/gdi/gdiimpl.hxx |2 vcl/win/gdi/salgdi_gdiplus.cxx|9 ++-- 26 files changed, 92 insertions(+), 68 deletions(-) New commits: commit 2c6e2fa596d4ecb22adb062a837f1bbf4384fed2 Author: Armin Le Grand AuthorDate: Fri Dec 10 16:36:11 2021 +0100 Commit: Armin Le Grand CommitDate: Fri Dec 10 17:51:12 2021 +0100 Revert "Re-Enable DrawTransformBitmapExDirect for render backends" This reverts commit 7e5af164b7d293dd410710bed411e1ca64bbecf7. Reason for revert: Not the best/effective way to clear out the stuff remaining to be done, would need additional stuff Change-Id: Ia6ab90384da29a5e34eff0ab8881bad2ab49c58c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126601 Tested-by: Jenkins Reviewed-by: Armin Le Grand diff --git a/bin/find-can-be-private-symbols.functions.results b/bin/find-can-be-private-symbols.functions.results index f5ebcac3d329..be8116b9ff90 100644 --- a/bin/find-can-be-private-symbols.functions.results +++ b/bin/find-can-be-private-symbols.functions.results @@ -2750,8 +2750,8 @@ SalGraphics::DrawTransformedBitmap(basegfx::B2DPoint const&, basegfx::B2DPoint c SalGraphics::FillFontSubsetInfo(vcl::TTGlobalFontInfo_ const&, rtl::OUString const&, FontSubsetInfo&) SalGraphics::GetBitmap(long, long, long, long, OutputDevice const&) SalGraphics::GetNativeControlRegion(ControlType, ControlPart, tools::Rectangle const&, ControlState, ImplControlValue const&, tools::Rectangle&, tools::Rectangle&, OutputDevice const&) -SalGraphics::ImplementsFastDrawTransformedBitmap(bool) const SalGraphics::GetPixel(long, long, OutputDevice const&) +SalGraphics::HasFastDrawTransformedBitmap() const SalGraphics::HitTestNativeScrollbar(ControlPart, tools::Rectangle const&, Point const&, bool&, OutputDevice const&) SalGraphics::Invert(long, long, long, long, SalInvert, OutputDevice const&) SalGraphics::Invert(unsigned int, Point const*, SalInvert, OutputDevice const&) diff --git a/canvas/source/vcl/canvashelper.cxx b/canvas/source/vcl/canvashelper.cxx index 2ba45cbfa75d..918a8f5f97fe 100644 --- a/canvas/source/vcl/canvashelper.cxx +++ b/canvas/source/vcl/canvashelper.cxx @@ -721,7 +721,7 @@ namespace vclcanvas // itself serves this purpose return uno::Reference< rendering::XCachedPrimitive >(nullptr); } -else if( mpOutDevProvider->getOutDev().ImplementsFastDrawTransformedBitmap()) +else if( mpOutDevProvider->getOutDev().HasFastDrawTransformedBitmap()) { ::basegfx::B2DHomMatrix aSizeTransform; aSizeTransform.scale( aBmpEx.GetSizePixel().Width(), aBmpEx.GetSizePixel().Height() ); diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index acf3c78c0d5c..eec957e14973 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -1381,11 +1381,11 @@ public: const BitmapEx& rBitmapEx, double fAlpha = 1.0); -/** Return true if DrawTransformedBitmapEx() is implemented. It may still fail, -e.g when fAlpha != 1.0 and that aspect is not implemented. This is a hint -that calling it is worth a try +/** Return true if DrawTransformedBitmapEx() is fast. + +@since 7.2 */ -boolImplementsFastDrawTransformedBitmap() const; +boolHasFastDrawTransformedBitmap() const; prote
[Libreoffice-commits] core.git: extensions/source
extensions/source/scanner/sane.cxx |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit 6494fba15ea93283b625bf6bdb4666709f22439f Author: Caolán McNamara AuthorDate: Fri Dec 10 15:34:05 2021 + Commit: Caolán McNamara CommitDate: Fri Dec 10 17:44:42 2021 +0100 more ofz#42182 oss-build failure Change-Id: I8960db6c013911df26b35623814c5586ce8c3d00 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126642 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/extensions/source/scanner/sane.cxx b/extensions/source/scanner/sane.cxx index 20bce0be68d0..de03e1158775 100644 --- a/extensions/source/scanner/sane.cxx +++ b/extensions/source/scanner/sane.cxx @@ -169,8 +169,8 @@ Sane::~Sane() void Sane::Init() { -OUString sSaneLibName( "libsane" SAL_DLLEXTENSION ); #ifndef DISABLE_DYNLOADING +OUString sSaneLibName( "libsane" SAL_DLLEXTENSION ); pSaneLib = osl_loadModule( sSaneLibName.pData, SAL_LOADMODULE_LAZY ); if( ! pSaneLib ) { @@ -244,7 +244,9 @@ void Sane::DeInit() if( pSaneLib ) { p_exit(); +#ifndef DISABLE_DYNLOADING osl_unloadModule( pSaneLib ); +#endif pSaneLib = nullptr; } }
[Libreoffice-commits] core.git: Changes to 'feature/cib_contract57l'
New branch 'feature/cib_contract57l' available with the following commits: commit 82903656706e22538a8c2b16790a1b7fc0fa5eb1 Author: Michael Stahl Date: Thu May 6 18:20:14 2021 +0200 tdf#138518 sw: layout: fix assert on ooo43913-1.doc Assertion `rAnchoredObjPage.GetPhyPageNum() == _nFromPageNum' failed. Because not only the fly's anchor frame moves forward in FormatAnchorFrameForCheckMoveFwd(), but also the fly itself, apparently because it's in a table: 0 SwAnchoredObject::SetPageFrame(SwPageFrame*) (this=0x5a1d3d8, _pNewPageFrame=0x8cfbeb0) at sw/source/core/layout/anchoredobject.cxx:162 1 SwPageFrame::MoveFly(SwFlyFrame*, SwPageFrame*) (this=0x8cbd8c0, pToMove=0x5a1d280, pDest=0x8cfbeb0) at sw/source/core/layout/flylay.cxx:985 2 lcl_ArrangeLowers(SwLayoutFrame*, tools::Long, bool) (pLay=0x8cf80c0, lYStart=179488, bInva=false) at sw/source/core/layout/tabfrm.cxx:5000 3 SwCellFrame::Format(OutputDevice*, SwBorderAttrs const*) (this=0x8cf80c0, pAttrs=0x8ce78c0) at sw/source/core/layout/tabfrm.cxx:5359 4 SwLayoutFrame::MakeAll(OutputDevice*) (this=0x8cf80c0) at sw/source/core/layout/calcmove.cxx:1036 5 SwFrame::PrepareMake(OutputDevice*) (this=0x8cf80c0, pRenderContext=0x5b7fcf0) at sw/source/core/layout/calcmove.cxx:375 6 SwFrame::Calc(OutputDevice*) const (this=0x8cf80c0, pRenderContext=0x5b7fcf0) at sw/source/core/layout/trvlfrm.cxx:1792 7 SwFrame::MakePos() (this=0x8cebdb0) at sw/source/core/layout/calcmove.cxx:627 8 SwTextFrame::MakePos() (this=0x8cebdb0) at sw/source/core/text/frmform.cxx:340 9 SwContentFrame::MakeAll(OutputDevice*) (this=0x8cebdb0) at sw/source/core/layout/calcmove.cxx:1412 10 SwFrame::PrepareMake(OutputDevice*) (this=0x8cebdb0, pRenderContext=0x5b7fcf0) at sw/source/core/layout/calcmove.cxx:286 11 SwFrame::Calc(OutputDevice*) const (this=0x8cebdb0, pRenderContext=0x5b7fcf0) at sw/source/core/layout/trvlfrm.cxx:1792 12 SwTextFrame::CalcFollow(o3tl::strong_int) (this=0x5ae2c60, nTextOfst=...) at sw/source/core/text/frmform.cxx:279 13 SwTextFrame::AdjustFollow_(SwTextFormatter&, o3tl::strong_int, o3tl::strong_int, unsigned char) (this=0x5ae2c60, rLine=..., nOffset=..., nEnd=..., nMode=1 '\001') at sw/source/core/text/frmform.cxx:611 14 SwTextFrame::FormatAdjust(SwTextFormatter&, WidowsAndOrphans&, o3tl::strong_int, bool) (this=0x5ae2c60, rLine=..., rFrameBreak=..., nStrLen=..., bDummy=false) at sw/source/core/text/frmform.cxx:1166 15 SwTextFrame::Format_(SwTextFormatter&, SwTextFormatInfo&, bool) (this=0x5ae2c60, rLine=..., rInf=..., bAdjust=false) at sw/source/core/text/frmform.cxx:1613 16 SwTextFrame::Format_(OutputDevice*, SwParaPortion*) (this=0x5ae2c60, pRenderContext=0x5b7fcf0, pPara=0x8d07490) at sw/source/core/text/frmform.cxx:1720 17 SwTextFrame::Format(OutputDevice*, SwBorderAttrs const*) (this=0x5ae2c60, pRenderContext=0x5b7fcf0) at sw/source/core/text/frmform.cxx:1910 18 SwContentFrame::MakeAll(OutputDevice*) (this=0x5ae2c60) at sw/source/core/layout/calcmove.cxx:1525 19 SwFrame::PrepareMake(OutputDevice*) (this=0x5ae2f80, pRenderContext=0x5b7fcf0) at sw/source/core/layout/calcmove.cxx:321 20 SwFrame::Calc(OutputDevice*) const (this=0x5ae2f80, pRenderContext=0x5b7fcf0) at sw/source/core/layout/trvlfrm.cxx:1792 21 SwObjectFormatterTextFrame::FormatAnchorFrameAndItsPrevs(SwTextFrame&) (_rAnchorTextFrame=...) at sw/source/core/layout/objectformattertxtfrm.cxx:905 22 SwObjectFormatterTextFrame::FormatAnchorFrameForCheckMoveFwd() (this=0x8ce5720) at sw/source/core/layout/objectformattertxtfrm.cxx:919 23 SwObjectFormatterTextFrame::DoFormatObjs() (this=0x8ce5720) at sw/source/core/layout/objectformattertxtfrm.cxx:368 24 SwObjectFormatter::FormatObjsAtFrame(SwFrame&, SwPageFrame const&, SwLayAction*) (_rAnchorFrame=..., _rPageFrame=..., _pLayAction=0x0) at sw/source/core/layout/objectformatter.cxx:160 25 SwContentFrame::CalcLowers(SwLayoutFrame&, SwLayoutFrame const&, long, bool) (rLay=..., rDontLeave=..., nBottom=192048, bSkipRowSpanCells=true) at sw/source/core/layout/tabfrm.cxx:1534 26 lcl_RecalcRow(SwRowFrame&, tools::Long) (rRow=..., nBottom=192048) at sw/source/core/layout/tabfrm.cxx:1653 27 SwTabFrame::MakeAll(OutputDevice*) (this=0x8cf5f80, pRenderContext=0x5b7fcf0) at sw/source/core/layout/tabfrm.cxx:2425 It looks like the _nFromPageNum is always from the SwObjectFormatter::mrPageFrame anyway because that's a precondition of the mpPgNumAndTypeOfAnchors->Collect() being called, so just rely on that to get the correct page. (regression from c799de145f7e289f31e3669646e5bd12814e6c5e) Change-Id: Ibdffb2121cffbc04320d17a29ab2e160dec4250b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115188 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 533a998e540b0f04068c876dde0e74adc3f79c93) Reviewed-on: https
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - vcl/inc vcl/jsdialog
vcl/inc/jsdialog/jsdialogbuilder.hxx |1 + vcl/jsdialog/executor.cxx|7 ++- vcl/jsdialog/jsdialogbuilder.cxx |5 + 3 files changed, 12 insertions(+), 1 deletion(-) New commits: commit 6e7cb1141ec9b8e7ca1e7d0e14125a69fe59b3c9 Author: Szymon Kłos AuthorDate: Wed Dec 8 17:22:37 2021 +0100 Commit: Szymon Kłos CommitDate: Fri Dec 10 16:54:56 2021 +0100 jsdialog: don't send back typed text for combobox Do the same what we do for Edit fields for ComboBox entry: when content is changed by event coming from the client because user typed something - then don't send back updated text so it will not disturb typing. It was visible with slow debug builds. Change-Id: Ib73096c4b96ebfdfd038ed56234c31ff32a5cda3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126549 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx b/vcl/inc/jsdialog/jsdialogbuilder.hxx index e9102f7e9d8c..ed655ede8435 100644 --- a/vcl/inc/jsdialog/jsdialogbuilder.hxx +++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx @@ -500,6 +500,7 @@ public: virtual void insert(int pos, const OUString& rStr, const OUString* pId, const OUString* pIconName, VirtualDevice* pImageSurface) override; virtual void remove(int pos) override; +virtual void set_entry_text_without_notify(const OUString& rText); virtual void set_entry_text(const OUString& rText) override; virtual void set_active(int pos) override; virtual bool changed_by_direct_pick() const override; diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx index cddee247c531..8662b246e5f9 100644 --- a/vcl/jsdialog/executor.cxx +++ b/vcl/jsdialog/executor.cxx @@ -106,7 +106,12 @@ bool ExecuteAction(const std::string& nWindowId, const OString& rWidget, StringM } else if (sAction == "change") { -pCombobox->set_entry_text(rData["data"]); +// it might be other class than JSComboBox +auto pJSCombobox = dynamic_cast(pWidget); +if (pJSCombobox) + pJSCombobox->set_entry_text_without_notify(rData["data"]); +else +pCombobox->set_entry_text(rData["data"]); LOKTrigger::trigger_changed(*pCombobox); return true; } diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx index 981ff5fb746a..a5bdd87033f6 100644 --- a/vcl/jsdialog/jsdialogbuilder.cxx +++ b/vcl/jsdialog/jsdialogbuilder.cxx @@ -1243,6 +1243,11 @@ void JSComboBox::remove(int pos) sendUpdate(); } +void JSComboBox::set_entry_text_without_notify(const OUString& rText) +{ +SalInstanceComboBoxWithEdit::set_entry_text(rText); +} + void JSComboBox::set_entry_text(const OUString& rText) { SalInstanceComboBoxWithEdit::set_entry_text(rText);
[Libreoffice-commits] core.git: include/svtools svtools/Library_svt.mk svtools/source
include/svtools/svparser.hxx |1 svtools/Library_svt.mk|1 svtools/source/svrtf/svparser.cxx | 99 ++ 3 files changed, 40 insertions(+), 61 deletions(-) New commits: commit 3392f567be8d52804b187b0bced47204ef38fa3c Author: Mike Kaganski AuthorDate: Fri Dec 10 12:06:11 2021 +0200 Commit: Mike Kaganski CommitDate: Fri Dec 10 16:11:11 2021 +0100 tdf#146048: detect UTF-16 without BOM Change-Id: I3c1742cdf88dfa08cf35d9f95875d4d3d6af09db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126596 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/include/svtools/svparser.hxx b/include/svtools/svparser.hxx index b0ba450a7285..d54b4a972f15 100644 --- a/include/svtools/svparser.hxx +++ b/include/svtools/svparser.hxx @@ -62,7 +62,6 @@ protected: sal_uInt64 nNextChPos; sal_uInt32 nNextCh;// current character codepoint in UTF32 for the "lex" -boolbUCS2BSrcEnc : 1; // or as big-endian UCS2 boolbSwitchToUCS2 : 1; // switching is allowed boolbRTF_InTextRead : 1; // only for RTF-Parser!!! diff --git a/svtools/Library_svt.mk b/svtools/Library_svt.mk index 59bd29ac240e..31685bbd300c 100644 --- a/svtools/Library_svt.mk +++ b/svtools/Library_svt.mk @@ -61,6 +61,7 @@ $(eval $(call gb_Library_use_libraries,svt,\ $(eval $(call gb_Library_use_externals,svt,\ boost_headers \ +icui18n \ icuuc \ icu_headers \ )) diff --git a/svtools/source/svrtf/svparser.cxx b/svtools/source/svrtf/svparser.cxx index 3da34404f517..0fec7a97097e 100644 --- a/svtools/source/svrtf/svparser.cxx +++ b/svtools/source/svrtf/svparser.cxx @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -85,7 +86,6 @@ SvParser::SvParser( SvStream& rIn, sal_uInt8 nStackSize ) , eSrcEnc( RTL_TEXTENCODING_DONTKNOW ) , nNextChPos(0) , nNextCh(0) -, bUCS2BSrcEnc(false) , bSwitchToUCS2(false) , bRTF_InTextRead(false) , nTokenStackSize( nStackSize ) @@ -188,87 +188,66 @@ sal_uInt32 SvParser::GetNextChar() // When reading multiple bytes, we don't have to care about the file // position when we run into the pending state. The file position is // maintained by SaveState/RestoreState. -bool bErr; if( bSwitchToUCS2 && 0 == rInput.Tell() ) { -unsigned char c1; -bool bSeekBack = true; - -rInput.ReadUChar( c1 ); -bErr = !rInput.good(); -if( !bErr ) +rInput.StartReadingUnicodeText(RTL_TEXTENCODING_DONTKNOW); +if (rInput.good()) { -if( 0xff == c1 || 0xfe == c1 ) -{ -unsigned char c2; -rInput.ReadUChar( c2 ); -bErr = !rInput.good(); -if( !bErr ) -{ -if( 0xfe == c1 && 0xff == c2 ) -{ -eSrcEnc = RTL_TEXTENCODING_UCS2; -bUCS2BSrcEnc = true; -bSeekBack = false; -} -else if( 0xff == c1 && 0xfe == c2 ) -{ -eSrcEnc = RTL_TEXTENCODING_UCS2; -bUCS2BSrcEnc = false; -bSeekBack = false; -} -} -} -else if( 0xef == c1 || 0xbb == c1 ) // check for UTF-8 BOM +sal_uInt64 nPos = rInput.Tell(); +if (nPos == 2) +eSrcEnc = RTL_TEXTENCODING_UCS2; +else if (nPos == 3) +SetSrcEncoding(RTL_TEXTENCODING_UTF8); +else // Try to detect encoding without BOM { -unsigned char c2; -rInput.ReadUChar( c2 ); -bErr = !rInput.good(); -if( !bErr ) +std::vector buf(65535); // Arbitrarily chosen 64KiB buffer +const size_t nSize = rInput.ReadBytes(buf.data(), buf.size()); +rInput.Seek(0); +if (nSize > 0) { -if( ( 0xef == c1 && 0xbb == c2 ) || ( 0xbb == c1 && 0xef == c2 ) ) +UErrorCode uerr = U_ZERO_ERROR; +UCharsetDetector* ucd = ucsdet_open(&uerr); +ucsdet_setText(ucd, buf.data(), nSize, &uerr); +if (const UCharsetMatch* match = ucsdet_detect(ucd, &uerr)) { -unsigned char c3(0); -rInput.ReadUChar( c3 ); -bErr = !rInput.good(); -if( !bErr && ( 0xbf == c3 ) ) +const char* pEncodingName = ucsdet_getName(match, &uerr); + +if (U_SUCCESS(uerr)) { -SetSrcEncoding(RTL_TEXTENCODING_UTF
[Libreoffice-commits] core.git: extensions/source
extensions/source/scanner/sane.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit ecd8f448327fbdfcef86e8706ee8b74e3b886dce Author: Caolán McNamara AuthorDate: Fri Dec 10 14:08:15 2021 + Commit: Caolán McNamara CommitDate: Fri Dec 10 15:46:54 2021 +0100 ofz#42182 oss-build failure possibly since: commit db3a61cd958f4a70417929cf8e1fa9bfd0bfe5a3 Author: Stephan Bergmann Date: Thu Dec 9 10:15:05 2021 +0100 Generally determine Rdb content from gb_*_set_componentfile calls (?) Change-Id: I947b0dff174ef437750889fb6cc84c8dfa54e7f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126638 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/extensions/source/scanner/sane.cxx b/extensions/source/scanner/sane.cxx index 839602458e6e..20bce0be68d0 100644 --- a/extensions/source/scanner/sane.cxx +++ b/extensions/source/scanner/sane.cxx @@ -170,6 +170,7 @@ Sane::~Sane() void Sane::Init() { OUString sSaneLibName( "libsane" SAL_DLLEXTENSION ); +#ifndef DISABLE_DYNLOADING pSaneLib = osl_loadModule( sSaneLibName.pData, SAL_LOADMODULE_LAZY ); if( ! pSaneLib ) { @@ -183,7 +184,7 @@ void Sane::Init() osl_getFileURLFromSystemPath( sSaneLibSystemPath.pData, &sSaneLibName.pData ); pSaneLib = osl_loadModule( sSaneLibName.pData, SAL_LOADMODULE_LAZY ); } - +#endif if( pSaneLib ) { bSaneSymbolLoadFailed = false;
[Libreoffice-commits] core.git: sc/source sc/uiconfig
sc/source/ui/cctrl/checklistmenu.cxx | 37 +++-- sc/source/ui/inc/checklistmenu.hxx |6 + sc/uiconfig/scalc/ui/filterdropdown.ui | 20 + 3 files changed, 61 insertions(+), 2 deletions(-) New commits: commit a25a573d5714ab196bbcdbd3a8dcb6d6d7814882 Author: Caolán McNamara AuthorDate: Fri Dec 10 12:45:16 2021 + Commit: Caolán McNamara CommitDate: Fri Dec 10 15:10:49 2021 +0100 Related: tdf#146018 allow user to grow/shrink autofilter checklist by a row Change-Id: If337f62032a8db6d1d01c66ae851aad8b0bd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126636 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx index cc16644dd72c..8615fee77cfe 100644 --- a/sc/source/ui/cctrl/checklistmenu.cxx +++ b/sc/source/ui/cctrl/checklistmenu.cxx @@ -22,9 +22,9 @@ #include #include +#include #include #include -#include #include #include #include @@ -478,9 +478,11 @@ ScCheckListMenuControl::ScCheckListMenuControl(weld::Widget* pParent, ScViewData , mxButtonBox(mxBuilder->weld_box("buttonbox")) , mxBtnOk(mxBuilder->weld_button("ok")) , mxBtnCancel(mxBuilder->weld_button("cancel")) +, mxContextMenu(mxBuilder->weld_menu("contextmenu")) , mxDropDown(mxMenu->create_virtual_device()) , mnCheckWidthReq(-1) , mnWndWidth(0) +, mnCheckListVisibleRows(nCheckListVisibleRows) , mePrevToggleAllState(TRISTATE_INDET) , mnSelectedMenu(MENU_NOT_SELECTED) , mrViewData(rViewData) @@ -499,6 +501,8 @@ ScCheckListMenuControl::ScCheckListMenuControl(weld::Widget* pParent, ScViewData mxEdSearch->connect_mouse_move(LINK(this, ScCheckListMenuControl, MouseEnterHdl)); mxListChecks->connect_mouse_move(LINK(this, ScCheckListMenuControl, MouseEnterHdl)); mxTreeChecks->connect_mouse_move(LINK(this, ScCheckListMenuControl, MouseEnterHdl)); +mxListChecks->connect_popup_menu(LINK(this, ScCheckListMenuControl, CommandHdl)); +mxTreeChecks->connect_popup_menu(LINK(this, ScCheckListMenuControl, CommandHdl)); mxChkToggleAll->connect_mouse_move(LINK(this, ScCheckListMenuControl, MouseEnterHdl)); mxBtnSelectSingle->connect_mouse_move(LINK(this, ScCheckListMenuControl, MouseEnterHdl)); mxBtnUnselectSingle->connect_mouse_move(LINK(this, ScCheckListMenuControl, MouseEnterHdl)); @@ -521,7 +525,7 @@ ScCheckListMenuControl::ScCheckListMenuControl(weld::Widget* pParent, ScViewData mpChecks = mxListChecks.get(); } -int nChecksHeight = mxTreeChecks->get_height_rows(nCheckListVisibleRows); +int nChecksHeight = mxTreeChecks->get_height_rows(mnCheckListVisibleRows); if (nWidth != -1) { mnCheckWidthReq = nWidth - nBorderWidth * 2 - 4; @@ -631,6 +635,35 @@ void ScCheckListMenuControl::selectCurrentMemberOnly(bool bSet) mpChecks->set_toggle(*xEntry, bSet ? TRISTATE_TRUE : TRISTATE_FALSE); } +IMPL_LINK(ScCheckListMenuControl, CommandHdl, const CommandEvent&, rCEvt, bool) +{ +if (rCEvt.GetCommand() != CommandEventId::ContextMenu) +return false; + +mxContextMenu->set_sensitive("less", mnCheckListVisibleRows > 4); +mxContextMenu->set_sensitive("more", mnCheckListVisibleRows < 42); + +OString sCommand = mxContextMenu->popup_at_rect(mpChecks, tools::Rectangle(rCEvt.GetMousePosPixel(), Size(1,1))); +if (sCommand.isEmpty()) +return true; + +if (sCommand == "more") +++mnCheckListVisibleRows; +else if (sCommand == "less") +--mnCheckListVisibleRows; +ResizeToRequest(); + +return true; +} + +void ScCheckListMenuControl::ResizeToRequest() +{ +int nChecksHeight = mxTreeChecks->get_height_rows(mnCheckListVisibleRows); +mxTreeChecks->set_size_request(mnCheckWidthReq, nChecksHeight); +mxListChecks->set_size_request(mnCheckWidthReq, nChecksHeight); +mxPopover->resize_to_request(); +} + IMPL_LINK(ScCheckListMenuControl, ButtonHdl, weld::Button&, rBtn, void) { if (&rBtn == mxBtnOk.get()) diff --git a/sc/source/ui/inc/checklistmenu.hxx b/sc/source/ui/inc/checklistmenu.hxx index e414a224b150..87a3e4325e45 100644 --- a/sc/source/ui/inc/checklistmenu.hxx +++ b/sc/source/ui/inc/checklistmenu.hxx @@ -251,6 +251,10 @@ private: DECL_LINK(SetDropdownPosHdl, void*, void); +DECL_LINK(CommandHdl, const CommandEvent&, bool); + +void ResizeToRequest(); + private: std::unique_ptr mxBuilder; std::unique_ptr mxPopover; @@ -271,6 +275,7 @@ private: std::unique_ptr mxButtonBox; std::unique_ptr mxBtnOk; std::unique_ptr mxBtnCancel; +std::unique_ptr mxContextMenu; ScopedVclPtr mxDropDown; @@ -286,6 +291,7 @@ private: Size maAllocatedSize; int mnCheckWidthReq; /// matching width request for mxChecks int mnWndWidth; /// whole window width. +int mnCheckListVisibleRows; TriState mePrevToggle
[Libreoffice-commits] core.git: include/vcl vcl/inc vcl/source vcl/unx
include/vcl/weld.hxx |2 ++ vcl/inc/salvtables.hxx|2 ++ vcl/source/app/salvtables.cxx | 25 ++--- vcl/unx/gtk3/gtkinst.cxx |5 + 4 files changed, 31 insertions(+), 3 deletions(-) New commits: commit 0f17661e045e3e3732cec6e493cd20ac65dbe451 Author: Caolán McNamara AuthorDate: Fri Dec 10 11:32:23 2021 + Commit: Caolán McNamara CommitDate: Fri Dec 10 14:48:47 2021 +0100 add resize_to_request to popover Change-Id: I4bd549efd934946f355f06645ed816acd370a51d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126634 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx index d296f1bbdd4a..40c2fbd86b49 100644 --- a/include/vcl/weld.hxx +++ b/include/vcl/weld.hxx @@ -2367,6 +2367,8 @@ public: = 0; virtual void popdown() = 0; +virtual void resize_to_request() = 0; + void connect_closed(const Link& rLink) { m_aCloseHdl = rLink; } }; diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx index 37c5930e4933..2340169b193b 100644 --- a/vcl/inc/salvtables.hxx +++ b/vcl/inc/salvtables.hxx @@ -1911,6 +1911,8 @@ public: weld::Placement ePlace = weld::Placement::Under) override; virtual void popdown() override; + +virtual void resize_to_request() override; }; class SalInstanceBox : public SalInstanceContainer, public virtual weld::Box diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index f0a2f9f7a6f4..a35c90fef9a1 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -1441,20 +1441,25 @@ css::uno::Reference SalInstanceWindow::GetXWindow() return xWindow; } -void SalInstanceWindow::resize_to_request() +namespace +{ +void resize_to_request(vcl::Window* pWindow) { -if (SystemWindow* pSysWin = dynamic_cast(m_xWindow.get())) +if (SystemWindow* pSysWin = dynamic_cast(pWindow)) { pSysWin->setOptimalLayoutSize(); return; } -if (DockingWindow* pDockWin = dynamic_cast(m_xWindow.get())) +if (DockingWindow* pDockWin = dynamic_cast(pWindow)) { pDockWin->setOptimalLayoutSize(); return; } assert(false && "must be system or docking window"); } +} + +void SalInstanceWindow::resize_to_request() { ::resize_to_request(m_xWindow.get()); } void SalInstanceWindow::set_modal(bool bModal) { m_xWindow->ImplGetFrame()->SetModal(bModal); } @@ -6742,6 +6747,20 @@ void SalInstancePopover::ImplPopDown() void SalInstancePopover::popdown() { ImplPopDown(); } +void SalInstancePopover::resize_to_request() +{ +::resize_to_request(m_xPopover.get()); + +DockingManager* pDockingManager = vcl::Window::GetDockingManager(); +if (pDockingManager->IsInPopupMode(m_xPopover.get())) +{ +Size aSize = m_xPopover->get_preferred_size(); +tools::Rectangle aRect = pDockingManager->GetPosSizePixel(m_xPopover.get()); +pDockingManager->SetPosSizePixel(m_xPopover.get(), aRect.Left(), aRect.Top(), aSize.Width(), + aSize.Height(), PosSizeFlags::Size); +} +} + IMPL_LINK_NOARG(SalInstancePopover, PopupModeEndHdl, FloatingWindow*, void) { signal_closed(); } SalInstanceBuilder::SalInstanceBuilder(vcl::Window* pParent, const OUString& rUIRoot, diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx index 1e227e87e1b5..3f554e77c9d2 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -22230,6 +22230,11 @@ public: } } +virtual void resize_to_request() override +{ +// resizing to request is what gtk does automatically +} + virtual ~GtkInstancePopover() override { PopdownAndFlushClosedSignal();
[Libreoffice-commits] core.git: Branch 'private/jmux/current-reorga' - 125 commits - android/default-document basctl/Library_basctl.mk basegfx/source basic/qa basic/source bin/find-can-be-private-symb
Rebased ref, commits from common ancestor: commit 77cb655a60a238100b4942b9a41a1a989031c39c Author: Jan-Marek Glogowski AuthorDate: Fri Dec 10 13:19:27 2021 +0100 Commit: Jan-Marek Glogowski CommitDate: Fri Dec 10 14:09:13 2021 +0100 catchall Change-Id: I61e9916a667a92e6bd5489e5ed1d1dead2a61765 diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx index 8e78776bc7f8..fca27708962a 100644 --- a/basic/source/runtime/methods1.cxx +++ b/basic/source/runtime/methods1.cxx @@ -2973,13 +2973,6 @@ void SbRtl_CompatibilityMode(StarBASIC *, SbxArray & rPar, bool) rPar.Get(0)->PutBool(bEnabled); } -bool LibreOffice6FloatingPointMode() -{ -static bool bMode = std::getenv("LIBREOFFICE6FLOATINGPOINTMODE") != nullptr; - -return bMode || officecfg::Office::Scripting::Basic::Compatibility::UseLibreOffice6FloatingPointConversion::get(); -} - void SbRtl_Input(StarBASIC *, SbxArray & rPar, bool) { // 2 parameters needed @@ -3030,7 +3023,14 @@ void SbRtl_Me(StarBASIC *, SbxArray & rPar, bool) refVar->PutObject( pClassModuleObject ); } -#endif +#endif // HAVE_FEATURE_SCRIPTING + +bool LibreOffice6FloatingPointMode() +{ +static bool bMode = std::getenv("LIBREOFFICE6FLOATINGPOINTMODE") != nullptr; + +return bMode || officecfg::Office::Scripting::Basic::Compatibility::UseLibreOffice6FloatingPointConversion::get(); +} sal_Int16 implGetWeekDay( double aDate, bool bFirstDayParam, sal_Int16 nFirstDay ) { diff --git a/config_host/config_wasm_strip.h.in b/config_host/config_wasm_strip.h.in index 0e74a2a568ad..fe3d8b908eca 100644 --- a/config_host/config_wasm_strip.h.in +++ b/config_host/config_wasm_strip.h.in @@ -17,7 +17,7 @@ #define ENABLE_WASM_STRIP_PINGUSER #define ENABLE_WASM_STRIP_PREMULTIPLY #define ENABLE_WASM_STRIP_RECENT -#define ENABLE_WASM_STRIP_RECOVERYUI +// #define ENABLE_WASM_STRIP_RECOVERYUI #define ENABLE_WASM_STRIP_SPLASH #define ENABLE_WASM_STRIP_SWEXPORTS #endif diff --git a/configmgr/source/xcuparser.cxx b/configmgr/source/xcuparser.cxx index af21518abd78..53020a9d21c1 100644 --- a/configmgr/source/xcuparser.cxx +++ b/configmgr/source/xcuparser.cxx @@ -286,7 +286,7 @@ void XcuParser::handleComponentData(xmlreader::XmlReader & reader) { data_.getComponents().findNode(valueParser_.getLayer(), componentName_)); if (!node.is()) { -SAL_WARN( +SAL_INFO( "configmgr", "unknown component \"" << componentName_ << "\" in \"" << reader.getUrl() << '"'); @@ -898,7 +898,7 @@ void XcuParser::handleSetNode(xmlreader::XmlReader & reader, SetNode * set) { switch (op) { case OPERATION_MODIFY: if (i == members.end()) { -SAL_WARN( +SAL_INFO( "configmgr", "ignoring modify of unknown set member node \"" << name << "\" in \"" << reader.getUrl() << '"'); diff --git a/configure.ac b/configure.ac index 5c554c4ca35a..a5c55e8d6e04 100644 --- a/configure.ac +++ b/configure.ac @@ -3038,7 +3038,7 @@ ENABLE_SERVICES_RDB_FROM_BUILD= if test "$enable_services_rdb_from_build" = yes; then ENABLE_SERVICES_RDB_FROM_BUILD=TRUE if test -n "$with_locales" -a "$with_locales" != en -a "$with_locales" != ALL; then -AC_MSG_ERROR([Currently just --with-locales=all or en is supported with --enable-services-rdb-from-build]) +AC_MSG_ERROR([Currently just --with-locales=ALL or en is supported with --enable-services-rdb-from-build]) fi fi AC_SUBST(ENABLE_SERVICES_RDB_FROM_BUILD) diff --git a/cppu/source/uno/lbenv.cxx b/cppu/source/uno/lbenv.cxx index f2e8a27581ab..f19d8e725e4f 100644 --- a/cppu/source/uno/lbenv.cxx +++ b/cppu/source/uno/lbenv.cxx @@ -1002,7 +1002,6 @@ void EnvironmentsData::getRegisteredEnvironments( bool loadEnv(OUString const & cLibStem, uno_Environment * pEnv) { -#ifndef __EMSCRIPTEN__ #ifdef DISABLE_DYNLOADING uno_initEnvironmentFunc fpInit; @@ -1042,11 +1041,6 @@ bool loadEnv(OUString const & cLibStem, (*fpInit)( pEnv ); // init of environment return true; -#else -(void)cLibStem; -(void)pEnv; -return false; -#endif } } diff --git a/cppu/source/uno/lbmap.cxx b/cppu/source/uno/lbmap.cxx index a670e3bcc820..43818eb85025 100644 --- a/cppu/source/uno/lbmap.cxx +++ b/cppu/source/uno/lbmap.cxx @@ -328,10 +328,8 @@ static void setNegativeBridge( const OUString & rBridgeName ) static uno_ext_getMappingFunc selectMapFunc( const OUString & rBridgeName ) { -#ifndef EMSCRIPTEN if (rBridgeName.equalsAscii( CPPU_CURRENT_LANGUAGE_BINDING_NAME "_uno" )) return CPPU_ENV_uno_ext_getMapping; -#endif #if HAVE_FEATURE_JAVA if (rBridgeName.equalsAscii( "java" "_uno" )) return java_uno_ext_getMapping; diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index d67cdd3f9aa7..01647789881b 100644 ---
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - include/vcl vcl/source
include/vcl/toolkit/dialog.hxx |2 ++ vcl/source/window/dialog.cxx | 13 - 2 files changed, 14 insertions(+), 1 deletion(-) New commits: commit 55fe27bf56360c63b4349f2889734e964a2a0b68 Author: Szymon Kłos AuthorDate: Thu Dec 9 09:41:50 2021 +0100 Commit: Szymon Kłos CommitDate: Fri Dec 10 14:26:04 2021 +0100 jsdialog: send info about initial focus in dialog Change-Id: I9daef497cb083e863d45a2acfd7eee3ee92bdc38 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126565 Tested-by: Jenkins CollaboraOffice Reviewed-by: Mert Tumer diff --git a/include/vcl/toolkit/dialog.hxx b/include/vcl/toolkit/dialog.hxx index bab25f2d15f3..32317d514aa9 100644 --- a/include/vcl/toolkit/dialog.hxx +++ b/include/vcl/toolkit/dialog.hxx @@ -127,6 +127,8 @@ private: boolImplStartExecute(); static void ImplEndExecuteModal(); voidImplSetModalInputMode(bool bModal); + +vcl::Window*GetFirstControlForFocus(); public: /// Commence execution of a modal dialog, disposes owner on failure diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index 54d12e8945db..4adcce7180d1 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -1299,7 +1299,7 @@ void Dialog::ImplSetModalInputMode( bool bModal ) } } -void Dialog::GrabFocusToFirstControl() +vcl::Window* Dialog::GetFirstControlForFocus() { vcl::Window* pFocusControl = nullptr; vcl::Window* pFirstOverlapWindow = ImplGetFirstOverlapWindow(); @@ -1323,6 +1323,13 @@ void Dialog::GrabFocusToFirstControl() { pFocusControl = ImplGetDlgWindow( 0, GetDlgWindowType::First ); } + +return pFocusControl; +} + +void Dialog::GrabFocusToFirstControl() +{ +vcl::Window* pFocusControl = GetFirstControlForFocus(); if ( pFocusControl ) pFocusControl->ImplControlFocus( GetFocusFlags::Init ); } @@ -1672,6 +1679,10 @@ void Dialog::DumpAsPropertyTree(tools::JsonWriter& rJsonWriter) rJsonWriter.put("response", rResponse.second); } } + +vcl::Window* pFocusControl = GetFirstControlForFocus(); +if (pFocusControl) +rJsonWriter.put("init_focus_id", pFocusControl->get_id()); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
[Libreoffice-commits] core.git: vcl/skia
vcl/skia/SkiaHelper.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit e369efa01183b4c304b49603628a7393aeb9ced0 Author: Julien Nabet AuthorDate: Fri Dec 10 12:46:56 2021 +0100 Commit: Stephan Bergmann CommitDate: Fri Dec 10 14:24:53 2021 +0100 [loplugin:external] in vcl/skia/SkiaHelper.cxx Following 2c86b79e87bc8579f5213708954d5c85fe231407 cache Skia drawing based on checksum of bitmap content (tdf#146095) Change-Id: I184a7d96988b7a52100de026c13f422590755ded Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126635 Reviewed-by: Luboš Luňák Tested-by: Jenkins diff --git a/vcl/skia/SkiaHelper.cxx b/vcl/skia/SkiaHelper.cxx index 2a4a7f1a6d7f..8dc3827b097a 100644 --- a/vcl/skia/SkiaHelper.cxx +++ b/vcl/skia/SkiaHelper.cxx @@ -648,7 +648,7 @@ tools::Long maxImageCacheSize() static o3tl::lru_map checksumCache(256); -uint32_t computeSkPixmapChecksum(const SkPixmap& pixmap) +static uint32_t computeSkPixmapChecksum(const SkPixmap& pixmap) { // Use uint32_t because that's what SkOpts::hash_fn() returns. static_assert(std::is_same_v);
[Libreoffice-commits] core.git: tools/source
tools/source/stream/stream.cxx | 66 + 1 file changed, 34 insertions(+), 32 deletions(-) New commits: commit 1f1ce06a185abcbf0c533cb3aa288418ecaa5ef4 Author: Mike Kaganski AuthorDate: Fri Dec 10 12:01:19 2021 +0200 Commit: Mike Kaganski CommitDate: Fri Dec 10 14:18:30 2021 +0100 Make BOM detection slightly more straightforward Without taking system endianness and current stream endianness into account - just read and check single bytes. Change-Id: I9273d8f403caad7adb5e11cecc04e326919dad1f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126595 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx index d42cefdf63cf..016c8b67e891 100644 --- a/tools/source/stream/stream.cxx +++ b/tools/source/stream/stream.cxx @@ -718,52 +718,54 @@ void SvStream::StartReadingUnicodeText( rtl_TextEncoding eReadBomCharSet ) eReadBomCharSet == RTL_TEXTENCODING_UTF8)) return;// nothing to read -bool bTryUtf8 = false; -sal_uInt16 nFlag(0); -sal_sSize nBack = sizeof(nFlag); -ReadUInt16( nFlag ); +const sal_uInt64 nOldPos = Tell(); +bool bGetBack = true; +unsigned char nFlag(0); +ReadUChar( nFlag ); switch ( nFlag ) { -case 0xfeff : -// native UTF-16 +case 0xfe: // UTF-16BE? if (eReadBomCharSet == RTL_TEXTENCODING_DONTKNOW || eReadBomCharSet == RTL_TEXTENCODING_UNICODE) -nBack = 0; +{ +ReadUChar(nFlag); +if (nFlag == 0xff) +{ +SetEndian(SvStreamEndian::BIG); +bGetBack = false; +} +} break; -case 0xfffe : -// swapped UTF-16 +case 0xff: // UTF-16LE? if (eReadBomCharSet == RTL_TEXTENCODING_DONTKNOW || eReadBomCharSet == RTL_TEXTENCODING_UNICODE) { -SetEndian( m_nEndian == SvStreamEndian::BIG ? SvStreamEndian::LITTLE : SvStreamEndian::BIG ); -nBack = 0; +ReadUChar(nFlag); +if (nFlag == 0xfe) +{ +SetEndian(SvStreamEndian::LITTLE); +bGetBack = false; +} } break; -case 0xefbb : -if (m_nEndian == SvStreamEndian::BIG && -(eReadBomCharSet == RTL_TEXTENCODING_DONTKNOW || - eReadBomCharSet == RTL_TEXTENCODING_UTF8)) -bTryUtf8 = true; -break; -case 0xbbef : -if (m_nEndian == SvStreamEndian::LITTLE && -(eReadBomCharSet == RTL_TEXTENCODING_DONTKNOW || - eReadBomCharSet == RTL_TEXTENCODING_UTF8)) -bTryUtf8 = true; +case 0xef: // UTF-8? +if (eReadBomCharSet == RTL_TEXTENCODING_DONTKNOW || +eReadBomCharSet == RTL_TEXTENCODING_UTF8) +{ +ReadUChar(nFlag); +if (nFlag == 0xbb) +{ +ReadUChar(nFlag); +if (nFlag == 0xbf) +bGetBack = false; // it is UTF-8 +} +} break; default: ; // nothing } -if (bTryUtf8) -{ -unsigned char nChar(0); -nBack += sizeof(nChar); -ReadUChar( nChar ); -if (nChar == 0xbf) -nBack = 0; // it is UTF-8 -} -if (nBack) -SeekRel( -nBack ); // no BOM, pure data +if (bGetBack) +Seek(nOldPos); // no BOM, pure data } sal_uInt64 SvStream::SeekRel(sal_Int64 const nPos)
[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - sc/qa sc/source
sc/qa/unit/data/functions/database/fods/dcount.fods | 21 +++ sc/qa/unit/data/functions/database/fods/dcounta.fods | 21 +++ sc/source/core/data/funcdesc.cxx |4 +-- 3 files changed, 36 insertions(+), 10 deletions(-) New commits: commit 1db4d3c869dbd4d68c0ab7b15c60bb2dad0a9f67 Author: Winfried Donkers AuthorDate: Thu Dec 9 17:39:58 2021 +0100 Commit: Xisco Fauli CommitDate: Fri Dec 10 13:52:37 2021 +0100 tdf#133353, Make 2nd argument optional for DCOUNT and DCOUNTA. The functions accept empty second arguments, but the function wizard and hints stated that it was required. Change-Id: I74fcfcc31492ed776085d1bc6ee6a9ff22a87818 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126620 Tested-by: Eike Rathke Reviewed-by: Eike Rathke (cherry picked from commit 885465bc0ae6029d8adad57015fb0ff6c26a6ba6) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126594 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/sc/qa/unit/data/functions/database/fods/dcount.fods b/sc/qa/unit/data/functions/database/fods/dcount.fods index 392bc86d017d..4e2b792e08f2 100644 --- a/sc/qa/unit/data/functions/database/fods/dcount.fods +++ b/sc/qa/unit/data/functions/database/fods/dcount.fods @@ -2183,9 +2183,22 @@ - - - + + 2 + + + 2 + + + TRUE + + + =DCOUNT(J1:N11,,J41:N42) + + + Tdf#13353 + + >=I @@ -2940,4 +2953,4 @@ - \ No newline at end of file + diff --git a/sc/qa/unit/data/functions/database/fods/dcounta.fods b/sc/qa/unit/data/functions/database/fods/dcounta.fods index 1080e2cf64a5..c95c1472d713 100644 --- a/sc/qa/unit/data/functions/database/fods/dcounta.fods +++ b/sc/qa/unit/data/functions/database/fods/dcounta.fods @@ -864,9 +864,22 @@ - - - + + 2 + + + 2 + + + TRUE + + + =DCOUNTA(J1:N10,,J41:N42) + + + Tdf#13353 + + Greta @@ -1491,4 +1504,4 @@ - \ No newline at end of file + diff --git a/sc/source/core/data/funcdesc.cxx b/sc/source/core/data/funcdesc.cxx index 51f03a4e4bf4..01d8143a16f8 100644 --- a/sc/source/core/data/funcdesc.cxx +++ b/sc/source/core/data/funcdesc.cxx @@ -576,8 +576,8 @@ ScFunctionList::ScFunctionList() { SC_OPCODE_NOMINAL, ENTRY(SC_OPCODE_NOMINAL_ARY), 0, ID_FUNCTION_GRP_FINANCIAL, HID_FUNC_NOMINAL, 2, { 0, 0 }, 0 }, { SC_OPCODE_SUB_TOTAL, ENTRY(SC_OPCODE_SUB_TOTAL_ARY), 0, ID_FUNCTION_GRP_MATH, HID_FUNC_TEILERGEBNIS, 2, { 0, 0 }, 0 }, { SC_OPCODE_DB_SUM, ENTRY(SC_OPCODE_DB_SUM_ARY), 0, ID_FUNCTION_GRP_DATABASE, HID_FUNC_DBSUMME, 3, { 0, 0, 0 }, 0 }, -{ SC_OPCODE_DB_COUNT, ENTRY(SC_OPCODE_DB_COUNT_ARY), 0, ID_FUNCTION_GRP_DATABASE, HID_FUNC_DBANZAHL, 3, { 0, 0, 0 }, 0 }, -{ SC_OPCODE_DB_COUNT_2, ENTRY(SC_OPCODE_DB_COUNT_2_ARY), 0, ID_FUNCTION_GRP_DATABASE, HID_FUNC_DBANZAHL2, 3, { 0, 0, 0 }, 0 }, +{ SC_OPCODE_DB_COUNT, ENTRY(SC_OPCODE_DB_COUNT_ARY), 0, ID_FUNCTION_GRP_DATABASE, HID_FUNC_DBANZAHL, 3, { 0, 1, 0 }, 0 }, +{ SC_OPCODE_DB_COUNT_2, ENTRY(SC_OPCODE_DB_COUNT_2_ARY), 0, ID_FUNCTION_GRP_DATABASE, HID_FUNC_DBANZAHL2, 3, { 0, 1, 0 }, 0 }, { SC_OPCODE_DB_AVERAGE, ENTRY(SC_OPCODE_DB_AVERAGE_ARY), 0, ID_FUNCTION_GRP_DATABASE, HID_FUNC_DBMITTELWERT, 3, { 0, 0, 0 }, 0 }, { SC_OPCODE_DB_GET, ENTRY(SC_OPCODE_DB_GET_ARY), 0, ID_FUNCTION_GRP_DATABASE, HID_FUNC_DBAUSZUG, 3, { 0, 0, 0 }, 0 }, { SC_OPCODE_DB_MAX, ENTRY(SC_OPCODE_DB_MAX_ARY), 0, ID_FUNCTION_GRP_DATABASE, HID_FUNC_DBMAX, 3, { 0, 0, 0 }, 0 },
[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - cui/uiconfig
cui/uiconfig/ui/macroselectordialog.ui | 161 ++--- 1 file changed, 72 insertions(+), 89 deletions(-) New commits: commit 754607264425c78c2370d69a26ec72b95ab94f3a Author: Heiko Tietze AuthorDate: Thu Dec 9 09:29:50 2021 +0100 Commit: Adolfo Jayme Barrientos CommitDate: Fri Dec 10 12:47:30 2021 +0100 Resolves tdf#145976 - Resizing issues with the macro dialog Fill attributes removes; some spacing added to be HIG conform Change-Id: Ic45bab071db23498e98df5fbed34ee5a50df1390 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126569 Tested-by: Jenkins Reviewed-by: Heiko Tietze (cherry picked from commit 5b0707f66e2c49a11f3a23e3ec9940b26d881165) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126593 Reviewed-by: Adolfo Jayme Barrientos diff --git a/cui/uiconfig/ui/macroselectordialog.ui b/cui/uiconfig/ui/macroselectordialog.ui index 624d853ec035..329c25940912 100644 --- a/cui/uiconfig/ui/macroselectordialog.ui +++ b/cui/uiconfig/ui/macroselectordialog.ui @@ -1,5 +1,5 @@ - + @@ -21,31 +21,31 @@ -False -6 +False +6 Macro Selector True -0 -0 -dialog +0 +0 +dialog -False +False vertical 12 -False -end +False +end _OK True -True -True -True -True -True +True +True +True +True +True True @@ -58,9 +58,9 @@ _Cancel True -True -True -True +True +True +True True @@ -73,8 +73,8 @@ _Help True -True -True +True +True True @@ -88,26 +88,23 @@ False True -end +end 0 True -False -True -True +False vertical 12 -False -True -True +False +True Select the library that contains the macro you want. Then select the macro under 'Macro name'. True -60 +60 0 @@ -119,38 +116,33 @@ True -False -True -True +False +6 +6 +6 +6 +6 True True -False -True -True -0 -none +False +0 +none True -True -True -True -in -6 +True +in --1 True -True -True -True -True +True +True liststore1 -False -1 -True +False +1 +True @@ -178,7 +170,8 @@ True -False +False +6 Library @@ -195,30 +188,23 @@ True -False -True -True -0 -none +False +0 +none
[Libreoffice-commits] core.git: sw/source
sw/source/uibase/app/apphdl.cxx |4 1 file changed, 4 insertions(+) New commits: commit 16376cae68f4406ef9440bdcb7b9617de6a6f998 Author: Justin Luth AuthorDate: Fri Dec 10 08:58:41 2021 +0200 Commit: Justin Luth CommitDate: Fri Dec 10 12:27:05 2021 +0100 tdf#144680 mailmerge toolbar: disable all icons if no resultset followup to my previous patch. I had played with this, and do to poor testing or some residual effect, I thought this wasn't necessary to disable the movement buttons specifically. But in renewed testing it is clear that it isn't magic that causes the disabling at the proper time. Change-Id: Ic57dba42d649e79bd1db2b95f8f4316e772ccaeb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126628 Tested-by: Jenkins Reviewed-by: Justin Luth diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx index 4e68665ead51..f5d537b8974a 100644 --- a/sw/source/uibase/app/apphdl.cxx +++ b/sw/source/uibase/app/apphdl.cxx @@ -822,6 +822,10 @@ void SwModule::ExecOther(SfxRequest& rReq) rBindings.Invalidate(FN_MAILMERGE_SAVE_DOCUMENTS); rBindings.Invalidate(FN_MAILMERGE_PRINT_DOCUMENTS); rBindings.Invalidate(FN_MAILMERGE_EMAIL_DOCUMENTS); +rBindings.Invalidate(FN_MAILMERGE_FIRST_ENTRY); +rBindings.Invalidate(FN_MAILMERGE_PREV_ENTRY); +rBindings.Invalidate(FN_MAILMERGE_NEXT_ENTRY); +rBindings.Invalidate(FN_MAILMERGE_LAST_ENTRY); rBindings.Update(); return; }
[Libreoffice-commits] core.git: officecfg/registry svx/source
officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu |5 - svx/source/tbxctrls/tbunosearchcontrollers.cxx |2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) New commits: commit b60bc1e597032e598caf43d1a13409068b800f57 Author: Julien Nabet AuthorDate: Tue Dec 7 20:48:32 2021 +0100 Commit: Julien Nabet CommitDate: Fri Dec 10 12:22:48 2021 +0100 Related tdf#102506: make Find Bar Ctrl+F searching by value by default Change-Id: I4c001b60eecbcdae95cde6d79cc91bb887d7a742 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126490 Reviewed-by: Julien Nabet Tested-by: Jenkins diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu index 3fb594e55739..d615c04a0d00 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu @@ -1658,7 +1658,10 @@ bit 3 (0x8): #define UICOMMANDDESCRIPTION_PROPERTIES_TOGGLEBUTTON 8 - Find Text + Find Values + + + Find text in values, to search in formulas use the dialog diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx index 75a08ed16973..6deb930c18f2 100644 --- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx +++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx @@ -169,6 +169,8 @@ void impl_executeSearch( const css::uno::Reference< css::uno::XComponentContext auto aArgs( comphelper::InitPropertySequence( { { "SearchItem.SearchString", css::uno::makeAny( sFindText ) }, +// Related tdf#102506: make Find Bar Ctrl+F searching by value by default +{ "SearchItem.CellType", css::uno::makeAny( sal_Int16(SvxSearchCellType::VALUE) ) }, { "SearchItem.Backward", css::uno::makeAny( aSearchBackwards ) }, { "SearchItem.SearchFlags", css::uno::makeAny( sal_Int32(0) ) }, { "SearchItem.TransliterateFlags", css::uno::makeAny( static_cast(nFlags) ) },
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - sw/source
sw/source/uibase/docvw/AnnotationWin2.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 180ee81404522237c66a872cd0be718e79e00bfc Author: Caolán McNamara AuthorDate: Thu Dec 9 17:19:57 2021 + Commit: Xisco Fauli CommitDate: Fri Dec 10 12:12:28 2021 +0100 Resolves: tdf#146141 don't double delete comments which can happen because empty comments are deleted automatically on losing focus back to main document, so explicit delete of an empty comment resulted in a double delete Change-Id: I30390995a260235ed8702b0a088c05e91c953b3b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126590 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx b/sw/source/uibase/docvw/AnnotationWin2.cxx index 606945672144..70460686d03d 100644 --- a/sw/source/uibase/docvw/AnnotationWin2.cxx +++ b/sw/source/uibase/docvw/AnnotationWin2.cxx @@ -1043,7 +1043,7 @@ void SwAnnotationWin::DeactivatePostIt() if ( !Application::GetSettings().GetStyleSettings().GetHighContrastMode() ) GetOutlinerView()->SetBackgroundColor(COL_TRANSPARENT); -if ( !IsProtected() && mpOutliner->GetEditEngine().GetText().isEmpty() ) +if (!mnEventId && !IsProtected() && mpOutliner->GetEditEngine().GetText().isEmpty()) { mnEventId = Application::PostUserEvent( LINK( this, SwAnnotationWin, DeleteHdl), nullptr, true ); }
[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - include/svx svx/source
include/svx/sdr/contact/viewcontact.hxx |5 + svx/source/sdr/contact/viewcontact.cxx | 14 +- 2 files changed, 18 insertions(+), 1 deletion(-) New commits: commit 585bf5f2b223a1449dd8f6b65c5f0c0c00160af7 Author: Noel Grandin AuthorDate: Wed Dec 8 11:14:47 2021 +0200 Commit: Xisco Fauli CommitDate: Fri Dec 10 12:09:03 2021 +0100 tdf#146108 Calc slow to change cell focus.. in a document with a big background image Revert "tdf#136058: remove some caching" This reverts commit 57c40329a2b469813a1f357de355a37c8e3077ae. And add some comments for future would-be optimisers. Change-Id: Ie8686edc38dcdbe7d9e78599c1a259aab68278a1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126527 Tested-by: Jenkins Reviewed-by: Noel Grandin Signed-off-by: Xisco Fauli Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126574 diff --git a/include/svx/sdr/contact/viewcontact.hxx b/include/svx/sdr/contact/viewcontact.hxx index c7119fcd93e2..eee3ea6f11cb 100644 --- a/include/svx/sdr/contact/viewcontact.hxx +++ b/include/svx/sdr/contact/viewcontact.hxx @@ -46,6 +46,11 @@ private: // Registering and de-registering is done in the VOC constructors/destructors. std::vector maViewObjectContactVector; +// Primitive2DContainer of the ViewContact. This contains all necessary information +// for the graphical visualisation and needs to be supported by all VCs which +// can be visualized. +drawinglayer::primitive2d::Primitive2DContainer mxViewIndependentPrimitive2DSequence; + // A new ViewObjectContact was created and shall be remembered. void AddViewObjectContact(ViewObjectContact& rVOContact); diff --git a/svx/source/sdr/contact/viewcontact.cxx b/svx/source/sdr/contact/viewcontact.cxx index 4a2914af0e2b..2644632a9a27 100644 --- a/svx/source/sdr/contact/viewcontact.cxx +++ b/svx/source/sdr/contact/viewcontact.cxx @@ -101,7 +101,9 @@ void ViewContact::RemoveViewObjectContact(ViewObjectContact& rVOContact) maViewObjectContactVector.begin(), maViewObjectContactVector.end(), &rVOContact); if (aFindResult != maViewObjectContactVector.end()) +{ maViewObjectContactVector.erase(aFindResult); +} } // Test if this ViewContact has ViewObjectContacts at all. This can @@ -226,6 +228,9 @@ ViewContact::createViewIndependentPrimitive2DSequence() const drawinglayer::primitive2d::Primitive2DContainer ViewContact::getViewIndependentPrimitive2DContainer() const { +/* Local up-to-date checks. Create new list and compare. +We cannot just always use the new data because the old data has cached bitmaps in it e.g. see the document in tdf#146108. +*/ drawinglayer::primitive2d::Primitive2DContainer xNew( createViewIndependentPrimitive2DSequence()); @@ -235,7 +240,14 @@ ViewContact::getViewIndependentPrimitive2DContainer() const xNew = embedToObjectSpecificInformation(std::move(xNew)); } -return xNew; +if (mxViewIndependentPrimitive2DSequence != xNew) +{ +// has changed, copy content +const_cast(this)->mxViewIndependentPrimitive2DSequence = std::move(xNew); +} + +// return current Primitive2DContainer +return mxViewIndependentPrimitive2DSequence; } // add Gluepoints (if available)
[Libreoffice-commits] core.git: RepositoryExternal.mk vcl/inc vcl/skia
RepositoryExternal.mk |1 + vcl/inc/skia/utils.hxx |4 vcl/skia/SkiaHelper.cxx | 35 ++- vcl/skia/salbmp.cxx | 14 -- 4 files changed, 51 insertions(+), 3 deletions(-) New commits: commit 2c86b79e87bc8579f5213708954d5c85fe231407 Author: Luboš Luňák AuthorDate: Thu Dec 9 14:30:15 2021 +0100 Commit: Luboš Luňák CommitDate: Fri Dec 10 11:59:39 2021 +0100 cache Skia drawing based on checksum of bitmap content (tdf#146095) Previously the caching was based on SkImage's uniqueID(), which detects whether it's the same image. For caching to work based on this it is required that the underlying image does not change, which generally means using the same Bitmap(Ex) for repeated drawing. But e.g. in tdf#146096 canvas (AFAICT) tries to cache bitmaps by copying them around, which generates so many bitmaps that they all do not fit in the cache (helped by the fact that the edit window still animates them too, and bitmap caching in canvas being broken). It feels kinda lame and unnecessary to checksum pixels of many bitmaps to be drawn just to find out whether their drawing can be sped up, and it really should be fixed higher up wherever it's broken, but I've already failed several times trying to fix this in canvas, so let's just roll with this. This is done only for raster-based images, because GPU-backed drawing is fast enough to deal even with expensive drawing (and fetching GPU-backend pixels would be expensive). On my machine this changes showing the slide from not being able to quite keep up to about 20% CPU usage. Change-Id: I25a362a02dc61e99b391cb305e2fdcd2feb67879 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126613 Tested-by: Jenkins Reviewed-by: Luboš Luňák diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk index e63ab24dba27..fbb02d802142 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -128,6 +128,7 @@ $(call gb_LinkTarget_set_include,$(1),\ -I$(call gb_UnpackedTarball_get_dir,skia)/include/gpu \ -I$(call gb_UnpackedTarball_get_dir,skia)/include/config \ -I$(call gb_UnpackedTarball_get_dir,skia)/include/ports \ + -I$(call gb_UnpackedTarball_get_dir,skia)/include/private \ -I$(call gb_UnpackedTarball_get_dir,skia)/include/third_party/vulkan \ -I$(call gb_UnpackedTarball_get_dir,skia)/tools/gpu \ -I$(call gb_UnpackedTarball_get_dir,skia) \ diff --git a/vcl/inc/skia/utils.hxx b/vcl/inc/skia/utils.hxx index 35180c016e24..d2d4c81c3f94 100644 --- a/vcl/inc/skia/utils.hxx +++ b/vcl/inc/skia/utils.hxx @@ -119,6 +119,10 @@ sk_sp findCachedImage(const OString& key); void removeCachedImage(sk_sp image); tools::Long maxImageCacheSize(); +// Get checksum of the image content, only for raster images. Is cached, +// but may still be somewhat expensive. +uint32_t getSkImageChecksum(sk_sp image); + // SkSurfaceProps to be used by all Skia surfaces. VCL_DLLPUBLIC const SkSurfaceProps* surfaceProps(); // Set pixel geometry to be used by SkSurfaceProps. diff --git a/vcl/skia/SkiaHelper.cxx b/vcl/skia/SkiaHelper.cxx index 5b022d51b50d..2a4a7f1a6d7f 100644 --- a/vcl/skia/SkiaHelper.cxx +++ b/vcl/skia/SkiaHelper.cxx @@ -36,6 +36,7 @@ bool isVCLSkiaEnabled() { return false; } #include #include #include +#include #include #include @@ -43,6 +44,7 @@ bool isVCLSkiaEnabled() { return false; } #include #include #include +#include #include #include #include @@ -581,7 +583,7 @@ struct ImageCacheItem } //namespace // LRU cache, last item is the least recently used. Hopefully there won't be that many items -// to require a hash/map. Using o3tl::lru_cache would be simpler, but it doesn't support +// to require a hash/map. Using o3tl::lru_map would be simpler, but it doesn't support // calculating cost of each item. static std::list imageCache; static tools::Long imageCacheSize = 0; // sum of all ImageCacheItem.size @@ -644,6 +646,37 @@ tools::Long maxImageCacheSize() return officecfg::Office::Common::Cache::Skia::ImageCacheSize::get(); } +static o3tl::lru_map checksumCache(256); + +uint32_t computeSkPixmapChecksum(const SkPixmap& pixmap) +{ +// Use uint32_t because that's what SkOpts::hash_fn() returns. +static_assert(std::is_same_v); +const size_t dataRowBytes = pixmap.width() << pixmap.shiftPerPixel(); +if (dataRowBytes == pixmap.rowBytes()) +return SkOpts::hash_fn(pixmap.addr(), pixmap.height() * dataRowBytes, 0); +uint32_t sum = 0; +for (int row = 0; row < pixmap.height(); ++row) +sum = SkOpts::hash_fn(pixmap.addr(0, row), dataRowBytes, sum); +return sum; +} + +uint32_t getSkImageChecksum(sk_sp image) +{ +// Cache the checksums based on the uniqueID() (which should stay the same +// for the same image), because it may be still somewhat expensive. +uint3
[Libreoffice-commits] core.git: sc/source vcl/source
sc/source/ui/view/gridwin.cxx | 11 +-- vcl/source/window/winproc.cxx |7 +++ 2 files changed, 16 insertions(+), 2 deletions(-) New commits: commit 110d3504c1f738a1d7f740cc212064dafa4fb224 Author: Armin Le Grand (Allotropia) AuthorDate: Thu Dec 9 16:13:12 2021 +0100 Commit: Armin Le Grand CommitDate: Fri Dec 10 11:31:23 2021 +0100 tdf#127341 Do not activate TextEdit at right-klick on URL in calc Change-Id: I1881c007a05f56d5cb7914da56243f551c2da1cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126618 Tested-by: Jenkins Reviewed-by: Armin Le Grand diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 6d832990f271..e2f3a1e81e2b 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -3237,8 +3237,15 @@ void ScGridWindow::Command( const CommandEvent& rCEvt ) if ( !bEdit ) { -// Edit cell with spelling errors ? -if (bMouse && (GetEditUrl(aPosPixel) || bSpellError)) +// Edit cell with spelling errors ? +// tdf#127341 the formally used GetEditUrl(aPosPixel) addiionally +// to bSpellError acivated EditMode here for right-click on URL +// which prevents the regular contex-menu from appearing. Since this +// is more expeced than the context-menu for editing an URL I removed +// this. If this was wanted and can be argued his migh be re-acivated. +// For now, reduce to spelling errors - as the original comment above +// suggests. +if (bMouse && bSpellError) { // GetEditUrlOrError has already moved the Cursor diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index 1c7d615db77c..9c49f52894c5 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -265,6 +265,13 @@ bool ImplHandleMouseEvent( const VclPtr& xWindow, MouseNotifyEvent tools::Long nX, tools::Long nY, sal_uInt64 nMsgTime, sal_uInt16 nCode, MouseEventModifiers nMode ) { +SAL_INFO( "vcl.debugevent", + "mouse event " + "(MouseNotifyEvent " << static_cast(nSVEvent) << ") " + "(MouseLeave " << bMouseLeave << ") " + "(X, Y " << nX << ", " << nY << ") " + "(Code " << nCode << ") " + "(Modifiers " << static_cast(nMode) << ")"); ImplSVHelpData& aHelpData = ImplGetSVHelpData(); ImplSVData* pSVData = ImplGetSVData(); Point aMousePos( nX, nY );
[Libreoffice-commits] core.git: vcl/inc vcl/qa vcl/source
vcl/inc/salbmp.hxx |7 +++ vcl/qa/cppunit/skia/skia.cxx |6 ++ vcl/source/bitmap/bitmap.cxx |9 - 3 files changed, 9 insertions(+), 13 deletions(-) New commits: commit 5b0e9e8c18205dd9b06cbcec146cefa1acef4f32 Author: Luboš Luňák AuthorDate: Thu Dec 9 13:24:44 2021 +0100 Commit: Luboš Luňák CommitDate: Fri Dec 10 11:02:32 2021 +0100 return value by simply returning it Change-Id: I0c3443f182db697d12fb8bc8a356d989b62847df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126610 Tested-by: Jenkins Reviewed-by: Luboš Luňák diff --git a/vcl/inc/salbmp.hxx b/vcl/inc/salbmp.hxx index 78d553b5194c..f04ea291aa84 100644 --- a/vcl/inc/salbmp.hxx +++ b/vcl/inc/salbmp.hxx @@ -97,13 +97,12 @@ public: return false; } -void GetChecksum(BitmapChecksum& rChecksum) const +BitmapChecksum GetChecksum() const { updateChecksum(); if (!mbChecksumValid) -rChecksum = 0; // back-compat -else -rChecksum = mnChecksum; +return 0; // back-compat +return mnChecksum; } void InvalidateChecksum() diff --git a/vcl/qa/cppunit/skia/skia.cxx b/vcl/qa/cppunit/skia/skia.cxx index 21e3d0baf696..f2990d3811fc 100644 --- a/vcl/qa/cppunit/skia/skia.cxx +++ b/vcl/qa/cppunit/skia/skia.cxx @@ -500,12 +500,10 @@ void SkiaTest::testChecksum() // The optimized changing of images to greyscale should change the checksum. SkiaSalBitmap* skiaBitmap2 = dynamic_cast(bitmap.ImplGetSalBitmap().get()); skiaBitmap2->unittestResetToImage(); -BitmapChecksum checksum6; -skiaBitmap2->GetChecksum(checksum6); +BitmapChecksum checksum6 = skiaBitmap2->GetChecksum(); CPPUNIT_ASSERT_EQUAL(checksum5, checksum6); CPPUNIT_ASSERT(skiaBitmap2->ConvertToGreyscale()); -BitmapChecksum checksum7; -skiaBitmap2->GetChecksum(checksum7); +BitmapChecksum checksum7 = skiaBitmap2->GetChecksum(); CPPUNIT_ASSERT(checksum7 != checksum6); } diff --git a/vcl/source/bitmap/bitmap.cxx b/vcl/source/bitmap/bitmap.cxx index 8d966e2446e0..c755a70ebad1 100644 --- a/vcl/source/bitmap/bitmap.cxx +++ b/vcl/source/bitmap/bitmap.cxx @@ -259,9 +259,8 @@ bool Bitmap::operator==( const Bitmap& rBmp ) const if (rBmp.mxSalBmp->GetSize() != mxSalBmp->GetSize() || rBmp.mxSalBmp->GetBitCount() != mxSalBmp->GetBitCount()) return false; -BitmapChecksum aChecksum1, aChecksum2; -rBmp.mxSalBmp->GetChecksum(aChecksum1); -mxSalBmp->GetChecksum(aChecksum2); +BitmapChecksum aChecksum1 = rBmp.mxSalBmp->GetChecksum(); +BitmapChecksum aChecksum2 = mxSalBmp->GetChecksum(); // If the bitmaps can't calculate a checksum, best to regard them as different. if (aChecksum1 == 0 || aChecksum2 == 0) return false; @@ -331,7 +330,7 @@ BitmapChecksum Bitmap::GetChecksum() const if( mxSalBmp ) { -mxSalBmp->GetChecksum(nRet); +nRet = mxSalBmp->GetChecksum(); if (!nRet) { @@ -344,7 +343,7 @@ BitmapChecksum Bitmap::GetChecksum() const { Bitmap* pThis = const_cast(this); pThis->mxSalBmp = xNewImpBmp; -mxSalBmp->GetChecksum(nRet); +nRet = mxSalBmp->GetChecksum(); } } }
[Libreoffice-commits] core.git: 2 commits - vcl/inc vcl/qa vcl/skia
vcl/inc/skia/salbmp.hxx |4 vcl/qa/cppunit/skia/skia.cxx | 41 + vcl/skia/salbmp.cxx | 16 +++- 3 files changed, 60 insertions(+), 1 deletion(-) New commits: commit 63b8d83fd0d135af4ac04f78d26bfd3322ab65f6 Author: Luboš Luňák AuthorDate: Thu Dec 9 13:09:57 2021 +0100 Commit: Luboš Luňák CommitDate: Fri Dec 10 11:02:15 2021 +0100 make sure Skia bitmap checksum is invalidated properly Change-Id: I85e81b730dcb0fdc7728d5a956974ef09a73de87 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126585 Tested-by: Jenkins Reviewed-by: Luboš Luňák diff --git a/vcl/inc/skia/salbmp.hxx b/vcl/inc/skia/salbmp.hxx index 2959952a3442..05e489643f88 100644 --- a/vcl/inc/skia/salbmp.hxx +++ b/vcl/inc/skia/salbmp.hxx @@ -107,8 +107,12 @@ public: const sal_uInt8* unittestGetBuffer() const { return mBuffer.get(); } const SkImage* unittestGetImage() const { return mImage.get(); } const SkImage* unittestGetAlphaImage() const { return mAlphaImage.get(); } +void unittestResetToImage() { ResetToSkImage(GetSkImage()); } private: +// This should be called whenever the contents have (possibly) changed. +// It may reset some cached data such as the checksum. +void DataChanged(); // Reset the state to pixel data (resets cached images allocated in GetSkImage()/GetAlphaSkImage()). void ResetToBuffer(); // Sets the data only as SkImage (will be converted as needed). diff --git a/vcl/qa/cppunit/skia/skia.cxx b/vcl/qa/cppunit/skia/skia.cxx index b94e2ede7eba..21e3d0baf696 100644 --- a/vcl/qa/cppunit/skia/skia.cxx +++ b/vcl/qa/cppunit/skia/skia.cxx @@ -44,6 +44,7 @@ public: void testDelayedScale(); void testDelayedScaleAlphaImage(); void testDrawDelayedScaleImage(); +void testChecksum(); void testTdf137329(); void testTdf140848(); void testTdf132367(); @@ -58,6 +59,7 @@ public: CPPUNIT_TEST(testDelayedScale); CPPUNIT_TEST(testDelayedScaleAlphaImage); CPPUNIT_TEST(testDrawDelayedScaleImage); +CPPUNIT_TEST(testChecksum); CPPUNIT_TEST(testTdf137329); CPPUNIT_TEST(testTdf140848); CPPUNIT_TEST(testTdf132367); @@ -468,6 +470,45 @@ void SkiaTest::testDrawDelayedScaleImage() CPPUNIT_ASSERT_EQUAL(Size(10, 10), SkiaHelper::imageSize(image3)); } +void SkiaTest::testChecksum() +{ +if (!SkiaHelper::isVCLSkiaEnabled()) +return; +Bitmap bitmap(Size(10, 10), vcl::PixelFormat::N24_BPP); +bitmap.Erase(COL_RED); +BitmapChecksum checksum1 = bitmap.GetChecksum(); +// Set a pixel to create pixel data, that should change checksum. +BitmapWriteAccess(bitmap).SetPixel(0, 0, COL_BLUE); +BitmapChecksum checksum2 = bitmap.GetChecksum(); +CPPUNIT_ASSERT(checksum2 != checksum1); +SkiaSalBitmap* skiaBitmap1 = dynamic_cast(bitmap.ImplGetSalBitmap().get()); +// Creating an image should not change the checksum. +sk_sp image1 = skiaBitmap1->GetSkImage(); +BitmapChecksum checksum3 = bitmap.GetChecksum(); +CPPUNIT_ASSERT_EQUAL(checksum2, checksum3); +// Delayed scaling should change checksum even if the scaling has not taken place. +bitmap.Scale(Size(20, 20)); +BitmapChecksum checksum4 = bitmap.GetChecksum(); +CPPUNIT_ASSERT(checksum4 != checksum3); +// Setting back to the original red content should have the original checksum. +// (This also makes sure this next step is not affected by the delayed scaling +// above possibly taking place now.) +bitmap = Bitmap(Size(10, 10), vcl::PixelFormat::N24_BPP); +bitmap.Erase(COL_RED); +BitmapChecksum checksum5 = bitmap.GetChecksum(); +CPPUNIT_ASSERT_EQUAL(checksum1, checksum5); +// The optimized changing of images to greyscale should change the checksum. +SkiaSalBitmap* skiaBitmap2 = dynamic_cast(bitmap.ImplGetSalBitmap().get()); +skiaBitmap2->unittestResetToImage(); +BitmapChecksum checksum6; +skiaBitmap2->GetChecksum(checksum6); +CPPUNIT_ASSERT_EQUAL(checksum5, checksum6); +CPPUNIT_ASSERT(skiaBitmap2->ConvertToGreyscale()); +BitmapChecksum checksum7; +skiaBitmap2->GetChecksum(checksum7); +CPPUNIT_ASSERT(checksum7 != checksum6); +} + void SkiaTest::testTdf137329() { if (!SkiaHelper::isVCLSkiaEnabled()) diff --git a/vcl/skia/salbmp.cxx b/vcl/skia/salbmp.cxx index 7b5d05007129..c18ad18f8428 100644 --- a/vcl/skia/salbmp.cxx +++ b/vcl/skia/salbmp.cxx @@ -158,6 +158,8 @@ bool SkiaSalBitmap::Create(const SalBitmap& rSalBmp, SalGraphics* pGraphics) bool SkiaSalBitmap::Create(const SalBitmap& rSalBmp, vcl::PixelFormat eNewPixelFormat) { assert(mAnyAccessCount == 0); +assert(&rSalBmp != this); +ResetAllData(); const SkiaSalBitmap& src = static_cast(rSalBmp); mImage = src.mImage; mAlphaImage = src.mAlphaImage; @@ -296,7 +298,7 @@ void SkiaSalBitmap::ReleaseBuffer(BitmapBuffer* pBuffer, BitmapAccessMode nMode, #endif
[Libreoffice-commits] core.git: vcl/source
vcl/source/opengl/GLMHelper.hxx |5 + 1 file changed, 1 insertion(+), 4 deletions(-) New commits: commit 6565f0d23737868fbbd1aa78c08223dd255e1924 Author: VaibhavMalik4187 AuthorDate: Fri Dec 10 14:21:35 2021 +0530 Commit: Ilmari Lauhakangas CommitDate: Fri Dec 10 11:01:45 2021 +0100 tdf#143148 Use pragma once in vcl Change-Id: Iffad4effaeef46663d8a57110bf2d560e81d0d3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126629 Tested-by: Ilmari Lauhakangas Reviewed-by: Ilmari Lauhakangas diff --git a/vcl/source/opengl/GLMHelper.hxx b/vcl/source/opengl/GLMHelper.hxx index 9f4cd20f9e7c..9694a3c34625 100644 --- a/vcl/source/opengl/GLMHelper.hxx +++ b/vcl/source/opengl/GLMHelper.hxx @@ -7,8 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifndef INCLUDED_VCL_GLM_GLMHELPER_HXX -#define INCLUDED_VCL_GLM_GLMHELPER_HXX +#pragma once #include #include @@ -19,6 +18,4 @@ std::ostream& operator<<(std::ostream& rStrm, const glm::mat4& rMatrix); std::ostream& operator<<(std::ostream& rStrm, const glm::vec4& rPos); std::ostream& operator<<(std::ostream& rStrm, const glm::vec3& rPos); -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - vcl/unx
vcl/unx/gtk3/gtkinst.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 0db4adad840c591393466256d62e4bee6b2f929d Author: Caolán McNamara AuthorDate: Mon Dec 6 10:28:54 2021 + Commit: Caolán McNamara CommitDate: Fri Dec 10 11:00:08 2021 +0100 tdf#138999 only grab keyboard and not pointing devices this way scrolling in a combobox dropdown and moving the mouse outside the widget doesn't cause the scrollbar to jump to the top. No ill effect seen in a) autofilter dropdowns in calc b) color dropdown in writer main window or sidebar and clicking on combobox subwidget to launch its popup and select an entry to return to color dropdown c) submenu popups from style combobox dropdown Change-Id: I6ad445a6fab899d52907237e1f5506cce31b1f48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126408 Tested-by: Jenkins Reviewed-by: Caolán McNamara (cherry picked from commit 4f41fb1cba455db617d7fb68450ea1e38ac9cb0d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126430 diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx index 88926218bd0b..f5f1498443dc 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -9627,7 +9627,7 @@ void do_grab(GtkWidget* pWidget) GdkDisplay *pDisplay = gtk_widget_get_display(pWidget); GdkSeat* pSeat = gdk_display_get_default_seat(pDisplay); gdk_seat_grab(pSeat, widget_get_surface(pWidget), - GDK_SEAT_CAPABILITY_ALL, true, nullptr, nullptr, nullptr, nullptr); + GDK_SEAT_CAPABILITY_KEYBOARD, true, nullptr, nullptr, nullptr, nullptr); } void do_ungrab(GtkWidget* pWidget)
[Libreoffice-commits] core.git: sc/inc sc/qa sc/source
sc/inc/strings.hrc|1 + sc/qa/uitest/autofilter/autofilter.py |2 ++ sc/qa/uitest/autofilter2/tdf126306.py |4 ++-- sc/qa/uitest/autofilter2/tdf141559.py |3 ++- sc/qa/uitest/autofilter2/tdf46184.py |1 + sc/qa/uitest/autofilter2/tdf68113.py |2 -- sc/source/ui/inc/gridwin.hxx |5 +++-- sc/source/ui/view/gridwin.cxx | 11 +-- 8 files changed, 20 insertions(+), 9 deletions(-) New commits: commit d8aae8057d76743cfc1591cbffda2f54c338a213 Author: Caolán McNamara AuthorDate: Thu Dec 9 16:27:43 2021 + Commit: Caolán McNamara CommitDate: Fri Dec 10 10:56:18 2021 +0100 Related: tdf#146018 move Top10 below empty/not-empty add add Bottom10 Change-Id: Ic44b84dea8f8b1e61872606b50e9a384d8c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126621 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sc/inc/strings.hrc b/sc/inc/strings.hrc index ed39473c4637..96f4e8c3e0b2 100644 --- a/sc/inc/strings.hrc +++ b/sc/inc/strings.hrc @@ -33,6 +33,7 @@ #define SCSTR_STDFILTER NC_("SCSTR_STDFILTER", "Standard Filter...") #define SCSTR_CLEAR_FILTER NC_("SCSTR_CLEAR_FILTER", "Clear Filter") #define SCSTR_TOP10FILTER NC_("SCSTR_TOP10FILTER", "Top 10") +#define SCSTR_BOTTOM10FILTER NC_("SCSTR_BOTTOM10FILTER", "Bottom 10") #define SCSTR_FILTER_EMPTY NC_("SCSTR_FILTER_EMPTY", "Empty") #define SCSTR_FILTER_NOTEMPTY NC_("SCSTR_FILTER_NOTEMPTY", "Not Empty") #define SCSTR_FILTER_COLOR NC_("SCSTR_FILTER_COLOR", "Filter by Color") diff --git a/sc/qa/uitest/autofilter/autofilter.py b/sc/qa/uitest/autofilter/autofilter.py index 21e6e4eed20b..bbfbbaab7118 100644 --- a/sc/qa/uitest/autofilter/autofilter.py +++ b/sc/qa/uitest/autofilter/autofilter.py @@ -431,6 +431,8 @@ class AutofilterTest(UITestCase): xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"RETURN"})) xSubFloatWindow = self.xUITest.getFloatWindow() xSubMenu = xSubFloatWindow.getChild("menu") +xSubMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"})) +xSubMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"})) xSubMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"RETURN"})) self.assertFalse(is_row_hidden(doc, 0)) diff --git a/sc/qa/uitest/autofilter2/tdf126306.py b/sc/qa/uitest/autofilter2/tdf126306.py index cf8dcd1f3f0a..51c099a3f3c2 100644 --- a/sc/qa/uitest/autofilter2/tdf126306.py +++ b/sc/qa/uitest/autofilter2/tdf126306.py @@ -84,6 +84,8 @@ class tdf126306(UITestCase): xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"RETURN"})) xSubFloatWindow = self.xUITest.getFloatWindow() xSubMenu = xSubFloatWindow.getChild("menu") +xSubMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"})) +xSubMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"})) xSubMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"RETURN"})) top10_hidden_values = [True, True, True, False, True, False, True, @@ -108,7 +110,6 @@ class tdf126306(UITestCase): xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"RETURN"})) xSubFloatWindow = self.xUITest.getFloatWindow() xSubMenu = xSubFloatWindow.getChild("menu") -xSubMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"})) xSubMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"RETURN"})) empty_values = [False] * 14 @@ -132,7 +133,6 @@ class tdf126306(UITestCase): xSubFloatWindow = self.xUITest.getFloatWindow() xSubMenu = xSubFloatWindow.getChild("menu") xSubMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"})) -xSubMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"})) xSubMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"RETURN"})) #Nothing should change diff --git a/sc/qa/uitest/autofilter2/tdf141559.py b/sc/qa/uitest/autofilter2/tdf141559.py index 5f027a10ed43..e4eba12056b0 100644 --- a/sc/qa/uitest/autofilter2/tdf141559.py +++ b/sc/qa/uitest/autofilter2/tdf141559.py @@ -43,7 +43,7 @@ class tdf141559(UITestCase): xSubMenu = xSubFloatWindow.getChild("menu") nLastIdx = int(get_state_as_dict(xSubMenu)['Children']) - 1 -self.assertEqual(4, nLastIdx) +self.assertEqual(5, nLastIdx) # check last item: 'Standard Filter...' (new menu item 'Clear Filter' is optional) self.assertEqual('Standard Filter...', get_state_as_dict(xSubMenu.getChild(str(nLastIdx)))['Text']) @@ -51,6 +51,7 @@ class tdf141559(UITestCase): xSub
[Libreoffice-commits] core.git: sc/source
sc/source/ui/cctrl/checklistmenu.cxx | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) New commits: commit f38d7a7c1abdfb59fbbdf4d9bbc8e06fbed77887 Author: Caolán McNamara AuthorDate: Wed Dec 8 10:34:57 2021 + Commit: Caolán McNamara CommitDate: Fri Dec 10 10:55:57 2021 +0100 restore autofilter to a row taller, now it has less menu items Change-Id: Id6f8b5648eb10d8f44ed3c76836d3b96fd86103e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126533 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx index 7dce50e60e24..cc16644dd72c 100644 --- a/sc/source/ui/cctrl/checklistmenu.cxx +++ b/sc/source/ui/cctrl/checklistmenu.cxx @@ -456,7 +456,9 @@ ScCheckListMember::ScCheckListMember() // the value of border-width of FilterDropDown constexpr int nBorderWidth = 4; // number of rows visible in checklist -constexpr int nCheckListVisibleRows = 8; +constexpr int nCheckListVisibleRows = 9; +// number of rows visible in colorlist +constexpr int nColorListVisibleRows = 9; ScCheckListMenuControl::ScCheckListMenuControl(weld::Widget* pParent, ScViewData& rViewData, bool bHasDates, int nWidth, vcl::ILibreOfficeKitNotifier* pNotifier) @@ -1571,11 +1573,19 @@ void ScListSubMenuControl::addMenuColorItem(const OUString& rText, bool bActive, rColorMenu.set_toggle(*mxScratchIter, bActive ? TRISTATE_TRUE : TRISTATE_FALSE); rColorMenu.set_image(*mxScratchIter, rImage); -if (mnTextColorMenuPrefHeight == -1 && &rColorMenu == mxTextColorMenu.get() && mxTextColorMenu->n_children() == 8) +if (mnTextColorMenuPrefHeight == -1 && +&rColorMenu == mxTextColorMenu.get() && +mxTextColorMenu->n_children() == nColorListVisibleRows) +{ mnTextColorMenuPrefHeight = mxTextColorMenu->get_preferred_size().Height(); +} -if (mnBackColorMenuPrefHeight == -1 && &rColorMenu == mxBackColorMenu.get() && mxBackColorMenu->n_children() == 8) +if (mnBackColorMenuPrefHeight == -1 && +&rColorMenu == mxBackColorMenu.get() && +mxBackColorMenu->n_children() == nColorListVisibleRows) +{ mnBackColorMenuPrefHeight = mxBackColorMenu->get_preferred_size().Height(); +} } void ScListSubMenuControl::addSeparator()
[Libreoffice-commits] core.git: sc/inc sc/qa sc/source
sc/inc/strings.hrc|3 ++- sc/qa/uitest/autofilter/autofilter.py |6 +- sc/qa/uitest/autofilter2/tdf126306.py | 14 +- sc/qa/uitest/autofilter2/tdf141559.py | 30 +++--- sc/qa/uitest/autofilter2/tdf46184.py | 12 +++- sc/qa/uitest/autofilter2/tdf68113.py | 10 +- sc/source/ui/cctrl/checklistmenu.cxx | 26 ++ sc/source/ui/inc/checklistmenu.hxx|1 + sc/source/ui/inc/gridwin.hxx |1 - sc/source/ui/view/gridwin.cxx | 24 ++-- 10 files changed, 88 insertions(+), 39 deletions(-) New commits: commit e2d498b778a3dac70a7faee4d1bbabb50cdcc103 Author: Caolán McNamara AuthorDate: Wed Dec 8 10:32:31 2021 + Commit: Caolán McNamara CommitDate: Fri Dec 10 10:55:25 2021 +0100 tdf#146018 group filtering options under a single dropdown Change-Id: I91afb746485654ed8e1418d17d4b172332b3f1f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126532 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sc/inc/strings.hrc b/sc/inc/strings.hrc index 006f1aadf85a..ed39473c4637 100644 --- a/sc/inc/strings.hrc +++ b/sc/inc/strings.hrc @@ -35,7 +35,8 @@ #define SCSTR_TOP10FILTER NC_("SCSTR_TOP10FILTER", "Top 10") #define SCSTR_FILTER_EMPTY NC_("SCSTR_FILTER_EMPTY", "Empty") #define SCSTR_FILTER_NOTEMPTY NC_("SCSTR_FILTER_NOTEMPTY", "Not Empty") -#define SCSTR_FILTER_COLOR NC_("SCSTR_FILTER_COLOR", "Color Filter") +#define SCSTR_FILTER_COLOR NC_("SCSTR_FILTER_COLOR", "Filter by Color") +#define SCSTR_FILTER_CONDITION NC_("SCSTR_FILTER_CONDITION", "Filter by Condition") #define SCSTR_FILTER_TEXT_COLOR NC_("SCSTR_FILTER_TEXT_COLOR", "Text Color") #define SCSTR_FILTER_BACKGROUND_COLOR NC_("SCSTR_FILTER_BACKGROUND_COLOR", "Background Color") // This must match the translation of the same strings of standardfilterdialog|cond diff --git a/sc/qa/uitest/autofilter/autofilter.py b/sc/qa/uitest/autofilter/autofilter.py index 6a0018afa187..21e6e4eed20b 100644 --- a/sc/qa/uitest/autofilter/autofilter.py +++ b/sc/qa/uitest/autofilter/autofilter.py @@ -421,13 +421,17 @@ class AutofilterTest(UITestCase): xGridWin = self.xUITest.getTopFocusWindow().getChild("grid_window") -# Top 10 filer +# Top 10 filter xGridWin.executeAction("LAUNCH", mkPropertyValues({"AUTOFILTER": "", "COL": "1", "ROW": "0"})) xFloatWindow = self.xUITest.getFloatWindow() xMenu = xFloatWindow.getChild("menu") xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"})) xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"})) +xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"})) xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"RETURN"})) +xSubFloatWindow = self.xUITest.getFloatWindow() +xSubMenu = xSubFloatWindow.getChild("menu") +xSubMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"RETURN"})) self.assertFalse(is_row_hidden(doc, 0)) self.assertTrue(is_row_hidden(doc, 1)) diff --git a/sc/qa/uitest/autofilter2/tdf126306.py b/sc/qa/uitest/autofilter2/tdf126306.py index 79525402dc6b..cf8dcd1f3f0a 100644 --- a/sc/qa/uitest/autofilter2/tdf126306.py +++ b/sc/qa/uitest/autofilter2/tdf126306.py @@ -80,7 +80,11 @@ class tdf126306(UITestCase): xMenu = xFloatWindow.getChild("menu") xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"})) xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"})) +xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"})) xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"RETURN"})) +xSubFloatWindow = self.xUITest.getFloatWindow() +xSubMenu = xSubFloatWindow.getChild("menu") +xSubMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"RETURN"})) top10_hidden_values = [True, True, True, False, True, False, True, True, False, True, True, False, True, True] @@ -102,6 +106,10 @@ class tdf126306(UITestCase): xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"})) xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"})) xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"RETURN"})) +xSubFloatWindow = self.xUITest.getFloatWindow() +xSubMenu = xSubFloatWindow.getChild("menu") +xSubMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"})) +xSubMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"RETURN"})) empty_values = [False]
[Libreoffice-commits] core.git: extensions/source
extensions/source/activex/SOActiveX.cxx |7 --- 1 file changed, 7 deletions(-) New commits: commit 9e8789f2186d16a895cd659b321e5001ea239658 Author: Caolán McNamara AuthorDate: Thu Dec 9 15:22:22 2021 + Commit: Caolán McNamara CommitDate: Fri Dec 10 10:03:02 2021 +0100 remove use of non-existing slot:6661 seeing as this call does nothing since ~2006 see: commit 01552f1e77c67f70ffd879294288612f9ab64e3b Author: Stephan Bergmann Date: Fri Oct 17 16:58:26 2014 +0200 SID_TOGGLE_MENUBAR (aka slot:6661, .uno:MenuBarVisible) is dead ...since introduction of XLayoutManager's private:resource/menubar/menubar in 3fb2acf5b77bff59909f616c44c7de17048b64d7 "INTEGRATION: CWS layoutmanager (1.52.10); FILE MERGED" etc. and final removal of SID_TOGGLE_MENUBAR bits in f605b16e395e8ccc3d1aba7907b0792039016f69 "INTEGRATION: CWS sfxcleanup (1.119.8); FILE MERGED" etc. What still needs fixing are extensions/source/activex/SOActiveX.cxx odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/CustomizeView.java odk/examples/OLE/activex/SOActiveX.cpp in a similar way as e.g. 0273d3d81d29d5c1f6c387cca633cd99722c100e "INTEGRATION: CWS jl18 (1.6.8); FILE MERGED." these uses remain outstanding: odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/CustomizeView.java odk/examples/OLE/activex/SOActiveX.cpp Change-Id: Iad43b5adc6ae24e6d794ebef10ed7df476b4e5dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126622 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/extensions/source/activex/SOActiveX.cxx b/extensions/source/activex/SOActiveX.cxx index 6e102cf51202..2d8dc2a73b91 100644 --- a/extensions/source/activex/SOActiveX.cxx +++ b/extensions/source/activex/SOActiveX.cxx @@ -801,13 +801,6 @@ HRESULT CSOActiveX::LoadURLToFrame( ) HRESULT hr = CallDispatchMethod( mCurFileUrl, aArgNames, aArgVals, nCount ); if( !SUCCEEDED( hr ) ) return hr; -CComVariant aBarName( L"MenuBarVisible" ); -CComVariant aBarVis; -aBarVis.vt = VT_BOOL; aBarVis.boolVal = VARIANT_FALSE; -hr = CallDispatchMethod( L"slot:6661", &aBarName, &aBarVis, 1 ); -// does not work for some documents, but it is no error -// if( !SUCCEEDED( hr ) ) return hr; - // try to get the model and set the presentation specific property, the setting will fail for other document formats CComPtr pdispController; hr = GetIDispByFunc( mpDispFrame, L"getController", nullptr, 0, pdispController );
[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - sw/source
sw/source/uibase/docvw/AnnotationWin2.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit b98dd317e96a8cdf88e6a490dfdd696d550231e3 Author: Caolán McNamara AuthorDate: Thu Dec 9 17:19:57 2021 + Commit: Caolán McNamara CommitDate: Fri Dec 10 10:02:30 2021 +0100 Resolves: tdf#146141 don't double delete comments which can happen because empty comments are deleted automatically on losing focus back to main document, so explicit delete of an empty comment resulted in a double delete Change-Id: I30390995a260235ed8702b0a088c05e91c953b3b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126589 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx b/sw/source/uibase/docvw/AnnotationWin2.cxx index 33dc2cb54b5b..6cb5511a02fa 100644 --- a/sw/source/uibase/docvw/AnnotationWin2.cxx +++ b/sw/source/uibase/docvw/AnnotationWin2.cxx @@ -1043,7 +1043,7 @@ void SwAnnotationWin::DeactivatePostIt() if ( !Application::GetSettings().GetStyleSettings().GetHighContrastMode() ) GetOutlinerView()->SetBackgroundColor(COL_TRANSPARENT); -if ( !IsProtected() && mpOutliner->GetEditEngine().GetText().isEmpty() ) +if (!mnEventId && !IsProtected() && mpOutliner->GetEditEngine().GetText().isEmpty()) { mnEventId = Application::PostUserEvent( LINK( this, SwAnnotationWin, DeleteHdl), nullptr, true ); }
[Libreoffice-commits] core.git: sw/inc sw/source
sw/inc/AnnotationWin.hxx |2 +- sw/source/uibase/docvw/AnnotationWin.cxx | 16 sw/source/uibase/docvw/AnnotationWin2.cxx |8 3 files changed, 13 insertions(+), 13 deletions(-) New commits: commit b4f5dc552ae8fefa9fee0381399696e2c68bdec0 Author: Caolán McNamara AuthorDate: Thu Dec 9 17:24:37 2021 + Commit: Caolán McNamara CommitDate: Fri Dec 10 10:02:00 2021 +0100 rename SwAnnotationWin::mnEventId to SwAnnotationWin::mnDeleteEventId because its solely used to track if an event was posted to delete the annotation Change-Id: I7c6458475e967b8f313f1a770946c0db65561434 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126624 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sw/inc/AnnotationWin.hxx b/sw/inc/AnnotationWin.hxx index 5fde0c3b76fd..bc5a4293b33d 100644 --- a/sw/inc/AnnotationWin.hxx +++ b/sw/inc/AnnotationWin.hxx @@ -229,7 +229,7 @@ class SAL_DLLPUBLIC_RTTI SwAnnotationWin final : public InterimItemWindow SwPostItMgr&mrMgr; SwView& mrView; -ImplSVEvent * mnEventId; +ImplSVEvent*mnDeleteEventId; std::unique_ptr mpOutlinerView; std::unique_ptr mpOutliner; diff --git a/sw/source/uibase/docvw/AnnotationWin.cxx b/sw/source/uibase/docvw/AnnotationWin.cxx index 84d7e47cfb31..c41b7a2136a8 100644 --- a/sw/source/uibase/docvw/AnnotationWin.cxx +++ b/sw/source/uibase/docvw/AnnotationWin.cxx @@ -91,7 +91,7 @@ SwAnnotationWin::SwAnnotationWin( SwEditWin& rEditWin, : InterimItemWindow(&rEditWin, "modules/swriter/ui/annotation.ui", "Annotation") , mrMgr(aMgr) , mrView(rEditWin.GetView()) -, mnEventId(nullptr) +, mnDeleteEventId(nullptr) , meSidebarPosition(sw::sidebarwindows::SidebarPosition::NONE) , mPageBorder(0) , mbAnchorRectChanged(false) @@ -152,8 +152,8 @@ void SwAnnotationWin::dispose() mxMenuButton.reset(); -if (mnEventId) -Application::RemoveUserEvent( mnEventId ); +if (mnDeleteEventId) +Application::RemoveUserEvent(mnDeleteEventId); mpOutliner.reset(); mpOutlinerView.reset(); @@ -240,11 +240,11 @@ void SwAnnotationWin::DeleteThread() while(next && next->GetTopReplyNote() == topNote) { -current->mnEventId = Application::PostUserEvent( LINK( current, SwAnnotationWin, DeleteHdl), nullptr, true ); +current->mnDeleteEventId = Application::PostUserEvent( LINK( current, SwAnnotationWin, DeleteHdl), nullptr, true ); current = next; next = mrMgr.GetNextPostIt(KEY_PAGEDOWN, current); } -current->mnEventId = Application::PostUserEvent( LINK( current, SwAnnotationWin, DeleteHdl), nullptr, true ); +current->mnDeleteEventId = Application::PostUserEvent( LINK( current, SwAnnotationWin, DeleteHdl), nullptr, true ); } bool SwAnnotationWin::IsResolved() const @@ -318,10 +318,10 @@ void SwAnnotationWin::Delete() { mrMgr.SetActiveSidebarWin(nullptr); // if the note is empty, the previous line will send a delete event, but we are already there -if (mnEventId) +if (mnDeleteEventId) { -Application::RemoveUserEvent( mnEventId ); -mnEventId = nullptr; +Application::RemoveUserEvent(mnDeleteEventId); +mnDeleteEventId = nullptr; } } // we delete the field directly, the Mgr cleans up the PostIt by listening diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx b/sw/source/uibase/docvw/AnnotationWin2.cxx index 6cb5511a02fa..30e391182118 100644 --- a/sw/source/uibase/docvw/AnnotationWin2.cxx +++ b/sw/source/uibase/docvw/AnnotationWin2.cxx @@ -1043,9 +1043,9 @@ void SwAnnotationWin::DeactivatePostIt() if ( !Application::GetSettings().GetStyleSettings().GetHighContrastMode() ) GetOutlinerView()->SetBackgroundColor(COL_TRANSPARENT); -if (!mnEventId && !IsProtected() && mpOutliner->GetEditEngine().GetText().isEmpty()) +if (!mnDeleteEventId && !IsProtected() && mpOutliner->GetEditEngine().GetText().isEmpty()) { -mnEventId = Application::PostUserEvent( LINK( this, SwAnnotationWin, DeleteHdl), nullptr, true ); +mnDeleteEventId = Application::PostUserEvent( LINK( this, SwAnnotationWin, DeleteHdl), nullptr, true ); } } @@ -1088,7 +1088,7 @@ void SwAnnotationWin::ExecuteCommand(sal_uInt16 nSlot) } case FN_DELETE_COMMENT: //Delete(); // do not kill the parent of our open popup menu -mnEventId = Application::PostUserEvent( LINK( this, SwAnnotationWin, DeleteHdl), nullptr, true ); +mnDeleteEventId = Application::PostUserEvent( LINK( this, SwAnnotationWin, DeleteHdl), nullptr, true ); break; case FN_DELETE_COMMENT_THREAD: DeleteThread(); @@ -1207,7 +1207,7 @@ IMPL_LINK_NOARG(SwAnnotationWin, ModifyHdl, LinkParamNone*, void) IMPL_
[Libreoffice-commits] core.git: sw/source
sw/source/uibase/docvw/AnnotationWin2.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 7c11589b54cfe212dfa90e5c3c29000c0c503748 Author: Caolán McNamara AuthorDate: Thu Dec 9 17:19:57 2021 + Commit: Caolán McNamara CommitDate: Fri Dec 10 10:01:23 2021 +0100 Resolves: tdf#146141 don't double delete comments which can happen because empty comments are deleted automatically on losing focus back to main document, so explicit delete of an empty comment resulted in a double delete Change-Id: I30390995a260235ed8702b0a088c05e91c953b3b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126623 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx b/sw/source/uibase/docvw/AnnotationWin2.cxx index 33dc2cb54b5b..6cb5511a02fa 100644 --- a/sw/source/uibase/docvw/AnnotationWin2.cxx +++ b/sw/source/uibase/docvw/AnnotationWin2.cxx @@ -1043,7 +1043,7 @@ void SwAnnotationWin::DeactivatePostIt() if ( !Application::GetSettings().GetStyleSettings().GetHighContrastMode() ) GetOutlinerView()->SetBackgroundColor(COL_TRANSPARENT); -if ( !IsProtected() && mpOutliner->GetEditEngine().GetText().isEmpty() ) +if (!mnEventId && !IsProtected() && mpOutliner->GetEditEngine().GetText().isEmpty()) { mnEventId = Application::PostUserEvent( LINK( this, SwAnnotationWin, DeleteHdl), nullptr, true ); }
Vaibhav Malik license statement
All of my past & future contributions to LibreOffice may be licensed under the MPLv2/LGPLv3+ dual license.