[Libreoffice-commits] core.git: svgio/source

2021-11-21 Thread Hossein (via logerrit)
 svgio/source/svgreader/SvgNumber.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 7b0f5178d81e2673345f88abec2e5656f841627e
Author: Hossein 
AuthorDate: Mon Nov 22 04:38:29 2021 +0100
Commit: Miklos Vajna 
CommitDate: Mon Nov 22 08:26:56 2021 +0100

Cleaning up math in SvgNumber

* Simplifying math expression

Change-Id: Ie67874eb79879186a1b971fbdc2c02945bae9191
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123092
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/svgio/source/svgreader/SvgNumber.cxx 
b/svgio/source/svgreader/SvgNumber.cxx
index d5cd9b819ff2..681aeb9c264c 100644
--- a/svgio/source/svgreader/SvgNumber.cxx
+++ b/svgio/source/svgreader/SvgNumber.cxx
@@ -105,11 +105,11 @@ double SvgNumber::solve(const InfoProvider& 
rInfoProvider, NumberType aNumberTyp
 }
 else // length
 {
-// it's a length, relative to sqrt(w*w + h*h)/sqrt(2)
+// it's a length, relative to sqrt((w^2 + h^2)/2)
 const double fCurrentWidth(aViewPort.getWidth());
 const double fCurrentHeight(aViewPort.getHeight());
 const double fCurrentLength(
-sqrt(fCurrentWidth * fCurrentWidth + fCurrentHeight * 
fCurrentHeight)/sqrt(2.0));
+sqrt((fCurrentWidth * fCurrentWidth + fCurrentHeight * 
fCurrentHeight)/2.0));
 
 fRetval *= fCurrentLength;
 }


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sw/source

2021-11-21 Thread Michael Meeks (via logerrit)
 sw/source/core/doc/DocumentContentOperationsManager.cxx |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 39a17e3f1d700798c2bf8b30c755f04e550d5587
Author: Michael Meeks 
AuthorDate: Wed Nov 17 17:18:16 2021 +
Commit: Miklos Vajna 
CommitDate: Mon Nov 22 08:24:59 2021 +0100

Crash when fetching clipboard data.

Seems like some unusual corner-case around HTML export.

sw::DocumentContentOperationsManager::CopyImplImpl(SwPaM&, 
SwPosition&, bool, SwPaM*, bool) const

/sw/source/core/doc/DocumentContentOperationsManager.cxx:5068
sw::DocumentContentOperationsManager::CopyImpl(SwPaM&, SwPosition&, 
bool, SwPaM*, bool) const

/sw/source/core/doc/DocumentContentOperationsManager.cxx:4609
sw::DocumentContentOperationsManager::CopyRange(SwPaM&, 
SwPosition&, bool, bool, bool) const

/sw/source/core/doc/DocumentContentOperationsManager.cxx:1936
SwEditShell::CopySelToDoc(SwDoc*)
/sw/inc/pam.hxx:193 (discriminator 2)
SwFEShell::Copy(SwDoc*, rtl::OUString const*)
/sw/source/core/frmedt/fecopy.cxx:224
(anonymous namespace)::lclOverWriteDoc(SwWrtShell&, SwDoc&)
/sw/source/uibase/dochdl/swdtflvr.cxx:413
SwTransferable::GetData(com::sun::star::datatransfer::DataFlavor 
const&, rtl::OUString const&)
/include/sfx2/objsh.hxx:866

TransferableHelper::getTransferData2(com::sun::star::datatransfer::DataFlavor 
const&, rtl::OUString const&)
/include/com/sun/star/uno/Type.h:121

TransferableHelper::getTransferData(com::sun::star::datatransfer::DataFlavor 
const&)
/include/rtl/ustring.hxx:438
getFromTransferrable.isra.0
/include/com/sun/star/uno/Any.hxx:151
encodeImageAsHTML
/desktop/source/lib/init.cxx:4382
doc_getTextSelection

Change-Id: I1af52d827ebdc9bbc5278f56547d1b3fd1b87e7c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125547
Tested-by: Michael Meeks 
Reviewed-by: Miklos Vajna 

diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx 
b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index 99233fee6df8..5f4e0c3b7f29 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -5065,8 +5065,11 @@ bool 
DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo
 //  and not the source has the page break
 if (pDoc->IsClipBoard() && (rPam.GetPageNum(pStt == rPam.GetPoint()) == 1) 
&& !bCopyPageSource)
 {
-pDestTextNd->ResetAttr(RES_BREAK);// remove the page-break
-pDestTextNd->ResetAttr(RES_PAGEDESC);
+if (pDestTextNd)
+{
+pDestTextNd->ResetAttr(RES_BREAK);// remove the page-break
+pDestTextNd->ResetAttr(RES_PAGEDESC);
+}
 }
 
 


[Libreoffice-commits] core.git: sw/source

2021-11-21 Thread Michael Meeks (via logerrit)
 sw/source/core/doc/DocumentContentOperationsManager.cxx |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 4eb4057ab3b960767d7d6cf8208ecf4edf734324
Author: Michael Meeks 
AuthorDate: Wed Nov 17 17:18:16 2021 +
Commit: Miklos Vajna 
CommitDate: Mon Nov 22 08:23:51 2021 +0100

Crash when fetching clipboard data.

Seems like some unusual corner-case around HTML export.

sw::DocumentContentOperationsManager::CopyImplImpl(SwPaM&, 
SwPosition&, bool, SwPaM*, bool) const

/sw/source/core/doc/DocumentContentOperationsManager.cxx:5068
sw::DocumentContentOperationsManager::CopyImpl(SwPaM&, SwPosition&, 
bool, SwPaM*, bool) const

/sw/source/core/doc/DocumentContentOperationsManager.cxx:4609
sw::DocumentContentOperationsManager::CopyRange(SwPaM&, 
SwPosition&, bool, bool, bool) const

/sw/source/core/doc/DocumentContentOperationsManager.cxx:1936
SwEditShell::CopySelToDoc(SwDoc*)
/sw/inc/pam.hxx:193 (discriminator 2)
SwFEShell::Copy(SwDoc*, rtl::OUString const*)
/sw/source/core/frmedt/fecopy.cxx:224
(anonymous namespace)::lclOverWriteDoc(SwWrtShell&, SwDoc&)
/sw/source/uibase/dochdl/swdtflvr.cxx:413
SwTransferable::GetData(com::sun::star::datatransfer::DataFlavor 
const&, rtl::OUString const&)
/include/sfx2/objsh.hxx:866

TransferableHelper::getTransferData2(com::sun::star::datatransfer::DataFlavor 
const&, rtl::OUString const&)
/include/com/sun/star/uno/Type.h:121

TransferableHelper::getTransferData(com::sun::star::datatransfer::DataFlavor 
const&)
/include/rtl/ustring.hxx:438
getFromTransferrable.isra.0
/include/com/sun/star/uno/Any.hxx:151
encodeImageAsHTML
/desktop/source/lib/init.cxx:4382
doc_getTextSelection

Change-Id: I1af52d827ebdc9bbc5278f56547d1b3fd1b87e7c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125454
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx 
b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index 7948768e4352..f99de3cc390a 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -5223,8 +5223,11 @@ bool 
DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo
 //  and not the source has the page break
 if (rDoc.IsClipBoard() && (rPam.GetPageNum(pStt == rPam.GetPoint()) == 1) 
&& !bCopyPageSource)
 {
-pDestTextNd->ResetAttr(RES_BREAK);// remove the page-break
-pDestTextNd->ResetAttr(RES_PAGEDESC);
+if (pDestTextNd)
+{
+pDestTextNd->ResetAttr(RES_BREAK);// remove the page-break
+pDestTextNd->ResetAttr(RES_PAGEDESC);
+}
 }
 
 


Re: Problems with item "RotationCenter" in item "Extrusion" in the property "CustomShapeGeometry"

2021-11-21 Thread Miklos Vajna
Hi Regina,

On Sun, Nov 21, 2021 at 10:15:05PM +0100, Regina Henschel 
 wrote:
> For X- and Y-component I can imagine:
> Change implementation so, that X-component and Y-component are fractions in
> CustomShapeGeometry. That requires changes in msdffimp.cxx#1812, in
> escherex.cxx#2852, in EnhancedCustomShape3d.cxx#816. Others?

Yes, if our doc model wants to work in fractions and MSO works in EMUs,
then doing this mapping in the MSO import/export filters sounds good to
me.

Regards,

Miklos


[Libreoffice-commits] core.git: framework/source

2021-11-21 Thread Noel Grandin (via logerrit)
 framework/source/dispatch/windowcommanddispatch.cxx |   12 ++--
 framework/source/inc/dispatch/windowcommanddispatch.hxx |3 ++-
 2 files changed, 8 insertions(+), 7 deletions(-)

New commits:
commit c36a21e4a3ee788b14b6925de585805556959800
Author: Noel Grandin 
AuthorDate: Sun Nov 21 14:15:04 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon Nov 22 07:55:42 2021 +0100

osl::Mutex->std::mutex in WindowCommandDispatch

