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

2018-10-08 Thread Libreoffice Gerrit user
 editeng/source/editeng/editobj.cxx  |   51 +---
 editeng/source/editeng/editundo.cxx |   29 ++--
 editeng/source/items/flditem.cxx|2 -
 editeng/source/items/frmitems.cxx   |   28 +--
 editeng/source/items/numitem.cxx|4 +-
 editeng/source/items/paraitem.cxx   |   11 ---
 6 files changed, 62 insertions(+), 63 deletions(-)

New commits:
commit 98cc91efd7862d39b3c33b85b744721bec935938
Author: Jochen Nitschke 
AuthorDate: Mon Oct 8 21:16:07 2018 +0200
Commit: Jochen Nitschke 
CommitDate: Tue Oct 9 08:23:34 2018 +0200

cppcheck: useInitializationList in editeng ...

and remove some indirections

Change-Id: I94088030084683c1a24f904da1c42a01f24f47ce
Reviewed-on: https://gerrit.libreoffice.org/61561
Tested-by: Jenkins
Reviewed-by: Jochen Nitschke 

diff --git a/editeng/source/editeng/editobj.cxx 
b/editeng/source/editeng/editobj.cxx
index 78f3364ac350..7ff6af5bead3 100644
--- a/editeng/source/editeng/editobj.cxx
+++ b/editeng/source/editeng/editobj.cxx
@@ -67,10 +67,10 @@ static std::unique_ptr MakeXEditAttribute( 
SfxItemPool& rPool, c
 }
 
 XEditAttribute::XEditAttribute( const SfxPoolItem& rAttr, sal_Int32 nS, 
sal_Int32 nE )
+: pItem(&rAttr)
+, nStart(nS)
+, nEnd(nE)
 {
-pItem = &rAttr;
-nStart = nS;
-nEnd = nE;
 }
 
 XEditAttribute::~XEditAttribute()
@@ -90,12 +90,14 @@ void XEditAttribute::SetItem(const SfxPoolItem& rNew)
 }
 
 XParaPortionList::XParaPortionList(
-OutputDevice* pRefDev, sal_uLong nPW, sal_uInt16 _nStretchX, sal_uInt16 
_nStretchY) :
-aRefMapMode(pRefDev->GetMapMode()), nStretchX(_nStretchX), 
nStretchY(_nStretchY)
+OutputDevice* pRefDev, sal_uLong nPW, sal_uInt16 _nStretchX, sal_uInt16 
_nStretchY)
+: nRefDevPtr(pRefDev)
+, eRefDevType(pRefDev->GetOutDevType())
+, aRefMapMode(pRefDev->GetMapMode())
+, nStretchX(_nStretchX)
+, nStretchY(_nStretchY)
+, nPaperWidth(nPW)
 {
-nRefDevPtr = pRefDev;
-nPaperWidth = nPW;
-eRefDevType = pRefDev->GetOutDevType();
 }
 
 void XParaPortionList::push_back(XParaPortion* p)
@@ -495,13 +497,14 @@ static EditEngineItemPool* 
getEditEngineItemPool(SfxItemPool* pPool)
 return pRetval;
 }
 
-EditTextObjectImpl::EditTextObjectImpl( EditTextObject* pFront, SfxItemPool* 
pP ) :
-mpFront(pFront)
+EditTextObjectImpl::EditTextObjectImpl( EditTextObject* pFront, SfxItemPool* 
pP )
+: mpFront(pFront)
+, nMetric(0x)
+, nUserType(OutlinerMode::DontKnow)
+, nScriptType(SvtScriptType::NONE)
+, bVertical(false)
+, bIsTopToBottomVert(false)
 {
-nMetric = 0x;
-nUserType = OutlinerMode::DontKnow;
-pPortionInfo = nullptr;
-
 // #i101239# ensure target is a EditEngineItemPool, else
 // fallback to pool ownership. This is needed to ensure that at
 // pool destruction time of an alien pool, the pool is still alive.
@@ -525,21 +528,17 @@ EditTextObjectImpl::EditTextObjectImpl( EditTextObject* 
pFront, SfxItemPool* pP
 // it is sure now that the pool is an EditEngineItemPool
 pPool->AddSfxItemPoolUser(*mpFront);
 }
-
-bVertical = false;
-bIsTopToBottomVert = false;
-nScriptType = SvtScriptType::NONE;
 }
 
