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

2018-02-06 Thread Tor Lillqvist
 extensions/source/ole/servprov.cxx |6 ++
 extensions/source/ole/servprov.hxx |4 ++--
 2 files changed, 4 insertions(+), 6 deletions(-)

New commits:
commit 72fefd7ab6fd551effcf821e4e257df2756bece1
Author: Tor Lillqvist 
Date:   Tue Feb 6 15:32:31 2018 +0200

These fields can be const

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

diff --git a/extensions/source/ole/servprov.cxx 
b/extensions/source/ole/servprov.cxx
index fc1841951762..3bdd595f8197 100644
--- a/extensions/source/ole/servprov.cxx
+++ b/extensions/source/ole/servprov.cxx
@@ -56,10 +56,9 @@ DEFINE_GUID(OID_ServiceManager, 0x82154420, 0xfbf, 0x11d4, 
0x83, 0x13, 0x0, 0x50
 ProviderOleWrapper_Impl::ProviderOleWrapper_Impl(const 
Reference& smgr,
  const 
Reference& xSFact, GUID const * pGuid)
 : m_xSingleServiceFactory(xSFact),
+  m_guid(*pGuid),
   m_smgr( smgr)
 {
-m_guid = *pGuid;
-
 Reference xInt = 
smgr->createInstance("com.sun.star.bridge.oleautomation.BridgeSupplier");
 
 if (xInt.is())
@@ -192,11 +191,10 @@ OneInstanceOleWrapper_Impl::OneInstanceOleWrapper_Impl(  
const Reference xInt = 
m_smgr->createInstance("com.sun.star.bridge.oleautomation.BridgeSupplier");
 
 if (xInt.is())
diff --git a/extensions/source/ole/servprov.hxx 
b/extensions/source/ole/servprov.hxx
index b7f46f980fdf..2c31d2e11419 100644
--- a/extensions/source/ole/servprov.hxx
+++ b/extensions/source/ole/servprov.hxx
@@ -100,7 +100,7 @@ protected:
 
 oslInterlockedCount m_refCount;
 Reference m_xSingleServiceFactory;
-GUIDm_guid;
+const GUID  m_guid;
 DWORD   m_factoryHandle;
 Reference m_bridgeSupplier;
 Reference m_smgr;
@@ -142,7 +142,7 @@ protected:
 
 oslInterlockedCount m_refCount;
 Reference   m_xInst;
-GUIDm_guid;
+const GUID  m_guid;
 DWORD   m_factoryHandle;
 Reference m_bridgeSupplier;
 Reference m_smgr;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-06 Thread Mike Kaganski
 sw/qa/extras/ooxmlimport/data/tdf114217.docx |binary
 sw/qa/extras/ooxmlimport/ooxmlimport.cxx |8 
 writerfilter/source/dmapper/DomainMapperTableHandler.cxx |4 +++-
 writerfilter/source/dmapper/DomainMapper_Impl.hxx|6 --
 writerfilter/source/dmapper/PropertyMap.cxx  |5 +
 5 files changed, 20 insertions(+), 3 deletions(-)

New commits:
commit 76d6fcd05c630a928dd3bd028d560792d9c904ca
Author: Mike Kaganski 
Date:   Wed Feb 7 01:03:32 2018 +0300

tdf#114217: Consider relative width when importing floating table

Unit test included

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

diff --git a/sw/qa/extras/ooxmlimport/data/tdf114217.docx 
b/sw/qa/extras/ooxmlimport/data/tdf114217.docx
new file mode 100644
index ..49f1ce164cbe
Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/tdf114217.docx differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx 
b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 449dae04ac59..61ef9aeaeb63 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -1574,6 +1574,14 @@ DECLARE_OOXMLIMPORT_TEST(testTdf113946, "tdf113946.docx")
 CPPUNIT_ASSERT_EQUAL( OUString("1696"), aTop );
 }
 
+DECLARE_OOXMLIMPORT_TEST(testTdf114217, "tdf114217.docx")
+{
+uno::Reference xDrawPageSupplier(mxComponent, 
uno::UNO_QUERY);
+uno::Reference xDrawPage = 
xDrawPageSupplier->getDrawPage();
+// This was 1, multi-page table was imported as a floating one.
+CPPUNIT_ASSERT_EQUAL(static_cast(0), xDrawPage->getCount());
+}
+
 // tests should only be added to ooxmlIMPORT *if* they fail round-tripping in 
ooxmlEXPORT
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx 
b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index 88b6b8de7c49..5fd55f41 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -1151,8 +1151,10 @@ void DomainMapperTableHandler::endTable(unsigned int 
nestedTableLevel, bool bTab
 // table is not in the body text.
 sal_Int32 nTableWidth = 0;
 m_aTableProperties->getValue(TablePropertyMap::TABLE_WIDTH, 
nTableWidth);
+sal_Int32 nTableWidthType = text::SizeType::FIX;
+m_aTableProperties->getValue(TablePropertyMap::TABLE_WIDTH_TYPE, 
nTableWidthType);
 if (m_rDMapper_Impl.GetSectionContext() && nestedTableLevel <= 1 
&& !m_rDMapper_Impl.IsInHeaderFooter())
-m_rDMapper_Impl.m_aPendingFloatingTables.emplace_back(xStart, 
xEnd, comphelper::containerToSequence(aFrameProperties), nTableWidth);
+m_rDMapper_Impl.m_aPendingFloatingTables.emplace_back(xStart, 
xEnd, comphelper::containerToSequence(aFrameProperties), nTableWidth, 
nTableWidthType);
 else
 {
 // m_xText points to the body text, get the current xText from 
m_rDMapper_Impl, in case e.g. we would be in a header.
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
index 0d7a693e83f8..19f2d80dbf15 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
@@ -356,17 +356,19 @@ struct FloatingTableInfo
 css::uno::Reference m_xEnd;
 css::uno::Sequence m_aFrameProperties;
 sal_Int32 m_nTableWidth;
+sal_Int32 m_nTableWidthType;
 /// Break type of the section that contains this table.
 sal_Int32 m_nBreakType = -1;
 
 FloatingTableInfo(css::uno::Reference const& xStart,
 css::uno::Reference const& xEnd,
 const css::uno::Sequence& 
aFrameProperties,
-sal_Int32 nTableWidth)
+sal_Int32 nTableWidth, sal_Int32 nTableWidthType)
 : m_xStart(xStart),
 m_xEnd(xEnd),
 m_aFrameProperties(aFrameProperties),
-m_nTableWidth(nTableWidth)
+m_nTableWidth(nTableWidth),
+m_nTableWidthType(nTableWidthType)
 {
 }
 css::uno::Any getPropertyValue(const OUString &propertyName);
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx 
b/writerfilter/source/dmapper/PropertyMap.cxx
index 11c49c99fc09..27ff89bdd0f5 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -38,6 +38,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1031,6 +1032,10 @@ bool SectionPropertyMap::FloatingTableConversion( 
DomainMapper_Impl& rDM_Impl, F
 sal_Int32 nTextAreaWidth = nPageWidth - GetLeftMargin() - GetRightMargin();
 // Count the layout width of the table.
 sal_Int32 nTableWidth = rInfo.m_nTableWidth;
+if (rInfo.m_nTableWidthType == text::SizeType::V

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

2018-02-06 Thread Julien Nabet
 sfx2/source/appl/appopen.cxx  |4 +--
 sfx2/source/appl/linksrc.cxx  |4 +--
 sfx2/source/appl/lnkbase2.cxx |   14 ---
 sfx2/source/control/bindings.cxx  |   13 +++---
 sfx2/source/control/dispatch.cxx  |   14 ---
 sfx2/source/control/emojiview.cxx |   16 +---
 sfx2/source/control/objface.cxx   |8 +++---
 sfx2/source/control/templatelocalview.cxx |   35 +++
 sfx2/source/control/thumbnailviewacc.cxx  |   38 --
 sfx2/source/control/unoctitm.cxx  |4 +--
 sfx2/source/dialog/dialoghelper.cxx   |7 ++---
 sfx2/source/dialog/filedlghelper.cxx  |   16 ++--
 sfx2/source/dialog/infobar.cxx|   22 -
 13 files changed, 87 insertions(+), 108 deletions(-)

New commits:
commit 9751a273747a2a6ba80c8b2e6012d788eee7c461
Author: Julien Nabet 
Date:   Tue Feb 6 19:25:01 2018 +0100

Use for-range loops in sfx2 (part1)

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

diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index cba90f661a86..c9a4d8ace070 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -703,10 +703,10 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
 rReq.AppendItem(SfxStringItem(SID_DOC_SERVICE, aDocService));
 }
 
-for(std::vector::const_iterator i = aURLList.begin(); i 
!= aURLList.end(); ++i)
+for (auto const& url : aURLList)
 {
 rReq.RemoveItem( SID_FILE_NAME );
-rReq.AppendItem( SfxStringItem( SID_FILE_NAME, *i ) );
+rReq.AppendItem( SfxStringItem( SID_FILE_NAME, url ) );
 
 // Run synchronous, so that not the next document is loaded
 // when rescheduling
diff --git a/sfx2/source/appl/linksrc.cxx b/sfx2/source/appl/linksrc.cxx
index dff4a7f9619f..f55bb31bab9d 100644
--- a/sfx2/source/appl/linksrc.cxx
+++ b/sfx2/source/appl/linksrc.cxx
@@ -111,8 +111,8 @@ public:
 
 ~SvLinkSource_Array_Impl()
 {
-for(std::vector::const_iterator it = 
mvData.begin(); it != mvData.end(); ++it)
-delete *it;
+for (auto const& elem : mvData)
+delete elem;
 }
 };
 
diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx
index 5d6ae348cd76..cf59639cde9e 100644
--- a/sfx2/source/appl/lnkbase2.cxx
+++ b/sfx2/source/appl/lnkbase2.cxx
@@ -158,22 +158,20 @@ static DdeTopic* FindTopic( const OUString & rLinkName, 
sal_uInt16* pItemStt )
 OUString sService( sNm.getToken( 0, cTokenSeparator, nTokenPos ) );
 
 DdeServices& rSvc = DdeService::GetServices();
-for (DdeServices::iterator aI = rSvc.begin(); aI != rSvc.end(); ++aI)
+for (auto const& elem : rSvc)
 {
-DdeService* pService = *aI;
-if( pService->GetName() == sService )
+if(elem->GetName() == sService)
 {
 // then we search for the Topic
 OUString sTopic( sNm.getToken( 0, cTokenSeparator, nTokenPos ) );
 if( pItemStt )
 *pItemStt = nTokenPos;
 
-std::vector& rTopics = pService->GetTopics();
+std::vector& rTopics = elem->GetTopics();
 
-for( std::vector::iterator iterTopic = rTopics.begin();
- iterTopic != rTopics.end(); ++iterTopic )
-if( (*iterTopic)->GetName() == sTopic )
-return *iterTopic;
+for (auto const& topic : rTopics)
+if( topic->GetName() == sTopic )
+return topic;
 break;
 }
 }
diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx
index c2511e29b541..87197d045ea5 100644
--- a/sfx2/source/control/bindings.cxx
+++ b/sfx2/source/control/bindings.cxx
@@ -184,8 +184,8 @@ SfxBindings::~SfxBindings()
 DeleteControllers_Impl();
 
 // Delete Caches
-for(auto it = pImpl->pCaches.begin(); it != pImpl->pCaches.end(); ++it)
-delete *it;
+for (auto const& cache : pImpl->pCaches)
+delete cache;
 
 DELETEZ( pImpl->pWorkWin );
 }
@@ -298,12 +298,9 @@ void SfxBindings::Update_Impl(SfxStateCache& rCache /*The 
up to date SfxStatusCa
 
 void SfxBindings::InvalidateSlotsInMap_Impl()
 {
-InvalidateSlotMap::const_iterator pIter = 
pImpl->m_aInvalidateSlots.begin();
-while ( pIter != pImpl->m_aInvalidateSlots.end() )
-{
-Invalidate( pIter->first );
-++pIter;
-}
+for (auto const& slot : pImpl->m_aInvalidateSlots)
+Invalidate( slot.first );
+
 pImpl->m_aInvalidateSlots.clear();
 }
 
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index 5834d8923d11..b05bffb1030c 100644
--- a/sfx2/source/co

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

2018-02-06 Thread Takeshi Abe
 starmath/inc/parse.hxx|   16 -
 starmath/source/parse.cxx |   78 +++---
 2 files changed, 47 insertions(+), 47 deletions(-)

New commits:
commit f0c171a1dd2698f5bec14f5cf00136477032c202
Author: Takeshi Abe 
Date:   Tue Feb 6 17:47:59 2018 +0900

starmath: Make SmParser::DoLine() etc. return std::unique_ptr

Change-Id: Ia85f66d3490471d7e0c2ce8a1947051be129acf9
Reviewed-on: https://gerrit.libreoffice.org/49276
Tested-by: Jenkins 
Reviewed-by: Takeshi Abe 

diff --git a/starmath/inc/parse.hxx b/starmath/inc/parse.hxx
index e3ec707d8bf4..ef51bcc61bdc 100644
--- a/starmath/inc/parse.hxx
+++ b/starmath/inc/parse.hxx
@@ -79,19 +79,19 @@ class SmParser
 
 // grammar
 std::unique_ptr DoTable();
-SmLineNode *DoLine();
+std::unique_ptr DoLine();
 std::unique_ptr DoExpression(bool bUseExtraSpaces = true);
-SmNode *DoRelation();
-SmNode *DoSum();
-SmNode *DoProduct();
-SmNode *DoSubSup(TG nActiveGroup, SmNode *pGivenNode);
-SmNode *DoOpSubSup();
-SmNode *DoPower();
+std::unique_ptr DoRelation();
+std::unique_ptr DoSum();
+std::unique_ptr DoProduct();
+std::unique_ptr DoSubSup(TG nActiveGroup, SmNode *pGivenNode);
+std::unique_ptr DoOpSubSup();
+std::unique_ptr DoPower();
 SmBlankNode *DoBlank();
 SmNode *DoTerm(bool bGroupNumberIdent);
 SmNode *DoEscape();
 SmOperNode *DoOperator();
-SmNode *DoOper();
+std::unique_ptr DoOper();
 SmStructureNode *DoUnOper();
 std::unique_ptr DoAlign(bool bUseExtraSpaces = true);
 SmStructureNode *DoFontAttribut();
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index e097e87e1b8e..a7c1a8a0d6d2 100644
--- a/starmath/source/parse.cxx
+++ b/starmath/source/parse.cxx
@@ -957,11 +957,11 @@ std::unique_ptr SmParser::DoTable()
 throw std::range_error("parser depth limit");
 
 std::vector> aLineArray;
-aLineArray.emplace_back(std::unique_ptr(DoLine()));
+aLineArray.push_back(DoLine());
 while (m_aCurToken.eType == TNEWLINE)
 {
 NextToken();
-aLineArray.emplace_back(std::unique_ptr(DoLine()));
+aLineArray.push_back(DoLine());
 }
 assert(m_aCurToken.eType == TEND);
 std::unique_ptr xSNode(new SmTableNode(m_aCurToken));
@@ -1000,7 +1000,7 @@ std::unique_ptr SmParser::DoAlign(bool 
bUseExtraSpaces)
 }
 
 // Postcondition: m_aCurToken.eType == TEND || m_aCurToken.eType == TNEWLINE
-SmLineNode *SmParser::DoLine()
+std::unique_ptr SmParser::DoLine()
 {
 DepthProtect aDepthGuard(m_nParseDepth);
 if (aDepthGuard.TooDeep())
@@ -1029,7 +1029,7 @@ SmLineNode *SmParser::DoLine()
 
 auto xSNode = o3tl::make_unique(m_aCurToken);
 xSNode->SetSubNodes(buildNodeArray(ExpressionArray));
-return xSNode.release();
+return std::move(xSNode); // this explicit move can be omitted since C++14
 }
 
 std::unique_ptr SmParser::DoExpression(bool bUseExtraSpaces)
@@ -1039,9 +1039,9 @@ std::unique_ptr SmParser::DoExpression(bool 
bUseExtraSpaces)
 throw std::range_error("parser depth limit");
 
 std::vector> RelationArray;
-RelationArray.emplace_back(std::unique_ptr(DoRelation()));
+RelationArray.push_back(DoRelation());
 while (m_aCurToken.nLevel >= 4)
-RelationArray.emplace_back(std::unique_ptr(DoRelation()));
+RelationArray.push_back(DoRelation());
 
 if (RelationArray.size() > 1)
 {
@@ -1059,49 +1059,49 @@ std::unique_ptr SmParser::DoExpression(bool 
bUseExtraSpaces)
 }
 }
 
-SmNode *SmParser::DoRelation()
+std::unique_ptr SmParser::DoRelation()
 {
 DepthProtect aDepthGuard(m_nParseDepth);
 if (aDepthGuard.TooDeep())
 throw std::range_error("parser depth limit");
 
-std::unique_ptr xFirst(DoSum());
+auto xFirst = DoSum();
 while (TokenInGroup(TG::Relation))
 {
 std::unique_ptr xSNode(new SmBinHorNode(m_aCurToken));
-std::unique_ptr xSecond(DoOpSubSup());
-std::unique_ptr xThird(DoSum());
+auto xSecond = DoOpSubSup();
+auto xThird = DoSum();
 xSNode->SetSubNodes(xFirst.release(), xSecond.release(), 
xThird.release());
 xFirst = std::move(xSNode);
 }
-return xFirst.release();
+return xFirst;
 }
 
-SmNode *SmParser::DoSum()
+std::unique_ptr SmParser::DoSum()
 {
 DepthProtect aDepthGuard(m_nParseDepth);
 if (aDepthGuard.TooDeep())
 throw std::range_error("parser depth limit");
 
-std::unique_ptr xFirst(DoProduct());
+auto xFirst = DoProduct();
 while (TokenInGroup(TG::Sum))
 {
 std::unique_ptr xSNode(new SmBinHorNode(m_aCurToken));
-std::unique_ptr xSecond(DoOpSubSup());
-std::unique_ptr xThird(DoProduct());
+auto xSecond = DoOpSubSup();
+auto xThird = DoProduct();
 xSNode->SetSubNodes(xFirst.release(), xSecond.release(), 
xThird.release());
 xFirst = std::move(xSNode);
 }
-return xFirst.release();

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

2018-02-06 Thread andreas_kainz
 sysui/desktop/icons/hicolor/1024x1024/apps/main.svg
 |1 +
 sysui/desktop/icons/hicolor/1024x1024/mimetypes/oasis-database.svg 
 |1 +
 sysui/desktop/icons/hicolor/1024x1024/mimetypes/oasis-drawing-template.svg 
 |1 +
 sysui/desktop/icons/hicolor/1024x1024/mimetypes/oasis-drawing.svg  
 |1 +
 sysui/desktop/icons/hicolor/1024x1024/mimetypes/oasis-formula.svg  
 |1 +
 sysui/desktop/icons/hicolor/1024x1024/mimetypes/oasis-master-document.svg  
 |1 +
 
sysui/desktop/icons/hicolor/1024x1024/mimetypes/oasis-presentation-template.svg 
|1 +
 sysui/desktop/icons/hicolor/1024x1024/mimetypes/oasis-presentation.svg 
 |1 +
 sysui/desktop/icons/hicolor/1024x1024/mimetypes/oasis-spreadsheet-template.svg 
 |1 +
 sysui/desktop/icons/hicolor/1024x1024/mimetypes/oasis-spreadsheet.svg  
 |1 +
 sysui/desktop/icons/hicolor/1024x1024/mimetypes/oasis-text-template.svg
 |1 +
 sysui/desktop/icons/hicolor/1024x1024/mimetypes/oasis-text.svg 
 |1 +
 sysui/desktop/icons/hicolor/1024x1024/mimetypes/oasis-web-template.svg 
 |1 +
 sysui/desktop/icons/hicolor/128x128/apps/base.svg  
 |1 +
 sysui/desktop/icons/hicolor/128x128/apps/calc.svg  
 |1 +
 sysui/desktop/icons/hicolor/128x128/apps/chart.svg 
 |1 +
 sysui/desktop/icons/hicolor/128x128/apps/draw.svg  
 |1 +
 sysui/desktop/icons/hicolor/128x128/apps/impress.svg   
 |1 +
 sysui/desktop/icons/hicolor/128x128/apps/main.svg  
 |1 +
 sysui/desktop/icons/hicolor/128x128/apps/math.svg  
 |1 +
 sysui/desktop/icons/hicolor/128x128/apps/startcenter.svg   
 |1 +
 sysui/desktop/icons/hicolor/128x128/apps/writer.svg
 |1 +
 sysui/desktop/icons/hicolor/128x128/mimetypes/oasis-database.svg   
 |1 +
 sysui/desktop/icons/hicolor/128x128/mimetypes/oasis-drawing-template.svg   
 |1 +
 sysui/desktop/icons/hicolor/128x128/mimetypes/oasis-drawing.svg
 |1 +
 sysui/desktop/icons/hicolor/128x128/mimetypes/oasis-formula.svg
 |1 +
 sysui/desktop/icons/hicolor/128x128/mimetypes/oasis-master-document.svg
 |1 +
 sysui/desktop/icons/hicolor/128x128/mimetypes/oasis-presentation-template.svg  
 |1 +
 sysui/desktop/icons/hicolor/128x128/mimetypes/oasis-presentation.svg   
 |1 +
 sysui/desktop/icons/hicolor/128x128/mimetypes/oasis-spreadsheet-template.svg   
 |1 +
 sysui/desktop/icons/hicolor/128x128/mimetypes/oasis-spreadsheet.svg
 |1 +
 sysui/desktop/icons/hicolor/128x128/mimetypes/oasis-text-template.svg  
 |1 +
 sysui/desktop/icons/hicolor/128x128/mimetypes/oasis-text.svg   
 |1 +
 sysui/desktop/icons/hicolor/128x128/mimetypes/oasis-web-template.svg   
 |1 +
 sysui/desktop/icons/hicolor/16x16/apps/base.svg
 |1 +
 sysui/desktop/icons/hicolor/16x16/apps/calc.svg
 |1 +
 sysui/desktop/icons/hicolor/16x16/apps/chart.svg   
 |1 +
 sysui/desktop/icons/hicolor/16x16/apps/draw.svg
 |1 +
 sysui/desktop/icons/hicolor/16x16/apps/impress.svg 
 |1 +
 sysui/desktop/icons/hicolor/16x16/apps/main.svg
 |1 +
 sysui/desktop/icons/hicolor/16x16/apps/math.svg
 |1 +
 sysui/desktop/icons/hicolor/16x16/apps/startcenter.svg 
 |1 +
 sysui/desktop/icons/hicolor/16x16/apps/writer.svg  
 |1 +
 sysui/desktop/icons/hicolor/16x16/mimetypes/oasis-database.svg 
 |1 +
 sysui/desktop/icons/hicolor/16x16/mimetypes/oasis-drawing-template.svg 
 |1 +
 sysui/desktop/icons/hicolor/16x16/mimetypes/oasis-drawing.svg  
 |1 +
 sysui/desktop/icons/hicolor/16x16/mimetypes/oasis-formula.svg  
 |1 +
 sysui/desktop/icons/hicolor/16x16/mimetypes/oasis-master-document.svg  
 |1 +
 sysui/desktop/icons/hicolor/16x16/mimetypes/oasis-presentation-template.svg
 |1 +
 sysui/desktop/icons/hicolor/16x16/mimetypes/oasis-presentation.svg 
 |1 +
 sysui/desktop/icons/hicolor/16x16/mimetypes/oasis-spreadsheet-template.svg 
 |1 +
 sysui/desktop/icons/hicolor/16x16/mimetypes/oasis-spreadsheet.svg  
 |1 +
 sysui/desktop/icons/hicolor/16x16/mimetypes/oasis-text-template.svg
 |1 +
 sysui/desktop/icons/hicolor/16x16/mimetypes/oasis-text.svg 
 |1 +
 sysui/desktop/icons/hicolor/16x16/mimetypes/oasis-web-template.svg 
 | 

Re: m68k UnoApiTarget/udkapi.rdb build fails ("Bad input")

2018-02-06 Thread Stephan Bergmann

On 06.02.2018 03:41, Aaron M. Ucko wrote:

   Bad input 
>/udkapi/com/sun/star/reflection/TypeDescriptionSearchDepth.idl>: 
cannot parse line 37: "out-of-range enum com.sun.star.reflection.TypeDescriptionSearchDepth member 
INFINITE value 9223372036854775807"


udkapi/com/sun/star/reflection/TypeDescriptionSearchDepth.idl:37 is

INFINITE = -1,

where "1" is lexed as TOK_INTEGER with sal_uInt64 value 1 in 
unoidl/source/sourceprovider-scanner.l (see nonZeroIntegerLiteral), and 
the negation is parsed as a unaryExpr in 
unoidl/source/sourceprovider-parser.y, converting the 
unoidl::detail::SourceProviderExpr::Uint(1) to 
unoidl::detail::SourceProviderExpr::Int(-1).  Then the whole enum member 
declaration is parsed as enumMember (second branch, with explicit 
initializer expr), but shouldn't cause the out-of-range check in the 
unoidl::detail::SourceProviderExpr::TYPE_INT case to fire.


Odd, esp. as 9223372036854775807 is 0x7FFF, not 
0x (aka -1). Smells like an issue with the compilation 
toolchain.

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


Re: m68k UnoApiTarget/udkapi.rdb build fails ("Bad input")

2018-02-06 Thread Rene Engelhard
Hi,

On Tue, Feb 06, 2018 at 09:02:58PM +, Caolán McNamara wrote:
> On Mon, 2018-02-05 at 21:41 -0500, Aaron M. Ucko wrote:
> > builds of LibreOffice for m68k
> ...
> > >/udkapi/com/sun/star/reflection/TypeDescripti
> > onSearchDepth.idl>: cannot parse line 37: "out-of-range enum
> > com.sun.star.reflection.TypeDescriptionSearchDepth member INFINITE
> > value 9223372036854775807"
> ...
> > Could somebody please take a look?
> 
> To be honest I added m68k support back in the day more for comedic
> effect than anything else so unless rene has any ideas I think you're
> probably on your own on debugging that.

Don't have (and yes, I saw the build failure and your bug report).

Quickly looked at the file, but tbh don't see why it should fail only on
m68k (no idea about arch-specifics which can cause that, though).

The latest round of m68k fixes (-mmlong-jump-table-offsets..) was done by
John Paul Adrian Glaubitz, though, maybe he has an idea.

Otherwise I am in the same boat as Caolan :)

Regards,

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


Re: m68k UnoApiTarget/udkapi.rdb build fails ("Bad input")

2018-02-06 Thread Caolán McNamara
On Mon, 2018-02-05 at 21:41 -0500, Aaron M. Ucko wrote:
> builds of LibreOffice for m68k
...
> >/udkapi/com/sun/star/reflection/TypeDescripti
> onSearchDepth.idl>: cannot parse line 37: "out-of-range enum
> com.sun.star.reflection.TypeDescriptionSearchDepth member INFINITE
> value 9223372036854775807"
...
> Could somebody please take a look?

To be honest I added m68k support back in the day more for comedic
effect than anything else so unless rene has any ideas I think you're
probably on your own on debugging that.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Questions about OpenGL

2018-02-06 Thread Julien Nabet

Hello,

During QA activity, I've noticed more and more bugs (including about 
crash) which involved OpenGL. In general, I advise to upgrade graphic 
driver first, then ask to provide opengl_device.log if the bug is still 
reproduced.


But there's also perf pb (see tdf#101162), whereas it should be bring 
better perfs.


So here are some questions about OpenGL part in LO:

1) Are there people which may help/put on cc about these bugs?

I found no one on https://wiki.documentfoundation.org/FindTheExpert

2) What about graphic card driver version/env blacklist politics?

I mean, I pushed this patch 
https://cgit.freedesktop.org/libreoffice/core/commit/?id=ecaabbf527f6f6207ce1ca8924708d23e6db45f5


(blacklist Intel HD Graphics 630 for non minimal version)

and there's another one in review 
(https://gerrit.libreoffice.org/#/c/49186/) which would blacklist 
completely the graphic card since even with the last version of graphic 
card driver, it crashes.


Should these blacklist items must regularly reviewed and so we should 
ping reporters to know if it's better with a graphic card driver upgrade?


Eg: once a year, ping reporters and ask them to upgrade their driver and 
give a new try?


I don't think it's realistic but don't know how to deal with this.

3) crashreports may show opengl part but how to know if it's due to a 
buggy driver or due to OpenGL implementing LO part?


Julien

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


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

2018-02-06 Thread Caolán McNamara
 svx/source/table/tablelayouter.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 68b1385af6413901b5172124e110a0cc2a849c56
Author: Caolán McNamara 
Date:   Tue Feb 6 14:40:02 2018 +

ofz#5949 Integer-overflow

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

diff --git a/svx/source/table/tablelayouter.cxx 
b/svx/source/table/tablelayouter.cxx
index 9bca986844c3..6b598c986687 100644
--- a/svx/source/table/tablelayouter.cxx
+++ b/svx/source/table/tablelayouter.cxx
@@ -499,7 +499,7 @@ sal_Int32 TableLayouter::distribute( LayoutVector& 
rLayouts, sal_Int32 nDistribu
 
 sal_Int32 nSize = 0;
 for( nIndex = 0; nIndex < nCount; ++nIndex )
-nSize += rLayouts[nIndex].mnSize;
+nSize = o3tl::saturating_add(nSize, rLayouts[nIndex].mnSize);
 
 return nSize;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-06 Thread Bartosz Kosiorek
 sc/source/core/tool/interpr1.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit e392f847bff0321d7884daabe74d91d90f07a0bf
Author: Bartosz Kosiorek 
Date:   Tue Feb 6 00:45:32 2018 +0100

tdf#114820 Fix reading external reference for VLOOKUP and HLOOKUP

Change-Id: Iaa1307123d97a740bdaf90647e8adff224211851
Reviewed-on: https://gerrit.libreoffice.org/49263
Tested-by: Jenkins 
Reviewed-by: Eike Rathke 
(cherry picked from commit 5c3d0a70a0edb182714725ef920d74667feffb0e)
Reviewed-on: https://gerrit.libreoffice.org/49316

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 53122e82cb40..f40637f33540 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -6634,7 +6634,9 @@ bool ScInterpreter::FillEntry(ScQueryEntry& rEntry)
 }
 }
 break;
-case svMatrix :
+case svExternalDoubleRef:
+case svExternalSingleRef:
+case svMatrix:
 {
 svl::SharedString aStr;
 const ScMatValType nType = 
GetDoubleOrStringFromMatrix(rItem.mfVal, aStr);
@@ -6651,6 +6653,7 @@ bool ScInterpreter::FillEntry(ScQueryEntry& rEntry)
 } // switch ( GetStackType() )
 return true;
 }
+
 void ScInterpreter::ScVLookup()
 {
 CalculateLookup(false);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-06 Thread Miklos Vajna
 framework/source/classes/taskcreator.cxx |4 ++--
 framework/source/services/taskcreatorsrv.cxx |2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 42c58f1c0ca4d310834f561f9145df340a893af1
Author: Miklos Vajna 
Date:   Tue Feb 6 11:36:35 2018 +0100

tdf#115218 framework: decouple HiddenForConversion from Hidden

Commit 4a0f506f0d8c2a017f0cf880481d3c0c32a48909 (framework: disable
layout manager in hidden frames, 2018-01-17) added support for bypassing
the framework layout manager for doc conversion purposes, but the Hidden
flag has the meaning that the doc is only initially hidden, it may be
visible later, so reusing Hidden broke mail merge.

Introduce a dedicated HiddenForConversion flag, clients interested in
improved performance can opt in for that, and this way behavior for
Hidden is not changing.

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

diff --git a/framework/source/classes/taskcreator.cxx 
b/framework/source/classes/taskcreator.cxx
index 0bf720b510ac..f9b6cac2842f 100644
--- a/framework/source/classes/taskcreator.cxx
+++ b/framework/source/classes/taskcreator.cxx
@@ -110,8 +110,8 @@ css::uno::Reference< css::frame::XFrame > 
TaskCreator::createTask( const OUStrin
 lArgs[4]   <<= aArg;
 
 bool bHidden
-= 
rDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_HIDDEN(), 
false);
-aArg.Name = "Hidden";
+= rDescriptor.getUnpackedValueOrDefault("HiddenForConversion", false);
+aArg.Name = "HiddenForConversion";
 aArg.Value <<= bHidden;
 lArgs[5] <<= aArg;
 
diff --git a/framework/source/services/taskcreatorsrv.cxx 
b/framework/source/services/taskcreatorsrv.cxx
index c0f98832cd69..5c60edf117fb 100644
--- a/framework/source/services/taskcreatorsrv.cxx
+++ b/framework/source/services/taskcreatorsrv.cxx
@@ -130,7 +130,7 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL 
TaskCreatorService::createI
 bool  bSupportPersistentWindowState = 
lArgs.getUnpackedValueOrDefault(ARGUMENT_SUPPORTPERSISTENTWINDOWSTATE , false );
 bool  bEnableTitleBarUpdate = 
lArgs.getUnpackedValueOrDefault(ARGUMENT_ENABLE_TITLEBARUPDATE, true );
 // If the frame is explicitly requested to be hidden.
-bool bHidden = lArgs.getUnpackedValueOrDefault("Hidden", false);
+bool bHidden = lArgs.getUnpackedValueOrDefault("HiddenForConversion", 
false);
 
 // We use FrameName property to set it as API name of the new created 
frame later.
 // But those frame names must be different from the set of special target 
names as e.g. _blank, _self etcpp !
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-06 Thread Mike Kaganski
 sw/qa/extras/uiwriter/uiwriter.cxx |   58 +
 sw/source/uibase/wrtsh/delete.cxx  |  126 ++---
 2 files changed, 121 insertions(+), 63 deletions(-)

New commits:
commit 3eedec8f4da95664ce553e3650990603e7f5c684
Author: Mike Kaganski 
Date:   Mon Feb 5 22:27:14 2018 +0300

tdf#115132: don't move out from current cell on Backspace/Delete

The behavior that cursor jumps out of current table box on Del/Backspace
introduced in commit 80a4b3b589a516392bcf1ad932619701eb95e250 is
not intuitive, and differs from what other word processors do.

Unit test included.

Change-Id: Icb53b6733f0d7394abe011fa067089e6693cf648
Reviewed-on: https://gerrit.libreoffice.org/49257
Tested-by: Jenkins 
Reviewed-by: Mike Kaganski 
Reviewed-on: https://gerrit.libreoffice.org/49292
Reviewed-by: Aron Budea 
Tested-by: Aron Budea 
(cherry picked from commit e690954bada93bae54e64a306c104da3d540834e)

diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx 
b/sw/qa/extras/uiwriter/uiwriter.cxx
index 95206bf7944d..bf98a565b1f2 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -242,6 +242,7 @@ public:
 void testCreateDocxAnnotation();
 void testTdf113790();
 void testTdf115013();
+void testTdf115132();
 
 CPPUNIT_TEST_SUITE(SwUiWriterTest);
 CPPUNIT_TEST(testReplaceForward);
@@ -371,6 +372,7 @@ public:
 CPPUNIT_TEST(testCreateDocxAnnotation);
 CPPUNIT_TEST(testTdf113790);
 CPPUNIT_TEST(testTdf115013);
+CPPUNIT_TEST(testTdf115132);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -4696,6 +4698,62 @@ void SwUiWriterTest::testTdf115013()
 utl::removeTree(aWorkDir);
 }
 
+void SwUiWriterTest::testTdf115132()
+{
+SwDoc* pDoc = createDoc();
+CPPUNIT_ASSERT(pDoc);
+SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+CPPUNIT_ASSERT(pWrtShell);
+
+std::vector vTestTableNames;
+
+// Create an empty paragraph that will separate first table from the rest
+pWrtShell->SplitNode();
+pWrtShell->SttDoc();
+// Create a table at the start of document body
+SwInsertTableOptions TableOpt(tabopts::DEFAULT_BORDER, 0);
+const SwTable* pTable = &pWrtShell->InsertTable(TableOpt, 2, 3);
+const SwTableFormat* pFormat = pTable->GetFrameFormat();
+CPPUNIT_ASSERT(pFormat);
+vTestTableNames.push_back(pFormat->GetName());
+pWrtShell->EndDoc();
+// Create a table after a paragraph
+pTable = &pWrtShell->InsertTable(TableOpt, 2, 3);
+pFormat = pTable->GetFrameFormat();
+CPPUNIT_ASSERT(pFormat);
+vTestTableNames.push_back(pFormat->GetName());
+// Create a table immediately after the previous
+pTable = &pWrtShell->InsertTable(TableOpt, 2, 3);
+pFormat = pTable->GetFrameFormat();
+CPPUNIT_ASSERT(pFormat);
+vTestTableNames.push_back(pFormat->GetName());
+// Create a nested table in the middle of last row
+pWrtShell->GotoTable(vTestTableNames.back());
+for (int i = 0; i < 4; ++i)
+pWrtShell->GoNextCell(false);
+pTable = &pWrtShell->InsertTable(TableOpt, 2, 3);
+pFormat = pTable->GetFrameFormat();
+CPPUNIT_ASSERT(pFormat);
+vTestTableNames.push_back(pFormat->GetName());
+
+// Now check that in any cell in all tables we don't go out of a cell
+// using Delete or Backspace. We test cases when a table is the first node;
+// when we are in a first/middle/last cell in a row; when there's a 
paragraph
+// before/after this cell; when there's another table before/after this 
cell;
+// in nested table.
+for (const auto& rTableName : vTestTableNames)
+{
+pWrtShell->GotoTable(rTableName);
+do {
+const SwStartNode* pNd = 
pWrtShell->GetSwCursor()->GetNode().FindTableBoxStartNode();
+pWrtShell->DelRight();
+CPPUNIT_ASSERT_EQUAL(pNd, 
pWrtShell->GetSwCursor()->GetNode().FindTableBoxStartNode());
+pWrtShell->DelLeft();
+CPPUNIT_ASSERT_EQUAL(pNd, 
pWrtShell->GetSwCursor()->GetNode().FindTableBoxStartNode());
+} while (pWrtShell->GoNextCell(false));
+}
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SwUiWriterTest);
 CPPUNIT_PLUGIN_IMPLEMENT();
 
diff --git a/sw/source/uibase/wrtsh/delete.cxx 
b/sw/source/uibase/wrtsh/delete.cxx
index e4833ae2d4dc..985dee6a9817 100644
--- a/sw/source/uibase/wrtsh/delete.cxx
+++ b/sw/source/uibase/wrtsh/delete.cxx
@@ -22,6 +22,7 @@
 #include 
 #include 
 #include 
+#include 
 
 inline void SwWrtShell::OpenMark()
 {
@@ -176,6 +177,10 @@ long SwWrtShell::DelLeft()
 
 if( SwCursorShell::IsSttPara())
 {
+// Start/EndAllAction to avoid cursor flickering
+UnoActionContext c(GetDoc());
+SwCursorShell::Push();
+
 // #i4032# Don't actually call a 'delete' if we
 // changed the table cell, compare DelRight().
 const SwStartNode * pSNdOld = pWasInTableNd ?
@@ -184,23 +189,34 @@ long SwWrtShell:

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

2018-02-06 Thread Kohei Yoshida
 sc/source/filter/orcus/interface.cxx |   35 ++-
 1 file changed, 30 insertions(+), 5 deletions(-)

New commits:
commit 105edb6adad2ef84ec11528168ecf4e2481f8302
Author: Kohei Yoshida 
Date:   Mon Feb 5 22:09:37 2018 -0500

Import cell borders as best as we can from orcus.

This is subject to the infamous Excel to Calc cell border mapping
fiasco.  The mapping is not perfect and there is certainly room for
improvement.

Change-Id: Ie224c8e08e6c0b8f13311460acbd371bd65a145f
Reviewed-on: https://gerrit.libreoffice.org/49266
Tested-by: Jenkins 
Reviewed-by: Kohei Yoshida 

diff --git a/sc/source/filter/orcus/interface.cxx 
b/sc/source/filter/orcus/interface.cxx
index b7bc5970f58c..e48250d14d52 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -54,6 +54,8 @@
 #include 
 #include 
 
+#include 
+
 using namespace com::sun::star;
 
 namespace os = orcus::spreadsheet;
@@ -1174,7 +1176,7 @@ ScOrcusStyles::border::border():
 
 ScOrcusStyles::border::border_line::border_line():
 meStyle(SvxBorderLineStyle::SOLID),
-maColor(COL_WHITE),
+maColor(COL_BLACK),
 mnWidth(0)
 {
 }
@@ -1617,39 +1619,62 @@ void ScOrcusStyles::set_border_style(
 border::border_line& current_line = maCurrentBorder.border_lines[dir];
 switch (style)
 {
-case orcus::spreadsheet::border_style_t::unknown:
-case orcus::spreadsheet::border_style_t::none:
 case orcus::spreadsheet::border_style_t::solid:
+current_line.meStyle = SvxBorderLineStyle::SOLID;
+current_line.mnWidth = oox::xls::API_LINE_THIN;
+break;
 case orcus::spreadsheet::border_style_t::hair:
+current_line.meStyle = SvxBorderLineStyle::SOLID;
+current_line.mnWidth = oox::xls::API_LINE_HAIR;
+break;
 case orcus::spreadsheet::border_style_t::medium:
+current_line.meStyle = SvxBorderLineStyle::SOLID;
+current_line.mnWidth = oox::xls::API_LINE_MEDIUM;
+break;
 case orcus::spreadsheet::border_style_t::thick:
+current_line.meStyle = SvxBorderLineStyle::SOLID;
+current_line.mnWidth = oox::xls::API_LINE_THICK;
+break;
 case orcus::spreadsheet::border_style_t::thin:
 current_line.meStyle = SvxBorderLineStyle::SOLID;
+current_line.mnWidth = oox::xls::API_LINE_THIN;
 break;
 case orcus::spreadsheet::border_style_t::dash_dot:
 current_line.meStyle = SvxBorderLineStyle::DASH_DOT;
+current_line.mnWidth = oox::xls::API_LINE_THIN;
 break;
 case orcus::spreadsheet::border_style_t::dash_dot_dot:
 current_line.meStyle = SvxBorderLineStyle::DASH_DOT_DOT;
+current_line.mnWidth = oox::xls::API_LINE_THIN;
 break;
 case orcus::spreadsheet::border_style_t::dashed:
 current_line.meStyle = SvxBorderLineStyle::DASHED;
+current_line.mnWidth = oox::xls::API_LINE_THIN;
 break;
 case orcus::spreadsheet::border_style_t::dotted:
 current_line.meStyle = SvxBorderLineStyle::DOTTED;
+current_line.mnWidth = oox::xls::API_LINE_THIN;
 break;
 case orcus::spreadsheet::border_style_t::double_border:
 current_line.meStyle = SvxBorderLineStyle::DOUBLE;
+current_line.mnWidth = oox::xls::API_LINE_THICK;
 break;
 case orcus::spreadsheet::border_style_t::medium_dash_dot:
 case orcus::spreadsheet::border_style_t::slant_dash_dot:
 current_line.meStyle = SvxBorderLineStyle::DASH_DOT;
+current_line.mnWidth = oox::xls::API_LINE_MEDIUM;
 break;
 case orcus::spreadsheet::border_style_t::medium_dash_dot_dot:
 current_line.meStyle = SvxBorderLineStyle::DASH_DOT_DOT;
+current_line.mnWidth = oox::xls::API_LINE_MEDIUM;
 break;
 case orcus::spreadsheet::border_style_t::medium_dashed:
 current_line.meStyle = SvxBorderLineStyle::DASHED;
+current_line.mnWidth = oox::xls::API_LINE_MEDIUM;
+break;
+case orcus::spreadsheet::border_style_t::unknown:
+case orcus::spreadsheet::border_style_t::none:
+current_line.mnWidth = oox::xls::API_LINE_NONE;
 break;
 default:
 ;
@@ -1658,13 +1683,13 @@ void ScOrcusStyles::set_border_style(
 }
 
 void ScOrcusStyles::set_border_color(orcus::spreadsheet::border_direction_t 
dir,
-orcus::spreadsheet::color_elem_t alpha,
+orcus::spreadsheet::color_elem_t /*alpha*/,
 orcus::spreadsheet::color_elem_t red,
 orcus::spreadsheet::color_elem_t green,
 orcus::spreadsheet::color_elem_t blue)
 {
 border::border_line& current_line = maCurrentBorder.border_lines[dir];
-current_line.maC

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

2018-02-06 Thread Bartosz Kosiorek
 sc/source/core/tool/interpr1.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit b8e9f185c509213b4daae018ec27483dacdad2a0
Author: Bartosz Kosiorek 
Date:   Tue Feb 6 00:45:32 2018 +0100

tdf#114820 Fix reading external reference for VLOOKUP and HLOOKUP

Change-Id: Iaa1307123d97a740bdaf90647e8adff224211851
Reviewed-on: https://gerrit.libreoffice.org/49263
Tested-by: Jenkins 
Reviewed-by: Eike Rathke 
(cherry picked from commit 5c3d0a70a0edb182714725ef920d74667feffb0e)
Reviewed-on: https://gerrit.libreoffice.org/49315

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index ab3f28d27225..e59b46c9f42f 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -7151,7 +7151,9 @@ bool ScInterpreter::FillEntry(ScQueryEntry& rEntry)
 }
 }
 break;
-case svMatrix :
+case svExternalDoubleRef:
+case svExternalSingleRef:
+case svMatrix:
 {
 svl::SharedString aStr;
 const ScMatValType nType = 
GetDoubleOrStringFromMatrix(rItem.mfVal, aStr);
@@ -7168,6 +7170,7 @@ bool ScInterpreter::FillEntry(ScQueryEntry& rEntry)
 } // switch ( GetStackType() )
 return true;
 }
+
 void ScInterpreter::ScVLookup()
 {
 CalculateLookup(false);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


HLC Colour Atlas v. 1.0 released

2018-02-06 Thread Christoph Schäfer
Hi all,



After a year of hard work freieFarbe/freeColour is pleased to announce the 
completion of its first major project, the "HLC Colour Atlas", which is a truly 
open colour system based on mathematics and unrestricted by copyrights or 
trademarks. It has been created by colour professionals from Germany and 
Switzerland.



The atlas comprises the following elements:


- a printed reference (A4, ring binder) of 2040 colours, based on the intuitive 
HLC colour model (Hue, Lightness, Chroma), with increments of 10 between each 
hue. It also includes colours that can't be reproduced in regular CMYK 
workflows (spot colours). Unlike commercial products, its colour precision is 
extremely high, with a DeltaE00 of 0.5, i.e. colour differences between two 
copies of the atlas can only be measured but not perceived, even by a trained 
eye. Each atlas is being produced with a Fogra-certified high-end proof printer 
on Fogra-certified paper by a Fogra-certified company. Each copy is also being 
shipped with a production record (ISO 12647-7:2016);


- a printed introduction and usage instructions in German and English;


- colour palettes with LAB values for Adobe software (ASE format) and in 
Swatchbooker's SBZ format, as well as sRGB versions for LibreOffice (SOC), GIMP 
(GPL) and Scribus 1.4.x (XML). Please note that Scribus 1.5.x already includes 
the SBZ file, and an sRGB version is being shipped with LibreOffice since 
version 5.4.x, as well as the current officially stable Scribus 1.4.6.


- A PDF master file of the atlas with layers for different output targets (e.g. 
sRGB, ISOCoatedV2);


- XSLX files with colour conversion tables and QC report;


- a CxF v.3 file which includes the colour data in spectral values.


All files are available for download here: 
https://www.freiefarbe.de/thema-farbe/software/


The latter is important, because we want to enable others to create their own 
reliable references without having to ask for permission or paying licence 
fees. Thus, an ink manufacturer can simply load the CxF file into its 
formulation software and create the correct mix for his particular inks. 
Manufacturers of other colourants (e.g. paint, textile colours or plastics) can 
do the same, provided their software is supporting CxF, which is an open 
standard. This is also the reason for us not to publish any mixing recipes, 
because all necessary data to reliably recreate a colour are in the CxF file, 
so the recipes can be created and customised by software.


Whilst the digital files are available for free download under a CC licence, 
the printed reference needs to be paid for, because production and 
certification are quite labour-intensive (introductory offer: EUR 99.-- until 
31 March 2018, later: EUR 149.-- plus VAT and shipment costs; see: 
https://shop.proof.de/index.php?language=en).


freieFarbe/freeColour are convinced that the "HLC Colour Atlas" is not only a 
true and open alternative to Pantone, HKS etc., but we also think that the very 
high quality standard of our printed reference will be hard to match. 


Our next step is to fill in the necessary paperwork to make this open colour 
system a DIN SPEC with the German industrial standards organisation DIN 
(April/May 2018). From there it will hopefully be moved on to ISO to make it an 
international standard (time frame unknown).


Special credits go to Matthias Betz, Holger Everding, Jan-Peter Homann and Eric 
A. Soder, who did all the heavy lifting, as well as Gregory Pittman, who wrote 
a Scribus script that reduced the creation of the print PDF for the Atlas to a 
matter of seconds. freieFarbe/freeColour is also grateful to ColorLogic GmbH, 
Epson Deutschland GmbH and GMG GmbH & Co KG for generous technical support. The 
high quality of the atlas is owed to the producer, Proof GmbH.



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


security bug - LibreOffice shouldn't require writable and executable memory pages at the same time

2018-02-06 Thread Hess THR
Hello, 

can someone please take a look at the: 

https://bugs.documentfoundation.org/show_bug.cgi?id=115486


Description:
https://stackoverflow.com/questions/48631646/why-does-libreoffice-wants-memory-pages-to-be-writable-and-executable-in-the-sam

OpenBSD has great features for Memory protection, ex.: W^X.

https://en.wikipedia.org/wiki/W^X

https://man.openbsd.org/mount

We can disable this function with the "wxallowed" mount point if a program 
needs it, and sadly, LibreOffice needs the wxallowed on /usr/local/. 

See example here: 
https://unix.stackexchange.com/questions/411405/libreoffice-soffice-oosplash-start-permission-denied-error

Steps to Reproduce:
1. Use a secure OS that can help security audits, ex.: OpenBSD
2. Remove the wxallowed flag from /usr/local to enable the W^X enforcing, reboot
3. LibreOffice cannot start anymore, because it requires writable and 
executable memory pages in the same time, see Wiki link, why is this dangerous: 
https://en.wikipedia.org/wiki/W%5EX

Actual Results:  
LibreOffice is prone to memory bugs if it needs writable/executable memory pages

Expected Results:
LibreOffice should run even with the remove wxallowed mount option. 


Reproducible: Always


User Profile Reset: No



Additional Info:
This is a security issue, please fix it with higher prio. 

Additional help from the forums: 

I'm not really sure but my guess is that LibreOffice is doing some dynamic 
runtime linking of a shared object and it's mapping the whole address space 
using one syscall with PROT_READ|PROT_WRITE|PROT_EXEC or alternatively PROT_ALL 
which i have already seen somewhere on github. – Karim Manaouil

@KarimManaouil Probably here: 

https://github.com/LibreOffice/core/blob/b7c5ddcdd05ceba73acb1a298500892d6157f360/bridges/source/cpp_uno/shared/vtablefactory.cxx

It creates anonymous mapping with RWX access. – Ivan
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [libreoffice-design] Re: Minutes of the design meeting 2018-Jan-31

2018-02-06 Thread Wol's lists

On 05/02/18 14:19, Adolfo Jayme Barrientos wrote:

Pedro, I think you’ve been here enough time to realize that, as many
similar libre software projects, this project is volunteer-driven,


Are those volunteers writing software for their own personal 
gratification, or are they writing it because they want other people to 
use it?


 and

that waving around your pet bugs without giving some support
(financial or otherwise) yourself is borderline offensive for those
who are contributing their free time… People are free to choose what
they will work on… And no, the age of a bug does not automatically
increase its importance. Just sayin’.


Yabbut ...

It's hard, but fixing paper-cut bugs is important. If we want LO to be 
good software that is widely used, ignoring bugs like that is a good way 
of losing users.


That's why I cursed blue murder when I was forced to switch at work from 
WordPerfect to Word, and I don't think the situation has improved much 
since then. :-)


Maybe create a GSOC project that is "fix papercut bugs"? It would 
certainly be very valuable ...


Jus sayin' :-)

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


m68k UnoApiTarget/udkapi.rdb build fails ("Bad input")

2018-02-06 Thread Aaron M. Ucko
At least on Debian's autobuilders, builds of LibreOffice for m68k have
been failing since 6.0.0 rc2 with a "Bad input" error when trying to build
UnoApiTarget/udkapi.rdb, per the below excerpt from
https://buildd.debian.org/status/fetch.php?pkg=libreoffice&arch=m68k&ver=1%3A6.0.0-1&stamp=1517451030&raw=0:

  [build DBc] udkapi
mkdir -p /<>/workdir/UnoApiTarget/  && 
RESPONSEFILE=/tmp/gbuild.RTQBLH && 
LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}"/<>/instdir/program:/<>/instdir/program"
   /<>/workdir/LinkTarget/Executable/unoidl-write  
/<>/udkapi @${RESPONSEFILE} 
/<>/workdir/UnoApiTarget/udkapi.rdb && rm -f ${RESPONSEFILE}   && 
LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}"/<>/instdir/program:/<>/instdir/program"
   /<>/instdir/sdk/bin/unoidl-check 
