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

2018-10-19 Thread Libreoffice Gerrit user
 basic/source/sbx/sbxvalue.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 76a25639474c50c34a2b84ba1f357013de5ddae8
Author: Mike Kaganski 
AuthorDate: Fri Oct 19 21:22:23 2018 +0200
Commit: Mike Kaganski 
CommitDate: Sat Oct 20 08:49:13 2018 +0200

tdf#120703 (PVS): redundant check

V547 Expression 'aData.eType == SbxDECIMAL' is always true

Change-Id: I37bf367221ced7bf1c53bcd5138ae7bac656da52
Reviewed-on: https://gerrit.libreoffice.org/62030
Reviewed-by: Mike Kaganski 
Tested-by: Mike Kaganski 

diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx
index dba938e96eec..05e8773aab9f 100644
--- a/basic/source/sbx/sbxvalue.cxx
+++ b/basic/source/sbx/sbxvalue.cxx
@@ -164,8 +164,7 @@ void SbxValue::Clear()
 }
 break;
 case SbxDECIMAL:
-if( aData.eType == SbxDECIMAL )
-releaseDecimalPtr( aData.pDecimal );
+releaseDecimalPtr( aData.pDecimal );
 break;
 case SbxDATAOBJECT:
 aData.pData = nullptr; break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - include/svx sc/source sd/source svx/source sw/source unoxml/source

2018-10-19 Thread Libreoffice Gerrit user
 include/svx/fmview.hxx   |6 +++---
 sc/source/ui/view/tabvwshb.cxx   |8 
 sc/source/ui/view/viewfun5.cxx   |8 
 sd/source/ui/view/drviewse.cxx   |4 ++--
 sd/source/ui/view/sdview3.cxx|4 ++--
 svx/source/form/fmview.cxx   |6 +++---
 svx/source/form/fmvwimp.cxx  |   14 +++---
 svx/source/inc/fmvwimp.hxx   |4 ++--
 svx/source/smarttags/SmartTagMgr.cxx |5 ++---
 sw/source/uibase/dochdl/swdtflvr.cxx |   12 ++--
 sw/source/uibase/uiview/viewdraw.cxx |6 +++---
 unoxml/source/events/eventdispatcher.cxx |5 ++---
 12 files changed, 40 insertions(+), 42 deletions(-)

New commits:
commit 722cb06e71539e108f663ca1c2dd6baf7f4adc64
Author: Noel Grandin 
AuthorDate: Mon Oct 15 13:58:32 2018 +0200
Commit: Noel Grandin 
CommitDate: Sat Oct 20 08:00:58 2018 +0200

return by unique_ptr from CreateFieldControl

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

diff --git a/include/svx/fmview.hxx b/include/svx/fmview.hxx
index 106e83131733..853a6bccfe39 100644
--- a/include/svx/fmview.hxx
+++ b/include/svx/fmview.hxx
@@ -72,15 +72,15 @@ public:
 @deprecated
 This method is deprecated. Use the version with a 
ODataAccessDescriptor instead.
 */
-SdrObject*   CreateFieldControl(const OUString& rFieldDesc) const;
+SdrObjectUniquePtr CreateFieldControl(const OUString& rFieldDesc) const;
 
 /** create a control pair (label/bound control) for the database field 
description given.
 */
-SdrObject*   CreateFieldControl( const svx::ODataAccessDescriptor& 
_rColumnDescriptor );
+SdrObjectUniquePtr CreateFieldControl( const svx::ODataAccessDescriptor& 
_rColumnDescriptor );
 
 /** create a control pair (label/bound control) for the xforms description 
given.
 */
-SdrObject*   CreateXFormsControl( const svx::OXFormsDescriptor &_rDesc );
+SdrObjectUniquePtr CreateXFormsControl( const svx::OXFormsDescriptor 
&_rDesc );
 
 virtual void MarkListHasChanged() override;
 virtual void AddWindowToPaintView(OutputDevice* pNewWin, vcl::Window* 
pWindow) override;
diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx
index d4e88c791f21..3cd9c496d56e 100644
--- a/sc/source/ui/view/tabvwshb.cxx
+++ b/sc/source/ui/view/tabvwshb.cxx
@@ -448,7 +448,7 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq)
 if(pPageView)
 {
 svx::ODataAccessDescriptor 
aDescriptor(pDescriptorItem->GetValue());
-SdrObject* pNewDBField = 
pDrView->CreateFieldControl(aDescriptor);
+SdrObjectUniquePtr pNewDBField = 
pDrView->CreateFieldControl(aDescriptor);
 
 if(pNewDBField)
 {
@@ -462,11 +462,11 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq)
 pNewDBField->SetLogicRect(aNewObjectRectangle);
 
 // controls must be on control layer, groups on 
front layer
-if ( dynamic_cast( pNewDBField) 
!=  nullptr )
+if ( dynamic_cast( 
pNewDBField.get() ) !=  nullptr )
 pNewDBField->NbcSetLayer(SC_LAYER_CONTROLS);
 else
 pNewDBField->NbcSetLayer(SC_LAYER_FRONT);
-if (dynamic_cast( pNewDBField) 
!=  nullptr)
+if (dynamic_cast( 
pNewDBField.get() ) !=  nullptr)
 {
 SdrObjListIter aIter( *pNewDBField, 
SdrIterMode::DeepWithGroups );
 SdrObject* pSubObj = aIter.Next();
@@ -480,7 +480,7 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq)
 }
 }
 
-pView->InsertObjectAtView(pNewDBField, *pPageView);
+pView->InsertObjectAtView(pNewDBField.release(), 
*pPageView);
 }
 }
 }
diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx
index bc44c67a900f..68751d4e148b 100644
--- a/sc/source/ui/view/viewfun5.cxx
+++ b/sc/source/ui/view/viewfun5.cxx
@@ -442,7 +442,7 @@ bool ScViewFunc::PasteDataFormat( SotClipboardFormatId 
nFormatId,
 {
 MakeDrawLayer();
 ScDrawView* pScDrawView = GetScDrawView();
-SdrObject* pObj = pScDrawView->CreateFieldControl( 
svx::OColumnTransferable::extractColumnDescriptor( aDataHelper ) );
+SdrObjectUniquePtr pObj = pScDrawView->CreateFieldControl( 
svx::OColumnTransferable::extractColumnDescriptor( aDataHelper ) );
 if (pO

[Libreoffice-commits] core.git: 2 commits - basic/source comphelper/source extensions/source svx/source vcl/source writerfilter/source

2018-10-19 Thread Libreoffice Gerrit user
 basic/source/classes/propacc.cxx|   13 --
 comphelper/source/property/propagg.cxx  |2 -
 extensions/source/activex/SOActiveX.cxx |   35 
 svx/source/smarttags/SmartTagMgr.cxx|2 -
 vcl/source/font/font.cxx|5 +---
 writerfilter/source/rtftok/rtftokenizer.cxx |3 --
 6 files changed, 30 insertions(+), 30 deletions(-)

New commits:
commit 35e80e9726b5fee6a00caa58349a4b5d924dad7c
Author: Noel Grandin 
AuthorDate: Fri Oct 19 16:01:19 2018 +0200
Commit: Noel Grandin 
CommitDate: Sat Oct 20 08:00:32 2018 +0200

when calling std::lower_bound

it's not enough to compare != end(), you also need to compare the key
against the iterator result

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

diff --git a/basic/source/classes/propacc.cxx b/basic/source/classes/propacc.cxx
index 8cc697a76441..a14465599e0a 100644
--- a/basic/source/classes/propacc.cxx
+++ b/basic/source/classes/propacc.cxx
@@ -38,13 +38,10 @@ using namespace com::sun::star::lang;
 using namespace com::sun::star::beans;
 using namespace cppu;
 
-struct SbCompare_UString_PropertyValue_Impl
+static bool SbCompare_UString_PropertyValue_Impl(PropertyValue const & lhs, 
const OUString& rhs)
 {
-   bool operator() (PropertyValue const & lhs, const OUString& rhs)
-   {
-  return lhs.Name.compareTo(rhs) < 0;
-   }
-};
+return lhs.Name.compareTo(rhs) < 0;
+}
 
 
 SbPropertyValues::SbPropertyValues()
@@ -82,8 +79,8 @@ size_t SbPropertyValues::GetIndex_Impl( const OUString 
&rPropName ) const
 {
 SbPropertyValueArr_Impl::const_iterator it = std::lower_bound(
   m_aPropVals.begin(), m_aPropVals.end(), rPropName,
-  SbCompare_UString_PropertyValue_Impl() );
-if (it == m_aPropVals.end())
+  SbCompare_UString_PropertyValue_Impl );
+if (it == m_aPropVals.end() || !SbCompare_UString_PropertyValue_Impl(*it, 
rPropName))
 {
 throw beans::UnknownPropertyException(
 "Property not found: " + rPropName,
diff --git a/comphelper/source/property/propagg.cxx 
b/comphelper/source/property/propagg.cxx
index d1f6e3a76c17..1e618694f465 100644
--- a/comphelper/source/property/propagg.cxx
+++ b/comphelper/source/property/propagg.cxx
@@ -239,7 +239,7 @@ sal_Int32 OPropertyArrayAggregationHelper::fillHandles(
 {
 aNameProp.Name = pReqProps[i];
 auto findIter = std::lower_bound(m_aProperties.begin(), 
m_aProperties.end(), aNameProp, PropertyCompareByName());
-if ( findIter != m_aProperties.end() )
+if ( findIter != m_aProperties.end() && 
!PropertyCompareByName()(*findIter, aNameProp))
 {
 _pHandles[i] = findIter->Handle;
 nHitCount++;
diff --git a/svx/source/smarttags/SmartTagMgr.cxx 
b/svx/source/smarttags/SmartTagMgr.cxx
index 2265ffd6aa84..8ffebc7cc27d 100644
--- a/svx/source/smarttags/SmartTagMgr.cxx
+++ b/svx/source/smarttags/SmartTagMgr.cxx
@@ -180,7 +180,7 @@ OUString SmartTagMgr::GetSmartTagCaption( const OUString& 
rSmartTagType, const c
 {
 OUString aRet;
 
-auto aLower = maSmartTagMap.lower_bound( rSmartTagType );
+auto aLower = maSmartTagMap.find( rSmartTagType );
 
 if ( aLower != maSmartTagMap.end() )
 {
diff --git a/vcl/source/font/font.cxx b/vcl/source/font/font.cxx
index 1cf88d394175..cd8ebb9b2a4b 100644
--- a/vcl/source/font/font.cxx
+++ b/vcl/source/font/font.cxx
@@ -610,9 +610,8 @@ namespace
 aEnt.string = pOpen+1;
 aEnt.string_len = (pClose-pOpen)-1;
 aEnt.weight = WEIGHT_NORMAL;
-const int nEnt = SAL_N_ELEMENTS( weight_table );
-WeightSearchEntry const * pFound = std::lower_bound( 
weight_table, weight_table+nEnt, aEnt );
-if( pFound != (weight_table+nEnt) )
+WeightSearchEntry const * pFound = std::lower_bound( 
std::begin(weight_table), std::end(weight_table), aEnt );
+if( pFound != std::end(weight_table) && !(*pFound < aEnt))
 o_rResult.SetWeight( pFound->weight );
 }
 }
diff --git a/writerfilter/source/rtftok/rtftokenizer.cxx 
b/writerfilter/source/rtftok/rtftokenizer.cxx
index 65a80932e90d..5410b652fbe3 100644
--- a/writerfilter/source/rtftok/rtftokenizer.cxx
+++ b/writerfilter/source/rtftok/rtftokenizer.cxx
@@ -247,10 +247,9 @@ bool RTFTokenizer::lookupMathKeyword(RTFMathSymbol& 
rSymbol)
 {
 auto low
 = std::lower_bound(s_aRTFMathControlWords.begin(), 
s_aRTFMathControlWords.end(), rSymbol);
-int i = low - s_aRTFMathControlWords.begin();
 if (low == s_aRTFMathControlWords.end() || rSymbol < *low)
 return false;
-rSymbol = s_aRTFMathControlWords[i];
+rSymbol = *low;
 return true;
 }
 
commit a3143aa0dec78177e522858fbf78

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

2018-10-19 Thread Libreoffice Gerrit user
 connectivity/source/drivers/odbc/OStatement.cxx |3 +--
 extensions/source/scanner/sane.cxx  |3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 9d936de849f1d2267dc733d38ff66d66490b04f7
Author: Noel Grandin 
AuthorDate: Fri Oct 19 20:49:19 2018 +0200
Commit: Noel Grandin 
CommitDate: Sat Oct 20 07:59:53 2018 +0200

clang-tidy readability-delete-null-pointer

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

diff --git a/connectivity/source/drivers/odbc/OStatement.cxx 
b/connectivity/source/drivers/odbc/OStatement.cxx
index eea0d2d147c2..3a74bf565fe7 100644
--- a/connectivity/source/drivers/odbc/OStatement.cxx
+++ b/connectivity/source/drivers/odbc/OStatement.cxx
@@ -822,8 +822,7 @@ void OStatement_Base::setFetchSize(sal_Int32 _par0)
 {
 setStmtOption(SQL_ATTR_ROW_ARRAY_SIZE, 
_par0);
 
-if (m_pRowStatusArray)
-delete[] m_pRowStatusArray;
+delete[] m_pRowStatusArray;
 m_pRowStatusArray = new SQLUSMALLINT[_par0];
 setStmtOption(SQL_ATTR_ROW_STATUS_PTR, 
m_pRowStatusArray);
 }
diff --git a/extensions/source/scanner/sane.cxx 
b/extensions/source/scanner/sane.cxx
index 167d6ba97b20..0adeb593d695 100644
--- a/extensions/source/scanner/sane.cxx
+++ b/extensions/source/scanner/sane.cxx
@@ -875,8 +875,7 @@ bool Sane::Start( BitmapTransporter& rBitmap )
 p_cancel( maHandle );
 CheckConsistency( "sane_cancel" );
 }
-if( pBuffer )
-delete [] pBuffer;
+delete [] pBuffer;
 
 ReloadOptions();
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-19 Thread Libreoffice Gerrit user
 sw/qa/extras/ooxmlexport/ooxmlexport11.cxx |2 
 sw/qa/extras/ww8export/ww8export2.cxx  |2 
 sw/source/filter/html/htmlbas.cxx  |2 
 sw/source/filter/html/htmldrawreader.cxx   |4 
 sw/source/filter/html/htmlfld.cxx  |   24 ++---
 sw/source/filter/html/htmlfly.hxx  |   10 +-
 sw/source/filter/html/htmlflyt.cxx |   10 +-
 sw/source/filter/html/htmlflywriter.cxx|4 
 sw/source/filter/html/htmlform.cxx |6 -
 sw/source/filter/html/htmlgrin.cxx |4 
 sw/source/filter/html/htmlnumreader.cxx|2 
 sw/source/filter/html/htmltab.cxx  |2 
 sw/source/filter/html/svxcss1.cxx  |  118 ++---
 sw/source/filter/html/swhtml.cxx   |4 
 sw/source/filter/html/swhtml.hxx   |6 -
 sw/source/ui/config/optpage.cxx|6 -
 sw/source/ui/frmdlg/frmpage.cxx|   72 -
 sw/source/ui/vba/vbafont.cxx   |2 
 sw/source/uibase/inc/frmpage.hxx   |4 
 sw/source/uibase/ribbar/workctrl.cxx   |2 
 20 files changed, 127 insertions(+), 159 deletions(-)

New commits:
commit 4ba5b003b594f9eb6c9b185208bdb72aef8273d0
Author: Noel Grandin 
AuthorDate: Fri Oct 19 13:57:40 2018 +0200
Commit: Noel Grandin 
CommitDate: Sat Oct 20 07:59:20 2018 +0200

loplugin:staticvar in sw

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

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index 2f665ad620e5..40e9fb19c3ca 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -459,7 +459,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf112118_DOCX, 
"tdf112118.docx")
 // because DOCX import does two conversions between mm/100 and twips on 
the route, losing one
 // twip on the road and arriving with a value that is 2 mm/100 less. I 
don't see an obvious way
 // to avoid that.
-struct {
+static const struct {
 const char* styleName;
 struct {
 const char* sideName;
diff --git a/sw/qa/extras/ww8export/ww8export2.cxx 
b/sw/qa/extras/ww8export/ww8export2.cxx
index 078079f969ec..e1597f634a0c 100644
--- a/sw/qa/extras/ww8export/ww8export2.cxx
+++ b/sw/qa/extras/ww8export/ww8export2.cxx
@@ -825,7 +825,7 @@ DECLARE_OOXMLEXPORT_TEST( testObjectCrossReference, 
"object_cross_reference.odt"
 
 DECLARE_WW8EXPORT_TEST(testTdf112118_DOC, "tdf112118.doc")
 {
-struct {
+static const struct {
 const char* styleName;
 struct {
 const char* sideName;
diff --git a/sw/source/filter/html/htmlbas.cxx 
b/sw/source/filter/html/htmlbas.cxx
index be5daed030d2..4a20f7dd68ca 100644
--- a/sw/source/filter/html/htmlbas.cxx
+++ b/sw/source/filter/html/htmlbas.cxx
@@ -48,7 +48,7 @@ using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::container;
 
-static HTMLOutEvent aBodyEventTable[] =
+static HTMLOutEvent const aBodyEventTable[] =
 {
 { OOO_STRING_SVTOOLS_HTML_O_SDonload,OOO_STRING_SVTOOLS_HTML_O_onload, 
   SvMacroItemId::OpenDoc   },
 { OOO_STRING_SVTOOLS_HTML_O_SDonunload,  
OOO_STRING_SVTOOLS_HTML_O_onunload,  SvMacroItemId::PrepareCloseDoc   },
diff --git a/sw/source/filter/html/htmldrawreader.cxx 
b/sw/source/filter/html/htmldrawreader.cxx
index 8b7413ebdef3..d47e01a24acc 100644
--- a/sw/source/filter/html/htmldrawreader.cxx
+++ b/sw/source/filter/html/htmldrawreader.cxx
@@ -55,7 +55,7 @@
 
 using namespace css;
 
-static HTMLOptionEnum aHTMLMarqBehaviorTable[] =
+static HTMLOptionEnum const aHTMLMarqBehaviorTable[] =
 {
 { OOO_STRING_SVTOOLS_HTML_BEHAV_scroll,SdrTextAniKind::Scroll   },
 { OOO_STRING_SVTOOLS_HTML_BEHAV_alternate, SdrTextAniKind::Alternate},
@@ -63,7 +63,7 @@ static HTMLOptionEnum 
aHTMLMarqBehaviorTable[] =
 { nullptr, SdrTextAniKind(0)   }
 };
 
-static HTMLOptionEnum aHTMLMarqDirectionTable[] =
+static HTMLOptionEnum const aHTMLMarqDirectionTable[] =
 {
 { OOO_STRING_SVTOOLS_HTML_AL_left,  SdrTextAniDirection::Left   },
 { OOO_STRING_SVTOOLS_HTML_AL_right, SdrTextAniDirection::Right  },
diff --git a/sw/source/filter/html/htmlfld.cxx 
b/sw/source/filter/html/htmlfld.cxx
index 513f01650887..2c660150838a 100644
--- a/sw/source/filter/html/htmlfld.cxx
+++ b/sw/source/filter/html/htmlfld.cxx
@@ -43,7 +43,7 @@ struct HTMLNumFormatTableEntry
 NfIndexTableOffset const eFormat;
 };
 
-static HTMLOptionEnum aHTMLFieldTypeTable[] =
+static HTMLOptionEnum const aHTMLFieldTypeTable[] =
 {
 { OOO_STRING_SW_HTML_FT_author,   SwFieldIds::Author  },
 { OOO_STRING_SW_HTML_FT_sender,   SwFieldIds::ExtUser },
@@ -57,7 +57,7 @@ static HTMLOptionEnum aHTMLFieldTypeTable[] =
 { nullptr,SwFiel

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

2018-10-19 Thread Libreoffice Gerrit user
 sw/Module_sw.mk   |1 
 sw/UITest_chapterNumbering.mk |   16 +++
 sw/qa/uitest/chapterNumbering/chapterNumbering.py |  113 ++
 3 files changed, 130 insertions(+)

New commits:
commit 4eb277bc08f08826613b0dd08c4d3e8342410260
Author: Zdeněk Crhonek 
AuthorDate: Fri Oct 19 22:07:49 2018 +0200
Commit: Zdenek Crhonek 
CommitDate: Sat Oct 20 07:06:25 2018 +0200

uitest for chapter numbering dialog

Change-Id: Id83c8298618d38d8d6631fabdf8bc1e1326a2d0d
Reviewed-on: https://gerrit.libreoffice.org/62032
Tested-by: Jenkins
Reviewed-by: Zdenek Crhonek 

diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk
index 43f2abdc60ce..f55eb121cc5f 100644
--- a/sw/Module_sw.mk
+++ b/sw/Module_sw.mk
@@ -142,6 +142,7 @@ $(eval $(call gb_Module_add_uicheck_targets,sw,\
UITest_writer_tests4 \
UITest_table \
UITest_findReplace \
+   UITest_chapterNumbering \
 ))
 endif
 
diff --git a/sw/UITest_chapterNumbering.mk b/sw/UITest_chapterNumbering.mk
new file mode 100644
index ..983bc27522eb
--- /dev/null
+++ b/sw/UITest_chapterNumbering.mk
@@ -0,0 +1,16 @@
+# 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/.
+#
+
+$(eval $(call  gb_UITest_UITest,chapterNumbering))
+
+$(eval $(call gb_UITest_add_modules,chapterNumbering,$(SRCDIR)/sw/qa/uitest,\
+   chapterNumbering/ \
+))
+
+$(eval $(call gb_UITest_set_defs,chapterNumbering, \
+TDOC="$(SRCDIR)/sw/qa/uitest/writer_tests/data" \
+))
diff --git a/sw/qa/uitest/chapterNumbering/chapterNumbering.py 
b/sw/qa/uitest/chapterNumbering/chapterNumbering.py
new file mode 100644
index ..02e4c39531a1
--- /dev/null
+++ b/sw/qa/uitest/chapterNumbering/chapterNumbering.py
@@ -0,0 +1,113 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+from uitest.framework import UITestCase
+from uitest.debug import sleep
+from uitest.path import get_srcdir_url
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import get_state_as_dict, type_text
+from uitest.uihelper.common import select_pos
+
+#Outline Numbering is now Chapter Numbering
+
+class WriterChapterNumbering(UITestCase):
+
+def test_chapter_numbering_dialog(self):
+self.ui_test.create_doc_in_start_center("writer")
+document = self.ui_test.get_component()
+
+self.ui_test.execute_dialog_through_command(".uno:OptionsTreeDialog")  
#optionsdialog
+xDialog = self.xUITest.getTopFocusWindow()
+xPages = xDialog.getChild("pages")
+xWriterEntry = xPages.getChild('3') # Writer
+xWriterEntry.executeAction("EXPAND", tuple())
+xWriterGeneralEntry = xWriterEntry.getChild('0')
+xWriterGeneralEntry.executeAction("SELECT", tuple())  #General 
- set millimeters
+xMetric = xDialog.getChild("metric")
+props = {"TEXT": "Millimeter"}
+actionProps = mkPropertyValues(props)
+xMetric.executeAction("SELECT", actionProps)
+xOKBtn = xDialog.getChild("ok")
+self.ui_test.close_dialog_through_button(xOKBtn)
+
+
self.ui_test.execute_dialog_through_command(".uno:ChapterNumberingDialog")
+xDialog = self.xUITest.getTopFocusWindow()
+xstyle = xDialog.getChild("style")
+xnumbering = xDialog.getChild("numbering")
+xcharstyle = xDialog.getChild("charstyle")
+xprefix = xDialog.getChild("prefix")
+xsuffix = xDialog.getChild("suffix")
+xstartat = xDialog.getChild("startat")
+xtab = xDialog.getChild("tabcontrol")
+#second tab
+xalignedatmf = xDialog.getChild("alignedatmf")
+xnum2alignlb = xDialog.getChild("num2alignlb")
+xnumfollowedbylb = xDialog.getChild("numfollowedbylb")
+xatmf = xDialog.getChild("atmf")
+xindentatmf = xDialog.getChild("indentatmf")
+select_pos(xtab, "0") #first tab
+props = {"TEXT": "Heading"}
+actionProps = mkPropertyValues(props)
+xstyle.executeAction("SELECT", actionProps)
+props2 = {"TEXT": "1, 2, 3, ..."}
+actionProps2 = mkPropertyValues(props2)
+xnumbering.executeAction("SELECT", actionProps2)
+props3 = {"TEXT": "Bullets"}
+actionProps3 = mkPropertyValues(props3)
+xcharstyle.executeAction("SELECT", actionProps3)
+xprefix.executeAction("TYPE", mkPropertyValues({"TEXT":"A"}))
+xsuffix.executeAction("TYPE", mkPropertyValues({"TEXT":"B"}))
+xstartat.executeAction("UP", tuple())
+
+select

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

2018-10-19 Thread Libreoffice Gerrit user
 sw/qa/extras/ww8export/ww8export3.cxx |1 -
 sw/source/filter/ww8/wrtw8sty.cxx |4 +---
 2 files changed, 1 insertion(+), 4 deletions(-)

New commits:
commit fa667b6dc410f3af57ef436cc117352c829f95e7
Author: Justin Luth 
AuthorDate: Thu Oct 18 09:38:47 2018 +0300
Commit: Justin Luth 
CommitDate: Sat Oct 20 06:32:29 2018 +0200

sw mso export: PROTECT_FORM shouldn't force section to protected

PROTECT_FORM maps to enforcement = true, not "everything is protected".
"The enforcement of this property is determined by the documentProtection
element (§17.15.1.29), as it is possible to specify protection
without turning it on."

So, sections should retain their protected on/off status
regardless of the value of PROTECT_FORM. My guess was
that this was to offset the fact that DOCX import did not
import protected status, so this helped to protect the
sections that should not be unprotected. A followup
patch will address the import side.

patch initially developed to support tdf#120499.

Change-Id: I8ff6d31711651a4827cbb8520fd68e88273d6799
Reviewed-on: https://gerrit.libreoffice.org/61905
Tested-by: Jenkins
Reviewed-by: Justin Luth 

diff --git a/sw/qa/extras/ww8export/ww8export3.cxx 
b/sw/qa/extras/ww8export/ww8export3.cxx
index 84f9e2f2d6cf..d5a888e60dd6 100644
--- a/sw/qa/extras/ww8export/ww8export3.cxx
+++ b/sw/qa/extras/ww8export/ww8export3.cxx
@@ -63,7 +63,6 @@ DECLARE_WW8EXPORT_TEST(testFdo53985, "fdo53985.doc")
 uno::Reference xSect(xSections->getByIndex(0), 
uno::UNO_QUERY);
 CPPUNIT_ASSERT_EQUAL_MESSAGE("Section1 is protected", true, 
getProperty(xSect, "IsProtected"));
 xSect.set(xSections->getByIndex(3), uno::UNO_QUERY);
-if ( !mbExported )
 CPPUNIT_ASSERT_EQUAL_MESSAGE("Section4 is protected", false, 
getProperty(xSect, "IsProtected"));
 }
 
diff --git a/sw/source/filter/ww8/wrtw8sty.cxx 
b/sw/source/filter/ww8/wrtw8sty.cxx
index a2d8856733fb..ca1ae82deee6 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -1533,9 +1533,7 @@ void MSWordExportBase::SectionProperties( const 
WW8_SepInfo& rSepInfo, WW8_PdAtt
 AttrOutput().SectFootnoteEndnotePr();
 
 // forms
-bool formProtection = m_pDoc->getIDocumentSettingAccess().get( 
DocumentSettingId::PROTECT_FORM );
-formProtection |= rSepInfo.IsProtected();
-AttrOutput().SectionFormProtection( formProtection );
+AttrOutput().SectionFormProtection( rSepInfo.IsProtected() );
 
 // line numbers
 const SwLineNumberInfo& rLnNumInfo = m_pDoc->GetLineNumberInfo();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-19 Thread Libreoffice Gerrit user
 formula/source/core/api/FormulaCompiler.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6baca63b44bf7f75a522b1adc4b4bbce502aec3b
Author: Caolán McNamara 
AuthorDate: Fri Oct 19 10:23:47 2018 +0100
Commit: Eike Rathke 
CommitDate: Sat Oct 20 02:03:13 2018 +0200

copy and paste error

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

diff --git a/formula/source/core/api/FormulaCompiler.cxx 
b/formula/source/core/api/FormulaCompiler.cxx
index 8addeeed34e2..17d26b4522d8 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -631,7 +631,7 @@ void FormulaCompiler::OpCodeMap::putOpCode( const OUString 
& rStr, const OpCode
 bPutOp = true;
 bRemoveFromMap = (mpTable[eOp] != ";" &&
 mpTable[ocArrayColSep] != mpTable[eOp] &&
-mpTable[ocArrayColSep] != mpTable[eOp]);
+mpTable[ocArrayRowSep] != mpTable[eOp]);
 break;
 // These OpCodes are known to be duplicates in the Excel
 // external API mapping because of different parameter counts
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: extras/Personas.mk

2018-10-19 Thread Libreoffice Gerrit user
 extras/Personas.mk |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 6bf20df63b316ae34c2067b2fa09d1ea9d3d8ec2
Author: Jan-Marek Glogowski 
AuthorDate: Sat Oct 20 01:35:44 2018 +0200
Commit: Jan-Marek Glogowski 
CommitDate: Fri Oct 19 23:47:59 2018 +

Remove / from personas_list.txt install

Probably fixes the tinderboxes installer failures

Change-Id: Iff84b07e244000e1b0f8d94566bff76918935554

diff --git a/extras/Personas.mk b/extras/Personas.mk
index 3f6e1089cee0..15f599f85271 100644
--- a/extras/Personas.mk
+++ b/extras/Personas.mk
@@ -7,9 +7,9 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 #
 
-$(eval $(call 
gb_Package_Package,extras_personas,$(SRCDIR)/extras/source/gallery/personas/))
+$(eval $(call 
gb_Package_Package,extras_personas,$(SRCDIR)/extras/source/gallery/personas))
 
-$(eval $(call 
gb_Package_add_files,extras_personas,$(LIBO_SHARE_FOLDER)/gallery/personas/,\
+$(eval $(call 
gb_Package_add_files,extras_personas,$(LIBO_SHARE_FOLDER)/gallery/personas,\
personas_list.txt \
 )) 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Build fails in UnitTest

2018-10-19 Thread 박재선
Hi. Eike.
Thank you to reply for me, and sorry to late :)
 Here is whole error code.
/[...]/LibreOffice_Source/lode/dev/core/vcl/qa/cppunit/pdfexport/pdfexport.cxx:1539:(anonymous
namespace)::PdfExportTest::testTdf115262
less assertion failed
- Expected less than: 166
- Actual  : 199

(anonymous namespace)::PdfExportTest::testTdf115262 finished in: 2234ms
/[...]/LibreOffice_Source/lode/dev/core/vcl/qa/cppunit/pdfexport/pdfexport.cxx:1539:
Assertion
Test name: (anonymous namespace)::PdfExportTest::testTdf115262
less assertion failed
- Expected less than: 166
- Actual  : 199

Failures !!!
Run: 27   Failure total: 1   Failures: 1   Errors: 0
warn:vcl.schedule.deinit:80096:3148480:vcl/source/app/scheduler.cxx:172:
DeInit task: Timer a: 1 p: 1 drawinglayer ImpTimedRefDev destroy mpVirDev
18ms (0x7fed529dd9d0)
warn:vcl.schedule.deinit:80096:3148480:vcl/source/app/scheduler.cxx:172:
DeInit task: Timer a: 1 p: 1 graphic::Manager maSwapOutTimer 1ms
(0x7fed50c9ea70)
warn:vcl.schedule.deinit:80096:3148480:vcl/source/app/scheduler.cxx:172:
DeInit task: Timer a: 1 p: 1 sc ScModule IdleTimer 150ms (0x7fed54c10cb8)
(ignored)
warn:vcl.schedule.deinit:80096:3148480:vcl/source/app/scheduler.cxx:193:
DeInit active tasks: 3 (ignored: 1)
warn:fwk.desktop:80096:3148480:framework/source/services/desktop.cxx:1069:
Desktop disposed before terminating it
warn:unotools.config:80096:3148480:unotools/source/config/configmgr.cxx:175:
ConfigManager not empty

Error: a unit test failed, please do one of:
make CppunitTest_vcl_pdfexport CPPUNITTRACE="lldb --"   # for
interactive debugging on OS X
make CppunitTest_vcl_pdfexport VALGRIND=memcheck# for memory
checking

You can limit the execution to just one particular test by:

make CppunitTest_vcl_pdfexport CPPUNIT_TEST_NAME="testXYZ" ...above
mentioned params...

make[1]: ***
[/[...]/LibreOffice_Source/lode/dev/core/workdir/CppunitTest/vcl_pdfexport.test]
Error 1
make: *** [build] Error 2

Kind Regards.
Kalriel

2018년 10월 17일 (수) 오후 9:09, Eike Rathke 님이 작성:

> Hi kalriel,
>
> On Monday, 2018-10-15 20:26:34 -0700, kalriel wrote:
>
> > I get the following error when building the master
> >
> > Error: a unit test failed, please do one of:
> > make CppunitTest_sc_subsequent_filters_test CPPUNITTRACE="lldb --"
>  #
> > for interactive debugging on OS X
> > make CppunitTest_sc_subsequent_filters_test VALGRIND=memcheck
> #
> > for memory checking
> >
> > You can limit the execution to just one particular test by:
> >
> > make CppunitTest_sc_subsequent_filters_test CPPUNIT_TEST_NAME="testXYZ"
> > ...above mentioned params...
> >
> > /[...]/LibreOffice_Source/lode/dev/core/solenv/gbuild/CppunitTest.mk:120:
> > recipe for target
> >
> '/[...]/LibreOffice_Source/lode/dev/core/workdir/CppunitTest/sc_subsequent_filters_test.test'
> > failed
> > make[1]: ***
>
> And a bunch of lines above that the real error/failure was displayed
> (the location and name of the test and lines starting with Expected and
> Actual). So what was it?
>
>   Eike
>
> --
> LibreOffice Calc developer. Number formatter stricken i18n
> transpositionizer.
> GPG key 0x6A6CD5B765632D3A - 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563
> 2D3A
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2018-10-19 Thread Libreoffice Gerrit user
 vcl/win/gdi/winlayout.cxx |   23 ++-
 1 file changed, 10 insertions(+), 13 deletions(-)

New commits:
commit 792d07c7f2816f1afdbed1d0b8129e3f1aecf8d7
Author: Jan-Marek Glogowski 
AuthorDate: Fri Oct 19 09:45:54 2018 +
Commit: Jan-Marek Glogowski 
CommitDate: Fri Oct 19 22:53:46 2018 +0200

WIN fix CacheGlyphToAtlas resource handling

Use :comphelper::ScopeGuard to handle cleanup.
And actually restore the original font on the correct DC.

Change-Id: Ib59d430636b470486da2f8e5e34ed8d71b57aac2
Reviewed-on: https://gerrit.libreoffice.org/62010
Reviewed-by: Noel Grandin 
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 

diff --git a/vcl/win/gdi/winlayout.cxx b/vcl/win/gdi/winlayout.cxx
index 35303fc5c8a5..efbbd0c1edb3 100644
--- a/vcl/win/gdi/winlayout.cxx
+++ b/vcl/win/gdi/winlayout.cxx
@@ -23,6 +23,7 @@
 #include 
 
 #include 
+#include 
 
 #include 
 #include 
@@ -48,11 +49,11 @@
 #include 
 #include 
 
-GlobalOpenGLGlyphCache * GlobalOpenGLGlyphCache::get() {
-SalData * data = GetSalData();
-if (!data->m_pGlobalOpenGLGlyphCache) {
+GlobalOpenGLGlyphCache * GlobalOpenGLGlyphCache::get()
+{
+SalData *data = GetSalData();
+if (!data->m_pGlobalOpenGLGlyphCache)
 data->m_pGlobalOpenGLGlyphCache.reset(new GlobalOpenGLGlyphCache);
-}
 return data->m_pGlobalOpenGLGlyphCache.get();
 }
 
@@ -67,12 +68,15 @@ bool WinFontInstance::CacheGlyphToAtlas(HDC hDC, HFONT 
hFont, int nGlyphIndex, S
 SAL_WARN("vcl.gdi", "CreateCompatibleDC failed: " << 
WindowsErrorString(GetLastError()));
 return false;
 }
-HFONT hOrigFont = static_cast(SelectObject(aHDC.get(), hFont));
+
+const HFONT hOrigFont = static_cast(SelectObject(aHDC.get(), 
hFont));
 if (hOrigFont == nullptr)
 {
 SAL_WARN("vcl.gdi", "SelectObject failed: " << 
WindowsErrorString(GetLastError()));
 return false;
 }
+const ::comphelper::ScopeGuard aHFONTrestoreScopeGuard(
+[&aHDC,hOrigFont]() { SelectFont(aHDC.get(), hOrigFont); });
 
 // For now we assume DWrite is present and we won't bother with fallback 
paths.
 D2DWriteTextOutRenderer * pTxt = dynamic_cast(&TextOutRenderer::get(true));
@@ -86,6 +90,7 @@ bool WinFontInstance::CacheGlyphToAtlas(HDC hDC, HFONT hFont, 
int nGlyphIndex, S
 SAL_WARN("vcl.gdi", "Binding of font failed. The font might not be 
supported by DirectWrite.");
 return false;
 }
+const ::comphelper::ScopeGuard aFontReleaseScopeGuard([&pTxt]() { 
pTxt->ReleaseFont(); });
 
 std::vector aGlyphIndices(1);
 aGlyphIndices[0] = nGlyphIndex;
@@ -158,10 +163,7 @@ bool WinFontInstance::CacheGlyphToAtlas(HDC hDC, HFONT 
hFont, int nGlyphIndex, S
 
 ID2D1SolidColorBrush* pBrush = nullptr;
 if 
(!SUCCEEDED(pRT->CreateSolidColorBrush(D2D1::ColorF(D2D1::ColorF::Black), 
&pBrush)))
-{
-pTxt->ReleaseFont();
 return false;
-}
 
 D2D1_POINT_2F baseline = {
 static_cast(aElement.getExtraOffset()),
@@ -194,12 +196,9 @@ bool WinFontInstance::CacheGlyphToAtlas(HDC hDC, HFONT 
hFont, int nGlyphIndex, S
 break;
 default:
 SAL_WARN("vcl.gdi", "DrawGlyphRun-EndDraw failed: " << 
WindowsErrorString(GetLastError()));
-SelectFont(aDC.getCompatibleHDC(), hOrigFont);
 return false;
 }
 
-pTxt->ReleaseFont();
-
 if (!OpenGLGlyphCache::ReserveTextureSpace(aElement, nBitmapWidth, 
nBitmapHeight))
 return false;
 if (!aDC.copyToTexture(aElement.maTexture))
@@ -207,8 +206,6 @@ bool WinFontInstance::CacheGlyphToAtlas(HDC hDC, HFONT 
hFont, int nGlyphIndex, S
 
 maOpenGLGlyphCache.PutDrawElementInCache(aElement, nGlyphIndex);
 
-SelectFont(aDC.getCompatibleHDC(), hOrigFont);
-
 return true;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-19 Thread Libreoffice Gerrit user
 svx/source/svdraw/svdpdf.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d20c39d1b07a2c55de442cb4e0859fbb939af78b
Author: Caolán McNamara 
AuthorDate: Fri Oct 19 10:32:26 2018 +0100
Commit: Caolán McNamara 
CommitDate: Fri Oct 19 22:26:41 2018 +0200

copy and paste error

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

diff --git a/svx/source/svdraw/svdpdf.hxx b/svx/source/svdraw/svdpdf.hxx
index fac2847e953e..bc3ba11946f6 100644
--- a/svx/source/svdraw/svdpdf.hxx
+++ b/svx/source/svdraw/svdpdf.hxx
@@ -143,7 +143,7 @@ class ImpSdrPdfImport final
 if (top > bottom)
 bottom = std::max(leftBottomY, rightBottomY);
 else
-bottom = std::max(leftBottomY, rightBottomY);
+bottom = std::min(leftBottomY, rightBottomY);
 }
 
 std::string toString() const
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 3 commits - chart2/source include/svx shell/source svx/source

2018-10-19 Thread Libreoffice Gerrit user
 chart2/source/tools/DiagramHelper.cxx  |   33 +++--
 include/svx/galtheme.hxx   |1 +
 shell/source/win32/zipfile/zipfile.cxx |2 +-
 svx/source/gallery2/gallery1.cxx   |2 +-
 svx/source/gallery2/galtheme.cxx   |1 +
 5 files changed, 19 insertions(+), 20 deletions(-)

New commits:
commit 919fb9c999b369f4b3f50336188204716e01190f
Author: Caolán McNamara 
AuthorDate: Fri Oct 19 09:52:32 2018 +0100
Commit: Caolán McNamara 
CommitDate: Fri Oct 19 22:25:46 2018 +0200

copy and paste error

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

diff --git a/include/svx/galtheme.hxx b/include/svx/galtheme.hxx
index 231ad1656efc..be0ef9ec2be9 100644
--- a/include/svx/galtheme.hxx
+++ b/include/svx/galtheme.hxx
@@ -136,6 +136,7 @@ public:
 SAL_DLLPRIVATE const INetURLObject& GetThmURL() const;
 const INetURLObject&GetSdgURL() const;
 SAL_DLLPRIVATE const INetURLObject& GetSdvURL() const;
+SAL_DLLPRIVATE const INetURLObject& GetStrURL() const;
 
 sal_uInt32  GetId() const;
 SAL_DLLPRIVATE void SetId( sal_uInt32 nNewId, bool bResetThemeName 
);
diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx
index 293b30342a36..c417c94eab56 100644
--- a/svx/source/gallery2/gallery1.cxx
+++ b/svx/source/gallery2/gallery1.cxx
@@ -656,7 +656,7 @@ bool Gallery::RemoveTheme( const OUString& rThemeName )
 INetURLObject   aThmURL( pThm->GetThmURL() );
 INetURLObject   aSdgURL( pThm->GetSdgURL() );
 INetURLObject   aSdvURL( pThm->GetSdvURL() );
-INetURLObject   aStrURL( pThm->GetSdvURL() );
+INetURLObject   aStrURL( pThm->GetStrURL() );
 
 ReleaseTheme( pThm, aListener );
 
diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx
index 651fb49cfcc9..5ac71a218e39 100644
--- a/svx/source/gallery2/galtheme.cxx
+++ b/svx/source/gallery2/galtheme.cxx
@@ -1470,6 +1470,7 @@ void GalleryTheme::ImplSetModified( bool bModified )
 const INetURLObject& GalleryTheme::GetThmURL() const { return 
pThm->GetThmURL(); }
 const INetURLObject& GalleryTheme::GetSdgURL() const { return 
pThm->GetSdgURL(); }
 const INetURLObject& GalleryTheme::GetSdvURL() const { return 
pThm->GetSdvURL(); }
+const INetURLObject& GalleryTheme::GetStrURL() const { return 
pThm->GetStrURL(); }
 sal_uInt32 GalleryTheme::GetId() const { return pThm->GetId(); }
 void GalleryTheme::SetId( sal_uInt32 nNewId, bool bResetThemeName ) { 
pThm->SetId( nNewId, bResetThemeName ); }
 bool GalleryTheme::IsThemeNameFromResource() const { return 
pThm->IsNameFromResource(); }
commit 39bbc2230d7cb9609954d90a9a471c2f9574185c
Author: Caolán McNamara 
AuthorDate: Fri Oct 19 12:57:53 2018 +0100
Commit: Caolán McNamara 
CommitDate: Fri Oct 19 22:25:11 2018 +0200

new throws on failure

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

diff --git a/shell/source/win32/zipfile/zipfile.cxx 
b/shell/source/win32/zipfile/zipfile.cxx
index f7f8ccd23806..6ab62d5f94ce 100644
--- a/shell/source/win32/zipfile/zipfile.cxx
+++ b/shell/source/win32/zipfile/zipfile.cxx
@@ -405,7 +405,7 @@ ZipFile::ZipFile(const std::wstring &FileName) :
 m_bShouldFree(true)
 {
 m_pStream = new FileStream(FileName.c_str());
-if (m_pStream && !isZipStream(m_pStream))
+if (!isZipStream(m_pStream))
 {
 delete m_pStream;
 m_pStream = nullptr;
commit 2bb1a0bf95570b205e181235bb906eaadc949318
Author: Caolán McNamara 
AuthorDate: Fri Oct 19 12:30:42 2018 +0100
Commit: Caolán McNamara 
CommitDate: Fri Oct 19 22:24:44 2018 +0200

loop run a maximum of once

revealed since...

commit f69585c35411ca74e17bb6cd1cf535489472a4c2
Date:   Tue Mar 1 20:38:22 2016 +0200

loplugin:unuseddefaultparams in chart2

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

diff --git a/chart2/source/tools/DiagramHelper.cxx 
b/chart2/source/tools/DiagramHelper.cxx
index c3d9104e8e98..f7be64b86c3b 100644
--- a/chart2/source/tools/DiagramHelper.cxx
+++ b/chart2/source/tools/DiagramHelper.cxx
@@ -280,26 +280,23 @@ void DiagramHelper::setStackMode(
 if( !xChartTypeContainer.is() )
 continue;
 uno::Sequence< uno::Reference< XChartType > > aChartTypeList( 
xChartTypeContainer->getChartTypes() );
-sal_Int32 nMax = aChartTypeList.getLength();
-if( nMax >= 1 )
-nMax = 1;
-for( sal_Int32 nT = 0;

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

2018-10-19 Thread Libreoffice Gerrit user
 sw/source/filter/ww8/ww8par2.cxx |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 8d645c36b8cee4850884390fac4d858ceeff1108
Author: Caolán McNamara 
AuthorDate: Fri Oct 19 12:49:34 2018 +0100
Commit: Caolán McNamara 
CommitDate: Fri Oct 19 22:24:24 2018 +0200

expression is excessive

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

diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 58257f01830c..f272fded5b5c 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -798,8 +798,8 @@ void SwWW8ImplReader::Read_ANLevelDesc( sal_uInt16, const 
sal_uInt8* pData, shor
 return;
 }
 
-if( m_nSwNumLevel <= MAXLEVEL // Value range mapping WW:1..9 -> 
SW:0..8
-&& m_nSwNumLevel <= 9 ){  // No Bullets or Numbering
+if (m_nSwNumLevel <= 9) // Value range mapping WW:1..9 -> SW:0..8
+{
 
 // If NumRuleItems were set, either directly or through inheritance, 
disable them now
 m_pCurrentColl->SetFormatAttr( SwNumRuleItem() );
@@ -814,7 +814,8 @@ void SwWW8ImplReader::Read_ANLevelDesc( sal_uInt16, const 
sal_uInt8* pData, shor
 
 // Missing Levels need not be replenished
 m_rDoc.SetOutlineNumRule( aNR );
-}else if( m_xStyles->mnWwNumLevel == 10 || m_xStyles->mnWwNumLevel == 11 ){
+}
+else if( m_xStyles->mnWwNumLevel == 10 || m_xStyles->mnWwNumLevel == 11 ){
 SwNumRule* pNR = GetStyRule();
 SetAnld(pNR, reinterpret_cast(pData), 0, false);
 m_pCurrentColl->SetFormatAttr( SwNumRuleItem( pNR->GetName() ) );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-19 Thread Libreoffice Gerrit user
 oox/source/drawingml/diagram/diagramlayoutatoms.cxx |4 +++-
 sd/qa/unit/import-tests-smartart.cxx|7 +++
 2 files changed, 10 insertions(+), 1 deletion(-)

New commits:
commit b61d2784271bf8b042642c378f50e8b446682548
Author: Miklos Vajna 
AuthorDate: Fri Oct 19 16:49:48 2018 +0200
Commit: Miklos Vajna 
CommitDate: Fri Oct 19 21:34:07 2018 +0200

oox smartart: fix width of shapes with agl=lin, linDir=fromT

Smaller width only makes sense in the fromL/fromR cases, I think.

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

diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx 
b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
index ed0678340e4b..7ef0e456ce0f 100644
--- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
+++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
@@ -358,7 +358,9 @@ void AlgAtom::layoutShape( const ShapePtr& rShape,
 
 awt::Size aChildSize = rShape->getSize();
 
-aChildSize.Width /= (nCount + (nCount-1)*fSpace);
+// Lineral vertically: no adjustment of width.
+if (nDir != XML_fromT)
+aChildSize.Width /= (nCount + (nCount-1)*fSpace);
 aChildSize.Height /= (nCount + (nCount-1)*fSpace);
 
 awt::Point aCurrPos(0, 0);
diff --git a/sd/qa/unit/import-tests-smartart.cxx 
b/sd/qa/unit/import-tests-smartart.cxx
index 1c2ef31f2958..9ffb432ce104 100644
--- a/sd/qa/unit/import-tests-smartart.cxx
+++ b/sd/qa/unit/import-tests-smartart.cxx
@@ -371,6 +371,13 @@ void SdImportTestSmartArt::testVertialBoxList()
 // 'actual: 0'.
 CPPUNIT_ASSERT_EQUAL(static_cast(2), xShapeGroup->getCount());
 
+uno::Reference xSecondChild(xShapeGroup->getByIndex(1), 
uno::UNO_QUERY);
+CPPUNIT_ASSERT(xSecondChild.is());
+// Without the accompanying fix in place, this test would have failed with
+// 'actual: 7361' (and with the fix: 'actual: 16932', i.e. the width of the
+// parent).
+CPPUNIT_ASSERT_GREATER(static_cast(1), 
xSecondChild->getSize().Width);
+
 xDocShRef->DoClose();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-19 Thread Libreoffice Gerrit user
 oox/source/shape/WpsContext.cxx |8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

New commits:
commit 71fcb90fb7b795c57b0634e114927103597c9cb1
Author: Miklos Vajna 
AuthorDate: Fri Oct 19 16:09:49 2018 +0200
Commit: Miklos Vajna 
CommitDate: Fri Oct 19 21:20:41 2018 +0200

oox WpsContext: bTextFrame is always false

Since commit d379d18666aa42031359ca8eb34b0021960347ae (oox: import WPS
shape with text as shape with textbox, 2014-06-18).

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

diff --git a/oox/source/shape/WpsContext.cxx b/oox/source/shape/WpsContext.cxx
index 040d8df1e655..e196449ec7ed 100644
--- a/oox/source/shape/WpsContext.cxx
+++ b/oox/source/shape/WpsContext.cxx
@@ -116,7 +116,6 @@ oox::core::ContextHandlerRef 
WpsContext::onCreateContext(sal_Int32 nElementToken
 
 if (xServiceInfo.is())
 {
-bool bTextFrame = 
xServiceInfo->supportsService("com.sun.star.text.TextFrame");
 // Handle inset attributes for Writer textframes.
 sal_Int32 aInsets[] = { XML_lIns, XML_tIns, XML_rIns, XML_bIns 
};
 boost::optional oInsets[4];
@@ -129,11 +128,10 @@ oox::core::ContextHandlerRef 
WpsContext::onCreateContext(sal_Int32 nElementToken
 // Defaults from the spec: left/right: 91440 EMU, 
top/bottom: 45720 EMU
 oInsets[i] = (aInsets[i] == XML_lIns || aInsets[i] == 
XML_rIns) ? 254 : 127;
 }
-OUString aProps[] = { OUString("LeftBorderDistance"), 
OUString("TopBorderDistance"), OUString("RightBorderDistance"), 
OUString("BottomBorderDistance") };
-OUString aShapeProps[] = { OUString("TextLeftDistance"), 
OUString("TextUpperDistance"), OUString("TextRightDistance"), 
OUString("TextLowerDistance") };
-for (std::size_t i = 0; i < SAL_N_ELEMENTS(bTextFrame ? aProps 
: aShapeProps); ++i)
+const OUString aShapeProps[] = { OUString("TextLeftDistance"), 
OUString("TextUpperDistance"), OUString("TextRightDistance"), 
OUString("TextLowerDistance") };
+for (std::size_t i = 0; i < SAL_N_ELEMENTS(aShapeProps); ++i)
 if (oInsets[i])
-xPropertySet->setPropertyValue((bTextFrame ? aProps : 
aShapeProps)[i], uno::makeAny(*oInsets[i]));
+xPropertySet->setPropertyValue(aShapeProps[i], 
uno::makeAny(*oInsets[i]));
 }
 
 // Handle text vertical adjustment inside a text frame
___
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-6.0' - sc/source

2018-10-19 Thread Libreoffice Gerrit user
 sc/source/filter/oox/workbookhelper.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1121ee14d673955d7ebdaec296680ef7b4f062d3
Author: Aron Budea 
AuthorDate: Fri Oct 19 20:56:35 2018 +0200
Commit: Aron Budea 
CommitDate: Fri Oct 19 20:56:35 2018 +0200

[cp] Add another known good generator.

Change-Id: I05a9aff0d1bddf0efd2491f09fe0fbf7144e8b4d

diff --git a/sc/source/filter/oox/workbookhelper.cxx 
b/sc/source/filter/oox/workbookhelper.cxx
index b3480d51f6bf..2a24577627ac 100644
--- a/sc/source/filter/oox/workbookhelper.cxx
+++ b/sc/source/filter/oox/workbookhelper.cxx
@@ -542,7 +542,7 @@ void WorkbookGlobals::initialize()
 aCalcConfig.SetStringRefSyntax( formula::FormulaGrammar::CONV_XL_A1 ) ;
 mpDoc->SetCalcConfig(aCalcConfig);
 }
-else if (aGenerator.startsWithIgnoreAsciiCase("LibreOffice"))
+else if (aGenerator.startsWithIgnoreAsciiCase("LibreOffice") || 
aGenerator.startsWithIgnoreAsciiCase("Collabora"))
 {
 mbGeneratorKnownGood = true;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-19 Thread Libreoffice Gerrit user
 sc/uiconfig/scalc/ui/notebookbar.ui   |4 ++--
 sw/uiconfig/swriter/ui/notebookbar.ui |4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 2c4b0396ba0de0ced0d46293a0abef1e943d5f45
Author: andreas kainz 
AuthorDate: Fri Oct 19 09:20:43 2018 +0200
Commit: andreas_kainz 
CommitDate: Fri Oct 19 20:56:13 2018 +0200

NB fix TextShape with uno:DrawText instead of uno:Text

Change-Id: If213ecdc5dd47f3870a71131d3e634f216b3da98
Reviewed-on: https://gerrit.libreoffice.org/61989
Reviewed-by: Maxim Monastirsky 
Tested-by: Jenkins
Reviewed-by: andreas_kainz 

diff --git a/sc/uiconfig/scalc/ui/notebookbar.ui 
b/sc/uiconfig/scalc/ui/notebookbar.ui
index 0a2863fb8611..f422587ed5fb 100644
--- a/sc/uiconfig/scalc/ui/notebookbar.ui
+++ b/sc/uiconfig/scalc/ui/notebookbar.ui
@@ -5014,10 +5014,10 @@
 False
 3
 
-  
+  
 True
 False
-.uno:Text
+.uno:DrawText
   
   
 False
diff --git a/sw/uiconfig/swriter/ui/notebookbar.ui 
b/sw/uiconfig/swriter/ui/notebookbar.ui
index 1f7131c0b189..81c0d6cb72f0 100644
--- a/sw/uiconfig/swriter/ui/notebookbar.ui
+++ b/sw/uiconfig/swriter/ui/notebookbar.ui
@@ -4802,10 +4802,10 @@
 False
 3
 
-  
+  
 True
 False
-.uno:Text
+.uno:DrawText
   
   
 False
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-19 Thread Libreoffice Gerrit user
 basic/source/runtime/dllmgr-x64.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 49d304c4f6635381a27b60a8944744cc81ff1e91
Author: Mike Kaganski 
AuthorDate: Fri Oct 19 14:54:28 2018 +0200
Commit: Mike Kaganski 
CommitDate: Fri Oct 19 20:31:22 2018 +0200

tdf#120706: nullptr dereference

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

diff --git a/basic/source/runtime/dllmgr-x64.cxx 
b/basic/source/runtime/dllmgr-x64.cxx
index b69c95cf2f88..4c5973fdc919 100644
--- a/basic/source/runtime/dllmgr-x64.cxx
+++ b/basic/source/runtime/dllmgr-x64.cxx
@@ -476,7 +476,7 @@ ErrCode call(
 OUString const & dll, ProcData const & proc, SbxArray * arguments,
 SbxVariable & result)
 {
-if (arguments->Count() > 20)
+if (arguments && arguments->Count() > 20)
 return ERRCODE_BASIC_NOT_IMPLEMENTED;
 
 std::vector< char > stack;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'private/mst/sw_redlinehide_3' - 8 commits - sw/inc sw/source

2018-10-19 Thread Libreoffice Gerrit user
 sw/inc/SwNodeNum.hxx|7 +
 sw/inc/list.hxx |1 
 sw/inc/ndtxt.hxx|   19 +---
 sw/source/core/SwNumberTree/SwNodeNum.cxx   |   23 ++--
 sw/source/core/doc/list.cxx |   53 ---
 sw/source/core/inc/txtfrm.hxx   |4 
 sw/source/core/layout/wsfrm.cxx |5 +
 sw/source/core/text/EnhancedPDFExportHelper.cxx |4 
 sw/source/core/text/redlnitr.cxx|   18 +++
 sw/source/core/text/txtfld.cxx  |5 -
 sw/source/core/text/txtfrm.cxx  |   12 +-
 sw/source/core/txtnode/ndtxt.cxx|  113 ++--
 sw/source/uibase/utlui/content.cxx  |2 
 13 files changed, 191 insertions(+), 75 deletions(-)

New commits:
commit fa7b0497979d6de60e92ccb56b94d27f1c69a5c3
Author: Michael Stahl 
AuthorDate: Fri Oct 19 16:06:08 2018 +0200
Commit: Michael Stahl 
CommitDate: Fri Oct 19 16:59:57 2018 +0200

sw_redlinehide_3: invalidate numbered text nodes on Show/Hide

Call the same function as SwNodeNum::NotifyNode().

Change-Id: If2edc5fb9364e97715d4750f3a45c3c918edfebf

diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index 7aff243c691a..a8486ef619ad 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -4344,6 +4344,11 @@ static void UnHideRedlines(SwRootFrame & rLayout,
 }
 pFrame->Broadcast(SfxHint()); // notify SwAccessibleParagraph
 }
+// all nodes, not just merged ones! it may be in the same list as
+if (rTextNode.IsNumbered()) // a preceding merged one...
+{   // notify frames so they reformat numbering portions
+rTextNode.NumRuleChgd();
+}
 }
 if (!rNode.IsCreateFrameWhenHidingRedlines())
 {
commit 8db3d69042ae34e05be168644f8bf9babd380abf
Author: Michael Stahl 
AuthorDate: Fri Oct 19 15:59:53 2018 +0200
Commit: Michael Stahl 
CommitDate: Fri Oct 19 16:59:57 2018 +0200

sw_redlinehide_3: use the second list number in the text formatting

Change-Id: Ibe2afae869b1999772fa6132e35a1e951fffddd2

diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx 
b/sw/source/core/text/EnhancedPDFExportHelper.cxx
index d171a5fbef80..a666da304538 100644
--- a/sw/source/core/text/EnhancedPDFExportHelper.cxx
+++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx
@@ -419,7 +419,7 @@ void SwTaggedPDFHelper::BeginTag( 
vcl::PDFWriter::StructElement eType, const OUS
 {
 const SwTextFrame& rTextFrame = static_cast(mpNumInfo->mrFrame);
 SwTextNode const*const pTextNd = rTextFrame.GetTextNodeForParaProps();
-const SwNodeNum* pNodeNum = pTextNd->GetNum();
+const SwNodeNum* pNodeNum = pTextNd->GetNum(rTextFrame.getRootFrame());
 
 if ( vcl::PDFWriter::List == eType )
 {
@@ -838,7 +838,7 @@ void SwTaggedPDFHelper::BeginNumberedListStructureElements()
 
 const SwTextNode *const pTextNd = rTextFrame.GetTextNodeForParaProps();
 const SwNumRule* pNumRule = pTextNd->GetNumRule();
-const SwNodeNum* pNodeNum = pTextNd->GetNum();
+const SwNodeNum* pNodeNum = pTextNd->GetNum(rTextFrame.getRootFrame());
 
 const bool bNumbered = !pTextNd->IsOutline() && pNodeNum && 
pNodeNum->GetParent() && pNumRule;
 
diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx
index 196b11b84cf9..e7fd1223fe95 100644
--- a/sw/source/core/text/txtfld.cxx
+++ b/sw/source/core/text/txtfld.cxx
@@ -472,6 +472,9 @@ SwNumberPortion *SwTextFormatter::NewNumberPortion( 
SwTextFormatInfo &rInf ) con
 return nullptr;
 
 SwNumberPortion *pRet = nullptr;
+// sw_redlinehide: at this point it's certain that pTextNd is the node with
+// the numbering of the frame; only the actual number-vector (GetNumString)
+// depends on the hide-mode in the layout so other calls don't need to care
 const SwTextNode *const pTextNd = 
GetTextFrame()->GetTextNodeForParaProps();
 const SwNumRule* pNumRule = pTextNd->GetNumRule();
 
@@ -572,7 +575,7 @@ SwNumberPortion *SwTextFormatter::NewNumberPortion( 
SwTextFormatInfo &rInf ) con
 }
 else
 {
-OUString aText( pTextNd->GetNumString() );
+OUString aText( pTextNd->GetNumString(true, MAXLEVEL, 
m_pFrame->getRootFrame()) );
 if ( !aText.isEmpty() )
 {
 aText += pTextNd->GetLabelFollowedBy();
diff --git a/sw/source/uibase/utlui/content.cxx 
b/sw/source/uibase/utlui/content.cxx
index 91b1024aa9d8..614fa1a9b8bc 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -1868,7 +1868,7 @@ bool SwContentTree::FillTransferData( 
TransferDataContainer& rTransfer,
 if( pTextNd && pOutlRule && pTextNd->IsN

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

2018-10-19 Thread Libreoffice Gerrit user
 scripting/source/pyprov/pythonscript.py |   30 --
 1 file changed, 28 insertions(+), 2 deletions(-)

New commits:
commit b1c85cdb37a47998f8ab135fbc96f186334b171c
Author: Caolán McNamara 
AuthorDate: Thu Oct 18 20:39:23 2018 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Oct 19 17:16:23 2018 +0200

keep pyuno script processing below base uri

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

diff --git a/scripting/source/pyprov/pythonscript.py 
b/scripting/source/pyprov/pythonscript.py
index 4803d0bebc23..f5aa217a 100644
--- a/scripting/source/pyprov/pythonscript.py
+++ b/scripting/source/pyprov/pythonscript.py
@@ -25,6 +25,7 @@ import imp
 import time
 import ast
 import platform
+from com.sun.star.uri.RelativeUriExcessParentSegments import RETAIN
 
 try:
 unicode
@@ -212,8 +213,33 @@ class MyUriHelper:
 
 def scriptURI2StorageUri( self, scriptURI ):
 try:
-myUri = self.m_uriRefFac.parse(scriptURI)
-ret = self.m_baseUri + "/" + myUri.getName().replace( "|", "/" )
+# base path to the python script location
+sBaseUri = self.m_baseUri + "/"
+xBaseUri = self.m_uriRefFac.parse(sBaseUri)
+
+# path to the .py file + "$functionname, arguments, etc
+xStorageUri = self.m_uriRefFac.parse(scriptURI)
+sStorageUri = xStorageUri.getName().replace( "|", "/" );
+
+# path to the .py file, relative to the base
+sFileUri = sStorageUri[0:sStorageUri.find("$")]
+xFileUri = self.m_uriRefFac.parse(sFileUri)
+if not xFileUri:
+message = "pythonscript: invalid relative uri '" + sFileUri+ 
"'"
+log.debug( message )
+raise RuntimeException( message )
+
+# absolute path to the .py file
+xAbsScriptUri = self.m_uriRefFac.makeAbsolute(xBaseUri, xFileUri, 
True, RETAIN)
+sAbsScriptUri = xAbsScriptUri.getUriReference()
+
+# ensure py file is under the base path
+if not sAbsScriptUri.startswith(sBaseUri):
+message = "pythonscript: storage uri '" + sAbsScriptUri + "' 
not in base uri '" + self.m_baseUri + "'"
+log.debug( message )
+raise RuntimeException( message )
+
+ret = sBaseUri + sStorageUri
 log.debug( "converting scriptURI="+scriptURI + " to storageURI=" + 
ret )
 return ret
 except UnoException as e:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - xmlscript/source

2018-10-19 Thread Libreoffice Gerrit user
 xmlscript/source/xmldlg_imexp/xmldlg_export.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3ec5fb847364ca65322079fdc1026ed95a0a8933
Author: Caolán McNamara 
AuthorDate: Fri Oct 19 10:21:30 2018 +0100
Commit: Caolán McNamara 
CommitDate: Fri Oct 19 17:08:11 2018 +0200

copy and paste error

Change-Id: I73a617137bf0b3b567181ff817069944076eab0e
Reviewed-on: https://gerrit.libreoffice.org/62022
Reviewed-by: Julien Nabet 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx 
b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
index ae6340cd9848..f5705703a278 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
@@ -1248,7 +1248,7 @@ inline bool equalFont( Style const & style1, Style const 
& style2 )
 f1.StyleName == f2.StyleName &&
 f1.Family == f2.Family &&
 f1.CharSet == f2.CharSet &&
-f1.Pitch == f2.CharSet &&
+f1.Pitch == f2.Pitch &&
 f1.CharacterWidth == f2.CharacterWidth &&
 f1.Weight == f2.Weight &&
 f1.Slant == f2.Slant &&
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-19 Thread Libreoffice Gerrit user
 i18npool/source/calendar/calendar_jewish.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit f209524965641596cea16a0ee7780fffe176235a
Author: Caolán McNamara 
AuthorDate: Fri Oct 19 14:29:11 2018 +0100
Commit: Caolán McNamara 
CommitDate: Fri Oct 19 16:44:12 2018 +0200

clarify Calendar_jewish::getDisplayString a little

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

diff --git a/i18npool/source/calendar/calendar_jewish.cxx 
b/i18npool/source/calendar/calendar_jewish.cxx
index 837f6f14f35a..9ac585447265 100644
--- a/i18npool/source/calendar/calendar_jewish.cxx
+++ b/i18npool/source/calendar/calendar_jewish.cxx
@@ -281,9 +281,9 @@ void Calendar_jewish::mapToGregorian()
 
 // Methods in XExtendedCalendar
 OUString SAL_CALL
-Calendar_jewish::getDisplayString( sal_Int32 nCalendarDisplayCode, sal_Int16 
nNativeNumberMode )
+Calendar_jewish::getDisplayString( sal_Int32 nCalendarDisplayCode, sal_Int16 
/*nNativeNumberMode*/ )
 {
-nNativeNumberMode = NativeNumberMode::NATNUM2;  // make Hebrew number for 
Jewish calendar
+const sal_Int16 nNativeNumberMode = NativeNumberMode::NATNUM2;  // make 
Hebrew number for Jewish calendar
 
 if (nCalendarDisplayCode == CalendarDisplayCode::SHORT_YEAR) {
 sal_Int32 value = getValue(CalendarFieldIndex::YEAR) % 1000; // take 
last 3 digits
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-19 Thread Libreoffice Gerrit user
 ucb/source/ucp/tdoc/tdoc_storage.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6e910b3de459db604b303be49b510a34ed8bb870
Author: Caolán McNamara 
AuthorDate: Fri Oct 19 13:30:48 2018 +0100
Commit: Caolán McNamara 
CommitDate: Fri Oct 19 16:43:03 2018 +0200

naming order in header doesn't match order in body

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

diff --git a/ucb/source/ucp/tdoc/tdoc_storage.hxx 
b/ucb/source/ucp/tdoc/tdoc_storage.hxx
index a5a742e2f1c1..d6379255427a 100644
--- a/ucb/source/ucp/tdoc/tdoc_storage.hxx
+++ b/ucb/source/ucp/tdoc/tdoc_storage.hxx
@@ -127,8 +127,8 @@ namespace tdoc_ucp {
 css::uno::Reference< css::io::XStream >
 queryStream( const css::uno::Reference<
 css::embed::XStorage > & xParentStorage,
- const OUString & rPassword,
  const OUString & rUri,
+ const OUString & rPassword,
  StorageAccessMode eMode,
  bool bTruncate /* ignored for read-only streams */ );
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-19 Thread Libreoffice Gerrit user
 vcl/source/window/toolbox2.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 4ba11dd84a1e75a29ad96d4f92c64191c69cacb3
Author: Caolán McNamara 
AuthorDate: Fri Oct 19 12:59:59 2018 +0100
Commit: Caolán McNamara 
CommitDate: Fri Oct 19 16:41:41 2018 +0200

simplify comparison

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

diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index d03d96759d34..082cab508b82 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -1019,8 +1019,7 @@ void ToolBox::SetItemImageMirrorMode( sal_uInt16 nItemId, 
bool bMirror )
 {
 ImplToolItem* pItem = &mpData->m_aItems[nPos];
 
-if ((pItem->mbMirrorMode && !bMirror) ||
-(!pItem->mbMirrorMode && bMirror))
+if (pItem->mbMirrorMode != bMirror)
 {
 pItem->mbMirrorMode = bMirror;
 if (!!pItem->maImage)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: registry/tools

2018-10-19 Thread Libreoffice Gerrit user
 registry/tools/fileurl.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 726328d26cd274ce72f2db2d84e3e915a4d142a2
Author: Caolán McNamara 
AuthorDate: Fri Oct 19 12:43:01 2018 +0100
Commit: Caolán McNamara 
CommitDate: Fri Oct 19 16:39:39 2018 +0200

expression is excessive

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

diff --git a/registry/tools/fileurl.cxx b/registry/tools/fileurl.cxx
index 46f0ba7b1140..cabfb16e95da 100644
--- a/registry/tools/fileurl.cxx
+++ b/registry/tools/fileurl.cxx
@@ -52,7 +52,7 @@ OUString convertToFileUrl(char const * filename, sal_Int32 
length)
 OUString uFileUrl;
 if (length > 0)
 {
-if ((filename[0] == '.') || (filename[0] != SEPARATOR))
+if (filename[0] != SEPARATOR)
 {
 // relative path name.
 OUString uWorkingDir;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-19 Thread Libreoffice Gerrit user
 xmlscript/source/xmldlg_imexp/xmldlg_export.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 45e208f4621fba7525c3f1e44b6529b70d771ed4
Author: Caolán McNamara 
AuthorDate: Fri Oct 19 10:21:30 2018 +0100
Commit: Caolán McNamara 
CommitDate: Fri Oct 19 16:36:33 2018 +0200

copy and paste error

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

diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx 
b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
index 32ca0eb15ce0..60343d87c507 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
@@ -1248,7 +1248,7 @@ static bool equalFont( Style const & style1, Style const 
& style2 )
 f1.StyleName == f2.StyleName &&
 f1.Family == f2.Family &&
 f1.CharSet == f2.CharSet &&
-f1.Pitch == f2.CharSet &&
+f1.Pitch == f2.Pitch &&
 f1.CharacterWidth == f2.CharacterWidth &&
 f1.Weight == f2.Weight &&
 f1.Slant == f2.Slant &&
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-19 Thread Libreoffice Gerrit user
 sc/source/core/data/column4.cxx |   16 ++--
 1 file changed, 10 insertions(+), 6 deletions(-)

New commits:
commit c78c42f63f91f28dfae7340d379fa1b8136633c0
Author: Eike Rathke 
AuthorDate: Mon Oct 15 23:10:07 2018 +0200
Commit: Caolán McNamara 
CommitDate: Fri Oct 19 16:32:15 2018 +0200

Resolves: tdf#119623 record group positions also for top cells

So listeners can be re-established for remaining grouped cells if
top cell is deleted (which ends listening and probably was the
cause to exclude them here).

Change-Id: Ic91b74c65013452d56b5cfbc132722c4314743c8
Reviewed-on: https://gerrit.libreoffice.org/61808
Reviewed-by: Eike Rathke 
Tested-by: Jenkins
(cherry picked from commit fbec372ba829b3f32b3c0874920b2ee36220ef9d)
Reviewed-on: https://gerrit.libreoffice.org/61818
Tested-by: Xisco Faulí 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx
index 832351d275a7..d08321073668 100644
--- a/sc/source/core/data/column4.cxx
+++ b/sc/source/core/data/column4.cxx
@@ -1539,10 +1539,12 @@ void ScColumn::EndListeningIntersectedGroups(
 {
 ScFormulaCell* pFC = sc::formula_block::at(*it->data, aPos.second);
 ScFormulaCellGroupRef xGroup = pFC->GetCellGroup();
-if (xGroup && !pFC->IsSharedTop())
+if (xGroup)
 {
-// End listening.
-pFC->EndListeningTo(rCxt);
+if (!pFC->IsSharedTop())
+// End listening.
+pFC->EndListeningTo(rCxt);
+
 if (pGroupPos)
 // Record the position of the top cell of the group.
 pGroupPos->push_back(xGroup->mpTopCell->aPos);
@@ -1555,10 +1557,12 @@ void ScColumn::EndListeningIntersectedGroups(
 {
 ScFormulaCell* pFC = sc::formula_block::at(*it->data, aPos.second);
 ScFormulaCellGroupRef xGroup = pFC->GetCellGroup();
-if (xGroup && !pFC->IsSharedTop())
+if (xGroup)
 {
-// End listening.
-pFC->EndListeningTo(rCxt);
+if (!pFC->IsSharedTop())
+// End listening.
+pFC->EndListeningTo(rCxt);
+
 if (pGroupPos)
 {
 // Record the position of the bottom cell of the group.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-19 Thread Libreoffice Gerrit user
 sw/qa/extras/rtfexport/data/tdf112520.docx |binary
 sw/qa/extras/rtfexport/rtfexport3.cxx  |   21 +
 sw/source/filter/ww8/rtfsdrexport.cxx  |   12 +---
 sw/source/filter/ww8/rtfsdrexport.hxx  |2 ++
 4 files changed, 32 insertions(+), 3 deletions(-)

New commits:
commit 1c6bea8e677861d201e9b21b5f0e356f77dabaaf
Author: Miklos Vajna 
AuthorDate: Mon Oct 15 21:11:24 2018 +0200
Commit: Caolán McNamara 
CommitDate: Fri Oct 19 16:31:41 2018 +0200

tdf#112520 RTF export: write ZOrder only for toplevel shapes

RTF export at the moment exports children of group shapes as a flat
shape list. This means that the order inside the group shape is not
relevant for the toplevel ZOrder, so just don't write it.

(cherry picked from commit 2b920bdc12f3bf3a196ec0d6d59043a68e663e33)

Change-Id: I870707cb28c2f177c0e5d9cf5328260e76b661f3
Reviewed-on: https://gerrit.libreoffice.org/61904
Tested-by: Xisco Faulí 
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/qa/extras/rtfexport/data/tdf112520.docx 
b/sw/qa/extras/rtfexport/data/tdf112520.docx
new file mode 100644
index ..31c5a0afc21e
Binary files /dev/null and b/sw/qa/extras/rtfexport/data/tdf112520.docx differ
diff --git a/sw/qa/extras/rtfexport/rtfexport3.cxx 
b/sw/qa/extras/rtfexport/rtfexport3.cxx
index 45be1c450cb4..26bbc8121372 100644
--- a/sw/qa/extras/rtfexport/rtfexport3.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport3.cxx
@@ -16,6 +16,7 @@
 #include 
 #include 
 #include 
+#include 
 
 class Test : public SwModelTestBase
 {
@@ -172,6 +173,26 @@ DECLARE_RTFEXPORT_TEST(testTdf117505, "tdf117505.odt")
  getProperty(xFirstPage, "HeaderHeight"));
 }
 
+DECLARE_RTFEXPORT_TEST(testTdf112520, "tdf112520.docx")
+{
+if (!mbExported)
+return;
+
+// Assert that the white shape is on top of the yellow one.
+CPPUNIT_ASSERT_EQUAL(static_cast(0x00),
+ getProperty(getShape(2), "FillColor"));
+CPPUNIT_ASSERT_EQUAL(text::TextContentAnchorType_AT_CHARACTER,
+ getProperty(getShape(2), 
"AnchorType"));
+CPPUNIT_ASSERT_EQUAL(static_cast(0xff),
+ getProperty(getShape(3), "FillColor"));
+// Without the accompanying fix in place, this test would have failed with
+// 'expected: 4, actual: 2'.
+// This means the draw page was 0/at-char/white, 1/at-char/yellow, 
2/at-page/white,
+// instead of the good 0/at-page/white, 1/at-char/yellow, 2/at-char/white.
+CPPUNIT_ASSERT_EQUAL(text::TextContentAnchorType_AT_CHARACTER,
+ getProperty(getShape(3), 
"AnchorType"));
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/rtfsdrexport.cxx 
b/sw/source/filter/ww8/rtfsdrexport.cxx
index 209e3a9d993c..c1b835194784 100644
--- a/sw/source/filter/ww8/rtfsdrexport.cxx
+++ b/sw/source/filter/ww8/rtfsdrexport.cxx
@@ -89,10 +89,11 @@ void RtfSdrExport::CloseContainer()
 sal_uInt32 RtfSdrExport::EnterGroup(const OUString& /*rShapeName*/,
 const tools::Rectangle* /*pRect*/)
 {
+m_bInGroup = true;
 return GenerateShapeId();
 }
 
-void RtfSdrExport::LeaveGroup() { /* noop */}
+void RtfSdrExport::LeaveGroup() { m_bInGroup = false; }
 
 void RtfSdrExport::AddShape(sal_uInt32 nShapeType, ShapeFlag nShapeFlags, 
sal_uInt32 /*nShapeId*/)
 {
@@ -562,8 +563,13 @@ sal_Int32 RtfSdrExport::StartShape()
 m_rAttrOutput.RunText().append(OOO_STRING_SVTOOLS_RTF_SHPBYIGNORE);
 
 // Write ZOrder.
-m_rAttrOutput.RunText().append(OOO_STRING_SVTOOLS_RTF_SHPZ);
-m_rAttrOutput.RunText().append(OString::number(m_pSdrObject->GetOrdNum()));
+if (!m_bInGroup)
+{
+// Order inside the group shape is not relevant for the flat shape list
+// we write.
+m_rAttrOutput.RunText().append(OOO_STRING_SVTOOLS_RTF_SHPZ);
+
m_rAttrOutput.RunText().append(OString::number(m_pSdrObject->GetOrdNum()));
+}
 
 for (auto it = m_aShapeProps.rbegin(); it != m_aShapeProps.rend(); ++it)
 lcl_AppendSP(m_rAttrOutput.RunText(), (*it).first.getStr(), 
(*it).second);
diff --git a/sw/source/filter/ww8/rtfsdrexport.hxx 
b/sw/source/filter/ww8/rtfsdrexport.hxx
index c2c33de4aca2..b0c9f151e790 100644
--- a/sw/source/filter/ww8/rtfsdrexport.hxx
+++ b/sw/source/filter/ww8/rtfsdrexport.hxx
@@ -56,6 +56,8 @@ class RtfSdrExport final : public EscherEx
 /// Remember which shape types we had already written.
 std::unique_ptr m_pShapeTypeWritten;
 
+bool m_bInGroup = false;
+
 public:
 explicit RtfSdrExport(RtfExport& rExport);
 ~RtfSdrExport() override;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-19 Thread Libreoffice Gerrit user
 scripting/source/pyprov/pythonscript.py |   30 --
 1 file changed, 28 insertions(+), 2 deletions(-)

New commits:
commit 87d36feab5ce4b45798b0b80abe566fc7960d194
Author: Caolán McNamara 
AuthorDate: Thu Oct 18 20:39:23 2018 +0100
Commit: Caolán McNamara 
CommitDate: Fri Oct 19 16:29:43 2018 +0200

keep pyuno script processing below base uri

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

diff --git a/scripting/source/pyprov/pythonscript.py 
b/scripting/source/pyprov/pythonscript.py
index 722dc24b9b07..f1b2bfc75ee3 100644
--- a/scripting/source/pyprov/pythonscript.py
+++ b/scripting/source/pyprov/pythonscript.py
@@ -25,6 +25,7 @@ import imp
 import time
 import ast
 import platform
+from com.sun.star.uri.RelativeUriExcessParentSegments import RETAIN
 
 try:
 unicode
@@ -212,8 +213,33 @@ class MyUriHelper:
 
 def scriptURI2StorageUri( self, scriptURI ):
 try:
-myUri = self.m_uriRefFac.parse(scriptURI)
-ret = self.m_baseUri + "/" + myUri.getName().replace( "|", "/" )
+# base path to the python script location
+sBaseUri = self.m_baseUri + "/"
+xBaseUri = self.m_uriRefFac.parse(sBaseUri)
+
+# path to the .py file + "$functionname, arguments, etc
+xStorageUri = self.m_uriRefFac.parse(scriptURI)
+sStorageUri = xStorageUri.getName().replace( "|", "/" );
+
+# path to the .py file, relative to the base
+sFileUri = sStorageUri[0:sStorageUri.find("$")]
+xFileUri = self.m_uriRefFac.parse(sFileUri)
+if not xFileUri:
+message = "pythonscript: invalid relative uri '" + sFileUri+ 
"'"
+log.debug( message )
+raise RuntimeException( message )
+
+# absolute path to the .py file
+xAbsScriptUri = self.m_uriRefFac.makeAbsolute(xBaseUri, xFileUri, 
True, RETAIN)
+sAbsScriptUri = xAbsScriptUri.getUriReference()
+
+# ensure py file is under the base path
+if not sAbsScriptUri.startswith(sBaseUri):
+message = "pythonscript: storage uri '" + sAbsScriptUri + "' 
not in base uri '" + self.m_baseUri + "'"
+log.debug( message )
+raise RuntimeException( message )
+
+ret = sBaseUri + sStorageUri
 log.debug( "converting scriptURI="+scriptURI + " to storageURI=" + 
ret )
 return ret
 except UnoException as e:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-19 Thread Libreoffice Gerrit user
 sd/source/filter/eppt/pptx-epptooxml.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 834500c958899efd2bb51f47aa17242f892c202c
Author: Caolán McNamara 
AuthorDate: Fri Oct 19 10:06:37 2018 +0100
Commit: Caolán McNamara 
CommitDate: Fri Oct 19 16:24:28 2018 +0200

index validity check looks dubious

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

diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx 
b/sd/source/filter/eppt/pptx-epptooxml.cxx
index 503489f21ce6..56f85514bcc8 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -1164,7 +1164,7 @@ void PowerPointExport::ImplWriteNotes(sal_uInt32 nPageNum)
 .makeStringAndClear());
 
 // add slide implicit relation to notes
-if (mpSlidesFSArray.size() >= nPageNum)
+if (nPageNum < mpSlidesFSArray.size())
 addRelation(mpSlidesFSArray[ nPageNum ]->getOutputStream(),
 oox::getRelationship(Relationship::NOTESSLIDE),
 OUStringBuffer()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: vcl/inc vcl/qt5

2018-10-19 Thread Libreoffice Gerrit user
 vcl/inc/qt5/Qt5Object.hxx |2 +-
 vcl/qt5/Qt5Frame.cxx  |2 +-
 vcl/qt5/Qt5Object.cxx |   10 --
 3 files changed, 10 insertions(+), 4 deletions(-)

New commits:
commit a9342497f309be256e6c7d43065c160378a48e1a
Author: Katarina Behrens 
AuthorDate: Thu Oct 18 16:48:48 2018 +0200
Commit: Katarina Behrens 
CommitDate: Fri Oct 19 16:08:49 2018 +0200

tdf#120452: Just enough of SystemEnvData in Qt5Object

the video in the presentation still doesn't play but at least the
crash is gone

Change-Id: I78ab4ff9412998f235a4b44a23b0e9d3ef4143e0
Reviewed-on: https://gerrit.libreoffice.org/61944
Tested-by: Jenkins
Reviewed-by: Katarina Behrens 

diff --git a/vcl/inc/qt5/Qt5Object.hxx b/vcl/inc/qt5/Qt5Object.hxx
index ecfdbf7d37b2..99fef78a681b 100644
--- a/vcl/inc/qt5/Qt5Object.hxx
+++ b/vcl/inc/qt5/Qt5Object.hxx
@@ -49,7 +49,7 @@ public:
 
 virtual void SetForwardKey(bool bEnable) override;
 
-virtual const SystemEnvData* GetSystemData() const override;
+virtual const SystemEnvData* GetSystemData() const override { return 
&m_aSystemData; }
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx
index 66272a9f34f6..ff77638013ca 100644
--- a/vcl/qt5/Qt5Frame.cxx
+++ b/vcl/qt5/Qt5Frame.cxx
@@ -140,7 +140,7 @@ Qt5Frame::Qt5Frame(Qt5Frame* pParent, SalFrameStyleFlags 
nStyle, bool bUseCairo)
 }
 
 m_aSystemData.nSize = sizeof(SystemEnvData);
-//m_aSystemData.aWindow = GetNativeWindowHandle(m_pWindow);
+m_aSystemData.aWindow = m_pQWidget->winId();
 m_aSystemData.aShellWindow = reinterpret_cast(this);
 //m_aSystemData.pSalFrame = this;
 //m_aSystemData.pWidget = m_pQWidget;
diff --git a/vcl/qt5/Qt5Object.cxx b/vcl/qt5/Qt5Object.cxx
index b88f3047b391..3b68c0746d30 100644
--- a/vcl/qt5/Qt5Object.cxx
+++ b/vcl/qt5/Qt5Object.cxx
@@ -31,6 +31,14 @@ Qt5Object::Qt5Object(Qt5Frame* pParent, bool bShow)
 m_pQWidget.reset(new QWidget(pParent->GetQWidget()));
 if (bShow)
 m_pQWidget->show();
+
+m_aSystemData.nSize = sizeof(SystemEnvData);
+m_aSystemData.aWindow = pParent->GetQWidget()->winId();
+m_aSystemData.aShellWindow = reinterpret_cast(this);
+//m_aSystemData.pSalFrame = this;
+//m_aSystemData.pWidget = m_pQWidget;
+//m_aSystemData.nScreen = m_nXScreen.getXScreen();
+m_aSystemData.pToolkit = "qt5";
 }
 
 void Qt5Object::ResetClipRegion()
@@ -64,6 +72,4 @@ void Qt5Object::Show(bool bVisible)
 
 void Qt5Object::SetForwardKey(bool /*bEnable*/) {}
 
-const SystemEnvData* Qt5Object::GetSystemData() const { return nullptr; }
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-19 Thread Libreoffice Gerrit user
 sw/source/core/text/pormulti.cxx |2 +-
 sw/source/core/text/txtfrm.cxx   |6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 23f3246dfa0c212ae662c14fa2d0c0ad1d222041
Author: Michael Stahl 
AuthorDate: Fri Oct 19 11:12:14 2018 +0200
Commit: Michael Stahl 
CommitDate: Fri Oct 19 16:03:37 2018 +0200

sw_redlinehide_3: fix some unnecessary loops

PVS-Studio complains about the funny code.

Change-Id: I58e2ebcca7e13baa78cfbcc4a654d5badab8d037
Reviewed-on: https://gerrit.libreoffice.org/61987
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx
index c0dfeaba837a..ef87d58f168f 100644
--- a/sw/source/core/text/pormulti.cxx
+++ b/sw/source/core/text/pormulti.cxx
@@ -883,7 +883,7 @@ namespace sw {
 SwpHints const*const pHints(m_pNode->GetpSwpHints());
 if (pHints)
 {
-while (m_CurrentHint < pHints->Count())
+if (m_CurrentHint < pHints->Count())
 {
 SwTextAttr const*const pHint(pHints->Get(m_CurrentHint));
 ++m_CurrentHint;
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index 86fa875516a4..fb3504d86da8 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -134,7 +134,7 @@ namespace sw {
 SwpHints const*const pHints(m_pNode->GetpSwpHints());
 if (pHints)
 {
-while (m_CurrentHint < pHints->Count())
+if (m_CurrentHint < pHints->Count())
 {
 SwTextAttr const*const pHint(pHints->Get(m_CurrentHint));
 ++m_CurrentHint;
@@ -191,7 +191,7 @@ namespace sw {
 SwpHints const*const pHints(m_pNode->GetpSwpHints());
 if (pHints)
 {
-while (m_CurrentHint < pHints->Count())
+if (m_CurrentHint < pHints->Count())
 {
 SwTextAttr const*const pHint(
 pHints->GetSortedByEnd(m_CurrentHint));
@@ -269,7 +269,7 @@ namespace sw {
 SwpHints const*const pHints(m_pNode->GetpSwpHints());
 if (pHints)
 {
-while (0 < m_CurrentHint)
+if (0 < m_CurrentHint)
 {
 SwTextAttr const*const pHint(pHints->Get(m_CurrentHint - 
1));
 --m_CurrentHint;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/qt5-win+mac' - 62 commits - accessibility/source android/source avmedia/source basctl/source basegfx/source basegfx/test basic/source canvas/source char

2018-10-19 Thread Libreoffice Gerrit user
Rebased ref, commits from common ancestor:
commit 8079a5e43bbb1ed54327ac48b0781d597f797be8
Author: Jan-Marek Glogowski 
AuthorDate: Mon Sep 17 11:01:59 2018 +0200
Commit: Jan-Marek Glogowski 
CommitDate: Fri Oct 19 13:20:11 2018 +

Qt5 use LO provided native file pickers

This uses the native file pickers on Windows and MacOSX.

Change-Id: Ic836d3ed8de0760c6c94c68d61f6eaa96f773000

diff --git a/vcl/Library_vclplug_qt5.mk b/vcl/Library_vclplug_qt5.mk
index 8ef4108a3558..25671ca498eb 100644
--- a/vcl/Library_vclplug_qt5.mk
+++ b/vcl/Library_vclplug_qt5.mk
@@ -91,7 +91,7 @@ $(eval $(call gb_Library_add_exception_objects,vclplug_qt5,\
 vcl/qt5/Qt5Clipboard \
 vcl/qt5/Qt5Data \
 vcl/qt5/Qt5DragAndDrop \
-vcl/qt5/Qt5FilePicker \
+$(if $(USING_X11),vcl/qt5/Qt5FilePicker) \
 vcl/qt5/Qt5Font \
 vcl/qt5/Qt5FontFace \
 vcl/qt5/Qt5Frame \
diff --git a/vcl/qt5/Qt5Instance.cxx b/vcl/qt5/Qt5Instance.cxx
index ca11acb2a788..289ba32fff19 100644
--- a/vcl/qt5/Qt5Instance.cxx
+++ b/vcl/qt5/Qt5Instance.cxx
@@ -215,17 +215,27 @@ void Qt5Instance::ProcessEvent(SalUserEvent aEvent)
 }
 
 css::uno::Reference
-Qt5Instance::createFilePicker(const 
css::uno::Reference&)
+Qt5Instance::createFilePicker(const 
css::uno::Reference& cntxt)
 {
+#if (defined _WIN32 || defined MACOSX)
+return SalInstance::createFilePicker(cntxt);
+#else
+(void)cntxt;
 return css::uno::Reference(
 new Qt5FilePicker(QFileDialog::ExistingFile));
+#endif
 }
 
 css::uno::Reference
-Qt5Instance::createFolderPicker(const 
css::uno::Reference&)
+Qt5Instance::createFolderPicker(const 
css::uno::Reference& cntxt)
 {
+#if (defined _WIN32 || defined MACOSX)
+return SalInstance::createFolderPicker(cntxt);
+#else
+(void)cntxt;
 return css::uno::Reference(
 new Qt5FilePicker(QFileDialog::Directory));
+#endif
 }
 
 css::uno::Reference
commit 9f5451279912c4f84bf02cfbafdd1e9f1f8d31c6
Author: Jan-Marek Glogowski 
AuthorDate: Thu Sep 13 11:32:12 2018 +0200
Commit: Jan-Marek Glogowski 
CommitDate: Fri Oct 19 13:19:52 2018 +

Qt5 build VCL plugin on MacOSX

Change-Id: I6ddec483703c95faf69b7b146363376765d5d6f8

diff --git a/Repository.mk b/Repository.mk
index 430e1d6bc6de..6c81261a6722 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -483,6 +483,7 @@ $(eval $(call 
gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
AppleRemote \
) \
fps_aqua \
+   $(if $(ENABLE_QT5),vclplug_qt5) \
vclplug_osx \
MacOSXSpell \
) \
diff --git a/configure.ac b/configure.ac
index 3fd916fb4f8f..e27378c3449e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -671,6 +671,7 @@ darwin*) # Mac OS X or iOS
 host=x86_64-apple-darwin
 fi
 else
+test_qt5=yes
 _os=Darwin
 INSTROOTBASESUFFIX=/$PRODUCTNAME_WITHOUT_SPACES.app
 INSTROOTCONTENTSUFFIX=/Contents
@@ -11176,13 +11177,7 @@ if test \( "$test_kde5" = "yes" -a "$ENABLE_KDE5" = 
"TRUE" \) -o \
 \( "$test_qt5" = "yes" -a "$ENABLE_QT5" = "TRUE" \) -o \
 \( "$test_gtk3_kde5" = "yes" -a "$ENABLE_GTK3_KDE5" = "TRUE" \)
 then
-qt5_incdirs="$QT5INC /usr/include/qt5 /usr/include $x_includes"
-qt5_libdirs="$QT5LIB /usr/lib/qt5 /usr/lib $x_libraries"
-
-if test -n "$supports_multilib"; then
-qt5_libdirs="$qt5_libdirs /usr/lib64/qt5 /usr/lib64/qt /usr/lib64"
-fi
-
+qt5_fwk_search="QtCore QtGui QtWidgets QtNetwork"
 qt5_test_include="QtWidgets/qapplication.h"
 if test $_os == "WINNT"; then
 qt5_test_library="Qt5Widgets.lib"
@@ -11190,12 +11185,25 @@ then
 qt5_test_library="libQt5Widgets.so"
 fi
 
+qt5_incdirs=""
+qt5_libdirs=""
+if test "$USING_X11" = TRUE; then
+qt5_incdirs="$QT5INC /usr/include/qt5 /usr/include $x_includes"
+qt5_libdirs="$QT5LIB /usr/lib/qt5 /usr/lib $x_libraries"
+if test -n "$supports_multilib"; then
+qt5_libdirs="$qt5_libdirs /usr/lib64/qt5 /usr/lib64/qt /usr/lib64"
+fi
+fi
+
 dnl Check for qmake5
 AC_PATH_PROGS( QMAKE5, [qmake-qt5 qmake], no, [$QT5DIR/bin:$PATH] )
 if test "$QMAKE5" = "no"; then
 AC_MSG_ERROR([Qmake not found.  Please specify the root of your Qt5 
installation by exporting QT5DIR before running "configure".])
 else
-qmake5_test_ver="`$QMAKE5 -v 2>&1 | $SED -n -e 's/^Using Qt version 
\(5\.[[0-9.]]\+\).*$/\1/p'`"
+case "$host_os" in
+darwin*) qmake5_test_ver="`$QMAKE5 -v 2>&1 | $SED -n -e 's/^Using Qt 
version \(5\.[[0-9.]]\{0,\}\).*$/\1/p'`" ;;
+*) qmake5_test_ver="`$QMAKE5 -v 2>&1 | $SED -n -e 's/^Using Qt version 
\(5\.[[0-9.]]\+\).*$/\1/p'`" ;;
+esac
 if test -z "$qmake5_test_ver"; then
 AC_MSG_ERROR([Wrong qmake for Qt5 found. Please specify the root 
of your Qt5 installation by exporting QT5DIR before running "configure".])
 

[Libreoffice-commits] core.git: Branch 'libreoffice-6-1-3' - vcl/win

2018-10-19 Thread Libreoffice Gerrit user
 vcl/win/gdi/salprn.cxx |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 765e019e2d4be851096e70b943f01dd021545e3c
Author: Jan-Marek Glogowski 
AuthorDate: Tue Sep 11 14:02:22 2018 +0200
Commit: Noel Grandin 
CommitDate: Fri Oct 19 14:53:12 2018 +0200

tdf#118690 don't try to process all messages

Regression from commit 221b0ab1245b ("WIN use Reschedule instead
of own dispatch loops"). This limit the maximum reschedule loops
as the original code did. There is still a busy loop when opening
the print dialog, as it was before the patch, but this at least
gets printing started.

Change-Id: If867329b82b13c898bb15b08584244084488a66c
Reviewed-on: https://gerrit.libreoffice.org/60310
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 
(cherry picked from commit 79cb9ef524c3a6b058019da5ca6acfad7a895bf2)
Reviewed-on: https://gerrit.libreoffice.org/60941
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit 376a4c754a2bf95b3033b88d68e98a562ba8632b)
Reviewed-on: https://gerrit.libreoffice.org/61655
Reviewed-by: Adolfo Jayme Barrientos 
Tested-by: Xisco Faulí 
Reviewed-by: Noel Grandin 

diff --git a/vcl/win/gdi/salprn.cxx b/vcl/win/gdi/salprn.cxx
index a682f9d33f0a..584bc83087df 100644
--- a/vcl/win/gdi/salprn.cxx
+++ b/vcl/win/gdi/salprn.cxx
@@ -1295,6 +1295,7 @@ BOOL CALLBACK SalPrintAbortProc( HDC hPrnDC, int /* 
nError */ )
 {
 SalData*pSalData = GetSalData();
 WinSalPrinter* pPrinter;
+int i = 0;
 boolbWhile = true;
 
 // Ensure we handle the mutex which will be released in 
WinSalInstance::DoYield
@@ -1303,6 +1304,10 @@ BOOL CALLBACK SalPrintAbortProc( HDC hPrnDC, int /* 
nError */ )
 {
 // process messages
 bWhile = Application::Reschedule( true );
+if (i > 15)
+bWhile = false;
+else
+++i;
 
 pPrinter = pSalData->mpFirstPrinter;
 while ( pPrinter )
@@ -1465,7 +1470,7 @@ bool WinSalPrinter::StartJob( const OUString* pFileName,
 
 // As the Telecom Balloon Fax driver tends to send messages repeatedly
 // we try to process first all, and then insert a dummy message
-while ( Application::Reschedule( true ) );
+for (int i = 0; Application::Reschedule( true ) && i <= 15; ++i);
 BOOL const ret = PostMessageW(GetSalData()->mpInstance->mhComWnd, 
SAL_MSG_DUMMY, 0, 0);
 SAL_WARN_IF(0 == ret, "vcl", "ERROR: PostMessage() failed!");
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-19 Thread Libreoffice Gerrit user
 sc/inc/stlsheet.hxx  |2 +-
 sc/source/core/data/attarray.cxx |4 ++--
 sc/source/core/data/document.cxx |6 +++---
 sc/source/core/data/stlsheet.cxx |   10 +-
 4 files changed, 11 insertions(+), 11 deletions(-)

New commits:
commit d0777b400c48867da3a26313949093efeb8787eb
Author: Stephan Bergmann 
AuthorDate: Fri Oct 19 12:03:01 2018 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Oct 19 14:52:15 2018 +0200

Turn ScStyleSheet::Usage into scoped enum

...to avoid -Werror,-Wshadow from Clang trunk with
 "Improve -Wshadow warnings with 
enumerators",
warning about shadowing of USAGE in e.g. enum ESCHER_BlibType in
include/filter/msfilter/escherex.hxx

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

diff --git a/sc/inc/stlsheet.hxx b/sc/inc/stlsheet.hxx
index b1b4ad68e7c7..bd5aa843d8b4 100644
--- a/sc/inc/stlsheet.hxx
+++ b/sc/inc/stlsheet.hxx
@@ -32,7 +32,7 @@ friend class ScStyleSheetPool;
 
 public:
 
-enumUsage
+enum class Usage
 {
 UNKNOWN,
 USED,
diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx
index 5c3d5a7153ab..e5c3f3534e55 100644
--- a/sc/source/core/data/attarray.cxx
+++ b/sc/source/core/data/attarray.cxx
@@ -1850,7 +1850,7 @@ bool ScAttrArray::IsStyleSheetUsed( const ScStyleSheet& 
rStyle ) const
 const ScStyleSheet* pStyle = 
pDocument->GetDefPattern()->GetStyleSheet();
 if ( pStyle )
 {
-pStyle->SetUsage( ScStyleSheet::USED );
+pStyle->SetUsage( ScStyleSheet::Usage::USED );
 if ( pStyle == &rStyle )
 return true;
 }
@@ -1865,7 +1865,7 @@ bool ScAttrArray::IsStyleSheetUsed( const ScStyleSheet& 
rStyle ) const
 const ScStyleSheet* pStyle = mvData[nPos].pPattern->GetStyleSheet();
 if ( pStyle )
 {
-pStyle->SetUsage( ScStyleSheet::USED );
+pStyle->SetUsage( ScStyleSheet::Usage::USED );
 if ( pStyle == &rStyle )
 {
 bIsUsed = true;
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 490cb93e59a4..4a9b7fb93c3e 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -4967,7 +4967,7 @@ void ScDocument::StyleSheetChanged( const 
SfxStyleSheetBase* pStyleSheet, bool b
 
 bool ScDocument::IsStyleSheetUsed( const ScStyleSheet& rStyle ) const
 {
-if ( bStyleSheetUsageInvalid || rStyle.GetUsage() == ScStyleSheet::UNKNOWN 
)
+if ( bStyleSheetUsageInvalid || rStyle.GetUsage() == 
ScStyleSheet::Usage::UNKNOWN )
 {
 SfxStyleSheetIterator aIter( mxPoolHelper->GetStylePool(),
 SfxStyleFamily::Para );
@@ -4977,7 +4977,7 @@ bool ScDocument::IsStyleSheetUsed( const ScStyleSheet& 
rStyle ) const
 if (pStyle->isScStyleSheet())
 {
 const ScStyleSheet* pScStyle = static_cast( pStyle  );
-pScStyle->SetUsage( ScStyleSheet::NOTUSED );
+pScStyle->SetUsage( ScStyleSheet::Usage::NOTUSED );
 }
 }
 
@@ -4999,7 +4999,7 @@ bool ScDocument::IsStyleSheetUsed( const ScStyleSheet& 
rStyle ) const
 return bIsUsed;
 }
 
-return rStyle.GetUsage() == ScStyleSheet::USED;
+return rStyle.GetUsage() == ScStyleSheet::Usage::USED;
 }
 
 bool ScDocument::ApplyFlagsTab( SCCOL nStartCol, SCROW nStartRow,
diff --git a/sc/source/core/data/stlsheet.cxx b/sc/source/core/data/stlsheet.cxx
index 21c24e4ec913..3597205aa829 100644
--- a/sc/source/core/data/stlsheet.cxx
+++ b/sc/source/core/data/stlsheet.cxx
@@ -54,13 +54,13 @@ ScStyleSheet::ScStyleSheet( const OUString& rName,
 SfxStyleSearchBits  nMaskP )
 
 : SfxStyleSheet   ( rName, rPoolP, eFamily, nMaskP )
-, eUsage( UNKNOWN )
+, eUsage( Usage::UNKNOWN )
 {
 }
 
 ScStyleSheet::ScStyleSheet( const ScStyleSheet& rStyle )
 : SfxStyleSheet ( rStyle )
-, eUsage( UNKNOWN )
+, eUsage( Usage::UNKNOWN )
 {
 }
 
@@ -261,10 +261,10 @@ bool ScStyleSheet::IsUsed() const
 // and store the state.
 ScDocument* pDoc = 
static_cast(m_pPool)->GetDocument();
 if ( pDoc && pDoc->IsStyleSheetUsed( *this ) )
-eUsage = USED;
+eUsage = Usage::USED;
 else
-eUsage = NOTUSED;
-return eUsage == USED;
+eUsage = Usage::NOTUSED;
+return eUsage == Usage::USED;
 }
 else
 return true;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sal/osl

2018-10-19 Thread Libreoffice Gerrit user
 sal/osl/unx/conditn.cxx |   37 +--
 sal/osl/unx/file.cxx|   23 +
 sal/osl/unx/file_misc.cxx   |   25 +-
 sal/osl/unx/mutex.cxx   |9 
 sal/osl/unx/pipe.cxx|   27 +-
 sal/osl/unx/process.cxx |   11 
 sal/osl/unx/profile.cxx |   15 -
 sal/osl/unx/socket.cxx  |   35 +--
 sal/osl/unx/thread.cxx  |   19 -
 sal/osl/unx/unixerrnostring.hxx |   27 ++
 sal/osl/unx/uunxapi.cxx |  464 +++-
 11 files changed, 586 insertions(+), 106 deletions(-)

New commits:
commit 22a2ed832bae50f85a254f0604d375aeca207c9e
Author: Tor Lillqvist 
AuthorDate: Thu Oct 18 14:30:42 2018 +0300
Commit: Tor Lillqvist 
CommitDate: Fri Oct 19 14:43:05 2018 +0200

Introduce UnixErrnoString() and use it in sal/osl/unx

The UnixErrnoString() function returns the symbolic name of an errno
value, like "ENOENT". For now this is local to sal/osl/unx.

If it can't figure out the symbolic name, it returns it as a number
followed by the cleartext description (as from strerror()) in
parentheses.

Rationale why to use this and not strerror(): This is intended to be
used in SAL_INFO() and SAL_WARN(). Such messages are intended to be
read by developers, not end-users. Developers are (or should be)
familiar with symbolic errno names in code anyway. The symbolic names
of errno values are (or should be) instantly recognizable as such,
they all start with E and are in UPPERCASE.

strerror() can be localised although in LibreOffice it apparently
isn't as there allegedly aren't setlocale() calls. But, anyway, the
error strings might be less familiar to a developer than the symbolc
errno names that one uses when coding.

When encountering an unfamiliar error string the developer might want
to add special handling for that error case in the code. They would
need a reverse mapping from error string to errno value, by manually
searching , looking at the comments there, hoping the match
what strerror() produces, to find the corresponding symbolic errno
value.

Change-Id: Idc11595d528e8432a32bf474e6791f4ea7262a1e
Reviewed-on: https://gerrit.libreoffice.org/61931
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist 

diff --git a/sal/osl/unx/conditn.cxx b/sal/osl/unx/conditn.cxx
index 45f1c0e600a2..cede35a86d04 100644
--- a/sal/osl/unx/conditn.cxx
+++ b/sal/osl/unx/conditn.cxx
@@ -22,6 +22,7 @@
 #include 
 
 #include "system.hxx"
+#include "unixerrnostring.hxx"
 #include 
 #include 
 
@@ -53,7 +54,7 @@ oslCondition SAL_CALL osl_createCondition()
 nRet =  pthread_cond_init(&pCond->m_Condition, PTHREAD_CONDATTR_DEFAULT);
 if ( nRet != 0 )
 {
-SAL_WARN( "sal.osl.condition", "pthread_cond_init failed: " << 
strerror(nRet) );
+SAL_WARN( "sal.osl.condition", "pthread_cond_init failed: " << 
UnixErrnoString(nRet) );
 
 free(pCond);
 return nullptr;
@@ -62,10 +63,10 @@ oslCondition SAL_CALL osl_createCondition()
 nRet = pthread_mutex_init(&pCond->m_Lock, PTHREAD_MUTEXATTR_DEFAULT);
 if ( nRet != 0 )
 {
-SAL_WARN( "sal.osl.condition", "pthread_mutex_init failed: " << 
strerror(nRet) );
+SAL_WARN( "sal.osl.condition", "pthread_mutex_init failed: " << 
UnixErrnoString(nRet) );
 
 nRet = pthread_cond_destroy(&pCond->m_Condition);
-SAL_WARN_IF( nRet != 0, "sal.osl.condition", "pthread_cond_destroy 
failed: " << strerror(nRet) );
+SAL_WARN_IF( nRet != 0, "sal.osl.condition", "pthread_cond_destroy 
failed: " << UnixErrnoString(nRet) );
 
 free(pCond);
 pCond = nullptr;
@@ -87,9 +88,9 @@ void SAL_CALL osl_destroyCondition(oslCondition Condition)
 if ( pCond )
 {
 int nRet = pthread_cond_destroy(&pCond->m_Condition);
-SAL_WARN_IF( nRet != 0, "sal.osl.condition", "pthread_cond_destroy 
failed: " << strerror(nRet) );
+SAL_WARN_IF( nRet != 0, "sal.osl.condition", "pthread_cond_destroy 
failed: " << UnixErrnoString(nRet) );
 nRet = pthread_mutex_destroy(&pCond->m_Lock);
-SAL_WARN_IF( nRet != 0, "sal.osl.condition", "pthread_mutex_destroy 
failed: " << strerror(nRet) );
+SAL_WARN_IF( nRet != 0, "sal.osl.condition", "pthread_mutex_destroy 
failed: " << UnixErrnoString(nRet) );
 
 free(Condition);
 }
@@ -106,7 +107,7 @@ sal_Bool SAL_CALL osl_setCondition(oslCondition Condition)
nRet = pthread_mutex_lock(&pCond->m_Lock);
if ( nRet != 0 )
{
-   SAL_WARN( "sal.osl.condition", "osl_setCondition(" << pCond << "): 
pthread_mutex_lock failed: " << strerror(nRet) );
+   SAL_WARN( "sal.osl.condition", "osl_setCondition(" << pCond << "): 
pthread_mutex_lock failed: " << UnixErrnoString(nRet) );
return false;
}
 
@@ -114,7 +115,7 @@ sal_Bool SAL_CALL osl_setCondition(oslCondition Condition)
nRet = pthread_cond_broadcast(&pCond->m_Condition);

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

2018-10-19 Thread Libreoffice Gerrit user
 ios/LibreOfficeLight/LibreOfficeLight/LOKit/Document.swift |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 9a373521d7a328197a4bf9abeb0a981b7acba896
Author: Tor Lillqvist 
AuthorDate: Fri Oct 19 15:13:19 2018 +0300
Commit: Tor Lillqvist 
CommitDate: Fri Oct 19 15:36:49 2018 +0300

It seems to work even without calling 
temporaryHackToInvokeCallbackHandlers()?

But I tested just a few times. If somebody re-starts work on
LibreOfficeLight, and encounter hangs, hopefully they notice this
commit and try to un-comment-out the line in question.

I hadn't noticed that temporaryHackToInvokeCallbackHandlers() thing
before, maybe calling it in the iOS app being developed (in the
"online" repo) is necessary, and would help avoiding the hangs I
occasionally see in it?

Change-Id: I0f4d8c800024c43acb512d40efdfad71c229bec2

diff --git a/ios/LibreOfficeLight/LibreOfficeLight/LOKit/Document.swift 
b/ios/LibreOfficeLight/LibreOfficeLight/LOKit/Document.swift
index 218d203f61be..2a1ad97b3005 100644
--- a/ios/LibreOfficeLight/LibreOfficeLight/LOKit/Document.swift
+++ b/ios/LibreOfficeLight/LibreOfficeLight/LOKit/Document.swift
@@ -539,7 +539,9 @@ open class Document
 
 public func invokeHandlers()
 {
-temporaryHackToInvokeCallbackHandlers(pDoc)
+// The app seems to work even without this? Or maybe I
+// just didn't test hard enough?
+// temporaryHackToInvokeCallbackHandlers(pDoc)
 
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: extras/Module_extras.mk extras/Persona_dark.mk extras/Persona_gray.mk extras/Persona_green.mk extras/Persona_pink.mk extras/Persona_sand.mk extras/Personas.mk extras/Pe

2018-10-19 Thread Libreoffice Gerrit user
 Repository.mk|7 
 extras/Module_extras.mk  |   10 
 extras/Persona_dark.mk   |   18 +
 extras/Persona_gray.mk   |   18 +
 extras/Persona_green.mk  |   18 +
 extras/Persona_pink.mk   |   18 +
 extras/Persona_sand.mk   |   18 +
 extras/Persona_white.mk  |   18 +
 extras/Personas.mk   |   16 +
 extras/source/gallery/personas/dark/dark.svg |  254 +++
 extras/source/gallery/personas/dark/footer.png   |binary
 extras/source/gallery/personas/dark/header.png   |binary
 extras/source/gallery/personas/dark/preview.png  |binary
 extras/source/gallery/personas/gray/footer.png   |binary
 extras/source/gallery/personas/gray/gray.svg |  106 +
 extras/source/gallery/personas/gray/header.png   |binary
 extras/source/gallery/personas/gray/preview.png  |binary
 extras/source/gallery/personas/green/footer.png  |binary
 extras/source/gallery/personas/green/green.svg   |  112 ++
 extras/source/gallery/personas/green/header.png  |binary
 extras/source/gallery/personas/green/preview.png |binary
 extras/source/gallery/personas/personas_list.txt |6 
 extras/source/gallery/personas/pink/footer.png   |binary
 extras/source/gallery/personas/pink/header.png   |binary
 extras/source/gallery/personas/pink/pink.svg |  202 ++
 extras/source/gallery/personas/pink/preview.png  |binary
 extras/source/gallery/personas/sand/footer.png   |binary
 extras/source/gallery/personas/sand/header.png   |binary
 extras/source/gallery/personas/sand/preview.png  |binary
 extras/source/gallery/personas/white/footer.png  |binary
 extras/source/gallery/personas/white/header.png  |binary
 extras/source/gallery/personas/white/preview.png |binary
 extras/source/gallery/personas/white/white.svg   |  103 +
 33 files changed, 924 insertions(+)

New commits:
commit 98f292390239b530ffad3b6c9340d182a8aa834f
Author: andreas kainz 
AuthorDate: Mon Oct 8 07:42:36 2018 +0200
Commit: andreas_kainz 
CommitDate: Fri Oct 19 14:34:17 2018 +0200

Personas: add 6 new default themes

design part of the personas patch

Change-Id: I53c3b4d7dd6a4b47ac2d27b361978faa597386e6
Reviewed-on: https://gerrit.libreoffice.org/61507
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 
Reviewed-by: Michael Stahl 
Reviewed-by: andreas_kainz 

diff --git a/Repository.mk b/Repository.mk
index f7162e48e080..224902491c13 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -887,6 +887,13 @@ $(eval $(call gb_Helper_register_packages_for_install,ooo,\
extras_labels \
$(if $(filter WNT,$(OS)),extras_newfiles) \
extras_palettes \
+   extras_personas \
+   extras_persona_dark \
+   extras_persona_gray \
+   extras_persona_green \
+   extras_persona_pink \
+   extras_persona_sand \
+   extras_persona_white \
extras_tplofficorr \
extras_tploffimisc \
extras_tplpresnt \
diff --git a/extras/Module_extras.mk b/extras/Module_extras.mk
index c7101000b79c..9404299c8dbc 100644
--- a/extras/Module_extras.mk
+++ b/extras/Module_extras.mk
@@ -73,6 +73,16 @@ $(eval $(call gb_Module_add_targets,extras,\
 endif
 
 $(eval $(call gb_Module_add_targets,extras,\
+   Personas \
+   Persona_dark \
+   Persona_gray \
+   Persona_green \
+   Persona_pink \
+   Persona_sand \
+   Persona_white \
+))
+
+$(eval $(call gb_Module_add_targets,extras,\
CustomTarget_opensymbol \
 ))
 
diff --git a/extras/Persona_dark.mk b/extras/Persona_dark.mk
new file mode 100644
index ..9c27dd05c049
--- /dev/null
+++ b/extras/Persona_dark.mk
@@ -0,0 +1,18 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# 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/.
+#
+
+$(eval $(call 
gb_Package_Package,extras_persona_dark,$(SRCDIR)/extras/source/gallery/personas/dark))
+
+$(eval $(call 
gb_Package_add_files,extras_persona_dark,$(LIBO_SHARE_FOLDER)/gallery/personas/dark,\
+   footer.png \
+   header.png \
+   preview.png \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/extras/Persona_gray.mk b/extras/Persona_gray.mk
new file mode 100644
index ..4c2ae61f248d
--- /dev/null
+++ b/extras/Persona_gray.mk
@@ -0,0 +1,18 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# 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/.
+#
+
+$(eval

[Libreoffice-commits] core.git: vcl/inc vcl/qt5

2018-10-19 Thread Libreoffice Gerrit user
 vcl/inc/qt5/Qt5DragAndDrop.hxx |2 ++
 vcl/qt5/Qt5DragAndDrop.cxx |   26 ++
 vcl/qt5/Qt5Frame.cxx   |8 
 3 files changed, 36 insertions(+)

New commits:
commit a261016b9817443878396c745a72e8d2eb644ded
Author: Katarina Behrens 
AuthorDate: Thu Oct 18 13:13:29 2018 +0200
Commit: Katarina Behrens 
CommitDate: Fri Oct 19 14:03:56 2018 +0200

Make repeated drag'n'drop possible

Change-Id: If87ceeb8ddc4b2aada8ea0c963385a291622fef6
Reviewed-on: https://gerrit.libreoffice.org/61932
Reviewed-by: Katarina Behrens 
Tested-by: Katarina Behrens 

diff --git a/vcl/inc/qt5/Qt5DragAndDrop.hxx b/vcl/inc/qt5/Qt5DragAndDrop.hxx
index d1116ddfee96..568b64236868 100644
--- a/vcl/inc/qt5/Qt5DragAndDrop.hxx
+++ b/vcl/inc/qt5/Qt5DragAndDrop.hxx
@@ -57,6 +57,7 @@ public:
 css::uno::Sequence SAL_CALL getSupportedServiceNames() override;
 
 void dragFailed();
+void fire_dragEnd();
 css::uno::Reference const& 
GetTransferable() const
 {
 return m_xTrans;
@@ -108,6 +109,7 @@ public:
 css::uno::Sequence SAL_CALL getSupportedServiceNames() override;
 
 void fire_dragEnter(const 
css::datatransfer::dnd::DropTargetDragEnterEvent& dtde);
+void fire_dragOver(const css::datatransfer::dnd::DropTargetDragEnterEvent& 
dtde);
 void fire_drop(const css::datatransfer::dnd::DropTargetDropEvent& dtde);
 };
 
diff --git a/vcl/qt5/Qt5DragAndDrop.cxx b/vcl/qt5/Qt5DragAndDrop.cxx
index 569c24f2bdac..6a68273e23be 100644
--- a/vcl/qt5/Qt5DragAndDrop.cxx
+++ b/vcl/qt5/Qt5DragAndDrop.cxx
@@ -86,6 +86,19 @@ void Qt5DragSource::dragFailed()
 }
 }
 
+void Qt5DragSource::fire_dragEnd()
+{
+if (m_xListener.is())
+{
+datatransfer::dnd::DragSourceDropEvent aEv;
+aEv.DropAction = datatransfer::dnd::DNDConstants::ACTION_MOVE;
+aEv.DropSuccess = true; // FIXME: what if drop didn't work out?
+auto xListener = m_xListener;
+m_xListener.clear();
+xListener->dragDropEnd(aEv);
+}
+}
+
 OUString SAL_CALL Qt5DragSource::getImplementationName()
 {
 return OUString("com.sun.star.datatransfer.dnd.VclQt5DragSource");
@@ -201,6 +214,19 @@ void Qt5DropTarget::fire_dragEnter(const 
css::datatransfer::dnd::DropTargetDragE
 }
 }
 
+void Qt5DropTarget::fire_dragOver(const 
css::datatransfer::dnd::DropTargetDragEnterEvent& dtde)
+{
+osl::ClearableGuard<::osl::Mutex> aGuard(m_aMutex);
+
std::vector> 
aListeners(
+m_aListeners);
+aGuard.clear();
+
+for (auto const& listener : aListeners)
+{
+listener->dragOver(dtde);
+}
+}
+
 void Qt5DropTarget::fire_drop(const 
css::datatransfer::dnd::DropTargetDropEvent& dtde)
 {
 osl::ClearableGuard aGuard(m_aMutex);
diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx
index a58e7b18d4b4..66272a9f34f6 100644
--- a/vcl/qt5/Qt5Frame.cxx
+++ b/vcl/qt5/Qt5Frame.cxx
@@ -899,6 +899,8 @@ void Qt5Frame::draggingStarted(const int x, const int y)
 m_pDropTarget->fire_dragEnter(aEvent);
 m_bInDrag = true;
 }
+else
+m_pDropTarget->fire_dragOver(aEvent);
 }
 
 void Qt5Frame::dropping(const int x, const int y)
@@ -918,6 +920,12 @@ void Qt5Frame::dropping(const int x, const int y)
 aEvent.Transferable = xTransferable;
 
 m_pDropTarget->fire_drop(aEvent);
+m_bInDrag = false;
+
+if (m_pDragSource)
+{
+m_pDragSource->fire_dragEnd();
+}
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-19 Thread Libreoffice Gerrit user
 sc/source/ui/cctrl/checklistmenu.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c324644aa098939d651fb0cf7e8e1a0975350ad0
Author: Caolán McNamara 
AuthorDate: Fri Oct 19 10:08:56 2018 +0100
Commit: Caolán McNamara 
CommitDate: Fri Oct 19 13:52:45 2018 +0200

index validity check looks dubious

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

diff --git a/sc/source/ui/cctrl/checklistmenu.cxx 
b/sc/source/ui/cctrl/checklistmenu.cxx
index bcccb1af82bb..0b84b18679ef 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -822,7 +822,7 @@ void 
ScMenuFloatingWindow::ensureSubMenuVisible(ScMenuFloatingWindow* pSubMenu)
 
 void ScMenuFloatingWindow::ensureSubMenuNotVisible()
 {
-if (mnSelectedMenu <= maMenuItems.size() &&
+if (mnSelectedMenu < maMenuItems.size() &&
 maMenuItems[mnSelectedMenu].mpSubMenuWin &&
 maMenuItems[mnSelectedMenu].mpSubMenuWin->IsVisible())
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: net/Socket.hpp

2018-10-19 Thread Libreoffice Gerrit user
 net/Socket.hpp |   13 +++--
 1 file changed, 3 insertions(+), 10 deletions(-)

New commits:
commit d6d0c3e8a32671f57bbff852ac45796cd4613d35
Author: Tor Lillqvist 
AuthorDate: Fri Oct 19 12:40:09 2018 +0300
Commit: Tor Lillqvist 
CommitDate: Fri Oct 19 13:41:18 2018 +0200

As far as I see, no getPollEvents() implementation will ever return negative

In 1c7f94045a433625f9ec55b137bbd0322f27d532 that introduced
DelaySocket, its getPollEvents() could indeed return -1, but that was
removed later.

Change-Id: Ie3a7e01b7b9a7517d97f6ed3cc6d96bdb3313969
Reviewed-on: https://gerrit.libreoffice.org/61990
Reviewed-by: Tor Lillqvist 
Tested-by: Tor Lillqvist 

diff --git a/net/Socket.hpp b/net/Socket.hpp
index 734d3696a..2d8a2f26a 100644
--- a/net/Socket.hpp
+++ b/net/Socket.hpp
@@ -713,16 +713,9 @@ private:
 for (size_t i = 0; i < size; ++i)
 {
 int events = _pollSockets[i]->getPollEvents(now, timeoutMaxMs);
-if (events < 0) // timeout on dead socket
-{
-_pollFds[i].fd = _wakeup[0];
-_pollFds[i].events = 0;
-}
-else
-{
-_pollFds[i].fd = _pollSockets[i]->getFD();
-_pollFds[i].events = events;
-}
+assert(events >= 0); // Or > 0 even?
+_pollFds[i].fd = _pollSockets[i]->getFD();
+_pollFds[i].events = events;
 _pollFds[i].revents = 0;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-19 Thread Libreoffice Gerrit user
 sc/source/ui/view/gridwin.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5883da7c35805b5bdbe35a379cdab5118bae6edd
Author: Caolán McNamara 
AuthorDate: Fri Oct 19 09:56:30 2018 +0100
Commit: Caolán McNamara 
CommitDate: Fri Oct 19 13:33:36 2018 +0200

copy and paste error

Change-Id: If352e7a0f6e8dab2a9acc9aa2cde56b40cedb50c
Reviewed-on: https://gerrit.libreoffice.org/61974
Reviewed-by: Julien Nabet 
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 4ac3bc07b241..efabe0d9a64a 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -5671,7 +5671,7 @@ OString ScGridWindow::getCellCursor(const Fraction& 
rZoomX, const Fraction& rZoo
 SCROW nY = pViewData->GetCurY();
 
 Fraction defaultZoomX = pViewData->GetZoomX();
-Fraction defaultZoomY = pViewData->GetZoomX();
+Fraction defaultZoomY = pViewData->GetZoomY();
 
 pViewData->SetZoom(rZoomX, rZoomY, true);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-19 Thread Libreoffice Gerrit user
 sc/source/filter/excel/xestyle.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit a7f9d632bb283955fb79e1e557665759a1b196a7
Author: Caolán McNamara 
AuthorDate: Fri Oct 19 10:10:27 2018 +0100
Commit: Caolán McNamara 
CommitDate: Fri Oct 19 13:32:24 2018 +0200

index validity check looks dubious

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

diff --git a/sc/source/filter/excel/xestyle.cxx 
b/sc/source/filter/excel/xestyle.cxx
index ddb2d9f8c0ea..d7a621c30150 100644
--- a/sc/source/filter/excel/xestyle.cxx
+++ b/sc/source/filter/excel/xestyle.cxx
@@ -2609,7 +2609,7 @@ sal_uInt16 XclExpXFBuffer::GetXFIndex( sal_uInt32 nXFId ) 
const
 sal_Int32 XclExpXFBuffer::GetXmlStyleIndex( sal_uInt32 nXFIndex ) const
 {
 OSL_ENSURE( nXFIndex < maStyleIndexes.size(), 
"XclExpXFBuffer::GetXmlStyleIndex - invalid index!" );
-if( nXFIndex > maStyleIndexes.size() )
+if( nXFIndex >= maStyleIndexes.size() )
 return 0;   // should be caught/debugged via above assert; return 
"valid" index.
 return maStyleIndexes[ nXFIndex ];
 }
@@ -2617,7 +2617,7 @@ sal_Int32 XclExpXFBuffer::GetXmlStyleIndex( sal_uInt32 
nXFIndex ) const
 sal_Int32 XclExpXFBuffer::GetXmlCellIndex( sal_uInt32 nXFIndex ) const
 {
 OSL_ENSURE( nXFIndex < maCellIndexes.size(), 
"XclExpXFBuffer::GetXmlStyleIndex - invalid index!" );
-if( nXFIndex > maCellIndexes.size() )
+if( nXFIndex >= maCellIndexes.size() )
 return 0;   // should be caught/debugged via above assert; return 
"valid" index.
 return maCellIndexes[ nXFIndex ];
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: winaccessibility/README

2018-10-19 Thread Libreoffice Gerrit user
 winaccessibility/README |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit fe930b18bc6ae2431860887fbc980b8550a95ed3
Author: Michael Stahl 
AuthorDate: Mon Oct 15 12:13:42 2018 +0200
Commit: Michael Stahl 
CommitDate: Fri Oct 19 13:03:16 2018 +0200

winaccessibility: IA2 is no longer experimental

Change-Id: I1ccaa95678b5ac6e3a25eb7577cb790ab388b73a
Reviewed-on: https://gerrit.libreoffice.org/61986
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/winaccessibility/README b/winaccessibility/README
index dd77437b10b6..a7a8e7a9a8a6 100644
--- a/winaccessibility/README
+++ b/winaccessibility/README
@@ -45,8 +45,8 @@ not by actual end users.
 
 Debugging / playing with winaccessibility
 
-You need to enable 'experimental mode' in Tools->Options. After
-that NVDA should work as expected. In order to use 'accprobe' to debug
+If NVDA is running when soffice starts, IA2 should be automatically enabled
+and work as expected. In order to use 'accprobe' to debug
 it is necessary to override the check for whether an AT (like NVDA) is
 running; to do that use:
 
@@ -56,3 +56,6 @@ Then you can use accprobe to introspect the accessibility 
hierarchy
 remotely, checkout:
 
 http://accessibility.linuxfoundation.org/a11yweb/util/accprobe/
+
+But often it's more useful to look at NVDA's text output window...
+
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-19 Thread Libreoffice Gerrit user
 sot/source/sdstor/stgio.cxx |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit b739827f996262fb3719c25a622a0482cdb4c626
Author: Caolán McNamara 
AuthorDate: Fri Oct 19 10:02:37 2018 +0100
Commit: Caolán McNamara 
CommitDate: Fri Oct 19 12:56:43 2018 +0200

simplify expression

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

diff --git a/sot/source/sdstor/stgio.cxx b/sot/source/sdstor/stgio.cxx
index bcfff0d51118..803ab3761b68 100644
--- a/sot/source/sdstor/stgio.cxx
+++ b/sot/source/sdstor/stgio.cxx
@@ -211,8 +211,9 @@ FatError EasyFat::Mark( sal_Int32 nPage, sal_Int32 nCount, 
sal_Int32 nExpect )
 {
 if( nCount > 0 )
 {
---nCount /= GetPageSize();
-nCount++;
+--nCount;
+nCount /= GetPageSize();
+++nCount;
 }
 
 sal_Int32 nCurPage = nPage;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'private/mst/sw_redlinehide_3' - sw/source

2018-10-19 Thread Libreoffice Gerrit user
 sw/source/core/text/pormulti.cxx |2 +-
 sw/source/core/text/txtfrm.cxx   |6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 0f66e1d9a89cce85a5e23dc7bf99dfe30ac77cb3
Author: Michael Stahl 
AuthorDate: Fri Oct 19 11:12:14 2018 +0200
Commit: Michael Stahl 
CommitDate: Fri Oct 19 11:37:00 2018 +0200

sw_redlinehide_3: fix some unnecessary loops

PVS-Studio complains about the funny code.

Change-Id: I58e2ebcca7e13baa78cfbcc4a654d5badab8d037

diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx
index 3e659366264d..cfc9f858c0d0 100644
--- a/sw/source/core/text/pormulti.cxx
+++ b/sw/source/core/text/pormulti.cxx
@@ -883,7 +883,7 @@ namespace sw {
 SwpHints const*const pHints(m_pNode->GetpSwpHints());
 if (pHints)
 {
-while (m_CurrentHint < pHints->Count())
+if (m_CurrentHint < pHints->Count())
 {
 SwTextAttr const*const pHint(pHints->Get(m_CurrentHint));
 ++m_CurrentHint;
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index a07d712cd4c7..74d6253381d4 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -138,7 +138,7 @@ namespace sw {
 SwpHints const*const pHints(m_pNode->GetpSwpHints());
 if (pHints)
 {
-while (m_CurrentHint < pHints->Count())
+if (m_CurrentHint < pHints->Count())
 {
 SwTextAttr const*const pHint(pHints->Get(m_CurrentHint));
 ++m_CurrentHint;
@@ -175,7 +175,7 @@ namespace sw {
 SwpHints const*const pHints(m_pNode->GetpSwpHints());
 if (pHints)
 {
-while (m_CurrentHint < pHints->Count())
+if (m_CurrentHint < pHints->Count())
 {
 SwTextAttr const*const pHint(
 pHints->GetSortedByEnd(m_CurrentHint));
@@ -273,7 +273,7 @@ namespace sw {
 SwpHints const*const pHints(m_pNode->GetpSwpHints());
 if (pHints)
 {
-while (0 < m_CurrentHint)
+if (0 < m_CurrentHint)
 {
 SwTextAttr const*const 
pHint(pHints->GetSortedByEnd(m_CurrentHint - 1));
 --m_CurrentHint;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: vcl/inc vcl/qt5

2018-10-19 Thread Libreoffice Gerrit user
 vcl/inc/qt5/Qt5DragAndDrop.hxx |1 +
 vcl/inc/qt5/Qt5Frame.hxx   |1 +
 vcl/qt5/Qt5DragAndDrop.cxx |   13 +
 vcl/qt5/Qt5Frame.cxx   |   19 +++
 vcl/qt5/Qt5Widget.cxx  |3 +++
 5 files changed, 37 insertions(+)

New commits:
commit 0fa25c261ad1bac1303f8a35d89261365bb5d849
Author: Katarina Behrens 
AuthorDate: Thu Oct 18 01:01:14 2018 +0200
Commit: Katarina Behrens 
CommitDate: Fri Oct 19 11:34:02 2018 +0200

Now that initiating drag works, let's also accept drops

Change-Id: Iab328edd799dd4ce04312db4e640f86a8f7fda77
Reviewed-on: https://gerrit.libreoffice.org/61897
Reviewed-by: Katarina Behrens 
Tested-by: Katarina Behrens 

diff --git a/vcl/inc/qt5/Qt5DragAndDrop.hxx b/vcl/inc/qt5/Qt5DragAndDrop.hxx
index 424a1ba638e4..d1116ddfee96 100644
--- a/vcl/inc/qt5/Qt5DragAndDrop.hxx
+++ b/vcl/inc/qt5/Qt5DragAndDrop.hxx
@@ -108,6 +108,7 @@ public:
 css::uno::Sequence SAL_CALL getSupportedServiceNames() override;
 
 void fire_dragEnter(const 
css::datatransfer::dnd::DropTargetDragEnterEvent& dtde);
+void fire_drop(const css::datatransfer::dnd::DropTargetDropEvent& dtde);
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/qt5/Qt5Frame.hxx b/vcl/inc/qt5/Qt5Frame.hxx
index 9ee9f50666e9..110fa9b279cf 100644
--- a/vcl/inc/qt5/Qt5Frame.hxx
+++ b/vcl/inc/qt5/Qt5Frame.hxx
@@ -135,6 +135,7 @@ public:
 virtual void registerDropTarget(Qt5DropTarget* pDropTarget);
 virtual void deregisterDropTarget(Qt5DropTarget const* pDropTarget);
 void draggingStarted(const int x, const int y);
+void dropping(const int x, const int y);
 
 virtual void SetExtendedFrameStyle(SalExtStyle nExtStyle) override;
 virtual void Show(bool bVisible, bool bNoActivate = false) override;
diff --git a/vcl/qt5/Qt5DragAndDrop.cxx b/vcl/qt5/Qt5DragAndDrop.cxx
index ac9a0fdb6339..569c24f2bdac 100644
--- a/vcl/qt5/Qt5DragAndDrop.cxx
+++ b/vcl/qt5/Qt5DragAndDrop.cxx
@@ -201,6 +201,19 @@ void Qt5DropTarget::fire_dragEnter(const 
css::datatransfer::dnd::DropTargetDragE
 }
 }
 
+void Qt5DropTarget::fire_drop(const 
css::datatransfer::dnd::DropTargetDropEvent& dtde)
+{
+osl::ClearableGuard aGuard(m_aMutex);
+
std::vector> 
aListeners(
+m_aListeners);
+aGuard.clear();
+
+for (auto const& listener : aListeners)
+{
+listener->drop(dtde);
+}
+}
+
 void Qt5DropTarget::acceptDrag(sal_Int8 /*dragOperation*/) { return; }
 void Qt5DropTarget::rejectDrag() { return; }
 
diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx
index bbf541dea312..a58e7b18d4b4 100644
--- a/vcl/qt5/Qt5Frame.cxx
+++ b/vcl/qt5/Qt5Frame.cxx
@@ -901,4 +901,23 @@ void Qt5Frame::draggingStarted(const int x, const int y)
 }
 }
 
+void Qt5Frame::dropping(const int x, const int y)
+{
+assert(m_pDropTarget);
+
+css::datatransfer::dnd::DropTargetDropEvent aEvent;
+aEvent.Source = 
static_cast(m_pDropTarget);
+aEvent.Context = 
static_cast(m_pDropTarget);
+aEvent.LocationX = x;
+aEvent.LocationY = y;
+aEvent.DropAction = css::datatransfer::dnd::DNDConstants::ACTION_MOVE; 
//FIXME
+aEvent.SourceActions = css::datatransfer::dnd::DNDConstants::ACTION_MOVE;
+
+css::uno::Reference xTransferable;
+xTransferable = m_pDragSource->GetTransferable();
+aEvent.Transferable = xTransferable;
+
+m_pDropTarget->fire_drop(aEvent);
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/qt5/Qt5Widget.cxx b/vcl/qt5/Qt5Widget.cxx
index 33b5faf8a9a2..a47aaca8b853 100644
--- a/vcl/qt5/Qt5Widget.cxx
+++ b/vcl/qt5/Qt5Widget.cxx
@@ -193,7 +193,10 @@ void Qt5Widget::dragMoveEvent(QDragMoveEvent* event)
 
 void Qt5Widget::dropEvent(QDropEvent* event)
 {
+QPoint point = event->pos();
 SAL_WARN("vcl.qt5", "dropevent");
+
+m_pFrame->dropping(point.x(), point.y());
 QWidget::dropEvent(event);
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-19 Thread Libreoffice Gerrit user
 sc/uiconfig/scalc/ui/notebookbar.ui|  214 ++---
 sd/uiconfig/sdraw/ui/notebookbar.ui|  103 +--
 sd/uiconfig/simpress/ui/notebookbar.ui |  116 +++--
 sw/uiconfig/swriter/ui/notebookbar.ui  |  168 -
 4 files changed, 238 insertions(+), 363 deletions(-)

New commits:
commit c8d158c05c2d5be5d387b93d03526bf13a1c767d
Author: andreas kainz 
AuthorDate: Fri Oct 19 01:40:52 2018 +0200
Commit: andreas_kainz 
CommitDate: Fri Oct 19 11:10:56 2018 +0200

NB tabbed: update draw tab drop down menu entries

Change-Id: Id12b92eaa472e59681cf684e6f007476c884cc5a
Reviewed-on: https://gerrit.libreoffice.org/61964
Tested-by: Jenkins
Reviewed-by: andreas_kainz 

diff --git a/sc/uiconfig/scalc/ui/notebookbar.ui 
b/sc/uiconfig/scalc/ui/notebookbar.ui
index 7f0b9d144572..0a2863fb8611 100644
--- a/sc/uiconfig/scalc/ui/notebookbar.ui
+++ b/sc/uiconfig/scalc/ui/notebookbar.ui
@@ -249,188 +249,57 @@
 True
 False
 
-  
+  
 True
 False
-.uno:Line
-  
-
-
-  
-True
-False
-.uno:Freeline_Unfilled
-  
-
-
-  
-True
-False
-.uno:Freeline
-  
-
-
-  
-True
-False
-.uno:Bezier_Unfilled
-  
-
-
-  
-True
-False
-.uno:BezierFill
-  
-
-
-  
-True
-False
-.uno:Polygon_Unfilled
-  
-
-
-  
-True
-False
-.uno:Polygon_Diagonal_Unfilled
-  
-
-
-  
-True
-False
-.uno:Polygon_Diagonal
-  
-
-
-  
-True
-False
-  
-
-
-  
-True
-False
-.uno:BasicShapes
-  
-
-
-  
-True
-False
-.uno:SymbolShapes
-  
-
-
-  
-True
-False
-.uno:ArrowShapes
-  
-
-
-  
-True
-False
-.uno:StarShapes
-  
-
-
-  
-True
-False
-.uno:CalloutShapes
-  
-
-
-  
-True
-False
-.uno:FlowChartShapes
-  
-
-
-  
-True
-False
-  
-
-
-  
-True
-False
-.uno:DrawCaption
-  
-
-
-  
-True
-False
-.uno:VerticalCaption
-  
-
-
-  
-True
-False
-  
-
-
-  
-True
-False
-.uno:DrawText
+.uno:ToggleObjectBezierMode
   
 
 
-  
+  
 True
 False
-.uno:VerticalText
   
 
 
-  
+  
 True
 False
-.uno:InsertGraphic
+.uno:ToggleObjectRotateMode
   
 
 
-  
+  
 True
 False
-.uno:FontworkGalleryFloater
+.uno:FlipVertical
   
 
 
-  
+  
 True
 False
-.uno:Text_Marquee
+.uno:FlipHorizontal
   
 
 
-  
+  
 True
 False
   
 
 
-  
+  
 True
 False
-.uno:ToggleObjectBezierMode
+.uno:RenameObject
   
 
 
-  
+  
 True
 False
-.uno:ExtrusionToggle
+.uno:ObjectTitleDescription
   
 
   
@@ -1057,6 +926,27 @@
   
 
 
+  
+True
+False
+.uno:EditShapeHyperlink
+  
+
+
+  
+True
+False
+.uno:DeleteShapeHyperlink
+  
+
+
+  
+True
+False
+.uno:OpenHyperlinkOnCursor
+  
+
+
   
 True
 False
@@ -1247,6 +1137,40 @@
 .uno:ObjectTitleDescription
   
 
+
+  
+True
+False
+  
+
+
+  
+True
+False
+.uno:EditShapeHyperlink
+  
+
+
+  
+True
+False
+.uno:DeleteShapeHyperlink
+  
+
+
+  
+True
+False
+.uno:OpenHyperlinkOnCursor
+  
+
+
+  
+True
+False
+.uno:AssignMacro
+  
+
   
   
 True
diff --git a/sd/uiconfig/sdraw/ui/notebookbar.ui 
b/sd/uiconfig/sdraw/ui/notebookbar.ui
index 0bbb2c88cf85..814c56c0fe26 100644
--- a/sd/uiconfig/sdraw/ui/notebookbar.ui
+++ b/sd/uiconfig/sdraw/ui/notebookbar.ui
@@ -61,107 +61,107 @@
 True
 False
 
-  
+  
 True
 False
-.uno:Line
+.uno:ToggleObjectBezierMode
   
 
 
-  
+  
 True
 False
-.uno:Freeline_Unfilled
+.uno:ToggleObjectRotateMode
   
 
 
-  
+  
 True
 False
-.uno:Freeline
+.uno:MirrorVert
   
 
 
-  
+  
 True

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

2018-10-19 Thread Libreoffice Gerrit user
 sw/source/filter/ww8/wrtww8.cxx |   11 +++
 sw/source/filter/ww8/ww8par.cxx |   20 ++--
 2 files changed, 9 insertions(+), 22 deletions(-)

New commits:
commit 2ec0cf500222aef55d02df80154b47fbb92970c9
Author: Justin Luth 
AuthorDate: Thu Oct 18 21:15:13 2018 +0300
Commit: Justin Luth 
CommitDate: Fri Oct 19 11:05:38 2018 +0200

NFC ww8 cleanup: remove unused variables, simplify, whitespace

Change-Id: Ib4f100d4019643cde893ef1d8643a5c08b55ff8f
Reviewed-on: https://gerrit.libreoffice.org/61951
Tested-by: Jenkins
Reviewed-by: Justin Luth 

diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 6451b5c92377..29259003ab88 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -498,14 +498,9 @@ static void WriteDop( WW8Export& rWrt )
 OSL_ENSURE(pDocShell, "no SwDocShell");
 uno::Reference xDocProps;
 uno::Reference xProps;
-if (pDocShell) {
-uno::Reference xModelComp(pDocShell->GetModel(),
-   uno::UNO_QUERY);
-xProps.set(xModelComp, uno::UNO_QUERY);
-uno::Reference xDPS(
-xModelComp, uno::UNO_QUERY_THROW);
-xDocProps = xDPS->getDocumentProperties();
-OSL_ENSURE(xDocProps.is(), "DocumentProperties is null");
+if ( pDocShell )
+{
+xProps.set(pDocShell->GetModel(), uno::UNO_QUERY);
 
 rDop.lKeyProtDoc = pDocShell->GetModifyPasswordHash();
 }
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 54bf8e6aeaa7..70f3cdf41f6c 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -1905,22 +1905,14 @@ void SwWW8ImplReader::ImportDop()
 
 // disable form design mode to be able to use imported controls directly
 // #i31239# always disable form design mode, not only in protected docs
+uno::Reference xDocProps(m_pDocShell->GetModel(), 
uno::UNO_QUERY);
+if (xDocProps.is())
 {
-uno::Reference xModelComp(m_pDocShell->GetModel(),
-   uno::UNO_QUERY);
-uno::Reference xDocProps(xModelComp,
-   uno::UNO_QUERY);
-if (xDocProps.is())
+uno::Reference xInfo = 
xDocProps->getPropertySetInfo();
+if (xInfo.is())
 {
-uno::Reference xInfo =
-xDocProps->getPropertySetInfo();
-if (xInfo.is())
-{
-if (xInfo->hasPropertyByName("ApplyFormDesignMode"))
-{
-xDocProps->setPropertyValue("ApplyFormDesignMode", 
css::uno::makeAny(false));
-}
-}
+if (xInfo->hasPropertyByName("ApplyFormDesignMode"))
+xDocProps->setPropertyValue("ApplyFormDesignMode", 
css::uno::makeAny(false));
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-1-3' - dbaccess/source

2018-10-19 Thread Libreoffice Gerrit user
 dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit c229a77ac5cf935f6f189a644811a253c1bc36de
Author: Julien Nabet 
AuthorDate: Wed Oct 10 23:13:05 2018 +0200
Commit: Caolán McNamara 
CommitDate: Fri Oct 19 10:35:48 2018 +0200

tdf#120478: fix wrong icon when JDBC driver test fails

Change-Id: I1d96e4a5e091caddf46131385ff5274521844fa9
Reviewed-on: https://gerrit.libreoffice.org/61637
Tested-by: Jenkins
(cherry picked from commit 8b44c2c525a663dbee3d88785ddcd0d5781002da)
Reviewed-on: https://gerrit.libreoffice.org/61645
Reviewed-by: Noel Grandin 
Reviewed-by: Adolfo Jayme Barrientos 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx 
b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
index b2ca1e21182e..7ea3cc455f75 100644
--- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
+++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
@@ -675,7 +675,8 @@ using namespace ::com::sun::star;
 }
 #endif
 const char* pMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : 
STR_JDBCDRIVER_NO_SUCCESS;
-OSQLMessageBox aMsg(GetFrameWeld(), DBA_RES(pMessage), OUString());
+const MessageType mt = bSuccess ? MessageType::Info : 
MessageType::Error;
+OSQLMessageBox aMsg(GetFrameWeld(), DBA_RES(pMessage), OUString(), 
MessBoxStyle::Ok | MessBoxStyle::DefaultOk, mt);
 aMsg.run();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-1-3' - dtrans/Library_mcnttype.mk dtrans/source

2018-10-19 Thread Libreoffice Gerrit user
 dtrans/Library_mcnttype.mk |1 
 dtrans/source/cnttype/mcnttype.cxx |  269 ++---
 dtrans/source/cnttype/mcnttype.hxx |3 
 3 files changed, 19 insertions(+), 254 deletions(-)

New commits:
commit 90173417577338ba837cd1ed51276b3e3c8a50df
Author: Stephan Bergmann 
AuthorDate: Thu Oct 11 17:31:30 2018 +0200
Commit: Caolán McNamara 
CommitDate: Fri Oct 19 10:35:04 2018 +0200

tdf#120158: Base CMimeContentType on INetMIME::scanContentType

...instead of using yet another local implementation of parsing media types.

CMimeContentType is the implementation of the UNO
css.datatransfer.XMimeContentType interface.  One observable change in 
behavior
is that type, subtype, and parameter names will now always be reported in 
lower
case instead of with the casing from the input preserved (but those 
differences
in casing are functionally equivalent per the media type specification).  
Also,
parameter names supplied to the hasParameter and getParameterValue 
functions are
now also treated case-insensitive.

The upside of this change is that INetMIME::scanContentType (via "The 
encoding
of rMediaType should be US-ASCII, but any Unicode values in the range 
U+0080..
U+ are interpreted 'as appropriate.'") already implicitly supports RFC 
6532
"Internationalized Email Headers" extensions for media types, allowing 
quoted-
string parameter values to contain non-ASCII Unicode characters.

That means that tfd#120158 "Impossible to paste special in Writer from Calc 
in
Libreoffice 6.1.x in some UI languages - the dialogue caption says 'unknown
source'" can be fixed by just allowing non-ASCII typename parameters being
generated in ImplGetParameterString in svtools/source/misc/transfer.cxx, and
reverting the problematic (see the comments there) previous fix
 "tdf#120158: fix 
ImplGetParameterString
for typename".  (Which will be done in a follow-up commit, to ease potential
backporting, as that previous fix has already been backported to some 
versions
but not to others.)

Reviewed-on: https://gerrit.libreoffice.org/61684
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit b75e3ded1f73c943fb09f117e476e367ac0c3413)
Conflicts:
dtrans/source/cnttype/mcnttype.cxx

Change-Id: I5d4d3586e8046f288a97605b000e262a8db5a4e9
Reviewed-on: https://gerrit.libreoffice.org/61702
Reviewed-by: Adolfo Jayme Barrientos 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/dtrans/Library_mcnttype.mk b/dtrans/Library_mcnttype.mk
index c139e88fed27..2442a01cb721 100644
--- a/dtrans/Library_mcnttype.mk
+++ b/dtrans/Library_mcnttype.mk
@@ -27,6 +27,7 @@ $(eval $(call gb_Library_use_libraries,mcnttype,\
cppu \
cppuhelper \
sal \
+   tl \
 ))
 
 $(eval $(call gb_Library_add_exception_objects,mcnttype,\
diff --git a/dtrans/source/cnttype/mcnttype.cxx 
b/dtrans/source/cnttype/mcnttype.cxx
index 3f982dd8a62c..483806163bea 100644
--- a/dtrans/source/cnttype/mcnttype.cxx
+++ b/dtrans/source/cnttype/mcnttype.cxx
@@ -20,20 +20,16 @@
 #include 
 
 #include 
+#include 
+#include 
 
 #include "mcnttype.hxx"
 
 using namespace com::sun::star::uno;
-using namespace com::sun::star::lang;
 using namespace com::sun::star::container;
 using namespace std;
 using namespace osl;
 
-const char TSPECIALS[] =  "()<>@,;:\\\"/[]?=";
-const char TOKEN[] = 
"!#$%&'*+-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ^_`abcdefghijklmnopqrstuvwxyz{|}~.";
-const char SPACE[] = " ";
-const char SEMICOLON[] = ";";
-
 CMimeContentType::CMimeContentType( const OUString& aCntType )
 {
 init( aCntType );
@@ -75,267 +71,38 @@ Sequence< OUString > SAL_CALL 
CMimeContentType::getParameters( )
 sal_Bool SAL_CALL CMimeContentType::hasParameter( const OUString& aName )
 {
 MutexGuard aGuard( m_aMutex );
-return ( m_ParameterMap.end( ) != m_ParameterMap.find( aName ) );
+return ( m_ParameterMap.end( ) != m_ParameterMap.find( 
aName.toAsciiLowerCase() ) );
 }
 
 OUString SAL_CALL CMimeContentType::getParameterValue( const OUString& aName )
 {
+auto const lower = aName.toAsciiLowerCase();
+
 MutexGuard aGuard( m_aMutex );
 
-if ( !hasParameter( aName ) )
+if ( !hasParameter( lower ) )
 throw NoSuchElementException( );
 
-return m_ParameterMap.find( aName )->second;
+return m_ParameterMap.find( lower )->second;
 }
 
 void CMimeContentType::init( const OUString& aCntType )
 {
-if ( aCntType.isEmpty( ) )
-throw IllegalArgumentException( );
-
-m_nPos = 0;
-m_ContentType = aCntType;
-getSym( );
-type();
-}
-
-void CMimeContentType::getSym()
-{
-if ( m_nPos < m_ContentType.getLength( ) )
+INetContentTypeParameterList params;
+if (INetMIME::scanContentType(aCntType, &m_MediaType, &m_MediaSubtype, 
¶ms)
+

[Libreoffice-commits] core.git: Branch 'libreoffice-6-1-3' - chart2/qa chart2/source

2018-10-19 Thread Libreoffice Gerrit user
 chart2/qa/extras/xshape/data/reference/tdf90839-1.xml |   68 +-
 chart2/qa/extras/xshape/data/reference/tdf90839-2.xml |   10 +-
 chart2/qa/extras/xshape/data/reference/tdf90839-3.xml |   10 +-
 chart2/qa/extras/xshape/data/reference/tdf90839-4.xml |   10 +-
 chart2/source/tools/DiagramHelper.cxx |6 +
 5 files changed, 54 insertions(+), 50 deletions(-)

New commits:
commit e3e7f45ea4b07e2cbeaad75d46edc1b8fb9160fc
Author: Eike Rathke 
AuthorDate: Tue Oct 16 12:03:24 2018 +0200
Commit: Caolán McNamara 
CommitDate: Fri Oct 19 10:34:17 2018 +0200

Resolves: tdf#115182 default Chart percentage format is integer

Regression from

commit 0f4b3cb7d3d68906de316a64dcec281da2a641bd
CommitDate: Mon Aug 10 17:12:45 2015 +0200

The chart2/qa/extras/xshape/data/reference/tdf90839-?.xml
reference files were created with the then wrong default of two
decimals so need to be adapted.

For chart2/qa/extras/xshape/data/reference/tdf90839-1.xml this
meant to regenerate because of the changed positions and sizes of
labels.

Change-Id: Ib0c2c862af9399ab2af5178d01510aa5e4fff97c
Reviewed-on: https://gerrit.libreoffice.org/61826
Tested-by: Jenkins
Reviewed-by: Eike Rathke 
(cherry picked from commit 9672d034b9e760f24ac9a6652ab45dee15ee260a)
Reviewed-on: https://gerrit.libreoffice.org/61855
Reviewed-by: Andras Timar 
(cherry picked from commit 7d17e8e1798b7120b9e8559d042de2afc0a078e3)
Reviewed-on: https://gerrit.libreoffice.org/61857
Tested-by: Xisco Faulí 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/chart2/qa/extras/xshape/data/reference/tdf90839-1.xml 
b/chart2/qa/extras/xshape/data/reference/tdf90839-1.xml
index 7dcbab785af3..3a5070283565 100644
--- a/chart2/qa/extras/xshape/data/reference/tdf90839-1.xml
+++ b/chart2/qa/extras/xshape/data/reference/tdf90839-1.xml
@@ -175,15 +175,15 @@

   
  
- 
+ 
   
-   
+   
 
- 
+ 
   
-   
+   
 
- 
+ 
   
   
   
@@ -192,21 +192,21 @@
   
   
   
-   
-   
+   
+   

   
  
 
 
- 
- 
+ 
+ 
  
 

-   
+   
 
- 
+ 
   
   
   
@@ -215,21 +215,21 @@
   
   
   
-   
-   
+   
+   

   
  
 
 
- 
- 
+ 
+ 
  
 


 
- 
+ 
   
   
   
@@ -250,9 +250,9 @@
  
 

-   
+   
 
- 
+ 
   
   
   
@@ -261,21 +261,21 @@
   
   
   
-   
-   
+   
+   

   
  
 
 
- 
- 
+ 
+ 
  
 

-   
+   
 
- 
+ 
   
   
   
@@ -284,36 +284,36 @@
   
   
   
-   
-   
+   
+   

   
  
 
 
- 
- 
+ 
+ 
  
 

   
   
-   
-   
+   
+   

   
  
 
 
- 
- 
+ 
+ 
  
 

   
   
-   
-   
+   
+   

   
  
diff --git a/chart2/qa/extras/xshape/data/reference/tdf90839-2.xml 
b/chart2/qa/extras/xshape/data/reference/tdf90839-2.xml
index 489b346d4170..b90bf060b694 100644
--- a/chart2/qa/extras/xshape/data/reference/tdf90839-2.xml
+++ b/chart2/qa/extras/xshape/data/reference/tdf90839-2.xml
@@ -183,7 +183,7 @@
   

 
- 
+ 
   
   
   
@@ -206,7 +206,7 @@


 
- 
+ 
   
   
   
@@ -229,7 +229,7 @@


 
- 
+ 
   
   
   
@@ -252,7 +252,7 @@
 

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

2018-10-19 Thread Libreoffice Gerrit user
 sw/source/uibase/docvw/PostItMgr.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit a4257d576cb77753979aae14a9c1751d14d6e375
Author: Caolán McNamara 
AuthorDate: Thu Oct 11 15:39:37 2018 +0100
Commit: Caolán McNamara 
CommitDate: Fri Oct 19 10:33:43 2018 +0200

Resolves: tdf#120487 postit losing focus triggering recreation of postit

Change-Id: Idde6b740bc94de62bbd528b656841ab37e3f3786
Reviewed-on: https://gerrit.libreoffice.org/61682
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 
(cherry picked from commit f1e09253316d9db39b7adab6d31e759c09de3406)
Reviewed-on: https://gerrit.libreoffice.org/61786
Tested-by: Xisco Faulí 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/source/uibase/docvw/PostItMgr.cxx 
b/sw/source/uibase/docvw/PostItMgr.cxx
index 2cd8d420db70..4565d4843ac7 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -309,8 +309,11 @@ void SwPostItMgr::RemoveItem( SfxBroadcaster* pBroadcast )
 SwSidebarItem* p = (*i);
 if (GetActiveSidebarWin() == p->pPostIt)
 SetActiveSidebarWin(nullptr);
-p->pPostIt.disposeAndClear();
+// tdf#120487 remove from list before dispose, so comment window
+// won't be recreated due to the entry still in the list if focus
+// transferring from the pPostIt triggers relayout of postits
 mvPostItFields.erase(i);
+p->pPostIt.disposeAndClear();
 delete p;
 break;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-19 Thread Libreoffice Gerrit user
 chart2/source/controller/dialogs/tp_SeriesToAxis.cxx |  162 ++-
 chart2/source/controller/dialogs/tp_SeriesToAxis.hxx |   42 +--
 chart2/source/controller/main/ChartController_Window.cxx |7 
 chart2/uiconfig/ui/tp_SeriesToAxis.ui|   37 ---
 4 files changed, 101 insertions(+), 147 deletions(-)

New commits:
commit 59a55475af8e4f6ce4f0976a73a605b012165d3a
Author: Caolán McNamara 
AuthorDate: Thu Oct 18 13:46:41 2018 +0100
Commit: Caolán McNamara 
CommitDate: Fri Oct 19 10:06:16 2018 +0200

weld SchOptionTabPage

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

diff --git a/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx 
b/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx
index 9690c47ec91b..3821f10e51fe 100644
--- a/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx
+++ b/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx
@@ -33,35 +33,29 @@
 namespace chart
 {
 
-SchOptionTabPage::SchOptionTabPage(vcl::Window* pWindow,const SfxItemSet& 
rInAttrs)
-: SfxTabPage(pWindow,
-   "TP_OPTIONS",
-   "modules/schart/ui/tp_SeriesToAxis.ui",
-   &rInAttrs)
+SchOptionTabPage::SchOptionTabPage(TabPageParent pWindow,const SfxItemSet& 
rInAttrs)
+: SfxTabPage(pWindow, "modules/schart/ui/tp_SeriesToAxis.ui", 
"TP_OPTIONS", &rInAttrs)
 , m_nAllSeriesAxisIndex(0)
 , m_bProvidesSecondaryYAxis(true)
 , m_bProvidesOverlapAndGapWidth(false)
 , m_bProvidesBarConnectors(false)
+, m_xGrpAxis(m_xBuilder->weld_widget("frameGrpAxis"))
+, m_xRbtAxis1(m_xBuilder->weld_radio_button("RBT_OPT_AXIS_1"))
+, m_xRbtAxis2(m_xBuilder->weld_radio_button("RBT_OPT_AXIS_2"))
+, m_xGrpBar(m_xBuilder->weld_widget("frameSettings"))
+, m_xMTGap(m_xBuilder->weld_metric_spin_button("MT_GAP", FUNIT_PERCENT))
+, m_xMTOverlap(m_xBuilder->weld_metric_spin_button("MT_OVERLAP", 
FUNIT_PERCENT))
+, m_xCBConnect(m_xBuilder->weld_check_button("CB_CONNECTOR"))
+, 
m_xCBAxisSideBySide(m_xBuilder->weld_check_button("CB_BARS_SIDE_BY_SIDE"))
+, m_xGrpPlotOptions(m_xBuilder->weld_widget("frameFL_PLOT_OPTIONS"))
+, m_xGridPlotOptions(m_xBuilder->weld_widget("gridPLOT_OPTIONS"))
+, m_xRB_DontPaint(m_xBuilder->weld_radio_button("RB_DONT_PAINT"))
+, m_xRB_AssumeZero(m_xBuilder->weld_radio_button("RB_ASSUME_ZERO"))
+, m_xRB_ContinueLine(m_xBuilder->weld_radio_button("RB_CONTINUE_LINE"))
+, 
m_xCBIncludeHiddenCells(m_xBuilder->weld_check_button("CB_INCLUDE_HIDDEN_CELLS"))
 {
-get(m_pGrpAxis,"frameGrpAxis");
-get(m_pRbtAxis1,"RBT_OPT_AXIS_1");
-get(m_pRbtAxis2,"RBT_OPT_AXIS_2");
-
-get(m_pGrpBar,"frameSettings");
-get(m_pMTGap,"MT_GAP");
-get(m_pMTOverlap,"MT_OVERLAP");
-get(m_pCBConnect,"CB_CONNECTOR");
-get(m_pCBAxisSideBySide,"CB_BARS_SIDE_BY_SIDE");
-
-get(m_pGrpPlotOptions,"frameFL_PLOT_OPTIONS" );
-get(m_pGridPlotOptions,"gridPLOT_OPTIONS");
-get(m_pRB_DontPaint,"RB_DONT_PAINT");
-get(m_pRB_AssumeZero,"RB_ASSUME_ZERO");
-get(m_pRB_ContinueLine,"RB_CONTINUE_LINE");
-get(m_pCBIncludeHiddenCells,"CB_INCLUDE_HIDDEN_CELLS");
-
-m_pRbtAxis1->SetClickHdl( LINK( this, SchOptionTabPage, EnableHdl ));
-m_pRbtAxis2->SetClickHdl( LINK( this, SchOptionTabPage, EnableHdl ));
+m_xRbtAxis1->connect_toggled(LINK(this, SchOptionTabPage, EnableHdl));
+m_xRbtAxis2->connect_toggled(LINK(this, SchOptionTabPage, EnableHdl));
 }
 
 SchOptionTabPage::~SchOptionTabPage()
@@ -69,69 +63,50 @@ SchOptionTabPage::~SchOptionTabPage()
 disposeOnce();
 }
 
-void SchOptionTabPage::dispose()
-{
-m_pGrpAxis.clear();
-m_pRbtAxis1.clear();
-m_pRbtAxis2.clear();
-m_pGrpBar.clear();
-m_pMTGap.clear();
-m_pMTOverlap.clear();
-m_pCBConnect.clear();
-m_pCBAxisSideBySide.clear();
-m_pGrpPlotOptions.clear();
-m_pGridPlotOptions.clear();
-m_pRB_DontPaint.clear();
-m_pRB_AssumeZero.clear();
-m_pRB_ContinueLine.clear();
-m_pCBIncludeHiddenCells.clear();
-SfxTabPage::dispose();
-}
-
-IMPL_LINK_NOARG(SchOptionTabPage, EnableHdl, Button*, void)
+IMPL_LINK_NOARG(SchOptionTabPage, EnableHdl, weld::ToggleButton&, void)
 {
 if( m_nAllSeriesAxisIndex == 0 )
-m_pCBAxisSideBySide->Enable( m_pRbtAxis2->IsChecked());
+m_xCBAxisSideBySide->set_sensitive( m_xRbtAxis2->get_active());
 else if( m_nAllSeriesAxisIndex == 1 )
-m_pCBAxisSideBySide->Enable( m_pRbtAxis1->IsChecked());
+m_xCBAxisSideBySide->set_sensitive( m_xRbtAxis1->get_active());
 }
 
-VclPtr SchOptionTabPage::Create(TabPageParent pWindow,
+VclPtr SchOptionTabPage::Create(TabPageParent pParent,
 const SfxItemSet* rOutAttrs)
 {
-return VclPtr::Create(pWindow.pParent, *rOutAttrs);
+return VclPtr::Create(pParent, *rO

[Libreoffice-commits] core.git: vcl/inc vcl/qt5

2018-10-19 Thread Libreoffice Gerrit user
 vcl/inc/qt5/Qt5DragAndDrop.hxx |6 ++
 vcl/inc/qt5/Qt5Frame.hxx   |2 ++
 vcl/qt5/Qt5DragAndDrop.cxx |   23 +--
 vcl/qt5/Qt5Frame.cxx   |   31 +++
 vcl/qt5/Qt5Widget.cxx  |3 +++
 5 files changed, 63 insertions(+), 2 deletions(-)

New commits:
commit 5ebef042bd44e9babd58f53b4458616aa3215beb
Author: Katarina Behrens 
AuthorDate: Mon Oct 15 14:44:29 2018 +0200
Commit: Katarina Behrens 
CommitDate: Fri Oct 19 10:05:00 2018 +0200

Kick-start beginning of drag event

Change-Id: Iaad25a7acdc7d64013bc3dd0d9410e7d2d5c6762
Reviewed-on: https://gerrit.libreoffice.org/61791
Tested-by: Jenkins
Reviewed-by: Katarina Behrens 

diff --git a/vcl/inc/qt5/Qt5DragAndDrop.hxx b/vcl/inc/qt5/Qt5DragAndDrop.hxx
index 733cf4d03570..424a1ba638e4 100644
--- a/vcl/inc/qt5/Qt5DragAndDrop.hxx
+++ b/vcl/inc/qt5/Qt5DragAndDrop.hxx
@@ -57,6 +57,10 @@ public:
 css::uno::Sequence SAL_CALL getSupportedServiceNames() override;
 
 void dragFailed();
+css::uno::Reference const& 
GetTransferable() const
+{
+return m_xTrans;
+}
 };
 
 class Qt5DropTarget
@@ -102,6 +106,8 @@ public:
 OUString SAL_CALL getImplementationName() override;
 sal_Bool SAL_CALL supportsService(OUString const& ServiceName) override;
 css::uno::Sequence SAL_CALL getSupportedServiceNames() override;
+
+void fire_dragEnter(const 
css::datatransfer::dnd::DropTargetDragEnterEvent& dtde);
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/qt5/Qt5Frame.hxx b/vcl/inc/qt5/Qt5Frame.hxx
index d3400f378d1f..9ee9f50666e9 100644
--- a/vcl/inc/qt5/Qt5Frame.hxx
+++ b/vcl/inc/qt5/Qt5Frame.hxx
@@ -75,6 +75,7 @@ class VCLPLUG_QT5_PUBLIC Qt5Frame : public QObject, public 
SalFrame
 
 Qt5DragSource* m_pDragSource;
 Qt5DropTarget* m_pDropTarget;
+bool m_bInDrag;
 
 bool m_bDefaultSize;
 bool m_bDefaultPos;
@@ -133,6 +134,7 @@ public:
 virtual void deregisterDragSource(Qt5DragSource const* pDragSource);
 virtual void registerDropTarget(Qt5DropTarget* pDropTarget);
 virtual void deregisterDropTarget(Qt5DropTarget const* pDropTarget);
+void draggingStarted(const int x, const int y);
 
 virtual void SetExtendedFrameStyle(SalExtStyle nExtStyle) override;
 virtual void Show(bool bVisible, bool bNoActivate = false) override;
diff --git a/vcl/qt5/Qt5DragAndDrop.cxx b/vcl/qt5/Qt5DragAndDrop.cxx
index 6e83f6ff40fa..ac9a0fdb6339 100644
--- a/vcl/qt5/Qt5DragAndDrop.cxx
+++ b/vcl/qt5/Qt5DragAndDrop.cxx
@@ -16,6 +16,7 @@
 
 #include 
 #include 
+#include 
 
 using namespace com::sun::star;
 using namespace com::sun::star::uno;
@@ -63,7 +64,12 @@ void Qt5DragSource::startDrag(
 m_xListener = rListener;
 m_xTrans = rTrans;
 
-if (!m_pFrame)
+if (m_pFrame)
+{
+Qt5Widget* qw = static_cast(m_pFrame->GetQWidget());
+qw->startDrag();
+}
+else
 dragFailed();
 }
 
@@ -150,7 +156,7 @@ void Qt5DropTarget::initialize(const Sequence& 
rArguments)
 }
 
 m_pFrame = reinterpret_cast(nFrame);
-//m_pFrame->registerDropTarget(this);
+m_pFrame->registerDropTarget(this);
 m_bActive = true;
 }
 
@@ -182,6 +188,19 @@ void Qt5DropTarget::setDefaultActions(sal_Int8 
nDefaultActions)
 m_nDefaultActions = nDefaultActions;
 }
 
+void Qt5DropTarget::fire_dragEnter(const 
css::datatransfer::dnd::DropTargetDragEnterEvent& dtde)
+{
+osl::ClearableGuard<::osl::Mutex> aGuard(m_aMutex);
+
std::vector> 
aListeners(
+m_aListeners);
+aGuard.clear();
+
+for (auto const& listener : aListeners)
+{
+listener->dragEnter(dtde);
+}
+}
+
 void Qt5DropTarget::acceptDrag(sal_Int8 /*dragOperation*/) { return; }
 void Qt5DropTarget::rejectDrag() { return; }
 
diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx
index ae3ae325ccd2..bbf541dea312 100644
--- a/vcl/qt5/Qt5Frame.cxx
+++ b/vcl/qt5/Qt5Frame.cxx
@@ -46,6 +46,8 @@
 #include 
 #include 
 
+#include 
+
 #include 
 #include 
 
@@ -63,6 +65,9 @@ Qt5Frame::Qt5Frame(Qt5Frame* pParent, SalFrameStyleFlags 
nStyle, bool bUseCairo)
 , m_bNullRegion(true)
 , m_bGraphicsInUse(false)
 , m_ePointerStyle(PointerStyle::Arrow)
+, m_pDragSource(nullptr)
+, m_pDropTarget(nullptr)
+, m_bInDrag(false)
 , m_bDefaultSize(true)
 , m_bDefaultPos(true)
 {
@@ -870,4 +875,30 @@ void Qt5Frame::deregisterDropTarget(Qt5DropTarget const* 
pDropTarget)
 m_pDropTarget = nullptr;
 }
 
+void Qt5Frame::draggingStarted(const int x, const int y)
+{
+assert(m_pDropTarget);
+
+css::datatransfer::dnd::DropTargetDragEnterEvent aEvent;
+aEvent.Source = 
static_cast(m_pDropTarget);
+aEvent.Context = 
static_cast(m_pDropTarget);
+aEvent.LocationX = x;
+aEvent.LocationY = y;
+aEvent.DropAction = css::datatransfer::dnd::DNDConstants::ACTION_MOVE; 
//FIXME
+aEvent.SourceActions = css::datatransfer::dnd::DNDConstants::ACTION_MOVE;
+

Re: now need to add #include to lots of files while debugging

2018-10-19 Thread Miklos Vajna
Hi,

On Fri, Oct 19, 2018 at 09:05:03AM +0200, Stephan Bergmann 
 wrote:
> where exactly should that be centrally included (even if that were a good
> idea, which I at least am not sure of)?

include/rtl/ustring.hxx used to include sal/log.hxx. I think it's a good
thing that's no longer the case. The build is slow enough already,
including something you don't use is the last thing we need.

Regards,

Miklos


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


Re: now need to add #include to lots of files while debugging

2018-10-19 Thread Stephan Bergmann

On 19/10/2018 08:34, Justin Luth wrote:
About a month or two ago, I had to start including sal/log.hxx in lots 
of files in order to add SAL_WARN debugging commands. That gets really 
annoying. Can that be added back so that it is pretty much always 
available?


where exactly should that be centrally included (even if that were a 
good idea, which I at least am not sure of)?


(and just in case: for temporary debug better use SAL_DEBUG than 
SAL_WARN, with the former, a git hook prevents you from accidentally 
committing that; but the #include issue remains, of course)

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