-EditTextObjectImpl::EditTextObjectImpl( EditTextObject* pFront, const 
EditTextObjectImpl& r ) :
-mpFront(pFront)
+EditTextObjectImpl::EditTextObjectImpl( EditTextObject* pFront, const 
EditTextObjectImpl& r )
+: mpFront(pFront)
+, nMetric(r.nMetric)
+, nUserType(r.nUserType)
+, nScriptType(r.nScriptType)
+, bVertical(r.bVertical)
+, bIsTopToBottomVert(r.bIsTopToBottomVert)
 {
-nMetric = r.nMetric;
-nUserType = r.nUserType;
-bVertical = r.bVertical;
-bIsTopToBottomVert = r.bIsTopToBottomVert;
-nScriptType = r.nScriptType;
-pPortionInfo = nullptr;// Do not copy PortionInfo
+// Do not copy PortionInfo
 
 if ( !r.bOwnerOfPool )
 {
diff --git a/editeng/source/editeng/editundo.cxx 
b/editeng/source/editeng/editundo.cxx
index af97ad0cc6f0..95d6db4c85b3 100644
--- a/editeng/source/editeng/editundo.cxx
+++ b/editeng/source/editeng/editundo.cxx
@@ -213,15 +213,14 @@ EditUndoConnectParas::EditUndoConnectParas(
 const SfxItemSet& rLeftParaAttribs, const SfxItemSet& rRightParaAttribs,
 const SfxStyleSheet* pLeftStyle, const SfxStyleSheet* pRightStyle, bool 
bBkwrd) :
 EditUndo(EDITUNDO_CONNECTPARAS, pEE),
+nNode(nN),
+nSepPos(nSP),
 aLeftParaAttribs(rLeftParaAttribs),
 aRightParaAttribs(rRightParaAttribs),
 eLeftStyleFamily(SfxStyleFamily::All),
 eRightStyleFamily(SfxStyleFamily::All),
 bBackward(bBkwrd)
 {
-nNode   = nN;
-nSepPos = nSP;
-
 if ( pLeftStyle )
 {
 aLeftStyleName = pLeftStyle->GetName();
@@ -370,9 +369,10 @@ void EditUndoRemoveChars::Redo()
 
 EditUndoInsertFeature::EditUndoInsertFeature(
 EditEngine* pEE, const EPaM& rEPaM, const SfxPoolItem& rFeature) :
-

[Libreoffice-commits] core.git: scaddins/source sccomp/source

2018-10-08 Thread Libreoffice Gerrit user
 scaddins/source/analysis/analysishelper.hxx|   28 ++---
 scaddins/source/datefunc/datefunc.hxx  |   18 ++---
 scaddins/source/pricing/pricing.hxx|   18 ++---
 sccomp/source/solver/DifferentialEvolution.hxx |4 +--
 sccomp/source/solver/ParticelSwarmOptimization.hxx |2 -
 sccomp/source/solver/SwarmSolver.cxx   |4 ---
 6 files changed, 36 insertions(+), 38 deletions(-)

New commits:
commit 1ab27f9ae6f32c7502884c02c2217bbdcf035c48
Author: Noel Grandin 
AuthorDate: Mon Oct 8 16:19:20 2018 +0200
Commit: Noel Grandin 
CommitDate: Tue Oct 9 08:11:05 2018 +0200

loplugin:constfields in scaddins,sccomp

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

diff --git a/scaddins/source/analysis/analysishelper.hxx 
b/scaddins/source/analysis/analysishelper.hxx
index f0eaac926dfb..05f3e7afdd8a 100644
--- a/scaddins/source/analysis/analysishelper.hxx
+++ b/scaddins/source/analysis/analysishelper.hxx
@@ -198,11 +198,11 @@ struct FuncDataBase
 const sal_Char* pIntName;
 const char* pUINameID;  // resource ID to UI name
 const char**pDescrID;   // resource ID to description, 
parameter names and ~ description
-boolbDouble;// name already exist in Calc
-boolbWithOpt;   // first parameter is internal
+bool const  bDouble;// name already exist in Calc
+bool const  bWithOpt;   // first parameter is internal
 const char**pCompListID;// list of valid names
-sal_uInt16  nNumOfParams;   // number of named / described 
parameters
-FDCategory  eCat;   // function category
+sal_uInt16 constnNumOfParams;   // number of named / described 
parameters
+FDCategory consteCat;   // function category
 const char* pSuffix;// if bDouble, append a suffix 
other than "_ADD" for UI
 };
 
@@ -210,15 +210,15 @@ struct FuncDataBase
 class FuncData final
 {
 private:
-OUStringaIntName;
+OUString const  aIntName;
 const char* pUINameID;
 const char**pDescrID;   // leads also to parameter 
descriptions!
-boolbDouble;// flag for names that already 
exist in Calc
-boolbWithOpt;   // has internal parameter on 
first position
+bool const  bDouble;// flag for names that already 
exist in Calc
+bool const  bWithOpt;   // has internal parameter on 
first position
 
-sal_uInt16  nParam; // num of parameters
+sal_uInt16 constnParam; // num of parameters
 std::vector   aCompList;  // list of all valid names
-FDCategory  eCat;   // function category
+FDCategory consteCat;   // function category
 OUStringaSuffix;// if bDouble and not empty, 
append a suffix other than "_ADD" for UI
 
 public:
@@ -521,10 +521,10 @@ class ConvertData
 {
 protected:
 friend class ConvertDataList;
-double  fConst;
-OUString  aName;
-ConvertDataClasseClass;
-boolbPrefixSupport;
+double const  fConst;
+OUString constaName;
+ConvertDataClass consteClass;
+bool constbPrefixSupport;
 public:
 ConvertData(
 const sal_Char  pUnitName[],
@@ -551,7 +551,7 @@ public:
 
 class ConvertDataLinear final : public ConvertData
 {
-double  fOffs;
+double constfOffs;
 public:
 inline  ConvertDataLinear(
 const sal_Char  pUnitName[],
diff --git a/scaddins/source/datefunc/datefunc.hxx 
b/scaddins/source/datefunc/datefunc.hxx
index 51b2899daeef..10e98c0c8e30 100644
--- a/scaddins/source/datefunc/datefunc.hxx
+++ b/scaddins/source/datefunc/datefunc.hxx
@@ -50,23 +50,23 @@ struct ScaFuncDataBase
 const char* pUINameID;  // resource ID to UI name
 const char**pDescrID;   // resource ID to 
description, parameter names and ~ description
 const char**pCompListID;// list of valid names
-sal_uInt16  nParamCount;// number of named / 
described parameters
-ScaCategory eCat;   // function category
-boolbDouble;// name already exist in 
Calc
-boolbWithOpt

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

2018-10-08 Thread Libreoffice Gerrit user
 sd/inc/CustomAnimationEffect.hxx|2 
 sd/inc/CustomAnimationPreset.hxx|2 
 sd/inc/Outliner.hxx |4 
 sd/inc/OutlinerIterator.hxx |2 
 sd/inc/animations.hxx   |2 
 sd/inc/anminfo.hxx  |4 
 sd/inc/drawdoc.hxx  |2 
 sd/inc/sdfilter.hxx |2 
 sd/inc/sdiocmpt.hxx |2 
 sd/inc/sdpage.hxx   |2 
 sd/inc/sdxmlwrp.hxx |4 
 sd/inc/undo/undoobjects.hxx |2 
 sd/source/core/CustomAnimationEffect.cxx|2 
 sd/source/core/EffectMigration.cxx  |4 
 sd/source/core/annotations/Annotation.cxx   |4 
 sd/source/core/stlpool.cxx  |2 
 sd/source/core/stlsheet.cxx |4 
 sd/source/filter/eppt/eppt.hxx  |   10 -
 sd/source/filter/eppt/epptbase.hxx  |   10 -
 sd/source/filter/eppt/pptexanimations.cxx   |2 
 sd/source/filter/eppt/pptexsoundcollection.hxx  |2 
 sd/source/filter/eppt/pptx-epptooxml.cxx|2 
 sd/source/filter/html/htmlex.cxx|   33 +++---
 sd/source/filter/html/htmlex.hxx|3 
 sd/source/filter/ppt/pptatom.hxx|2 
 sd/source/ui/animations/CustomAnimationDialog.cxx   |   16 +--
 sd/source/ui/animations/CustomAnimationDialog.hxx   |2 
 sd/source/ui/animations/CustomAnimationList.cxx |8 -
 sd/source/ui/animations/CustomAnimationPane.hxx |4 
 sd/source/ui/animations/SlideTransitionPane.cxx |2 
 sd/source/ui/animations/motionpathtag.cxx   |8 -
 sd/source/ui/annotations/annotationtag.hxx  |4 
 sd/source/ui/annotations/annotationwindow.hxx   |2 
 sd/source/ui/controller/displaymodecontroller.cxx   |2 
 sd/source/ui/controller/slidelayoutcontroller.cxx   |4 
 sd/source/ui/dlg/TemplateScanner.cxx|4 
 sd/source/ui/dlg/headerfooterdlg.cxx|6 -
 sd/source/ui/dlg/sdtreelb.cxx   |   12 +-
 sd/source/ui/framework/factories/ChildWindowPane.hxx|2 
 sd/source/ui/framework/tools/FrameworkHelper.cxx|6 -
 sd/source/ui/inc/AccessibleDrawDocumentView.hxx |2 
 sd/source/ui/inc/AccessibleSlideSorterObject.hxx|2 
 sd/source/ui/inc/AccessibleViewForwarder.hxx|2 
 sd/source/ui/inc/Client.hxx |2 
 sd/source/ui/inc/DrawDocShell.hxx   |4 
 sd/source/ui/inc/EventMultiplexer.hxx   |2 
 sd/source/ui/inc/GraphicObjectBar.hxx   |2 
 sd/source/ui/inc/MasterPageObserver.hxx |2 
 sd/source/ui/inc/MediaObjectBar.hxx |2 
 sd/source/ui/inc/OutlineView.hxx|2 
 sd/source/ui/inc/RemoteServer.hxx   |4 
 sd/source/ui/inc/SlideTransitionPane.hxx|4 
 sd/source/ui/inc/TemplateScanner.hxx|4 
 sd/source/ui/inc/ViewShellHint.hxx  |2 
 sd/source/ui/inc/copydlg.hxx|4 
 sd/source/ui/inc/dlgsnap.hxx|2 
 sd/source/ui/inc/framework/Configuration.hxx|2 
 sd/source/ui/inc/fuinsert.hxx   |2 
 sd/source/ui/inc/inspagob.hxx   |2 
 sd/source/ui/inc/prltempl.hxx   |2 
 sd/source/ui/inc/sdtreelb.hxx   |8 -
 sd/source/ui/inc/sdxfer.hxx |2 
 sd/source/ui/inc/slideshow.hxx  |2 
 sd/source/ui/inc/smarttag.hxx   |2 
 sd/source/ui/inc/tabtempl.hxx   |   16 +--
 sd/source/ui/inc/tools/TimerBasedTaskExecution.hxx  |2 
 sd/source/ui/inc/undolayer.hxx  |   26 ++---
 sd/source/ui/inc/undopage.hxx   |   52 
+

[Libreoffice-commits] core.git: 2 commits - include/sfx2 sfx2/inc sfx2/qa sfx2/source smoketest/smoketest.cxx soltools/cpp sot/inc sot/source

2018-10-08 Thread Libreoffice Gerrit user
 include/sfx2/StylePreviewRenderer.hxx   |2 
 include/sfx2/asyncfunc.hxx  |2 
 include/sfx2/childwin.hxx   |   12 -
 include/sfx2/controlwrapper.hxx |4 
 include/sfx2/dinfdlg.hxx|   10 
 include/sfx2/docfac.hxx |2 
 include/sfx2/docfilt.hxx|2 
 include/sfx2/docinsert.hxx  |4 
 include/sfx2/emojiview.hxx  |2 
 include/sfx2/event.hxx  |   10 
 include/sfx2/evntconf.hxx   |6 
 include/sfx2/fcontnr.hxx|2 
 include/sfx2/infobar.hxx|4 
 include/sfx2/linksrc.hxx|2 
 include/sfx2/lokcharthelper.hxx |2 
 include/sfx2/mgetempl.hxx   |2 
 include/sfx2/minfitem.hxx   |2 
 include/sfx2/msg.hxx|   16 -
 include/sfx2/new.hxx|2 
 include/sfx2/objface.hxx|4 
 include/sfx2/objitem.hxx|2 
 include/sfx2/passwd.hxx |6 
 include/sfx2/recentdocsview.hxx |8 
 include/sfx2/recentdocsviewitem.hxx |6 
 include/sfx2/sfxhtml.hxx|2 
 include/sfx2/sfxstatuslistener.hxx  |2 
 include/sfx2/sidebar/AsynchronousCall.hxx   |2 
 include/sfx2/sidebar/ResourceManager.hxx|2 
 include/sfx2/sidebar/TabBar.hxx |2 
 include/sfx2/stbitem.hxx|8 
 include/sfx2/styfitem.hxx   |8 
 include/sfx2/tabdlg.hxx |2 
 include/sfx2/tbxctrl.hxx|8 
 include/sfx2/templatecontaineritem.hxx  |2 
 include/sfx2/templatedefaultview.hxx|1 
 include/sfx2/templatelocalview.hxx  |2 
 include/sfx2/templateviewitem.hxx   |2 
 include/sfx2/thumbnailviewitem.hxx  |2 
 include/sfx2/viewfac.hxx|4 
 include/sfx2/viewfrm.hxx|2 
 sfx2/inc/srchdlg.hxx|2 
 sfx2/qa/cppunit/test_metadatable.cxx|2 
 sfx2/source/appl/appcfg.cxx |2 
 sfx2/source/appl/helpinterceptor.hxx|2 
 sfx2/source/appl/linksrc.cxx|6 
 sfx2/source/appl/newhelp.cxx|8 
 sfx2/source/appl/newhelp.hxx|   14 -
 sfx2/source/appl/workwin.cxx|   45 ++--
 sfx2/source/bastyp/fltfnc.cxx   |4 
 sfx2/source/control/bindings.cxx|6 
 sfx2/source/control/objface.cxx |   10 
 sfx2/source/control/recentdocsview.cxx  |9 
 sfx2/source/control/templatedefaultview.cxx |8 
 sfx2/source/control/thumbnailviewacc.hxx|4 
 sfx2/source/dialog/backingwindow.cxx|4 
 sfx2/source/dialog/backingwindow.hxx|2 
 sfx2/source/dialog/dockwin.cxx  |  290 +---
 sfx2/source/dialog/filtergrouping.cxx   |8 
 sfx2/source/dialog/securitypage.cxx |2 
 sfx2/source/dialog/tabdlg.cxx   |4 
 sfx2/source/dialog/templdlg.cxx |6 
 sfx2/source/doc/doctempl.cxx|2 
 sfx2/source/doc/guisaveas.cxx   |2 
 sfx2/source/doc/iframe.cxx  |2 
 sfx2/source/doc/oleprops.cxx|4 
 sfx2/source/doc/oleprops.hxx|4 
 sfx2/source/doc/printhelper.cxx |2 
 sfx2/source/doc/templatedlg.cxx |4 
 sfx2/source/inc/objshimp.hxx|2 
 sfx2/source/inc/openurlhint.hxx |2 
 sfx2/source/inc/statcach.hxx|4 
 sfx2/source/inc/workwin.hxx |9 
 sfx2/source/view/classificationhelper.cxx   |2 
 sfx2/source/view/ipclient.cxx   |6 
 sfx2/source/view/sfxbasecontroller.cxx  |6 
 sfx2/source/view/viewimp.hxx|4 
 sfx2/source/view/viewprn.cxx|   10 
 sfx2/source/view/viewsh.cxx |2 
 smoketest/smoketest.cxx |4 
 soltools/cpp/_eval.c|6 
 soltools/cpp/_lex.c |2 
 soltools/cpp/_nlist.c   |6 
 sot/inc/sysformats.hxx  |8 
 sot/source/base/formats.cxx |2 
 sot/source/sdstor/stgcache.hxx  |2 
 sot/source/sdstor/ucbstorage.cxx|   10 
 86 files changed, 257 insertions(+), 453 deletions(-)

New commits:
commit 8411b80d46765f1ddd4e37aa634ec963dcf4b04f
Author: Noel Grandin 
AuthorDate: Mon Oct 8 13:07:24 2018 +0200
Commit: Noel Grandin 
CommitDate: Tue Oct 9 08:10:35 2018 +0200

loplugin:constfields in sfx2

and we find that bSplitable in SfxDockingWindow is always true,
ever since

commit 4bd28a2fee0

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

2018-10-08 Thread Libreoffice Gerrit user
 editeng/inc/editdoc.hxx |6 +++---
 editeng/source/editeng/editdoc.cxx  |   12 ++--
 editeng/source/editeng/impedit2.cxx |   23 ++-
 editeng/source/editeng/impedit3.cxx |3 +--
 4 files changed, 20 insertions(+), 24 deletions(-)

New commits:
commit 33e596e03cd486ebb992327988f4bebebd23a0c9
Author: Noel Grandin 
AuthorDate: Mon Oct 8 10:02:43 2018 +0200
Commit: Noel Grandin 
CommitDate: Tue Oct 9 08:09:41 2018 +0200

use unique_ptr in ParaPortionList

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

diff --git a/editeng/inc/editdoc.hxx b/editeng/inc/editdoc.hxx
index 92b677466761..aafeb0c81378 100644
--- a/editeng/inc/editdoc.hxx
+++ b/editeng/inc/editdoc.hxx
@@ -664,10 +664,10 @@ public:
 ParaPortion* operator[](sal_Int32 nPos);
 const ParaPortion* operator[](sal_Int32 nPos) const;
 
-ParaPortion* Release(sal_Int32 nPos);
+std::unique_ptr Release(sal_Int32 nPos);
 void Remove(sal_Int32 nPos);
-void Insert(sal_Int32 nPos, ParaPortion* p);
-void Append(ParaPortion* p);
+void Insert(sal_Int32 nPos, std::unique_ptr p);
+void Append(std::unique_ptr p);
 sal_Int32 Count() const;
 
 #if OSL_DEBUG_LEVEL > 0
diff --git a/editeng/source/editeng/editdoc.cxx 
b/editeng/source/editeng/editdoc.cxx
index 00e2698d7317..8185d7412b47 100644
--- a/editeng/source/editeng/editdoc.cxx
+++ b/editeng/source/editeng/editdoc.cxx
@@ -695,14 +695,14 @@ const ParaPortion* ParaPortionList::operator [](sal_Int32 
nPos) const
 return 0 <= nPos && nPos < static_cast(maPortions.size()) ? 
maPortions[nPos].get() : nullptr;
 }
 
-ParaPortion* ParaPortionList::Release(sal_Int32 nPos)
+std::unique_ptr ParaPortionList::Release(sal_Int32 nPos)
 {
 if (nPos < 0 || static_cast(maPortions.size()) <= nPos)
 {
 SAL_WARN( "editeng", "ParaPortionList::Release - out of bounds pos " 
<< nPos);
 return nullptr;
 }
-ParaPortion* p = maPortions[nPos].release();
+std::unique_ptr p = std::move(maPortions[nPos]);
 maPortions.erase(maPortions.begin()+nPos);
 return p;
 }
@@ -717,19 +717,19 @@ void ParaPortionList::Remove(sal_Int32 nPos)
 maPortions.erase(maPortions.begin()+nPos);
 }
 
-void ParaPortionList::Insert(sal_Int32 nPos, ParaPortion* p)
+void ParaPortionList::Insert(sal_Int32 nPos, std::unique_ptr p)
 {
 if (nPos < 0 || static_cast(maPortions.size()) < nPos)
 {
 SAL_WARN( "editeng", "ParaPortionList::Insert - out of bounds pos " << 
nPos);
 return;
 }
-maPortions.insert(maPortions.begin()+nPos, 
std::unique_ptr(p));
+maPortions.insert(maPortions.begin()+nPos, std::move(p));
 }
 
-void ParaPortionList::Append(ParaPortion* p)
+void ParaPortionList::Append(std::unique_ptr p)
 {
-maPortions.push_back(std::unique_ptr(p));
+maPortions.push_back(std::move(p));
 }
 
 sal_Int32 ParaPortionList::Count() const
diff --git a/editeng/source/editeng/impedit2.cxx 
b/editeng/source/editeng/impedit2.cxx
index 62b9382e2c13..e331006de1d3 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -246,8 +246,7 @@ void ImpEditEngine::InitDoc(bool bKeepParaAttribs)
 
 GetParaPortions().Reset();
 
-ParaPortion* pIniPortion = new ParaPortion( aEditDoc[0] );
-GetParaPortions().Insert(0, pIniPortion);
+GetParaPortions().Insert(0, o3tl::make_unique( aEditDoc[0] ));
 
 bFormatted = false;
 
@@ -2162,17 +2161,18 @@ EditSelection ImpEditEngine::ImpMoveParagraphs( Range 
aOldPositions, sal_Int32 n
 for (long i = aOldPositions.Min(); i <= aOldPositions.Max(); i++  )
 {
 // always aOldPositions.Min(), since Remove().
-ParaPortion* pTmpPortion = 
GetParaPortions().Release(aOldPositions.Min());
+std::unique_ptr pTmpPortion = 
GetParaPortions().Release(aOldPositions.Min());
 aEditDoc.Release( aOldPositions.Min() );
-aTmpPortionList.Append(pTmpPortion);
+aTmpPortionList.Append(std::move(pTmpPortion));
 }
 
 sal_Int32 nRealNewPos = pDestPortion ? GetParaPortions().GetPos( 
pDestPortion ) : GetParaPortions().Count();
 OSL_ENSURE( nRealNewPos != EE_PARA_NOT_FOUND, "ImpMoveParagraphs: Invalid 
Position!" );
 
-for (sal_Int32 i = 0; i < aTmpPortionList.Count(); ++i)
+sal_Int32 i = 0;
+while( aTmpPortionList.Count() > 0 )
 {
-ParaPortion* pTmpPortion = aTmpPortionList[i];
+std::unique_ptr pTmpPortion = aTmpPortionList.Release(0);
 if ( i == 0 )
 aSelection.Min().SetNode( pTmpPortion->GetNode() );
 
@@ -2182,7 +2182,8 @@ EditSelection ImpEditEngine::ImpMoveParagraphs( Range 
aOldPositions, sal_Int32 n
 ContentNode* pN = pTmpPortion->GetNode();
 aEditDoc.Insert(nRealNewPos+i, pN);
 
-GetParaPortions().Insert(nRealNewPos+i, pTmpPortion);
+GetParaPortions().Insert(nRealNewPos+i, std::mo

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

2018-10-08 Thread Libreoffice Gerrit user
 include/svx/svdundo.hxx|8 +-
 sc/source/core/data/drwlayer.cxx   |2 
 sc/source/ui/view/drawvie4.cxx |4 -
 sd/source/ui/view/sdview.cxx   |   11 +--
 slideshow/source/engine/animationfactory.cxx   |4 -
 slideshow/source/engine/animationnodes/animationbasenode.hxx   |4 -
 slideshow/source/engine/expressionnodefactory.cxx  |2 
 slideshow/source/engine/opengl/Operation.hxx   |   34 
+-
 slideshow/source/engine/opengl/TransitionerImpl.cxx|6 -
 slideshow/source/engine/rehearsetimingsactivity.cxx|2 
 slideshow/source/engine/shapes/drawinglayeranimation.cxx   |   14 ++--
 slideshow/source/engine/shapes/drawshapesubsetting.cxx |6 -
 slideshow/source/engine/shapes/externalshapebase.hxx   |2 
 slideshow/source/engine/shapes/gdimtftools.hxx |4 -
 slideshow/source/engine/shapes/intrinsicanimationactivity.cxx  |4 -
 slideshow/source/engine/shapes/viewappletshape.hxx |2 
 slideshow/source/engine/shapes/viewbackgroundshape.hxx |2 
 slideshow/source/engine/shapes/viewmediashape.hxx  |2 
 slideshow/source/engine/shapes/viewshape.hxx   |2 
 slideshow/source/engine/slide/layer.hxx|2 
 slideshow/source/engine/slide/layermanager.cxx |2 
 slideshow/source/engine/slide/layermanager.hxx |2 
 slideshow/source/engine/slide/slideanimations.hxx  |2 
 slideshow/source/engine/slide/slideimpl.cxx|2 
 slideshow/source/engine/slide/targetpropertiescreator.cxx  |4 -
 slideshow/source/engine/slideshowimpl.cxx  |2 
 slideshow/source/engine/smilfunctionparser.cxx |2 
 slideshow/source/engine/transitions/combtransition.hxx |2 
 slideshow/source/engine/transitions/ellipsewipe.hxx|2 
 slideshow/source/engine/transitions/pinwheelwipe.hxx   |2 
 slideshow/source/engine/transitions/randomwipe.hxx |2 
 slideshow/source/engine/transitions/slidetransitionfactory.cxx |6 -
 slideshow/source/engine/transitions/waterfallwipe.hxx  |2 
 slideshow/source/inc/activitiesfactory.hxx |   10 +-
 slideshow/source/inc/animatedsprite.hxx|4 -
 slideshow/source/inc/basenode.hxx  |4 -
 slideshow/source/inc/interruptabledelayevent.hxx   |2 
 slideshow/source/inc/shapeimporter.hxx |2 
 slideshow/source/inc/shapesubset.hxx   |4 -
 slideshow/source/inc/transitioninfo.hxx|   22 +++---
 svx/source/svdraw/svdmodel.cxx |2 
 svx/source/svdraw/svdundo.cxx  |   31 ++---
 42 files changed, 109 insertions(+), 121 deletions(-)

New commits:
commit 56940b766e5d52cb1c17b4250e4c7e2c375b7b65
Author: Noel Grandin 
AuthorDate: Mon Oct 8 10:28:45 2018 +0200
Commit: Noel Grandin 
CommitDate: Tue Oct 9 08:10:11 2018 +0200

loplugin:constfields in slideshow

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

diff --git a/slideshow/source/engine/animationfactory.cxx 
b/slideshow/source/engine/animationfactory.cxx
index 6ce8ee14a2ba..2451a71bb2dd 100644
--- a/slideshow/source/engine/animationfactory.cxx
+++ b/slideshow/source/engine/animationfactory.cxx
@@ -347,7 +347,7 @@ namespace slideshow
 ::basegfx::B2DPointmaShapeOrig;
 const int  mnFlags;
 bool   mbAnimationStarted;
-sal_Int16  mnAdditive;
+sal_Int16 constmnAdditive;
 };
 
 
@@ -625,7 +625,7 @@ namespace slideshow
 }
 
 private:
-double mnScale;
+double const mnScale;
 };
 
 /** Overload for NumberAnimations which need scaling 
(width,height,x,y currently)
diff --git a/slideshow/source/engine/animationnodes/animationbasenode.hxx 
b/slideshow/source/engine/animationnodes/animationbasenode.hxx
index 84b3d5a82b5e..d8bbb09d8527 100644
--- a/slideshow/source/engine/animationnodes/animationbasenode.hxx
+++ b/slideshow/source/engine/animationnodes/animationbasenode.hxx
@@ -79,14 +79,14 @@ private:
 private:
 css::uno::Reference  mxAnimateNode;
 ShapeAttributeLayerHolder   maAttributeLayerHolder;
-::basegfx::B2DVectormaSlideSize;
+::basegfx::B2DVector

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

2018-10-08 Thread Libreoffice Gerrit user
 vcl/qt5/Qt5AccessibleWidget.cxx |4 ++--
 vcl/qt5/Qt5Font.cxx |3 +++
 2 files changed, 5 insertions(+), 2 deletions(-)

New commits:
commit b8835ad978b1295a01105c587e601163cd9ff725
Author: Jan-Marek Glogowski 
AuthorDate: Mon Oct 8 18:03:47 2018 +
Commit: Jan-Marek Glogowski 
CommitDate: Tue Oct 9 07:32:46 2018 +0200

Qt5: fix build with Qt 5.11

And while at it annotate Qt5Font fall-throughs.

Change-Id: I31a73407f3228f303236983df17c66bc88eef6c5
Reviewed-on: https://gerrit.libreoffice.org/61557
Tested-by: Jenkins
Tested-by: Rene Engelhard 
Reviewed-by: Jan-Marek Glogowski 

diff --git a/vcl/qt5/Qt5AccessibleWidget.cxx b/vcl/qt5/Qt5AccessibleWidget.cxx
index be3480aa3f77..748dda66f625 100644
--- a/vcl/qt5/Qt5AccessibleWidget.cxx
+++ b/vcl/qt5/Qt5AccessibleWidget.cxx
@@ -116,8 +116,8 @@ void 
lcl_appendRelation(QVector xAccessible(aRelation.TargetSet[i], 
uno::UNO_QUERY);
-relations->append(QPair(
-QAccessible::queryAccessibleInterface(new 
Qt5XAccessible(xAccessible)), aQRelation));
+relations->append(
+{ QAccessible::queryAccessibleInterface(new 
Qt5XAccessible(xAccessible)), aQRelation });
 }
 }
 }
diff --git a/vcl/qt5/Qt5Font.cxx b/vcl/qt5/Qt5Font.cxx
index 60287d9a6093..de4d10fdf13b 100644
--- a/vcl/qt5/Qt5Font.cxx
+++ b/vcl/qt5/Qt5Font.cxx
@@ -35,8 +35,11 @@ static QFont::Weight GetQFontWeight(FontWeight eWeight)
 return QFont::Light;
 case FontWeight_FORCE_EQUAL_SIZE:
 assert(false && "FontWeight_FORCE_EQUAL_SIZE not implementable for 
QFont");
+SAL_FALLTHROUGH;
 case WEIGHT_SEMILIGHT:
+SAL_FALLTHROUGH;
 case WEIGHT_DONTKNOW:
+SAL_FALLTHROUGH;
 case WEIGHT_NORMAL:
 return QFont::Normal;
 case WEIGHT_MEDIUM:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-08 Thread Libreoffice Gerrit user
 cppcanvas/source/mtfrenderer/textaction.cxx |   39 +---
 1 file changed, 30 insertions(+), 9 deletions(-)

New commits:
commit 800c60524d25dfde71240fe3c1533e17f6749daa
Author: Mark Hung 
AuthorDate: Sat Oct 6 00:46:14 2018 +0800
Commit: Mark Hung 
CommitDate: Tue Oct 9 01:28:19 2018 +0200

tdf#55361 adjust leftmost position for RTL text while animation.

Set the leftmost position correctly based on logical advancement
values of XTextLayout to render the substring of a RTL text.

Change-Id: Ib65b433105274f6ebfd251e92d831f1b28516294
Reviewed-on: https://gerrit.libreoffice.org/61459
Tested-by: Jenkins
Reviewed-by: Mark Hung 

diff --git a/cppcanvas/source/mtfrenderer/textaction.cxx 
b/cppcanvas/source/mtfrenderer/textaction.cxx
index 9d9d9d76f2b0..76bccef0ba8a 100644
--- a/cppcanvas/source/mtfrenderer/textaction.cxx
+++ b/cppcanvas/source/mtfrenderer/textaction.cxx
@@ -229,6 +229,7 @@ namespace cppcanvas
  */
 void initArrayAction( rendering::RenderState&   
o_rRenderState,
   uno::Reference< rendering::XTextLayout >& 
o_rTextLayout,
+  double&   
nLayoutWidth,
   const ::basegfx::B2DPoint&
rStartPoint,
   const OUString&rText,
   sal_Int32 
nStartPos,
@@ -260,6 +261,9 @@ namespace cppcanvas
   "::cppcanvas::internal::initArrayAction(): 
Invalid font" );
 
 o_rTextLayout->applyLogicalAdvancements( rOffsets );
+
+const double* pOffsets(rOffsets.getConstArray());
+nLayoutWidth = *std::max_element(pOffsets, pOffsets + 
rOffsets.getLength());
 }
 
 double getLineWidth( ::VirtualDevice const & rVDev,
@@ -280,6 +284,7 @@ namespace cppcanvas
double& 
 o_rMinPos,
double& 
 o_rMaxPos,
const uno::Reference< 
rendering::XTextLayout >&  rOrigTextLayout,
+   double  
 nLayoutWidth,
const 
::cppcanvas::internal::Action::Subset& rSubset )
 {
 ENSURE_OR_THROW( rSubset.mnSubsetEnd > rSubset.mnSubsetBegin,
@@ -291,12 +296,6 @@ namespace cppcanvas
 ENSURE_OR_THROW( aOrigOffsets.getLength() >= 
rSubset.mnSubsetEnd,
   "::cppcanvas::internal::calcSubsetOffsets(): 
invalid subset range range" );
 
-// TODO(F3): It currently seems that for RTL text, the
-// DX offsets are nevertheless increasing in logical
-// text order (I'd expect they are decreasing,
-// mimicking the fact that the text is output
-// right-to-left). This breaks text effects for ALL
-// RTL languages.
 
 // determine leftmost position in given subset range -
 // as the DX array contains the output positions
@@ -317,6 +316,16 @@ namespace cppcanvas
   0 : 
rSubset.mnSubsetBegin-1),
   pOffsets + rSubset.mnSubsetEnd )) );
 
+// Logical advancements always increase in logical text order.
+// For RTL text, nMaxPos is the distance from the right edge to
+// the leftmost position in the subset, so we have to convert
+// it to the offset from the origin (i.e. left edge ).
+// LTR: | min --->| max --->||
+// RTL: | |<--- max |<--- min ---|
+//  |<- nOffset ->|  |
+const double nOffset = rOrigTextLayout->getMainTextDirection()
+? nLayoutWidth - nMaxPos : nMinPos;
+
 
 // adapt render state, to move text output to given offset
 
@@ -326,18 +335,18 @@ namespace cppcanvas
 // with the output offset. Neglected for now, as it
 // does not matter for drawing layer output
 
-if( rSubset.mnSubsetBegin > 0 )
+if (nOffset > 0.0)
 {
 ::basegfx::B2DHomMatrix aTranslation;
 if( 
rOrigTextLayout->getFont()->getFontRequest().FontDescription.IsVertical == 
css::util::TriState_YES )
 {
 // vertical text -> offset in y direction
-aTranslation.translate( 0.0, nMinPos );
+aTranslation.translate(0.0, nOff

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

2018-10-08 Thread Libreoffice Gerrit user
 canvas/source/directx/dx_textlayout.cxx|3 ++-
 canvas/source/directx/dx_textlayout_drawhelper.cxx |6 --
 canvas/source/directx/dx_textlayout_drawhelper.hxx |3 ++-
 3 files changed, 8 insertions(+), 4 deletions(-)

New commits:
commit d9ad59da50c1172fe98f94370221c9c1b688200a
Author: Mark Hung 
AuthorDate: Sat Oct 6 15:12:29 2018 +0800
Commit: Mark Hung 
CommitDate: Tue Oct 9 01:28:37 2018 +0200

tdf#55361 fix result of showing RTL text in the animation.

Call drawTextArray with SalLayoutFlags::BiDiRTL if the
text direction of a TextLayout is RTL.

Change-Id: I1a3bfaee5521eea77b44350c21c104cbf72fac97
Reviewed-on: https://gerrit.libreoffice.org/61460
Tested-by: Jenkins
Reviewed-by: Mark Hung 

diff --git a/canvas/source/directx/dx_textlayout.cxx 
b/canvas/source/directx/dx_textlayout.cxx
index 16e2dc09129e..ff62ee5e0b80 100644
--- a/canvas/source/directx/dx_textlayout.cxx
+++ b/canvas/source/directx/dx_textlayout.cxx
@@ -207,7 +207,8 @@ namespace dxcanvas
 maLogicalAdvancements,
 mpFont.get(),
 mpFont->getFontMatrix(),
-bAlphaSurface);
+bAlphaSurface,
+mnTextDirection != 0);
 
 return true;
 }
diff --git a/canvas/source/directx/dx_textlayout_drawhelper.cxx 
b/canvas/source/directx/dx_textlayout_drawhelper.cxx
index 3b1246cf15c9..f4d51e9d8d73 100644
--- a/canvas/source/directx/dx_textlayout_drawhelper.cxx
+++ b/canvas/source/directx/dx_textlayout_drawhelper.cxx
@@ -68,7 +68,8 @@ namespace dxcanvas
 const css::uno::Reference<
 css::rendering::XCanvasFont >& rCanvasFont,
 const css::geometry::Matrix2D& rFontMatrix,
-bool   bAlphaSurface )
+bool   bAlphaSurface,
+bool bIsRTL)
 {
 HDC hdc = rGraphics->GetHDC();
 
@@ -209,7 +210,8 @@ namespace dxcanvas
   aText,
   pDXArray.get(),
   rText.StartPosition,
-  rText.Length );
+  rText.Length,
+  bIsRTL ? SalLayoutFlags::BiDiRtl 
: SalLayoutFlags::NONE);
 }
 else
 {
diff --git a/canvas/source/directx/dx_textlayout_drawhelper.hxx 
b/canvas/source/directx/dx_textlayout_drawhelper.hxx
index 4bb82ec7c716..897d7eb1c727 100644
--- a/canvas/source/directx/dx_textlayout_drawhelper.hxx
+++ b/canvas/source/directx/dx_textlayout_drawhelper.hxx
@@ -57,7 +57,8 @@ namespace dxcanvas
const css::uno::Reference<
css::rendering::XCanvasFont >&  rCanvasFont,
const css::geometry::Matrix2D&  rFontMatrix,
-   bool 
bAlphaSurface );
+   bool 
bAlphaSurface,
+   bool bIsRTL);
 
 css::geometry::RealRectangle2D queryTextBounds(
 const css::rendering::StringContext&   rText,
___
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-08 Thread Libreoffice Gerrit user
 sw/source/uibase/utlui/navipi.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit 7645bd0adf4f4e8845ecb7bcb814aa2a0537bff3
Author: Jim Raykowski 
AuthorDate: Sat Sep 22 11:25:31 2018 -0800
Commit: Jim Raykowski 
CommitDate: Mon Oct 8 23:17:37 2018 +0200

tdf#120061 Enable Navigator multiple headings selection

...on document reopening when Navigator window was previously in
Headings/Outline Content Navigation View mode

Change-Id: I169df15e81c4e9acf24c0e76d7f720af598c5b93
Reviewed-on: https://gerrit.libreoffice.org/60910
Tested-by: Jenkins
Reviewed-by: Jim Raykowski 

diff --git a/sw/source/uibase/utlui/navipi.cxx 
b/sw/source/uibase/utlui/navipi.cxx
index 14dae916f7d2..0a59be1f9bb1 100644
--- a/sw/source/uibase/utlui/navipi.cxx
+++ b/sw/source/uibase/utlui/navipi.cxx
@@ -1241,6 +1241,13 @@ SwNavigationChild::SwNavigationChild( vcl::Window* 
pParent,
 {
 pNavi->m_aContentTree->SetRootType(nRootType);
 
pNavi->m_aContentToolBox->CheckItem(pNavi->m_aContentToolBox->GetItemId("root"));
+if (nRootType == ContentTypeId::OUTLINE)
+{
+pNavi->m_aContentTree->SetSelectionMode(SelectionMode::Multiple);
+pNavi->m_aContentTree->SetDragDropMode(DragDropMode::CTRL_MOVE |
+   DragDropMode::CTRL_COPY |
+   DragDropMode::ENABLE_TOP);
+}
 }
 pNavi->m_aContentTree->SetOutlineLevel( static_cast< sal_uInt8 >( 
pNaviConfig->GetOutlineLevel() ) );
 pNavi->SetRegionDropMode( pNaviConfig->GetRegionMode() );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: problems with LayerTabBar in unit tests

2018-10-08 Thread Markus Mohrhard
Hello Regina,

On Mon, Oct 8, 2018 at 7:54 PM Regina Henschel 
wrote:

> Hi all,
>
> does no one has an idea? I have put the problem as patch to Gerrit
> https://gerrit.libreoffice.org/61545. Perhaps my problem is easier
> understandable then.
>
> Problem: If I use the "Load"-method, I get the document loaded, but only
> the center pane has the correct size. All other window sizes have
> suspicious values. Especially the LayerTabBar has width 0, and therefore
> a click on it is not possible. But that would be needed for the unit test.
>

Many of the unit tests actually don't include any parts of the UI. So, they
are usually useless for testing that anything in the UI actually works. For
some tests you can work around it by hooking into the corresponding shell
but you will need to inspect the code and the setup of the test (e.g. your
test does not link against libsdui) to check if that is possible. I think
not many people can easily help you there for impress and draw code.

Regards,
Markus

>
> How to get the correct window sizes?
>
> Kind regards
> Regina
>
>
> Regina Henschel schrieb am 04-Oct-18 um 14:42:
> > Hi all,
> >
> > I'm still working on a unit test for bug tdf#119956. My current state
> > is, that the odg test document really opens in Draw. [On master it opens
> > in Impress.] But the layer tab bar has width 0. So simulating a click on
> > the layer tab bar is not possible, which is needed in case of bug
> > tdf#119956.
> >
> > Which layers are shown in the layer tab bar is calculated in
> > DrawViewShell::ResetActualLayer() in sd/source/ui/view/drviews1.cxx and
> > the actual width is calculated in TabBar::ImplFormat() in
> > svtools/source/control/tabbar.cxx. Please correct me, if I'm wrong about
> > this.
> >
> > So my questions are:
> >
> > What makes the method SdMiscTest::Load from misc-tests.cxx in sd/qa/unit
> > different from regular opening the file from a running LibreOffice via
> > click on Open button of the start center?
> >
> > How can I open the test file in a unit test the same way as a regular
> > Open does?
> >
> > Or what do I need to add/change in the SdMiscTest::Load method to get
> > the layer tab bar in the correct width?
> >
> > Any ideas or tips?
> >
> > Kind regards
> > Regina
> > ___
> > LibreOffice mailing list
> > LibreOffice@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/libreoffice
>
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/libreoffice
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2018-10-08 Thread Libreoffice Gerrit user
 sc/source/core/data/markarr.cxx |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit bc9385c71e780f4dca5c54b8e817faae43c30d18
Author: Jochen Nitschke 
AuthorDate: Mon Oct 8 18:02:30 2018 +0200
Commit: Jochen Nitschke 
CommitDate: Mon Oct 8 20:45:08 2018 +0200

cppcheck: variableScope and fix index types

Change-Id: I045b4d84e0ad07a98523b91fc7203bfd422b3529
Reviewed-on: https://gerrit.libreoffice.org/61541
Reviewed-by: Noel Grandin 
Tested-by: Jenkins
Reviewed-by: Jochen Nitschke 

diff --git a/sc/source/core/data/markarr.cxx b/sc/source/core/data/markarr.cxx
index f9c5fdc3299a..7bdff0fcf989 100644
--- a/sc/source/core/data/markarr.cxx
+++ b/sc/source/core/data/markarr.cxx
@@ -63,13 +63,13 @@ bool ScMarkArray::Search( SCROW nRow, SCSIZE& nIndex ) const
 {
 if (pData)
 {
-longnHi = static_cast(nCount) - 1;
-longi   = 0;
-longnLo = 0;
+assert(nCount > 0);
+SCSIZEnHi = nCount - 1;
+SCSIZEnLo = 0;
 
 while ( nLo <= nHi )
 {
-i = (nLo + nHi) / 2;
+SCSIZE i = (nLo + nHi) / 2;
 
 if (pData[i].nRow < nRow)
 {
@@ -84,7 +84,7 @@ bool ScMarkArray::Search( SCROW nRow, SCSIZE& nIndex ) const
 else
 {
 // found
-nIndex=static_cast(i);
+nIndex=i;
 return true;
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: problems with LayerTabBar in unit tests

2018-10-08 Thread Regina Henschel

Hi all,

does no one has an idea? I have put the problem as patch to Gerrit 
https://gerrit.libreoffice.org/61545. Perhaps my problem is easier 
understandable then.


Problem: If I use the "Load"-method, I get the document loaded, but only 
the center pane has the correct size. All other window sizes have 
suspicious values. Especially the LayerTabBar has width 0, and therefore 
a click on it is not possible. But that would be needed for the unit test.


How to get the correct window sizes?

Kind regards
Regina


Regina Henschel schrieb am 04-Oct-18 um 14:42:

Hi all,

I'm still working on a unit test for bug tdf#119956. My current state
is, that the odg test document really opens in Draw. [On master it opens
in Impress.] But the layer tab bar has width 0. So simulating a click on
the layer tab bar is not possible, which is needed in case of bug
tdf#119956.

Which layers are shown in the layer tab bar is calculated in
DrawViewShell::ResetActualLayer() in sd/source/ui/view/drviews1.cxx and
the actual width is calculated in TabBar::ImplFormat() in
svtools/source/control/tabbar.cxx. Please correct me, if I'm wrong about
this.

So my questions are:

What makes the method SdMiscTest::Load from misc-tests.cxx in sd/qa/unit
different from regular opening the file from a running LibreOffice via
click on Open button of the start center?

How can I open the test file in a unit test the same way as a regular
Open does?

Or what do I need to add/change in the SdMiscTest::Load method to get
the layer tab bar in the correct width?

Any ideas or tips?

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


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


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

2018-10-08 Thread Libreoffice Gerrit user
 scripting/source/basprov/basprov.cxx   |   22 ++---
 scripting/source/dlgprov/dlgprov.cxx   |   14 ++---
 scripting/source/stringresource/stringresource.cxx |   14 ++---
 sfx2/source/doc/objxtor.cxx|   14 +
 4 files changed, 15 insertions(+), 49 deletions(-)

New commits:
commit 9ed8a1bfffd608b31badeae5341ebf0b48501419
Author: Jochen Nitschke 
AuthorDate: Mon Oct 8 16:32:04 2018 +0200
Commit: Noel Grandin 
CommitDate: Mon Oct 8 19:51:24 2018 +0200

replace double-checked locking patterns with thread safe ...

local statics.

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

diff --git a/scripting/source/basprov/basprov.cxx 
b/scripting/source/basprov/basprov.cxx
index 6180fa333627..ce71c003d75d 100644
--- a/scripting/source/basprov/basprov.cxx
+++ b/scripting/source/basprov/basprov.cxx
@@ -76,21 +76,13 @@ namespace basprov
 
 static Sequence< OUString > getSupportedServiceNames_BasicProviderImpl()
 {
-static Sequence< OUString >* pNames = nullptr;
-if ( !pNames )
-{
-::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
-if ( !pNames )
-{
-static Sequence< OUString > aNames(4);
-aNames.getArray()[0] = 
"com.sun.star.script.provider.ScriptProviderForBasic";
-aNames.getArray()[1] = 
"com.sun.star.script.provider.LanguageScriptProvider";
-aNames.getArray()[2] = 
"com.sun.star.script.provider.ScriptProvider";
-aNames.getArray()[3] = "com.sun.star.script.browse.BrowseNode";
-pNames = &aNames;
-}
-}
-return *pNames;
+static Sequence< OUString > s_Names{
+"com.sun.star.script.provider.ScriptProviderForBasic",
+"com.sun.star.script.provider.LanguageScriptProvider",
+"com.sun.star.script.provider.ScriptProvider",
+"com.sun.star.script.browse.BrowseNode"};
+
+return s_Names;
 }
 
 
diff --git a/scripting/source/dlgprov/dlgprov.cxx 
b/scripting/source/dlgprov/dlgprov.cxx
index 90a28cca56fd..4f979ee54308 100644
--- a/scripting/source/dlgprov/dlgprov.cxx
+++ b/scripting/source/dlgprov/dlgprov.cxx
@@ -177,17 +177,9 @@ namespace dlgprov
 
 ::osl::Mutex& getMutex()
 {
-static ::osl::Mutex* s_pMutex = nullptr;
-if ( !s_pMutex )
-{
-::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
-if ( !s_pMutex )
-{
-static ::osl::Mutex s_aMutex;
-s_pMutex = &s_aMutex;
-}
-}
-return *s_pMutex;
+static ::osl::Mutex s_aMutex;
+
+return s_aMutex;
 }
 
 
diff --git a/scripting/source/stringresource/stringresource.cxx 
b/scripting/source/stringresource/stringresource.cxx
index a17977536056..9e29229e13e0 100644
--- a/scripting/source/stringresource/stringresource.cxx
+++ b/scripting/source/stringresource/stringresource.cxx
@@ -62,17 +62,9 @@ namespace stringresource
 
 ::osl::Mutex& getMutex()
 {
-static ::osl::Mutex* s_pMutex = nullptr;
-if ( !s_pMutex )
-{
-::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
-if ( !s_pMutex )
-{
-static ::osl::Mutex s_aMutex;
-s_pMutex = &s_aMutex;
-}
-}
-return *s_pMutex;
+static ::osl::Mutex s_aMutex;
+
+return s_aMutex;
 }
 
 
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index 8eef03e8d5cc..a03e3b7ddd95 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -838,19 +838,9 @@ SfxObjectShell* SfxObjectShell::GetObjectShell()
 
 uno::Sequence< OUString > SfxObjectShell::GetEventNames()
 {
-static uno::Sequence< OUString >* pEventNameContainer = nullptr;
+static uno::Sequence< OUString > 
s_EventNameContainer(rtl::Reference(new 
GlobalEventConfig)->getElementNames());
 
-if ( !pEventNameContainer )
-{
-SolarMutexGuard aGuard;
-if ( !pEventNameContainer )
-{
-static uno::Sequence< OUString > aEventNameContainer = 
rtl::Reference(new GlobalEventConfig)->getElementNames();
-pEventNameContainer = &aEventNameContainer;
-}
-}
-
-return *pEventNameContainer;
+return s_EventNameContainer;
 }
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


DocumentView$1.class not generated with OpenJDK 11

2018-10-08 Thread Olivier Tilloy
Last week it was pointed out to me that some libreoffice automated
tests being run on the Ubuntu packages (autopkgtests) broke with
OpenJDK 11. All the details can be found at
https://launchpad.net/bugs/1796361.

I managed to pinpoint the failure to a missing DocumentView$1.class ¹.
When run against OpenJDK 10 (version 10.0.2+13-1ubuntu1), that file is
generated. When run against OpenJDK 11 (version 11~28-3ubuntu1), that
file is not generated any longer. It doesn't seem to be needed anyway,
as the test runs successfully with both versions of OpenJDK when
removing that reference in the makefile.
I'm not fluent in Java so I may be missing something, but it looks to
me like this reference to DocumentView$1.class could be safely removed
in all cases (see my shallow analysis in the launchpad bug report)?
Input from Java experts much appreciated!

Cheers,

 Olivier

¹ 
https://github.com/LibreOffice/core/blob/master/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/Makefile#L69
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2018-10-08 Thread Libreoffice Gerrit user
 sw/qa/extras/ooxmlexport/data/tdf58944-repeating-table-header.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport11.cxx |   17 
+++
 writerfilter/source/dmapper/DomainMapperTableManager.cxx   |   22 
+-
 3 files changed, 37 insertions(+), 2 deletions(-)

New commits:
commit 110781a3a27dffe9e6690839bdce993796a08331
Author: László Németh 
AuthorDate: Tue Sep 18 14:43:31 2018 +0200
Commit: László Németh 
CommitDate: Mon Oct 8 19:04:43 2018 +0200

tdf#58944 DOCX import: workaround for hidden table headers

Repeating table headers consisted of more than 10 table rows
switch off table header repetition during DOCX table import
to fix non-visible table content and broken tables.

Repeating header lines are not visible in MSO, if there is no space for 
them.
OOXML (and ODF) standards don't specify this exception, and unfortunately,
it's easy to create tables with invisible repeating headers in MSO, 
resulting
OOXML files with non-standardized layout. To show the same or a similar 
layout
in LibreOffice (instead of a broken table with invisible content), we use a
reasonable 10-row limit to apply header repetition, as a workaround.
Later it's still possible to switch on header repetition or create a
better compatible repeating table header in Writer for (pretty unlikely) 
tables
with really repeating headers consisted of more than 10 table rows.

Note: This workaround could help to create standard and more portable OOXML
files in a mixed environment.

Change-Id: I17fbc0173ec1c4f188a46227b99dde5726530da3
Reviewed-on: https://gerrit.libreoffice.org/60689
Tested-by: Jenkins
Reviewed-by: László Németh 

diff --git a/sw/qa/extras/ooxmlexport/data/tdf58944-repeating-table-header.docx 
b/sw/qa/extras/ooxmlexport/data/tdf58944-repeating-table-header.docx
new file mode 100644
index ..56e37362adf7
Binary files /dev/null and 
b/sw/qa/extras/ooxmlexport/data/tdf58944-repeating-table-header.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index dd9a6c8ceb12..2f665ad620e5 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -798,6 +798,23 @@ DECLARE_OOXMLEXPORT_TEST(testLOPresetDashesConvert, 
"lo_preset_dashes.odt")
 assertXPath(pXmlDoc, 
"/w:document/w:body/w:p/w:r/mc:AlternateContent[10]/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:ln/a:prstDash",
 "val", "sysDash");
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf58944RepeatingTableHeader, 
"tdf58944-repeating-table-header.docx")
+{
+// DOCX tables with more than 10 repeating header lines imported without 
repeating header lines
+// as a workaround for MSO's limitation of header line repetition
+xmlDocPtr pDump = parseLayoutDump();
+CPPUNIT_ASSERT_EQUAL(2, getPages());
+
+// table starts on page 1 and finished on page 2
+// instead of showing only a part of it on page 2
+assertXPath(pDump, "/root/page[1]/body/tab", 1);
+assertXPath(pDump, "/root/page[1]/body/tab/row", 11);
+CPPUNIT_ASSERT_EQUAL(OUString("Test1"),
+ 
parseDump("/root/page[2]/body/tab/row[1]/cell[1]/txt/text()"));
+CPPUNIT_ASSERT_EQUAL(OUString("Test2"),
+ 
parseDump("/root/page[2]/body/tab/row[2]/cell[1]/txt/text()"));
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx 
b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
index f76f28dcac1f..962f7130e6f9 100644
--- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
@@ -203,9 +203,27 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm)
 // to prevent later rows from increasing the repeating 
m_nHeaderRepeat is set to NULL when repeating stops
 if( nIntValue > 0 && m_nHeaderRepeat == 
static_cast(m_nRow) )
 {
-++m_nHeaderRepeat;
 TablePropertyMapPtr pPropMap( new TablePropertyMap );
-pPropMap->Insert( PROP_HEADER_ROW_COUNT, uno::makeAny( 
m_nHeaderRepeat ));
+
+// Repeating header lines are not visible in MSO, if there 
is no space for them.
+// OOXML (and ODF) standards don't specify this exception, 
and unfortunately,
+// it's easy to create tables with invisible repeating 
headers in MSO, resulting
+// OOXML files with non-standardized layout. To show the 
same or a similar layout
+// in LibreOffice (instead of a broken table with 
invisible content), we use a
+// reasonable 10-row limit to apply header repetition, as 
a workaround.
+// Later it's still po

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

2018-10-08 Thread Libreoffice Gerrit user
 unoxml/source/rdf/librdf_repository.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 260701270abc7997996625449cd3d40f8b4f7f49
Author: Stephan Bergmann 
AuthorDate: Mon Oct 8 18:29:02 2018 +0200
Commit: Stephan Bergmann 
CommitDate: Mon Oct 8 18:29:02 2018 +0200

Missing include

Change-Id: I5cb4fad28312e3ab28f26d7e12169d6db25e3758

diff --git a/unoxml/source/rdf/librdf_repository.cxx 
b/unoxml/source/rdf/librdf_repository.cxx
index b4e6e266cd2c..995c3034d02f 100644
--- a/unoxml/source/rdf/librdf_repository.cxx
+++ b/unoxml/source/rdf/librdf_repository.cxx
@@ -53,6 +53,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-08 Thread Libreoffice Gerrit user
 sfx2/source/view/viewfrm.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit ec235750bb30c3b66bd8b642f6abd1f9ea8244df
Author: Mike Kaganski 
AuthorDate: Fri Oct 5 18:43:49 2018 +0200
Commit: Mike Kaganski 
CommitDate: Mon Oct 8 18:11:34 2018 +0200

tdf#120271 related: Allow finalizing of LastTimeGetInvolvedShown

This avoids abort() on modifying the setting in case it's finalized

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

diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index da991c1ee635..3728917d95fc 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -1237,7 +1237,8 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const 
SfxHint& rHint )
 pInfoBar->addButton(xGetInvolvedButton);
 }
 
-if (bUpdateLastTimeGetInvolvedShown)
+if (bUpdateLastTimeGetInvolvedShown
+&& 
!officecfg::Setup::Product::LastTimeGetInvolvedShown::isReadOnly())
 {
 std::shared_ptr 
batch(comphelper::ConfigurationChanges::create());
 
officecfg::Setup::Product::LastTimeGetInvolvedShown::set(nNow, batch);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-08 Thread Libreoffice Gerrit user
 desktop/source/lib/init.cxx |   50 ++--
 1 file changed, 26 insertions(+), 24 deletions(-)

New commits:
commit 6fed64c36c4a198d960e22a8489dbade512be575
Author: Ashod Nakashian 
AuthorDate: Fri Jul 6 16:49:29 2018 -0400
Commit: Jan Holesovsky 
CommitDate: Mon Oct 8 17:31:03 2018 +0200

desktop: move font initialization into preloadData

Reviewed-on: https://gerrit.libreoffice.org/57160
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 
(cherry picked from commit bbba0902fc1f1c6bb2a7f1e6ff2b682e2fbd3cc9)

Change-Id: I66840512b45e987cc7b08b07b65bdb24f2023a41

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index a5b79d6ec840..eef796ce91a0 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3815,9 +3815,35 @@ static void preloadData()
 images.getImageUrl("forcefed.png", "style", "FO_oo");
 
 std::cerr << "Preload languages\n";
+
 // force load language singleton
 SvtLanguageTable::HasLanguageType(LANGUAGE_SYSTEM);
 (void)LanguageTag::isValidBcp47("foo", nullptr);
+
+std::cerr << "Preload fonts\n";
+
+// Initialize fonts.
+css::uno::Reference xLangSrv = 
css::linguistic2::LinguServiceManager::create(xContext);
+if (xLangSrv.is())
+{
+css::uno::Reference 
xSpell(xLangSrv->getSpellChecker(), css::uno::UNO_QUERY);
+css::uno::Reference 
xLocales(xSpell, css::uno::UNO_QUERY);
+if (xLocales.is())
+aLocales = xLocales->getLocales();
+}
+
+for (const auto& aLocale : aLocales)
+{
+//TODO: Add more types and cache more aggessively. For now this 
initializes the fontcache.
+using namespace ::com::sun::star::i18n::ScriptType;
+LanguageType nLang;
+nLang = 
MsLangId::resolveSystemLanguageByScriptType(LanguageTag::convertToLanguageType(aLocale,
 false), LATIN);
+OutputDevice::GetDefaultFont(DefaultFontType::LATIN_SPREADSHEET, 
nLang, GetDefaultFontFlags::OnlyOne);
+nLang = 
MsLangId::resolveSystemLanguageByScriptType(LanguageTag::convertToLanguageType(aLocale,
 false), ASIAN);
+OutputDevice::GetDefaultFont(DefaultFontType::CJK_SPREADSHEET, nLang, 
GetDefaultFontFlags::OnlyOne);
+nLang = 
MsLangId::resolveSystemLanguageByScriptType(LanguageTag::convertToLanguageType(aLocale,
 false), COMPLEX);
+OutputDevice::GetDefaultFont(DefaultFontType::CTL_SPREADSHEET, nLang, 
GetDefaultFontFlags::OnlyOne);
+}
 }
 
 static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const 
char* pUserProfileUrl)
@@ -3987,30 +4013,6 @@ static int lo_initialize(LibreOfficeKit* pThis, const 
char* pAppPath, const char
 
 preloadData();
 
-// Initialize fonts.
-css::uno::Sequence< css::lang::Locale > aLocales;
-css::uno::Reference 
xLangSrv = css::linguistic2::LinguServiceManager::create(xContext);
-if (xLangSrv.is())
-{
-css::uno::Reference 
xSpell(xLangSrv->getSpellChecker(), css::uno::UNO_QUERY);
-css::uno::Reference 
xLocales(xSpell, css::uno::UNO_QUERY);
-if (xLocales.is())
-aLocales = xLocales->getLocales();
-}
-
-for (const auto& aLocale : aLocales)
-{
-//TODO: Add more types and cache more aggessively. For now 
this initializes the fontcache.
-using namespace ::com::sun::star::i18n::ScriptType;
-LanguageType nLang;
-nLang = 
MsLangId::resolveSystemLanguageByScriptType(LanguageTag::convertToLanguageType(aLocale,
 false), LATIN);
-
OutputDevice::GetDefaultFont(DefaultFontType::LATIN_SPREADSHEET, nLang, 
GetDefaultFontFlags::OnlyOne);
-nLang = 
MsLangId::resolveSystemLanguageByScriptType(LanguageTag::convertToLanguageType(aLocale,
 false), ASIAN);
-
OutputDevice::GetDefaultFont(DefaultFontType::CJK_SPREADSHEET, nLang, 
GetDefaultFontFlags::OnlyOne);
-nLang = 
MsLangId::resolveSystemLanguageByScriptType(LanguageTag::convertToLanguageType(aLocale,
 false), COMPLEX);
-
OutputDevice::GetDefaultFont(DefaultFontType::CTL_SPREADSHEET, nLang, 
GetDefaultFontFlags::OnlyOne);
-}
-
 // Release Solar Mutex, lo_startmain thread should acquire it.
 Application::ReleaseSolarMutex();
 }
commit e93a5993c370203cfd4104803b6976626d1389e1
Author: Aron Budea 
AuthorDate: Fri Jul 6 15:32:49 2018 +0200
Commit: Jan Holesovsky 
CommitDate: Mon Oct 8 17:31:03 2018 +0200

desktop: move dictionary preload before font init

spell-checker is initialized during font init

since e7f65920b12517b31f0c5cbfd0dcb8df96d20ba4

Change-Id: Ia5b5223aa8cc00d0e80451142ae18a7046ad00d4
Re

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

2018-10-08 Thread Libreoffice Gerrit user
 desktop/source/lib/init.cxx |   27 +++
 1 file changed, 27 insertions(+)

New commits:
commit 752494ee759efdf976c44ffd6408a7f861215901
Author: Ashod Nakashian 
AuthorDate: Thu Jun 28 01:07:32 2018 -0400
Commit: Jan Holesovsky 
CommitDate: Mon Oct 8 17:30:07 2018 +0200

desktop: initialize fonts in pre-init

Reviewed-on: https://gerrit.libreoffice.org/56573
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 
(cherry picked from commit e7f65920b12517b31f0c5cbfd0dcb8df96d20ba4)

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

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 477a3feb8180..db92368d6cb0 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -75,6 +75,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -116,6 +117,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -3982,6 +3984,31 @@ static int lo_initialize(LibreOfficeKit* pThis, const 
char* pAppPath, const char
 // Force load some modules
 VclBuilder::preload();
 VclAbstractDialogFactory::Create();
+
+// Initialize fonts.
+css::uno::Sequence< css::lang::Locale > aLocales;
+css::uno::Reference 
xLangSrv = css::linguistic2::LinguServiceManager::create(xContext);
+if (xLangSrv.is())
+{
+css::uno::Reference 
xSpell(xLangSrv->getSpellChecker(), css::uno::UNO_QUERY);
+css::uno::Reference 
xLocales(xSpell, css::uno::UNO_QUERY);
+if (xLocales.is())
+aLocales = xLocales->getLocales();
+}
+
+for (const auto& aLocale : aLocales)
+{
+//TODO: Add more types and cache more aggessively. For now 
this initializes the fontcache.
+using namespace ::com::sun::star::i18n::ScriptType;
+LanguageType nLang;
+nLang = 
MsLangId::resolveSystemLanguageByScriptType(LanguageTag::convertToLanguageType(aLocale,
 false), LATIN);
+
OutputDevice::GetDefaultFont(DefaultFontType::LATIN_SPREADSHEET, nLang, 
GetDefaultFontFlags::OnlyOne);
+nLang = 
MsLangId::resolveSystemLanguageByScriptType(LanguageTag::convertToLanguageType(aLocale,
 false), ASIAN);
+
OutputDevice::GetDefaultFont(DefaultFontType::CJK_SPREADSHEET, nLang, 
GetDefaultFontFlags::OnlyOne);
+nLang = 
MsLangId::resolveSystemLanguageByScriptType(LanguageTag::convertToLanguageType(aLocale,
 false), COMPLEX);
+
OutputDevice::GetDefaultFont(DefaultFontType::CTL_SPREADSHEET, nLang, 
GetDefaultFontFlags::OnlyOne);
+}
+
 preloadData();
 
 // Release Solar Mutex, lo_startmain thread should acquire it.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-08 Thread Libreoffice Gerrit user
 vcl/unx/generic/glyphs/glyphcache.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit b89bf7e197be88ca60c1910835080a26e092dfaa
Author: Jan-Marek Glogowski 
AuthorDate: Mon Oct 8 13:38:32 2018 +
Commit: Jan-Marek Glogowski 
CommitDate: Mon Oct 8 17:29:19 2018 +0200

Run GarbageCollect() for freetype fonts

Restores wrong hunk removed in commit dd36db168c65 ("UNX use font
cache based glyph rect cache"), so we actually run the font
based garbage collect. Just the glyph based one is gone.

Change-Id: I30b4f9987d21764398ac00cf24968aa65aff8fc0
Reviewed-on: https://gerrit.libreoffice.org/61536
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 

diff --git a/vcl/unx/generic/glyphs/glyphcache.cxx 
b/vcl/unx/generic/glyphs/glyphcache.cxx
index c4bf10ac76c0..e1960f36dfb3 100644
--- a/vcl/unx/generic/glyphs/glyphcache.cxx
+++ b/vcl/unx/generic/glyphs/glyphcache.cxx
@@ -196,7 +196,10 @@ FreetypeFont* GlyphCache::CacheFont(LogicalFontInstance* 
pFontInstance)
 void GlyphCache::UncacheFont( FreetypeFont& rFreetypeFont )
 {
 if( (rFreetypeFont.Release() <= 0) && (gnMaxSize <= mnBytesUsed) )
+{
 mpCurrentGCFont = &rFreetypeFont;
+GarbageCollect();
+}
 }
 
 void GlyphCache::GarbageCollect()
___
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' - 5 commits - sw/inc sw/source

2018-10-08 Thread Libreoffice Gerrit user
 sw/inc/fmtinfmt.hxx|5 
 sw/source/core/access/acchyperlink.cxx |   92 +-
 sw/source/core/access/acchyperlink.hxx |   19 +-
 sw/source/core/access/accpara.cxx  |  290 ++---
 sw/source/core/txtnode/fmtatr2.cxx |1 
 5 files changed, 153 insertions(+), 254 deletions(-)

New commits:
commit 44cb02bf24748a5737bc37aa109eb29cd3142672
Author: Michael Stahl 
AuthorDate: Mon Oct 8 15:46:55 2018 +0200
Commit: Michael Stahl 
CommitDate: Mon Oct 8 15:46:55 2018 +0200

sw_redlinehide_3: remove GetSelection/GetSelectionAtIndex duplication

Delicious copypasta!

Change-Id: I95ab5a1ef58b01f775065a970a0d7eb2b6bf6394

diff --git a/sw/source/core/access/accpara.cxx 
b/sw/source/core/access/accpara.cxx
index 73ae937e4c88..57a596742571 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -195,137 +195,6 @@ sal_Int32 SwAccessibleParagraph::GetCaretPos()
 return nRet;
 }
 
-bool SwAccessibleParagraph::GetSelection(
-sal_Int32& nStart, sal_Int32& nEnd)
-{
-bool bRet = false;
-nStart = -1;
-nEnd = -1;
-
-// get the selection, and test whether it affects our text node
-SwPaM* pCursor = GetCursor( true ); // #i27301# - consider adjusted method 
signature
-if( pCursor != nullptr )
-{
-// get SwPosition for my node
-SwTextFrame const*const pFrame(static_cast(GetFrame()));
-sal_uLong nFirstNode(pFrame->GetTextNodeFirst()->GetIndex());
-sal_uLong nLastNode;
-if (sw::MergedPara const*const pMerged = pFrame->GetMergedPara())
-{
-nLastNode = pMerged->pLastNode->GetIndex();
-}
-else
-{
-nLastNode = nFirstNode;
-}
-
-// iterate over ring
-for(SwPaM& rTmpCursor : pCursor->GetRingContainer())
-{
-// ignore, if no mark
-if( rTmpCursor.HasMark() )
-{
-// check whether frame's node(s) are 'inside' pCursor
-SwPosition* pStart = rTmpCursor.Start();
-sal_uLong nStartIndex = pStart->nNode.GetIndex();
-SwPosition* pEnd = rTmpCursor.End();
-sal_uLong nEndIndex = pEnd->nNode.GetIndex();
-if ((nStartIndex <= nLastNode) && (nFirstNode <= nEndIndex))
-{
-// translate start and end positions
-
-// start position
-sal_Int32 nLocalStart = -1;
-if (nStartIndex < nFirstNode)
-{
-// selection starts in previous node:
-// then our local selection starts with the paragraph
-nLocalStart = 0;
-}
-else
-{
-assert(FrameContainsNode(*pFrame, nStartIndex));
-
-// selection starts in this node:
-// then check whether it's before or inside our part of
-// the paragraph, and if so, get the proper position
-const TextFrameIndex nCoreStart =
-pFrame->MapModelToViewPos(*pStart);
-if( nCoreStart <
-GetPortionData().GetFirstValidCorePosition() )
-{
-nLocalStart = 0;
-}
-else if( nCoreStart <=
- GetPortionData().GetLastValidCorePosition() )
-{
-OSL_ENSURE(
-GetPortionData().IsValidCorePosition(
-  nCoreStart ),
- "problem determining valid core position" );
-
-nLocalStart =
-GetPortionData().GetAccessiblePosition(
-  nCoreStart );
-}
-}
-
-// end position
-sal_Int32 nLocalEnd = -1;
-if (nLastNode < nEndIndex)
-{
-// selection ends in following node:
-// then our local selection extends to the end
-nLocalEnd = GetPortionData().GetAccessibleString().
-   getLength();
-}
-else
-{
-assert(FrameContainsNode(*pFrame, nEndIndex));
-
-// selection ends in this node: then select everything
-// before our part of the node
-const TextFrameIndex nCoreEnd =
-pFrame-

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

2018-10-08 Thread Libreoffice Gerrit user
 connectivity/source/drivers/postgresql/pq_statement.cxx |3 +--
 connectivity/source/drivers/postgresql/pq_tools.cxx |2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

New commits:
commit a53e9b1d626a9f973d3bfc93a7d3e9341b0072ad
Author: Jochen Nitschke 
AuthorDate: Mon Oct 8 13:16:41 2018 +0200
Commit: Jochen Nitschke 
CommitDate: Mon Oct 8 17:14:53 2018 +0200

cppcheck: variableScope

Change-Id: I56b06b4c69bdb501535a43780b6a10d5ceb0c7da
Reviewed-on: https://gerrit.libreoffice.org/61524
Tested-by: Jenkins
Reviewed-by: Jochen Nitschke 

diff --git a/connectivity/source/drivers/postgresql/pq_statement.cxx 
b/connectivity/source/drivers/postgresql/pq_statement.cxx
index b50f9008c720..d22e2b7a0433 100644
--- a/connectivity/source/drivers/postgresql/pq_statement.cxx
+++ b/connectivity/source/drivers/postgresql/pq_statement.cxx
@@ -465,7 +465,6 @@ bool executePostgresCommand( const OString & cmd, struct 
CommandData *data )
 // belonging to the primary key are in the result set, allow 
updateable result sets
 // otherwise, don't
 OUString table, schema;
-std::vector< OUString > sourceTableKeys;
 std::vector< OString > vec;
 tokenizeSQL( cmd, vec );
 OUString sourceTable =
@@ -478,7 +477,7 @@ bool executePostgresCommand( const OString & cmd, struct 
CommandData *data )
 OString aReason;
 if( sourceTable.getLength() )
 {
-sourceTableKeys = lookupKeys(
+std::vector< OUString > sourceTableKeys = lookupKeys(
 pSettings->tables.is() ?
pSettings->tables : 
data->tableSupplier->getTables() ,
 sourceTable,
diff --git a/connectivity/source/drivers/postgresql/pq_tools.cxx 
b/connectivity/source/drivers/postgresql/pq_tools.cxx
index ca1211eaa438..fc602926e0ef 100644
--- a/connectivity/source/drivers/postgresql/pq_tools.cxx
+++ b/connectivity/source/drivers/postgresql/pq_tools.cxx
@@ -1084,10 +1084,10 @@ void extractNameValuePairsFromInsert( String2StringMap 
& map, const OString & la
 n +=2;
 }
 
-std::vector< OString > names;
 n ++;
 if( vec[n].equalsIgnoreAsciiCase( "(" ) )
 {
+std::vector< OString> names;
 // printf( "2\n" );
 // extract names
 n++;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: 3 commits - Mobile/Mobile Mobile/Mobile.xcodeproj wsd/DocumentBroker.cpp wsd/LOOLWSD.cpp

2018-10-08 Thread Libreoffice Gerrit user
 Mobile/Mobile.xcodeproj/project.pbxproj |4 
 Mobile/Mobile/Document.mm   |1 +
 wsd/DocumentBroker.cpp  |2 +-
 wsd/LOOLWSD.cpp |   15 ++-
 4 files changed, 16 insertions(+), 6 deletions(-)

New commits:
commit 72f36be50939548cb2f341681fb9204be1486df9
Author: Tor Lillqvist 
AuthorDate: Mon Oct 8 16:25:12 2018 +0300
Commit: Tor Lillqvist 
CommitDate: Mon Oct 8 16:47:15 2018 +0300

Set up the EditFileExtensions set also for the mobile app

Use the same discovery.xml and the ClientRequestDispatcher::
InitStaticFileContentCache() call as in Online, even if as such we
aren't serving any "static files" (like discovery.xml) to a WOPI
server in the mobile app case.

diff --git a/Mobile/Mobile.xcodeproj/project.pbxproj 
b/Mobile/Mobile.xcodeproj/project.pbxproj
index 368083543..ba0ef1ad2 100644
--- a/Mobile/Mobile.xcodeproj/project.pbxproj
+++ b/Mobile/Mobile.xcodeproj/project.pbxproj
@@ -53,6 +53,7 @@
BE8D85D4214055F3009F1860 /* fundamentalrc in Resources */ = 
{isa = PBXBuildFile; fileRef = BE8D85C6214055F3009F1860 /* fundamentalrc */; };
BE8D85D5214055F3009F1860 /* unorc in Resources */ = {isa = 
PBXBuildFile; fileRef = BE8D85C7214055F3009F1860 /* unorc */; };
BE8D85D6214055F3009F1860 /* rc in Resources */ = {isa = 
PBXBuildFile; fileRef = BE8D85C8214055F3009F1860 /* rc */; };
+   BE93D41F216B93D8007A39F4 /* discovery.xml in Resources */ = 
{isa = PBXBuildFile; fileRef = BE93D41E216B93D8007A39F4 /* discovery.xml */; };
BEA2835621467FDD00848631 /* Kit.cpp in Sources */ = {isa = 
PBXBuildFile; fileRef = BEA2835521467FDD00848631 /* Kit.cpp */; };
BEA283582146945500848631 /* ChildSession.cpp in Sources */ = 
{isa = PBXBuildFile; fileRef = BEA283572146945500848631 /* ChildSession.cpp */; 
};
BEA2835A21470A1C00848631 /* WebKit.framework in Frameworks */ = 
{isa = PBXBuildFile; fileRef = BEA2835921470A1C00848631 /* WebKit.framework */; 
};
@@ -116,6 +117,7 @@
BE8D85C6214055F3009F1860 /* fundamentalrc */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = 
fundamentalrc; path = 
"$(LOBUILDDIR)/workdir/CustomTarget/ios/resources/fundamentalrc"; sourceTree = 
""; };
BE8D85C7214055F3009F1860 /* unorc */ = {isa = PBXFileReference; 
fileEncoding = 4; lastKnownFileType = text; name = unorc; path = 
"$(LOBUILDDIR)/workdir/CustomTarget/ios/resources/unorc"; sourceTree = 
""; };
BE8D85C8214055F3009F1860 /* rc */ = {isa = PBXFileReference; 
fileEncoding = 4; lastKnownFileType = text; name = rc; path = 
"$(LOBUILDDIR)/workdir/CustomTarget/ios/resources/rc"; sourceTree = ""; 
};
+   BE93D41E216B93D8007A39F4 /* discovery.xml */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; name = 
discovery.xml; path = ../../../discovery.xml; sourceTree = ""; };
BEA20D5721663BB60032F67B /* salgdiutils.cxx */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = 
salgdiutils.cxx; path = "$(LOSRCDIR)/vcl/quartz/salgdiutils.cxx"; sourceTree = 
""; };
BEA20D5821663BB70032F67B /* ctfonts.cxx */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = ctfonts.cxx; 
path = "$(LOSRCDIR)/vcl/quartz/ctfonts.cxx"; sourceTree = ""; };
BEA20D5921663BB70032F67B /* utils.cxx */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = utils.cxx; 
path = "$(LOSRCDIR)/vcl/quartz/utils.cxx"; sourceTree = ""; };
@@ -251,6 +253,7 @@
BE00F89C21396585001CE2D4 /* loading.html */,
BE00F89D21396585001CE2D4 /* loleaflet-help.html 
*/,
BE00F89621396585001CE2D4 /* loleaflet.html */,
+   BE93D41E216B93D8007A39F4 /* discovery.xml */,
);
path = Resources;
sourceTree = "";
@@ -584,6 +587,7 @@
BE8D85CF214055F3009F1860 /* udkapi.rdb in 
Resources */,
BE8D85D5214055F3009F1860 /* unorc in Resources 
*/,
BE8D85D1214055F3009F1860 /* services.rdb in 
Resources */,
+   BE93D41F216B93D8007A39F4 /* discovery.xml in 
Resources */,
BE00F8A021396585001CE2D4 /* loleaflet.html in 
Resources */,
BE8D85CA214055F3009F1860 /* offapi.rdb in 
Resources */,
BE8D773A2136762600AC58EA /* Assets.xcassets in 
Resources */,
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 49cb8c9f2..223edec5a 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -2554,10 +2554,15 @@ private:
 const std::string urlsrc = "urlsrc";
 const auto& config = Application::in

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

2018-10-08 Thread Libreoffice Gerrit user
 compilerplugins/clang/useuniqueptr.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 5688cd1d9ad4500b82d2668cc5035da5c64acd0e
Author: Stephan Bergmann 
AuthorDate: Mon Oct 8 14:10:17 2018 +0200
Commit: Stephan Bergmann 
CommitDate: Mon Oct 8 16:58:44 2018 +0200

Fix loplugin:useuniqueptr for libc++ (macOS)

...after 05a337e297eb0cfe88c99503d760bd9eaf495b7d "loplugin:useuniqueptr 
look
for deleting in loops with iterators", where it didn't emit the warning for
Foo24 in compilerplugins/clang/test/useuniqueptr.cxx during
CompilerTest_compilerplugins_clang, because in the initialization of

  HTMLAttrs::const_iterator it = m_aSetAttrTab.begin();

the HTMLAttrs::const_iterator CXXConstructExpr happens to have a second,
defaulted argument.

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

diff --git a/compilerplugins/clang/useuniqueptr.cxx 
b/compilerplugins/clang/useuniqueptr.cxx
index c416d4be9ad1..869e368cc318 100644
--- a/compilerplugins/clang/useuniqueptr.cxx
+++ b/compilerplugins/clang/useuniqueptr.cxx
@@ -497,8 +497,11 @@ void UseUniquePtr::CheckLoopDelete(const FunctionDecl* 
functionDecl, const CXXDe
 {
 init = init->IgnoreImplicit();
 if (auto x = dyn_cast(init))
-if (x->getNumArgs() == 1)
+if (x->getNumArgs() == 1
+|| (x->getNumArgs() >= 2 && 
isa(x->getArg(1
+{
 init = x->getArg(0)->IgnoreImplicit();
+}
 if (auto x = dyn_cast(init))
 init = x->getImplicitObjectArgument();
 if ((memberExpr = dyn_cast(init)))
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: emfio/CppunitTest_emfio_wmf_test.mk emfio/qa

2018-10-08 Thread Libreoffice Gerrit user
 emfio/CppunitTest_emfio_wmf_test.mk|  172 -
 emfio/qa/cppunit/wmf/wmfimporttest.cxx |   17 ---
 2 files changed, 6 insertions(+), 183 deletions(-)

New commits:
commit 18c628ae6ef2664db40ef46e21064f3ac4713e5c
Author: Jan-Marek Glogowski 
AuthorDate: Mon Oct 8 10:39:57 2018 +
Commit: Jan-Marek Glogowski 
CommitDate: Mon Oct 8 16:56:47 2018 +0200

Fix emfio_wmf_test VCL dependency

This unit test sometimes fails on Windows with the message:
"no suitable windowing system found, exiting."

Currently the test just depends on desktop_detector and manually
sets up VCL duplicating a lot of code and even library symbols.
The original Gerrit change describes a lot of failures in its
comments (change 28322, version 16). Now that Windows and MacOS
were converted to VCL plugins, depending on desktop_detector is
not sufficient anymore.

This reverts a lot of VCL test setup from commit 20f6a6b159c6
("tdf#99402: fix Metafile Font handling"). Seems now a simple
gb_CppunitTest_use_vcl is enough.

Change-Id: Ia941ded91358231021741ff4a5d96e2014ac6c80
Reviewed-on: https://gerrit.libreoffice.org/61497
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 

diff --git a/emfio/CppunitTest_emfio_wmf_test.mk 
b/emfio/CppunitTest_emfio_wmf_test.mk
index f411022b46e8..ec67bff3a9b4 100644
--- a/emfio/CppunitTest_emfio_wmf_test.mk
+++ b/emfio/CppunitTest_emfio_wmf_test.mk
@@ -17,176 +17,20 @@ $(eval $(call gb_CppunitTest_set_include,emfio_wmf,\
 $(eval $(call gb_CppunitTest_use_externals,emfio_wmf,\
 boost_headers \
 libxml2 \
-$(if $(filter PDFIUM,$(BUILD_TYPE)),pdfium) \
 ))
 
 $(eval $(call gb_CppunitTest_add_exception_objects,emfio_wmf, \
 emfio/qa/cppunit/wmf/wmfimporttest \
 ))
 
-$(eval $(call gb_CppunitTest_use_sdk_api,emfio_wmf))
-
 $(eval $(call gb_CppunitTest_use_libraries,emfio_wmf,\
-$(call gb_Helper_optional,BREAKPAD, \
-   crashreport) \
-basegfx \
-drawinglayer \
-cppu \
-cppuhelper \
-comphelper \
 emfio \
-i18nlangtag \
-i18nutil \
-$(if $(filter OPENCL,$(BUILD_TYPE)),opencl) \
 sal \
-salhelper \
-sot \
-svl \
-svt \
 test \
-test-setupvcl \
 tl \
-ucbhelper \
 unotest \
 vcl \
-utl \
-xmlreader \
-))
-
-$(eval $(call gb_CppunitTest_use_externals,emfio_wmf,\
-$(if $(filter LINUX MACOSX %BSD SOLARIS,$(OS)), \
-curl) \
-libjpeg \
-$(if $(filter-out IOS WNT,$(OS)), \
-nss3 \
-plc4) \
-libeot \
-))
-
-ifeq ($(OS),MACOSX)
-$(eval $(call gb_CppunitTest_add_libs,emfio_wmf,\
--framework IOKit \
--F/System/Library/PrivateFrameworks \
--framework CoreUI \
--lobjc \
-))
-endif
-
-ifeq ($(ENABLE_JAVA),TRUE)
-$(eval $(call gb_CppunitTest_use_libraries,emfio_wmf,\
-jvmaccess \
-))
-endif
-
-$(eval $(call gb_CppunitTest_use_externals,emfio_wmf,\
-gio \
-graphite \
-harfbuzz \
-icuuc \
-lcms2 \
-))
-ifeq ($(DISABLE_GUI),)
-$(eval $(call gb_CppunitTest_use_externals,emfio_wmf,\
- epoxy \
- ))
-endif
-
-ifeq ($(OS),MACOSX)
-$(eval $(call gb_CppunitTest_use_system_darwin_frameworks,emfio_wmf,\
-ApplicationServices \
-))
-$(eval $(call gb_CppunitTest_use_system_darwin_frameworks,emfio_wmf,\
-$(if $(filter X86_64,$(CPUNAME)),,QuickTime) \
-Cocoa \
-Carbon \
-CoreFoundation \
-))
-ifneq ($(ENABLE_MACOSX_SANDBOX),TRUE)
-$(eval $(call gb_CppunitTest_use_libraries,emfio_wmf,\
-AppleRemote \
-))
-endif
-endif
-
-ifeq ($(USING_X11),TRUE)
-$(eval $(call gb_CppunitTest_use_externals,emfio_wmf,\
-cairo \
-cups \
-dbus \
-fontconfig \
-freetype \
-valgrind \
-))
-endif
-
-ifeq ($(DISABLE_GUI),TRUE)
-$(eval $(call gb_CppunitTest_use_externals,emfio_wmf,\
-cairo \
-freetype \
-fontconfig \
-))
-else
-ifeq ($(OS),LINUX)
-$(eval $(call gb_CppunitTest_add_libs,emfio_wmf,\
--lm \
--ldl \
--lpthread \
--lX11 \
-))
-endif
-endif
-
-ifeq ($(OS),ANDROID)
-$(eval $(call gb_CppunitTest_add_libs,emfio_wmf,\
--llog \
--landroid \
--llo-bootstrap \
-))
-$(eval $(call gb_CppunitTest_use_externals,emfio_wmf,\
-cairo \
-fontconfig \
-freetype \
-expat \
-))
-endif
-
-ifeq ($(OS),IOS)
-$(eval $(call gb_CppunitTest_use_system_darwin_frameworks,emfio_wmf,\
-UIKit \
-CoreFoundation \
 ))
-endif
-
-ifeq ($(OS),WNT)
-$(eval $(call gb_CppunitTest_use_system_win32_libs,emfio_wmf,\
-advapi32 \
-crypt32 \
-gdi32 \
-gdiplus \
-imm32 \
-mpr \
-ole32 \
-shell32 \
-usp10 \
-uuid \
-version \
-winspool \
-setupapi \
-shlwapi \
-))
-#$(eval $(call gb_CppunitTest_add_nativeres,emfio,vcl/salsrc))
-endif
-
-ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS)))
-$(eval $(call gb_CppunitTest_add_libs,emfio_wmf,\
--lm $(DLOPEN_LIBS) \
--lpthread \
--lX11 \
--lXext \
-))
-en

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

2018-10-08 Thread Libreoffice Gerrit user
 sc/qa/unit/datatransformation_test.cxx   |  433 ---
 sc/source/ui/dataprovider/datatransformation.cxx |  247 +
 2 files changed, 407 insertions(+), 273 deletions(-)

New commits:
commit 4a00c79aafc6dde331cf4bb351d98226a9337171
Author: Vikas Mahato 
AuthorDate: Tue Aug 21 23:58:58 2018 +0530
Commit: Eike Rathke 
CommitDate: Mon Oct 8 16:39:31 2018 +0200

Added date time transformations - follow-up

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

diff --git a/sc/qa/unit/datatransformation_test.cxx 
b/sc/qa/unit/datatransformation_test.cxx
index 97a8e49c79d8..f1aba85b82bc 100644
--- a/sc/qa/unit/datatransformation_test.cxx
+++ b/sc/qa/unit/datatransformation_test.cxx
@@ -16,7 +16,8 @@
 #include 
 #include 
 #include 
-
+#include 
+#include 
 #include 
 
 class ScDataTransformationTest : public ScBootstrapFixture
@@ -543,269 +544,440 @@ void ScDataTransformationTest::testReplaceNull()
 
 void ScDataTransformationTest::testGetDateString()
 {
-m_pDoc->SetValue(2, 0, 0, 43248.5624189815);
-m_pDoc->SetValue(2, 1, 0, 42941.5624189815);
-m_pDoc->SetValue(2, 2, 0, 42518.5624189815);
+SvNumberFormatter* pFormatter = m_pDoc->GetFormatTable();
+css::util::Date aDate1(25,1,2011);
+css::util::Date aDate2(12,10,1994);
+css::util::Date aDate3(23,9,1996);
+css::util::Date aDate4(15,8,1947);
+
+double nDate1 = static_cast(aDate1 - pFormatter->GetNullDate());
+double nDate2 = static_cast(aDate2 - pFormatter->GetNullDate());
+double nDate3 = static_cast(aDate3 - pFormatter->GetNullDate());
+double nDate4 = static_cast(aDate4 - pFormatter->GetNullDate());
+
+m_pDoc->SetValue(2, 0, 0, nDate1);
+m_pDoc->SetValue(2, 1, 0, nDate2);
+m_pDoc->SetValue(2, 2, 0, nDate3);
+m_pDoc->SetValue(2, 3, 0, nDate4);
 
 sc:: DateTimeTransformation aTransform({2}, 
sc::DATETIME_TRANSFORMATION_TYPE::DATE_STRING   );
 aTransform.Transform(*m_pDoc);
 
-CPPUNIT_ASSERT_EQUAL(OUString("05/28/18"), m_pDoc->GetString(2, 0, 0));
-CPPUNIT_ASSERT_EQUAL(OUString("07/25/17"), m_pDoc->GetString(2, 1, 0));
-CPPUNIT_ASSERT_EQUAL(OUString("05/28/16"), m_pDoc->GetString(2, 2, 0));
+CPPUNIT_ASSERT_EQUAL(OUString("01/25/11"), m_pDoc->GetString(2, 0, 0));
+CPPUNIT_ASSERT_EQUAL(OUString("10/12/94"), m_pDoc->GetString(2, 1, 0));
+CPPUNIT_ASSERT_EQUAL(OUString("09/23/96"), m_pDoc->GetString(2, 2, 0));
+CPPUNIT_ASSERT_EQUAL(OUString("08/15/47"), m_pDoc->GetString(2, 3, 0));
 }
 
 void ScDataTransformationTest::testGetYear()
 {
-m_pDoc->SetValue(2, 0, 0, 20);
-m_pDoc->SetValue(2, 1, 0, 3342.44);
-m_pDoc->SetValue(2, 2, 0, 955.05);
-m_pDoc->SetValue(2, 3, 0, 4890.22);
+SvNumberFormatter* pFormatter = m_pDoc->GetFormatTable();
+css::util::Date aDate1(25,1,2011);
+css::util::Date aDate2(12,10,1994);
+css::util::Date aDate3(23,9,1996);
+css::util::Date aDate4(15,8,1947);
+
+double nDate1 = static_cast(aDate1 - pFormatter->GetNullDate());
+double nDate2 = static_cast(aDate2 - pFormatter->GetNullDate());
+double nDate3 = static_cast(aDate3 - pFormatter->GetNullDate());
+double nDate4 = static_cast(aDate4 - pFormatter->GetNullDate());
+
+m_pDoc->SetValue(2, 0, 0, nDate1);
+m_pDoc->SetValue(2, 1, 0, nDate2);
+m_pDoc->SetValue(2, 2, 0, nDate3);
+m_pDoc->SetValue(2, 3, 0, nDate4);
 
 sc:: DateTimeTransformation aTransform({2}, 
sc::DATETIME_TRANSFORMATION_TYPE::YEAR   );
 aTransform.Transform(*m_pDoc);
 
-CPPUNIT_ASSERT_DOUBLES_EQUAL(1900, m_pDoc->GetValue(2, 0, 0), 0);
-CPPUNIT_ASSERT_DOUBLES_EQUAL(1909, m_pDoc->GetValue(2, 1, 0), 0);
-CPPUNIT_ASSERT_DOUBLES_EQUAL(1902, m_pDoc->GetValue(2, 2, 0), 0);
-CPPUNIT_ASSERT_DOUBLES_EQUAL(1913, m_pDoc->GetValue(2, 3, 0), 0);
+CPPUNIT_ASSERT_DOUBLES_EQUAL(2011, m_pDoc->GetValue(2, 0, 0), 0);
+CPPUNIT_ASSERT_DOUBLES_EQUAL(1994, m_pDoc->GetValue(2, 1, 0), 0);
+CPPUNIT_ASSERT_DOUBLES_EQUAL(1996, m_pDoc->GetValue(2, 2, 0), 0);
+CPPUNIT_ASSERT_DOUBLES_EQUAL(1947, m_pDoc->GetValue(2, 3, 0), 0);
 }
 
 void ScDataTransformationTest::testGetStartOfYear()
 {
-m_pDoc->SetValue(2, 0, 0, 43248.5624189815);
-m_pDoc->SetValue(2, 1, 0, 42941.5624189815);
-m_pDoc->SetValue(2, 2, 0, 42518.5624189815);
-m_pDoc->SetValue(2, 3, 0, 44217.5624189815);
+SvNumberFormatter* pFormatter = m_pDoc->GetFormatTable();
+css::util::Date aDate1(25,1,2011);
+css::util::Date aDate2(12,10,1994);
+css::util::Date aDate3(23,9,1996);
+css::util::Date aDate4(15,8,1947);
+
+double nDate1 = static_cast(aDate1 - pFormatter->GetNullDate());
+double nDate2 = static_cast(aDate2 - pFormatter->GetNullDate());
+double nDate3 = static_cast(aDate3 - pFormatter->GetNullDate());
+double nDate4 = static_cast(aDate4 - pFormatter->GetNullDate());
+
+m_pDoc->SetValue(2, 

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

2018-10-08 Thread Libreoffice Gerrit user
 oox/source/export/drawingml.cxx|   29 +
 sw/qa/extras/ooxmlexport/data/lo_preset_dashes.odt |binary
 sw/qa/extras/ooxmlexport/ooxmlexport11.cxx |   15 ++
 3 files changed, 44 insertions(+)

New commits:
commit 47c3b0390e5ad5a894488c47f014cdd7ecba7d2e
Author: Adam Kovacs 
AuthorDate: Fri Oct 5 08:24:08 2018 -0400
Commit: László Németh 
CommitDate: Mon Oct 8 16:34:31 2018 +0200

tdf#108064 OOXML export: convert LO preset dashes to equivalent MSO presets

Change-Id: I967dfdc6a49cf04d98ea9fa9b57bf4669126a585
Reviewed-on: https://gerrit.libreoffice.org/61417
Tested-by: Jenkins
Reviewed-by: László Németh 

diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 2f67b1fe7420..4eef5ecd2ff1 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -801,6 +801,35 @@ void DrawingML::WriteOutline( const 
Reference& rXPropSet, Referenc
 {
 mpFS->singleElementNS(XML_a, XML_prstDash, XML_val, 
"sysDashDotDot", FSEND);
 }
+/*convert some LO preset dashes to MSO preset dashes for oox 
interoperability
+LO preset dashes which don't have equivalent in MSO preset dashes: 2 
Dots 3 Dashes, Line with Fine Dots, 3 Dashes 3 Dots*/
+//ultrafine Dashed, Ultrafine Dotted -> sysDot
+else if ((aLineDash.Dots == 1 && aLineDash.DotLen == 51 && 
aLineDash.Dashes == 1 && aLineDash.DashLen == 51 && aLineDash.Distance == 51) ||
+ (aLineDash.Dots == 1 && aLineDash.DotLen == 0 && 
aLineDash.Dashes == 0 && aLineDash.DashLen == 0 && aLineDash.Distance == 50))
+{
+mpFS->singleElementNS(XML_a, XML_prstDash, XML_val, "sysDot", 
FSEND);
+}
+//Fine Dashed -> dash
+else if (aLineDash.Dots == 1 && aLineDash.DotLen == 197 && 
aLineDash.Dashes == 0 && aLineDash.DashLen == 0 && aLineDash.Distance == 197)
+{
+mpFS->singleElementNS(XML_a, XML_prstDash, XML_val, "dash", FSEND);
+}
+//Fine Dotted -> dot
+else if (aLineDash.Dots == 1 && aLineDash.DotLen == 0 && 
aLineDash.Dashes == 0 && aLineDash.DashLen == 0 && aLineDash.Distance == 457)
+{
+mpFS->singleElementNS(XML_a, XML_prstDash, XML_val, "dot", FSEND);
+}
+//Line Style 9, Dashed -> sysDash
+else if ((aLineDash.Dots == 1 && aLineDash.DotLen == 197 && 
aLineDash.Dashes == 0 && aLineDash.DashLen == 0 && aLineDash.Distance == 120) ||
+ (aLineDash.Dots == 1 && aLineDash.DotLen == 197 && 
aLineDash.Dashes == 0 && aLineDash.DashLen == 0  && aLineDash.Distance == 127))
+{
+mpFS->singleElementNS(XML_a, XML_prstDash, XML_val, "sysDash", 
FSEND);
+}
+//2 Dots 1 Dash -> sysDashDotDot
+else if (aLineDash.Dots == 2 && aLineDash.DotLen == 0 && 
aLineDash.Dashes == 1 && aLineDash.DashLen == 203 && aLineDash.Distance == 203)
+{
+mpFS->singleElementNS(XML_a, XML_prstDash, XML_val, 
"sysDashDotDot", FSEND);
+}
 else
 {
 mpFS->startElementNS( XML_a, XML_custDash, FSEND );
diff --git a/sw/qa/extras/ooxmlexport/data/lo_preset_dashes.odt 
b/sw/qa/extras/ooxmlexport/data/lo_preset_dashes.odt
new file mode 100755
index ..b9b8a79d46da
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/lo_preset_dashes.odt 
differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index 812ff0c09f45..dd9a6c8ceb12 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -783,6 +783,21 @@ DECLARE_OOXMLEXPORT_TEST(testTdf64264, "tdf64264.docx")
  
parseDump("/root/page[2]/body/tab/row[2]/cell[1]/txt/text()"));
 }
 
+DECLARE_OOXMLEXPORT_TEST(testLOPresetDashesConvert, "lo_preset_dashes.odt")
+{
+// File asserting while saving in LO.
+xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+if (!pXmlDoc)
+return;
+assertXPath(pXmlDoc, 
"/w:document/w:body/w:p/w:r/mc:AlternateContent[1]/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:ln/a:prstDash",
 "val", "sysDot");
+assertXPath(pXmlDoc, 
"/w:document/w:body/w:p/w:r/mc:AlternateContent[2]/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:ln/a:prstDash",
 "val", "sysDash");
+assertXPath(pXmlDoc, 
"/w:document/w:body/w:p/w:r/mc:AlternateContent[3]/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:ln/a:prstDash",
 "val", "sysDot");
+assertXPath(pXmlDoc, 
"/w:document/w:body/w:p/w:r/mc:AlternateContent[6]/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:ln/a:prstDash",
 "val", "dot");
+assertXPath(pXmlDoc, 
"/w:document/w:body/w:p/w:r/mc:AlternateContent[8]/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:ln/a:prstDash",
 "val", "dash");
+ass

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

2018-10-08 Thread Libreoffice Gerrit user
 cui/source/customize/cfgutil.cxx   |   34 -
 include/comphelper/DisableInteractionHelper.hxx|   49 
 scripting/source/provider/MasterScriptProvider.cxx |  126 ++---
 3 files changed, 111 insertions(+), 98 deletions(-)

New commits:
commit f3ce30ec75a4d7116b9cd4d7b21d9aaa0e237eeb
Author: Mike Kaganski 
AuthorDate: Sat Oct 6 17:08:57 2018 +0300
Commit: Mike Kaganski 
CommitDate: Mon Oct 8 16:12:20 2018 +0200

tdf#120363: try to avoid asking user to enable JVM when looking ...

... for a provider for an operation.

When another provider actually handles an operation, it's useless to
ask user to enable disabled JVM just to learn that it doesn't handle
the request. So, this patch does the MasterScriptProvider operations
in two steps: first with "Enable JVM" interaction disabled, and if
failed, again with the interaction enabled to try disabled providers.

This shouldn't typically give performance penalties in case when JVM
is enabled, and when it's disabled and the operation is addressed to
another provider.

A context class designed to disable "Enable JVM" interaction is moved
from cui/source/customize/cfgutil.cxx to a new comphelper header,
which is supposed to hold similar helper context classes in needed.

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

diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index 56d91c1eaf82..fbc07d50f41a 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -47,6 +47,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -65,7 +66,6 @@
 #include 
 #include 
 #include 
-#include 
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -542,36 +542,6 @@ namespace
 }
 }
 
-namespace
-{
-class NoEnableJavaInteractionContext : public 
cppu::WeakImplHelper
-{
-public:
-explicit NoEnableJavaInteractionContext(
-css::uno::Reference const& xContext)
-: mxContext(xContext)
-{
-}
-NoEnableJavaInteractionContext(const NoEnableJavaInteractionContext&) = 
delete;
-NoEnableJavaInteractionContext& operator=(const 
NoEnableJavaInteractionContext&) = delete;
-
-private:
-virtual ~NoEnableJavaInteractionContext() override {}
-
-virtual css::uno::Any SAL_CALL getValueByName(OUString const& Name) 
override
-{
-if (Name == "DontEnableJava")
-return css::uno::Any(true);
-else if (mxContext.is())
-return mxContext->getValueByName(Name);
-else
-return css::uno::Any();
-}
-
-css::uno::Reference mxContext;
-};
-
-} // namespace
 
 void SfxConfigGroupListBox::FillScriptList(const css::uno::Reference< 
css::script::browse::XBrowseNode >& xRootNode,
SvTreeListEntry* pParentEntry, bool 
bCheapChildrenOnDemand)
@@ -581,7 +551,7 @@ void SfxConfigGroupListBox::FillScriptList(const 
css::uno::Reference< css::scrip
 {
 // tdf#120362: Don't ask to enable disabled Java when filling 
script list
 css::uno::ContextLayer layer(
-new 
NoEnableJavaInteractionContext(css::uno::getCurrentContext()));
+new 
comphelper::NoEnableJavaInteractionContext(css::uno::getCurrentContext()));
 
 Sequence< Reference< browse::XBrowseNode > > children =
 xRootNode->getChildNodes();
diff --git a/include/comphelper/DisableInteractionHelper.hxx 
b/include/comphelper/DisableInteractionHelper.hxx
new file mode 100644
index ..7d99112edeaa
--- /dev/null
+++ b/include/comphelper/DisableInteractionHelper.hxx
@@ -0,0 +1,49 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_COMPHELPER_DISABLEINTERACTIONHELPER_HXX
+#define INCLUDED_COMPHELPER_DISABLEINTERACTIONHELPER_HXX
+
+#include 
+#include 
+
+namespace comphelper
+{
+class NoEnableJavaInteractionContext : public 
cppu::WeakImplHelper
+{
+public:
+explicit NoEnableJavaInteractionContext(
+css::uno::Reference const& xContext)
+: mxContext(xContext)
+{
+}
+NoEnableJavaInteractionContext(const NoEnableJavaInteractionContext&) = 
delete;
+NoEnableJavaInteractionContext& operator=(const 
NoEnableJavaInteractionContext&) = delete;
+
+private:
+virtual ~NoEnableJavaInteractionContext() override {}
+
+virtual css::uno::Any SAL_CALL getValueByName(rtl::OUString const& Name) 
override
+{
+if (Name == "DontEnabl

[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-4-1-6+backports' - nss/nss.patch

2018-10-08 Thread Libreoffice Gerrit user
 nss/nss.patch |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 48539b59174564950a9d4546048d462a7bfadfb1
Author: Thorsten Behrens 
AuthorDate: Mon Oct 8 16:10:51 2018 +0200
Commit: Thorsten Behrens 
CommitDate: Mon Oct 8 16:10:51 2018 +0200

nss: fix build for Linux

Change-Id: I144609e303b49d2dacd96274c3ec0976822b1dfa

diff --git a/nss/nss.patch b/nss/nss.patch
index 4e54aa287523..6a5cb8be8d34 100644
--- a/nss/nss.patch
+++ b/nss/nss.patch
@@ -113,7 +113,7 @@
$(AR) $(subst /,\\,$(OBJS))
  else
 -  $(AR) $(OBJS)
-+  $(AR) -c $@ $(OBJS)
++  $(AR) $(AR_FLAGS) $(OBJS) $(AR_EXTRA_ARGS)
  endif
$(RANLIB) $@
  
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-08 Thread Libreoffice Gerrit user
 include/comphelper/processfactory.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 078a81d5ba9f44b642e3e8b838fc4fe48a91810a
Author: Stephan Bergmann 
AuthorDate: Mon Oct 8 15:35:17 2018 +0200
Commit: Stephan Bergmann 
CommitDate: Mon Oct 8 15:35:17 2018 +0200

Fix undefined css::uno::Reference dtor

...when compiling desktop/source/app/crashreport.cxx, after
2a962cb122f796aef9a10252ab224f5cd70569cf "tdf#42949 Fix IWYU warnings in
include/comphelper/[m-z]*"

Change-Id: Icefe8f8d0a10ed6357daf0530afc01598dd99e22

diff --git a/include/comphelper/processfactory.hxx 
b/include/comphelper/processfactory.hxx
index 7531ee4fbebe..33b72f51cbed 100644
--- a/include/comphelper/processfactory.hxx
+++ b/include/comphelper/processfactory.hxx
@@ -20,7 +20,7 @@
 #ifndef INCLUDED_COMPHELPER_PROCESSFACTORY_HXX
 #define INCLUDED_COMPHELPER_PROCESSFACTORY_HXX
 
-#include 
+#include 
 #include 
 
 namespace com { namespace sun { namespace star { namespace lang {
___
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-08 Thread Libreoffice Gerrit user
 sw/source/filter/html/htmlflywriter.cxx |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit b7835c1d7465db6bea4cc80b6d0c2f71596938f1
Author: Jochen Nitschke 
AuthorDate: Mon Oct 8 12:17:48 2018 +0200
Commit: Jochen Nitschke 
CommitDate: Mon Oct 8 15:01:08 2018 +0200

cppcheck: duplicateExpressionTernary

HTML_FRMOPTS_MULTICOL_CNTNR is the same as HTML_FRMOPTS_MULTICOL

since commit 7b0b5cdfeed656b279bc32cd929630d5fc25878b
Date:   Mon Sep 18 16:15:01 2000 +

initial import

in htmlfly.cxx

Change-Id: I54d04b77f4f281205d3ca89f36c12ff34ba12c12
Reviewed-on: https://gerrit.libreoffice.org/61522
Reviewed-by: Noel Grandin 
Tested-by: Jenkins
Reviewed-by: Jochen Nitschke 

diff --git a/sw/source/filter/html/htmlflywriter.cxx 
b/sw/source/filter/html/htmlflywriter.cxx
index f4f0da70c2f1..cfb474f4e48f 100644
--- a/sw/source/filter/html/htmlflywriter.cxx
+++ b/sw/source/filter/html/htmlflywriter.cxx
@@ -105,8 +105,7 @@ const HtmlFrmOpts HTML_FRMOPTS_MULTICOL   =
 HtmlFrmOpts::AnySize |
 HtmlFrmOpts::AbsSize |
 HtmlFrmOpts::Dir;
-const HtmlFrmOpts HTML_FRMOPTS_MULTICOL_CNTNR =
-HTML_FRMOPTS_MULTICOL;
+
 const HtmlFrmOpts HTML_FRMOPTS_MULTICOL_CSS1  =
 HtmlFrmOpts::SAlign |
 HtmlFrmOpts::SSize |
@@ -1611,8 +1610,7 @@ static Writer & OutHTML_FrameFormatAsMulticol( Writer& 
rWrt,
 rWrt.Strm().WriteCharPtr( sOut.makeStringAndClear().getStr() );
 
 // WIDTH
-HtmlFrmOpts nFrameFlags = bInCntnr ? HTML_FRMOPTS_MULTICOL_CNTNR
-: HTML_FRMOPTS_MULTICOL;
+HtmlFrmOpts nFrameFlags = HTML_FRMOPTS_MULTICOL;
 if( rHTMLWrt.IsHTMLMode( HTMLMODE_ABS_POS_FLY ) && !bInCntnr )
 nFrameFlags |= HTML_FRMOPTS_MULTICOL_CSS1;
 rHTMLWrt.OutFrameFormatOptions( rFrameFormat, aEmptyOUStr, nFrameFlags );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-5-2+backports' - vcl/unx

2018-10-08 Thread Libreoffice Gerrit user
 vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx |   43 +++
 vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.hxx |   54 +++--
 2 files changed, 57 insertions(+), 40 deletions(-)

New commits:
commit dbc22cf3ba6cbf00e64f04ae348fddd4ba4efb17
Author: Michael Weghorn 
AuthorDate: Tue Oct 2 16:13:51 2018 +0200
Commit: Michael Weghorn 
CommitDate: Mon Oct 8 15:00:12 2018 +0200

tdf#120261 gtk3_kde5: Leave event handling on gtk3 side to gtk

This introduces a new thread that takes care of handling the IPC
command and result for executing the file picker
('Commands::Execute'), which is the only command in the file
picker that may block for a longer time until it receives its
result from the kde5 side (namely, when the dialog has been
closed).

While the file dialog is being executed, activate a dummy GTK dialog
that also takes care of handling events in its main loop as long
as the file dialog is shown. The dummy dialog is closed together
with the KDE file dialog.
(Since the actual KDE file dialog is run as a separate process,
this one is mostly "transparent" to the soffice process from the
point of view of a dialog.)

This allows dropping the custom event processing previously done
in 'Gtk3KDE5FilePickerIpc::readResponse()' that had the potential
to cause all kinds of problems, e.g. when another event related to
the file picker was triggered from a Java process via UNO.

 Conflicts:
vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.hxx

Reviewed-on: https://gerrit.libreoffice.org/61253
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 
(cherry picked from commit 788716cebad012513cc2798589b817b86cbf1bbc)

Change-Id: I3d663253f09320f7a8e0d9ec32a8fd6ec191c189
Reviewed-on: https://gerrit.libreoffice.org/61534
Reviewed-by: Michael Weghorn 
Tested-by: Michael Weghorn 

diff --git a/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx 
b/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx
index 34ebfa322f07..a190e522e500 100644
--- a/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx
+++ b/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx
@@ -110,6 +110,17 @@ OUString getResString(sal_Int32 aResId)
 return ResId(aResId, *ImplGetResMgr()).toString();
 }
 
+// handles the IPC commands for dialog execution and ends the dummy Gtk dialog 
once the IPC response is there
+void handleIpcForExecute(Gtk3KDE5FilePickerIpc* pFilePickerIpc, GtkWidget* 
pDummyDialog,
+ bool* bResult)
+{
+auto id = pFilePickerIpc->sendCommand(Commands::Execute);
+pFilePickerIpc->readResponse(id, *bResult);
+
+// end the dummy dialog
+gtk_widget_hide(pDummyDialog);
+}
+
 // Gtk3KDE5FilePicker
 
 Gtk3KDE5FilePickerIpc::Gtk3KDE5FilePickerIpc()
@@ -147,9 +158,29 @@ sal_Int16 Gtk3KDE5FilePickerIpc::execute()
 {
 auto restoreMainWindow = blockMainWindow();
 
-auto id = sendCommand(Commands::Execute);
+// dummy gtk dialog that will take care of processing events,
+// not meant to be actually seen by user
+GtkWidget* pDummyDialog = gtk_dialog_new();
+
 bool accepted = false;
-readResponse(id, accepted);
+
+// send IPC command and read response in a separate thread
+std::thread aIpcHandler(&handleIpcForExecute, this, pDummyDialog, 
&accepted);
+
+// make dummy dialog not to be seen by user
+gtk_window_set_decorated(GTK_WINDOW(pDummyDialog), false);
+gtk_window_set_default_size(GTK_WINDOW(pDummyDialog), 0, 0);
+gtk_window_set_accept_focus(GTK_WINDOW(pDummyDialog), false);
+// gtk_widget_set_opacity() only has the desired effect when widget is 
already shown
+gtk_widget_show(pDummyDialog);
+gtk_widget_set_opacity(pDummyDialog, 0);
+// run dialog, leaving event processing to GTK
+// dialog will be closed by the separate 'aIpcHandler' thread once the IPC 
response is there
+gtk_dialog_run(GTK_DIALOG(pDummyDialog));
+
+aIpcHandler.join();
+
+gtk_widget_destroy(pDummyDialog);
 
 if (restoreMainWindow)
 restoreMainWindow();
@@ -208,14 +239,6 @@ std::function 
Gtk3KDE5FilePickerIpc::blockMainWindow()
 };
 }
 
-void Gtk3KDE5FilePickerIpc::await(const std::future& future)
-{
-while (future.wait_for(std::chrono::milliseconds(1)) != 
std::future_status::ready)
-{
-GetGtkSalData()->Yield(false, true);
-}
-}
-
 void Gtk3KDE5FilePickerIpc::writeResponseLine(const std::string& line)
 {
 sal_uInt64 bytesWritten = 0;
diff --git a/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.hxx 
b/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.hxx
index a6b6f9098300..68d2739e0f36 100644
--- a/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.hxx
+++ b/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.hxx
@@ -30,7 +30,6 @@
 #include "filepicker_ipc_commands.hxx"
 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -105,42 +104,37 @@ public:
 
 template  void readResponse(uint64_t id, Arg

[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-5-2+backports' - 2 commits - vcl/unx

2018-10-08 Thread Libreoffice Gerrit user
 vcl/unx/gtk3_kde5/filepicker_ipc_commands.hxx |   12 +
 vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx |  229 +++---
 vcl/unx/gtk3_kde5/kde5_filepicker_ipc.hxx |   18 +-
 3 files changed, 198 insertions(+), 61 deletions(-)

New commits:
commit 22c76a35b95f8113fceabacf96ec017bffc9a0ac
Author: Michael Weghorn 
AuthorDate: Tue Oct 2 16:08:35 2018 +0200
Commit: Michael Weghorn 
CommitDate: Mon Oct 8 15:00:00 2018 +0200

tdf#120261 gtk3_kde5: Read IPC cmds in own thread on kde5 side

Move reading IPC commands and arguments to those commands
to a separate thread and use the signal/slot mechanism
to notify 'FilePickerIpc' whenever a new command and its
arguments have been read.

This allows to handle the events of other commands that have been
received while the dialog is being executed.
This will be needed by a subsequent change that will modify
how IPC is handled on the gtk3 side.

 Conflicts:
vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx

Reviewed-on: https://gerrit.libreoffice.org/61252
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 
(cherry picked from commit 3b36855e48f6ef3f4e52e998c52c531fe5191477)

Change-Id: Ia77b21045b0196710cbe164fb640b36a128d5081
Reviewed-on: https://gerrit.libreoffice.org/61533
Reviewed-by: Michael Weghorn 
Tested-by: Michael Weghorn 

diff --git a/vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx 
b/vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx
index d023e4461448..803e5bedd853 100644
--- a/vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx
+++ b/vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx
@@ -27,7 +27,6 @@
 
 #include 
 
-#include "filepicker_ipc_commands.hxx"
 #include "kde5_filepicker.hxx"
 
 #include 
@@ -53,49 +52,180 @@ void sendIpcArg(std::ostream& stream, const QStringList& 
list)
 }
 }
 
-FilePickerIpc::FilePickerIpc(KDE5FilePicker* filePicker, QObject* _parent)
-: QObject(_parent)
-, m_filePicker(filePicker)
-, m_stdinNotifier(new QSocketNotifier(fileno(stdin), 
QSocketNotifier::Read, this))
+void readCommandArgs(Commands command, QList& args)
 {
-connect(m_stdinNotifier, &QSocketNotifier::activated, this, 
&FilePickerIpc::readCommands);
+switch (command)
+{
+case Commands::SetTitle:
+{
+QString title;
+readIpcArgs(std::cin, title);
+args.append(title);
+break;
+}
+case Commands::SetWinId:
+{
+sal_uIntPtr winId = 0;
+readIpcArgs(std::cin, winId);
+QVariant aWinIdVariant;
+aWinIdVariant.setValue(winId);
+args.append(aWinIdVariant);
+break;
+}
+case Commands::SetMultiSelectionMode:
+{
+bool multiSelection = false;
+readIpcArgs(std::cin, multiSelection);
+args.append(multiSelection);
+break;
+}
+case Commands::SetDefaultName:
+{
+QString name;
+readIpcArgs(std::cin, name);
+args.append(name);
+break;
+}
+case Commands::SetDisplayDirectory:
+{
+QString dir;
+readIpcArgs(std::cin, dir);
+args.append(dir);
+break;
+}
+case Commands::AppendFilter:
+{
+QString title, filter;
+readIpcArgs(std::cin, title, filter);
+args.append(title);
+args.append(filter);
+break;
+}
+case Commands::SetCurrentFilter:
+{
+QString title;
+readIpcArgs(std::cin, title);
+args.append(title);
+break;
+}
+case Commands::SetValue:
+{
+sal_Int16 controlId = 0;
+sal_Int16 nControlAction = 0;
+bool value = false;
+readIpcArgs(std::cin, controlId, nControlAction, value);
+args.append(controlId);
+args.append(nControlAction);
+args.append(value);
+break;
+}
+case Commands::GetValue:
+{
+sal_Int16 controlId = 0;
+sal_Int16 nControlAction = 0;
+readIpcArgs(std::cin, controlId, nControlAction);
+args.append(controlId);
+args.append(nControlAction);
+break;
+}
+case Commands::EnableControl:
+{
+sal_Int16 controlId = 0;
+bool enabled = false;
+readIpcArgs(std::cin, controlId, enabled);
+args.append(controlId);
+args.append(enabled);
+break;
+}
+case Commands::SetLabel:
+{
+sal_Int16 controlId = 0;
+QString label;
+readIpcArgs(std::cin, controlId, label);
+args.append(controlId);
+args.append(label);
+break;
+}
+case Commands::GetLabel:
+   

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

2018-10-08 Thread Libreoffice Gerrit user
 basctl/source/basicide/baside2.cxx |7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

New commits:
commit d75a96d50bb62e40d69d7ab432ca94f23d36e82f
Author: Jochen Nitschke 
AuthorDate: Mon Oct 8 13:08:06 2018 +0200
Commit: Jochen Nitschke 
CommitDate: Mon Oct 8 14:41:24 2018 +0200

cppcheck: knownConditionTrueFalse

Change-Id: I245a353b69af7dcedf4c0f3f1271f1fdf86fd09c
Reviewed-on: https://gerrit.libreoffice.org/61523
Tested-by: Jenkins
Reviewed-by: Jochen Nitschke 

diff --git a/basctl/source/basicide/baside2.cxx 
b/basctl/source/basicide/baside2.cxx
index a10f1b9ba34b..15d2715a6973 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -269,11 +269,8 @@ void ModulWindow::CheckCompileBasic()
 
 GetShell()->GetViewFrame()->GetWindow().EnterWait();
 
-if( bModified )
-{
-AssertValidEditEngine();
-GetEditorWindow().SetSourceInBasic();
-}
+AssertValidEditEngine();
+GetEditorWindow().SetSourceInBasic();
 
 bool bWasModified = GetBasic()->IsModified();
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/Library_cui.mk

2018-10-08 Thread Libreoffice Gerrit user
 cui/Library_cui.mk |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 2f74b6842f56dc0313022bc0e51472342b0515a6
Author: Tor Lillqvist 
AuthorDate: Mon Oct 8 12:37:27 2018 +0300
Commit: Tor Lillqvist 
CommitDate: Mon Oct 8 14:28:59 2018 +0200

Try to manage without curl on non-desktop platforms (iOS, for me)

We don't build curl for iOS. (Don't remember why exactly, but anyway,
this persona thing is surely a feature relevant for desktop platforms
only, and certainly not a good reason to start building curl.)

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

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index 26900dec8e3a..a959742a906c 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -66,7 +66,8 @@ $(eval $(call gb_Library_use_externals,cui,\
boost_headers \
$(call gb_Helper_optional,OPENCL,\
clew) \
-curl \
+$(call gb_Helper_optional,DESKTOP,\
+   curl) \
 icuuc \
 icu_headers \
 orcus-parser \
@@ -174,7 +175,8 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
 cui/source/options/optpath \
 cui/source/options/optsave \
 cui/source/options/optupdt \
-cui/source/options/personalization \
+$(call gb_Helper_optional,DESKTOP,\
+cui/source/options/personalization) \
 cui/source/options/personasdochandler \
 cui/source/options/radiobtnbox \
 cui/source/options/sdbcdriverenum \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: chart2/inc chart2/IwyuFilter_chart2.yaml chart2/source

2018-10-08 Thread Libreoffice Gerrit user
 chart2/IwyuFilter_chart2.yaml  |   22 +
 chart2/inc/ChartModel.hxx  |4 --
 chart2/source/model/filter/XMLFilter.cxx   |2 -
 chart2/source/model/main/Axis.cxx  |7 
 chart2/source/model/main/BaseCoordinateSystem.cxx  |2 -
 chart2/source/model/main/CartesianCoordinateSystem.cxx |3 +
 chart2/source/model/main/ChartModel.cxx|   15 
 chart2/source/model/main/ChartModel_Persistence.cxx|2 -
 chart2/source/model/main/DataPoint.cxx |2 -
 chart2/source/model/main/DataPointProperties.cxx   |2 -
 chart2/source/model/main/DataSeries.cxx|3 +
 chart2/source/model/main/DataSeriesProperties.cxx  |4 --
 chart2/source/model/main/Diagram.cxx   |7 
 chart2/source/model/main/FormattedString.cxx   |4 +-
 chart2/source/model/main/GridProperties.cxx|6 +--
 chart2/source/model/main/Legend.cxx|4 +-
 chart2/source/model/main/PageBackground.cxx|5 +-
 chart2/source/model/main/PolarCoordinateSystem.cxx |3 +
 chart2/source/model/main/StockBar.cxx  |5 +-
 chart2/source/model/main/Title.cxx |6 +--
 chart2/source/model/main/Wall.cxx  |9 -
 chart2/source/model/template/AreaChartType.cxx |3 +
 chart2/source/model/template/BarChartType.cxx  |3 +
 chart2/source/model/template/BubbleChartType.cxx   |2 -
 chart2/source/model/template/BubbleChartTypeTemplate.cxx   |4 --
 chart2/source/model/template/BubbleDataInterpreter.cxx |1 
 chart2/source/model/template/CandleStickChartType.cxx  |3 +
 chart2/source/model/template/ChartType.cxx |3 -
 chart2/source/model/template/ChartTypeManager.cxx  |7 
 chart2/source/model/template/ChartTypeTemplate.cxx |8 
 chart2/source/model/template/ColumnChartType.cxx   |3 +
 chart2/source/model/template/ColumnLineDataInterpreter.cxx |8 
 chart2/source/model/template/DataInterpreter.cxx   |2 -
 chart2/source/model/template/FilledNetChartType.cxx|8 +---
 chart2/source/model/template/LineChartType.cxx |3 +
 chart2/source/model/template/NetChartType.cxx  |2 -
 chart2/source/model/template/NetChartTypeTemplate.cxx  |1 
 chart2/source/model/template/PieChartTypeTemplate.cxx  |2 -
 chart2/source/model/template/ScatterChartType.hxx  |1 
 chart2/source/model/template/ScatterChartTypeTemplate.cxx  |1 
 chart2/source/model/template/StockChartTypeTemplate.cxx|6 ---
 chart2/source/model/template/StockDataInterpreter.cxx  |7 
 chart2/source/model/template/XYDataInterpreter.cxx |1 
 43 files changed, 57 insertions(+), 139 deletions(-)

New commits:
commit 60706b01d18f5c8ff52aff73a2032f641873533c
Author: Gabor Kelemen 
AuthorDate: Sun Oct 7 09:28:37 2018 +0200
Commit: Miklos Vajna 
CommitDate: Mon Oct 8 14:00:17 2018 +0200

tdf#42949 Fix IWYU warnings in chart2/source/model/*cxx

Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

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

diff --git a/chart2/IwyuFilter_chart2.yaml b/chart2/IwyuFilter_chart2.yaml
index d44df956305d..61da70d93294 100644
--- a/chart2/IwyuFilter_chart2.yaml
+++ b/chart2/IwyuFilter_chart2.yaml
@@ -204,6 +204,16 @@ blacklist:
 - com/sun/star/util/XCloneable.hpp
 - com/sun/star/util/XModifyBroadcaster.hpp
 - com/sun/star/util/XModifyListener.hpp
+chart2/source/model/main/Axis.cxx:
+# Needed for template
+- com/sun/star/awt/Size.hpp
+chart2/source/model/main/DataPointProperties.cxx:
+# Needed for template
+- com/sun/star/chart2/XDataPointCustomLabelField.hpp
+chart2/source/model/main/Diagram.cxx:
+# Needed for template
+- com/sun/star/chart2/RelativePosition.hpp
+- com/sun/star/chart2/RelativeSize.hpp
 chart2/source/model/main/FormattedString.hxx:
 # base class has to be a complete type
 - com/sun/star/chart2/XDataPointCustomLabelField.hpp
@@ -224,6 +234,11 @@ blacklist:
 - com/sun/star/util/XCloneable.hpp
 - com/sun/star/util/XModifyBroadcaster.hpp
 - com/sun/star/util/XModifyListener.hpp
+chart2/source/model/main/Legend.cxx:
+# Needed for template
+- com/sun/star/awt/Size.hpp
+- com/sun/star/chart2/RelativePosition.hpp
+- com/sun/star/chart2/RelativeSize.hpp
 chart2/source/model/main/PageBackground.hxx:
 # base class has to be a complete type
 - com/sun/star/lang/XServiceInfo.hp

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

2018-10-08 Thread Libreoffice Gerrit user
 cui/source/options/personalization.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 57b3161eb9ffb890c26e78309c4e833f631600ff
Author: Andrea Gelmini 
AuthorDate: Mon Oct 8 12:15:16 2018 +0200
Commit: Julien Nabet 
CommitDate: Mon Oct 8 13:57:59 2018 +0200

Fix typo

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

diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index bbaa03e8d3a1..97da2d1878d1 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -132,7 +132,7 @@ std::string curlGet(const OString& rURL)
 return response_body;
 }
 
-// Downloads and saves the file at the given rURL to to a local path (sFileURL)
+// Downloads and saves the file at the given rURL to a local path (sFileURL)
 void curlDownload(const OString& rURL, const OUString& sFileURL)
 {
 CURL* curl = curl_easy_init();
___
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' - svtools/source

2018-10-08 Thread Libreoffice Gerrit user
 svtools/source/brwbox/editbrowsebox.cxx |   22 --
 1 file changed, 20 insertions(+), 2 deletions(-)

New commits:
commit c523d9556a354e1afac3203b6f1c8b75a2f7d2f0
Author: Caolán McNamara 
AuthorDate: Wed Oct 3 16:42:15 2018 +0100
Commit: Caolán McNamara 
CommitDate: Mon Oct 8 13:38:36 2018 +0200

Resolves: tdf#93372 format table in base is ignored

since...

commit b4bbb5e5d7b31caad2fbcc00382ad27df3c81001
Date:   Sun May 17 22:56:46 2015 +0900

refactor how font, fg. and bg. are applied in widgets/controls

revert the relevant piece, in this case there are two Windows/Contexts 
getting
their settings manipulated, rather than the usual one

Change-Id: I0a228aee6aaf1f58b2235fccf14dc63ffa96dd2d
Reviewed-on: https://gerrit.libreoffice.org/61317
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit 0be3a5eea3089c2b63cc821ffb282fd4ab8ec455)
Reviewed-on: https://gerrit.libreoffice.org/61324
Tested-by: Jenkins
Tested-by: Xisco Faulí 

diff --git a/svtools/source/brwbox/editbrowsebox.cxx 
b/svtools/source/brwbox/editbrowsebox.cxx
index 1a9cb86b80aa..ffb58e042af5 100644
--- a/svtools/source/brwbox/editbrowsebox.cxx
+++ b/svtools/source/brwbox/editbrowsebox.cxx
@@ -761,12 +761,30 @@ return;
 
 if (bFont)
 {
-GetDataWindow().ApplyControlFont(GetDataWindow(), 
rStyleSettings.GetFieldFont());
+vcl::Font aFont = rStyleSettings.GetFieldFont();
+if (IsControlFont())
+{
+GetDataWindow().SetControlFont(GetControlFont());
+aFont.Merge(GetControlFont());
+}
+else
+GetDataWindow().SetControlFont();
+
+GetDataWindow().SetZoomedPointFont(GetDataWindow(), aFont);
 }
 
 if (bFont || bForeground)
 {
-GetDataWindow().ApplyControlForeground(GetDataWindow(), 
rStyleSettings.GetFieldTextColor());
+Color aTextColor = rStyleSettings.GetFieldTextColor();
+if (IsControlForeground())
+{
+aTextColor = GetControlForeground();
+GetDataWindow().SetControlForeground(aTextColor);
+}
+else
+GetDataWindow().SetControlForeground();
+
+GetDataWindow().SetTextColor( aTextColor );
 }
 
 if (!bBackground) // FIXME: Outside of Paint Hierarchy
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-08 Thread Libreoffice Gerrit user
 vcl/quartz/salvd.cxx |9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit e659c6a1857fbb8e5a6e8ff60fe241483eea32dd
Author: Stephan Bergmann 
AuthorDate: Mon Oct 8 11:21:45 2018 +0200
Commit: Stephan Bergmann 
CommitDate: Mon Oct 8 13:36:58 2018 +0200

Work around odd macOS 10.14 graphicsContextWithWindow failure

When running on macOS 10.14, both master and libreoffice-6-1 (at least) 
started
to fail CppunitTest_vcl_bitmap_render_test with

> 
/Users/stephan/Software/lo2/core/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx:90:
 Assertion
> Test name: BitmapRenderTest::testTdf113918
> equality assertion failed
> - Expected: mcBlueOrIndex: 255, mcGreen: 255, mcRed: 255, mcAlpha: 0
> - Actual  : mcBlueOrIndex: 1, mcGreen: 112, mcRed: 15, mcAlpha: 0

in --enable-debug/--enable-dbgutil builds.

I tracked that down to the OSL_DEBUG_LEVEL>0--only call to
Scheduler::ProcessEventsToIdle in test::BootstrapFixture::setUp
(test/source/bootstrapfixture.cxx).  If that call is also included in 
non-debug
(i.e., OSL_DEBUG_LEVEL=0) builds, or if it is removed from all builds and
instead an unsuspecting

  [NSApp nextEventMatchingMask: 0 untilDate: nil inMode: 
NSDefaultRunLoopMode dequeue: NO];

is added directly before the call to

  pVDev->SetOutputSizePixel(Size(2480, 3508));

at the start of BitmapRenderTest::testTdf113918
(vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx:76), the test always 
fails.

What happens is that, after such a nextEventMatchingMask call done, the 
call to
NSGraphicsContext graphicsContextWithWindow in 
AquaSalVirtualDevice::SetSize (as
called from the SetOutputSizePixel call in the test) returns nil, for 
unclear
reasons.

Until those underlying reasons are understood, change the code of SetSize to
"fall back to a bitmap context" also in case the graphicsContextWithWindow 
call
returned nil.

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

diff --git a/vcl/quartz/salvd.cxx b/vcl/quartz/salvd.cxx
index 77fee8f13d8a..8de6d38ee52d 100644
--- a/vcl/quartz/salvd.cxx
+++ b/vcl/quartz/salvd.cxx
@@ -273,7 +273,14 @@ bool AquaSalVirtualDevice::SetSize( long nDX, long nDY )
 xCGContext = [pNSContext CGContext];
 }
 }
-else
+// At least on macOS 10.14 during CppunitTests (that have hidden 
windows), it happens
+// that the above
+//
+//   [NSGraphicsContext graphicsContextWithWindow: pNSWindow]
+//
+// returns nil for unclear reasons; so use the below fallback even 
if there is a
+// pNSWindow but obtaining a graphics context for it fails:
+if (xCGContext == nullptr)
 {
 // fall back to a bitmap context
 mnBitmapDepth = 32;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-08 Thread Libreoffice Gerrit user
 cui/source/customize/cfgutil.cxx |   35 +++
 stoc/source/javavm/javavm.cxx|7 +++
 2 files changed, 42 insertions(+)

New commits:
commit b2d156b6ef3845a2f1f390b1c9b7c202187e6b85
Author: Mike Kaganski 
AuthorDate: Sat Oct 6 15:28:37 2018 +0300
Commit: Mike Kaganski 
CommitDate: Mon Oct 8 13:13:52 2018 +0200

tdf#120362: Don't ask user to enable JVM when enumerating scripts

Since it wasn't an explicit user's intention to run something that requires
JVM, asking to enable it in case it's disabled is nonsense, and it happened
every first time in a LO session when user wanted to start e.g. Basic macro
using Tools->Macros->Run Macro... tool.

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

diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index 4e89b9c7a2d4..56d91c1eaf82 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -65,6 +65,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -541,6 +542,36 @@ namespace
 }
 }
 
+namespace
+{
+class NoEnableJavaInteractionContext : public 
cppu::WeakImplHelper
+{
+public:
+explicit NoEnableJavaInteractionContext(
+css::uno::Reference const& xContext)
+: mxContext(xContext)
+{
+}
+NoEnableJavaInteractionContext(const NoEnableJavaInteractionContext&) = 
delete;
+NoEnableJavaInteractionContext& operator=(const 
NoEnableJavaInteractionContext&) = delete;
+
+private:
+virtual ~NoEnableJavaInteractionContext() override {}
+
+virtual css::uno::Any SAL_CALL getValueByName(OUString const& Name) 
override
+{
+if (Name == "DontEnableJava")
+return css::uno::Any(true);
+else if (mxContext.is())
+return mxContext->getValueByName(Name);
+else
+return css::uno::Any();
+}
+
+css::uno::Reference mxContext;
+};
+
+} // namespace
 
 void SfxConfigGroupListBox::FillScriptList(const css::uno::Reference< 
css::script::browse::XBrowseNode >& xRootNode,
SvTreeListEntry* pParentEntry, bool 
bCheapChildrenOnDemand)
@@ -548,6 +579,10 @@ void SfxConfigGroupListBox::FillScriptList(const 
css::uno::Reference< css::scrip
 try {
 if ( xRootNode->hasChildNodes() )
 {
+// tdf#120362: Don't ask to enable disabled Java when filling 
script list
+css::uno::ContextLayer layer(
+new 
NoEnableJavaInteractionContext(css::uno::getCurrentContext()));
+
 Sequence< Reference< browse::XBrowseNode > > children =
 xRootNode->getChildNodes();
 bool bIsRootNode = false;
diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx
index 968e776be2a0..2bf1fbf55229 100644
--- a/stoc/source/javavm/javavm.cxx
+++ b/stoc/source/javavm/javavm.cxx
@@ -778,6 +778,13 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 
> const & rProcessId)
 }
 case JFW_E_JAVA_DISABLED:
 {
+bool bDontEnableJava = false;
+auto xContext(css::uno::getCurrentContext());
+if (xContext.is())
+xContext->getValueByName("DontEnableJava") >>= bDontEnableJava;
+if (bDontEnableJava)
+return css::uno::Any();
+
 //QueryBox:
 //%PRODUCTNAME requires a Java runtime environment (JRE) to perform
 //this task. However, use of a JRE has been disabled. Do you want 
to
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Upstream clang compiler plugins, licensing

2018-10-08 Thread Tamás Zolnai
Hi Noel,

It's good idea to pick up one plugin first and discuss with the authors and
relicense that plugin only. I think this also means that we'll need to
change the license header of the plugin's source file to LLVM license so
it's unambigous what is the license of this specific plugin. The only
question is that whether it's OK to have mixed licensed files inside LO
source code (some files with LLVM license, others with LO's license).

I expected that I need to adapt the code for clang, but I think it's still
good to make licensing compatible even if I use only small part of the code
one-on-one way.

Best Regards,
Tamás

Noel Grandin  ezt írta (időpont: 2018. okt. 7., V,
19:55):

>
> IANAL, obviously, but possibly you could pick the plugins you want and ask
> all the people who worked on that plugin to re-license their work (there
> are not that many, and they are mostly still around)
>
> For the record, for anything in compilerplugins/ that I have touched, I
> grant you permission to submit my work to LLVM under their license.
>
> Also, note that LLVM is likely to want you to write the plugins in quite
> a different style, they don't use our style of overriding ASTVisitor
> anymore, so upstreaming is not trivial, they like using some kind of
> matcher API for traversing the AST, and they have a whole Checker framework
> for clang-tidy stuff.
>
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - oox/source sc/qa

2018-10-08 Thread Libreoffice Gerrit user
 oox/source/vml/vmlinputstream.cxx   |2 +-
 sc/qa/unit/data/xlsx/tdf120301_xmlSpaceParsing.xlsx |binary
 sc/qa/unit/subsequent_filters-test.cxx  |   19 +++
 3 files changed, 20 insertions(+), 1 deletion(-)

New commits:
commit b118760cade7350b91e56d92eec22b8d9129c4a4
Author: Justin Luth 
AuthorDate: Thu Oct 4 17:55:42 2018 +0300
Commit: Andras Timar 
CommitDate: Mon Oct 8 11:24:48 2018 +0200

tdf#120301 oox: lclIsWhiteSpace should return true for a space

Reviewed-on: https://gerrit.libreoffice.org/61388
Tested-by: Jenkins
Reviewed-by: Justin Luth 
(cherry picked from commit 2cae2ecfef47d8dd10647c10f9577392c1887d3a)

Change-Id: I72c79c1fed4d9a91bf02024eef23cd3b1a58632e

diff --git a/oox/source/vml/vmlinputstream.cxx 
b/oox/source/vml/vmlinputstream.cxx
index 3afcbaa8f32c..6aff31514710 100644
--- a/oox/source/vml/vmlinputstream.cxx
+++ b/oox/source/vml/vmlinputstream.cxx
@@ -43,7 +43,7 @@ inline const sal_Char* lclFindCharacter( const sal_Char* 
pcBeg, const sal_Char*
 
 inline bool lclIsWhiteSpace( sal_Char cChar )
 {
-return cChar < 32;
+return cChar <= 32;
 }
 
 const sal_Char* lclFindWhiteSpace( const sal_Char* pcBeg, const sal_Char* 
pcEnd )
diff --git a/sc/qa/unit/data/xlsx/tdf120301_xmlSpaceParsing.xlsx 
b/sc/qa/unit/data/xlsx/tdf120301_xmlSpaceParsing.xlsx
new file mode 100644
index ..0677a0cf2eb2
Binary files /dev/null and 
b/sc/qa/unit/data/xlsx/tdf120301_xmlSpaceParsing.xlsx differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx 
b/sc/qa/unit/subsequent_filters-test.cxx
index ea212bc659cb..56cc573a91a1 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -233,6 +233,7 @@ public:
 
 void testPageScalingXLSX();
 void testActiveXCheckboxXLSX();
+void testtdf120301_xmlSpaceParsingXLSX();
 #ifdef UNX
 void testUnicodeFileNameGnumeric();
 #endif
@@ -357,6 +358,7 @@ public:
 
 CPPUNIT_TEST(testPageScalingXLSX);
 CPPUNIT_TEST(testActiveXCheckboxXLSX);
+CPPUNIT_TEST(testtdf120301_xmlSpaceParsingXLSX);
 #ifdef UNX
 CPPUNIT_TEST(testUnicodeFileNameGnumeric);
 #endif
@@ -3641,6 +3643,23 @@ void ScFiltersTest::testActiveXCheckboxXLSX()
 xDocSh->DoClose();
 }
 
+void ScFiltersTest::testtdf120301_xmlSpaceParsingXLSX()
+{
+ScDocShellRef xDocSh = loadDoc("tdf120301_xmlSpaceParsing.", FORMAT_XLSX);
+uno::Reference< frame::XModel > xModel = xDocSh->GetModel();
+uno::Reference< sheet::XSpreadsheetDocument > xDoc(xModel, 
UNO_QUERY_THROW);
+uno::Reference< container::XIndexAccess > xIA(xDoc->getSheets(), 
UNO_QUERY_THROW);
+uno::Reference< drawing::XDrawPageSupplier > xDrawPageSupplier( 
xIA->getByIndex(0), UNO_QUERY_THROW);
+uno::Reference< container::XIndexAccess > 
xIA_DrawPage(xDrawPageSupplier->getDrawPage(), UNO_QUERY_THROW);
+
+uno::Reference< drawing::XControlShape > 
xControlShape(xIA_DrawPage->getByIndex(0), UNO_QUERY_THROW);
+uno::Reference< beans::XPropertySet > XPropSet( 
xControlShape->getControl(), uno::UNO_QUERY_THROW );
+OUString sCaption;
+XPropSet->getPropertyValue("Label") >>= sCaption;
+CPPUNIT_ASSERT_EQUAL(OUString("Check Box 1"), sCaption);
+xDocSh->DoClose();
+}
+
 ScFiltersTest::ScFiltersTest()
   : ScBootstrapFixture( "sc/qa/unit/data" )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-08 Thread Libreoffice Gerrit user
 compilerplugins/clang/test/useuniqueptr.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e056e30f82ae00c5cb3249f943b0d7ec46c65aad
Author: Miklos Vajna 
AuthorDate: Mon Oct 8 12:30:22 2018 +0200
Commit: Miklos Vajna 
CommitDate: Mon Oct 8 12:31:17 2018 +0200

compilerplugins: the useuniqueptr clang plugin test fails on 5.0.1

I'm not sure what is the first version that passes it, let's go with 6.0
for now.

Change-Id: I7a150fbc2a722a6a47d91de4b00893303add5cc8

diff --git a/compilerplugins/clang/test/useuniqueptr.cxx 
b/compilerplugins/clang/test/useuniqueptr.cxx
index 369cfa1e8929..f246fc5ae147 100644
--- a/compilerplugins/clang/test/useuniqueptr.cxx
+++ b/compilerplugins/clang/test/useuniqueptr.cxx
@@ -278,7 +278,7 @@ class Foo23
 }
 };
 
-#if CLANG_VERSION >= 5
+#if CLANG_VERSION >= 6
 class Foo24
 {
 typedef std::vector HTMLAttrs;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: accessibility/source basctl/source canvas/source comphelper/qa comphelper/source connectivity/source dbaccess/source drawinglayer/source embeddedobj/source extensions/s

2018-10-08 Thread Libreoffice Gerrit user
 accessibility/source/standard/vclxaccessibletoolbox.cxx|2 
 basctl/source/dlged/dlgedfac.cxx   |1 
 canvas/source/vcl/canvas.hxx   |2 
 canvas/source/vcl/canvascustomsprite.cxx   |1 
 canvas/source/vcl/canvascustomsprite.hxx   |1 
 canvas/source/vcl/spritecanvas.hxx |1 
 comphelper/qa/string/test_string.cxx   |2 
 comphelper/source/container/namecontainer.cxx  |1 
 comphelper/source/misc/SelectionMultiplex.cxx  |2 
 comphelper/source/misc/mimeconfighelper.cxx|2 
 comphelper/source/misc/namedvaluecollection.cxx|1 
 comphelper/source/misc/numberedcollection.cxx  |1 
 comphelper/source/misc/numbers.cxx |1 
 comphelper/source/misc/sequenceashashmap.cxx   |2 
 comphelper/source/misc/serviceinfohelper.cxx   |3 
 comphelper/source/misc/solarmutex.cxx  |1 
 comphelper/source/processfactory/processfactory.cxx|1 
 comphelper/source/property/genericpropertyset.cxx  |1 
 comphelper/source/property/property.cxx|1 
 comphelper/source/property/propertybag.cxx |2 
 comphelper/source/property/propertycontainerhelper.cxx |1 
 comphelper/source/property/propertysethelper.cxx   |1 
 comphelper/source/streaming/oslfile2streamwrap.cxx |1 
 comphelper/source/streaming/streamsection.cxx  |3 
 connectivity/source/commontools/DateConversion.cxx |1 
 connectivity/source/commontools/TDatabaseMetaDataBase.cxx  |1 
 connectivity/source/drivers/file/FStatement.cxx|1 
 connectivity/source/drivers/hsqldb/HDriver.cxx |1 
 connectivity/source/drivers/hsqldb/HUser.cxx   |1 
 connectivity/source/drivers/jdbc/PreparedStatement.cxx |1 
 connectivity/source/drivers/macab/MacabResultSet.cxx   |2 
 connectivity/source/drivers/macab/MacabStatement.cxx   |1 
 connectivity/source/drivers/mork/MPreparedStatement.cxx|1 
 connectivity/source/drivers/mork/MResultSet.cxx|1 
 connectivity/source/inc/TConnection.hxx|1 
 dbaccess/source/core/api/RowSetCache.cxx   |1 
 dbaccess/source/core/api/querycontainer.cxx|1 
 dbaccess/source/core/dataaccess/ModelImpl.cxx  |1 
 dbaccess/source/core/dataaccess/connection.cxx |1 
 dbaccess/source/core/dataaccess/databasedocument.cxx   |1 
 dbaccess/source/core/dataaccess/datasource.cxx |1 
 dbaccess/source/core/dataaccess/documentdefinition.cxx |1 
 dbaccess/source/ui/app/AppControllerGen.cxx|1 
 dbaccess/source/ui/browser/brwctrlr.cxx|1 
 dbaccess/source/ui/browser/sbagrid.cxx |1 
 dbaccess/source/ui/control/dbtreelistbox.cxx   |1 
 dbaccess/source/ui/querydesign/QTableWindow.cxx|1 
 drawinglayer/source/primitive2d/controlprimitive2d.cxx |1 
 drawinglayer/source/primitive2d/textlayoutdevice.cxx   |1 
 embeddedobj/source/commonembedding/xfactory.cxx|1 
 extensions/source/propctrlr/formcomponenthandler.cxx   |1 
 extensions/source/propctrlr/genericpropertyhandler.cxx |1 
 filter/source/msfilter/mscodec.cxx |1 
 forms/source/component/Columns.cxx |1 
 forms/source/component/Currency.cxx|1 
 forms/source/component/DatabaseForm.cxx|1 
 forms/source/component/Edit.cxx|1 
 forms/source/component/EditBase.cxx|1 
 forms/source/component/Filter.cxx  |1 
 forms/source/component/FormattedField.cxx  |1 
 forms/source/component/Grid.cxx|1 
 forms/source/component/ImageControl.cxx|1 
 forms/source/component/ListBox.cxx |1 
 forms/source/component/Numeric.cxx |1 
 forms/source/component/clickableimage.cxx  |1 
 forms/source/misc/InterfaceContainer.cxx  

[Libreoffice-commits] online.git: Changes to 'refs/tags/3.4.0-final'

2018-10-08 Thread Libreoffice Gerrit user
Tag '3.4.0-final' created by Andras Timar  at 
2018-10-08 10:14 +

3.4.0-final

Changes since 3.4-rc7-4:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bin/find-unneeded-includes

2018-10-08 Thread Libreoffice Gerrit user
 bin/find-unneeded-includes |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9b686537f59a63bad05a0cfe7fc5f1096bb7a7c1
Author: Gabor Kelemen 
AuthorDate: Sat Oct 6 23:25:46 2018 +0200
Commit: Miklos Vajna 
CommitDate: Mon Oct 8 12:15:23 2018 +0200

find-unneeded-includes: warn about fw decls in namespaces too

This regex parsed unneeded fw declarations reported by IWYU in the form of:
class foo;
But not ones inside namespaces, e.g.:
namespace foo { class bar; }
namespace com { namespace sun { namespace star { namespace foo { class bar; 
} } } }

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

diff --git a/bin/find-unneeded-includes b/bin/find-unneeded-includes
index 4196640e5d2b..7f221e646e14 100755
--- a/bin/find-unneeded-includes
+++ b/bin/find-unneeded-includes
@@ -155,7 +155,7 @@ def processIWYUOutput(iwyuOutput, moduleRules):
 toRemove.append("%s:%s: %s" % (currentFileName, lineno, 
include))
 continue
 
-match = re.match("- (.*);  // lines (.*)-.*", line)
+match = re.match("- (.*;(?: })*)*  // lines (.*)-.*", line)
 if match:
 fwdDecl = match.group(1)
 lineno = match.group(2)
___
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-08 Thread Libreoffice Gerrit user
 sw/qa/extras/layout/data/tdf120287c.fodt |   46 +++
 sw/qa/extras/layout/layout.cxx   |   11 +++
 sw/source/core/text/inftxt.cxx   |   20 -
 sw/source/core/text/inftxt.hxx   |3 ++
 sw/source/core/text/itrform2.cxx |1 
 5 files changed, 79 insertions(+), 2 deletions(-)

New commits:
commit cb9ba1c2d0202b1932b637d83a9458879a1f2e6a
Author: Miklos Vajna 
AuthorDate: Mon Oct 8 10:48:36 2018 +0200
Commit: Miklos Vajna 
CommitDate: Mon Oct 8 12:09:02 2018 +0200

Related: tdf#120287 sw layout, TabOverMargin: fix left margin handling

The old code only worked when left and first margin was 0; feed the
relevant margin to SwTextFormatInfo, so SwTextFormatInfo::GetLineWidth()
can compare against the right rectangle.

This way TabOverMargin compat flag results in layout that matches the
Word behavior for all 3 bugdocs from the bugreport.

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

diff --git a/sw/qa/extras/layout/data/tdf120287c.fodt 
b/sw/qa/extras/layout/data/tdf120287c.fodt
new file mode 100644
index ..f367336d79ec
--- /dev/null
+++ b/sw/qa/extras/layout/data/tdf120287c.fodt
@@ -0,0 +1,46 @@
+
+http://www.w3.org/1999/xlink"; 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" 
xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:config="urn:oas
 is:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooo="http://openoffice.org/2004/office"; 
xmlns:ooow="http://openoffice.org/2004/writer"; 
xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:xforms="http://www.w3.org/2002/xforms"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xhtml="http://www.w3.org/1999/xhtml"; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#"; 
xmlns:officeooo="http://openoffice.org/2009/office"; 
xmlns:tableooo="http://openoffice.org/2009/table"; 
xmlns:drawooo="http://openoffice.org/2010/draw"; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:formx="urn:openoffice:names:
 experimental:ooxml-odf-interop:xmlns:form:1.0" 
xmlns:css3t="http://www.w3.org/TR/css3-text/"; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.text">
+  
+
+  true
+  high-resolution
+  false
+
+  
+  
+
+  
+  
+
+  
+  
+
+
+  
+  
+
+
+  
+
+  
+
+  
+
+  
+  
+
+  
+
+
+  
+
+  
+  
+
+  
+  
+
+  b) x x x Lorem ipsum dolor sit amet, 
consetetur sadips test Lorem ipsum dolor sit amet, consetetur 
sadips1 2 3 4 5 6 7 8 9 a b sed diam
+
+  
+
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index fbef817cd8fd..083c2f16302b 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -59,6 +59,7 @@ public:
 void testTdf119875();
 void testTdf120287();
 void testTdf120287b();
+void testTdf120287c();
 
 CPPUNIT_TEST_SUITE(SwLayoutWriter);
 CPPUNIT_TEST(testRedlineFootnotes);
@@ -90,6 +91,7 @@ public:
 CPPUNIT_TEST(testTdf119875);
 CPPUNIT_TEST(testTdf120287);
 CPPUNIT_TEST(testTdf120287b);
+CPPUNIT_TEST(testTdf120287c);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -2571,6 +2573,15 @@ void SwLayoutWriter::testTdf120287b()
 assertXPath(pXmlDoc, "/root/page/body/txt[1]/Text[@nType='POR_TABRIGHT']", 
"nWidth", "17");
 }
 
+void SwLayoutWriter::testTdf120287c()
+{
+createDoc("tdf120287c.fodt");
+xmlDocPtr pXmlDoc = parseLayoutDump();
+// This was 2, the second line was not broken into a 2nd and a 3rd one,
+// rendering text outside the paragraph frame.
+assertXPath(pXmlDoc, "/root/page/body/txt[1]/LineBreak", 3);
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SwLayoutWriter);
 CPPUNIT_PLUGIN_IMPLEMENT();
 
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index 74a046232bcd..da7f5ce7066a 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -1706,9 +1706

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

2018-10-08 Thread Libreoffice Gerrit user
 sc/inc/dbdata.hxx   |2 +-
 sc/qa/unit/dataproviders_test.cxx   |8 
 sc/qa/unit/ucalc_formula.cxx|   14 +++---
 sc/qa/unit/ucalc_sharedformula.cxx  |8 
 sc/source/core/data/formulacell.cxx |2 +-
 sc/source/core/tool/dbdata.cxx  |4 ++--
 sc/source/filter/xml/xmldrani.cxx   |2 +-
 sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx |2 +-
 sc/source/ui/dbgui/dbnamdlg.cxx |6 +++---
 sc/source/ui/docshell/dbdocfun.cxx  |6 +++---
 sc/source/ui/docshell/docsh5.cxx|2 +-
 sc/source/ui/miscdlgs/dataproviderdlg.cxx   |2 +-
 12 files changed, 29 insertions(+), 29 deletions(-)

New commits:
commit 98dd271c7228a4cf03a995d98eba8a1d64ad92f8
Author: Noel Grandin 
AuthorDate: Fri Oct 5 12:18:05 2018 +0200
Commit: Noel Grandin 
CommitDate: Mon Oct 8 11:58:00 2018 +0200

use more std::unique_ptr in ScDBCollection::NamedDBs

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

diff --git a/sc/inc/dbdata.hxx b/sc/inc/dbdata.hxx
index ab0cf85b9cb4..9a260b4e8390 100644
--- a/sc/inc/dbdata.hxx
+++ b/sc/inc/dbdata.hxx
@@ -262,7 +262,7 @@ public:
 Deletes p if it could not be inserted, i.e. duplicate name.
 @return  if inserted, else .
  */
-bool insert(ScDBData* p);
+bool insert(std::unique_ptr p);
 
 void erase(const iterator& itr);
 bool empty() const;
diff --git a/sc/qa/unit/dataproviders_test.cxx 
b/sc/qa/unit/dataproviders_test.cxx
index e8da21fa0b2d..ceb682e3091f 100644
--- a/sc/qa/unit/dataproviders_test.cxx
+++ b/sc/qa/unit/dataproviders_test.cxx
@@ -49,7 +49,7 @@ private:
 void ScDataProvidersTest::testCSVImport()
 {
 ScDBData* pDBData = new ScDBData("testDB", 0, 0, 0, 10, 10);
-bool bInserted = m_pDoc->GetDBCollection()->getNamedDBs().insert(pDBData);
+bool bInserted = 
m_pDoc->GetDBCollection()->getNamedDBs().insert(std::unique_ptr(pDBData));
 CPPUNIT_ASSERT(bInserted);
 
 OUString aFileURL;
@@ -77,7 +77,7 @@ void ScDataProvidersTest::testCSVImport()
 void ScDataProvidersTest::testDataLargerThanDB()
 {
 ScDBData* pDBData = new ScDBData("testDB", 0, 0, 0, 1, 1);
-bool bInserted = m_pDoc->GetDBCollection()->getNamedDBs().insert(pDBData);
+bool bInserted = 
m_pDoc->GetDBCollection()->getNamedDBs().insert(std::unique_ptr(pDBData));
 CPPUNIT_ASSERT(bInserted);
 
 OUString aFileURL;
@@ -105,7 +105,7 @@ void ScDataProvidersTest::testDataLargerThanDB()
 void ScDataProvidersTest::testHTMLImport()
 {
 ScDBData* pDBData = new ScDBData("testDB", 0, 0, 0, 10, 10);
-bool bInserted = m_pDoc->GetDBCollection()->getNamedDBs().insert(pDBData);
+bool bInserted = 
m_pDoc->GetDBCollection()->getNamedDBs().insert(std::unique_ptr(pDBData));
 CPPUNIT_ASSERT(bInserted);
 
 OUString aFileURL;
@@ -145,7 +145,7 @@ void ScDataProvidersTest::testHTMLImport()
 void ScDataProvidersTest::testXMLImport()
 {
 ScDBData* pDBData = new ScDBData("testDB", 0, 0, 0, 10, 10);
-bool bInserted = m_pDoc->GetDBCollection()->getNamedDBs().insert(pDBData);
+bool bInserted = 
m_pDoc->GetDBCollection()->getNamedDBs().insert(std::unique_ptr(pDBData));
 CPPUNIT_ASSERT(bInserted);
 
 OUString aFileURL;
diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index 96e94f2d42f4..7c5004ca7660 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -155,10 +155,10 @@ void Test::testFormulaCreateStringFromTokens()
 
 for (size_t i = 0; i < SAL_N_ELEMENTS(aDBs); ++i)
 {
-ScDBData* pData = new ScDBData(
+std::unique_ptr pData( new ScDBData(
 OUString::createFromAscii(
-aDBs[i].pName), aDBs[i].nTab, aDBs[i].nCol1, aDBs[i].nRow1, 
aDBs[i].nCol2,aDBs[i].nRow2);
-bool bInserted = pDBs->getNamedDBs().insert(pData);
+aDBs[i].pName), aDBs[i].nTab, aDBs[i].nCol1, aDBs[i].nRow1, 
aDBs[i].nCol2,aDBs[i].nRow2) );
+bool bInserted = pDBs->getNamedDBs().insert(std::move(pData));
 CPPUNIT_ASSERT_MESSAGE(
 OString(
 "Failed to insert \"" + OString(aDBs[i].pName) + 
"\"").getStr(),
@@ -6792,8 +6792,8 @@ void Test::testFuncTableRef()
 
 // Insert "table" database range definition for A1:B4, with default
 // HasHeader=true and HasTotals=false.
-ScDBData* pData = new ScDBData( "table", 0,0,0, 1,3);
-bool bInserted = pDBs->getNamedDBs().insert(pData);
+std::unique_ptr pData(new ScDBData( "table", 0,0,0, 1,3));
+bool bInserted = pDBs->getNamedDBs().insert(std::move(pData));
 CPPUNIT_ASSERT_MESSAGE( "Failed 

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

2018-10-08 Thread Libreoffice Gerrit user
 sc/inc/dpobject.hxx|2 -
 sc/qa/unit/ucalc_pivottable.cxx|   44 ++---
 sc/source/core/data/dpobject.cxx   |8 ++
 sc/source/filter/excel/xipivot.cxx |6 ++---
 sc/source/filter/xml/xmldpimp.cxx  |   18 +++
 sc/source/ui/docshell/dbdocfun.cxx |2 -
 sc/source/ui/undo/undodat.cxx  |4 ---
 7 files changed, 40 insertions(+), 44 deletions(-)

New commits:
commit 0317541c6b5486647bacaa5255e4babfc5ce9c23
Author: Noel Grandin 
AuthorDate: Fri Oct 5 12:03:05 2018 +0200
Commit: Noel Grandin 
CommitDate: Mon Oct 8 11:54:53 2018 +0200

use more std::unique_ptr in ScDPCollection

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

diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx
index df422a461c97..5b69aaca9f2a 100644
--- a/sc/inc/dpobject.hxx
+++ b/sc/inc/dpobject.hxx
@@ -392,7 +392,7 @@ public:
 OUString CreateNewName() const;
 
 void FreeTable(const ScDPObject* pDPObj);
-SC_DLLPUBLIC void InsertNewTable(ScDPObject* pDPObj);
+SC_DLLPUBLIC void InsertNewTable(std::unique_ptr pDPObj);
 SC_DLLPUBLIC bool HasTable(const ScDPObject* pDPObj) const;
 
 SC_DLLPUBLIC SheetCaches& GetSheetCaches();
diff --git a/sc/qa/unit/ucalc_pivottable.cxx b/sc/qa/unit/ucalc_pivottable.cxx
index 01d922201fdf..e05dca044af0 100644
--- a/sc/qa/unit/ucalc_pivottable.cxx
+++ b/sc/qa/unit/ucalc_pivottable.cxx
@@ -222,7 +222,7 @@ void Test::testPivotTable()
 m_pDoc, ScRange(nCol1, nRow1, 0, nCol2, nRow2, 0), aFields, 
nFieldCount, false);
 
 ScDPCollection* pDPs = m_pDoc->GetDPCollection();
-pDPs->InsertNewTable(pDPObj);
+pDPs->InsertNewTable(std::unique_ptr(pDPObj));
 CPPUNIT_ASSERT_EQUAL_MESSAGE("there should be only one data pilot table.",
size_t(1), pDPs->GetCount());
 pDPObj->SetName(pDPs->CreateNewName());
@@ -266,7 +266,7 @@ void Test::testPivotTable()
 // don't reload the cache which should force the copy to use the old data
 // from the cache.
 ScDPObject* pDPObj2 = new ScDPObject(*pDPObj);
-pDPs->InsertNewTable(pDPObj2);
+pDPs->InsertNewTable(std::unique_ptr(pDPObj2));
 
 aOutRange = pDPObj2->GetOutRange();
 pDPObj2->ClearTableData();
@@ -351,7 +351,7 @@ void Test::testPivotTable()
 
 pDPObj = createDPFromRange(
 m_pDoc, ScRange(nCol1, nRow1, 0, nCol2, nRow2, 0), aFields, 
nFieldCount, false);
-pDPs->InsertNewTable(pDPObj);
+pDPs->InsertNewTable(std::unique_ptr(pDPObj));
 CPPUNIT_ASSERT_EQUAL_MESSAGE("there should be only one data pilot table.",
size_t(1), pDPs->GetCount());
 pDPObj->SetName(pDPs->CreateNewName());
@@ -401,7 +401,7 @@ void Test::testPivotTableLabels()
 m_pDoc, ScRange(nCol1, nRow1, 0, nCol2, nRow2, 0), aFields, 
nFieldCount, false);
 
 ScDPCollection* pDPs = m_pDoc->GetDPCollection();
-pDPs->InsertNewTable(pDPObj);
+pDPs->InsertNewTable(std::unique_ptr(pDPObj));
 CPPUNIT_ASSERT_EQUAL_MESSAGE("there should be only one data pilot table.",
size_t(1), pDPs->GetCount());
 pDPObj->SetName(pDPs->CreateNewName());
@@ -456,7 +456,7 @@ void Test::testPivotTableDateLabels()
 m_pDoc, ScRange(nCol1, nRow1, 0, nCol2, nRow2, 0), aFields, 
nFieldCount, false);
 
 ScDPCollection* pDPs = m_pDoc->GetDPCollection();
-pDPs->InsertNewTable(pDPObj);
+pDPs->InsertNewTable(std::unique_ptr(pDPObj));
 CPPUNIT_ASSERT_EQUAL_MESSAGE("there should be only one data pilot table.",
size_t(1), pDPs->GetCount());
 pDPObj->SetName(pDPs->CreateNewName());
@@ -538,7 +538,7 @@ void Test::testPivotTableFilters()
 m_pDoc, ScRange(nCol1, nRow1, 0, nCol2, nRow2, 0), aFields, 
nFieldCount, true);
 
 ScDPCollection* pDPs = m_pDoc->GetDPCollection();
-pDPs->InsertNewTable(pDPObj);
+pDPs->InsertNewTable(std::unique_ptr(pDPObj));
 CPPUNIT_ASSERT_EQUAL_MESSAGE("there should be only one data pilot table.",
size_t(1), pDPs->GetCount());
 pDPObj->SetName(pDPs->CreateNewName());
@@ -697,7 +697,7 @@ void Test::testPivotTableNamedSource()
 CPPUNIT_ASSERT_MESSAGE("Failed to create a new pivot table object.", 
pDPObj);
 
 ScDPCollection* pDPs = m_pDoc->GetDPCollection();
-pDPs->InsertNewTable(pDPObj);
+pDPs->InsertNewTable(std::unique_ptr(pDPObj));
 CPPUNIT_ASSERT_EQUAL_MESSAGE("there should be only one data pilot table.",
size_t(1), pDPs->GetCount());
 pDPObj->SetName(pDPs->CreateNewName());
@@ -972,7 +972,7 @@ void Test::testPivotTableDuplicateDataFields()
 m_pDoc, aDataRange, aFields, SAL_N_ELEMENTS(aFields), false);
 
 ScDPCollection* pDPs = m_pDoc->GetDPCollection();
-pDPs->InsertNewTable(pDPObj);
+pDPs->InsertNewTable(std::unique_ptr(pDPObj));
 CPPUNI

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

2018-10-08 Thread Libreoffice Gerrit user
 vcl/ios/dummies.cxx |   12 +---
 1 file changed, 9 insertions(+), 3 deletions(-)

New commits:
commit 80258f93448d278a50cd4aaf130d821a01361a34
Author: Tor Lillqvist 
AuthorDate: Mon Oct 8 11:36:34 2018 +0300
Commit: Tor Lillqvist 
CommitDate: Mon Oct 8 12:42:22 2018 +0300

Define a dummy GlyphCache class here for now

Change-Id: Ib26ed91ca90cc2f38e21cce54c093795b1059877

diff --git a/vcl/ios/dummies.cxx b/vcl/ios/dummies.cxx
index 641b0db2d6bf..94e2a86204ee 100644
--- a/vcl/ios/dummies.cxx
+++ b/vcl/ios/dummies.cxx
@@ -23,6 +23,9 @@
 #include "unx/fontmanager.hxx"
 #include "unx/gendata.hxx"
 
+class GlyphCache
+{
+};
 
 std::unique_ptr SvpSalInstance::CreatePrinter( SalInfoPrinter* /* 
pInfoPrinter */ )
 {
@@ -125,16 +128,19 @@ bool AquaSalGraphics::drawEPS( long, long, long, long, 
void*, sal_uLong )
 using namespace psp;
 
 GenericUnixSalData::GenericUnixSalData(GenericUnixSalDataType const t, 
SalInstance *const pInstance)
-: m_eType(t), m_pDisplay(nullptr), m_pPrintFontManager(nullptr)
+: m_eType(t)
+, m_pDisplay(nullptr)
+, m_pGlyphCache(new GlyphCache)
+, m_pPrintFontManager(nullptr)
 {
-m_pInstance = pInstance; SetSalData(this);
+m_pInstance = pInstance;
+SetSalData(this);
 }
 
 GenericUnixSalData::~GenericUnixSalData()
 {
 }
 
-
 PrintFontManager::~PrintFontManager()
 {
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-08 Thread Libreoffice Gerrit user
 ios/UnitTest/UnitTest.xcodeproj/project.pbxproj |4 
 1 file changed, 4 insertions(+)

New commits:
commit 8122551c799e6a083018e213b12b8901ae79625b
Author: Tor Lillqvist 
AuthorDate: Mon Oct 8 11:41:13 2018 +0300
Commit: Tor Lillqvist 
CommitDate: Mon Oct 8 12:42:57 2018 +0300

The UnitTest app needs the MobileCoreServices framework

(No idea why it complains about that only now. I did upgrade the Mac
where I am building this to 10.14, but not sure how that could have an
impact?)

Change-Id: Ifaf56dbbe380694049d4957cc3fa8174c602bc67

diff --git a/ios/UnitTest/UnitTest.xcodeproj/project.pbxproj 
b/ios/UnitTest/UnitTest.xcodeproj/project.pbxproj
index 78f19b221090..c8546167fc98 100644
--- a/ios/UnitTest/UnitTest.xcodeproj/project.pbxproj
+++ b/ios/UnitTest/UnitTest.xcodeproj/project.pbxproj
@@ -29,6 +29,7 @@
BE53561E215D189E0068B3B7 /* Assets.xcassets in Resources */ = 
{isa = PBXBuildFile; fileRef = BE53561D215D189E0068B3B7 /* Assets.xcassets */; 
};
BE535621215D189E0068B3B7 /* LaunchScreen.storyboard in 
Resources */ = {isa = PBXBuildFile; fileRef = BE53561F215D189E0068B3B7 /* 
LaunchScreen.storyboard */; };
BE535624215D189E0068B3B7 /* main.m in Sources */ = {isa = 
PBXBuildFile; fileRef = BE535623215D189E0068B3B7 /* main.m */; };
+   BE93D41D216B4ECA007A39F4 /* MobileCoreServices.framework in 
Frameworks */ = {isa = PBXBuildFile; fileRef = BE93D41B216B378E007A39F4 /* 
MobileCoreServices.framework */; };
BEA1A6FE215D1D9700A9323B /* libz.tbd in Frameworks */ = {isa = 
PBXBuildFile; fileRef = BEA1A6FD215D1D9700A9323B /* libz.tbd */; };
BEA1A700215D1D9F00A9323B /* libiconv.tbd in Frameworks */ = 
{isa = PBXBuildFile; fileRef = BEA1A6FF215D1D9F00A9323B /* libiconv.tbd */; };
 /* End PBXBuildFile section */
@@ -60,6 +61,7 @@
BE535620215D189E0068B3B7 /* Base */ = {isa = PBXFileReference; 
lastKnownFileType = file.storyboard; name = Base; path = 
Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
BE535622215D189E0068B3B7 /* Info.plist */ = {isa = 
PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; 
sourceTree = ""; };
BE535623215D189E0068B3B7 /* main.m */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; 
sourceTree = ""; };
+   BE93D41B216B378E007A39F4 /* MobileCoreServices.framework */ = 
{isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = 
MobileCoreServices.framework; path = 
System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
BEA1A6FD215D1D9700A9323B /* libz.tbd */ = {isa = 
PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; 
name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; };
BEA1A6FF215D1D9F00A9323B /* libiconv.tbd */ = {isa = 
PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; 
name = libiconv.tbd; path = usr/lib/libiconv.tbd; sourceTree = SDKROOT; };
BEA20D2C2163C2570032F67B /* salgdiutils.cxx */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = 
salgdiutils.cxx; path = ../../vcl/quartz/salgdiutils.cxx; sourceTree = 
""; };
@@ -199,6 +201,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+   BE93D41D216B4ECA007A39F4 /* 
MobileCoreServices.framework in Frameworks */,
BEA1A700215D1D9F00A9323B /* libiconv.tbd in 
Frameworks */,
BEA1A6FE215D1D9700A9323B /* libz.tbd in 
Frameworks */,
);
@@ -268,6 +271,7 @@
BEA1A6FC215D1D9700A9323B /* Frameworks */ = {
isa = PBXGroup;
children = (
+   BE93D41B216B378E007A39F4 /* 
MobileCoreServices.framework */,
BEA1A6FF215D1D9F00A9323B /* libiconv.tbd */,
BEA1A6FD215D1D9700A9323B /* libz.tbd */,
);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-08 Thread Libreoffice Gerrit user
 vcl/inc/headless/svpgdi.hxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 5231818a373ed17df751f5dc31c9edc4a0037127
Author: Tor Lillqvist 
AuthorDate: Mon Oct 8 11:36:12 2018 +0300
Commit: Tor Lillqvist 
CommitDate: Mon Oct 8 12:41:50 2018 +0300

No cairo used on iOS

Change-Id: I2fc713be404e68ea2fd0db43d0e93dfd62279da8

diff --git a/vcl/inc/headless/svpgdi.hxx b/vcl/inc/headless/svpgdi.hxx
index 9c7ee0391f47..d1a4d9264ecc 100644
--- a/vcl/inc/headless/svpgdi.hxx
+++ b/vcl/inc/headless/svpgdi.hxx
@@ -27,7 +27,9 @@
 
 #include 
 #include 
+#ifndef IOS
 #include "svpcairotextrender.hxx"
+#endif
 #include 
 
 #ifdef IOS
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-08 Thread Libreoffice Gerrit user
 sfx2/uiconfig/ui/templatedlg.ui |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 3bd549e30161c953e0ea7bf203782d18a6b6f309
Author: Cor Nouws 
AuthorDate: Tue Oct 2 18:00:15 2018 +0200
Commit: Heiko Tietze 
CommitDate: Mon Oct 8 11:41:06 2018 +0200

resolves tdf#120272 List templates in template dialog doesn't accept focus

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

diff --git a/sfx2/uiconfig/ui/templatedlg.ui b/sfx2/uiconfig/ui/templatedlg.ui
index 5f37291dab62..a1534928a8fb 100644
--- a/sfx2/uiconfig/ui/templatedlg.ui
+++ b/sfx2/uiconfig/ui/templatedlg.ui
@@ -1,5 +1,5 @@
 
-
+
 
   
   
@@ -250,7 +250,7 @@
 
   
 True
-False
+True
 True
 True
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-08 Thread Libreoffice Gerrit user
 officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu |2 +-
 sc/inc/strings.hrc|6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 0ab1e3101935606d8554acc1e8a3536845080c72
Author: Cor Nouws 
AuthorDate: Fri Sep 28 00:49:33 2018 +0200
Commit: Heiko Tietze 
CommitDate: Mon Oct 8 11:35:17 2018 +0200

tdf#113236 change menu "Tools > Protect Spreadsheet" to "Protect 
Spreadsheet Structure"

Change-Id: Id9f69e6f27610591ef0c62b7d0dec83fa1e4fe9a
Reviewed-on: https://gerrit.libreoffice.org/61066
Reviewed-by: Heiko Tietze 
Tested-by: Heiko Tietze 

diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
index 6ec13cb1333c..32159d1fd480 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
@@ -1652,7 +1652,7 @@
   
   
 
-  Protect ~Spreadsheet...
+  Protect ~Spreadsheet Structure...
 
 
   1
diff --git a/sc/inc/strings.hrc b/sc/inc/strings.hrc
index a91f295e1591..17916a1ab5ba 100644
--- a/sc/inc/strings.hrc
+++ b/sc/inc/strings.hrc
@@ -52,9 +52,9 @@
 #define SCSTR_TOTAL NC_("SCSTR_TOTAL", "%1 
results found")
 #define SCSTR_SKIPPED   NC_("SCSTR_SKIPPED", 
"(only %1 are listed)")
 // Attribute
-#define SCSTR_PROTECTDOCNC_("SCSTR_PROTECTDOC", 
"Protect Document")
-#define SCSTR_UNPROTECTDOC  NC_("SCSTR_UNPROTECTDOC", 
"Unprotect document")
-#define SCSTR_UNPROTECTTAB  NC_("SCSTR_UNPROTECTTAB", 
"Unprotect sheet")
+#define SCSTR_PROTECTDOCNC_("SCSTR_PROTECTDOC", 
"Protect Spreadsheet Structure")
+#define SCSTR_UNPROTECTDOC  NC_("SCSTR_UNPROTECTDOC", 
"Unprotect Spreadsheet Structure")
+#define SCSTR_UNPROTECTTAB  NC_("SCSTR_UNPROTECTTAB", 
"Unprotect Sheet")
 #define SCSTR_CHG_PROTECT   NC_("SCSTR_CHG_PROTECT", 
"Protect Records")
 #define SCSTR_CHG_UNPROTECT NC_("SCSTR_CHG_UNPROTECT", 
"Unprotect Records")
 #define SCSTR_PASSWORD  NC_("SCSTR_PASSWORD", 
"Password:")
___
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-08 Thread Libreoffice Gerrit user
 sw/source/core/inc/UndoTable.hxx |   26 +-
 sw/source/core/undo/untbl.cxx|  100 +++
 2 files changed, 63 insertions(+), 63 deletions(-)

New commits:
commit 4854acc7929ea58632c5d0f7f80a4adc3c62b8cd
Author: Miklos Vajna 
AuthorDate: Mon Oct 8 09:34:51 2018 +0200
Commit: Miklos Vajna 
CommitDate: Mon Oct 8 11:15:54 2018 +0200

sw: prefix members of SwUndoTableNdsChg

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

diff --git a/sw/source/core/inc/UndoTable.hxx b/sw/source/core/inc/UndoTable.hxx
index ccedcd83c06f..4eb0b8f1c60d 100644
--- a/sw/source/core/inc/UndoTable.hxx
+++ b/sw/source/core/inc/UndoTable.hxx
@@ -166,7 +166,7 @@ using SwUndoSaveSections = 
std::vector pSaveTable;
+std::unique_ptr m_pSaveTable;
 std::set m_Boxes;
 struct BoxMove
 {
@@ -175,14 +175,14 @@ class SwUndoTableNdsChg : public SwUndo
 BoxMove(sal_uLong idx, bool moved=false) : index(idx), hasMoved(moved) 
{};
 bool operator<(const BoxMove& other) const { return index < 
other.index; };
 };
-std::unique_ptr< std::set > pNewSttNds;
+std::unique_ptr< std::set > m_pNewSttNds;
 std::unique_ptr m_pDelSects;
-long nMin, nMax;// for redo of delete column
-sal_uLong nSttNode, nCurrBox;
-sal_uInt16 nCount, nRelDiff, nAbsDiff;
-TableChgWidthHeightType nSetColType;
-bool const bFlag;
-bool const bSameHeight;   // only used for SplitRow
+long m_nMin, m_nMax;// for redo of delete column
+sal_uLong m_nSttNode, m_nCurrBox;
+sal_uInt16 m_nCount, m_nRelDiff, m_nAbsDiff;
+TableChgWidthHeightType m_nSetColType;
+bool const m_bFlag;
+bool const m_bSameHeight;   // only used for SplitRow
 
 SwUndoTableNdsChg(SwUndoTableNdsChg const&) = delete;
 SwUndoTableNdsChg& operator=(SwUndoTableNdsChg const&) = delete;
@@ -212,11 +212,11 @@ public:
 void SetColWidthParam( sal_uLong nBoxIdx, sal_uInt16 nMode, 
TableChgWidthHeightType nType,
 SwTwips nAbsDif, SwTwips nRelDif )
 {
-nCurrBox = nBoxIdx;
-nCount = nMode;
-nSetColType = nType;
-nAbsDiff = static_cast(nAbsDif);
-nRelDiff = static_cast(nRelDif);
+m_nCurrBox = nBoxIdx;
+m_nCount = nMode;
+m_nSetColType = nType;
+m_nAbsDiff = static_cast(nAbsDif);
+m_nRelDiff = static_cast(nRelDif);
 }
 };
 
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index c56f2279be5b..c772f6c40da9 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -1469,15 +1469,15 @@ SwUndoTableNdsChg::SwUndoTableNdsChg( SwUndoId nAction,
 long nMn, long nMx,
 sal_uInt16 nCnt, bool bFlg, bool bSmHght )
 : SwUndo( nAction, rTableNd.GetDoc() ),
-nMin( nMn ), nMax( nMx ),
-nSttNode( rTableNd.GetIndex() ), nCurrBox( 0 ),
-nCount( nCnt ), nRelDiff( 0 ), nAbsDiff( 0 ),
-nSetColType( TableChgWidthHeightType::InvalidPos ),
-bFlag( bFlg ),
-bSameHeight( bSmHght )
+m_nMin( nMn ), m_nMax( nMx ),
+m_nSttNode( rTableNd.GetIndex() ), m_nCurrBox( 0 ),
+m_nCount( nCnt ), m_nRelDiff( 0 ), m_nAbsDiff( 0 ),
+m_nSetColType( TableChgWidthHeightType::InvalidPos ),
+m_bFlag( bFlg ),
+m_bSameHeight( bSmHght )
 {
 const SwTable& rTable = rTableNd.GetTable();
-pSaveTable.reset( new SaveTable( rTable ) );
+m_pSaveTable.reset( new SaveTable( rTable ) );
 
 // and remember selection
 ReNewBoxes( rBoxes );
@@ -1487,15 +1487,15 @@ SwUndoTableNdsChg::SwUndoTableNdsChg( SwUndoId nAction,
 const SwSelBoxes& rBoxes,
 const SwTableNode& rTableNd )
 : SwUndo( nAction, rTableNd.GetDoc() ),
-nMin( 0 ), nMax( 0 ),
-nSttNode( rTableNd.GetIndex() ), nCurrBox( 0 ),
-nCount( 0 ), nRelDiff( 0 ), nAbsDiff( 0 ),
-nSetColType( TableChgWidthHeightType::InvalidPos ),
-bFlag( false ),
-bSameHeight( false )
+m_nMin( 0 ), m_nMax( 0 ),
+m_nSttNode( rTableNd.GetIndex() ), m_nCurrBox( 0 ),
+m_nCount( 0 ), m_nRelDiff( 0 ), m_nAbsDiff( 0 ),
+m_nSetColType( TableChgWidthHeightType::InvalidPos ),
+m_bFlag( false ),
+m_bSameHeight( false )
 {
 const SwTable& rTable = rTableNd.GetTable();
-pSaveTable.reset( new SaveTable( rTable ) );
+m_pSaveTable.reset( new SaveTable( rTable ) );
 
 // and remember selection
 ReNewBoxes( rBoxes );
@@ -1524,7 +1524,7 @@ void SwUndoTableNdsChg::SaveNewBoxes( const SwTableNode& 
rTableNd,
 const SwTableSortBoxes& rTableBoxes = rTable.GetTabSortBoxes();
 
 OSL_ENSURE( ! IsDelBox(), "wrong Action" );
-pNewSttNds.reset( new std::set );
+m_pNewSttNds.reset( new std::set );
 
 size

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

2018-10-08 Thread Libreoffice Gerrit user
 starmath/inc/ElementsDockingWindow.hxx |4 ++--
 starmath/inc/action.hxx|4 ++--
 starmath/inc/node.hxx  |4 ++--
 starmath/inc/parse.hxx |2 +-
 starmath/inc/token.hxx |8 
 starmath/inc/view.hxx  |2 +-
 starmath/inc/visitors.hxx  |4 ++--
 starmath/source/accessibility.hxx  |4 ++--
 starmath/source/dialog.cxx |6 +++---
 starmath/source/document.cxx   |6 +++---
 starmath/source/mathmlimport.cxx   |2 +-
 starmath/source/mathtype.hxx   |2 +-
 starmath/source/ooxmlexport.hxx|2 +-
 starmath/source/uiobject.hxx   |2 +-
 starmath/source/view.cxx   |2 +-
 15 files changed, 27 insertions(+), 27 deletions(-)

New commits:
commit e494cc2942899fd92a2273eaed2bf41eb74ea8a9
Author: Noel Grandin 
AuthorDate: Mon Oct 8 09:34:29 2018 +0200
Commit: Noel Grandin 
CommitDate: Mon Oct 8 11:10:57 2018 +0200

loplugin:constfields in starmath

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

diff --git a/starmath/inc/ElementsDockingWindow.hxx 
b/starmath/inc/ElementsDockingWindow.hxx
index 1b4836d8ff62..1e1cf4111bff 100644
--- a/starmath/inc/ElementsDockingWindow.hxx
+++ b/starmath/inc/ElementsDockingWindow.hxx
@@ -33,8 +33,8 @@ class SmNode;
 class SmElement
 {
 std::unique_ptr mpNode;
-OUStringmaText;
-OUStringmaHelpText;
+OUString const  maText;
+OUString const  maHelpText;
 public:
 Point mBoxLocation;
 Size  mBoxSize;
diff --git a/starmath/inc/action.hxx b/starmath/inc/action.hxx
index 6684a7461e95..cde1e0ce3b47 100644
--- a/starmath/inc/action.hxx
+++ b/starmath/inc/action.hxx
@@ -28,8 +28,8 @@ class SmDocShell;
 class SmFormatAction: public SfxUndoAction
 {
 SmDocShell  *pDoc;
-SmFormataOldFormat;
-SmFormataNewFormat;
+SmFormat constaOldFormat;
+SmFormat constaNewFormat;
 
 public:
 SmFormatAction(SmDocShell *pDocSh, const SmFormat& rOldFormat, const 
SmFormat& rNewFormat);
diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx
index b9a11864b1a8..9ee746d9d04c 100644
--- a/starmath/inc/node.hxx
+++ b/starmath/inc/node.hxx
@@ -98,7 +98,7 @@ class SmNode : public SmRect
 SmFace  maFace;
 
 SmToken maNodeToken;
-SmNodeType  meType;
+SmNodeType const meType;
 SmScaleMode meScaleMode;
 RectHorAlignmeRectHorAlign;
 FontChangeMask  mnFlags;
@@ -435,7 +435,7 @@ public:
  */
 class SmSpecialNode : public SmTextNode
 {
-bool mbIsFromGreekSymbolSet;
+bool const mbIsFromGreekSymbolSet;
 
 protected:
 SmSpecialNode(SmNodeType eNodeType, const SmToken &rNodeToken, sal_uInt16 
_nFontDesc);
diff --git a/starmath/inc/parse.hxx b/starmath/inc/parse.hxx
index 851512030c5b..544ab1cf7dcb 100644
--- a/starmath/inc/parse.hxx
+++ b/starmath/inc/parse.hxx
@@ -66,7 +66,7 @@ class SmParser
 std::set< OUString >   m_aUsedSymbols;
 
 // CharClass representing a locale for parsing numbers
-CharClass m_aNumCC;
+CharClass const m_aNumCC;
 // pointer to System locale's CharClass, which is alive inside SM_MOD()
 const CharClass* m_pSysCC;
 
diff --git a/starmath/inc/token.hxx b/starmath/inc/token.hxx
index 7bf4da95f31f..c9093293ed43 100644
--- a/starmath/inc/token.hxx
+++ b/starmath/inc/token.hxx
@@ -128,10 +128,10 @@ struct SmToken
 struct SmTokenTableEntry
 {
 const sal_Char* pIdent;
-SmTokenType eType;
-sal_Unicode cMathChar;
-TG  nGroup;
-sal_uInt16  nLevel;
+SmTokenType const eType;
+sal_Unicode const cMathChar;
+TG const  nGroup;
+sal_uInt16 const  nLevel;
 };
 
 #endif
diff --git a/starmath/inc/view.hxx b/starmath/inc/view.hxx
index 7b6e741895bb..43221c4a66d2 100644
--- a/starmath/inc/view.hxx
+++ b/starmath/inc/view.hxx
@@ -215,7 +215,7 @@ class SmViewShell: public SfxViewShell
 std::unique_ptr mpImpl;
 
 VclPtr mpGraphic;
-SmGraphicController maGraphicController;
+SmGraphicController const maGraphicController;
 OUString maStatusText;
 
 bool mbPasteState;
diff --git a/starmath/inc/visitors.hxx b/starmath/inc/visitors.hxx
index 6f3b17e733c6..290f1bdeacb8 100644
--- a/starmath/inc/visitors.hxx
+++ b/starmath/inc/visitors.hxx
@@ -116,8 +116,8 @@ private:
 OutputDevice &mrDev;
 SmCaretPos maPos;
 /** Offset to draw from */
-Point maOffset;
-bool mbCaretVisible;
+Point const maOffset;
+bool const mbCaretVisible;
 protected:
 /** Default method for drawing pNodes */
 void DefaultVisit( SmNode* pNode ) override;
diff --git a/starmath/source/accessibility.hxx 
b/starmath/source/accessibility.hxx
index 8723d61e9309..e74b5581b0c4 100644
--- a/starmath/source/accessibility.hxx
+++ b/sta

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

2018-10-08 Thread Libreoffice Gerrit user
 stoc/source/corereflection/base.hxx  |6 
 stoc/source/corereflection/crcomp.cxx|2 
 stoc/source/implementationregistration/implreg.cxx   |  127 +++
 stoc/source/implementationregistration/mergekeys.cxx |4 
 stoc/source/inspect/introspection.cxx|2 
 stoc/source/invocation/invocation.cxx|2 
 stoc/source/invocation_adapterfactory/iafactory.cxx  |2 
 stoc/source/javavm/interact.hxx  |2 
 stoc/source/proxy_factory/proxyfac.cxx   |4 
 stoc/source/security/file_policy.cxx |2 
 stoc/source/security/permissions.cxx |8 -
 stoc/source/security/permissions.h   |2 
 stoc/source/servicemanager/servicemanager.cxx|2 
 stoc/source/uriproc/UriReference.hxx |   12 -
 store/source/lockbyte.cxx|8 -
 store/source/storcach.cxx|2 
 svgio/inc/svgcharacternode.hxx   |2 
 svgio/inc/svgnode.hxx|2 
 svgio/inc/svgpolynode.hxx|2 
 19 files changed, 86 insertions(+), 107 deletions(-)

New commits:
commit 0ddf3e0a628599d01356cb5262b93faca073ee9f
Author: Noel Grandin 
AuthorDate: Mon Oct 8 09:09:08 2018 +0200
Commit: Noel Grandin 
CommitDate: Mon Oct 8 11:09:03 2018 +0200

loplugin:constfields in stoc..svgio

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

diff --git a/stoc/source/corereflection/base.hxx 
b/stoc/source/corereflection/base.hxx
index 7c02a09edaf0..23c68aa83583 100644
--- a/stoc/source/corereflection/base.hxx
+++ b/stoc/source/corereflection/base.hxx
@@ -144,8 +144,8 @@ class IdlClassImpl
 rtl::Reference
  m_xReflection;
 
-OUString_aName;
-css::uno::TypeClass _eTypeClass;
+OUString const   _aName;
+css::uno::TypeClass const_eTypeClass;
 
 typelib_TypeDescription *   _pTypeDescr;
 
@@ -325,7 +325,7 @@ class IdlMemberImpl
 {
 rtl::Reference
 m_xReflection;
-OUString_aName;
+OUString const  _aName;
 
 typelib_TypeDescription *   _pTypeDescr;
 typelib_TypeDescription *   _pDeclTypeDescr;
diff --git a/stoc/source/corereflection/crcomp.cxx 
b/stoc/source/corereflection/crcomp.cxx
index acfcf765bb2e..26e0c8ecf8ad 100644
--- a/stoc/source/corereflection/crcomp.cxx
+++ b/stoc/source/corereflection/crcomp.cxx
@@ -39,7 +39,7 @@ class IdlCompFieldImpl
 , public XIdlField
 , public XIdlField2
 {
-sal_Int32   _nOffset;
+sal_Int32 const _nOffset;
 
 public:
 IdlCompFieldImpl( IdlReflectionServiceImpl * pReflection, const OUString & 
rName,
diff --git a/stoc/source/implementationregistration/implreg.cxx 
b/stoc/source/implementationregistration/implreg.cxx
index dd8997e5673b..f3c686f776c4 100644
--- a/stoc/source/implementationregistration/implreg.cxx
+++ b/stoc/source/implementationregistration/implreg.cxx
@@ -68,43 +68,28 @@ using namespace osl;
 
 namespace {
 
-struct StringPool
-{
-OUString slash_UNO_slash_REGISTRY_LINKS;
-OUString slash_IMPLEMENTATIONS;
-OUString slash_UNO;
-OUString slash_UNO_slash_SERVICES;
-OUString slash_UNO_slash_SINGLETONS;
-OUString slash_SERVICES;
-OUString slash_UNO_slash_LOCATION;
-OUString slash_UNO_slash_ACTIVATOR;
-OUString colon_old;
-OUString com_sun_star_registry_SimpleRegistry;
-OUString Registry;
-StringPool()
-: slash_UNO_slash_REGISTRY_LINKS( "/UNO/REGISTRY_LINKS")
-, slash_IMPLEMENTATIONS( "/IMPLEMENTATIONS" )
-, slash_UNO( "/UNO")
-, slash_UNO_slash_SERVICES( "/UNO/SERVICES")
-, slash_UNO_slash_SINGLETONS( "/UNO/SINGLETONS")
-, slash_SERVICES( "/SERVICES/" )
-, slash_UNO_slash_LOCATION( "/UNO/LOCATION" )
-, slash_UNO_slash_ACTIVATOR( "/UNO/ACTIVATOR" )
-, colon_old( ":old")
-, 
com_sun_star_registry_SimpleRegistry("com.sun.star.registry.SimpleRegistry" )
-, Registry( "Registry" )
-{}
-StringPool(const StringPool&) = delete;
-StringPool& operator=(const StringPool&) = delete;
-};
-
-const StringPool &spool()
-{
-static StringPool s_pool;
-
-return s_pool;
-}
-
+static constexpr OUStringLiteral slash_UNO_slash_REGISTRY_LINKS
+= "/UNO/REGISTRY_LINKS";
+static constexpr OUStringLiteral slash_IMPLEMENTATIONS
+=  "/IMPLEMENTATIONS";
+static constexpr OUStringLiteral slash_UNO
+= "/UNO";
+static constexpr OUStringLiteral slash_UNO_slash_SERVICES
+= "/UNO/SERVICES";
+static constexpr OUStringLiteral slash_UNO_slash_SINGLETONS
+= "/UNO/SINGLETONS";
+static constexpr OU

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

2018-10-08 Thread Libreoffice Gerrit user
 xmloff/source/text/txtimppr.cxx |   16 
 1 file changed, 8 insertions(+), 8 deletions(-)

New commits:
commit b5d5032ce9b40cdca233f6f8951fa056262ec041
Author: Stephan Bergmann 
AuthorDate: Mon Oct 8 09:24:44 2018 +0200
Commit: Stephan Bergmann 
CommitDate: Mon Oct 8 10:53:47 2018 +0200

Fix for --enable-debug --disable-assert-always-abort

...found by 


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

diff --git a/xmloff/source/text/txtimppr.cxx b/xmloff/source/text/txtimppr.cxx
index 25fa8ffb03f7..700af7aa44fc 100644
--- a/xmloff/source/text/txtimppr.cxx
+++ b/xmloff/source/text/txtimppr.cxx
@@ -199,7 +199,7 @@ void XMLTextImportPropertyMapper::FontDefaultsCheck(
 if( !pFontStyleName )
 {
 aAny <<= OUString();
-#if OSL_DEBUG_LEVEL > 0
+#if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG
 sal_Int16 nTmp = getPropertySetMapper()->GetEntryContextId(
 pFontFamilyName->mnIndex + 1 );
 assert(nTmp == CTF_FONTSTYLENAME || nTmp == 
CTF_FONTSTYLENAME_CJK || nTmp == CTF_FONTSTYLENAME_CTL);
@@ -212,7 +212,7 @@ void XMLTextImportPropertyMapper::FontDefaultsCheck(
 {
 aAny <<= sal_Int16(css::awt::FontFamily::DONTKNOW);
 
-#if OSL_DEBUG_LEVEL > 0
+#if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG
 sal_Int16 nTmp = getPropertySetMapper()->GetEntryContextId(
 pFontFamilyName->mnIndex + 2 );
 assert(nTmp == CTF_FONTFAMILY || nTmp == CTF_FONTFAMILY_CJK || 
nTmp == CTF_FONTFAMILY_CTL);
@@ -224,7 +224,7 @@ void XMLTextImportPropertyMapper::FontDefaultsCheck(
 if( !pFontPitch )
 {
 aAny <<= sal_Int16(css::awt::FontPitch::DONTKNOW);
-#if OSL_DEBUG_LEVEL > 0
+#if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG
 sal_Int16 nTmp = getPropertySetMapper()->GetEntryContextId(
 pFontFamilyName->mnIndex + 3 );
 assert(nTmp == CTF_FONTPITCH || nTmp == CTF_FONTPITCH_CJK || 
nTmp == CTF_FONTPITCH_CTL);
@@ -236,7 +236,7 @@ void XMLTextImportPropertyMapper::FontDefaultsCheck(
 if( !pFontCharSet )
 {
 aAny <<= static_cast(osl_getThreadTextEncoding());
-#if OSL_DEBUG_LEVEL > 0
+#if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG
 sal_Int16 nTmp = getPropertySetMapper()->GetEntryContextId(
 pFontFamilyName->mnIndex + 4 );
 assert(nTmp == CTF_FONTCHARSET || nTmp == CTF_FONTCHARSET_CJK 
|| nTmp == CTF_FONTCHARSET_CTL);
@@ -289,7 +289,7 @@ void lcl_SeparateBorder(
 {
 if( pAllBorderDistance && !pBorderDistances[nIndex] )
 {
-#if OSL_DEBUG_LEVEL > 0
+#if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG
 sal_Int16 nTmp = rMapper->GetEntryContextId(
 pAllBorderDistance->mnIndex + nIndex + 1 );
 if (CTF_CHARALLBORDERDISTANCE ==
@@ -311,7 +311,7 @@ void lcl_SeparateBorder(
 }
 if( pAllBorder && !pBorders[nIndex] )
 {
-#if OSL_DEBUG_LEVEL > 0
+#if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG
 sal_Int16 nTmp = rMapper->GetEntryContextId(
 pAllBorder->mnIndex + nIndex + 1 );
 if (CTF_CHARALLBORDER ==
@@ -545,7 +545,7 @@ void XMLTextImportPropertyMapper::finished(
 if (pAllParaMargin && !pParaMargins[i]
 && isNotDefaultRelSize(pAllParaMargin, getPropertySetMapper()))
 {
-#if OSL_DEBUG_LEVEL > 0
+#if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG
 sal_Int16 nTmp = getPropertySetMapper()->GetEntryContextId(
 pAllParaMargin->mnIndex + (2*i) + 2 );
 assert(nTmp >= CTF_PARALEFTMARGIN &&
@@ -556,7 +556,7 @@ void XMLTextImportPropertyMapper::finished(
 }
 if (pAllMargin && !pMargins[i])
 {
-#if OSL_DEBUG_LEVEL > 0
+#if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG
 sal_Int16 nTmp = getPropertySetMapper()->GetEntryContextId(
 pAllMargin->mnIndex + i + 1 );
 assert(nTmp >= CTF_MARGINLEFT && nTmp <= CTF_MARGINBOTTOM);
___
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-08 Thread Libreoffice Gerrit user
 sc/source/core/tool/cellform.cxx |   22 ++
 1 file changed, 10 insertions(+), 12 deletions(-)

New commits:
commit 2060909e8e9f1b3483b32fc15b5c70372825b1c3
Author: Serge Krot 
AuthorDate: Fri Oct 5 21:21:58 2018 +0200
Commit: Thorsten Behrens 
CommitDate: Mon Oct 8 10:42:45 2018 +0200

sc: speed-up: no usage of temp strings objects

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

diff --git a/sc/source/core/tool/cellform.cxx b/sc/source/core/tool/cellform.cxx
index ce40a1daefe4..858097ed8357 100644
--- a/sc/source/core/tool/cellform.cxx
+++ b/sc/source/core/tool/cellform.cxx
@@ -46,7 +46,7 @@ void ScCellFormat::GetString( ScRefCellValue& rCell, 
sal_uInt32 nFormat, OUStrin
 break;
 case CELLTYPE_VALUE:
 {
-double nValue = rCell.mfValue;
+const double & nValue = rCell.mfValue;
 if (!bNullVals && nValue == 0.0)
 rString.clear();
 else
@@ -76,7 +76,7 @@ void ScCellFormat::GetString( ScRefCellValue& rCell, 
sal_uInt32 nFormat, OUStrin
 }
 else
 {
-FormulaError nErrCode = pFCell->GetErrCode();
+const FormulaError nErrCode = pFCell->GetErrCode();
 
 if (nErrCode != FormulaError::NONE)
 rString = ScGlobal::GetErrorString(nErrCode);
@@ -120,36 +120,34 @@ OUString ScCellFormat::GetString(
 void ScCellFormat::GetInputString(
 ScRefCellValue& rCell, sal_uInt32 nFormat, OUString& rString, 
SvNumberFormatter& rFormatter, const ScDocument* pDoc )
 {
-OUString aString = rString;
 switch (rCell.meType)
 {
 case CELLTYPE_STRING:
 case CELLTYPE_EDIT:
-aString = rCell.getString(pDoc);
+rString = rCell.getString(pDoc);
 break;
 case CELLTYPE_VALUE:
-rFormatter.GetInputLineString(rCell.mfValue, nFormat, aString );
+rFormatter.GetInputLineString(rCell.mfValue, nFormat, rString );
 break;
 case CELLTYPE_FORMULA:
 {
 ScFormulaCell* pFC = rCell.mpFormula;
 if (pFC->IsEmptyDisplayedAsString())
-aString = EMPTY_OUSTRING;
+rString = EMPTY_OUSTRING;
 else if (pFC->IsValue())
-rFormatter.GetInputLineString(pFC->GetValue(), nFormat, 
aString);
+rFormatter.GetInputLineString(pFC->GetValue(), nFormat, 
rString);
 else
-aString = pFC->GetString().getString();
+rString = pFC->GetString().getString();
 
-FormulaError nErrCode = pFC->GetErrCode();
+const FormulaError nErrCode = pFC->GetErrCode();
 if (nErrCode != FormulaError::NONE)
-aString = EMPTY_OUSTRING;
+rString = EMPTY_OUSTRING;
 }
 break;
 default:
-aString = EMPTY_OUSTRING;
+rString = EMPTY_OUSTRING;
 break;
 }
-rString = aString;
 }
 
 OUString ScCellFormat::GetOutputString( ScDocument& rDoc, const ScAddress& 
rPos, ScRefCellValue& rCell )
___
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/qa sc/source

2018-10-08 Thread Libreoffice Gerrit user
 sc/qa/unit/parallelism.cxx   |   25 
 sc/source/core/tool/formulagroup.cxx |   43 ---
 2 files changed, 55 insertions(+), 13 deletions(-)

New commits:
commit 7bafe2441480e2b88d999b30b7f117f05e72c3b3
Author: Dennis Francis 
AuthorDate: Thu Oct 4 12:28:14 2018 +0530
Commit: Michael Meeks 
CommitDate: Mon Oct 8 10:30:29 2018 +0200

tdf#119904 : Generalize the fix for tdf#115093

The point is, if one of the FormulaTokens in the formula
is returned as the "result" FormulaToken, then we should not reuse
that same FormulaToken for each formula-cell in the group. If we do,
then we end up with whole group/batch having the same result.

Also adds a unit test specific to this bug.

This issue is non existent in master because "SoftwareInterpreter"
and related code were removed from master long after branch-off
to 6.1.

Change-Id: I10265211b5f14c82ed385401aa3fb838c492872d
Reviewed-on: https://gerrit.libreoffice.org/61362
Tested-by: Jenkins
Reviewed-by: Michael Meeks 

diff --git a/sc/qa/unit/parallelism.cxx b/sc/qa/unit/parallelism.cxx
index c5c196154123..2e74840a215d 100644
--- a/sc/qa/unit/parallelism.cxx
+++ b/sc/qa/unit/parallelism.cxx
@@ -52,6 +52,7 @@ public:
 void testVLOOKUPSUM();
 void testSingleRef();
 void testSUMIFImplicitRange();
+void testTdf119904();
 
 CPPUNIT_TEST_SUITE(ScParallelismTest);
 CPPUNIT_TEST(testSUMIFS);
@@ -60,6 +61,7 @@ public:
 CPPUNIT_TEST(testVLOOKUPSUM);
 CPPUNIT_TEST(testSingleRef);
 CPPUNIT_TEST(testSUMIFImplicitRange);
+CPPUNIT_TEST(testTdf119904);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -396,6 +398,29 @@ void ScParallelismTest::testSUMIFImplicitRange()
 m_pDoc->DeleteTab(0);
 }
 
+void ScParallelismTest::testTdf119904()
+{
+m_pDoc->InsertTab(0, "1");
+
+const size_t nNumRows = 200;
+for (size_t i = 0; i < nNumRows; ++i)
+{
+m_pDoc->SetValue(0, i, 0, static_cast(i));
+m_pDoc->SetFormula(ScAddress(1, i, 0), (i % 2) ? OUString("=TRUE()") : 
OUString("=FALSE()"), formula::FormulaGrammar::GRAM_NATIVE_UI);
+m_pDoc->SetFormula(ScAddress(2, i, 0), "=IF(B" + OUString::number(i+1) 
+
+   "; A" + OUString::number(i+1) + "; \"\")", 
formula::FormulaGrammar::GRAM_NATIVE_UI);
+}
+
+m_xDocShell->DoHardRecalc();
+
+for (size_t i = 0; i < nNumRows; ++i)
+{
+OString aMsg = "At row " + OString::number(i);
+CPPUNIT_ASSERT_EQUAL_MESSAGE(aMsg.getStr(), (i % 2) ? i : 0, 
static_cast(m_pDoc->GetValue(2, i, 0)));
+}
+m_pDoc->DeleteTab(0);
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(ScParallelismTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sc/source/core/tool/formulagroup.cxx 
b/sc/source/core/tool/formulagroup.cxx
index ffd961ae7b99..8d0da740508d 100644
--- a/sc/source/core/tool/formulagroup.cxx
+++ b/sc/source/core/tool/formulagroup.cxx
@@ -29,7 +29,9 @@
 #endif
 #include 
 #include 
+#include 
 
+#include 
 #include 
 #include 
 #include 
@@ -177,7 +179,12 @@ public:
 ScTokenArray aCode2;
 
 ScInterpreterContext aContext(mrDoc, mpFormatter);
-sal_uInt16 nNumNonOpenClose = mrCode.GetLen();
+const formula::FormulaToken* pLastDoubleResultToken = nullptr;
+const formula::FormulaToken* pLastStringResultToken = nullptr;
+size_t nNumToks = mrCode.GetLen();
+bool* pReuseFlags = static_cast(alloca(sizeof(bool)*nNumToks));
+if (pReuseFlags)
+std::fill_n(pReuseFlags, nNumToks, true);
 
 for (SCROW i = mnIdx; i <= mnLastIdx; ++i, maBatchTopPos.IncRow())
 {
@@ -213,7 +220,12 @@ public:
 aCode2.AddString(rPool.intern(OUString(pStr)));
 else
 {
-if ( ( pTargetTok->GetType() == 
formula::svString ) && ( nNumNonOpenClose > 1 ) )
+bool bReuseToken = pReuseFlags && 
pReuseFlags[nTokIdx];
+if (bReuseToken && pTargetTok == 
pLastStringResultToken)
+// Once pReuseFlags[nTokIdx] is set to 
false, it will continue to be so.
+bReuseToken = pReuseFlags[nTokIdx] = false;
+
+if ( ( pTargetTok->GetType() == 
formula::svString ) && bReuseToken )
 
pTargetTok->SetString(rPool.intern(OUString(pStr)));
 else
 {
@@ -227,7 +239,7 @@ public:
 // Value of NaN represents an empty cell.
 if ( !pTargetTok )
 aCode2.AddToken(ScEmptyCellToken(false, 
false));
-else if ( ( pTargetTok->GetType() != 
formula::svEmptyCell ) || ( nNumNonOpenClose == 1 ) )
+ 

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

2018-10-08 Thread Libreoffice Gerrit user
 svl/qa/unit/svl.cxx  |8 
 svl/source/crypto/cryptosign.cxx |6 +++---
 svl/source/fsstor/fsstorage.cxx  |4 ++--
 svl/source/items/style.cxx   |2 +-
 svl/source/misc/gridprinter.cxx  |2 +-
 svl/source/undo/undo.cxx |6 +++---
 svl/source/uno/pathservice.cxx   |2 +-
 7 files changed, 15 insertions(+), 15 deletions(-)

New commits:
commit 5181253946ca1877cc42050452aa6d733d6da3f1
Author: Noel Grandin 
AuthorDate: Mon Oct 8 08:27:51 2018 +0200
Commit: Noel Grandin 
CommitDate: Mon Oct 8 10:25:31 2018 +0200

loplugin:constfields in svl

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

diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx
index 5c14f6539baa..76730bec7127 100644
--- a/svl/qa/unit/svl.cxx
+++ b/svl/qa/unit/svl.cxx
@@ -233,9 +233,9 @@ void Test::testNumberFormat()
 };
 
 struct {
-NfIndexTableOffset eStart;
-NfIndexTableOffset eEnd;
-size_t nSize;
+NfIndexTableOffset const eStart;
+NfIndexTableOffset const eEnd;
+size_t const nSize;
 const char** pCodes;
 } aTests[] = {
 { NF_NUMBER_START, NF_NUMBER_END, 6, pNumber },
@@ -1101,7 +1101,7 @@ void Test::testIsNumberFormat()
 struct NumberFormatData
 {
 const char* pFormat;
-bool bIsNumber;
+bool const bIsNumber;
 } aTests[] = {
 { "20.3", true },
 { "2", true },
diff --git a/svl/source/crypto/cryptosign.cxx b/svl/source/crypto/cryptosign.cxx
index 0e86664c28c1..57da138391ed 100644
--- a/svl/source/crypto/cryptosign.cxx
+++ b/svl/source/crypto/cryptosign.cxx
@@ -118,9 +118,9 @@ Extension  ::=  SEQUENCE  {
 */
 
 typedef struct {
-SECItem extnID;
-SECItem critical;
-SECItem extnValue;
+SECItem const extnID;
+SECItem const critical;
+SECItem const extnValue;
 } Extension;
 
 /*
diff --git a/svl/source/fsstor/fsstorage.cxx b/svl/source/fsstor/fsstorage.cxx
index c05c788b1bd8..360083cf386a 100644
--- a/svl/source/fsstor/fsstorage.cxx
+++ b/svl/source/fsstor/fsstorage.cxx
@@ -67,10 +67,10 @@ using namespace ::com::sun::star;
 
 struct FSStorage_Impl
 {
-OUString m_aURL;
+OUString const m_aURL;
 
 ::ucbhelper::Content m_aContent;
-sal_Int32 m_nMode;
+sal_Int32 const m_nMode;
 
 std::unique_ptr<::comphelper::OInterfaceContainerHelper2> 
m_pListenersContainer; // list of listeners
 std::unique_ptr<::cppu::OTypeCollection> m_pTypeCollection;
diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx
index 3517c68cd718..acfa74f8e910 100644
--- a/svl/source/items/style.cxx
+++ b/svl/source/items/style.cxx
@@ -388,7 +388,7 @@ struct DoesStyleMatchStyleSheetPredicate final : public 
svl::StyleSheetPredicate
 return bMatches;
 }
 
-SfxStyleSheetIterator *mIterator;
+SfxStyleSheetIterator * const mIterator;
 };
 
 }
diff --git a/svl/source/misc/gridprinter.cxx b/svl/source/misc/gridprinter.cxx
index fc89fdea4688..9ed7f43b41d5 100644
--- a/svl/source/misc/gridprinter.cxx
+++ b/svl/source/misc/gridprinter.cxx
@@ -51,7 +51,7 @@ typedef mdds::multi_type_matrix MatrixImplType;
 struct GridPrinter::Impl
 {
 MatrixImplType maMatrix;
-bool mbPrint;
+bool const mbPrint;
 
 Impl( size_t nRows, size_t nCols, bool bPrint ) :
 maMatrix(nRows, nCols, OUString()), mbPrint(bPrint) {}
diff --git a/svl/source/undo/undo.cxx b/svl/source/undo/undo.cxx
index cc7cb8157ff8..3b2085108126 100644
--- a/svl/source/undo/undo.cxx
+++ b/svl/source/undo/undo.cxx
@@ -1298,11 +1298,11 @@ void SfxUndoManager::EmptyActionsChanged()
 
 struct SfxListUndoAction::Impl
 {
-sal_uInt16 mnId;
-ViewShellId mnViewShellId;
+sal_uInt16 const mnId;
+ViewShellId const mnViewShellId;
 
 OUString maComment;
-OUString maRepeatComment;
+OUString const maRepeatComment;
 
 Impl( sal_uInt16 nId, ViewShellId nViewShellId, const OUString& rComment, 
const OUString& rRepeatComment ) :
 mnId(nId), mnViewShellId(nViewShellId), maComment(rComment), 
maRepeatComment(rRepeatComment) {}
diff --git a/svl/source/uno/pathservice.cxx b/svl/source/uno/pathservice.cxx
index 8e49057f1e9c..90aeeddfc3ed 100644
--- a/svl/source/uno/pathservice.cxx
+++ b/svl/source/uno/pathservice.cxx
@@ -33,7 +33,7 @@ namespace com { namespace sun { namespace star { namespace 
uno {
 
 class PathService : public ::cppu::WeakImplHelper< css::frame::XConfigManager, 
css::lang::XServiceInfo >
 {
-SvtPathOptions m_aOptions;
+SvtPathOptions const m_aOptions;
 
 public:
 PathService()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-08 Thread Libreoffice Gerrit user
 sc/source/ui/dbgui/validate.cxx   |  144 ++
 sc/source/ui/inc/validate.hxx |   34 ++
 sc/uiconfig/scalc/ui/erroralerttabpage.ui |   30 +
 sc/uiconfig/scalc/ui/validationhelptabpage.ui |   22 +--
 4 files changed, 90 insertions(+), 140 deletions(-)

New commits:
commit fcd2f1c80f0523efb6941239c220bddd25d4cd7b
Author: Caolán McNamara 
AuthorDate: Sun Oct 7 19:53:09 2018 +0100
Commit: Caolán McNamara 
CommitDate: Mon Oct 8 10:14:07 2018 +0200

weld ScTPValidationError

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

diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx
index 937b081172fb..8f9711ef28f4 100644
--- a/sc/source/ui/dbgui/validate.cxx
+++ b/sc/source/ui/dbgui/validate.cxx
@@ -742,21 +742,20 @@ bool ScTPValidationHelp::FillItemSet( SfxItemSet* rArgSet 
)
 
 // Error Alert Page
 
-ScTPValidationError::ScTPValidationError( vcl::Window*   pParent,
-  const SfxItemSet& rArgSet )
+ScTPValidationError::ScTPValidationError(TabPageParent pParent,
+ const SfxItemSet& rArgSet)
 
 :   SfxTabPage  ( pParent,
-  "ErrorAlertTabPage" , 
"modules/scalc/ui/erroralerttabpage.ui" ,
+  "modules/scalc/ui/erroralerttabpage.ui", 
"ErrorAlertTabPage",
   &rArgSet )
-{
-get(m_pTsbShow,"tsbshow");
-get(m_pLbAction,"actionCB");
-get(m_pBtnSearch,"browseBtn");
-get(m_pEdtTitle,"erroralert_title");
-get(m_pFtError,"errormsg_label");
-get(m_pEdError,"errorMsg");
-m_pEdError->set_height_request(m_pEdError->GetTextHeight() * 12);
-m_pEdError->set_width_request(m_pEdError->approximate_char_width() * 50);
+, m_xTsbShow(m_xBuilder->weld_check_button("tsbshow"))
+, m_xLbAction(m_xBuilder->weld_combo_box("actionCB"))
+, m_xBtnSearch(m_xBuilder->weld_button("browseBtn"))
+, m_xEdtTitle(m_xBuilder->weld_entry("erroralert_title"))
+, m_xFtError(m_xBuilder->weld_label("errormsg_label"))
+, m_xEdError(m_xBuilder->weld_text_view("errorMsg"))
+{
+m_xEdError->set_size_request(m_xEdError->get_approximate_digit_width() * 
40, m_xEdError->get_height_rows(12));
 Init();
 }
 
@@ -765,32 +764,20 @@ ScTPValidationError::~ScTPValidationError()
 disposeOnce();
 }
 
-void ScTPValidationError::dispose()
-{
-m_pTsbShow.clear();
-m_pLbAction.clear();
-m_pBtnSearch.clear();
-m_pEdtTitle.clear();
-m_pFtError.clear();
-m_pEdError.clear();
-SfxTabPage::dispose();
-}
-
 void ScTPValidationError::Init()
 {
-m_pLbAction->SetSelectHdl( LINK( this, ScTPValidationError, 
SelectActionHdl ) );
-m_pBtnSearch->SetClickHdl( LINK( this, ScTPValidationError, ClickSearchHdl 
) );
+m_xLbAction->connect_changed(LINK(this, ScTPValidationError, 
SelectActionHdl));
+m_xBtnSearch->connect_clicked(LINK( this, ScTPValidationError, 
ClickSearchHdl));
 
-m_pLbAction->SelectEntryPos( 0 );
-m_pTsbShow->EnableTriState( false );
+m_xLbAction->set_active(0);
 
-SelectActionHdl( *m_pLbAction.get() );
+SelectActionHdl(*m_xLbAction);
 }
 
-VclPtr ScTPValidationError::Create( TabPageParentpParent,
-const SfxItemSet*  rArgSet )
+VclPtr ScTPValidationError::Create(TabPageParent pParent,
+   const SfxItemSet* rArgSet)
 {
-return VclPtr::Create( pParent.pParent, *rArgSet );
+return VclPtr::Create(pParent, *rArgSet);
 }
 
 void ScTPValidationError::Reset( const SfxItemSet* rArgSet )
@@ -798,49 +785,49 @@ void ScTPValidationError::Reset( const SfxItemSet* 
rArgSet )
 const SfxPoolItem* pItem;
 
 if ( rArgSet->GetItemState( FID_VALID_SHOWERR, true, &pItem ) == 
SfxItemState::SET )
-m_pTsbShow->SetState( static_cast(pItem)->GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE );
+m_xTsbShow->set_state( static_cast(pItem)->GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE );
 else
-m_pTsbShow->SetState( TRISTATE_TRUE );   // check by default
+m_xTsbShow->set_state( TRISTATE_TRUE );   // check by default
 
 if ( rArgSet->GetItemState( FID_VALID_ERRSTYLE, true, &pItem ) == 
SfxItemState::SET )
-m_pLbAction->SelectEntryPos( static_cast(pItem)->GetValue() );
+m_xLbAction->set_active( static_cast(pItem)->GetValue() );
 else
-m_pLbAction->SelectEntryPos( 0 );
+m_xLbAction->set_active( 0 );
 
 if ( rArgSet->GetItemState( FID_VALID_ERRTITLE, true, &pItem ) == 
SfxItemState::SET )
-m_pEdtTitle->SetText( static_cast(pItem)->GetValue() );
+m_xEdtTitle->set_text( static_cast(pItem)->GetValue() );
 else
-m_pEdtTitle->SetText( EMPTY_OUSTRING );
+m_xEdtTitle-

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

2018-10-08 Thread Libreoffice Gerrit user
 sc/source/ui/dbgui/tpsubt.cxx   |  140 
 sc/source/ui/inc/tpsubt.hxx |   27 ++---
 sc/uiconfig/scalc/ui/subtotaloptionspage.ui |   26 -
 3 files changed, 79 insertions(+), 114 deletions(-)

New commits:
commit cac00eeb8ca32e931efb9b245643bff815e84bb9
Author: Caolán McNamara 
AuthorDate: Sun Oct 7 19:31:54 2018 +0100
Commit: Caolán McNamara 
CommitDate: Mon Oct 8 10:13:31 2018 +0200

weld ScTpSubTotalOptions

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

diff --git a/sc/source/ui/dbgui/tpsubt.cxx b/sc/source/ui/dbgui/tpsubt.cxx
index 8ff412d68191..36b1d8a28c15 100644
--- a/sc/source/ui/dbgui/tpsubt.cxx
+++ b/sc/source/ui/dbgui/tpsubt.cxx
@@ -435,11 +435,10 @@ bool ScTpSubTotalGroup3::FillItemSet( SfxItemSet* rArgSet 
) { return FILLSET(3);
 
 // options tab page:
 
-ScTpSubTotalOptions::ScTpSubTotalOptions( vcl::Window*   pParent,
-  const SfxItemSet& rArgSet )
+ScTpSubTotalOptions::ScTpSubTotalOptions(TabPageParent pParent, const 
SfxItemSet& rArgSet)
 
 :   SfxTabPage  ( pParent,
-  "SubTotalOptionsPage", 
"modules/scalc/ui/subtotaloptionspage.ui" ,
+  "modules/scalc/ui/subtotaloptionspage.ui", 
"SubTotalOptionsPage",
   &rArgSet ),
 pViewData   ( nullptr ),
 pDoc( nullptr ),
@@ -447,17 +446,16 @@ ScTpSubTotalOptions::ScTpSubTotalOptions( vcl::Window*
   pParent,
 rSubTotalData   ( static_cast(
   rArgSet.Get( nWhichSubTotals )).
 GetSubTotalData() )
+, m_xBtnPagebreak(m_xBuilder->weld_check_button("pagebreak"))
+, m_xBtnCase(m_xBuilder->weld_check_button("case"))
+, m_xBtnSort(m_xBuilder->weld_check_button("sort"))
+, m_xFlSort(m_xBuilder->weld_label("label2"))
+, m_xBtnAscending(m_xBuilder->weld_radio_button("ascending"))
+, m_xBtnDescending(m_xBuilder->weld_radio_button("descending"))
+, m_xBtnFormats(m_xBuilder->weld_check_button("formats"))
+, m_xBtnUserDef(m_xBuilder->weld_check_button("btnuserdef"))
+, m_xLbUserDef(m_xBuilder->weld_combo_box("lbuserdef"))
 {
-get(pBtnPagebreak,"pagebreak");
-get(pBtnCase,"case");
-get(pBtnSort,"sort");
-get(pFlSort,"label2");
-get(pBtnAscending,"ascending");
-get(pBtnDescending,"descending");
-get(pBtnFormats,"formats");
-get(pBtnUserDef,"btnuserdef");
-get(pLbUserDef,"lbuserdef");
-
 Init();
 }
 
@@ -466,20 +464,6 @@ ScTpSubTotalOptions::~ScTpSubTotalOptions()
 disposeOnce();
 }
 
-void ScTpSubTotalOptions::dispose()
-{
-pBtnPagebreak.clear();
-pBtnCase.clear();
-pBtnSort.clear();
-pFlSort.clear();
-pBtnAscending.clear();
-pBtnDescending.clear();
-pBtnFormats.clear();
-pBtnUserDef.clear();
-pLbUserDef.clear();
-SfxTabPage::dispose();
-}
-
 void ScTpSubTotalOptions::Init()
 {
 const ScSubTotalItem& rSubTotalItem = static_cast(
@@ -490,41 +474,41 @@ void ScTpSubTotalOptions::Init()
 
 OSL_ENSURE( pViewData && pDoc, "ViewData or Document not found!" );
 
-pBtnSort->SetClickHdl( LINK( this, ScTpSubTotalOptions, CheckHdl ) );
-pBtnUserDef->SetClickHdl ( LINK( this, ScTpSubTotalOptions, CheckHdl ) );
+m_xBtnSort->connect_clicked( LINK( this, ScTpSubTotalOptions, CheckHdl ) );
+m_xBtnUserDef->connect_clicked( LINK( this, ScTpSubTotalOptions, CheckHdl 
) );
 
 FillUserSortListBox();
 }
 
-VclPtr ScTpSubTotalOptions::Create( TabPageParent pParent,
-const SfxItemSet* rArgSet )
+VclPtr ScTpSubTotalOptions::Create(TabPageParent pParent,
+   const SfxItemSet* rArgSet)
 {
-return VclPtr::Create( pParent.pParent, *rArgSet );
+return VclPtr::Create(pParent, *rArgSet);
 }
 
 void ScTpSubTotalOptions::Reset( const SfxItemSet* /* rArgSet */ )
 {
-pBtnPagebreak->Check ( rSubTotalData.bPagebreak );
-pBtnCase->Check  ( rSubTotalData.bCaseSens );
-pBtnFormats->Check   ( rSubTotalData.bIncludePattern );
-pBtnSort->Check  ( rSubTotalData.bDoSort );
-pBtnAscending->Check ( rSubTotalData.bAscending );
-pBtnDescending->Check( !rSubTotalData.bAscending );
+m_xBtnPagebreak->set_active( rSubTotalData.bPagebreak );
+m_xBtnCase->set_active( rSubTotalData.bCaseSens );
+m_xBtnFormats->set_active( rSubTotalData.bIncludePattern );
+m_xBtnSort->set_active( rSubTotalData.bDoSort );
+m_xBtnAscending->set_active( rSubTotalData.bAscending );
+m_xBtnDescending->set_active( !rSubTotalData.bAscending );
 
 if ( rSubTotalData.bUserDef )
 {
-pBtnUserDef->Check();
-pLbUserDef->Enable();

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

2018-10-08 Thread Libreoffice Gerrit user
 reportdesign/source/ui/dlg/dlgpage.cxx|   14 -
 reportdesign/source/ui/inc/dlgpage.hxx|7 
 reportdesign/source/ui/misc/UITools.cxx   |8 
 reportdesign/source/ui/report/ReportController.cxx|8 
 reportdesign/uiconfig/dbreport/ui/backgrounddialog.ui |   56 -
 reportdesign/uiconfig/dbreport/ui/chardialog.ui   |  176 --
 reportdesign/uiconfig/dbreport/ui/pagedialog.ui   |   80 ++--
 7 files changed, 290 insertions(+), 59 deletions(-)

New commits:
commit ecc6180d8158a6b4d998807bc78f78b9efcea677
Author: Caolán McNamara 
AuthorDate: Sun Oct 7 19:14:41 2018 +0100
Commit: Caolán McNamara 
CommitDate: Mon Oct 8 10:13:15 2018 +0200

weld ORptPageDialog

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

diff --git a/reportdesign/source/ui/dlg/dlgpage.cxx 
b/reportdesign/source/ui/dlg/dlgpage.cxx
index fa2a38ff9da0..23ee7bd4f6f6 100644
--- a/reportdesign/source/ui/dlg/dlgpage.cxx
+++ b/reportdesign/source/ui/dlg/dlgpage.cxx
@@ -36,11 +36,9 @@ namespace rptui
 |*
 \/
 
-ORptPageDialog::ORptPageDialog( vcl::Window* pParent, const SfxItemSet* pAttr, 
const OUString &rDialog)
-: SfxTabDialog (pParent, rDialog, "modules/dbreport/ui/" +
-rDialog.toAsciiLowerCase() +
-".ui", pAttr)
-, m_nCharBgdId(0)
+ORptPageDialog::ORptPageDialog(weld::Window* pParent, const SfxItemSet* pAttr, 
const OUString &rDialog)
+: SfxTabDialogController(pParent, "modules/dbreport/ui/" +
+rDialog.toAsciiLowerCase() + ".ui", rDialog.toUtf8(), pAttr)
 {
 SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
 
@@ -59,7 +57,7 @@ ORptPageDialog::ORptPageDialog( vcl::Window* pParent, const 
SfxItemSet* pAttr, c
 AddTabPage("fonteffects", pFact->GetTabPageCreatorFunc( 
RID_SVXPAGE_CHAR_EFFECTS ), nullptr );
 AddTabPage("position", pFact->GetTabPageCreatorFunc( 
RID_SVXPAGE_CHAR_POSITION ), nullptr );
 AddTabPage("asianlayout", pFact->GetTabPageCreatorFunc( 
RID_SVXPAGE_CHAR_TWOLINES ), nullptr );
-m_nCharBgdId = AddTabPage("background", pFact->GetTabPageCreatorFunc( 
RID_SVXPAGE_BACKGROUND ), nullptr );
+AddTabPage("background", pFact->GetTabPageCreatorFunc( 
RID_SVXPAGE_BACKGROUND ), nullptr );
 AddTabPage("alignment", pFact->GetTabPageCreatorFunc( 
RID_SVXPAGE_ALIGNMENT ), nullptr );
 }
 else
@@ -70,10 +68,10 @@ ORptPageDialog::ORptPageDialog( vcl::Window* pParent, const 
SfxItemSet* pAttr, c
 RemoveTabPage("asianlayout");
 }
 
-void ORptPageDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
+void ORptPageDialog::PageCreated(const OString& rId, SfxTabPage &rPage)
 {
 SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
-if (nId == m_nCharBgdId)
+if (rId == "background")
 {
 
aSet.Put(SfxUInt32Item(SID_FLAG_TYPE,static_cast(SvxBackgroundTabFlags::SHOW_HIGHLIGHTING)));
 rPage.PageCreated(aSet);
diff --git a/reportdesign/source/ui/inc/dlgpage.hxx 
b/reportdesign/source/ui/inc/dlgpage.hxx
index 49d82cf32502..5bebf0958945 100644
--- a/reportdesign/source/ui/inc/dlgpage.hxx
+++ b/reportdesign/source/ui/inc/dlgpage.hxx
@@ -28,17 +28,16 @@ namespace rptui
 |* Page setup tab dialog
 |*
 \/
-class ORptPageDialog : public SfxTabDialog
+class ORptPageDialog : public SfxTabDialogController
 {
 private:
 ORptPageDialog(const ORptPageDialog&) = delete;
 void operator =(const ORptPageDialog&) = delete;
 
-sal_uInt16 m_nCharBgdId;
 public:
 
-ORptPageDialog(vcl::Window* pParent, const SfxItemSet* pAttr, const 
OUString &rDialog);
-virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) override;
+ORptPageDialog(weld::Window* pParent, const SfxItemSet* pAttr, const 
OUString &rDialog);
+virtual void PageCreated(const OString& rId, SfxTabPage &rPage) override;
 };
 
 } // namespace rptui
diff --git a/reportdesign/source/ui/misc/UITools.cxx 
b/reportdesign/source/ui/misc/UITools.cxx
index 8bbfd8820fb0..48b509663757 100644
--- a/reportdesign/source/ui/misc/UITools.cxx
+++ b/reportdesign/source/ui/misc/UITools.cxx
@@ -710,16 +710,16 @@ bool openCharDialog( const 
uno::Reference& _rxRep
 lcl_CharPropertiesToItems( _rxReportControlFormat, *pDescriptor );
 
 {   // want the dialog to be destroyed before our set
-ScopedVclPtrInstance< ORptPageDialog > aDlg(pParent, 
pDescriptor.get(), "CharDialog");
+ORptPageDialog aDlg(Application::GetFrameWeld(_rxParentWindow), 
pDescriptor.get(), "CharDialog");
 uno::Reference< report::XShape > xShape( _rxReportControlFormat, 
uno::UNO_QUERY );
 if ( xShape.is() )
-aDlg->RemoveTabP

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

2018-10-08 Thread Libreoffice Gerrit user
 l10ntools/inc/srclex.hxx  |   35 --
 l10ntools/source/srclex.l |  241 --
 2 files changed, 276 deletions(-)

New commits:
commit f5bafb4d9824956984d3bd2e1bc868996beca7fc
Author: Andras Timar 
AuthorDate: Sun Oct 7 11:40:48 2018 +0200
Commit: Andras Timar 
CommitDate: Mon Oct 8 09:50:12 2018 +0200

l10ntools: remove unused srclex

Change-Id: I464309a2409485b34bd9662372bedd897b41e474
Reviewed-on: https://gerrit.libreoffice.org/61490
Tested-by: Jenkins
Reviewed-by: Andras Timar 

diff --git a/l10ntools/inc/srclex.hxx b/l10ntools/inc/srclex.hxx
deleted file mode 100644
index 0789d97351c2..
--- a/l10ntools/inc/srclex.hxx
+++ /dev/null
@@ -1,35 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_L10NTOOLS_INC_SRCLEX_HXX
-#define INCLUDED_L10NTOOLS_INC_SRCLEX_HXX
-
-#include 
-
-#include 
-
-extern "C" int WorkOnTokenSet( int, char* );
-extern "C" FILE * init(int, char **);
-extern "C" int SetError();
-extern "C" int GetError();
-extern "C" void Close();
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/l10ntools/source/srclex.l b/l10ntools/source/srclex.l
deleted file mode 100644
index 8fbb58361319..
--- a/l10ntools/source/srclex.l
+++ /dev/null
@@ -1,241 +0,0 @@
-
-%{
-/*
- * 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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-/*
- * lexer for parsing resource source files (*.src)
- */
-
-#include "sal/config.h"
-
-/* enlarge token buffer to tokenize whole strings */
-#undef YYLMAX
-#define YYLMAX 64000
-
-/* to enable debug output define LEXDEBUG */
-#define LEXDEBUG   1
-#ifdef LEXDEBUG
-#define OUTPUT fprintf
-#else
-#define OUTPUT(Par1,Par2);
-#endif
-
-/* table of possible token ids */
-#include "tokens.h"
-#include 
-#include 
-
-#include "sal/main.h"
-
-#include "srclex.hxx"
-
-#define YY_NO_UNISTD_H
-
-/* forwards */
-void YYWarning();
-%}
-
-%option yylineno
-%option never-interactive
-
-%p 24000
-%e 1200
-%n 500
-
-%%
-
-^[\t ]*"#pragma".* {
-   WorkOnTokenSet( PRAGMA, yytext );
-}
-
-^[ \t]*\n {
-   WorkOnTokenSet( EMPTYLINE, yytext );
-}
-
-[\t ]+ |
-^[\t ]*"#include".*|
-^[\t ]*"#undef".*  |
-"//".* |
-";"|
-"<"|
-">"|
-\n {
-   WorkOnTokenSet( IGNOREDTOKENS, yytext );
-}
-"/*"   {
-   char c1 = 0;
-   int c2 = yyinput();
-   char pChar[2];
-   pChar[1] = 0x00;
-   pChar[0] = c2;
-
-   WorkOnTokenSet( COMMENT, yytext );
-   WorkOnTokenSet( COMMENT, pChar );
-   for(;;) {
-   if ( c2 == EOF )
-   break;
-   if ( c1 == '*' && c2 == '/' )
-   break;
-   c1 = c2;
-   c2 = yyinput();
-   pChar[0] = c2;
-   WorkOnTokenSet( COMMENT, pChar );
-   }
-}
-
-^[\t ]*"#ifndef".+$|
-^[\t ]*"#ifdef".+$ |
-^[\t ]*"#if".+$|
-^[\t ]*"#elif".*$  |
-^[\t ]*"#else".*$  |
-^[\t ]*"#endif".*$ {
-   WorkOnTokenSet( CONDITION, yytext );
-}
-
-[a-zA-Z]+[\t ]+[^={\n]+[\t ] {
-/* defined Res */
-   WorkOnTokenSet( DEFINEDRES, yytext );
-}
-
-[a-zA-Z]+[ \t]+[^={;\n]+\n[ \t]*"#".*\n

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

2018-10-08 Thread Libreoffice Gerrit user
 cui/Library_cui.mk |3 
 cui/source/options/personalization.cxx |  547 -
 2 files changed, 345 insertions(+), 205 deletions(-)

New commits:
commit 6c97feec872e82711f58cce61b7796ed594e552c
Author: Muhammet Kara 
AuthorDate: Fri Oct 5 03:35:43 2018 +0300
Commit: Muhammet Kara 
CommitDate: Mon Oct 8 09:39:28 2018 +0200

Modernize personas under-the-hood - The search

* Upgrade the used mozilla API from v1.5 to v3
* Ditch Neon for curl
* Get rid of the get-HTML-then-search-within craziness

It is much faster and smarter now:
* Fetches the search results at once in JSON format,
  instead of repetitively making http calls for each persona,
  and relying on an ever-changing HTML design
* Doesn't redownload and overwrite files each time, so it is
  much faster for the second time of the same search query

This patch handles the search part. A follow-up patch will
handle the apply part.

Change-Id: I703fc7b510799e8c205566cf5ffad2a81f12c4ea
Reviewed-on: https://gerrit.libreoffice.org/61449
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 
Tested-by: Heiko Tietze 
Reviewed-by: Muhammet Kara 

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index 1c6185488f36..26900dec8e3a 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -66,8 +66,11 @@ $(eval $(call gb_Library_use_externals,cui,\
boost_headers \
$(call gb_Helper_optional,OPENCL,\
clew) \
+curl \
 icuuc \
 icu_headers \
+orcus-parser \
+orcus \
 ))
 ifeq ($(DISABLE_GUI),)
 $(eval $(call gb_Library_use_externals,cui,\
diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index d30c1c1d2347..bbaa03e8d3a1 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -40,11 +40,131 @@
 #include 
 #include 
 
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+
 using namespace com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::ucb;
 using namespace ::com::sun::star::beans;
 
+#ifdef UNX
+static const char kUserAgent[] = "LibreOffice PersonaDownloader/1.0 (Linux)";
+#else
+static const char kUserAgent[] = "LibreOffice PersonaDownloader/1.0 (unknown 
platform)";
+#endif
+
+struct PersonaInfo
+{
+OUString sSlug;
+OUString sName;
+OUString sPreviewURL;
+OUString sHeaderURL;
+OUString sFooterURL;
+OUString sTextColor;
+OUString sAccentColor;
+};
+
+namespace {
+
+// Callback to get the response data from server.
+size_t WriteCallback(void *ptr, size_t size,
+size_t nmemb, void *userp)
+{
+  if (!userp)
+return 0;
+
+  std::string* response = static_cast(userp);
+  size_t real_size = size * nmemb;
+  response->append(static_cast(ptr), real_size);
+  return real_size;
+}
+
+// Callback to get the response data from server to a file.
+size_t WriteCallbackFile(void *ptr, size_t size,
+size_t nmemb, void *userp)
+{
+  if (!userp)
+return 0;
+
+  SvStream* response = static_cast(userp);
+  size_t real_size = size * nmemb;
+  response->WriteBytes(ptr, real_size);
+  return real_size;
+}
+
+// Gets the content of the given URL and returns as a standard string
+std::string curlGet(const OString& rURL)
+{
+CURL* curl = curl_easy_init();
+
+if (!curl)
+return std::string();
+
+curl_easy_setopt(curl, CURLOPT_URL, rURL.getStr());
+curl_easy_setopt(curl, CURLOPT_USERAGENT, kUserAgent);
+
+std::string response_body;
+
+curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
+curl_easy_setopt(curl, CURLOPT_WRITEDATA,
+static_cast(&response_body));
+
+CURLcode cc = curl_easy_perform(curl);
+long http_code = 0;
+curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &http_code);
+
+if (http_code != 200)
+{
+SAL_WARN("cui.options", "Download failed. Error code: " << http_code);
+}
+
+if (cc != CURLE_OK)
+{
+SAL_WARN("cui.options", "curl error: " << cc);
+}
+
+return response_body;
+}
+
+// Downloads and saves the file at the given rURL to to a local path (sFileURL)
+void curlDownload(const OString& rURL, const OUString& sFileURL)
+{
+CURL* curl = curl_easy_init();
+SvFileStream aFile( sFileURL, StreamMode::WRITE );
+
+if (!curl)
+return;
+
+curl_easy_setopt(curl, CURLOPT_URL, rURL.getStr());
+curl_easy_setopt(curl, CURLOPT_USERAGENT, kUserAgent);
+
+curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallbackFile);
+curl_easy_setopt(curl, CURLOPT_WRITEDATA,
+static_cast(&aFile));
+
+CURLcode cc = curl_easy_perform(curl);
+long http_code = 0;
+curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &http_code);
+
+if (http_code != 200)
+{
+SAL_WARN("cui.options", "Download failed

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

2018-10-08 Thread Libreoffice Gerrit user
 vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx |4 ++--
 vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx  |4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 1aae63b62b8a745ba3345d73e59107c63f904c02
Author: Stephan Bergmann 
AuthorDate: Mon Oct 8 09:23:12 2018 +0200
Commit: Stephan Bergmann 
CommitDate: Mon Oct 8 09:23:12 2018 +0200

loplugin:external (--enable-gtk3-kde5)

Change-Id: Id096bd25cd6df5941eaec45f7573f5887ae51d79

diff --git a/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx 
b/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx
index 36ddcaf40f6e..3bf5ddcd29bc 100644
--- a/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx
+++ b/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx
@@ -107,8 +107,8 @@ OUString getResString(const char* pResId)
 }
 
 // handles the IPC commands for dialog execution and ends the dummy Gtk dialog 
once the IPC response is there
-void handleIpcForExecute(Gtk3KDE5FilePickerIpc* pFilePickerIpc, GtkWidget* 
pDummyDialog,
- bool* bResult)
+static void handleIpcForExecute(Gtk3KDE5FilePickerIpc* pFilePickerIpc, 
GtkWidget* pDummyDialog,
+bool* bResult)
 {
 auto id = pFilePickerIpc->sendCommand(Commands::Execute);
 pFilePickerIpc->readResponse(id, *bResult);
diff --git a/vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx 
b/vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx
index 12233efda281..550e1d8bb2d4 100644
--- a/vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx
+++ b/vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx
@@ -52,7 +52,7 @@ static void sendIpcArg(std::ostream& stream, const 
QStringList& list)
 }
 }
 
-void readCommandArgs(Commands command, QList& args)
+static void readCommandArgs(Commands command, QList& args)
 {
 switch (command)
 {
@@ -179,7 +179,7 @@ void readCommandArgs(Commands command, QList& 
args)
 };
 }
 
-void readCommands(FilePickerIpc* ipc)
+static void readCommands(FilePickerIpc* ipc)
 {
 while (!std::cin.eof())
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-08 Thread Libreoffice Gerrit user
 vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx |   43 +++
 vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.hxx |   55 ++---
 2 files changed, 57 insertions(+), 41 deletions(-)

New commits:
commit 788716cebad012513cc2798589b817b86cbf1bbc
Author: Michael Weghorn 
AuthorDate: Tue Oct 2 16:13:51 2018 +0200
Commit: Michael Weghorn 
CommitDate: Mon Oct 8 09:00:08 2018 +0200

tdf#120261 gtk3_kde5: Leave event handling on gtk3 side to gtk

This introduces a new thread that takes care of handling the IPC
command and result for executing the file picker
('Commands::Execute'), which is the only command in the file
picker that may block for a longer time until it receives its
result from the kde5 side (namely, when the dialog has been
closed).

While the file dialog is being executed, activate a dummy GTK dialog
that also takes care of handling events in its main loop as long
as the file dialog is shown. The dummy dialog is closed together
with the KDE file dialog.
(Since the actual KDE file dialog is run as a separate process,
this one is mostly "transparent" to the soffice process from the
point of view of a dialog.)

This allows dropping the custom event processing previously done
in 'Gtk3KDE5FilePickerIpc::readResponse()' that had the potential
to cause all kinds of problems, e.g. when another event related to
the file picker was triggered from a Java process via UNO.

Change-Id: I3d663253f09320f7a8e0d9ec32a8fd6ec191c189
Reviewed-on: https://gerrit.libreoffice.org/61253
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx 
b/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx
index 8cec9d853fbc..36ddcaf40f6e 100644
--- a/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx
+++ b/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx
@@ -106,6 +106,17 @@ OUString getResString(const char* pResId)
 return VclResId(pResId);
 }
 
+// handles the IPC commands for dialog execution and ends the dummy Gtk dialog 
once the IPC response is there
+void handleIpcForExecute(Gtk3KDE5FilePickerIpc* pFilePickerIpc, GtkWidget* 
pDummyDialog,
+ bool* bResult)
+{
+auto id = pFilePickerIpc->sendCommand(Commands::Execute);
+pFilePickerIpc->readResponse(id, *bResult);
+
+// end the dummy dialog
+gtk_widget_hide(pDummyDialog);
+}
+
 // Gtk3KDE5FilePicker
 
 Gtk3KDE5FilePickerIpc::Gtk3KDE5FilePickerIpc()
@@ -143,9 +154,29 @@ sal_Int16 Gtk3KDE5FilePickerIpc::execute()
 {
 auto restoreMainWindow = blockMainWindow();
 
-auto id = sendCommand(Commands::Execute);
+// dummy gtk dialog that will take care of processing events,
+// not meant to be actually seen by user
+GtkWidget* pDummyDialog = gtk_dialog_new();
+
 bool accepted = false;
-readResponse(id, accepted);
+
+// send IPC command and read response in a separate thread
+std::thread aIpcHandler(&handleIpcForExecute, this, pDummyDialog, 
&accepted);
+
+// make dummy dialog not to be seen by user
+gtk_window_set_decorated(GTK_WINDOW(pDummyDialog), false);
+gtk_window_set_default_size(GTK_WINDOW(pDummyDialog), 0, 0);
+gtk_window_set_accept_focus(GTK_WINDOW(pDummyDialog), false);
+// gtk_widget_set_opacity() only has the desired effect when widget is 
already shown
+gtk_widget_show(pDummyDialog);
+gtk_widget_set_opacity(pDummyDialog, 0);
+// run dialog, leaving event processing to GTK
+// dialog will be closed by the separate 'aIpcHandler' thread once the IPC 
response is there
+gtk_dialog_run(GTK_DIALOG(pDummyDialog));
+
+aIpcHandler.join();
+
+gtk_widget_destroy(pDummyDialog);
 
 if (restoreMainWindow)
 restoreMainWindow();
@@ -204,14 +235,6 @@ std::function 
Gtk3KDE5FilePickerIpc::blockMainWindow()
 };
 }
 
-void Gtk3KDE5FilePickerIpc::await(const std::future& future)
-{
-while (future.wait_for(std::chrono::milliseconds(1)) != 
std::future_status::ready)
-{
-GetGtkSalData()->Yield(false, true);
-}
-}
-
 void Gtk3KDE5FilePickerIpc::writeResponseLine(const std::string& line)
 {
 sal_uInt64 bytesWritten = 0;
diff --git a/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.hxx 
b/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.hxx
index 90ec4e1d55ab..a9584b11fcd2 100644
--- a/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.hxx
+++ b/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.hxx
@@ -30,7 +30,6 @@
 #include "filepicker_ipc_commands.hxx"
 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -105,43 +104,37 @@ public:
 
 template  void readResponse(uint64_t id, Args&... args)
 {
-// read synchronously from a background thread and run the eventloop 
until the value becomes available
-// this allows us to keep the GUI responsive and also enables access 
to the LO clipboard
 ArgsReader argsReader(args...);
-await(std::async(std:

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

2018-10-08 Thread Libreoffice Gerrit user
 vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx |  229 ++
 vcl/unx/gtk3_kde5/kde5_filepicker_ipc.hxx |   18 +-
 2 files changed, 186 insertions(+), 61 deletions(-)

New commits:
commit 3b36855e48f6ef3f4e52e998c52c531fe5191477
Author: Michael Weghorn 
AuthorDate: Tue Oct 2 16:08:35 2018 +0200
Commit: Michael Weghorn 
CommitDate: Mon Oct 8 08:59:36 2018 +0200

tdf#120261 gtk3_kde5: Read IPC cmds in own thread on kde5 side

Move reading IPC commands and arguments to those commands
to a separate thread and use the signal/slot mechanism
to notify 'FilePickerIpc' whenever a new command and its
arguments have been read.

This allows to handle the events of other commands that have been
received while the dialog is being executed.
This will be needed by a subsequent change that will modify
how IPC is handled on the gtk3 side.

Change-Id: Ia77b21045b0196710cbe164fb640b36a128d5081
Reviewed-on: https://gerrit.libreoffice.org/61252
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx 
b/vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx
index 15ff95f02074..12233efda281 100644
--- a/vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx
+++ b/vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx
@@ -27,7 +27,6 @@
 
 #include 
 
-#include "filepicker_ipc_commands.hxx"
 #include "kde5_filepicker.hxx"
 
 #include 
@@ -53,49 +52,180 @@ static void sendIpcArg(std::ostream& stream, const 
QStringList& list)
 }
 }
 
-FilePickerIpc::FilePickerIpc(KDE5FilePicker* filePicker, QObject* parent)
-: QObject(parent)
-, m_filePicker(filePicker)
-, m_stdinNotifier(new QSocketNotifier(fileno(stdin), 
QSocketNotifier::Read, this))
+void readCommandArgs(Commands command, QList& args)
 {
-connect(m_stdinNotifier, &QSocketNotifier::activated, this, 
&FilePickerIpc::readCommands);
+switch (command)
+{
+case Commands::SetTitle:
+{
+QString title;
+readIpcArgs(std::cin, title);
+args.append(title);
+break;
+}
+case Commands::SetWinId:
+{
+sal_uIntPtr winId = 0;
+readIpcArgs(std::cin, winId);
+QVariant aWinIdVariant;
+aWinIdVariant.setValue(winId);
+args.append(aWinIdVariant);
+break;
+}
+case Commands::SetMultiSelectionMode:
+{
+bool multiSelection = false;
+readIpcArgs(std::cin, multiSelection);
+args.append(multiSelection);
+break;
+}
+case Commands::SetDefaultName:
+{
+QString name;
+readIpcArgs(std::cin, name);
+args.append(name);
+break;
+}
+case Commands::SetDisplayDirectory:
+{
+QString dir;
+readIpcArgs(std::cin, dir);
+args.append(dir);
+break;
+}
+case Commands::AppendFilter:
+{
+QString title, filter;
+readIpcArgs(std::cin, title, filter);
+args.append(title);
+args.append(filter);
+break;
+}
+case Commands::SetCurrentFilter:
+{
+QString title;
+readIpcArgs(std::cin, title);
+args.append(title);
+break;
+}
+case Commands::SetValue:
+{
+sal_Int16 controlId = 0;
+sal_Int16 nControlAction = 0;
+bool value = false;
+readIpcArgs(std::cin, controlId, nControlAction, value);
+args.append(controlId);
+args.append(nControlAction);
+args.append(value);
+break;
+}
+case Commands::GetValue:
+{
+sal_Int16 controlId = 0;
+sal_Int16 nControlAction = 0;
+readIpcArgs(std::cin, controlId, nControlAction);
+args.append(controlId);
+args.append(nControlAction);
+break;
+}
+case Commands::EnableControl:
+{
+sal_Int16 controlId = 0;
+bool enabled = false;
+readIpcArgs(std::cin, controlId, enabled);
+args.append(controlId);
+args.append(enabled);
+break;
+}
+case Commands::SetLabel:
+{
+sal_Int16 controlId = 0;
+QString label;
+readIpcArgs(std::cin, controlId, label);
+args.append(controlId);
+args.append(label);
+break;
+}
+case Commands::GetLabel:
+{
+sal_Int16 controlId = 0;
+readIpcArgs(std::cin, controlId);
+args.append(controlId);
+break;
+}
+case Commands::AddCheckBox:
+{
+sal_Int16 controlId = 0;
+bool hidden = false;
+QString label;
+readIpcArgs