Change-Id: Ia89f4a7b1f444a031e8f58f644ba9129f8c48942
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125622
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/framework/source/dispatch/windowcommanddispatch.cxx 
b/framework/source/dispatch/windowcommanddispatch.cxx
index 97e5de5ca2c7..2764cff556ff 100644
--- a/framework/source/dispatch/windowcommanddispatch.cxx
+++ b/framework/source/dispatch/windowcommanddispatch.cxx
@@ -50,9 +50,9 @@ WindowCommandDispatch::~WindowCommandDispatch()
 
 void WindowCommandDispatch::impl_startListening()
 {
-osl::ClearableMutexGuard aReadLock(m_mutex);
+std::unique_lock aReadLock(m_mutex);
 css::uno::Reference< css::awt::XWindow > xWindow( m_xWindow.get(), 
css::uno::UNO_QUERY );
-aReadLock.clear();
+aReadLock.unlock();
 
 if ( ! xWindow.is())
 return;
@@ -70,9 +70,9 @@ void WindowCommandDispatch::impl_startListening()
 
 void WindowCommandDispatch::impl_stopListening()
 {
-osl::ClearableMutexGuard aReadLock(m_mutex);
+std::unique_lock aReadLock(m_mutex);
 css::uno::Reference< css::awt::XWindow > xWindow( m_xWindow.get(), 
css::uno::UNO_QUERY );
-aReadLock.clear();
+aReadLock.unlock();
 
 if (!xWindow.is())
 return;
@@ -130,10 +130,10 @@ IMPL_LINK(WindowCommandDispatch, impl_notifyCommand, 
VclWindowEvent&, rEvent, vo
 try
 {
 // SYNCHRONIZED ->
-osl::ClearableMutexGuard aReadLock(m_mutex);
+std::unique_lock aReadLock(m_mutex);
 css::uno::Reference< css::frame::XDispatchProvider >   
xProvider(m_xFrame.get(), css::uno::UNO_QUERY_THROW);
 css::uno::Reference< css::uno::XComponentContext > xContext= 
m_xContext;
-aReadLock.clear();
+aReadLock.unlock();
 // <- SYNCHRONIZED
 
 // check provider ... we know it's weak reference only
diff --git a/framework/source/inc/dispatch/windowcommanddispatch.hxx 
b/framework/source/inc/dispatch/windowcommanddispatch.hxx
index b2637e9338f7..0e592eb40a21 100644
--- a/framework/source/inc/dispatch/windowcommanddispatch.hxx
+++ b/framework/source/inc/dispatch/windowcommanddispatch.hxx
@@ -24,6 +24,7 @@
 
 #include 
 #include 
+#include 
 
 namespace com::sun::star::uno {
 class XComponentContext;
@@ -46,7 +47,7 @@ namespace framework{
 class WindowCommandDispatch final
 {
 private:
-osl::Mutex m_mutex;
+std::mutex m_mutex;
 
 /// can be used to create own needed services on demand.
 css::uno::Reference< css::uno::XComponentContext > m_xContext;


[Libreoffice-commits] core.git: 2 commits - framework/source ucbhelper/source

2021-11-21 Thread Noel Grandin (via logerrit)
 framework/source/services/frame.cxx |7 +++---
 ucbhelper/source/provider/contenthelper.cxx |   32 +---
 2 files changed, 15 insertions(+), 24 deletions(-)

New commits:
commit 16289b6de6ba37c7008fb198260517f3bc505bf4
Author: Noel Grandin 
AuthorDate: Sun Nov 21 18:12:08 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon Nov 22 07:55:31 2021 +0100

osl::Mutex->std::mutex in XFrameImpl::windowShown

Change-Id: I1e56d0931a6e814cb9a4faa6a06e70b3740cb728
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125628
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/framework/source/services/frame.cxx 
b/framework/source/services/frame.cxx
index d27cea6942d5..991a7b58131b 100644
--- a/framework/source/services/frame.cxx
+++ b/framework/source/services/frame.cxx
@@ -81,6 +81,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace framework;
 
@@ -2580,7 +2581,7 @@ void SAL_CALL XFrameImpl::windowClosing( const 
css::lang::EventObject& )
 
*//*-*/
 void SAL_CALL XFrameImpl::windowShown( const css::lang::EventObject& )
 {
-static osl::Mutex aFirstVisibleLock;
+static std::mutex aFirstVisibleLock;
 
 /* SAFE { */
 SolarMutexClearableGuard aReadLock;
@@ -2595,10 +2596,10 @@ void SAL_CALL XFrameImpl::windowShown( const 
css::lang::EventObject& )
 return;
 
 static bool bFirstVisibleTask = true;
-osl::ClearableMutexGuard aGuard(aFirstVisibleLock);
+std::unique_lock aGuard(aFirstVisibleLock);
 bool bMustBeTriggered = bFirstVisibleTask;
 bFirstVisibleTask = false;
-aGuard.clear();
+aGuard.unlock();
 
 if (bMustBeTriggered)
 {
commit 9b0ea78959f6bcbc1a776c505352ab37e91381ad
Author: Noel Grandin 
AuthorDate: Sun Nov 21 20:32:47 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon Nov 22 07:55:24 2021 +0100

use more OInterfaceContainerHelper3 in ContentImplHelper_Impl

Change-Id: Id4e4fca8a5a4e2d050752e666a843e7d8661ec0f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125635
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/ucbhelper/source/provider/contenthelper.cxx 
b/ucbhelper/source/provider/contenthelper.cxx
index 2c64dc1968a6..4cf93d1207b9 100644
--- a/ucbhelper/source/provider/contenthelper.cxx
+++ b/ucbhelper/source/provider/contenthelper.cxx
@@ -28,6 +28,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -108,8 +109,10 @@ struct ContentImplHelper_Impl
 rtl::Reference< ::ucbhelper::PropertySetInfo >  m_xPropSetInfo;
 rtl::Reference< ::ucbhelper::CommandProcessorInfo > m_xCommandsInfo;
 std::unique_ptr
m_pDisposeEventListeners;
-std::unique_ptr
m_pContentEventListeners;
-std::unique_ptr
m_pPropSetChangeListeners;
+
std::unique_ptr>
+
m_pContentEventListeners;
+
std::unique_ptr>
+
m_pPropSetChangeListeners;
 std::unique_ptr
m_pCommandChangeListeners;
 std::unique_ptr
m_pPropertyChangeListeners;
 };
@@ -270,7 +273,7 @@ void SAL_CALL ContentImplHelper::addContentEventListener(
 
 if ( !m_pImpl->m_pContentEventListeners )
 m_pImpl->m_pContentEventListeners.reset(
-new cppu::OInterfaceContainerHelper( m_aMutex ));
+new 
comphelper::OInterfaceContainerHelper3( 
m_aMutex ));
 
 m_pImpl->m_pContentEventListeners->addInterface( Listener );
 }
@@ -563,7 +566,7 @@ void SAL_CALL 
ContentImplHelper::addPropertySetInfoChangeListener(
 
 if ( !m_pImpl->m_pPropSetChangeListeners )
 m_pImpl->m_pPropSetChangeListeners.reset(
-new cppu::OInterfaceContainerHelper( m_aMutex ));
+new 
comphelper::OInterfaceContainerHelper3( 
m_aMutex ));
 
 m_pImpl->m_pPropSetChangeListeners->addInterface( Listener );
 }
@@ -721,15 +724,9 @@ void ContentImplHelper::notifyPropertySetInfoChange(
 return;
 
 // Notify event listeners.
-cppu::OInterfaceIteratorHelper aIter( *m_pImpl->m_pPropSetChangeListeners 
);
+comphelper::OInterfaceIteratorHelper3 aIter( 
*m_pImpl->m_pPropSetChangeListeners );
 while ( aIter.hasMoreElements() )
-{
-// Propagate event.
-uno::Reference< beans::XPropertySetInfoChangeListener >
-xListener( aIter.next(), uno::UNO_QUERY );
-if ( xListener.is() )
-xListener->propertySetInfoChange( evt );
-}
+aIter.next()->propertySetInfoChange( evt );
 }
 
 void ContentImplHelper::notifyContentEvent(
@@ -739,16 +736,9 @@ void ContentImplHelper::notifyContentEvent(
 return;
 
 // Notify event listeners.
-cppu::OInterfaceIteratorHelper aIter( *m_pImpl->m_pContentEventListeners );
+comphelper::OInterfaceIteratorHelper3 aIter( 
*m_pImpl->m_pContentEventListeners );
 

[Libreoffice-commits] core.git: 2 commits - framework/source i18npool/source

2021-11-21 Thread Noel Grandin (via logerrit)
 framework/source/uiconfiguration/globalsettings.cxx |   11 ++-
 i18npool/source/transliteration/transliterationImpl.cxx |5 +++--
 2 files changed, 9 insertions(+), 7 deletions(-)

New commits:
commit b67257c5dc54b37495a755005192e4cf186aef25
Author: Noel Grandin 
AuthorDate: Sun Nov 21 18:14:46 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon Nov 22 07:55:13 2021 +0100

osl::Mutex->std::mutex in GlobalSettings_Access

Change-Id: I5162a157fd07870bf768947b32e8afe8f1fb0a02
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125629
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/framework/source/uiconfiguration/globalsettings.cxx 
b/framework/source/uiconfiguration/globalsettings.cxx
index f880e7354fd2..2c517205e2db 100644
--- a/framework/source/uiconfiguration/globalsettings.cxx
+++ b/framework/source/uiconfiguration/globalsettings.cxx
@@ -28,6 +28,7 @@
 #include 
 #include 
 #include 
+#include 
 
 //  Defines
 
@@ -64,7 +65,7 @@ class GlobalSettings_Access : public ::cppu::WeakImplHelper<
 private:
 void impl_initConfigAccess();
 
-osl::Mutexm_mutex;
+std::mutexm_mutex;
 bool  m_bDisposed  
 : 1,
   
m_bConfigRead : 1;
 OUString  
m_aNodeRefStates;
@@ -91,7 +92,7 @@ GlobalSettings_Access::GlobalSettings_Access( const 
css::uno::Reference< css::un
 // XComponent
 void SAL_CALL GlobalSettings_Access::dispose()
 {
-osl::MutexGuard g(m_mutex);
+std::unique_lock g(m_mutex);
 m_xConfigAccess.clear();
 m_bDisposed = true;
 }
@@ -107,14 +108,14 @@ void SAL_CALL GlobalSettings_Access::removeEventListener( 
const css::uno::Refere
 // XEventListener
 void SAL_CALL GlobalSettings_Access::disposing( const css::lang::EventObject& )
 {
-osl::MutexGuard g(m_mutex);
+std::unique_lock g(m_mutex);
 m_xConfigAccess.clear();
 }
 
 // settings access
 bool GlobalSettings_Access::HasToolbarStatesInfo()
 {
-osl::MutexGuard g(m_mutex);
+std::unique_lock g(m_mutex);
 
 if ( m_bDisposed )
 return false;
@@ -148,7 +149,7 @@ bool GlobalSettings_Access::HasToolbarStatesInfo()
 
 bool GlobalSettings_Access::GetToolbarStateInfo( GlobalSettings::StateInfo 
eStateInfo, css::uno::Any& aValue )
 {
-osl::MutexGuard g(m_mutex);
+std::unique_lock g(m_mutex);
 
 if ( m_bDisposed )
 return false;
commit 60e185446eef9c4084b22901f1ffb41b36628b6e
Author: Noel Grandin 
AuthorDate: Sun Nov 21 18:35:23 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon Nov 22 07:55:06 2021 +0100

osl::Mutex->std::mutex in TransliterationImpl::loadBody

Change-Id: I15441110bf27c3f2ad9a61389339c55b9c4c3bb4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125632
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/i18npool/source/transliteration/transliterationImpl.cxx 
b/i18npool/source/transliteration/transliterationImpl.cxx
index 09e791c33e71..c85d16442341 100644
--- a/i18npool/source/transliteration/transliterationImpl.cxx
+++ b/i18npool/source/transliteration/transliterationImpl.cxx
@@ -30,6 +30,7 @@
 #include 
 
 #include 
+#include 
 #include 
 
 using namespace com::sun::star::uno;
@@ -586,8 +587,8 @@ namespace
 void TransliterationImpl::loadBody( OUString const &implName, 
Reference& body )
 {
 assert(!implName.isEmpty());
-static osl::Mutex transBodyMutex;
-::osl::MutexGuard guard(transBodyMutex);
+static std::mutex transBodyMutex;
+std::unique_lock guard(transBodyMutex);
 static TransBody lastTransBody;
 if (implName != lastTransBody.Name)
 {


[Libreoffice-commits] core.git: include/tools tools/source

2021-11-21 Thread Noel Grandin (via logerrit)
 include/tools/urlobj.hxx |   16 
 tools/source/fsys/urlobj.cxx |   38 +++---
 2 files changed, 27 insertions(+), 27 deletions(-)

New commits:
commit 7805a224b96897807e49fd49dd5276d6089b0b5c
Author: Noel Grandin 
AuthorDate: Sat Nov 20 20:28:42 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon Nov 22 07:50:59 2021 +0100

tdf#133835 speedup calc autofilter (6)

INetURLObject::SetPort Avoid allocating temporary string on heap,
saves 20%

Change-Id: I61ba4bd80c561266341143e35650b54b9d70f1d3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125624
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/include/tools/urlobj.hxx b/include/tools/urlobj.hxx
index 8049e165d7a0..6413d2787f96 100644
--- a/include/tools/urlobj.hxx
+++ b/include/tools/urlobj.hxx
@@ -938,17 +938,17 @@ private:
 
 sal_Int32 getEnd() const { return m_nBegin + m_nLength; }
 
-inline sal_Int32 clear();
+sal_Int32 clear();
 
-inline sal_Int32 set(OUStringBuffer & rString,
- OUString const & rSubString,
- sal_Int32 nTheBegin);
+sal_Int32 set(OUStringBuffer & rString,
+  std::u16string_view rSubString,
+  sal_Int32 nTheBegin);
 
-inline sal_Int32 set(OUString & rString,
- OUString const & rSubString);
+sal_Int32 set(OUString & rString,
+  std::u16string_view rSubString);
 
-inline sal_Int32 set(OUStringBuffer & rString,
- OUString const & rSubString);
+sal_Int32 set(OUStringBuffer & rString,
+  std::u16string_view rSubString);
 
 inline void operator +=(sal_Int32 nDelta);
 
diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index 9a5a82ceb632..d265111d2e2e 100644
--- a/tools/source/fsys/urlobj.cxx
+++ b/tools/source/fsys/urlobj.cxx
@@ -221,7 +221,7 @@ using namespace css;
segment = *(pchar / ";")
  */
 
-inline sal_Int32 INetURLObject::SubString::clear()
+sal_Int32 INetURLObject::SubString::clear()
 {
 sal_Int32 nDelta = -m_nLength;
 m_nBegin = -1;
@@ -229,32 +229,33 @@ inline sal_Int32 INetURLObject::SubString::clear()
 return nDelta;
 }
 
-inline sal_Int32 INetURLObject::SubString::set(OUStringBuffer & rString,
-   OUString const & rSubString)
+sal_Int32 INetURLObject::SubString::set(OUStringBuffer & rString,
+   std::u16string_view rSubString)
 {
-sal_Int32 nDelta = rSubString.getLength() - m_nLength;
+sal_Int32 nDelta = rSubString.size() - m_nLength;
 
 rString.remove(m_nBegin, m_nLength);
 rString.insert(m_nBegin, rSubString);
 
-m_nLength = rSubString.getLength();
+m_nLength = rSubString.size();
 return nDelta;
 }
 
-inline sal_Int32 INetURLObject::SubString::set(OUString & rString,
-   OUString const & rSubString)
+sal_Int32 INetURLObject::SubString::set(OUString & rString,
+   std::u16string_view rSubString)
 {
-sal_Int32 nDelta = rSubString.getLength() - m_nLength;
+sal_Int32 nDelta = rSubString.size() - m_nLength;
 
-rString = rString.replaceAt(m_nBegin, m_nLength, rSubString);
+rString = OUString::Concat(rString.subView(0, m_nBegin)) + 
+ rSubString + rString.subView(m_nBegin + m_nLength);
 
-m_nLength = rSubString.getLength();
+m_nLength = rSubString.size();
 return nDelta;
 }
 
-inline sal_Int32 INetURLObject::SubString::set(OUStringBuffer & rString,
-   OUString const & rSubString,
-   sal_Int32 nTheBegin)
+sal_Int32 INetURLObject::SubString::set(OUStringBuffer & rString,
+std::u16string_view rSubString,
+sal_Int32 nTheBegin)
 {
 m_nBegin = nTheBegin;
 return set(rString, rSubString);
@@ -1411,7 +1412,7 @@ bool INetURLObject::setAbsURIRef(OUString const & 
rTheAbsURIRef,
 {
 aSynAbsURIRef.append(':');
 m_aPort.set(aSynAbsURIRef,
-OUString(pPort + 1, pHostPortEnd - (pPort + 1)),
+std::u16string_view{pPort + 1, 
static_cast(pHostPortEnd - (pPort + 1))},
 aSynAbsURIRef.getLength());
 }
 }
@@ -2334,7 +2335,7 @@ bool INetURLObject::setPassword(std::u16string_view 
rThePassword,
 else if (m_aHost.isPresent())
 {
 m_aAbsURIRef.insert(m_aHost.getBegin(), ":@" );
-m_aUser.set(m_aAbsURIRef, OUString(), m_aHost.getBegin());
+m_aUser.set(m_aAbsURIRef, std::u16string_view{}, m_aHost.getBegin());
 nDelta
 = m_aAuth.set(m_aAbsURIRef, aNewAuth, m_aHost.getBegin() + 1) + 2;
 }
@@ -2343,7 +234

[Libreoffice-commits] core.git: extras/source

2021-11-21 Thread Andrea Gelmini (via logerrit)
 extras/source/autocorr/lang/ko/DocumentList.xml |1 -
 1 file changed, 1 deletion(-)

New commits:
commit dc50ac6f7179e1c447a43de256e6ffcf8694c06f
Author: Andrea Gelmini 
AuthorDate: Sun Nov 21 21:35:02 2021 +0100
Commit: Julien Nabet 
CommitDate: Mon Nov 22 07:15:06 2021 +0100

Removed duplicated entry in Korean autocorrect

Change-Id: Ibc640574517da486af8b35e736a45c1adcf78434
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125639
Tested-by: Jenkins
Reviewed-by: DaeHyun Sung 
Reviewed-by: Julien Nabet 

diff --git a/extras/source/autocorr/lang/ko/DocumentList.xml 
b/extras/source/autocorr/lang/ko/DocumentList.xml
index 385a9bdb77b7..793d1ad8fce2 100644
--- a/extras/source/autocorr/lang/ko/DocumentList.xml
+++ b/extras/source/autocorr/lang/ko/DocumentList.xml
@@ -2502,7 +2502,6 @@
   
   
   
-  
   
   
   


[Libreoffice-commits] core.git: emfio/source

2021-11-21 Thread Hossein (via logerrit)
 emfio/source/reader/wmfreader.cxx |  163 +++---
 1 file changed, 83 insertions(+), 80 deletions(-)

New commits:
commit 6e7f06c297b3bd7f57797158c55ed0e11fe14317
Author: Hossein 
AuthorDate: Sun Nov 21 17:58:03 2021 +0100
Commit: Mike Kaganski 
CommitDate: Mon Nov 22 07:06:51 2021 +0100

Convert #define to enum

* Converted multiple symbolic constants using #define in wmfreader.cxx
  to enum

Change-Id: Ie55f27414c230cd624cacb805897933707244ed6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122734
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/emfio/source/reader/wmfreader.cxx 
b/emfio/source/reader/wmfreader.cxx
index 41f7564c1295..eeb6e106cf00 100644
--- a/emfio/source/reader/wmfreader.cxx
+++ b/emfio/source/reader/wmfreader.cxx
@@ -39,88 +39,91 @@
 #include 
 #include 
 
-// MS Windows defines
-#define W_META_SETBKCOLOR   0x0201
-#define W_META_SETBKMODE0x0102
-#define W_META_SETMAPMODE   0x0103
-#define W_META_SETROP2  0x0104
-#define W_META_SETRELABS0x0105
-#define W_META_SETPOLYFILLMODE  0x0106
-#define W_META_SETSTRETCHBLTMODE0x0107
-#define W_META_SETTEXTCHAREXTRA 0x0108
-#define W_META_SETTEXTCOLOR 0x0209
-#define W_META_SETTEXTJUSTIFICATION 0x020A
-#define W_META_SETWINDOWORG 0x020B
-#define W_META_SETWINDOWEXT 0x020C
-#define W_META_SETVIEWPORTORG   0x020D
-#define W_META_SETVIEWPORTEXT   0x020E
-#define W_META_OFFSETWINDOWORG  0x020F
-#define W_META_SCALEWINDOWEXT   0x0410
-#define W_META_OFFSETVIEWPORTORG0x0211
-#define W_META_SCALEVIEWPORTEXT 0x0412
-#define W_META_LINETO   0x0213
-#define W_META_MOVETO   0x0214
-#define W_META_EXCLUDECLIPRECT  0x0415
-#define W_META_INTERSECTCLIPRECT0x0416
-#define W_META_ARC  0x0817
-#define W_META_ELLIPSE  0x0418
-#define W_META_FLOODFILL0x0419
-#define W_META_PIE  0x081A
-#define W_META_RECTANGLE0x041B
-#define W_META_ROUNDRECT0x061C
-#define W_META_PATBLT   0x061D
-#define W_META_SAVEDC   0x001E
-#define W_META_SETPIXEL 0x041F
-#define W_META_OFFSETCLIPRGN0x0220
-#define W_META_TEXTOUT  0x0521
-#define W_META_BITBLT   0x0922
-#define W_META_STRETCHBLT   0x0B23
-#define W_META_POLYGON  0x0324
-#define W_META_POLYLINE 0x0325
-#define W_META_ESCAPE   0x0626
-#define W_META_RESTOREDC0x0127
-#define W_META_FILLREGION   0x0228
-#define W_META_FRAMEREGION  0x0429
-#define W_META_INVERTREGION 0x012A
-#define W_META_PAINTREGION  0x012B
-#define W_META_SELECTCLIPREGION 0x012C
-#define W_META_SELECTOBJECT 0x012D
-#define W_META_SETTEXTALIGN 0x012E
-#define W_META_DRAWTEXT 0x062F
-#define W_META_CHORD0x0830
-#define W_META_SETMAPPERFLAGS   0x0231
-#define W_META_EXTTEXTOUT   0x0a32
-#define W_META_SETDIBTODEV  0x0d33
-#define W_META_SELECTPALETTE0x0234
-#define W_META_REALIZEPALETTE   0x0035
-#define W_META_ANIMATEPALETTE   0x0436
-#define W_META_SETPALENTRIES0x0037
-#define W_META_POLYPOLYGON  0x0538
-#define W_META_RESIZEPALETTE0x0139
-#define W_META_DIBBITBLT0x0940
-#define W_META_DIBSTRETCHBLT0x0b41
-#define W_META_DIBCREATEPATTERNBRUSH 0x0142
-#define W_META_STRETCHDIB   0x0f43
-#define W_META_EXTFLOODFILL 0x0548
-#define W_META_RESETDC  0x014C
-#define W_META_STARTDOC 0x014D
-#define W_META_STARTPAGE0x004F
-#define W_META_ENDPAGE  0x0050
-#define W_META_ABORTDOC 0x0052
-#define W_META_ENDDOC   0x005E
-#define W_META_DELETEOBJECT 0x01f0
-#define W_META_CREATEPALETTE0x00f7
-#define W_META_CREATEBRUSH  0x00F8
-#define W_META_CREATEPATTERNBRUSH   0x01F9
-#define W_META_CREATEPENINDIRECT0x02FA
-#define W_META_CREATEFONTINDIRECT   0x02FB
-#define W_META_CREATEBRUSHINDIRECT  0x02FC
-#define W_META_CREATEBITMAPINDIRECT 0x02FD
-#define W_META_CREATEBITMAP 0x06FE
-#define W_META_CREATEREGION 0x06FF
-
 namespace
 {
+// MS Windows defines
+enum WMFRecords
+{
+W_META_SETBKCOLOR   = 0x0201,
+W_META_SETBKMODE= 0x0102,
+W_META_SETMAPMODE   = 0x0103,
+W_META_SETROP2  = 0x0104,
+W_META_SETRELABS= 0x0105,
+W_META_SETPOLYFILLMODE  = 0x0106,
+W_META_SETSTRETCHBLTMODE= 0x0107,
+W_META_SETTEXTCHAREXTRA = 0x0108,
+W_META_SETTEXTCOLOR = 0x0209,
+W_META_SETTEXTJUSTIFICATION = 0x020A,
+W_META_SETWINDOWORG = 0x020B,
+W_META_SETWINDOWEXT = 0x020C,
+W_META_SETVIEWPORT

How to get started with contribution

2021-11-21 Thread dhruv soni
Respected sir/mam,
I am Dhruv Soni student of Bachelor of computer applications. I am
completing my studies in Indore. I am new to open source contributions but
I am well aware of python, c++, html, css and little bit js but could you
please tell me how to get started?
Hoping to hear from you soon
Regards
Dhruv


Problems with item "RotationCenter" in item "Extrusion" in the property "CustomShapeGeometry"

2021-11-21 Thread Regina Henschel

Hi all,

The current implementation of "RotationCenter" uses the three XYZ values 
as if they are in 1/100 Millimeter (Hmm). That is, if the values in ODF 
file are in Hmm, then the shape behaves as expected. But that does not 
fit the specifications.


The "RotationCenter" appears in the specifications as:
c3DRotationCenterX, c3DRotationCenterY, c3DRotationCenterZ in binary 
MSOffice and Rich Text Format (RTF),

rotationcenter in VML,
draw:extrusion-rotation-center in ODF,
RotationCenter in API.

The descriptions are:

binary MS Office:
c3DRotationCenterX (4 bytes): A value of type FixedPoint, as specified 
in [MS-OSHARED] section 2.2.1.6, that specifies a fraction of the 
geometry’s scaled width and height. The default value for this property 
is 0x.
c3DRotationCenterY (4 bytes): A value of type FixedPoint, as specified 
in [MS-OSHARED] section 2.2.1.6, that specifies a fraction of the 
geometry’s scaled width and height. The default value for this property 
is 0x.
c3DRotationCenterZ (4 bytes): A value of type FixedPoint, as specified 
in [MS-OSHARED] section 2.2.1.6, that specifies a fraction of the 
geometry’s scaled width and height. The default value for this property 
is 0x.


Another document has
PropertyType  Default Description
c3DRotationCenterX  LONG  0   rotation center x (16.16 or g-units)
c3DRotationCenterY  LONG  0   rotation center y (16.16 or g-units)
c3DRotationCenterZ  LONG  0   rotation center z (absolute (emus))

RTF:
Properties: c3DRotationCenterX, c3DRotationCenterY, c3DRotationCenterZ
Meaning: The X and Y values are a 16.16 fraction of the geometry width 
and height, with (0,0) being at the center of the geometry. The Z value 
must be in absolute units (EMUs).


VML: Specifies the center of rotation for a shape. Read/write. Vector3D. 
Defines the offset of the rotation in terms of fractions of the shape's 
size. The default value is 0,0,0.


ODF: The draw:extrusion-rotation-center attribute specifies the position 
of a rotation center in shape-size fractions.


API: This attribute specifies the position of the rotate center in terms 
of shape size fractions.


The rotation center has no tool in the user interface.

All of the descriptions use fractions for X-component and Y-component.
For Z-component only RTF and binary MS Office have explicit EMU as unit. 
The other refer to shape size or to shape width and height, which I 
think is not meaningful for the Z-component.


So what to do?
For X- and Y-component I can imagine:
Change implementation so, that X-component and Y-component are fractions 
in CustomShapeGeometry. That requires changes in msdffimp.cxx#1812, in 
escherex.cxx#2852, in EnhancedCustomShape3d.cxx#816. Others?


How to solve Z-component?

Kind regards,
Regina


[Libreoffice-commits] core.git: sc/source

2021-11-21 Thread Andrea Gelmini (via logerrit)
 sc/source/filter/xcl97/XclExpChangeTrack.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 7b73163e6d8aca1b4a55547a4f337f36b9697b87
Author: Andrea Gelmini 
AuthorDate: Fri Nov 12 00:48:27 2021 +0100
Commit: Julien Nabet 
CommitDate: Sun Nov 21 21:40:55 2021 +0100

Removed break after return

Change-Id: I0ad0ae7074905075cdff46ded69eaaa07570f0ca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125075
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/sc/source/filter/xcl97/XclExpChangeTrack.cxx 
b/sc/source/filter/xcl97/XclExpChangeTrack.cxx
index 16b53737be82..1d8140742a1b 100644
--- a/sc/source/filter/xcl97/XclExpChangeTrack.cxx
+++ b/sc/source/filter/xcl97/XclExpChangeTrack.cxx
@@ -979,7 +979,6 @@ static const char* lcl_GetType( XclExpChTrData* pData )
 break;
 case EXC_CHTR_TYPE_STRING:
 return "inlineStr";
-break;
 default:
 break;
 }


[Libreoffice-commits] core.git: Branch 'distro/mimo/mimo-6-0' - 6 commits - include/sfx2 include/svl include/xmloff svl/source sw/source xmloff/source xmlsecurity/inc xmlsecurity/qa xmlsecurity/source

2021-11-21 Thread Michael Stahl (via logerrit)
 include/sfx2/objsh.hxx 
   |2 
 include/svl/sigstruct.hxx  
   |   42 
 include/xmloff/xmlimp.hxx  
   |6 
 include/xmloff/xmlnmspe.hxx
   |7 
 include/xmloff/xmltoken.hxx
   |   13 
 svl/source/crypto/cryptosign.cxx   
   |   16 
 sw/source/core/edit/edfcol.cxx 
   |3 
 xmloff/source/core/xmlimp.cxx  
   |   26 
 xmloff/source/core/xmltoken.cxx
   |   13 
 xmloff/source/token/tokens.txt 
   |   10 
 xmlsecurity/inc/biginteger.hxx 
   |3 
 xmlsecurity/inc/xmlsignaturehelper.hxx 
   |   14 
 xmlsecurity/inc/xsecctl.hxx
   |   20 
 
xmlsecurity/qa/unit/signing/data/02_doc_macros_signed_by_attacker_manipulated.odt
 |binary
 xmlsecurity/qa/unit/signing/data/02_doc_signed_by_attacker_manipulated.odt 
   |binary
 xmlsecurity/qa/unit/signing/data/02_doc_signed_by_attacker_manipulated2.odt
   |binary
 
xmlsecurity/qa/unit/signing/data/02_doc_signed_by_attacker_manipulated_triple.odt
 |binary
 xmlsecurity/qa/unit/signing/signing.cxx
   |   87 
 xmlsecurity/source/component/documentdigitalsignatures.cxx 
   |   50 
 xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx 
   |   15 
 xmlsecurity/source/helper/documentsignaturehelper.cxx  
   |   63 
 xmlsecurity/source/helper/documentsignaturemanager.cxx 
   |   12 
 xmlsecurity/source/helper/ooxmlsecexporter.cxx 
   |  218 -
 xmlsecurity/source/helper/ooxmlsecparser.cxx   
   |   26 
 xmlsecurity/source/helper/pdfsignaturehelper.cxx   
   |8 
 xmlsecurity/source/helper/xmlsignaturehelper.cxx   
   |  161 
 xmlsecurity/source/helper/xsecctl.cxx  
   |   82 
 xmlsecurity/source/helper/xsecparser.cxx   
   | 1708 --
 xmlsecurity/source/helper/xsecparser.hxx   
   |  101 
 xmlsecurity/source/helper/xsecsign.cxx 
   |   34 
 xmlsecurity/source/helper/xsecverify.cxx   
   |  182 -
 xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx  
   |   47 
 xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx 
   |2 
 xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx  
   |   25 
 xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx 
   |5 
 35 files changed, 2419 insertions(+), 582 deletions(-)

New commits:
commit d81b142abfa17162f6f40b928a0b2b90ac897e2c
Author: Michael Stahl 
AuthorDate: Fri Feb 26 17:29:37 2021 +0100
Commit: Tomaž Vajngerl 
CommitDate: Sun Nov 21 21:32:10 2021 +0100

xmlsecurity: add tests for multiple X509Data/X509Certificate

(cherry picked from commit 3c3299621628c11bf9f0f38e1259938b391c31e0)

Conflicts:
xmlsecurity/qa/unit/signing/signing.cxx

Change-Id: If50ae8156f81c1053aa8fbfc3148da64bb8e1442

diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index 35b3091e4669..258b1428082f 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -737,7 +737,7 @@ public:
 // configuration items
 SAL_DLLPRIVATE SignatureState ImplGetSignatureState( bool 
bScriptingContent = false );
 
-SAL_DLLPRIVATE css::uno::Sequence< 
css::security::DocumentSignatureInformation >
+/*SAL_DLLPRIVATE*/ css::uno::Sequence< 
css::security::DocumentSignatureInformation >
 ImplAnalyzeSignature(
 bool bScriptingContent,
 const css::uno::Reference< 
css::security::XDocumentDigitalSignatures >& xSigner
diff --git 
a/xmlsecurity/qa/unit/signing/data/02_doc_macros_signed_by_attacker_manipulated.odt
 
b/xmlsecurity/qa/unit/signing/data/02_doc_macros_signed_by_attacker_manipulated.odt
new file mode 100644
index ..d63e4b6b7b72
Binary files /dev/null and 
b/xmlsecurity/qa/unit/signing/data/02_doc_macros_signed_by_attacker_manipulated.odt
 differ
diff --git 
a/xmlsecurity/qa/unit/signing/data/02_doc_signed_by_attacker_manipulated.odt 
b/xmlsecurity/qa/unit/signing/data/02_doc_signed_by_attacker_manipulated.odt
new file mode 100644
index ..0190abb00f23

[Libreoffice-commits] core.git: vcl/unx

2021-11-21 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtkinst.cxx |   11 +++
 1 file changed, 11 insertions(+)

New commits:
commit 2221c6ffb3e8fffb090d1d1a666571c3c7d05de7
Author: Caolán McNamara 
AuthorDate: Sat Nov 20 21:51:48 2021 +
Commit: Caolán McNamara 
CommitDate: Sun Nov 21 20:30:47 2021 +0100

gtk3: consider replacement for popovers visibility when queryed for it

Change-Id: I4ca71f8544720e99514abe78717dcd07617c00cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125475
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 4f64c75ae480..f9b73c07bfd0 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -22110,6 +22110,17 @@ public:
 gtk_popover_popup(m_pPopover);
 }
 
+#if !GTK_CHECK_VERSION(4, 0, 0)
+#if defined(GDK_WINDOWING_X11)
+virtual bool get_visible() const override
+{
+if (m_pMenuHack)
+return gtk_widget_get_visible(GTK_WIDGET(m_pMenuHack));
+return gtk_widget_get_visible(m_pWidget);
+}
+#endif
+#endif
+
 virtual void popdown() override
 {
 #if !GTK_CHECK_VERSION(4, 0, 0)


[Libreoffice-commits] core.git: framework/source

2021-11-21 Thread Noel Grandin (via logerrit)
 framework/source/inc/loadenv/actionlockguard.hxx |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 449977192b04878a2e3ea0ce1ff3445d02f084ce
Author: Noel Grandin 
AuthorDate: Sun Nov 21 14:16:42 2021 +0200
Commit: Noel Grandin 
CommitDate: Sun Nov 21 19:43:10 2021 +0100

osl::Mutex->std::mutex in ActionLockGuard

Change-Id: I8081d017f8a03be94b60011fcd4eb34eba786aa9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125623
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/framework/source/inc/loadenv/actionlockguard.hxx 
b/framework/source/inc/loadenv/actionlockguard.hxx
index dd3c9ab51280..ee52fcc0dc54 100644
--- a/framework/source/inc/loadenv/actionlockguard.hxx
+++ b/framework/source/inc/loadenv/actionlockguard.hxx
@@ -20,7 +20,7 @@
 #pragma once
 
 #include 
-#include 
+#include 
 
 namespace framework{
 
@@ -36,7 +36,7 @@ class ActionLockGuard final
 // member
 
 private:
-osl::Mutex m_mutex;
+std::mutex m_mutex;
 
 /** @short  points to the object, which can be locked from outside. */
 css::uno::Reference< css::document::XActionLockable > m_xActionLock;
@@ -81,7 +81,7 @@ class ActionLockGuard final
  */
 bool setResource(const css::uno::Reference< 
css::document::XActionLockable >& xLock)
 {
-osl::MutexGuard g(m_mutex);
+std::unique_lock g(m_mutex);
 
 if (m_bActionLocked || !xLock.is())
 return false;
@@ -107,7 +107,7 @@ class ActionLockGuard final
 void freeResource()
 {
 // SAFE -> ..
-osl::ClearableMutexGuard aMutexLock(m_mutex);
+std::unique_lock aMutexLock(m_mutex);
 
 css::uno::Reference< css::document::XActionLockable > xLock   = 
m_xActionLock;
 bool  bLocked = 
m_bActionLocked;
@@ -115,7 +115,7 @@ class ActionLockGuard final
 m_xActionLock.clear();
 m_bActionLocked = false;
 
-aMutexLock.clear();
+aMutexLock.unlock();
 // <- SAFE ..
 
 if (bLocked && xLock.is())
@@ -125,7 +125,7 @@ class ActionLockGuard final
 /** @short  unlock the internal wrapped resource, if it's not already 
done. */
 void unlock()
 {
-osl::MutexGuard g(m_mutex);
+std::unique_lock g(m_mutex);
 if (m_bActionLocked && m_xActionLock.is())
 {
 m_xActionLock->removeActionLock();


[Libreoffice-commits] core.git: framework/inc framework/source

2021-11-21 Thread Noel Grandin (via logerrit)
 framework/inc/uifactory/configurationaccessfactorymanager.hxx |3 +
 framework/source/uifactory/uielementfactorymanager.cxx|   20 +-
 2 files changed, 12 insertions(+), 11 deletions(-)

New commits:
commit d54a1380d13d8d832841cdc33440aac2e14d3300
Author: Noel Grandin 
AuthorDate: Sun Nov 21 12:03:13 2021 +0200
Commit: Noel Grandin 
CommitDate: Sun Nov 21 19:42:48 2021 +0100

osl::Mutex->std::mutex in ConfigurationAccess_FactoryManager

Change-Id: I0e7a6eb4700e1108b31dfdf8681e8f4743ab7c5d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125618
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/framework/inc/uifactory/configurationaccessfactorymanager.hxx 
b/framework/inc/uifactory/configurationaccessfactorymanager.hxx
index 7b12048e1223..9f710d235c8d 100644
--- a/framework/inc/uifactory/configurationaccessfactorymanager.hxx
+++ b/framework/inc/uifactory/configurationaccessfactorymanager.hxx
@@ -30,6 +30,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 
@@ -64,7 +65,7 @@ class ConfigurationAccess_FactoryManager final : public 
::cppu::WeakImplHelper<
 
 bool impl_getElementProps( const css::uno::Any& rElement, OUString& 
rType, OUString& rName, OUString& rModule, OUString& rServiceSpecifier ) const;
 
-mutable osl::Mutex   m_aMutex;
+mutable std::mutex   m_aMutex;
 OUString m_aPropType;
 OUString m_aPropName;
 OUString m_aPropModule;
diff --git a/framework/source/uifactory/uielementfactorymanager.cxx 
b/framework/source/uifactory/uielementfactorymanager.cxx
index 029d8790943f..a8c40552609f 100644
--- a/framework/source/uifactory/uielementfactorymanager.cxx
+++ b/framework/source/uifactory/uielementfactorymanager.cxx
@@ -78,7 +78,7 @@ 
ConfigurationAccess_FactoryManager::ConfigurationAccess_FactoryManager( const Re
 ConfigurationAccess_FactoryManager::~ConfigurationAccess_FactoryManager()
 {
 // SAFE
-osl::MutexGuard g(m_aMutex);
+std::unique_lock g(m_aMutex);
 
 Reference< XContainer > xContainer( m_xConfigAccess, UNO_QUERY );
 if ( xContainer.is() )
@@ -88,7 +88,7 @@ 
ConfigurationAccess_FactoryManager::~ConfigurationAccess_FactoryManager()
 OUString 
ConfigurationAccess_FactoryManager::getFactorySpecifierFromTypeNameModule( 
std::u16string_view rType, const OUString& rName, std::u16string_view rModule ) 
const
 {
 // SAFE
-osl::MutexGuard g(m_aMutex);
+std::unique_lock g(m_aMutex);
 
 FactoryManagerMap::const_iterator pIter =
 m_aFactoryManagerMap.find( getHashKeyFromStrings( rType, rName, 
rModule ));
@@ -124,7 +124,7 @@ OUString 
ConfigurationAccess_FactoryManager::getFactorySpecifierFromTypeNameModu
 void ConfigurationAccess_FactoryManager::addFactorySpecifierToTypeNameModule( 
std::u16string_view rType, std::u16string_view rName, std::u16string_view 
rModule, const OUString& rServiceSpecifier )
 {
 // SAFE
-osl::MutexGuard g(m_aMutex);
+std::unique_lock g(m_aMutex);
 
 OUString aHashKey = getHashKeyFromStrings( rType, rName, rModule );
 
@@ -138,7 +138,7 @@ void 
ConfigurationAccess_FactoryManager::addFactorySpecifierToTypeNameModule( st
 void 
ConfigurationAccess_FactoryManager::removeFactorySpecifierFromTypeNameModule( 
std::u16string_view rType, std::u16string_view rName, std::u16string_view 
rModule )
 {
 // SAFE
-osl::MutexGuard g(m_aMutex);
+std::unique_lock g(m_aMutex);
 
 OUString aHashKey = getHashKeyFromStrings( rType, rName, rModule );
 
@@ -152,7 +152,7 @@ void 
ConfigurationAccess_FactoryManager::removeFactorySpecifierFromTypeNameModul
 Sequence< Sequence< PropertyValue > > 
ConfigurationAccess_FactoryManager::getFactoriesDescription() const
 {
 // SAFE
-osl::MutexGuard g(m_aMutex);
+std::unique_lock g(m_aMutex);
 
 Sequence< Sequence< PropertyValue > > aSeqSeq;
 
@@ -198,7 +198,7 @@ void SAL_CALL 
ConfigurationAccess_FactoryManager::elementInserted( const Contain
 OUString   aService;
 
 // SAFE
-osl::MutexGuard g(m_aMutex);
+std::unique_lock g(m_aMutex);
 
 if ( impl_getElementProps( aEvent.Element, aType, aName, aModule, aService 
))
 {
@@ -217,7 +217,7 @@ void SAL_CALL 
ConfigurationAccess_FactoryManager::elementRemoved ( const Contain
 OUString   aService;
 
 // SAFE
-osl::MutexGuard g(m_aMutex);
+std::unique_lock g(m_aMutex);
 
 if ( impl_getElementProps( aEvent.Element, aType, aName, aModule, aService 
))
 {
@@ -236,7 +236,7 @@ void SAL_CALL 
ConfigurationAccess_FactoryManager::elementReplaced( const Contain
 OUString   aService;
 
 // SAFE
-osl::MutexGuard g(m_aMutex);
+std::unique_lock g(m_aMutex);
 
 if ( impl_getElementProps( aEvent.Element, aType, aName, aModule, aService 
))
 {
@@ -253,14 +253,14 @@ void SAL_CALL 
ConfigurationAccess_FactoryManager::disposing( const EventObject&
 {
 // SAFE
 // remove our ref

[Libreoffice-commits] core.git: framework/inc framework/source

2021-11-21 Thread Noel Grandin (via logerrit)
 framework/inc/uifactory/factoryconfiguration.hxx|6 ++--
 framework/source/uifactory/factoryconfiguration.cxx |   28 
 2 files changed, 16 insertions(+), 18 deletions(-)

New commits:
commit c33b0e928e07387bf60708be3f3dc07d9840663c
Author: Noel Grandin 
AuthorDate: Sun Nov 21 12:07:29 2021 +0200
Commit: Noel Grandin 
CommitDate: Sun Nov 21 15:47:48 2021 +0100

osl::Mutex->std::mutex in ConfigurationAccess_ControllerFactory

Change-Id: I2e526ff2dc9f02850bd9fc510c63b5d9db24af58
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125619
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/framework/inc/uifactory/factoryconfiguration.hxx 
b/framework/inc/uifactory/factoryconfiguration.hxx
index 1ba2a622c74c..9cfed290f3ce 100644
--- a/framework/inc/uifactory/factoryconfiguration.hxx
+++ b/framework/inc/uifactory/factoryconfiguration.hxx
@@ -27,6 +27,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 
@@ -45,7 +46,6 @@ public:
 virtual   ~ConfigurationAccess_ControllerFactory() override;
 
 void  readConfigurationData();
-void  updateConfigurationData();
 
 OUString getServiceFromCommandModule( std::u16string_view rCommandURL, 
std::u16string_view rModule ) const;
 OUString getValueFromCommandModule( std::u16string_view rCommandURL, 
std::u16string_view rModule ) const;
@@ -61,6 +61,8 @@ public:
 virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) 
override;
 
 private:
+void  updateConfigurationDataImpl();
+
 struct ControllerInfo
 {
 OUString m_aImplementationName;
@@ -75,7 +77,7 @@ private:
 
 bool impl_getElementProps( const css::uno::Any& aElement, OUString& 
aCommand, OUString& aModule, OUString& aServiceSpecifier,OUString& aValue ) 
const;
 
-mutable osl::Mutex   m_mutex;
+mutable std::mutex   m_mutex;
 OUString m_aPropCommand;
 OUString m_aPropModule;
 OUString m_aPropController;
diff --git a/framework/source/uifactory/factoryconfiguration.cxx 
b/framework/source/uifactory/factoryconfiguration.cxx
index c0c75db7bba8..d27cdb145dbd 100644
--- a/framework/source/uifactory/factoryconfiguration.cxx
+++ b/framework/source/uifactory/factoryconfiguration.cxx
@@ -66,7 +66,7 @@ 
ConfigurationAccess_ControllerFactory::ConfigurationAccess_ControllerFactory( co
 
 ConfigurationAccess_ControllerFactory::~ConfigurationAccess_ControllerFactory()
 {
-osl::MutexGuard g(m_mutex);
+std::unique_lock g(m_mutex);
 
 Reference< XContainer > xContainer( m_xConfigAccess, UNO_QUERY );
 if ( xContainer.is() )
@@ -75,7 +75,7 @@ 
ConfigurationAccess_ControllerFactory::~ConfigurationAccess_ControllerFactory()
 
 OUString ConfigurationAccess_ControllerFactory::getServiceFromCommandModule( 
std::u16string_view rCommandURL, std::u16string_view rModule ) const
 {
-osl::MutexGuard g(m_mutex);
+std::unique_lock g(m_mutex);
 MenuControllerMap::const_iterator pIter = m_aMenuControllerMap.find( 
getHashKeyFromStrings( rCommandURL, rModule ));
 
 if ( pIter != m_aMenuControllerMap.end() )
@@ -94,7 +94,7 @@ OUString 
ConfigurationAccess_ControllerFactory::getServiceFromCommandModule( std
 }
 OUString ConfigurationAccess_ControllerFactory::getValueFromCommandModule( 
std::u16string_view rCommandURL, std::u16string_view rModule ) const
 {
-osl::MutexGuard g(m_mutex);
+std::unique_lock g(m_mutex);
 
 MenuControllerMap::const_iterator pIter = m_aMenuControllerMap.find( 
getHashKeyFromStrings( rCommandURL, rModule ));
 
@@ -118,7 +118,7 @@ void 
ConfigurationAccess_ControllerFactory::addServiceToCommandModule(
 std::u16string_view rModule,
 const OUString& rServiceSpecifier )
 {
-osl::MutexGuard g(m_mutex);
+std::unique_lock g(m_mutex);
 
 OUString aHashKey = getHashKeyFromStrings( rCommandURL, rModule );
 m_aMenuControllerMap.emplace( 
aHashKey,ControllerInfo(rServiceSpecifier,OUString()) );
@@ -128,7 +128,7 @@ void 
ConfigurationAccess_ControllerFactory::removeServiceFromCommandModule(
 std::u16string_view rCommandURL,
 std::u16string_view rModule )
 {
-osl::MutexGuard g(m_mutex);
+std::unique_lock g(m_mutex);
 
 OUString aHashKey = getHashKeyFromStrings( rCommandURL, rModule );
 m_aMenuControllerMap.erase( aHashKey );
@@ -142,7 +142,7 @@ void SAL_CALL 
ConfigurationAccess_ControllerFactory::elementInserted( const Cont
 OUString   aService;
 OUString   aValue;
 
-osl::MutexGuard g(m_mutex);
+std::unique_lock g(m_mutex);
 
 if ( impl_getElementProps( aEvent.Element, aCommand, aModule, aService, 
aValue ))
 {
@@ -162,7 +162,7 @@ void SAL_CALL 
ConfigurationAccess_ControllerFactory::elementRemoved ( const Cont
 OUString   aService;
 OUString   aValue;
 
-osl::MutexGuard g(m_mutex);
+std::unique_lock g(m_mutex);
 
 if ( impl_getElementProps( aEvent.Ele

[Libreoffice-commits] core.git: include/rtl include/tools tools/source

2021-11-21 Thread Noel Grandin (via logerrit)
 include/rtl/ustring.hxx  |5 +
 include/tools/urlobj.hxx |2 
 tools/source/fsys/urlobj.cxx |  117 ++-
 3 files changed, 79 insertions(+), 45 deletions(-)

New commits:
commit dc2010964fb8d18d5c4fe96172ee082276a1e587
Author: Noel Grandin 
AuthorDate: Sat Nov 20 08:16:33 2021 +0200
Commit: Noel Grandin 
CommitDate: Sun Nov 21 15:47:25 2021 +0100

tdf#133835 speedup calc autofilter (5)

Tweak INetURLObject to reduce the number of
OUString and OUStringBuffer we create,
saves 5%

And add a asView() method to OUStringConstExpr,
to make it easier to pass to OUStringBuffer::insert

Change-Id: I115ec2398cfc8df39bd1efbbd5f0d5cc9712dba7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125600
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx
index e5b58be8c52d..e14549482f35 100644
--- a/include/rtl/ustring.hxx
+++ b/include/rtl/ustring.hxx
@@ -161,6 +161,11 @@ public:
 // no destructor necessary because we know we are pointing at a 
compile-time
 // constant OUStringLiteral, which bypasses ref-counting.
 
+/**
+  make it easier to pass to OUStringBuffer and similar without 
casting/converting
+*/
+constexpr std::u16string_view asView() const { return {pData->buffer, 
static_cast(pData->length)}; }
+
 inline operator const OUString&() const;
 
 private:
diff --git a/include/tools/urlobj.hxx b/include/tools/urlobj.hxx
index ede630b7ea7b..8049e165d7a0 100644
--- a/include/tools/urlobj.hxx
+++ b/include/tools/urlobj.hxx
@@ -404,7 +404,7 @@ public:
 
 @return  The protocol name of URLs of the given scheme.
  */
-static OUString GetSchemeName(INetProtocol eTheScheme);
+static const OUString & GetSchemeName(INetProtocol eTheScheme);
 
 static INetProtocol CompareProtocolScheme(OUString const &
   rTheAbsURIRef);
diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index 8b2882b06b32..9a5a82ceb632 100644
--- a/tools/source/fsys/urlobj.cxx
+++ b/tools/source/fsys/urlobj.cxx
@@ -290,7 +290,7 @@ int INetURLObject::SubString::compare(SubString const & 
rOther,
 
 struct INetURLObject::SchemeInfo
 {
-char const * m_pScheme;
+rtl::OUStringConstExpr m_sScheme;
 char const * m_pPrefix;
 bool m_bAuthority;
 bool m_bUser;
@@ -316,91 +316,120 @@ struct INetURLObject::PrefixInfo
 inline INetURLObject::SchemeInfo const &
 INetURLObject::getSchemeInfo(INetProtocol eTheScheme)
 {
+static constexpr OUStringLiteral EMPTY = u"";
+static constexpr OUStringLiteral FTP = u"ftp";
+static constexpr OUStringLiteral HTTP = u"http";
+static constexpr OUStringLiteral FILE1 = u"file"; // because FILE is 
already defined
+static constexpr OUStringLiteral MAILTO = u"mailto";
+static constexpr OUStringLiteral VND_WEBDAV = u"vnd.sun.star.webdav";
+static constexpr OUStringLiteral PRIVATE = u"private";
+static constexpr OUStringLiteral VND_HELP = u"vnd.sun.star.help";
+static constexpr OUStringLiteral HTTPS = u"https";
+static constexpr OUStringLiteral SLOT = u"slot";
+static constexpr OUStringLiteral MACRO = u"macro";
+static constexpr OUStringLiteral JAVASCRIPT = u"javascript";
+static constexpr OUStringLiteral DATA = u"data";
+static constexpr OUStringLiteral CID = u"cid";
+static constexpr OUStringLiteral VND_HIER = u"vnd.sun.star.hier";
+static constexpr OUStringLiteral UNO = u".uno";
+static constexpr OUStringLiteral COMPONENT = u".component";
+static constexpr OUStringLiteral VND_PKG = u"vnd.sun.star.pkg";
+static constexpr OUStringLiteral LDAP = u"ldap";
+static constexpr OUStringLiteral DB = u"db";
+static constexpr OUStringLiteral VND_CMD = u"vnd.sun.star.cmd";
+static constexpr OUStringLiteral TELNET = u"telnet";
+static constexpr OUStringLiteral VND_EXPAND = u"vnd.sun.star.expand";
+static constexpr OUStringLiteral VND_TDOC = u"vnd.sun.star.tdoc";
+static constexpr OUStringLiteral SMB = u"smb";
+static constexpr OUStringLiteral HID = u"hid";
+static constexpr OUStringLiteral SFTP = u"sftp";
+static constexpr OUStringLiteral VND_CMIS = u"vnd.libreoffice.cmis";
+
 static o3tl::enumarray const map = {
 SchemeInfo{
-"", "", false, false, false, false, false, false, false, false},
+EMPTY, "", false, false, false, false, false, false, false, false},
 SchemeInfo{
-"ftp", "ftp://";, true, true, false, true, true, true, true,
+FTP, "ftp://";, true, true, false, true, true, true, true,
 false},
 SchemeInfo{
-"http", "http://";, true, false, false, false, true, true, true,
+HTTP, "http://";, true, false, false, false, true, true, true,
 true},
 SchemeInfo{
-"file", "file://", true, false, fal

[Libreoffice-commits] core.git: 2 commits - framework/inc framework/source

2021-11-21 Thread Noel Grandin (via logerrit)
 framework/inc/jobs/configaccess.hxx|5 +++--
 framework/source/fwi/jobs/configaccess.cxx |   13 +
 framework/source/helper/statusindicatorfactory.cxx |   10 +-
 3 files changed, 17 insertions(+), 11 deletions(-)

New commits:
commit efd95650cba2460bc153de00f8eb27785ad0e18a
Author: Noel Grandin 
AuthorDate: Sun Nov 21 11:53:36 2021 +0200
Commit: Noel Grandin 
CommitDate: Sun Nov 21 15:47:17 2021 +0100

osl::Mutex->std::mutex in framework::ConfigAccess

Change-Id: I44d41db2498ea39fca309785278c1fe50d7ae8b9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125617
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/framework/inc/jobs/configaccess.hxx 
b/framework/inc/jobs/configaccess.hxx
index 4d73df2e1c46..19d9265f952a 100644
--- a/framework/inc/jobs/configaccess.hxx
+++ b/framework/inc/jobs/configaccess.hxx
@@ -20,8 +20,8 @@
 #pragma once
 
 #include 
-
 #include 
+#include 
 
 namespace framework{
 
@@ -50,7 +50,7 @@ class ConfigAccess final
 // member
 
 private:
-mutable osl::Mutex m_mutex;
+mutable std::mutex m_mutex;
 
 /**
 reference to the uno service manager
@@ -69,6 +69,7 @@ class ConfigAccess final
 
 // native interface methods
 
+void  closeImpl();
 public:
 
  ConfigAccess( const css::uno::Reference< 
css::uno::XComponentContext >& rxContext,
diff --git a/framework/source/fwi/jobs/configaccess.cxx 
b/framework/source/fwi/jobs/configaccess.cxx
index d3ce0e5f70a1..27f2c3dd9572 100644
--- a/framework/source/fwi/jobs/configaccess.cxx
+++ b/framework/source/fwi/jobs/configaccess.cxx
@@ -67,7 +67,7 @@ ConfigAccess::~ConfigAccess()
  */
 ConfigAccess::EOpenMode ConfigAccess::getMode() const
 {
-osl::MutexGuard g(m_mutex);
+std::unique_lock g(m_mutex);
 return m_eMode;
 }
 
@@ -87,7 +87,7 @@ ConfigAccess::EOpenMode ConfigAccess::getMode() const
  */
 void ConfigAccess::open( /*IN*/ EOpenMode eMode )
 {
-osl::MutexGuard g(m_mutex);
+std::unique_lock g(m_mutex);
 
 // check if configuration is already open in the right mode.
 // By the way: Don't allow closing by using this method!
@@ -99,7 +99,7 @@ void ConfigAccess::open( /*IN*/ EOpenMode eMode )
 // can be called without checks! It does the checks by itself ...
 // e.g. for already closed or not opened configuration.
 // Flushing of all made changes will be done here too.
-close();
+closeImpl();
 
 // create the configuration provider, which provides sub access points
 css::uno::Reference< css::lang::XMultiServiceFactory > xConfigProvider = 
css::configuration::theDefaultProvider::get(m_xContext);
@@ -135,7 +135,12 @@ void ConfigAccess::open( /*IN*/ EOpenMode eMode )
  */
 void ConfigAccess::close()
 {
-osl::MutexGuard g(m_mutex);
+std::unique_lock g(m_mutex);
+closeImpl();
+}
+
+void ConfigAccess::closeImpl()
+{
 // check already closed configuration
 if (m_xConfig.is())
 {
commit c3b968a2f1e8e824ace86c37d0e500440374bd09
Author: Noel Grandin 
AuthorDate: Sun Nov 21 12:35:24 2021 +0200
Commit: Noel Grandin 
CommitDate: Sun Nov 21 15:47:05 2021 +0100

osl::Mutex->std::mutex in StatusIndicatorFactory

Change-Id: I2365e172ef8d631f30cfffdb650ebcb3035f77f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125620
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/framework/source/helper/statusindicatorfactory.cxx 
b/framework/source/helper/statusindicatorfactory.cxx
index 285d53fb683f..0a87c9bea258 100644
--- a/framework/source/helper/statusindicatorfactory.cxx
+++ b/framework/source/helper/statusindicatorfactory.cxx
@@ -33,7 +33,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 
 #include 
@@ -512,15 +512,15 @@ void StatusIndicatorFactory::impl_reschedule(bool bForce)
 if (!bReschedule)
 return;
 
-static osl::Mutex rescheduleLock;
+static std::mutex rescheduleLock;
 // SAFE ->
-osl::ResettableMutexGuard aRescheduleGuard(rescheduleLock);
+std::unique_lock aRescheduleGuard(rescheduleLock);
 
 if (m_nInReschedule != 0)
 return;
 
 ++m_nInReschedule;
-aRescheduleGuard.clear();
+aRescheduleGuard.unlock();
 // <- SAFE
 
 {
@@ -529,7 +529,7 @@ void StatusIndicatorFactory::impl_reschedule(bool bForce)
 }
 
 // SAFE ->
-aRescheduleGuard.reset();
+aRescheduleGuard.lock();
 --m_nInReschedule;
 }
 


[Libreoffice-commits] core.git: i18npool/inc

2021-11-21 Thread Harjot (via logerrit)
 i18npool/inc/breakiteratorImpl.hxx  |6 +-
 i18npool/inc/breakiterator_cjk.hxx  |5 +
 i18npool/inc/breakiterator_th.hxx   |5 +
 i18npool/inc/breakiterator_unicode.hxx  |5 +
 i18npool/inc/calendarImpl.hxx   |5 +
 i18npool/inc/calendar_gregorian.hxx |5 +
 i18npool/inc/calendar_hijri.hxx |5 +
 i18npool/inc/calendar_jewish.hxx|5 +
 i18npool/inc/cclass_unicode.hxx |5 +
 i18npool/inc/chaptercollator.hxx|5 +
 i18npool/inc/characterclassificationImpl.hxx|5 +
 i18npool/inc/chartonum.hxx  |5 +
 i18npool/inc/collatorImpl.hxx   |5 +
 i18npool/inc/collator_unicode.hxx   |5 +
 i18npool/inc/defaultnumberingprovider.hxx   |6 +-
 i18npool/inc/indexentrysupplier.hxx |5 +
 i18npool/inc/indexentrysupplier_asian.hxx   |5 ++---
 i18npool/inc/indexentrysupplier_common.hxx  |4 +---
 i18npool/inc/indexentrysupplier_default.hxx |5 +
 i18npool/inc/indexentrysupplier_ja_phonetic.hxx |4 +---
 i18npool/inc/inputsequencechecker.hxx   |5 +
 i18npool/inc/inputsequencechecker_hi.hxx|5 +
 i18npool/inc/inputsequencechecker_th.hxx|5 +
 i18npool/inc/localedata.hxx |5 +
 i18npool/inc/nativenumbersupplier.hxx   |5 +
 i18npool/inc/numberformatcode.hxx   |6 +-
 i18npool/inc/numtochar.hxx  |5 +
 i18npool/inc/numtotext_cjk.hxx  |5 +
 i18npool/inc/ordinalsuffix.hxx  |5 +
 i18npool/inc/servicename.hxx|5 +
 i18npool/inc/textconversion.hxx |5 +
 i18npool/inc/textconversionImpl.hxx |6 +-
 i18npool/inc/texttonum.hxx  |5 +
 i18npool/inc/transliterationImpl.hxx|5 +
 i18npool/inc/transliteration_Ignore.hxx |5 +
 i18npool/inc/transliteration_Numeric.hxx|5 +
 i18npool/inc/transliteration_OneToOne.hxx   |5 +
 i18npool/inc/transliteration_body.hxx   |5 +
 i18npool/inc/transliteration_caseignore.hxx |5 +
 i18npool/inc/transliteration_commonclass.hxx|5 +
 i18npool/inc/unoscripttypedetector.hxx  |5 +
 i18npool/inc/wtt.h  |5 +
 i18npool/inc/xdictionary.hxx|5 +
 43 files changed, 44 insertions(+), 173 deletions(-)

New commits:
commit 805fd18d934c7323f678eb4df2f4b770ea8184f1
Author: Harjot 
AuthorDate: Wed Nov 17 19:48:56 2021 +0530
Commit: Ilmari Lauhakangas 
CommitDate: Sun Nov 21 14:40:56 2021 +0100

tdf#143148 Use pragma once in i18npool

Change-Id: Id67d8926fdc1616add1bd9de051911b2aae030e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125419
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas 

diff --git a/i18npool/inc/breakiteratorImpl.hxx 
b/i18npool/inc/breakiteratorImpl.hxx
index a90f06182777..c27645a60ef2 100644
--- a/i18npool/inc/breakiteratorImpl.hxx
+++ b/i18npool/inc/breakiteratorImpl.hxx
@@ -16,8 +16,7 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef INCLUDED_I18NPOOL_INC_BREAKITERATORIMPL_HXX
-#define INCLUDED_I18NPOOL_INC_BREAKITERATORIMPL_HXX
+#pragma once
 
 #include 
 #include 
@@ -122,7 +121,4 @@ private:
 
 } // i18npool
 
-
-#endif // INCLUDED_I18NPOOL_INC_BREAKITERATORIMPL_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/i18npool/inc/breakiterator_cjk.hxx 
b/i18npool/inc/breakiterator_cjk.hxx
index a11a1535691f..fce0d295ca68 100644
--- a/i18npool/inc/breakiterator_cjk.hxx
+++ b/i18npool/inc/breakiterator_cjk.hxx
@@ -16,8 +16,7 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef INCLUDED_I18NPOOL_INC_BREAKITERATOR_CJK_HXX
-#define INCLUDED_I18NPOOL_INC_BREAKITERATOR_CJK_HXX
+#pragma once
 
 #include "breakiterator_unicode.hxx"
 #include "xdictionary.hxx"
@@ -67,6 +66,4 @@ public:
 
 }
 
-#endif // INCLUDED_I18NPOOL_INC_BREAKITERATOR_CJK_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/i18npool/inc/breakiterator_th.hxx 
b/i18npool/inc/breakiterator_th.hxx
index c694e79e2575..cc6a717493ab 100644
--- a/i18npool/inc/breakiterator_th.hxx
+++ b/i18npool/inc/breakiterator_th.hxx
@@ -16,8 +16,7 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef INCLUDED_I18NPOOL_INC_BREAKITERATOR_TH_HXX
-#define INCLUDED_I18NPOOL_INC_BREAKITERATOR_TH_HXX
+#pragma o

[Libreoffice-commits] core.git: configmgr/source

2021-11-21 Thread Noel Grandin (via logerrit)
 configmgr/source/configurationregistry.cxx |   50 ++---
 1 file changed, 25 insertions(+), 25 deletions(-)

New commits:
commit 7ef421dbfbfd486f235a7c5bdbd856b8ee9d62ea
Author: Noel Grandin 
AuthorDate: Sat Nov 20 22:06:23 2021 +0200
Commit: Noel Grandin 
CommitDate: Sun Nov 21 13:27:20 2021 +0100

osl::Mutex->std::mutex in configuration_registry

Change-Id: If5561d6532716bfe3151f555a691aa5188264a1f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125603
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/configmgr/source/configurationregistry.cxx 
b/configmgr/source/configurationregistry.cxx
index e4d86c46e9f2..1301fcf134ce 100644
--- a/configmgr/source/configurationregistry.cxx
+++ b/configmgr/source/configurationregistry.cxx
@@ -50,7 +50,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 
@@ -119,7 +119,7 @@ private:
 void doClose();
 
 css::uno::Reference< css::lang::XMultiServiceFactory > provider_;
-osl::Mutex mutex_;
+std::mutex mutex_;
 css::uno::Reference< css::uno::XInterface > access_;
 OUString url_;
 bool readOnly_;
@@ -234,7 +234,7 @@ Service::Service(
 }
 
 OUString Service::getURL() {
-osl::MutexGuard g(mutex_);
+std::unique_lock g(mutex_);
 checkValid_RuntimeException();
 return url_;
 }
@@ -242,7 +242,7 @@ OUString Service::getURL() {
 void Service::open(OUString const & rURL, sal_Bool bReadOnly, sal_Bool)
 {
 //TODO: bCreate
-osl::MutexGuard g(mutex_);
+std::unique_lock g(mutex_);
 if (access_.is()) {
 doClose();
 }
@@ -269,13 +269,13 @@ void Service::open(OUString const & rURL, sal_Bool 
bReadOnly, sal_Bool)
 }
 
 sal_Bool Service::isValid() {
-osl::MutexGuard g(mutex_);
+std::unique_lock g(mutex_);
 return access_.is();
 }
 
 void Service::close()
 {
-osl::MutexGuard g(mutex_);
+std::unique_lock g(mutex_);
 checkValid();
 doClose();
 }
@@ -289,13 +289,13 @@ void Service::destroy()
 
 css::uno::Reference< css::registry::XRegistryKey > Service::getRootKey()
 {
-osl::MutexGuard g(mutex_);
+std::unique_lock g(mutex_);
 checkValid();
 return new RegistryKey(*this, css::uno::Any(access_));
 }
 
 sal_Bool Service::isReadOnly() {
-osl::MutexGuard g(mutex_);
+std::unique_lock g(mutex_);
 checkValid_RuntimeException();
 return readOnly_;
 }
@@ -351,7 +351,7 @@ void Service::doClose() {
 }
 
 OUString RegistryKey::getKeyName() {
-osl::MutexGuard g(service_.mutex_);
+std::unique_lock g(service_.mutex_);
 service_.checkValid_RuntimeException();
 css::uno::Reference< css::container::XNamed > named;
 if (value_ >>= named) {
@@ -364,7 +364,7 @@ OUString RegistryKey::getKeyName() {
 
 sal_Bool RegistryKey::isReadOnly()
 {
-osl::MutexGuard g(service_.mutex_);
+std::unique_lock g(service_.mutex_);
 service_.checkValid_RuntimeException();
 return service_.readOnly_; //TODO: read-only sub-nodes in update access?
 }
@@ -375,14 +375,14 @@ sal_Bool RegistryKey::isValid() {
 
 css::registry::RegistryKeyType RegistryKey::getKeyType(OUString const &)
 {
-osl::MutexGuard g(service_.mutex_);
+std::unique_lock g(service_.mutex_);
 service_.checkValid();
 return css::registry::RegistryKeyType_KEY;
 }
 
 css::registry::RegistryValueType RegistryKey::getValueType()
 {
-osl::MutexGuard g(service_.mutex_);
+std::unique_lock g(service_.mutex_);
 service_.checkValid();
 css::uno::Type t(value_.getValueType());
 switch (t.getTypeClass()) {
@@ -409,7 +409,7 @@ css::registry::RegistryValueType RegistryKey::getValueType()
 
 sal_Int32 RegistryKey::getLongValue()
 {
-osl::MutexGuard g(service_.mutex_);
+std::unique_lock g(service_.mutex_);
 service_.checkValid();
 sal_Int32 v = 0;
 if (value_ >>= v) {
@@ -429,7 +429,7 @@ void RegistryKey::setLongValue(sal_Int32)
 
 css::uno::Sequence< sal_Int32 > RegistryKey::getLongListValue()
 {
-osl::MutexGuard g(service_.mutex_);
+std::unique_lock g(service_.mutex_);
 service_.checkValid();
 css::uno::Sequence< sal_Int32 > v;
 if (value_ >>= v) {
@@ -449,7 +449,7 @@ void RegistryKey::setLongListValue(css::uno::Sequence< 
sal_Int32 > const &)
 
 OUString RegistryKey::getAsciiValue()
 {
-osl::MutexGuard g(service_.mutex_);
+std::unique_lock g(service_.mutex_);
 service_.checkValid();
 OUString v;
 if (value_ >>= v) {
@@ -469,7 +469,7 @@ void RegistryKey::setAsciiValue(OUString const &)
 
 css::uno::Sequence< OUString > RegistryKey::getAsciiListValue()
 {
-osl::MutexGuard g(service_.mutex_);
+std::unique_lock g(service_.mutex_);
 service_.checkValid();
 css::uno::Sequence< OUString > v;
 if (value_ >>= v) {
@@ -489,7 +489,7 @@ void RegistryKey::setAsciiListValue(css::uno::Sequence< 
OUString > const &)
 
 OUString RegistryKey::getStringValue()
 {
-osl::MutexGuard g(service_.mutex_);
+std::unique_lock g(serv

[Libreoffice-commits] core.git: comphelper/source

2021-11-21 Thread Noel Grandin (via logerrit)
 comphelper/source/misc/instancelocker.cxx |   44 +++---
 comphelper/source/misc/instancelocker.hxx |2 -
 2 files changed, 24 insertions(+), 22 deletions(-)

New commits:
commit b28fdd1a15b4c7325d760e613bdf67c4cdd77605
Author: Noel Grandin 
AuthorDate: Sat Nov 20 22:00:14 2021 +0200
Commit: Noel Grandin 
CommitDate: Sun Nov 21 12:52:20 2021 +0100

osl::Mutex->std::mutex in OLockListener

Change-Id: I391de15296932ea65f2335b0df7a76e2f77a1a50
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125602
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/comphelper/source/misc/instancelocker.cxx 
b/comphelper/source/misc/instancelocker.cxx
index ffb325bc40b2..28d655223062 100644
--- a/comphelper/source/misc/instancelocker.cxx
+++ b/comphelper/source/misc/instancelocker.cxx
@@ -211,20 +211,25 @@ OLockListener::~OLockListener()
 
 void OLockListener::Dispose()
 {
-osl::MutexGuard aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 
 if ( m_bDisposed )
 return;
 
-if ( m_nMode & embed::Actions::PREVENT_CLOSE )
+auto xInstance = std::move(m_xInstance);
+auto nMode = m_nMode;
+m_bDisposed = true;
+aGuard.unlock();
+
+if ( nMode & embed::Actions::PREVENT_CLOSE )
 {
 try
 {
-uno::Reference< util::XCloseBroadcaster > xCloseBroadcaster( 
m_xInstance, uno::UNO_QUERY );
+uno::Reference< util::XCloseBroadcaster > xCloseBroadcaster( 
xInstance, uno::UNO_QUERY );
 if ( xCloseBroadcaster.is() )
 xCloseBroadcaster->removeCloseListener( static_cast< 
util::XCloseListener* >( this ) );
 
-uno::Reference< util::XCloseable > xCloseable( m_xInstance, 
uno::UNO_QUERY );
+uno::Reference< util::XCloseable > xCloseable( xInstance, 
uno::UNO_QUERY );
 if ( xCloseable.is() )
 xCloseable->close( true );
 }
@@ -232,26 +237,23 @@ void OLockListener::Dispose()
 {}
 }
 
-if ( m_nMode & embed::Actions::PREVENT_TERMINATION )
+if ( nMode & embed::Actions::PREVENT_TERMINATION )
 {
 try
 {
-uno::Reference< frame::XDesktop > xDesktop( m_xInstance, 
uno::UNO_QUERY_THROW );
+uno::Reference< frame::XDesktop > xDesktop( xInstance, 
uno::UNO_QUERY_THROW );
 xDesktop->removeTerminateListener( static_cast< 
frame::XTerminateListener* >( this ) );
 }
 catch( uno::Exception& )
 {}
 }
-
-m_xInstance.clear();
-m_bDisposed = true;
 }
 
 // XEventListener
 
 void SAL_CALL OLockListener::disposing( const lang::EventObject& aEvent )
 {
-osl::ClearableMutexGuard aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 
 // object is disposed
 if ( aEvent.Source != m_xInstance )
@@ -262,7 +264,7 @@ void SAL_CALL OLockListener::disposing( const 
lang::EventObject& aEvent )
 
 // dispose the wrapper;
 uno::Reference< lang::XComponent > xComponent( m_xWrapper.get(), 
uno::UNO_QUERY );
-aGuard.clear();
+aGuard.unlock();
 if ( xComponent.is() )
 {
 try { xComponent->dispose(); }
@@ -276,7 +278,7 @@ void SAL_CALL OLockListener::disposing( const 
lang::EventObject& aEvent )
 void SAL_CALL OLockListener::queryClosing( const lang::EventObject& aEvent, 
sal_Bool )
 {
 // GetsOwnership parameter is always ignored, the user of the service must 
close the object always
-osl::ClearableMutexGuard aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 if ( !(!m_bDisposed && aEvent.Source == m_xInstance && ( m_nMode & 
embed::Actions::PREVENT_CLOSE )) )
 return;
 
@@ -285,7 +287,7 @@ void SAL_CALL OLockListener::queryClosing( const 
lang::EventObject& aEvent, sal_
 uno::Reference< embed::XActionsApproval > xApprove = m_xApproval;
 
 // unlock the mutex here
-aGuard.clear();
+aGuard.unlock();
 
 if ( xApprove.is() && xApprove->approveAction( 
embed::Actions::PREVENT_CLOSE ) )
 throw util::CloseVetoException();
@@ -304,7 +306,7 @@ void SAL_CALL OLockListener::queryClosing( const 
lang::EventObject& aEvent, sal_
 
 void SAL_CALL OLockListener::notifyClosing( const lang::EventObject& aEvent )
 {
-osl::ClearableMutexGuard aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 
 // object is closed, no reason to listen
 if ( aEvent.Source != m_xInstance )
@@ -320,7 +322,7 @@ void SAL_CALL OLockListener::notifyClosing( const 
lang::EventObject& aEvent )
 {
 // dispose the wrapper;
 uno::Reference< lang::XComponent > xComponent( m_xWrapper.get(), 
uno::UNO_QUERY );
-aGuard.clear();
+aGuard.unlock();
 if ( xComponent.is() )
 {
 try { xComponent->dispose(); }
@@ -334,7 +336,7 @@ void SAL_CALL OLockListener::notifyClosing( const 
lang::EventObject& aEvent )
 
 void SAL_CALL OLockListener::queryTermination( const lang::EventObj

[Libreoffice-commits] core.git: include/tools tools/source

2021-11-21 Thread Noel Grandin (via logerrit)
 include/tools/urlobj.hxx |2 
 tools/source/fsys/urlobj.cxx |  158 +++
 2 files changed, 102 insertions(+), 58 deletions(-)

New commits:
commit 0b46361ef84a61100a0274a007062317607d097a
Author: Noel Grandin 
AuthorDate: Sat Nov 20 08:03:49 2021 +0200
Commit: Noel Grandin 
CommitDate: Sun Nov 21 10:26:52 2021 +0100

tdf#133835 speedup calc autofilter (4)

Tweak INetURLObject::parseHost so it doesn't need its own
OUStringBuffer, and can just use the callers'
Saves 5%

Change-Id: I481fabd4272bc9f172dd751a7019090b95a65e2d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125599
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/include/tools/urlobj.hxx b/include/tools/urlobj.hxx
index 6b9dece8bdf3..ede630b7ea7b 100644
--- a/include/tools/urlobj.hxx
+++ b/include/tools/urlobj.hxx
@@ -1037,7 +1037,7 @@ private:
 
 TOOLS_DLLPRIVATE static bool parseHost(
 sal_Unicode const *& rBegin, sal_Unicode const * pEnd,
-OUString & rCanonic);
+OUStringBuffer* pCanonic);
 
 TOOLS_DLLPRIVATE static bool parseHostOrNetBiosName(
 sal_Unicode const * pBegin, sal_Unicode const * pEnd,
diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index 6b074180f6df..8b2882b06b32 100644
--- a/tools/source/fsys/urlobj.cxx
+++ b/tools/source/fsys/urlobj.cxx
@@ -1370,16 +1370,15 @@ bool INetURLObject::setAbsURIRef(OUString const & 
rTheAbsURIRef,
 }
 break;
 }
-OUStringBuffer aSynHost(64);
+sal_Int32 nLenBeforeHost = aSynAbsURIRef.getLength();
 if (!parseHostOrNetBiosName(
 pHostPortBegin, pPort, eMechanism, eCharset,
-bNetBiosName, &aSynHost))
+bNetBiosName, &aSynAbsURIRef))
 {
 setInvalid();
 return false;
 }
-m_aHost.set(aSynAbsURIRef, aSynHost.makeStringAndClear(),
-aSynAbsURIRef.getLength());
+m_aHost = SubString(nLenBeforeHost, aSynAbsURIRef.getLength() - 
nLenBeforeHost);
 if (pPort != pHostPortEnd)
 {
 aSynAbsURIRef.append(':');
@@ -2329,7 +2328,7 @@ bool INetURLObject::setPassword(std::u16string_view 
rThePassword,
 
 // static
 bool INetURLObject::parseHost(sal_Unicode const *& rBegin, sal_Unicode const * 
pEnd,
-OUString & rCanonic)
+OUStringBuffer* pCanonic)
 {
 // RFC 2373 is inconsistent about how to write an IPv6 address in which an
 // IPv4 address directly follows the abbreviating "::".  The ABNF in
@@ -2343,19 +2342,20 @@ bool INetURLObject::parseHost(sal_Unicode const *& 
rBegin, sal_Unicode const * p
  STATE_IP6_HEXSEQ1_MAYBE_IP4, STATE_IP6_HEXSEQ2,
  STATE_IP6_HEXSEQ2_COLON, STATE_IP6_HEXSEQ2_MAYBE_IP4,
  STATE_IP6_IP4, STATE_IP6_IP4_DOT, STATE_IP6_DONE };
-OUStringBuffer aTheCanonic(32);
 sal_uInt32 nNumber = 0;
 int nDigits = 0;
 int nOctets = 0;
 State eState = STATE_INITIAL;
 sal_Unicode const * p = rBegin;
+sal_Int32 nOriginalCanonicLength = pCanonic ? pCanonic->getLength() : 0;
 for (; p != pEnd; ++p)
 switch (eState)
 {
 case STATE_INITIAL:
 if (*p == '[')
 {
-aTheCanonic.append('[');
+if (pCanonic)
+pCanonic->append('[');
 eState = STATE_IP6;
 }
 else if (rtl::isAsciiAlpha(*p) || *p == '_')
@@ -2425,8 +2425,11 @@ bool INetURLObject::parseHost(sal_Unicode const *& 
rBegin, sal_Unicode const * p
 if (*p == '.')
 if (nOctets < 4)
 {
-aTheCanonic.append(static_cast(nNumber));
-aTheCanonic.append( '.' );
+if (pCanonic)
+{
+pCanonic->append(static_cast(nNumber));
+pCanonic->append( '.' );
+}
 ++nOctets;
 eState = STATE_IP4_DOT;
 }
@@ -2477,7 +2480,8 @@ bool INetURLObject::parseHost(sal_Unicode const *& 
rBegin, sal_Unicode const * p
 case STATE_IP6_COLON:
 if (*p == ':')
 {
-aTheCanonic.append("::");
+if (pCanonic)
+pCanonic->append("::");
 eState = STATE_IP6_2COLON;
 }
 else
@@ -2489,7 +2493,8 @@ bool INetURLObject::parseHost(sal_Unicode const *& 
rBegin, sal_Unicode const * p
 eState = STATE_IP6_DONE;
 else if (*p == ':')
 {
-aTheCanonic.append(':');
+if (pCanonic)
+ 

[Libreoffice-commits] core.git: sw/source

2021-11-21 Thread Jim Raykowski (via logerrit)
 sw/source/uibase/docvw/edtwin.cxx |   34 ++
 1 file changed, 18 insertions(+), 16 deletions(-)

New commits:
commit 437d5a446733aca0a485218f29d8d7dcea4d3999
Author: Jim Raykowski 
AuthorDate: Wed Nov 17 20:20:25 2021 -0900
Commit: Mike Kaganski 
CommitDate: Sun Nov 21 09:47:57 2021 +0100

tdf#145207 Check for drawing object before Table to handle Tab key

to fix crash that can occur if done the other way

Change-Id: I378aa8444906d56647ab4fdde26d4ff1c9f511f5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125435
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/sw/source/uibase/docvw/edtwin.cxx 
b/sw/source/uibase/docvw/edtwin.cxx
index 52022b1a465a..4c8608c4a5b9 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -2041,6 +2041,15 @@ KEYINPUT_CHECKTABLE_INSDEL:
 }
 }
 }
+else if (rSh.GetSelectionType() &
+ (SelectionType::Graphic |
+  SelectionType::Frame |
+  SelectionType::Ole |
+  SelectionType::DrawObject |
+  SelectionType::DbForm))
+{
+eKeyState = SwKeyState::NextObject;
+}
 else if ( rSh.GetTableFormat() )
 {
 if( rSh.HasSelection() || rSh.HasReadonlySel() )
@@ -2051,14 +2060,6 @@ KEYINPUT_CHECKTABLE_INSDEL:
 eNextKeyState = SwKeyState::NextCell;
 }
 }
-else if ( rSh.GetSelectionType() &
-(SelectionType::Graphic |
-SelectionType::Frame |
-SelectionType::Ole |
-SelectionType::DrawObject |
-SelectionType::DbForm))
-
-eKeyState = SwKeyState::NextObject;
 else
 {
 eKeyState = SwKeyState::InsTab;
@@ -2096,6 +2097,15 @@ KEYINPUT_CHECKTABLE_INSDEL:
 else
 eKeyState = SwKeyState::NumUp;
 }
+else if (rSh.GetSelectionType() &
+ (SelectionType::Graphic |
+  SelectionType::Frame |
+  SelectionType::Ole |
+  SelectionType::DrawObject |
+  SelectionType::DbForm))
+{
+eKeyState = SwKeyState::PrevObject;
+}
 else if ( rSh.GetTableFormat() )
 {
 if( rSh.HasSelection() || rSh.HasReadonlySel() )
@@ -2106,14 +2116,6 @@ KEYINPUT_CHECKTABLE_INSDEL:
 eNextKeyState = SwKeyState::PrevCell;
 }
 }
-else if ( rSh.GetSelectionType() &
-(SelectionType::Graphic |
-SelectionType::Frame |
-SelectionType::Ole |
-SelectionType::DrawObject |
-SelectionType::DbForm))
-
-eKeyState = SwKeyState::PrevObject;
 else
 {
 eKeyState = SwKeyState::End;