/<>/udkapi/type_reference/udkapi.idl --  
/<>/workdir/UnoApiTarget/udkapi.rdb
  [build MOD] codemaker
  Bad input 
>/udkapi/com/sun/star/reflection/TypeDescriptionSearchDepth.idl>:
 cannot parse line 37: "out-of-range enum 
com.sun.star.reflection.TypeDescriptionSearchDepth member INFINITE value 
9223372036854775807"
  /<>/solenv/gbuild/UnoApiTarget.mk:45: recipe for target 
'/<>/workdir/UnoApiTarget/udkapi.rdb' failed
  make[2]: *** [/<>/workdir/UnoApiTarget/udkapi.rdb] Error 1
  make[2]: *** Waiting for unfinished jobs

Could somebody please take a look?

Thanks!

FTR, this report corresponds to
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=889605 and
https://bugs.documentfoundation.org/show_bug.cgi?id=115450
(closed as out of scope; sorry for the noise there).

-- 
Aaron M. Ucko, KB1CJC (amu at alum.mit.edu, ucko at debian.org)
http://www.mit.edu/~amu/ | http://stuff.mit.edu/cgi/finger/?a...@monk.mit.edu
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2018-02-06 Thread Julien Nabet
 sd/source/ui/sidebar/MasterPageContainerProviders.cxx |1 -
 sfx2/source/control/templatelocalview.cxx |1 -
 vcl/source/gdi/bitmapex.cxx   |1 -
 3 files changed, 3 deletions(-)

