[Libreoffice-commits] core.git: svtools/source
svtools/source/svrtf/svparser.cxx | 15 +++ 1 file changed, 3 insertions(+), 12 deletions(-) New commits: commit 89070c8021d483ec84a3b6f465543c733208b1dc Author: Mike Kaganski AuthorDate: Sun Dec 12 09:17:27 2021 +0300 Commit: Mike Kaganski CommitDate: Sun Dec 12 08:39:40 2021 +0100 Small simplification Change-Id: I9a6d134b9af46e84560a9f6160c4f9fa1d2631ec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126696 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/svtools/source/svrtf/svparser.cxx b/svtools/source/svrtf/svparser.cxx index dd5068976ff7..ca0a8816851a 100644 --- a/svtools/source/svrtf/svparser.cxx +++ b/svtools/source/svrtf/svparser.cxx @@ -253,19 +253,10 @@ sal_uInt32 SvParser::GetNextChar() { const sal_uInt64 nPos = rInput.Tell(); rInput.ReadUtf16(cUC); -bErr = !rInput.good(); -if (!bErr) -{ -if (rtl::isLowSurrogate(cUC)) -c = rtl::combineSurrogates(c, cUC); -else -rInput.Seek(nPos); // process lone high surrogate -} +if (rtl::isLowSurrogate(cUC)) // can only be true when ReadUtf16 succeeded +c = rtl::combineSurrogates(c, cUC); else -{ -bErr = false; // process lone high surrogate -rInput.Seek(nPos); // maybe step 1 byte back -} +rInput.Seek(nPos); // process lone high surrogate } } }
[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - udkapi/com
udkapi/com/sun/star/lang/Locale.idl |8 1 file changed, 4 insertions(+), 4 deletions(-) New commits: commit e37723e4241de8237a74b66847881fec67286e76 Author: Eike Rathke AuthorDate: Sat Dec 11 20:10:35 2021 +0100 Commit: Eike Rathke CommitDate: Sat Dec 11 23:37:26 2021 +0100 Update reference links for ISO 639 and 3166 SIL has restructured their site, and ISO either moves things around or doesn't make them available at all. For 3166 use Wikipedia if ISO doesn't want to be a reference.. Change-Id: I2f906376c081667f57d48fa0386015a90857aae5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126689 Reviewed-by: Eike Rathke Tested-by: Jenkins (cherry picked from commit 06ac18e6302d666c363740644a7976e8c22d1113) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126674 diff --git a/udkapi/com/sun/star/lang/Locale.idl b/udkapi/com/sun/star/lang/Locale.idl index 355b5096bbf4..6f6f509c4305 100644 --- a/udkapi/com/sun/star/lang/Locale.idl +++ b/udkapi/com/sun/star/lang/Locale.idl @@ -42,8 +42,8 @@ published struct Locale defined by ISO 639-1, or three-letter codes as defined by ISO 639-3. You can find a full list of these codes at a number of sites, such as: -http://sil.org/iso639-3/codes.asp";> -http://sil.org/iso639-3/codes.asp. +https://iso639-3.sil.org/code_tables/639/data";> +https://iso639-3.sil.org/code_tables/639/data. If this field contains an empty string, the meaning depends on the @@ -62,8 +62,8 @@ published struct Locale These codes are the upper-case two-letter codes as defined by ISO 3166-1. You can find a full list of these codes at a number of sites, such as: -http://www.iso.org/iso/country_codes/iso_3166_code_lists/country_names_and_code_elements.htm";> - http://www.iso.org/iso/country_codes/iso_3166_code_lists/country_names_and_code_elements.htm. +https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2";> +https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2. If this field contains an empty string, the meaning depends on the
New Defects reported by Coverity Scan for LibreOffice
Hi, Please find the latest report on new defect(s) introduced to LibreOffice found with Coverity Scan. 2 new defect(s) introduced to LibreOffice found with Coverity Scan. 1 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan. New defect(s) Reported-by: Coverity Scan Showing 2 of 2 defect(s) ** CID 1495379:(UNCAUGHT_EXCEPT) /sw/source/core/layout/frmtool.cxx: 660 in SwFlyNotify::~SwFlyNotify()() /sw/source/core/layout/frmtool.cxx: 660 in SwFlyNotify::~SwFlyNotify()() *** CID 1495379:(UNCAUGHT_EXCEPT) /sw/source/core/layout/frmtool.cxx: 660 in SwFlyNotify::~SwFlyNotify()() 654 // the Writer fly frame is currently registered at. 655 pOldPage( pFlyFrame->GetPageFrame() ), 656 aFrameAndSpace( pFlyFrame->GetObjRectWithSpaces() ) 657 { 658 } 659 >>> CID 1495379:(UNCAUGHT_EXCEPT) >>> An exception of type "com::sun::star::uno::RuntimeException" is thrown >>> but the throw list "noexcept" doesn't allow it to be thrown. This will >>> cause a call to unexpected() which usually calls terminate(). 660 SwFlyNotify::~SwFlyNotify() 661 { 662 SwFlyFrame *pFly = static_cast(mpFrame); 663 if ( pFly->IsNotifyBack() ) 664 { 665 SwViewShell *pSh = pFly->getRootFrame()->GetCurrShell(); /sw/source/core/layout/frmtool.cxx: 660 in SwFlyNotify::~SwFlyNotify()() 654 // the Writer fly frame is currently registered at. 655 pOldPage( pFlyFrame->GetPageFrame() ), 656 aFrameAndSpace( pFlyFrame->GetObjRectWithSpaces() ) 657 { 658 } 659 >>> CID 1495379:(UNCAUGHT_EXCEPT) >>> An exception of type "com::sun::star::uno::RuntimeException" is thrown >>> but the throw list "noexcept" doesn't allow it to be thrown. This will >>> cause a call to unexpected() which usually calls terminate(). 660 SwFlyNotify::~SwFlyNotify() 661 { 662 SwFlyFrame *pFly = static_cast(mpFrame); 663 if ( pFly->IsNotifyBack() ) 664 { 665 SwViewShell *pSh = pFly->getRootFrame()->GetCurrShell(); ** CID 1399158:(UNCAUGHT_EXCEPT) /sw/source/core/layout/frmtool.cxx: 474 in SwLayNotify::~SwLayNotify()() /sw/source/core/layout/frmtool.cxx: 474 in SwLayNotify::~SwLayNotify()() /sw/source/core/layout/frmtool.cxx: 474 in SwLayNotify::~SwLayNotify()() /sw/source/core/layout/frmtool.cxx: 474 in SwLayNotify::~SwLayNotify()() *** CID 1399158:(UNCAUGHT_EXCEPT) /sw/source/core/layout/frmtool.cxx: 474 in SwLayNotify::~SwLayNotify()() 468 pLowerFrame->InvalidateObjs( false ); 469 470 pLowerFrame = pLowerFrame->GetNext(); 471 } 472 } 473 >>> CID 1399158:(UNCAUGHT_EXCEPT) >>> An exception of type "com::sun::star::uno::RuntimeException" is thrown >>> but the throw list "noexcept" doesn't allow it to be thrown. This will >>> cause a call to unexpected() which usually calls terminate(). 474 SwLayNotify::~SwLayNotify() 475 { 476 SwLayoutFrame *pLay = static_cast(mpFrame); 477 SwRectFnSet aRectFnSet(pLay); 478 bool bNotify = false; 479 if ( pLay->getFramePrintArea().SSize() != maPrt.SSize() ) /sw/source/core/layout/frmtool.cxx: 474 in SwLayNotify::~SwLayNotify()() 468 pLowerFrame->InvalidateObjs( false ); 469 470 pLowerFrame = pLowerFrame->GetNext(); 471 } 472 } 473 >>> CID 1399158:(UNCAUGHT_EXCEPT) >>> An exception of type "com::sun::star::uno::RuntimeException" is thrown >>> but the throw list "noexcept" doesn't allow it to be thrown. This will >>> cause a call to unexpected() which usually calls terminate(). 474 SwLayNotify::~SwLayNotify() 475 { 476 SwLayoutFrame *pLay = static_cast(mpFrame); 477 SwRectFnSet aRectFnSet(pLay); 478 bool bNotify = false; 479 if ( pLay->getFramePrintArea().SSize() != maPrt.SSize() ) /sw/source/core/layout/frmtool.cxx: 474 in SwLayNotify::~SwLayNotify()() 468 pLowerFrame->InvalidateObjs( false ); 469 470 pLowerFrame = pLowerFrame->GetNext(); 471 } 472 } 473 >>> CID 1399158:(UNCAUGHT_EXCEPT) >>> An exception of type "com::sun::star::uno::RuntimeException" is thrown >>> but the throw list "noexcept" doesn't allow it to be thrown. This will >>> cause a call to unexpected() which usually calls terminate(). 474 SwLayNotify::~SwLayNotify() 475 { 476 SwLayoutFrame *pLay = static_cast(mpFrame); 477 SwRectFnSet aRectFnSet(pLay); 478 bool bNotify = false; 479 if ( pLay->getFramePrintArea().SSize() != maPrt.SSize() ) /sw/source/core/layout/frmtool.cxx: 474 in SwLayNotify::~SwLayNotify()() 468 pLo
[Libreoffice-commits] core.git: udkapi/com
udkapi/com/sun/star/lang/Locale.idl |8 1 file changed, 4 insertions(+), 4 deletions(-) New commits: commit 06ac18e6302d666c363740644a7976e8c22d1113 Author: Eike Rathke AuthorDate: Sat Dec 11 20:10:35 2021 +0100 Commit: Eike Rathke CommitDate: Sat Dec 11 21:40:00 2021 +0100 Update reference links for ISO 639 and 3166 SIL has restructured their site, and ISO either moves things around or doesn't make them available at all. For 3166 use Wikipedia if ISO doesn't want to be a reference.. Change-Id: I2f906376c081667f57d48fa0386015a90857aae5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126689 Reviewed-by: Eike Rathke Tested-by: Jenkins diff --git a/udkapi/com/sun/star/lang/Locale.idl b/udkapi/com/sun/star/lang/Locale.idl index 355b5096bbf4..6f6f509c4305 100644 --- a/udkapi/com/sun/star/lang/Locale.idl +++ b/udkapi/com/sun/star/lang/Locale.idl @@ -42,8 +42,8 @@ published struct Locale defined by ISO 639-1, or three-letter codes as defined by ISO 639-3. You can find a full list of these codes at a number of sites, such as: -http://sil.org/iso639-3/codes.asp";> -http://sil.org/iso639-3/codes.asp. +https://iso639-3.sil.org/code_tables/639/data";> +https://iso639-3.sil.org/code_tables/639/data. If this field contains an empty string, the meaning depends on the @@ -62,8 +62,8 @@ published struct Locale These codes are the upper-case two-letter codes as defined by ISO 3166-1. You can find a full list of these codes at a number of sites, such as: -http://www.iso.org/iso/country_codes/iso_3166_code_lists/country_names_and_code_elements.htm";> - http://www.iso.org/iso/country_codes/iso_3166_code_lists/country_names_and_code_elements.htm. +https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2";> +https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2. If this field contains an empty string, the meaning depends on the
[Libreoffice-commits] core.git: dbaccess/source
dbaccess/source/ui/control/dbtreelistbox.cxx | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) New commits: commit b31e525bc210c6e9168d67d5ea8c53206974f196 Author: Caolán McNamara AuthorDate: Sat Dec 11 14:35:22 2021 + Commit: Caolán McNamara CommitDate: Sat Dec 11 21:22:39 2021 +0100 prefer css::awt::XPopupMenu api Change-Id: I1d930c1c7ea06d066f3ae35eb0535290a02a2f58 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126663 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx index 2fd21fac1318..aab0f5efcc9f 100644 --- a/dbaccess/source/ui/control/dbtreelistbox.cxx +++ b/dbaccess/source/ui/control/dbtreelistbox.cxx @@ -21,6 +21,7 @@ #include #include +#include #include #include #include @@ -382,6 +383,8 @@ IMPL_LINK(TreeListBox, CommandHdl, const CommandEvent&, rCEvt, bool) VclPtr xMenuParent = m_pContextMenuProvider->getMenuParent(); +css::uno::Reference< css::awt::XWindow> xSourceWindow = VCLUnoHelper::GetInterface(xMenuParent); + rtl::Reference xPopupMenu( new VCLXPopupMenu ); xMenuController->setPopupMenu( xPopupMenu ); VclPtr pContextMenu( static_cast< PopupMenu* >( xPopupMenu->GetMenu() ) ); @@ -393,7 +396,7 @@ IMPL_LINK(TreeListBox, CommandHdl, const CommandEvent&, rCEvt, bool) OUString aMenuIdentifier( "private:resource/popupmenu/" + aResourceName ); ContextMenuExecuteEvent aEvent; -aEvent.SourceWindow = VCLUnoHelper::GetInterface(xMenuParent); +aEvent.SourceWindow = xSourceWindow; aEvent.ExecutePosition.X = -1; aEvent.ExecutePosition.Y = -1; aEvent.ActionTriggerContainer = ::framework::ActionTriggerHelper::CreateActionTriggerContainerFromMenu( @@ -443,7 +446,7 @@ IMPL_LINK(TreeListBox, CommandHdl, const CommandEvent&, rCEvt, bool) if ( bModifiedMenu ) { -pContextMenu->Clear(); +xPopupMenu->clear(); ::framework::ActionTriggerHelper::CreateMenuFromActionTriggerContainer( pContextMenu, aEvent.ActionTriggerContainer ); aEvent.ActionTriggerContainer.clear(); @@ -454,7 +457,8 @@ IMPL_LINK(TreeListBox, CommandHdl, const CommandEvent&, rCEvt, bool) m_pContextMenuProvider->adjustMenuPosition(*m_xTreeView, aPos); // do action for selected entry in popup menu -pContextMenu->Execute(xMenuParent, aPos); +css::uno::Reference xParent(xSourceWindow, css::uno::UNO_QUERY); +xPopupMenu->execute(xParent, css::awt::Rectangle(aPos.X(), aPos.Y(), 1, 1), css::awt::PopupMenuDirection::EXECUTE_DOWN); pContextMenu.disposeAndClear(); css::uno::Reference xComponent(xMenuController, css::uno::UNO_QUERY);
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - configure.ac download.lst external/libetonyek solenv/flatpak-manifest.in
configure.ac |2 download.lst |4 - external/libetonyek/0001-fix-build-with-MSVC.patch.1 | 28 + external/libetonyek/0002-fix-build-with-MSVC.patch.1 | 55 ++ external/libetonyek/Library_etonyek.mk|1 external/libetonyek/UnpackedTarball_libetonyek.mk |2 external/libetonyek/libetonyek-bundled-soname.patch.0 |3 solenv/flatpak-manifest.in|7 +- 8 files changed, 95 insertions(+), 7 deletions(-) New commits: commit 6bdb8b76b2873785d003f175ac0e503cee8ed7bf Author: Caolán McNamara AuthorDate: Thu Feb 6 11:04:21 2020 + Commit: Aron Budea CommitDate: Sat Dec 11 21:03:21 2021 +0100 upload libetonyek 0.1.10 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115769 Tested-by: Jenkins Reviewed-by: David Tardon (cherry picked from commit 5471dc3238e8005fa146cfa0a81c5784ea018e95) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120734 Tested-by: Jenkins CollaboraOffice Reviewed-by: Aron Budea Change-Id: Iad586802e89b19701a20bebff06b238b617af2a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126687 Tested-by: Jenkins CollaboraOffice Reviewed-by: Aron Budea diff --git a/configure.ac b/configure.ac index 6bd1d832d1b3..c7e87d54d3e5 100644 --- a/configure.ac +++ b/configure.ac @@ -8551,7 +8551,7 @@ libo_CHECK_SYSTEM_MODULE([libmwaw],[MWAW],[libmwaw-0.3 >= 0.3.1]) libo_PKG_VERSION([MWAW], [libmwaw-0.3], [0.3.16]) libo_CHECK_SYSTEM_MODULE([libetonyek],[ETONYEK],[libetonyek-0.1]) -libo_PKG_VERSION([ETONYEK], [libetonyek-0.1], [0.1.8]) +libo_PKG_VERSION([ETONYEK], [libetonyek-0.1], [0.1.10]) libo_CHECK_SYSTEM_MODULE([libfreehand],[FREEHAND],[libfreehand-0.1]) diff --git a/download.lst b/download.lst index 5b67845bd0c6..eddf5d1d7958 100644 --- a/download.lst +++ b/download.lst @@ -39,8 +39,8 @@ export EPM_SHA256SUM := b3fc4c5445de6c9a801504a3ea3efb2d4ea9d5a622c9427e716736e7 export EPM_TARBALL := 3ade8cfe7e59ca8e65052644fed9fca4-epm-3.7.tar.gz export EPUBGEN_SHA256SUM := 03e084b994cbeffc8c3dd13303b2cb805f44d8f2c3b79f7690d7e3fc7f6215ad export EPUBGEN_TARBALL := libepubgen-0.1.1.tar.xz -export ETONYEK_SHA256SUM := e61677e8799ce6e55b25afc11aa5339113f6a49cff031f336e32fa58635b1a4a -export ETONYEK_VERSION_MICRO := 9 +export ETONYEK_SHA256SUM := b430435a6e8487888b761dc848b7981626eb814884963ffe25eb26a139301e9a +export ETONYEK_VERSION_MICRO := 10 export ETONYEK_TARBALL := libetonyek-0.1.$(ETONYEK_VERSION_MICRO).tar.xz export EXPAT_SHA256SUM := 2f9b6a580b94577b150a7d5617ad4643a4301a6616ff459307df3e225bcfbf40 export EXPAT_TARBALL := expat-2.4.1.tar.bz2 diff --git a/external/libetonyek/0001-fix-build-with-MSVC.patch.1 b/external/libetonyek/0001-fix-build-with-MSVC.patch.1 new file mode 100644 index ..2a72844dc79a --- /dev/null +++ b/external/libetonyek/0001-fix-build-with-MSVC.patch.1 @@ -0,0 +1,28 @@ +From 1aa22c746b41a688296f4daf4fc35710d2045a33 Mon Sep 17 00:00:00 2001 +From: David Tardon +Date: Wed, 19 May 2021 19:43:43 +0200 +Subject: [PATCH] fix build with MSVC + +error C2664: 'libetonyek::IWORKFormula::IWORKFormula(const boost::optional &)': cannot convert argument 1 from 'int' to 'const boost::optional &' + +Change-Id: Iaa3de2d0ef8f960495e5d5afebb75c5063955177 +--- + src/lib/IWAParser.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/lib/IWAParser.cpp b/src/lib/IWAParser.cpp +index 7fd95c3..a2bd292 100644 +--- a/src/lib/IWAParser.cpp b/src/lib/IWAParser.cpp +@@ -3403,7 +3403,7 @@ bool IWAParser::parseFormula(const IWAMessage &msg, IWORKFormulaPtr_t &formula) + } + else + { +-formula.reset(new IWORKFormula(0)); ++formula.reset(new IWORKFormula(boost::make_optional(0u))); + formula->parse(stack[0]); + } + return ok; +-- +2.31.1 + diff --git a/external/libetonyek/0002-fix-build-with-MSVC.patch.1 b/external/libetonyek/0002-fix-build-with-MSVC.patch.1 new file mode 100644 index ..0eadb0912f6a --- /dev/null +++ b/external/libetonyek/0002-fix-build-with-MSVC.patch.1 @@ -0,0 +1,55 @@ +From 7b69af66227309e9c258beca3bc3934be454a221 Mon Sep 17 00:00:00 2001 +From: David Tardon +Date: Wed, 19 May 2021 21:11:40 +0200 +Subject: [PATCH] fix build with MSVC + +C:/PROGRA~2/MIB055~1/2019/COMMUN~1/VC/Tools/MSVC/1428~1.299/Include\xutility(138): error C2668: 'libetonyek::IWORKStyle::IWORKStyle': ambiguous call to overloaded function +C:\cygwin\home\tdf\lode\jenkins\workspace\gerrit_windows\workdir\UnpackedTarball\libetonyek\src\lib\IWORKStyle.h(32): note: could be 'libetonyek::IWORKStyle::IWORKStyle(const libetonyek::IWORKPropertyMap &,const boost::optional &,const libetonyek::IWORKStylePtr_t &)' +C:\cygwin\home\tdf\lode\jenkins\workspace\gerrit_windows\workdir\UnpackedTarball\libetonyek\src\lib\IWORKStyle.h(31): note: or 'libetonyek::IWORKStyle::IWORKStyle(c
[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - editeng/source include/editeng sc/inc sc/source
editeng/source/editeng/editeng.cxx |3 ++- editeng/source/editeng/impedit2.cxx |6 -- include/editeng/editeng.hxx |2 +- sc/inc/editutil.hxx |2 +- sc/source/core/tool/editutil.cxx|7 +-- 5 files changed, 13 insertions(+), 7 deletions(-) New commits: commit d01748250f952cc97f5ae4c73ee4451e6762da4b Author: Samuel Mehrbrodt AuthorDate: Tue Nov 30 23:34:11 2021 +0100 Commit: Thorsten Behrens CommitDate: Sat Dec 11 18:23:15 2021 +0100 tdf#145671 Don't open URL twice in cell edit mode Change-Id: I8a324d6a037c8a5c0efc0b2825657513c2f9841c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126159 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt (cherry picked from commit b9362e87a3646a6693b81fb0d40e28ce7813a251) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126421 Tested-by: Samuel Mehrbrodt Reviewed-by: Thorsten Behrens diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index 2b600871c27d..1fb456c7beb8 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -2567,8 +2567,9 @@ OUString EditEngine::CalcFieldValue( const SvxFieldItem&, sal_Int32, sal_Int32, return OUString(' '); } -void EditEngine::FieldClicked( const SvxFieldItem& ) +bool EditEngine::FieldClicked( const SvxFieldItem& ) { +return false; } diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index dc1730a72a94..fbf1101d399a 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -599,8 +599,11 @@ bool ImpEditEngine::MouseButtonUp( const MouseEvent& rMEvt, EditView* pView ) Point aLogicClick = rOutDev.PixelToLogic(rMEvt.GetPosPixel()); if (const SvxFieldItem* pFld = pView->GetField(aLogicClick)) { +bool bUrlOpened = GetEditEnginePtr()->FieldClicked( *pFld ); +auto pUrlField = dynamic_cast(pFld->GetField()); + // tdf#121039 When in edit mode, editeng is responsible for opening the URL on mouse click -if (auto pUrlField = dynamic_cast(pFld->GetField())) +if (!bUrlOpened && pUrlField) { SvtSecurityOptions aSecOpt; bool bCtrlClickHappened = rMEvt.IsMod1(); @@ -616,7 +619,6 @@ bool ImpEditEngine::MouseButtonUp( const MouseEvent& rMEvt, EditView* pView ) css::system::SystemShellExecuteFlags::DEFAULTS); } } -GetEditEnginePtr()->FieldClicked( *pFld ); } } } diff --git a/include/editeng/editeng.hxx b/include/editeng/editeng.hxx index 1f77ce661020..59040d10b81a 100644 --- a/include/editeng/editeng.hxx +++ b/include/editeng/editeng.hxx @@ -500,7 +500,7 @@ public: const Color& rTextLineColor); virtual OUString GetUndoComment( sal_uInt16 nUndoId ) const; virtual boolSpellNextDocument(); -virtual voidFieldClicked( const SvxFieldItem& rField ); +virtual boolFieldClicked( const SvxFieldItem& rField ); virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, boost::optional& rTxtColor, boost::optional& rFldColor ); // override this if access to bullet information needs to be provided diff --git a/sc/inc/editutil.hxx b/sc/inc/editutil.hxx index 86d579bd1016..4bf044aba666 100644 --- a/sc/inc/editutil.hxx +++ b/sc/inc/editutil.hxx @@ -185,7 +185,7 @@ public: void SetExecuteURL(bool bSet){ bExecuteURL = bSet; } -virtual voidFieldClicked( const SvxFieldItem& rField ) override; +virtual boolFieldClicked( const SvxFieldItem& rField ) override; virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, boost::optional& rTxtColor, boost::optional& rFldColor ) override; }; diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx index 040456d49ac2..d34db90f614b 100644 --- a/sc/source/core/tool/editutil.cxx +++ b/sc/source/core/tool/editutil.cxx @@ -870,14 +870,17 @@ OUString ScFieldEditEngine::CalcFieldValue( const SvxFieldItem& rField, return ScEditUtil::GetCellFieldValue(*pFieldData, mpDoc, &rTxtColor); } -void ScFieldEditEngine::FieldClicked( const SvxFieldItem& rField ) +bool ScFieldEditEngine::FieldClicked( const SvxFieldItem& rField ) { if (!bExecuteURL) -return; +return false; + if (const SvxURLField* pURLField = dynamic_cast(rField.GetField())) { ScGlobal::OpenURL(pURLField->GetURL(), pURLField->GetTargetFrame()); +return true; } +return false; } ScNoteEditEngine::ScNoteEditEngine( SfxItemPool* pEnginePoolP,
[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - sc/source
sc/source/ui/sidebar/CellBorderStyleControl.cxx | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) New commits: commit 914b83b23984659590ccd9887ebbe4d4c81b9d4a Author: Samuel Mehrbrodt AuthorDate: Wed Nov 24 14:07:05 2021 +0100 Commit: Thorsten Behrens CommitDate: Sat Dec 11 18:22:53 2021 +0100 tdf#145828 Sidebar line styles: Default to "thin" width Change-Id: I78d754d36c7ea41f7e3259be331d23b8a25c480f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125771 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt (cherry picked from commit 2f43d95a0fb4bdd7121968ff9f365ffc325e5647) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126420 Tested-by: Samuel Mehrbrodt Reviewed-by: Thorsten Behrens diff --git a/sc/source/ui/sidebar/CellBorderStyleControl.cxx b/sc/source/ui/sidebar/CellBorderStyleControl.cxx index 1e4f177bec98..cd0de2b126fa 100644 --- a/sc/source/ui/sidebar/CellBorderStyleControl.cxx +++ b/sc/source/ui/sidebar/CellBorderStyleControl.cxx @@ -78,7 +78,7 @@ IMPL_LINK(CellBorderStylePopup, TB1SelectHdl, ToolBox*, pToolBox, void) sal_uInt16 nId = pToolBox->GetCurItemId(); SvxBoxItem aBorderOuter( SID_ATTR_BORDER_OUTER ); SvxBoxInfoItem aBorderInner( SID_ATTR_BORDER_INNER ); -editeng::SvxBorderLine theDefLine(nullptr, 1); +editeng::SvxBorderLine theDefLine(nullptr, SvxBorderLineWidth::Thin); editeng::SvxBorderLine *pLeft = nullptr, *pRight = nullptr, *pTop = nullptr, *pBottom = nullptr; sal_uInt8 nValidFlags = 0; @@ -138,7 +138,7 @@ IMPL_LINK(CellBorderStylePopup, TB2SelectHdl, ToolBox *, pToolBox, void) if (nId == pToolBox->GetItemId("diagup")) { -editeng::SvxBorderLine aTmp( nullptr, 1 ); +editeng::SvxBorderLine aTmp( nullptr, SvxBorderLineWidth::Thin ); SvxLineItem aLineItem( SID_ATTR_BORDER_DIAG_BLTR ); aLineItem.SetLine( &aTmp ); mpDispatcher->ExecuteList( @@ -146,7 +146,7 @@ IMPL_LINK(CellBorderStylePopup, TB2SelectHdl, ToolBox *, pToolBox, void) } else if (nId == pToolBox->GetItemId("diagdown")) { -editeng::SvxBorderLine aTmp( nullptr, 1 ); +editeng::SvxBorderLine aTmp( nullptr, SvxBorderLineWidth::Thin ); SvxLineItem aLineItem( SID_ATTR_BORDER_DIAG_TLBR ); aLineItem.SetLine( &aTmp ); mpDispatcher->ExecuteList( @@ -156,7 +156,7 @@ IMPL_LINK(CellBorderStylePopup, TB2SelectHdl, ToolBox *, pToolBox, void) { SvxBoxItem aBorderOuter( SID_ATTR_BORDER_OUTER ); SvxBoxInfoItem aBorderInner( SID_ATTR_BORDER_INNER ); -editeng::SvxBorderLine theDefLine(nullptr, 1); +editeng::SvxBorderLine theDefLine(nullptr, SvxBorderLineWidth::Thin); editeng::SvxBorderLine *pLeft = nullptr, *pRight = nullptr, *pTop = nullptr, @@ -249,7 +249,7 @@ IMPL_LINK(CellBorderStylePopup, TB3SelectHdl, ToolBox *, pToolBox, void) else if (nId == maTBBorder3->GetItemId("topthickbottom")) { pBottom.reset(new editeng::SvxBorderLine(nullptr, SvxBorderLineWidth::Thick)); -pTop.reset(new editeng::SvxBorderLine(nullptr, 1)); +pTop.reset(new editeng::SvxBorderLine(nullptr, SvxBorderLineWidth::Thin)); nValidFlags |= FRM_VALID_BOTTOM|FRM_VALID_TOP; } else if (nId == maTBBorder3->GetItemId("topdoublebottom")) @@ -257,7 +257,7 @@ IMPL_LINK(CellBorderStylePopup, TB3SelectHdl, ToolBox *, pToolBox, void) pBottom.reset(new editeng::SvxBorderLine(nullptr)); pBottom->GuessLinesWidths(SvxBorderLineStyle::DOUBLE, SvxBorderLineWidth::Hairline, SvxBorderLineWidth::Hairline, SvxBorderLineWidth::Thin); -pTop.reset(new editeng::SvxBorderLine(nullptr, 1)); +pTop.reset(new editeng::SvxBorderLine(nullptr, SvxBorderLineWidth::Thin)); nValidFlags |= FRM_VALID_BOTTOM|FRM_VALID_TOP; }
[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - cui/source
cui/source/tabpages/border.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 518cd3bb063429e154cb782ac1354dae3ae457a4 Author: Samuel Mehrbrodt AuthorDate: Tue Nov 23 13:39:10 2021 +0100 Commit: Thorsten Behrens CommitDate: Sat Dec 11 18:22:26 2021 +0100 Border tab page: Use 'thin' width instead of random number Change-Id: I89f3be2d6bba02f1fbe52065fab81caded2656f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125699 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt (cherry picked from commit f4eb555ff5294db037ea6e4d9510d0ca11276fa7) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126419 Tested-by: Samuel Mehrbrodt Reviewed-by: Thorsten Behrens diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx index 639c7493ab38..0bdb47fe4ed4 100644 --- a/cui/source/tabpages/border.cxx +++ b/cui/source/tabpages/border.cxx @@ -116,8 +116,8 @@ static sal_Int64 lcl_GetMinLineWidth(SvxBorderLineStyle aStyle) return 15; // Double lines -case SvxBorderLineStyle::DOUBLE: return 22; -case SvxBorderLineStyle::DOUBLE_THIN: return 22; +case SvxBorderLineStyle::DOUBLE: return 15; +case SvxBorderLineStyle::DOUBLE_THIN: return 15; case SvxBorderLineStyle::THINTHICK_SMALLGAP: return 20; case SvxBorderLineStyle::THINTHICK_MEDIUMGAP: return 15; case SvxBorderLineStyle::THINTHICK_LARGEGAP: return 15;
[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - cui/uiconfig
cui/uiconfig/ui/borderpage.ui | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) New commits: commit d9c140a85e621551942ff2a30170072be949b835 Author: Samuel Mehrbrodt AuthorDate: Tue Nov 23 14:27:11 2021 +0100 Commit: Thorsten Behrens CommitDate: Sat Dec 11 18:21:10 2021 +0100 border tab page: Explain how thick lines are Change-Id: I802c0736dde6d87c8548968cfa9ce0481aba4f76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125700 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt (cherry picked from commit d256707293706e2252f1e94bfb91fc84c34e5fae) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126416 Tested-by: Samuel Mehrbrodt Reviewed-by: Thorsten Behrens diff --git a/cui/uiconfig/ui/borderpage.ui b/cui/uiconfig/ui/borderpage.ui index b791787cf347..559029e4e8d3 100644 --- a/cui/uiconfig/ui/borderpage.ui +++ b/cui/uiconfig/ui/borderpage.ui @@ -303,12 +303,12 @@ False False - Hairline - Very thin - Thin - Medium - Thick - Extra thick + Hairline (0.05pt) + Very thin (0.5pt) + Thin (0.75pt) + Medium (1.5pt) + Thick (2.25pt) + Extra thick (4.5pt) Custom
[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - cui/uiconfig
cui/uiconfig/ui/borderpage.ui | 92 -- 1 file changed, 36 insertions(+), 56 deletions(-) New commits: commit cb7a76528147868e408762aa30dfa7ec6b543d4b Author: Samuel Mehrbrodt AuthorDate: Tue Nov 9 08:47:02 2021 +0100 Commit: Thorsten Behrens CommitDate: Sat Dec 11 18:19:51 2021 +0100 tdf#48622 Fix layout issue when "Custom" was selected Change-Id: Ie32a763b88cfc26b61d942214b16e008179d410c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124898 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt (cherry picked from commit 3746379f251091696b73463f7b27e8ef732dd20b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126415 Tested-by: Samuel Mehrbrodt Reviewed-by: Thorsten Behrens diff --git a/cui/uiconfig/ui/borderpage.ui b/cui/uiconfig/ui/borderpage.ui index 0e9082019bb8..b791787cf347 100644 --- a/cui/uiconfig/ui/borderpage.ui +++ b/cui/uiconfig/ui/borderpage.ui @@ -210,7 +210,7 @@ 6 12 - + True False @@ -236,8 +236,11 @@ False _Width: True -linewidthmf 0 + + + + 0 @@ -275,15 +278,30 @@ - - + +True +True +False +0 +True + + + + + +1 +1 + + + + True False -6 True False +False Hairline Very thin @@ -293,80 +311,42 @@ Extra thick Custom + + + -0 -0 +False +True +0 True True -start +True True True adjustment1 2 0.05 + + + -1 -0 +False +True +1 - - - - - - - - - - - - - - - - - - - - - 1 2 - - -True -True -False -0 -True - - - - - -1 -1 - - - - - - - - - - -
[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - cui/uiconfig
cui/uiconfig/ui/borderpage.ui | 584 -- 1 file changed, 343 insertions(+), 241 deletions(-) New commits: commit 410cbd6db28940656b853ddbea55955dbd3536ec Author: Samuel Mehrbrodt AuthorDate: Mon Dec 6 12:13:42 2021 +0100 Commit: Thorsten Behrens CommitDate: Sat Dec 11 18:19:19 2021 +0100 Save with Glade 3.38.2 Change-Id: I238f8a5adee999fcaad09e8813742fba37a30396 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126414 Tested-by: Samuel Mehrbrodt Reviewed-by: Thorsten Behrens diff --git a/cui/uiconfig/ui/borderpage.ui b/cui/uiconfig/ui/borderpage.ui index 9aea90aa306e..0e9082019bb8 100644 --- a/cui/uiconfig/ui/borderpage.ui +++ b/cui/uiconfig/ui/borderpage.ui @@ -1,79 +1,81 @@ - + 0.05 9 0.05 -0.25 -1 +0.25 +1 50 -0.1 -1 +0.10 +1 0.5 50 -0.1 -1 +0.10 +1 50 -0.1 -1 +0.10 +1 50 -0.1 -1 +0.10 +1 50 -0.1 -1 +0.10 +1 + True -False -6 -12 -24 +False +6 +12 +24 True -False -0 -none +False +0 +none True -False -6 -12 +False +6 +12 + True -False -3 -6 +False +3 +6 True -True -never -never -in +True +never +never +in True -False +False True -True +True GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK @@ -81,63 +83,63 @@ -1 -2 +1 +2 True -False +False _User-defined: -True -framesel +True +framesel 0 -0 -1 +0 +1 2 True -False +False center Pr_esets: -True -presets +True +presets 0 -0 -0 +0 +0 True -True +True GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK -1 -0 +1 +0 True -False +False _Adjacent Cells: -True -rmadjcellborders +True +rmadjcellborders 0 -0 -3 +0 +3 2 @@ -145,21 +147,36 @@ Remove border True -True -False -True +True +False +True 0 -True +True -0 -4 +0 +4 2
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - vcl/inc vcl/win
vcl/inc/win/salgdi.h |4 +++- vcl/inc/win/winlayout.hxx |6 ++ vcl/win/gdi/salfont.cxx | 32 ++-- vcl/win/gdi/winlayout.cxx | 38 +- 4 files changed, 72 insertions(+), 8 deletions(-) New commits: commit 25b77b4a684695e8948c8a97902c8e9de80b446e Author: Mark Hung AuthorDate: Mon Nov 1 20:53:19 2021 +0800 Commit: Adolfo Jayme Barrientos CommitDate: Sat Dec 11 17:55:56 2021 +0100 tdf#145322, tdf#144378 fix printing for vertical writing Printing still uses ExTextOutRenderer to render text because Skia haven't yet support printing and DWriteTextRenderer can't bind the printer DC. ExTextOutRenderer uses win32 API ExtTextOutW. In order to renderer upright CJK text in vertical writing with that API, the HFONT created with CreateFontIndirectW needs a font name prefixed with '@'. OTOH, use '@' prefixed font with Skia break the vertical writing unit test. - WinSalGraphics::ImplDoSetFont: use '@' prefixed font name if the requested font is vertical and is for printing. - ExTextOutRenderer: use SetTextAlign and text metric tmDescent to adjust vertical glyphs. It's not consistent with Skia or DWriteTextRenderer, and is still incorrect in many cases. The patch is adapted from reverting commit 5686c1aca40beb9514d40c86b4a3780a8a1334ba Author: Mark Hung Date: Sun May 2 14:45:45 2021 +0800 vcl: use DWriteTextRenderer for vertical writing. Change-Id: Ib2d3df8b68cad4bebe0672c9da0a16b62aed99e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125978 Tested-by: Jenkins Reviewed-by: Mark Hung Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126545 Reviewed-by: Adolfo Jayme Barrientos diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h index 959d8abc0301..bcd25f8e92dd 100644 --- a/vcl/inc/win/salgdi.h +++ b/vcl/inc/win/salgdi.h @@ -166,7 +166,9 @@ private: int mnPenWidth; // line width public: -HFONT ImplDoSetFont(FontSelectPattern const & i_rFont, const PhysicalFontFace * i_pFontFace, HFONT& o_rOldFont); +// Return HFONT, and whether the font is for vertical writing ( prefixed with '@' ) +// and tmDescent value for adjusting offset in vertical writing mode. +std::tuple ImplDoSetFont(FontSelectPattern const & i_rFont, const PhysicalFontFace * i_pFontFace, HFONT& o_rOldFont); HDC getHDC() const { return mhLocalDC; } void setHDC(HDC aNew) { mhLocalDC = aNew; } diff --git a/vcl/inc/win/winlayout.hxx b/vcl/inc/win/winlayout.hxx index b4e51d8dc4bb..7cedb3f7a40b 100644 --- a/vcl/inc/win/winlayout.hxx +++ b/vcl/inc/win/winlayout.hxx @@ -43,6 +43,10 @@ public: HFONT GetHFONT() const { return m_hFont; } float GetScale() const { return m_fScale; } +// Return true if the font is for vertical writing. +// I.e. the font name of the LOGFONT is prefixed with '@'. +bool IsCJKVerticalFont() const { return m_bIsCJKVerticalFont; } +sal_Int32 GetTmDescent() const { return m_nTmDescent; } // Prevent deletion of the HFONT in the WinFontInstance destructor // Used for the ScopedFont handling @@ -62,6 +66,8 @@ private: WinSalGraphics *m_pGraphics; HFONT m_hFont; float m_fScale; +bool m_bIsCJKVerticalFont; +sal_Int32 m_nTmDescent; }; class TextOutRenderer diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx index 2830d6048590..4b74741d3b9e 100644 --- a/vcl/win/gdi/salfont.cxx +++ b/vcl/win/gdi/salfont.cxx @@ -760,6 +760,12 @@ void WinSalGraphics::SetTextColor( Color nColor ) ::SetTextColor( getHDC(), aCol ); } +static int CALLBACK SalEnumQueryFontProcExW( const LOGFONTW*, const TEXTMETRICW*, DWORD, LPARAM lParam ) +{ +*reinterpret_cast(lParam) = true; +return 0; +} + void ImplGetLogFontFromFontSelect( const FontSelectPattern& rFont, const PhysicalFontFace* pFontFace, LOGFONTW& rLogFont ) @@ -809,7 +815,7 @@ void ImplGetLogFontFromFontSelect( const FontSelectPattern& rFont, } -HFONT WinSalGraphics::ImplDoSetFont(FontSelectPattern const & i_rFont, +std::tuple WinSalGraphics::ImplDoSetFont(FontSelectPattern const & i_rFont, const PhysicalFontFace * i_pFontFace, HFONT& o_rOldFont) { @@ -818,6 +824,27 @@ HFONT WinSalGraphics::ImplDoSetFont(FontSelectPattern const & i_rFont, LOGFONTW aLogFont; ImplGetLogFontFromFontSelect( i_rFont, i_pFontFace, aLogFont ); +boolbIsCJKVerticalFont = false; +// select vertical mode for printing if requested and available +if ( i_rFont.mbVertical && mbPrinter ) +{ +constexpr size_t nLen = sizeof(aLogFont.lfFaceName) - sizeof(aLogFont.lfFaceName[0]); +// vertical fonts start with an '@' +memmove( &aLogFont.
[Libreoffice-commits] core.git: connectivity/source
connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 41200eb5f542f5aa744f90cbd56d614b02e1ee47 Author: Julien Nabet AuthorDate: Sat Dec 11 15:59:53 2021 +0100 Commit: Julien Nabet CommitDate: Sat Dec 11 17:23:01 2021 +0100 Fix regression in connectivity/evoab2 Regression from 46d3e84d7a131f7c72cb536ab2f314cb55ffc155 Directly initialize vector in connectivity (part 2) Pinpointed thanks to this log: warn:dbaccess:612118:612118:dbaccess/source/core/dataaccess/connection.cxx:344: DBG_UNHANDLED_EXCEPTION in OConnection exception: com.sun.star.sdbc.SQLException message: Invalid descriptor index. /home/julien/lo/libreoffice/connectivity/source/commontools/dbexception.cxx:365 SQLState: 07009 ErrorCode: 0 wrapped: void message: /home/julien/lo/libreoffice/tools/source/debug/debug.cxx:104 when launching Base then connecting to Evolution local. Change-Id: Id4cb0fc322b0df24ed2b2d89a5595f4841db1845 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126664 Reviewed-by: Julien Nabet Tested-by: Jenkins diff --git a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx index a671ceb233a8..81b5c8c0e325 100644 --- a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx +++ b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx @@ -989,7 +989,7 @@ Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getTableTypes( ) // here we fill the rows which should be visible when ask for data from the resultset returned here auto nNbTypes = SAL_N_ELEMENTS(sTableTypes); -ODatabaseMetaDataResultSet::ORows aRows(nNbTypes); +ODatabaseMetaDataResultSet::ORows aRows; for(std::size_t i=0;i < nNbTypes;++i) { // bound row @@ -1010,7 +1010,7 @@ Reference< XResultSet > OEvoabDatabaseMetaData::impl_getTypeInfo_throw( ) static ODatabaseMetaDataResultSet::ORows aRows = []() { -ODatabaseMetaDataResultSet::ORows tmp(2); +ODatabaseMetaDataResultSet::ORows tmp; ODatabaseMetaDataResultSet::ORow aRow { ODatabaseMetaDataResultSet::getEmptyValue() ,
[Libreoffice-commits] core.git: include/vcl vcl/source
include/vcl/textview.hxx |1 + vcl/source/edit/textview.cxx | 17 - 2 files changed, 17 insertions(+), 1 deletion(-) New commits: commit 809236ed826b67328409e008313dea87de6d5243 Author: Andreas Heinisch AuthorDate: Wed Dec 8 16:09:23 2021 +0100 Commit: Andreas Heinisch CommitDate: Sat Dec 11 16:57:57 2021 +0100 tdf#145764 - BASIC IDE Home Key: move cursor to the beginning/first character Pressing the Home Key moves the cursor to the first character in the line, whereas pressing it at line start moves it to the first character in that line. Change-Id: I8eabb6d01b1a4de0d24bf064f82c83342ca91396 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126548 Tested-by: Jenkins Reviewed-by: Andreas Heinisch diff --git a/include/vcl/textview.hxx b/include/vcl/textview.hxx index 0983fa8eb660..29bc302d4d43 100644 --- a/include/vcl/textview.hxx +++ b/include/vcl/textview.hxx @@ -196,6 +196,7 @@ public: TextPaM CursorDown( const TextPaM& rPaM ); TextPaM CursorLeft( const TextPaM& rPaM, sal_uInt16 nCharacterIteratorMode ); TextPaM CursorRight( const TextPaM& rPaM, sal_uInt16 nCharacterIteratorMode ); +TextPaM CursorFirstWord( const TextPaM& rPaM ); TextPaM CursorWordLeft( const TextPaM& rPaM ); TextPaM CursorWordRight( const TextPaM& rPaM ); TextPaM CursorStartOfLine( const TextPaM& rPaM ); diff --git a/vcl/source/edit/textview.cxx b/vcl/source/edit/textview.cxx index 3c94e6fa6e1e..b295b78af8b0 100644 --- a/vcl/source/edit/textview.cxx +++ b/vcl/source/edit/textview.cxx @@ -1016,7 +1016,11 @@ TextSelection const & TextView::ImpMoveCursor( const KeyEvent& rKeyEvent ) break; case KEY_DOWN: aPaM = CursorDown( aPaM ); break; -case KEY_HOME: aPaM = bCtrl ? CursorStartOfDoc() : CursorStartOfLine( aPaM ); +case KEY_HOME: +// tdf#145764 - move cursor to the beginning or first character in the same line +aPaM = bCtrl ? CursorStartOfDoc() + : aPaM.GetIndex() == 0 ? CursorFirstWord( aPaM ) + : CursorStartOfLine( aPaM ); break; case KEY_END: aPaM = bCtrl ? CursorEndOfDoc() : CursorEndOfLine( aPaM ); break; @@ -1156,6 +1160,17 @@ TextPaM TextView::CursorRight( const TextPaM& rPaM, sal_uInt16 nCharacterIterato return aPaM; } +TextPaM TextView::CursorFirstWord( const TextPaM& rPaM ) +{ +TextPaM aPaM(rPaM); +TextNode* pNode = mpImpl->mpTextEngine->mpDoc->GetNodes()[aPaM.GetPara()].get(); + +css::uno::Reference xBI = mpImpl->mpTextEngine->GetBreakIterator(); +aPaM.GetIndex() = xBI->nextWord(pNode->GetText(), 0, mpImpl->mpTextEngine->GetLocale(), css::i18n::WordType::ANYWORD_IGNOREWHITESPACES).startPos; + +return aPaM; +} + TextPaM TextView::CursorWordLeft( const TextPaM& rPaM ) { TextPaM aPaM( rPaM );
[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - 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 ea229b09c3de7edb8fcb01a727b656f4d35821d4 Author: Justin Luth AuthorDate: Wed Dec 8 14:22:01 2021 +0200 Commit: Justin Luth CommitDate: Sat Dec 11 16:56:17 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 (cherry picked from commit 297ab561c6754f89326a1e8ce1751233669578d7) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126668 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 8fbe40a10ac9..32f94549325b 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: fpicker/source framework/source vcl/source vcl/unx
fpicker/source/office/fileview.cxx |2 +- framework/source/loadenv/loadenv.cxx |2 +- vcl/source/app/salvtables.cxx|2 +- vcl/unx/gtk4/convert3to4.cxx |2 +- 4 files changed, 4 insertions(+), 4 deletions(-) New commits: commit 0040076af3e1f45f43435d83335ef8cee8e6ab0c Author: Andrea Gelmini AuthorDate: Sat Dec 11 12:45:01 2021 +0100 Commit: Adolfo Jayme Barrientos CommitDate: Sat Dec 11 16:05:03 2021 +0100 Fix typos Change-Id: I8e6db5dfb5285e45f862fadf09ecb4142be6e075 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126659 Reviewed-by: Julien Nabet Tested-by: Jenkins diff --git a/fpicker/source/office/fileview.cxx b/fpicker/source/office/fileview.cxx index 411f20d3d5b5..7086d17597a9 100644 --- a/fpicker/source/office/fileview.cxx +++ b/fpicker/source/office/fileview.cxx @@ -1151,7 +1151,7 @@ SvtFileView_Impl::SvtFileView_Impl(SvtFileView* pAntiImpl, weld::Window* pTopLev { weld::TreeView* pWidget = mxView->getWidget(); -// set the width to something small so its the parent that decides the final +// set the width to something small so it's the parent that decides the final // width Size aSize(42, pWidget->get_height_rows(7)); pWidget->set_size_request(aSize.Width(), aSize.Height()); diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx index 45cc86ad582e..12cc84b7dab4 100644 --- a/framework/source/loadenv/loadenv.cxx +++ b/framework/source/loadenv/loadenv.cxx @@ -980,7 +980,7 @@ bool LoadEnv::impl_filterHasInteractiveDialog() const if (m_aURL.Arguments == "Interactive") return true; -// unless (tdf#116277) its the labels/business cards slave frame +// unless (tdf#116277) it's the labels/business cards slave frame if (m_aURL.Arguments.indexOf("slot=") != -1) return true; diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index a35c90fef9a1..e2599afe1b0b 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -3566,7 +3566,7 @@ void SalInstanceTreeView::InvalidateModelEntry(SvTreeListEntry* pEntry) void SalInstanceTreeView::do_set_toggle(SvTreeListEntry* pEntry, TriState eState, int col) { assert(col >= 0 && o3tl::make_unsigned(col) < pEntry->ItemCount()); -// if its the placeholder to allow a blank column, replace it now +// if it's the placeholder to allow a blank column, replace it now if (pEntry->GetItem(col).GetType() != SvLBoxItemType::Button) { SvLBoxButtonData* pData = m_bTogglesAsRadio ? &m_aRadioButtonData : &m_aCheckButtonData; diff --git a/vcl/unx/gtk4/convert3to4.cxx b/vcl/unx/gtk4/convert3to4.cxx index 5b6e1f7780e2..f975196062b7 100644 --- a/vcl/unx/gtk4/convert3to4.cxx +++ b/vcl/unx/gtk4/convert3to4.cxx @@ -1316,7 +1316,7 @@ ConvertResult Convert3To4(const css::uno::Reference& xNode // for GtkMenuButton if this is a gearmenu with just an icon // then "icon-name" is used for the indicator and there is // expected to be no text. If there is a GtkPicture then treat -// this like a GtkButton and presumably its a ToggleMenuButton +// this like a GtkButton and presumably it's a ToggleMenuButton // and the relocation of contents happens in the builder if (sClass == "GtkMenuButton") {
[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - helpcontent2
helpcontent2 |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 8c752abcdfbb09c039b4b9364ca415346ee0d3b0 Author: Rafael Lima AuthorDate: Sat Dec 11 16:53:50 2021 +0200 Commit: Gerrit Code Review CommitDate: Sat Dec 11 15:53:50 2021 +0100 Update git submodules * Update helpcontent2 from branch 'libreoffice-7-3' to 3cff9e221a47781e5c5a096f597b79b20bf63fa9 - Silence strings for l10n in sbasic/shared (Part 2) Change-Id: Ia14a0773d1dc13eaf8737eca3f68594eb1bb8054 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126670 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos (cherry picked from commit fa7fd622849d9e31d3f27e3762b0a0e578838cc0) Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126671 diff --git a/helpcontent2 b/helpcontent2 index ca76e7f693ff..3cff9e221a47 16 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit ca76e7f693ffe416833bea1e86689aa21646a980 +Subproject commit 3cff9e221a47781e5c5a096f597b79b20bf63fa9
[Libreoffice-commits] help.git: Branch 'libreoffice-7-3' - source/text
source/text/sbasic/shared/03020406.xhp |2 +- source/text/sbasic/shared/03020407.xhp |2 +- source/text/sbasic/shared/03020408.xhp |4 ++-- source/text/sbasic/shared/03020409.xhp |2 +- source/text/sbasic/shared/03020412.xhp |2 +- source/text/sbasic/shared/03020413.xhp |2 +- source/text/sbasic/shared/03020414.xhp |2 +- source/text/sbasic/shared/03020415.xhp |2 +- source/text/sbasic/shared/03030101.xhp |2 +- source/text/sbasic/shared/03030111.xhp |2 +- source/text/sbasic/shared/03030112.xhp |2 +- source/text/sbasic/shared/03030113.xhp |2 +- source/text/sbasic/shared/03030114.xhp |2 +- source/text/sbasic/shared/03030115.xhp |2 +- source/text/sbasic/shared/03030116.xhp |2 +- source/text/sbasic/shared/03030120.xhp |2 +- source/text/sbasic/shared/03030130.xhp |2 +- source/text/sbasic/shared/03030201.xhp |6 +++--- source/text/sbasic/shared/03030202.xhp |6 +++--- source/text/sbasic/shared/03030204.xhp |2 +- source/text/sbasic/shared/03030205.xhp |2 +- source/text/sbasic/shared/03030206.xhp |2 +- source/text/sbasic/shared/03050500.xhp |2 +- source/text/sbasic/shared/03060100.xhp |2 +- source/text/sbasic/shared/03060200.xhp |2 +- 25 files changed, 30 insertions(+), 30 deletions(-) New commits: commit 3cff9e221a47781e5c5a096f597b79b20bf63fa9 Author: Rafael Lima AuthorDate: Sat Dec 11 15:22:46 2021 +0200 Commit: Adolfo Jayme Barrientos CommitDate: Sat Dec 11 15:53:48 2021 +0100 Silence strings for l10n in sbasic/shared (Part 2) Change-Id: Ia14a0773d1dc13eaf8737eca3f68594eb1bb8054 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126670 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos (cherry picked from commit fa7fd622849d9e31d3f27e3762b0a0e578838cc0) Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126671 diff --git a/source/text/sbasic/shared/03020406.xhp b/source/text/sbasic/shared/03020406.xhp index 3fb2923e8..5dfe9e5b7 100644 --- a/source/text/sbasic/shared/03020406.xhp +++ b/source/text/sbasic/shared/03020406.xhp @@ -40,7 +40,7 @@ Syntax: -FileCopy TextFrom As String, TextTo As String +FileCopy TextFrom As String, TextTo As String Parameters: diff --git a/source/text/sbasic/shared/03020407.xhp b/source/text/sbasic/shared/03020407.xhp index d198d3407..e27be1a48 100644 --- a/source/text/sbasic/shared/03020407.xhp +++ b/source/text/sbasic/shared/03020407.xhp @@ -40,7 +40,7 @@ Syntax: -FileDateTime (Text As String) +FileDateTime (Text As String) Parameters: diff --git a/source/text/sbasic/shared/03020408.xhp b/source/text/sbasic/shared/03020408.xhp index 8e443a6db..fe3126e4a 100644 --- a/source/text/sbasic/shared/03020408.xhp +++ b/source/text/sbasic/shared/03020408.xhp @@ -40,11 +40,11 @@ Syntax: -FileLen (Text As String) +FileLen (Text As String) Return value: -Long +Long Parameters: Text: Any string expression that contains an unambiguous file specification. You can also use URL notation. diff --git a/source/text/sbasic/shared/03020409.xhp b/source/text/sbasic/shared/03020409.xhp index 0eaf7067b..e7e6bc67a 100644 --- a/source/text/sbasic/shared/03020409.xhp +++ b/source/text/sbasic/shared/03020409.xhp @@ -40,7 +40,7 @@ Syntax: -GetAttr (Text As String) +GetAttr (Text As String) Return value: diff --git a/source/text/sbasic/shared/03020412.xhp b/source/text/sbasic/shared/03020412.xhp index a754376d6..69a08e3e7 100644 --- a/source/text/sbasic/shared/03020412.xhp +++ b/source/text/sbasic/shared/03020412.xhp @@ -40,7 +40,7 @@ Syntax: -Name OldName As String As NewName As String +Name OldName As String As NewName As String Parameters: diff --git a/source/text/sbasic/shared/03020413.xhp b/source/text/sbasic/shared/03020413.xhp index 7d38f2cc3..1d9b9e9d2 100644 --- a/source/text/sbasic/shared/03020413.xhp +++ b/source/text/sbasic/shared/03020413.xhp @@ -41,7 +41,7 @@ RmDir Statement diagram -RmDir Text As String +RmDir Text As String diff --git a/source/text/sbasic/shared/03020414.xhp b/source/text/sbasic/shared/03020414.xhp index e4cd4814d..384bb6fd1 100644 --- a/source/text/sbasic/shared/03020414.xhp +++ b/source/text/sbasic/shared/03020414.xhp @@ -40,7 +40,7 @@ Syntax: -SetAttr FileName As String, Attribute As Integer +SetAttr FileName As String, Attribute As Integer Parameters: diff --git a/source/text/sbasic/shared/03020415.xhp b/source/text/sbasic/shared/03020415.xhp index 162e1bf9b..498c82d81 100644 --- a/source/text/sbasic/shared/03020415.xhp +++ b/source/text/sbasic/shared/03020415.xhp @@ -40,7 +40,7 @@ Syntax: -FileExists(FileName As String | DirectoryName As String) +FileExists(FileName As String | DirectoryName As String) Return value: diff --git a/source/text/sbasic/shared/03030101.xhp b/source/text/sbasic/shared/03030101.xhp index 2ee2203c3..e9d9b2619 100644 --- a/source/text/sbasic/shared/03030101.xhp +++ b/sour
[Libreoffice-commits] core.git: helpcontent2
helpcontent2 |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit ecdb4b347014ed38a5e069fb802b5cb8cfd42a70 Author: Rafael Lima AuthorDate: Sat Dec 11 16:52:41 2021 +0200 Commit: Gerrit Code Review CommitDate: Sat Dec 11 15:52:41 2021 +0100 Update git submodules * Update helpcontent2 from branch 'master' to fa7fd622849d9e31d3f27e3762b0a0e578838cc0 - Silence strings for l10n in sbasic/shared (Part 2) Change-Id: Ia14a0773d1dc13eaf8737eca3f68594eb1bb8054 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126670 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/helpcontent2 b/helpcontent2 index bba53dc2eb06..fa7fd622849d 16 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit bba53dc2eb06941ab4e9b9c22722b22c19cd3698 +Subproject commit fa7fd622849d9e31d3f27e3762b0a0e578838cc0
[Libreoffice-commits] help.git: source/text
source/text/sbasic/shared/03020406.xhp |2 +- source/text/sbasic/shared/03020407.xhp |2 +- source/text/sbasic/shared/03020408.xhp |4 ++-- source/text/sbasic/shared/03020409.xhp |2 +- source/text/sbasic/shared/03020412.xhp |2 +- source/text/sbasic/shared/03020413.xhp |2 +- source/text/sbasic/shared/03020414.xhp |2 +- source/text/sbasic/shared/03020415.xhp |2 +- source/text/sbasic/shared/03030101.xhp |2 +- source/text/sbasic/shared/03030111.xhp |2 +- source/text/sbasic/shared/03030112.xhp |2 +- source/text/sbasic/shared/03030113.xhp |2 +- source/text/sbasic/shared/03030114.xhp |2 +- source/text/sbasic/shared/03030115.xhp |2 +- source/text/sbasic/shared/03030116.xhp |2 +- source/text/sbasic/shared/03030120.xhp |2 +- source/text/sbasic/shared/03030130.xhp |2 +- source/text/sbasic/shared/03030201.xhp |6 +++--- source/text/sbasic/shared/03030202.xhp |6 +++--- source/text/sbasic/shared/03030204.xhp |2 +- source/text/sbasic/shared/03030205.xhp |2 +- source/text/sbasic/shared/03030206.xhp |2 +- source/text/sbasic/shared/03050500.xhp |2 +- source/text/sbasic/shared/03060100.xhp |2 +- source/text/sbasic/shared/03060200.xhp |2 +- 25 files changed, 30 insertions(+), 30 deletions(-) New commits: commit fa7fd622849d9e31d3f27e3762b0a0e578838cc0 Author: Rafael Lima AuthorDate: Sat Dec 11 15:22:46 2021 +0200 Commit: Adolfo Jayme Barrientos CommitDate: Sat Dec 11 15:52:40 2021 +0100 Silence strings for l10n in sbasic/shared (Part 2) Change-Id: Ia14a0773d1dc13eaf8737eca3f68594eb1bb8054 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/126670 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/source/text/sbasic/shared/03020406.xhp b/source/text/sbasic/shared/03020406.xhp index 3fb2923e8..5dfe9e5b7 100644 --- a/source/text/sbasic/shared/03020406.xhp +++ b/source/text/sbasic/shared/03020406.xhp @@ -40,7 +40,7 @@ Syntax: -FileCopy TextFrom As String, TextTo As String +FileCopy TextFrom As String, TextTo As String Parameters: diff --git a/source/text/sbasic/shared/03020407.xhp b/source/text/sbasic/shared/03020407.xhp index d198d3407..e27be1a48 100644 --- a/source/text/sbasic/shared/03020407.xhp +++ b/source/text/sbasic/shared/03020407.xhp @@ -40,7 +40,7 @@ Syntax: -FileDateTime (Text As String) +FileDateTime (Text As String) Parameters: diff --git a/source/text/sbasic/shared/03020408.xhp b/source/text/sbasic/shared/03020408.xhp index 8e443a6db..fe3126e4a 100644 --- a/source/text/sbasic/shared/03020408.xhp +++ b/source/text/sbasic/shared/03020408.xhp @@ -40,11 +40,11 @@ Syntax: -FileLen (Text As String) +FileLen (Text As String) Return value: -Long +Long Parameters: Text: Any string expression that contains an unambiguous file specification. You can also use URL notation. diff --git a/source/text/sbasic/shared/03020409.xhp b/source/text/sbasic/shared/03020409.xhp index 0eaf7067b..e7e6bc67a 100644 --- a/source/text/sbasic/shared/03020409.xhp +++ b/source/text/sbasic/shared/03020409.xhp @@ -40,7 +40,7 @@ Syntax: -GetAttr (Text As String) +GetAttr (Text As String) Return value: diff --git a/source/text/sbasic/shared/03020412.xhp b/source/text/sbasic/shared/03020412.xhp index a754376d6..69a08e3e7 100644 --- a/source/text/sbasic/shared/03020412.xhp +++ b/source/text/sbasic/shared/03020412.xhp @@ -40,7 +40,7 @@ Syntax: -Name OldName As String As NewName As String +Name OldName As String As NewName As String Parameters: diff --git a/source/text/sbasic/shared/03020413.xhp b/source/text/sbasic/shared/03020413.xhp index 7d38f2cc3..1d9b9e9d2 100644 --- a/source/text/sbasic/shared/03020413.xhp +++ b/source/text/sbasic/shared/03020413.xhp @@ -41,7 +41,7 @@ RmDir Statement diagram -RmDir Text As String +RmDir Text As String diff --git a/source/text/sbasic/shared/03020414.xhp b/source/text/sbasic/shared/03020414.xhp index e4cd4814d..384bb6fd1 100644 --- a/source/text/sbasic/shared/03020414.xhp +++ b/source/text/sbasic/shared/03020414.xhp @@ -40,7 +40,7 @@ Syntax: -SetAttr FileName As String, Attribute As Integer +SetAttr FileName As String, Attribute As Integer Parameters: diff --git a/source/text/sbasic/shared/03020415.xhp b/source/text/sbasic/shared/03020415.xhp index 162e1bf9b..498c82d81 100644 --- a/source/text/sbasic/shared/03020415.xhp +++ b/source/text/sbasic/shared/03020415.xhp @@ -40,7 +40,7 @@ Syntax: -FileExists(FileName As String | DirectoryName As String) +FileExists(FileName As String | DirectoryName As String) Return value: diff --git a/source/text/sbasic/shared/03030101.xhp b/source/text/sbasic/shared/03030101.xhp index 2ee2203c3..e9d9b2619 100644 --- a/source/text/sbasic/shared/03030101.xhp +++ b/source/text/sbasic/shared/03030101.xhp @@ -37,7 +37,7 @@ -DateSerial (year, month, day) +DateSerial (Year, Month, Day) Date diff
[VS Code] [vscode-cpptools plugin] Intellisense - Dim Inactive Regions: Where does vscode-cpptools get the values for variables used in "#IF" e.g. "GTK_CHECK_VERSION"?
Hi there, tl;dr see the discussion I created here https://github.com/microsoft/vscode-cpptools/discussions/8523. However, I wanted to discuss that topic here aswell, because it may not be a generic problem of the plugin, but maybe be dependent only on the LO project. Additionally, users buovjaga and mikekaganski on #libreoffice-dev pointed out that sending to the mailing list would be a good idea. I have the problem that vscode-cpptools "dim inactive regions" option dims the region in the statement `#if GTK_CHECK_VERSION(4,0,0)` and additionally Intellisense also does not work in that region. When changing the statement to `#if GTK_CHECK_VERSION(3,0,0)` the respective region is not dimmed anymore and also IntelliSense works again. However when running the application, the following code `cout << gtk_get_major_version() << "." << gtk_get_minor_version() << "." << gtk_get_micro_version() << endl;` returns `4.5.0` Therefore, I know for a fact that at compile time level my application uses GTK 4.5.0. So where does the vscode-cpptools know the GTK version from and therefore is able to judge `GTK_CHECK_VERSION(4,0,0)`? I also looked into my project's `.vscode` folder into the `c_cpp_properties.json` file and added the GTK4 library install dir `"/usr/local/include/gtk-4.0"` as follows: ``` { "configurations": [ { "name": "Linux", "includePath": [ "${default}", "/usr/local/include/gtk-4.0", "/usr/include/gtk-3.0", "/usr/include/glib-2.0", "/usr/lib/x86_64-linux-gnu/glib-2.0/include", "/usr/include/pango-1.0" ], "defines": [], "cStandard": "c17", "intelliSenseMode": "linux-clang-x64" } ], "version": 4 } ``` But this did not have the desired effect; still the respective code block is dimmed and Intellisense does not work. "So why not turn off the feature "Dim inactive regions"?", I thought. Well, this makes the code undimmed (yay) BUT IntelliSense STILL does not work (nay), which is a major problem for me. Can you help me out or is it a bug that IntelliSense does not work EVEN if the "dim inactive regions" option is disabled? Kind regards, Christian
[Libreoffice-commits] core.git: 2 commits - include/sfx2 sfx2/source sw/inc sw/source
include/sfx2/viewsh.hxx |4 +++- sfx2/source/view/viewsh.cxx | 23 --- sw/inc/pch/precompiled_msword.hxx| 18 +++--- sw/inc/pch/precompiled_sw.hxx| 32 +++- sw/inc/pch/precompiled_swui.hxx | 28 +++- sw/inc/pch/precompiled_vbaswobj.hxx | 17 - sw/source/uibase/docvw/edtwin.cxx| 21 + sw/source/uibase/inc/uitool.hxx |5 ++--- sw/source/uibase/uiview/viewling.cxx | 14 -- sw/source/uibase/utlui/uitool.cxx| 14 -- 10 files changed, 115 insertions(+), 61 deletions(-) New commits: commit 277a5ac359801712d4b8448ae096d45a658b Author: Caolán McNamara AuthorDate: Sat Dec 11 13:00:44 2021 + Commit: Caolán McNamara CommitDate: Sat Dec 11 15:25:18 2021 +0100 update sw pches Change-Id: I61fe51e95c629adcf90a9ea3d1783380039fdd5e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126661 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sw/inc/pch/precompiled_msword.hxx b/sw/inc/pch/precompiled_msword.hxx index 7f54a5ed9d5d..285828858c8b 100644 --- a/sw/inc/pch/precompiled_msword.hxx +++ b/sw/inc/pch/precompiled_msword.hxx @@ -13,7 +13,7 @@ manual changes will be rewritten by the next run of update_pch.sh (which presumably also fixes all possible problems, so it's usually better to use it). - Generated on 2021-09-28 05:48:51 using: + Generated on 2021-12-11 12:58:53 using: ./bin/update_pch sw msword --cutoff=4 --exclude:system --include:module --include:local If after updating build fails, use the following command to locate conflicting headers: @@ -47,6 +47,7 @@ #include #include #include +#include #include #include #include @@ -139,6 +140,7 @@ #include #include #include +#include #include #include #include @@ -216,6 +218,7 @@ #include #include #include +#include #include #include #include @@ -256,12 +259,14 @@ #include #include #include +#include #include #include #include #include #include #include +#include #include #include #include @@ -271,7 +276,6 @@ #include #include #include -#include #include #include #include @@ -281,6 +285,7 @@ #include #include #include +#include #include #include #include @@ -368,14 +373,17 @@ #include #include #include +#include #include #include #include +#include #include #include #include #include -#include +#include +#include #include #include #include @@ -526,6 +534,9 @@ #include #include #include +#include +#include +#include #endif // PCH_LEVEL >= 3 #if PCH_LEVEL >= 4 #include @@ -584,6 +595,7 @@ #include #include #include +#include #include #include #include diff --git a/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx index a85fb672873a..7955c0a50a0c 100644 --- a/sw/inc/pch/precompiled_sw.hxx +++ b/sw/inc/pch/precompiled_sw.hxx @@ -13,7 +13,7 @@ manual changes will be rewritten by the next run of update_pch.sh (which presumably also fixes all possible problems, so it's usually better to use it). - Generated on 2021-04-08 13:52:12 using: + Generated on 2021-12-11 12:59:04 using: ./bin/update_pch sw sw --cutoff=7 --exclude:system --exclude:module --include:local If after updating build fails, use the following command to locate conflicting headers: @@ -35,7 +35,9 @@ #include #include #include +#include #include +#include #include #include #include @@ -50,6 +52,12 @@ #include #include #include +#include +#include +#include +#include +#include +#include #include #include #endif // PCH_LEVEL >= 1 @@ -57,10 +65,8 @@ #include #include #include -#include #include #include -#include #include #include #include @@ -77,9 +83,11 @@ #include #include #include +#include #include #include #include +#include #include #include #include @@ -148,6 +156,7 @@ #include #include #include +#include #include #include #include @@ -192,7 +201,6 @@ #include #include #include -#include #include #include #include @@ -204,15 +212,15 @@ #include #include #include -#include #include #include #include #include -#include +#include #include #include #include +#include #include #include #include @@ -221,7 +229,6 @@ #include #include #include -#include #include #include #include @@ -231,7 +238,7 @@ #include #include #include -#include +#include #include #include #include @@ -266,6 +273,7 @@ #include #include #include +#include #include #include #include @@ -291,6 +299,7 @@ #include #include #include +#include #include #include #include @@ -339,8 +348,10 @@ #include #include #include +#include #include #include +#include #include #include #include @@ -376,7 +387,
[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - sw/qa sw/source writerfilter/source
sw/qa/extras/layout/layout2.cxx |2 - sw/qa/extras/ooxmlexport/ooxmlexport13.cxx| 33 -- sw/source/core/doc/docredln.cxx |2 - writerfilter/source/dmapper/DomainMapper_Impl.cxx |1 4 files changed, 32 insertions(+), 6 deletions(-) New commits: commit 9f41f860fc084bbfe7aef0691a061c6b9e99e04b Author: László Németh AuthorDate: Fri Dec 10 10:37:33 2021 +0100 Commit: László Németh CommitDate: Sat Dec 11 15:04:27 2021 +0100 tdf#146140 sw DOCX import: fix moveFrom regression with broken text content (Also a small clean-up: increase the character limit for tracked text moving detection: Only 2 or more (non-whitespace) character deletions are checked for it, because single characters are often typos or some control-like characters, e.g. soft hyphen, not real text movings.) Details of the regression: commit d32d9a2b3c5e3963f4a18f6c7bbf50fab2e9b2be "tdf#123460 DOCX track changes: moveFrom completely" fixed the missing redline import of the end of the moved paragraphs, but paragraph end was imported as w:del, not w:moveFrom explicitly. From commit f51fa7534421a195a58b4a737a2e836d8c25ba81 "tdf#145718 sw, DOCX import: complete tracked text moving" this resulted two deletions (a moved one and a plain one) instead of the previous single one. Moreover, exporting these double deletions at the same position to ODT, raised a back-compatibility issue with broken text content, see tdf#107292 (solved recently, but not in older LibreOffice versions). Removing the explicit w:del code path in writerfilter, it solved the regression from commit f51fa7534421a195a58b4a737a2e836d8c25ba81 "tdf#145718 sw, DOCX import: complete tracked text moving". See also commit 9e1e88ad5cf2dc0e9b188c60930445652a6c7519 "tdf#145720 DOCX export: fix loss of tracked moving". Change-Id: I15bfc83b87dd42a762ff84edf5bae765fe02a5ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126631 Tested-by: Jenkins Reviewed-by: László Németh (cherry picked from commit 692bc46b25db61176b4ced7b7beffeca7d55068e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126669 Tested-by: László Németh diff --git a/sw/qa/extras/layout/layout2.cxx b/sw/qa/extras/layout/layout2.cxx index 92910435383e..10d01fa05e33 100644 --- a/sw/qa/extras/layout/layout2.cxx +++ b/sw/qa/extras/layout/layout2.cxx @@ -337,7 +337,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testRedlineMovingDOCX) SwEditShell* const pEditShell(pDoc->GetEditShell()); // This was 2 (moveFrom and moveTo joined other redlines) -CPPUNIT_ASSERT_EQUAL(static_cast(6), pEditShell->GetRedlineCount()); +CPPUNIT_ASSERT_EQUAL(static_cast(5), pEditShell->GetRedlineCount()); // Dump the rendering of the first page as an XML file. std::shared_ptr xMetaFile = pShell->GetPreviewMetaFile(); diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx index 6600928f37e9..609d3f7f30b6 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx @@ -766,10 +766,37 @@ DECLARE_OOXMLEXPORT_TEST(testTdf123460, "tdf123460.docx") CPPUNIT_ASSERT(hasProperty(getRun(getParagraph(2), 2), "RedlineType")); CPPUNIT_ASSERT_EQUAL(OUString("Delete"),getProperty(getRun(getParagraph(2), 2), "RedlineType")); CPPUNIT_ASSERT_EQUAL(true, getRun( getParagraph( 2 ), 3 )->getString().endsWith("tellus.")); +CPPUNIT_ASSERT(hasProperty(getRun(getParagraph(2), 4), "Bookmark")); // deleted paragraph mark at the end of the second paragraph -CPPUNIT_ASSERT(hasProperty(getRun(getParagraph(2), 5), "RedlineType")); - CPPUNIT_ASSERT_EQUAL(OUString("Delete"),getProperty(getRun(getParagraph(2), 5), "RedlineType")); -CPPUNIT_ASSERT_EQUAL( OUString( "" ), getRun( getParagraph( 2 ), 6 )->getString()); +if (mbExported) +{ +// there is no run after the MoveBookmark +bool bCaught = false; +try +{ +getRun( getParagraph( 2 ), 5 ); +} +catch (container::NoSuchElementException&) +{ +bCaught = true; +} +CPPUNIT_ASSERT_EQUAL(true, bCaught); +} +} + +CPPUNIT_TEST_FIXTURE(Test, testTdf146140) +{ +loadAndSave("tdf123460.docx"); +CPPUNIT_ASSERT_EQUAL(1, getPages()); +xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml"); +CPPUNIT_ASSERT(pXmlDoc); + +// This was 1 (put end of paragraph of the previous moveFrom into a w:del, +// resulting double deletions at the same position, which is an +// ODT back-compatibility issue described in tdf#107292) +assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr/w:rPr/w:del", 0); +// This was 0 +assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr/w:rPr/w:moveFrom", 1); } //tdf#125298: fix charlimit restrictions
[Libreoffice-commits] core.git: svtools/source sw/qa
svtools/source/svrtf/svparser.cxx| 20 sw/qa/extras/htmlimport/data/emojis16BE.html |binary sw/qa/extras/htmlimport/htmlimport.cxx |8 3 files changed, 28 insertions(+) New commits: commit 21154ea8c450f9f5568b32123d34a20e498a9290 Author: Mike Kaganski AuthorDate: Sat Dec 11 12:53:26 2021 +0300 Commit: Mike Kaganski CommitDate: Sat Dec 11 12:21:57 2021 +0100 tdf#146173: combine non-BMP characters' surrogates correctly Change-Id: Ib3af1f9e461f133d2f5b09b9db4fb87c1ede0b9f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126658 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/svtools/source/svrtf/svparser.cxx b/svtools/source/svrtf/svparser.cxx index 0fec7a97097e..dd5068976ff7 100644 --- a/svtools/source/svrtf/svparser.cxx +++ b/svtools/source/svrtf/svparser.cxx @@ -247,7 +247,27 @@ sal_uInt32 SvParser::GetNextChar() rInput.ReadUtf16(cUC); bErr = !rInput.good(); if( !bErr ) +{ c = cUC; +if (rtl::isHighSurrogate(cUC)) +{ +const sal_uInt64 nPos = rInput.Tell(); +rInput.ReadUtf16(cUC); +bErr = !rInput.good(); +if (!bErr) +{ +if (rtl::isLowSurrogate(cUC)) +c = rtl::combineSurrogates(c, cUC); +else +rInput.Seek(nPos); // process lone high surrogate +} +else +{ +bErr = false; // process lone high surrogate +rInput.Seek(nPos); // maybe step 1 byte back +} +} +} } else { diff --git a/sw/qa/extras/htmlimport/data/emojis16BE.html b/sw/qa/extras/htmlimport/data/emojis16BE.html new file mode 100644 index ..023aee1cb20e Binary files /dev/null and b/sw/qa/extras/htmlimport/data/emojis16BE.html differ diff --git a/sw/qa/extras/htmlimport/htmlimport.cxx b/sw/qa/extras/htmlimport/htmlimport.cxx index a8b9a4df65a4..00e2ec99191f 100644 --- a/sw/qa/extras/htmlimport/htmlimport.cxx +++ b/sw/qa/extras/htmlimport/htmlimport.cxx @@ -528,6 +528,14 @@ CPPUNIT_TEST_FIXTURE(SwModelTestBase, testOleImgSvg) CPPUNIT_ASSERT_EQUAL(static_cast(1), xObjects->getCount()); } +CPPUNIT_TEST_FIXTURE(HtmlImportTest, testUTF16_nonBMP) +{ +load(mpTestDocumentPath, "emojis16BE.html"); +// tdf#146173: non-BMP characters' surrogates didn't combine correctly +CPPUNIT_ASSERT_EQUAL(OUString(u"a text with emojis: 🌾 ☀👨🏼🌾🏃🏼♂️🤙🏽🔍"), + getParagraph(1)->getString()); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - sw/qa sw/source writerfilter/source
sw/qa/extras/ooxmlexport/ooxmlexport11.cxx| 86 -- sw/qa/extras/ooxmlexport/ooxmlexport13.cxx| 25 +- sw/source/filter/ww8/docxattributeoutput.cxx | 79 sw/source/filter/ww8/docxattributeoutput.hxx |9 +- sw/source/filter/ww8/docxexport.cxx |5 - sw/source/filter/ww8/docxexport.hxx |2 sw/source/filter/ww8/rtfexport.cxx|3 sw/source/filter/ww8/rtfexport.hxx|3 sw/source/filter/ww8/wrtw8nds.cxx | 24 +- sw/source/filter/ww8/wrtww8.cxx |2 sw/source/filter/ww8/wrtww8.hxx |6 - writerfilter/source/dmapper/DomainMapper.cxx |2 writerfilter/source/dmapper/DomainMapper_Impl.cxx | 19 writerfilter/source/dmapper/DomainMapper_Impl.hxx |3 14 files changed, 199 insertions(+), 69 deletions(-) New commits: commit 0ad78d7c1148fd7cde305eb34ab3a921a18632a0 Author: László Németh AuthorDate: Thu Dec 2 17:45:46 2021 +0100 Commit: László Németh CommitDate: Sat Dec 11 10:47:05 2021 +0100 tdf#145720 DOCX export: fix loss of tracked moving of documents created in MSO to keep interoperability. Export moved redlines as moveFrom/moveTo instead of del/ins elements (also for newly created tracked moving). Export "MoveBookmark" elements moveFromRangeStart, moveFromRangeEnd, moveToRangeStart, moveToRangeEnd, which imported from DOCX documents created in MSO. Without them, moveFrom/moveTo elements were imported as plain deletion or insertion in MSO. Note: MoveBookmark elements were imported and exported as collapsed plain bookmarks. Now keep their ranges, also store the information of moveFrom/moveTo for correct export. In the export filter, mandatory author and date of the tracking information restored from RedlineData of the first redline within the MoveBookmark, if it's possible. Follow-up to commit f51fa7534421a195a58b4a737a2e836d8c25ba81 "tdf#145718 sw, DOCX import: complete tracked text moving". Change-Id: I54242453a7f7d8f73ea074fc74e8e7bc86d07d01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126258 Tested-by: László Németh Reviewed-by: László Németh (cherry picked from commit 9e1e88ad5cf2dc0e9b188c60930445652a6c7519, commit bbb09ebda08fec0702de0fb50dbe630acf73af2f and commit 3efde47ec9ee091479c04129696f99dc934c3f64) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126290 Tested-by: Jenkins diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx index 8cb43ffe3e2c..5fae2dab136d 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx @@ -885,9 +885,9 @@ DECLARE_OOXMLEXPORT_TEST(testTdf104797, "tdf104797.docx") // check moveFrom and moveTo CPPUNIT_ASSERT_EQUAL( OUString( "Will this sentence be duplicated?" ), getParagraph( 1 )->getString()); CPPUNIT_ASSERT_EQUAL( OUString( "" ), getRun( getParagraph( 1 ), 1 )->getString()); -CPPUNIT_ASSERT(hasProperty(getRun(getParagraph(1), 2), "RedlineType")); - CPPUNIT_ASSERT_EQUAL(OUString("Delete"),getProperty(getRun(getParagraph(1), 2), "RedlineType")); -CPPUNIT_ASSERT_EQUAL(true,getProperty(getRun(getParagraph(1), 2), "IsStart")); +CPPUNIT_ASSERT(hasProperty(getRun(getParagraph(1), 3), "RedlineType")); + CPPUNIT_ASSERT_EQUAL(OUString("Delete"),getProperty(getRun(getParagraph(1), 3), "RedlineType")); +CPPUNIT_ASSERT_EQUAL(true,getProperty(getRun(getParagraph(1), 3), "IsStart")); CPPUNIT_ASSERT_EQUAL( OUString( "This is a filler sentence. Will this sentence be duplicated ADDED STUFF?" ), getParagraph( 2 )->getString()); CPPUNIT_ASSERT_EQUAL( OUString( "" ), getRun( getParagraph( 2 ), 1 )->getString()); @@ -897,23 +897,39 @@ DECLARE_OOXMLEXPORT_TEST(testTdf104797, "tdf104797.docx") CPPUNIT_ASSERT_EQUAL(OUString("Insert"),getProperty(getRun(getParagraph(2), 3), "RedlineType")); CPPUNIT_ASSERT_EQUAL(true,getProperty(getRun(getParagraph(2), 3), "IsStart")); +CPPUNIT_ASSERT_EQUAL( OUString( " " ), getRun( getParagraph( 2 ), 4 )->getString()); +CPPUNIT_ASSERT_EQUAL( OUString( "" ), getRun( getParagraph( 2 ), 5 )->getString()); +CPPUNIT_ASSERT(hasProperty(getRun(getParagraph(2), 6), "RedlineType")); + CPPUNIT_ASSERT_EQUAL(OUString("Insert"),getProperty(getRun(getParagraph(2), 6), "RedlineType")); +CPPUNIT_ASSERT_EQUAL( OUString( "" ), getRun( getParagraph( 2 ), 7 )->getString()); +CPPUNIT_ASSERT(hasProperty(getRun(getParagraph(2), 7), "RedlineType")); +CPPUNIT_ASSERT_EQUAL(true,getProperty(getRun(getParagraph(2), 7), "IsStart")); +CPPUNIT_ASSERT_EQUAL( OUString( "Will this sentence be duplicated" ), getRun( getParagraph( 2 ), 8 )->getString()); +CPPUNIT_ASSERT_EQUAL( OUString( "
[Libreoffice-commits] core.git: sw/qa sw/source writerfilter/source
sw/qa/extras/layout/layout2.cxx |2 - sw/qa/extras/ooxmlexport/ooxmlexport13.cxx| 33 -- sw/source/core/doc/docredln.cxx |2 - writerfilter/source/dmapper/DomainMapper_Impl.cxx |1 4 files changed, 32 insertions(+), 6 deletions(-) New commits: commit 692bc46b25db61176b4ced7b7beffeca7d55068e Author: László Németh AuthorDate: Fri Dec 10 10:37:33 2021 +0100 Commit: László Németh CommitDate: Sat Dec 11 10:32:31 2021 +0100 tdf#146140 sw DOCX import: fix moveFrom regression with broken text content (Also a small clean-up: increase the character limit for tracked text moving detection: Only 2 or more (non-whitespace) character deletions are checked for it, because single characters are often typos or some control-like characters, e.g. soft hyphen, not real text movings.) Details of the regression: commit d32d9a2b3c5e3963f4a18f6c7bbf50fab2e9b2be "tdf#123460 DOCX track changes: moveFrom completely" fixed the missing redline import of the end of the moved paragraphs, but paragraph end was imported as w:del, not w:moveFrom explicitly. From commit f51fa7534421a195a58b4a737a2e836d8c25ba81 "tdf#145718 sw, DOCX import: complete tracked text moving" this resulted two deletions (a moved one and a plain one) instead of the previous single one. Moreover, exporting these double deletions at the same position to ODT, raised a back-compatibility issue with broken text content, see tdf#107292 (solved recently, but not in older LibreOffice versions). Removing the explicit w:del code path in writerfilter, it solved the regression from commit f51fa7534421a195a58b4a737a2e836d8c25ba81 "tdf#145718 sw, DOCX import: complete tracked text moving". See also commit 9e1e88ad5cf2dc0e9b188c60930445652a6c7519 "tdf#145720 DOCX export: fix loss of tracked moving". Change-Id: I15bfc83b87dd42a762ff84edf5bae765fe02a5ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126631 Tested-by: Jenkins Reviewed-by: László Németh diff --git a/sw/qa/extras/layout/layout2.cxx b/sw/qa/extras/layout/layout2.cxx index 92910435383e..10d01fa05e33 100644 --- a/sw/qa/extras/layout/layout2.cxx +++ b/sw/qa/extras/layout/layout2.cxx @@ -337,7 +337,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testRedlineMovingDOCX) SwEditShell* const pEditShell(pDoc->GetEditShell()); // This was 2 (moveFrom and moveTo joined other redlines) -CPPUNIT_ASSERT_EQUAL(static_cast(6), pEditShell->GetRedlineCount()); +CPPUNIT_ASSERT_EQUAL(static_cast(5), pEditShell->GetRedlineCount()); // Dump the rendering of the first page as an XML file. std::shared_ptr xMetaFile = pShell->GetPreviewMetaFile(); diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx index 6600928f37e9..609d3f7f30b6 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx @@ -766,10 +766,37 @@ DECLARE_OOXMLEXPORT_TEST(testTdf123460, "tdf123460.docx") CPPUNIT_ASSERT(hasProperty(getRun(getParagraph(2), 2), "RedlineType")); CPPUNIT_ASSERT_EQUAL(OUString("Delete"),getProperty(getRun(getParagraph(2), 2), "RedlineType")); CPPUNIT_ASSERT_EQUAL(true, getRun( getParagraph( 2 ), 3 )->getString().endsWith("tellus.")); +CPPUNIT_ASSERT(hasProperty(getRun(getParagraph(2), 4), "Bookmark")); // deleted paragraph mark at the end of the second paragraph -CPPUNIT_ASSERT(hasProperty(getRun(getParagraph(2), 5), "RedlineType")); - CPPUNIT_ASSERT_EQUAL(OUString("Delete"),getProperty(getRun(getParagraph(2), 5), "RedlineType")); -CPPUNIT_ASSERT_EQUAL( OUString( "" ), getRun( getParagraph( 2 ), 6 )->getString()); +if (mbExported) +{ +// there is no run after the MoveBookmark +bool bCaught = false; +try +{ +getRun( getParagraph( 2 ), 5 ); +} +catch (container::NoSuchElementException&) +{ +bCaught = true; +} +CPPUNIT_ASSERT_EQUAL(true, bCaught); +} +} + +CPPUNIT_TEST_FIXTURE(Test, testTdf146140) +{ +loadAndSave("tdf123460.docx"); +CPPUNIT_ASSERT_EQUAL(1, getPages()); +xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml"); +CPPUNIT_ASSERT(pXmlDoc); + +// This was 1 (put end of paragraph of the previous moveFrom into a w:del, +// resulting double deletions at the same position, which is an +// ODT back-compatibility issue described in tdf#107292) +assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr/w:rPr/w:del", 0); +// This was 0 +assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr/w:rPr/w:moveFrom", 1); } //tdf#125298: fix charlimit restrictions in bookmarknames and field references if they contain non-ascii characters diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx index 28d72
[Libreoffice-commits] core.git: 2 commits - vcl/inc vcl/source
vcl/inc/salgdi.hxx |7 ++- vcl/inc/salgdiimpl.hxx | 37 +++-- vcl/source/outdev/bitmapex.cxx |6 +++--- 3 files changed, 24 insertions(+), 26 deletions(-) New commits: commit b9e1d9fac994754e775899889cf601d303dba688 Author: Luboš Luňák AuthorDate: Wed Dec 8 09:43:13 2021 +0100 Commit: Luboš Luňák CommitDate: Sat Dec 11 10:14:53 2021 +0100 explain the intent of HasDrawTransformedBitmap() better Change-Id: I32d6cfb7358dae25109de4db3332797763abc7d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126506 Tested-by: Jenkins Reviewed-by: Luboš Luňák diff --git a/vcl/inc/salgdi.hxx b/vcl/inc/salgdi.hxx index 716c9aa934a6..db3ed6806f7e 100644 --- a/vcl/inc/salgdi.hxx +++ b/vcl/inc/salgdi.hxx @@ -600,7 +600,12 @@ protected: const SalBitmap* pAlphaBitmap, double fAlpha) = 0; -/// Used e.g. by canvas to know whether to cache the drawing. +/// Returns true if the drawTransformedBitmap() call is fast, and so it should +/// be used directly without trying to optimize some calls e.g. by calling drawBitmap() +/// instead (which is faster for most VCL backends). These optimizations are not +/// done unconditionally because they may be counter-productive for some fast VCL backends +/// (for example, some OutputDevice optimizations could try access the pixels, which +/// would make performance worse for GPU-backed backends). /// See also tdf#138068. virtual bool hasFastDrawTransformedBitmap() const = 0; diff --git a/vcl/source/outdev/bitmapex.cxx b/vcl/source/outdev/bitmapex.cxx index 7855d1ae5613..55a166c6e5ba 100644 --- a/vcl/source/outdev/bitmapex.cxx +++ b/vcl/source/outdev/bitmapex.cxx @@ -525,6 +525,8 @@ void OutputDevice::DrawTransformedBitmapEx( if(rtl::math::approxEqual( fAlpha, 1.0 )) fAlpha = 1.0; // avoid the need for approxEqual in backends +// If the backend's implementation is known to not need any optimizations here, pass to it directly. +// With most backends it's more performant to try to simplify to DrawBitmapEx() first. if(bTryDirectPaint && mpGraphics->HasFastDrawTransformedBitmap() && DrawTransformBitmapExDirect(aFullTransform, bitmapEx)) return; @@ -562,11 +564,9 @@ void OutputDevice::DrawTransformedBitmapEx( return; } +// Try the backend's implementation before resorting to the slower fallback here. if(bTryDirectPaint && DrawTransformBitmapExDirect(aFullTransform, bitmapEx)) -{ -// we are done return; -} // take the fallback when no rotate and shear, but mirror (else we would have done this above) if(!bRotated && !bSheared) commit 68ad2dd46dd42d81b576b3e61659c39f381790b6 Author: Luboš Luňák AuthorDate: Wed Dec 8 09:34:07 2021 +0100 Commit: Luboš Luňák CommitDate: Sat Dec 11 10:14:39 2021 +0100 don't duplicate SalGraphics docs in SalGraphicsImpl It's incomplete anyway, and it's annoying to do it twice. Simply refer to SalGraphics. Change-Id: I6a28709e2e68ba565176ea3ddf67bd17ecf3d1e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126505 Tested-by: Jenkins Reviewed-by: Luboš Luňák diff --git a/vcl/inc/salgdiimpl.hxx b/vcl/inc/salgdiimpl.hxx index cb4bc35bd942..55f7544587ed 100644 --- a/vcl/inc/salgdiimpl.hxx +++ b/vcl/inc/salgdiimpl.hxx @@ -38,6 +38,15 @@ class Gradient; class SalVirtualDevice; struct SalGradient; +/** +Implementation class for SalGraphics. + +This class allows having an implementation of drawing calls that is separate from SalGraphics, +and SalGraphics can forward all such calls to SalGraphicsImpl. For example X11SalGraphics +may internally use either Xlib-based X11SalGraphicsImpl or Skia-based SkiaSalGraphicsImpl, +and the latter may be used also by other SalGraphics implementations. All the functions +here should be implementations of the relevant SalGraphics functions. +*/ class VCL_PLUGIN_PUBLIC SalGraphicsImpl { bool m_bAntiAlias; @@ -59,6 +68,10 @@ public: virtual ~SalGraphicsImpl(); +// All the functions are implementations of functions from the SalGraphics class, +// so see the SalGraphics class for documentation (both uppercase and lowercase +// function variants). + virtual void Init() = 0; virtual void DeInit() {} @@ -68,40 +81,27 @@ public: virtual OUString getRenderBackendName() const = 0; virtual bool setClipRegion( const vcl::Region& ) = 0; -// -// get the depth of the device + virtual sal_uInt16 GetBitCount() const = 0; -// get the width of the device virtual tools::Long GetGraphicsWidth() const = 0; -// set the clip region to empty virtual void ResetClipRegion() = 0; -// set the line color to transparent (= don't draw lines) - virtual void SetLineColor() = 0; -// set th