[Libreoffice-commits] core.git: dbaccess/source
dbaccess/source/core/misc/dsntypes.cxx |4 dbaccess/source/inc/dsntypes.hxx |2 ++ 2 files changed, 6 insertions(+) New commits: commit 9c071c148afce0b95a16b36c27b709380d1130b5 Author: Pierre AuthorDate: Thu Jul 27 15:27:14 2023 +0200 Commit: Julien Nabet CommitDate: Fri Jul 28 09:14:57 2023 +0200 tdf#156471: New database wizard - add generic support for embedded databases of unknown type e.g. provided by extension or future code. The core assumption is that an embedded database doesn't need a user-configured "connection URL" configured so don't ask for one. Change-Id: I7d11cc0b492782634dd49f74d9d709dca434e990 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154989 Reviewed-by: Lionel Mamane Tested-by: Julien Nabet diff --git a/dbaccess/source/core/misc/dsntypes.cxx b/dbaccess/source/core/misc/dsntypes.cxx index cfeaad56a671..c67ac1646a75 100644 --- a/dbaccess/source/core/misc/dsntypes.cxx +++ b/dbaccess/source/core/misc/dsntypes.cxx @@ -324,6 +324,9 @@ DATASOURCE_TYPE ODsnTypeCollection::determineType(std::u16string_view _rDsn) con if (sDsn.equalsIgnoreAsciiCase("sdbc:embedded:firebird")) return DST_EMBEDDED_FIREBIRD; +if (sDsn.startsWithIgnoreAsciiCase("sdbc:embedded:")) +return DST_EMBEDDED_UNKNOWN; + // find second : nSeparator = sDsn.indexOf(u':', nSeparator + 1); if (-1 == nSeparator) @@ -467,6 +470,7 @@ void ODsnTypeCollection::fillPageIds(std::u16string_view _sURL,std::vector
[Libreoffice-commits] core.git: framework/source include/vcl vcl/source
framework/source/uielement/menubarmanager.cxx | 31 +++--- include/vcl/menu.hxx |1 vcl/source/window/menu.cxx| 18 +++ 3 files changed, 47 insertions(+), 3 deletions(-) New commits: commit 630303ad8e94bd634b98e691935a1f4c19582a3a Author: Balazs Varga AuthorDate: Wed Jul 26 12:17:19 2023 +0200 Commit: Balazs Varga CommitDate: Fri Jul 28 09:22:49 2023 +0200 tdf#104382 - Menus should be disabled when they have no enabled submenus Disable menu elements if they only have disabled submenu elemets. TODO: GTK3 Change-Id: I83cdc58846afd61719ceeba9f993df894ce6fd01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154938 Tested-by: Jenkins Reviewed-by: Balazs Varga diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index b445324d70d5..f86ede8eb052 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -515,7 +515,7 @@ void SAL_CALL MenuBarManager::disposing( const EventObject& Source ) static void lcl_CheckForChildren(Menu* pMenu, sal_uInt16 nItemId) { if (PopupMenu* pThisPopup = pMenu->GetPopupMenu( nItemId )) -pMenu->EnableItem( nItemId, pThisPopup->GetItemCount() != 0 ); +pMenu->EnableItem( nItemId, pThisPopup->GetItemCount() != 0 && pThisPopup->HasValidEntries(true)); } // vcl handler @@ -672,6 +672,15 @@ IMPL_LINK( MenuBarManager, Activate, Menu *, pMenu, bool ) { if( xMenuItemDispatch.is() || menuItemHandler->aMenuItemURL != ".uno:RecentFileList" ) bPopupMenu = CreatePopupMenuController(menuItemHandler.get(), m_xDispatchProvider, m_aModuleIdentifier); + +if (bPopupMenu && menuItemHandler->xPopupMenuController.is()) +{ +if (PopupMenu* pThisPopup = pMenu->GetPopupMenu(menuItemHandler->nItemId)) +{ +pThisPopup->Activate(); +pThisPopup->Deactivate(); +} +} } else if ( menuItemHandler->xPopupMenuController.is() ) { @@ -679,7 +688,10 @@ IMPL_LINK( MenuBarManager, Activate, Menu *, pMenu, bool ) menuItemHandler->xPopupMenuController->updatePopupMenu(); bPopupMenu = true; if (PopupMenu* pThisPopup = pMenu->GetPopupMenu( menuItemHandler->nItemId )) -pMenu->EnableItem( menuItemHandler->nItemId, pThisPopup->GetItemCount() != 0 ); +{ +pThisPopup->Activate(); +pThisPopup->Deactivate(); +} } lcl_CheckForChildren(pMenu, menuItemHandler->nItemId); @@ -703,6 +715,11 @@ IMPL_LINK( MenuBarManager, Activate, Menu *, pMenu, bool ) { // Force update of popup menu menuItemHandler->xPopupMenuController->updatePopupMenu(); +if (PopupMenu* pThisPopup = pMenu->GetPopupMenu(menuItemHandler->nItemId)) +{ +pThisPopup->Activate(); +pThisPopup->Deactivate(); +} lcl_CheckForChildren(pMenu, menuItemHandler->nItemId); } else if ( menuItemHandler->xMenuItemDispatch.is() ) @@ -722,8 +739,16 @@ IMPL_LINK( MenuBarManager, Activate, Menu *, pMenu, bool ) { } } -else if ( menuItemHandler->xSubMenuManager.is() ) +else if (menuItemHandler->xSubMenuManager.is()) +{ +MenuBarManager* pMenuBarManager = static_cast(menuItemHandler->xSubMenuManager.get()); +if (pMenuBarManager) +{ +pMenuBarManager->Activate(pMenuBarManager->GetMenuBar()); +pMenuBarManager->Deactivate(pMenuBarManager->GetMenuBar()); +} lcl_CheckForChildren(pMenu, menuItemHandler->nItemId); +} } } diff --git a/include/vcl/menu.hxx b/include/vcl/menu.hxx index aeedc2cbe218..2442eef9202f 100644 --- a/include/vcl/menu.hxx +++ b/include/vcl/menu.hxx @@ -252,6 +252,7 @@ public: void SetMenuFlags( MenuFlags nFlags ) { nMenuFlags = nFlags; } MenuFlags GetMenuFlags() const { return nMenuFlags; } +bool HasValidEntries(bool bCheckPopups) const; sal_uInt16 GetItemCount() const; sal_uInt16 GetItemId(sal_uInt16 nPos) const; sal_uInt16 GetItemId(std::u16string_view rIdent) const; diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index 284a54a0a3a7..b33219c82c8d 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -579,6 +579,24 @@ sal_uInt
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sc/source
sc/source/ui/app/inputwin.cxx |8 +++- sc/source/ui/inc/inputwin.hxx |2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) New commits: commit c5b28aa174883f513060e7e5b6142367f49f Author: Caolán McNamara AuthorDate: Wed Jul 26 09:29:18 2023 +0100 Commit: Caolán McNamara CommitDate: Fri Jul 28 09:54:32 2023 +0200 Resolves: tdf#155716 grab focus when context menu is activated Change-Id: I194aba413d5adf07c8d78823f2f9a086f95cf248 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154925 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index acbb66c41a4a..07a4cd93a836 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -1648,7 +1648,7 @@ bool ScTextWnd::CanFocus() const return SC_MOD()->IsEditMode(); } -bool ScTextWnd::MouseButtonDown( const MouseEvent& rMEvt ) +void ScTextWnd::UpdateFocus() { if (!HasFocus()) { @@ -1656,6 +1656,11 @@ bool ScTextWnd::MouseButtonDown( const MouseEvent& rMEvt ) if (CanFocus()) TextGrabFocus(); } +} + +bool ScTextWnd::MouseButtonDown( const MouseEvent& rMEvt ) +{ +UpdateFocus(); bool bClickOnSelection = false; if (m_xEditView) @@ -1771,6 +1776,7 @@ bool ScTextWnd::Command( const CommandEvent& rCEvt ) } if (IsMouseCaptured()) ReleaseMouse(); +UpdateFocus(); pViewFrm->GetDispatcher()->ExecutePopup("formulabar", &mrGroupBar.GetVclParent(), &aPos); } } diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx index f0f69e948843..823c9e177ed8 100644 --- a/sc/source/ui/inc/inputwin.hxx +++ b/sc/source/ui/inc/inputwin.hxx @@ -135,6 +135,8 @@ private: void InitEditEngine(); +void UpdateFocus(); + rtl::Reference m_xHelper; typedef ::std::vector< ScAccessibleEditLineTextData* > AccTextDataVector;
[Libreoffice-commits] core.git: Branch 'libreoffice-7-6' - sc/source
sc/source/core/tool/interpr1.cxx | 42 +++ 1 file changed, 30 insertions(+), 12 deletions(-) New commits: commit 74d1aad00b1dad10534ecd80a845ae182fbd08c3 Author: Eike Rathke AuthorDate: Tue Jul 25 23:41:23 2023 +0200 Commit: Caolán McNamara CommitDate: Fri Jul 28 10:03:26 2023 +0200 Resolves: tdf#156467 Let array ROW() and COLUMN() return a scalar value ... instead of a single element matrix. Change-Id: I8307e24ef68dc54350fbdda74bc61b1df6a5107b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154908 Reviewed-by: Eike Rathke Tested-by: Jenkins (cherry picked from commit 49b601937f5ba7739198a1b16ba6da2351897750) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154952 Reviewed-by: Caolán McNamara diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index a8fba640b732..56840ceaeff3 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -4457,20 +4457,29 @@ void ScInterpreter::ScColumn() SCROW nRows = 0; if (pMyFormulaCell) pMyFormulaCell->GetMatColsRows( nCols, nRows); +bool bMayBeScalar; if (nCols == 0) { // Happens if called via ScViewFunc::EnterMatrix() // ScFormulaCell::GetResultDimensions() as of course a // matrix result is not available yet. nCols = 1; +bMayBeScalar = false; } -ScMatrixRef pResMat = GetNewMat( static_cast(nCols), 1, /*bEmpty*/true ); -if (pResMat) +else { -for (SCCOL i=0; i < nCols; ++i) -pResMat->PutDouble( nVal + i, static_cast(i), 0); -PushMatrix( pResMat); -return; +bMayBeScalar = true; +} +if (!bMayBeScalar || nCols != 1 || nRows != 1) +{ +ScMatrixRef pResMat = GetNewMat( static_cast(nCols), 1, /*bEmpty*/true ); +if (pResMat) +{ +for (SCCOL i=0; i < nCols; ++i) +pResMat->PutDouble( nVal + i, static_cast(i), 0); +PushMatrix( pResMat); +return; +} } } } @@ -4561,20 +4570,29 @@ void ScInterpreter::ScRow() SCROW nRows = 0; if (pMyFormulaCell) pMyFormulaCell->GetMatColsRows( nCols, nRows); +bool bMayBeScalar; if (nRows == 0) { // Happens if called via ScViewFunc::EnterMatrix() // ScFormulaCell::GetResultDimensions() as of course a // matrix result is not available yet. nRows = 1; +bMayBeScalar = false; } -ScMatrixRef pResMat = GetNewMat( 1, static_cast(nRows), /*bEmpty*/true); -if (pResMat) +else { -for (SCROW i=0; i < nRows; i++) -pResMat->PutDouble( nVal + i, 0, static_cast(i)); -PushMatrix( pResMat); -return; +bMayBeScalar = true; +} +if (!bMayBeScalar || nCols != 1 || nRows != 1) +{ +ScMatrixRef pResMat = GetNewMat( 1, static_cast(nRows), /*bEmpty*/true); +if (pResMat) +{ +for (SCROW i=0; i < nRows; i++) +pResMat->PutDouble( nVal + i, 0, static_cast(i)); +PushMatrix( pResMat); +return; +} } } }
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - desktop/source sfx2/source
desktop/source/lib/init.cxx | 21 + sfx2/source/doc/sfxbasemodel.cxx | 18 +- 2 files changed, 38 insertions(+), 1 deletion(-) New commits: commit b95739d70806c121cdc38e4e3eb86683e1581c57 Author: Jaume Pujantell AuthorDate: Fri Jul 14 09:11:07 2023 +0200 Commit: Caolán McNamara CommitDate: Fri Jul 28 10:05:03 2023 +0200 Added possibility to set password on save throug arguments Change-Id: I579ed7487f87515a21d83912d9c0d12e9edc5eea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154433 Tested-by: Jenkins CollaboraOffice Reviewed-by: Caolán McNamara diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index c1ebf5d934ea..112b134b5e84 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -3308,6 +3308,23 @@ static int doc_saveAs(LibreOfficeKitDocument* pThis, const char* sUrl, const cha bool bFullSheetPreview = sFullSheetPreview == u"true"; +OUString filePassword; +if ((aIndex = aFilterOptions.indexOf(",Password=")) >= 0) +{ +int bIndex = aFilterOptions.indexOf("PASSWORDEND"); +filePassword = aFilterOptions.subView(aIndex + 10, bIndex - (aIndex + 10)); +aFilterOptions = OUString::Concat(aFilterOptions.subView(0, aIndex)) + + aFilterOptions.subView(bIndex + 11); +} +OUString filePasswordToModify; +if ((aIndex = aFilterOptions.indexOf(",PasswordToModify=")) >= 0) +{ +int bIndex = aFilterOptions.indexOf("PASSWORDTOMODIFYEND"); +filePassword = aFilterOptions.subView(aIndex + 18, bIndex - (aIndex + 18)); +aFilterOptions = OUString::Concat(aFilterOptions.subView(0, aIndex)) + + aFilterOptions.subView(bIndex + 19); +} + // Select a pdf version if specified a valid one. If not specified then ignore. // If invalid then fail. sal_Int32 pdfVer = 0; @@ -3382,6 +3399,10 @@ static int doc_saveAs(LibreOfficeKitDocument* pThis, const char* sUrl, const cha { aSaveMediaDescriptor["FilterData"] <<= aFilterDataMap.getAsConstPropertyValueList(); } +if (!filePassword.isEmpty()) +aSaveMediaDescriptor["Password"] <<= filePassword; +if (!filePasswordToModify.isEmpty()) +aSaveMediaDescriptor["PasswordToModify"] <<= filePasswordToModify; // add interaction handler too if (gImpl) diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 8a539f660409..f5759950d29b 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -129,6 +129,7 @@ #include #include "printhelper.hxx" #include +#include #include #include #include @@ -3023,13 +3024,13 @@ void SfxBaseModel::impl_store( const OUString& sURL throw frame::IllegalArgumentIOException(); bool bSaved = false; +::comphelper::SequenceAsHashMap aArgHash(seqArguments); if ( !bSaveTo && m_pData->m_pObjectShell.is() && !sURL.isEmpty() && !sURL.startsWith( "private:stream" ) && ::utl::UCBContentHelper::EqualURLs( getLocation(), sURL ) ) { // this is the same file URL as the current document location, try to use storeOwn if possible -::comphelper::SequenceAsHashMap aArgHash( seqArguments ); static const OUStringLiteral aFilterString( u"FilterName" ); const OUString aFilterName( aArgHash.getUnpackedValueOrDefault( aFilterString, OUString() ) ); if ( !aFilterName.isEmpty() ) @@ -3099,11 +3100,26 @@ void SfxBaseModel::impl_store( const OUString& sURL SfxGetpApp()->NotifyEvent( SfxEventHint( bSaveTo ? SfxEventHintId::SaveToDoc : SfxEventHintId::SaveAsDoc, GlobalEventConfig::GetEventName( bSaveTo ? GlobalEventId::SAVETODOC : GlobalEventId::SAVEASDOC ), m_pData->m_pObjectShell.get() ) ); +const OUString aFilterName(aArgHash.getUnpackedValueOrDefault("FilterName", OUString())); +OUString aPassword, aPasswordToModify; +if (!aArgHash.getUnpackedValueOrDefault("EncryptionData", Sequence()) + .hasElements()) +aPassword = aArgHash.getUnpackedValueOrDefault("Password", OUString()); +if (!aArgHash.getUnpackedValueOrDefault("ModifyPasswordInfo", Sequence()) + .hasElements() +&& aArgHash.getUnpackedValueOrDefault("ModifyPasswordInfo", static_cast(0)) == 0) +aPasswordToModify = aArgHash.getUnpackedValueOrDefault("PasswordToModify", OUString()); +aArgHash.erase("PasswordToModify"); + std::optional pItemSet(SfxGetpApp()->GetPool()); pItemSet->Put(SfxStringItem(SID_FILE_NAME, sURL)); if ( bSaveTo ) pItemSet->Put(SfxBoolItem(SID_SAVETO, true)); +if (!aFilterName.isEmpty() && (!aPassword.isEmpty() || !aPass
[Libreoffice-commits] core.git: desktop/source sfx2/source
desktop/source/lib/init.cxx | 21 + sfx2/source/doc/sfxbasemodel.cxx | 18 +- 2 files changed, 38 insertions(+), 1 deletion(-) New commits: commit a52ba26e6a3567a1f63aeb8d20c084eb286974b4 Author: Jaume Pujantell AuthorDate: Fri Jul 14 09:11:07 2023 +0200 Commit: Caolán McNamara CommitDate: Fri Jul 28 10:04:50 2023 +0200 Added possibility to set password on save through arguments Change-Id: I579ed7487f87515a21d83912d9c0d12e9edc5eea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154415 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 8d830c0cbd00..6e8c0db99223 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -3270,6 +3270,23 @@ static int doc_saveAs(LibreOfficeKitDocument* pThis, const char* sUrl, const cha bool bFullSheetPreview = sFullSheetPreview == u"true"; +OUString filePassword; +if ((aIndex = aFilterOptions.indexOf(",Password=")) >= 0) +{ +int bIndex = aFilterOptions.indexOf("PASSWORDEND"); +filePassword = aFilterOptions.subView(aIndex + 10, bIndex - (aIndex + 10)); +aFilterOptions = OUString::Concat(aFilterOptions.subView(0, aIndex)) + + aFilterOptions.subView(bIndex + 11); +} +OUString filePasswordToModify; +if ((aIndex = aFilterOptions.indexOf(",PasswordToModify=")) >= 0) +{ +int bIndex = aFilterOptions.indexOf("PASSWORDTOMODIFYEND"); +filePassword = aFilterOptions.subView(aIndex + 18, bIndex - (aIndex + 18)); +aFilterOptions = OUString::Concat(aFilterOptions.subView(0, aIndex)) + + aFilterOptions.subView(bIndex + 19); +} + // Select a pdf version if specified a valid one. If not specified then ignore. // If invalid then fail. sal_Int32 pdfVer = 0; @@ -3344,6 +3361,10 @@ static int doc_saveAs(LibreOfficeKitDocument* pThis, const char* sUrl, const cha { aSaveMediaDescriptor["FilterData"] <<= aFilterDataMap.getAsConstPropertyValueList(); } +if (!filePassword.isEmpty()) +aSaveMediaDescriptor["Password"] <<= filePassword; +if (!filePasswordToModify.isEmpty()) +aSaveMediaDescriptor["PasswordToModify"] <<= filePasswordToModify; // add interaction handler too if (gImpl) diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 2b34d5fd5b46..ac0de0cc89a5 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -131,6 +131,7 @@ #include #include "printhelper.hxx" #include +#include #include #include #include @@ -3046,13 +3047,13 @@ void SfxBaseModel::impl_store( const OUString& sURL throw frame::IllegalArgumentIOException(); bool bSaved = false; +::comphelper::SequenceAsHashMap aArgHash(seqArguments); if ( !bSaveTo && m_pData->m_pObjectShell.is() && !sURL.isEmpty() && !sURL.startsWith( "private:stream" ) && ::utl::UCBContentHelper::EqualURLs( getLocation(), sURL ) ) { // this is the same file URL as the current document location, try to use storeOwn if possible -::comphelper::SequenceAsHashMap aArgHash( seqArguments ); static constexpr OUStringLiteral aFilterString( u"FilterName" ); const OUString aFilterName( aArgHash.getUnpackedValueOrDefault( aFilterString, OUString() ) ); if ( !aFilterName.isEmpty() ) @@ -3122,11 +3123,26 @@ void SfxBaseModel::impl_store( const OUString& sURL SfxGetpApp()->NotifyEvent( SfxEventHint( bSaveTo ? SfxEventHintId::SaveToDoc : SfxEventHintId::SaveAsDoc, GlobalEventConfig::GetEventName( bSaveTo ? GlobalEventId::SAVETODOC : GlobalEventId::SAVEASDOC ), m_pData->m_pObjectShell.get() ) ); +const OUString aFilterName(aArgHash.getUnpackedValueOrDefault("FilterName", OUString())); +OUString aPassword, aPasswordToModify; +if (!aArgHash.getUnpackedValueOrDefault("EncryptionData", Sequence()) + .hasElements()) +aPassword = aArgHash.getUnpackedValueOrDefault("Password", OUString()); +if (!aArgHash.getUnpackedValueOrDefault("ModifyPasswordInfo", Sequence()) + .hasElements() +&& aArgHash.getUnpackedValueOrDefault("ModifyPasswordInfo", static_cast(0)) == 0) +aPasswordToModify = aArgHash.getUnpackedValueOrDefault("PasswordToModify", OUString()); +aArgHash.erase("PasswordToModify"); + std::optional pItemSet(SfxGetpApp()->GetPool()); pItemSet->Put(SfxStringItem(SID_FILE_NAME, sURL)); if ( bSaveTo ) pItemSet->Put(SfxBoolItem(SID_SAVETO, true)); +if (!aFilterName.isEmpty() && (!aPassword.isEmpty() || !aPasswor
[Libreoffice-commits] core.git: Branch 'libreoffice-7-6' - svx/uiconfig
svx/uiconfig/ui/themecoloreditdialog.ui | 12 1 file changed, 12 insertions(+) New commits: commit 6adc50c5848e2cd7f8b2f31d841485ff4447c930 Author: Caolán McNamara AuthorDate: Thu Jul 27 11:56:44 2023 +0100 Commit: Michael Stahl CommitDate: Fri Jul 28 10:30:45 2023 +0200 gtk: silence gtk_label_set_label: assertion 'GTK_IS_LABEL (label)' failed Change-Id: I7c6a4add9fe11ed123ce81302998ad246538c7fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154959 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/svx/uiconfig/ui/themecoloreditdialog.ui b/svx/uiconfig/ui/themecoloreditdialog.ui index 51e0be981ab6..bda8538ea082 100644 --- a/svx/uiconfig/ui/themecoloreditdialog.ui +++ b/svx/uiconfig/ui/themecoloreditdialog.ui @@ -149,6 +149,7 @@ False 0 True + @@ -168,6 +169,7 @@ False 0 True + @@ -187,6 +189,7 @@ False 0 True + @@ -274,6 +277,7 @@ False 0 True + @@ -327,6 +331,7 @@ False 0 True + @@ -346,6 +351,7 @@ False 0 True + @@ -433,6 +439,7 @@ False 0 True + @@ -452,6 +459,7 @@ False 0 True + @@ -471,6 +479,7 @@ False 0 True + @@ -490,6 +499,7 @@ False 0 True + @@ -543,6 +553,7 @@ False 0 True + @@ -562,6 +573,7 @@ False 0 True +
[Libreoffice-commits] core.git: extensions/source sw/qa
extensions/source/abpilot/fieldmappingimpl.cxx |1 - sw/qa/api/SwXAutoTextContainer.cxx |3 --- sw/qa/api/SwXBookmark.cxx |2 -- sw/qa/api/SwXChapterNumbering.cxx |2 -- 4 files changed, 8 deletions(-) New commits: commit c37e50f5f2be3acff1ed32f1a1bf18d0ed7d6bdf Author: Venetia Furtado AuthorDate: Thu Jul 27 14:13:27 2023 -0600 Commit: Gabor Kelemen CommitDate: Fri Jul 28 10:54:18 2023 +0200 tdf#146619 Remove unused #includes from C/C++ files Change-Id: I5746cf045fc7d3191781c2c31631db39ee81bb7d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155002 Tested-by: Jenkins Reviewed-by: Gabor Kelemen diff --git a/extensions/source/abpilot/fieldmappingimpl.cxx b/extensions/source/abpilot/fieldmappingimpl.cxx index 0b747ecb89ae..35314045e918 100644 --- a/extensions/source/abpilot/fieldmappingimpl.cxx +++ b/extensions/source/abpilot/fieldmappingimpl.cxx @@ -30,7 +30,6 @@ #include #include #include -#include #include diff --git a/sw/qa/api/SwXAutoTextContainer.cxx b/sw/qa/api/SwXAutoTextContainer.cxx index 838aa5e2adbe..7651c4360e9a 100644 --- a/sw/qa/api/SwXAutoTextContainer.cxx +++ b/sw/qa/api/SwXAutoTextContainer.cxx @@ -14,9 +14,6 @@ #include -#include - -#include #include #include diff --git a/sw/qa/api/SwXBookmark.cxx b/sw/qa/api/SwXBookmark.cxx index 0d916cfc01de..185e0b53f1db 100644 --- a/sw/qa/api/SwXBookmark.cxx +++ b/sw/qa/api/SwXBookmark.cxx @@ -20,8 +20,6 @@ #include #include -#include - using namespace css; using namespace css::uno; diff --git a/sw/qa/api/SwXChapterNumbering.cxx b/sw/qa/api/SwXChapterNumbering.cxx index b8985e0ec92b..30dc352535c5 100644 --- a/sw/qa/api/SwXChapterNumbering.cxx +++ b/sw/qa/api/SwXChapterNumbering.cxx @@ -14,8 +14,6 @@ #include -#include - #include #include #include
[Libreoffice-commits] core.git: sc/source
sc/source/core/tool/interpr4.cxx | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) New commits: commit 01f4c0a25e4749875e27c63bfb824df6c4687535 Author: Caolán McNamara AuthorDate: Thu Jul 27 14:31:32 2023 +0100 Commit: Caolán McNamara CommitDate: Fri Jul 28 13:19:31 2023 +0200 crashtesting: std::bad_alloc on load of forum-mso-en4-123509.xlsx this appeared in crashtesting with: commit d15c4caabaa21e0efe3a08ffbe145390e802bab9 Date: Tue Sep 20 08:14:41 2022 -0400 tdf#123026 xlsx import: recalc optimal row height on import rut existed as a caught exception during load before that. Change-Id: I90405a7acb84c95bac350808b20482e5069e2fcf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154990 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx index 97c3d06cdf49..95596b0ed14d 100644 --- a/sc/source/core/tool/interpr4.cxx +++ b/sc/source/core/tool/interpr4.cxx @@ -1607,7 +1607,16 @@ bool ScInterpreter::ConvertMatrixParameters() xNew = (*aMapIter).second; else { -auto pJumpMat = std::make_shared( pCur->GetOpCode(), nJumpCols, nJumpRows); +std::shared_ptr pJumpMat; +try +{ +pJumpMat = std::make_shared( pCur->GetOpCode(), nJumpCols, nJumpRows); +} +catch (const std::bad_alloc&) +{ +SAL_WARN("sc.core", "std::bad_alloc in ScJumpMatrix ctor with " << nJumpCols << " columns and " << nJumpRows << " rows"); +return false; +} pJumpMat->SetAllJumps( 1.0, nStart, nNext, nStop); // pop parameters and store in ScJumpMatrix, push in JumpMatrix() ScTokenVec aParams(nParams);
[Libreoffice-commits] core.git: svx/uiconfig
svx/uiconfig/ui/themecoloreditdialog.ui |1 + svx/uiconfig/ui/themedialog.ui |1 + 2 files changed, 2 insertions(+) New commits: commit 5f00f2365cdc62e6b0db4aa9e8f54d9ed859ce0a Author: Caolán McNamara AuthorDate: Thu Jul 27 12:26:17 2023 +0100 Commit: Caolán McNamara CommitDate: Fri Jul 28 14:14:00 2023 +0200 make the themeeditdialog and themedialog ui modal doesn't affect that they are run async Change-Id: I7336e64258f5042ee80acb7295b1ed7370be54b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154992 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/svx/uiconfig/ui/themecoloreditdialog.ui b/svx/uiconfig/ui/themecoloreditdialog.ui index fc95efc98270..96276093a75a 100644 --- a/svx/uiconfig/ui/themecoloreditdialog.ui +++ b/svx/uiconfig/ui/themecoloreditdialog.ui @@ -10,6 +10,7 @@ True 6 Theme Color Edit +True dialog diff --git a/svx/uiconfig/ui/themedialog.ui b/svx/uiconfig/ui/themedialog.ui index b4f4d9e7241b..20716a8b4d48 100644 --- a/svx/uiconfig/ui/themedialog.ui +++ b/svx/uiconfig/ui/themedialog.ui @@ -8,6 +8,7 @@ True 6 Theme +True dialog
Pierre Vacher license statement
All of my past & future contributions to LibreOffice may be licensed under the MPLv2/LGPLv3+ dual license. Pierre Vacher
[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-4' - configure.ac
configure.ac |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit dbb6992156773d0be0ea59b3832516f5f16c1f0c Author: Thorsten Behrens AuthorDate: Fri Jul 28 15:13:08 2023 +0200 Commit: Thorsten Behrens CommitDate: Fri Jul 28 15:13:08 2023 +0200 Bump version to 6.4.0.20 Change-Id: Id3648daeb6ac39b5995629a9ad4aee8ef0dd0857 diff --git a/configure.ac b/configure.ac index 23cfdfc91927..ec3bdb6e3a19 100644 --- a/configure.ac +++ b/configure.ac @@ -9,7 +9,7 @@ dnl in order to create a configure script. # several non-alphanumeric characters, those are split off and used only for the # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no idea. -AC_INIT([CIB Office],[6.4.0.19],[],[],[https://www.cib.de/office/]) +AC_INIT([CIB Office],[6.4.0.20],[],[],[https://www.cib.de/office/]) dnl libnumbertext needs autoconf 2.68, but that can pick up autoconf268 just fine if it is installed dnl whereas aclocal (as run by autogen.sh) insists on using autoconf and fails hard
[Libreoffice-commits] core.git: sw/source
sw/source/core/layout/wsfrm.cxx | 27 +-- 1 file changed, 21 insertions(+), 6 deletions(-) New commits: commit 2bf98b495cf187c80ab105f30b51da8f65561e35 Author: Michael Stahl AuthorDate: Fri Jul 28 13:09:41 2023 +0200 Commit: Michael Stahl CommitDate: Fri Jul 28 15:59:59 2023 +0200 sw: layout: invalidate row after fixed-height row too In SwLayoutFrame::GrowFrame(), invalidate the position of not only the next frame, but continue to invalidate until there is a frame with a non-fixed height. The idea with invalidating only the next frame is that the next frame will then be formatted and this will then invalidate the position of the frame after that. But with a table row with fixed height, this doesn't work: SwLayoutFrame::GrowFrame() returns without doing anything, not invalidating next frame; the next-next row is never repositioned and overlaps the next row. (this reproduces as a user-visible problem only when using the API to export to PDF, and only in a 6.3-based downstream branch, because in SwXTextDocument::getRendererCount() view settings are applied and this will differ on the IsParagraph() setting and in master this causes all pages to be invalidated and another run of the layout fixes the problem; also on the downstream branch backports of commit 383032c50a3e3354f04200ce984a47ab9d2c5c67 "tdf#123583 use TaskStopwatch for Writer Idle loop" and commit c605283ad6785dea762feab5fdffd9d27e75c292 "sw: fix spurious layout invalidation from ~SwCallLink()" are required to reproduce.) Change-Id: Ic8a0aa23c496eeab2f3fd87bff7212c8d8ca1cfe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155017 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx index 2834b09f70a6..caaed34e8b70 100644 --- a/sw/source/core/layout/wsfrm.cxx +++ b/sw/source/core/layout/wsfrm.cxx @@ -2778,13 +2778,28 @@ SwTwips SwLayoutFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo ) SwPageFrame *pPage = FindPageFrame(); if ( GetNext() ) { -GetNext()->InvalidatePos_(); -if (GetNext()->IsRowFrame()) -{ // also invalidate first cell - static_cast(GetNext())->Lower()->InvalidatePos_(); +SwFrame * pNext = GetNext(); +do +{ +pNext->InvalidatePos_(); +if (pNext->IsRowFrame()) +{ // also invalidate first cell + static_cast(pNext)->Lower()->InvalidatePos_(); +} +else if (pNext->IsContentFrame()) +{ +pNext->InvalidatePage(pPage); +} +if (pNext->HasFixSize()) +{ // continue to invalidate because growing pNext won't do it! +pNext = pNext->GetNext(); +} +else +{ +break; +} } -if ( GetNext()->IsContentFrame() ) -GetNext()->InvalidatePage( pPage ); +while (pNext); } if ( !IsPageBodyFrame() ) {
[Libreoffice-commits] core.git: svx/uiconfig
svx/uiconfig/ui/medialine.ui | 133 + svx/uiconfig/ui/mediawindow.ui | 119 +++- 2 files changed, 133 insertions(+), 119 deletions(-) New commits: commit 1fb3584d61441d864c14ff3376d2fa485edf400b Author: Heiko Tietze AuthorDate: Fri Jul 28 12:39:22 2023 +0200 Commit: Heiko Tietze CommitDate: Fri Jul 28 16:03:25 2023 +0200 Resolves tdf#156504 - Strings in media player made translatable Change-Id: I2798d0becf7075bd0f484b4e96b44fa29c551415 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155013 Tested-by: Jenkins Reviewed-by: Heiko Tietze diff --git a/svx/uiconfig/ui/medialine.ui b/svx/uiconfig/ui/medialine.ui index 2e86fe853065..cfbef49e1e41 100644 --- a/svx/uiconfig/ui/medialine.ui +++ b/svx/uiconfig/ui/medialine.ui @@ -1,40 +1,41 @@ - + 100 -1 -10 +1 +10 100 -1 -10 +1 +10 True -False +False True -False +False True 12 True -True +True center -icons -False +icons +False -True -Open -True -avmedia/res/av02048.png +False +True +Open +True +avmedia/res/av02048.png False @@ -43,10 +44,11 @@ -True -Apply -True -avmedia/res/av02053.png +False +True +Apply +True +avmedia/res/av02053.png False @@ -55,8 +57,8 @@ -False -True +False +True False @@ -66,9 +68,10 @@ True -Play -True -avmedia/res/av02049.png +False +Play +True +avmedia/res/av02049.png False @@ -78,9 +81,10 @@ True -Pause -True -avmedia/res/av02050.png +False +Pause +True +avmedia/res/av02050.png False @@ -90,9 +94,10 @@ True -Stop -True -avmedia/res/av02051.png +False +Stop +True +avmedia/res/av02051.png False @@ -102,7 +107,7 @@ True -False +False False @@ -112,9 +117,10 @@ True -Repeat -True -avmedia/res/av02052.png +False +Repeat +True +avmedia/res/av02052.png False @@ -131,26 +137,26 @@ True -True -icons -False +True +icons +False True -False +False True -False +False -128 +128 True -True +True True adjustment1 2 -False +False False @@ -161,10 +167,10 @@ True -True +True False -True 0.5 +True False @@ -190,15 +196,16 @@ True -True -icons -False +True +icons +False
[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-4' - scripting/source
scripting/source/pyprov/mailmerge.py | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) New commits: commit 4a5c329e22b7ad52a14ca39028e4a645c1bbbe40 Author: Caolán McNamara AuthorDate: Fri Jul 28 12:13:41 2023 +0100 Commit: Thorsten Behrens CommitDate: Fri Jul 28 16:03:34 2023 +0200 follow python recommendation and pass SSL contexts i.e. https://docs.python.org/3/library/ssl.html#security-considerations Change-Id: I67a0f9e1c25abc6644412b014f30933a7e681da2 diff --git a/scripting/source/pyprov/mailmerge.py b/scripting/source/pyprov/mailmerge.py index 079744007816..9b0e35ccdf42 100644 --- a/scripting/source/pyprov/mailmerge.py +++ b/scripting/source/pyprov/mailmerge.py @@ -49,7 +49,7 @@ from email.utils import formatdate from email.utils import parseaddr from socket import _GLOBAL_DEFAULT_TIMEOUT -import sys, smtplib, imaplib, poplib +import sys, ssl, smtplib, imaplib, poplib dbg = False # pythonloader looks for a static g_ImplementationHelper variable @@ -105,7 +105,7 @@ class PyMailSMTPService(unohelper.Base, XSmtpService): if dbg: print("Timeout: " + str(tout), file=dbgout) if port == 465: - self.server = smtplib.SMTP_SSL(server, port,timeout=tout) + self.server = smtplib.SMTP_SSL(server, port, timeout=tout, context=ssl.create_default_context()) else: self.server = smtplib.SMTP(server, port,timeout=tout) @@ -121,7 +121,7 @@ class PyMailSMTPService(unohelper.Base, XSmtpService): print("ConnectionType: " + connectiontype, file=dbgout) if connectiontype.upper() == 'SSL' and port != 465: self.server.ehlo() - self.server.starttls() + self.server.starttls(context=ssl.create_default_context()) self.server.ehlo() user = xAuthenticator.getUserName() @@ -325,7 +325,7 @@ class PyMailIMAPService(unohelper.Base, XMailService): print(connectiontype, file=dbgout) print("BEFORE", file=dbgout) if connectiontype.upper() == 'SSL': - self.server = imaplib.IMAP4_SSL(server, port) + self.server = imaplib.IMAP4_SSL(server, port, ssl_context=ssl.create_default_context()) else: self.server = imaplib.IMAP4(server, port) print("AFTER", file=dbgout) @@ -397,7 +397,7 @@ class PyMailPOP3Service(unohelper.Base, XMailService): print(connectiontype, file=dbgout) print("BEFORE", file=dbgout) if connectiontype.upper() == 'SSL': - self.server = poplib.POP3_SSL(server, port) + self.server = poplib.POP3_SSL(server, port, context=ssl.create_default_context()) else: tout = xConnectionContext.getValueByName("Timeout") if dbg:
[Libreoffice-commits] core.git: Branch 'feature/cib_contract57d' - 3 commits - desktop/scripts solenv/gdb sw/source
desktop/scripts/soffice.sh |4 ++-- solenv/gdb/libreoffice/sw.py|6 +- sw/source/core/layout/wsfrm.cxx | 27 +-- 3 files changed, 28 insertions(+), 9 deletions(-) New commits: commit f027559dde18fe3f524c5f22c255ae9783b51e65 Author: Michael Stahl AuthorDate: Fri Jul 28 13:09:41 2023 +0200 Commit: Michael Stahl CommitDate: Fri Jul 28 16:07:57 2023 +0200 sw: layout: invalidate row after fixed-height row too In SwLayoutFrame::GrowFrame(), invalidate the position of not only the next frame, but continue to invalidate until there is a frame with a non-fixed height. The idea with invalidating only the next frame is that the next frame will then be formatted and this will then invalidate the position of the frame after that. But with a table row with fixed height, this doesn't work: SwLayoutFrame::GrowFrame() returns without doing anything, not invalidating next frame; the next-next row is never repositioned and overlaps the next row. (this reproduces as a user-visible problem only when using the API to export to PDF, and only in a 6.3-based downstream branch, because in SwXTextDocument::getRendererCount() view settings are applied and this will differ on the IsParagraph() setting and in master this causes all pages to be invalidated and another run of the layout fixes the problem; also on the downstream branch backports of commit 383032c50a3e3354f04200ce984a47ab9d2c5c67 "tdf#123583 use TaskStopwatch for Writer Idle loop" and commit c605283ad6785dea762feab5fdffd9d27e75c292 "sw: fix spurious layout invalidation from ~SwCallLink()" are required to reproduce.) Change-Id: Ic8a0aa23c496eeab2f3fd87bff7212c8d8ca1cfe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155017 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 2bf98b495cf187c80ab105f30b51da8f65561e35) diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx index b7e5e3149403..b5101a567df7 100644 --- a/sw/source/core/layout/wsfrm.cxx +++ b/sw/source/core/layout/wsfrm.cxx @@ -2735,13 +2735,28 @@ SwTwips SwLayoutFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo ) SwPageFrame *pPage = FindPageFrame(); if ( GetNext() ) { -GetNext()->InvalidatePos_(); -if (GetNext()->IsRowFrame()) -{ // also invalidate first cell - static_cast(GetNext())->Lower()->InvalidatePos_(); +SwFrame * pNext = GetNext(); +do +{ +pNext->InvalidatePos_(); +if (pNext->IsRowFrame()) +{ // also invalidate first cell + static_cast(pNext)->Lower()->InvalidatePos_(); +} +else if (pNext->IsContentFrame()) +{ +pNext->InvalidatePage(pPage); +} +if (pNext->HasFixSize()) +{ // continue to invalidate because growing pNext won't do it! +pNext = pNext->GetNext(); +} +else +{ +break; +} } -if ( GetNext()->IsContentFrame() ) -GetNext()->InvalidatePage( pPage ); +while (pNext); } if ( !IsPageBodyFrame() ) { commit afbd0e14ba052f6c25dd9d0c496d2fb93229 Author: Michael Stahl AuthorDate: Thu Dec 2 11:57:40 2021 +0100 Commit: Michael Stahl CommitDate: Fri Jul 28 16:07:57 2023 +0200 gdb: BigPtrArrayPrinter gets confused by libstdc++ std::unique_ptr It looks like this in libstdc++: = { m_ppInf = { _M_t = { >> = { _M_t = { >> = { >> = { , true>> = { _M_head_impl = {} }, }, > = { _M_head_impl = 0x567fd20 }, }, } }, } }, Note there are 2 _M_head_impl members, and somehow gdb 11.1-2.fc34 picks the wrong one. A manual cast to std::_Head_base<0, BlockInfo**, false> seems to help. Change-Id: I1332c2fc6eb2661d417fd92a73aed977bbb1dcea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126220 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit c9267ca4fa7fa94a1bf79320bec54428a6ad4804) diff --git a/solenv/gdb/libreoffice/sw.py b/solenv/gdb/libreoffice/sw.py index e170709fb79c..7a5ce193684b 100644 --- a/solenv/gdb/libreoffice/sw.py +++ b/solenv/gdb/libreoffice/sw.py @@ -8,6 +8,7 @@ # import six +import gdb from libreoffice.util import
[Libreoffice-commits] core.git: vcl/qa
vcl/qa/cppunit/a11y/atspi2/atspi2text.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 92bc3c8c1968d177d7db365b7062e4750d451ff6 Author: Andrea Gelmini AuthorDate: Fri Jul 28 16:42:24 2023 +0200 Commit: Julien Nabet CommitDate: Fri Jul 28 17:03:59 2023 +0200 Fix typo Change-Id: Ia8d0859088614c29ae358fed46d0c750d5a54e81 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155023 Tested-by: Julien Nabet Reviewed-by: Julien Nabet diff --git a/vcl/qa/cppunit/a11y/atspi2/atspi2text.cxx b/vcl/qa/cppunit/a11y/atspi2/atspi2text.cxx index 68ac59e6bf62..eb0e2aa7e5d8 100644 --- a/vcl/qa/cppunit/a11y/atspi2/atspi2text.cxx +++ b/vcl/qa/cppunit/a11y/atspi2/atspi2text.cxx @@ -831,7 +831,7 @@ void Atspi2TestTree::compareTextObjects( CPPUNIT_ASSERT_EQUAL_MESSAGE(offsetMsg.getStr(), loRect.Height, sal_Int32(atspiRect.height)); /* for some reason getCharacterBounds() might return negative widths in some cases - * (including a space at the end of a right-justified line), and ATK will then then adjust + * (including a space at the end of a right-justified line), and ATK will then adjust * the X and width values to positive to workaround RTL issues (see * https://bugzilla.gnome.org/show_bug.cgi?id=102954), so we work around that */ if (loRect.Width < 0)
[Libreoffice-commits] core.git: reportdesign/source
reportdesign/source/ui/report/ScrollHelper.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 514dfe603797351223b1c570a92687399cca7e06 Author: Andrea Gelmini AuthorDate: Fri Jul 28 16:41:32 2023 +0200 Commit: Julien Nabet CommitDate: Fri Jul 28 17:04:19 2023 +0200 Fix typo Change-Id: I56877d764075bc267708e380a5972fe08798e8e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155022 Tested-by: Julien Nabet Reviewed-by: Julien Nabet diff --git a/reportdesign/source/ui/report/ScrollHelper.cxx b/reportdesign/source/ui/report/ScrollHelper.cxx index 3445abe96e40..491710e94ba8 100644 --- a/reportdesign/source/ui/report/ScrollHelper.cxx +++ b/reportdesign/source/ui/report/ScrollHelper.cxx @@ -119,7 +119,7 @@ Size OScrollWindowHelper::ResizeScrollBars() const tools::Long nScrSize = GetSettings().GetStyleSettings().GetScrollBarSize(); bool bVVisible = false; // by default no vertical-ScrollBar bool bHVisible = false; // by default no horizontal-ScrollBar -bool bChanged; // determines if a visiblility was changed +bool bChanged; // determines if a visibility was changed do { bChanged = false;
[Libreoffice-commits] core.git: sw/source
sw/source/core/text/porlay.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit e326acc1ec13b90672e86811013850f26f4d96b6 Author: Andrea Gelmini AuthorDate: Fri Jul 28 16:41:12 2023 +0200 Commit: Julien Nabet CommitDate: Fri Jul 28 17:04:35 2023 +0200 Fix typo Change-Id: Icb1c8ceaad806a53dbad4feb8ab1ab31c8d23242 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155021 Tested-by: Julien Nabet Reviewed-by: Julien Nabet diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx index 764ee1a4087e..7d406a86df0c 100644 --- a/sw/source/core/text/porlay.cxx +++ b/sw/source/core/text/porlay.cxx @@ -1441,7 +1441,7 @@ void SwScriptInfo::InitScriptInfo(const SwTextNode& rNode, // special case for dotted circle since it can be used with complex // before a mark, so we want it associated with the mark's script -// tdf#112594: another soecial case for NNBSP followed by a Mongolian +// tdf#112594: another special case for NNBSP followed by a Mongolian // character, since NNBSP has special uses in Mongolian (tdf#112594) auto nPos = sal_Int32(nChg); auto nPrevPos = nPos;
[Libreoffice-commits] core.git: vcl/qa
vcl/qa/cppunit/a11y/atspi2/atspiwrapper.hxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit bf704afbb7c9ff843d66fec2eddbb00c43a9ab42 Author: Andrea Gelmini AuthorDate: Fri Jul 28 16:39:45 2023 +0200 Commit: Julien Nabet CommitDate: Fri Jul 28 17:05:20 2023 +0200 Fix typo Change-Id: I1973ac5efd12b2071a92a97d8d669f1e46b9c594 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155020 Tested-by: Julien Nabet Reviewed-by: Julien Nabet diff --git a/vcl/qa/cppunit/a11y/atspi2/atspiwrapper.hxx b/vcl/qa/cppunit/a11y/atspi2/atspiwrapper.hxx index 209495e826ae..91ddd9dac217 100644 --- a/vcl/qa/cppunit/a11y/atspi2/atspiwrapper.hxx +++ b/vcl/qa/cppunit/a11y/atspi2/atspiwrapper.hxx @@ -604,7 +604,7 @@ public: /** Wrapper for AtspiRange * * This is not actually required, but helps make this more C++-y (by allowing TextRange to - * inherit it) and more LibreOffice-y (by having cameCase names) */ + * inherit it) and more LibreOffice-y (by having camelCase names) */ struct Range { int startOffset;
[Libreoffice-commits] core.git: sc/source
sc/source/ui/miscdlgs/linkarea.cxx |8 1 file changed, 8 insertions(+) New commits: commit 2f2cd7558e1d01f9670436412d62d03f28bab2c1 Author: Andreas Heinisch AuthorDate: Fri Jul 28 09:37:47 2023 +0200 Commit: Andreas Heinisch CommitDate: Fri Jul 28 18:37:46 2023 +0200 tdf#142600 - External links dialog: list database ranges Regression from commit 462f9d1f589a7afd66d3fc61925467d3b68e5b31 where the database ranges were dropped. Change-Id: Ic0e453fc6fe62849d72b6acf88ed7ebd3c47775b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155009 Reviewed-by: Eike Rathke Tested-by: Jenkins diff --git a/sc/source/ui/miscdlgs/linkarea.cxx b/sc/source/ui/miscdlgs/linkarea.cxx index 09cfe6c3c285..6b1716407561 100644 --- a/sc/source/ui/miscdlgs/linkarea.cxx +++ b/sc/source/ui/miscdlgs/linkarea.cxx @@ -29,6 +29,7 @@ #include #include +#include #include #include #include @@ -259,6 +260,13 @@ void ScLinkedAreaDlg::UpdateSourceRanges() m_xLbRanges->append_text(pRangeData->GetName()); } } +// tdf#142600 - list database ranges +if (const auto pDBs = m_pSourceShell->GetDocument().GetDBCollection()) +{ +const auto& rNamedDBs = pDBs->getNamedDBs(); +for (const auto& rNamedDB : rNamedDBs) +m_xLbRanges->append_text(rNamedDB->GetName()); +} } m_xLbRanges->thaw();
[Libreoffice-commits] core.git: sw/source
sw/source/core/unocore/unoobj2.cxx | 42 +++-- 1 file changed, 31 insertions(+), 11 deletions(-) New commits: commit 0f39ecfed57f3f32d4f5cadf50b7dd9de77f8d7e Author: Michael Stahl AuthorDate: Fri Jul 28 17:33:20 2023 +0200 Commit: Michael Stahl CommitDate: Fri Jul 28 19:36:20 2023 +0200 tdf#149555 sw: convert RANGE_IS_SECTION SwXTextRange if possible The writerfilter import got an exception in SectionPropertyMap::CloseSectionGroup() because XTextRangeToSwPaM() can't handle RANGE_IS_SECTION SwXTextRange. (regression from commit 7ab349296dac79dad3fec09f60348efcbb9ea17e) Change-Id: I38b37fdec64f4699c0fa1a090c72a8676ff386a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155026 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index 1b02cb5a0b27..01682ef48587 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -1049,20 +1049,40 @@ void SAL_CALL SwXTextRange::setString(const OUString& rString) bool SwXTextRange::GetPositions(SwPaM& rToFill, ::sw::TextRangeMode const eMode) const { -if (RANGE_IS_SECTION == m_pImpl->m_eRangePosition -&& eMode == ::sw::TextRangeMode::AllowNonTextNode) +if (RANGE_IS_SECTION == m_pImpl->m_eRangePosition) { if (auto const pSectFormat = static_cast(m_pImpl->m_pTableOrSectionFormat)) { -SwNodeIndex const*const pSectionNode(pSectFormat->GetContent().GetContentIdx()); -assert(pSectionNode); -assert(pSectionNode->GetNodes().IsDocNodes()); -rToFill.GetPoint()->Assign( pSectionNode->GetNode(), SwNodeOffset(1) ); -rToFill.SetMark(); -rToFill.GetMark()->Assign( *pSectionNode->GetNode().EndOfSectionNode(), SwNodeOffset(-1) ); -if (const SwContentNode* pCNd = rToFill.GetMark()->GetContentNode()) -rToFill.GetMark()->AssignEndIndex(*pCNd); -return true; +if (eMode == ::sw::TextRangeMode::AllowNonTextNode) +{ +SwNodeIndex const*const pSectionNode(pSectFormat->GetContent().GetContentIdx()); +assert(pSectionNode); +assert(pSectionNode->GetNodes().IsDocNodes()); +rToFill.GetPoint()->Assign( pSectionNode->GetNode(), SwNodeOffset(1) ); +rToFill.SetMark(); +rToFill.GetMark()->Assign( *pSectionNode->GetNode().EndOfSectionNode(), SwNodeOffset(-1) ); +if (const SwContentNode* pCNd = rToFill.GetMark()->GetContentNode()) +rToFill.GetMark()->AssignEndIndex(*pCNd); +return true; +} +else +{ +SwPaM aPaM(*pSectFormat->GetContent().GetContentIdx()); +aPaM.Move(fnMoveForward, GoInContent); +assert(aPaM.GetPoint()->GetNode() < *pSectFormat->GetContent().GetContentIdx()->GetNode().EndOfSectionNode()); +aPaM.SetMark(); +*aPaM.GetPoint() = SwPosition(*pSectFormat->GetContent().GetContentIdx()->GetNode().EndOfSectionNode()); +aPaM.Move(fnMoveBackward, GoInContent); +assert(*pSectFormat->GetContent().GetContentIdx() < aPaM.GetPoint()->GetNode()); +// tdf#149555 if there is no table involved, only nested +// sections, then PaM is valid +if (aPaM.GetPoint()->GetNode().FindTableNode() +== aPaM.GetMark()->GetNode().FindTableNode()) +{ +rToFill = aPaM; +return true; +} +} } } ::sw::mark::IMark const * const pBkmk = m_pImpl->GetBookmark();
[Libreoffice-commits] core.git: sw/qa sw/source
sw/qa/extras/htmlexport/htmlexport.cxx | 46 ++ sw/source/core/doc/doclay.cxx | 25 ++- sw/source/filter/basflt/shellio.cxx| 14 ++-- sw/source/filter/html/htmlplug.cxx | 91 ++-- sw/source/filter/html/wrthtml.cxx | 104 ++--- sw/source/filter/html/wrthtml.hxx |2 sw/source/uibase/app/docsh.cxx | 14 +++- 7 files changed, 193 insertions(+), 103 deletions(-) New commits: commit 2f9c1990a85b0e867400f5952095704e178680ad Author: Mike Kaganski AuthorDate: Fri Jul 28 13:06:08 2023 +0300 Commit: Mike Kaganski CommitDate: Fri Jul 28 19:55:06 2023 +0200 ReqIF: allow to output a single selected OLE object To do that, "SelectionOnly" boolean propertyvalue is supported in the store arguments. Change-Id: I265e802256a9a678779bbd021dde9b0c87ca08b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155012 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx index ebeab5963eda..7571e3b3535e 100644 --- a/sw/qa/extras/htmlexport/htmlexport.cxx +++ b/sw/qa/extras/htmlexport/htmlexport.cxx @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -2725,6 +2726,51 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testReqIF_FrameTextAsObjectAltText) "Some text in frame & "); } +CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testSingleOleExport) +{ +// Given a document containing an embedded OLE object: +createSwDoc("ole2.odt"); + +// Create a selection for that object: +auto xDrawPageSupplier(mxComponent.queryThrow()); +auto xDrawPage(xDrawPageSupplier->getDrawPage()); +auto xModel(mxComponent.queryThrow()); +auto xController(xModel->getCurrentController().queryThrow()); +xController->select(xDrawPage->getByIndex(0)); + +// Store only the selection +auto xStorable(mxComponent.queryThrow()); +css::uno::Sequence aStoreProperties = { +comphelper::makePropertyValue("FilterName", OUString("HTML (StarWriter)")), +comphelper::makePropertyValue("FilterOptions", OUString("xhtmlns=reqif-xhtml")), +comphelper::makePropertyValue("RTFOLEMimeType", OUString("text/rtf")), +comphelper::makePropertyValue("SelectionOnly", true), +}; +xStorable->storeToURL(maTempFile.GetURL(), aStoreProperties); + +SvMemoryStream aStream; +WrapReqifFromTempFile(aStream); +xmlDocUniquePtr pXmlDoc = parseXmlStream(&aStream); + +// The root element must be reqif-xhtml:object +assertXPath(pXmlDoc, "/reqif-xhtml:html/reqif-xhtml:object", "type", "text/rtf"); +// It has no children +assertXPathChildren(pXmlDoc, "/reqif-xhtml:html/reqif-xhtml:object", 0); +// And the content is empty +assertXPathContent(pXmlDoc, "/reqif-xhtml:html/reqif-xhtml:object", ""); + +OUString aRtfData = getXPath(pXmlDoc, "/reqif-xhtml:html/reqif-xhtml:object", "data"); +INetURLObject aUrl(maTempFile.GetURL()); +aUrl.setName(aRtfData); +SvMemoryStream aRtf; + HtmlExportTest::wrapRtfFragment(aUrl.GetMainURL(INetURLObject::DecodeMechanism::NONE), aRtf); +tools::SvRef xReader(new TestReqIfRtfReader(aRtf)); +// The RTF OLE exports correctly +CPPUNIT_ASSERT(xReader->CallParser() != SvParserState::Error); +CPPUNIT_ASSERT_EQUAL(tools::Long(9358), xReader->GetObjw()); +CPPUNIT_ASSERT_EQUAL(tools::Long(450), xReader->GetObjh()); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx index 48e77a284d77..b6398ee8ce7f 100644 --- a/sw/source/core/doc/doclay.cxx +++ b/sw/source/core/doc/doclay.cxx @@ -499,6 +499,13 @@ SwPosFlyFrames SwDoc::GetAllFlyFormats( const SwPaM* pCmpRange, bool bDrawAlso, bool bAsCharAlso ) const { SwPosFlyFrames aRetval; +const SwStartNode* pDirectFly = nullptr; +if (pCmpRange && *pCmpRange->GetPoint() == *pCmpRange->GetMark() +&& (pCmpRange->GetPoint()->GetNode().IsOLENode() +|| pCmpRange->GetPoint()->GetNode().IsGrfNode())) +{ +pDirectFly = pCmpRange->GetPoint()->GetNode().FindFlyStartNode(); +} // collect all anchored somehow to paragraphs for(sw::SpzFrameFormat* pFly: *GetSpzFrameFormats()) @@ -509,11 +516,23 @@ SwPosFlyFrames SwDoc::GetAllFlyFormats( const SwPaM* pCmpRange, bool bDrawAlso, { const SwFormatAnchor& rAnchor = pFly->GetAnchor(); SwNode const*const pAnchorNode = rAnchor.GetAnchorNode(); -if (pAnchorNode && -((RndStdIds::FLY_AT_PARA == rAnchor.GetAnchorId()) || +if (!pAnchorNode) +continue; +if (pDirectFly) +{ +const SwFormatContent& rContent = pFly->GetContent(); +
[Libreoffice-commits] dictionaries.git: Changes to 'refs/tags/libreoffice-7.6.0.2-buildfix1'
Tag 'libreoffice-7.6.0.2-buildfix1' created by Christian Lohmaier at 2023-07-28 18:14 + Tag libreoffice-7.6.0.2-buildfix1 -BEGIN PGP SIGNATURE- iQIzBAABCAAdFiEEwoOeytlAj76VMcPp9DSh76/urqMFAmTEBW0ACgkQ9DSh76/u rqMXAw//b3NVdoDrS7S0R7yNhgYuuMCbBo9AICAZSFK5VR518kGTdJP/Og/C8lca +oox6FsP33c1ZTRERGVNk4Zqi43z/9sAbOFUTuF0A+j664nb9rCitX0rMOMih4H8 Ba7x9acFjqbsbDPSfBFBhKzTEqDcRYXRMQ3Nwpt5JlBFluXIsBbHIsS1mKI0l/pA i16s6uYR+B4IxC4Ab8wVVdq1ElgvcfwmAzftEpuvG3pobByqRx12Sd3slDpqQjfA ilCL7QrDIBVGNWfzOLgBWs1pLNI6PMqzeN1xMoF8uYEDmjqoJdpBF+qjgCnbBpEX 1nYeEQ8WgX2w+Akz8/1aSefmS+X8abDpgfqwW7m6CdAZDBOqutTPWcfA23XnVf80 LB+aDR8m3Wwi9Znve3uyl7ouR2JfNlKTGX98H6RTEUpChCq8OCkLVyAIjKPKFciN sxtK+6s6QiI+lpumgwn9Ml43NyROfiDOeuQV3wMooDAmLNF1Lxka1Ww+r2yiGTsE W+raJ8pKVKvpBQnNzODbnUkGjo6hptXJziN5mZHzUQjkJbgjFeO1Xcn8MdR+IAdY v75tPz8H0sLuSL2MCCEmMxbLs3tN71doCOI4TAhB2/HirkSSXoZHk5z87azm4VvE mblxWMLxkPTH1EyhaKc27DTAfZMXCIyrcehAgaFPhqoI8wsT/6g= =S2F3 -END PGP SIGNATURE- Changes since libreoffice-7.6.0.2: Christian Lohmaier (1): Version 7.6.0.2, tag libreoffice-7.6.0.2-buildfix1 --- 0 files changed ---
[Libreoffice-commits] help.git: Changes to 'refs/tags/libreoffice-7.6.0.2-buildfix1'
Tag 'libreoffice-7.6.0.2-buildfix1' created by Christian Lohmaier at 2023-07-28 18:14 + Tag libreoffice-7.6.0.2-buildfix1 -BEGIN PGP SIGNATURE- iQIzBAABCAAdFiEEwoOeytlAj76VMcPp9DSh76/urqMFAmTEBXIACgkQ9DSh76/u rqNZkRAAgshpVeEGgwmvr5j29JIHRsT1xYevcB25ZUnHOZTxOigab7bg9D7ptae/ tetAGDN1BbHn0gIFwNQ7D6/aOpHl7XqMurA2YlvKS0K4yyr4HhSSLoybW9zmA/Rj OTNi3GQZ10IH/nO+YcZOE8H88f42kpvYjhHZjgUinyAAiq/m2yBHdY/CMUVHXzsh llIiAGBm4/aQ4yWE9dsYCqjAst/nv1aZosjz6AoBNqVQUO8Uo36YrytuiOKqUpqM VkTxHLEkVTHhgLG/6UoaQzwIWBnxMGuA45ZP+7IkyCzg5rdajfJQwxRQOoTRZANY Ol7K8OOMvOb9GGIAqJNS7VwahQYwl97Kq3LDNKZoqchIXmOh953aLZKrHwyXqc5C 7Fx07VUAlFsywuX5XKBdDgOwN5MjFhpOTMF8wCqzbsz/KMO0TIOhfHDpd0euatDz f2jR0eW0CumtKJt9WWz7LKBiSr/iQBJXKOyBph04horjkLNU3pfscxD+umC7+B6u DH3rTlUldYlDbPNa51cSZ7skyvOh1RYdTj5aLlCFhkWpkTE1Hw1QF+4WsPn/wjdM z61krYEkUNvcuqClbFQ9YeJ9tNBk8FLYKVX7Qmsn/A/JNVoXjjLoqbRIQulvxkx0 Wsxq0ypbCNrWgzGop/Sg4Sben/mV8fNh9ilKfn0JZmRt9Zv7tLg= =v/ys -END PGP SIGNATURE- Changes since libreoffice-7.6.0.2: Christian Lohmaier (1): Version 7.6.0.2, tag libreoffice-7.6.0.2-buildfix1 --- 0 files changed ---
[Libreoffice-commits] translations.git: Changes to 'refs/tags/libreoffice-7.6.0.2-buildfix1'
Tag 'libreoffice-7.6.0.2-buildfix1' created by Christian Lohmaier at 2023-07-28 18:14 + Tag libreoffice-7.6.0.2-buildfix1 -BEGIN PGP SIGNATURE- iQIzBAABCAAdFiEEwoOeytlAj76VMcPp9DSh76/urqMFAmTEBXIACgkQ9DSh76/u rqNVow//WyWDO98OVUIC2c3JFRbO8km3UWRG7WHr7joQUDfXsUskj0hOoVpFGVqv +m1ehIkOmJq9BRkqRpSGK4+X58wJLIrPGbAEWTj+tkzo+5P8xnjqfQ4qVCEBeCj6 XqQI4gGsWXMrpY9yuLfGm+vGUrRAu1nYSd9GHt8akKb11AOp9N4QlPsUCXLQQCwk t7+pAbc96QLfHN6cSUdh59Nrw8K0Qk4HOZxE2u/+c/8Rc9WcBSBoF+I+lyrYuaCS E1VRT40mz/WdkOkbVARHK2ZxBdDfdunamCZHA42elVKEtdrFz7PnwnM/y6ZcMN6z sq7AC09WBH56MutpQt++dhKKtijBsb/wR42dPAlHVJWOoNGEiEcQVENaGqBJzJNY PrwzwLqkRNks8LJZrIhb+5BJofhIkqbQIMwah0GbNyMhASgkPDaw0IMWMT4AmNe2 uzJT1uWy1obl1m45cRAcw/Qaty1fiH/aHh/e6m1odyJ3N+w8rgCp4FgtKgWfmg/G 0aKWVNWWYoBFajFmIud2Wy7F3r9wPrtxrrZguJ06SBB100YjCQZvFLdQDrkBcwvx 0gMZQnuYovN3VeFS4Am1KXznwccYPQRXmHZRX5QrE+2uj9X0LhDYGW/DPSu4k+IC AjSZW2DPm5c6+KUWb6ng/ecxbt5suun1Utcg7zH3NRp2ntVcLpw= =qH8o -END PGP SIGNATURE- Changes since libreoffice-7.6.0.2: Christian Lohmaier (1): Version 7.6.0.2, tag libreoffice-7.6.0.2-buildfix1 --- 0 files changed ---
[Libreoffice-commits] core.git: Changes to 'refs/tags/libreoffice-7.6.0.2-buildfix1'
Tag 'libreoffice-7.6.0.2-buildfix1' created by Christian Lohmaier at 2023-07-28 18:14 + Tag libreoffice-7.6.0.2-buildfix1 -BEGIN PGP SIGNATURE- iQIzBAABCAAdFiEEwoOeytlAj76VMcPp9DSh76/urqMFAmTEBXIACgkQ9DSh76/u rqPEZQ//cYWtUz1VEoUu2os4ZH+jQTE5o4YVgM0LP1QcoHEBATew/XDCuPx2DUcW nwCKoPyt68WqH4RKHItdNuvitc9mPI/JSLEeAyBq2GTscmLWbA/Vmmo/820jIIW2 SGPzABfRJsB0SbZojg+Q1D/rura5W0+XFegtso3Xo6e7a6umHXdqPAWHOWaQ8bdF +ufLCz/s2BVnqhtjn+cYdKQJ9cRY31/GWhm5f50AXD9gcSS94FdLnmaPHEhPau1K zvUsDmzF2bS5auv0G3Gn+mqorlBJQZ5/FFlI8nyMkXn4aFmtZLDUQ3Uqd07w12KP zHNeRwIDhyX/yQPFnrcd5MG9lD4Pc/0lKlSBf6OCFv/ioet+AEPFNje6LnMpWmRT 5Q64NbtIRC+3zq95fcHugaP661ky+EkKiWtaTcu0Rz4Thm0LZh6bE4Gksna8chNL jb57CKdnqowcBrJS73tIUYYTMJkwfddkB/+wfHzqqGH4h+mokiUC9x6xLWvlXeZk I5G5OWx+I0GP8IwJcPwIdX5rPB7U/sFAwDbVA/spZgUdhSD4MTe+tfD2zsk8VBKZ xAqghvZpwIxEi1CqoQqzOM7OoqLLeYH8QwczYXtbajfnXDX20rGte/HlvdG7D8wW wSsfsAThhCqLoH1zCQYK1BQ1B9r6LRyS1m5Nl2RPP3rtnge3yYU= =z3cL -END PGP SIGNATURE- Changes since libreoffice-7.6.0.2-1: --- 0 files changed ---
[Libreoffice-commits] core.git: scripting/source
scripting/source/pyprov/mailmerge.py | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) New commits: commit e3d28846c2343072750197fcdeaf44a945ddcb61 Author: Caolán McNamara AuthorDate: Fri Jul 28 12:13:41 2023 +0100 Commit: Thorsten Behrens CommitDate: Sat Jul 29 02:30:34 2023 +0200 follow python recommendation and pass SSL contexts i.e. https://docs.python.org/3/library/ssl.html#security-considerations Change-Id: I67a0f9e1c25abc6644412b014f30933a7e681da2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155016 Tested-by: Jenkins Reviewed-by: Thorsten Behrens diff --git a/scripting/source/pyprov/mailmerge.py b/scripting/source/pyprov/mailmerge.py index 0ef37b477c81..6bd80430d147 100644 --- a/scripting/source/pyprov/mailmerge.py +++ b/scripting/source/pyprov/mailmerge.py @@ -47,7 +47,7 @@ from email.utils import formatdate from email.utils import parseaddr from socket import _GLOBAL_DEFAULT_TIMEOUT -import sys, smtplib, imaplib, poplib +import sys, ssl, smtplib, imaplib, poplib dbg = False # pythonloader looks for a static g_ImplementationHelper variable @@ -96,7 +96,7 @@ class PyMailSMTPService(unohelper.Base, XSmtpService): if dbg: print("Timeout: " + str(tout), file=sys.stderr) if port == 465: - self.server = smtplib.SMTP_SSL(server, port,timeout=tout) + self.server = smtplib.SMTP_SSL(server, port, timeout=tout, context=ssl.create_default_context()) else: self.server = smtplib.SMTP(server, port,timeout=tout) @@ -108,7 +108,7 @@ class PyMailSMTPService(unohelper.Base, XSmtpService): print("ConnectionType: " + connectiontype, file=sys.stderr) if connectiontype.upper() == 'SSL' and port != 465: self.server.ehlo() - self.server.starttls() + self.server.starttls(context=ssl.create_default_context()) self.server.ehlo() user = xAuthenticator.getUserName() @@ -299,7 +299,7 @@ class PyMailIMAPService(unohelper.Base, XMailService): print(connectiontype, file=sys.stderr) print("BEFORE", file=sys.stderr) if connectiontype.upper() == 'SSL': - self.server = imaplib.IMAP4_SSL(server, port) + self.server = imaplib.IMAP4_SSL(server, port, ssl_context=ssl.create_default_context()) else: self.server = imaplib.IMAP4(server, port) print("AFTER", file=sys.stderr) @@ -368,7 +368,7 @@ class PyMailPOP3Service(unohelper.Base, XMailService): print(connectiontype, file=sys.stderr) print("BEFORE", file=sys.stderr) if connectiontype.upper() == 'SSL': - self.server = poplib.POP3_SSL(server, port) + self.server = poplib.POP3_SSL(server, port, context=ssl.create_default_context()) else: tout = xConnectionContext.getValueByName("Timeout") if dbg:
[Libreoffice-commits] core.git: editeng/source officecfg/registry sw/qa
editeng/source/misc/swafopt.cxx|2 officecfg/registry/schema/org/openoffice/Office/Writer.xcs |2 sw/qa/uitest/data/tdf156165.odt|binary sw/qa/uitest/writer_tests/tdf156165.py | 80 + 4 files changed, 82 insertions(+), 2 deletions(-) New commits: commit e26aeb882dd236adf19679d5df9b7ba5da1ed226 Author: Baole Fang AuthorDate: Thu Jul 6 12:03:31 2023 -0400 Commit: Mike Kaganski CommitDate: Sat Jul 29 03:53:28 2023 +0200 tdf#156165: Fix replace custom styles while typing Originally, Replace Custom Styles changes styles to text body by entering BuiltText. Since styles change to text body is removed from BuiltTest, it is converted independently. Now, conversion is applied even during typing because m_aFlags.bChgUserColl is true (its default value) during typing. Therefore, its default value is changed to false. Change-Id: I8ce067b311922b5e1bdcd84036229c369b50a977 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154144 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/editeng/source/misc/swafopt.cxx b/editeng/source/misc/swafopt.cxx index f6de4098d2e4..f5f79a45be97 100644 --- a/editeng/source/misc/swafopt.cxx +++ b/editeng/source/misc/swafopt.cxx @@ -27,7 +27,6 @@ SvxSwAutoFormatFlags::SvxSwAutoFormatFlags() bAutoCorrect = bCapitalStartSentence = bCapitalStartWord = -bChgUserColl = bChgEnumNum = bAddNonBrkSpace = bChgOrdinalNumber = @@ -42,6 +41,7 @@ SvxSwAutoFormatFlags::SvxSwAutoFormatFlags() bAFormatByInpDelSpacesAtSttEnd = bAFormatByInpDelSpacesBetweenLines = true; +bChgUserColl = bReplaceStyles = bDelEmptyNode = bWithRedlining = diff --git a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs index 5ac39808f1d0..ad2f1497a561 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs @@ -4235,7 +4235,7 @@ Specifies whether user-defined styles applied in the document are replaced by predefined text document styles. Replace user-defined styles -true +false diff --git a/sw/qa/uitest/data/tdf156165.odt b/sw/qa/uitest/data/tdf156165.odt new file mode 100644 index ..aabcfef91499 Binary files /dev/null and b/sw/qa/uitest/data/tdf156165.odt differ diff --git a/sw/qa/uitest/writer_tests/tdf156165.py b/sw/qa/uitest/writer_tests/tdf156165.py new file mode 100644 index ..69d1928bb8ce --- /dev/null +++ b/sw/qa/uitest/writer_tests/tdf156165.py @@ -0,0 +1,80 @@ +# -*- 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 uitest.uihelper.common import get_state_as_dict, get_url_for_data_file +from uitest.uihelper.common import select_pos +from libreoffice.uno.propertyvalue import mkPropertyValues +from time import sleep + +class tdf156165(UITestCase): + + def test_tdf156165(self): +with self.ui_test.load_file(get_url_for_data_file("tdf156165.odt")): +xMainWindow = self.xUITest.getTopFocusWindow() +writer_edit = xMainWindow.getChild("writer_edit") +style=xMainWindow.getChild('applystyle') + +with self.ui_test.execute_dialog_through_command(".uno:AutoCorrectDlg") as xDialog: +xTabs = xDialog.getChild("tabcontrol") +select_pos(xTabs, "2") +options=xDialog.getChild('list') +checkbox=options.getChild("16") +self.assertEqual("Replace Custom Styles", get_state_as_dict(checkbox)["Text"]) + +# Replace Custom Styles is default to be false +self.assertEqual("false", get_state_as_dict(checkbox)["IsChecked"]) + +# Replace Custom Styles when applying manully with it disabled, should not change style +writer_edit.executeAction("SELECT", mkPropertyValues({"END_POS": "0", "START_POS": "12"})) +self.xUITest.executeCommand(".uno:AutoFormatApply") +sleep(1) +self.assertEqual(get_state_as_dict(style)["Text"], "eSelah") + +# Replace Custom Styles when typing with it disabled, should not change style +writer_edit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "DOWN"})) +writer_edit.executeAction("SELECT", mkPropertyValues({"END_POS": "12", "START_POS": "12"})) +writer_edit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "RETURN"})) +