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

2018-01-25 Thread Andrea Gelmini
 sw/qa/extras/tiledrendering/tiledrendering.cxx |2 +-
 sw/source/uibase/uiview/viewling.cxx   |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 6e36e0ce006a85fb286b787def737bff6c8e9d8f
Author: Andrea Gelmini 
Date:   Fri Jan 26 08:44:07 2018 +0100

Fix typos

Change-Id: Iffdbe1ce151f31b65e353cf87aaa1e0102d4430d
Reviewed-on: https://gerrit.libreoffice.org/48653
Reviewed-by: Julien Nabet 
Tested-by: Julien Nabet 

diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx 
b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index c89b9cf844ef..3bf2d07a595f 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -2046,7 +2046,7 @@ void SwTiledRenderingTest::testTdf115088()
 Scheduler::ProcessEventsToIdle();
 comphelper::dispatchCommand(".uno:Copy", 
uno::Sequence());
 
-// Move cursor to the begining of the first line and paste
+// Move cursor to the beginning of the first line and paste
 pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_HOME | 
KEY_MOD1);
 pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, KEY_HOME | KEY_MOD1);
 Scheduler::ProcessEventsToIdle();
diff --git a/sw/source/uibase/uiview/viewling.cxx 
b/sw/source/uibase/uiview/viewling.cxx
index cb7f8b11c546..2057a113ad0c 100644
--- a/sw/source/uibase/uiview/viewling.cxx
+++ b/sw/source/uibase/uiview/viewling.cxx
@@ -572,7 +572,7 @@ void SwView::StartThesaurus()
 
 if (pDlg)
 {
-guard.dismiss(); // ignore, we'll call SetIdle() explictly after 
the dialog ends
+guard.dismiss(); // ignore, we'll call SetIdle() explicitly after 
the dialog ends
 
 pDlg->StartExecuteAsync([=](sal_Int32 nResult){
 if (nResult == RET_OK )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-25 Thread ekuiitr
 desktop/source/migration/services/jvmfwk.cxx|3 +--
 desktop/source/migration/services/oo3extensionmigration.cxx |2 +-
 desktop/source/migration/services/wordbookmigration.cxx |2 +-
 desktop/source/offacc/acceptor.cxx  |3 +--
 4 files changed, 4 insertions(+), 6 deletions(-)

New commits:
commit 155dd4ebec9c38c0c478f648b09045e037818aea
Author: ekuiitr 
Date:   Fri Jan 26 00:07:43 2018 +0530

tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctor

Change-Id: Idc14e71c732ce031b9bec556401dc84fd0757b6b
Reviewed-on: https://gerrit.libreoffice.org/48636
Tested-by: Jenkins 
Reviewed-by: Samuel Mehrbrodt 

diff --git a/desktop/source/migration/services/jvmfwk.cxx 
b/desktop/source/migration/services/jvmfwk.cxx
index fc858ec3a039..24e0d50930c0 100644
--- a/desktop/source/migration/services/jvmfwk.cxx
+++ b/desktop/source/migration/services/jvmfwk.cxx
@@ -152,8 +152,7 @@ OUString jvmfwk_getImplementationName()
 
 css::uno::Sequence< OUString > jvmfwk_getSupportedServiceNames()
 {
-OUString str_name = SERVICE_NAME;
-return css::uno::Sequence< OUString >( &str_name, 1 );
+return { SERVICE_NAME };
 }
 
 // XServiceInfo
diff --git a/desktop/source/migration/services/oo3extensionmigration.cxx 
b/desktop/source/migration/services/oo3extensionmigration.cxx
index 4510c93d2831..b98b90bf559f 100644
--- a/desktop/source/migration/services/oo3extensionmigration.cxx
+++ b/desktop/source/migration/services/oo3extensionmigration.cxx
@@ -63,7 +63,7 @@ OUString OO3ExtensionMigration_getImplementationName()
 
 Sequence< OUString > OO3ExtensionMigration_getSupportedServiceNames()
 {
-return Sequence< OUString > { "com.sun.star.migration.Extensions" };
+return { "com.sun.star.migration.Extensions" };
 }
 
 
diff --git a/desktop/source/migration/services/wordbookmigration.cxx 
b/desktop/source/migration/services/wordbookmigration.cxx
index ab2264e4d683..8730a8707b29 100644
--- a/desktop/source/migration/services/wordbookmigration.cxx
+++ b/desktop/source/migration/services/wordbookmigration.cxx
@@ -40,7 +40,7 @@ namespace migration
 
 Sequence< OUString > WordbookMigration_getSupportedServiceNames()
 {
-return Sequence< OUString > { "com.sun.star.migration.Wordbooks" };
+return { "com.sun.star.migration.Wordbooks" };
 }
 
 
diff --git a/desktop/source/offacc/acceptor.cxx 
b/desktop/source/offacc/acceptor.cxx
index 6244b79e2c4e..40287169ae97 100644
--- a/desktop/source/offacc/acceptor.cxx
+++ b/desktop/source/offacc/acceptor.cxx
@@ -188,8 +188,7 @@ OUString Acceptor::getImplementationName()
 }
 Sequence Acceptor::impl_getSupportedServiceNames()
 {
-Sequence aSequence { "com.sun.star.office.Acceptor" };
-return aSequence;
+return { "com.sun.star.office.Acceptor" };
 }
 Sequence Acceptor::getSupportedServiceNames()
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-25 Thread Noel Grandin
 ucb/source/sorter/sortresult.cxx |   11 ---
 ucb/source/sorter/sortresult.hxx |5 +++--
 2 files changed, 7 insertions(+), 9 deletions(-)

New commits:
commit 47ae2add3a818dff6c85c5a4376772b542258484
Author: Noel Grandin 
Date:   Tue Jan 23 08:56:19 2018 +0200

loplugin:useuniqueptr in SortedResultSet

Change-Id: Ib57cf4b30afda6f5e0d024a0c72417f6b1786e9a
Reviewed-on: https://gerrit.libreoffice.org/48588
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/ucb/source/sorter/sortresult.cxx b/ucb/source/sorter/sortresult.cxx
index 4041fdcb806e..e18360794bf4 100644
--- a/ucb/source/sorter/sortresult.cxx
+++ b/ucb/source/sorter/sortresult.cxx
@@ -141,9 +141,6 @@ SortedResultSet::~SortedResultSet()
 mpSortInfo = nullptr;
 
 mpPropSetInfo.clear();
-
-delete mpPropChangeListeners;
-delete mpVetoChangeListeners;
 }
 
 
@@ -823,8 +820,8 @@ void SAL_CALL SortedResultSet::addPropertyChangeListener(
 osl::Guard< osl::Mutex > aGuard( maMutex );
 
 if ( !mpPropChangeListeners )
-mpPropChangeListeners =
-new PropertyChangeListeners_Impl();
+mpPropChangeListeners.reset(
+new PropertyChangeListeners_Impl() );
 
 mpPropChangeListeners->addInterface( PropertyName, Listener );
 }
@@ -848,8 +845,8 @@ void SAL_CALL SortedResultSet::addVetoableChangeListener(
 osl::Guard< osl::Mutex > aGuard( maMutex );
 
 if ( !mpVetoChangeListeners )
-mpVetoChangeListeners =
-new PropertyChangeListeners_Impl();
+mpVetoChangeListeners.reset(
+new PropertyChangeListeners_Impl() );
 
 mpVetoChangeListeners->addInterface( PropertyName, Listener );
 }
diff --git a/ucb/source/sorter/sortresult.hxx b/ucb/source/sorter/sortresult.hxx
index 649a5c957e5d..f97f9050c6bc 100644
--- a/ucb/source/sorter/sortresult.hxx
+++ b/ucb/source/sorter/sortresult.hxx
@@ -37,6 +37,7 @@
 #include 
 #include 
 #include 
+#include 
 
 namespace comphelper {
 class OInterfaceContainerHelper2;
@@ -99,8 +100,8 @@ class SortedResultSet: public cppu::WeakImplHelper <
 css::beans::XPropertySet >
 {
 comphelper::OInterfaceContainerHelper2 *mpDisposeEventListeners;
-PropertyChangeListeners_Impl*mpPropChangeListeners;
-PropertyChangeListeners_Impl*mpVetoChangeListeners;
+std::unique_ptrmpPropChangeListeners;
+std::unique_ptrmpVetoChangeListeners;
 
 css::uno::Reference < css::sdbc::XResultSet >mxOriginal;
 css::uno::Reference < css::sdbc::XResultSet >mxOther;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-25 Thread Noel Grandin
 ucb/source/sorter/sortdynres.cxx |6 +++---
 ucb/source/sorter/sortdynres.hxx |3 ++-
 2 files changed, 5 insertions(+), 4 deletions(-)

New commits:
commit b4155c305daf5c64b964bb2b8ea8d6bd672fd46b
Author: Noel Grandin 
Date:   Mon Jan 22 14:24:02 2018 +0200

loplugin:useuniqueptr in SortedDynamicResultSet

Change-Id: Ife4849926f26631bbe65bd22158165fac306cd43
Reviewed-on: https://gerrit.libreoffice.org/48586
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/ucb/source/sorter/sortdynres.cxx b/ucb/source/sorter/sortdynres.cxx
index 7d8fef03c82c..114d29c5f2e6 100644
--- a/ucb/source/sorter/sortdynres.cxx
+++ b/ucb/source/sorter/sortdynres.cxx
@@ -73,7 +73,7 @@ SortedDynamicResultSet::~SortedDynamicResultSet()
 mxOwnListener->impl_OwnerDies();
 mxOwnListener.clear();
 
-delete mpDisposeEventListeners;
+mpDisposeEventListeners.reset();
 
 mxOne.clear();
 mxTwo.clear();
@@ -123,8 +123,8 @@ void SAL_CALL SortedDynamicResultSet::addEventListener(
 osl::Guard< osl::Mutex > aGuard( maMutex );
 
 if ( !mpDisposeEventListeners )
-mpDisposeEventListeners =
-new OInterfaceContainerHelper2( getContainerMutex() );
+mpDisposeEventListeners.reset(
+new OInterfaceContainerHelper2( getContainerMutex() ) );
 
 mpDisposeEventListeners->addInterface( Listener );
 }
diff --git a/ucb/source/sorter/sortdynres.hxx b/ucb/source/sorter/sortdynres.hxx
index 9e100df1f143..d121ba52683c 100644
--- a/ucb/source/sorter/sortdynres.hxx
+++ b/ucb/source/sorter/sortdynres.hxx
@@ -28,6 +28,7 @@
 #include 
 #include 
 #include 
+#include 
 #include "sortresult.hxx"
 
 
@@ -44,7 +45,7 @@ class SortedDynamicResultSet: public cppu::WeakImplHelper <
 css::lang::XServiceInfo,
 css::ucb::XDynamicResultSet >
 {
-comphelper::OInterfaceContainerHelper2 *mpDisposeEventListeners;
+std::unique_ptr  
mpDisposeEventListeners;
 
 css::uno::Reference < css::ucb::XDynamicResultSetListener > mxListener;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-25 Thread Noel Grandin
 ucb/source/core/ucbstore.cxx |   29 ++---
 1 file changed, 10 insertions(+), 19 deletions(-)

New commits:
commit 3cf85c9ff1975ed086eb9a390ea870d39313fed1
Author: Noel Grandin 
Date:   Mon Jan 22 14:26:02 2018 +0200

loplugin:useuniqueptr in PersistentPropertySet_Impl

Change-Id: I78259770767fd3bbe3217f20a513703e7347288f
Reviewed-on: https://gerrit.libreoffice.org/48587
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/ucb/source/core/ucbstore.cxx b/ucb/source/core/ucbstore.cxx
index 5e3fdfa90d53..62909dd6c692 100644
--- a/ucb/source/core/ucbstore.cxx
+++ b/ucb/source/core/ucbstore.cxx
@@ -1059,24 +1059,15 @@ struct PersistentPropertySet_Impl
 OUStringm_aKey;
 OUStringm_aFullKey;
 osl::Mutex  m_aMutex;
-OInterfaceContainerHelper2*  m_pDisposeEventListeners;
-OInterfaceContainerHelper2*  m_pPropSetChangeListeners;
-PropertyListeners_Impl* m_pPropertyChangeListeners;
+std::unique_ptr  m_pDisposeEventListeners;
+std::unique_ptr  m_pPropSetChangeListeners;
+std::unique_ptr  m_pPropertyChangeListeners;
 
 PersistentPropertySet_Impl( PropertySetRegistry& rCreator,
 const OUString& rKey )
-: m_pCreator( &rCreator ), m_pInfo( nullptr ), m_aKey( rKey ),
-  m_pDisposeEventListeners( nullptr ), m_pPropSetChangeListeners( nullptr 
),
-  m_pPropertyChangeListeners( nullptr )
+: m_pCreator( &rCreator ), m_pInfo( nullptr ), m_aKey( rKey )
 {
 }
-
-~PersistentPropertySet_Impl()
-{
-delete m_pDisposeEventListeners;
-delete m_pPropSetChangeListeners;
-delete m_pPropertyChangeListeners;
-}
 };
 
 
@@ -1155,8 +1146,8 @@ void SAL_CALL PersistentPropertySet::addEventListener(
 const Reference< XEventListener >& Listener )
 {
 if ( !m_pImpl->m_pDisposeEventListeners )
-m_pImpl->m_pDisposeEventListeners =
-new OInterfaceContainerHelper2( m_pImpl->m_aMutex );
+m_pImpl->m_pDisposeEventListeners.reset(
+new OInterfaceContainerHelper2( m_pImpl->m_aMutex ) );
 
 m_pImpl->m_pDisposeEventListeners->addInterface( Listener );
 }
@@ -1329,8 +1320,8 @@ void SAL_CALL 
PersistentPropertySet::addPropertyChangeListener(
 //  load();
 
 if ( !m_pImpl->m_pPropertyChangeListeners )
-m_pImpl->m_pPropertyChangeListeners =
-new PropertyListeners_Impl( m_pImpl->m_aMutex );
+m_pImpl->m_pPropertyChangeListeners.reset(
+new PropertyListeners_Impl( m_pImpl->m_aMutex ) );
 
 m_pImpl->m_pPropertyChangeListeners->addInterface(
 aPropertyName, xListener );
@@ -1724,8 +1715,8 @@ void SAL_CALL 
PersistentPropertySet::addPropertySetInfoChangeListener(
 const Reference< XPropertySetInfoChangeListener >& Listener )
 {
 if ( !m_pImpl->m_pPropSetChangeListeners )
-m_pImpl->m_pPropSetChangeListeners =
-new OInterfaceContainerHelper2( m_pImpl->m_aMutex );
+m_pImpl->m_pPropSetChangeListeners.reset(
+new OInterfaceContainerHelper2( m_pImpl->m_aMutex ) );
 
 m_pImpl->m_pPropSetChangeListeners->addInterface( Listener );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - cui/source include/xmloff xmloff/source

2018-01-25 Thread Jim Raykowski
 cui/source/inc/paragrph.hxx  |4 
 cui/source/tabpages/paragrph.cxx |  184 +++
 include/xmloff/txtparae.hxx  |   12 +-
 xmloff/source/text/txtparae.cxx  |   20 ++--
 4 files changed, 129 insertions(+), 91 deletions(-)

New commits:
commit 122da2eea23faf6916c3f3b9e1895f5c404b26c7
Author: Jim Raykowski 
Date:   Sat Nov 18 22:21:24 2017 -0900

tdf#107567 et al. Paragraph dialog preview windows fixes

tdf#107567 tdf#98211 tdf#98212 tdf#113275

Change-Id: I6d11cb809283eee4fa79acae9aa32baaab558833
Reviewed-on: https://gerrit.libreoffice.org/45273
Tested-by: Jenkins 
Reviewed-by: Samuel Mehrbrodt 

diff --git a/cui/source/inc/paragrph.hxx b/cui/source/inc/paragrph.hxx
index 2060cd224064..bc79add8c31c 100644
--- a/cui/source/inc/paragrph.hxx
+++ b/cui/source/inc/paragrph.hxx
@@ -46,6 +46,7 @@ class SvxLineSpacingItem;
 class SvxStdParagraphTabPage: public SfxTabPage
 {
 friend class VclPtr;
+using TabPage::ActivatePage;
 using TabPage::DeactivatePage;
 static const sal_uInt16 pStdRanges[];
 
@@ -94,6 +95,7 @@ private:
 DECL_LINK( AutoHdl_Impl, Button*, void );
 
 protected:
+virtual voidActivatePage( const SfxItemSet& rSet ) override;
 virtual DeactivateRCDeactivatePage( SfxItemSet* pSet ) override;
 
 
@@ -124,6 +126,7 @@ public:
 class SvxParaAlignTabPage : public SfxTabPage
 {
 friend class VclPtr;
+using TabPage::ActivatePage;
 using TabPage::DeactivatePage;
 static const sal_uInt16 pAlignRanges[];
 
@@ -159,6 +162,7 @@ class SvxParaAlignTabPage : public SfxTabPage
 SvxParaAlignTabPage( vcl::Window* pParent, const 
SfxItemSet& rSet );
 
 protected:
+virtual voidActivatePage( const SfxItemSet& rSet ) override;
 virtual DeactivateRCDeactivatePage( SfxItemSet* pSet ) override;
 
 public:
diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index 5ea77cf288e1..61cdb6603321 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -617,6 +617,43 @@ void SvxStdParagraphTabPage::EnableRelativeMode()
 bRelativeMode = true;
 }
 
+void SvxStdParagraphTabPage::ActivatePage( const SfxItemSet& rSet )
+{
+sal_uInt16 _nWhich = GetWhich( SID_ATTR_PARA_ADJUST );
+SfxItemState eItemState = rSet.GetItemState( _nWhich );
+
+if ( eItemState >= SfxItemState::DEFAULT )
+{
+const SvxAdjustItem& rAdj = static_cast( 
rSet.Get( _nWhich ) );
+SvxAdjust eAdjust = rAdj.GetAdjust();
+if ( eAdjust == SvxAdjust::Center || eAdjust == SvxAdjust::Block )
+{
+_nWhich = GetWhich( SID_ATTR_FRAMEDIRECTION );
+eItemState = rSet.GetItemState( _nWhich );
+
+if ( eItemState >= SfxItemState::DEFAULT )
+{
+const SvxFrameDirectionItem& rFrameDirItem = static_cast( rSet.Get( _nWhich ) );
+SvxFrameDirection eFrameDirection = rFrameDirItem.GetValue();
+
+m_pExampleWin->EnableRTL( SvxFrameDirection::Horizontal_RL_TB 
== eFrameDirection );
+
+if ( eAdjust == SvxAdjust::Block )
+m_pExampleWin->SetLastLine( rAdj.GetLastBlock() );
+}
+}
+else
+{
+m_pExampleWin->EnableRTL( eAdjust == SvxAdjust::Right );
+eAdjust = SvxAdjust::Left; //required for correct preview display
+m_pExampleWin->SetLastLine( eAdjust );
+}
+m_pExampleWin->SetAdjust( eAdjust );
+
+UpdateExample_Impl();
+}
+}
+
 DeactivateRC SvxStdParagraphTabPage::DeactivatePage( SfxItemSet* _pSet )
 {
 ELRLoseFocusHdl( *m_pFLineIndent );
@@ -1002,6 +1039,8 @@ SvxParaAlignTabPage::SvxParaAlignTabPage( vcl::Window* 
pParent, const SfxItemSet
 get(m_pPropertiesFL,"framePROPERTIES");
 get(m_pTextDirectionLB,"comboLB_TEXTDIRECTION");
 
+SetExchangeSupport();
+
 SvtLanguageOptions aLangOptions;
 sal_uInt16 nLastLinePos = LASTLINEPOS_DEFAULT;
 
@@ -1083,69 +1122,35 @@ bool SvxParaAlignTabPage::FillItemSet( SfxItemSet* 
rOutSet )
 {
 bool bModified = false;
 
-bool bAdj = false, bChecked = false;
 SvxAdjust eAdjust = SvxAdjust::Left;
 
 if ( m_pLeft->IsChecked() )
-{
 eAdjust = SvxAdjust::Left;
-bAdj = !m_pLeft->GetSavedValue();
-bChecked = true;
-}
 else if ( m_pRight->IsChecked() )
-{
 eAdjust = SvxAdjust::Right;
-bAdj = !m_pRight->GetSavedValue();
-bChecked = true;
-}
 else if ( m_pCenter->IsChecked() )
-{
 eAdjust = SvxAdjust::Center;
-bAdj = !m_pCenter->GetSavedValue();
-bChecked = true;
-}
 else if ( m_pJustify->IsChecked() )
-{
 eAdjust = SvxAdjust::Block;
-bAdj = !m_pJustify->GetSavedValue() ||
-m_pExpandCB->IsValueChangedFromSaved() ||
-m_pLastLineLB->IsValueChangedFromSaved();
-bChecked =

[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang include/svx sd/inc sd/source svx/inc svx/source

2018-01-25 Thread Noel Grandin
 compilerplugins/clang/datamembershadow.cxx|2 -
 include/svx/sdr/contact/objectcontactofobjlistpainter.hxx |2 -
 include/svx/sdr/table/tablecontroller.hxx |2 -
 include/svx/svdedxv.hxx   |3 +
 include/svx/svdobj.hxx|2 -
 include/svx/svdoutl.hxx   |2 -
 include/svx/svdpage.hxx   |2 -
 sd/inc/Outliner.hxx   |2 -
 sd/inc/OutlinerIterator.hxx   |4 +-
 sd/inc/undo/undoobjects.hxx   |   24 +++---
 sd/source/core/stlfamily.cxx  |2 -
 sd/source/ui/func/smarttag.cxx|4 +-
 sd/source/ui/inc/OutlinerIteratorImpl.hxx |4 +-
 sd/source/ui/inc/futext.hxx   |3 +
 sd/source/ui/inc/smarttag.hxx |4 +-
 sd/source/ui/view/OutlinerIterator.cxx|6 +--
 sd/source/ui/view/sdview.cxx  |2 -
 sd/source/ui/view/viewoverlaymanager.cxx  |8 ++--
 svx/inc/sdr/primitive2d/sdrolecontentprimitive2d.hxx  |2 -
 svx/source/sdr/contact/objectcontactofobjlistpainter.cxx  |2 -
 svx/source/svdraw/svdpage.cxx |   10 ++---
 svx/source/table/tableundo.cxx|2 -
 svx/source/table/tableundo.hxx|6 +--
 svx/source/unodraw/gluepts.cxx|2 -
 24 files changed, 49 insertions(+), 53 deletions(-)

New commits:
commit 398bbde8231e77bd4106c09c34839f0f16f2f7ee
Author: Noel Grandin 
Date:   Thu Jan 25 11:50:14 2018 +0200

expand out SdrObjectWeakRef and SdrPageWeakRef typedefs

Change-Id: Icacc7354df4a927533e6fec072cdd527e4c57b96
Reviewed-on: https://gerrit.libreoffice.org/48566
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/include/svx/sdr/contact/objectcontactofobjlistpainter.hxx 
b/include/svx/sdr/contact/objectcontactofobjlistpainter.hxx
index 380e927ca568..7390f30b08a7 100644
--- a/include/svx/sdr/contact/objectcontactofobjlistpainter.hxx
+++ b/include/svx/sdr/contact/objectcontactofobjlistpainter.hxx
@@ -90,7 +90,7 @@ protected:
 ObjectContact&  mrOriginalObjectContact;
 
 // Set StartPoint for next run, also given in constructor
-SdrPageWeakRef  mxStartPage;
+tools::WeakReference   mxStartPage;
 
 // Hierarchy access methods
 virtual sal_uInt32 GetPaintObjectCount() const override;
diff --git a/include/svx/sdr/table/tablecontroller.hxx 
b/include/svx/sdr/table/tablecontroller.hxx
index 79730758b419..d621d87d2fd0 100644
--- a/include/svx/sdr/table/tablecontroller.hxx
+++ b/include/svx/sdr/table/tablecontroller.hxx
@@ -176,7 +176,7 @@ private:
 sdr::overlay::OverlayObjectList*  mpSelectionOverlay;
 
 SdrView* mpView;
-SdrObjectWeakRef mxTableObj;
+tools::WeakReference mxTableObj;
 SdrModel* mpModel;
 
 css::uno::Reference< css::util::XModifyListener > mxModifyListener;
diff --git a/include/svx/svdedxv.hxx b/include/svx/svdedxv.hxx
index b55385e77d17..20f61dff15af 100644
--- a/include/svx/svdedxv.hxx
+++ b/include/svx/svdedxv.hxx
@@ -74,7 +74,8 @@ class SVX_DLLPUBLIC SdrObjEditView: public SdrGlueEditView, 
public EditViewCallb
 
 protected:
 // TextEdit
-SdrObjectWeakRefmxTextEditObj; // current object in 
TextEdit
+tools::WeakReference
+mxTextEditObj; // current object in 
TextEdit
 SdrPageView*pTextEditPV;
 SdrOutliner*pTextEditOutliner; // outliner for the 
TextEdit
 OutlinerView*   pTextEditOutlinerView; // current view of the 
outliners
diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
index 265ec9b96c72..25ab2c824e14 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -1003,8 +1003,6 @@ private:
 SdrObjFactory() = delete;
 };
 
-typedef tools::WeakReference< SdrObject > SdrObjectWeakRef;
-
 template< typename T > T* SdrObject::CloneHelper() const
 {
 OSL_ASSERT( typeid( T ) == typeid( *this ));
diff --git a/include/svx/svdoutl.hxx b/include/svx/svdoutl.hxx
index 5d1f9e842593..b13cd4b0ab6f 100644
--- a/include/svx/svdoutl.hxx
+++ b/include/svx/svdoutl.hxx
@@ -30,7 +30,7 @@ class SdrPage;
 class SVX_DLLPUBLIC SdrOutliner : public Outliner
 {
 protected:
-SdrObjectWeakRef mpTextObj;
+tools::WeakReference mpTextObj;
 const SdrPage* mpVisualizedPage;
 
 public:
diff --git a/include/svx/svdpage.hxx b/include/svx/svdpage.hxx
index 0952a9335ac3..7f9917bacb29 100644
--- a/include/svx/svdpage.hxx
+++ b/include/svx/svdpage.hxx
@@ -512,8 +512,6 @@ private:
 void impl_setModelForLay

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

2018-01-25 Thread Stephan Bergmann
 sw/source/filter/xml/xmlimpit.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 1a0b01f2238e30a58a2bb4a4054b7726887fe15d
Author: Stephan Bergmann 
Date:   Thu Jan 25 16:50:51 2018 +0100

USHRT_MAX -> SAL_MAX_UINT16

The check against USHRT_MAX and the mismatching cast to sal_uInt16 in the
following SetWidth call were like that ever since the code first shows up in
57941a2dfdb461a2444a0ab84076db8423c46ca7 "#86004# removed
SfxPoolItem::importXML, exportXML, equalsXML".

Change-Id: Icd63d5b66765fc2391898a9d47a228407b9d5744
Reviewed-on: https://gerrit.libreoffice.org/48631
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/sw/source/filter/xml/xmlimpit.cxx 
b/sw/source/filter/xml/xmlimpit.cxx
index d4e9344d6b8a..32a591e82b0b 100644
--- a/sw/source/filter/xml/xmlimpit.cxx
+++ b/sw/source/filter/xml/xmlimpit.cxx
@@ -902,8 +902,8 @@ bool SvXMLImportItemMapper::PutXMLValue(
 sal_Int32 nValue = rValue.toInt32();
 if( nValue < MINLAY )
 nValue = MINLAY;
-else if( nValue > USHRT_MAX )
-nValue = USHRT_MAX;
+else if( nValue > SAL_MAX_UINT16 )
+nValue = SAL_MAX_UINT16;
 
 rFrameSize.SetWidth( static_cast(nValue) );
 rFrameSize.SetHeightSizeType( ATT_VAR_SIZE );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


open source contribution

2018-01-25 Thread Aanjaneya Singh Dhoni
I m Computer Science student and network security enthusiast. I want to
part of your organisation's open source projects. How can i start. Please
guide me as a newbie.

-- 



 
  

 
 
 
 
 
 


--

This email and the information it contains are confidential and may be 
privileged. If you have received this email in error please notify me 
immediately. You should not copy it for any purpose, or disclose its 
contents to any other person. Internet communications are not secure and, 
therefore, Poornima University does not accept legal responsibility for the 
contents of this message as it has been transmitted over a public network. 
If you suspect the message may have been intercepted or amended please 
contact us.

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


support ActiveX components in LibreOffice

2018-01-25 Thread Stančík Pavel
Hello
We use CRM system QAD CRM which comunicate with MS Office via ActiveX 
components.
We would like to move to LibreOffice.
That´s why we need to know how work and how you support ActiveX components in 
LibreOffice.
I found out some pieces of informations in forum and help 
(https://help.libreoffice.org) but they are not unit.
Does LibreOffice support ActiveX objects, methods and classes the same way like 
MS Office do?
If yes, for which release of LO?
Would you continue support ActiveX components in future?
 

Best regards 

   Pavel Stancik
   Consultant IS
 


 

Minerva Slovensko, a.s.
Sokolská 7
960 01 Zvolen
Slovakia
 
Tel.: +421 45 5400722
Fax: +421 45 5400720
 
 

pavel.stan...@minerva-is.sk 
http://www.minerva-is.eu___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2018-01-25 Thread Jens Carl
 connectivity/source/drivers/calc/CTable.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 583a574d045ffc1eb4e2b05f60852df0db8ae2c2
Author: Jens Carl 
Date:   Thu Jan 25 23:39:06 2018 +

Update comment to reflect the right type

Follow up from commit 4cdb7fa375ba1894deb412853214f01f95bd3f05,
where it was missed.

Change-Id: Icfc123b0e238705f175fda6308ecc40569d3a31a
Reviewed-on: https://gerrit.libreoffice.org/48643
Reviewed-by: Jens Carl 
Tested-by: Jens Carl 

diff --git a/connectivity/source/drivers/calc/CTable.cxx 
b/connectivity/source/drivers/calc/CTable.cxx
index 37263aa5477f..bce84e2b05b3 100644
--- a/connectivity/source/drivers/calc/CTable.cxx
+++ b/connectivity/source/drivers/calc/CTable.cxx
@@ -146,7 +146,7 @@ static CellContentType lcl_GetContentOrResultType( const 
Reference& xCell
 Reference xProp( xCell, UNO_QUERY );
 try
 {
-xProp->getPropertyValue( "CellContentType" ) >>= eCellType;  
// type of formula result
+xProp->getPropertyValue( "CellContentType" ) >>= eCellType;  
// type of cell content
 }
 catch (UnknownPropertyException&)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-25 Thread brian houston morrow
 sw/uiconfig/swriter/ui/columnpage.ui |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit d31ff9d4df7a87f67c5583c0eb78e0fbe1ba6641
Author: brian houston morrow 
Date:   Tue Jan 23 18:38:57 2018 -0600

tdf#113239 Increase tick amount for spacing spinner to 0.1

Change-Id: I8bb2f3863ed16b11c6a65c59b89d41dcdf2d8544
Reviewed-on: https://gerrit.libreoffice.org/48475
Tested-by: Jenkins 
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/sw/uiconfig/swriter/ui/columnpage.ui 
b/sw/uiconfig/swriter/ui/columnpage.ui
index 1ce5640810cf..577f6430f8f8 100644
--- a/sw/uiconfig/swriter/ui/columnpage.ui
+++ b/sw/uiconfig/swriter/ui/columnpage.ui
@@ -13,12 +13,12 @@
   
 0.01
 56
-0.10001
+0.1
 1
   
   
 56
-0.01
+0.1
 1
   
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'libreoffice-5-4' - tools/map.cpp

2018-01-25 Thread Tor Lillqvist
 tools/map.cpp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit cb1bdf3a7325bc9be4cc4cb965a77aa1c40817d7
Author: Tor Lillqvist 
Date:   Thu Oct 26 12:02:28 2017 +0300

Avoid warning: ‘%s’ directive output may be truncated writing up to 255 
bytes

... into a region of size 58

Change-Id: I725c537ed21553e9dc34ba006a39917e1549b6a7
(cherry picked from commit a0b82c9fdb8bc4db967d1f589092a99d72f657e7)
Reviewed-on: https://gerrit.libreoffice.org/48628
Reviewed-by: Tor Lillqvist 
Tested-by: Tor Lillqvist 

diff --git a/tools/map.cpp b/tools/map.cpp
index 9ed47193..e5e16777 100644
--- a/tools/map.cpp
+++ b/tools/map.cpp
@@ -21,7 +21,7 @@
 #include 
 
 #define MAP_SIZE 20
-#define PATH_SIZE 64
+#define PATH_SIZE 1000 // No harm in having it much larger than strictly 
necessary. Avoids compiler warning.
 #define BUFFER_SIZE 9600
 
 static int read_buffer(char *buffer, unsigned size,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'libreoffice-5-4' - common/SpookyV2.cpp

2018-01-25 Thread Tor Lillqvist
 common/SpookyV2.cpp |   18 ++
 1 file changed, 18 insertions(+)

New commits:
commit 497b872f3619987d4860407ce6250dce3052e6f6
Author: Tor Lillqvist 
Date:   Thu Oct 26 11:51:53 2017 +0300

More -Werror=implicit-fallthrough=

Change-Id: I62164eef3a4f95bfe505b3b1a866495bde6c19b1
(cherry picked from commit 73d77a9f6746e4a6418b6539dfbe35fcda29fcd5)
Reviewed-on: https://gerrit.libreoffice.org/48626
Reviewed-by: Tor Lillqvist 
Tested-by: Tor Lillqvist 

diff --git a/common/SpookyV2.cpp b/common/SpookyV2.cpp
index 9d6ea649..88d79696 100644
--- a/common/SpookyV2.cpp
+++ b/common/SpookyV2.cpp
@@ -16,6 +16,13 @@
 
 #define ALLOW_UNALIGNED_READS true
 
+#if defined __clang__
+#define FALLTHROUGH [[clang::fallthrough]]
+#elif defined __GNUC__ && __GNUC__ >= 7
+#define FALLTHROUGH [[fallthrough]]
+#else
+#define FALLTHROUGH
+#endif
 //
 // short hash ... it could be used on any message,
 // but it's used by Spooky just for short messages.
@@ -80,36 +87,47 @@ void SpookyHash::Short(
 {
 case 15:
 d += ((uint64)u.p8[14]) << 48;
+FALLTHROUGH;
 case 14:
 d += ((uint64)u.p8[13]) << 40;
+FALLTHROUGH;
 case 13:
 d += ((uint64)u.p8[12]) << 32;
+FALLTHROUGH;
 case 12:
 d += u.p32[2];
 c += u.p64[0];
 break;
 case 11:
 d += ((uint64)u.p8[10]) << 16;
+FALLTHROUGH;
 case 10:
 d += ((uint64)u.p8[9]) << 8;
+FALLTHROUGH;
 case 9:
 d += (uint64)u.p8[8];
+FALLTHROUGH;
 case 8:
 c += u.p64[0];
 break;
 case 7:
 c += ((uint64)u.p8[6]) << 48;
+FALLTHROUGH;
 case 6:
 c += ((uint64)u.p8[5]) << 40;
+FALLTHROUGH;
 case 5:
 c += ((uint64)u.p8[4]) << 32;
+FALLTHROUGH;
 case 4:
 c += u.p32[0];
 break;
 case 3:
 c += ((uint64)u.p8[2]) << 16;
+FALLTHROUGH;
 case 2:
 c += ((uint64)u.p8[1]) << 8;
+FALLTHROUGH;
 case 1:
 c += (uint64)u.p8[0];
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'libreoffice-5-4' - kit/Kit.cpp

2018-01-25 Thread Tor Lillqvist
 kit/Kit.cpp |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 84b7b48780e72e279aafc9150e1b7e7e60acb02d
Author: Tor Lillqvist 
Date:   Thu Oct 26 11:53:35 2017 +0300

Fix makedev warning

g++ says: In the GNU C Library, "makedev" is defined by
. For historical compatibility, it is currently
defined by  as well, but we plan to remove this soon. To
use "makedev", include  directly. If you did not
intend to use a system-defined macro "makedev", you should undefine it
after including .

Change-Id: If5cd1ec0ca34b00b1248e9b2650d4d13e6d3bf64
(cherry picked from commit a806655e59786b9de6d64dfcff30bfa4fde6af67)
Reviewed-on: https://gerrit.libreoffice.org/48627
Reviewed-by: Tor Lillqvist 
Tested-by: Tor Lillqvist 

diff --git a/kit/Kit.cpp b/kit/Kit.cpp
index 304a62e5..bb10f534 100644
--- a/kit/Kit.cpp
+++ b/kit/Kit.cpp
@@ -19,6 +19,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'libreoffice-5-4' - net/WebSocketHandler.hpp

2018-01-25 Thread Tor Lillqvist
 net/WebSocketHandler.hpp |5 +
 1 file changed, 5 insertions(+)

New commits:
commit 400b29fb800fd62f8976b470fe01adbc2cbacf89
Author: Tor Lillqvist 
Date:   Thu Oct 26 11:38:43 2017 +0300

Avoid warning "this statement may fall through" when intentional

Change-Id: I8d8bcb4747a1933e4ecefe1220a80a355e60317f
(cherry picked from commit 6b0faf9d97d9c479f3297ccfc0bf1b06d1de0e34)
Reviewed-on: https://gerrit.libreoffice.org/48624
Reviewed-by: Tor Lillqvist 
Tested-by: Tor Lillqvist 

diff --git a/net/WebSocketHandler.hpp b/net/WebSocketHandler.hpp
index 4ff01c36..8ff0fff2 100644
--- a/net/WebSocketHandler.hpp
+++ b/net/WebSocketHandler.hpp
@@ -213,6 +213,11 @@ public:
 case WSOpCode::Ping:
 LOG_ERR("#" << socket->getFD() << ": Clients should not send 
pings, only servers");
 // drop through
+#if defined __clang__
+[[clang::fallthrough]];
+#elif defined __GNUC__ && __GNUC__ >= 7
+[[fallthrough]];
+#endif
 case WSOpCode::Close:
 if (!_shuttingDown)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-25 Thread Jens Carl
 sc/source/ui/unoobj/celllistsource.cxx   |6 +++---
 sc/source/ui/unoobj/cellvaluebinding.cxx |4 ++--
 sc/source/ui/vba/vbarange.cxx|6 +++---
 3 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 8a73799d12f0d2dc04890b96bd0adf0ffcf50d17
Author: Jens Carl 
Date:   Wed Jan 24 02:10:35 2018 +

Change property value to get CellContentType in sc/

Change the name of property value to get the CellContentType and
rename variables to reflect change of the meaning. Follow up from
commit cceaece18a42405190941865908636522e0ee4cb.

Change-Id: I35c58174cef8ab44bd37b37fd18876ef912e16be
Reviewed-on: https://gerrit.libreoffice.org/48476
Tested-by: Jenkins 
Reviewed-by: Jens Carl 

diff --git a/sc/source/ui/unoobj/celllistsource.cxx 
b/sc/source/ui/unoobj/celllistsource.cxx
index 6d3cdc49c5c9..5cbe67624f3a 100644
--- a/sc/source/ui/unoobj/celllistsource.cxx
+++ b/sc/source/ui/unoobj/celllistsource.cxx
@@ -200,9 +200,9 @@ namespace calc
 Reference< XPropertySet > xProp( xCell, UNO_QUERY);
 if (xProp.is())
 {
-CellContentType eResultType;
-if ((xProp->getPropertyValue("FormulaResultType") 
>>= eResultType) &&
-eResultType == CellContentType_VALUE)
+CellContentType eContentType;
+if ((xProp->getPropertyValue("CellContentType") 
>>= eContentType) &&
+eContentType == CellContentType_VALUE)
 *pAny <<= xCell->getValue();
 else
 *pAny <<= sText;
diff --git a/sc/source/ui/unoobj/cellvaluebinding.cxx 
b/sc/source/ui/unoobj/cellvaluebinding.cxx
index 29cb35a199a5..65aae5c2c4c4 100644
--- a/sc/source/ui/unoobj/cellvaluebinding.cxx
+++ b/sc/source/ui/unoobj/cellvaluebinding.cxx
@@ -203,8 +203,8 @@ namespace calc
 Reference xProp( m_xCell, UNO_QUERY );
 if ( xProp.is() )
 {
-CellContentType eResultType;
-if ( (xProp->getPropertyValue("FormulaResultType") 
>>= eResultType) && eResultType == CellContentType_VALUE )
+CellContentType eContentType;
+if ( (xProp->getPropertyValue("CellContentType") 
>>= eContentType) && eContentType == CellContentType_VALUE )
 bHasValue = true;
 }
 }
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index 21ac5d79635f..24de46dba614 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -825,11 +825,11 @@ void CellValueGetter::visitNode( sal_Int32 x, sal_Int32 
y, const uno::Reference<
 {
 uno::Reference< beans::XPropertySet > xProp( xCell, 
uno::UNO_QUERY_THROW );
 
-table::CellContentType eFormulaType = 
table::CellContentType_VALUE;
+table::CellContentType eContentType = 
table::CellContentType_VALUE;
 // some formulas give textual results
-xProp->getPropertyValue( "FormulaResultType" ) >>= 
eFormulaType;
+xProp->getPropertyValue( "CellContentType" ) >>= eContentType;
 
-if ( eFormulaType == table::CellContentType_TEXT )
+if ( eContentType == table::CellContentType_TEXT )
 {
 uno::Reference< text::XTextRange > xTextRange(xCell, 
::uno::UNO_QUERY_THROW);
 aValue <<= xTextRange->getString();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-25 Thread Jens Carl
 connectivity/source/drivers/calc/CTable.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 4cdb7fa375ba1894deb412853214f01f95bd3f05
Author: Jens Carl 
Date:   Tue Jan 23 21:44:58 2018 +

Change property value to get CellContentType in connectivity/

Follow up from commit cceaece18a42405190941865908636522e0ee4cb.

Change-Id: I29df5403204279b038095156c85638877d2dc9ff
Reviewed-on: https://gerrit.libreoffice.org/48465
Tested-by: Jenkins 
Reviewed-by: Jens Carl 

diff --git a/connectivity/source/drivers/calc/CTable.cxx 
b/connectivity/source/drivers/calc/CTable.cxx
index 142e8a2bf6a6..37263aa5477f 100644
--- a/connectivity/source/drivers/calc/CTable.cxx
+++ b/connectivity/source/drivers/calc/CTable.cxx
@@ -146,11 +146,11 @@ static CellContentType lcl_GetContentOrResultType( const 
Reference& xCell
 Reference xProp( xCell, UNO_QUERY );
 try
 {
-xProp->getPropertyValue( "FormulaResultType" ) >>= eCellType;  
// type of formula result
+xProp->getPropertyValue( "CellContentType" ) >>= eCellType;  
// type of formula result
 }
 catch (UnknownPropertyException&)
 {
-eCellType = CellContentType_VALUE;  // if FormulaResultType 
property not available
+eCellType = CellContentType_VALUE;  // if CellContentType property 
not available
 }
 }
 return eCellType;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: avmedia/source include/sal jurt/source sal/osl sal/rtl tools/source

2018-01-25 Thread Stephan Bergmann
 avmedia/source/vlc/wrapper/Types.hxx|3 +++
 include/sal/config.h|2 --
 jurt/source/pipe/com_sun_star_lib_connections_pipe_PipeConnection.c |4 
 jurt/source/pipe/wrapper/wrapper.c  |1 +
 sal/osl/all/signalshared.cxx|2 ++
 sal/osl/unx/salinit.cxx |1 +
 sal/osl/w32/signal.cxx  |3 +++
 sal/rtl/hash.cxx|4 
 tools/source/reversemap/bestreversemap.cxx  |1 +
 9 files changed, 19 insertions(+), 2 deletions(-)

New commits:
commit 0b14c0fbef7a6d3420e8da6ae44488b23de4c4fb
Author: Stephan Bergmann 
Date:   Thu Jan 18 15:34:41 2018 +0100

Remove stdlib.h from sal/config.h

This reverts 5da3337c007e0572028283d70bad43e9a29d45c1 "readded include 
stdlib.h,
because of missing NULL definition in many headers, #10, #101685", 
which is
no longer relevant.

Change-Id: I544ed9a7afbf7b611bc481b8d50acca3193d93de
Reviewed-on: https://gerrit.libreoffice.org/48131
Reviewed-by: Stephan Bergmann 
Tested-by: Stephan Bergmann 

diff --git a/avmedia/source/vlc/wrapper/Types.hxx 
b/avmedia/source/vlc/wrapper/Types.hxx
index 7411b03dc95a..eb5dd3a4f9d4 100644
--- a/avmedia/source/vlc/wrapper/Types.hxx
+++ b/avmedia/source/vlc/wrapper/Types.hxx
@@ -12,9 +12,12 @@
 #ifndef INCLUDED_AVMEDIA_SOURCE_VLC_WRAPPER_TYPES_HXX
 #define INCLUDED_AVMEDIA_SOURCE_VLC_WRAPPER_TYPES_HXX
 
+#include 
+
 #if defined(_WIN32)
 typedef __int64 libvlc_time_t;
 #else
+#include 
 typedef int64_t libvlc_time_t;
 #endif
 
diff --git a/include/sal/config.h b/include/sal/config.h
index 03a2f5b9fa21..bfe4d5e2d3e2 100644
--- a/include/sal/config.h
+++ b/include/sal/config.h
@@ -24,8 +24,6 @@
 #include 
 #endif
 
-#include 
-
 #ifdef _WIN32
 #define SAL_W32
 #define SAL_DLLEXTENSION ".dll"
diff --git 
a/jurt/source/pipe/com_sun_star_lib_connections_pipe_PipeConnection.c 
b/jurt/source/pipe/com_sun_star_lib_connections_pipe_PipeConnection.c
index ba775da069d0..5259bbcd5474 100644
--- a/jurt/source/pipe/com_sun_star_lib_connections_pipe_PipeConnection.c
+++ b/jurt/source/pipe/com_sun_star_lib_connections_pipe_PipeConnection.c
@@ -17,6 +17,10 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include 
+
+#include 
+
 #include 
 #include 
 #include 
diff --git a/jurt/source/pipe/wrapper/wrapper.c 
b/jurt/source/pipe/wrapper/wrapper.c
index aefaa3719183..28d16690b54e 100644
--- a/jurt/source/pipe/wrapper/wrapper.c
+++ b/jurt/source/pipe/wrapper/wrapper.c
@@ -20,6 +20,7 @@
 #include 
 
 #include 
+#include 
 
 #define WIN32_LEAN_AND_MEAN
 #include 
diff --git a/sal/osl/all/signalshared.cxx b/sal/osl/all/signalshared.cxx
index 9cf7fafc2de5..d6998eb006ca 100644
--- a/sal/osl/all/signalshared.cxx
+++ b/sal/osl/all/signalshared.cxx
@@ -19,6 +19,8 @@
 
 #include 
 
+#include 
+
 #include 
 
 #include 
diff --git a/sal/osl/unx/salinit.cxx b/sal/osl/unx/salinit.cxx
index 5e95c2bab532..bfec16a96677 100644
--- a/sal/osl/unx/salinit.cxx
+++ b/sal/osl/unx/salinit.cxx
@@ -37,6 +37,7 @@
 #include 
 
 #if HAVE_SYSLOG_H
+#include 
 #include 
 #include 
 #endif
diff --git a/sal/osl/w32/signal.cxx b/sal/osl/w32/signal.cxx
index 5f11b8a6bcf6..79d0bcbd4e03 100644
--- a/sal/osl/w32/signal.cxx
+++ b/sal/osl/w32/signal.cxx
@@ -18,6 +18,9 @@
  */
 
 #include 
+
+#include 
+
 #include 
 
 #include 
diff --git a/sal/rtl/hash.cxx b/sal/rtl/hash.cxx
index 0dc36a4c..1599343bde3a 100644
--- a/sal/rtl/hash.cxx
+++ b/sal/rtl/hash.cxx
@@ -17,6 +17,10 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include 
+
+#include 
+
 #include "hash.hxx"
 #include "strimp.hxx"
 #include 
diff --git a/tools/source/reversemap/bestreversemap.cxx 
b/tools/source/reversemap/bestreversemap.cxx
index 97691b3dd0eb..a03711abbdfc 100644
--- a/tools/source/reversemap/bestreversemap.cxx
+++ b/tools/source/reversemap/bestreversemap.cxx
@@ -10,6 +10,7 @@
 #include 
 #include 
 
+#include 
 #include 
 
 struct Encoder
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-25 Thread Milian Wolff
 vcl/unx/gtk3_kde5/kde5_lo_filepicker_main.cxx |   19 +--
 1 file changed, 17 insertions(+), 2 deletions(-)

New commits:
commit bea99d013a0dea0c010a94425aef08c6711a669c
Author: Milian Wolff 
Date:   Thu Jan 25 14:08:28 2018 +0100

lo_kde5filepicker: cleanup main and add version and help options

This way users can figure out what this tool is about. Most notably,
you can run it now with `-h, --help` as one would expect.

Change-Id: If8dd3142bdcc96d2962a2647b2187d75666b9394
Reviewed-on: https://gerrit.libreoffice.org/48592
Tested-by: Jenkins 
Reviewed-by: Thorsten Behrens 

diff --git a/vcl/unx/gtk3_kde5/kde5_lo_filepicker_main.cxx 
b/vcl/unx/gtk3_kde5/kde5_lo_filepicker_main.cxx
index c17236d281a0..d25af0afee70 100644
--- a/vcl/unx/gtk3_kde5/kde5_lo_filepicker_main.cxx
+++ b/vcl/unx/gtk3_kde5/kde5_lo_filepicker_main.cxx
@@ -21,14 +21,29 @@
 #include "kde5_filepicker_ipc.hxx"
 
 #include 
+#include 
+#include 
 
-#include 
+#include 
 
 int main(int argc, char** argv)
 {
+QApplication::setOrganizationName("LibreOffice");
+QApplication::setOrganizationDomain("libreoffice.org");
 QApplication::setApplicationName(QStringLiteral("lo_kde5filepicker"));
-QApplication app(argc, argv);
 QApplication::setQuitOnLastWindowClosed(false);
+QApplication::setApplicationVersion(LIBO_VERSION_DOTTED);
+
+QApplication app(argc, argv);
+
+QCommandLineParser parser;
+parser.setApplicationDescription(
+QObject::tr("Helper executable for LibreOffice KDE/Plasma 
integration.\n"
+"Do not run this executable directly. Rather, use it 
indirectly via "
+"the gtk3_kde5 VCL plugin 
(SAL_USE_VCLPLUGIN=gtk3_kde5)."));
+parser.addVersionOption();
+parser.addHelpOption();
+parser.process(app);
 
 KDE5FilePicker filePicker;
 FilePickerIpc ipc(&filePicker);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-25 Thread Milian Wolff
 vcl/unx/gtk3_kde5/kde5_filepicker.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 91ab6b4feda09e2ded45f716d8f283ced06971ad
Author: Milian Wolff 
Date:   Thu Jan 25 14:05:37 2018 +0100

Properly restore size of KDE5 file picker dialog

The event filter we installed prevented the show event from reaching
the KDEPlatformFileDialogHelper::show method. This prevented the
dialog from being restored to the size chosen by the user previously.

Change-Id: I7af457f19f59d27bd104f8f70d9f4767da6641ee
Reviewed-on: https://gerrit.libreoffice.org/48591
Tested-by: Jenkins 
Reviewed-by: Thorsten Behrens 

diff --git a/vcl/unx/gtk3_kde5/kde5_filepicker.cxx 
b/vcl/unx/gtk3_kde5/kde5_filepicker.cxx
index 9b3f21db92e9..d774ebc2834e 100644
--- a/vcl/unx/gtk3_kde5/kde5_filepicker.cxx
+++ b/vcl/unx/gtk3_kde5/kde5_filepicker.cxx
@@ -235,7 +235,6 @@ bool KDE5FilePicker::eventFilter(QObject* o, QEvent* e)
 KWindowSystem::setMainWindow(w, _winId);
 if (auto* fileWidget = w->findChild({}, 
Qt::FindDirectChildrenOnly))
 fileWidget->setCustomWidget(_extraControls);
-return false;
 }
 }
 return QObject::eventFilter(o, e);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-25 Thread Milian Wolff
 vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx |   51 --
 vcl/unx/gtk3_kde5/kde5_filepicker_ipc.hxx |2 -
 2 files changed, 29 insertions(+), 24 deletions(-)

New commits:
commit a8a52bf04c3e459189511dd2fefc0f2851a356e9
Author: Milian Wolff 
Date:   Thu Jan 25 13:53:25 2018 +0100

Properly quit the lo_kde5filepicker on Quit command

Quitting the event loop is not enough, we also have to get out
of the readCommands loop. Return false for this scenario. Also
exit the command when an unhandled command comes in, we cannot
really recover the stream from this anyways.

Change-Id: I7d58724ea0364565e476516d5645cb436ce1d461
Reviewed-on: https://gerrit.libreoffice.org/48590
Tested-by: Jenkins 
Reviewed-by: Thorsten Behrens 

diff --git a/vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx 
b/vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx
index 082864066d16..26c19f6b4c9b 100644
--- a/vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx
+++ b/vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx
@@ -65,14 +65,17 @@ FilePickerIpc::~FilePickerIpc() = default;
 
 void FilePickerIpc::readCommands()
 {
-while (!std::cin.eof())
+while (readCommand())
 {
-readCommand();
+// read next command
 }
 }
 
-void FilePickerIpc::readCommand()
+bool FilePickerIpc::readCommand()
 {
+if (std::cin.eof())
+return false;
+
 uint64_t messageId = 0;
 Commands command;
 readIpcArgs(std::cin, messageId, command);
@@ -84,45 +87,45 @@ void FilePickerIpc::readCommand()
 QString title;
 readIpcArgs(std::cin, title);
 m_filePicker->setTitle(title);
-return;
+return true;
 }
 case Commands::SetWinId:
 {
 sal_uIntPtr winId = 0;
 readIpcArgs(std::cin, winId);
 m_filePicker->setWinId(winId);
-return;
+return true;
 }
 case Commands::Execute:
 {
 sendIpcArgs(std::cout, messageId, m_filePicker->execute());
-return;
+return true;
 }
 case Commands::SetMultiSelectionMode:
 {
 bool multiSelection = false;
 readIpcArgs(std::cin, multiSelection);
 m_filePicker->setMultiSelectionMode(multiSelection);
-return;
+return true;
 }
 case Commands::SetDefaultName:
 {
 QString name;
 readIpcArgs(std::cin, name);
 m_filePicker->setDefaultName(name);
-return;
+return true;
 }
 case Commands::SetDisplayDirectory:
 {
 QString dir;
 readIpcArgs(std::cin, dir);
 m_filePicker->setDisplayDirectory(dir);
-return;
+return true;
 }
 case Commands::GetDisplayDirectory:
 {
 sendIpcArgs(std::cout, messageId, 
m_filePicker->getDisplayDirectory());
-return;
+return true;
 }
 case Commands::GetSelectedFiles:
 {
@@ -145,26 +148,26 @@ void FilePickerIpc::readCommand()
 files << url.toString();
 }
 sendIpcArgs(std::cout, messageId, files);
-return;
+return true;
 }
 case Commands::AppendFilter:
 {
 QString title, filter;
 readIpcArgs(std::cin, title, filter);
 m_filePicker->appendFilter(title, filter);
-return;
+return true;
 }
 case Commands::SetCurrentFilter:
 {
 QString title;
 readIpcArgs(std::cin, title);
 m_filePicker->setCurrentFilter(title);
-return;
+return true;
 }
 case Commands::GetCurrentFilter:
 {
 sendIpcArgs(std::cout, messageId, 
m_filePicker->getCurrentFilter());
-return;
+return true;
 }
 case Commands::SetValue:
 {
@@ -173,7 +176,7 @@ void FilePickerIpc::readCommand()
 bool value = false;
 readIpcArgs(std::cin, controlId, nControlAction, value);
 m_filePicker->setValue(controlId, nControlAction, value);
-return;
+return true;
 }
 case Commands::GetValue:
 {
@@ -181,7 +184,7 @@ void FilePickerIpc::readCommand()
 sal_Int16 nControlAction = 0;
 readIpcArgs(std::cin, controlId, nControlAction);
 sendIpcArgs(std::cout, messageId, 
m_filePicker->getValue(controlId, nControlAction));
-return;
+return true;
 }
 case Commands::EnableControl:
 {
@@ -189,7 +192,7 @@ void FilePickerIpc::readCommand()
 bool enabled = false;
 readIpcArgs(std::cin, controlId, enabled);
 m_filePicker->enableControl(controlId, enabled);
-return;
+retu

[Libreoffice-commits] core.git: Branch 'refs/notes/commits' - 4a/73f51f4c83e5c59d4ccf68164bd0544533576e

2018-01-25 Thread Caolán McNamara
 4a/73f51f4c83e5c59d4ccf68164bd0544533576e |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 8c238ee66e76a4b257e45d25d8b0c62749640675
Author: Caolán McNamara 
Date:   Thu Jan 25 21:05:14 2018 +

Notes added by 'git notes add'

diff --git a/4a/73f51f4c83e5c59d4ccf68164bd0544533576e 
b/4a/73f51f4c83e5c59d4ccf68164bd0544533576e
new file mode 100644
index ..ced43be5a3aa
--- /dev/null
+++ b/4a/73f51f4c83e5c59d4ccf68164bd0544533576e
@@ -0,0 +1 @@
+prefer: c5f88f0dce63c4fb2d208c493c1b06e25318aa61
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'refs/notes/commits' - 2f/e2f41d1f15a980fb169accda71a192dbba8d72

2018-01-25 Thread Caolán McNamara
 2f/e2f41d1f15a980fb169accda71a192dbba8d72 |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 69193ed9f4a3de4b326e5ea9fdac973460e4ea7f
Author: Caolán McNamara 
Date:   Thu Jan 25 21:04:49 2018 +

Notes added by 'git notes add'

diff --git a/2f/e2f41d1f15a980fb169accda71a192dbba8d72 
b/2f/e2f41d1f15a980fb169accda71a192dbba8d72
new file mode 100644
index ..051a05d84d5c
--- /dev/null
+++ b/2f/e2f41d1f15a980fb169accda71a192dbba8d72
@@ -0,0 +1 @@
+prefer: 8a9f54bc1283b7137a90506e29dba7962dd73f83
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bin/oss-fuzz-build.sh vcl/workben

2018-01-25 Thread Caolán McNamara
 bin/oss-fuzz-build.sh   |   13 +++--
 vcl/workben/602fuzzer.options   |2 ++
 vcl/workben/bmpfuzzer.options   |2 ++
 vcl/workben/cgmfuzzer.options   |2 ++
 vcl/workben/diffuzzer.options   |2 ++
 vcl/workben/docxfuzzer.options  |2 ++
 vcl/workben/dxffuzzer.options   |2 ++
 vcl/workben/epsfuzzer.options   |2 ++
 vcl/workben/fodpfuzzer.options  |3 +++
 vcl/workben/fodsfuzzer.options  |3 +++
 vcl/workben/fodtfuzzer.options  |3 +++
 vcl/workben/giffuzzer.options   |3 +++
 vcl/workben/htmlfuzzer.options  |3 +++
 vcl/workben/hwpfuzzer.options   |2 ++
 vcl/workben/jpgfuzzer.options   |3 +++
 vcl/workben/lwpfuzzer.options   |2 ++
 vcl/workben/metfuzzer.options   |2 ++
 vcl/workben/mmlfuzzer.options   |3 +++
 vcl/workben/mtpfuzzer.options   |2 ++
 vcl/workben/olefuzzer.options   |2 ++
 vcl/workben/pcdfuzzer.options   |2 ++
 vcl/workben/pctfuzzer.options   |2 ++
 vcl/workben/pcxfuzzer.options   |2 ++
 vcl/workben/pngfuzzer.options   |3 +++
 vcl/workben/ppmfuzzer.options   |2 ++
 vcl/workben/pptfuzzer.options   |2 ++
 vcl/workben/pptxfuzzer.options  |2 ++
 vcl/workben/psdfuzzer.options   |2 ++
 vcl/workben/qpwfuzzer.options   |2 ++
 vcl/workben/rasfuzzer.options   |2 ++
 vcl/workben/rtffuzzer.options   |2 ++
 vcl/workben/scrtffuzzer.options |2 ++
 vcl/workben/slkfuzzer.options   |2 ++
 vcl/workben/svmfuzzer.options   |2 ++
 vcl/workben/tgafuzzer.options   |2 ++
 vcl/workben/tiffuzzer.options   |3 +++
 vcl/workben/wksfuzzer.options   |2 ++
 vcl/workben/wmffuzzer.options   |2 ++
 vcl/workben/ww2fuzzer.options   |2 ++
 vcl/workben/ww6fuzzer.options   |2 ++
 vcl/workben/ww8fuzzer.options   |2 ++
 vcl/workben/xbmfuzzer.options   |2 ++
 vcl/workben/xlsfuzzer.options   |2 ++
 vcl/workben/xlsxfuzzer.options  |2 ++
 vcl/workben/xpmfuzzer.options   |2 ++
 45 files changed, 100 insertions(+), 10 deletions(-)

New commits:
commit c23d1d3efd5ec716525704d91b53ae07cb4c5458
Author: Caolán McNamara 
Date:   Thu Jan 25 17:12:14 2018 +

put a ceiling on various fuzzer input sizes

Change-Id: I7a53859377e6228542be50fd26af6b0d6701384c

diff --git a/bin/oss-fuzz-build.sh b/bin/oss-fuzz-build.sh
index 10759eb31cd2..29c591ca3d7f 100755
--- a/bin/oss-fuzz-build.sh
+++ b/bin/oss-fuzz-build.sh
@@ -34,13 +34,6 @@ popd
 #starting corpuses
 cp $SRC/*_seed_corpus.zip $OUT
 #fuzzing dictionaries
-cp $SRC/gif.dict $OUT/giffuzzer.dict
-cp $SRC/jpeg.dict $OUT/jpgfuzzer.dict
-cp $SRC/png.dict $OUT/pngfuzzer.dict
-cp $SRC/tiff.dict $OUT/tiffuzzer.dict
-cp $SRC/xml.dict $OUT/fodtfuzzer.dict
-cp $SRC/xml.dict $OUT/fodsfuzzer.dict
-cp $SRC/xml.dict $OUT/fodpfuzzer.dict
-cp $SRC/xml.dict $OUT/fodgfuzzer.dict
-cp $SRC/xml.dict $OUT/mmlfuzzer.dict
-cp $SRC/html_tags.dict $OUT/htmlfuzzer.dict
+cp $SRC/*.dict $OUT
+#options files
+cp $SRC/libreoffice/vcl/workben/*.options $OUT
diff --git a/vcl/workben/602fuzzer.options b/vcl/workben/602fuzzer.options
new file mode 100644
index ..678d526b1ea9
--- /dev/null
+++ b/vcl/workben/602fuzzer.options
@@ -0,0 +1,2 @@
+[libfuzzer]
+max_len = 65536
diff --git a/vcl/workben/bmpfuzzer.options b/vcl/workben/bmpfuzzer.options
new file mode 100644
index ..678d526b1ea9
--- /dev/null
+++ b/vcl/workben/bmpfuzzer.options
@@ -0,0 +1,2 @@
+[libfuzzer]
+max_len = 65536
diff --git a/vcl/workben/cgmfuzzer.options b/vcl/workben/cgmfuzzer.options
new file mode 100644
index ..678d526b1ea9
--- /dev/null
+++ b/vcl/workben/cgmfuzzer.options
@@ -0,0 +1,2 @@
+[libfuzzer]
+max_len = 65536
diff --git a/vcl/workben/diffuzzer.options b/vcl/workben/diffuzzer.options
new file mode 100644
index ..678d526b1ea9
--- /dev/null
+++ b/vcl/workben/diffuzzer.options
@@ -0,0 +1,2 @@
+[libfuzzer]
+max_len = 65536
diff --git a/vcl/workben/docxfuzzer.options b/vcl/workben/docxfuzzer.options
new file mode 100644
index ..e8c2b812b01d
--- /dev/null
+++ b/vcl/workben/docxfuzzer.options
@@ -0,0 +1,2 @@
+[libfuzzer]
+max_len = 98304
diff --git a/vcl/workben/dxffuzzer.options b/vcl/workben/dxffuzzer.options
new file mode 100644
index ..678d526b1ea9
--- /dev/null
+++ b/vcl/workben/dxffuzzer.options
@@ -0,0 +1,2 @@
+[libfuzzer]
+max_len = 65536
diff --git a/vcl/workben/epsfuzzer.options b/vcl/workben/epsfuzzer.options
new file mode 100644
index ..678d526b1ea9
--- /dev/null
+++ b/vcl/workben/epsfuzzer.options
@@ -0,0 +1,2 @@
+[libfuzzer]
+max_len = 65536
diff --git a/vcl/workben/fodpfuzzer.options b/vcl/workben/fodpfuzzer.options
new file mode 100644
index ..76d308c39d0c
--- /dev/null
+++ b/vcl/workben/fodpfuzzer.options
@@ -0,0 +1,3 @@
+[libfuzzer]
+max_len = 65536
+dict = xml.dict
diff --git a/vcl/workben/fodsfuzzer.options b/vcl/workben/fodsfuzzer.options
new file mode 100644
index ..76d308c39d0c
--- /dev/null
+++ b/vcl/workben/fodsfuzzer.options
@@ -0,0 +1,3 @@

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

2018-01-25 Thread Caolán McNamara
 vcl/source/filter/igif/gifread.cxx |   17 +
 1 file changed, 9 insertions(+), 8 deletions(-)

New commits:
commit 2839be08281b4c6b23b9ecdbb4da2032788b6223
Author: Caolán McNamara 
Date:   Thu Jan 25 16:41:25 2018 +

ofz: cache animation size to avoid timeout

Change-Id: Iede591487782a941a9915123b83537ddadd1b4c5
Reviewed-on: https://gerrit.libreoffice.org/48629
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/vcl/source/filter/igif/gifread.cxx 
b/vcl/source/filter/igif/gifread.cxx
index 2afaa92d16d2..78ed3036e67f 100644
--- a/vcl/source/filter/igif/gifread.cxx
+++ b/vcl/source/filter/igif/gifread.cxx
@@ -50,6 +50,8 @@ class SvStream;
 class GIFReader : public GraphicReader
 {
 Animation   aAnimation;
+sal_uInt64  nAnimationByteSize;
+sal_uInt64  nAnimationMinFileData;
 Bitmap  aBmp8;
 Bitmap  aBmp1;
 BitmapPalette   aGPalette;
@@ -109,7 +111,9 @@ public:
 };
 
 GIFReader::GIFReader( SvStream& rStm )
-: aGPalette ( 256 )
+: nAnimationByteSize(0)
+, nAnimationMinFileData(0)
+, aGPalette ( 256 )
 , aLPalette ( 256 )
 , rIStm ( rStm )
 , nYAcc ( 0 )
@@ -167,13 +171,8 @@ void GIFReader::CreateBitmaps( long nWidth, long nHeight, 
BitmapPalette* pPal,
 // 1:1472.88 [184.11 x 8] is more realistic)
 
 sal_uInt64 nMinFileData = nWidth * nHeight / 2560;
-for (size_t i = 0; i < aAnimation.Count(); ++i)
-{
-const AnimationBitmap& rBitmap = aAnimation.Get(i);
-const Size& rSize = rBitmap.aSizePix;
-nMinFileData += rSize.Width() * rSize.Height() / 2560;
-nCombinedPixSize += rBitmap.aBmpEx.GetSizeBytes();
-}
+nMinFileData += nAnimationMinFileData;
+nCombinedPixSize += nAnimationByteSize;
 
 if (nMaxStreamData < nMinFileData)
 {
@@ -662,6 +661,8 @@ void GIFReader::CreateNewBitmaps()
 else
 aAnimBmp.eDisposal = Disposal::Not;
 
+nAnimationByteSize += aAnimBmp.aBmpEx.GetSizeBytes();
+nAnimationMinFileData += nImageWidth * nImageHeight / 2560;
 aAnimation.Insert( aAnimBmp );
 
 if( aAnimation.Count() == 1 )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-25 Thread Caolán McNamara
 hwpfilter/source/hwpread.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 09af5c6ce286333d6c41dbd1432c2007c5691f8e
Author: Caolán McNamara 
Date:   Thu Jan 25 13:52:51 2018 +

ofz#5379 Timeout

Change-Id: I876ed253c61a13faae2b31c43fa595b3612cd082
Reviewed-on: https://gerrit.libreoffice.org/48610
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/hwpfilter/source/hwpread.cxx b/hwpfilter/source/hwpread.cxx
index 25d1d5188fc4..bb8df6defe4a 100644
--- a/hwpfilter/source/hwpread.cxx
+++ b/hwpfilter/source/hwpread.cxx
@@ -448,7 +448,7 @@ bool Picture::Read(HWPFile & hwpf)
 {
size_t nOldSize = follow.size();
size_t nBlock = std::min(SAL_N_ELEMENTS(hwpf.scratch), 
follow_block_size - nOldSize);
-   size_t nReadBlock = hwpf.Read1b(hwpf.scratch, nBlock);
+   size_t nReadBlock = hwpf.ReadBlock(hwpf.scratch, nBlock);
if (nReadBlock)
{
follow.insert(follow.end(), hwpf.scratch, hwpf.scratch + 
nReadBlock);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-25 Thread Winfried Donkers
 i18npool/source/localedata/data/la_VA.xml  |   20 ++--
 i18npool/source/localedata/data/lld_IT.xml |   20 ++--
 i18npool/source/localedata/data/vec_IT.xml |   20 ++--
 3 files changed, 30 insertions(+), 30 deletions(-)

New commits:
commit 80ac1dc53ba2aac97bce067495f7f60c6acabadd
Author: Winfried Donkers 
Date:   Thu Jan 25 16:52:30 2018 +0100

Change TimeSeparator for locale la_VA, lld_IT and vec_IT.

Change-Id: I0afc3a08a31216efdbddc389dc23f0b04bc92b37
Reviewed-on: https://gerrit.libreoffice.org/48619
Tested-by: Jenkins 
Reviewed-by: Eike Rathke 

diff --git a/i18npool/source/localedata/data/la_VA.xml 
b/i18npool/source/localedata/data/la_VA.xml
index e951225f1933..ee71bf2666e3 100644
--- a/i18npool/source/localedata/data/la_VA.xml
+++ b/i18npool/source/localedata/data/la_VA.xml
@@ -33,7 +33,7 @@
   /
   .
   ,
-  .
+  :
   ,
   ;

@@ -169,31 +169,31 @@
   WW
 
 
-  HH.MM
+  HH:MM
 
 
-  HH.MM.SS
+  HH:MM:SS
 
 
-  HH.MM AM/PM
+  HH:MM AM/PM
 
 
-  HH.MM.SS AM/PM
+  HH:MM:SS AM/PM
 
 
-  [HH].MM.SS
+  [HH]:MM:SS
 
 
-  MM.SS,00
+  MM:SS,00
 
 
-  [HH].MM.SS,00
+  [HH]:MM:SS,00
 
 
-  DD/MM/YY HH.MM
+  DD/MM/YY HH:MM
 
 
-  DD/MM/ HH.MM.SS
+  DD/MM/ HH:MM:SS
 
   
   
diff --git a/i18npool/source/localedata/data/lld_IT.xml 
b/i18npool/source/localedata/data/lld_IT.xml
index 8f99a86ae1df..5fa8c1120ddd 100644
--- a/i18npool/source/localedata/data/lld_IT.xml
+++ b/i18npool/source/localedata/data/lld_IT.xml
@@ -33,7 +33,7 @@
   /
   .
   ,
-  .
+  :
   ,
   ;
   , 
@@ -170,31 +170,31 @@
   WW
 
 
-  HH.MM
+  HH:MM
 
 
-  HH.MM.SS
+  HH:MM:SS
 
 
-  HH.MM AM/PM
+  HH:MM AM/PM
 
 
-  HH.MM.SS AM/PM
+  HH:MM:SS AM/PM
 
 
-  [HH].MM.SS
+  [HH]:MM:SS
 
 
-  MM.SS,00
+  MM:SS,00
 
 
-  [HH].MM.SS,00
+  [HH]:MM:SS,00
 
 
-  DD/MM/YY HH.MM
+  DD/MM/YY HH:MM
 
 
-  DD/MM/ HH.MM.SS AM/PM
+  DD/MM/ HH:MM:SS AM/PM
 
   
   
diff --git a/i18npool/source/localedata/data/vec_IT.xml 
b/i18npool/source/localedata/data/vec_IT.xml
index aa79dd8b519e..086d59857db5 100644
--- a/i18npool/source/localedata/data/vec_IT.xml
+++ b/i18npool/source/localedata/data/vec_IT.xml
@@ -33,7 +33,7 @@
   /
   .
   ,
-  .
+  :
   ,
   ;

@@ -169,31 +169,31 @@
   WW
 
 
-  HH.MM
+  HH:MM
 
 
-  HH.MM.SS
+  HH:MM:SS
 
 
-  HH.MM AM/PM
+  HH:MM AM/PM
 
 
-  HH.MM.SS AM/PM
+  HH:MM:SS AM/PM
 
 
-  [HH].MM.SS
+  [HH]:MM:SS
 
 
-  MM.SS,00
+  MM:SS,00
 
 
-  [HH].MM.SS,00
+  [HH]:MM:SS,00
 
 
-  DD/MM/YY HH.MM
+  DD/MM/YY HH:MM
 
 
-  DD/MM/ HH.MM.SS
+  DD/MM/ HH:MM:SS
 
   
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-25 Thread Caolán McNamara
 filter/source/msfilter/svdfppt.cxx |   10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

New commits:
commit cf4e7f122ac80399d8ead31e4f5d5732c864be97
Author: Caolán McNamara 
Date:   Thu Jan 25 14:33:22 2018 +

clamp normal page sizes as well as notepages

max multiplication is about 4.4 based on
SvxMSDffManager::SetModel nMapMul/nMapDiv

Change-Id: I97bc6ad76bb43fb46aa521bf852decfdd17883e7
Reviewed-on: https://gerrit.libreoffice.org/48612
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/filter/source/msfilter/svdfppt.cxx 
b/filter/source/msfilter/svdfppt.cxx
index 3779ea408e3f..bb44fae227dd 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -281,11 +281,13 @@ SvStream& ReadPptDocumentAtom(SvStream& rIn, 
PptDocumentAtom& rAtom)
.ReadSChar( nTitlePlaceHoldersOmitted )
.ReadSChar( nRightToLeft )
.ReadSChar( nShowComments );
-rAtom.aSlidesPageSize.Width() = nSlideX;
-rAtom.aSlidesPageSize.Height() = nSlideY;
 // clamp dodgy data to avoid overflow in later calculations
-rAtom.aNotesPageSize.Width() = std::min(nNoticeX, 65536);
-rAtom.aNotesPageSize.Height() = std::min(nNoticeY, 65536);
+const sal_Int32 nPageClamp = SAL_MAX_INT32/5;
+rAtom.aSlidesPageSize.Width() = basegfx::clamp(nSlideX, 
-nPageClamp, nPageClamp);
+rAtom.aSlidesPageSize.Height() = basegfx::clamp(nSlideY, 
-nPageClamp, nPageClamp);
+const sal_Int32 nNoteClamp = 65536;
+rAtom.aNotesPageSize.Width() = basegfx::clamp(nNoticeX, 
-nNoteClamp, nNoteClamp);
+rAtom.aNotesPageSize.Height() = basegfx::clamp(nNoticeY, 
-nNoteClamp, nNoteClamp);
 rAtom.eSlidesPageFormat = static_cast(nSlidePageFormat);
 rAtom.bEmbeddedTrueType = nEmbeddedTrueType;
 rAtom.bTitlePlaceholdersOmitted = nTitlePlaceHoldersOmitted;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-25 Thread Michael Stahl
 sw/source/filter/html/htmltab.cxx |   21 +
 sw/source/filter/xml/xmltbli.cxx  |   28 
 2 files changed, 49 insertions(+)

New commits:
commit 0628693eaf056fedf4d82be8f58f0b87ab7dc20b
Author: Michael Stahl 
Date:   Thu Jan 25 13:20:55 2018 +0100

sw: try to limit rowspan/colspan attributes a bit

Not sure what would be a reasonable maximum, but this should at least
limit fuzzing to 64k cells at a time.

Change-Id: I03c8f828be7ca2d5caeb1f318b55e25ab3f528ef
Reviewed-on: https://gerrit.libreoffice.org/48589
Tested-by: Jenkins 
Reviewed-by: Thorsten Behrens 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/source/filter/html/htmltab.cxx 
b/sw/source/filter/html/htmltab.cxx
index 178121062d1a..b80020e80e8a 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -30,6 +30,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -2857,9 +2858,19 @@ CellSaveStruct::CellSaveStruct( SwHTMLParser& rParser, 
HTMLTable const *pCurTabl
 break;
 case HtmlOptionId::COLSPAN:
 m_nColSpan = static_cast(rOption.GetNumber());
+if (m_nColSpan > 256)
+{
+SAL_INFO("sw.html", "ignoring huge COLSPAN " << 
m_nColSpan);
+m_nColSpan = 1;
+}
 break;
 case HtmlOptionId::ROWSPAN:
 m_nRowSpan = static_cast(rOption.GetNumber());
+if (m_nRowSpan > 8192 || (m_nRowSpan > 256 && 
utl::ConfigManager::IsFuzzing()))
+{
+SAL_INFO("sw.html", "ignoring huge ROWSPAN " << 
m_nRowSpan);
+m_nRowSpan = 1;
+}
 break;
 case HtmlOptionId::ALIGN:
 m_eAdjust = rOption.GetEnum( aHTMLPAlignTable, m_eAdjust );
@@ -4265,6 +4276,11 @@ void SwHTMLParser::BuildTableColGroup( HTMLTable 
*pCurTable,
 break;
 case HtmlOptionId::SPAN:
 pSaveStruct->nColGrpSpan = 
static_cast(rOption.GetNumber());
+if (pSaveStruct->nColGrpSpan > 256)
+{
+SAL_INFO("sw.html", "ignoring huge SPAN " << 
pSaveStruct->nColGrpSpan);
+pSaveStruct->nColGrpSpan = 1;
+}
 break;
 case HtmlOptionId::WIDTH:
 pSaveStruct->nColGrpWidth = 
static_cast(rOption.GetNumber());
@@ -4347,6 +4363,11 @@ void SwHTMLParser::BuildTableColGroup( HTMLTable 
*pCurTable,
 break;
 case HtmlOptionId::SPAN:
 nColSpan = 
static_cast(rOption.GetNumber());
+if (nColSpan > 256)
+{
+SAL_INFO("sw.html", "ignoring huge SPAN " << 
nColSpan);
+nColSpan = 1;
+}
 break;
 case HtmlOptionId::WIDTH:
 nColWidth = 
static_cast(rOption.GetNumber());
diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index 1ec745d907ce..bb4e532b8e37 100644
--- a/sw/source/filter/xml/xmltbli.cxx
+++ b/sw/source/filter/xml/xmltbli.cxx
@@ -27,6 +27,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -471,12 +472,27 @@ SwXMLTableCellContext_Impl::SwXMLTableCellContext_Impl(
 break;
 case XML_TOK_TABLE_NUM_COLS_SPANNED:
 nColSpan = static_cast(std::max(1, 
rValue.toInt32()));
+if (nColSpan > 256)
+{
+SAL_INFO("sw.xml", "ignoring huge table:number-columns-spanned 
" << nColSpan);
+nColSpan = 1;
+}
 break;
 case XML_TOK_TABLE_NUM_ROWS_SPANNED:
 nRowSpan = static_cast(std::max(1, 
rValue.toInt32()));
+if (nRowSpan > 8192 || (nRowSpan > 256 && 
utl::ConfigManager::IsFuzzing()))
+{
+SAL_INFO("sw.xml", "ignoring huge table:number-rows-spanned " 
<< nRowSpan);
+nRowSpan = 1;
+}
 break;
 case XML_TOK_TABLE_NUM_COLS_REPEATED:
 nColRepeat = static_cast(std::max(1, 
rValue.toInt32()));
+if (nColRepeat > 256)
+{
+SAL_INFO("sw.xml", "ignoring huge 
table:number-columns-repeated " << nColRepeat);
+nColRepeat = 1;
+}
 break;
 case XML_TOK_TABLE_FORMULA:
 {
@@ -751,7 +767,14 @@ SwXMLTableColContext_Impl::SwXMLTableColContext_Impl(
 if( IsXMLToken( aLocalName, XML_STYLE_NAME ) )
 aStyleName = rValue;
 else if( IsXMLToken( aLocalName, XML_NUMBER_COLUMNS_REPEATED ) )
+{
 n

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

2018-01-25 Thread Winfried Donkers
 i18npool/source/localedata/data/it_IT.xml |   20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

New commits:
commit c97d67631724c29fa665c5f0aaad0a0fd9a061ee
Author: Winfried Donkers 
Date:   Thu Jan 25 16:22:24 2018 +0100

tdf#105226 follow up: change time separator for locale it_IT.

Change-Id: If994f615b4a9b976086546a80357b75e93952528
Reviewed-on: https://gerrit.libreoffice.org/48615
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 

diff --git a/i18npool/source/localedata/data/it_IT.xml 
b/i18npool/source/localedata/data/it_IT.xml
index 94ebb32f8f61..8a047c4aa882 100644
--- a/i18npool/source/localedata/data/it_IT.xml
+++ b/i18npool/source/localedata/data/it_IT.xml
@@ -33,7 +33,7 @@
   /
   .
   ,
-  .
+  :
   ,
   ;

@@ -169,31 +169,31 @@
   WW
 
 
-  HH.MM
+  HH:MM
 
 
-  HH.MM.SS
+  HH:MM:SS
 
 
-  HH.MM AM/PM
+  HH:MM AM/PM
 
 
-  HH.MM.SS AM/PM
+  HH:MM:SS AM/PM
 
 
-  [HH].MM.SS
+  [HH]:MM:SS
 
 
-  MM.SS,00
+  MM:SS,00
 
 
-  [HH].MM.SS,00
+  [HH]:MM:SS,00
 
 
-  GG/MM/AA HH.MM
+  GG/MM/AA HH:MM
 
 
-  GG/MM/ HH.MM.SS
+  GG/MM/ HH:MM:SS
 
   
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - i18npool/source

2018-01-25 Thread Stephan Bergmann
 i18npool/source/indexentry/indexentrysupplier_default.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 48653e1edbc72c2a45e8861a837e6233cad1fbba
Author: Stephan Bergmann 
Date:   Thu Jan 25 11:31:45 2018 +0100

Fix Index::getIndexWeight for empty input

...which triggers the assertion `index >= 0 && 
static_cast(index) <
static_cast(getLength())' in rtl::OUString::operator[] at
include/rtl/ustring.hxx:669 (see below for a reproducer).

I am not sure whether the case of `startPos == rIndexEntry.getLength()` 
should
really go into the following for loop inspecting `tables`, with a somewhat
random `code` of U+ (or some other value even?), or should rather be 
handled
explicitly in some other way.

Reproducer in an empty Writer document: "Insert - Table of Contents and 
Index -
Bibliography Entry...": "Insert Bibliography Entry" dialog: "ARJ00", 
"Insert",
"AVV00", "Insert", "Close"; "Insert - Table of Contents and Index - Table of
Contents, Index or Bibliography...": "Table of Contents, Index or 
Bibliography"
dialog: "Type - Type and Title - Type: Bibliography", "Entries - Sort by -
Content", "Entries - Sort Keys - 1: Address", "OK": assert fires

Change-Id: I2c9fad2c37bfa7a3509c197e678311fb45cb991a
Reviewed-on: https://gerrit.libreoffice.org/48564
Tested-by: Jenkins 
Reviewed-by: Eike Rathke 
(cherry picked from commit ad9d70e73394b1d0d2c1e1e4584c8bc6f3a5d8b3)
Reviewed-on: https://gerrit.libreoffice.org/48635

diff --git a/i18npool/source/indexentry/indexentrysupplier_default.cxx 
b/i18npool/source/indexentry/indexentrysupplier_default.cxx
index bcd7b2ab6d7c..af86b94c1ad9 100644
--- a/i18npool/source/indexentry/indexentrysupplier_default.cxx
+++ b/i18npool/source/indexentry/indexentrysupplier_default.cxx
@@ -138,7 +138,7 @@ sal_Int16 Index::getIndexWeight(const OUString& rIndexEntry)
 return mkeys[i];
 }
 }
-sal_Unicode code = rIndexEntry[startPos];
+sal_Unicode code = startPos < rIndexEntry.getLength() ? 
rIndexEntry[startPos] : 0;
 for (sal_Int16 i = 0; i < table_count; i++) {
 if (tables[i].start <= code && code <= tables[i].end)
 return tables[i].table[code-tables[i].start];
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-25 Thread Winfried Donkers
 i18npool/source/localedata/data/it_CH.xml  |4 ++--
 i18npool/source/localedata/data/vec_IT.xml |4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 8ff3d8821ef68069c1bdcf1a123b0c929d745566
Author: Winfried Donkers 
Date:   Thu Jan 25 16:26:46 2018 +0100

Fix incorrect AM/PM symbols in locale it_CH and vec_IT.

Follow up of tdf#105226.

Change-Id: I31816a36e427338034a30492f2a7ac7f2d0fddd2
Reviewed-on: https://gerrit.libreoffice.org/48616
Tested-by: Jenkins 
Reviewed-by: Eike Rathke 

diff --git a/i18npool/source/localedata/data/it_CH.xml 
b/i18npool/source/localedata/data/it_CH.xml
index 1514c671a367..aa19b9e2339d 100644
--- a/i18npool/source/localedata/data/it_CH.xml
+++ b/i18npool/source/localedata/data/it_CH.xml
@@ -47,8 +47,8 @@
   “
   ”
 
-m.
-p.
+a.m.
+p.m.
 metric
   
   
diff --git a/i18npool/source/localedata/data/vec_IT.xml 
b/i18npool/source/localedata/data/vec_IT.xml
index 705e1aafca4e..aa79dd8b519e 100644
--- a/i18npool/source/localedata/data/vec_IT.xml
+++ b/i18npool/source/localedata/data/vec_IT.xml
@@ -47,8 +47,8 @@
   “
   ”
 
-m.
-p.
+a.m.
+p.m.
 metric
   
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - sc/source

2018-01-25 Thread Jim Raykowski
 sc/source/ui/view/formatsh.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 4c6fc246c9d9388b7a512cb4371bc6bb09e8581b
Author: Jim Raykowski 
Date:   Mon Dec 18 15:03:02 2017 -0900

tdf#114519 Update cell content on sidebar number format change

In Calc, when the cursor is flashing in a cell (input mode) and the
sidebar Number Format panel 'Select a category of contents' drop down
selection is changed the cell contents does not update on selection
change.

This patch ends cell input mode on 'Select a category of contents' drop
down change allowing cell to be updated to the selected number format.

Change-Id: Ia1f46499ada2cfbcc82bd5babb6cf56ae0d6259c
Reviewed-on: https://gerrit.libreoffice.org/46883
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 
(cherry picked from commit 7416c2ea6c25ec1ff60ce1055b79b216cd501140)
Reviewed-on: https://gerrit.libreoffice.org/48632
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index 82f5ba3fbc97..b6522696ad34 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -1004,6 +1004,7 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq )
 {
 switch ( nSlot )
 {
+case SID_NUMBER_TYPE_FORMAT:
 case SID_NUMBER_TWODEC:
 case SID_NUMBER_SCIENTIFIC:
 case SID_NUMBER_DATE:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-25 Thread Eike Rathke
 sc/source/filter/oox/condformatbuffer.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit fef24d9f999ee54d7936900485d97ff26656f517
Author: Eike Rathke 
Date:   Thu Jan 25 20:59:39 2018 +0100

CheckLinkFormulaNeedingCheck() for .xlsx conditional format expressions

Change-Id: I31ede1a23223a798141a0891deeabd8cf88fff58

diff --git a/sc/source/filter/oox/condformatbuffer.cxx 
b/sc/source/filter/oox/condformatbuffer.cxx
index 515e0422accc..3a46a3b28fa6 100644
--- a/sc/source/filter/oox/condformatbuffer.cxx
+++ b/sc/source/filter/oox/condformatbuffer.cxx
@@ -868,11 +868,13 @@ void CondFormatRule::finalizeImport()
 {
 pTokenArray2.reset(new ScTokenArray());
 ScTokenConversion::ConvertToTokenArray( rDoc, *pTokenArray2.get(), 
maModel.maFormulas[ 1 ] );
+rDoc.CheckLinkFormulaNeedingCheck( *pTokenArray2.get());
 }
 
 ScTokenArray aTokenArray;
 OUString aStyleName = getStyles().createDxfStyle( maModel.mnDxfId );
 ScTokenConversion::ConvertToTokenArray( rDoc, aTokenArray, 
maModel.maFormulas[ 0 ] );
+rDoc.CheckLinkFormulaNeedingCheck( aTokenArray);
 ScCondFormatEntry* pNewEntry = new ScCondFormatEntry(eOperator,
 &aTokenArray, pTokenArray2.get(), 
&rDoc, aPos, aStyleName);
 mpFormat->AddEntry(pNewEntry);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-25 Thread ekuiitr
 writerfilter/source/rtftok/rtfcontrolwords.cxx | 3652 -
 writerfilter/source/rtftok/rtfcontrolwords.hxx |2 
 writerfilter/source/rtftok/rtftokenizer.cxx|   12 
 3 files changed, 1833 insertions(+), 1833 deletions(-)

New commits:
commit 061145e2172886f0bd8b33f16ede7c21dba6f3f6
Author: ekuiitr 
Date:   Tue Jan 23 12:07:03 2018 +0530

tdf#105910 Allow defaults to be used as parameters for RTF control words.

[MS-RTF] specifies in "Conventions of an RTF Reader" section
("Change Formatting Property" action), that if a control word
requires a parameter, and it isn't specified, then a control-word-
specific default value is used. This patch implements the said
rule.
[MS-RTF]: https://www.microsoft.com/download/details.aspx?id=10725

Change-Id: Ic0b76bf16b01c65e1b89c243698fd46fd6426d90
Reviewed-on: https://gerrit.libreoffice.org/48375
Tested-by: Jenkins 
Reviewed-by: Mike Kaganski 

diff --git a/writerfilter/source/rtftok/rtfcontrolwords.cxx 
b/writerfilter/source/rtftok/rtfcontrolwords.cxx
index 1894055baf63..f1c39391fc6e 100644
--- a/writerfilter/source/rtftok/rtfcontrolwords.cxx
+++ b/writerfilter/source/rtftok/rtfcontrolwords.cxx
@@ -17,1831 +17,1831 @@ namespace rtftok
 {
 RTFSymbol aRTFControlWords[] = {
 // sKeyword nControlType nIndex
-{ "'", CONTROL_SYMBOL, RTF_HEXCHAR },
-{ "-", CONTROL_SYMBOL, RTF_OPTHYPH },
-{ "*", CONTROL_SYMBOL, RTF_IGNORE },
-{ ":", CONTROL_SYMBOL, RTF_SUBENTRY },
-{ "\\", CONTROL_SYMBOL, RTF_BACKSLASH },
-{ "\n", CONTROL_SYMBOL, RTF_PAR },
-{ "\r", CONTROL_SYMBOL, RTF_PAR },
-{ "\r\n", CONTROL_SYMBOL, RTF_PAR },
-{ "_", CONTROL_SYMBOL, RTF_NOBRKHYPH },
-{ "{", CONTROL_SYMBOL, RTF_LBRACE },
-{ "|", CONTROL_SYMBOL, RTF_FORMULA },
-{ "}", CONTROL_SYMBOL, RTF_RBRACE },
-{ "~", CONTROL_SYMBOL, RTF_NOBREAK },
-{ "ab", CONTROL_TOGGLE, RTF_AB },
-{ "absh", CONTROL_VALUE, RTF_ABSH },
-{ "abslock", CONTROL_FLAG, RTF_ABSLOCK },
-{ "absnoovrlp", CONTROL_TOGGLE, RTF_ABSNOOVRLP },
-{ "absw", CONTROL_VALUE, RTF_ABSW },
-{ "acaps", CONTROL_TOGGLE, RTF_ACAPS },
-{ "acccircle", CONTROL_TOGGLE, RTF_ACCCIRCLE },
-{ "acccomma", CONTROL_TOGGLE, RTF_ACCCOMMA },
-{ "accdot", CONTROL_TOGGLE, RTF_ACCDOT },
-{ "accnone", CONTROL_TOGGLE, RTF_ACCNONE },
-{ "accunderdot", CONTROL_TOGGLE, RTF_ACCUNDERDOT },
-{ "acf", CONTROL_VALUE, RTF_ACF },
-{ "adeff", CONTROL_VALUE, RTF_ADEFF },
-{ "additive", CONTROL_FLAG, RTF_ADDITIVE },
-{ "adeflang", CONTROL_VALUE, RTF_ADEFLANG },
-{ "adjustright", CONTROL_FLAG, RTF_ADJUSTRIGHT },
-{ "adn", CONTROL_VALUE, RTF_ADN },
-{ "aenddoc", CONTROL_FLAG, RTF_AENDDOC },
-{ "aendnotes", CONTROL_FLAG, RTF_AENDNOTES },
-{ "aexpnd", CONTROL_VALUE, RTF_AEXPND },
-{ "af", CONTROL_VALUE, RTF_AF },
-{ "afelev", CONTROL_FLAG, RTF_AFELEV },
-{ "afs", CONTROL_VALUE, RTF_AFS },
-{ "aftnbj", CONTROL_FLAG, RTF_AFTNBJ },
-{ "aftncn", CONTROL_DESTINATION, RTF_AFTNCN },
-{ "aftnnalc", CONTROL_FLAG, RTF_AFTNNALC },
-{ "aftnnar", CONTROL_FLAG, RTF_AFTNNAR },
-{ "aftnnauc", CONTROL_FLAG, RTF_AFTNNAUC },
-{ "aftnnchi", CONTROL_FLAG, RTF_AFTNNCHI },
-{ "aftnnchosung", CONTROL_FLAG, RTF_AFTNNCHOSUNG },
-{ "aftnncnum", CONTROL_FLAG, RTF_AFTNNCNUM },
-{ "aftnndbar", CONTROL_FLAG, RTF_AFTNNDBAR },
-{ "aftnndbnum", CONTROL_FLAG, RTF_AFTNNDBNUM },
-{ "aftnndbnumd", CONTROL_FLAG, RTF_AFTNNDBNUMD },
-{ "aftnndbnumk", CONTROL_FLAG, RTF_AFTNNDBNUMK },
-{ "aftnndbnumt", CONTROL_FLAG, RTF_AFTNNDBNUMT },
-{ "aftnnganada", CONTROL_FLAG, RTF_AFTNNGANADA },
-{ "aftnngbnum", CONTROL_FLAG, RTF_AFTNNGBNUM },
-{ "aftnngbnumd", CONTROL_FLAG, RTF_AFTNNGBNUMD },
-{ "aftnngbnumk", CONTROL_FLAG, RTF_AFTNNGBNUMK },
-{ "aftnngbnuml", CONTROL_FLAG, RTF_AFTNNGBNUML },
-{ "aftnnrlc", CONTROL_FLAG, RTF_AFTNNRLC },
-{ "aftnnruc", CONTROL_FLAG, RTF_AFTNNRUC },
-{ "aftnnzodiac", CONTROL_FLAG, RTF_AFTNNZODIAC },
-{ "aftnnzodiacd", CONTROL_FLAG, RTF_AFTNNZODIACD },
-{ "aftnnzodiacl", CONTROL_FLAG, RTF_AFTNNZODIACL },
-{ "aftnrestart", CONTROL_FLAG, RTF_AFTNRESTART },
-{ "aftnrstcont", CONTROL_FLAG, RTF_AFTNRSTCONT },
-{ "aftnsep", CONTROL_DESTINATION, RTF_AFTNSEP },
-{ "aftnsepc", CONTROL_DESTINATION, RTF_AFTNSEPC },
-{ "aftnstart", CONTROL_VALUE, RTF_AFTNSTART },
-{ "aftntj", CONTROL_FLAG, RTF_AFTNTJ },
-{ "ai", CONTROL_TOGGLE, RTF_AI },
-{ "alang", CONTROL_VALUE, RTF_ALANG },
-{ "allowfieldendsel", CONTROL_FLAG, RTF_ALLOWFIELDENDSEL },
-{ "allprot", CONTROL_FLAG, RTF_ALLPROT },
-{ "alntblind", CONTROL_FLAG, RTF_ALNTBLIND },
-{ "alt", CONTROL_FLAG, RTF_ALT },
-{ "animtext", CONTROL_VALUE, RTF_ANIMTEXT },
-{ "annotation", CONTROL_DESTINATION, RTF_ANNOTATION },
-{ "annotprot", CONTROL_FLAG, RTF_ANNOTPROT },
-{ "ansi", CONTROL_FLAG, RTF_ANSI },
-{ "ansicpg

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

2018-01-25 Thread Olivier Hallot
 sw/uiconfig/swriter/ui/watermarkdialog.ui |   19 +--
 1 file changed, 17 insertions(+), 2 deletions(-)

New commits:
commit 24075745b3865edc1254ce0c445f4b7152092545
Author: Olivier Hallot 
Date:   Thu Jan 25 13:46:42 2018 -0200

tdf#112356 Add help button in watermark dialog

Part of documenting the watermark feature of writer

Change-Id: I6376a583f02367c0e87fbd62e3bd449633a4dc5d
Reviewed-on: https://gerrit.libreoffice.org/48618
Tested-by: Jenkins 
Reviewed-by: Olivier Hallot 
Tested-by: Olivier Hallot 

diff --git a/sw/uiconfig/swriter/ui/watermarkdialog.ui 
b/sw/uiconfig/swriter/ui/watermarkdialog.ui
index 1dcc43bffae4..9c823c881e92 100644
--- a/sw/uiconfig/swriter/ui/watermarkdialog.ui
+++ b/sw/uiconfig/swriter/ui/watermarkdialog.ui
@@ -28,6 +28,21 @@
 False
 end
 
+  
+gtk-help
+True
+True
+True
+True
+  
+  
+False
+True
+0
+True
+  
+
+
   
 gtk-ok
 True
@@ -40,7 +55,7 @@
   
 False
 True
-0
+1
   
 
 
@@ -54,7 +69,7 @@
   
 False
 True
-1
+2
   
 
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-25 Thread Bjoern Michaelsen
 sw/inc/ftninfo.hxx|1 -
 sw/source/core/doc/docnew.cxx |8 
 2 files changed, 4 insertions(+), 5 deletions(-)

New commits:
commit 80fc1fe32aff770164e257ab63f715be9cd2d5ab
Author: Bjoern Michaelsen 
Date:   Thu Jan 25 01:55:43 2018 +0100

Remove SwEndNoteInfo::ReleaseCollection

- obsoleted by SwClient::EndListeningAll()

Change-Id: Id086a42e778b7630c44af4a6ddf2a23d77538c2b
Reviewed-on: https://gerrit.libreoffice.org/48549
Tested-by: Jenkins 
Reviewed-by: Björn Michaelsen 

diff --git a/sw/inc/ftninfo.hxx b/sw/inc/ftninfo.hxx
index eeeb39e1129d..9a6982a81893 100644
--- a/sw/inc/ftninfo.hxx
+++ b/sw/inc/ftninfo.hxx
@@ -71,7 +71,6 @@ public:
 
 void SetPrefix(const OUString& rSet) { sPrefix = rSet; }
 void SetSuffix(const OUString& rSet) { sSuffix = rSet; }
-void ReleaseCollection() { if ( GetRegisteredInNonConst() ) 
GetRegisteredInNonConst()->Remove( this ); }
 };
 
 enum SwFootnotePos
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index e71260ac584e..5c55de44eb9a 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -498,8 +498,8 @@ SwDoc::~SwDoc()
 
 // Delete for Collections
 // So that we get rid of the dependencies
-mpFootnoteInfo->ReleaseCollection();
-mpEndNoteInfo->ReleaseCollection();
+mpFootnoteInfo->EndListeningAll();
+mpEndNoteInfo->EndListeningAll();
 
 assert(mpDfltTextFormatColl == (*mpTextFormatCollTable)[0]
 && "Default-Text-Collection must always be at the start");
@@ -711,8 +711,8 @@ void SwDoc::ClearDoc()
 
 // Delete for Collections
 // So that we get rid of the dependencies
-mpFootnoteInfo->ReleaseCollection();
-mpEndNoteInfo->ReleaseCollection();
+mpFootnoteInfo->EndListeningAll();
+mpEndNoteInfo->EndListeningAll();
 
 // Optimization: Based on the fact that Standard is always 2nd in the
 // array, we should delete it as the last. With this we avoid
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-25 Thread Bjoern Michaelsen
 sw/source/core/doc/lineinfo.cxx |4 ++--
 sw/source/core/doc/number.cxx   |   12 ++--
 sw/source/core/docnode/node.cxx |2 +-
 sw/source/core/layout/atrfrm.cxx|8 
 sw/source/core/para/paratr.cxx  |3 +--
 sw/source/core/txtnode/SwGrammarContact.cxx |4 ++--
 sw/source/core/txtnode/txtatr2.cxx  |8 
 7 files changed, 20 insertions(+), 21 deletions(-)

New commits:
commit 93cabd565d412ea65ffd0c3fc01025a52d47ca4e
Author: Bjoern Michaelsen 
Date:   Thu Jan 25 02:21:24 2018 +0100

more GetRegisteredIn obsoleted by StopListeningAll()

Change-Id: I7d69a5112e03cec1b8ebdc389940557b4dbd1117
Reviewed-on: https://gerrit.libreoffice.org/48550
Tested-by: Jenkins 
Reviewed-by: Björn Michaelsen 

diff --git a/sw/source/core/doc/lineinfo.cxx b/sw/source/core/doc/lineinfo.cxx
index d8cf7439a38e..f8599bd94f1d 100644
--- a/sw/source/core/doc/lineinfo.cxx
+++ b/sw/source/core/doc/lineinfo.cxx
@@ -84,8 +84,8 @@ SwLineNumberInfo& SwLineNumberInfo::operator=(const 
SwLineNumberInfo &rCpy)
 {
 if ( rCpy.GetRegisteredIn() )
 const_cast(rCpy.GetRegisteredIn())->Add( this );
-else if ( GetRegisteredIn() )
-GetRegisteredInNonConst()->Remove( this );
+else
+EndListeningAll();
 
 aType = rCpy.GetNumType();
 aDivider = rCpy.GetDivider();
diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx
index b60a20168802..8912e30363b7 100644
--- a/sw/source/core/doc/number.cxx
+++ b/sw/source/core/doc/number.cxx
@@ -217,8 +217,8 @@ SwNumFormat::SwNumFormat(const SvxNumberFormat& rNumFormat, 
SwDoc* pDoc)
 }
 pCFormat->Add( this );
 }
-else if( GetRegisteredIn() )
-GetRegisteredInNonConst()->Remove( this );
+else
+EndListeningAll();
 }
 
 SwNumFormat::~SwNumFormat()
@@ -259,8 +259,8 @@ SwNumFormat& SwNumFormat::operator=( const SwNumFormat& 
rNumFormat)
 SvxNumberFormat::operator=(rNumFormat);
 if( rNumFormat.GetRegisteredIn() )
 rNumFormat.GetRegisteredInNonConst()->Add( this );
-else if( GetRegisteredIn() )
-GetRegisteredInNonConst()->Remove( this );
+else
+EndListeningAll();
 //For i120928,record the cp info of graphic within bullet
 m_cGrfBulletCP = rNumFormat.m_cGrfBulletCP;
 return *this;
@@ -277,8 +277,8 @@ void SwNumFormat::SetCharFormat( SwCharFormat* pChFormat)
 {
 if( pChFormat )
 pChFormat->Add( this );
-else if( GetRegisteredIn() )
-GetRegisteredInNonConst()->Remove( this );
+else
+EndListeningAll();
 }
 
 void SwNumFormat::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index 03e262ee2eb7..8e0636759083 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -1042,7 +1042,7 @@ void SwContentNode::Modify( const SfxPoolItem* pOldValue, 
const SfxPoolItem* pNe
 else
 {
 // Else register anyways when dying
-GetRegisteredIn()->Remove( this );
+EndListeningAll();
 if ( GetpSwAttrSet() )
 AttrSetHandleHelper::SetParent( mpAttrSet, *this, 
nullptr, nullptr );
 }
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index e8b8c79091cc..7ca5544be310 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -2055,16 +2055,16 @@ void SwFormatChain::SetPrev( SwFlyFrameFormat *pFormat )
 {
 if ( pFormat )
 pFormat->Add( &aPrev );
-else if ( aPrev.GetRegisteredIn() )
-aPrev.GetRegisteredIn()->Remove( &aPrev );
+else
+aPrev.EndListeningAll();
 }
 
 void SwFormatChain::SetNext( SwFlyFrameFormat *pFormat )
 {
 if ( pFormat )
 pFormat->Add( &aNext );
-else if ( aNext.GetRegisteredIn() )
-aNext.GetRegisteredIn()->Remove( &aNext );
+else
+aNext.EndListeningAll();
 }
 
 bool SwFormatChain::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
diff --git a/sw/source/core/para/paratr.cxx b/sw/source/core/para/paratr.cxx
index 68dc9bd1c5df..f66b388ffabe 100644
--- a/sw/source/core/para/paratr.cxx
+++ b/sw/source/core/para/paratr.cxx
@@ -66,8 +66,7 @@ void SwFormatDrop::SetCharFormat( SwCharFormat *pNew )
 {
 assert(!pNew || !pNew->IsDefault()); // expose cases that lead to 
use-after-free
 // Rewire
-if ( GetRegisteredIn() )
-GetRegisteredInNonConst()->Remove( this );
+EndListeningAll();
 if(pNew)
 pNew->Add( this );
 }
diff --git a/sw/source/core/txtnode/SwGrammarContact.cxx 
b/sw/source/core/txtnode/SwGrammarContact.cxx
index 78ea24427659..d1ae37a7571d 100644
--- a/sw/source/core/txtnode/SwGrammarContact.cxx
+++ b/sw/source/core/txtnode/SwGrammarContact.cxx
@@ -94,7 +94,7 @@ void SwGrammarContact::updat

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

2018-01-25 Thread Bjoern Michaelsen
 sw/inc/calbck.hxx|1 +
 sw/inc/swevent.hxx   |2 +-
 sw/inc/tox.hxx   |1 -
 sw/source/core/access/accframebase.cxx   |9 +++--
 sw/source/core/access/accnotextframe.cxx |5 +
 sw/source/core/access/accpara.cxx|3 +--
 sw/source/core/access/acctable.cxx   |7 ++-
 sw/source/core/attr/calbck.cxx   |8 +++-
 sw/source/core/attr/format.cxx   |5 ++---
 sw/source/core/crsr/crsrsh.cxx   |3 +--
 sw/source/core/doc/acmplwrd.cxx  |6 +++---
 sw/source/core/doc/docfly.cxx|2 +-
 sw/source/core/doc/docftn.cxx|   16 
 sw/source/core/inc/UndoCore.hxx  |1 -
 sw/source/core/txtnode/fmtatr2.cxx   |4 ++--
 sw/source/core/undo/rolbck.cxx   |2 +-
 sw/source/core/undo/undobj1.cxx  |5 -
 sw/source/core/unocore/unobkm.cxx|2 +-
 sw/source/core/unocore/unochart.cxx  |2 +-
 sw/source/core/unocore/unodraw.cxx   |3 +--
 sw/source/core/unocore/unofield.cxx  |2 +-
 sw/source/core/unocore/unoflatpara.cxx   |3 +--
 sw/source/core/unocore/unoframe.cxx  |3 +--
 sw/source/core/unocore/unoftn.cxx|5 +
 sw/source/core/unocore/unoidx.cxx|8 ++--
 sw/source/core/unocore/unoobj2.cxx   |   14 ++
 sw/source/core/unocore/unoport.cxx   |6 +-
 sw/source/core/unocore/unorefmk.cxx  |7 ++-
 sw/source/core/unocore/unostyle.cxx  |3 +--
 sw/source/core/unocore/unotbl.cxx|8 +++-
 sw/source/core/unocore/unotextmarkup.cxx |5 +
 sw/source/filter/html/htmltab.cxx|   10 +++---
 sw/source/filter/html/swhtml.cxx |2 +-
 sw/source/uibase/wrtsh/wrtsh2.cxx|7 ++-
 34 files changed, 63 insertions(+), 107 deletions(-)

New commits:
commit 360f2d1b46174fcb33323dcac978bfe8796bad19
Author: Bjoern Michaelsen 
Date:   Wed Jan 24 00:56:50 2018 +0100

introduce SwClient::EndListeningAll()

- this is to reduce the use of GetRegisterdIn(), which should be an
  implementation detail
- remove SwTOXMark::DeRegister() which did the same for a part of the
  class tree
- remove SwUndoSetFlyFormat::DeRegisterFromFormat(), same
- remove doubletracking FrameDeleteWatch::m_bDeleted, just check
  GetRegisteredIn()

Change-Id: Id9364076759446ee5ff1898683c3ca700c1014c9
Reviewed-on: https://gerrit.libreoffice.org/48548
Tested-by: Jenkins 
Reviewed-by: Björn Michaelsen 

diff --git a/sw/inc/calbck.hxx b/sw/inc/calbck.hxx
index 38d2e94b4261..06b6266bd32d 100644
--- a/sw/inc/calbck.hxx
+++ b/sw/inc/calbck.hxx
@@ -132,6 +132,7 @@ public:
 
 const SwModify* GetRegisteredIn() const { return m_pRegisteredIn; }
 SwModify* GetRegisteredIn() { return m_pRegisteredIn; }
+void EndListeningAll();
 
 
 // get information about attribute
diff --git a/sw/inc/swevent.hxx b/sw/inc/swevent.hxx
index b108d8de9168..9b6b4b3b84f1 100644
--- a/sw/inc/swevent.hxx
+++ b/sw/inc/swevent.hxx
@@ -111,7 +111,7 @@ struct SwCallMouseEvent
 // note: pFormat is not necessarily the same as
 // GetRegisteredIn() here; see ~SwFormat()
 assert(PTR.pFormat);
-GetRegisteredInNonConst()->Remove(this);
+EndListeningAll();
 }
 eType = EVENT_OBJECT_NONE; PTR.pFormat = nullptr; 
PTR.IMAP.pIMapObj = nullptr;
 }
diff --git a/sw/inc/tox.hxx b/sw/inc/tox.hxx
index b32b3c8f96ba..2ca0604d3926 100644
--- a/sw/inc/tox.hxx
+++ b/sw/inc/tox.hxx
@@ -142,7 +142,6 @@ public:
 { return m_wXDocumentIndexMark; }
 SAL_DLLPRIVATE void 
SetXTOXMark(css::uno::Reference const& xMark)
 { m_wXDocumentIndexMark = xMark; }
-void DeRegister() { GetRegisteredInNonConst()->Remove( this ); }
 void RegisterToTOXType( SwTOXType& rMark );
 static void InsertTOXMarks( SwTOXMarks& aMarks, const SwTOXType& rType );
 };
diff --git a/sw/source/core/access/accframebase.cxx 
b/sw/source/core/access/accframebase.cxx
index 221304bc3857..88ae7c5aa087 100644
--- a/sw/source/core/access/accframebase.cxx
+++ b/sw/source/core/access/accframebase.cxx
@@ -244,14 +244,14 @@ void SwAccessibleFrameBase::Modify( const SfxPoolItem* 
pOld, const SfxPoolItem *
 case RES_OBJECTDYING:
 // mba: it seems that this class intentionally does not call code in 
base class SwClient
 if( pOld && ( GetRegisteredIn() == static_cast< SwModify *>( 
static_cast< const SwPtrMsgPoolItem * >( pOld )->pObject ) ) )
-GetRegisteredInNonConst()->Remove( this );
+EndListeningAll();
 break;
 
 case RES_FMT_CHG:
 if( pOld &&
 static_cast< const SwFormatChg * >(pNew)->pChangedFormat == 
GetRegisteredIn() &&
 static_cast< const SwFormatChg * 
>(pOld)->pChangedFormat->IsFormatI

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

2018-01-25 Thread Michael Stahl
 sw/inc/doc.hxx  |7 ---
 sw/source/core/doc/docnew.cxx   |   17 +
 sw/source/core/doc/doctxm.cxx   |   14 +-
 sw/source/uibase/dbui/dbmgr.cxx |   12 ++--
 4 files changed, 24 insertions(+), 26 deletions(-)

New commits:
commit 26d34f319ba48216785f7fdbf9e6bfdaf2dc6ad2
Author: Michael Stahl 
Date:   Thu Jan 25 15:49:34 2018 +0100

sw: fix some bug in SwTOXBaseSection::UpdatePageNum()

Looking at UpdatePageNum_ it's fairly obvious that the 2 vectors aNums
and aDescs have to be in sync, but aNums is cleared after each iteration
while aDescs is not.

Change-Id: I41d8a8df5c4c3ae51aa5ea89c21b01651af5651c

diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index 3202362cbbf2..aa2bee2db1ad 100644
--- a/sw/source/core/doc/doctxm.cxx
+++ b/sw/source/core/doc/doctxm.cxx
@@ -1548,8 +1548,6 @@ void SwTOXBaseSection::UpdatePageNum()
 for( SwTOXSortTabBases::size_type nCnt = 0; nCnt < aSortArr.size(); ++nCnt 
)
 {
 // Loop over all SourceNodes
-std::vector aNums; // the PageNumber
-std::vector aDescs;// The PageDescriptors 
matching the PageNumbers
 
 // process run in lines
 SwTOXSortTabBases::size_type nRange = 0;
@@ -1572,6 +1570,8 @@ void SwTOXBaseSection::UpdatePageNum()
 
 for(SwTOXSortTabBases::size_type nRunInEntry = nCnt; nRunInEntry < 
nCnt + nRange; ++nRunInEntry)
 {
+std::vector aNums; // the PageNumber
+std::vector aDescs; // The PageDescriptors matching 
the PageNumbers
 std::vector aMainNums; // contains page numbers of 
main entries
 SwTOXSortTabBase* pSortBase = aSortArr[nRunInEntry];
 size_t nSize = pSortBase->aTOXSources.size();
@@ -1630,7 +1630,6 @@ void SwTOXBaseSection::UpdatePageNum()
 UpdatePageNum_( const_cast(pTextNd), aNums, 
aDescs, &aMainNums,
 aIntl );
 }
-aNums.clear();
 }
 }
 // Delete the mapping array after setting the right PageNumber
commit 38af1bb52d3833da7919e61e650fb9ec1bdaf4f7
Author: Michael Stahl 
Date:   Thu Jan 25 15:44:34 2018 +0100

sw: de-pointerise local variable in SwTOXBaseSection::UpdatePageNum()

Change-Id: I24fcde19ae94cc5a278da6d88e72ce6a57a64951

diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index e19316445785..3202362cbbf2 100644
--- a/sw/source/core/doc/doctxm.cxx
+++ b/sw/source/core/doc/doctxm.cxx
@@ -1550,7 +1550,6 @@ void SwTOXBaseSection::UpdatePageNum()
 // Loop over all SourceNodes
 std::vector aNums; // the PageNumber
 std::vector aDescs;// The PageDescriptors 
matching the PageNumbers
-std::vector *pMainNums = nullptr; // contains page numbers 
of main entries
 
 // process run in lines
 SwTOXSortTabBases::size_type nRange = 0;
@@ -1573,6 +1572,7 @@ void SwTOXBaseSection::UpdatePageNum()
 
 for(SwTOXSortTabBases::size_type nRunInEntry = nCnt; nRunInEntry < 
nCnt + nRange; ++nRunInEntry)
 {
+std::vector aMainNums; // contains page numbers of 
main entries
 SwTOXSortTabBase* pSortBase = aSortArr[nRunInEntry];
 size_t nSize = pSortBase->aTOXSources.size();
 for (size_t j = 0; j < nSize; ++j)
@@ -1616,9 +1616,7 @@ void SwTOXBaseSection::UpdatePageNum()
 if(TOX_SORT_INDEX == pSortBase->GetType() &&
 rTOXSource.bMainEntry)
 {
-if(!pMainNums)
-pMainNums = new std::vector;
-pMainNums->push_back(nPage);
+aMainNums.push_back(nPage);
 }
 }
 }
@@ -1629,10 +1627,9 @@ void SwTOXBaseSection::UpdatePageNum()
 const SwTextNode* pTextNd = pBase->pTOXNd->GetTextNode();
 OSL_ENSURE( pTextNd, "no TextNode, wrong TOC" );
 
-UpdatePageNum_( const_cast(pTextNd), aNums, 
aDescs, pMainNums,
+UpdatePageNum_( const_cast(pTextNd), aNums, 
aDescs, &aMainNums,
 aIntl );
 }
-DELETEZ(pMainNums);
 aNums.clear();
 }
 }
commit 7dbe76266cb4250701aaee043933ccb21e5f6564
Author: Michael Stahl 
Date:   Thu Jan 25 15:43:19 2018 +0100

sw: convert SwDoc::mpDBManager to unique_ptr

Very odd things are happening in dbmgr.cxx to override this member,
so add a 2nd member that points to the DBManager that is actually used.

Change-Id: If5d4ea1e4951a0406fddcb71302c53ee7b37a34e

diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 726471e1dea6..aa7ee77406cf 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -283,7 +283,8 @@ class SW_DLLPUBLIC SwDoc final
 SwTOXTypes  *mpTOXTypes;   //< Tables/indices
 SwDefTOXBase_Impl * mp

[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - dbaccess/source

2018-01-25 Thread Caolán McNamara
 dbaccess/source/ui/inc/browserids.hxx |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 2b4ad9183d7fc0da40dc1fdd523bdc613612024c
Author: Caolán McNamara 
Date:   Tue Jan 23 20:48:51 2018 +

tdf#115080 menu id collision

21 collides with the pattern field menu id

Change-Id: Ia90995861adabbe1615e24ee10defe25cee76c56
Reviewed-on: https://gerrit.libreoffice.org/48487
Tested-by: Jenkins 
Reviewed-by: Eike Rathke 

diff --git a/dbaccess/source/ui/inc/browserids.hxx 
b/dbaccess/source/ui/inc/browserids.hxx
index 5ce766602db5..7603c8c39140 100644
--- a/dbaccess/source/ui/inc/browserids.hxx
+++ b/dbaccess/source/ui/inc/browserids.hxx
@@ -47,11 +47,11 @@
 #define ID_BROWSER_REMOVEFILTER SID_FM_REMOVE_FILTER_SORT
 #define ID_BROWSER_FILTERED SID_FM_FORM_FILTERED
 #define ID_BROWSER_REFRESH  SID_FM_REFRESH
-#define ID_BROWSER_COLATTRSET   20  // Spaltenformatierung
-#define ID_BROWSER_COLWIDTH 21  // Spaltenbreite
-#define ID_BROWSER_TABLEATTR22  // table format attributes
-#define ID_BROWSER_ROWHEIGHT23  // Zeilenhoehe
-#define ID_BROWSER_COLUMNINFO   24  // copies the column 
description to insert it into the table design
+#define ID_BROWSER_COLATTRSET   10020  // column formatting
+#define ID_BROWSER_COLWIDTH 10021  // column width
+#define ID_BROWSER_TABLEATTR10022  // table format attributes
+#define ID_BROWSER_ROWHEIGHT10023  // row height
+#define ID_BROWSER_COLUMNINFO   10024  // copies the column 
description to insert it into the table design
 #define ID_BROWSER_ADDTABLE SID_FM_ADDTABLE
 #define ID_BROWSER_EXPLORER SID_DSBROWSER_EXPLORER
 #define ID_BROWSER_DOCUMENT_DATASOURCE  SID_DOCUMENT_DATA_SOURCE
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - svl/source

2018-01-25 Thread Eike Rathke
 svl/source/numbers/zforscan.cxx |8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

New commits:
commit 28265db967d90680c1fd754bb746751b849373b3
Author: Eike Rathke 
Date:   Tue Oct 17 12:34:35 2017 +0200

Add to nPos once instead of in each iteration

(cherry picked from commit d728492f4aa195fd4aec3ddb116879de76a95c6d)

Change-Id: I9ab9d5be1edead3a83375d87910bc9128c894b85
Reviewed-on: https://gerrit.libreoffice.org/48302
Tested-by: Jenkins 
Reviewed-by: Eike Rathke 

diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx
index cd09a444c81f..74a765238518 100644
--- a/svl/source/numbers/zforscan.cxx
+++ b/svl/source/numbers/zforscan.cxx
@@ -2412,19 +2412,18 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& 
rString )
 bDecSep = true;
 nTypeArray[i] = NF_SYMBOLTYPE_DIGIT;
 OUString& rStr = sStrArray[i];
-nPos = nPos + sStrArray[i].getLength();
 nCounter++;
 i++;
 while (i < nAnzStrings &&
sStrArray[i][0] == '0')
 {
 rStr += sStrArray[i];
-nPos = nPos + sStrArray[i].getLength();
 nTypeArray[i] = NF_SYMBOLTYPE_EMPTY;
 nAnzResStrings--;
 nCounter++;
 i++;
 }
+nPos += rStr.getLength();
 }
 else
 {
@@ -2562,19 +2561,18 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& 
rString )
 bDecSep = true;
 nTypeArray[i] = NF_SYMBOLTYPE_DIGIT;
 OUString& rStr = sStrArray[i];
-nPos = nPos + sStrArray[i].getLength();
-i++;
 nCounter++;
+i++;
 while (i < nAnzStrings &&
sStrArray[i][0] == '0')
 {
 rStr += sStrArray[i];
-nPos = nPos + sStrArray[i].getLength();
 nTypeArray[i] = NF_SYMBOLTYPE_EMPTY;
 nAnzResStrings--;
 nCounter++;
 i++;
 }
+nPos += rStr.getLength();
 }
 else
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - vcl/osx

2018-01-25 Thread Caolán McNamara
 vcl/osx/salframeview.mm |   21 -
 1 file changed, 12 insertions(+), 9 deletions(-)

New commits:
commit 378d7d68d9e842039bcf797a8b95c2e85768e1e7
Author: Caolán McNamara 
Date:   Sat Jan 20 20:01:13 2018 +

tdf#109062 restore osx scrollwheel logic

to pre

commit f7d2bf216afa10268e6a7c1d4613a2fd8f7c7f3c
Date:   Tue May 16 10:12:09 2017 +0100

Resolves: tdf#103174 & rhbz#1367846 improve gtk3 trackpad scrolling

state.

Change-Id: If5a494441731e73136158b4905c2744ba8bc8875
Reviewed-on: https://gerrit.libreoffice.org/48306
Tested-by: Jenkins 
Reviewed-by: Eike Rathke 

diff --git a/vcl/osx/salframeview.mm b/vcl/osx/salframeview.mm
index 50cd5bc4e722..c7bf9c965d87 100644
--- a/vcl/osx/salframeview.mm
+++ b/vcl/osx/salframeview.mm
@@ -807,9 +807,10 @@ private:
 if( aEvent.mnDelta == 0 )
 aEvent.mnDelta = aEvent.mnNotchDelta;
 aEvent.mbHorz = FALSE;
-aEvent.mnScrollLines = nDeltaZ;
-if( aEvent.mnScrollLines == 0 )
-aEvent.mnScrollLines = 1;
+sal_uInt32 nScrollLines = nDeltaZ;
+if (nScrollLines == 0)
+nScrollLines = 1;
+aEvent.mnScrollLines = nScrollLines;
 mpFrame->CallCallback( SalEvent::WheelMouse, &aEvent );
 }
 }
@@ -929,9 +930,10 @@ SAL_WNODEPRECATED_DECLARATIONS_POP
 if( aEvent.mnDelta == 0 )
 aEvent.mnDelta = aEvent.mnNotchDelta;
 aEvent.mbHorz = TRUE;
-aEvent.mnScrollLines = fabs(dX) / WHEEL_EVENT_FACTOR;
-if( aEvent.mnScrollLines == 0 )
-aEvent.mnScrollLines = 1;
+sal_uInt32 nScrollLines = fabs(dX) / WHEEL_EVENT_FACTOR;
+if (nScrollLines == 0)
+nScrollLines = 1;
+aEvent.mnScrollLines = nScrollLines;
 
 mpFrame->CallCallback( SalEvent::WheelMouse, &aEvent );
 }
@@ -942,9 +944,10 @@ SAL_WNODEPRECATED_DECLARATIONS_POP
 if( aEvent.mnDelta == 0 )
 aEvent.mnDelta = aEvent.mnNotchDelta;
 aEvent.mbHorz = FALSE;
-aEvent.mnScrollLines = fabs(dY) / WHEEL_EVENT_FACTOR;
-if( aEvent.mnScrollLines == 0 )
-aEvent.mnScrollLines = 1;
+sal_uInt32 nScrollLines = fabs(dY) / WHEEL_EVENT_FACTOR;
+if (nScrollLines == 0)
+nScrollLines = 1;
+aEvent.mnScrollLines = nScrollLines;
 
 mpFrame->CallCallback( SalEvent::WheelMouse, &aEvent );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - editeng/qa

2018-01-25 Thread Szymon Kłos
 editeng/qa/unit/core-test.cxx |   94 ++
 1 file changed, 94 insertions(+)

New commits:
commit 70cae0860a144de898bed5a990759dec400d978c
Author: Szymon Kłos 
Date:   Wed Jan 3 11:25:23 2018 +0100

tdf#114628 unit test for line spacing

* two cases 60% and 150% line spacing

Change-Id: I2ce66cd19f459b738243052b5c12da0bbb883ebe
Reviewed-on: https://gerrit.libreoffice.org/47303
Tested-by: Jenkins 
Reviewed-by: Szymon Kłos 
Reviewed-on: https://gerrit.libreoffice.org/47582
Reviewed-by: Eike Rathke 

diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx
index d2b8affea7a1..7736db426c0a 100644
--- a/editeng/qa/unit/core-test.cxx
+++ b/editeng/qa/unit/core-test.cxx
@@ -20,6 +20,9 @@
 #include "editeng/eeitem.hxx"
 #include "editeng/editids.hrc"
 #include "editeng/editdoc.hxx"
+#include "editeng/fontitem.hxx"
+#include "editeng/fhgtitem.hxx"
+#include "editeng/lspcitem.hxx"
 #include "editeng/svxacorr.hxx"
 #include "editeng/unofield.hxx"
 #include "editeng/wghtitem.hxx"
@@ -46,6 +49,9 @@ public:
 virtual void setUp() override;
 virtual void tearDown() override;
 
+/// Test text portions position when percentage line spacing is set
+void testLineSpacing();
+
 void testConstruction();
 
 /// Test UNO service class that implements text field items.
@@ -75,6 +81,7 @@ public:
 void testSectionAttributes();
 
 CPPUNIT_TEST_SUITE(Test);
+CPPUNIT_TEST(testLineSpacing);
 CPPUNIT_TEST(testConstruction);
 CPPUNIT_TEST(testUnoTextFields);
 CPPUNIT_TEST(testAutocorrect);
@@ -108,6 +115,93 @@ void Test::tearDown()
 test::BootstrapFixture::tearDown();
 }
 
+void Test::testLineSpacing()
+{
+// Create EditEngine's instance
+EditEngine aEditEngine(mpItemPool);
+
+if(aEditEngine.GetRefDevice()->GetDPIY() != 96
+|| 
!basegfx::fTools::equal(aEditEngine.GetRefDevice()->GetDPIScaleFactor(), 1.0))
+return;
+
+// Get EditDoc for current EditEngine's instance
+EditDoc &rDoc = aEditEngine.GetEditDoc();
+
+// Initially no text should be there
+CPPUNIT_ASSERT_EQUAL(sal_uLong(0), rDoc.GetTextLen());
+CPPUNIT_ASSERT_EQUAL(OUString(), rDoc.GetParaAsString(sal_Int32(0)));
+
+// Set initial text
+OUString aText = "This is multi-line paragraph";
+
+sal_Int32 aTextLen = aText.getLength();
+aEditEngine.SetText(aText);
+
+// Assert changes - text insertion
+CPPUNIT_ASSERT_EQUAL(sal_uLong(aTextLen), rDoc.GetTextLen());
+CPPUNIT_ASSERT_EQUAL(aText, rDoc.GetParaAsString(sal_Int32(0)));
+
+// Get ItemSet for line spacing - 60%
+std::unique_ptr pSet(new 
SfxItemSet(aEditEngine.GetEmptyItemSet()));
+SvxLineSpacingItem aLineSpacing(LINE_SPACE_DEFAULT_HEIGHT, EE_PARA_SBL);
+aLineSpacing.SetPropLineSpace(60);
+pSet->Put(aLineSpacing);
+
+// Set font
+SvxFontItem aFont(EE_CHAR_FONTINFO);
+aFont.SetFamilyName("Liberation Sans");
+pSet->Put(aFont);
+SvxFontHeightItem aFontSize(240, 100, EE_CHAR_FONTHEIGHT);
+pSet->Put(aFontSize);
+
+CPPUNIT_ASSERT_EQUAL(static_cast(3), pSet->Count());
+
+// Select all paragraphs and set spacing
+ESelection aSelection(0, 0, 0, aTextLen);
+aEditEngine.QuickSetAttribs(*pSet, aSelection);
+
+// Force multiple lines
+aEditEngine.SetPaperSize(Size(1000, 6000));
+CPPUNIT_ASSERT_EQUAL((sal_Int32)4, aEditEngine.GetLineCount(0));
+
+// Assert changes
+ParaPortion* pParaPortion = aEditEngine.GetParaPortions()[0];
+ContentNode* const pNode = pParaPortion->GetNode();
+const SfxPoolItem& rLSItem = 
pNode->GetContentAttribs().GetItem(EE_PARA_SBL);
+const SvxLineSpacingItem* pLSItem = static_cast(&rLSItem);
+CPPUNIT_ASSERT_EQUAL(SvxInterLineSpaceRule::Prop, 
pLSItem->GetInterLineSpaceRule());
+CPPUNIT_ASSERT_EQUAL((sal_uInt16)60, pLSItem->GetPropLineSpace());
+
+// Check the first line
+ParagraphInfos aInfo = aEditEngine.GetParagraphInfos(0);
+CPPUNIT_ASSERT_EQUAL((sal_uInt16)122, aInfo.nFirstLineMaxAscent);
+CPPUNIT_ASSERT_EQUAL((sal_uInt16)153, 
(sal_uInt16)aEditEngine.GetLineHeight(0));
+
+// Prepare second case - 150%
+std::unique_ptr pSet2(new 
SfxItemSet(aEditEngine.GetEmptyItemSet()));
+SvxLineSpacingItem aLineSpacing2(LINE_SPACE_DEFAULT_HEIGHT, EE_PARA_SBL);
+aLineSpacing2.SetPropLineSpace(150);
+pSet2->Put(aLineSpacing2);
+pSet2->Put(aFont);
+pSet2->Put(aFontSize);
+
+CPPUNIT_ASSERT_EQUAL(static_cast(3), pSet2->Count());
+
+// Select all paragraphs and set spacing
+aEditEngine.QuickSetAttribs(*pSet2, aSelection);
+
+// Assert changes
+const SfxPoolItem& rLSItem2 = 
pNode->GetContentAttribs().GetItem(EE_PARA_SBL);
+const SvxLineSpacingItem* pLSItem2 = static_cast(&rLSItem2);
+CPPUNIT_ASSERT_EQUAL(SvxInterLineSpaceRule::Prop, 
pLSItem2->GetInterLineSpaceRule());
+CPPUNIT_ASSERT_EQUAL((sal_uInt16)150, pLSItem2->GetPropLineSpace());
+
+//

[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sw/source

2018-01-25 Thread Michael Stahl
 sw/source/filter/html/htmltab.cxx |3 +++
 sw/source/filter/html/swhtml.cxx  |   31 +++
 sw/source/filter/html/swhtml.hxx  |2 ++
 3 files changed, 24 insertions(+), 12 deletions(-)

New commits:
commit 7283bdaf9cdc81dbec55c915ecd8c2571478bc4d
Author: Michael Stahl 
Date:   Mon Jan 22 19:48:06 2018 +0100

ofz#5566 sw: HTML import: ignore  in table structure elements

Looking at the HTML4 DTD https://www.w3.org/TR/html4/sgml/dtd.html,
inside TABLE only various elements defining the structure of the table
allowed, except inside cells (TD and TH elements).

DIV in a table but outside cells may cause cursor positions to go
off the rails, so better ignore such invalid DIV tags.

Reviewed-on: https://gerrit.libreoffice.org/48359
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit 8b1a83bffe35ae0e71735569512c1586bcb37b25)

Change-Id: Ia6195d80670631669c252d572242874b13642b74
Reviewed-on: https://gerrit.libreoffice.org/48526
Tested-by: Jenkins 
Reviewed-by: Eike Rathke 

diff --git a/sw/source/filter/html/htmltab.cxx 
b/sw/source/filter/html/htmltab.cxx
index 0a499420f247..e033e4f36c61 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -19,6 +19,7 @@
 
 #include 
 #include "hintids.hxx"
+#include 
 #include 
 #include 
 #include 
@@ -3313,6 +3314,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, 
bool bReadOptions,
 if( !IsParserWorking() && !m_pPendStack )
 return;
 
+::comphelper::FlagRestorationGuard g(m_isInTableStructure, false);
 CellSaveStruct* pSaveStruct;
 
 HtmlTokenId nToken = HtmlTokenId::NONE;
@@ -4978,6 +4980,7 @@ HTMLTable *SwHTMLParser::BuildTable( SvxAdjust 
eParentAdjust,
 if( !IsParserWorking() && !m_pPendStack )
 return nullptr;
 
+::comphelper::FlagRestorationGuard g(m_isInTableStructure, true);
 HtmlTokenId nToken = HtmlTokenId::NONE;
 bool bPending = false;
 TableSaveStruct* pSaveStruct;
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 3ec9997c8c33..f3560b11fbb6 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -298,6 +298,7 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, SwPaM& rCursor, 
SvStream& rIn,
 m_bInFootEndNoteSymbol( false ),
 m_bIgnoreHTMLComments( bNoHTMLComments ),
 m_bRemoveHidden( false ),
+m_isInTableStructure(false),
 m_pTempViewFrame(nullptr)
 {
 m_nEventId = nullptr;
@@ -1538,26 +1539,32 @@ void SwHTMLParser::NextToken( HtmlTokenId nToken )
 // divisions
 case HtmlTokenId::DIVISION_ON:
 case HtmlTokenId::CENTER_ON:
-if( m_nOpenParaToken != HtmlTokenId::NONE )
+if (!m_isInTableStructure)
 {
-if( IsReadPRE() )
-m_nOpenParaToken = HtmlTokenId::NONE;
-else
-EndPara();
+if (m_nOpenParaToken != HtmlTokenId::NONE)
+{
+if (IsReadPRE())
+m_nOpenParaToken = HtmlTokenId::NONE;
+else
+EndPara();
+}
+NewDivision( nToken );
 }
-NewDivision( nToken );
 break;
 
 case HtmlTokenId::DIVISION_OFF:
 case HtmlTokenId::CENTER_OFF:
-if( m_nOpenParaToken != HtmlTokenId::NONE )
+if (!m_isInTableStructure)
 {
-if( IsReadPRE() )
-m_nOpenParaToken = HtmlTokenId::NONE;
-else
-EndPara();
+if (m_nOpenParaToken != HtmlTokenId::NONE)
+{
+if (IsReadPRE())
+m_nOpenParaToken = HtmlTokenId::NONE;
+else
+EndPara();
+}
+EndDivision();
 }
-EndDivision();
 break;
 
 case HtmlTokenId::MULTICOL_ON:
diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx
index a1ef95e54d8c..5284590f9f0f 100644
--- a/sw/source/filter/html/swhtml.hxx
+++ b/sw/source/filter/html/swhtml.hxx
@@ -476,6 +476,8 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient
 bool m_bIgnoreHTMLComments : 1;
 bool m_bRemoveHidden : 1; // the filter implementation might set the 
hidden flag
 
+bool m_isInTableStructure;
+
 /// the names corresponding to the DOCINFO field subtypes INFO[1-4]
 OUString m_InfoNames[4];
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - external/curl

2018-01-25 Thread Michael Stahl
 external/curl/CVE-2018-105.patch  |   36 +++
 external/curl/CVE-2018-107.patch  |  110 ++
 external/curl/UnpackedTarball_curl.mk |2 
 3 files changed, 148 insertions(+)

New commits:
commit ed497921314ebd41fce3483c92ca433b502628ca
Author: Michael Stahl 
Date:   Wed Jan 24 22:24:03 2018 +0100

curl: fix CVE-2018-105/107

* don't upgrade to new release, no idea how the new windows
  build system likes targeting Win XP which is still supported in 5.4

Change-Id: I4fbd7f1c5f1f0563895f6f8ede10063621d10a4b
Reviewed-on: https://gerrit.libreoffice.org/48542
Tested-by: Jenkins 
Reviewed-by: Eike Rathke 

diff --git a/external/curl/CVE-2018-105.patch 
b/external/curl/CVE-2018-105.patch
new file mode 100644
index ..7b5578b1aacc
--- /dev/null
+++ b/external/curl/CVE-2018-105.patch
@@ -0,0 +1,36 @@
+From fa3dbb9a147488a2943bda809c66fc497efe06cb Mon Sep 17 00:00:00 2001
+From: Zhouyihai Ding 
+Date: Wed, 10 Jan 2018 10:12:18 -0800
+Subject: [PATCH] http2: fix incorrect trailer buffer size
+
+Prior to this change the stored byte count of each trailer was
+miscalculated and 1 less than required. It appears any trailer
+after the first that was passed to Curl_client_write would be truncated
+or corrupted as well as the size. Potentially the size of some
+subsequent trailer could be erroneously extracted from the contents of
+that trailer, and since that size is used by client write an
+out-of-bounds read could occur and cause a crash or be otherwise
+processed by client write.
+
+The bug appears to have been born in 0761a51 (precedes 7.49.0).
+
+Closes https://github.com/curl/curl/pull/2231
+---
+ lib/http2.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/http2.c b/lib/http2.c
+index 8e2fc71996..699287940e 100644
+--- a/lib/http2.c
 b/lib/http2.c
+@@ -925,8 +925,8 @@ static int on_header(nghttp2_session *session, const 
nghttp2_frame *frame,
+ 
+   if(stream->bodystarted) {
+ /* This is trailer fields. */
+-/* 3 is for ":" and "\r\n". */
+-uint32_t n = (uint32_t)(namelen + valuelen + 3);
++/* 4 is for ": " and "\r\n". */
++uint32_t n = (uint32_t)(namelen + valuelen + 4);
+ 
+ DEBUGF(infof(data_s, "h2 trailer: %.*s: %.*s\n", namelen, name, valuelen,
+  value));
diff --git a/external/curl/CVE-2018-107.patch 
b/external/curl/CVE-2018-107.patch
new file mode 100644
index ..c474370c78ad
--- /dev/null
+++ b/external/curl/CVE-2018-107.patch
@@ -0,0 +1,110 @@
+From af32cd3859336ab963591ca0df9b1e33a7ee066b Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg 
+Date: Fri, 19 Jan 2018 13:19:25 +0100
+Subject: [PATCH] http: prevent custom Authorization headers in redirects
+
+... unless CURLOPT_UNRESTRICTED_AUTH is set to allow them. This matches how
+curl already handles Authorization headers created internally.
+
+Note: this changes behavior slightly, for the sake of reducing mistakes.
+
+Added test 317 and 318 to verify.
+
+Reported-by: Craig de Stigter
+Bug: https://curl.haxx.se/docs/adv_2018-b3bf.html
+---
+ docs/libcurl/opts/CURLOPT_HTTPHEADER.3 | 12 -
+ lib/http.c | 10 +++-
+ lib/setopt.c   |  2 +-
+ lib/urldata.h  |  2 +-
+ tests/data/Makefile.inc|  2 +-
+ tests/data/test317 | 94 +
+ tests/data/test318 | 95 ++
+ 7 files changed, 212 insertions(+), 5 deletions(-)
+ create mode 100644 tests/data/test317
+ create mode 100644 tests/data/test318
+
+diff --git a/docs/libcurl/opts/CURLOPT_HTTPHEADER.3 
b/docs/libcurl/opts/CURLOPT_HTTPHEADER.3
+index c5ccb1a53d..c9f29e393e 100644
+--- a/docs/libcurl/opts/CURLOPT_HTTPHEADER.3
 b/docs/libcurl/opts/CURLOPT_HTTPHEADER.3
+@@ -5,7 +5,7 @@
+ .\" *| (__| |_| |  _ <| |___
+ .\" * \___|\___/|_| \_\_|
+ .\" *
+-.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al.
++.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al.
+ .\" *
+ .\" * This software is licensed as described in the file COPYING, which
+ .\" * you should have received as part of this distribution. The terms
+@@ -77,6 +77,16 @@ the headers. They may be private or otherwise sensitive to 
leak.
+ 
+ Use \fICURLOPT_HEADEROPT(3)\fP to make the headers only get sent to where you
+ intend them to get sent.
++
++Custom headers are sent in all requests done by the easy handles, which
++implies that if you tell libcurl to follow redirects
++(\fBCURLOPT_FOLLOWLOCATION(3)\fP), the same set of custom headers will be sent
++in the subsequent request. Redirects can of course go to other hosts and thus
++those servers will get all the contents of your custom headers too.
++
++Starting in 7.58.0, libcurl will specifically prevent "Authorization:" headers
++from being 

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

2018-01-25 Thread Stephan Bergmann
 i18npool/source/indexentry/indexentrysupplier_default.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ad9d70e73394b1d0d2c1e1e4584c8bc6f3a5d8b3
Author: Stephan Bergmann 
Date:   Thu Jan 25 11:31:45 2018 +0100

Fix Index::getIndexWeight for empty input

...which triggers the assertion `index >= 0 && 
static_cast(index) <
static_cast(getLength())' in rtl::OUString::operator[] at
include/rtl/ustring.hxx:669 (see below for a reproducer).

I am not sure whether the case of `startPos == rIndexEntry.getLength()` 
should
really go into the following for loop inspecting `tables`, with a somewhat
random `code` of U+ (or some other value even?), or should rather be 
handled
explicitly in some other way.

Reproducer in an empty Writer document: "Insert - Table of Contents and 
Index -
Bibliography Entry...": "Insert Bibliography Entry" dialog: "ARJ00", 
"Insert",
"AVV00", "Insert", "Close"; "Insert - Table of Contents and Index - Table of
Contents, Index or Bibliography...": "Table of Contents, Index or 
Bibliography"
dialog: "Type - Type and Title - Type: Bibliography", "Entries - Sort by -
Content", "Entries - Sort Keys - 1: Address", "OK": assert fires

Change-Id: I2c9fad2c37bfa7a3509c197e678311fb45cb991a
Reviewed-on: https://gerrit.libreoffice.org/48564
Tested-by: Jenkins 
Reviewed-by: Eike Rathke 

diff --git a/i18npool/source/indexentry/indexentrysupplier_default.cxx 
b/i18npool/source/indexentry/indexentrysupplier_default.cxx
index 40e06987fbb0..85533ae37e4c 100644
--- a/i18npool/source/indexentry/indexentrysupplier_default.cxx
+++ b/i18npool/source/indexentry/indexentrysupplier_default.cxx
@@ -138,7 +138,7 @@ sal_Int16 Index::getIndexWeight(const OUString& rIndexEntry)
 return mkeys[i];
 }
 }
-sal_Unicode code = rIndexEntry[startPos];
+sal_Unicode code = startPos < rIndexEntry.getLength() ? 
rIndexEntry[startPos] : 0;
 for (sal_Int16 i = 0; i < table_count; i++) {
 if (tables[i].start <= code && code <= tables[i].end)
 return tables[i].table[code-tables[i].start];
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - ios/LibreOfficeLight

2018-01-25 Thread jan Iversen
 ios/LibreOfficeLight/LibreOfficeLight.xcodeproj/project.pbxproj
|   36 --
 ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/intro.imageset/intro.png 
|binary
 2 files changed, 36 deletions(-)

New commits:
commit e27398165237a9137b926e0743dabf7a81066839
Author: jan Iversen 
Date:   Thu Jan 25 18:57:30 2018 +0100

iOS, update intro screen

Update to intro.png used for version 6

Change-Id: Ieeb71854eb98eb3f1be815ea15fecce424a5eba9

diff --git 
a/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/intro.imageset/intro.png
 
b/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/intro.imageset/intro.png
index 8c1025f6d84c..d27f8858dc6c 100644
Binary files 
a/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/intro.imageset/intro.png
 and 
b/ios/LibreOfficeLight/LibreOfficeLight/Assets.xcassets/intro.imageset/intro.png
 differ
commit 121d3213e04c4e8be7de36ceeef2a4e545ad314c
Author: jan Iversen 
Date:   Thu Jan 25 18:47:16 2018 +0100

iOS, removed unused libraries

libz, libiconv etc are now hidden in loKit.dylib

Change-Id: I64e7be0c3ad2087f8c13bcc99d693087e4c6732b

diff --git a/ios/LibreOfficeLight/LibreOfficeLight.xcodeproj/project.pbxproj 
b/ios/LibreOfficeLight/LibreOfficeLight.xcodeproj/project.pbxproj
index 4897f40a1641..856d8b353bfb 100644
--- a/ios/LibreOfficeLight/LibreOfficeLight.xcodeproj/project.pbxproj
+++ b/ios/LibreOfficeLight/LibreOfficeLight.xcodeproj/project.pbxproj
@@ -13,9 +13,6 @@
39022C211EDC2D0800100066 /* icudt60l.dat in Resources */ = {isa 
= PBXBuildFile; fileRef = 39022C201EDC2D0800100066 /* icudt60l.dat */; };
39284DB31FA5F207006F43E4 /* DocumentActions.swift in Sources */ 
= {isa = PBXBuildFile; fileRef = 39284DB21FA5F207006F43E4 /* 
DocumentActions.swift */; };
392ED9B31E5E4B03005C8435 /* ViewPrintManager.swift in Sources 
*/ = {isa = PBXBuildFile; fileRef = 392ED9B21E5E4B03005C8435 /* 
ViewPrintManager.swift */; };
-   393975781F8BECB0002DC80B /* libiconv.tbd in Frameworks */ = 
{isa = PBXBuildFile; fileRef = 393975771F8BECB0002DC80B /* libiconv.tbd */; };
-   3939757A1F8BECC1002DC80B /* libz.tbd in Frameworks */ = {isa = 
PBXBuildFile; fileRef = 393975791F8BECC1002DC80B /* libz.tbd */; };
-   39503A751F94D44900F19C78 /* libc++.tbd in Frameworks */ = {isa 
= PBXBuildFile; fileRef = 39503A741F94D44900F19C78 /* libc++.tbd */; };
396C833F1FC9D89E008E662A /* libKit.dylib in Frameworks */ = 
{isa = PBXBuildFile; fileRef = 396C833E1FC9D89D008E662A /* libKit.dylib */; };
396F92F71E7AE62400A28C82 /* Settings.bundle in Resources */ = 
{isa = PBXBuildFile; fileRef = 396F92F61E7AE62400A28C82 /* Settings.bundle */; 
};
397868D61E59A3EA007F9248 /* LaunchScreen.xib in Resources */ = 
{isa = PBXBuildFile; fileRef = 397868D81E59A3EA007F9248 /* LaunchScreen.xib */; 
};
@@ -54,16 +51,11 @@
39022C201EDC2D0800100066 /* icudt60l.dat */ = {isa = 
PBXFileReference; lastKnownFileType = file; name = icudt60l.dat; path = 
../generated/resources/icudt60l.dat; sourceTree = ""; };
39284DB21FA5F207006F43E4 /* DocumentActions.swift */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.swift; path = 
DocumentActions.swift; sourceTree = ""; };
392ED9B21E5E4B03005C8435 /* ViewPrintManager.swift */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name 
= ViewPrintManager.swift; path = LibreOfficeLight/ViewPrintManager.swift; 
sourceTree = SOURCE_ROOT; };
-   393975771F8BECB0002DC80B /* libiconv.tbd */ = {isa = 
PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; 
name = libiconv.tbd; path = usr/lib/libiconv.tbd; sourceTree = SDKROOT; };
-   393975791F8BECC1002DC80B /* libz.tbd */ = {isa = 
PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; 
name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; };
39503A6F1F94C4AC00F19C78 /* lokit-Bridging-Header.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
"lokit-Bridging-Header.h"; sourceTree = ""; };
-   39503A741F94D44900F19C78 /* libc++.tbd */ = {isa = 
PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; 
name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; };
396C833E1FC9D89D008E662A /* libKit.dylib */ = {isa = 
PBXFileReference; lastKnownFileType = archive.ar; name = libKit.dylib; path = 
../generated/simulator/libKit.dylib; sourceTree = ""; };
396F92F61E7AE62400A28C82 /* Settings.bundle */ = {isa = 
PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = 
Settings.bundle; sourceTree = ""; };
397275391E77D9F1006ACDCC /* LibreOfficeLight.entitlements */ = 
{isa = PBXFileReference; lastKnownFileType = text.plist.enti

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

2018-01-25 Thread Aron Budea
 sw/source/uibase/dbui/dbmgr.cxx |   21 ++---
 1 file changed, 14 insertions(+), 7 deletions(-)

New commits:
commit b4cef1fb91c7b5024c4e370b0c57a1d4c463a476
Author: Aron Budea 
Date:   Mon Jan 22 03:00:28 2018 +0100

tdf115103: find data source if sDataSource/sCommand are empty

In several functions data source was only found if sDataSource and
sCommand corresponded to what was set in fields.
In imported DOC(X) files these aren't set.

Now use the data source even if field's sDataSource/sCommand are
empty (similarly to SwDBManager::IsDataSourceOpen(...)).

Reviewed-on: https://gerrit.libreoffice.org/48285
Tested-by: Jenkins 
Reviewed-by: Aron Budea 
(cherry picked from commit 6feeb77552c38e3d9819611e9678470a44c00c84)

Change-Id: I9563cb56e700e7fd033100cb200f41f074669020
Reviewed-on: https://gerrit.libreoffice.org/48614
Reviewed-by: Aron Budea 
Tested-by: Aron Budea 

diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index ac44e0b8bcc0..a404a206be21 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -1707,7 +1707,8 @@ sal_uLong SwDBManager::GetColumnFormat( const OUString& 
rDBName,
 uno::Reference< sdbcx::XColumnsSupplier> xColsSupp;
 bool bDisposeConnection = false;
 if(pImpl->pMergeData &&
-pImpl->pMergeData->sDataSource.equals(rDBName) && 
pImpl->pMergeData->sCommand.equals(rTableName))
+((pImpl->pMergeData->sDataSource == rDBName && 
pImpl->pMergeData->sCommand == rTableName) ||
+(rDBName.isEmpty() && rTableName.isEmpty(
 {
 xConnection = pImpl->pMergeData->xConnection;
 xSource = SwDBManager::getDataSourceAsParent(xConnection,rDBName);
@@ -2415,11 +2416,15 @@ sal_uInt32  SwDBManager::GetSelectedRecordId(
 {
 sal_uInt32 nRet = 0x;
 //check for merge data source first
-if(pImpl->pMergeData && rDataSource == pImpl->pMergeData->sDataSource &&
-rTableOrQuery == pImpl->pMergeData->sCommand &&
-(nCommandType == -1 || nCommandType == 
pImpl->pMergeData->nCommandType) &&
-pImpl->pMergeData->xResultSet.is())
+if(pImpl->pMergeData &&
+((rDataSource == pImpl->pMergeData->sDataSource &&
+rTableOrQuery == pImpl->pMergeData->sCommand) ||
+(rDataSource.isEmpty() && rTableOrQuery.isEmpty())) &&
+(nCommandType == -1 || nCommandType == 
pImpl->pMergeData->nCommandType) &&
+pImpl->pMergeData->xResultSet.is())
+{
 nRet = GetSelectedRecordId();
+}
 else
 {
 SwDBData aData;
@@ -2475,8 +2480,10 @@ voidSwDBManager::CloseAll(bool bIncludingMerge)
 SwDSParam* SwDBManager::FindDSData(const SwDBData& rData, bool bCreate)
 {
 //prefer merge data if available
-if(pImpl->pMergeData && rData.sDataSource == 
pImpl->pMergeData->sDataSource &&
-rData.sCommand == pImpl->pMergeData->sCommand &&
+if(pImpl->pMergeData &&
+((rData.sDataSource == pImpl->pMergeData->sDataSource &&
+rData.sCommand == pImpl->pMergeData->sCommand) ||
+(rData.sDataSource.isEmpty() && rData.sCommand.isEmpty())) &&
 (rData.nCommandType == -1 || rData.nCommandType == 
pImpl->pMergeData->nCommandType ||
 (bCreate && pImpl->pMergeData->nCommandType == -1)))
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-25 Thread Mike Kaganski
 sw/qa/extras/uiwriter/uiwriter.cxx |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 61651849676ef1377f2e51675379bb4b7444557b
Author: Mike Kaganski 
Date:   Fri Jan 19 10:14:07 2018 +0100

Don't create database files in $HOME

Regression from commit 46b3202bf883618f1585850191c19776861013ed

Change-Id: If8e0b309274ea14e996e0dde2d1ee9b49ff0f737
Reviewed-on: https://gerrit.libreoffice.org/48173
Tested-by: Jenkins 
Reviewed-by: Mike Kaganski 
Reviewed-on: https://gerrit.libreoffice.org/48477
Reviewed-by: Aron Budea 
Tested-by: Aron Budea 

diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx 
b/sw/qa/extras/uiwriter/uiwriter.cxx
index 5c96aacf7a1e..95206bf7944d 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -4649,13 +4649,16 @@ void SwUiWriterTest::testTdf115013()
 {
const OUString sColumnName("Name with spaces, \"quotes\" and 
\\backslashes");
 
+   utl::TempFile aTempDir(nullptr, true);
+   const OUString aWorkDir = aTempDir.GetURL();
+
//create new writer document
 SwDoc* pDoc = createDoc();
 
 {
 // Load and register data source
 const OUString 
aDataSourceURI(m_directories.getURLFromSrc(DATA_DIRECTORY) + "datasource.ods");
-OUString sDataSource = 
SwDBManager::LoadAndRegisterDataSource(aDataSourceURI, nullptr, nullptr, 
nullptr);
+OUString sDataSource = 
SwDBManager::LoadAndRegisterDataSource(aDataSourceURI, nullptr, &aWorkDir);
 CPPUNIT_ASSERT(!sDataSource.isEmpty());
 
 // Insert a new field type for the mailmerge field
@@ -4689,6 +4692,8 @@ void SwUiWriterTest::testTdf115013()
 OUString sColumn = 
static_cast(pField->GetTyp())->GetColumnName();
 // The column name must come correct after round trip
 CPPUNIT_ASSERT_EQUAL(sColumnName, sColumn);
+
+utl::removeTree(aWorkDir);
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(SwUiWriterTest);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-25 Thread Jim Raykowski
 sc/source/ui/view/formatsh.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 7416c2ea6c25ec1ff60ce1055b79b216cd501140
Author: Jim Raykowski 
Date:   Mon Dec 18 15:03:02 2017 -0900

tdf#114519 Update cell content on sidebar number format change

In Calc, when the cursor is flashing in a cell (input mode) and the
sidebar Number Format panel 'Select a category of contents' drop down
selection is changed the cell contents does not update on selection
change.

This patch ends cell input mode on 'Select a category of contents' drop
down change allowing cell to be updated to the selected number format.

Change-Id: Ia1f46499ada2cfbcc82bd5babb6cf56ae0d6259c
Reviewed-on: https://gerrit.libreoffice.org/46883
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 

diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index 1e84cd3f7942..94961fa1c4aa 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -1004,6 +1004,7 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq )
 {
 switch ( nSlot )
 {
+case SID_NUMBER_TYPE_FORMAT:
 case SID_NUMBER_TWODEC:
 case SID_NUMBER_SCIENTIFIC:
 case SID_NUMBER_DATE:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/test qadevOOo/Jar_OOoRunner.mk qadevOOo/objdsc qadevOOo/tests sc/qa test/Library_subsequenttest.mk test/source

2018-01-25 Thread Jens Carl
 include/test/cppunitasserthelper.hxx  |   36 ++
 include/test/sheet/sheetcell.hxx  |   34 ++
 qadevOOo/Jar_OOoRunner.mk |1 
 qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellObj.csv |8 
 qadevOOo/tests/java/ifc/sheet/_SheetCell.java |   29 -
 sc/qa/extras/sccellobj.cxx|9 
 test/Library_subsequenttest.mk|1 
 test/source/sheet/sheetcell.cxx   |  216 ++
 8 files changed, 294 insertions(+), 40 deletions(-)

New commits:
commit 35f6b6f6b9693e098b8407c3c35e74087d59ed8e
Author: Jens Carl 
Date:   Tue Jan 23 18:53:00 2018 +

tdf#45904 Move _SheetCell Java tests to C++

Change-Id: I5d698303a901ee103fdd4ffdea34809142afa0e5
Reviewed-on: https://gerrit.libreoffice.org/48463
Tested-by: Jenkins 
Reviewed-by: Jens Carl 

diff --git a/include/test/cppunitasserthelper.hxx 
b/include/test/cppunitasserthelper.hxx
index 4f4f920dd9fc..b6703e255ce0 100644
--- a/include/test/cppunitasserthelper.hxx
+++ b/include/test/cppunitasserthelper.hxx
@@ -12,6 +12,8 @@
 
 #include 
 
+#include 
+#include 
 #include 
 #include 
 
@@ -19,6 +21,40 @@
 
 CPPUNIT_NS_BEGIN
 
+/** @brief Trait used by CPPUNIT_ASSERT* macros to compare 
com::sun::star:awt::Point.
+ *
+ * This specialization from @c struct @c assertion_traits<> helps to compare
+ * @see com::sun::star::awt::Point.
+ */
+template <> struct assertion_traits
+{
+static bool equal(const css::awt::Point& x, const css::awt::Point& y) { 
return x == y; }
+
+static std::string toString(const css::awt::Point& x)
+{
+OStringStream ost;
+ost << "Point: " << x.X << "." << x.Y << " (coordinate: X.Y)";
+return ost.str();
+}
+};
+
+/** @brief Trait used by CPPUNIT_ASSERT* macros to compare 
com::sun::star:awt::Size.
+ *
+ * This specialization from @c struct @c assertion_traits<> helps to compare
+ * @see com::sun::star::awt::Size.
+ */
+template <> struct assertion_traits
+{
+static bool equal(const css::awt::Size& x, const css::awt::Size& y) { 
return x == y; }
+
+static std::string toString(const css::awt::Size& x)
+{
+OStringStream ost;
+ost << "Size: " << x.Width << " x " << x.Height << " (Width x Height)";
+return ost.str();
+}
+};
+
 /** @brief Trait used by CPPUNIT_ASSERT* macros to compare 
com::sun::star::table::CellAddress.
  *
  * This specialization from @c struct @c assertion_traits<> helps to compare
diff --git a/include/test/sheet/sheetcell.hxx b/include/test/sheet/sheetcell.hxx
new file mode 100644
index ..a5d35cee1a05
--- /dev/null
+++ b/include/test/sheet/sheetcell.hxx
@@ -0,0 +1,34 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_TEST_SHEET_SHEETCELL_HXX
+#define INCLUDED_TEST_SHEET_SHEETCELL_HXX
+
+#include 
+#include 
+
+#include 
+
+namespace apitest
+{
+class OOO_DLLPUBLIC_TEST SheetCell
+{
+public:
+virtual css::uno::Reference init() = 0;
+
+void testSheetCellProperties();
+
+protected:
+~SheetCell() {}
+};
+}
+
+#endif // INCLUDED_TEST_SHEET_SHEETCELL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/qadevOOo/Jar_OOoRunner.mk b/qadevOOo/Jar_OOoRunner.mk
index 72f64db9f389..ac4ae33a1f08 100644
--- a/qadevOOo/Jar_OOoRunner.mk
+++ b/qadevOOo/Jar_OOoRunner.mk
@@ -565,7 +565,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\
 qadevOOo/tests/java/ifc/sdb/_XSQLErrorBroadcaster \
 qadevOOo/tests/java/ifc/sheet/_FunctionDescription \
 qadevOOo/tests/java/ifc/sheet/_Shape \
-qadevOOo/tests/java/ifc/sheet/_SheetCell \
 qadevOOo/tests/java/ifc/sheet/_SheetCellRange \
 qadevOOo/tests/java/ifc/sheet/_SheetCellRanges \
 qadevOOo/tests/java/ifc/sheet/_SheetFilterDescriptor \
diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellObj.csv 
b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellObj.csv
index a844cd884d23..a217fac5191b 100644
--- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellObj.csv
+++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellObj.csv
@@ -139,14 +139,6 @@
 "ScCellObj";"com::sun::star::text::XTextRange";"getEnd()"
 "ScCellObj";"com::sun::star::text::XTextRange";"getString()"
 "ScCellObj";"com::sun::star::text::XTextRange";"setString()"
-"ScCellObj";"com::sun::star::sheet::SheetCell";"Position"
-"ScCellObj";"com::sun::star::sheet::SheetCell";"Size"
-"ScCellObj";"com::sun::star::sheet::SheetCell";"FormulaLocal#optional"
-"ScCellObj";"com::sun::star::sheet::SheetCell";"FormulaResultType"
-"ScCellObj";"c

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

2018-01-25 Thread Kshitij Pathania
 sw/uiconfig/swriter/ui/tocdialog.ui |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 36686e2aae19651e3b2128f255537ed68d92fd06
Author: Kshitij Pathania 
Date:   Thu Jan 25 00:37:49 2018 +0530

tdf#89605 Now preview appear on right

Change-Id: I51a98eb94e47c94fdb95702c4dc3fd7173d8fb58
Reviewed-on: https://gerrit.libreoffice.org/48536
Tested-by: Jenkins 
Reviewed-by: Heiko Tietze 
Tested-by: Heiko Tietze 

diff --git a/sw/uiconfig/swriter/ui/tocdialog.ui 
b/sw/uiconfig/swriter/ui/tocdialog.ui
index 118fe0c19968..2a7a7a3e2bf6 100644
--- a/sw/uiconfig/swriter/ui/tocdialog.ui
+++ b/sw/uiconfig/swriter/ui/tocdialog.ui
@@ -123,7 +123,7 @@
   
 False
 True
-0
+2
   
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - ios/CustomTarget_iOS_link.mk ios/CustomTarget_iOS_prelink.mk ios/CustomTarget_iOS_setup.mk ios/Module_ios.mk ios/StaticLibrary_iOSkit.mk

2018-01-25 Thread jan Iversen
 ios/CustomTarget_iOS_link.mk  |   71 +-
 ios/CustomTarget_iOS_setup.mk |   55 ++--
 ios/Module_ios.mk |5 +-
 ios/StaticLibrary_iOSkit.mk   |   28 
 4 files changed, 64 insertions(+), 95 deletions(-)

New commits:
commit bf0117cce987dd92f6e658de0e186a282677b17f
Author: jan Iversen 
Date:   Thu Jan 25 15:14:36 2018 +0100

iOS, simplified dylib build

Change-Id: Icea9a5e4796dda288fafcd478a769fa7087baab2

diff --git a/ios/CustomTarget_iOS_prelink.mk b/ios/CustomTarget_iOS_link.mk
similarity index 52%
rename from ios/CustomTarget_iOS_prelink.mk
rename to ios/CustomTarget_iOS_link.mk
index 0534264d416c..ab5ad721d8d7 100644
--- a/ios/CustomTarget_iOS_prelink.mk
+++ b/ios/CustomTarget_iOS_link.mk
@@ -5,60 +5,50 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+
 #- Env 
-IOSLIB = ''
-IOSLD = 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
-IOSCLANG = 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
-IOSOBJ = $(WORKDIR)/CObject/ios/Kit.o
+IOSGEN   = $(SRCDIR)/ios/generated
+IOSLIBS := $(shell \
+(export INSTDIR=$(INSTDIR);export OS=$(OS); \
+ export WORKDIR=$(WORKDIR);export LIBO_LIB_FOLDER=$(LIBO_LIB_FOLDER); \
+ $(SRCDIR)/bin/lo-all-static-libs))
+IOSOBJ = $(WORKDIR)/ios/Kit.o
+IOSSRC = $(SRCDIR)/ios/source/LibreOfficeKit.c
 
 ifeq ($(ENABLE_DEBUG),TRUE)
 ifeq ($(CPUNAME),X86_64)
-IOSKIT = $(IOSGEN)/simulator/libKit
+IOSKIT = $(IOSGEN)/simulator/libKit.dylib
 else
-IOSKIT = $(IOSGEN)/debug/libKit
+IOSKIT = $(IOSGEN)/debug/libKit.dylib
 endif
 else
 ifeq ($(CPUNAME),ARM64)
-IOSKIT = $(IOSGEN)/release/libKit
+IOSKIT = $(IOSGEN)/release/libKit.dylib
 endif
 endif
 
 
 
 #- Top level  -
-$(eval $(call gb_CustomTarget_CustomTarget,ios/iOS_prelink))
-
-$(call gb_CustomTarget_get_target,ios/iOS_prelink): $(IOSKIT).dylib
+$(eval $(call gb_CustomTarget_CustomTarget,ios/iOS_link))
 
+$(call gb_CustomTarget_get_target,ios/iOS_link): $(IOSKIT)
 
 
 #- build  -
-.PHONY: FORCE
-FORCE:
-
-
-IOSPREBUILD: FORCE
-   $(eval IOSLIBS = `$(SRCDIR)/bin/lo-all-static-libs`)
-
-
-
-$(IOSKIT).a: IOSPREBUILD $(WORKDIR)/ios $(call 
gb_StaticLibrary_get_target,iOS_kitBridge) \
-   $(IOSLIBS)
-   $(call gb_Output_announce,iOS prelink object,$(true),LNK,2)
-   $(IOSLD) -r -ios_version_min $(IOS_DEPLOYMENT_VERSION) \
-   -syslibroot $(MACOSX_SDK_PATH) \
-   -arch `echo $(CPUNAME) |  tr '[:upper:]' '[:lower:]'` \
-   -o $(IOSOBJ) \
-   $(WORKDIR)/CObject/ios/source/LibreOfficeKit.o \
-   $(IOSLIBS)
-   $(AR) -r $(IOSKIT).a $(IOSOBJ)
-
-
-$(IOSKIT).dylib: $(IOSKIT).a
+$(IOSOBJ): $(IOSSRC) $(call gb_CustomTarget_get_target,ios/iOS_setup)
+   $(call gb_Output_announce,iOS compile interface,$(true),C,2)
+   $(gb_CC) $(gb_COMPILERDEFS) $(gb_OSDEFS) $(gb_CFLAGS) \
+   -DDISABLE_DYNLOADING -DLIBO_INTERNAL_ONLY \
+   -fvisibility=hidden -Werror -O0 -fstrict-overflow \
+   $(if $(ENABLE_DEBUG),$(gb_DEBUG_CFLAGS) -g) \
+   -c $(IOSSRC) -o $(IOSOBJ) \
+   -I$(SRCDIR)/include -I$(BUILDDIR)/config_host \
+
+$(IOSKIT): $(IOSOBJ) $(IOSLIBS)
$(call gb_Output_announce,iOS dylib,$(true),LNK,2)
-   $(IOSCLANG) -dynamiclib 
-mios-simulator-version-min=$(IOS_DEPLOYMENT_VERSION) \
-   -arch `echo $(CPUNAME) |  tr '[:upper:]' '[:lower:]'` \
-   -isysroot $(MACOSX_SDK_PATH) \
+   $(gb_CC) -dynamiclib \
-Xlinker -rpath -Xlinker @executable_path/Frameworks \
-Xlinker -rpath -Xlinker @loader_path/Frameworks \
-dead_strip \
@@ -76,22 +66,21 @@ $(IOSKIT).dylib: $(IOSKIT).a
-single_module \
-compatibility_version 1 \
-current_version 1 \
+   $(IOSLIBS) \
$(IOSOBJ) \
-   -o $(IOSKIT).dylib
+   -o $(IOSKIT)
 ifeq ($(origin IOS_CODEID),undefined)
@echo "please define environment variable IOS_CODEID as\n" \
  "export IOS_CODEID="
@exit -1
 else
-   codesign -s "$(IOS_CODEID)" $(IOSKIT).dylib
+   codesign -s "$(IOS_CODEID)" $(IOSKIT)
 endif
 
 
-
-
 #- clean ios  -
-$(call gb_CustomTarget_get_clean_target,ios/iOS_prelink):
-   rm -f $(IOSKIT).a $(IOSKIT).dylib
+$(call gb_CustomTarget_get_clean_target,ios/iOS_link):
+   rm -f $(IOSKIT).dylib
 
 
 
diff --git a/ios/Module_ios.mk b/ios/Module_ios.mk
index c280713cc198..111391b31bee 10

[Libreoffice-commits] core.git: Branch 'private/swe/libreoffice-5-2+backports' - .gitreview

2018-01-25 Thread Milian Wolff
 .gitreview |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 968063794fd55fa584b26206a994c2d29c8d3e54
Author: Milian Wolff 
Date:   Thu Jan 25 14:29:29 2018 +0100

Update default branch in .gitreview

Change-Id: I32348fa4775cd430edf487d5866b6c50782b99e7
Reviewed-on: https://gerrit.libreoffice.org/48593
Reviewed-by: Samuel Mehrbrodt 
Tested-by: Samuel Mehrbrodt 

diff --git a/.gitreview b/.gitreview
index 13446a7f6d4b..5cbcb2da323f 100644
--- a/.gitreview
+++ b/.gitreview
@@ -3,5 +3,5 @@ host=logerrit
 port=29418
 project=core
 defaultremote=logerrit
-defaultbranch=libreoffice-5-2
+defaultbranch=private/swe/libreoffice-5-2+backports
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Implementing accessibility non-regression check tool

2018-01-25 Thread Miklos Vajna
Hi Samuel,

On Thu, Jan 25, 2018 at 05:07:44PM +0100, Samuel Thibault 
 wrote:
> Is there a particular codestyle that we should follow?  I didn't find
> particular codestyle in various python script in LO, probably because
> the python syntax already imposes quite a lot, and thus enough to get
> homoegenous code?

If you grep in commit messages, the pep8 tool is mentioned several
times. So if you want to follow some style guide for Python, that would
be it.

Regards,

Miklos


signature.asc
Description: Digital signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2018-01-25 Thread Pranav Kant
 fpicker/source/office/iodlg.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 6aaa4693ab7665d6239ed57c221ea92c5554398d
Author: Pranav Kant 
Date:   Thu Jan 25 16:25:25 2018 +0530

fpicker: Respect the PrepareExecute() result

Change-Id: I351eaa76da01656638de5f04eb376e5b16102b4a

diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index d40f93214411..f497ba451f1c 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -1683,7 +1683,8 @@ short SvtFileDialog::Execute()
 
 void SvtFileDialog::StartExecuteModal( const Link& rEndDialogHdl 
)
 {
-PrepareExecute();
+if (!PrepareExecute())
+return;
 
 // start of the dialog
 ModalDialog::StartExecuteModal( rEndDialogHdl );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-25 Thread Pranav Kant
 fpicker/source/office/iodlg.cxx |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 3015b3b62edb098e65501b0516135d92e2f6410b
Author: Pranav Kant 
Date:   Thu Jan 25 15:52:52 2018 +0530

lokdialog: Disable filepicker for LOK

We don't want people to browser their jails in the filepicker dialog.

Change-Id: I2fdd3d948cc1f193098492d1a310424ac2d49317
(cherry picked from commit 9711a8a35796d0d4ab4b69204bd4484686bf0707)
Reviewed-on: https://gerrit.libreoffice.org/48562
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index 1aefa0b81acc..9e4851e6a5fb 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -68,6 +68,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 
@@ -1692,7 +1693,8 @@ short SvtFileDialog::Execute()
 
 void SvtFileDialog::StartExecuteModal( const Link& rEndDialogHdl 
)
 {
-PrepareExecute();
+if (!PrepareExecute())
+return;
 
 // start of the dialog
 ModalDialog::StartExecuteModal( rEndDialogHdl );
@@ -1807,6 +1809,9 @@ void SvtFileDialog::EnableControl( Control* _pControl, 
bool _bEnable )
 
 short SvtFileDialog::PrepareExecute()
 {
+if (comphelper::LibreOfficeKit::isActive())
+return 0;
+
 OUString aEnvValue;
 if ( getEnvironmentValue( "WorkDirMustContainRemovableMedia", aEnvValue ) 
&& aEnvValue == "1" )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-25 Thread Pranav Kant
 sfx2/source/dialog/basedlgs.cxx |7 ---
 1 file changed, 7 deletions(-)

New commits:
commit cc9ca93c52e40557ed918868e235d393f9ecde6e
Author: Pranav Kant 
Date:   Thu Jan 25 19:27:41 2018 +0530

lokdialog: No need to notify 'close' callback here

This is now handled in Dialog::dispose

Change-Id: If6703dbf1fa02c3d83debcc17eba3c6b1ee49a1c
Reviewed-on: https://gerrit.libreoffice.org/48622
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index 94b4225ddf7f..f09d4a26fd87 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -206,13 +206,6 @@ void SfxModalDialog::StateChanged( StateChangedType nType )
 aItems.emplace_back("title", GetText().toUtf8());
 SfxViewShell::Current()->notifyWindow(GetLOKWindowId(), "created", 
aItems);
 }
-else if (nType == StateChangedType::Visible &&
- !IsVisible() &&
- GetLOKNotifier())
-{
-SfxViewShell::Current()->notifyWindow(GetLOKWindowId(), "close");
-ReleaseLOKNotifier();
-}
 }
 
 ModalDialog::StateChanged(nType);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3-0' - loleaflet/src

2018-01-25 Thread Pranav Kant
 loleaflet/src/control/Control.LokDialog.js |8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit de8974a8161f5acdcf08ddbf7bde55541b6d4bfb
Author: Pranav Kant 
Date:   Thu Jan 25 21:12:15 2018 +0530

loleaflet: Ignore callbacks without an active dialog

Change-Id: Ie828309b8a3d9201f5e7071884ec7cadf2cacb21
Reviewed-on: https://gerrit.libreoffice.org/48621
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/loleaflet/src/control/Control.LokDialog.js 
b/loleaflet/src/control/Control.LokDialog.js
index eac2baf0..06d6a527 100644
--- a/loleaflet/src/control/Control.LokDialog.js
+++ b/loleaflet/src/control/Control.LokDialog.js
@@ -111,7 +111,13 @@ L.Control.LokDialog = L.Control.extend({
this._createDialogChild(e.id, parentId, top, 
left);
this._sendPaintWindow(e.id, 
this._createRectStr(null, 0, 0, width, height));
}
-   } else if (e.action === 'invalidate') {
+   }
+
+   // all other callbacks doens't make sense without an active 
dialog
+   if (!(this._isOpen(e.id) || this._getParentDialog(e.id)))
+   return;
+
+   if (e.action === 'invalidate') {
var parent = this._getParentDialog(e.id);
var rectangle = e.rectangle;
if (parent) { // this is a floating window
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3-0' - loleaflet/src

2018-01-25 Thread Pranav Kant
 loleaflet/src/control/Control.LokDialog.js |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 3e4a78ccc3410b16fe6b34eea23720f551f53383
Author: Pranav Kant 
Date:   Thu Jan 25 20:02:32 2018 +0530

loleaflet: Don't try to paint if floating window has vanished

Change-Id: I9284c7ec73f6f0e900d3efa2d055eb8b7d5303b2
Reviewed-on: https://gerrit.libreoffice.org/48620
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/loleaflet/src/control/Control.LokDialog.js 
b/loleaflet/src/control/Control.LokDialog.js
index 95cb64d8..eac2baf0 100644
--- a/loleaflet/src/control/Control.LokDialog.js
+++ b/loleaflet/src/control/Control.LokDialog.js
@@ -297,7 +297,10 @@ L.Control.LokDialog = L.Control.extend({
_paintDialogChild: function(dialogId, width, height, rectangle, 
imgData) {
var strDlgId = this._toDlgPrefix(dialogId);
var img = new Image();
-   var canvas = document.getElementById(strDlgId + '-floating');
+   var canvas = L.DomUtil.get(strDlgId + '-floating');
+   if (!canvas)
+   return; // no floating window to paint to
+
canvas.width = width;
canvas.height = height;
var ctx = canvas.getContext('2d');
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Implementing accessibility non-regression check tool

2018-01-25 Thread Samuel Thibault
Hello,

Caolán McNamara, on jeu. 25 janv. 2018 15:31:34 +, wrote:
> FWIW, there is a little script in LibreOffice as bin/lint-ui.py which
> checks for various things. It doesn't do the above, but it does at
> least demo some simple .ui parsing.

Thanks!

Is there a particular codestyle that we should follow?  I didn't find
particular codestyle in various python script in LO, probably because
the python syntax already imposes quite a lot, and thus enough to get
homoegenous code?

> > One of the remaining questions we have (it's not blocking for our
> > immediate development, though) is whether this tool should be
> > integrated within libreoffice, or within glade. The latter would both
> > allow more widespread use of the tool by other projects, and make the
> > maintenance happen there, thus less work for LibreOffice :)
> 
> With glade would seem most natural, seeing as we just reuse the
> gtkbuilder file format which gtk uses. But if ends up as a relatively
> simple standalone script perhaps it just needs its own gitlab/github
> toplevel project and LibreOffice can pull it down from there if it
> wants to integrate it into our build

Ok, maybe we can start on our
https://git.hypra.fr/youpi/libreoffice-non-regressions repository for
now and see where to move it for better visibility and contributions
later.

Samuel
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2018-01-25 Thread Caolán McNamara
 filter/source/msfilter/svdfppt.cxx  |5 -
 include/filter/msfilter/svdfppt.hxx |5 ++---
 2 files changed, 2 insertions(+), 8 deletions(-)

New commits:
commit 6d5e2ca07fb0c8686c9e09645933ca0f2f58ab71
Author: Caolán McNamara 
Date:   Thu Jan 25 12:35:36 2018 +

drop GetPageSize no-op function

which used to have some commented out stuff which considered changing
the size, but was all removed ages ago

Change-Id: Iff62a71e9b7d31acb16016b5e72d168327111ce7
Reviewed-on: https://gerrit.libreoffice.org/48583
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/filter/source/msfilter/svdfppt.cxx 
b/filter/source/msfilter/svdfppt.cxx
index b560fa6f7f71..3779ea408e3f 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -248,11 +248,6 @@ SvStream& ReadPptExOleObjAtom( SvStream& rIn, 
PptExOleObjAtom& rAtom )
 return rIn;
 }
 
-const Size& PptDocumentAtom::GetPageSize(const Size& rSiz)
-{
-return rSiz;
-}
-
 SvStream& ReadPptDocumentAtom(SvStream& rIn, PptDocumentAtom& rAtom)
 {
 // Actual format:
diff --git a/include/filter/msfilter/svdfppt.hxx 
b/include/filter/msfilter/svdfppt.hxx
index 689236766fb9..a4b058b581fa 100644
--- a/include/filter/msfilter/svdfppt.hxx
+++ b/include/filter/msfilter/svdfppt.hxx
@@ -195,9 +195,8 @@ struct MSFILTER_DLLPUBLIC PptDocumentAtom
 
 public:
 
-static const Size& GetPageSize( const Size& rSiz );
-SizeGetSlidesPageSize() const { return GetPageSize( 
aSlidesPageSize ); }
-SizeGetNotesPageSize() const { return GetPageSize( aNotesPageSize 
); }
+SizeGetSlidesPageSize() const { return aSlidesPageSize; }
+SizeGetNotesPageSize() const { return aNotesPageSize; }
 
 friend SvStream& ReadPptDocumentAtom( SvStream& rIn, PptDocumentAtom& 
rAtom );
 };
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-25 Thread Stephan Bergmann
 sw/source/core/fields/authfld.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 85dfda49880dcc6676dcda5838da1c7b36215079
Author: Stephan Bergmann 
Date:   Tue Jan 23 17:16:57 2018 +0100

Adapt odd USHRT_MAX/4 limit in FIELD_PROP_PROP_SEQ handler

The code was added with 8ff71b59a7f714835e1faa2781b34b4c5b811a84 "TextField 
and
FieldMaster 'Bibliography' completed", but, according to private 
communication
with Oliver, that specific values was chosen rather randomly.  Still, other
parts of the code assume m_SortKeyArr to be indexed by sal_uInt16, so use
SAL_MAX_UINT16 here to ensure the array is not getting to big causing 
overflow
in those other places.

Change-Id: I18ed75ed7c88b04e174a82194ae7d93a5f7f7c76
Reviewed-on: https://gerrit.libreoffice.org/48443
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/sw/source/core/fields/authfld.cxx 
b/sw/source/core/fields/authfld.cxx
index 907668df8532..35c31ecd529e 100644
--- a/sw/source/core/fields/authfld.cxx
+++ b/sw/source/core/fields/authfld.cxx
@@ -436,7 +436,10 @@ boolSwAuthorityFieldType::PutValue( const Any& rAny, 
sal_uInt16 nWhichId )
 {
 m_SortKeyArr.clear();
 const PropertyValues* pValues = aSeq.getConstArray();
-for(sal_Int32 i = 0; i < aSeq.getLength() && i < USHRT_MAX / 
4; i++)
+//TODO: Limiting to the first SAL_MAX_UINT16 elements of aSeq 
so that size of
+// m_SortKeyArr remains in range of sal_uInt16, as 
GetSortKeyCount and GetSortKey
+// still expect m_SortKeyArr to be indexed by sal_uInt16:
+for(sal_Int32 i = 0; i < aSeq.getLength() && i < 
SAL_MAX_UINT16; i++)
 {
 const PropertyValue* pValue = pValues[i].getConstArray();
 SwTOXSortKey aSortKey;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Implementing accessibility non-regression check tool

2018-01-25 Thread Caolán McNamara
On Thu, 2018-01-18 at 12:36 +0100, Samuel Thibault wrote:
> Hello,
> 
> This is a small mail to briefly present the work we (Hypra) will be
> doing for accessibility in LibreOffice.
> 
> Basically, the idea is to design a tool which will check .ui files
> for accessibility issues: missing relations between widgets and
> labels, notably.

Sounds useful.

FWIW, there is a little script in LibreOffice as bin/lint-ui.py which
checks for various things. It doesn't do the above, but it does at
least demo some simple .ui parsing.

> One of the remaining questions we have (it's not blocking for our
> immediate development, though) is whether this tool should be
> integrated within libreoffice, or within glade. The latter would both
> allow more widespread use of the tool by other projects, and make the
> maintenance happen there, thus less work for LibreOffice :)

With glade would seem most natural, seeing as we just reuse the
gtkbuilder file format which gtk uses. But if ends up as a relatively
simple standalone script perhaps it just needs its own gitlab/github
toplevel project and LibreOffice can pull it down from there if it
wants to integrate it into our build
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


minutes of ESC call ...

2018-01-25 Thread Michael Meeks
* Present:
+ Olivier, Stephan, Eike, Sophie, Samuel T, Heiko, Caolan, Christian,
  Michael M, Miklos, Kendy, Xisco

* Completed Action Items:

* Pending Action Items:
+ come up with a list of retiring committers to mail (Norbert)

* Release Engineering update (Christian)
   + 5.4.5 RC1 – last week of Jan – right before FOSDEM.
+ tag planned Tuesday evening.
   + 6.0 RC3 – due this week
+ tagged & built, up-loaded to pre-release server
+ announce planned last week of Jan.
+ no late features left.
+ all patches are reviewed.
+ everything looks good for a final release next week.
+ please remember to cherry-pick to libreoffice-6-0-0 +2 reviews for
  the final release.
   + Android
+ builds prepared for ARM & Intel
+ looking good → play store as an alpha version
 + hopefully crash-rates will improve a lot.
   + Online
+ some patches needing review, before RC3

* Documentation (Olivier)
   + New Help:
   + More tweaks: index results pagination (buovjaga)
   + now supports all LO languages in page UI (Olivier)
   + pending: building packages for distribution
   + building msi / RPM / DEB
   + poking at scp2 but still WIP
   + can we bootstrap from existing help packs ? (Michael)
   + Updates on traditional help pages (Laurent BP, Adolpho, Olivier)
   + Info: 96 open bugs related to help page

* UX Update (Heiko)
+ Bugzilla (topicUI) statistics
250(250) (topicUI) bugs open, 316(316) (needsUXEval) needs to be 
evaluated by the UXteam
+ Updates:
BZ changes   1 week   1 month   3 months   12 months  
 added  5(4) 13(4) 31(-1) 109(0)  
 commented 60(26)   162(8)480(-34)   2059(-25)
   removed  0(0)  0(0)  2(0)   15(-3) 
  resolved  3(-2)15(-4)51(-3) 223(-4) 
+ top 10 contributors:
  Tietze, Heiko made 72 changes in 1 month, and 944 changes in 1 year
  Thomas Linard made 48 changes in 1 month, and 48 changes in 1 year
  Philips, Yousuf made 36 changes in 1 month, and 797 changes in 1 year
  Xisco Faulí made 29 changes in 1 month, and 413 changes in 1 year
  Cor Nouws made 25 changes in 1 month, and 184 changes in 1 year
  Foote, V Stuart made 25 changes in 1 month, and 327 changes in 1 year
  Thomas Lendo made 24 changes in 1 month, and 424 changes in 1 year
  Telesto made 13 changes in 1 month, and 77 changes in 1 year
  Buovjaga made 13 changes in 1 month, and 218 changes in 1 year
  Kainz, Andreas made 9 changes in 1 month, and 44 changes in 1 year

   + LibO branding present at https://demo.identihub.co/project/libreoffice#/
   + organized by Albanian team (Ura Design)
   + possible issue with Vanilla in Mac app-store
+ https://bugs.documentfoundation.org/show_bug.cgi?id=115206
+ internal file-dialog showing up 
   + thanks to Gülşah Köse for improvements to Calc context
 menus (48067, 47925, 48417)

* Crash Hunting (Caolan)
+ 76(-4) import failure, 4(+0) export failures
+ couple of new export failures fixed.
+ still some calc threading issues pending.
   + Dennis patch this week to work around one type
+ implicit intersection patch pending
+ 7 (-5) coverity
+ pretty stable.
+ 44 fuzzers * 3 sanitizers+engine combos (asan+libfuzzer,
ubsan+libfuzzer, asan+afl), writer html last added
+ html seems to be tailing off finally
+ seems to be dying down here
+ very easy to get OOM with large col/row claims in tables
  + work-around patch in gerrit.
+ calc html and a few more outstanding.
+ most of the work on calc already done too.

* Crash Reporter (Xisco)
+ http://crashreport.libreoffice.org/stats/version/5.3.6.1
+ 734 (last 7 days) (down)
+ http://crashreport.libreoffice.org/stats/version/5.3.7.2
+ 1273 (last 7 days) (-)
+ http://crashreport.libreoffice.org/stats/version/5.4.3.2
  + 1764 (last 7 days) (down)
+ http://crashreport.libreoffice.org/stats/version/5.4.4.2
  + 1359 (last 7 days) (-)

+ Service down on Jan 21, 2018
+ fewer reports than usual – numbers look good.

* GSOC Application (Heiko)
+ finished registration
+ should be ready to submit this week.
+ page on wiki has been updated.
+ next deadline ? (including for ideas)

* Hackfests & Events (Michael)
+ FOSDEM hack-fest / meetings
+ dates confirmed (Monday + Tuesday), book your travel!
+ Hotel: La Grande Cloche over the street.
  + https://wiki.documentfoundation.org/Hackfest/FOSDEM2018
+ Hamburg TNG – 1st new-style hackfest
+ outlined for April 7/8th.
+ https://wiki.documentfoundation.org/Hackfests/HackfestTNG
+ checkout the tender for ment

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

2018-01-25 Thread Miklos Vajna
 include/toolkit/awt/vclxwindow.hxx   |   17 
 svtools/source/control/toolbarmenu.cxx   |2 
 svtools/source/uno/popupwindowcontroller.cxx |3 +
 toolkit/source/controls/unocontrol.cxx   |   55 +++
 4 files changed, 61 insertions(+), 16 deletions(-)

New commits:
commit 250ad9311a613d9b4e1cf5cf5fdaf33d9b326220
Author: Miklos Vajna 
Date:   Thu Jan 25 12:21:12 2018 +0100

tdf#115227 svtools: suppress UNO notifications for color selectors

This is nominally a regression from commit
43bc3031483d172eccd72c3804e2d4fc2ef37de4 (unify color selectors,
2016-10-28), but that just changed the Writer color picker to behave the
same way as the Impress one.

The Impress one started to emit these events with
daeed90f4586eb9533041fb89bee163a5193596c (re-base on ALv2 code.
Includes:, 2012-11-15), to fix i#118707, improving accessibility.

That means either the focus changes and then accessibility is happy or
the focus does not change and then the UNO API client only gets events
when the user actually switches to an other window.

Fix the problem with suppressing UNO-level notifications for the
problematic events, by moving the existing VclListenerLock to a public
header and using it at two more places in svtools.

This should address not just color selectors, but in general other
toolbar menus / popup windows.

Change-Id: If427708c5b9fe4fa49cb8f00ec04b32cb28eb391
Reviewed-on: https://gerrit.libreoffice.org/48570
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins 

diff --git a/include/toolkit/awt/vclxwindow.hxx 
b/include/toolkit/awt/vclxwindow.hxx
index 27be3e102d32..3c925a59143b 100644
--- a/include/toolkit/awt/vclxwindow.hxx
+++ b/include/toolkit/awt/vclxwindow.hxx
@@ -233,6 +233,23 @@ public:
 virtual css::uno::Reference< css::awt::XStyleSettings > SAL_CALL 
getStyleSettings() override;
 };
 
+class TOOLKIT_DLLPUBLIC VclListenerLock
+{
+private:
+VCLXWindow* m_pLockWindow;
+
+public:
+explicit VclListenerLock(VCLXWindow* _pLockWindow);
+/**
+ * @param bSystemWindow - if pVclWindow or its first system window parent
+ * is locked.
+ */
+explicit VclListenerLock(vcl::Window* pVclWindow, bool bSystemWindow);
+~VclListenerLock();
+VclListenerLock(const VclListenerLock&) = delete;
+VclListenerLock& operator=(const VclListenerLock&) = delete;
+};
+
 #endif // INCLUDED_TOOLKIT_AWT_VCLXWINDOW_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/source/control/toolbarmenu.cxx 
b/svtools/source/control/toolbarmenu.cxx
index eb0c3dcc9b03..d4b69b1a747b 100644
--- a/svtools/source/control/toolbarmenu.cxx
+++ b/svtools/source/control/toolbarmenu.cxx
@@ -35,6 +35,7 @@
 #include 
 #include 
 #include 
+#include 
 #include "toolbarmenuimp.hxx"
 
 using namespace ::com::sun::star::uno;
@@ -1486,6 +1487,7 @@ bool ToolbarPopup::IsInPopupMode()
 
 void ToolbarPopup::EndPopupMode()
 {
+VclListenerLock aLock(this, /*bSystemWindow=*/true);
 GetDockingManager()->EndPopupMode(this);
 }
 
diff --git a/svtools/source/uno/popupwindowcontroller.cxx 
b/svtools/source/uno/popupwindowcontroller.cxx
index 51f2b6e10f42..19276a45854f 100644
--- a/svtools/source/uno/popupwindowcontroller.cxx
+++ b/svtools/source/uno/popupwindowcontroller.cxx
@@ -19,6 +19,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -213,6 +214,8 @@ Reference< awt::XWindow > SAL_CALL 
PopupWindowController::createPopupWindow()
 
 pWin->EnableDocking();
 mxImpl->SetPopupWindow(pWin,pToolBox);
+
+VclListenerLock aLock(pWin, /*bSystemWindow=*/true);
 vcl::Window::GetDockingManager()->StartPopupMode( pToolBox, pWin, 
eFloatFlags );
 }
 }
diff --git a/toolkit/source/controls/unocontrol.cxx 
b/toolkit/source/controls/unocontrol.cxx
index 6c8435791883..2f41e3f367d4 100644
--- a/toolkit/source/controls/unocontrol.cxx
+++ b/toolkit/source/controls/unocontrol.cxx
@@ -94,27 +94,50 @@ static Sequence< OUString> lcl_ImplGetPropertyNames( const 
Reference< XMultiProp
 return aNames;
 }
 
-
-class VclListenerLock
+namespace
 {
-private:
-VCLXWindow*  m_pLockWindow;
-
-public:
-explicit VclListenerLock( VCLXWindow* _pLockWindow )
-: m_pLockWindow( _pLockWindow )
+VCLXWindow* GetParentSystemWindow(vcl::Window* pWindow)
+{
+while (pWindow)
 {
-if ( m_pLockWindow )
-m_pLockWindow->suspendVclEventListening( );
+if (pWindow->IsSystemWindow())
+break;
+
+pWindow = pWindow->GetParent();
 }
-~VclListenerLock()
+
+uno::Reference xWindow = VCLUnoHelper::GetInterface(pWindow);
+return VCLXWindow::GetImplementation(xWindow);
+}
+}
+
+VclListenerLock::VclListenerLock(VCLXWindow* _pLockWindow)
+: m_pLockWindow(_pLockWindow)
+{
+if (m_pLockWindow)
+m_pLockWindow->suspendVclEventListening();
+}
+
+VclListene

[Libreoffice-commits] core.git: extensions/source stoc/test

2018-01-25 Thread Andrea Gelmini
 extensions/source/scanner/sane.cxx |2 +-
 stoc/test/testregistry.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 19f8a979ff86be39a3938b3d7b25c1431191e708
Author: Andrea Gelmini 
Date:   Thu Jan 25 12:25:21 2018 +0100

Fix typos

Change-Id: I31741b4f42fcc7e58d383e204f3e305b9de1a4c4
Reviewed-on: https://gerrit.libreoffice.org/48248
Reviewed-by: Julien Nabet 
Tested-by: Julien Nabet 

diff --git a/extensions/source/scanner/sane.cxx 
b/extensions/source/scanner/sane.cxx
index caac1ec01707..4bd94f30d83e 100644
--- a/extensions/source/scanner/sane.cxx
+++ b/extensions/source/scanner/sane.cxx
@@ -711,7 +711,7 @@ bool Sane::Start( BitmapTransporter& rBitmap )
 tv.tv_sec = 5;
 tv.tv_usec = 0;
 if( select( fd+1, &fdset, nullptr, nullptr, &tv ) == 0 )
-fprintf( stderr, "Timout on sane_read descriptor\n" );
+fprintf( stderr, "Timeout on sane_read descriptor\n" );
 }
 nLen = 0;
 nStatus = p_read( maHandle, pBuffer, BYTE_BUFFER_SIZE, &nLen );
diff --git a/stoc/test/testregistry.cxx b/stoc/test/testregistry.cxx
index 95484f117522..6e74998c7980 100644
--- a/stoc/test/testregistry.cxx
+++ b/stoc/test/testregistry.cxx
@@ -636,7 +636,7 @@ void test_DefaultRegistry(
 
 // shutdown
 Reference< css::lang::XComponent > xComp( rSMgr, UNO_QUERY );
-OSL_ENSURE( xComp.is(), "### serivce manager has to implement XComponent!" 
);
+OSL_ENSURE( xComp.is(), "### service manager has to implement XComponent!" 
);
 xComp->dispose();
 
 printf("Test DefaultRegistry, OK!\n");
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-25 Thread Stephan Bergmann
 sw/source/core/fields/authfld.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 6976600c66e7671ab42188effc18e9988468e9cf
Author: Stephan Bergmann 
Date:   Thu Jan 25 11:20:04 2018 +0100

Don't preset SwAuthorityField::m_SortKeyArr with three empty elements

This appears to be a mistake introduced with
0be2a98cc04ee26f605a6f6e7efbdee325560a91 "Convert 
V_DECL_PTRARR_DEL(SortKeyArr)
to boost::ptr_vector", where the original svl/svarray.hxx-based SortKeyArr 
ctor
had a parameter specifying the initial capacity.

But the mistake was apparently harmless as uses of SwAuthorityField appear 
to
always fill m_SortKeyArr via SwAuthorityFieldType::PutValue or
SwAuthorityFieldType::SetSortKeys (which both first clear m_SortKeyArr) 
before
accessing m_SortKeyArr otherwise (as observed when playing around with 
Writer
"Insert - Table of Contents and Index - Table of Contents, Index or
Bibliography...", and in the "Table of Contents, Index or Bibliography" 
dialog
doing "Type - Type and Title - Type: Bibliography", "Entries - Sort by -
Content", "Entries - Sort Keys - 1: Address", etc.).

Change-Id: I0901b3b790f8390e743d5802116f13e7261e83eb
Reviewed-on: https://gerrit.libreoffice.org/48563
Reviewed-by: Noel Grandin 
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/sw/source/core/fields/authfld.cxx 
b/sw/source/core/fields/authfld.cxx
index 9c3e9e0f0f72..907668df8532 100644
--- a/sw/source/core/fields/authfld.cxx
+++ b/sw/source/core/fields/authfld.cxx
@@ -66,7 +66,6 @@ boolSwAuthEntry::operator==(const SwAuthEntry& rComp)
 SwAuthorityFieldType::SwAuthorityFieldType(SwDoc* pDoc)
 : SwFieldType( SwFieldIds::TableOfAuthorities ),
 m_pDoc(pDoc),
-m_SortKeyArr(3),
 m_cPrefix('['),
 m_cSuffix(']'),
 m_bIsSequence(false),
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-25 Thread Jim Raykowski
 cui/source/customize/cfg.cxx |8 
 cui/source/inc/cfg.hxx   |1 +
 2 files changed, 9 insertions(+)

New commits:
commit 1c1c50e12cc33df7c158badfc6b08c2ef9bb38a5
Author: Jim Raykowski 
Date:   Wed Jan 24 22:55:14 2018 -0900

tdf#115129 Add function on double click in Customize Dialog

Change-Id: I21a7f8b4fc05d55d1539a3fd148e5870899b1596
Reviewed-on: https://gerrit.libreoffice.org/48555
Tested-by: Jenkins 
Reviewed-by: Samuel Mehrbrodt 

diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 2d41063947a6..4e194ba4cc05 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -1193,6 +1193,7 @@ SvxConfigPage::SvxConfigPage(vcl::Window *pParent, const 
SfxItemSet& rSet)
 m_pSearchEdit->SetUpdateDataHdl ( LINK( this, SvxConfigPage, 
SearchUpdateHdl ));
 m_pSearchEdit->EnableUpdateData();
 
+m_pFunctions->SetDoubleClickHdl( LINK( this, SvxConfigPage, 
FunctionDoubleClickHdl ) );
 m_pFunctions->SetSelectHdl(
 LINK( this, SvxConfigPage, SelectFunctionHdl ) );
 }
@@ -1783,6 +1784,13 @@ IMPL_LINK( SvxConfigPage, MoveHdl, Button *, pButton, 
void )
 MoveEntry(pButton == m_pMoveUpButton);
 }
 
+IMPL_LINK_NOARG( SvxConfigPage, FunctionDoubleClickHdl, SvTreeListBox *, bool )
+{
+if ( m_pAddCommandButton->IsEnabled() )
+m_pAddCommandButton->Click();
+return false;
+}
+
 IMPL_LINK_NOARG( SvxConfigPage, SelectFunctionHdl, SvTreeListBox *, void )
 {
 // Store the tooltip of the description field at first run
diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx
index b8bf3fcd7020..d69da888059e 100644
--- a/cui/source/inc/cfg.hxx
+++ b/cui/source/inc/cfg.hxx
@@ -418,6 +418,7 @@ protected:
 
 DECL_LINK( MoveHdl, Button *, void );
 DECL_LINK( SelectFunctionHdl, SvTreeListBox *, void );
+DECL_LINK( FunctionDoubleClickHdl, SvTreeListBox *, bool );
 
 virtual SaveInData* CreateSaveInData(
 const css::uno::Reference< css::ui::XUIConfigurationManager >&,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-25 Thread Eike Rathke
 sc/source/core/data/conditio.cxx |6 ++
 sc/source/core/data/documen8.cxx |   17 +++--
 2 files changed, 21 insertions(+), 2 deletions(-)

New commits:
commit 2930ba2ac5d9423f2848b968edcd8ddc71966186
Author: Eike Rathke 
Date:   Thu Jan 25 14:25:38 2018 +0100

CheckLinkFormulaNeedingCheck() for .ods conditional format expressions

Change-Id: I45eb1ab5efa0ec9da2663f20427d2474ce300826

diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx
index 4829be28388d..eb86f3e4bc61 100644
--- a/sc/source/core/data/conditio.cxx
+++ b/sc/source/core/data/conditio.cxx
@@ -471,6 +471,12 @@ void ScConditionEntry::CompileXML()
 Compile( GetExpression(aSrcPos, 0, 0, eTempGrammar1),
  GetExpression(aSrcPos, 1, 0, eTempGrammar2),
  aStrNmsp1, aStrNmsp2, eTempGrammar1, eTempGrammar2, true );
+
+// Importing ocDde/ocWebservice?
+if (pFormula1)
+mpDoc->CheckLinkFormulaNeedingCheck(*pFormula1);
+if (pFormula2)
+mpDoc->CheckLinkFormulaNeedingCheck(*pFormula2);
 }
 
 void ScConditionEntry::SetSrcString( const OUString& rNew )
commit faa0305ba3d0dc698fce4915d4f3a1fb52422380
Author: Eike Rathke 
Date:   Thu Jan 25 13:20:27 2018 +0100

Prepare CheckLinkFormulaNeedingCheck() to use either RPN or tokenized code

Conditional format formulas aren't finally compiled until needed
so the check will have to operate on the tokenized expression
instead of RPN code.

Change-Id: I68837e9bd33f125ab47b10b1a6fa18175abd1627

diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx
index eb75f2be076c..eb58eb080213 100644
--- a/sc/source/core/data/documen8.cxx
+++ b/sc/source/core/data/documen8.cxx
@@ -1182,8 +1182,21 @@ void ScDocument::CheckLinkFormulaNeedingCheck( const 
ScTokenArray& rCode )
 if (HasLinkFormulaNeedingCheck())
 return;
 
-if (rCode.HasOpCodeRPN(ocDde) || rCode.HasOpCodeRPN(ocWebservice))
-SetLinkFormulaNeedingCheck(true);
+// Prefer RPN over tokenized formula if available.
+if (rCode.GetCodeLen())
+{
+if (rCode.HasOpCodeRPN(ocDde) || rCode.HasOpCodeRPN(ocWebservice))
+SetLinkFormulaNeedingCheck(true);
+}
+else if (rCode.GetLen())
+{
+if (rCode.HasOpCode(ocDde) || rCode.HasOpCode(ocWebservice))
+SetLinkFormulaNeedingCheck(true);
+}
+else
+{
+assert(!"called with empty ScTokenArray");
+}
 }
 
 // TimerDelays etc.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-25 Thread Aron Budea
 sw/source/uibase/dbui/dbmgr.cxx |   21 ++---
 1 file changed, 14 insertions(+), 7 deletions(-)

New commits:
commit 6feeb77552c38e3d9819611e9678470a44c00c84
Author: Aron Budea 
Date:   Mon Jan 22 03:00:28 2018 +0100

tdf115103: find data source if sDataSource/sCommand are empty

In several functions data source was only found if sDataSource and
sCommand corresponded to what was set in fields.
In imported DOC(X) files these aren't set.

Now use the data source even if field's sDataSource/sCommand are
empty (similarly to SwDBManager::IsDataSourceOpen(...)).

Change-Id: I9563cb56e700e7fd033100cb200f41f074669020
Reviewed-on: https://gerrit.libreoffice.org/48285
Tested-by: Jenkins 
Reviewed-by: Aron Budea 

diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index 102e6dd4ab71..6067bd834ac2 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -1696,7 +1696,8 @@ sal_uLong SwDBManager::GetColumnFormat( const OUString& 
rDBName,
 uno::Reference< sdbcx::XColumnsSupplier> xColsSupp;
 bool bDisposeConnection = false;
 if(pImpl->pMergeData &&
-pImpl->pMergeData->sDataSource == rDBName && 
pImpl->pMergeData->sCommand == rTableName)
+((pImpl->pMergeData->sDataSource == rDBName && 
pImpl->pMergeData->sCommand == rTableName) ||
+(rDBName.isEmpty() && rTableName.isEmpty(
 {
 xConnection = pImpl->pMergeData->xConnection;
 xSource = SwDBManager::getDataSourceAsParent(xConnection,rDBName);
@@ -2400,11 +2401,15 @@ sal_uInt32  SwDBManager::GetSelectedRecordId(
 {
 sal_uInt32 nRet = 0x;
 //check for merge data source first
-if(pImpl->pMergeData && rDataSource == pImpl->pMergeData->sDataSource &&
-rTableOrQuery == pImpl->pMergeData->sCommand &&
-(nCommandType == -1 || nCommandType == 
pImpl->pMergeData->nCommandType) &&
-pImpl->pMergeData->xResultSet.is())
+if(pImpl->pMergeData &&
+((rDataSource == pImpl->pMergeData->sDataSource &&
+rTableOrQuery == pImpl->pMergeData->sCommand) ||
+(rDataSource.isEmpty() && rTableOrQuery.isEmpty())) &&
+(nCommandType == -1 || nCommandType == 
pImpl->pMergeData->nCommandType) &&
+pImpl->pMergeData->xResultSet.is())
+{
 nRet = GetSelectedRecordId();
+}
 else
 {
 SwDBData aData;
@@ -2460,8 +2465,10 @@ voidSwDBManager::CloseAll(bool bIncludingMerge)
 SwDSParam* SwDBManager::FindDSData(const SwDBData& rData, bool bCreate)
 {
 //prefer merge data if available
-if(pImpl->pMergeData && rData.sDataSource == 
pImpl->pMergeData->sDataSource &&
-rData.sCommand == pImpl->pMergeData->sCommand &&
+if(pImpl->pMergeData &&
+((rData.sDataSource == pImpl->pMergeData->sDataSource &&
+rData.sCommand == pImpl->pMergeData->sCommand) ||
+(rData.sDataSource.isEmpty() && rData.sCommand.isEmpty())) &&
 (rData.nCommandType == -1 || rData.nCommandType == 
pImpl->pMergeData->nCommandType ||
 (bCreate && pImpl->pMergeData->nCommandType == -1)))
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-25 Thread Caolán McNamara
 sw/source/filter/html/swhtml.cxx |   17 -
 1 file changed, 12 insertions(+), 5 deletions(-)

New commits:
commit 404a2ff628877087233bbe1f2a1544a46d8a
Author: Caolán McNamara 
Date:   Thu Jan 25 10:18:52 2018 +

ofz#4849 Direct leak

Change-Id: If9b7f6de42d99c76165aec775b8cde2505df0c62
Reviewed-on: https://gerrit.libreoffice.org/48561
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 4115bb6f9e6b..3cb67e703bef 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -674,14 +674,21 @@ void SwHTMLParser::Continue( HtmlTokenId nToken )
 EndNumBulList();
 
 OSL_ENSURE( !m_nContextStMin, "There are protected contexts" );
-m_nContextStMin = 0;
-while( m_aContexts.size() )
+// try this twice, first normally to let m_nContextStMin decrease
+// naturally and get contexts popped in desired order, and if that
+// fails force it
+for (int i = 0; i < 2; ++i)
 {
-std::unique_ptr xCntxt(PopContext());
-if (xCntxt)
+while (m_aContexts.size() > m_nContextStMin)
 {
-EndContext(xCntxt.get());
+std::unique_ptr xCntxt(PopContext());
+if (xCntxt)
+EndContext(xCntxt.get());
 }
+if (!m_nContextStMin)
+break;
+OSL_ENSURE(!m_nContextStMin, "There are still protected 
contexts");
+m_nContextStMin = 0;
 }
 
 if( !m_aParaAttrs.empty() )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-25 Thread Tamás Zolnai
 sw/qa/extras/tiledrendering/tiledrendering.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 652c963b6ea84b94cd26b4c00874cea24a82c3f4
Author: Tamás Zolnai 
Date:   Thu Jan 25 14:15:13 2018 +0100

Correct comment for this test

Change-Id: If83cdc11398fa8360c7d4702a208203d213d5718

diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx 
b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index 62a70ea74d11..c89b9cf844ef 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -2053,7 +2053,7 @@ void SwTiledRenderingTest::testTdf115088()
 comphelper::dispatchCommand(".uno:PasteUnformatted", 
uno::Sequence());
 Scheduler::ProcessEventsToIdle();
 
-// Check the resulting text in the document. (it was 1text\n1\1)
+// Check the resulting text in the document. (it was 1Text\n1\n1\n1)
 CPPUNIT_ASSERT_EQUAL(OUString("1\n1Text\n1\n1"), 
pXTextDocument->getText()->getString());
 
 mxComponent->dispose();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-25 Thread Noel Grandin
 package/source/xstor/ocompinstream.cxx |4 +---
 package/source/xstor/ocompinstream.hxx |3 ++-
 2 files changed, 3 insertions(+), 4 deletions(-)

New commits:
commit 4417f37dd88b9a899f070f030794594b97fe2da5
Author: Noel Grandin 
Date:   Mon Jan 22 14:22:06 2018 +0200

loplugin:useuniqueptr in OInputCompStream

Change-Id: I49fb71aa4319f6ac245885535e8afe855113e162
Reviewed-on: https://gerrit.libreoffice.org/48557
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/package/source/xstor/ocompinstream.cxx 
b/package/source/xstor/ocompinstream.cxx
index 06076370ea92..dd564271ecd8 100644
--- a/package/source/xstor/ocompinstream.cxx
+++ b/package/source/xstor/ocompinstream.cxx
@@ -71,8 +71,6 @@ OInputCompStream::~OInputCompStream()
 m_refCount++;
 dispose();
 }
-
-delete m_pInterfaceContainer;
 }
 
 uno::Any SAL_CALL OInputCompStream::queryInterface( const uno::Type& rType )
@@ -248,7 +246,7 @@ void SAL_CALL OInputCompStream::addEventListener( const 
uno::Reference< lang::XE
 }
 
 if ( !m_pInterfaceContainer )
-m_pInterfaceContainer = new ::comphelper::OInterfaceContainerHelper2( 
m_xMutex->GetMutex() );
+m_pInterfaceContainer.reset( new 
::comphelper::OInterfaceContainerHelper2( m_xMutex->GetMutex() ) );
 
 m_pInterfaceContainer->addInterface( xListener );
 }
diff --git a/package/source/xstor/ocompinstream.hxx 
b/package/source/xstor/ocompinstream.hxx
index 68c2ce2262ae..c41c2c25f40a 100644
--- a/package/source/xstor/ocompinstream.hxx
+++ b/package/source/xstor/ocompinstream.hxx
@@ -31,6 +31,7 @@
 #include 
 #include 
 #include 
+#include 
 
 
 struct OWriteStream_Impl;
@@ -44,7 +45,7 @@ protected:
 OWriteStream_Impl* m_pImpl;
 rtl::Reference m_xMutex;
 css::uno::Reference < css::io::XInputStream > m_xStream;
-::comphelper::OInterfaceContainerHelper2* m_pInterfaceContainer;
+std::unique_ptr<::comphelper::OInterfaceContainerHelper2> 
m_pInterfaceContainer;
 css::uno::Sequence < css::beans::PropertyValue > m_aProperties;
 bool m_bDisposed;
 sal_Int32 m_nStorageType;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: basegfx/source canvas/source comphelper/source connectivity/source cppcanvas/source include/basegfx include/comphelper include/connectivity include/cppcanvas

2018-01-25 Thread Noel Grandin
 basegfx/source/matrix/b3dhommatrix.cxx  |   13 ++--
 canvas/source/cairo/cairo_textlayout.cxx|   11 ++-
 canvas/source/cairo/cairo_textlayout.hxx|2 -
 canvas/source/opengl/ogl_buffercontext.hxx  |4 +-
 canvas/source/opengl/ogl_spritecanvas.cxx   |4 +-
 canvas/source/opengl/ogl_spritecanvas.hxx   |2 -
 canvas/source/opengl/ogl_spritedevicehelper.cxx |6 +---
 canvas/source/opengl/ogl_textlayout.cxx |4 --
 canvas/source/opengl/ogl_textlayout.hxx |2 -
 canvas/source/tools/surface.hxx |2 -
 comphelper/source/container/embeddedobjectcontainer.cxx |   19 +++-
 comphelper/source/misc/backupfilehelper.cxx |   24 
 comphelper/source/property/propertycontainerhelper.cxx  |6 +---
 connectivity/source/commontools/parameters.cxx  |5 +--
 connectivity/source/drivers/dbase/DIndex.cxx|4 --
 connectivity/source/drivers/evoab2/NResultSet.cxx   |   12 ++--
 connectivity/source/drivers/evoab2/NResultSet.hxx   |2 -
 connectivity/source/drivers/file/FResultSet.cxx |6 +---
 connectivity/source/drivers/mork/MResultSet.cxx |4 +-
 connectivity/source/drivers/mork/MResultSet.hxx |2 -
 connectivity/source/inc/dbase/DIndex.hxx|2 -
 connectivity/source/inc/file/FResultSet.hxx |2 -
 cppcanvas/source/wrapper/implbitmap.cxx |6 +---
 cppcanvas/source/wrapper/implbitmap.hxx |2 -
 include/basegfx/matrix/b3dhommatrix.hxx |4 +-
 include/comphelper/backupfilehelper.hxx |   14 ++---
 include/comphelper/embeddedobjectcontainer.hxx  |8 ++---
 include/comphelper/listenernotification.hxx |7 ++--
 include/comphelper/namedvaluecollection.hxx |4 +-
 include/comphelper/propertycontainerhelper.hxx  |2 -
 include/connectivity/parameters.hxx |2 -
 include/cppcanvas/bitmap.hxx|4 --
 32 files changed, 68 insertions(+), 123 deletions(-)

New commits:
commit 0f28c8612f4269cec95688b53d182c7c0169236d
Author: Noel Grandin 
Date:   Tue Jan 23 16:45:23 2018 +0200

loplugin:unused-returns in basegfx..cppcanvas

Change-Id: I32dc8c92871c8349651d2f4204a332d387e6e1b2
Reviewed-on: https://gerrit.libreoffice.org/48428
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/basegfx/source/matrix/b3dhommatrix.cxx 
b/basegfx/source/matrix/b3dhommatrix.cxx
index e6a2bd3b4f88..6cfd054992ec 100644
--- a/basegfx/source/matrix/b3dhommatrix.cxx
+++ b/basegfx/source/matrix/b3dhommatrix.cxx
@@ -85,7 +85,7 @@ namespace basegfx
 *mpImpl = Impl3DHomMatrix();
 }
 
-bool B3DHomMatrix::invert()
+void B3DHomMatrix::invert()
 {
 Impl3DHomMatrix aWork(*mpImpl);
 std::unique_ptr pIndex( new 
sal_uInt16[Impl3DHomMatrix_Base::getEdgeLength()] );
@@ -94,10 +94,7 @@ namespace basegfx
 if(aWork.ludcmp(pIndex.get(), nParity))
 {
 mpImpl->doInvert(aWork, pIndex.get());
-return true;
 }
-
-return false;
 }
 
 double B3DHomMatrix::determinant() const
@@ -376,15 +373,15 @@ namespace basegfx
 mpImpl->doMulMatrix(aOrientationMat);
 }
 
-bool B3DHomMatrix::decompose(B3DTuple& rScale, B3DTuple& rTranslate, 
B3DTuple& rRotate, B3DTuple& rShear) const
+void B3DHomMatrix::decompose(B3DTuple& rScale, B3DTuple& rTranslate, 
B3DTuple& rRotate, B3DTuple& rShear) const
 {
 // when perspective is used, decompose is not made here
 if(!mpImpl->isLastLineDefault())
-return false;
+return;
 
 // If determinant is zero, decomposition is not possible
 if(determinant() == 0.0)
-return false;
+return;
 
 // isolate translation
 rTranslate.setX(mpImpl->get(0, 3));
@@ -536,8 +533,6 @@ namespace basegfx
 // correct rotate values
 rRotate.correctValues();
 }
-
-return true;
 }
 } // end of namespace basegfx
 
diff --git a/canvas/source/cairo/cairo_textlayout.cxx 
b/canvas/source/cairo/cairo_textlayout.cxx
index 5fb4db08dd2e..2e4e08cfd8c1 100644
--- a/canvas/source/cairo/cairo_textlayout.cxx
+++ b/canvas/source/cairo/cairo_textlayout.cxx
@@ -292,10 +292,8 @@ namespace cairocanvas
*
* Note: some text effects are not rendered due to lacking generic canvas or 
cairo canvas
*   implementation. See issues 92657, 92658, 92659, 92660, 97529
-   *
-   * @return true, if successful
**/
-bool TextLayout::draw( CairoSharedPtr const &pSCairo,
+void TextLayout::draw( CairoSharedPtr const &pSCairo,
OutputDevice& rOutDev,
 

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

2018-01-25 Thread Justin Luth
 sw/qa/extras/ooxmlexport/data/tdf95377.docx   |binary
 sw/qa/extras/ooxmlexport/ooxmlexport10.cxx|   16 +
 writerfilter/source/dmapper/DomainMapper.cxx  |   61 +-
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |   42 +++
 writerfilter/source/dmapper/DomainMapper_Impl.hxx |1 
 5 files changed, 74 insertions(+), 46 deletions(-)

New commits:
commit 8fd13c356d78fb72ba5dd288a495551f23e15363
Author: Justin Luth 
Date:   Tue Jan 23 14:41:48 2018 +0300

ooxmlimport: support inherited listid

This is prep work for tdf#95377. This unit test avoids the unique
chapter-numbering style (from the heading paragraph styles) and just
has a basic, user-created style inheriting from Default.

Also unique about this unit test is that the numbering is
specified by the "Default Style" which takes a rather unique
code path and exposes even more problems.

We already know the listId through a recursive function, and
GetCurrentNumberingRules only looks at the current style which
isn't good enough. Moved that modified function into
DomainMapper_Impl since I will need it there for bug 95377.

Additionally, ensure that directly applied paragraph properties
are not overwritten. That also meant changing the order, so that
paraStyle properties are directly applied to the paragraph before
applying RightMargin and friends.

Change-Id: I5c1fb71d64727be9d9105f287150daf4e0ff413d
Reviewed-on: https://gerrit.libreoffice.org/48457
Tested-by: Jenkins 
Reviewed-by: Justin Luth 
Reviewed-by: Miklos Vajna 

diff --git a/sw/qa/extras/ooxmlexport/data/tdf95377.docx 
b/sw/qa/extras/ooxmlexport/data/tdf95377.docx
new file mode 100644
index ..be5551dca282
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf95377.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
index e5af806f373b..9128303db319 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
@@ -907,6 +907,22 @@ DECLARE_OOXMLEXPORT_TEST(testTdf92454, "tdf92454.docx")
 CPPUNIT_ASSERT_EQUAL(beans::PropertyState_DIRECT_VALUE, 
xParagraph->getPropertyState("ParaFirstLineIndent"));
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf95377, "tdf95377.docx")
+{
+uno::Reference xParagraph(getParagraph(1), 
uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(sal_Int32(1000), getProperty(xParagraph, 
"ParaRightMargin"));
+
+xParagraph.set(getParagraph(2), uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(sal_Int32(-501), getProperty(xParagraph, 
"ParaFirstLineIndent"));
+CPPUNIT_ASSERT_EQUAL(sal_Int32(2501), getProperty(xParagraph, 
"ParaLeftMargin"));
+CPPUNIT_ASSERT_EQUAL(beans::PropertyState_DIRECT_VALUE, 
xParagraph->getPropertyState("ParaFirstLineIndent"));
+
+xParagraph.set(getParagraph(3), uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(sal_Int32(-250), getProperty(xParagraph, 
"ParaFirstLineIndent"));
+CPPUNIT_ASSERT_EQUAL(sal_Int32(250), getProperty(xParagraph, 
"ParaLeftMargin"));
+CPPUNIT_ASSERT_EQUAL(beans::PropertyState_DIRECT_VALUE, 
xParagraph->getPropertyState("ParaFirstLineIndent"));
+}
+
 DECLARE_OOXMLEXPORT_TEST(testTdf95376, "tdf95376.docx")
 {
 uno::Reference xParagraph(getParagraph(2), 
uno::UNO_QUERY);
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx 
b/writerfilter/source/dmapper/DomainMapper.cxx
index 35693db196ec..9acb00fb86ae 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -1165,40 +1165,6 @@ void DomainMapper::lcl_sprm(Sprm & rSprm)
 sprmWithProps(rSprm, m_pImpl->GetTopContext());
 }
 
-sal_Int32 lcl_getCurrentNumberingProperty(
-uno::Reference const& xNumberingRules,
-sal_Int32 nNumberingLevel, const OUString& aProp)
-{
-sal_Int32 nRet = 0;
-
-try
-{
-if (nNumberingLevel < 0) // It seems it's valid to omit numbering 
level, and in that case it means zero.
-nNumberingLevel = 0;
-if (xNumberingRules.is())
-{
-uno::Sequence aProps;
-xNumberingRules->getByIndex(nNumberingLevel) >>= aProps;
-for (int i = 0; i < aProps.getLength(); ++i)
-{
-const beans::PropertyValue& rProp = aProps[i];
-
-if (rProp.Name == aProp)
-{
-rProp.Value >>= nRet;
-break;
-}
-}
-}
-}
-catch( const uno::Exception& )
-{
-// This can happen when the doc contains some hand-crafted invalid 
list level.
-}
-
-return nRet;
-}
-
 // In rtl-paragraphs the meaning of left/right are to be exchanged
 static bool ExchangeLeftRight(const PropertyMapPtr& rContext, 
DomainMapper_Impl& rImpl)
 {
@@ -2169,6 +2135,16 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const 
PropertyMapPtr& rContext

[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - sw/source

2018-01-25 Thread Michael Stahl
 sw/source/filter/html/htmltab.cxx |3 +++
 sw/source/filter/html/swhtml.cxx  |   31 +++
 sw/source/filter/html/swhtml.hxx  |1 +
 3 files changed, 23 insertions(+), 12 deletions(-)

New commits:
commit d76fc1a87a31bf513f844be933996334ea85446c
Author: Michael Stahl 
Date:   Mon Jan 22 19:48:06 2018 +0100

ofz#5566 sw: HTML import: ignore  in table structure elements

Looking at the HTML4 DTD https://www.w3.org/TR/html4/sgml/dtd.html,
inside TABLE only various elements defining the structure of the table
allowed, except inside cells (TD and TH elements).

DIV in a table but outside cells may cause cursor positions to go
off the rails, so better ignore such invalid DIV tags.

Reviewed-on: https://gerrit.libreoffice.org/48359
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit 8b1a83bffe35ae0e71735569512c1586bcb37b25)

Change-Id: Ia6195d80670631669c252d572242874b13642b74
Reviewed-on: https://gerrit.libreoffice.org/48381
Tested-by: Jenkins 
Reviewed-by: Miklos Vajna 

diff --git a/sw/source/filter/html/htmltab.cxx 
b/sw/source/filter/html/htmltab.cxx
index b6e1d5db18bf..b3f7ca1e663f 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -19,6 +19,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -3307,6 +3308,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, 
bool bReadOptions,
 if( !IsParserWorking() && !m_pPendStack )
 return;
 
+::comphelper::FlagRestorationGuard g(m_isInTableStructure, false);
 CellSaveStruct* pSaveStruct;
 
 HtmlTokenId nToken = HtmlTokenId::NONE;
@@ -4972,6 +4974,7 @@ HTMLTable *SwHTMLParser::BuildTable( SvxAdjust 
eParentAdjust,
 if( !IsParserWorking() && !m_pPendStack )
 return nullptr;
 
+::comphelper::FlagRestorationGuard g(m_isInTableStructure, true);
 HtmlTokenId nToken = HtmlTokenId::NONE;
 bool bPending = false;
 TableSaveStruct* pSaveStruct;
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 3b18ef33328a..e483f926ee04 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -298,6 +298,7 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, SwPaM& rCursor, 
SvStream& rIn,
 m_bRemoveHidden( false ),
 m_bBodySeen( false ),
 m_bReadingHeaderOrFooter( false ),
+m_isInTableStructure(false),
 m_pTempViewFrame(nullptr)
 {
 m_nEventId = nullptr;
@@ -1544,26 +1545,32 @@ void SwHTMLParser::NextToken( HtmlTokenId nToken )
 // divisions
 case HtmlTokenId::DIVISION_ON:
 case HtmlTokenId::CENTER_ON:
-if( m_nOpenParaToken != HtmlTokenId::NONE )
+if (!m_isInTableStructure)
 {
-if( IsReadPRE() )
-m_nOpenParaToken = HtmlTokenId::NONE;
-else
-EndPara();
+if (m_nOpenParaToken != HtmlTokenId::NONE)
+{
+if (IsReadPRE())
+m_nOpenParaToken = HtmlTokenId::NONE;
+else
+EndPara();
+}
+NewDivision( nToken );
 }
-NewDivision( nToken );
 break;
 
 case HtmlTokenId::DIVISION_OFF:
 case HtmlTokenId::CENTER_OFF:
-if( m_nOpenParaToken != HtmlTokenId::NONE )
+if (!m_isInTableStructure)
 {
-if( IsReadPRE() )
-m_nOpenParaToken = HtmlTokenId::NONE;
-else
-EndPara();
+if (m_nOpenParaToken != HtmlTokenId::NONE)
+{
+if (IsReadPRE())
+m_nOpenParaToken = HtmlTokenId::NONE;
+else
+EndPara();
+}
+EndDivision();
 }
-EndDivision();
 break;
 
 case HtmlTokenId::MULTICOL_ON:
diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx
index 450f7ddbde56..6e84380cdfe1 100644
--- a/sw/source/filter/html/swhtml.hxx
+++ b/sw/source/filter/html/swhtml.hxx
@@ -480,6 +480,7 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient
 
 bool m_bBodySeen : 1;
 bool m_bReadingHeaderOrFooter : 1;
+bool m_isInTableStructure;
 
 /// the names corresponding to the DOCINFO field subtypes INFO[1-4]
 OUString m_InfoNames[4];
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-25 Thread Noel Grandin
 ucb/source/cacher/contentresultsetwrapper.cxx |   16 ++--
 ucb/source/cacher/contentresultsetwrapper.hxx |7 ---
 2 files changed, 10 insertions(+), 13 deletions(-)

New commits:
commit f82434b54517cad96416df93e9b5d70c9b0ada45
Author: Noel Grandin 
Date:   Mon Jan 22 14:22:38 2018 +0200

loplugin:useuniqueptr in ContentResultSetWrapper

Change-Id: I798e5b06a5b2f9377f22a86f7b630ffdc20e10c6
Reviewed-on: https://gerrit.libreoffice.org/48559
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/ucb/source/cacher/contentresultsetwrapper.cxx 
b/ucb/source/cacher/contentresultsetwrapper.cxx
index 3f9f8aea3639..32e6f3edf59b 100644
--- a/ucb/source/cacher/contentresultsetwrapper.cxx
+++ b/ucb/source/cacher/contentresultsetwrapper.cxx
@@ -132,10 +132,6 @@ void ContentResultSetWrapper::impl_init()
 ContentResultSetWrapper::~ContentResultSetWrapper()
 {
 //call impl_deinit() at start of destructor of derived class
-
-delete m_pDisposeEventListeners;
-delete m_pPropertyChangeListeners;
-delete m_pVetoableChangeListeners;
 };
 
 void ContentResultSetWrapper::impl_deinit()
@@ -178,16 +174,16 @@ void 
ContentResultSetWrapper::impl_getPropertyChangeListenerContainer()
 {
 osl::Guard< osl::Mutex > aGuard( m_aMutex );
 if ( !m_pPropertyChangeListeners )
-m_pPropertyChangeListeners =
-new PropertyChangeListenerContainer_Impl( m_aContainerMutex );
+m_pPropertyChangeListeners.reset(
+new PropertyChangeListenerContainer_Impl( m_aContainerMutex ) );
 }
 
 void ContentResultSetWrapper::impl_getVetoableChangeListenerContainer()
 {
 osl::Guard< osl::Mutex > aGuard( m_aMutex );
 if ( !m_pVetoableChangeListeners )
-m_pVetoableChangeListeners =
-new PropertyChangeListenerContainer_Impl( m_aContainerMutex );
+m_pVetoableChangeListeners.reset(
+new PropertyChangeListenerContainer_Impl( m_aContainerMutex ) );
 }
 
 void ContentResultSetWrapper::impl_notifyPropertyChangeListeners( const 
PropertyChangeEvent& rEvt )
@@ -437,8 +433,8 @@ void SAL_CALL ContentResultSetWrapper::addEventListener( 
const Reference< XEvent
 osl::Guard< osl::Mutex > aGuard( m_aMutex );
 
 if ( !m_pDisposeEventListeners )
-m_pDisposeEventListeners =
-new OInterfaceContainerHelper2( m_aContainerMutex );
+m_pDisposeEventListeners.reset(
+new OInterfaceContainerHelper2( m_aContainerMutex ) );
 
 m_pDisposeEventListeners->addInterface( Listener );
 }
diff --git a/ucb/source/cacher/contentresultsetwrapper.hxx 
b/ucb/source/cacher/contentresultsetwrapper.hxx
index 05d412921a98..1dff70d00935 100644
--- a/ucb/source/cacher/contentresultsetwrapper.hxx
+++ b/ucb/source/cacher/contentresultsetwrapper.hxx
@@ -35,6 +35,7 @@
 #include 
 #include 
 #include 
+#include 
 
 
 class ContentResultSetWrapperListener;
@@ -87,11 +88,11 @@ private:
 boolm_bDisposed; ///Dispose call ready.
 boolm_bInDispose;///In dispose call
 osl::Mutex  m_aContainerMutex;
-comphelper::OInterfaceContainerHelper2*
+std::unique_ptr
 m_pDisposeEventListeners;
-PropertyChangeListenerContainer_Impl*
+std::unique_ptr
 m_pPropertyChangeListeners;
-PropertyChangeListenerContainer_Impl*
+std::unique_ptr
 m_pVetoableChangeListeners;
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-25 Thread Noel Grandin
 xmlsecurity/inc/framework/saxeventkeeperimpl.hxx|2 -
 xmlsecurity/source/framework/saxeventkeeperimpl.cxx |   26 ++--
 2 files changed, 14 insertions(+), 14 deletions(-)

New commits:
commit 5cb225b0b3dbb55fd44899b1fb16bdcfeb866849
Author: Noel Grandin 
Date:   Mon Jan 22 14:22:24 2018 +0200

loplugin:useuniqueptr in SAXEventKeeperImpl

Change-Id: I1bb683dc8d492db73c2f2cc07c67b4dcb75bc1fb
Reviewed-on: https://gerrit.libreoffice.org/48558
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/xmlsecurity/inc/framework/saxeventkeeperimpl.hxx 
b/xmlsecurity/inc/framework/saxeventkeeperimpl.hxx
index 9b6a8d472754..4f8a06959a4c 100644
--- a/xmlsecurity/inc/framework/saxeventkeeperimpl.hxx
+++ b/xmlsecurity/inc/framework/saxeventkeeperimpl.hxx
@@ -96,7 +96,7 @@ private:
  * it has the same structure with the document which maintains those
  * elements physically.
  */
-BufferNode*  m_pRootBufferNode;
+std::unique_ptr  m_pRootBufferNode;
 
 /*
  * the current active BufferNode.
diff --git a/xmlsecurity/source/framework/saxeventkeeperimpl.cxx 
b/xmlsecurity/source/framework/saxeventkeeperimpl.cxx
index 636e6e4d5436..9659f420c70a 100644
--- a/xmlsecurity/source/framework/saxeventkeeperimpl.cxx
+++ b/xmlsecurity/source/framework/saxeventkeeperimpl.cxx
@@ -59,10 +59,10 @@ SAXEventKeeperImpl::~SAXEventKeeperImpl()
 if (m_pRootBufferNode != nullptr)
 {
 m_pRootBufferNode->freeAllChildren();
-delete m_pRootBufferNode;
+m_pRootBufferNode.reset();
 }
 
-m_pRootBufferNode = m_pCurrentBufferNode = m_pCurrentBlockingBufferNode = 
nullptr;
+m_pCurrentBufferNode = m_pCurrentBlockingBufferNode = nullptr;
 
 /*
  * delete all unfreed ElementMarks
@@ -95,7 +95,7 @@ void SAXEventKeeperImpl::setCurrentBufferNode(BufferNode* 
pBufferNode)
 {
 if (pBufferNode != m_pCurrentBufferNode)
 {
-if ( m_pCurrentBufferNode == m_pRootBufferNode &&
+if ( m_pCurrentBufferNode == m_pRootBufferNode.get() &&
  m_xSAXEventKeeperStatusChangeListener.is())
 {
 
m_xSAXEventKeeperStatusChangeListener->collectionStatusChanged(true);
@@ -423,7 +423,7 @@ void SAXEventKeeperImpl::smashBufferNode(
 /*
  * delete the XML data
  */
-if (pParent == m_pRootBufferNode)
+if (pParent == m_pRootBufferNode.get())
 {
 bool bIsNotBlocking = (m_pCurrentBlockingBufferNode == nullptr);
 bool bIsBlockInside = false;
@@ -437,7 +437,7 @@ void SAXEventKeeperImpl::smashBufferNode(
 if (bClearRoot)
 {
 cssu::Sequence< cssu::Reference< cssxw::XXMLElementWrapper > >
-aChildElements = 
collectChildWorkingElement(m_pRootBufferNode);
+aChildElements = 
collectChildWorkingElement(m_pRootBufferNode.get());
 
 /*
  * the clearUselessData only clearup the content in the
@@ -931,7 +931,7 @@ OUString SAL_CALL SAXEventKeeperImpl::printBufferNodeTree()
 + OUString::number(m_vElementMarkBuffers.size())
 + "\nCurrentBufferNode: "
 + m_xXMLDocument->getNodeName(m_pCurrentBufferNode->getXMLElement())
-+ "\n" + printBufferNode(m_pRootBufferNode, 0);
++ "\n" + printBufferNode(m_pRootBufferNode.get(), 0);
 
 return rc;
 }
@@ -1071,7 +1071,7 @@ void SAL_CALL SAXEventKeeperImpl::endElement( const 
OUString& aName )
 }
 
 if ((m_pCurrentBlockingBufferNode != nullptr) ||
-(m_pCurrentBufferNode != m_pRootBufferNode) ||
+(m_pCurrentBufferNode != m_pRootBufferNode.get()) ||
 (!m_xXMLDocument->isCurrentElementEmpty()))
 {
 if (!m_bIsForwarding)
@@ -1084,14 +1084,14 @@ void SAL_CALL SAXEventKeeperImpl::endElement( const 
OUString& aName )
 * the current buffer node is waiting for the current element,
 * then let it notify.
 */
-if (bIsCurrent && (m_pCurrentBufferNode != m_pRootBufferNode))
+if (bIsCurrent && (m_pCurrentBufferNode != m_pRootBufferNode.get()))
 {
 BufferNode* pOldCurrentBufferNode = m_pCurrentBufferNode;
 m_pCurrentBufferNode = 
const_cast(m_pCurrentBufferNode->getParent());
 
 pOldCurrentBufferNode->setReceivedAll();
 
-if ((m_pCurrentBufferNode == m_pRootBufferNode) &&
+if ((m_pCurrentBufferNode == m_pRootBufferNode.get()) &&
 m_xSAXEventKeeperStatusChangeListener.is())
 {
 
m_xSAXEventKeeperStatusChangeListener->collectionStatusChanged(false);
@@ -1117,7 +1117,7 @@ void SAL_CALL SAXEventKeeperImpl::characters( const 
OUString& aChars )
 }
 
 if ((m_pCurrentBlockingBufferNode != nullptr) ||
-(m_pCurrentBufferNode != m_pRootBufferNode))
+(m_pCurrentBufferNode != m_pRootBufferNode.get()))
 {
 m_xCompressedDocumentHandler->com

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

2018-01-25 Thread Mike Kaganski
 sw/qa/extras/rtfexport/data/tdf115180.docx  |binary
 sw/qa/extras/rtfexport/rtfexport3.cxx   |   15 +++
 sw/source/filter/inc/wrtswtbl.hxx   |1 +
 sw/source/filter/ww8/rtfattributeoutput.cxx |4 +++-
 4 files changed, 19 insertions(+), 1 deletion(-)

New commits:
commit d91236ad8fc74e1ec15c39b90660717ebab013ac
Author: Mike Kaganski 
Date:   Wed Jan 24 15:25:36 2018 +0300

tdf#115180: take table base width into account

Change-Id: I4238e6c757499e289193efa3498fb1e68d5f3e9c
Reviewed-on: https://gerrit.libreoffice.org/48501
Tested-by: Jenkins 
Reviewed-by: Mike Kaganski 

diff --git a/sw/qa/extras/rtfexport/data/tdf115180.docx 
b/sw/qa/extras/rtfexport/data/tdf115180.docx
new file mode 100644
index ..2e41c7a24a1d
Binary files /dev/null and b/sw/qa/extras/rtfexport/data/tdf115180.docx differ
diff --git a/sw/qa/extras/rtfexport/rtfexport3.cxx 
b/sw/qa/extras/rtfexport/rtfexport3.cxx
index c8941ed26633..870650ab9b88 100644
--- a/sw/qa/extras/rtfexport/rtfexport3.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport3.cxx
@@ -80,6 +80,21 @@ DECLARE_RTFEXPORT_TEST(testTdf114333, "tdf114333.rtf")
 CPPUNIT_ASSERT_EQUAL(sal_Int32(8498), getProperty(xTable, 
"Width"));
 }
 
+DECLARE_RTFEXPORT_TEST(testTdf115180, "tdf115180.docx")
+{
+// On export to RTF, column separator positions were written without 
taking base width
+// into account and then arrived huge, ~64000, which resulted in wrong 
table and cell widths
+
+sal_Int32 rowWidth = parseDump("/root/page/body/tab/row/infos/bounds", 
"width").toInt32();
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Row width", sal_Int32(9360), rowWidth);
+sal_Int32 cell1Width
+= parseDump("/root/page/body/tab/row/cell[1]/infos/bounds", 
"width").toInt32();
+CPPUNIT_ASSERT_EQUAL_MESSAGE("First cell width", sal_Int32(9142), 
cell1Width);
+sal_Int32 cell2Width
+= parseDump("/root/page/body/tab/row/cell[2]/infos/bounds", 
"width").toInt32();
+CPPUNIT_ASSERT_EQUAL_MESSAGE("First cell width", sal_Int32(218), 
cell2Width);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/inc/wrtswtbl.hxx 
b/sw/source/filter/inc/wrtswtbl.hxx
index ee1cbd771537..20b9554c582a 100644
--- a/sw/source/filter/inc/wrtswtbl.hxx
+++ b/sw/source/filter/inc/wrtswtbl.hxx
@@ -286,6 +286,7 @@ public:
 
 long GetAbsHeight(long nRawWidth, size_t nRow, sal_uInt16 nRowSpan) const;
 
+double GetAbsWidthRatio() const { return m_nTabWidth == m_nBaseWidth ? 1.0 
: double(m_nTabWidth) / m_nBaseWidth; }
 protected:
 long GetLineHeight( const SwTableLine *pLine );
 static long GetLineHeight( const SwTableBox *pBox );
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx 
b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 770ae936c824..8e15fe6c9aed 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -721,6 +721,7 @@ void RtfAttributeOutput::TableDefinition(
 }
 
 // The cell-dependent properties
+const double fWidthRatio = m_pTableWrt->GetAbsWidthRatio();
 const SwWriteTableRows& aRows = m_pTableWrt->GetRows();
 SwWriteTableRow* pRow = aRows[pTableTextNodeInfoInner->getRow()];
 SwTwips nSz = 0;
@@ -740,7 +741,8 @@ void RtfAttributeOutput::TableDefinition(
 // value of nSz is needed.
 nSz += pCellFormat->GetFrameSize().GetWidth();
 m_aRowDefs.append(OOO_STRING_SVTOOLS_RTF_CELLX);
-
m_aRowDefs.append(static_cast(pFormat->GetLRSpace().GetLeft() + 
nSz));
+
m_aRowDefs.append(static_cast(pFormat->GetLRSpace().GetLeft()
+ + rtl::math::round(nSz * 
fWidthRatio)));
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: CustomTarget_html.mk help3xsl/default.css help3xsl/online_transform.xsl

2018-01-25 Thread Ilmari Lauhakangas
 CustomTarget_html.mk  |2 +-
 help3xsl/default.css  |   18 +-
 help3xsl/online_transform.xsl |2 +-
 3 files changed, 11 insertions(+), 11 deletions(-)

New commits:
commit 67a993c05d19976f5ed347b16584d29d6866a870
Author: Ilmari Lauhakangas 
Date:   Wed Jan 24 15:27:16 2018 +0200

Module names must stay uppercase due to DbPAR=MODULE

Change-Id: I10cea1b204b20d482abec6a8f66d5cfee6cf6dfe
Reviewed-on: https://gerrit.libreoffice.org/48509
Reviewed-by: Olivier Hallot 
Tested-by: Olivier Hallot 

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index 0c71db255..479eab889 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -12,7 +12,7 @@ $(eval $(call 
gb_CustomTarget_CustomTarget,helpcontent2/help3xsl))
 # HACK!!
 html_TREE_MODULES := sbasic scalc schart shared simpress smath swriter
 html_TEXT_MODULES := $(html_TREE_MODULES) sdatabase sdraw
-html_BMARK_MODULES := swriter:writer scalc:calc simpress:impress sdraw:draw 
shared/explorer/database:base smath:math schart:chart sbasic:basic shared:shared
+html_BMARK_MODULES := swriter:WRITER scalc:CALC simpress:IMPRESS sdraw:DRAW 
shared/explorer/database:BASE smath:MATH schart:CHART sbasic:BASIC shared:SHARED
 
 $(eval $(call gb_CustomTarget_register_targets,helpcontent2/help3xsl,\
hid2file.js \
diff --git a/help3xsl/default.css b/help3xsl/default.css
index 70af31efb..9ddb07c36 100644
--- a/help3xsl/default.css
+++ b/help3xsl/default.css
@@ -369,63 +369,63 @@ aside input[type=checkbox]:checked ~ .contents-treeview {
 font-weight: bold;
 color: #18A303;
 }
-#writer::before {
+#WRITER::before {
 content: "WRITER";
 display: block;
 font-size: 22px;
 font-weight: bold;
 color: #18A303;
 }
-#calc::before {
+#CALC::before {
 content: "CALC";
 display: block;
 font-size: 22px;
 font-weight: bold;
 color: #18A303;
 }
-#impress::before {
+#IMPRESS::before {
 content: "IMPRESS";
 display: block;
 font-size: 22px;
 font-weight: bold;
 color: #18A303;
 }
-#draw::before {
+#DRAW::before {
 content: "DRAW";
 display: block;
 font-size: 22px;
 font-weight: bold;
 color: #18A303;
 }
-#base::before {
+#BASE::before {
 content: "BASE";
 display: block;
 font-size: 22px;
 font-weight: bold;
 color: #18A303;
 }
-#math::before {
+#MATH::before {
 content: "MATH";
 display: block;
 font-size: 22px;
 font-weight: bold;
 color: #18A303;
 }
-#chart::before {
+#CHART::before {
 content: "CHART";
 display: block;
 font-size: 22px;
 font-weight: bold;
 color: #18A303;
 }
-#basic::before {
+#BASIC::before {
 content: "BASIC";
 display: block;
 font-size: 22px;
 font-weight: bold;
 color: #18A303;
 }
-#shared::before {
+#SHARED::before {
 content: "GLOBAL";
 display: block;
 font-size: 22px;
diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl
index c1764e573..acdc6febb 100644
--- a/help3xsl/online_transform.xsl
+++ b/help3xsl/online_transform.xsl
@@ -332,7 +332,7 @@
 }
 });
 }
-var modules = [ 'calc', 'writer', 'impress', 'draw', 'base', 'math', 
'chart', 'basic', 'shared' ];
+var modules = [ 'CALC', 'WRITER', 'IMPRESS', 'DRAW', 'BASE', 'MATH', 
'CHART', 'BASIC', 'SHARED' ];
 // options for List.js http://listjs.com/
 var options = {
 valueNames: modules,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2018-01-25 Thread Ilmari Lauhakangas
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit da7c0245bf0fd6cca7a589f7cf7e0b39412aa577
Author: Ilmari Lauhakangas 
Date:   Wed Jan 24 15:27:16 2018 +0200

Updated core
Project: help  67a993c05d19976f5ed347b16584d29d6866a870

Module names must stay uppercase due to DbPAR=MODULE

Change-Id: I10cea1b204b20d482abec6a8f66d5cfee6cf6dfe
Reviewed-on: https://gerrit.libreoffice.org/48509
Reviewed-by: Olivier Hallot 
Tested-by: Olivier Hallot 

diff --git a/helpcontent2 b/helpcontent2
index 94375babd75d..67a993c05d19 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 94375babd75d8b611311bab682f9017e0485d19b
+Subproject commit 67a993c05d19976f5ed347b16584d29d6866a870
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-25 Thread Michael Stahl
 sw/source/core/doc/DocumentRedlineManager.cxx |   22 --
 sw/source/core/inc/DocumentRedlineManager.hxx |3 +--
 2 files changed, 13 insertions(+), 12 deletions(-)

New commits:
commit 61e048808873c4edea983de0ab54366cd41e2082
Author: Michael Stahl 
Date:   Thu Jan 25 12:13:50 2018 +0100

sw: uninitialised DocumentRedlineManager::bHideLinineTooltips

(regression from 86e3f95cff4d3dad48d64e50e0c4b05034fa7064)

Change-Id: I48db6f070d7cf5ef0071952ad34822f75d472a21

diff --git a/sw/source/core/doc/DocumentRedlineManager.cxx 
b/sw/source/core/doc/DocumentRedlineManager.cxx
index d43b5f1cb855..166152f275b7 100644
--- a/sw/source/core/doc/DocumentRedlineManager.cxx
+++ b/sw/source/core/doc/DocumentRedlineManager.cxx
@@ -606,14 +606,16 @@ namespace
 namespace sw
 {
 
-DocumentRedlineManager::DocumentRedlineManager( SwDoc& i_rSwdoc ) : m_rDoc( 
i_rSwdoc ),
-
meRedlineFlags(RedlineFlags::ShowInsert | RedlineFlags::ShowDelete),
-
mpRedlineTable( new SwRedlineTable ),
-
mpExtraRedlineTable ( new SwExtraRedlineTable ),
-
mpAutoFormatRedlnComment( nullptr ),
-
mbIsRedlineMove(false),
-
mbReadlineChecked(false),
-
mnAutoFormatRedlnCommentNo( 0 )
+DocumentRedlineManager::DocumentRedlineManager(SwDoc& i_rSwdoc)
+: m_rDoc(i_rSwdoc)
+, meRedlineFlags(RedlineFlags::ShowInsert | RedlineFlags::ShowDelete)
+, mpRedlineTable(new SwRedlineTable)
+, mpExtraRedlineTable(new SwExtraRedlineTable)
+, mpAutoFormatRedlnComment(nullptr)
+, mbIsRedlineMove(false)
+, mbReadlineChecked(false)
+, mnAutoFormatRedlnCommentNo(0)
+, m_bHideInlineTooltips(false)
 {
 }
 
@@ -2719,12 +2721,12 @@ void 
DocumentRedlineManager::checkRedlining(RedlineFlags& _rReadlineMode)
 
 bool DocumentRedlineManager::IsHideInlineTooltips()
 {
-return bHideInlineTooltips;
+return m_bHideInlineTooltips;
 }
 
 void DocumentRedlineManager::SetHideInlineTooltips(bool bSet)
 {
-bHideInlineTooltips = bSet;
+m_bHideInlineTooltips = bSet;
 }
 
 DocumentRedlineManager::~DocumentRedlineManager()
diff --git a/sw/source/core/inc/DocumentRedlineManager.hxx 
b/sw/source/core/inc/DocumentRedlineManager.hxx
index 26c8050dbb2c..52be64fa7d28 100644
--- a/sw/source/core/inc/DocumentRedlineManager.hxx
+++ b/sw/source/core/inc/DocumentRedlineManager.hxx
@@ -30,8 +30,6 @@ namespace sw
 
 class DocumentRedlineManager : public IDocumentRedlineAccess
 {
-bool bHideInlineTooltips : 1;
-
 public:
 DocumentRedlineManager( SwDoc& i_rSwdoc );
 
@@ -144,6 +142,7 @@ private:
 sal_uInt16 mnAutoFormatRedlnCommentNo;  /**< SeqNo for conjoining of 
AutoFormat-Redlines.
  by the UI. Managed by SwAutoFormat! */
 css::uno::Sequence  maRedlinePasswd;
+bool m_bHideInlineTooltips : 1;
 };
 
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-25 Thread Milian Wolff
 configure.ac   |4 -
 vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx |9 --
 vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.hxx |3 
 vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx |   98 +++--
 vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.hxx |   29 +--
 vcl/unx/gtk3_kde5/gtk3_kde5_gtkinst.cxx|6 -
 6 files changed, 101 insertions(+), 48 deletions(-)

New commits:
commit cbf0c689d41ba11f37e557c10db7976f8318d43c
Author: Milian Wolff 
Date:   Wed Jan 24 11:43:20 2018 +0100

Undo "check for boost/process/child.hpp in configure.ac if 
--enable-gtk3-kde5"

This reverts commit c7a1320593191e8359aa64d8e262948da085d358.
It's no longer required since we ported away from boost.:process

Change-Id: I53c5b994c3ba2801823ba0d6ab25f43223db1476
Reviewed-on: https://gerrit.libreoffice.org/48491
Tested-by: Jenkins 
Reviewed-by: Thorsten Behrens 

diff --git a/configure.ac b/configure.ac
index 3de79ab4d192..2780d20f7b9b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8716,10 +8716,6 @@ if test "$with_system_boost" = "yes"; then
[AC_MSG_ERROR(boost/shared_ptr.hpp not found. install boost)], [])
 AC_CHECK_HEADER(boost/spirit/include/classic_core.hpp, [],
[AC_MSG_ERROR(boost/spirit/include/classic_core.hpp not found. install 
boost >= 1.36)], [])
-if test "x$enable_gtk3_kde5" = "xyes"; then
-AC_CHECK_HEADER(boost/process/child.hpp, [],
-   [AC_MSG_ERROR(boost/process/child.hpp not found. install boost >= 
1.64)], [])
-fi
 CXXFLAGS=$save_CXXFLAGS
 AC_LANG_POP([C++])
 # this is in m4/ax_boost_base.m4
commit 068f244222edcc5916fe864a0265ab6ccb4e43d2
Author: Milian Wolff 
Date:   Wed Jan 24 11:35:20 2018 +0100

gtk3_kde5: port away from boost::process

While this uglifies the code, it removes a dependency on newer
boost 1.64+ which ships boost::process. This helps on systems
where LO is linked against system boost and an older version
of boost is used.

Additionally, and this is the main motivation, this makes it
easier to backport these changes to 5.2, where the bundled boost
is also only at 1.60.

To keep the required changes at a minimum, the osl_* API for
reading from/writing to the stdout/stdin of the helper process,
we buffer the responses on a line-by-line basis. Note that one
cannot simply reuse osl_readLine on the non-seekable oslFileHandle.
Instead, we have to roll our own simplistic readLine implementation...

Change-Id: I1197e38cb2416e926d8ba985accd6c10d78bcc52
Reviewed-on: https://gerrit.libreoffice.org/48490
Tested-by: Jenkins 
Reviewed-by: Thorsten Behrens 

diff --git a/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx 
b/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx
index 7372d476f55e..8c983996b791 100644
--- a/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx
+++ b/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx
@@ -42,13 +42,6 @@
 
 #include 
 
-#include 
-
-#include 
-#include 
-#include 
-#include 
-
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::ui::dialogs;
 using namespace ::com::sun::star::ui::dialogs::TemplateDescription;
@@ -57,8 +50,6 @@ using namespace 
::com::sun::star::ui::dialogs::CommonFilePickerElementIds;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::uno;
-namespace bp = boost::process;
-namespace bf = boost::filesystem;
 
 // helper functions
 
diff --git a/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.hxx 
b/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.hxx
index 80261ded9f9b..740382d9ec49 100644
--- a/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.hxx
+++ b/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.hxx
@@ -32,9 +32,6 @@
 
 #include 
 
-#include 
-#include 
-
 #include "gtk3_kde5_filepicker_ipc.hxx"
 
 #include 
diff --git a/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx 
b/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx
index fd9c1c7b64e1..21690c5e74f8 100644
--- a/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx
+++ b/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx
@@ -26,6 +26,7 @@
 #include 
 
 #include 
+#include 
 
 #include 
 
@@ -41,38 +42,33 @@
 #include 
 
 #include 
-#include 
-#include 
-#include 
 
 using namespace ::com::sun::star::ui::dialogs;
 
-namespace bp = boost::process;
-namespace bf = boost::filesystem;
-
 // helper functions
 
 namespace
 {
-bf::path applicationDirPath()
+OUString applicationDirPath()
 {
 OUString applicationFilePath;
 osl_getExecutableFile(&applicationFilePath.pData);
 OUString applicationSystemPath;
 osl_getSystemPathFromFileURL(applicationFilePath.pData, 
&applicationSystemPath.pData);
-auto sysPath = applicationSystemPath.toUtf8();
-auto ret = bf::path(sysPath.getStr(), sysPath.getStr() + 
sysPath.getLength());
+const auto utf8Path = applicationSystemPath.toUtf8();
+auto ret = boost::filesystem::path(utf8Path.getStr(), utf8Path.getStr() + 
utf8Path.

[Libreoffice-commits] core.git: compilerplugins/clang sdext/source

2018-01-25 Thread Noel Grandin
 compilerplugins/clang/datamembershadow.cxx |2 --
 sdext/source/presenter/PresenterPane.cxx   |   11 +--
 sdext/source/presenter/PresenterPane.hxx   |1 -
 sdext/source/presenter/PresenterPaneBase.cxx   |9 -
 sdext/source/presenter/PresenterPaneBase.hxx   |2 --
 sdext/source/presenter/PresenterSpritePane.cxx |5 -
 sdext/source/presenter/PresenterSpritePane.hxx |2 --
 7 files changed, 9 insertions(+), 23 deletions(-)

New commits:
commit 390fad39a8f945c848ff998d9f75720318781123
Author: Noel Grandin 
Date:   Thu Jan 25 08:53:14 2018 +0200

loplugin:datamembershadow in PresenterPane

the subclass field is just a copy of the parent field, so drop the
subclass, and consequently simply the CreateCanvases method, we don't
need to pass the parameter down, can just access the parent field.

Change-Id: I3be448a06b32d01cdda4fc36b78cafb4488e2913
Reviewed-on: https://gerrit.libreoffice.org/48553
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/compilerplugins/clang/datamembershadow.cxx 
b/compilerplugins/clang/datamembershadow.cxx
index 54e671daffa1..e89a44214339 100644
--- a/compilerplugins/clang/datamembershadow.cxx
+++ b/compilerplugins/clang/datamembershadow.cxx
@@ -80,8 +80,6 @@ bool DataMemberShadow::VisitFieldDecl(FieldDecl const * 
fieldDecl)
 return true;
 if (loplugin::isSamePathname(aFileName, SRCDIR 
"/sd/source/ui/view/viewoverlaymanager.cxx"))
 return true;
-if (loplugin::isSamePathname(aFileName, SRCDIR 
"/sdext/source/presenter/PresenterSpritePane.hxx"))
-return true;
 if (loplugin::isSamePathname(aFileName, SRCDIR 
"/store/source/stortree.hxx")
 || loplugin::isSamePathname(aFileName, SRCDIR 
"/store/source/stordata.hxx"))
 return true;
diff --git a/sdext/source/presenter/PresenterPane.cxx 
b/sdext/source/presenter/PresenterPane.cxx
index e806c7e58a51..e539d98b4373 100644
--- a/sdext/source/presenter/PresenterPane.cxx
+++ b/sdext/source/presenter/PresenterPane.cxx
@@ -128,27 +128,26 @@ void SAL_CALL PresenterPane::windowPaint (const 
awt::PaintEvent& rEvent)
 
 
 void PresenterPane::CreateCanvases (
-const Reference& rxParentWindow,
 const Reference& rxParentCanvas)
 {
 if ( ! mxPresenterHelper.is())
 return;
-if ( ! rxParentWindow.is())
+if ( ! mxParentWindow.is())
 return;
 if ( ! rxParentCanvas.is())
 return;
 
 mxBorderCanvas = mxPresenterHelper->createSharedCanvas(
 rxParentCanvas,
-rxParentWindow,
+mxParentWindow,
 Reference(rxParentCanvas, UNO_QUERY),
-rxParentWindow,
+mxParentWindow,
 mxBorderWindow);
 mxContentCanvas = mxPresenterHelper->createSharedCanvas(
 rxParentCanvas,
-rxParentWindow,
+mxParentWindow,
 Reference(rxParentCanvas, UNO_QUERY),
-rxParentWindow,
+mxParentWindow,
 mxContentWindow);
 
 PaintBorder(mxBorderWindow->getPosSize());
diff --git a/sdext/source/presenter/PresenterPane.hxx 
b/sdext/source/presenter/PresenterPane.hxx
index dc12aa920abc..681245389be9 100644
--- a/sdext/source/presenter/PresenterPane.hxx
+++ b/sdext/source/presenter/PresenterPane.hxx
@@ -76,7 +76,6 @@ private:
 css::awt::Rectangle maBoundingBox;
 
 virtual void CreateCanvases (
-const css::uno::Reference& rxParentWindow,
 const css::uno::Reference& 
rxParentCanvas) override;
 
 void Invalidate (
diff --git a/sdext/source/presenter/PresenterPaneBase.cxx 
b/sdext/source/presenter/PresenterPaneBase.cxx
index 4f8dc23e2573..f6174652b103 100644
--- a/sdext/source/presenter/PresenterPaneBase.cxx
+++ b/sdext/source/presenter/PresenterPaneBase.cxx
@@ -197,7 +197,7 @@ void SAL_CALL PresenterPaneBase::initialize (const 
Sequence& rArguments)
 5);
 }
 
-CreateWindows(mxParentWindow, bIsWindowVisibleOnCreation);
+CreateWindows(bIsWindowVisibleOnCreation);
 
 if (mxBorderWindow.is())
 {
@@ -205,7 +205,7 @@ void SAL_CALL PresenterPaneBase::initialize (const 
Sequence& rArguments)
 mxBorderWindow->addPaintListener(this);
 }
 
-CreateCanvases(mxParentWindow, xParentCanvas);
+CreateCanvases(xParentCanvas);
 
 // Raise new windows.
 ToTop();
@@ -265,14 +265,13 @@ void SAL_CALL PresenterPaneBase::disposing (const 
lang::EventObject& rEvent)
 
 
 void PresenterPaneBase::CreateWindows (
-const Reference& rxParentWindow,
 const bool bIsWindowVisibleOnCreation)
 {
-if (mxPresenterHelper.is() && rxParentWindow.is())
+if (mxPresenterHelper.is() && mxParentWindow.is())
 {
 
 mxBorderWindow = mxPresenterHelper->createWindow(
-rxParentWindow,
+mxParentWindow,
 false,
 bIsWindowVisibleOnCreation,
 false,
diff --git a/sdext/source/presenter/PresenterPaneBase.hxx 
b/sdext/source/presenter/Presen

[Libreoffice-commits] core.git: officecfg/registry sc/inc sc/sdi sc/source sc/uiconfig

2018-01-25 Thread Gulsah Kose
 officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu |5 +
 sc/inc/document.hxx   |7 ++
 sc/inc/sc.hrc |3 -
 sc/sdi/cellsh.sdi |1 
 sc/sdi/scalc.sdi  |   18 ++
 sc/source/core/data/documen3.cxx  |   26 
++
 sc/source/ui/view/cellsh.cxx  |   13 +
 sc/source/ui/view/cellsh1.cxx |1 
 sc/uiconfig/scalc/popupmenu/cell.xml  |1 
 9 files changed, 74 insertions(+), 1 deletion(-)

New commits:
commit a626e249033fb9a7ac117e28f3152cedf98b61fc
Author: Gulsah Kose 
Date:   Tue Jan 16 01:30:04 2018 +0300

[Pardus] tdf#108989 Add contextual manage names command.

If cursor in a named range .uno:DefineCurrentName command
appears on context menu. Opens manage names dialog.

This patch is sponsored by ULAKBIM/Pardus project.

Change-Id: I730fd427fa3d6f5c92563282ff8ca3c0e668eddd
Signed-off-by: Gulsah Kose 
Reviewed-on: https://gerrit.libreoffice.org/47925
Tested-by: Jenkins 

diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
index f87cc3f47f35..979f4a176698 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
@@ -1289,6 +1289,11 @@
   1
 
   
+  
+
+  ~Manage Names...
+
+  
   
 
   ~Insert Named Range or Expression...
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index c1c628fb451f..10b2bd45213f 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -252,6 +252,12 @@ enum CommentCaptionState
 MIXED   // There are comments in shown and hidden.
 };
 
+enum RangeNameScope
+{
+GLOBAL,// A range name can be defined
+SHEET  // with two scope on Manage Names dialog.
+};
+
 struct ScDocStat
 {
 OUString  aDocName;
@@ -606,6 +612,7 @@ public:
 SC_DLLPUBLIC ScRangeName*  GetRangeName() const;
 void   SetRangeName(SCTAB nTab, ScRangeName* pNew);
 void   SetRangeName( ScRangeName* pNewRangeName );
+bool   IsAddressInRangeName( RangeNameScope eScope, 
ScAddress& rAddress);
 
 /** Find a named expression / range name in either global or a local scope.
 @param  nTab
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index b20f0680711f..5c75ae6c8c45 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -301,7 +301,8 @@
 #define FID_INS_COLUMNS_AFTER   (INSERT_MENU_START + 21)
 #define FID_INS_ROWS_BEFORE (INSERT_MENU_START + 22)
 #define FID_INS_COLUMNS_BEFORE  (INSERT_MENU_START + 23)
-#define INSERT_MENU_END (INSERT_MENU_START + 24)
+#define FID_DEFINE_CURRENT_NAME (INSERT_MENU_START + 24)
+#define INSERT_MENU_END (INSERT_MENU_START + 25)
 
 #define FORMAT_MENU_START   (INSERT_MENU_END)
 #define FID_CELL_FORMAT (FORMAT_MENU_START)
diff --git a/sc/sdi/cellsh.sdi b/sc/sdi/cellsh.sdi
index b21769d8d258..4fc0a44f1da0 100644
--- a/sc/sdi/cellsh.sdi
+++ b/sc/sdi/cellsh.sdi
@@ -21,6 +21,7 @@ interface CellSelection
 {
 // slots which are disabled in the DrawShell {
 FID_DEFINE_NAME [ ExecMethod = ExecuteEdit; StateMethod = 
GetState; ]
+FID_DEFINE_CURRENT_NAME [ ExecMethod = ExecuteEdit; StateMethod = 
GetState; ]
 FID_ADD_NAME[ ExecMethod = ExecuteEdit; StateMethod = 
GetState; ]
 SID_DEFINE_COLROWNAMERANGES [ ExecMethod = ExecuteEdit; StateMethod = 
GetState; ]
 SID_OPENDLG_SOLVE   [ ExecMethod = Execute; StateMethod = 
GetState; ]
diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi
index 956bacaae8e3..0925e0483865 100644
--- a/sc/sdi/scalc.sdi
+++ b/sc/sdi/scalc.sdi
@@ -1184,6 +1184,24 @@ SfxVoidItem DefineName FID_DEFINE_NAME
 ]
 
 
+SfxVoidItem DefineCurrentName FID_DEFINE_CURRENT_NAME
+(SfxStringItem Name FID_DEFINE_CURRENT_NAME,SfxStringItem Symbol 
FN_PARAM_1,SfxStringItem Options FN_PARAM_2)
+[
+AutoUpdate = FALSE,
+FastCall = FALSE,
+ReadOnlyDoc = TRUE,
+Toggle = FALSE,
+Container = FALSE,
+RecordAbsolute = FALSE,
+RecordPerSet;
+
+AccelConfig = TRUE,
+MenuConfig = TRUE,
+ToolBoxConfig = TRUE,
+GroupId = SfxGroupId::Insert;
+]
+
+
 SfxVoidItem DefinePrintArea SID_DEFINE_PRINTAREA
 ()
 [
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index a018a065b1d2..f7f8687ca4b2 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -208,6 +208,32 @@ void ScDocument::SetRangeName( ScRangeName* pNewRangeName 

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

2018-01-25 Thread Julien Nabet
 svl/source/config/cjkoptions.cxx |   18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

New commits:
commit ec4de8ff110d6064303f4a1027e4d55c29c4db54
Author: Julien Nabet 
Date:   Thu Jan 25 09:00:02 2018 +0100

Simplify logic in cjkoptions

Following 
https://cgit.freedesktop.org/libreoffice/core/commit/?id=6a579702b1128372aa30c86156996e57ba73b2c8

Change-Id: I5e2528bc69065260dfce7ac8c29ba4aa76905bbe
Reviewed-on: https://gerrit.libreoffice.org/48554
Reviewed-by: Noel Grandin 
Tested-by: Julien Nabet 
Reviewed-by: Julien Nabet 

diff --git a/svl/source/config/cjkoptions.cxx b/svl/source/config/cjkoptions.cxx
index 58c9e0090626..a0af655e8950 100644
--- a/svl/source/config/cjkoptions.cxx
+++ b/svl/source/config/cjkoptions.cxx
@@ -116,15 +116,15 @@ SvtCJKOptions_Impl::SvtCJKOptions_Impl() :
 voidSvtCJKOptions_Impl::SetAll(bool bSet)
 {
 if (
-!(!bROCJKFont  &&
-!bROVerticalText &&
-!bROAsianTypography  &&
-!bROJapaneseFind &&
-!bRORuby &&
-!bROChangeCaseMap&&
-!bRODoubleLines  &&
-!bROEmphasisMarks&&
-!bROVerticalCallOut)
+bROCJKFont  ||
+bROVerticalText ||
+bROAsianTypography  ||
+bROJapaneseFind ||
+bRORuby ||
+bROChangeCaseMap||
+bRODoubleLines  ||
+bROEmphasisMarks||
+bROVerticalCallOut
)
 return;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-25 Thread Pranav Kant
 fpicker/source/office/iodlg.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 9711a8a35796d0d4ab4b69204bd4484686bf0707
Author: Pranav Kant 
Date:   Thu Jan 25 15:52:52 2018 +0530

lokdialog: Disable filepicker for LOK

We don't want people to browser their jails in the filepicker dialog.

Change-Id: I2fdd3d948cc1f193098492d1a310424ac2d49317

diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index 333c384734f1..d40f93214411 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -69,6 +69,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 
@@ -1797,6 +1798,9 @@ void SvtFileDialog::EnableControl( Control* _pControl, 
bool _bEnable )
 
 short SvtFileDialog::PrepareExecute()
 {
+if (comphelper::LibreOfficeKit::isActive())
+return 0;
+
 OUString aEnvValue;
 if ( getEnvironmentValue( "WorkDirMustContainRemovableMedia", aEnvValue ) 
&& aEnvValue == "1" )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - sfx2/source vcl/source

2018-01-25 Thread Pranav Kant
 sfx2/source/dialog/basedlgs.cxx |5 ++---
 vcl/source/window/dialog.cxx|5 ++---
 2 files changed, 4 insertions(+), 6 deletions(-)

New commits:
commit 3b22b8077d744f39ca5c202570d21f2f32f02b45
Author: Pranav Kant 
Date:   Thu Jan 25 14:34:19 2018 +0530

lokdialog: Fix incorrect dialog sizes sent to client

GetSizePixel triggers pending resize handler and gives more correct
sizes than GetOptimalSize(). Some of the dialog with inconsistencies in
sizes like EditStyle, Manage Changes, etc. are fixed with this patch.

Change-Id: I0661b7d2e98233edf0cd2c9c525b271d0724da08
(cherry picked from commit 668deca97d8dd049bb17b6d8b73c4ea73f7b8b9c)
Reviewed-on: https://gerrit.libreoffice.org/48560
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index 729e1fbbdb97..94b4225ddf7f 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -199,10 +199,9 @@ void SfxModalDialog::StateChanged( StateChangedType nType )
 // SfxModalDialog even though they are modeless, i.e., their 
Execute method
 // isn't called.
 SetLOKNotifier(SfxViewShell::Current());
-const Size aSize = GetOptimalSize();
 std::vector aItems;
 aItems.emplace_back("type", "dialog");
-aItems.emplace_back("size", aSize.toString());
+aItems.emplace_back("size", GetSizePixel().toString());
 if (!GetText().isEmpty())
 aItems.emplace_back("title", GetText().toUtf8());
 SfxViewShell::Current()->notifyWindow(GetLOKWindowId(), "created", 
aItems);
@@ -265,7 +264,7 @@ void SfxModelessDialog::StateChanged( StateChangedType 
nStateChange )
 SetLOKNotifier(pViewShell);
 std::vector aItems;
 aItems.emplace_back("type", "dialog");
-aItems.emplace_back("size", GetOptimalSize().toString());
+aItems.emplace_back("size", GetSizePixel().toString());
 if (!GetText().isEmpty())
 aItems.emplace_back("title", GetText().toUtf8());
 pViewShell->notifyWindow(GetLOKWindowId(), "created", aItems);
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index d2d20d1ef7cd..f9dbaa534f5f 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -895,10 +895,9 @@ bool Dialog::ImplStartExecuteModal()
 {
 if(const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier())
 {
-const Size aSize = GetOptimalSize();
 std::vector aItems;
 aItems.emplace_back("type", "dialog");
-aItems.emplace_back("size", aSize.toString());
+aItems.emplace_back("size", GetSizePixel().toString());
 if (!GetText().isEmpty())
 aItems.emplace_back("title", GetText().toUtf8());
 pNotifier->notifyWindow(GetLOKWindowId(), "created", aItems);
@@ -1284,7 +1283,7 @@ void Dialog::Resize()
 if (const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier())
 {
 std::vector aItems;
-aItems.emplace_back("size", GetOptimalSize().toString());
+aItems.emplace_back("size", GetSizePixel().toString());
 pNotifier->notifyWindow(GetLOKWindowId(), "size_changed", aItems);
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sfx2/source vcl/source

2018-01-25 Thread Pranav Kant
 sfx2/source/dialog/basedlgs.cxx |5 ++---
 vcl/source/window/dialog.cxx|5 ++---
 2 files changed, 4 insertions(+), 6 deletions(-)

New commits:
commit 668deca97d8dd049bb17b6d8b73c4ea73f7b8b9c
Author: Pranav Kant 
Date:   Thu Jan 25 14:34:19 2018 +0530

lokdialog: Fix incorrect dialog sizes sent to client

GetSizePixel triggers pending resize handler and gives more correct
sizes than GetOptimalSize(). Some of the dialog with inconsistencies in
sizes like EditStyle, Manage Changes, etc. are fixed with this patch.

Change-Id: I0661b7d2e98233edf0cd2c9c525b271d0724da08

diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index 9ed41424e133..02533e4fb22e 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -193,10 +193,9 @@ void SfxModalDialog::StateChanged( StateChangedType nType )
 // SfxModalDialog even though they are modeless, i.e., their 
Execute method
 // isn't called.
 SetLOKNotifier(SfxViewShell::Current());
-const Size aSize = GetOptimalSize();
 std::vector aItems;
 aItems.emplace_back("type", "dialog");
-aItems.emplace_back("size", aSize.toString());
+aItems.emplace_back("size", GetSizePixel().toString());
 if (!GetText().isEmpty())
 aItems.emplace_back("title", GetText().toUtf8());
 SfxViewShell::Current()->notifyWindow(GetLOKWindowId(), "created", 
aItems);
@@ -259,7 +258,7 @@ void SfxModelessDialog::StateChanged( StateChangedType 
nStateChange )
 SetLOKNotifier(pViewShell);
 std::vector aItems;
 aItems.emplace_back("type", "dialog");
-aItems.emplace_back("size", GetOptimalSize().toString());
+aItems.emplace_back("size", GetSizePixel().toString());
 if (!GetText().isEmpty())
 aItems.emplace_back("title", GetText().toUtf8());
 pViewShell->notifyWindow(GetLOKWindowId(), "created", aItems);
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index c61a41be32f1..272da360b503 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -886,10 +886,9 @@ bool Dialog::ImplStartExecuteModal()
 {
 if(const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier())
 {
-const Size aSize = GetOptimalSize();
 std::vector aItems;
 aItems.emplace_back("type", "dialog");
-aItems.emplace_back("size", aSize.toString());
+aItems.emplace_back("size", GetSizePixel().toString());
 if (!GetText().isEmpty())
 aItems.emplace_back("title", GetText().toUtf8());
 pNotifier->notifyWindow(GetLOKWindowId(), "created", aItems);
@@ -1256,7 +1255,7 @@ void Dialog::Resize()
 if (const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier())
 {
 std::vector aItems;
-aItems.emplace_back("size", GetOptimalSize().toString());
+aItems.emplace_back("size", GetSizePixel().toString());
 pNotifier->notifyWindow(GetLOKWindowId(), "size_changed", aItems);
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-25 Thread Noel Grandin
 xmloff/source/transform/TransformerBase.cxx |   52 
 xmloff/source/transform/TransformerBase.hxx |   19 +-
 2 files changed, 34 insertions(+), 37 deletions(-)

New commits:
commit f1a68998e11291d117140ea07f1da84b4309f2d4
Author: Noel Grandin 
Date:   Wed Jan 17 17:20:35 2018 +0200

loplugin:useuniqueptr in XMLTransformerBase

and flatten some members, no need to allocate separate object

Change-Id: I9f6b7ee89af935608424a88d9343d8bbebaaada1
Reviewed-on: https://gerrit.libreoffice.org/48513
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/xmloff/source/transform/TransformerBase.cxx 
b/xmloff/source/transform/TransformerBase.cxx
index 34864459a114..fd0f3ea903e6 100644
--- a/xmloff/source/transform/TransformerBase.cxx
+++ b/xmloff/source/transform/TransformerBase.cxx
@@ -175,9 +175,8 @@ XMLTransformerBase::XMLTransformerBase( 
XMLTransformerActionInit *pInit,
 ::xmloff::token::XMLTokenEnum *pTKMapInit )
 throw () :
 m_pNamespaceMap( new SvXMLNamespaceMap ),
-m_pReplaceNamespaceMap( new SvXMLNamespaceMap ),
-m_pElemActions( new XMLTransformerActions( pInit ) ),
-m_pTokenMap( new XMLTransformerTokenMap( pTKMapInit ) )
+m_ElemActions( pInit ),
+m_TokenMap( pTKMapInit )
 {
 GetNamespaceMap().Add( GetXMLToken(XML_NP_XLINK), 
GetXMLToken(XML_N_XLINK), XML_NAMESPACE_XLINK );
 GetNamespaceMap().Add( GetXMLToken(XML_NP_DC), GetXMLToken(XML_N_DC), 
XML_NAMESPACE_DC );
@@ -190,10 +189,6 @@ XMLTransformerBase::XMLTransformerBase( 
XMLTransformerActionInit *pInit,
 
 XMLTransformerBase::~XMLTransformerBase() throw ()
 {
-delete m_pNamespaceMap;
-delete m_pReplaceNamespaceMap;
-delete m_pElemActions;
-delete m_pTokenMap;
 }
 
 void SAL_CALL XMLTransformerBase::startDocument()
@@ -209,7 +204,7 @@ void SAL_CALL XMLTransformerBase::endDocument()
 void SAL_CALL XMLTransformerBase::startElement( const OUString& rName,
  const Reference< XAttributeList >& 
rAttrList )
 {
-SvXMLNamespaceMap *pRewindMap = nullptr;
+std::unique_ptr pRewindMap;
 
 // Process namespace attributes. This must happen before creating the
 // context, because namespace declaration apply to the element name itself.
@@ -225,8 +220,8 @@ void SAL_CALL XMLTransformerBase::startElement( const 
OUString& rName,
 {
 if( !pRewindMap )
 {
-pRewindMap = m_pNamespaceMap;
-m_pNamespaceMap = new SvXMLNamespaceMap( *m_pNamespaceMap );
+pRewindMap = std::move(m_pNamespaceMap);
+m_pNamespaceMap.reset( new SvXMLNamespaceMap( *pRewindMap ) );
 }
 const OUString& rAttrValue = xAttrList->getValueByIndex( i );
 
@@ -247,7 +242,7 @@ void SAL_CALL XMLTransformerBase::startElement( const 
OUString& rName,
 if( XML_NAMESPACE_UNKNOWN == nKey  )
 nKey = m_pNamespaceMap->Add( aPrefix, rAttrValue );
 
-const OUString& rRepName = m_pReplaceNamespaceMap->GetNameByKey( 
nKey );
+const OUString& rRepName = m_vReplaceNamespaceMap.GetNameByKey( 
nKey );
 if( !rRepName.isEmpty() )
 {
 if( !pMutableAttrList )
@@ -269,9 +264,9 @@ void SAL_CALL XMLTransformerBase::startElement( const 
OUString& rName,
 // If there are contexts already, call a CreateChildContext at the topmost
 // context. Otherwise, create a default context.
 ::rtl::Reference < XMLTransformerContext > xContext;
-if( !m_pContexts.empty() )
+if( !m_vContexts.empty() )
 {
-xContext = m_pContexts.back()->CreateChildContext( nPrefix,
+xContext = m_vContexts.back()->CreateChildContext( nPrefix,
   aLocalName,
   rName,
   xAttrList );
@@ -287,10 +282,10 @@ void SAL_CALL XMLTransformerBase::startElement( const 
OUString& rName,
 
 // Remember old namespace map.
 if( pRewindMap )
-xContext->PutRewindMap( pRewindMap );
+xContext->PutRewindMap( pRewindMap.release() );
 
 // Push context on stack.
-m_pContexts.push_back( xContext );
+m_vContexts.push_back( xContext );
 
 // Call a startElement at the new context.
 xContext->StartElement( xAttrList );
@@ -302,10 +297,10 @@ rName
 #endif
 )
 {
-if( !m_pContexts.empty() )
+if( !m_vContexts.empty() )
 {
 // Get topmost context
-::rtl::Reference< XMLTransformerContext > xContext = 
m_pContexts.back();
+::rtl::Reference< XMLTransformerContext > xContext = 
m_vContexts.back();
 
 #if OSL_DEBUG_LEVEL > 0
 OSL_ENSURE( xContext->GetQName() == rName,
@@ -316,7 +311,7 @@ rName
 xContext->EndElement();
 
 // and remove it from the stack.
-m_pContexts.pop_back(

[Libreoffice-commits] core.git: compilerplugins/clang editeng/source include/editeng

2018-01-25 Thread Noel Grandin
 compilerplugins/clang/datamembershadow.cxx |5 +
 editeng/source/uno/unotext.cxx |2 +-
 include/editeng/unotext.hxx|2 +-
 3 files changed, 3 insertions(+), 6 deletions(-)

New commits:
commit fbe2d12f19dac29107e89ce4b3153fa6922633e5
Author: Noel Grandin 
Date:   Wed Jan 24 16:39:11 2018 +0200

loplugin:datamembershadow in SvxUnoTextRangeBase

make the superclass member private

Change-Id: I665d87bfdfc3d7804cd4cac6108f9bc65b9ca2b5
Reviewed-on: https://gerrit.libreoffice.org/48552
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/compilerplugins/clang/datamembershadow.cxx 
b/compilerplugins/clang/datamembershadow.cxx
index 520e1195f0ca..54e671daffa1 100644
--- a/compilerplugins/clang/datamembershadow.cxx
+++ b/compilerplugins/clang/datamembershadow.cxx
@@ -19,6 +19,7 @@
  * Check for data member being shadowed.
  *
  * @TODO check for any members in superclass hierarchy with duplicate names,
+ *   regardless of their visibility,
  *   more specific names will make the code easier to read
  */
 namespace
@@ -84,12 +85,8 @@ bool DataMemberShadow::VisitFieldDecl(FieldDecl const * 
fieldDecl)
 if (loplugin::isSamePathname(aFileName, SRCDIR 
"/store/source/stortree.hxx")
 || loplugin::isSamePathname(aFileName, SRCDIR 
"/store/source/stordata.hxx"))
 return true;
-if (loplugin::isSamePathname(aFileName, SRCDIR "/svx/source/inc/cell.hxx"))
-return true;
 if (loplugin::isSamePathname(aFileName, SRCDIR 
"/sw/source/uibase/inc/dbtree.hxx"))
 return true;
-if (loplugin::isSamePathname(aFileName, SRCDIR 
"/vcl/unx/generic/print/genpspgraphics.cxx"))
-return true;
 
 const CXXRecordDecl* parentCXXRecordDecl = 
dyn_cast(fieldDecl->getDeclContext());
 if (!parentCXXRecordDecl) {
diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx
index 7859b4f1185e..6b6127c92ec8 100644
--- a/editeng/source/uno/unotext.cxx
+++ b/editeng/source/uno/unotext.cxx
@@ -208,7 +208,7 @@ void CheckSelection( struct ESelection& rSel, SvxEditSource 
*pEdit ) throw()
 UNO3_GETIMPLEMENTATION_IMPL( SvxUnoTextRangeBase );
 
 SvxUnoTextRangeBase::SvxUnoTextRangeBase(const SvxItemPropertySet* _pSet)
-: mpEditSource(nullptr) , mpPropSet(_pSet)
+: mpPropSet(_pSet), mpEditSource(nullptr)
 {
 }
 
diff --git a/include/editeng/unotext.hxx b/include/editeng/unotext.hxx
index 4ee3bf4fc11d..4b4eb127aae0 100644
--- a/include/editeng/unotext.hxx
+++ b/include/editeng/unotext.hxx
@@ -250,11 +250,11 @@ class EDITENG_DLLPUBLIC SvxUnoTextRangeBase : public 
css::text::XTextRange,
 {
 friend class SvxUnoTextRangeEnumeration;
 friend class ::accessibility::AccessibleEditableTextPara;
+const SvxItemPropertySet* mpPropSet;
 
 protected:
 SvxEditSource*  mpEditSource;
 ESelection  maSelection;
-const SvxItemPropertySet* mpPropSet;
 
 /// @throws css::beans::UnknownPropertyException
 /// @throws css::beans::PropertyVetoException
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: desktop/source sfx2/source

2018-01-25 Thread Jan Holesovsky
 desktop/source/lib/init.cxx  |1 +
 sfx2/source/control/unoctitm.cxx |3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

New commits:
commit dd42329b4a204d9d9dcac102095f144ea3eca791
Author: Jan Holesovsky 
Date:   Wed Jan 24 20:07:40 2018 +0100

lok: Send the enabled / disabled state of .uno:TransformDialog.

Change-Id: If2d8e0da6c289deb65dc8a6b38a21dfd5bbfc1bd
Reviewed-on: https://gerrit.libreoffice.org/48534
Tested-by: Jenkins 
Reviewed-by: Jan Holesovsky 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 381e727ee954..dfff8646fef6 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1762,6 +1762,7 @@ static void doc_iniUnoCommands ()
 OUString(".uno:OutlineBullet"),
 OUString(".uno:InsertIndexesEntry"),
 OUString(".uno:DocumentRepair"),
+OUString(".uno:TransformDialog"),
 OUString(".uno:InsertPageHeader"),
 OUString(".uno:InsertPageFooter")
 };
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 2193914465f2..894b88f79dbd 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -1092,7 +1092,8 @@ static void InterceptLOKStateChangeEvent(const 
SfxViewFrame* pViewFrame, const c
  aEvent.FeatureURL.Path == "FontDialog" ||
  aEvent.FeatureURL.Path == "ParagraphDialog" ||
  aEvent.FeatureURL.Path == "OutlineBullet" ||
- aEvent.FeatureURL.Path == "InsertIndexesEntry")
+ aEvent.FeatureURL.Path == "InsertIndexesEntry" ||
+ aEvent.FeatureURL.Path == "TransformDialog")
 
 {
 aBuffer.append(aEvent.IsEnabled ? OUString("enabled") : 
OUString("disabled"));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-25 Thread Jan Holesovsky
 sd/source/ui/func/fuarea.cxx   |2 +-
 sd/source/ui/func/fuline.cxx   |2 +-
 sd/source/ui/func/futransf.cxx |5 +++--
 3 files changed, 5 insertions(+), 4 deletions(-)

New commits:
commit 7616b3dd942efad8fa20b30ab3a0833a21501ffd
Author: Jan Holesovsky 
Date:   Wed Jan 24 19:13:46 2018 +0100

lokdialog: Parents for the Impress async dialogs.

After 072e3ce1cfea5bb61cc5f3001c288df6deb45613, the dialogs must have 
parents,
otherwise the LOK notification does not work for them.

Change-Id: I46774d05a7d47adaaa0e06104541e47daf68f3db
Reviewed-on: https://gerrit.libreoffice.org/48533
Tested-by: Jenkins 
Reviewed-by: Jan Holesovsky 

diff --git a/sd/source/ui/func/fuarea.cxx b/sd/source/ui/func/fuarea.cxx
index 042de7aa239f..29d8cb5311a3 100644
--- a/sd/source/ui/func/fuarea.cxx
+++ b/sd/source/ui/func/fuarea.cxx
@@ -65,7 +65,7 @@ void FuArea::DoExecute( SfxRequest& rReq )
 mpView->GetAttributes( aNewAttr );
 
 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-VclPtr pDlg(pFact ? 
pFact->CreateSvxAreaTabDialog(nullptr, &aNewAttr, mpDoc, true) : nullptr);
+VclPtr pDlg(pFact ? 
pFact->CreateSvxAreaTabDialog(mpViewShell->GetActiveWindow(), &aNewAttr, mpDoc, 
true) : nullptr);
 if (!pDlg)
 {
 mpViewShell->Cancel();
diff --git a/sd/source/ui/func/fuline.cxx b/sd/source/ui/func/fuline.cxx
index 9fa501ce52c4..d4511fdcc610 100644
--- a/sd/source/ui/func/fuline.cxx
+++ b/sd/source/ui/func/fuline.cxx
@@ -79,7 +79,7 @@ void FuLine::DoExecute( SfxRequest& rReq )
 
 bool bHasMarked = mpView->AreObjectsMarked();
 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-VclPtr pDlg(pFact ? 
pFact->CreateSvxLineTabDialog(nullptr,pNewAttr.get(),mpDoc,pObj,bHasMarked) : 
nullptr);
+VclPtr pDlg(pFact ? 
pFact->CreateSvxLineTabDialog(mpViewShell->GetActiveWindow(), pNewAttr.get(), 
mpDoc, pObj, bHasMarked) : nullptr);
 if (!pDlg)
 {
 mpViewShell->Cancel();
diff --git a/sd/source/ui/func/futransf.cxx b/sd/source/ui/func/futransf.cxx
index 9dddef1dde4b..ef2894cc37f5 100644
--- a/sd/source/ui/func/futransf.cxx
+++ b/sd/source/ui/func/futransf.cxx
@@ -27,6 +27,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -101,7 +102,7 @@ void FuTransform::DoExecute( SfxRequest& rReq )
 if (!pFact)
 return;
 
-pDlg.reset(pFact->CreateCaptionDialog(nullptr, mpView));
+pDlg.reset(pFact->CreateCaptionDialog(mpViewShell->GetActiveWindow(), 
mpView));
 
 const sal_uInt16* pRange = pDlg->GetInputRanges( *aNewAttr.GetPool() );
 SfxItemSet aCombSet( *aNewAttr.GetPool(), pRange );
@@ -115,7 +116,7 @@ void FuTransform::DoExecute( SfxRequest& rReq )
 if (!pFact)
 return;
 
-pDlg.reset(pFact->CreateSvxTransformTabDialog(nullptr, &aSet, mpView));
+
pDlg.reset(pFact->CreateSvxTransformTabDialog(mpViewShell->GetActiveWindow(), 
&aSet, mpView));
 }
 
 if (!pDlg)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-25 Thread Michael Meeks
 desktop/source/lib/init.cxx  |   17 
++
 framework/source/accelerators/globalacceleratorconfiguration.cxx |3 +
 2 files changed, 20 insertions(+)

New commits:
commit 5fc484a786a04d65811518b7effab66925dcec72
Author: Michael Meeks 
Date:   Fri Dec 1 21:56:55 2017 +

Initialize more for sharing during pre-init.

Change-Id: I12b90504ec9161318683ebad8f8e4dd1e614da89
Reviewed-on: https://gerrit.libreoffice.org/46120
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 
Reviewed-on: https://gerrit.libreoffice.org/48510

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 569960e82f02..381e727ee954 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -55,6 +55,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -84,6 +85,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -95,6 +97,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -3665,6 +3668,20 @@ static void preloadData()
 xThesaurus->queryMeanings("forcefed", it, aNone);
 }
 std::cerr << "\n";
+
+css::uno::Reference< css::ui::XAcceleratorConfiguration > xGlobalCfg;
+xGlobalCfg = css::ui::GlobalAcceleratorConfiguration::create(
+comphelper::getProcessComponentContext());
+xGlobalCfg->getAllKeyEvents();
+
+std::cerr << "Preload icons\n";
+ImageTree &images = ImageTree::get();
+images.getImageUrl("forcefed.png", "style", "FO_oo");
+
+std::cerr << "Preload languages\n";
+// force load language singleton
+SvtLanguageTable::HasLanguageType(LANGUAGE_SYSTEM);
+LanguageTag::isValidBcp47("foo", nullptr);
 }
 
 static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const 
char* pUserProfileUrl)
diff --git a/framework/source/accelerators/globalacceleratorconfiguration.cxx 
b/framework/source/accelerators/globalacceleratorconfiguration.cxx
index 36691cb3f2d7..2a05887f7c98 100644
--- a/framework/source/accelerators/globalacceleratorconfiguration.cxx
+++ b/framework/source/accelerators/globalacceleratorconfiguration.cxx
@@ -19,6 +19,7 @@
 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -81,6 +82,8 @@ private:
 GlobalAcceleratorConfiguration::GlobalAcceleratorConfiguration(const 
css::uno::Reference< css::uno::XComponentContext >& xContext)
 : GlobalAcceleratorConfiguration_BASE(xContext)
 {
+// force keyboard string registration.
+KeyMapping::get();
 }
 
 void GlobalAcceleratorConfiguration::fillCache()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-25 Thread Jan Holesovsky
 desktop/source/lib/init.cxx |   19 ---
 1 file changed, 16 insertions(+), 3 deletions(-)

New commits:
commit fa72a3379d3641565ddab561d32d0a7d03b83665
Author: Jan Holesovsky 
Date:   Wed Jan 24 13:32:24 2018 +0100

lok: Preload thesauri too.

Change-Id: If2bfd3a024fc61900d3c12ff976df136d4e61bf6
Reviewed-on: https://gerrit.libreoffice.org/48502
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 338d11221566..569960e82f02 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3637,13 +3637,13 @@ static void lo_status_indicator_callback(void *data, 
comphelper::LibreOfficeKit:
 /// Used only by LibreOfficeKit when used by Online to pre-initialize
 static void preloadData()
 {
-// First: sit down and read all dictionaries: yum.
+// preload all available dictionaries
 css::uno::Reference xLngSvcMgr =
 
css::linguistic2::LinguServiceManager::create(comphelper::getProcessComponentContext());
 css::uno::Reference 
xSpellChecker(xLngSvcMgr->getSpellChecker());
 
-css::uno::Reference 
xLocales(xSpellChecker, css::uno::UNO_QUERY_THROW);
-uno::Sequence< css::lang::Locale > aLocales = xLocales->getLocales();
+css::uno::Reference 
xSpellLocales(xSpellChecker, css::uno::UNO_QUERY_THROW);
+uno::Sequence< css::lang::Locale > aLocales = xSpellLocales->getLocales();
 std::cerr << "Preloading dictionaries: ";
 for (auto &it : aLocales)
 {
@@ -3652,6 +3652,19 @@ static void preloadData()
 xSpellChecker->isValid("forcefed", it, aNone);
 }
 std::cerr << "\n";
+
+// preload all available thesauri
+css::uno::Reference 
xThesaurus(xLngSvcMgr->getThesaurus());
+css::uno::Reference 
xThesLocales(xSpellChecker, css::uno::UNO_QUERY_THROW);
+aLocales = xThesLocales->getLocales();
+std::cerr << "Preloading thesauri: ";
+for (auto &it : aLocales)
+{
+std::cerr << it.Language << "_" << it.Country << " ";
+css::beans::PropertyValues aNone;
+xThesaurus->queryMeanings("forcefed", it, aNone);
+}
+std::cerr << "\n";
 }
 
 static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const 
char* pUserProfileUrl)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: docker/l10n-docker-nightly.sh

2018-01-25 Thread Andras Timar
 docker/l10n-docker-nightly.sh |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5448c0a7bf6699475fbf08466bf159b37ec73c17
Author: Andras Timar 
Date:   Thu Jan 25 10:06:10 2018 +0100

Online docker: we need galaxy theme too as fallback

Change-Id: Iaa91f6c81b40ee3702e864dc283fe30317a80a85

diff --git a/docker/l10n-docker-nightly.sh b/docker/l10n-docker-nightly.sh
index b6629cc3..dbfbf526 100755
--- a/docker/l10n-docker-nightly.sh
+++ b/docker/l10n-docker-nightly.sh
@@ -90,7 +90,7 @@ cat > libreoffice/autogen.input << EOF
 --with-linker-hash-style=both
 --with-system-dicts
 --with-system-zlib
---with-theme=tango
+--with-theme=tango galaxy
 --without-branding
 --without-help
 --without-java
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-25 Thread Jan Holesovsky
 sd/source/ui/func/futransf.cxx |   32 +++-
 1 file changed, 7 insertions(+), 25 deletions(-)

New commits:
commit 9f05a323d50c6750e25f2ca69f758ec7fc4313bc
Author: Jan Holesovsky 
Date:   Wed Jan 24 13:19:41 2018 +0100

sd: Kill an own scope guard impl. and use comphelper::ScopeGuard instead.

Change-Id: I769c1c6c9d10081b706d0e1e0fbd7ad373a6e04f
Reviewed-on: https://gerrit.libreoffice.org/48499
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/sd/source/ui/func/futransf.cxx b/sd/source/ui/func/futransf.cxx
index f62c9788da8a..9dddef1dde4b 100644
--- a/sd/source/ui/func/futransf.cxx
+++ b/sd/source/ui/func/futransf.cxx
@@ -19,6 +19,7 @@
 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -61,34 +62,15 @@ void setUndo(::sd::View* pView, const SfxItemSet* pArgs)
 pView->EndUndo();
 }
 
-class ScopeCleanup
-{
-ViewShell* mpViewShell;
-public:
-ScopeCleanup(ViewShell* pViewShell) : mpViewShell(pViewShell)
-{
-}
-
-~ScopeCleanup()
-{
-if (mpViewShell)
-{
-mpViewShell->Invalidate(SID_RULER_OBJECT);
-mpViewShell->Cancel();
-}
-}
-
-void ignore()
-{
-mpViewShell = nullptr;
-}
-};
-
 }
 
 void FuTransform::DoExecute( SfxRequest& rReq )
 {
-ScopeCleanup aCleanup(mpViewShell);
+comphelper::ScopeGuard guard([&]() {
+// cleanup when leaving
+mpViewShell->Invalidate(SID_RULER_OBJECT);
+mpViewShell->Cancel();
+});
 
 if (!mpView->AreObjectsMarked())
 return;
@@ -141,7 +123,7 @@ void FuTransform::DoExecute( SfxRequest& rReq )
 
 std::shared_ptr pRequest(new SfxRequest(rReq));
 rReq.Ignore(); // the 'old' request is not relevant any more
-aCleanup.ignore(); // the lambda does it
+guard.dismiss(); // we'll invalidate explicitly after the dialog ends
 
 pDlg->StartExecuteAsync([=](sal_Int32 nResult){
 if (nResult == RET_OK)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


  1   2   >