New commits:
commit 39698e9fadcf58f59d54a9535e546a0304d87f63
Author: Julien Nabet 
Date:   Tue Feb 6 13:59:38 2018 +0100

Unused include pngread in sd/sfx2/vcl

Change-Id: Ieda300cf8b4ace3ac619c57abfba2ab2e56e4084
Reviewed-on: https://gerrit.libreoffice.org/49296
Tested-by: Jenkins 
Reviewed-by: Julien Nabet 

diff --git a/sd/source/ui/sidebar/MasterPageContainerProviders.cxx 
b/sd/source/ui/sidebar/MasterPageContainerProviders.cxx
index 4a1e21ce9897..6c4cd0ba0a34 100644
--- a/sd/source/ui/sidebar/MasterPageContainerProviders.cxx
+++ b/sd/source/ui/sidebar/MasterPageContainerProviders.cxx
@@ -28,7 +28,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/sfx2/source/control/templatelocalview.cxx 
b/sfx2/source/control/templatelocalview.cxx
index 76f79fafb501..ca96ca0ec8eb 100644
--- a/sfx2/source/control/templatelocalview.cxx
+++ b/sfx2/source/control/templatelocalview.cxx
@@ -23,7 +23,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include 
diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx
index 30e12324509e..bf3a57b2ad75 100644
--- a/vcl/source/gdi/bitmapex.cxx
+++ b/vcl/source/gdi/bitmapex.cxx
@@ -30,7 +30,6 @@
 #include 
 #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: sd/source

2018-02-06 Thread Julien Nabet
 sd/source/ui/slidesorter/cache/SlsBitmapFactory.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 6e783300aabd0efdf2eb75d777ae5b48d272f349
Author: Julien Nabet 
Date:   Tue Feb 6 13:04:50 2018 +0100

Removed unused include pngwrite in SlsBitmapFactory (sd)

Change-Id: I59305b415858ee1a826f03d9925624239cf7e582
Reviewed-on: https://gerrit.libreoffice.org/49291
Tested-by: Jenkins 
Reviewed-by: Julien Nabet 

diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapFactory.cxx 
b/sd/source/ui/slidesorter/cache/SlsBitmapFactory.cxx
index 467d121d84c6..645cd170c0ad 100644
--- a/sd/source/ui/slidesorter/cache/SlsBitmapFactory.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsBitmapFactory.cxx
@@ -29,7 +29,6 @@
 #include 
 #include 
 #include 
-#include 
 
 namespace sd { namespace slidesorter { namespace view {
 class SlideSorterView;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-06 Thread Julien Nabet
 vcl/source/opengl/OpenGLContext.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 1db745d9342599caad23f1bdc451ed1d1251203b
Author: Julien Nabet 
Date:   Tue Feb 6 13:45:10 2018 +0100

Unused include pngwrite in OpenGLContext (vcl)

Change-Id: Ib8445ed268f84d850169cc54113119308045e9df
Reviewed-on: https://gerrit.libreoffice.org/49295
Tested-by: Jenkins 
Reviewed-by: Julien Nabet 

diff --git a/vcl/source/opengl/OpenGLContext.cxx 
b/vcl/source/opengl/OpenGLContext.cxx
index e8985dd36d9e..6c254182a454 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -15,7 +15,6 @@
 #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: framework/source

2018-02-06 Thread Julien Nabet
 framework/source/uiconfiguration/imagemanager.cxx   |2 --
 framework/source/uiconfiguration/moduleimagemanager.cxx |2 --
 2 files changed, 4 deletions(-)

New commits:
commit 1e47afd9b8f1a27568d82cbd639b9d21fa756094
Author: Julien Nabet 
Date:   Tue Feb 6 13:20:32 2018 +0100

Unused include pngread/write (framework)

Change-Id: I14358ba06a4a7eb7ad01b0e7cc73455daec917a2
Reviewed-on: https://gerrit.libreoffice.org/49293
Tested-by: Jenkins 
Reviewed-by: Julien Nabet 

diff --git a/framework/source/uiconfiguration/imagemanager.cxx 
b/framework/source/uiconfiguration/imagemanager.cxx
index 1884dec9d5eb..8baadaafb545 100644
--- a/framework/source/uiconfiguration/imagemanager.cxx
+++ b/framework/source/uiconfiguration/imagemanager.cxx
@@ -35,8 +35,6 @@
 #include 
 #include 
 #include 
-#include 
-#include 
 
 using ::com::sun::star::uno::Sequence;
 using ::com::sun::star::uno::XInterface;
diff --git a/framework/source/uiconfiguration/moduleimagemanager.cxx 
b/framework/source/uiconfiguration/moduleimagemanager.cxx
index 4ba77f267823..4d8425db0700 100644
--- a/framework/source/uiconfiguration/moduleimagemanager.cxx
+++ b/framework/source/uiconfiguration/moduleimagemanager.cxx
@@ -40,8 +40,6 @@
 #include 
 #include 
 #include 
-#include 
-#include 
 
 //  namespaces
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-06 Thread Julien Nabet
 vcl/source/filter/graphicfilter.cxx |   12 
 1 file changed, 4 insertions(+), 8 deletions(-)

New commits:
commit ccf7025d7c60f73d65a772181399a5339968360b
Author: Julien Nabet 
Date:   Tue Feb 6 12:55:53 2018 +0100

Use for-range loop in graphicfilter (vcl)

Change-Id: I416746df2b2f120b264fab85f6a9570c5f176ddf
Reviewed-on: https://gerrit.libreoffice.org/49290
Tested-by: Jenkins 
Reviewed-by: Julien Nabet 

diff --git a/vcl/source/filter/graphicfilter.cxx 
b/vcl/source/filter/graphicfilter.cxx
index 4c0166716ddd..340308c83073 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -1561,19 +1561,16 @@ ErrCode GraphicFilter::ImportGraphic( Graphic& 
rGraphic, const OUString& rPath,
 {
 // check if this PNG contains a GIF chunk!
 const std::vector& rChunkData = 
aPNGReader.GetChunks();
-std::vector::const_iterator 
aIter(rChunkData.begin());
-std::vector::const_iterator 
aEnd(rChunkData.end());
-
-while (aIter != aEnd)
+for (auto const& chunk : rChunkData)
 {
 // Microsoft Office is storing Animated GIFs in following 
chunk
-if (aIter->nType == PMGCHUNG_msOG)
+if (chunk.nType == PMGCHUNG_msOG)
 {
-sal_uInt32 nChunkSize = aIter->aData.size();
+sal_uInt32 nChunkSize = chunk.aData.size();
 
 if (nChunkSize > 11)
 {
-const std::vector& rData = aIter->aData;
+const std::vector& rData = chunk.aData;
 nGraphicContentSize = nChunkSize - 11;
 SvMemoryStream 
aIStrm(const_cast(&rData[11]), nGraphicContentSize, 
StreamMode::READ);
 pGraphicContent.reset(new 
sal_uInt8[nGraphicContentSize]);
@@ -1585,7 +1582,6 @@ ErrCode GraphicFilter::ImportGraphic( Graphic& rGraphic, 
const OUString& rPath,
 break;
 }
 }
-++aIter;
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-06 Thread Bartosz Kosiorek
 sc/source/core/tool/interpr1.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 5c3d0a70a0edb182714725ef920d74667feffb0e
Author: Bartosz Kosiorek 
Date:   Tue Feb 6 00:45:32 2018 +0100

tdf#114820 Fix reading external reference for VLOOKUP and HLOOKUP

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

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 70533908ffc9..70f2ae8c1805 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -7149,7 +7149,9 @@ bool ScInterpreter::FillEntry(ScQueryEntry& rEntry)
 }
 }
 break;
-case svMatrix :
+case svExternalDoubleRef:
+case svExternalSingleRef:
+case svMatrix:
 {
 svl::SharedString aStr;
 const ScMatValType nType = 
GetDoubleOrStringFromMatrix(rItem.mfVal, aStr);
@@ -7166,6 +7168,7 @@ bool ScInterpreter::FillEntry(ScQueryEntry& rEntry)
 } // switch ( GetStackType() )
 return true;
 }
+
 void ScInterpreter::ScVLookup()
 {
 CalculateLookup(false);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-06 Thread Mike Kaganski
 sw/qa/extras/uiwriter/uiwriter.cxx |   58 +
 sw/source/uibase/wrtsh/delete.cxx  |  126 ++---
 2 files changed, 121 insertions(+), 63 deletions(-)

New commits:
commit e690954bada93bae54e64a306c104da3d540834e
Author: Mike Kaganski 
Date:   Mon Feb 5 22:27:14 2018 +0300

tdf#115132: don't move out from current cell on Backspace/Delete

The behavior that cursor jumps out of current table box on Del/Backspace
introduced in commit 80a4b3b589a516392bcf1ad932619701eb95e250 is
not intuitive, and differs from what other word processors do.

Unit test included.

Change-Id: Icb53b6733f0d7394abe011fa067089e6693cf648
Reviewed-on: https://gerrit.libreoffice.org/49257
Tested-by: Jenkins 
Reviewed-by: Mike Kaganski 
Reviewed-on: https://gerrit.libreoffice.org/49292
Reviewed-by: Aron Budea 
Tested-by: Aron Budea 

diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx 
b/sw/qa/extras/uiwriter/uiwriter.cxx
index 95206bf7944d..bf98a565b1f2 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -242,6 +242,7 @@ public:
 void testCreateDocxAnnotation();
 void testTdf113790();
 void testTdf115013();
+void testTdf115132();
 
 CPPUNIT_TEST_SUITE(SwUiWriterTest);
 CPPUNIT_TEST(testReplaceForward);
@@ -371,6 +372,7 @@ public:
 CPPUNIT_TEST(testCreateDocxAnnotation);
 CPPUNIT_TEST(testTdf113790);
 CPPUNIT_TEST(testTdf115013);
+CPPUNIT_TEST(testTdf115132);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -4696,6 +4698,62 @@ void SwUiWriterTest::testTdf115013()
 utl::removeTree(aWorkDir);
 }
 
+void SwUiWriterTest::testTdf115132()
+{
+SwDoc* pDoc = createDoc();
+CPPUNIT_ASSERT(pDoc);
+SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+CPPUNIT_ASSERT(pWrtShell);
+
+std::vector vTestTableNames;
+
+// Create an empty paragraph that will separate first table from the rest
+pWrtShell->SplitNode();
+pWrtShell->SttDoc();
+// Create a table at the start of document body
+SwInsertTableOptions TableOpt(tabopts::DEFAULT_BORDER, 0);
+const SwTable* pTable = &pWrtShell->InsertTable(TableOpt, 2, 3);
+const SwTableFormat* pFormat = pTable->GetFrameFormat();
+CPPUNIT_ASSERT(pFormat);
+vTestTableNames.push_back(pFormat->GetName());
+pWrtShell->EndDoc();
+// Create a table after a paragraph
+pTable = &pWrtShell->InsertTable(TableOpt, 2, 3);
+pFormat = pTable->GetFrameFormat();
+CPPUNIT_ASSERT(pFormat);
+vTestTableNames.push_back(pFormat->GetName());
+// Create a table immediately after the previous
+pTable = &pWrtShell->InsertTable(TableOpt, 2, 3);
+pFormat = pTable->GetFrameFormat();
+CPPUNIT_ASSERT(pFormat);
+vTestTableNames.push_back(pFormat->GetName());
+// Create a nested table in the middle of last row
+pWrtShell->GotoTable(vTestTableNames.back());
+for (int i = 0; i < 4; ++i)
+pWrtShell->GoNextCell(false);
+pTable = &pWrtShell->InsertTable(TableOpt, 2, 3);
+pFormat = pTable->GetFrameFormat();
+CPPUNIT_ASSERT(pFormat);
+vTestTableNames.push_back(pFormat->GetName());
+
+// Now check that in any cell in all tables we don't go out of a cell
+// using Delete or Backspace. We test cases when a table is the first node;
+// when we are in a first/middle/last cell in a row; when there's a 
paragraph
+// before/after this cell; when there's another table before/after this 
cell;
+// in nested table.
+for (const auto& rTableName : vTestTableNames)
+{
+pWrtShell->GotoTable(rTableName);
+do {
+const SwStartNode* pNd = 
pWrtShell->GetSwCursor()->GetNode().FindTableBoxStartNode();
+pWrtShell->DelRight();
+CPPUNIT_ASSERT_EQUAL(pNd, 
pWrtShell->GetSwCursor()->GetNode().FindTableBoxStartNode());
+pWrtShell->DelLeft();
+CPPUNIT_ASSERT_EQUAL(pNd, 
pWrtShell->GetSwCursor()->GetNode().FindTableBoxStartNode());
+} while (pWrtShell->GoNextCell(false));
+}
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SwUiWriterTest);
 CPPUNIT_PLUGIN_IMPLEMENT();
 
diff --git a/sw/source/uibase/wrtsh/delete.cxx 
b/sw/source/uibase/wrtsh/delete.cxx
index a300ad2ba059..411c7e079df7 100644
--- a/sw/source/uibase/wrtsh/delete.cxx
+++ b/sw/source/uibase/wrtsh/delete.cxx
@@ -22,6 +22,7 @@
 #include 
 #include 
 #include 
+#include 
 
 inline void SwWrtShell::OpenMark()
 {
@@ -176,6 +177,10 @@ long SwWrtShell::DelLeft()
 
 if( SwCursorShell::IsSttPara())
 {
+// Start/EndAllAction to avoid cursor flickering
+UnoActionContext c(GetDoc());
+SwCursorShell::Push();
+
 // #i4032# Don't actually call a 'delete' if we
 // changed the table cell, compare DelRight().
 const SwStartNode * pSNdOld = pWasInTableNd ?
@@ -184,23 +189,34 @@ long SwWrtShell::DelLeft()
 
 // If the cursor is at the beginning of a paragraph

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

2018-02-06 Thread Manfred Blume
 sw/source/core/layout/tabfrm.cxx |   18 --
 1 file changed, 12 insertions(+), 6 deletions(-)

New commits:
commit 58f356c47b6622a044e300f6c30990d83a693e65
Author: Manfred Blume 
Date:   Wed Jan 31 16:37:55 2018 +0100

tdf#114306 fix crash caused by special document 2

Regression from 18765b9fa739337d2d891513f6e2fb7c3ce23b50

Change-Id: Ic4205777077e4e3d93bdddf743c51abba8950eaf
Reviewed-on: https://gerrit.libreoffice.org/49031
Tested-by: Jenkins 
Reviewed-by: Thorsten Behrens 
(cherry picked from commit d30eefb677b446886f7b5bab6de93d489ba63529)
Reviewed-on: https://gerrit.libreoffice.org/49309
Tested-by: Thorsten Behrens 

diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
old mode 100644
new mode 100755
index c25fa113dbe4..846c5af90585
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -179,7 +179,7 @@ void SwTabFrame::RegistFlys()
 }
 
 void SwInvalidateAll( SwFrame *pFrame, long nBottom );
-static void lcl_RecalcRow( SwRowFrame* pRow, long nBottom );
+static bool lcl_RecalcRow( SwRowFrame* pRow, long nBottom );
 static bool lcl_ArrangeLowers( SwLayoutFrame *pLay, long lYStart, bool bInva );
 // #i26945# - add parameter <_bOnlyRowsAndCells> to control
 // that only row and cell frames are formatted.
@@ -1505,7 +1505,8 @@ static bool lcl_InnerCalcLayout( SwFrame *pFrame,
 return bRet;
 }
 
-static void lcl_RecalcRow( SwRowFrame* pRow, long nBottom )
+// returns false if pRow is invalid
+static bool lcl_RecalcRow( SwRowFrame* pRow, long nBottom )
 {
 // FME 2007-08-30 #i81146# new loop control
 int nLoopControlRuns_1 = 0;
@@ -1565,7 +1566,7 @@ static void lcl_RecalcRow( SwRowFrame* pRow, long nBottom 
)
 if (!bRowStillExists)
 {
 SAL_WARN("sw.layout", "no row anymore at " << pRow);
-return;
+return false;
 }
 
 // NEW TABLES
@@ -1611,7 +1612,8 @@ static void lcl_RecalcRow( SwRowFrame* pRow, long nBottom 
)
 }
 }
 break;
-} while( true );
+} while (true);
+return true;
 }
 
 static void lcl_RecalcTable( SwTabFrame& rTab,
@@ -2292,7 +2294,7 @@ void SwTabFrame::MakeAll(vcl::RenderContext* 
pRenderContext)
 
 // 1. Try: bTryToSplit = true  => Try to split the row.
 // 2. Try: bTryToSplit = false => Split the table between the rows.
-if ( pFirstNonHeadlineRow->GetNext() || bTryToSplit )
+if ((pFirstNonHeadlineRow && pFirstNonHeadlineRow->GetNext()) || 
bTryToSplit )
 {
 SwTwips nDeadLine = (GetUpper()->*fnRect->fnGetPrtBottom)();
 if( IsInSct() || GetUpper()->IsInTab() ) // TABLE IN TABLE)
@@ -2301,7 +2303,11 @@ void SwTabFrame::MakeAll(vcl::RenderContext* 
pRenderContext)
 
 {
 SetInRecalcLowerRow( true );
-::lcl_RecalcRow( static_cast(Lower()), 
nDeadLine );
+SwRowFrame* pRow = static_cast(Lower());
+if (!lcl_RecalcRow(pRow, nDeadLine))
+{
+pFirstNonHeadlineRow = GetFirstNonHeadlineRow();
+}
 SetInRecalcLowerRow( false );
 }
 m_bLowersFormatted = true;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-06 Thread Manfred Blume
 sw/source/core/layout/tabfrm.cxx |   18 --
 1 file changed, 12 insertions(+), 6 deletions(-)

New commits:
commit d30eefb677b446886f7b5bab6de93d489ba63529
Author: Manfred Blume 
Date:   Wed Jan 31 16:37:55 2018 +0100

tdf#114306 fix crash caused by special document 2

Regression from 18765b9fa739337d2d891513f6e2fb7c3ce23b50

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

diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
old mode 100644
new mode 100755
index d0f2ba26..b816dfdf319e
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -163,7 +163,7 @@ void SwTabFrame::RegistFlys()
 }
 
 void SwInvalidateAll( SwFrame *pFrame, long nBottom );
-static void lcl_RecalcRow( SwRowFrame* pRow, long nBottom );
+static bool lcl_RecalcRow( SwRowFrame* pRow, long nBottom );
 static bool lcl_ArrangeLowers( SwLayoutFrame *pLay, long lYStart, bool bInva );
 // #i26945# - add parameter <_bOnlyRowsAndCells> to control
 // that only row and cell frames are formatted.
@@ -1555,7 +1555,8 @@ static bool lcl_InnerCalcLayout( SwFrame *pFrame,
 return bRet;
 }
 
-static void lcl_RecalcRow( SwRowFrame* pRow, long nBottom )
+// returns false if pRow is invalid
+static bool lcl_RecalcRow( SwRowFrame* pRow, long nBottom )
 {
 // FME 2007-08-30 #i81146# new loop control
 int nLoopControlRuns_1 = 0;
@@ -1613,7 +1614,7 @@ static void lcl_RecalcRow( SwRowFrame* pRow, long nBottom 
)
 if (!bRowStillExists)
 {
 SAL_WARN("sw.layout", "no row anymore at " << pRow);
-return;
+return false;
 }
 
 // NEW TABLES
@@ -1657,7 +1658,8 @@ static void lcl_RecalcRow( SwRowFrame* pRow, long nBottom 
)
 }
 }
 break;
-} while( true );
+} while (true);
+return true;
 }
 
 static void lcl_RecalcTable( SwTabFrame& rTab,
@@ -2344,7 +2346,7 @@ void SwTabFrame::MakeAll(vcl::RenderContext* 
pRenderContext)
 
 // 1. Try: bTryToSplit = true  => Try to split the row.
 // 2. Try: bTryToSplit = false => Split the table between the rows.
-if ( pFirstNonHeadlineRow->GetNext() || bTryToSplit )
+if ((pFirstNonHeadlineRow && pFirstNonHeadlineRow->GetNext()) || 
bTryToSplit )
 {
 SwTwips nDeadLine = aRectFnSet.GetPrtBottom(*GetUpper());
 if( IsInSct() || GetUpper()->IsInTab() ) // TABLE IN TABLE)
@@ -2353,7 +2355,11 @@ void SwTabFrame::MakeAll(vcl::RenderContext* 
pRenderContext)
 
 {
 SetInRecalcLowerRow( true );
-::lcl_RecalcRow( static_cast(Lower()), 
nDeadLine );
+SwRowFrame* pRow = static_cast(Lower());
+if (!lcl_RecalcRow(pRow, nDeadLine))
+{
+pFirstNonHeadlineRow = GetFirstNonHeadlineRow();
+}
 SetInRecalcLowerRow( false );
 }
 m_bLowersFormatted = true;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-06 Thread Bartosz Kosiorek
 sc/source/core/tool/interpr1.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit d9fafddcf8eb37916c8a8e76af36d67c8db84a98
Author: Bartosz Kosiorek 
Date:   Tue Feb 6 02:10:14 2018 +0100

tdf#115162 Fix support for external reference for IFS functions

Functions SUMIFS, AVERAGEIFS, COUNTIFS, MINIFS, MAXIFS were not
supported External references.

The root cause issue, was using PopMatrix() method for:
svExternalSingleRef and svExternalDoubleRef.

PopMatrix() method only supports svMatrix, and in other
cases returns FormulaError::IllegalParameter error.

To resolve that issue, the method GetMatrix() was used.
It is properly support svMatrix, svExternalSingleRef and 
svExternalDoubleRef.

Change-Id: I3e30ca50069264a6d990b16ec668e6d0df51c6e6
Reviewed-on: https://gerrit.libreoffice.org/49264
Tested-by: Jenkins 
Reviewed-by: Eike Rathke 
(cherry picked from commit b6db65752c60de7268e4f65d7fc5ac110adb2fb0)
Reviewed-on: https://gerrit.libreoffice.org/49283

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index d3b5829a5db8..ab3f28d27225 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -5805,7 +5805,7 @@ void ScInterpreter::IterateParametersIfs( 
double(*ResultFunc)( const sc::ParamIf
 case svExternalSingleRef:
 case svExternalDoubleRef:
 {
-pQueryMatrix = PopMatrix();
+pQueryMatrix = GetMatrix();
 if (!pQueryMatrix)
 {
 PushError( FormulaError::IllegalParameter);
@@ -6029,7 +6029,7 @@ void ScInterpreter::IterateParametersIfs( 
double(*ResultFunc)( const sc::ParamIf
 case svExternalSingleRef:
 case svExternalDoubleRef:
 {
-pMainMatrix = PopMatrix();
+pMainMatrix = GetMatrix();
 if (!pMainMatrix)
 {
 PushError( FormulaError::IllegalParameter);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: wsd/AdminModel.cpp

2018-02-06 Thread Miklos Vajna
 wsd/AdminModel.cpp |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 46c0873c296bfb9c9e6c1999e4556dabe38adfb2
Author: Miklos Vajna 
Date:   Tue Feb 6 16:06:24 2018 +0100

wsd: can avoid copying these in AdminModel

Change-Id: Id092585e93cca3bd4d52531cf628c1f205fcfe8b

diff --git a/wsd/AdminModel.cpp b/wsd/AdminModel.cpp
index 9b2f6770..337cc83a 100644
--- a/wsd/AdminModel.cpp
+++ b/wsd/AdminModel.cpp
@@ -66,7 +66,7 @@ std::pair Document::getSnapshot() 
const
 
 oss << "\"views\"" << ":[";
 std::string separator;
-for (auto view : getViews())
+for (const auto& view : getViews())
 {
 oss << separator << "\"";
 if(view.second.isExpired())
@@ -94,7 +94,7 @@ const std::string Document::getHistory() const
 oss << "\"pid\"" << ":" << getPid() << ",";
 oss << "\"snapshots\"" << ":[";
 std::string separator;
-for (auto s : _snapshots)
+for (const auto& s : _snapshots)
 {
 oss << separator << s.second;
 separator = ",";
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-06 Thread Noel Grandin
 sw/source/ui/dbui/mmoutputtypepage.cxx |4 ++--
 sw/source/ui/inc/mmresultdialogs.hxx   |4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 78b597191e9f10e4c523dae548bb51791efc36ff
Author: Noel Grandin 
Date:   Tue Feb 6 10:46:55 2018 +0200

m_bDesctructionEnabled->m_bDestructionEnabled

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

diff --git a/sw/source/ui/dbui/mmoutputtypepage.cxx 
b/sw/source/ui/dbui/mmoutputtypepage.cxx
index dcc1fc714981..fa01025d3fdd 100644
--- a/sw/source/ui/dbui/mmoutputtypepage.cxx
+++ b/sw/source/ui/dbui/mmoutputtypepage.cxx
@@ -256,7 +256,7 @@ SwSendMailDialog::SwSendMailDialog(vcl::Window *pParent, 
SwMailMergeConfigItem&
 m_sCompleted(   SwResId(ST_COMPLETED )),
 m_sFailed(  SwResId(ST_FAILED )),
 m_bCancel(false),
-m_bDesctructionEnabled(false),
+m_bDestructionEnabled(false),
 m_pImpl(new SwSendMailDialog_Impl),
 m_pConfigItem(&rConfigItem),
 m_nSendCount(0),
@@ -384,7 +384,7 @@ IMPL_LINK( SwSendMailDialog, RemoveThis, Timer*, pTimer, 
void )
 m_pImpl->xMailDispatcher->shutdown();
 }
 
-if( m_bDesctructionEnabled &&
+if( m_bDestructionEnabled &&
 (!m_pImpl->xMailDispatcher.is() ||
 !m_pImpl->xMailDispatcher->isRunning()))
 {
diff --git a/sw/source/ui/inc/mmresultdialogs.hxx 
b/sw/source/ui/inc/mmresultdialogs.hxx
index 2b6f65aa58e2..d892c8a9244a 100644
--- a/sw/source/ui/inc/mmresultdialogs.hxx
+++ b/sw/source/ui/inc/mmresultdialogs.hxx
@@ -185,7 +185,7 @@ class SwSendMailDialog : public ModelessDialog 
//SfxModalDialog
 OUStringm_sFailed;
 
 boolm_bCancel;
-boolm_bDesctructionEnabled;
+boolm_bDestructionEnabled;
 
 SwSendMailDialog_Impl*  m_pImpl;
 SwMailMergeConfigItem*  m_pConfigItem;
@@ -210,7 +210,7 @@ public:
 virtual voiddispose() override;
 
 voidAddDocument( SwMailDescriptor const & rDesc );
-voidEnableDestruction() {m_bDesctructionEnabled = true;}
+voidEnableDestruction() {m_bDestructionEnabled = true;}
 voidShowDialog();
 
 voidDocumentSent( css::uno::Reference< 
css::mail::XMailMessage> const & xMessage,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-06 Thread Markus Mohrhard
 vcl/source/window/btndlg.cxx |8 
 1 file changed, 8 insertions(+)

New commits:
commit 82abf9d5e2e5ca208dd801eda243b88daaa81620
Author: Markus Mohrhard 
Date:   Tue Feb 6 11:51:07 2018 +0100

uitest: set ids for all standard buttons automatically

Change-Id: I48cb6f67150aa5aeab97a1aa1c381188c0db9358
Reviewed-on: https://gerrit.libreoffice.org/49287
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/vcl/source/window/btndlg.cxx b/vcl/source/window/btndlg.cxx
index be9644c5b7ce..9bbffc417bb8 100644
--- a/vcl/source/window/btndlg.cxx
+++ b/vcl/source/window/btndlg.cxx
@@ -303,6 +303,14 @@ void ButtonDialog::AddButton( StandardButtonType eType, 
sal_uInt16 nId,
(eType == StandardButtonType::Cancel && 
pItem->mpPushButton->GetType() == WindowType::CANCELBUTTON) ||
(eType == StandardButtonType::Help   && 
pItem->mpPushButton->GetType() == WindowType::HELPBUTTON)) )
 {
+std::map mapButtonTypeToID = 
{{StandardButtonType::Yes, "yes"},
+{StandardButtonType::No, "no"}, {StandardButtonType::Retry, 
"retry"},
+{StandardButtonType::Close, "close"}, {StandardButtonType::More, 
"more"},
+{StandardButtonType::Ignore, "ignore"}, 
{StandardButtonType::Abort, "abort"},
+{StandardButtonType::Less, "less"}, {StandardButtonType::Count, 
"count"}};
+auto itr = mapButtonTypeToID.find(eType);
+if (itr != mapButtonTypeToID.end())
+pItem->mpPushButton->set_id(itr->second);
 pItem->mpPushButton->SetText( Button::GetStandardText( eType ) );
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Bringing LibreOffice modifications for EPM upstream?

2018-02-06 Thread Michael Weghorn
Hi,

the LibreOffice build uses EPM ("ESP Package Manager"), e.g. to generate
deb packages when the build option "--with-package-format=deb" is given.

I realized that LibreOffice uses and old version of EPM and applies a
patch that does quite a few modifications [1].

As I experienced a build failure when using unpatched upstream versions
of EPM (i.e. no build option "--with-epm=internal" given), I was
wondering whether it wouldn't be a good idea to work on integrating
(still relevant) LibreOffice modifications upstream? [2]

I would be willing to at least look at those things I come across while
trying to build the Debian packages with upstream EPM.

What do you think?
What would be needed to make sure that proper attribution for the
modifications is made? (E.g. is it enough to mention something like
"This commit is based on a patch of the the LibreOffice community to an
older version of EPM." or something like that?)


Best regards,
  Michael

[1] Patch: file "./external/epm/epm-3.7.patch" in the "core" git repo
[2] upstream GitHub page: https://github.com/michaelrsweet/epm
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Changes to 'refs/tags/gov-5.3-39'

2018-02-06 Thread Mike Kaganski
Tag 'gov-5.3-39' created by Andras Timar  at 
2018-02-06 14:30 +

gov-5.3-39

Changes since cp-5.3-32-37:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/tags/co-5.3-39'

2018-02-06 Thread Caolán McNamara
Tag 'co-5.3-39' created by Andras Timar  at 
2018-02-06 14:29 +

co-5.3-39

Changes since cp-5.3-32-43:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3-desktop' - 4 commits - vcl/osx vcl/quartz

2018-02-06 Thread Caolán McNamara
 vcl/osx/salframeview.mm  |   21 -
 vcl/osx/salnativewidgets.cxx |2 +-
 vcl/osx/vclnsapp.mm  |5 +
 vcl/quartz/ctfonts.cxx   |2 +-
 4 files changed, 19 insertions(+), 11 deletions(-)

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

tdf#109062 restore osx scrollwheel logic

to pre

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

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

state.

Change-Id: If5a494441731e73136158b4905c2744ba8bc8875
Reviewed-on: https://gerrit.libreoffice.org/48306
Tested-by: Jenkins 
Reviewed-by: Eike Rathke 
(cherry picked from commit 378d7d68d9e842039bcf797a8b95c2e85768e1e7)
Signed-off-by: Andras Timar 
(cherry picked from commit 7a5a04ca9f7a32659774362e225dd6f0bd8840ed)

diff --git a/vcl/osx/salframeview.mm b/vcl/osx/salframeview.mm
index 1b16485edcff..91f8e06118a2 100644
--- a/vcl/osx/salframeview.mm
+++ b/vcl/osx/salframeview.mm
@@ -809,9 +809,10 @@ private:
 if( aEvent.mnDelta == 0 )
 aEvent.mnDelta = aEvent.mnNotchDelta;
 aEvent.mbHorz = FALSE;
-aEvent.mnScrollLines = nDeltaZ;
-if( aEvent.mnScrollLines == 0 )
-aEvent.mnScrollLines = 1;
+sal_uInt32 nScrollLines = nDeltaZ;
+if (nScrollLines == 0)
+nScrollLines = 1;
+aEvent.mnScrollLines = nScrollLines;
 mpFrame->CallCallback( SalEvent::WheelMouse, &aEvent );
 }
 }
@@ -933,9 +934,10 @@ SAL_WNODEPRECATED_DECLARATIONS_POP
 if( aEvent.mnDelta == 0 )
 aEvent.mnDelta = aEvent.mnNotchDelta;
 aEvent.mbHorz = TRUE;
-aEvent.mnScrollLines = fabs(dX) / WHEEL_EVENT_FACTOR;
-if( aEvent.mnScrollLines == 0 )
-aEvent.mnScrollLines = 1;
+sal_uInt32 nScrollLines = fabs(dX) / WHEEL_EVENT_FACTOR;
+if (nScrollLines == 0)
+nScrollLines = 1;
+aEvent.mnScrollLines = nScrollLines;
 
 mpFrame->CallCallback( SalEvent::WheelMouse, &aEvent );
 }
@@ -946,9 +948,10 @@ SAL_WNODEPRECATED_DECLARATIONS_POP
 if( aEvent.mnDelta == 0 )
 aEvent.mnDelta = aEvent.mnNotchDelta;
 aEvent.mbHorz = FALSE;
-aEvent.mnScrollLines = fabs(dY) / WHEEL_EVENT_FACTOR;
-if( aEvent.mnScrollLines == 0 )
-aEvent.mnScrollLines = 1;
+sal_uInt32 nScrollLines = fabs(dY) / WHEEL_EVENT_FACTOR;
+if (nScrollLines == 0)
+nScrollLines = 1;
+aEvent.mnScrollLines = nScrollLines;
 
 mpFrame->CallCallback( SalEvent::WheelMouse, &aEvent );
 }
commit 64f60cacd6b8ac0b091f1207e806887dc44def19
Author: Tor Lillqvist 
Date:   Tue Jan 23 15:04:00 2018 +0200

tdf#69254: Tweak mapping from CoreText weight to our FontWeight a bit

Make the mapping of light weights more likely to hit different enum
values for slightly different weights.

We want to be able to distinguish between for instance Overpass Light
(with weight -0.4) and Overpass ExtraLight (with weight -0.5).

Change-Id: If83fbce68149b267a49ef9bcb6624d8790de7c56
Reviewed-on: https://gerrit.libreoffice.org/48426
Tested-by: Jenkins 
Reviewed-by: Christian Lohmaier 
(cherry picked from commit 3aeda82b09253d20d234d50b39e76977031f2102)
Signed-off-by: Andras Timar 
(cherry picked from commit 1476d4a10723c20f1cf1be3b6746c891ca21adf8)

diff --git a/vcl/quartz/ctfonts.cxx b/vcl/quartz/ctfonts.cxx
index dd64b7a0c5a8..0a018fd460f1 100644
--- a/vcl/quartz/ctfonts.cxx
+++ b/vcl/quartz/ctfonts.cxx
@@ -420,7 +420,7 @@ FontAttributes DevFontFromCTFontDescriptor( 
CTFontDescriptorRef pFD, bool* bFont
 }
 else if( fWeight < 0 )
 {
-nInt = rint(WEIGHT_NORMAL + fWeight * ((WEIGHT_NORMAL - 
WEIGHT_THIN)/0.9));
+nInt = rint(WEIGHT_NORMAL + fWeight * ((WEIGHT_NORMAL - 
WEIGHT_THIN)/0.8));
 if( nInt < WEIGHT_THIN )
 {
 nInt = WEIGHT_THIN;
commit aabfbe990de0097836d20ef2efa74e747a247007
Author: Telesto 
Date:   Mon Jan 22 16:49:21 2018 +0200

tdf#112153: Set button theme properly

Change-Id: I0665880c0d0348fcbb3bcf04d9172405c8e31eb7
Reviewed-on: https://gerrit.libreoffice.org/48334
Tested-by: Jenkins 
Reviewed-by: Tor Lillqvist 
(cherry picked from commit 44af50465a02b6f5566be45913a34fdbdba90133)
Reviewed-on: https://gerrit.libreoffice.org/48385
(cherry picked from commit 2b6db99279fcfbbe3ba3720f92c36b8ecd49635a)
Signed-off-by: Andras Timar 
(cherry picked from commit 6c377a8738168df9c22696cd28d3bbc57b152137)

diff --git a/vcl/osx/salnativewidgets.cxx b/vcl/osx/salnativewidgets.cxx
index a9d263f3c476..178a18db6357 100644
--- a/vcl/osx/salnativewidgets.cxx
+++ b/vc

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - 4 commits - vcl/osx vcl/quartz

2018-02-06 Thread Caolán McNamara
 vcl/osx/salframeview.mm  |   21 -
 vcl/osx/salnativewidgets.cxx |2 +-
 vcl/osx/vclnsapp.mm  |5 +
 vcl/quartz/ctfonts.cxx   |2 +-
 4 files changed, 19 insertions(+), 11 deletions(-)

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

tdf#109062 restore osx scrollwheel logic

to pre

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

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

state.

Change-Id: If5a494441731e73136158b4905c2744ba8bc8875
Reviewed-on: https://gerrit.libreoffice.org/48306
Tested-by: Jenkins 
Reviewed-by: Eike Rathke 
(cherry picked from commit 378d7d68d9e842039bcf797a8b95c2e85768e1e7)
Signed-off-by: Andras Timar 

diff --git a/vcl/osx/salframeview.mm b/vcl/osx/salframeview.mm
index 1b16485edcff..91f8e06118a2 100644
--- a/vcl/osx/salframeview.mm
+++ b/vcl/osx/salframeview.mm
@@ -809,9 +809,10 @@ private:
 if( aEvent.mnDelta == 0 )
 aEvent.mnDelta = aEvent.mnNotchDelta;
 aEvent.mbHorz = FALSE;
-aEvent.mnScrollLines = nDeltaZ;
-if( aEvent.mnScrollLines == 0 )
-aEvent.mnScrollLines = 1;
+sal_uInt32 nScrollLines = nDeltaZ;
+if (nScrollLines == 0)
+nScrollLines = 1;
+aEvent.mnScrollLines = nScrollLines;
 mpFrame->CallCallback( SalEvent::WheelMouse, &aEvent );
 }
 }
@@ -933,9 +934,10 @@ SAL_WNODEPRECATED_DECLARATIONS_POP
 if( aEvent.mnDelta == 0 )
 aEvent.mnDelta = aEvent.mnNotchDelta;
 aEvent.mbHorz = TRUE;
-aEvent.mnScrollLines = fabs(dX) / WHEEL_EVENT_FACTOR;
-if( aEvent.mnScrollLines == 0 )
-aEvent.mnScrollLines = 1;
+sal_uInt32 nScrollLines = fabs(dX) / WHEEL_EVENT_FACTOR;
+if (nScrollLines == 0)
+nScrollLines = 1;
+aEvent.mnScrollLines = nScrollLines;
 
 mpFrame->CallCallback( SalEvent::WheelMouse, &aEvent );
 }
@@ -946,9 +948,10 @@ SAL_WNODEPRECATED_DECLARATIONS_POP
 if( aEvent.mnDelta == 0 )
 aEvent.mnDelta = aEvent.mnNotchDelta;
 aEvent.mbHorz = FALSE;
-aEvent.mnScrollLines = fabs(dY) / WHEEL_EVENT_FACTOR;
-if( aEvent.mnScrollLines == 0 )
-aEvent.mnScrollLines = 1;
+sal_uInt32 nScrollLines = fabs(dY) / WHEEL_EVENT_FACTOR;
+if (nScrollLines == 0)
+nScrollLines = 1;
+aEvent.mnScrollLines = nScrollLines;
 
 mpFrame->CallCallback( SalEvent::WheelMouse, &aEvent );
 }
commit 1476d4a10723c20f1cf1be3b6746c891ca21adf8
Author: Tor Lillqvist 
Date:   Tue Jan 23 15:04:00 2018 +0200

tdf#69254: Tweak mapping from CoreText weight to our FontWeight a bit

Make the mapping of light weights more likely to hit different enum
values for slightly different weights.

We want to be able to distinguish between for instance Overpass Light
(with weight -0.4) and Overpass ExtraLight (with weight -0.5).

Change-Id: If83fbce68149b267a49ef9bcb6624d8790de7c56
Reviewed-on: https://gerrit.libreoffice.org/48426
Tested-by: Jenkins 
Reviewed-by: Christian Lohmaier 
(cherry picked from commit 3aeda82b09253d20d234d50b39e76977031f2102)
Signed-off-by: Andras Timar 

diff --git a/vcl/quartz/ctfonts.cxx b/vcl/quartz/ctfonts.cxx
index acc8add0b9f3..576ef69bef63 100644
--- a/vcl/quartz/ctfonts.cxx
+++ b/vcl/quartz/ctfonts.cxx
@@ -396,7 +396,7 @@ FontAttributes DevFontFromCTFontDescriptor( 
CTFontDescriptorRef pFD, bool* bFont
 }
 else if( fWeight < 0 )
 {
-nInt = rint(WEIGHT_NORMAL + fWeight * ((WEIGHT_NORMAL - 
WEIGHT_THIN)/0.9));
+nInt = rint(WEIGHT_NORMAL + fWeight * ((WEIGHT_NORMAL - 
WEIGHT_THIN)/0.8));
 if( nInt < WEIGHT_THIN )
 {
 nInt = WEIGHT_THIN;
commit 6c377a8738168df9c22696cd28d3bbc57b152137
Author: Telesto 
Date:   Mon Jan 22 16:49:21 2018 +0200

tdf#112153: Set button theme properly

Change-Id: I0665880c0d0348fcbb3bcf04d9172405c8e31eb7
Reviewed-on: https://gerrit.libreoffice.org/48334
Tested-by: Jenkins 
Reviewed-by: Tor Lillqvist 
(cherry picked from commit 44af50465a02b6f5566be45913a34fdbdba90133)
Reviewed-on: https://gerrit.libreoffice.org/48385
(cherry picked from commit 2b6db99279fcfbbe3ba3720f92c36b8ecd49635a)
Signed-off-by: Andras Timar 

diff --git a/vcl/osx/salnativewidgets.cxx b/vcl/osx/salnativewidgets.cxx
index a9d263f3c476..178a18db6357 100644
--- a/vcl/osx/salnativewidgets.cxx
+++ b/vcl/osx/salnativewidgets.cxx
@@ -106,11 +106,11 @@ static ThemeButtonValue ImplGetButtonValue( ButtonValue 
aButtonValue )
 break;
 
 case ButtonValue::Off:
+case ButtonValue::DontKnow:
   

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

2018-02-06 Thread Julien Nabet
 cui/source/options/personalization.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit ae86218101c27a2e35a10940661e4c6421870e71
Author: Julien Nabet 
Date:   Sat Feb 3 15:23:48 2018 +0100

tdf#114731: persona html can contain " instead of "

So let's replace all " with " in the retrieved html

Change-Id: I4a90ecc51e7ce6d1e080e6c1b17b82fe9a29d65e
Reviewed-on: https://gerrit.libreoffice.org/49179
Tested-by: Julien Nabet 
Tested-by: Jenkins 
(cherry picked from commit 2e6bbc04d906ed308fc5ca769bad7b8b4676594e)
Reviewed-on: https://gerrit.libreoffice.org/49286
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index fa4d7f452072..d40742155adb 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -554,10 +554,13 @@ static OUString searchValue( const OString &rBuffer, 
sal_Int32 from, const OStri
 }
 
 /// Parse the Persona web page, and find where to get the bitmaps + the color 
values.
-static bool parsePersonaInfo( const OString &rBuffer, OUString *pHeaderURL, 
OUString *pFooterURL,
+static bool parsePersonaInfo( const OString &rBufferArg, OUString *pHeaderURL, 
OUString *pFooterURL,
   OUString *pTextColor, OUString *pAccentColor, 
OUString *pPreviewURL,
   OUString *pName )
 {
+// tdf#115417: buffer retrieved from html response can contain " or 
"
+// let's replace the whole buffer with last one so we can treat it easily
+OString rBuffer = rBufferArg.replaceAll(OString("""), 
OString("""));
 // it is the first attribute that contains "persona="
 sal_Int32 persona = rBuffer.indexOf( "data-browsertheme=\"{" );
 if ( persona < 0 )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-06 Thread Stephan Bergmann
 include/tools/gen.hxx |4 ++--
 svtools/source/brwbox/brwbox1.cxx |3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 7855512f4cf9d622bdb0a02ce87fea36665646a4
Author: Stephan Bergmann 
Date:   Tue Feb 6 10:43:46 2018 +0100

Avoid signed integer overflow during BrowseBox::AutoSizeLastColumn

Observed with UBSan with `soffice --base`, "Finish", "Save", "Tables", 
"Create
Table in Design View...":

> include/tools/gen.hxx:485:37: runtime error: signed integer overflow: 288 
+ 9223372036854775803 cannot be represented in type 'long'
> #0 0x7fe2d7f827dd in tools::Rectangle::Rectangle(Point const&, Size 
const&) include/tools/gen.hxx:485:37
> #1 0x7fe2d7f73833 in BrowseBox::ImplFieldRectPixel(long, unsigned 
short) const svtools/source/brwbox/brwbox1.cxx:2039:12
> #2 0x7fe2d7f57d46 in BrowseBox::GetFieldRectPixel(long, unsigned 
short, bool) const svtools/source/brwbox/brwbox1.cxx:1977:29
> #3 0x7fe2d7f42bdb in BrowseBox::GetFieldRect(unsigned short) const 
svtools/source/brwbox/brwbox1.cxx:2068:12
> #4 0x7fe2d7f4502b in BrowseBox::SetColumnWidth(unsigned short, 
unsigned long) svtools/source/brwbox/brwbox1.cxx:542:19
> #5 0x7fe2d7f48d18 in BrowseBox::AutoSizeLastColumn() 
svtools/source/brwbox/brwbox1.cxx:633:9
> #6 0x7fe2d7fd299c in BrowseBox::Resize() 
svtools/source/brwbox/brwbox2.cxx:537:5
> #7 0x7fe2d807ee7a in svt::EditBrowseBox::Resize() 
svtools/source/brwbox/editbrowsebox.cxx:1095:20
> #8 0x7fe2cdbe5711 in vcl::Window::ImplCallResize() 
vcl/source/window/event.cxx:522:5
> #9 0x7fe2ce1c8f71 in vcl::Window::Show(bool, ShowFlags) 
vcl/source/window/window.cxx:2261:13
> #10 0x7fe25d27b58f in dbaui::OTableDesignView::initialize() 
dbaccess/source/ui/tabledesign/TableDesignView.cxx:199:22
> #11 0x7fe25d23403b in dbaui::OTableController::impl_initialize() 
dbaccess/source/ui/tabledesign/TableController.cxx:519:20
> #12 0x7fe25c3dd649 in 
dbaui::OGenericUnoController::initialize(com::sun::star::uno::Sequence
 const&) dbaccess/source/ui/browser/genericcontroller.cxx:270:9
> #13 0x7fe25c3361cd in 
DBContentLoader::load(com::sun::star::uno::Reference
 const&, rtl::OUString const&, 
com::sun::star::uno::Sequence const&, 
com::sun::star::uno::Reference 
const&) dbaccess/source/ui/browser/dbloader.cxx:270:19
> #14 0x7fe28521412a in framework::LoadEnv::impl_loadContent() 
framework/source/loadenv/loadenv.cxx:1101:23
> #15 0x7fe285209e0a in framework::LoadEnv::startLoading() 
framework/source/loadenv/loadenv.cxx:375:20
> #16 0x7fe28520738b in 
framework::LoadEnv::loadComponentFromURL(com::sun::star::uno::Reference
 const&, com::sun::star::uno::Reference 
const&, rtl::OUString const&, rtl::OUString const&, int, 
com::sun::star::uno::Sequence const&) 
framework/source/loadenv/loadenv.cxx:161:14
> #17 0x7fe285332ba8 in (anonymous 
namespace)::Frame::loadComponentFromURL(rtl::OUString const&, rtl::OUString 
const&, int, 
com::sun::star::uno::Sequence const&) 
framework/source/services/frame.cxx:589:12
> #18 0x7fe285349f7d in non-virtual thunk to (anonymous 
namespace)::Frame::loadComponentFromURL(rtl::OUString const&, rtl::OUString 
const&, int, 
com::sun::star::uno::Sequence const&) 
framework/source/services/frame.cxx
> #19 0x7fe25cba4dae in 
dbaui::DatabaseObjectView::doDispatch(comphelper::NamedValueCollection const&) 
dbaccess/source/ui/misc/databaseobjectview.cxx:140:41
> #20 0x7fe25cba3514 in 
dbaui::DatabaseObjectView::doCreateView(com::sun::star::uno::Any const&, 
rtl::OUString const&, comphelper::NamedValueCollection const&) 
dbaccess/source/ui/misc/databaseobjectview.cxx:97:16
> #21 0x7fe25cba667c in 
dbaui::TableDesigner::doCreateView(com::sun::star::uno::Any const&, 
rtl::OUString const&, comphelper::NamedValueCollection const&) 
dbaccess/source/ui/misc/databaseobjectview.cxx:233:40
> #22 0x7fe25cba2fec in 
dbaui::DatabaseObjectView::createNew(com::sun::star::uno::Reference
 const&, comphelper::NamedValueCollection const&) 
dbaccess/source/ui/misc/databaseobjectview.cxx:79:16
> #23 0x7fe25c07bdfe in 
dbaui::OApplicationController::newElement(dbaui::ElementType, 
comphelper::NamedValueCollection const&, 
com::sun::star::uno::Reference&) 
dbaccess/source/ui/app/AppController.cxx:1968:40
> #24 0x7fe25c076546 in dbaui::OApplicationController::Execute(unsigned 
short, com::sun::star::uno::Sequence 
const&) dbaccess/source/ui/app/AppController.cxx:1223:25
> #25 0x7fe25c3ef474 in 
dbaui::OGenericUnoController::executeChecked(com::sun::star::util::URL const&, 
com::sun::star::uno::Sequence const&) 
dbaccess/source/ui/browser/genericcontroller.cxx:1061:13
> #26 0x7fe25c1dd91a in 
dbaui::OCreationList::onSelected(SvTreeListEntry const*) const 
dbaccess/source/ui/app/AppDetailView.cxx:309:81
> #27 0x7fe25c1e0de9 in dbaui::OCreation

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

2018-02-06 Thread Tamás Zolnai
 sw/source/filter/ascii/parasc.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit cfb68bab5fdbcfbb9370cf59cc3c1d5acd6f9737
Author: Tamás Zolnai 
Date:   Thu Jan 18 13:57:22 2018 +0100

tdf#115088: Pasting multi-line text from external source behaves strangely

Regression from:
e68b6e349c31ac1376e90218013e1e7612f2b522

AppendTextNode might be sufficient for import (when there is no
content in the document), but for clipboard operations better to
use the original SplitNode method.

Change-Id: I7de3e9bc9c5356acb0b4cc43927a0d39079522b2
Reviewed-on: https://gerrit.libreoffice.org/48124
Tested-by: Jenkins 
Reviewed-by: Tamás Zolnai 
(cherry picked from commit 657da4697379274295e9fd32d3abc1334ebd50d2)
Reviewed-on: https://gerrit.libreoffice.org/48204
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 
(cherry picked from commit c163db958f0e105b8d37eaef6388a4f89c57d251)
Reviewed-on: https://gerrit.libreoffice.org/49301
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/sw/source/filter/ascii/parasc.cxx 
b/sw/source/filter/ascii/parasc.cxx
index e3045b0edee8..bd9af08c3cb7 100644
--- a/sw/source/filter/ascii/parasc.cxx
+++ b/sw/source/filter/ascii/parasc.cxx
@@ -481,7 +481,10 @@ sal_uLong SwASCIIParser::ReadChars()
 {
 // We found a CR/LF, thus save the text
 InsertText( OUString( pLastStt ));
-pDoc->getIDocumentContentOperations().AppendTextNode( 
*pPam->GetPoint() );
+if(bNewDoc)
+pDoc->getIDocumentContentOperations().AppendTextNode( 
*pPam->GetPoint() );
+else
+pDoc->getIDocumentContentOperations().SplitNode( 
*pPam->GetPoint(), false );
 pLastStt = pStt;
 nLineLen = 0;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-06 Thread Michael Stahl
 pyuno/source/loader/pyuno_loader.cxx |   25 +
 1 file changed, 21 insertions(+), 4 deletions(-)

New commits:
commit 362b0c521c1c58dc8ea5e87ecbb482d5bdc073f4
Author: Michael Stahl 
Date:   Thu Feb 1 13:52:00 2018 +0100

tdf#114815 pyuno: avoid 2 threads initing python in parallel

According to the crash reports, it's possible for the grammar checking
thread to call GetGrammarChecker, instantiating lightproof, at the same
time as the main thread instantiates LngSvcMgr, which also instantiates
(some?) (all?) grammar checkers.

Ensure that pyuno_loader::CreateInstance() initialises Python only
once with a C++11 thread safe static.

For the backport, use rtl::Static instead, because on the 5.4 branch
MSVC does not have HAVE_THREADSAFE_STATICS enabled.

Change-Id: I5b1faba9107355c508831a078366e4a29fdbfadf
(cherry picked from commit 5357ca82846ea7147ad61e9340f25647a5934eb0)
Reviewed-on: https://gerrit.libreoffice.org/49116
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/pyuno/source/loader/pyuno_loader.cxx 
b/pyuno/source/loader/pyuno_loader.cxx
index adbf6c88e098..0408af0f4043 100644
--- a/pyuno/source/loader/pyuno_loader.cxx
+++ b/pyuno/source/loader/pyuno_loader.cxx
@@ -31,6 +31,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -176,11 +177,10 @@ static void prependPythonPath( const OUString & 
pythonPathBootstrap )
 osl_setEnvironment(envVar.pData, envValue.pData);
 }
 
-Reference< XInterface > CreateInstance( const Reference< XComponentContext > & 
ctx )
+struct PythonInit
 {
-Reference< XInterface > ret;
-
-if( ! Py_IsInitialized() )
+PythonInit() {
+if (! Py_IsInitialized()) // may be inited by getComponentContext() already
 {
 OUString pythonPath;
 OUString pythonHome;
@@ -236,9 +236,26 @@ Reference< XInterface > CreateInstance( const Reference< 
XComponentContext > & c
 // PyThreadAttach below.
 PyThreadState_Delete(tstate);
 }
+}
+};
+
+namespace {
+struct thePythonInit : public rtl::Static {};
+}
+
+Reference CreateInstance(const Reference & ctx)
+{
+// tdf#114815 thread-safe static to init python only once
+thePythonInit::get();
+
+Reference< XInterface > ret;
 
 PyThreadAttach attach( PyInterpreterState_Head() );
 {
+// note: this can't race against getComponentContext() because
+// either (in soffice.bin) CreateInstance() must be called before
+// getComponentContext() can be called, or (in python.bin) the other
+// way around
 if( ! Runtime::isInitialized() )
 {
 Runtime::initialize( ctx );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-06 Thread Bartosz Kosiorek
 sc/source/core/tool/interpr1.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit d4a41817aa86fffaa3a27265966bc8265d34dd0a
Author: Bartosz Kosiorek 
Date:   Tue Feb 6 02:10:14 2018 +0100

tdf#115162 Fix support for external reference for IFS functions

Functions SUMIFS, AVERAGEIFS, COUNTIFS, MINIFS, MAXIFS were not
supported External references.

The root cause issue, was using PopMatrix() method for:
svExternalSingleRef and svExternalDoubleRef.

PopMatrix() method only supports svMatrix, and in other
cases returns FormulaError::IllegalParameter error.

To resolve that issue, the method GetMatrix() was used.
It is properly support svMatrix, svExternalSingleRef and 
svExternalDoubleRef.

Change-Id: I3e30ca50069264a6d990b16ec668e6d0df51c6e6
Reviewed-on: https://gerrit.libreoffice.org/49264
Tested-by: Jenkins 
Reviewed-by: Eike Rathke 
(cherry picked from commit b6db65752c60de7268e4f65d7fc5ac110adb2fb0)
Reviewed-on: https://gerrit.libreoffice.org/49284

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 42db756a2e01..53122e82cb40 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -5431,7 +5431,7 @@ void ScInterpreter::IterateParametersIfs( 
sc::ParamIfsResult& rRes )
 case svExternalSingleRef:
 case svExternalDoubleRef:
 {
-pQueryMatrix = PopMatrix();
+pQueryMatrix = GetMatrix();
 if (!pQueryMatrix)
 {
 SetError( FormulaError::IllegalParameter);
@@ -5590,7 +5590,7 @@ void ScInterpreter::IterateParametersIfs( 
sc::ParamIfsResult& rRes )
 case svExternalSingleRef:
 case svExternalDoubleRef:
 {
-pMainMatrix = PopMatrix();
+pMainMatrix = GetMatrix();
 if (!pMainMatrix)
 {
 SetError( FormulaError::IllegalParameter);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-06 Thread Andrea Gelmini
 sw/qa/extras/rtfimport/rtfimport.cxx|2 +-
 writerfilter/source/rtftok/rtfdispatchvalue.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 703d81984d9f8dcfdf1f22b8dbeb5ee24d47d61b
Author: Andrea Gelmini 
Date:   Tue Feb 6 14:19:13 2018 +0100

Fix typos

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

diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx 
b/sw/qa/extras/rtfimport/rtfimport.cxx
index 0c63379ccfbe..fd05a6ce69d7 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -1392,7 +1392,7 @@ DECLARE_RTFIMPORT_TEST(testTdf104016, "tdf104016.rtf")
 
 DECLARE_RTFIMPORT_TEST(testTdf115242, "tdf115242.rtf")
 {
-// This was 0, overriden left margin was lost by too aggressive style
+// This was 0, overridden left margin was lost by too aggressive style
 // deduplication.
 CPPUNIT_ASSERT_EQUAL(static_cast(2787),
  getProperty(getParagraph(1), 
"ParaLeftMargin"));
diff --git a/writerfilter/source/rtftok/rtfdispatchvalue.cxx 
b/writerfilter/source/rtftok/rtfdispatchvalue.cxx
index b44d48a997e0..259b896cdcc3 100644
--- a/writerfilter/source/rtftok/rtfdispatchvalue.cxx
+++ b/writerfilter/source/rtftok/rtfdispatchvalue.cxx
@@ -673,7 +673,7 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword 
nKeyword, int nParam)
 else
 {
 // Insert at the start, so properties inherited from the list
-// can be overriden by direct formatting. But still allow the
+// can be overridden by direct formatting. But still allow the
 // case when old-style paragraph numbering is already
 // tokenized.
 putNestedSprm(m_aStates.top().aParagraphSprms, 
NS_ooxml::LN_CT_PPrBase_numPr,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-06 Thread Julien Nabet
 vcl/source/gdi/pngwrite.cxx |   15 ++-
 1 file changed, 6 insertions(+), 9 deletions(-)

New commits:
commit f23b15106dae5424a8b928793a1ae8c1445c0477
Author: Julien Nabet 
Date:   Tue Feb 6 10:44:16 2018 +0100

Use for-range loop in pngwrite (vcl)

Change-Id: I957fb399fd1dc630c9a6bdcffe530921eaf66e2d
Reviewed-on: https://gerrit.libreoffice.org/49278
Reviewed-by: Noel Grandin 
Tested-by: Jenkins 
Reviewed-by: Julien Nabet 

diff --git a/vcl/source/gdi/pngwrite.cxx b/vcl/source/gdi/pngwrite.cxx
index 072e74d62530..e4c41d0386c6 100644
--- a/vcl/source/gdi/pngwrite.cxx
+++ b/vcl/source/gdi/pngwrite.cxx
@@ -261,24 +261,21 @@ bool PNGWriterImpl::Write(SvStream& rOStm)
 rOStm.WriteUInt32(0x89504e47);
 rOStm.WriteUInt32(0x0d0a1a0a);
 
-std::vector< vcl::PNGWriter::ChunkData >::iterator 
aBeg(maChunkSeq.begin());
-std::vector< vcl::PNGWriter::ChunkData >::iterator aEnd(maChunkSeq.end());
-while (aBeg != aEnd)
+for (auto const& chunk : maChunkSeq)
 {
-sal_uInt32 nType = aBeg->nType;
+sal_uInt32 nType = chunk.nType;
 #if defined(__LITTLEENDIAN) || defined(OSL_LITENDIAN)
 nType = OSL_SWAPDWORD(nType);
 #endif
 sal_uInt32 nCRC = rtl_crc32(0, &nType, 4);
-sal_uInt32 nDataSize = aBeg->aData.size();
+sal_uInt32 nDataSize = chunk.aData.size();
 if (nDataSize)
-nCRC = rtl_crc32(nCRC, &aBeg->aData[0], nDataSize);
+nCRC = rtl_crc32(nCRC, &chunk.aData[0], nDataSize);
 rOStm.WriteUInt32(nDataSize);
-rOStm.WriteUInt32(aBeg->nType);
+rOStm.WriteUInt32(chunk.nType);
 if (nDataSize)
-rOStm.WriteBytes(&aBeg->aData[0], nDataSize);
+rOStm.WriteBytes(&chunk.aData[0], nDataSize);
 rOStm.WriteUInt32(nCRC);
-++aBeg;
 }
 rOStm.SetEndian(nOldMode);
 return mbStatus;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-06 Thread Michael Stahl
 pyuno/source/loader/pyuno_loader.cxx |   20 
 1 file changed, 16 insertions(+), 4 deletions(-)

New commits:
commit ed8a8c9a6ed377aaed3d62e17653a65e93eb3cc6
Author: Michael Stahl 
Date:   Thu Feb 1 13:52:00 2018 +0100

tdf#114815 pyuno: avoid 2 threads initing python in parallel

According to the crash reports, it's possible for the grammar checking
thread to call GetGrammarChecker, instantiating lightproof, at the same
time as the main thread instantiates LngSvcMgr, which also instantiates
(some?) (all?) grammar checkers.

Ensure that pyuno_loader::CreateInstance() initialises Python only
once with a C++11 thread safe static.

Change-Id: I5b1faba9107355c508831a078366e4a29fdbfadf
(cherry picked from commit 5357ca82846ea7147ad61e9340f25647a5934eb0)
Reviewed-on: https://gerrit.libreoffice.org/49115
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/pyuno/source/loader/pyuno_loader.cxx 
b/pyuno/source/loader/pyuno_loader.cxx
index adbf6c88e098..9e87b0bcba32 100644
--- a/pyuno/source/loader/pyuno_loader.cxx
+++ b/pyuno/source/loader/pyuno_loader.cxx
@@ -176,11 +176,10 @@ static void prependPythonPath( const OUString & 
pythonPathBootstrap )
 osl_setEnvironment(envVar.pData, envValue.pData);
 }
 
-Reference< XInterface > CreateInstance( const Reference< XComponentContext > & 
ctx )
+struct PythonInit
 {
-Reference< XInterface > ret;
-
-if( ! Py_IsInitialized() )
+PythonInit() {
+if (! Py_IsInitialized()) // may be inited by getComponentContext() already
 {
 OUString pythonPath;
 OUString pythonHome;
@@ -236,9 +235,22 @@ Reference< XInterface > CreateInstance( const Reference< 
XComponentContext > & c
 // PyThreadAttach below.
 PyThreadState_Delete(tstate);
 }
+}
+};
+
+Reference CreateInstance(const Reference & ctx)
+{
+// tdf#114815 thread-safe static to init python only once
+static PythonInit s_Init;
+
+Reference< XInterface > ret;
 
 PyThreadAttach attach( PyInterpreterState_Head() );
 {
+// note: this can't race against getComponentContext() because
+// either (in soffice.bin) CreateInstance() must be called before
+// getComponentContext() can be called, or (in python.bin) the other
+// way around
 if( ! Runtime::isInitialized() )
 {
 Runtime::initialize( ctx );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bin/check-elf-dynamic-objects

2018-02-06 Thread Michael Stahl
 bin/check-elf-dynamic-objects |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit a0d533af0c110218d3812664e32930aa475be3cb
Author: Michael Stahl 
Date:   Tue Feb 6 14:05:09 2018 +0100

check-elf-objects: add mergedlib libs for Linux-rpm_deb-x86_64@70-TDF

Change-Id: I7b0febee10a98809073f0bfd023d39d32684a566

diff --git a/bin/check-elf-dynamic-objects b/bin/check-elf-dynamic-objects
index 805a911bc87c..5c45b3d2cf46 100755
--- a/bin/check-elf-dynamic-objects
+++ b/bin/check-elf-dynamic-objects
@@ -71,7 +71,7 @@ gstreamerwhitelist="libgstpbutils-1.0.so.0 
libgstvideo-1.0.so.0 libgstbase-1.0.s
 gtk2whitelist="libgtk-x11-2.0.so.0 libgdk-x11-2.0.so.0 libpangocairo-1.0.so.0 
libatk-1.0.so.0 libcairo.so.2 libgio-2.0.so.0 libpangoft2-1.0.so.0 
libpango-1.0.so.0 libfontconfig.so.1 libfreetype.so.6 libgdk_pixbuf-2.0.so.0 
libgobject-2.0.so.0 libglib-2.0.so.0 libgmodule-2.0.so.0 libgthread-2.0.so.0 
libdbus-glib-1.so.2 libdbus-1.so.3"
 gtk3whitelist="libgtk-3.so.0 libgdk-3.so.0 libcairo-gobject.so.2 
libpangocairo-1.0.so.0 libatk-1.0.so.0 libcairo.so.2 libgio-2.0.so.0 
libpangoft2-1.0.so.0 libpango-1.0.so.0 libfontconfig.so.1 libfreetype.so.6 
libgdk_pixbuf-2.0.so.0 libgobject-2.0.so.0 libglib-2.0.so.0 libgmodule-2.0.so.0 
libgthread-2.0.so.0 libdbus-glib-1.so.2 libdbus-1.so.3"
 kde4whitelist="libkio.so.5 libkfile.so.4 libkdeui.so.5 libkdecore.so.5 
libQtNetwork.so.4 libQtGui.so.4 libQtCore.so.4 libglib-2.0.so.0"
-avahiwhitelist="libdbus-glib-1.so.2 libdbus-1.so.3 libgobject-2.0.so.0 
libglib-2.0.so.0 libavahi-common.so.3 libavahi-client.so.3"
+avahiwhitelist="libdbus-glib-1.so.2 libdbus-1.so.3 libgobject-2.0.so.0 
libgmodule-2.0.so.0 libgthread-2.0.so.0 libglib-2.0.so.0 libavahi-common.so.3 
libavahi-client.so.3"
 kerberoswhitelist="libgssapi_krb5.so.2 libcom_err.so.2 libkrb5.so.3"
 
 check_one_file()
@@ -127,6 +127,9 @@ local file="$1"
 */libpostgresql-sdbc-impllo.so)
 whitelist="${whitelist} ${kerberoswhitelist}"
 ;;
+*/libmergedlo.so)
+whitelist="${whitelist} ${x11whitelist} ${openglwhitelist} 
${giowhitelist} libcups.so.2 libcairo.so.2"
+;;
 esac
 if test "${skip}" = 0 && readelf -d "${file}" &> /dev/null ; then
 rpath=$(readelf -d "${file}" | grep '(\(RPATH\|RUNPATH\))' || true)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - officecfg/registry

2018-02-06 Thread Stephan Bergmann
 officecfg/registry/schema/org/openoffice/Setup.xcs |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e9d8b260708bc12e00bf79ff436cb87e12922fab
Author: Stephan Bergmann 
Date:   Mon Feb 5 17:17:17 2018 +0100

rhbz#1541486: Fix localized'ness of ooSetupFactoryUIName props

8f44fb5ee0bd21d192820ffd359504f6d1c68a52 "Mark Base window titles for
localisation" localized some uses of ooSetupFactoryUIName in
officecfg/registry/data/org/openoffice/Setup.xcu, but failed to mark the 
prop as
oor:localized="true" in officecfg/registry/schema/org/openoffice/Setup.xcs. 
 (So
some arbitrary localized version of the prop would win at runtime, 
potentially
displaying certain window titles in wrong languages.)

Other uses of ooSetupFactoryUIName in Setup.xcu (for "Calc", "Impress",
"Writer", etc.) have never been localized, and are probably not meant to be
localized.  AFAICS, irrespective of oor:localized="true" in Setup.xcs, their
values not being marked with xml:lang="en-US" in Setup.xcu will mean that 
they
will not appear in
translations/source/*/officecfg/registry/data/org/openoffice.po and will not
accidentally start to be translated after this commit.

(Theoretically, inconsistencies between oor:localized in xcs and uses of
xml:lang in xcu could statically be caught at build time, e.g., with
officecfg/util/sanity.xsl.  However, those checks work on each XML file
individually, so don't have the schema information available when looking at
the data in the xcu file.  And those checks are written in XSLT, which makes
writing new checks rather, erm, unpleasant.)

Change-Id: I9c61e8ebf75d3d54f7e5b6688eac47a6ed8dc5c3
Reviewed-on: https://gerrit.libreoffice.org/49252
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 
(cherry picked from commit ffd8369b909c86653ef30593fddf67c9f5308583)
Reviewed-on: https://gerrit.libreoffice.org/49271
Reviewed-by: Andras Timar 

diff --git a/officecfg/registry/schema/org/openoffice/Setup.xcs 
b/officecfg/registry/schema/org/openoffice/Setup.xcs
index 3eecf9728b4c..bcb86849226f 100644
--- a/officecfg/registry/schema/org/openoffice/Setup.xcs
+++ b/officecfg/registry/schema/org/openoffice/Setup.xcs
@@ -149,7 +149,7 @@
   Specifies the short name of the factory.
 
   
-  
+  
 
 
   Specifies the UI name of the factory.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-06 Thread Julien Nabet
 cui/source/options/personalization.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 0ca6361e138d21b7151f926609d497afb47e6966
Author: Julien Nabet 
Date:   Sat Feb 3 15:23:48 2018 +0100

tdf#114731: persona html can contain " instead of "

So let's replace all " with " in the retrieved html

Change-Id: I4a90ecc51e7ce6d1e080e6c1b17b82fe9a29d65e
Reviewed-on: https://gerrit.libreoffice.org/49179
Tested-by: Julien Nabet 
Tested-by: Jenkins 
(cherry picked from commit 2e6bbc04d906ed308fc5ca769bad7b8b4676594e)
Reviewed-on: https://gerrit.libreoffice.org/49285
Reviewed-by: Katarina Behrens 

diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index c75a78c8ef2e..9b3e482b55d2 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -553,10 +553,13 @@ static OUString searchValue( const OString &rBuffer, 
sal_Int32 from, const OStri
 }
 
 /// Parse the Persona web page, and find where to get the bitmaps + the color 
values.
-static bool parsePersonaInfo( const OString &rBuffer, OUString *pHeaderURL, 
OUString *pFooterURL,
+static bool parsePersonaInfo( const OString &rBufferArg, OUString *pHeaderURL, 
OUString *pFooterURL,
   OUString *pTextColor, OUString *pAccentColor, 
OUString *pPreviewURL,
   OUString *pName )
 {
+// tdf#115417: buffer retrieved from html response can contain " or 
"
+// let's replace the whole buffer with last one so we can treat it easily
+OString rBuffer = rBufferArg.replaceAll(OString("""), 
OString("""));
 // it is the first attribute that contains "persona="
 sal_Int32 persona = rBuffer.indexOf( "data-browsertheme=\"{" );
 if ( persona < 0 )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - officecfg/registry

2018-02-06 Thread Stephan Bergmann
 officecfg/registry/schema/org/openoffice/Setup.xcs |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ea1f14740c181bbabd284ad31aa3e5213695f9a8
Author: Stephan Bergmann 
Date:   Mon Feb 5 17:17:17 2018 +0100

rhbz#1541486: Fix localized'ness of ooSetupFactoryUIName props

8f44fb5ee0bd21d192820ffd359504f6d1c68a52 "Mark Base window titles for
localisation" localized some uses of ooSetupFactoryUIName in
officecfg/registry/data/org/openoffice/Setup.xcu, but failed to mark the 
prop as
oor:localized="true" in officecfg/registry/schema/org/openoffice/Setup.xcs. 
 (So
some arbitrary localized version of the prop would win at runtime, 
potentially
displaying certain window titles in wrong languages.)

Other uses of ooSetupFactoryUIName in Setup.xcu (for "Calc", "Impress",
"Writer", etc.) have never been localized, and are probably not meant to be
localized.  AFAICS, irrespective of oor:localized="true" in Setup.xcs, their
values not being marked with xml:lang="en-US" in Setup.xcu will mean that 
they
will not appear in
translations/source/*/officecfg/registry/data/org/openoffice.po and will not
accidentally start to be translated after this commit.

(Theoretically, inconsistencies between oor:localized in xcs and uses of
xml:lang in xcu could statically be caught at build time, e.g., with
officecfg/util/sanity.xsl.  However, those checks work on each XML file
individually, so don't have the schema information available when looking at
the data in the xcu file.  And those checks are written in XSLT, which makes
writing new checks rather, erm, unpleasant.)

Change-Id: I9c61e8ebf75d3d54f7e5b6688eac47a6ed8dc5c3
Reviewed-on: https://gerrit.libreoffice.org/49252
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 
(cherry picked from commit ffd8369b909c86653ef30593fddf67c9f5308583)
Reviewed-on: https://gerrit.libreoffice.org/49270
Reviewed-by: Michael Stahl 

diff --git a/officecfg/registry/schema/org/openoffice/Setup.xcs 
b/officecfg/registry/schema/org/openoffice/Setup.xcs
index f55e3698f58f..31db1eca9af4 100644
--- a/officecfg/registry/schema/org/openoffice/Setup.xcs
+++ b/officecfg/registry/schema/org/openoffice/Setup.xcs
@@ -149,7 +149,7 @@
   Specifies the short name of the factory.
 
   
-  
+  
 
 
   Specifies the UI name of the factory.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-06 Thread Noel Grandin
 filter/source/msfilter/escherex.cxx |6 
 include/svx/xpoly.hxx   |9 
 include/tools/poly.hxx  |1 
 svx/inc/xpolyimp.hxx|   27 --
 svx/source/svdraw/svdoedge.cxx  |   21 +
 svx/source/xoutdev/_xpoly.cxx   |  401 
 tools/inc/poly.h|1 
 tools/source/generic/poly.cxx   |   22 +
 8 files changed, 152 insertions(+), 336 deletions(-)

New commits:
commit f9c2bcc8b761f5e21354c0fb7bca6aa432d11ec2
Author: Noel Grandin 
Date:   Mon Feb 5 15:56:12 2018 +0200

simplify ImpXPolygon

just use a std::vector>

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

diff --git a/filter/source/msfilter/escherex.cxx 
b/filter/source/msfilter/escherex.cxx
index 561c98f49ccc..a4888620a0bb 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -2029,7 +2029,7 @@ when save as MS file, the connector must be convert to 
corresponding type.
 sal_Int32 lcl_GetAdjustValueCount( const XPolygon& rPoly )
 {
 int nRet = 0;
-switch (  rPoly.GetSize() )
+switch (  rPoly.GetPointCount() )
 {
 case 2 :
 case 3:
@@ -2042,7 +2042,7 @@ sal_Int32 lcl_GetAdjustValueCount( const XPolygon& rPoly )
 nRet = 2;
 break;
 default:
-if ( rPoly.GetSize()>=6 )
+if ( rPoly.GetPointCount()>=6 )
 nRet = 3;
 break;
 }
@@ -2052,7 +2052,7 @@ sal_Int32 lcl_GetAdjustValueCount( const XPolygon& rPoly )
 // Adjust value decide the position which connector should turn a corner
 sal_Int32 lcl_GetConnectorAdjustValue ( const XPolygon& rPoly, sal_uInt16 
nIndex )
 {
-sal_uInt16 k =  rPoly.GetSize();
+sal_uInt16 k =  rPoly.GetPointCount();
 OSL_ASSERT ( k >= ( 3 + nIndex ) );
 
 Point aPt;
diff --git a/include/svx/xpoly.hxx b/include/svx/xpoly.hxx
index 2c6f848d00be..ffc95ab3f4d0 100644
--- a/include/svx/xpoly.hxx
+++ b/include/svx/xpoly.hxx
@@ -53,7 +53,8 @@ class SVX_DLLPUBLIC XPolygon final
 static bool CheckAngles(sal_uInt16& nStart, sal_uInt16 nEnd, sal_uInt16& 
nA1, sal_uInt16& nA2);
 
 public:
-XPolygon( sal_uInt16 nSize=16 );
+XPolygon();
+XPolygon( sal_uInt16 nSize );
 XPolygon( const XPolygon& rXPoly );
 XPolygon( XPolygon&& rXPoly );
 XPolygon( const tools::Polygon& rPoly );
@@ -64,10 +65,8 @@ public:
 
 ~XPolygon();
 
-sal_uInt16  GetSize() const;
-
-voidSetPointCount( sal_uInt16 nPoints );
 sal_uInt16  GetPointCount() const;
+voidSetPointCount( sal_uInt16 nPoints );
 
 voidInsert( sal_uInt16 nPos, const Point& rPt, PolyFlags eFlags );
 voidInsert( sal_uInt16 nPos, const XPolygon& rXPoly );
@@ -81,7 +80,7 @@ public:
 XPolygon&   operator=( XPolygon&& rXPoly );
 booloperator==( const XPolygon& rXPoly ) const;
 
-PolyFlags  GetFlags( sal_uInt16 nPos ) const;
+PolyFlags   GetFlags( sal_uInt16 nPos ) const;
 voidSetFlags( sal_uInt16 nPos, PolyFlags eFlags );
 boolIsControl(sal_uInt16 nPos) const;
 boolIsSmooth(sal_uInt16 nPos) const;
diff --git a/include/tools/poly.hxx b/include/tools/poly.hxx
index 1a0926ecfff3..259aeac21b9c 100644
--- a/include/tools/poly.hxx
+++ b/include/tools/poly.hxx
@@ -88,6 +88,7 @@ public:
 Polygon( sal_uInt16 nSize );
 Polygon( sal_uInt16 nPoints, const Point* pPtAry,
  const PolyFlags* pFlagAry = nullptr );
+Polygon( std::vector< std::pair > 
const & );
 Polygon( const tools::Rectangle& rRect );
 Polygon( const tools::Rectangle& rRect,
  sal_uInt32 nHorzRound, sal_uInt32 nVertRound 
);
diff --git a/svx/inc/xpolyimp.hxx b/svx/inc/xpolyimp.hxx
index fd0fe2905d8b..76f4ae24c87f 100644
--- a/svx/inc/xpolyimp.hxx
+++ b/svx/inc/xpolyimp.hxx
@@ -29,26 +29,13 @@ class Point;
 class ImpXPolygon
 {
 public:
-Point*  pPointAry;
-std::unique_ptr
-pFlagAry;
-Point*  pOldPointAry;
-boolbDeleteOldPoints;
-sal_uInt16  nSize;
-sal_uInt16  nResize;
-sal_uInt16  nPoints;
-
-ImpXPolygon( sal_uInt16 nInitSize, sal_uInt16 nResize=16 );
-ImpXPolygon( const ImpXPolygon& rImpXPoly );
-~ImpXPolygon();
-
-bool operator==(const ImpXPolygon& rImpXPoly) const;
-
-void CheckPointDelete() const;
-
-void Resize( sal_uInt16 nNewSize, bool bDeletePoints = true );
-void InsertSpace( sal_uInt16 nPos, sal_uInt16 nCount );
-void Remove( sal_uInt16 nPos, sal_uInt16 nCount );
+std::vector> mvPointsAndFlags;
+ImpXPolygon() = default;
+ImpXPolygon(sal_uInt16 nSize)
+{
+mvPointsAndFl

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

2018-02-06 Thread Noel Grandin
 include/svx/svdotext.hxx   |5 +++--
 svx/source/svdraw/svdotext.cxx |   10 +-
 2 files changed, 8 insertions(+), 7 deletions(-)

New commits:
commit e1f479af4ddde90f9e80b5079ac759cb9f7743a1
Author: Noel Grandin 
Date:   Mon Feb 5 10:38:17 2018 +0200

loplugin:useuniqueptr in SdrTextObj

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

diff --git a/include/svx/svdotext.hxx b/include/svx/svdotext.hxx
index ad18a2512e0b..4f862638ce8b 100644
--- a/include/svx/svdotext.hxx
+++ b/include/svx/svdotext.hxx
@@ -28,11 +28,12 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
 #include 
+#include 
+#include 
 
 
 //   forward declarations
@@ -185,7 +186,7 @@ protected:
 GeoStat aGeo;
 
 // this is the active text
-SdrText*mpText;
+std::unique_ptrmpText;
 
 // This contains the dimensions of the text
 SizeaTextSize;
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index 0dd6abe5788a..a0cf962a7671 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -178,7 +178,7 @@ SdrTextObj::~SdrTextObj()
 rOutl.SetTextObj( nullptr );
 }
 
-delete mpText;
+mpText.reset();
 
 ImpDeregisterLink();
 }
@@ -2113,7 +2113,7 @@ SdrText* SdrTextObj::getActiveText() const
 if( !mpText )
 return getText( 0 );
 else
-return mpText;
+return mpText.get();
 }
 
 /** returns the nth available text. */
@@ -2121,9 +2121,9 @@ SdrText* SdrTextObj::getText( sal_Int32 nIndex ) const
 {
 if( nIndex == 0 )
 {
-if( mpText == nullptr )
-const_cast< SdrTextObj* >(this)->mpText = new SdrText( 
*const_cast< SdrTextObj* >(this) );
-return mpText;
+if( !mpText )
+const_cast< SdrTextObj* >(this)->mpText.reset( new SdrText( 
*const_cast< SdrTextObj* >(this) ) );
+return mpText.get();
 }
 else
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bin/check-elf-dynamic-objects

2018-02-06 Thread Michael Stahl
 bin/check-elf-dynamic-objects |8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 7bf0b997366aed67ae1b0cb467113a7be456a765
Author: Michael Stahl 
Date:   Tue Feb 6 12:17:04 2018 +0100

check-elf-objects: add 32-bit libs for Linux-rpm_deb-x86@71-TDF-dbg

Change-Id: Ibd308d94c7cd92ab5e2590554b54517d2ef898fe

diff --git a/bin/check-elf-dynamic-objects b/bin/check-elf-dynamic-objects
index 9d2551d506dc..805a911bc87c 100755
--- a/bin/check-elf-dynamic-objects
+++ b/bin/check-elf-dynamic-objects
@@ -62,10 +62,11 @@ programfiles=$(echo ${files} | grep -o '/program/[^/]* ' | 
xargs -n 1 basename)
 
 # whitelists should contain only system libraries that have a good reputation
 # of maintaining ABI stability
-globalwhitelist="ld-linux-x86-64.so.2 libc.so.6 libm.so.6 libdl.so.2 
libpthread.so.0 librt.so.1 libutil.so.1 libnsl.so.1 libcrypt.so.1 libgcc_s.so.1 
libstdc++.so.6 libz.so.1 libfontconfig.so.1 libfreetype.so.6 libxml2.so.2 
libxslt.so.1 libexslt.so.0"
+globalwhitelist="ld-linux-x86-64.so.2 ld-linux.so.2 libc.so.6 libm.so.6 
libdl.so.2 libpthread.so.0 librt.so.1 libutil.so.1 libnsl.so.1 libcrypt.so.1 
libgcc_s.so.1 libstdc++.so.6 libz.so.1 libfontconfig.so.1 libfreetype.so.6 
libxml2.so.2 libxslt.so.1 libexslt.so.0"
 x11whitelist="libX11.so.6 libXext.so.6 libSM.so.6 libICE.so.6 libXinerama.so.1 
libXrender.so.1 libXrandr.so.2 libcairo.so.2"
 openglwhitelist="libGL.so.1"
-giowhitelist="libgio-2.0.so.0 libgobject-2.0.so.0 libglib-2.0.so.0 
libdbus-glib-1.so.2 libdbus-1.so.3"
+giowhitelist="libgio-2.0.so.0 libgobject-2.0.so.0 libgmodule-2.0.so.0 
libgthread-2.0.so.0 libglib-2.0.so.0 libdbus-glib-1.so.2 libdbus-1.so.3"
+gstreamer010whitelist="libgstpbutils-0.10.so.0 libgstinterfaces-0.10.so.0 
libgstreamer-0.10.so.0"
 gstreamerwhitelist="libgstpbutils-1.0.so.0 libgstvideo-1.0.so.0 
libgstbase-1.0.so.0 libgstreamer-1.0.so.0"
 gtk2whitelist="libgtk-x11-2.0.so.0 libgdk-x11-2.0.so.0 libpangocairo-1.0.so.0 
libatk-1.0.so.0 libcairo.so.2 libgio-2.0.so.0 libpangoft2-1.0.so.0 
libpango-1.0.so.0 libfontconfig.so.1 libfreetype.so.6 libgdk_pixbuf-2.0.so.0 
libgobject-2.0.so.0 libglib-2.0.so.0 libgmodule-2.0.so.0 libgthread-2.0.so.0 
libdbus-glib-1.so.2 libdbus-1.so.3"
 gtk3whitelist="libgtk-3.so.0 libgdk-3.so.0 libcairo-gobject.so.2 
libpangocairo-1.0.so.0 libatk-1.0.so.0 libcairo.so.2 libgio-2.0.so.0 
libpangoft2-1.0.so.0 libpango-1.0.so.0 libfontconfig.so.1 libfreetype.so.6 
libgdk_pixbuf-2.0.so.0 libgobject-2.0.so.0 libglib-2.0.so.0 libgmodule-2.0.so.0 
libgthread-2.0.so.0 libdbus-glib-1.so.2 libdbus-1.so.3"
@@ -93,6 +94,9 @@ local file="$1"
 */libavmediagst.so)
 whitelist="${whitelist} ${gtk3whitelist} ${gstreamerwhitelist}"
 ;;
+*/libavmediagst_0_10.so)
+whitelist="${whitelist} ${gtk2whitelist} ${gstreamer010whitelist}"
+;;
 */libvclplug_kde4lo.so|*/libkde4be1lo.so)
 whitelist="${whitelist} ${x11whitelist} ${kde4whitelist}"
 ;;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-06 Thread Noel Grandin
 include/svx/svdetc.hxx   |3 ++-
 svx/source/svdraw/svdetc.cxx |3 +--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 2589cb2a7eba778c249eaa938eb1bf934c6bf3b4
Author: Noel Grandin 
Date:   Mon Feb 5 10:05:13 2018 +0200

loplugin:useuniqueptr in OLEObjCache

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

diff --git a/include/svx/svdetc.hxx b/include/svx/svdetc.hxx
index ef62a825245a..20d37c3c6d4f 100644
--- a/include/svx/svdetc.hxx
+++ b/include/svx/svdetc.hxx
@@ -27,6 +27,7 @@
 #include 
 #include 
 #include 
+#include 
 
 
 /**
@@ -162,7 +163,7 @@ class OLEObjCache
 std::vector maObjs;
 
 size_t nSize;
-AutoTimer*  pTimer;
+std::unique_ptr  pTimer;
 
 static bool UnloadObj( SdrOle2Obj* pObj );
 DECL_LINK( UnloadCheckHdl, Timer*, void );
diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx
index aa92b123be97..3c6924affdc4 100644
--- a/svx/source/svdraw/svdetc.cxx
+++ b/svx/source/svdraw/svdetc.cxx
@@ -108,7 +108,7 @@ OLEObjCache::OLEObjCache()
 nSize = 
officecfg::Office::Common::Cache::DrawingEngine::OLE_Objects::get();
 else
 nSize = 100;
-pTimer = new AutoTimer( "svx OLEObjCache pTimer UnloadCheck" );
+pTimer.reset( new AutoTimer( "svx OLEObjCache pTimer UnloadCheck" ) );
 pTimer->SetInvokeHandler( LINK(this, OLEObjCache, UnloadCheckHdl) );
 pTimer->SetTimeout(2);
 pTimer->SetStatic();
@@ -117,7 +117,6 @@ OLEObjCache::OLEObjCache()
 OLEObjCache::~OLEObjCache()
 {
 pTimer->Stop();
-delete pTimer;
 }
 
 IMPL_LINK_NOARG(OLEObjCache, UnloadCheckHdl, Timer*, void)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Crash test update

2018-02-06 Thread Caolán McNamara
On Mon, 2018-02-05 at 23:17 +0100, Eike Rathke wrote:
> Shredded with commit 951dd781743c975a7d29cc30e88e1b4a56c0b176

Thanks, appreciate it.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2018-02-06 Thread Julien Nabet
 cui/source/options/personalization.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 2e6bbc04d906ed308fc5ca769bad7b8b4676594e
Author: Julien Nabet 
Date:   Sat Feb 3 15:23:48 2018 +0100

tdf#114731: persona html can contain " instead of "

So let's replace all " with " in the retrieved html

Change-Id: I4a90ecc51e7ce6d1e080e6c1b17b82fe9a29d65e
Reviewed-on: https://gerrit.libreoffice.org/49179
Tested-by: Julien Nabet 
Tested-by: Jenkins 
Tested-by: Xisco Faulí 
Reviewed-by: Katarina Behrens 

diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index c75a78c8ef2e..9b3e482b55d2 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -553,10 +553,13 @@ static OUString searchValue( const OString &rBuffer, 
sal_Int32 from, const OStri
 }
 
 /// Parse the Persona web page, and find where to get the bitmaps + the color 
values.
-static bool parsePersonaInfo( const OString &rBuffer, OUString *pHeaderURL, 
OUString *pFooterURL,
+static bool parsePersonaInfo( const OString &rBufferArg, OUString *pHeaderURL, 
OUString *pFooterURL,
   OUString *pTextColor, OUString *pAccentColor, 
OUString *pPreviewURL,
   OUString *pName )
 {
+// tdf#115417: buffer retrieved from html response can contain " or 
"
+// let's replace the whole buffer with last one so we can treat it easily
+OString rBuffer = rBufferArg.replaceAll(OString("""), 
OString("""));
 // it is the first attribute that contains "persona="
 sal_Int32 persona = rBuffer.indexOf( "data-browsertheme=\"{" );
 if ( persona < 0 )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-06 Thread Bartosz Kosiorek
 sc/source/core/tool/interpr1.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit b6db65752c60de7268e4f65d7fc5ac110adb2fb0
Author: Bartosz Kosiorek 
Date:   Tue Feb 6 02:10:14 2018 +0100

tdf#115162 Fix support for external reference for IFS functions

Functions SUMIFS, AVERAGEIFS, COUNTIFS, MINIFS, MAXIFS were not
supported External references.

The root cause issue, was using PopMatrix() method for:
svExternalSingleRef and svExternalDoubleRef.

PopMatrix() method only supports svMatrix, and in other
cases returns FormulaError::IllegalParameter error.

To resolve that issue, the method GetMatrix() was used.
It is properly support svMatrix, svExternalSingleRef and 
svExternalDoubleRef.

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

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index e99c549d51dd..70533908ffc9 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -5803,7 +5803,7 @@ void ScInterpreter::IterateParametersIfs( 
double(*ResultFunc)( const sc::ParamIf
 case svExternalSingleRef:
 case svExternalDoubleRef:
 {
-pQueryMatrix = PopMatrix();
+pQueryMatrix = GetMatrix();
 if (!pQueryMatrix)
 {
 PushError( FormulaError::IllegalParameter);
@@ -6027,7 +6027,7 @@ void ScInterpreter::IterateParametersIfs( 
double(*ResultFunc)( const sc::ParamIf
 case svExternalSingleRef:
 case svExternalDoubleRef:
 {
-pMainMatrix = PopMatrix();
+pMainMatrix = GetMatrix();
 if (!pMainMatrix)
 {
 PushError( FormulaError::IllegalParameter);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-06 Thread Jim Raykowski
 sfx2/source/sidebar/TabBar.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit a8605dc1619a2275b52e22a60c4ca0715e7ab07d
Author: Jim Raykowski 
Date:   Sun Feb 4 17:45:00 2018 -0900

tdf#115451 Set focus on sidebar deck button when clicked

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

diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx
index 7a9ede9a1f4f..b8b97872e09f 100644
--- a/sfx2/source/sidebar/TabBar.cxx
+++ b/sfx2/source/sidebar/TabBar.cxx
@@ -296,8 +296,9 @@ Image TabBar::GetItemImage(const DeckDescriptor& 
rDeckDescriptor) const
 mxFrame);
 }
 
-IMPL_LINK_NOARG(TabBar::Item, HandleClick, Button*, void)
+IMPL_LINK(TabBar::Item, HandleClick, Button*, pBtn, void)
 {
+pBtn->GrabFocus();
 try
 {
 maDeckActivationFunctor(msDeckId);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: uitest/test_main.py

2018-02-06 Thread Miklos Vajna
 uitest/test_main.py |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 420b80a7d63f77bec324fae72fa1e3d07954bdfa
Author: Miklos Vajna 
Date:   Mon Feb 5 15:33:29 2018 +0100

uitest: improve conditional test suppression to limit by class and by 
function

Example:

make UITest_writerperfect_epubexport 
UITEST_TEST_NAME="epubexport.EPUBExportTest.testUIComponent"

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

diff --git a/uitest/test_main.py b/uitest/test_main.py
index fabb8683d7c6..ec4f2071f102 100644
--- a/uitest/test_main.py
+++ b/uitest/test_main.py
@@ -69,8 +69,6 @@ def add_tests_for_file(test_file, test_suite):
 test_name_limit = os.environ.get('UITEST_TEST_NAME', '')
 test_loader = unittest.TestLoader()
 module_name = os.path.splitext(os.path.split(test_file)[1])[0]
-if len(test_name_limit) > 0 and not 
test_name_limit.startswith(module_name):
-return
 
 loader = importlib.machinery.SourceFileLoader(module_name, test_file)
 mod = loader.load_module()
@@ -78,6 +76,10 @@ def add_tests_for_file(test_file, test_suite):
 for c in classes:
 test_names = test_loader.getTestCaseNames(c)
 for test_name in test_names:
+full_name = ".".join([module_name, c.__name__, test_name])
+if len(test_name_limit) > 0 and not 
test_name_limit.startswith(full_name):
+continue
+
 obj = c(test_name, opts)
 test_suite.addTest(obj)
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-06 Thread Miklos Vajna
 sw/qa/extras/rtfimport/data/tdf115242.rtf |   40 ++
 sw/qa/extras/rtfimport/rtfimport.cxx  |8 
 writerfilter/source/dmapper/DomainMapper.cxx  |   24 +++--
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |5 +-
 writerfilter/source/rtftok/rtfdispatchvalue.cxx   |8 +++-
 writerfilter/source/rtftok/rtfdocumentimpl.cxx|5 +-
 writerfilter/source/rtftok/rtfdocumentimpl.hxx|3 +
 writerfilter/source/rtftok/rtfsprm.cxx|   11 ++
 writerfilter/source/rtftok/rtfsprm.hxx|3 +
 9 files changed, 96 insertions(+), 11 deletions(-)

New commits:
commit 03cee02464f230a2efa67d131c137f32fe540052
Author: Miklos Vajna 
Date:   Mon Feb 5 16:02:19 2018 +0100

tdf#115242 RTF import: order numPr before other paragraph properties

So that paragraph properties inherited from numbering properties can be
properly overwritten with direct formatting, even when we have to take
style deduplication into account.

The OOXML tokenizer already did this,
writerfilter::dmapper::DomainMapper::sprmWithProps()'s
NS_ooxml::LN_CT_NumPr_numId depends on this, so adapt the RTF tokenizer
accordingly.

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

diff --git a/sw/qa/extras/rtfimport/data/tdf115242.rtf 
b/sw/qa/extras/rtfimport/data/tdf115242.rtf
new file mode 100644
index ..f79a0ed9a642
--- /dev/null
+++ b/sw/qa/extras/rtfimport/data/tdf115242.rtf
@@ -0,0 +1,40 @@
+{\rtf1\adeflang1037\ansi\ansicpg1252\uc1\adeff1\deff0\stshfdbch0\stshfloch1\stshfhich1\stshfbi1\deflang1033\deflangfe1033\themelang1033\themelangfe2052\themelangcs1025
+{\*\listtable
+{\list\listtemplateid-454920584
+{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0
+{\leveltext\'02\'00.;}
+{\levelnumbers\'01;}
+\rtlch\fcs1 \af0\afs26 \ltrch\fcs0 \fs26 }
+{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0
+{\leveltext\'02\'01.;}
+{\levelnumbers\'01;}
+\rtlch\fcs1 \af0\afs26 \ltrch\fcs0 \fs26 }
+{\listname ;}
+\listid1}
+}
+{\*\listoverridetable
+{\listoverride\listid1\listoverridecount0\ls1}
+}
+\paperw12240\paperh15840\margl1440\margr1440\margt1440\margb1440\gutter0\ltrsect
+\widowctrl\ftnbj\aenddoc\trackmoves0\trackformatting1\donotembedsysfont0\relyonvml0\donotembedlingdata1\grfdocevents0\validatexml0\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors0\noxlattoyen
+\noultrlspc\dntblnsbdb\nospaceforul\horzdoc\dgmargin\dghspace120\dgvspace181\dghorigin1440\dgvorigin1440\dghshow2\dgvshow1
+\jcompress\viewkind1\viewscale100\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule\nobrkwrptbl\snaptogridincell\allowfieldendsel\wrppunct\asianbrkrule\rsidroot5451531
+\newtblstyruls\nogrowautofit\viewbksp1\usenormstyforlist\noindnmbrts\felnbrelev\nocxsptable\indrlsweleven\noafcnsttbl\afelev\utinl\hwelev\spltpgpar\notcvasp\notbrkcnstfrctbl\notvatxbx\krnprsnet\cachedcolbal
 \nouicompat \fet0
+{\*\wgrffmtfilter 2450}
+\nofeaturethrottle1\ilfomacatclnup0
+\ltrpar \sectd 
\ltrsect\linex0\headery735\footery893\sectlinegrid360\sectdefaultcl\sectrsid1254981\sftnbj
+\pard\plain \ltrpar\s57\ql \fi-720\li1580\ri0\sl-421\slmult0\widctlpar
+\tx2264\wrapdefault\aspalpha\aspnum\faauto\ls1\adjustright\rin0\lin1580\itap0\pararsid1254981
 \rtlch\fcs1 \af1\afs26\alang1025 \ltrch\fcs0 
\f1\fs26\lang1033\langfe2052\cgrid\langnp1033\langfenp2052
+{\rtlch\fcs1 \af1 \ltrch\fcs0
+\lang1033\langfe1033\langfenp1033\insrsid10637256 This is \'931\'94}
+{\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid4026340
+\par
+{\listtext\pard\plain\ltrpar \s56 \rtlch\fcs1 \af0\afs26\alang1025 \ltrch\fcs0 
\f1\fs26\insrsid10637256 \hich\af1\dbch\af0\loch\f1 a.\tab}
+}
+\pard\plain \ltrpar\s56\ql \li1580\ri0\sl-421\slmult0\widctlpar
+\tx2293\wrapdefault\aspalpha\aspnum\faauto\ls1\ilvl1\adjustright\rin0\lin1580\itap0\pararsid10637256
 \rtlch\fcs1 \af1\afs26\alang1025 \ltrch\fcs0 
\f1\fs26\lang1033\langfe2052\cgrid\langnp1033\langfenp2052
+{\rtlch\fcs1 \af1 \ltrch\fcs0
+\lang1033\langfe1033\langfenp1033\insrsid10637256 This is \'93a\'94, \'93a\'94 
starts at the above \'93This\'94}
+{\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid4026340
+\par }
+}
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx 
b/sw/qa/extras/rtfimport/rtfimport.cxx
index 6621626e662a..0c63379ccfbe 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -1390,6 +1390,14 @@ DECLARE_RTFIMPORT_TEST(testTdf104016, "tdf104016.rtf")
  xParagraph->getPropertyState("ParaLeftMargin"));
 }
 
+DECLARE_RTFIMPORT_TEST(testTdf115242, "tdf115242.rtf")
+{
+// This was 0, overriden left margin was lost by too aggressive style
+// deduplication.
+CPPUNIT_ASSERT_EQUAL(static_cast(2787)

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

2018-02-06 Thread Noel Grandin
 include/svx/svdoedge.hxx   |2 +-
 svx/source/svdraw/svdoedge.cxx |4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 03458f8e4609d00d7e9334a23d5f7f6fe8846e01
Author: Noel Grandin 
Date:   Mon Feb 5 10:25:56 2018 +0200

loplugin:useuniqueptr in SdrEdgeObj

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

diff --git a/include/svx/svdoedge.hxx b/include/svx/svdoedge.hxx
index 0ff4cba37068..5b11da0feaef 100644
--- a/include/svx/svdoedge.hxx
+++ b/include/svx/svdoedge.hxx
@@ -142,7 +142,7 @@ protected:
 SdrObjConnectionaCon1;  // Connection status of the beginning 
of the line
 SdrObjConnectionaCon2;  // Connection status of the end of the 
line
 
-XPolygon*   pEdgeTrack;
+std::unique_ptr   pEdgeTrack;
 sal_uInt16  nNotifyingCount; // Locking
 SdrEdgeInfoRec  aEdgeInfo;
 
diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx
index b0c7f9414afa..b14201f24cab 100644
--- a/svx/source/svdraw/svdoedge.cxx
+++ b/svx/source/svdraw/svdoedge.cxx
@@ -173,15 +173,13 @@ SdrEdgeObj::SdrEdgeObj()
 {
 bClosedObj=false;
 bIsEdge=true;
-pEdgeTrack=new XPolygon;
-
+pEdgeTrack.reset(new XPolygon);
 }
 
 SdrEdgeObj::~SdrEdgeObj()
 {
 SdrEdgeObj::DisconnectFromNode(true);
 SdrEdgeObj::DisconnectFromNode(false);
-delete pEdgeTrack;
 }
 
 void SdrEdgeObj::ImpSetAttrToEdgeInfo()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'refs/notes/commits' - 39/9cb9a456bc7d0da10b3b61d17ebf4460f7fc3c

2018-02-06 Thread Caolán McNamara
 39/9cb9a456bc7d0da10b3b61d17ebf4460f7fc3c |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 4c475d5bb5b8ecc17dcd8f28a847ff5e0ebe6a38
Author: Caolán McNamara 
Date:   Tue Feb 6 09:48:50 2018 +

Notes added by 'git notes add'

diff --git a/39/9cb9a456bc7d0da10b3b61d17ebf4460f7fc3c 
b/39/9cb9a456bc7d0da10b3b61d17ebf4460f7fc3c
new file mode 100644
index ..727b1621f0b5
--- /dev/null
+++ b/39/9cb9a456bc7d0da10b3b61d17ebf4460f7fc3c
@@ -0,0 +1 @@
+prefer: 8bc3751ea3ce1162137df2d0e10502cd24a3cb92
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-06 Thread Noel Grandin
 svx/source/inc/svdobjplusdata.hxx|7 ---
 svx/source/svdraw/svdobj.cxx |   26 +++---
 svx/source/svdraw/svdobjplusdata.cxx |   10 +-
 3 files changed, 20 insertions(+), 23 deletions(-)

New commits:
commit eff1e58839df4f4cc7d2ff239dd818880372a1a0
Author: Noel Grandin 
Date:   Tue Jan 30 12:30:17 2018 +0200

loplugin:useuniqueptr in SdrObjPlusData

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

diff --git a/svx/source/inc/svdobjplusdata.hxx 
b/svx/source/inc/svdobjplusdata.hxx
index e36e51a6e86e..c5d0596bab29 100644
--- a/svx/source/inc/svdobjplusdata.hxx
+++ b/svx/source/inc/svdobjplusdata.hxx
@@ -11,6 +11,7 @@
 #define INCLUDED_SVX_SVDOBJPLUSDATA_HXX
 
 #include 
+#include 
 
 class SdrObject;
 class SfxBroadcaster;
@@ -22,9 +23,9 @@ class SdrObjPlusData final
 {
 friend classSdrObject;
 
-SfxBroadcaster* pBroadcast;// broadcaster, if this object 
is referenced (bVirtObj=true). Also for connectors etc.
-SdrObjUserDataList* pUserDataList; // application specific data
-SdrGluePointList*   pGluePoints;   // glue points for glueing 
object connectors
+std::unique_ptr  pBroadcast;// broadcaster, if 
this object is referenced (bVirtObj=true). Also for connectors etc.
+std::unique_ptr  pUserDataList; // application 
specific data
+std::unique_ptrpGluePoints;   // glue points for 
glueing object connectors
 
 // #i68101#
 // object name, title and description
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index 7677376bf48b..32a73f6a5fe6 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -585,7 +585,7 @@ void SdrObject::SetLayer(SdrLayerID nLayer)
 void SdrObject::AddListener(SfxListener& rListener)
 {
 ImpForcePlusData();
-if (pPlusData->pBroadcast==nullptr) pPlusData->pBroadcast=new 
SfxBroadcaster;
+if (pPlusData->pBroadcast==nullptr) pPlusData->pBroadcast.reset(new 
SfxBroadcaster);
 
 // SdrEdgeObj may be connected to same SdrObject on both ends so allow it
 // to listen twice
@@ -598,15 +598,14 @@ void SdrObject::RemoveListener(SfxListener& rListener)
 if (pPlusData!=nullptr && pPlusData->pBroadcast!=nullptr) {
 rListener.EndListening(*pPlusData->pBroadcast);
 if (!pPlusData->pBroadcast->HasListeners()) {
-delete pPlusData->pBroadcast;
-pPlusData->pBroadcast=nullptr;
+pPlusData->pBroadcast.reset();
 }
 }
 }
 
 const SfxBroadcaster* SdrObject::GetBroadcaster() const
 {
-return pPlusData!=nullptr ? pPlusData->pBroadcast : nullptr;
+return pPlusData!=nullptr ? pPlusData->pBroadcast.get() : nullptr;
 }
 
 void SdrObject::AddReference(SdrVirtObj& rVrtObj)
@@ -986,8 +985,7 @@ SdrObject& SdrObject::operator=(const SdrObject& rObj)
 pPlusData=rObj.pPlusData->Clone(this);
 }
 if (pPlusData!=nullptr && pPlusData->pBroadcast!=nullptr) {
-delete pPlusData->pBroadcast; // broadcaster isn't copied
-pPlusData->pBroadcast=nullptr;
+pPlusData->pBroadcast.reset(); // broadcaster isn't copied
 }
 
 delete pGrabBagItem;
@@ -1881,12 +1879,11 @@ void SdrObject::RestGeoData(const SdrObjGeoData& rGeo)
 if (pPlusData->pGluePoints!=nullptr) {
 *pPlusData->pGluePoints=*rGeo.pGPL;
 } else {
-pPlusData->pGluePoints=new SdrGluePointList(*rGeo.pGPL);
+pPlusData->pGluePoints.reset(new SdrGluePointList(*rGeo.pGPL));
 }
 } else {
 if (pPlusData!=nullptr && pPlusData->pGluePoints!=nullptr) {
-delete pPlusData->pGluePoints;
-pPlusData->pGluePoints=nullptr;
+pPlusData->pGluePoints.reset();
 }
 }
 }
@@ -2249,7 +2246,7 @@ SdrGluePoint SdrObject::GetCornerGluePoint(sal_uInt16 
nPosNum) const
 
 const SdrGluePointList* SdrObject::GetGluePointList() const
 {
-if (pPlusData!=nullptr) return pPlusData->pGluePoints;
+if (pPlusData!=nullptr) return pPlusData->pGluePoints.get();
 return nullptr;
 }
 
@@ -2258,9 +2255,9 @@ SdrGluePointList* SdrObject::ForceGluePointList()
 {
 ImpForcePlusData();
 if (pPlusData->pGluePoints==nullptr) {
-pPlusData->pGluePoints=new SdrGluePointList;
+pPlusData->pGluePoints.reset(new SdrGluePointList);
 }
-return pPlusData->pGluePoints;
+return pPlusData->pGluePoints.get();
 }
 
 void SdrObject::SetGlueReallyAbsolute(bool bOn)
@@ -2680,7 +2677,7 @@ void SdrObject::AppendUserData(SdrObjUserData* pData)
 
 ImpForcePlusData();
 if (!pPlusData->pUserDataList)
-pPlusData->pUserDataList = new SdrObjUserDataList;
+pPlusData->pUserDataList.reset( new SdrObjUserDataList );
 
 pPlusData->pUserDataList->AppendUserData(pData);
 }
@@ -2691,8 +2688,7 @@ void SdrObject::DeleteUserData(

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

2018-02-06 Thread Katarina Behrens
 include/svtools/extensionlistbox.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7214a912f7ce1a1c1183f9eae6181656cfadea30
Author: Katarina Behrens 
Date:   Mon Feb 5 18:05:30 2018 +0100

tdf#104861: extension list is not a child dlg control anymore

After 989cf68b68ed, 88f31af74816 and 3aec456ba8a0 buttons aren't
embedded in the extension list anymore, so treating it like a
child dlg control just causes Tab key to skip the widget

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

diff --git a/include/svtools/extensionlistbox.hxx 
b/include/svtools/extensionlistbox.hxx
index 4f9542458aca..9d1a4bb95a24 100644
--- a/include/svtools/extensionlistbox.hxx
+++ b/include/svtools/extensionlistbox.hxx
@@ -36,7 +36,7 @@ class IExtensionListBox: public Control
 public:
 enum { ENTRY_NOTFOUND = -1 };
 
-IExtensionListBox( vcl::Window* pParent ): Control( pParent, WB_BORDER | 
WB_TABSTOP | WB_CHILDDLGCTRL ){}
+IExtensionListBox( vcl::Window* pParent ): Control( pParent, WB_BORDER | 
WB_TABSTOP ){}
 
 /** @return  The count of the entries in the list box. */
 virtual sal_Int32 getItemCount() const = 0;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-06 Thread Noel Grandin
 editeng/source/misc/txtrange.cxx |   11 ---
 include/editeng/txtrange.hxx |7 ---
 2 files changed, 8 insertions(+), 10 deletions(-)

New commits:
commit 6c9cae12f63ed2e48c7167782c13c6721990f393
Author: Noel Grandin 
Date:   Mon Jan 29 10:56:15 2018 +0200

loplugin:useuniqueptr in TextRanger

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

diff --git a/editeng/source/misc/txtrange.cxx b/editeng/source/misc/txtrange.cxx
index d7805ba40559..312d642f3d95 100644
--- a/editeng/source/misc/txtrange.cxx
+++ b/editeng/source/misc/txtrange.cxx
@@ -44,7 +44,7 @@ TextRanger::TextRanger( const basegfx::B2DPolyPolygon& 
rPolyPolygon,
 bVertical( bVert )
 {
 sal_uInt32 nCount(rPolyPolygon.count());
-mpPolyPolygon = new tools::PolyPolygon( static_cast(nCount) );
+mpPolyPolygon.reset( new tools::PolyPolygon( 
static_cast(nCount) ) );
 
 for(sal_uInt32 i(0); i < nCount; i++)
 {
@@ -56,7 +56,7 @@ TextRanger::TextRanger( const basegfx::B2DPolyPolygon& 
rPolyPolygon,
 if( pLinePolyPolygon )
 {
 nCount = pLinePolyPolygon->count();
-mpLinePolyPolygon = new tools::PolyPolygon();
+mpLinePolyPolygon.reset( new tools::PolyPolygon() );
 
 for(sal_uInt32 i(0); i < nCount; i++)
 {
@@ -73,9 +73,6 @@ TextRanger::TextRanger( const basegfx::B2DPolyPolygon& 
rPolyPolygon,
 TextRanger::~TextRanger()
 {
 mRangeCache.clear();
-delete mpPolyPolygon;
-delete mpLinePolyPolygon;
-delete pBound;
 }
 
 /* TextRanger::SetVertical(..)
@@ -646,7 +643,7 @@ LongDqPtr TextRanger::GetTextRanges( const Range& rRange )
 SvxBoundArgs aArg( this, &(rngCache.results), rRange );
 aArg.Calc( *mpPolyPolygon );
 if( mpLinePolyPolygon )
-aArg.Concat( mpLinePolyPolygon );
+aArg.Concat( mpLinePolyPolygon.get() );
 //Add new result to the cache
 mRangeCache.push_back(rngCache);
 if (mRangeCache.size() > nCacheSize)
@@ -657,7 +654,7 @@ LongDqPtr TextRanger::GetTextRanges( const Range& rRange )
 const tools::Rectangle& TextRanger::GetBoundRect_()
 {
 DBG_ASSERT( nullptr == pBound, "Don't call twice." );
-pBound = new tools::Rectangle( mpPolyPolygon->GetBoundRect() );
+pBound.reset( new tools::Rectangle( mpPolyPolygon->GetBoundRect() ) );
 return *pBound;
 }
 
diff --git a/include/editeng/txtrange.hxx b/include/editeng/txtrange.hxx
index 3c857ad0e90f..4bc307466317 100644
--- a/include/editeng/txtrange.hxx
+++ b/include/editeng/txtrange.hxx
@@ -23,6 +23,7 @@
 #include 
 #include 
 #include 
+#include 
 
 namespace tools { class PolyPolygon; }
 namespace tools { class Rectangle; }
@@ -43,9 +44,9 @@ class EDITENG_DLLPUBLIC TextRanger
 RangeCache(const Range& rng) : range(rng) {};
 };
 std::deque mRangeCache; //!< Cached range calculations.
-tools::PolyPolygon *mpPolyPolygon; // Surface polygon
-tools::PolyPolygon *mpLinePolyPolygon; // Line polygon
-tools::Rectangle *pBound;  // Comprehensive rectangle
+std::unique_ptr mpPolyPolygon; // Surface polygon
+std::unique_ptr mpLinePolyPolygon; // Line polygon
+std::unique_ptr pBound;  // Comprehensive rectangle
 sal_uInt16 nCacheSize;  // Cache-Size
 sal_uInt16 nRight;  // Distance Contour-Text
 sal_uInt16 nLeft;   // Distance Text-Contour
___
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-02-06 Thread Mike Kaganski
 sw/qa/extras/uiwriter/uiwriter.cxx |   58 +
 sw/source/uibase/wrtsh/delete.cxx  |  126 ++---
 2 files changed, 121 insertions(+), 63 deletions(-)

New commits:
commit 1692bda118f234608ccec0697f9d7b6f6bd86b6d
Author: Mike Kaganski 
Date:   Mon Feb 5 22:27:14 2018 +0300

tdf#115132: don't move out from current cell on Backspace/Delete

The behavior that cursor jumps out of current table box on Del/Backspace
introduced in commit 80a4b3b589a516392bcf1ad932619701eb95e250 is
not intuitive, and differs from what other word processors do.

Unit test included.

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

diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx 
b/sw/qa/extras/uiwriter/uiwriter.cxx
index b2a7aaf44d74..37bd5e2b2ca0 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -300,6 +300,7 @@ public:
 void testTdf115013();
 void testTdf114536();
 void testTdf115065();
+void testTdf115132();
 
 CPPUNIT_TEST_SUITE(SwUiWriterTest);
 CPPUNIT_TEST(testReplaceForward);
@@ -479,6 +480,7 @@ public:
 CPPUNIT_TEST(testTdf115013);
 CPPUNIT_TEST(testTdf114536);
 CPPUNIT_TEST(testTdf115065);
+CPPUNIT_TEST(testTdf115132);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -5885,6 +5887,62 @@ void SwUiWriterTest::testTdf115065()
 pWrtShell->Copy(pWrtShell, ptFrom, ptTo);
 }
 
+void SwUiWriterTest::testTdf115132()
+{
+SwDoc* pDoc = createDoc();
+CPPUNIT_ASSERT(pDoc);
+SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+CPPUNIT_ASSERT(pWrtShell);
+
+std::vector vTestTableNames;
+
+// Create an empty paragraph that will separate first table from the rest
+pWrtShell->SplitNode();
+pWrtShell->SttDoc();
+// Create a table at the start of document body
+SwInsertTableOptions TableOpt(tabopts::DEFAULT_BORDER, 0);
+const SwTable* pTable = &pWrtShell->InsertTable(TableOpt, 2, 3);
+const SwTableFormat* pFormat = pTable->GetFrameFormat();
+CPPUNIT_ASSERT(pFormat);
+vTestTableNames.push_back(pFormat->GetName());
+pWrtShell->EndDoc();
+// Create a table after a paragraph
+pTable = &pWrtShell->InsertTable(TableOpt, 2, 3);
+pFormat = pTable->GetFrameFormat();
+CPPUNIT_ASSERT(pFormat);
+vTestTableNames.push_back(pFormat->GetName());
+// Create a table immediately after the previous
+pTable = &pWrtShell->InsertTable(TableOpt, 2, 3);
+pFormat = pTable->GetFrameFormat();
+CPPUNIT_ASSERT(pFormat);
+vTestTableNames.push_back(pFormat->GetName());
+// Create a nested table in the middle of last row
+pWrtShell->GotoTable(vTestTableNames.back());
+for (int i = 0; i < 4; ++i)
+pWrtShell->GoNextCell(false);
+pTable = &pWrtShell->InsertTable(TableOpt, 2, 3);
+pFormat = pTable->GetFrameFormat();
+CPPUNIT_ASSERT(pFormat);
+vTestTableNames.push_back(pFormat->GetName());
+
+// Now check that in any cell in all tables we don't go out of a cell
+// using Delete or Backspace. We test cases when a table is the first node;
+// when we are in a first/middle/last cell in a row; when there's a 
paragraph
+// before/after this cell; when there's another table before/after this 
cell;
+// in nested table.
+for (const auto& rTableName : vTestTableNames)
+{
+pWrtShell->GotoTable(rTableName);
+do {
+const SwStartNode* pNd = 
pWrtShell->GetSwCursor()->GetNode().FindTableBoxStartNode();
+pWrtShell->DelRight();
+CPPUNIT_ASSERT_EQUAL(pNd, 
pWrtShell->GetSwCursor()->GetNode().FindTableBoxStartNode());
+pWrtShell->DelLeft();
+CPPUNIT_ASSERT_EQUAL(pNd, 
pWrtShell->GetSwCursor()->GetNode().FindTableBoxStartNode());
+} while (pWrtShell->GoNextCell(false));
+}
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SwUiWriterTest);
 CPPUNIT_PLUGIN_IMPLEMENT();
 
diff --git a/sw/source/uibase/wrtsh/delete.cxx 
b/sw/source/uibase/wrtsh/delete.cxx
index 4e0709342792..fc23a8237858 100644
--- a/sw/source/uibase/wrtsh/delete.cxx
+++ b/sw/source/uibase/wrtsh/delete.cxx
@@ -22,6 +22,7 @@
 #include 
 #include 
 #include 
+#include 
 
 inline void SwWrtShell::OpenMark()
 {
@@ -195,6 +196,10 @@ long SwWrtShell::DelLeft()
 
 if( SwCursorShell::IsSttPara())
 {
+// Start/EndAllAction to avoid cursor flickering
+UnoActionContext c(GetDoc());
+SwCursorShell::Push();
+
 // #i4032# Don't actually call a 'delete' if we
 // changed the table cell, compare DelRight().
 const SwStartNode * pSNdOld = pWasInTableNd ?
@@ -203,23 +208,34 @@ long SwWrtShell::DelLeft()
 
 // If the cursor is at the beginning of a paragraph, try to step
 // backwards. On failure we are done.
-if( !SwCursorShell::Left(1,CRSR_SKIP_CHARS) )
-

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

2018-02-06 Thread Caolán McNamara
 vcl/qa/cppunit/pdfexport/pdfexport.cxx |   20 ++--
 vcl/source/gdi/pdfwriter_impl.cxx  |   23 +++
 2 files changed, 25 insertions(+), 18 deletions(-)

New commits:
commit 2113de51158a6e6c14931109bb9a4e27303c0eab
Author: Caolán McNamara 
Date:   Mon Feb 5 10:23:27 2018 +

tdf#96892 higher precision pdf fixed ints

reverts

commit 5f6065f980756fdb81c7018bedbb7f54e2b8214a
Date:   Thu Mar 3 20:44:47 2016 +

coverity#1355126 Logically dead code

maybe we should be using more precision, but we haven't
been in the past

and...

commit cd5cc12d4330d68d0a233a82eda30e983ce202a4
Date:   Thu Mar 3 20:42:52 2016 +

nLog10Divisor is 1

and then fix the original appendFixedInt bug wrt higher precision settings

and then bump those settings from 1 decimal place to 3 and adjust our
pdf export test for the new precision

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

diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index a904a5dc638d..cb03680a4703 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -724,36 +724,36 @@ void PdfExportTest::testTdf108963()
 float fX = 0;
 float fY = 0;
 FPDFPathSegment_GetPoint(pSegment, &fX, &fY);
-CPPUNIT_ASSERT_EQUAL(static_cast(245.4), fX);
-CPPUNIT_ASSERT_EQUAL(static_cast(244.2), fY);
+CPPUNIT_ASSERT_EQUAL(245395, static_cast(round(fX * 1000)));
+CPPUNIT_ASSERT_EQUAL(244233, static_cast(round(fY * 1000)));
 CPPUNIT_ASSERT(!FPDFPathSegment_GetClose(pSegment));
 
 pSegment = FPDFPath_GetPathSegment(pPdfPageObject, 1);
 CPPUNIT_ASSERT_EQUAL(FPDF_SEGMENT_LINETO, 
FPDFPathSegment_GetType(pSegment));
 FPDFPathSegment_GetPoint(pSegment, &fX, &fY);
-CPPUNIT_ASSERT_EQUAL(static_cast(275.1), fX);
-CPPUNIT_ASSERT_EQUAL(static_cast(267.6), fY);
+CPPUNIT_ASSERT_EQUAL(275102, static_cast(round(fX * 1000)));
+CPPUNIT_ASSERT_EQUAL(267590, static_cast(round(fY * 1000)));
 CPPUNIT_ASSERT(!FPDFPathSegment_GetClose(pSegment));
 
 pSegment = FPDFPath_GetPathSegment(pPdfPageObject, 2);
 CPPUNIT_ASSERT_EQUAL(FPDF_SEGMENT_LINETO, 
FPDFPathSegment_GetType(pSegment));
 FPDFPathSegment_GetPoint(pSegment, &fX, &fY);
-CPPUNIT_ASSERT_EQUAL(static_cast(287.5), fX);
-CPPUNIT_ASSERT_EQUAL(static_cast(251.8), fY);
+CPPUNIT_ASSERT_EQUAL(287518, static_cast(round(fX * 1000)));
+CPPUNIT_ASSERT_EQUAL(251801, static_cast(round(fY * 1000)));
 CPPUNIT_ASSERT(!FPDFPathSegment_GetClose(pSegment));
 
 pSegment = FPDFPath_GetPathSegment(pPdfPageObject, 3);
 CPPUNIT_ASSERT_EQUAL(FPDF_SEGMENT_LINETO, 
FPDFPathSegment_GetType(pSegment));
 FPDFPathSegment_GetPoint(pSegment, &fX, &fY);
-CPPUNIT_ASSERT_EQUAL(static_cast(257.8), fX);
-CPPUNIT_ASSERT_EQUAL(static_cast(228.4), fY);
+CPPUNIT_ASSERT_EQUAL(257839, static_cast(round(fX * 1000)));
+CPPUNIT_ASSERT_EQUAL(228444, static_cast(round(fY * 1000)));
 CPPUNIT_ASSERT(!FPDFPathSegment_GetClose(pSegment));
 
 pSegment = FPDFPath_GetPathSegment(pPdfPageObject, 4);
 CPPUNIT_ASSERT_EQUAL(FPDF_SEGMENT_LINETO, 
FPDFPathSegment_GetType(pSegment));
 FPDFPathSegment_GetPoint(pSegment, &fX, &fY);
-CPPUNIT_ASSERT_EQUAL(static_cast(245.4), fX);
-CPPUNIT_ASSERT_EQUAL(static_cast(244.2), fY);
+CPPUNIT_ASSERT_EQUAL(245395, static_cast(round(fX * 1000)));
+CPPUNIT_ASSERT_EQUAL(244233, static_cast(round(fY * 1000)));
 CPPUNIT_ASSERT(FPDFPathSegment_GetClose(pSegment));
 }
 }
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index 6435a6a18dd5..fcb30130d3c4 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -505,8 +505,8 @@ void doTestCode()
 }
 #endif
 
-static const sal_Int32 nLog10Divisor = 1;
-static const double fDivisor = 10.0;
+static const sal_Int32 nLog10Divisor = 3;
+static const double fDivisor = 1000.0;
 
 static inline double pixelToPoint( double px ) { return px/fDivisor; }
 static inline sal_Int32 pointToPixel( double pt ) { return 
sal_Int32(pt*fDivisor); }
@@ -837,14 +837,21 @@ static void appendFixedInt( sal_Int32 nValue, 
OStringBuffer& rBuffer )
 rBuffer.append( '-' );
 nValue = -nValue;
 }
-const sal_Int32 nFactor = 10;
-const sal_Int32 nInt = nValue / nFactor;
+sal_Int32 nFactor = 1, nDiv = nLog1

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

2018-02-06 Thread Michael Stahl
 sw/source/core/bastyp/swcache.cxx |   32 +---
 1 file changed, 25 insertions(+), 7 deletions(-)

New commits:
commit e6c9b806cd4eaf166bfe8cfc1a4b6741f2be83f0
Author: Michael Stahl 
Date:   Fri Feb 2 15:11:25 2018 +0100

ofz#5435 sw: fix SwCache::Insert() stale pointers

If SwCache::Insert() happens to delete the object that m_pFirst or
m_pRealFirst point to, which is unlikely as it means every other object
is locked, then these pointers must be updated.

This sometimes happens in the bugdoc after scrolling around for some
time.

Change-Id: I13f04d28c37969469efa4e1109c7f5b751ceba96
Reviewed-on: https://gerrit.libreoffice.org/49151
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 
(cherry picked from commit 269d6d3366eea8541d965181dfdda1fdc5ef2d00)
Reviewed-on: https://gerrit.libreoffice.org/49234
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/source/core/bastyp/swcache.cxx 
b/sw/source/core/bastyp/swcache.cxx
index f75468219873..64ae10658518 100644
--- a/sw/source/core/bastyp/swcache.cxx
+++ b/sw/source/core/bastyp/swcache.cxx
@@ -367,16 +367,34 @@ bool SwCache::Insert( SwCacheObj *pNew )
 
 nPos = pObj->GetCachePos();
 if ( pObj == m_pLast )
-{ OSL_ENSURE( pObj->GetPrev(), "Last but no Prev" );
+{
 m_pLast = pObj->GetPrev();
-m_pLast->SetNext( nullptr );
+assert(m_pLast); // must have capacity > 1
 }
-else
+if (pObj == m_pFirst)
 {
-if ( pObj->GetPrev() )
-pObj->GetPrev()->SetNext( pObj->GetNext() );
-if ( pObj->GetNext() )
-pObj->GetNext()->SetPrev( pObj->GetPrev() );
+if (pObj->GetNext())
+{
+m_pFirst = pObj->GetNext();
+}
+else
+{
+m_pFirst = pObj->GetPrev();
+}
+assert(m_pFirst); // must have capacity > 1
+}
+if (pObj == m_pRealFirst)
+{
+m_pRealFirst = pObj->GetNext();
+assert(m_pRealFirst); // must have capacity > 1
+}
+if (pObj->GetPrev())
+{
+pObj->GetPrev()->SetNext( pObj->GetNext() );
+}
+if (pObj->GetNext())
+{
+pObj->GetNext()->SetPrev( pObj->GetPrev() );
 }
 delete pObj;
 m_aCacheObjects[nPos] = pNew;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-06 Thread Noel Grandin
 include/svx/svdcrtv.hxx   |2 +-
 svx/source/svdraw/svdcrtv.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 4a95c38e1c2c3582b9a53d39e192c5496b12abe0
Author: Noel Grandin 
Date:   Wed Jan 31 13:42:29 2018 +0200

loplugin:useuniqueptr in SdrCreateView

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

diff --git a/include/svx/svdcrtv.hxx b/include/svx/svdcrtv.hxx
index 419193dcadca..c6aef8e9273e 100644
--- a/include/svx/svdcrtv.hxx
+++ b/include/svx/svdcrtv.hxx
@@ -42,7 +42,7 @@ protected:
 
 // for migrating stuff from XOR, use ImpSdrCreateViewExtraData ATM to not 
need to
 // compile the apps all the time
-ImpSdrCreateViewExtraData*  mpCreateViewExtraData;
+std::unique_ptr mpCreateViewExtraData;
 
 Pointer aAktCreatePointer;
 
diff --git a/svx/source/svdraw/svdcrtv.cxx b/svx/source/svdraw/svdcrtv.cxx
index 2570ee7bcc82..2b4351d5f5ba 100644
--- a/svx/source/svdraw/svdcrtv.cxx
+++ b/svx/source/svdraw/svdcrtv.cxx
@@ -208,7 +208,7 @@ SdrCreateView::SdrCreateView(SdrModel* pModel1, 
OutputDevice* pOut)
 SdrCreateView::~SdrCreateView()
 {
 ImpClearConnectMarker();
-delete mpCreateViewExtraData;
+mpCreateViewExtraData.reset();
 SdrObject::Free( pAktCreate );
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-06 Thread Eike Rathke
 sc/source/core/data/documen8.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit b2b491a5c63081d6a62df07c7430b604ba06d922
Author: Eike Rathke 
Date:   Mon Feb 5 23:13:08 2018 +0100

Turn assert into SAL_WARN

In the wild there are named expressions without expression and
formula error cells without formula.

Change-Id: I11546b09173de65cebe776529edee74c549d73c8
(cherry picked from commit 951dd781743c975a7d29cc30e88e1b4a56c0b176)
Reviewed-on: https://gerrit.libreoffice.org/49259
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx
index ca8227058d5a..b7ccee14d2b7 100644
--- a/sc/source/core/data/documen8.cxx
+++ b/sc/source/core/data/documen8.cxx
@@ -1170,7 +1170,10 @@ void ScDocument::CheckLinkFormulaNeedingCheck( const 
ScTokenArray& rCode )
 }
 else
 {
-assert(!"called with empty ScTokenArray");
+// Possible with named expression without expression like Excel
+// internal print ranges, obscure user define names, ... formula error
+// cells without formula ...
+SAL_WARN("sc.core","ScDocument::CheckLinkFormulaNeedingCheck - called 
with empty ScTokenArray");
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-06 Thread Eike Rathke
 sc/source/core/data/documen8.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 71adbb0aa8a945665aab2a0a29c7a09e5d894ad4
Author: Eike Rathke 
Date:   Mon Feb 5 23:13:08 2018 +0100

Turn assert into SAL_WARN

In the wild there are named expressions without expression and
formula error cells without formula.

Change-Id: I11546b09173de65cebe776529edee74c549d73c8
(cherry picked from commit 951dd781743c975a7d29cc30e88e1b4a56c0b176)
Reviewed-on: https://gerrit.libreoffice.org/49258
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx
index f38a3c63b457..ee30432eafca 100644
--- a/sc/source/core/data/documen8.cxx
+++ b/sc/source/core/data/documen8.cxx
@@ -1194,7 +1194,10 @@ void ScDocument::CheckLinkFormulaNeedingCheck( const 
ScTokenArray& rCode )
 }
 else
 {
-assert(!"called with empty ScTokenArray");
+// Possible with named expression without expression like Excel
+// internal print ranges, obscure user define names, ... formula error
+// cells without formula ...
+SAL_WARN("sc.core","ScDocument::CheckLinkFormulaNeedingCheck - called 
with empty ScTokenArray");
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-06 Thread Michael Stahl
 sw/source/core/bastyp/swcache.cxx |   32 +---
 1 file changed, 25 insertions(+), 7 deletions(-)

New commits:
commit 578f679bb5e5601bc7b8f16cb7166d623c9255ce
Author: Michael Stahl 
Date:   Fri Feb 2 15:11:25 2018 +0100

ofz#5435 sw: fix SwCache::Insert() stale pointers

If SwCache::Insert() happens to delete the object that m_pFirst or
m_pRealFirst point to, which is unlikely as it means every other object
is locked, then these pointers must be updated.

This sometimes happens in the bugdoc after scrolling around for some
time.

Change-Id: I13f04d28c37969469efa4e1109c7f5b751ceba96
Reviewed-on: https://gerrit.libreoffice.org/49151
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 
(cherry picked from commit 269d6d3366eea8541d965181dfdda1fdc5ef2d00)
Reviewed-on: https://gerrit.libreoffice.org/49159
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/source/core/bastyp/swcache.cxx 
b/sw/source/core/bastyp/swcache.cxx
index 200c8f59f4ab..1bf45c0d1fdc 100644
--- a/sw/source/core/bastyp/swcache.cxx
+++ b/sw/source/core/bastyp/swcache.cxx
@@ -367,16 +367,34 @@ bool SwCache::Insert( SwCacheObj *pNew )
 
 nPos = pObj->GetCachePos();
 if ( pObj == m_pLast )
-{ OSL_ENSURE( pObj->GetPrev(), "Last but no Prev" );
+{
 m_pLast = pObj->GetPrev();
-m_pLast->SetNext( nullptr );
+assert(m_pLast); // must have capacity > 1
 }
-else
+if (pObj == m_pFirst)
 {
-if ( pObj->GetPrev() )
-pObj->GetPrev()->SetNext( pObj->GetNext() );
-if ( pObj->GetNext() )
-pObj->GetNext()->SetPrev( pObj->GetPrev() );
+if (pObj->GetNext())
+{
+m_pFirst = pObj->GetNext();
+}
+else
+{
+m_pFirst = pObj->GetPrev();
+}
+assert(m_pFirst); // must have capacity > 1
+}
+if (pObj == m_pRealFirst)
+{
+m_pRealFirst = pObj->GetNext();
+assert(m_pRealFirst); // must have capacity > 1
+}
+if (pObj->GetPrev())
+{
+pObj->GetPrev()->SetNext( pObj->GetNext() );
+}
+if (pObj->GetNext())
+{
+pObj->GetNext()->SetPrev( pObj->GetPrev() );
 }
 delete pObj;
 m_aCacheObjects[nPos] = pNew;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-06 Thread Caolán McNamara
 sot/source/sdstor/stgstrms.cxx |   10 --
 sot/source/sdstor/stgstrms.hxx |2 +-
 2 files changed, 5 insertions(+), 7 deletions(-)

New commits:
commit 523fc71115071b6f74c8f05c1f8ad775f8af
Author: Caolán McNamara 
Date:   Tue Feb 6 09:22:50 2018 +

pOptionalCalcSize is never null

Change-Id: I830d02cbac6d281ab7fbeaf43e7af6136896b503

diff --git a/sot/source/sdstor/stgstrms.cxx b/sot/source/sdstor/stgstrms.cxx
index 17958544d880..8e5093fe9a91 100644
--- a/sot/source/sdstor/stgstrms.cxx
+++ b/sot/source/sdstor/stgstrms.cxx
@@ -353,7 +353,7 @@ void StgStrm::SetEntry( StgDirEntry& r )
  * for this each time build a simple flat in-memory vector list
  * of pages.
  */
-void StgStrm::scanBuildPageChainCache(sal_Int32 *pOptionalCalcSize)
+sal_Int32 StgStrm::scanBuildPageChainCache()
 {
 if (m_nSize > 0)
 m_aPagesCache.reserve(m_nSize/m_nPageSize);
@@ -384,12 +384,10 @@ void StgStrm::scanBuildPageChainCache(sal_Int32 
*pOptionalCalcSize)
 if (bError)
 {
 SAL_WARN("sot", "returning wrong format error");
-if (pOptionalCalcSize)
-m_rIo.SetError( ERRCODE_IO_WRONGFORMAT );
+m_rIo.SetError( ERRCODE_IO_WRONGFORMAT );
 m_aPagesCache.clear();
 }
-if (pOptionalCalcSize)
-*pOptionalCalcSize = nOptSize;
+return nOptSize;
 }
 
 // Compute page number and offset for the given byte position.
@@ -851,7 +849,7 @@ void StgDataStrm::Init( sal_Int32 nBgn, sal_Int32 nLen )
 {
 // determine the actual size of the stream by scanning
 // the FAT chain and counting the # of pages allocated
-scanBuildPageChainCache( &m_nSize );
+m_nSize = scanBuildPageChainCache();
 }
 }
 
diff --git a/sot/source/sdstor/stgstrms.hxx b/sot/source/sdstor/stgstrms.hxx
index 0a6589f204f7..a2c8ca6de383 100644
--- a/sot/source/sdstor/stgstrms.hxx
+++ b/sot/source/sdstor/stgstrms.hxx
@@ -73,7 +73,7 @@ protected:
 short m_nOffset;  // offset into current page
 short m_nPageSize;// logical page size
 std::vector m_aPagesCache;
-void scanBuildPageChainCache(sal_Int32 *pOptionalCalcSize);
+sal_Int32 scanBuildPageChainCache();
 bool  Copy( sal_Int32 nFrom, sal_Int32 nBytes );
 explicit StgStrm( StgIo& );
 public:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bin/check-elf-dynamic-objects

2018-02-06 Thread Stephan Bergmann
 bin/check-elf-dynamic-objects |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9cb3bd3967b4313320906a32f13b56803687eba6
Author: Stephan Bergmann 
Date:   Tue Feb 6 10:14:35 2018 +0100

basename -a is non-standard

...and apparently not supported on some tinderboxes like tb70 and tb71

Change-Id: I37dae3e7bbb0b9324adf04819fa87fb6a5b9f1d0

diff --git a/bin/check-elf-dynamic-objects b/bin/check-elf-dynamic-objects
index 3561b4109c78..9d2551d506dc 100755
--- a/bin/check-elf-dynamic-objects
+++ b/bin/check-elf-dynamic-objects
@@ -58,7 +58,7 @@ done
 
 files=$(find "${check_path}/program" "${check_path}/sdk/bin" -type f)
 # all RPATHs should point to ${INSTDIR}/program so that's the files they find
-programfiles=$(basename -a $(echo ${files} | grep -o '/program/[^/]* '))
+programfiles=$(echo ${files} | grep -o '/program/[^/]* ' | xargs -n 1 basename)
 
 # whitelists should contain only system libraries that have a good reputation
 # of maintaining ABI stability
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


6 Feb 2018 邮箱验证警告

2018-02-06 Thread Mail Support




 


您的
电子邮件帐户将在






8 Feb 2018,
上过期,

如果您想继续使用您的电子邮件地址:libreoffice@lists.freedesktop.org

您将需要立即验证,以防止您的帐户终止所有消息和文件将会
丢失,如果你没有立即验证 




 

验证您的帐户

 

 

 

 

此服务是免费的。

 
lists.freedesktop.org 
管理员! ©2018保留所有权利

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


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

2018-02-06 Thread Noel Grandin
 compilerplugins/clang/pointerbool.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 5d15bb58494eb09922df0ea1d52f0ff911b3456e
Author: Noel Grandin 
Date:   Tue Feb 6 09:48:06 2018 +0200

remove debugging code

Change-Id: Ia5018354a764f900091cb5e03327721fa66591c9

diff --git a/compilerplugins/clang/pointerbool.cxx 
b/compilerplugins/clang/pointerbool.cxx
index 543e8c6533c8..02fe6515aabd 100644
--- a/compilerplugins/clang/pointerbool.cxx
+++ b/compilerplugins/clang/pointerbool.cxx
@@ -93,7 +93,6 @@ bool PointerBool::VisitCallExpr(CallExpr const* callExpr)
 << arg->getSourceRange();
 report(DiagnosticsEngine::Note, "method here", param->getLocation())
 << param->getSourceRange();
-arg->getType()->dump();
 }
 return true;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits