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

2018-07-17 Thread Libreoffice Gerrit user
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |   25 ++
 1 file changed, 25 insertions(+)

New commits:
commit dc0300eac3b755bc207cd1fe87217f4ebaeb9f58
Author: László Németh 
AuthorDate: Tue Jul 17 19:46:22 2018 +0200
Commit: László Németh 
CommitDate: Wed Jul 18 08:55:01 2018 +0200

tdf#118521 DOCX import: fix paragraph margin from paragraph style

when the other (top or bottom) margin was set by direct formatting.

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

diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 00effcd10081..e89417e99468 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1415,6 +1415,31 @@ void DomainMapper_Impl::finishParagraph( const 
PropertyMapPtr& pPropertyMap )
  uno::makeAny( 
ConversionHelper::convertTwipToMM100(nSize)));
 }
 }
+
+// tdf#118521 set paragraph top or bottom margin based on the 
paragraph style
+// if we already set the other margin with direct formatting
+if (pParaContext && m_xPreviousParagraph.is() &&
+pParaContext->isSet(PROP_PARA_TOP_MARGIN) != 
pParaContext->isSet(PROP_PARA_BOTTOM_MARGIN))
+{
+const StyleSheetEntryPtr pEntry = 
GetStyleSheetTable()->FindStyleSheetByConvertedStyleName( 
GetCurrentParaStyleName() );
+OSL_ENSURE( pEntry.get(), "no style sheet found" );
+const StyleSheetPropertyMap* pStyleSheetProperties =
+dynamic_cast(pEntry 
? pEntry->pProperties.get() : nullptr);
+if (pStyleSheetProperties) {
+boost::optional oProperty;
+if (pParaContext->isSet(PROP_PARA_TOP_MARGIN))
+{
+if ( (oProperty = 
pStyleSheetProperties->getProperty(PROP_PARA_BOTTOM_MARGIN)) )
+
m_xPreviousParagraph->setPropertyValue("ParaBottomMargin", oProperty->second);
+}
+else
+{
+if ( (oProperty = 
pStyleSheetProperties->getProperty(PROP_PARA_TOP_MARGIN)) )
+
m_xPreviousParagraph->setPropertyValue("ParaTopMargin", oProperty->second);
+}
+}
+}
+
 }
 if( !bKeepLastParagraphProperties )
 rAppendContext.pLastParagraphProperties = pToBeSavedProperties;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-17 Thread Libreoffice Gerrit user
 writerfilter/source/dmapper/PropertyMap.cxx |   18 --
 1 file changed, 12 insertions(+), 6 deletions(-)

New commits:
commit 99e626dee48e08d59304c8abe8abe84e7a99af3a
Author: Noel Grandin 
AuthorDate: Tue Jul 17 14:52:10 2018 +0200
Commit: Noel Grandin 
CommitDate: Wed Jul 18 08:38:20 2018 +0200

tdf#79878 perf loading docx file, use XMultiPropertySet

because the property setting code in sw/ is surprisingly expensive

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

diff --git a/writerfilter/source/dmapper/PropertyMap.cxx 
b/writerfilter/source/dmapper/PropertyMap.cxx
index 5cf50c69d0d6..a24ae3d41270 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -663,8 +663,10 @@ void SectionPropertyMap::SetBorderDistance( const 
uno::Reference< beans::XProper
 nLineWidth);
 
 // Change the margins with the border distance
-xStyle->setPropertyValue( sMarginName, uno::makeAny( nMargin ) );
-xStyle->setPropertyValue( sBorderDistanceName, uno::makeAny( nDistance ) );
+uno::Reference< beans::XMultiPropertySet > xMultiSet( xStyle, 
uno::UNO_QUERY_THROW );
+uno::Sequence aProperties { sMarginName, sBorderDistanceName };
+uno::Sequence aValues { uno::makeAny( nMargin ), uno::makeAny( 
nDistance ) };
+xMultiSet->setPropertyValues( aProperties, aValues );
 }
 
 void SectionPropertyMap::DontBalanceTextColumns()
@@ -823,8 +825,10 @@ void SectionPropertyMap::CopyHeaderFooter( const 
uno::Reference< beans::XPropert
 
 if ( bHasPrevHeader )
 {
-xStyle->setPropertyValue( sHeaderIsOn, uno::makeAny( true ) );
-xStyle->setPropertyValue( sHeaderIsShared, uno::makeAny( 
bHeaderIsShared ) );
+uno::Reference< beans::XMultiPropertySet > xMultiSet( xStyle, 
uno::UNO_QUERY_THROW );
+uno::Sequence aProperties { sHeaderIsOn, sHeaderIsShared };
+uno::Sequence aValues { uno::makeAny( true ), uno::makeAny( 
bHeaderIsShared ) };
+xMultiSet->setPropertyValues( aProperties, aValues );
 if ( !bOmitRightHeader )
 {
 CopyHeaderFooterTextProperty( xPrevStyle, xStyle,
@@ -849,8 +853,10 @@ void SectionPropertyMap::CopyHeaderFooter( const 
uno::Reference< beans::XPropert
 
 if ( bHasPrevFooter )
 {
-xStyle->setPropertyValue( sFooterIsOn, uno::makeAny( true ) );
-xStyle->setPropertyValue( sFooterIsShared, uno::makeAny( 
bFooterIsShared ) );
+uno::Reference< beans::XMultiPropertySet > xMultiSet( xStyle, 
uno::UNO_QUERY_THROW );
+uno::Sequence aProperties { sFooterIsOn, sFooterIsShared };
+uno::Sequence aValues { uno::makeAny( true ), uno::makeAny( 
bFooterIsShared ) };
+xMultiSet->setPropertyValues( aProperties, aValues );
 if ( !bOmitRightFooter )
 {
 CopyHeaderFooterTextProperty( xPrevStyle, xStyle,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-17 Thread Libreoffice Gerrit user
 formula/source/core/api/FormulaCompiler.cxx |2 +-
 formula/source/core/api/token.cxx   |2 +-
 formula/source/ui/dlg/structpg.cxx  |   19 ++-
 formula/source/ui/dlg/structpg.hxx  |   10 +-
 include/formula/IFunctionDescription.hxx|   10 --
 include/formula/token.hxx   |   14 ++
 6 files changed, 19 insertions(+), 38 deletions(-)

New commits:
commit 346b900594a84581056ba56061ea513f4e6f101d
Author: Noel Grandin 
AuthorDate: Mon Jul 16 10:05:03 2018 +0200
Commit: Noel Grandin 
CommitDate: Wed Jul 18 08:37:57 2018 +0200

loplugin:mergeclasses merge IFormulaToken into FormulaToken

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

diff --git a/formula/source/core/api/FormulaCompiler.cxx 
b/formula/source/core/api/FormulaCompiler.cxx
index ac42bd3df588..5d4c3e76ec5b 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -2193,7 +2193,7 @@ const FormulaToken* 
FormulaCompiler::CreateStringFromToken( OUStringBuffer& rBuf
 // shall separate a function-name from the left parenthesis (()
 // that follows it." and Excel even chokes on it.
 const FormulaToken* p = maArrIterator.PeekPrevNoSpaces();
-if (p && p->isFunction())
+if (p && p->IsFunction())
 {
 p = maArrIterator.PeekNextNoSpaces();
 if (p && p->GetOpCode() == ocOpen)
diff --git a/formula/source/core/api/token.cxx 
b/formula/source/core/api/token.cxx
index a8fb0b42541d..37b19d3b21f3 100644
--- a/formula/source/core/api/token.cxx
+++ b/formula/source/core/api/token.cxx
@@ -71,7 +71,7 @@ FormulaToken::FormulaToken( StackVar eTypeP, OpCode e ) :
 }
 
 FormulaToken::FormulaToken( const FormulaToken& r ) :
-IFormulaToken(), eOp(r.eOp), eType( r.eType ), mnRefCnt(0)
+eOp(r.eOp), eType( r.eType ), mnRefCnt(0)
 {
 }
 
diff --git a/formula/source/ui/dlg/structpg.cxx 
b/formula/source/ui/dlg/structpg.cxx
index e63ed7420c46..56a94d40a8fb 100644
--- a/formula/source/ui/dlg/structpg.cxx
+++ b/formula/source/ui/dlg/structpg.cxx
@@ -26,6 +26,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 namespace formula
@@ -45,10 +46,10 @@ StructListBox::StructListBox(vcl::Window* pParent, WinBits 
nBits ):
 SvTreeListEntry* StructListBox::InsertStaticEntry(
 const OUString& rText,
 const Image& rEntryImg,
-SvTreeListEntry* pParent, sal_uLong nPos, const IFormulaToken* pToken )
+SvTreeListEntry* pParent, sal_uLong nPos, const FormulaToken* pToken )
 {
 SvTreeListEntry* pEntry = InsertEntry( rText, rEntryImg, rEntryImg, 
pParent, false, nPos,
-const_cast(pToken) );
+const_cast(pToken) );
 return pEntry;
 }
 
@@ -117,7 +118,7 @@ void StructPage::ClearStruct()
 }
 
 SvTreeListEntry* StructPage::InsertEntry( const OUString& rText, 
SvTreeListEntry* pParent,
-   sal_uInt16 nFlag, sal_uLong nPos, const 
IFormulaToken* pIFormulaToken )
+   sal_uInt16 nFlag, sal_uLong nPos, const 
FormulaToken* pIFormulaToken )
 {
 m_pTlbStruct->SetActiveFlag( false );
 
@@ -126,7 +127,7 @@ SvTreeListEntry* StructPage::InsertEntry( const OUString& 
rText, SvTreeListEntry
 {
 case STRUCT_FOLDER:
 pEntry = m_pTlbStruct->InsertEntry( rText, pParent, false, nPos,
-const_cast(pIFormulaToken));
+const_cast(pIFormulaToken));
 break;
 case STRUCT_END:
 pEntry = m_pTlbStruct->InsertStaticEntry( rText, maImgEnd, 
pParent, nPos, pIFormulaToken );
@@ -149,14 +150,14 @@ OUString StructPage::GetEntryText(SvTreeListEntry* 
pEntry) const
 return  aString;
 }
 
-const IFormulaToken* StructPage::GetFunctionEntry(SvTreeListEntry* pEntry)
+const FormulaToken* StructPage::GetFunctionEntry(SvTreeListEntry* pEntry)
 {
 if (pEntry != nullptr)
 {
-const IFormulaToken * pToken = static_cast(pEntry->GetUserData());
+const FormulaToken * pToken = static_cast(pEntry->GetUserData());
 if (pToken != nullptr)
 {
-if ( !(pToken->isFunction() || pToken->getArgumentCount() > 1 ) )
+if ( !(pToken->IsFunction() || pToken->GetParamCount() > 1 ) )
 {
 return GetFunctionEntry(m_pTlbStruct->GetParent(pEntry));
 }
@@ -178,10 +179,10 @@ IMPL_LINK( StructPage, SelectHdl, SvTreeListBox*, pTlb, 
void )
 SvTreeListEntry*pCurEntry = m_pTlbStruct->GetCurEntry();
 if (pCurEntry != nullptr)
 {
-pSelectedToken = static_cast(pCurEntry->GetUserData());
+pSelectedToken = static_cast(pCurEntry->GetUserData());
 if (pSelectedToken != nullptr)
   

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

2018-07-17 Thread Libreoffice Gerrit user
 sw/qa/extras/ooxmlexport/data/tdf63561_clearTabs2.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport11.cxx |8 +++-
 sw/source/filter/ww8/docxattributeoutput.cxx   |6 +-
 writerfilter/source/dmapper/DomainMapper.cxx   |2 +-
 4 files changed, 13 insertions(+), 3 deletions(-)

New commits:
commit 2bc84658cce1df5050fe788dd0c8a0906a1ca2c3
Author: Justin Luth 
AuthorDate: Wed Jul 11 17:21:51 2018 +0300
Commit: Justin Luth 
CommitDate: Wed Jul 18 07:37:41 2018 +0200

related tdf#63561 docx: styles inherit tabstops too

Add import and export support for style-parent
tabstop inheritance.

This patch is dependent on GetPropertyFromStyleSheet
commit 39171b82b245a7589b9258337a18d6dd281f8ed2

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

diff --git a/sw/qa/extras/ooxmlexport/data/tdf63561_clearTabs2.docx 
b/sw/qa/extras/ooxmlexport/data/tdf63561_clearTabs2.docx
new file mode 100644
index ..cf674f3c460f
Binary files /dev/null and 
b/sw/qa/extras/ooxmlexport/data/tdf63561_clearTabs2.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index 70e46790c5a0..31a8a70989d8 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -58,7 +58,13 @@ DECLARE_OOXMLEXPORT_TEST(testTdf46938_clearTabStop, 
"tdf46938_clearTabStop.docx"
 
 DECLARE_OOXMLEXPORT_TEST(testTdf63561_clearTabs, "tdf63561_clearTabs.docx")
 {
-// MSO2013 gives 5,7, and 4 respectively
+CPPUNIT_ASSERT_EQUAL(sal_Int32(5), getProperty< 
uno::Sequence >(getParagraph(1), "ParaTabStops").getLength());
+CPPUNIT_ASSERT_EQUAL(sal_Int32(7), getProperty< 
uno::Sequence >(getParagraph(3), "ParaTabStops").getLength());
+CPPUNIT_ASSERT_EQUAL(sal_Int32(4), getProperty< 
uno::Sequence >(getParagraph(4), "ParaTabStops").getLength());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf63561_clearTabs2, "tdf63561_clearTabs2.docx")
+{
 CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getProperty< 
uno::Sequence >(getParagraph(1), "ParaTabStops").getLength());
 CPPUNIT_ASSERT_EQUAL(sal_Int32(3), getProperty< 
uno::Sequence >(getParagraph(3), "ParaTabStops").getLength());
 CPPUNIT_ASSERT_EQUAL(sal_Int32(4), getProperty< 
uno::Sequence >(getParagraph(4), "ParaTabStops").getLength());
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 2de8e1b68d04..0c5ae1043f72 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -7707,7 +7707,11 @@ static void impl_WriteTabElement( FSHelperPtr const & 
pSerializer,
 
 void DocxAttributeOutput::ParaTabStop( const SvxTabStopItem& rTabStop )
 {
-const SvxTabStopItem* pInheritedTabs = GetExport().m_pStyAttr ? 
GetExport().m_pStyAttr->GetItem(RES_PARATR_TABSTOP) : nullptr;
+const SvxTabStopItem* pInheritedTabs = nullptr;
+if ( GetExport().m_pStyAttr )
+pInheritedTabs = 
GetExport().m_pStyAttr->GetItem(RES_PARATR_TABSTOP);
+else if ( GetExport().m_pCurrentStyle && 
GetExport().m_pCurrentStyle->DerivedFrom() )
+pInheritedTabs = 
GetExport().m_pCurrentStyle->DerivedFrom()->GetAttrSet().GetItem(RES_PARATR_TABSTOP);
 const sal_uInt16 nInheritedTabCount = pInheritedTabs ? 
pInheritedTabs->Count() : 0;
 const sal_uInt16 nCount = rTabStop.Count();
 
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx 
b/writerfilter/source/dmapper/DomainMapper.cxx
index 443be5a54930..124a2061904d 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -1840,7 +1840,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const 
PropertyMapPtr& rContext )
 // fdo#81033: for RTF, a tab stop is inherited from the style if it
 // is also applied to the paragraph directly, and cleared if it is
 // not applied to the paragraph directly => don't InitTabStopFromStyle
-if (!IsStyleSheetImport() && !IsRTFImport())
+if ( !IsRTFImport() )
 {
 uno::Any aValue = 
m_pImpl->GetPropertyFromStyleSheet(PROP_PARA_TAB_STOPS);
 uno::Sequence< style::TabStop > aStyleTabStops;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-17 Thread Libreoffice Gerrit user
 include/oox/ppt/pptfilterhelpers.hxx |2 -
 oox/source/ppt/animvariantcontext.cxx|   30 
 oox/source/ppt/pptfilterhelpers.cxx  |   14 +++
 oox/source/ppt/timenodelistcontext.cxx   |   50 +--
 sd/qa/unit/data/pptx/tdf113822underline.pptx |binary
 sd/qa/unit/export-tests.cxx  |   16 
 6 files changed, 63 insertions(+), 49 deletions(-)

New commits:
commit daafe79c55cd53decbeac2367f298d79371dcf3d
Author: Mark Hung 
AuthorDate: Sat Jul 14 10:01:08 2018 +0800
Commit: Mark Hung 
CommitDate: Wed Jul 18 02:26:34 2018 +0200

tdf#113822 convert animation value in SetTimeNodeContext.

Convert 'to' value of SetTimeNodeContext based on attribute name
and move conversion code in its destructor to convertAnimationValue.
Value conversion in AnimVariantContext is also included in
convertAnimationValue and is removed together.

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

diff --git a/include/oox/ppt/pptfilterhelpers.hxx 
b/include/oox/ppt/pptfilterhelpers.hxx
index 94ac025cb6c9..7944b03d8d05 100644
--- a/include/oox/ppt/pptfilterhelpers.hxx
+++ b/include/oox/ppt/pptfilterhelpers.hxx
@@ -36,7 +36,7 @@ namespace oox { namespace ppt {
 enum class AnimationAttributeEnum
 {
 PPT_X, PPT_Y, PPT_W, PPT_H, PPT_C, R, XSHEAR, FILLCOLOR, FILLTYPE,
-STROKECOLOR, STROKEON, STYLECOLOR, STYLEROTATION, FONTWEIGHT,
+FILLON, STROKECOLOR, STROKEON, STYLECOLOR, STYLEROTATION, FONTWEIGHT,
 STYLEUNDERLINE, STYLEFONTFAMILY, STYLEFONTSIZE, STYLEFONTSTYLE,
 STYLEVISIBILITY, STYLEOPACITY, UNKNOWN
 };
diff --git a/oox/source/ppt/animvariantcontext.cxx 
b/oox/source/ppt/animvariantcontext.cxx
index 6cf91351bf30..81a70acfe26e 100644
--- a/oox/source/ppt/animvariantcontext.cxx
+++ b/oox/source/ppt/animvariantcontext.cxx
@@ -38,23 +38,6 @@ using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::xml::sax;
 
 namespace oox { namespace ppt {
-
-bool convertFillStyle( const OUString& rString, css::drawing::FillStyle& 
rValue )
-{
-if( rString == "solid" )
-{
-rValue = css::drawing::FillStyle::FillStyle_SOLID;
-return true;
-}
-else if( rString == "none" )
-{
-rValue = css::drawing::FillStyle::FillStyle_NONE;
-return true;
-}
-else
-return false;
-}
-
 AnimVariantContext::AnimVariantContext( FragmentHandler2 const & rParent, 
sal_Int32 aElement, Any & aValue )
 : FragmentHandler2( rParent )
 , mnElement( aElement )
@@ -102,18 +85,7 @@ namespace oox { namespace ppt {
 case PPT_TOKEN( strVal ):
 {
 OUString val = rAttribs.getString( XML_val, OUString() );
-if( convertMeasure( val ) )
-{
-maValue <<= val;
-}
-else
-{
-css::drawing::FillStyle eFillStyle;
-if( convertFillStyle( val, eFillStyle ) )
-maValue <<= eFillStyle;
-else
-maValue <<= val;
-}
+maValue <<= val;
 return this;
 }
 default:
diff --git a/oox/source/ppt/pptfilterhelpers.cxx 
b/oox/source/ppt/pptfilterhelpers.cxx
index a083cc29756e..3c1ab92fc06d 100644
--- a/oox/source/ppt/pptfilterhelpers.cxx
+++ b/oox/source/ppt/pptfilterhelpers.cxx
@@ -60,7 +60,7 @@ namespace oox { namespace ppt {
 { AnimationAttributeEnum::FILLCOLOR, "fillColor",  
  "FillColor" },
 { AnimationAttributeEnum::FILLCOLOR, "fillcolor",  
  "FillColor" },
 { AnimationAttributeEnum::FILLTYPE,  "fill.type",  
  "FillStyle" },
-{ AnimationAttributeEnum::FILLTYPE,  "fill.on",
  "FillOn" },
+{ AnimationAttributeEnum::FILLON,"fill.on",
  "FillOn" },
 { AnimationAttributeEnum::STROKECOLOR,   "stroke.color",   
  "LineColor" },
 { AnimationAttributeEnum::STROKEON,  "stroke.on",  
  "LineStyle" },
 { AnimationAttributeEnum::STYLECOLOR,"style.color",
  "CharColor" },
@@ -313,6 +313,18 @@ namespace oox { namespace ppt {
 }
 }
 break;
+case AnimationAttributeEnum::FILLON:
+{
+// Slideshow doesn't support FillOn, but we need to convert 
the value type
+// so it can be written out again.
+OUString aString;
+if (rValue >>= aString)
+{
+rValue <<= aString == "true";
+bRet = t

[Libreoffice-commits] core.git: helpcontent2

2018-07-17 Thread Libreoffice Gerrit user
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e4df813d5225627b0f45a90b3fd0bb2b4d3a7327
Author: Andrea Gelmini 
AuthorDate: Sat Jul 14 12:58:11 2018 +0200
Commit: Gerrit Code Review 
CommitDate: Wed Jul 18 02:15:08 2018 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  - Fix typo

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

diff --git a/helpcontent2 b/helpcontent2
index 1832f962424d..67fd95451697 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 1832f962424d95535a96048cdac41ee60c05db9a
+Subproject commit 67fd95451697b52199016ec1fbaedfe459295826
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: solenv/gbuild solenv/sanitizers

2018-07-17 Thread Libreoffice Gerrit user
 solenv/gbuild/UIConfig.mk   |   26 --
 solenv/sanitizers/ui/cui.suppr  |   70 
 solenv/sanitizers/ui/dbaccess.suppr |   26 ++
 solenv/sanitizers/ui/desktop.suppr  |3 +
 solenv/sanitizers/ui/fps.suppr  |1 
 solenv/sanitizers/ui/modules/BasicIDE.suppr |3 +
 solenv/sanitizers/ui/modules/scalc.suppr|   29 +++
 solenv/sanitizers/ui/modules/schart.suppr   |   10 
 solenv/sanitizers/ui/modules/simpress.suppr |   14 +
 solenv/sanitizers/ui/modules/swriter.suppr  |   31 +++-
 solenv/sanitizers/ui/sfx.suppr  |   46 ++
 solenv/sanitizers/ui/svx.suppr  |   14 +
 solenv/sanitizers/ui/vcl.suppr  |1 
 solenv/sanitizers/ui/xmlsec.suppr   |3 +
 14 files changed, 230 insertions(+), 47 deletions(-)

New commits:
commit 7ba295853669f7c333ba22e8284e9732091c67fa
Author: Samuel Thibault 
AuthorDate: Wed Jun 13 12:08:19 2018 +0200
Commit: Thorsten Behrens 
CommitDate: Wed Jul 18 02:15:26 2018 +0200

gla11y: Enable warnings for all widgets missing a label

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

diff --git a/solenv/gbuild/UIConfig.mk b/solenv/gbuild/UIConfig.mk
index 7dea8a2720a6..3098b56cea0f 100644
--- a/solenv/gbuild/UIConfig.mk
+++ b/solenv/gbuild/UIConfig.mk
@@ -170,31 +170,7 @@ gb_UIConfig_gla11y_PARAMETERS += --enable-type 
button-no-label
 # These are often doubtful
 gb_UIConfig_gla11y_PARAMETERS += --enable-type duplicate-mnemonic 
--enable-type labelled-by-and-mnemonic
 
-# For now, disable warning about widgets without a label by default, to enable 
warnings for classes progressively
-# To be uncommented progressively
-gb_UIConfig_gla11y_PARAMETERS += --disable-type no-labelled-by
-# Clearly need labelling
-gb_UIConfig_gla11y_PARAMETERS += --enable-specific no-labelled-by.GtkScale
-gb_UIConfig_gla11y_PARAMETERS += --enable-specific no-labelled-by.GtkEntry
-gb_UIConfig_gla11y_PARAMETERS += --enable-specific no-labelled-by.GtkSpinButton
-gb_UIConfig_gla11y_PARAMETERS += --enable-specific no-labelled-by.GtkSpinner
-gb_UIConfig_gla11y_PARAMETERS += --enable-specific 
no-labelled-by.GtkProgressBar
-gb_UIConfig_gla11y_PARAMETERS += --enable-specific 
no-labelled-by.svxcorelo-SvxColorListBox
-gb_UIConfig_gla11y_PARAMETERS += --enable-specific 
no-labelled-by.svxcorelo-SvxLanguageBox
-gb_UIConfig_gla11y_PARAMETERS += --enable-specific 
no-labelled-by.sfxlo-SvxCharView
-gb_UIConfig_gla11y_PARAMETERS += --enable-specific 
no-labelled-by.foruilo-RefEdit
-gb_UIConfig_gla11y_PARAMETERS += --enable-specific 
no-labelled-by.svxcorelo-PaperSizeListBox
-# Probably need labelling
-gb_UIConfig_gla11y_PARAMETERS += --enable-specific no-labelled-by.GtkComboBox
-gb_UIConfig_gla11y_PARAMETERS += --enable-specific 
no-labelled-by.GtkComboBoxText
-gb_UIConfig_gla11y_PARAMETERS += --enable-specific no-labelled-by.GtkMenuItem
-# Possibly need labelling
-gb_UIConfig_gla11y_PARAMETERS += --enable-specific no-labelled-by.GtkTreeView
-gb_UIConfig_gla11y_PARAMETERS += --enable-specific 
no-labelled-by.GtkTreeViewColumn
-gb_UIConfig_gla11y_PARAMETERS += --enable-specific no-labelled-by.GtkTextView
-gb_UIConfig_gla11y_PARAMETERS += --enable-specific 
no-labelled-by.GtkDrawingArea
-# Perhaps need labelling
-gb_UIConfig_gla11y_PARAMETERS += --enable-specific no-labelled-by.GtkImage
+gb_UIConfig_gla11y_PARAMETERS += --enable-type no-labelled-by
 
 define gb_UIConfig_a11yerrors__command
 $(call gb_Output_announce,$(2),$(true),UIA,1)
diff --git a/solenv/sanitizers/ui/cui.suppr b/solenv/sanitizers/ui/cui.suppr
index 38d31b00995b..0780cd7415f3 100644
--- a/solenv/sanitizers/ui/cui.suppr
+++ b/solenv/sanitizers/ui/cui.suppr
@@ -14,6 +14,18 @@ 
cui/uiconfig/ui/aboutconfigdialog.ui://GtkLabel[@id='preference'] orphan-label
 cui/uiconfig/ui/aboutconfigdialog.ui://GtkLabel[@id='property'] orphan-label
 cui/uiconfig/ui/aboutconfigdialog.ui://GtkLabel[@id='type'] orphan-label
 cui/uiconfig/ui/aboutconfigdialog.ui://GtkLabel[@id='value'] orphan-label
+cui/uiconfig/ui/aboutconfigdialog.ui://svtlo-SvSimpleTableContainer[@id='preferences']
 no-labelled-by
+cui/uiconfig/ui/aboutconfigvaluedialog.ui://GtkLabel[@id='label1'] orphan-label
+cui/uiconfig/ui/aboutconfigvaluedialog.ui://cuilo-CuiCustomMultilineEdit[@id='valuebox']
 no-labelled-by
+cui/uiconfig/ui/applyautofmtpage.ui://GtkLabel[@id='label1'] orphan-label
+cui/uiconfig/ui/applyautofmtpage.ui://GtkLabel[@id='label2'] orphan-label
+cui/uiconfig/ui/applyautofmtpage.ui://GtkLabel[@id='m'] orphan-label
+cui/uiconfig/ui/applyautofmtpage.ui://GtkLabel[@id='t'] orphan-label
+cui/uiconfig/ui/applyautofmtpage.ui://svtlo-SvSimpleTableContainer[@id='list'] 
no-labelled-by
+cui/uiconfig/ui/applylocalizedpage.ui://GtkLabel[@id='m'] orphan-label
+cui/uiconfig/ui/applylocalized

[Libreoffice-commits] help.git: source/text

2018-07-17 Thread Andrea Gelmini
 source/text/shared/optionen/01070400.xhp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 67fd95451697b52199016ec1fbaedfe459295826
Author: Andrea Gelmini 
Date:   Sat Jul 14 12:58:11 2018 +0200

Fix typo

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

diff --git a/source/text/shared/optionen/01070400.xhp 
b/source/text/shared/optionen/01070400.xhp
index 31a92a719..2eba2a51f 100644
--- a/source/text/shared/optionen/01070400.xhp
+++ b/source/text/shared/optionen/01070400.xhp
@@ -44,7 +44,7 @@
 fitting to pages; print settings in 
presentations
 printing; tiling pages in presentations
 MW made "page name printing..." a two level entry
-
+
 
 Print
 Specifies print settings within a 
drawing or presentation document.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-17 Thread Libreoffice Gerrit user
 sw/source/core/layout/layact.cxx |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit cee296066ab780217395201ab84c2150c8840d25
Author: Caolán McNamara 
AuthorDate: Tue Jul 17 16:26:35 2018 +0100
Commit: Caolán McNamara 
CommitDate: Tue Jul 17 22:11:45 2018 +0200

Resolves: tdf#118545 restore to historic logic

revert

commit 9eff9e699e17cc5a8a25895bd28dc8e4ceb8071e
Date:   Wed Aug 10 09:47:40 2016 +0200

Don't re-check valid SwPageDescs when layouting

and then revert

commit 60d34e1c840d2c317bb7d0a5b14f4602c22b3fcc
Date:   Wed Nov 12 20:33:06 2014 +

coverity#735517 Logically dead code

its possible that this was the original intent, maybe

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

diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index b390ab771371..ea6bbebf3def 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -442,10 +442,8 @@ void SwLayAction::InternalAction(OutputDevice* 
pRenderContext)
 sal_uInt16 nPercentPageNum = 0;
 while ( (pPage && !IsInterrupt()) || m_nCheckPageNum != USHRT_MAX )
 {
-// nCheckPageNum is set to USHRT_MAX in this code path after we have
-// checked the SwPageDescs and set tos the minimal changed SwPageDesc.
-// We don't need to check the SwPageDescs without changes.
-if ( (m_nCheckPageNum != USHRT_MAX) && (!pPage || 
pPage->GetPhyPageNum() >= m_nCheckPageNum) )
+if ( !pPage && m_nCheckPageNum != USHRT_MAX &&
+ (!pPage || pPage->GetPhyPageNum() >= m_nCheckPageNum) )
 {
 if ( !pPage || pPage->GetPhyPageNum() > m_nCheckPageNum )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-17 Thread Libreoffice Gerrit user
 vcl/unx/gtk3/gtk3gtkinst.cxx |   14 ++
 1 file changed, 10 insertions(+), 4 deletions(-)

New commits:
commit 74318dbeffb9536ac3b4215ae9369a05f2ac7228
Author: Caolán McNamara 
AuthorDate: Tue Jul 17 16:05:35 2018 +0100
Commit: Caolán McNamara 
CommitDate: Tue Jul 17 22:11:24 2018 +0200

Resolves: tdf#118801 icons go missing on text-less buttons

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

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index f890a4f0c862..0f2c6568dd75 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -4989,8 +4989,11 @@ private:
 if (GTK_IS_BUTTON(pWidget))
 {
 GtkButton* pButton = GTK_BUTTON(pWidget);
-if (m_pStringReplace != nullptr) {
-set_label(pButton, (*m_pStringReplace)(get_label(pButton)));
+if (m_pStringReplace != nullptr)
+{
+OUString aLabel(get_label(pButton));
+if (!aLabel.isEmpty())
+set_label(pButton, (*m_pStringReplace)(aLabel));
 }
 if (gtk_button_get_use_underline(pButton) && 
!gtk_button_get_use_stock(pButton))
 m_aMnemonicButtons.push_back(pButton);
@@ -4998,8 +5001,11 @@ private:
 else if (GTK_IS_LABEL(pWidget))
 {
 GtkLabel* pLabel = GTK_LABEL(pWidget);
-if (m_pStringReplace != nullptr) {
-set_label(pLabel, (*m_pStringReplace)(get_label(pLabel)));
+if (m_pStringReplace != nullptr)
+{
+OUString aLabel(get_label(pLabel));
+if (!aLabel.isEmpty())
+set_label(pLabel, (*m_pStringReplace)(aLabel));
 }
 if (gtk_label_get_use_underline(pLabel))
 m_aMnemonicLabels.push_back(pLabel);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-17 Thread Libreoffice Gerrit user
 desktop/source/lib/init.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 7207ef5c9cf1627d85a276a36753465c0169ebbf
Author: Miklos Vajna 
AuthorDate: Tue Jul 17 16:12:43 2018 +0200
Commit: Miklos Vajna 
CommitDate: Tue Jul 17 21:50:54 2018 +0200

desktop lok: associate EPUB filter with the .epub suffix

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

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 5cc15580e263..fc4705233195 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -143,6 +143,7 @@ static const ExtensionMap aWriterExtensionMap[] =
 { "odt",   "writer8" },
 { "ott",   "writer8_template" },
 { "pdf",   "writer_pdf_Export" },
+{ "epub",  "EPUB" },
 { "rtf",   "Rich Text Format" },
 { "txt",   "Text" },
 { "xhtml", "XHTML Writer File" },
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


segfault in DocumentLoader example

2018-07-17 Thread Oliver Kowalke
Hi,
I copied the C++ DocumentLoader example, but I get an segmentation fault.

The segfault is caused by invoking
`cppu::defaultBootstrap_InitialComponentContext()`

gdb:

Thread 1 "generator" received signal SIGABRT, Aborted.
0x7699386b in raise () from /usr/lib/libc.so.6
(gdb) bt
#0  0x7699386b in raise () from /usr/lib/libc.so.6
#1  0x7697e40e in abort () from /usr/lib/libc.so.6
#2  0x7734f44a in __gnu_cxx::__verbose_terminate_handler () at
/build/gcc/src/gcc/libstdc++-v3/libsupc++/vterminate.cc:95
#3  0x773559d6 in __cxxabiv1::__terminate(void (*)()) () at
/build/gcc/src/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:47
#4  0x77355a13 in std::terminate () at
/build/gcc/src/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:57
#5  0x77355c48 in __cxxabiv1::__cxa_throw (obj=,
tinfo=0x55764d48 ,
dest=0x778d8c10) at
/build/gcc/src/gcc/libstdc++-v3/libsupc++/eh_throw.cc:95
#6  0x778d3506 in ?? () from
/usr/lib/libreoffice/program/libuno_cppuhelpergcc3.so.3
#7  0x7794869e in ?? () from
/usr/lib/libreoffice/program/libuno_cppuhelpergcc3.so.3
#8  0x778e9c7e in
cppu::defaultBootstrap_InitialComponentContext(rtl::OUString const&) ()
   from /usr/lib/libreoffice/program/libuno_cppuhelpergcc3.so.3
#9  0x778eac91 in cppu::defaultBootstrap_InitialComponentContext()
() from /usr/lib/libreoffice/program/libuno_cppuhelpergcc3.so.3
#10 0x6009 in sal_main_with_args (argc=4, argv=0x7fffe708)
at generator.cpp:84
#11 0x5f66 in main (argc=4, argv=0x7fffe708) at
generator.cpp:67

I'm using libreoffice-sdk 6.0.5, gcc-8.1.1

command line was: ./generator -env:URE_MORE_TYPES=file://"./offapi.rdb"
"./test.odt"
"uno:socket,host=localhost,port=2083;urp;StarOffice.ServiceManager"

Libreoffice was started with: soffice
"-accept=socket,host=localhost,port=2083;urp;StarOffice.ServiceManager"

Could I get a hint how to fix it?
ty, Oliver
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: LibreOffice ESC call, Thur - 16:00 central European (local) time

2018-07-17 Thread Michael Meeks

On 17/07/18 18:37, Xisco Fauli wrote:
> Could we discuss about it during the ESC meeting?

Of course; it's unfortunate of course because Bjoern's change is
conceptually extremely good I think.

ATB,

Michael.

-- 
michael.me...@collabora.com <><, GM Collabora Productivity
Hangout: mejme...@gmail.com, Skype: mmeeks
(M) +44 7795 666 147 - timezone usually UK / Europe
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-cd-3-2' - wsd/Storage.cpp

2018-07-17 Thread Jan Holesovsky
 wsd/Storage.cpp |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 9bab03070140227f850112716277c82f2fc41424
Author: Jan Holesovsky 
Date:   Tue Jul 17 20:22:06 2018 +0200

wsd: Don't try to anonymize the /contents at the end.

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

diff --git a/wsd/Storage.cpp b/wsd/Storage.cpp
index 17b207f84..89e44162d 100644
--- a/wsd/Storage.cpp
+++ b/wsd/Storage.cpp
@@ -555,7 +555,10 @@ std::string WopiStorage::loadStorageFileToLocal(const 
Authorization& auth)
 Poco::URI uriObject(_uri);
 uriObject.setPath(uriObject.getPath() + "/contents");
 auth.authorizeURI(uriObject);
-const std::string uriAnonym = LOOLWSD::anonymizeUrl(uriObject.toString());
+
+Poco::URI uriObjectAnonym(_uri);
+uriObjectAnonym.setPath(LOOLWSD::anonymizeUrl(uriObjectAnonym.getPath()) + 
"/contents");
+const std::string uriAnonym = uriObjectAnonym.toString();
 
 LOG_DBG("Wopi requesting: " << uriAnonym);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-cd-3-2' - loleaflet/unocommands.js scripts/unocommands.py

2018-07-17 Thread Andras Timar
 loleaflet/unocommands.js |8 +++-
 scripts/unocommands.py   |8 +++-
 2 files changed, 14 insertions(+), 2 deletions(-)

New commits:
commit 5e9c10b732b59402ef10449f633e088b58db84f6
Author: Andras Timar 
Date:   Tue Jul 17 10:21:12 2018 +0200

loleaflet: remove latin access keys in parentheses (in case of CJK, Indian, 
etc. langs)

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

diff --git a/loleaflet/unocommands.js b/loleaflet/unocommands.js
index 51dd80c61..83ae47c08 100644
--- a/loleaflet/unocommands.js
+++ b/loleaflet/unocommands.js
@@ -276,5 +276,11 @@ global._UNO = function(string, component, isContext) {
}
}
 
-   return text.replace('~', '');
+   // Remove access key markers from translated strings
+   // 1. access key in parenthesis in case of non-latin scripts
+   text = text.replace(/\(~[A-Za-z]\)/, '');
+   // 2. remove normal access key
+   text = text.replace('~', '');
+
+   return text;
 }
diff --git a/scripts/unocommands.py b/scripts/unocommands.py
index d3b7a887d..46cb866c0 100755
--- a/scripts/unocommands.py
+++ b/scripts/unocommands.py
@@ -243,7 +243,13 @@ global._UNO = function(string, component, isContext) {
 \t\t}
 \t}
 
-\treturn text.replace('~', '');
+\t// Remove access key markers from translated strings
+\t// 1. access key in parenthesis in case of non-latin scripts
+\ttext = text.replace(/\(~[A-Za-z]\)/, '');
+\t// 2. remove normal access key
+\ttext = text.replace('~', '');
+
+\treturn text;
 }\n''')
 
 return descriptions
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-cd-3-2' - common/Util.cpp common/Util.hpp kit/ChildSession.cpp kit/ChildSession.hpp kit/Kit.cpp test/WhiteBoxTests.cpp wsd/D

2018-07-17 Thread Ashod Nakashian
 common/Util.cpp|   80 +++--
 common/Util.hpp|   43 +++--
 kit/ChildSession.cpp   |3 
 kit/ChildSession.hpp   |2 
 kit/Kit.cpp|   10 ++-
 test/WhiteBoxTests.cpp |  152 +
 wsd/DocumentBroker.cpp |5 +
 wsd/LOOLWSD.cpp|   25 +---
 wsd/Storage.cpp|   13 +++-
 9 files changed, 281 insertions(+), 52 deletions(-)

New commits:
commit 9fee82aebadfdc59ece0693bdcba558b63cdb818
Author: Ashod Nakashian 
Date:   Tue Jul 17 02:01:05 2018 -0400

wsd: anonymization improvements and unittests

Also support anonymization of downloadas documents
and renaming of documents.

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

diff --git a/common/Util.cpp b/common/Util.cpp
index 788757e1c..cfd636d4b 100644
--- a/common/Util.cpp
+++ b/common/Util.cpp
@@ -544,6 +544,42 @@ namespace Util
 return true;
 }
 
+/// Split a string in two at the delimeter and give the delimiter to the 
first.
+static
+std::pair splitLast2(const char* s, const int 
length, const char delimeter = ' ')
+{
+if (s != nullptr && length > 0)
+{
+const int pos = getLastDelimiterPosition(s, length, delimeter);
+if (pos < length)
+return std::make_pair(std::string(s, pos + 1), std::string(s + 
pos + 1));
+}
+
+// Not found; return in first.
+return std::make_pair(std::string(s, length), std::string());
+}
+
+std::tuple 
splitUrl(const std::string& url)
+{
+// In case we have a URL that has parameters.
+std::string base;
+std::string params;
+std::tie(base, params) = Util::split(url, '?', false);
+
+std::string filename;
+std::tie(base, filename) = Util::splitLast2(base.c_str(), base.size(), 
'/');
+if (filename.empty())
+{
+// If no '/', then it's only filename.
+std::swap(base, filename);
+}
+
+std::string ext;
+std::tie(filename, ext) = Util::splitLast(filename, '.', false);
+
+return std::make_tuple(base, filename, ext, params);
+}
+
 static std::map AnonymizedStrings;
 static std::atomic AnonymizationSalt(0);
 static std::mutex AnonymizedMutex;
@@ -586,45 +622,25 @@ namespace Util
 return res;
 }
 
-static std::string anonymizeFilename(const std::string& filename)
+std::string getFilenameFromURL(const std::string& url)
 {
-// Preserve the extension.
-std::string basename;
+std::string base;
+std::string filename;
 std::string ext;
-const std::size_t mid = filename.find_last_of('.');
-if (mid != std::string::npos)
-{
-basename = filename.substr(0, mid);
-ext = filename.substr(mid);
-}
-else
-basename = filename;
-
-return Util::anonymize(basename) + ext;
-}
-
-std::string getFilenameFromPath(const std::string& path)
-{
-const std::size_t mid = path.find_last_of('/');
-if (mid != std::string::npos)
-return path.substr(mid + 1);
-
-// No path, treat as filename only.
-return path;
+std::string params;
+std::tie(base, filename, ext, params) = Util::splitUrl(url);
+return filename;
 }
 
 std::string anonymizeUrl(const std::string& url)
 {
-const std::size_t mid = url.find_last_of('/');
-if (mid != std::string::npos)
-{
-const std::string path = url.substr(0, mid + 1);
-const std::string filename = url.substr(mid + 1);
-return path + Util::anonymizeFilename(filename);
-}
+std::string base;
+std::string filename;
+std::string ext;
+std::string params;
+std::tie(base, filename, ext, params) = Util::splitUrl(url);
 
-// No path, treat as filename only.
-return Util::anonymizeFilename(url);
+return base + Util::anonymize(filename) + ext + params;
 }
 }
 
diff --git a/common/Util.hpp b/common/Util.hpp
index 3d457997f..719a1081c 100644
--- a/common/Util.hpp
+++ b/common/Util.hpp
@@ -242,6 +242,18 @@ namespace Util
 return false;
 }
 
+inline size_t getLastDelimiterPosition(const char* message, const int 
length, const char delim)
+{
+if (message && length > 0)
+{
+const char *founddelim = static_cast(memrchr(message, delim, length));
+const auto size = (founddelim == nullptr ? length : founddelim - 
message);
+return size;
+}
+
+return 0;
+}
+
 inline size_t getDelimiterPosition(const char* message, const int length, 
const char delim)
 {
 if (message && length > 0)
@@ -

[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-cd-3-2' - common/Log.cpp common/Log.hpp common/Seccomp.cpp common/Util.cpp kit/ForKit.cpp kit/Kit.cpp wsd/LOOLWSD.cpp

2018-07-17 Thread Ashod Nakashian
 common/Log.cpp |   12 
 common/Log.hpp |7 ++-
 common/Seccomp.cpp |1 +
 common/Util.cpp|1 +
 kit/ForKit.cpp |6 ++
 kit/Kit.cpp|   28 
 wsd/LOOLWSD.cpp|2 ++
 7 files changed, 48 insertions(+), 9 deletions(-)

New commits:
commit b75e6840b40c4c1ff015f323f54346b0413b0d4c
Author: Ashod Nakashian 
Date:   Mon Jul 16 21:42:17 2018 -0400

wsd: flush logs before existing

This is important for when we abort with some explanation.
Often said explanation doesn't show up anywhere to be useful.

Also, issue fatal logs for abnormal exist and use SFL to log errno.

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

diff --git a/common/Log.cpp b/common/Log.cpp
index 1d4d36d39..236e4bea6 100644
--- a/common/Log.cpp
+++ b/common/Log.cpp
@@ -16,6 +16,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -175,6 +176,17 @@ namespace Log
 {
 return Poco::Logger::get(Source.inited ? Source.name : std::string());
 }
+
+void shutdown()
+{
+logger().shutdown();
+
+// Flush
+std::flush(std::cout);
+fflush(stdout);
+std::flush(std::cerr);
+fflush(stderr);
+}
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/common/Log.hpp b/common/Log.hpp
index e630c5678..fbafeeadc 100644
--- a/common/Log.hpp
+++ b/common/Log.hpp
@@ -30,13 +30,19 @@ inline std::ostream& operator<< (std::ostream& os, const 
Poco::Timestamp& ts)
 
 namespace Log
 {
+/// Initialize the logging system.
 void initialize(const std::string& name,
 const std::string& logLevel,
 const bool withColor,
 const bool logToFile,
 std::map config);
+
+/// Returns the underlying logging system.
 Poco::Logger& logger();
 
+/// Shutdown and release the logging system.
+void shutdown();
+
 char* prefix(char* buffer, std::size_t len, const char* level);
 
 inline bool traceEnabled() { return logger().trace(); }
@@ -192,7 +198,6 @@ namespace Log
 do  \
 {   \
 LOG << "| " << __FILE__ << ':' << __LINE__; \
-LOG.flush();\
 } while (false)
 
 #define LOG_BODY_(LOG, PRIO, LVL, X)   
 \
diff --git a/common/Seccomp.cpp b/common/Seccomp.cpp
index 21fc83c35..7a1f101c3 100644
--- a/common/Seccomp.cpp
+++ b/common/Seccomp.cpp
@@ -74,6 +74,7 @@ static void handleSysSignal(int /* signal */,
 
 SigUtil::dumpBacktrace();
 
+Log::shutdown();
 _exit(1);
 }
 
diff --git a/common/Util.cpp b/common/Util.cpp
index 4b57d429a..788757e1c 100644
--- a/common/Util.cpp
+++ b/common/Util.cpp
@@ -220,6 +220,7 @@ namespace Util
 int ret = execvp(params[0], ¶ms[0]);
 if (ret < 0)
 std::cerr << "Failed to exec command '" << cmd << "' with 
error '" << strerror(errno) << "'\n";
+Log::shutdown();
 _exit(42);
 }
 // else spawning process still
diff --git a/kit/ForKit.cpp b/kit/ForKit.cpp
index 2548a1c61..7dcf1da5d 100644
--- a/kit/ForKit.cpp
+++ b/kit/ForKit.cpp
@@ -531,7 +531,11 @@ int main(int argc, char** argv)
 
 // Initialize LoKit
 if (!globalPreinit(loTemplate))
+{
+LOG_FTL("Failed to preinit lokit.");
+Log::shutdown();
 std::_Exit(Application::EXIT_SOFTWARE);
+}
 
 LOG_INF("Preinit stage OK.");
 
@@ -542,6 +546,7 @@ int main(int argc, char** argv)
 if (forKitPid < 0)
 {
 LOG_FTL("Failed to create a kit process.");
+Log::shutdown();
 std::_Exit(Application::EXIT_SOFTWARE);
 }
 
@@ -578,6 +583,7 @@ int main(int argc, char** argv)
 #endif
 
 LOG_INF("ForKit process finished.");
+Log::shutdown();
 std::_Exit(returnValue);
 }
 #endif
diff --git a/kit/Kit.cpp b/kit/Kit.cpp
index 3c70a8086..dfc0507cd 100644
--- a/kit/Kit.cpp
+++ b/kit/Kit.cpp
@@ -195,8 +195,9 @@ namespace
 }
 catch (const std::exception& exc)
 {
-LOG_ERR("Copying of '" << fpath << "' to " << 
newPath.toString() <<
+LOG_FTL("Copying of '" << fpath << "' to " << 
newPath.toString() <<
 " failed: " << exc.what() << ". Exiting.");
+Log::shutdown();
 std::_Exit(Application::EXIT_SOFTWARE);
 }
 }
@@ -268,7 +269,8 @@ namespace
 caps = cap_get_proc();
 if (caps == nullptr)
 {
-LOG_SYS("cap_get_proc() failed.");
+LOG_SFL("cap_get_proc() failed.");
+Log::shutdown();
 

[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-cd-3-2' - common/Protocol.hpp common/Util.hpp kit/ForKit.cpp test/WhiteBoxTests.cpp

2018-07-17 Thread Ashod Nakashian
 common/Protocol.hpp|   42 +-
 common/Util.hpp|   34 ++
 kit/ForKit.cpp |2 +-
 test/WhiteBoxTests.cpp |   10 +-
 4 files changed, 45 insertions(+), 43 deletions(-)

New commits:
commit 5462a66763f2cee6af8c5e692dbea04552bbc554
Author: Ashod Nakashian 
Date:   Fri Jul 13 00:18:30 2018 -0400

wsd: move string utilities into Util

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

diff --git a/common/Protocol.hpp b/common/Protocol.hpp
index 1e2158a91..fd39423bc 100644
--- a/common/Protocol.hpp
+++ b/common/Protocol.hpp
@@ -21,6 +21,8 @@
 
 #include 
 
+#include 
+
 #define LOK_USE_UNSTABLE_API
 #include 
 
@@ -144,45 +146,11 @@ namespace LOOLProtocol
 return getTokenInteger(tokenize(message), name, value);
 }
 
-inline size_t getDelimiterPosition(const char* message, const int length, 
const char delim)
-{
-if (message && length > 0)
-{
-const char *founddelim = static_cast(std::memchr(message, delim, length));
-const auto size = (founddelim == nullptr ? length : founddelim - 
message);
-return size;
-}
-
-return 0;
-}
-
-inline
-std::string getDelimitedInitialSubstring(const char *message, const int 
length, const char delim)
-{
-const auto size = getDelimiterPosition(message, length, delim);
-return std::string(message, size);
-}
-
-/// Split a string in two at the delimeter, removing it.
-inline
-std::pair split(const char* s, const int length, 
const char delimeter = ' ')
-{
-const auto size = getDelimiterPosition(s, length, delimeter);
-return std::make_pair(std::string(s, size), std::string(s+size+1));
-}
-
-/// Split a string in two at the delimeter, removing it.
-inline
-std::pair split(const std::string& s, const char 
delimeter = ' ')
-{
-return split(s.c_str(), s.size(), delimeter);
-}
-
 /// Returns the first token of a message.
 inline
 std::string getFirstToken(const char *message, const int length, const 
char delim = ' ')
 {
-return getDelimitedInitialSubstring(message, length, delim);
+return Util::getDelimitedInitialSubstring(message, length, delim);
 }
 
 template 
@@ -246,7 +214,7 @@ namespace LOOLProtocol
 inline
 std::string getFirstLine(const char *message, const int length)
 {
-return getDelimitedInitialSubstring(message, length, '\n');
+return Util::getDelimitedInitialSubstring(message, length, '\n');
 }
 
 /// Returns the first line of any data which payload char*.
@@ -282,7 +250,7 @@ namespace LOOLProtocol
 
 inline std::string getAbbreviatedMessage(const std::string& message)
 {
-const auto pos = getDelimiterPosition(message.data(), 
std::min(message.size(), 500UL), '\n');
+const auto pos = Util::getDelimiterPosition(message.data(), 
std::min(message.size(), 501UL), '\n');
 
 // If first line is less than the length (minus newline), add ellipsis.
 if (pos < static_cast(message.size()) - 1)
diff --git a/common/Util.hpp b/common/Util.hpp
index d8717b234..3d457997f 100644
--- a/common/Util.hpp
+++ b/common/Util.hpp
@@ -242,6 +242,40 @@ namespace Util
 return false;
 }
 
+inline size_t getDelimiterPosition(const char* message, const int length, 
const char delim)
+{
+if (message && length > 0)
+{
+const char *founddelim = static_cast(std::memchr(message, delim, length));
+const auto size = (founddelim == nullptr ? length : founddelim - 
message);
+return size;
+}
+
+return 0;
+}
+
+inline
+std::string getDelimitedInitialSubstring(const char *message, const int 
length, const char delim)
+{
+const auto size = getDelimiterPosition(message, length, delim);
+return std::string(message, size);
+}
+
+/// Split a string in two at the delimeter, removing it.
+inline
+std::pair split(const char* s, const int length, 
const char delimeter = ' ')
+{
+const auto size = getDelimiterPosition(s, length, delimeter);
+return std::make_pair(std::string(s, size), std::string(s+size+1));
+}
+
+/// Split a string in two at the delimeter, removing it.
+inline
+std::pair split(const std::string& s, const char 
delimeter = ' ')
+{
+return split(s.c_str(), s.size(), delimeter);
+}
+
 /// Check for the URI scheme validity.
 /// For now just a basic sanity check, can be extended if necessary.
 bool isValidURIScheme(const std::string& scheme);
diff --git a/kit/ForKit.cpp b/kit/ForKit.cpp
index d77c01c30..2548a1c61 100644
--- a/kit/ForKit.cpp
+++ b/kit/ForKit.cpp
@@ -453,7 +453,7 @@ int m

Re: LibreOffice ESC call, Thur - 16:00 central European (local) time

2018-07-17 Thread Xisco Fauli
Hi Michael, Björn, *,


> + Changing paragraph color is broken in LO master
> + https://bugs.documentfoundation.org/show_bug.cgi?id=117774
> + Bjoern write re-factor ? Same cause as 117749 ?
Yes, it's the same cause as in bug 117749
>
>
> + Older
>
> + Crash when undoing the pasting of a table
> + https://bugs.documentfoundation.org/show_bug.cgi?id=117749
> + Bjoern writer re-factor regression
> + Xisco has a prototype revert (?) ...
>

Besides, there are three more bugs listed in the metabug 118738 [1]
affected by the same cause.
 
I have tried to reach Björn but I haven't got any answer back, that's
why I would like to revert the commit for now [2], and if possible, for
LibreOffice 6.1 RC2.

Could we discuss about it during the ESC meeting?

Regards

[1] https://bugs.documentfoundation.org/show_bug.cgi?id=118738
[2] https://gerrit.libreoffice.org/#/c/57534/

-- 
Xisco Faulí
Libreoffice QA Team
IRC: x1sc0


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


LibreOffice ESC call, Thur - 16:00 central European (local) time

2018-07-17 Thread Michael Meeks
Hi guys,

Prototype agenda below, bug metrics also at the link below;
extra items appreciated as last-week:

https://demo.collaboracloudsuite.com/tdf/

Lets use the new TDF jitsi goodness this week at:

http://jitsi.documentfoundation.org/esc

ATB,

Michael.

* Completed Action Items:
+ Submit Tirana / conference papers:
 + https://libocon.org/2018/call-for-papers/ 
 + extended deadline is July 15th – this Sunday [!]

* Pending Action Items:
+ Windows tinderbox/build-bot owners to parallel install VS2017
+ on ESC share - “Budget2018” - add your ranking before this week’s call [!]

* Release Engineering update (Christian)
+ [ Christian sady missing … ]
+ 6.0.6 – rc1 due this week (Jul 10)
+ 6.1.0 RC2 – next week – July 17
+ now commits to 6-1 branch need review  
  + also string freeze
 + also includes html help switch for distro branches
+ 6.1 late features
+ calc threading default / fixing (Miklos)
   + *DONE*, just bugfixing
 + Eike: question to disable precautiously?
+ Remotes
+ Android viewer
+ Online
+ simplifying iOS build re translations

* Documentation (Olivier)
 
* UX Update (Heiko)
+ Bugzilla (topicUI) statistics
251(251) (topicUI) bugs open, 291(291) (needsUXEval) needs to be 
evaluated by the UXteam
+ Updates:
BZ changes   1 week   1 month   3 months   12 months  
 added 15(12)24(14)30(13)  97(14) 
 commented 48(17)   140(50)   286(46)1702(46) 
   removed  1(1)  1(1)  1(1)   11(1)  
  resolved  4(3)  9(2) 20(3)  170(-1) 
+ top 10 contributors:
  Buovjaga made 58 changes in 1 month, and 205 changes in 1 year
  Foote, V Stuart made 38 changes in 1 month, and 268 changes in 1 year
  Tietze, Heiko made 36 changes in 1 month, and 713 changes in 1 year
  Xisco Faulí made 27 changes in 1 month, and 317 changes in 1 year
  kompilainenn made 21 changes in 1 month, and 42 changes in 1 year
  OfficeUser made 18 changes in 1 month, and 18 changes in 1 year
  Telesto made 14 changes in 1 month, and 94 changes in 1 year
  Henschel, Regina made 11 changes in 1 month, and 99 changes in 1 year
  Harald Koester made 8 changes in 1 month, and 13 changes in 1 year
  Kaganski, Mike made 8 changes in 1 month, and 50 changes in 1 year

* Fuzz / Crash Testing (Caolan on vacation)
+ 20(-24) import failure, 4(+1) export failures 
+ 45 import crashers
+ 3 writer, rest spreadsheets.
+ expect all calc crashes fixed (Michael M)
+ crash testing script now running normally again (Michael S)
+ 1st thing did pull dev-tools repo from an invalid URL.
+ was in state of 2015 on this server.
+ new stuff broke things for a while then fixed it.
+ now working again.
+ validation now connected into here.
+ same custom schema as used in unit-tests …
+ quite a few issues reported.
+ coverity
+ ??
+ forcepoint ??
+ oss-fuzz ?? (?? outstanding, ?? minor)
  
* Crash Reporting (Xisco)
+ http://crashreport.libreoffice.org/stats/version/5.4.7.2
 + 489 (last 7 days) (0)
+ http://crashreport.libreoffice.org/stats/version/6.0.4.2
 + 1127 (last 7 days) (-327)
+ http://crashreport.libreoffice.org/stats/version/6.0.5.2
 + 1095 (last 7 days) (+205)

 + Updater was enabled, looks better than for previous version
 + Top 2 and Top 4 crashes in 6.0.5.2 fixed for 6.0.6

* Budget ranking (Thorsten)
   + on ESC share - “Budget2018”

* GSoC schedule (Kendy)
   + Coding: May 14 - August 6
   + please tell students to send a weekly status update.
   + Evaluation 2: July 9 – 13 - next week!
   + please do your evaluations … thanks to Markus for reminding.
  + coming up soon (Thorsten) 
   + Students Submit Code and Final Evaluations: August 6 - 14
   + Mentors Submit Final Evaluations: August 14 - 21
   + Results Announced: August 22
   + https://wiki.documentfoundation.org/Development/GSoC/2018

* Hackfests & Events
   + FrOScon in Bonn: Aug 25
   + Akademy Aug 11-17th
   + Conference – September
   + potentially one in Bern / Switzerland - October 19th.
   + working on a Munich event October 26-28th (Thorsten)
  + an Open Gov’t meeting from the City of Munich
  + good to have a hack-fest back-to-back there.
  + moving slowly here …

* mentoring/easyhack update
 committer...   1 week   1 month 3 months12 months   
  open  110(36)  138(8)  140(7)   151(7)  
   reviews 1410(-577)   5569(110)   8861(659)   22443(581)
merged  285(-35)1386(-35)   3576(-13)   14004(83) 
 aban

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

2018-07-17 Thread Libreoffice Gerrit user
 cui/source/dialogs/cuicharmap.cxx  |6 +++---
 sw/source/filter/html/htmlgrin.cxx |   16 +++-
 2 files changed, 18 insertions(+), 4 deletions(-)

New commits:
commit 4d18cd6aad0daaefaca792e8eac173bea07f3750
Author: Caolán McNamara 
AuthorDate: Tue Jul 17 09:58:56 2018 +0100
Commit: Caolán McNamara 
CommitDate: Tue Jul 17 18:23:11 2018 +0200

put load of html images (to measure dimensions) under referer control

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

diff --git a/sw/source/filter/html/htmlgrin.cxx 
b/sw/source/filter/html/htmlgrin.cxx
index 8b3ddaf0f601..db0cc4701e36 100644
--- a/sw/source/filter/html/htmlgrin.cxx
+++ b/sw/source/filter/html/htmlgrin.cxx
@@ -299,6 +299,20 @@ void SwHTMLParser::GetDefaultScriptType( ScriptType& rType,
 rTypeStr = GetScriptTypeString( pHeaderAttrs );
 }
 
+namespace
+{
+bool allowAccessLink(SwDoc& rDoc)
+{
+OUString sReferer;
+SfxObjectShell * sh = rDoc.GetPersist();
+if (sh != nullptr && sh->HasName())
+{
+sReferer = sh->GetMedium()->GetName();
+}
+return !SvtSecurityOptions().isUntrustedReferer(sReferer);
+}
+}
+
 /*  */
 
 void SwHTMLParser::InsertImage()
@@ -628,7 +642,7 @@ IMAGE_SETEVENT:
 bool bSetScaleImageMap = false;
 sal_uInt8 nPrcWidth = 0, nPrcHeight = 0;
 
-if (!nWidth || !nHeight)
+if ((!nWidth || !nHeight) && allowAccessLink(*m_xDoc))
 {
 GraphicDescriptor aDescriptor(aGraphicURL);
 if (aDescriptor.Detect(/*bExtendedInfo=*/true))
commit 19b3a353662c547b9e1a445c1bc71cf3bc107250
Author: Caolán McNamara 
AuthorDate: Tue Jul 17 15:55:03 2018 +0100
Commit: Caolán McNamara 
CommitDate: Tue Jul 17 18:22:58 2018 +0200

Related: tdf#118681 use a case insensitive compare for hex digits

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

diff --git a/cui/source/dialogs/cuicharmap.cxx 
b/cui/source/dialogs/cuicharmap.cxx
index 71c1360f4f7d..13e88e9df86d 100644
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -976,8 +976,8 @@ IMPL_LINK_NOARG(SvxCharacterMap, CharHighlightHdl, 
SvxShowCharSet*, void)
 setCharName(cChar);
 
 // Update the hex and decimal codes only if necessary
-if (m_xHexCodeText->get_text() != aHexText)
-m_xHexCodeText->set_text( aHexText );
+if (!m_xHexCodeText->get_text().equalsIgnoreAsciiCase(aHexText))
+m_xHexCodeText->set_text(aHexText);
 if (m_xDecimalCodeText->get_text() != aDecimalText)
 m_xDecimalCodeText->set_text( aDecimalText );
 
@@ -1019,7 +1019,7 @@ IMPL_LINK_NOARG(SvxCharacterMap, SearchCharHighlightHdl, 
SvxShowCharSet*, void)
 setCharName(cChar);
 
 // Update the hex and decimal codes only if necessary
-if (m_xHexCodeText->get_text() != aHexText)
+if (!m_xHexCodeText->get_text().equalsIgnoreAsciiCase(aHexText))
 m_xHexCodeText->set_text(aHexText);
 if (m_xDecimalCodeText->get_text() != aDecimalText)
 m_xDecimalCodeText->set_text( aDecimalText );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: ios/CustomTarget_iOS_setup.mk

2018-07-17 Thread Libreoffice Gerrit user
 ios/CustomTarget_iOS_setup.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1d3de59ac2d12e42e12c9642bd252236a80b096b
Author: Eike Rathke 
AuthorDate: Tue Jul 17 17:37:55 2018 +0200
Commit: Eike Rathke 
CommitDate: Tue Jul 17 17:41:10 2018 +0200

Use $(ICU_MAJOR) instead of hard coded (Upgrade to ICU 62.1)

Change-Id: Ifea7072922388b2c0b7631fb809b23e2a5524a3c

diff --git a/ios/CustomTarget_iOS_setup.mk b/ios/CustomTarget_iOS_setup.mk
index a0d1a18823ab..718bb8b90d46 100644
--- a/ios/CustomTarget_iOS_setup.mk
+++ b/ios/CustomTarget_iOS_setup.mk
@@ -54,7 +54,7 @@ $(IOSGEN)/native-code.h: $(BUILDDIR)/config_host.mk \
> $(IOSGEN)/native-code.h
 
# copy resource files used to start/run LibreOffice
-   cp $(WORKDIR)/UnpackedTarball/icu/source/data/in/icudt61l.dat 
$(IOSRES)/icudt61l.dat
+   cp $(WORKDIR)/UnpackedTarball/icu/source/data/in/icudt$(ICU_MAJOR)l.dat 
$(IOSRES)/icudt$(ICU_MAJOR)l.dat
cp $(INSTDIR)/program/types.rdb $(IOSRES)/udkapi.rdb
cp $(INSTDIR)/program/types/offapi.rdb  $(IOSRES)
cp $(INSTDIR)/program/types/oovbaapi.rdb$(IOSRES)
___
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-07-17 Thread Libreoffice Gerrit user
 include/svx/sdr/properties/defaultproperties.hxx  |3 
 svx/source/sdr/properties/attributeproperties.cxx |   81 --
 svx/source/sdr/properties/defaultproperties.cxx   |   25 ++
 3 files changed, 55 insertions(+), 54 deletions(-)

New commits:
commit e244c2c56528dff0d4cfa4e46c3d24ca141bf2be
Author: Armin Le Grand 
AuthorDate: Tue Jul 17 15:16:39 2018 +0200
Commit: Armin Le Grand 
CommitDate: Tue Jul 17 17:40:10 2018 +0200

tdf#117707 Correctly Scale ItemSets when pasting from External

Change-Id: Id01777a786fa7bb75d46ee0f78da645e94f7b840
Reviewed-on: https://gerrit.libreoffice.org/57556
Tested-by: Jenkins
Reviewed-by: Armin Le Grand 

diff --git a/include/svx/sdr/properties/defaultproperties.hxx 
b/include/svx/sdr/properties/defaultproperties.hxx
index beff46818c30..a7a7d666a953 100644
--- a/include/svx/sdr/properties/defaultproperties.hxx
+++ b/include/svx/sdr/properties/defaultproperties.hxx
@@ -101,9 +101,6 @@ namespace sdr
 // DefaultProperties::GetObjectItemSet() if a new ItemSet is 
created.
 // Default implementation does nothing.
 virtual void ForceDefaultAttributes();
-
-// Scale the included ItemSet.
-void Scale(const Fraction& rScale);
 };
 } // end of namespace properties
 } // end of namespace sdr
diff --git a/svx/source/sdr/properties/attributeproperties.cxx 
b/svx/source/sdr/properties/attributeproperties.cxx
index 4089438d959e..ebd3f8c14780 100644
--- a/svx/source/sdr/properties/attributeproperties.cxx
+++ b/svx/source/sdr/properties/attributeproperties.cxx
@@ -158,44 +158,53 @@ namespace sdr
 {
 SfxStyleSheet* pTargetStyleSheet(rProps.GetStyleSheet());
 
-if(pTargetStyleSheet &&
-&rObj.getSdrModelFromSdrObject() != 
&rProps.GetSdrObject().getSdrModelFromSdrObject())
+if(pTargetStyleSheet)
 {
-// tdf#117506
-// The error shows that it is definitely necessary to solve 
this problem.
-// Interestingly I already had a note here for 'work needed'.
-// Checked in libreoffice-6-0 what happened there. In 
principle, the whole
-// ::Clone of SdrPage and SdrObject happened in the same 
SdrModel, only
-// afterwards a ::SetModel was used at the cloned SdrPage 
which went through
-// all layers. The StyleSheet-problem was solved in
-// AttributeProperties::MoveToItemPool at the end. There, a 
StyleSheet with the
-// same name was searched for in the target-SdrModel.
-// Start by resetting the current TargetStyleSheet so that 
nothing goes wrong
-// when we do not find a fitting TargetStyleSheet.
-// Note: The test for SdrModelChange above was wrong (compared 
the already set
-// new SdrObject), so this never triggered and 
pTargetStyleSheet was never set to
-// nullptr before. This means that a StyleSheet from another 
SdrModel was used
-// what of course is very dangerous. Interestingly did not 
crash since when that
-// other SdrModel was destroyed the ::Notify mechanism still 
worked reliably
-// and de-connected this Properties successfully from the 
alien-StyleSheet.
-pTargetStyleSheet = nullptr;
-
-// Check if we have a TargetStyleSheetPool at the 
target-SdrModel. This *should*
-// be the case already (SdrModel::Merge and 
SdDrawDocument::InsertBookmarkAsPage)
-// have already cloned the StyleSheets to the target-SdrModel.
-// If none is found, ImpGetDefaultStyleSheet will be used to 
set a 'default'
-// StyleSheet as StyleSheet (that's what happened in the task, 
thus the FillStyle
-// changed to the 'default' Blue).
-SfxStyleSheetBasePool* 
pTargetStyleSheetPool(rObj.getSdrModelFromSdrObject().GetStyleSheetPool());
-
-if(nullptr != pTargetStyleSheetPool)
+const bool bModelChange(&rObj.getSdrModelFromSdrObject() != 
&rProps.GetSdrObject().getSdrModelFromSdrObject());
+
+if(bModelChange)
 {
-// If we have a TargetStyleSheetPool, search for the 
StyleSheet used
-// in the original Properties in the source-SdrModel.
-pTargetStyleSheet = dynamic_cast< SfxStyleSheet* >(
-pTargetStyleSheetPool->Find(
-rProps.GetStyleSheet()->GetName(),
-SfxStyleFamily::All));
+// tdf#117506
+// The error shows that it is definitely necessary to 
solve this problem.
+// Interestingly I already had a note here for 'work 
needed'.
+// Checked in lib

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

2018-07-17 Thread Libreoffice Gerrit user
 sfx2/source/dialog/basedlgs.cxx |7 ---
 1 file changed, 7 deletions(-)

New commits:
commit 01d422f263f825904cc475c07e1bdbacd25f3b74
Author: Pranav Kant 
AuthorDate: Thu Jan 25 19:27:41 2018 +0530
Commit: Jan Holesovsky 
CommitDate: Tue Jul 17 17:32:37 2018 +0200

lokdialog: No need to notify 'close' callback here

This is now handled in Dialog::dispose

Change-Id: If6703dbf1fa02c3d83debcc17eba3c6b1ee49a1c
Reviewed-on: https://gerrit.libreoffice.org/48622
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 
(cherry picked from commit cc9ca93c52e40557ed918868e235d393f9ecde6e)
Reviewed-on: https://gerrit.libreoffice.org/57506
Tested-by: Jenkins

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


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

2018-07-17 Thread Libreoffice Gerrit user
 sc/source/filter/oox/workbookfragment.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit bd3baf8dab6c5b8865a33136cc28a016e6ee6afb
Author: Eike Rathke 
AuthorDate: Tue Jul 17 12:58:30 2018 +0200
Commit: Eike Rathke 
CommitDate: Tue Jul 17 17:19:13 2018 +0200

OOXML import: CalcFormulaTree() is unnecessary, tdf#94925 follow-up

View will trigger recalc of dirty cells, or anything else
accessing formula cell results, so we can avoid a worst case full
blown recalc.

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

diff --git a/sc/source/filter/oox/workbookfragment.cxx 
b/sc/source/filter/oox/workbookfragment.cxx
index 330dcb073b2d..162fb3812201 100644
--- a/sc/source/filter/oox/workbookfragment.cxx
+++ b/sc/source/filter/oox/workbookfragment.cxx
@@ -579,7 +579,9 @@ void WorkbookFragment::recalcFormulaCells()
 else
 {
 getDocImport().broadcastRecalcAfterImport();
-rDoc.CalcFormulaTree(false, true, false);
+// Full ScDocument::CalcFormulaTree() of all dirty cells is not
+// necessary here, the View will recalculate them in the visible area,
+// or any other method accessing formula cell results.
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - libreofficekit/Executable_tilebench.mk libreofficekit/qa

2018-07-17 Thread Libreoffice Gerrit user
 libreofficekit/Executable_tilebench.mk|4 
 libreofficekit/qa/tilebench/tilebench.cxx |  373 +++---
 2 files changed, 248 insertions(+), 129 deletions(-)

New commits:
commit 528e573262d5627f35d25e1bed57bf51695d0a4d
Author: Michael Meeks 
AuthorDate: Wed Jun 27 01:42:49 2018 +0100
Commit: pranavk 
CommitDate: Tue Jul 17 17:09:18 2018 +0200

tilebench: add dialog profiling mode.

Change-Id: I4661664d1206aacdaf22a4a8f05d7962547faf45
(cherry picked from commit a8ebc12eabe2e49e7d1564027c7128898279944e)
(cherry picked from commit 8a2414e4691ceb61559233570dd9df1221d164ea)
Reviewed-on: https://gerrit.libreoffice.org/57326
Tested-by: pranavk 
Reviewed-by: pranavk 

diff --git a/libreofficekit/Executable_tilebench.mk 
b/libreofficekit/Executable_tilebench.mk
index 9d8b2a134f99..9977a93351ed 100644
--- a/libreofficekit/Executable_tilebench.mk
+++ b/libreofficekit/Executable_tilebench.mk
@@ -14,6 +14,10 @@ $(eval $(call gb_Executable_set_include,tilebench,\
 -I$(SRCDIR)/desktop/inc \
 ))
 
+$(eval $(call gb_Executable_use_externals,tilebench,\
+boost_headers \
+))
+
 $(eval $(call gb_Executable_use_libraries,tilebench,\
sal \
 ))
diff --git a/libreofficekit/qa/tilebench/tilebench.cxx 
b/libreofficekit/qa/tilebench/tilebench.cxx
index ed3d57d05b3f..0984a3feee5c 100644
--- a/libreofficekit/qa/tilebench/tilebench.cxx
+++ b/libreofficekit/qa/tilebench/tilebench.cxx
@@ -13,6 +13,8 @@
 #include 
 
 #include 
+#include 
+#include 
 #include 
 #include 
 
@@ -20,12 +22,19 @@
 #include 
 #include 
 
+#include 
+#include 
+
 using namespace lok;
 
-static int help()
+static int help( const char *error = nullptr )
 {
-fprintf( stderr, "Usage: tilebench  
[path to document] [max parts|-1] [max tiles|-1]\n" );
-fprintf( stderr, "renders a selection of small tiles from the document, 
checksums them and times the process\n" );
+if (error)
+fprintf (stderr, "Error: %s\n\n", error);
+fprintf( stderr, "Usage: tilebench  
[path to document]\n");
+fprintf( stderr, "\trenders a selection of small tiles from the document, 
checksums them and times the process\n" );
+fprintf( stderr, "\t--tile\t[max parts|-1] [max tiles|-1]\n" );
+fprintf( stderr, "\t--dialog\t<.uno:Command>\n" );
 return 1;
 }
 
@@ -37,9 +46,24 @@ static double getTimeNow()
static_cast(aValue.Nanosec) / (1000*1000*1000);
 }
 
+static double origin;
+struct TimeRecord {
+const char *mpName;
+double mfTime;
+
+TimeRecord() : mpName(nullptr), mfTime(getTimeNow()) { }
+explicit TimeRecord(const char *pName) :
+mpName(pName), mfTime(getTimeNow())
+{
+fprintf(stderr, "%3.3fs - %s\n", (mfTime - origin), mpName);
+}
+};
+static std::vector< TimeRecord > aTimes;
+
 /// Dump an array of RGBA or BGRA to an RGB PPM file.
-static void dumpTile(const int nWidth, const int nHeight, const int mode, 
const char* pBuffer)
+static void dumpTile(const int nWidth, const int nHeight, const int mode, 
const unsigned char* pBufferU)
 {
+auto pBuffer = reinterpret_cast(pBufferU);
 std::ofstream ofs("/tmp/dump_tile.ppm");
 ofs << "P6\n"
 << nWidth << " "
@@ -79,22 +103,191 @@ static void dumpTile(const int nWidth, const int nHeight, 
const int mode, const
 }
 }
 
-int main( int argc, char* argv[] )
+void testTile( Document *pDocument, int max_parts,
+   int max_tiles, bool dump )
 {
-static const double origin = getTimeNow();
-struct TimeRecord {
-const char *mpName;
-double mfTime;
-
-TimeRecord() : mpName(nullptr), mfTime(getTimeNow()) { }
-explicit TimeRecord(const char *pName) :
-   mpName(pName), mfTime(getTimeNow())
+const int mode = pDocument->getTileMode();
+
+aTimes.emplace_back("getparts");
+const int nOriginalPart = (pDocument->getDocumentType() == 
LOK_DOCTYPE_TEXT ? 1 : pDocument->getPart());
+// Writer really has 1 part (the full doc).
+const int nTotalParts = (pDocument->getDocumentType() == LOK_DOCTYPE_TEXT 
? 1 : pDocument->getParts());
+const int nParts = (max_parts < 0 ? nTotalParts : std::min(max_parts, 
nTotalParts));
+aTimes.emplace_back();
+
+aTimes.emplace_back("get size of parts");
+long nWidth = 0;
+long nHeight = 0;
+for (int n = 0; n < nParts; ++n)
+{
+const int nPart = (nOriginalPart + n) % nTotalParts;
+char* pName = pDocument->getPartName(nPart);
+pDocument->setPart(nPart);
+pDocument->getDocumentSize(&nWidth, &nHeight);
+fprintf (stderr, "  '%s' -> %ld, %ld\n", pName, nWidth, nHeight);
+free (pName);
+}
+aTimes.emplace_back();
+
+// Use realistic dimensions, similar to the Online client.
+long nTilePixelWidth = 512;
+long nTilePixelHeight = 512;
+long nTileTwipWidth = 3840;
+long nTileTwipHeight = 3840;
+
+// Estimate the maximum tiles based on the number of parts reque

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

2018-07-17 Thread Libreoffice Gerrit user
 libreofficekit/qa/tilebench/tilebench.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 7740223e300b67a1d620aafecd5146cf3fddfc3f
Author: Ashod Nakashian 
AuthorDate: Fri Mar 16 20:29:27 2018 -0400
Commit: pranavk 
CommitDate: Tue Jul 17 17:08:50 2018 +0200

lok: be informative and exit when tilebench fails to initialize

Change-Id: I11078e36aafc715b7103998a17e0cb01926b8e97
Reviewed-on: https://gerrit.libreoffice.org/51618
Tested-by: Jenkins 
Reviewed-by: Ashod Nakashian 
(cherry picked from commit 519293447189f75e842065f7ff211d395d0da4b6)
Reviewed-on: https://gerrit.libreoffice.org/57575
Reviewed-by: pranavk 
Tested-by: pranavk 

diff --git a/libreofficekit/qa/tilebench/tilebench.cxx 
b/libreofficekit/qa/tilebench/tilebench.cxx
index 751fb179169f..ed3d57d05b3f 100644
--- a/libreofficekit/qa/tilebench/tilebench.cxx
+++ b/libreofficekit/qa/tilebench/tilebench.cxx
@@ -113,6 +113,12 @@ int main( int argc, char* argv[] )
 aTimes.emplace_back("initialization");
 // coverity[tainted_string] - build time test tool
 Office *pOffice = lok_cpp_init(argv[1]);
+if (pOffice == nullptr)
+{
+fprintf(stderr, "Failed to initialize Office from %s\n", argv[1]);
+return 1;
+}
+
 aTimes.emplace_back();
 
 const int max_parts = (argc > 3 ? atoi(argv[3]) : -1);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-17 Thread Libreoffice Gerrit user
 libreofficekit/qa/gtktiledviewer/gtv-lok-dialog.cxx |   20 +--
 libreofficekit/qa/tilebench/tilebench.cxx   |8 ++--
 libreofficekit/source/gtk/lokdocview.cxx|   36 ++--
 3 files changed, 32 insertions(+), 32 deletions(-)

New commits:
commit 14044919204296f01d48bfe79eda2cd35cf50eb2
Author: Stephan Bergmann 
AuthorDate: Fri Jan 12 20:20:43 2018 +0100
Commit: pranavk 
CommitDate: Tue Jul 17 17:08:10 2018 +0200

More loplugin:cstylecast: libreofficekit

auto-rewrite with  "Enable
loplugin:cstylecast for some more cases" plus
solenv/clang-format/reformat-formatted-files

Change-Id: Iaa166a248f5c1e9fcf62834f65475265403e4322
(cherry picked from commit 4fdd5eff7d4e10eb0a709c79b30b7411e4297d42)
Reviewed-on: https://gerrit.libreoffice.org/57574
Reviewed-by: pranavk 
Tested-by: pranavk 

diff --git a/libreofficekit/qa/gtktiledviewer/gtv-lok-dialog.cxx 
b/libreofficekit/qa/gtktiledviewer/gtv-lok-dialog.cxx
index 54c54848d20e..1d7a2482c069 100644
--- a/libreofficekit/qa/gtktiledviewer/gtv-lok-dialog.cxx
+++ b/libreofficekit/qa/gtktiledviewer/gtv-lok-dialog.cxx
@@ -143,7 +143,7 @@ gtv_lok_dialog_signal_button(GtkWidget* pDialogDrawingArea, 
GdkEventButton* pEve
 
 g_info("lok_dialog_signal_button (type: %s): %d, %d",
aEventType.c_str(),
-   (int)pEvent->x, (int)pEvent->y);
+   static_cast(pEvent->x), static_cast(pEvent->y));
 gtk_widget_grab_focus(pDialogDrawingArea);
 
 switch (pEvent->type)
@@ -225,9 +225,9 @@ gtv_lok_dialog_signal_motion(GtkWidget* pDialogDrawingArea, 
GdkEventButton* pEve
 LibreOfficeKitDocument* pDocument = 
lok_doc_view_get_document(LOK_DOC_VIEW(window->lokdocview));
 
 g_info("lok_dialog_signal_motion: %d, %d (in twips: %d, %d)",
-   (int)pEvent->x, (int)pEvent->y,
-   (int)pixelToTwip(pEvent->x),
-   (int)pixelToTwip(pEvent->y));
+   static_cast(pEvent->x), static_cast(pEvent->y),
+   static_cast(pixelToTwip(pEvent->x)),
+   static_cast(pixelToTwip(pEvent->y)));
 
 pDocument->pClass->postWindowMouseEvent(pDocument,
 priv->dialogid,
@@ -521,9 +521,9 @@ gtv_lok_dialog_floating_win_signal_button(GtkWidget* 
/*pDialogChildDrawingArea*/
 
 g_info("lok_dialog_floating_win_signal_button (type: %s): %d, %d (in 
twips: %d, %d)",
aEventType.c_str(),
-   (int)pEvent->x, (int)pEvent->y,
-   (int)pixelToTwip(pEvent->x),
-   (int)pixelToTwip(pEvent->y));
+   static_cast(pEvent->x), static_cast(pEvent->y),
+   static_cast(pixelToTwip(pEvent->x)),
+   static_cast(pixelToTwip(pEvent->y)));
 
 switch (pEvent->type)
 {
@@ -604,9 +604,9 @@ gtv_lok_dialog_floating_win_signal_motion(GtkWidget* 
/*pDialogDrawingArea*/, Gdk
 LibreOfficeKitDocument* pDocument = 
lok_doc_view_get_document(LOK_DOC_VIEW(window->lokdocview));
 
 g_info("lok_dialog_floating_win_signal_motion: %d, %d (in twips: %d, %d)",
-   (int)pEvent->x, (int)pEvent->y,
-   (int)pixelToTwip(pEvent->x),
-   (int)pixelToTwip(pEvent->y));
+   static_cast(pEvent->x), static_cast(pEvent->y),
+   static_cast(pixelToTwip(pEvent->x)),
+   static_cast(pixelToTwip(pEvent->y)));
 
 pDocument->pClass->postWindowMouseEvent(pDocument,
 priv->m_nChildId,
diff --git a/libreofficekit/qa/tilebench/tilebench.cxx 
b/libreofficekit/qa/tilebench/tilebench.cxx
index 61bc562ae9a7..751fb179169f 100644
--- a/libreofficekit/qa/tilebench/tilebench.cxx
+++ b/libreofficekit/qa/tilebench/tilebench.cxx
@@ -33,8 +33,8 @@ static double getTimeNow()
 {
 TimeValue aValue;
 osl_getSystemTime(&aValue);
-return (double)aValue.Seconds +
-   (double)aValue.Nanosec / (1000*1000*1000);
+return static_cast(aValue.Seconds) +
+   static_cast(aValue.Nanosec) / (1000*1000*1000);
 }
 
 /// Dump an array of RGBA or BGRA to an RGB PPM file.
@@ -149,7 +149,7 @@ int main( int argc, char* argv[] )
 
 // Estimate the maximum tiles based on the number of parts requested, 
if Writer.
 if (pDocument->getDocumentType() == LOK_DOCTYPE_TEXT)
-max_tiles = (int)ceil(max_parts * 16128. / nTilePixelHeight) * 
ceil((double)nWidth / nTilePixelWidth);
+max_tiles = static_cast(ceil(max_parts * 16128. / 
nTilePixelHeight)) * ceil(static_cast(nWidth) / nTilePixelWidth);
 fprintf(stderr, "Parts to render: %d, Total Parts: %d, Max parts: %d, 
Max tiles: %d\n", nParts, nTotalParts, max_parts, max_tiles);
 
 std::vector vBuffer(nTilePixelWidth * nTilePixelHeight 
* 4);
@@ -204,7 +204,7 @@ int main( int argc, char* argv[] )
 aTimes.emplace_back("render sub-regions at scale");
 int nMaxTiles = max_tiles;
 if (pDocument->getDocumentType() == L

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

2018-07-17 Thread Libreoffice Gerrit user
 svx/source/tbxctrls/tbcontrl.cxx |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 28aa5b950a0db9242ce350704cd443c4c6a05fd5
Author: Noel Grandin 
AuthorDate: Tue Jul 17 15:25:54 2018 +0200
Commit: Noel Grandin 
CommitDate: Tue Jul 17 17:05:13 2018 +0200

tdf#118448 style drop downs are static

regression from
commit d70f53a8269be31f0412926afa5ba826faed6633
tdf#100894 freeze when editing calc file with bazillions of cond
formatting

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

diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 8548ea55946d..ceb04a541aae 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -2711,10 +2711,10 @@ void SvxStyleToolBoxControl::FillStyleBox()
 SfxStyleSheetBase*  pStyle  = nullptr;
 boolbDoFill = false;
 
-SfxStyleSheetIterator aIter( pStyleSheetPool, eFamily, 
SfxStyleSearchBits::Used );
+pStyleSheetPool->SetSearchMask( eFamily, SfxStyleSearchBits::Used );
 
 // Check whether fill is necessary
-pStyle = aIter.First();
+pStyle = pStyleSheetPool->First();
 //!!! TODO: This condition isn't right any longer, because we always 
show some default entries
 //!!! so the list doesn't show the count
 if ( nCount != pBox->GetEntryCount() )
@@ -2727,7 +2727,7 @@ void SvxStyleToolBoxControl::FillStyleBox()
 while ( pStyle && !bDoFill )
 {
 bDoFill = ( pBox->GetEntry(i) != pStyle->GetName() );
-pStyle = aIter.Next();
+pStyle = pStyleSheetPool->Next();
 i++;
 }
 }
@@ -2738,7 +2738,7 @@ void SvxStyleToolBoxControl::FillStyleBox()
 pBox->Clear();
 
 {
-pStyle = aIter.First();
+pStyle = pStyleSheetPool->Next();
 
 if( pImpl->bSpecModeWriter || pImpl->bSpecModeCalc )
 {
@@ -2758,7 +2758,7 @@ void SvxStyleToolBoxControl::FillStyleBox()
 
 if( bInsert )
 pBox->InsertEntry( aName );
-pStyle = aIter.Next();
+pStyle = pStyleSheetPool->Next();
 }
 }
 else
@@ -2766,7 +2766,7 @@ void SvxStyleToolBoxControl::FillStyleBox()
 while ( pStyle )
 {
 pBox->InsertEntry( pStyle->GetName() );
-pStyle = aIter.Next();
+pStyle = pStyleSheetPool->Next();
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Bringing attributes draw:fontwork-xyz to ODF?

2018-07-17 Thread Regina Henschel

Hi all,

I had some mail exchange with Armin. He supports the idea to keep this 
feature. He has given me a code pointer for the calculation of the text 
rendering. That part of the specification draft is nearly finished.


But now I am working on the character shadow in the fontwork and there 
are problems. The current way, in which LibreOffice (inherited from 
OpenOffice.org) writes it to file is so buggy, that it is not possible 
to use this as template for a specification.


I see these errors:

1)
The shadow has the types XFormTextShadow = {NONE, Normal, Slant} in 
core/include/svx/xenum.hxx#26

But in file format
“NONE” becomes draw:fontwork-shadow="normal"
“Normal” becomes draw:fontwork-shadow="slant"
“Slant” becomes draw:fontwork-shadow="none"
The reason is a wrong mapping in pXML_Fontwork_Shadow_Enum[] in 
core/xmloff/source/draw/sdpropls.cxx#699
Unfortunately this error exists at least since OOo1.1.5, so all 
documents since about 15 years have this wrong.


2)
In case of type “Slant” the angle and the scaling factor is writing into 
the draw:fontwork-shadow-offset attributes. For example a shear angle of 
30° becomes draw:fontwork-shadow-offset-x="0.3cm" and a scaling factor 
of 150% becomes draw:fontwork-shadow-offset-y="0.15cm".



The ODF 1.2 specification has currently three types of shadows:

“fo:text-shadow” with a value of data type string, with a reference to 
XSL §7.16.5, which refers to a non existing section in the CSS 
specification. It is used for shadow, that is set in character styles.


“style:shadow” with a value of data type string, with same references. 
It is used for shadow, that is in the border-dialog. It is explicitly 
mentioned, that it is not usable for text.


“draw:shadow” and the connected attributes draw:shadow-color, 
draw:shadow-offset-x, draw:shadow-offset-y and draw:shadow-opacity. That 
is used in the area dialog of shapes and produces a shadow of the entire 
shape.


Taking the new draft CSS3, the string can contain a shadow offset in x 
and y direction, a shadow color and a blur radius. An angle and a 
scaling factor, needed for type “Slant”, are not included.


I see these solutions
A)
Add for each needed, but now not available property a new draw:shadow-* 
attribute. Evaluate the draw:shadow for characters in fontwork in case 
of type “normal” and “slant” or for the entire shape in case of fontwork 
type “NONE”.


B)
Make for fontwork own attributes draw:fontwork-shadow-*, (or better 
draw:textonpath-shadow-*, see below).


C)
Make an own definition of the meaning of the string so that it contains 
shear angle and scaling factors. Use fo:text-shadow then.


D)
Keep the string as close as possible to CSS3 and add an attribute 
style:character-shadow-transform or draw:character-shadow-transform, 
which can take descriptions for linear transformations. Use 
fo:text-shadow and new character-shadow-transform attribute for the 
characters in the fontwork.


Remark: I’m going to use draw:textonpath-* instead of draw:fontwork-*, 
because that avoids conflicts with the existing draw:fontwork-* 
attributes and the term “text-on-path” is common. Mapping to our 
implementation would happen in xmloff.


It would be nice to get some comments from you, before I bring it to the 
ODF TC.


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


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

2018-07-17 Thread Libreoffice Gerrit user
 wizards/source/access2base/Application.xba   |2 +-
 wizards/source/access2base/Collect.xba   |2 +-
 wizards/source/access2base/CommandBar.xba|2 +-
 wizards/source/access2base/CommandBarControl.xba |2 +-
 wizards/source/access2base/Compatible.xba|2 +-
 wizards/source/access2base/Control.xba   |2 +-
 wizards/source/access2base/DataDef.xba   |2 +-
 wizards/source/access2base/Database.xba  |2 +-
 wizards/source/access2base/Dialog.xba|2 +-
 wizards/source/access2base/DoCmd.xba |2 +-
 wizards/source/access2base/Event.xba |2 +-
 wizards/source/access2base/Field.xba |2 +-
 wizards/source/access2base/Form.xba  |2 +-
 wizards/source/access2base/L10N.xba  |2 +-
 wizards/source/access2base/Methods.xba   |2 +-
 wizards/source/access2base/Module.xba|2 +-
 wizards/source/access2base/OptionGroup.xba   |2 +-
 wizards/source/access2base/PropertiesGet.xba |2 +-
 wizards/source/access2base/PropertiesSet.xba |2 +-
 wizards/source/access2base/Property.xba  |2 +-
 wizards/source/access2base/Recordset.xba |2 +-
 wizards/source/access2base/Root_.xba |2 +-
 wizards/source/access2base/SubForm.xba   |2 +-
 wizards/source/access2base/TempVar.xba   |2 +-
 wizards/source/access2base/Trace.xba |2 +-
 wizards/source/access2base/UtilProperty.xba  |2 +-
 wizards/source/access2base/Utils.xba |2 +-
 wizards/source/access2base/_License.xba  |3 ++-
 wizards/source/access2base/acConstants.xba   |2 +-
 29 files changed, 30 insertions(+), 29 deletions(-)

New commits:
commit a61b903e33e6f2f1b881b83e4608b70677955999
Author: Jean-Pierre Ledure 
AuthorDate: Tue Jul 17 15:05:30 2018 +0200
Commit: Jean-Pierre Ledure 
CommitDate: Tue Jul 17 15:09:14 2018 +0200

Access2Base - FIX Empty line on top of each module

Closing ">" had disappeared in xml headers ??
Force newline after xml headers

diff --git a/wizards/source/access2base/Application.xba 
b/wizards/source/access2base/Application.xba
index 7877b7b45c90..82c9defca7fc 100644
--- a/wizards/source/access2base/Application.xba
+++ b/wizards/source/access2base/Application.xba
@@ -1640,4 +1640,4 @@ Public Sub _RootInit(Optional ByVal pbForce As Boolean)

 End Sub'  _RootInit   V1.1.0
 
-
+
\ No newline at end of file
diff --git a/wizards/source/access2base/Collect.xba 
b/wizards/source/access2base/Collect.xba
index 3b87239fc66a..e63307511168 100644
--- a/wizards/source/access2base/Collect.xba
+++ b/wizards/source/access2base/Collect.xba
@@ -1,6 +1,6 @@
 
 
-http://openoffice.org/2000/script"; 
script:name="Collect" script:language="StarBasic"
+http://openoffice.org/2000/script"; 
script:name="Collect" script:language="StarBasic">
 REM 
===
 REM ===The Access2Base library is a 
part of the LibreOffice project.
   ===
 REM ===Full documentation is available 
on http://www.access2base.com   
===
diff --git a/wizards/source/access2base/CommandBar.xba 
b/wizards/source/access2base/CommandBar.xba
index d50ec4dd5776..1d287bed098b 100644
--- a/wizards/source/access2base/CommandBar.xba
+++ b/wizards/source/access2base/CommandBar.xba
@@ -1,6 +1,6 @@
 
 
-http://openoffice.org/2000/script"; 
script:name="CommandBar" script:language="StarBasic"
+http://openoffice.org/2000/script"; 
script:name="CommandBar" script:language="StarBasic">
 REM 
===
 REM ===The Access2Base library is a 
part of the LibreOffice project.
   ===
 REM ===Full documentation is available 
on http://www.access2base.com   
===
diff --git a/wizards/source/access2base/CommandBarControl.xba 
b/wizards/source/access2base/CommandBarControl.xba
index defb702e0b00..b7ea84a03e8c 100644
--- a/wizards/source/access2base/CommandBarControl.xba
+++ b/wizards/source/access2base/CommandBarControl.xba
@@ -1,6 +1,6 @@
 
 
-http://openoffice.org/2000/script"; 
script:name="CommandBarControl" script:language="StarBasic"
+http://openoffice.org/2000/script"; 
script:name="CommandBarControl" script:language="StarBasic">
 REM 
===

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

2018-07-17 Thread Libreoffice Gerrit user
 sc/source/ui/inc/dataproviderdlg.hxx  |3 
 sc/source/ui/miscdlgs/dataproviderdlg.cxx |  210 +++---
 sc/uiconfig/scalc/ui/aggregatefunctionentry.ui|   11 +
 sc/uiconfig/scalc/ui/deletecolumnentry.ui |   11 +
 sc/uiconfig/scalc/ui/mergecolumnentry.ui  |   11 +
 sc/uiconfig/scalc/ui/numbertransformationentry.ui |   11 +
 sc/uiconfig/scalc/ui/sorttransformationentry.ui   |   11 +
 sc/uiconfig/scalc/ui/splitcolumnentry.ui  |   11 +
 sc/uiconfig/scalc/ui/texttransformationentry.ui   |   11 +
 9 files changed, 223 insertions(+), 67 deletions(-)

New commits:
commit 1d5ad86725f75763ede6a14dedc242a9a1feb21c
Author: Manuj Vashist 
AuthorDate: Tue Jul 17 06:41:33 2018 +0530
Commit: Markus Mohrhard 
CommitDate: Tue Jul 17 14:57:48 2018 +0200

Added option to remove applied transformation.

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

diff --git a/sc/source/ui/inc/dataproviderdlg.hxx 
b/sc/source/ui/inc/dataproviderdlg.hxx
index 14e5bb0953e0..059737cb8fc7 100644
--- a/sc/source/ui/inc/dataproviderdlg.hxx
+++ b/sc/source/ui/inc/dataproviderdlg.hxx
@@ -37,7 +37,7 @@ private:
 VclPtr mpBar;
 VclPtr mpDataProviderCtrl;
 VclPtr mpDBRanges;
-
+sal_uInt32 mpIndex;
 ScDBData* pDBData;
 
 void InitMenu();
@@ -65,6 +65,7 @@ public:
 void sortTransformation();
 void aggregateFunction();
 void numberTransformation();
+void deletefromList(sal_uInt32 nIndex);
 
 void import(ScDocument* pDoc, bool bInternal = false);
 };
diff --git a/sc/source/ui/miscdlgs/dataproviderdlg.cxx 
b/sc/source/ui/miscdlgs/dataproviderdlg.cxx
index c50ed0541a97..58414ef4ffca 100644
--- a/sc/source/ui/miscdlgs/dataproviderdlg.cxx
+++ b/sc/source/ui/miscdlgs/dataproviderdlg.cxx
@@ -29,7 +29,6 @@ class ScDataProviderBaseControl : public VclContainer,
 VclPtr maEditID;
 VclPtr mpApplyBtn;
 
-bool mbDirty;
 OUString maOldProvider;
 OUString maURL;
 OUString maID;
@@ -59,7 +58,6 @@ public:
 ScDataProviderBaseControl::ScDataProviderBaseControl(vcl::Window* pParent,
 const Link& rImportCallback):
 VclContainer(pParent, WB_CLIPCHILDREN | WB_BORDER),
-mbDirty(false),
 maImportCallback(rImportCallback)
 {
 m_pUIBuilder.reset(new VclBuilder(this, getUIRootDir(), 
"modules/scalc/ui/dataproviderentry.ui"));
@@ -123,22 +121,8 @@ void ScDataProviderBaseControl::isValid()
 {
 bool bValid = !maProviderList->GetSelectedEntry().isEmpty();
 bValid &= !maEditURL->GetText().isEmpty();
-
-if (bValid)
-{
-Color aColor = GetSettings().GetStyleSettings().GetDialogColor();
-SetBackground(aColor);
-maGrid->SetBackground(aColor);
-Invalidate();
-updateApplyBtn(true);
-}
-else
-{
-SetBackground(Wallpaper(COL_RED));
-maGrid->SetBackground(Wallpaper(COL_RED));
-Invalidate();
-updateApplyBtn(false);
-}
+Invalidate();
+updateApplyBtn(bValid);
 }
 
 sc::ExternalDataSource ScDataProviderBaseControl::getDataSource(ScDocument* 
pDoc)
@@ -157,49 +141,37 @@ void ScDataProviderBaseControl::updateApplyBtn(bool 
bValidConfig)
 if (!bValidConfig)
 {
 mpApplyBtn->Disable();
-mpApplyBtn->SetBackground(Wallpaper(COL_RED));
 mpApplyBtn->SetQuickHelpText("");
 return;
 }
-
-if (mbDirty)
+else
 {
 mpApplyBtn->Enable();
 mpApplyBtn->SetBackground(Wallpaper(COL_YELLOW));
 mpApplyBtn->SetQuickHelpText("Apply Changes");
 }
-else
-{
-mpApplyBtn->Disable();
-mpApplyBtn->SetBackground(Wallpaper(COL_GREEN));
-mpApplyBtn->SetQuickHelpText("Current Config Applied");
-}
 }
 
 IMPL_LINK_NOARG(ScDataProviderBaseControl, ProviderSelectHdl, ListBox&, void)
 {
 isValid();
-mbDirty |= maOldProvider != maProviderList->GetSelectedEntry();
 maOldProvider = maProviderList->GetSelectedEntry();
 }
 
 IMPL_LINK_NOARG(ScDataProviderBaseControl, IDEditHdl, Edit&, void)
 {
 isValid();
-mbDirty |= maEditID->GetText() != maID;
 maID = maEditID->GetText();
 }
 
 IMPL_LINK_NOARG(ScDataProviderBaseControl, URLEditHdl, Edit&, void)
 {
 isValid();
-mbDirty |= maEditURL->GetText() != maURL;
 maURL = maEditURL->GetText();
 }
 
 IMPL_LINK_NOARG(ScDataProviderBaseControl, ApplyBtnHdl, Button*, void)
 {
-mbDirty = false;
 updateApplyBtn(true);
 maImportCallback.Call(this);
 }
@@ -279,20 +251,28 @@ class ScDeleteColumnTransformationControl : public 
ScDataTransformationBaseContr
 {
 private:
 VclPtr maColumnNums;
+VclPtr maDelete;
+sal_uInt32 maIndex;
+std::function maDeleteTransformation;
 
 public:
-ScDeleteColumnTransformationControl(vcl::Window* pParent);
+ScDeleteColumnTransformationControl(vcl::Window* pParent, sal_uInt32 
aIndex, std::function aD

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

2018-07-17 Thread Libreoffice Gerrit user
 svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx |   35 --
 svx/source/svdraw/svditer.cxx |8 +++
 2 files changed, 29 insertions(+), 14 deletions(-)

New commits:
commit ee71c3def71508d1fc3e110659c7ed7aa0ba2238
Author: Armin Le Grand 
AuthorDate: Tue Jul 17 10:20:04 2018 +0200
Commit: Armin Le Grand 
CommitDate: Tue Jul 17 14:14:51 2018 +0200

tdf#118498 Correct CustomShape 3D Visualization

Change-Id: Ic312190616044f37fd92464ad605c6e0cdd5cc4d
Reviewed-on: https://gerrit.libreoffice.org/57547
Tested-by: Jenkins
Reviewed-by: Armin Le Grand 

diff --git a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx 
b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
index 8cabe8d261bf..10089a8b0dd0 100644
--- a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
@@ -125,22 +125,29 @@ namespace sdr
 // Hack for calc, transform position of object according
 // to current zoom so as objects relative position to grid
 // appears stable
+// : Need to check what *exactly* this is doing - in it's 
current
+// form it's indeed pretty much a 'hack' as mentioned above 
and massively
+// in the way for future changes...
 const_cast< SdrObject* >( pSdrObjRepresentation 
)->SetGridOffset( aGridOff );
-SdrObjListIter aIterator(*pSdrObjRepresentation);
 
-while(aIterator.IsMore())
-{
-SdrObject& rCandidate = *aIterator.Next();
-// apply offset to each part
-rCandidate.SetGridOffset( aGridOff );
-if(!b3DShape && dynamic_cast< E3dObject* >(&rCandidate))
-{
-b3DShape = true;
-}
-
-const drawinglayer::primitive2d::Primitive2DContainer 
xNew(rCandidate.GetViewContact().getViewIndependentPrimitive2DContainer());
-xGroup.insert(xGroup.end(), xNew.begin(), xNew.end());
-}
+// tdf#118498 The processing of SdrObjListIter for 
SdrIterMode::DeepNoGroups
+// did change for 3D-Objects, it now correctly enters and 
iterates the
+// SdrObjects in the E3dScene (same as for SdrObjGroup). This 
is more correct
+// as the old version which just checked for 
dynamic_cast
+// and *only* entered these, ignoring E3dScene as 
grouping-object.
+// But how to fix that? Taking back the SdrObjListIter change 
would be easy, but
+// not correct. After checking ViewContactOfE3dScene and 
ViewContactOfGroup
+// I see that both traverse their children by themselves (on 
VC-Level,
+// see createViewIndependentPrimitive2DSequence 
implementations and usage of
+// GetObjectCount()). Thus in principle iterating here (esp. 
'deep') seems to
+// be wrong anyways, it might have even created wrong and 
double geometries
+// (only with complex CustomShapes with multiple 
representation SdrObects and
+// only visible when transparency involved, but 
runtime-expensive).
+// Thus: Just do not iterate, will check behaviour deeply.
+b3DShape = (nullptr != dynamic_cast< const E3dObject* 
>(pSdrObjRepresentation));
+const drawinglayer::primitive2d::Primitive2DContainer xNew(
+
pSdrObjRepresentation->GetViewContact().getViewIndependentPrimitive2DContainer());
+xGroup.insert(xGroup.end(), xNew.begin(), xNew.end());
 }
 
 if(bHasText || !xGroup.empty())
diff --git a/svx/source/svdraw/svditer.cxx b/svx/source/svdraw/svditer.cxx
index 2e8b8a8e1035..45134a7fb86e 100644
--- a/svx/source/svdraw/svditer.cxx
+++ b/svx/source/svdraw/svditer.cxx
@@ -123,6 +123,14 @@ void SdrObjListIter::ImpProcessMarkList(const SdrMarkList& 
rMarkList, SdrIterMod
 
 void SdrObjListIter::ImpProcessObj(const SdrObject& rSdrObject, SdrIterMode 
eMode)
 {
+// : Note: The behaviour has changed here, it will now deep-iterate
+// for SdrObjGroup and E3dScene. Old version only deep-dived for 
SdrObjGroup,
+// E3dScene was just added flat. This is now more correct, but potentially
+// there will exist code in the 3D area that *self-iterates* with local
+// functions/methods due to this iterator was not doing the expected thing.
+// These will be difficult to find, but in most cases should do no harm,
+// but cost runtime. Will need to have an eye on this aspect on continued
+// changes...
 const SdrObjList* pChildren(rSdrObject.getChildrenOfSdrObject());
 const bool bIsGroup(nullptr != pChildren);
 

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

2018-07-17 Thread Libreoffice Gerrit user
 compilerplugins/clang/useuniqueptr.cxx |3 +++
 sc/source/ui/inc/tabview.hxx   |   12 ++--
 sc/source/ui/view/tabview.cxx  |4 ++--
 sc/source/ui/view/tabview5.cxx |   24 
 4 files changed, 23 insertions(+), 20 deletions(-)

New commits:
commit 4c2d0b0d85eabc5228b3777d3519482c52a0f96b
Author: Noel Grandin 
AuthorDate: Mon Jul 16 16:41:48 2018 +0200
Commit: Noel Grandin 
CommitDate: Tue Jul 17 14:03:19 2018 +0200

loplugin:useuniqueptr in ScTabView

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

diff --git a/compilerplugins/clang/useuniqueptr.cxx 
b/compilerplugins/clang/useuniqueptr.cxx
index a9f60c47039f..df087bfeec11 100644
--- a/compilerplugins/clang/useuniqueptr.cxx
+++ b/compilerplugins/clang/useuniqueptr.cxx
@@ -82,6 +82,9 @@ public:
 // ODatabaseExport::m_aDestColumns
 if (fn == SRCDIR "/dbaccess/source/ui/misc/DExport.cxx")
 return;
+// ScTabView::pDrawActual and pDrawOld
+if (fn == SRCDIR "/sc/source/ui/view/tabview5.cxx")
+return;
 
 TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
 }
diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx
index 4c321ec1653f..7dfcaea6de79 100644
--- a/sc/source/ui/inc/tabview.hxx
+++ b/sc/source/ui/inc/tabview.hxx
@@ -137,13 +137,13 @@ private:
 VclPtr pFrameWin;  // First !!!
 ScViewData  aViewData;  // must be at the front !
 
-ScViewSelectionEngine*  pSelEngine;
+std::unique_ptr pSelEngine;
 ScViewFunctionSet   aFunctionSet;
 
-ScHeaderSelectionEngine* pHdrSelEng;
+std::unique_ptr pHdrSelEng;
 ScHeaderFunctionSet  aHdrFunc;
 
-ScDrawView* pDrawView;
+std::unique_ptr pDrawView;
 
 SizeaFrameSize; // passed on as for DoResize
 Point   aBorderPos;
@@ -346,13 +346,13 @@ public:
 const ScViewData&   GetViewData() const { return aViewData; }
 
 ScViewFunctionSet&  GetFunctionSet(){ return aFunctionSet; }
-ScViewSelectionEngine*  GetSelEngine()  { return pSelEngine; }
+ScViewSelectionEngine*  GetSelEngine()  { return pSelEngine.get(); }
 
 boolSelMouseButtonDown( const MouseEvent& rMEvt );
 
-ScDrawView* GetScDrawView() { return pDrawView; }
+ScDrawView* GetScDrawView() { return pDrawView.get(); }
 // against CLOKs
-SdrView*GetSdrView(){ return pDrawView; }
+SdrView*GetSdrView(){ return pDrawView.get(); }
 
 boolIsMinimized() const { return bMinimized; }
 
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index 5e53f937e102..d6a21853e616 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -1484,10 +1484,10 @@ void ScTabView::UpdateShow()
 
 if (bShowH && bHeader && !pColBar[SC_SPLIT_RIGHT])
 pColBar[SC_SPLIT_RIGHT] = VclPtr::Create( pFrameWin, 
SC_SPLIT_RIGHT,
-&aHdrFunc, 
pHdrSelEng, this );
+&aHdrFunc, 
pHdrSelEng.get(), this );
 if (bShowV && bHeader && !pRowBar[SC_SPLIT_TOP])
 pRowBar[SC_SPLIT_TOP] = VclPtr::Create( pFrameWin, 
SC_SPLIT_TOP,
-  &aHdrFunc, 
pHdrSelEng, this );
+  &aHdrFunc, 
pHdrSelEng.get(), this );
 
 // show Windows
 
diff --git a/sc/source/ui/view/tabview5.cxx b/sc/source/ui/view/tabview5.cxx
index 962fc20e5c9f..c4e7768da626 100644
--- a/sc/source/ui/view/tabview5.cxx
+++ b/sc/source/ui/view/tabview5.cxx
@@ -79,17 +79,17 @@ void ScTabView::Init()
 pGridWin[i] = nullptr;
 pGridWin[SC_SPLIT_BOTTOMLEFT] = VclPtr::Create( pFrameWin, 
&aViewData, SC_SPLIT_BOTTOMLEFT );
 
-pSelEngine = new ScViewSelectionEngine( pGridWin[SC_SPLIT_BOTTOMLEFT], 
this,
-SC_SPLIT_BOTTOMLEFT );
-aFunctionSet.SetSelectionEngine( pSelEngine );
+pSelEngine.reset( new ScViewSelectionEngine( 
pGridWin[SC_SPLIT_BOTTOMLEFT], this,
+SC_SPLIT_BOTTOMLEFT ) );
+aFunctionSet.SetSelectionEngine( pSelEngine.get() );
 
-pHdrSelEng = new ScHeaderSelectionEngine( pFrameWin, &aHdrFunc );
+pHdrSelEng.reset( new ScHeaderSelectionEngine( pFrameWin, &aHdrFunc ) );
 
 pColBar[SC_SPLIT_LEFT] = VclPtr::Create( pFrameWin, 
SC_SPLIT_LEFT,
-   &aHdrFunc, pHdrSelEng, 
this );
+   &aHdrFunc, 
pHdrSelEng.get(), this );
 pColBar[SC_SPLIT_RIGHT] = nullptr;
 pR

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

2018-07-17 Thread Libreoffice Gerrit user
 sc/source/filter/oox/formulabuffer.cxx |   10 ++
 1 file changed, 2 insertions(+), 8 deletions(-)

New commits:
commit d375324a86c5cd4647da5036e846e9c648f97c9c
Author: Noel Grandin 
AuthorDate: Mon Jul 16 16:50:02 2018 +0200
Commit: Noel Grandin 
CommitDate: Tue Jul 17 13:26:41 2018 +0200

loplugin:useuniqueptr in CachedTokenArray

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

diff --git a/sc/source/filter/oox/formulabuffer.cxx 
b/sc/source/filter/oox/formulabuffer.cxx
index 114a998b8832..0561bba62e92 100644
--- a/sc/source/filter/oox/formulabuffer.cxx
+++ b/sc/source/filter/oox/formulabuffer.cxx
@@ -58,12 +58,6 @@ public:
 explicit CachedTokenArray( ScDocument& rDoc ) :
 maCxt(&rDoc, formula::FormulaGrammar::GRAM_OOXML) {}
 
-~CachedTokenArray()
-{
-for (const std::pair& rCacheItem : maCache)
-delete rCacheItem.second;
-}
-
 Item* get( const ScAddress& rPos, const OUString& rFormula )
 {
 // Check if a token array is cached for this column.
@@ -87,7 +81,7 @@ public:
 {
 // Create an entry for this column.
 std::pair r =
-maCache.emplace(rPos.Col(), new Item);
+maCache.emplace(rPos.Col(), o3tl::make_unique());
 if (!r.second)
 // Insertion failed.
 return;
@@ -101,7 +95,7 @@ public:
 }
 
 private:
-typedef std::unordered_map ColCacheType;
+typedef std::unordered_map> ColCacheType;
 ColCacheType maCache;
 sc::TokenStringContext maCxt;
 };
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-17 Thread Libreoffice Gerrit user
 sax/source/fastparser/fastparser.cxx |   17 -
 writerfilter/source/ooxml/factoryimpl.py |6 ++
 2 files changed, 18 insertions(+), 5 deletions(-)

New commits:
commit d6bd9c273483b12f1bb2ae398afdba977e3ec336
Author: Noel Grandin 
AuthorDate: Tue Jul 17 09:49:55 2018 +0200
Commit: Noel Grandin 
CommitDate: Tue Jul 17 13:27:02 2018 +0200

tdf#79878 perf loading docx file, disable SAX threading for writer

since it seems to cost us 20% performance

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

diff --git a/sax/source/fastparser/fastparser.cxx 
b/sax/source/fastparser/fastparser.cxx
index 83b36d122f42..4ae2f4fdaf4a 100644
--- a/sax/source/fastparser/fastparser.cxx
+++ b/sax/source/fastparser/fastparser.cxx
@@ -247,6 +247,7 @@ public:
 void parse();
 void produce( bool bForceFlush = false );
 bool m_bIgnoreMissingNSDecl;
+bool m_bDisableThreadedParser;
 
 private:
 bool consume(EventList&);
@@ -634,6 +635,7 @@ namespace sax_fastparser {
 
 FastSaxParserImpl::FastSaxParserImpl() :
 m_bIgnoreMissingNSDecl(false),
+m_bDisableThreadedParser(false),
 mpTop(nullptr)
 {
 mxDocumentLocator.set( new FastLocatorImpl( this ) );
@@ -781,7 +783,7 @@ void FastSaxParserImpl::parseStream(const InputSource& 
rStructSource)
 rEntity.mxDocumentHandler->startDocument();
 }
 
-if (!getenv("SAX_DISABLE_THREADS"))
+if (!getenv("SAX_DISABLE_THREADS") && !m_bDisableThreadedParser)
 {
 Reference 
xSeekable(rEntity.maStructSource.aInputStream, UNO_QUERY);
 // available() is not __really__ relevant here, but leave it in as a 
heuristic for non-seekable streams
@@ -1325,11 +1327,16 @@ FastSaxParser::initialize(css::uno::Sequence< 
css::uno::Any > const& rArguments)
 if (rArguments.getLength())
 {
 OUString str;
-if ( ( rArguments[0] >>= str ) && "IgnoreMissingNSDecl" == str )
-mpImpl->m_bIgnoreMissingNSDecl = true;
-else if ( str == "DoSmeplease" )
+if ( rArguments[0] >>= str )
 {
-//just ignore as this is already immune to billion laughs
+if ( str == "IgnoreMissingNSDecl" )
+mpImpl->m_bIgnoreMissingNSDecl = true;
+else if ( str == "DoSmeplease" )
+; //just ignore as this is already immune to billion laughs
+else if ( str == "DisableThreadedParser" )
+mpImpl->m_bDisableThreadedParser = true;
+else
+throw IllegalArgumentException();
 }
 else
 throw IllegalArgumentException();
diff --git a/writerfilter/source/ooxml/factoryimpl.py 
b/writerfilter/source/ooxml/factoryimpl.py
index acbaf4234261..2d54ee8ff6b8 100644
--- a/writerfilter/source/ooxml/factoryimpl.py
+++ b/writerfilter/source/ooxml/factoryimpl.py
@@ -152,6 +152,11 @@ def getFastParser():
 if (!mxFastParser.is())
 {
 mxFastParser = css::xml::sax::FastParser::create(mxContext);
+// the threaded parser is about 20% slower loading writer documents
+css::uno::Reference< css::lang::XInitialization > xInit( mxFastParser, 
css::uno::UNO_QUERY_THROW );
+css::uno::Sequence< css::uno::Any > args(1);
+args[0] <<= OUString("DisableThreadedParser");
+xInit->initialize(args);
 """)
 for url in sorted(ooxUrlAliases.keys()):
 print("""mxFastParser->registerNamespace("%s", 
oox::NMSP_%s);""" % (url, ooxUrlAliases[url]))
@@ -167,6 +172,7 @@ def getFastParser():
 def createImpl(model):
 print("""
 #include 
+#include 
 #include "ooxml/OOXMLFactory.hxx"
 #include "ooxml/OOXMLFastHelper.hxx"
 #include "ooxml/OOXMLStreamImpl.hxx"
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-17 Thread Libreoffice Gerrit user
 include/sfx2/linkmgr.hxx|7 ---
 sfx2/source/appl/linkmgr2.cxx   |   11 +++
 svx/source/svdraw/svdograf.cxx  |2 +-
 sw/source/core/docnode/swbaslnk.cxx |9 -
 4 files changed, 20 insertions(+), 9 deletions(-)

New commits:
commit 77519d83eb796f75d73e872356e4100017673653
Author: Caolán McNamara 
AuthorDate: Tue Jul 17 09:08:51 2018 +0100
Commit: Caolán McNamara 
CommitDate: Tue Jul 17 12:34:40 2018 +0200

bubble referer to LinkManager::GetGraphicFromAny

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

diff --git a/include/sfx2/linkmgr.hxx b/include/sfx2/linkmgr.hxx
index b1057aef5f1a..128dd47e4462 100644
--- a/include/sfx2/linkmgr.hxx
+++ b/include/sfx2/linkmgr.hxx
@@ -156,9 +156,10 @@ public:
 
 // if the mimetype says graphic/bitmap/gdimetafile then get the
 // graphic from the Any. Return says no errors
-static bool GetGraphicFromAny( const OUString& rMimeType,
-const css::uno::Any & rValue,
-Graphic& rGrf );
+static bool GetGraphicFromAny(const OUString& rMimeType,
+  const css::uno::Any & rValue,
+  const OUString& rReferer,
+  Graphic& rGrf);
 
 private:
 LinkManager( const LinkManager& ) = delete;
diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx
index 64e89a927f12..b503e06f0cf6 100644
--- a/sfx2/source/appl/linkmgr2.cxx
+++ b/sfx2/source/appl/linkmgr2.cxx
@@ -40,6 +40,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include "fileobj.hxx"
@@ -497,9 +498,10 @@ SotClipboardFormatId LinkManager::RegisterStatusInfoId()
 return nFormat;
 }
 
-bool LinkManager::GetGraphicFromAny( const OUString& rMimeType,
-const css::uno::Any & rValue,
-Graphic& rGraphic )
+bool LinkManager::GetGraphicFromAny(const OUString& rMimeType,
+const css::uno::Any & rValue,
+const OUString& rReferer,
+Graphic& rGraphic )
 {
 bool bRet = false;
 
@@ -509,7 +511,8 @@ bool LinkManager::GetGraphicFromAny( const OUString& 
rMimeType,
 if (rValue.has())
 {
 OUString sURL = rValue.get();
-rGraphic = vcl::graphic::loadFromURL(sURL);
+if (!SvtSecurityOptions().isUntrustedReferer(rReferer))
+rGraphic = vcl::graphic::loadFromURL(sURL);
 if (!rGraphic)
 rGraphic.SetDefaultType();
 rGraphic.setOriginURL(sURL);
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index f4a68a78f22c..4a73f2bd8bb3 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -226,7 +226,7 @@ void SdrGraphicLink::RemoveGraphicUpdater()
 sfx2::LinkManager::GetDisplayNames( this, nullptr, 
&rGrafObj.aFileName, nullptr, &rGrafObj.aFilterName );
 
 Graphic aGraphic;
-if( sfx2::LinkManager::GetGraphicFromAny( rMimeType, rValue, aGraphic 
))
+if (sfx2::LinkManager::GetGraphicFromAny(rMimeType, rValue, 
getReferer(), aGraphic))
 {
 rGrafObj.ImpSetLinkedGraphic(aGraphic);
 }
diff --git a/sw/source/core/docnode/swbaslnk.cxx 
b/sw/source/core/docnode/swbaslnk.cxx
index 1c5af6aabbe1..5d38d9371efb 100644
--- a/sw/source/core/docnode/swbaslnk.cxx
+++ b/sw/source/core/docnode/swbaslnk.cxx
@@ -141,7 +141,14 @@ static void lcl_CallModify( SwGrfNode& rGrfNd, 
SfxPoolItem& rItem )
 
 Graphic aGrf;
 
-if( sfx2::LinkManager::GetGraphicFromAny( rMimeType, rValue, aGrf ) &&
+OUString sReferer;
+SfxObjectShell * sh = pDoc->GetPersist();
+if (sh != nullptr && sh->HasName())
+{
+sReferer = sh->GetMedium()->GetName();
+}
+
+if( sfx2::LinkManager::GetGraphicFromAny(rMimeType, rValue, sReferer, 
aGrf) &&
 ( GraphicType::Default != aGrf.GetType() ||
   GraphicType::Default != rGrfObj.GetType() ) )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-17 Thread Libreoffice Gerrit user
 sc/inc/document.hxx|   10 ++
 sc/source/core/data/documen2.cxx   |2 +-
 sc/source/core/data/document.cxx   |   16 
 sc/source/core/data/document10.cxx |2 +-
 4 files changed, 16 insertions(+), 14 deletions(-)

New commits:
commit 8898bae2affc470db4b70baa3050edfad163e2e5
Author: Caolán McNamara 
AuthorDate: Mon Jul 16 12:13:01 2018 +0100
Commit: Caolán McNamara 
CommitDate: Tue Jul 17 12:34:12 2018 +0200

coverity#1401328 Uncaught exception

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

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index f2ee35bc693a..4fcee74748ca 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -35,10 +35,11 @@
 #include "typedstrdata.hxx"
 #include "calcmacros.hxx"
 #include "calcconfig.hxx"
+#include 
 #include 
-#include 
-#include 
 #include 
+#include 
+#include 
 
 #include 
 #include 
@@ -49,7 +50,6 @@
 #include "markdata.hxx"
 
 namespace com { namespace sun { namespace star { namespace chart2 { class 
XChartDocument; } } } }
-namespace o3tl { template  struct default_delete; }
 
 class Timer;
 
@@ -297,6 +297,8 @@ enum ScMutationGuardFlags
 CORE = 0x0001, /// Core calc data structures should not be mutated
 };
 
+typedef std::unique_ptr> 
ScTableUniquePtr;
+
 class ScDocument
 {
 friend class ScValueIterator;
@@ -326,7 +328,7 @@ friend class sc::TableColumnBlockPositionSet;
 friend struct ScMutationGuard;
 friend struct ScMutationDisable;
 
-typedef std::vector> TableContainer;
+typedef std::vector TableContainer;
 
 public:
 enum class HardRecalcState
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index b39d0866be24..f3f63f2811f3 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -783,7 +783,7 @@ bool ScDocument::MoveTab( SCTAB nOldPos, SCTAB nNewPos, 
ScProgress* pProgress )
 pUnoBroadcaster->Broadcast( ScUpdateRefHint( URM_REORDER,
 aSourceRange, 0,0,nDz ) );
 
-std::unique_ptr pSaveTab = std::move(maTabs[nOldPos]);
+ScTableUniquePtr pSaveTab = std::move(maTabs[nOldPos]);
 maTabs.erase(maTabs.begin()+nOldPos);
 maTabs.insert(maTabs.begin()+nNewPos, std::move(pSaveTab));
 TableContainer::iterator it = maTabs.begin();
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index fd69d4b25e1f..44699a55a7b3 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -123,7 +123,7 @@ using ::std::set;
 
 namespace {
 
-std::pair getMarkedTableRange(const 
std::vector>& rTables, const ScMarkData& rMark)
+std::pair getMarkedTableRange(const 
std::vector& rTables, const ScMarkData& rMark)
 {
 SCTAB nTabStart = MAXTAB;
 SCTAB nTabEnd = 0;
@@ -724,7 +724,7 @@ bool ScDocument::DeleteTab( SCTAB nTab )
 if ( pUnoBroadcaster )
 pUnoBroadcaster->Broadcast( ScUpdateRefHint( URM_INSDEL, 
aRange, 0,0,-1 ) );
 
-for (std::unique_ptr & pTab : maTabs)
+for (auto & pTab : maTabs)
 if (pTab)
 pTab->UpdateDeleteTab(aCxt);
 
@@ -819,7 +819,7 @@ bool ScDocument::DeleteTabs( SCTAB nTab, SCTAB nSheets )
 if ( pUnoBroadcaster )
 pUnoBroadcaster->Broadcast( ScUpdateRefHint( URM_INSDEL, 
aRange, 0,0,-1*nSheets ) );
 
-for (std::unique_ptr & pTab : maTabs)
+for (auto & pTab : maTabs)
 if (pTab)
 pTab->UpdateDeleteTab(aCxt);
 
@@ -1212,7 +1212,7 @@ namespace {
 
 struct SetDirtyIfPostponedHandler
 {
-void operator() (std::unique_ptr & p)
+void operator() (ScTableUniquePtr & p)
 {
 if (p)
 p->SetDirtyIfPostponed();
@@ -1221,7 +1221,7 @@ struct SetDirtyIfPostponedHandler
 
 struct BroadcastRecalcOnRefMoveHandler
 {
-void operator() (std::unique_ptr & p)
+void operator() (ScTableUniquePtr & p)
 {
 if (p)
 p->BroadcastRecalcOnRefMove();
@@ -1958,7 +1958,7 @@ void ScDocument::InitUndoSelected( const ScDocument* 
pSrcDoc, const ScMarkData&
 for (SCTAB nTab = 0; nTab <= rTabSelection.GetLastSelected(); nTab++)
 if ( rTabSelection.GetTableSelect( nTab ) )
 {
-std::unique_ptr pTable(new ScTable(this, nTab, 
OUString(), bColInfo, bRowInfo));
+ScTableUniquePtr pTable(new ScTable(this, nTab, OUString(), 
bColInfo, bRowInfo));
 if (nTab < static_cast(maTabs.size()))
 maTabs[nTab] = std::move(pTable);
 else
@@ -3976,7 +3976,7 @@ void ScDocument::CompileXML()
 pRangeName->CompileUnresolvedXML(aCxt);
 
 std::for_each(maTabs.begin(), 

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

2018-07-17 Thread Libreoffice Gerrit user
 sc/source/filter/xml/xmlfilti.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 18d9fb3c4ce3829c73a8f1007887c3176d43b06f
Author: Caolán McNamara 
AuthorDate: Tue Jul 17 08:30:59 2018 +0100
Commit: Caolán McNamara 
CommitDate: Tue Jul 17 12:33:45 2018 +0200

ofz#9454 Integer-overflow

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

diff --git a/sc/source/filter/xml/xmlfilti.cxx 
b/sc/source/filter/xml/xmlfilti.cxx
index b51929eec871..45027f625ae4 100644
--- a/sc/source/filter/xml/xmlfilti.cxx
+++ b/sc/source/filter/xml/xmlfilti.cxx
@@ -26,6 +26,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -429,7 +430,7 @@ void SAL_CALL ScXMLConditionContext::endFastElement( 
sal_Int32 /*nElement*/ )
 
 GetOperator(sOperator, mrQueryParam, rEntry);
 SCCOLROW nStartPos = mrQueryParam.bByRow ? mrQueryParam.nCol1 : 
mrQueryParam.nRow1;
-rEntry.nField = nField + nStartPos;
+rEntry.nField = o3tl::saturating_add(nField, nStartPos);
 
 if (maQueryItems.empty())
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-17 Thread Libreoffice Gerrit user
 sc/source/core/tool/consoli.cxx |3 ---
 1 file changed, 3 deletions(-)

New commits:
commit 972ff044edc502a0e382d9f5bb3a9d0bd0a95616
Author: Takeshi Abe 
AuthorDate: Tue Jul 17 15:24:47 2018 +0900
Commit: Eike Rathke 
CommitDate: Tue Jul 17 12:31:22 2018 +0200

sc: Drop #undef leftover

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

diff --git a/sc/source/core/tool/consoli.cxx b/sc/source/core/tool/consoli.cxx
index 1c76ed39b342..8db1446e9dc4 100644
--- a/sc/source/core/tool/consoli.cxx
+++ b/sc/source/core/tool/consoli.cxx
@@ -90,9 +90,6 @@ void ScConsData::DeleteData()
 aCornerText.clear();
 }
 
-#undef DELETEARR
-#undef DELETESTR
-
 void ScConsData::InitData()
 {
 if (bReference && nColCount && !ppRefs)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-17 Thread Libreoffice Gerrit user
 sc/source/ui/dbgui/pfiltdlg.cxx |5 ++---
 sc/source/ui/inc/pfiltdlg.hxx   |2 +-
 2 files changed, 3 insertions(+), 4 deletions(-)

New commits:
commit a97411b061a382dc09423d04c633dc9b7d24a737
Author: Noel Grandin 
AuthorDate: Mon Jul 16 16:50:15 2018 +0200
Commit: Noel Grandin 
CommitDate: Tue Jul 17 12:30:51 2018 +0200

loplugin:useuniqueptr in ScPivotFilterDlg

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

diff --git a/sc/source/ui/dbgui/pfiltdlg.cxx b/sc/source/ui/dbgui/pfiltdlg.cxx
index 757cde2abed9..cdd761e8fdc7 100644
--- a/sc/source/ui/dbgui/pfiltdlg.cxx
+++ b/sc/source/ui/dbgui/pfiltdlg.cxx
@@ -85,7 +85,7 @@ void ScPivotFilterDlg::dispose()
 {
 for (auto& a : m_pEntryLists) a.reset();
 
-delete pOutItem;
+pOutItem.reset();
 m_pLbField1.clear();
 m_pLbCond1.clear();
 m_pEdVal1.clear();
@@ -413,8 +413,7 @@ const ScQueryItem& ScPivotFilterDlg::GetOutputItem()
 theParam.bCaseSens  = m_pBtnCase->IsChecked();
 theParam.eSearchType= m_pBtnRegExp->IsChecked() ? 
utl::SearchParam::SearchType::Regexp : utl::SearchParam::SearchType::Normal;
 
-if ( pOutItem ) DELETEZ( pOutItem );
-pOutItem = new ScQueryItem( nWhichQuery, &theParam );
+pOutItem.reset( new ScQueryItem( nWhichQuery, &theParam ) );
 
 return *pOutItem;
 }
diff --git a/sc/source/ui/inc/pfiltdlg.hxx b/sc/source/ui/inc/pfiltdlg.hxx
index a0a33356e5e0..07f2ab565bcc 100644
--- a/sc/source/ui/inc/pfiltdlg.hxx
+++ b/sc/source/ui/inc/pfiltdlg.hxx
@@ -73,7 +73,7 @@ private:
 
 const sal_uInt16nWhichQuery;
 const ScQueryParam  theQueryData;
-ScQueryItem*pOutItem;
+std::unique_ptr pOutItem;
 ScViewData* pViewData;
 ScDocument* pDoc;
 SCTAB   nSrcTab;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-17 Thread Libreoffice Gerrit user
 compilerplugins/clang/useuniqueptr.cxx  |3 +++
 sw/source/filter/html/htmlnumwriter.cxx |   12 
 sw/source/filter/html/wrthtml.cxx   |   10 +++---
 sw/source/filter/html/wrthtml.hxx   |9 +
 4 files changed, 23 insertions(+), 11 deletions(-)

New commits:
commit 011c6c719f77181f042c68ba92e38847e39c8ca1
Author: Noel Grandin 
AuthorDate: Mon Jul 16 14:40:20 2018 +0200
Commit: Noel Grandin 
CommitDate: Tue Jul 17 12:19:14 2018 +0200

loplugin:useuniqueptr in SwHTMLWriter

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

diff --git a/compilerplugins/clang/useuniqueptr.cxx 
b/compilerplugins/clang/useuniqueptr.cxx
index 1cb392f718f8..a9f60c47039f 100644
--- a/compilerplugins/clang/useuniqueptr.cxx
+++ b/compilerplugins/clang/useuniqueptr.cxx
@@ -79,6 +79,9 @@ public:
 // SwLineLayout::m_pNext
 if (fn == SRCDIR "/sw/source/core/text/porlay.cxx")
 return;
+// ODatabaseExport::m_aDestColumns
+if (fn == SRCDIR "/dbaccess/source/ui/misc/DExport.cxx")
+return;
 
 TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
 }
diff --git a/sw/source/filter/html/htmlnumwriter.cxx 
b/sw/source/filter/html/htmlnumwriter.cxx
index dc21f1cbb0f2..bd0d2dadab8b 100644
--- a/sw/source/filter/html/htmlnumwriter.cxx
+++ b/sw/source/filter/html/htmlnumwriter.cxx
@@ -56,7 +56,7 @@ void SwHTMLWriter::FillNextNumInfo()
 const SwNode* pNd = m_pDoc->GetNodes()[nPos];
 if( pNd->IsTextNode() )
 {
-m_pNextNumRuleInfo = new SwHTMLNumRuleInfo( *pNd->GetTextNode() );
+m_pNextNumRuleInfo.reset( new SwHTMLNumRuleInfo( 
*pNd->GetTextNode() ) );
 
 // Before a table we keep the old level if the same numbering is
 // continued after the table and no new numbering is started.
@@ -78,7 +78,7 @@ void SwHTMLWriter::FillNextNumInfo()
 else
 {
 // In all other case the numbering is over.
-m_pNextNumRuleInfo = new SwHTMLNumRuleInfo;
+m_pNextNumRuleInfo.reset(new SwHTMLNumRuleInfo);
 }
 }
 while( !m_pNextNumRuleInfo );
@@ -86,8 +86,12 @@ void SwHTMLWriter::FillNextNumInfo()
 
 void SwHTMLWriter::ClearNextNumInfo()
 {
-delete m_pNextNumRuleInfo;
-m_pNextNumRuleInfo = nullptr;
+m_pNextNumRuleInfo.reset();
+}
+
+void SwHTMLWriter::SetNextNumInfo( std::unique_ptr pNxt )
+{
+m_pNextNumRuleInfo = std::move(pNxt);
 }
 
 Writer& OutHTML_NumBulListStart( SwHTMLWriter& rWrt,
diff --git a/sw/source/filter/html/wrthtml.cxx 
b/sw/source/filter/html/wrthtml.cxx
index c0347613752e..b2f90146fa7c 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -171,6 +171,11 @@ SwHTMLWriter::~SwHTMLWriter()
 {
 }
 
+std::unique_ptr SwHTMLWriter::ReleaseNextNumInfo()
+{
+return std::move(m_pNextNumRuleInfo);
+}
+
 void SwHTMLWriter::SetupFilterOptions(SfxMedium& rMedium)
 {
 const SfxItemSet* pSet = rMedium.GetItemSet();
@@ -1519,8 +1524,7 @@ HTMLSaveData::HTMLSaveData(SwHTMLWriter& rWriter, 
sal_uLong nStt,
 if( bSaveNum )
 {
 pOldNumRuleInfo = new SwHTMLNumRuleInfo( rWrt.GetNumInfo() );
-pOldNextNumRuleInfo = rWrt.GetNextNumInfo();
-rWrt.SetNextNumInfo( nullptr );
+pOldNextNumRuleInfo = rWrt.ReleaseNextNumInfo();
 }
 else
 {
@@ -1555,7 +1559,7 @@ HTMLSaveData::~HTMLSaveData()
 {
 rWrt.GetNumInfo().Set( *pOldNumRuleInfo );
 delete pOldNumRuleInfo;
-rWrt.SetNextNumInfo( pOldNextNumRuleInfo );
+rWrt.SetNextNumInfo( std::move(pOldNextNumRuleInfo) );
 }
 else
 {
diff --git a/sw/source/filter/html/wrthtml.hxx 
b/sw/source/filter/html/wrthtml.hxx
index 1aff873f8fc8..27ae06bd7bef 100644
--- a/sw/source/filter/html/wrthtml.hxx
+++ b/sw/source/filter/html/wrthtml.hxx
@@ -259,7 +259,7 @@ class SW_DLLPUBLIC SwHTMLWriter : public Writer
 {
 SwHTMLPosFlyFrames *m_pHTMLPosFlyFrames;
 std::unique_ptr m_pNumRuleInfo;// current numbering
-SwHTMLNumRuleInfo *m_pNextNumRuleInfo;
+std::unique_ptr m_pNextNumRuleInfo;
 sal_uInt32 m_nHTMLMode;   // description of export 
configuration
 
 FieldUnit m_eCSS1Unit;
@@ -521,10 +521,11 @@ public:
 
 // Fetch current numbering information of next paragraph. They
 // don't have to exist yet!
-SwHTMLNumRuleInfo *GetNextNumInfo() { return m_pNextNumRuleInfo; }
+SwHTMLNumRuleInfo *GetNextNumInfo() { return m_pNextNumRuleInfo.get(); }
+std::unique_ptr ReleaseNextNumInfo();
 
 // Set the numbering information of next paragraph.
-void SetNextNumInfo( SwHTMLNumRuleInfo *pNxt ) { m_pNextNumRuleInfo=pNxt; }
+void SetNextNumInfo( std::unique_ptr pNxt );
 
 // Fill the numbering information of next paragraph.
 void FillNextNumInfo();
@@ -621,7 +622,7 @@ struct HTM

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

2018-07-17 Thread Libreoffice Gerrit user
 sw/qa/extras/ooxmlexport/data/tdf104354-2.docx|binary
 sw/qa/extras/ooxmlexport/ooxmlexport9.cxx |   41 +++
 writerfilter/source/dmapper/DomainMapper.cxx  |1 
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |   79 +-
 writerfilter/source/dmapper/DomainMapper_Impl.hxx |9 ++
 5 files changed, 126 insertions(+), 4 deletions(-)

New commits:
commit 5c6bce38a01b21403a603acd3148cf3bbb4c685f
Author: László Németh 
AuthorDate: Thu Jul 12 17:15:03 2018 +0200
Commit: László Németh 
CommitDate: Tue Jul 17 11:59:07 2018 +0200

tdf#104354 DOCX import: fix paragraph auto spacing in tables

Top margin of first paragraph of a table cell with auto spacing, and
bottom margin of last paragraph of a table cell with auto spacing are
zero (except in numbered last paragraphs), but LibreOffice set 14pt
instead of them, resulting much longer tables. Following cases needed
special handling:

- auto spacing in style
- direct top and bottom auto spacing
- direct top and bottom margins
- footnotes in cell paragraphs

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

diff --git a/sw/qa/extras/ooxmlexport/data/tdf104354-2.docx 
b/sw/qa/extras/ooxmlexport/data/tdf104354-2.docx
new file mode 100644
index ..9f40bf77976e
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf104354-2.docx 
differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
index f1a260b87057..1d40cfef8268 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
@@ -1170,13 +1170,52 @@ DECLARE_OOXMLEXPORT_TEST(testTdf90789, "tdf90789.docx")
 CPPUNIT_ASSERT_EQUAL(static_cast(1), xPageCursor->getPage());
 }
 
-
 DECLARE_OOXMLEXPORT_TEST(testTdf90789_2, "tdf90789-2.docx")
 {
 // Section break before frame and shape was ignored
 CPPUNIT_ASSERT_EQUAL( 3, getPages() );
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf104354_2, "tdf104354-2.docx")
+{
+uno::Reference xTablesSupplier(mxComponent, 
uno::UNO_QUERY);
+uno::Reference 
xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
+uno::Reference xTable(xTables->getByIndex(0), 
uno::UNO_QUERY);
+uno::Reference xCell(xTable->getCellByName("A1"), 
uno::UNO_QUERY);
+
+// top margin of the first paragraph and bottom margin of the last 
paragraph
+// is zero, when auto spacing is used.
+
+CPPUNIT_ASSERT_EQUAL(static_cast(0), 
getProperty(getParagraphOfText(1, xCell->getText()), 
"ParaTopMargin"));
+CPPUNIT_ASSERT_EQUAL(static_cast(494), 
getProperty(getParagraphOfText(1, xCell->getText()), 
"ParaBottomMargin"));
+CPPUNIT_ASSERT_EQUAL(static_cast(494), 
getProperty(getParagraphOfText(2, xCell->getText()), 
"ParaTopMargin"));
+CPPUNIT_ASSERT_EQUAL(static_cast(494), 
getProperty(getParagraphOfText(2, xCell->getText()), 
"ParaBottomMargin"));
+CPPUNIT_ASSERT_EQUAL(static_cast(494), 
getProperty(getParagraphOfText(3, xCell->getText()), 
"ParaTopMargin"));
+CPPUNIT_ASSERT_EQUAL(static_cast(0), 
getProperty(getParagraphOfText(3, xCell->getText()), 
"ParaBottomMargin"));
+
+// top margin is not auto spacing
+uno::Reference xCell2(xTable->getCellByName("A2"), 
uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(static_cast(847), 
getProperty(getParagraphOfText(1, xCell2->getText()), 
"ParaTopMargin"));
+CPPUNIT_ASSERT_EQUAL(static_cast(0), 
getProperty(getParagraphOfText(1, xCell2->getText()), 
"ParaBottomMargin"));
+
+// bottom margin is not auto spacing
+uno::Reference xCell3(xTable->getCellByName("A3"), 
uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(static_cast(0), 
getProperty(getParagraphOfText(1, xCell3->getText()), 
"ParaTopMargin"));
+CPPUNIT_ASSERT_EQUAL(static_cast(847), 
getProperty(getParagraphOfText(1, xCell3->getText()), 
"ParaBottomMargin"));
+
+// auto spacing, if the paragraph contains footnotes
+uno::Reference xCell4(xTable->getCellByName("A4"), 
uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(static_cast(0), 
getProperty(getParagraphOfText(1, xCell4->getText()), 
"ParaTopMargin"));
+CPPUNIT_ASSERT_EQUAL(static_cast(0), 
getProperty(getParagraphOfText(1, xCell4->getText()), 
"ParaBottomMargin"));
+
+// auto spacing on a paragraph
+uno::Reference xTable2(xTables->getByIndex(1), 
uno::UNO_QUERY);
+uno::Reference xCell5(xTable2->getCellByName("A1"), 
uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(static_cast(0), 
getProperty(getParagraphOfText(1, xCell5->getText()), 
"ParaTopMargin"));
+CPPUNIT_ASSERT_EQUAL(static_cast(0), 
getProperty(getParagraphOfText(1, xCell5->getText()), 
"ParaBottomMargin"));
+}
+
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx 
b/writerfilter/source/dmapper/DomainMapper.cxx
index 

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

2018-07-17 Thread Libreoffice Gerrit user
 sc/source/filter/inc/xcl97esc.hxx   |6 +++---
 sc/source/filter/xcl97/xcl97esc.cxx |   19 +--
 2 files changed, 12 insertions(+), 13 deletions(-)

New commits:
commit 8a304fe8b1282efa2d40bdf337728e64b7532a35
Author: Noel Grandin 
AuthorDate: Mon Jul 16 16:57:25 2018 +0200
Commit: Noel Grandin 
CommitDate: Tue Jul 17 11:53:54 2018 +0200

loplugin:useuniqueptr in XclEscherEx

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

diff --git a/sc/source/filter/inc/xcl97esc.hxx 
b/sc/source/filter/inc/xcl97esc.hxx
index 6d60c3d0acd7..f3b5c9f21d0c 100644
--- a/sc/source/filter/inc/xcl97esc.hxx
+++ b/sc/source/filter/inc/xcl97esc.hxx
@@ -122,10 +122,10 @@ private:
 
 private:
 XclExpObjectManager&mrObjMgr;
-std::stack< std::pair< XclObj*, XclEscherHostAppData* > > aStack;
+std::stack< std::pair< XclObj*, std::unique_ptr > > 
aStack;
 XclObj* pCurrXclObj;
-XclEscherHostAppData*   pCurrAppData;
-XclEscherClientData*pTheClientData; // always the same
+std::unique_ptr pCurrAppData;
+std::unique_ptr  pTheClientData; // always the same
 XclEscherClientTextbox* pAdditionalText;
 sal_uInt16  nAdditionalText;
 sal_uInt32  mnNextKey;
diff --git a/sc/source/filter/xcl97/xcl97esc.cxx 
b/sc/source/filter/xcl97/xcl97esc.cxx
index d81846249a90..329ad5170150 100644
--- a/sc/source/filter/xcl97/xcl97esc.cxx
+++ b/sc/source/filter/xcl97/xcl97esc.cxx
@@ -110,7 +110,7 @@ XclEscherEx::~XclEscherEx()
 {
 OSL_ENSURE( aStack.empty(), "~XclEscherEx: stack not empty" );
 DeleteCurrAppData();
-delete pTheClientData;
+pTheClientData.reset();
 }
 
 sal_uInt32 XclEscherEx::InitNextDffFragment()
@@ -199,8 +199,8 @@ EscherExHostAppData* XclEscherEx::StartShape( const 
Reference< XShape >& rxShape
 UpdateDffFragmentEnd();
 }
 }
-aStack.push( std::make_pair( pCurrXclObj, pCurrAppData ) );
-pCurrAppData = new XclEscherHostAppData;
+aStack.push( std::make_pair( pCurrXclObj, std::move(pCurrAppData) ) );
+pCurrAppData.reset( new XclEscherHostAppData );
 SdrObject* pObj = GetSdrObjectFromXShape( rxShape );
 //added for exporting OCX control
 sal_Int16 nMsCtlType = 0;
@@ -272,7 +272,7 @@ EscherExHostAppData* XclEscherEx::StartShape( const 
Reference< XShape >& rxShape
 }
 else
 {
-pCurrAppData->SetClientData( pTheClientData );
+pCurrAppData->SetClientData( pTheClientData.get() );
 if ( nAdditionalText == 0 )
 {
 if ( pObj )
@@ -340,7 +340,7 @@ EscherExHostAppData* XclEscherEx::StartShape( const 
Reference< XShape >& rxShape
 }
 if ( !pCurrXclObj )
 pCurrAppData->SetDontWriteShape( true );
-return pCurrAppData;
+return pCurrAppData.get();
 }
 
 void XclEscherEx::EndShape( sal_uInt16 nShapeType, sal_uInt32 nShapeID )
@@ -382,8 +382,7 @@ void XclEscherEx::EndShape( sal_uInt16 nShapeType, 
sal_uInt32 nShapeID )
 else
 {
 pCurrXclObj = aStack.top().first;
-pCurrAppData = aStack.top().second;
-aStack.pop();
+pCurrAppData = std::move(aStack.top().second);
 }
 if( nAdditionalText == 3 )
 nAdditionalText = 0;
@@ -394,7 +393,7 @@ EscherExHostAppData* XclEscherEx::EnterAdditionalTextGroup()
 nAdditionalText = 1;
 pAdditionalText = static_cast( 
pCurrAppData->GetClientTextbox() );
 pCurrAppData->SetClientTextbox( nullptr );
-return pCurrAppData;
+return pCurrAppData.get();
 }
 
 void XclEscherEx::EndDocument()
@@ -511,8 +510,8 @@ void XclEscherEx::DeleteCurrAppData()
 delete pCurrAppData->GetClientAnchor();
 //  delete pCurrAppData->GetClientData();
 delete pCurrAppData->GetClientTextbox();
-delete pCurrAppData->GetInteractionInfo();
-delete pCurrAppData;
+delete pCurrAppData->GetInteractionInfo();
+pCurrAppData.reset();
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-17 Thread Libreoffice Gerrit user
 sc/source/filter/excel/xestyle.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit 91eec155eb9433343c7e549907960855b6e91e7b
Author: Markus Mohrhard 
AuthorDate: Mon Jul 16 00:43:02 2018 +0200
Commit: Eike Rathke 
CommitDate: Tue Jul 17 11:48:41 2018 +0200

tdf#113646, export font size for dxf records

Change-Id: I6dd6b0ef858fd933603be4435f7810c739b72ef0
Reviewed-on: https://gerrit.libreoffice.org/57471
Tested-by: Jenkins
Reviewed-by: Markus Mohrhard 
(cherry picked from commit 14c2ca1b4efad2dcdc40e6d5c218cedd487857aa)
Reviewed-on: https://gerrit.libreoffice.org/57529
Reviewed-by: Eike Rathke 

diff --git a/sc/source/filter/excel/xestyle.cxx 
b/sc/source/filter/excel/xestyle.cxx
index dd74300e4774..f8c077ce7860 100644
--- a/sc/source/filter/excel/xestyle.cxx
+++ b/sc/source/filter/excel/xestyle.cxx
@@ -1160,6 +1160,13 @@ void XclExpDxfFont::SaveXml(XclExpXmlStream& rStrm)
 FSEND);
 }
 
+if (maDxfData.nFontHeight)
+{
+rStyleSheet->singleElement(XML_sz,
+XML_val, OString::number(*maDxfData.nFontHeight/20).getStr(),
+FSEND);
+}
+
 if (maDxfData.eUnder)
 {
 const char* pVal = getUnderlineOOXValue(maDxfData.eUnder.get());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-17 Thread Libreoffice Gerrit user
 xmloff/source/style/xmlexppr.cxx |   12 +++-
 1 file changed, 3 insertions(+), 9 deletions(-)

New commits:
commit 1aff15fa737f88129b1854d09c01a600d92c8ce0
Author: Noel Grandin 
AuthorDate: Mon Jul 16 08:41:41 2018 +0200
Commit: Noel Grandin 
CommitDate: Tue Jul 17 11:20:19 2018 +0200

loplugin:useuniqueptr in SvXMLExportPropertyMapper::Impl

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

diff --git a/xmloff/source/style/xmlexppr.cxx b/xmloff/source/style/xmlexppr.cxx
index bfa368bc4e72..dc6f9171a137 100644
--- a/xmloff/source/style/xmlexppr.cxx
+++ b/xmloff/source/style/xmlexppr.cxx
@@ -487,19 +487,13 @@ void FilterPropertiesInfo_Impl::FillPropertyStateArray(
 
 struct SvXMLExportPropertyMapper::Impl
 {
-typedef std::map, 
FilterPropertiesInfo_Impl*> CacheType;
+typedef std::map, 
std::unique_ptr> CacheType;
 CacheType maCache;
 
 rtl::Reference mxNextMapper;
 rtl::Reference mxPropMapper;
 
 OUString maStyleName;
-
-~Impl()
-{
-for (auto const& itemCache : maCache)
-delete itemCache.second;
-}
 };
 
 // ctor/dtor , class SvXMLExportPropertyMapper
@@ -573,7 +567,7 @@ vector SvXMLExportPropertyMapper::Filter_(
 
 Impl::CacheType::iterator aIter = mpImpl->maCache.find(xInfo);
 if (aIter != mpImpl->maCache.end())
-pFilterInfo = (*aIter).second;
+pFilterInfo = (*aIter).second.get();
 
 bool bDelInfo = false;
 if( !pFilterInfo )
@@ -608,7 +602,7 @@ vector SvXMLExportPropertyMapper::Filter_(
 xInfo = xWeakInfo;
 if( xInfo.is() )
 {
-mpImpl->maCache.emplace(xInfo, pFilterInfo);
+mpImpl->maCache.emplace(xInfo, 
std::unique_ptr(pFilterInfo));
 }
 else
 bDelInfo = 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-1' - cui/source

2018-07-17 Thread Libreoffice Gerrit user
 cui/source/tabpages/tpcolor.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 59304815cc70544de4a3227f070895143f0276a4
Author: Caolán McNamara 
AuthorDate: Mon Jul 16 14:30:53 2018 +0100
Commit: Eike Rathke 
CommitDate: Tue Jul 17 11:09:49 2018 +0200

tdf#118549 crash on dialog teardown

only an issue for the current partially complete interim case

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

diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index 724a075b22d5..401c7f3d27d9 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -166,7 +166,9 @@ SvxColorTabPage::~SvxColorTabPage()
 void SvxColorTabPage::dispose()
 {
 mpTopDlg.clear();
+m_xValSetRecentListWin.reset();
 m_xValSetRecentList.reset();
+m_xValSetColorListWin.reset();
 m_xValSetColorList.reset();
 SfxTabPage::dispose();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-17 Thread Libreoffice Gerrit user
 sw/sdi/swriter.sdi |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit db843c97279924fd36f31c8f22269f804f5add07
Author: Xisco Fauli 
AuthorDate: Sat Jul 7 00:39:38 2018 +0200
Commit: Eike Rathke 
CommitDate: Tue Jul 17 11:06:08 2018 +0200

tdf#89893: Enable previous/next track changes in read-only mode

Change-Id: Ie7dd41b2f79347e9b959a73d5915379f2e2a
Reviewed-on: https://gerrit.libreoffice.org/57100
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky 
(cherry picked from commit eedeeb63d1287ed0416e1fe3d2f7ba37632626d0)
Reviewed-on: https://gerrit.libreoffice.org/57155
Reviewed-by: Eike Rathke 

diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi
index 058fc4bc09f6..19aa9dfeae05 100644
--- a/sw/sdi/swriter.sdi
+++ b/sw/sdi/swriter.sdi
@@ -7263,7 +7263,7 @@ SfxVoidItem NextTrackedChange FN_REDLINE_NEXT_CHANGE
 [
 AutoUpdate = FALSE,
 FastCall = FALSE,
-ReadOnlyDoc = FALSE,
+ReadOnlyDoc = TRUE,
 Toggle = FALSE,
 Container = FALSE,
 RecordAbsolute = FALSE,
@@ -7281,7 +7281,7 @@ SfxVoidItem PreviousTrackedChange FN_REDLINE_PREV_CHANGE
 [
 AutoUpdate = FALSE,
 FastCall = FALSE,
-ReadOnlyDoc = FALSE,
+ReadOnlyDoc = TRUE,
 Toggle = FALSE,
 Container = FALSE,
 RecordAbsolute = FALSE,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-17 Thread Libreoffice Gerrit user
 include/sfx2/tabdlg.hxx   |6 +++---
 sfx2/source/dialog/tabdlg.cxx |   23 ++-
 2 files changed, 13 insertions(+), 16 deletions(-)

New commits:
commit 215de37cd1d860f1e0471319cd8069d51cd8887d
Author: Caolán McNamara 
AuthorDate: Sun Jul 15 19:43:18 2018 +0100
Commit: Eike Rathke 
CommitDate: Tue Jul 17 11:05:11 2018 +0200

coverity#1437960 Resource leak in object

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

diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx
index 6e3033500e5a..adc120068153 100644
--- a/include/sfx2/tabdlg.hxx
+++ b/include/sfx2/tabdlg.hxx
@@ -241,10 +241,10 @@ private:
 std::unique_ptr m_xResetBtn;
 std::unique_ptr m_xSizeGroup;
 
-SfxItemSet* m_pSet;
+std::unique_ptr   m_pSet;
 std::unique_ptr   m_pOutSet;
-std::unique_ptr< TabDlg_Impl >m_pImpl;
-sal_uInt16* m_pRanges;
+std::unique_ptr  m_pImpl;
+std::unique_ptr m_pRanges;
 OString m_sAppPageId;
 
 DECL_DLLPRIVATE_LINK(ActivatePageHdl, const OString&, void);
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index 534cef32f2a5..aa1db8c9c3a5 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -1465,8 +1465,6 @@ SfxTabDialogController::SfxTabDialogController
 , m_xCancelBtn(m_xBuilder->weld_button("cancel"))
 , m_xResetBtn(m_xBuilder->weld_button("reset"))
 , m_pSet(pItemSet ? new SfxItemSet(*pItemSet) : nullptr)
-, m_pOutSet(nullptr)
-, m_pRanges(nullptr)
 {
 Init_Impl(bEditFmt);
 }
@@ -1549,7 +1547,7 @@ IMPL_LINK_NOARG(SfxTabDialogController, ResetHdl, 
weld::Button&, void)
 Data_Impl* pDataObject = Find( m_pImpl->aData, sId );
 DBG_ASSERT( pDataObject, "Id not known" );
 
-pDataObject->pTabPage->Reset( m_pSet );
+pDataObject->pTabPage->Reset( m_pSet.get() );
 // Also reset relevant items of ExampleSet and OutSet to initial state
 if (pDataObject->fnGetRanges)
 {
@@ -1619,7 +1617,7 @@ IMPL_LINK(SfxTabDialogController, ActivatePageHdl, const 
OString&, rPage, void)
 return;
 
 if (pDataObject->bRefresh)
-pTabPage->Reset(m_pSet);
+pTabPage->Reset(m_pSet.get());
 pDataObject->bRefresh = false;
 
 if (m_xExampleSet)
@@ -1768,7 +1766,7 @@ const sal_uInt16* 
SfxTabDialogController::GetInputRanges(const SfxItemPool& rPoo
 }
 
 if ( m_pRanges )
-return m_pRanges;
+return m_pRanges.get();
 std::vector aUS;
 
 for (auto const& elem : m_pImpl->aData)
@@ -1798,10 +1796,10 @@ const sal_uInt16* 
SfxTabDialogController::GetInputRanges(const SfxItemPool& rPoo
 std::sort( aUS.begin(), aUS.end() );
 }
 
-m_pRanges = new sal_uInt16[aUS.size() + 1];
-std::copy( aUS.begin(), aUS.end(), m_pRanges );
+m_pRanges.reset(new sal_uInt16[aUS.size() + 1]);
+std::copy( aUS.begin(), aUS.end(), m_pRanges.get() );
 m_pRanges[aUS.size()] = 0;
-return m_pRanges;
+return m_pRanges.get();
 }
 
 SfxTabDialogController::~SfxTabDialogController()
@@ -1946,7 +1944,7 @@ void SfxTabDialogController::CreatePages()
 if (pDataObject->pTabPage)
continue;
 weld::Container* pPage = m_xTabCtrl->get_page(pDataObject->sId);
-pDataObject->pTabPage = (pDataObject->fnCreatePage)(pPage, m_pSet);
+pDataObject->pTabPage = (pDataObject->fnCreatePage)(pPage, 
m_pSet.get());
 pDataObject->pTabPage->SetDialogController(this);
 
 OUString sConfigId = 
OStringToOUString(pDataObject->pTabPage->GetConfigId(), RTL_TEXTENCODING_UTF8);
@@ -1959,7 +1957,7 @@ void SfxTabDialogController::CreatePages()
 pDataObject->pTabPage->SetUserData(sUserData);
 
 PageCreated(pDataObject->sId, *pDataObject->pTabPage);
-pDataObject->pTabPage->Reset(m_pSet);
+pDataObject->pTabPage->Reset(m_pSet.get());
 }
 }
 
@@ -2085,8 +2083,7 @@ void SfxTabDialogController::SetInputSet( const 
SfxItemSet* pInSet )
 
 {
 bool bSet = ( m_pSet != nullptr );
-delete m_pSet;
-m_pSet = pInSet ? new SfxItemSet(*pInSet) : nullptr;
+m_pSet.reset(pInSet ? new SfxItemSet(*pInSet) : nullptr);
 
 if (!bSet && !m_xExampleSet && !m_pOutSet && m_pSet)
 {
@@ -2104,7 +2101,7 @@ SfxItemSet* SfxTabDialogController::GetInputSetImpl()
 */
 
 {
-return m_pSet;
+return m_pSet.get();
 }
 
 void SfxTabDialogController::RemoveResetButton()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - cui/source include/svx starmath/source svx/source

2018-07-17 Thread Libreoffice Gerrit user
 cui/source/dialogs/cuicharmap.cxx   |9 +++--
 include/svx/charmap.hxx |5 +++--
 starmath/source/dialog.cxx  |3 +--
 svx/source/dialog/charmap.cxx   |8 ++--
 svx/source/dialog/searchcharmap.cxx |1 -
 5 files changed, 13 insertions(+), 13 deletions(-)

New commits:
commit a09d357daf65e285323ff77653a6de3058fc44da
Author: Caolán McNamara 
AuthorDate: Mon Jul 16 16:04:11 2018 +0100
Commit: Eike Rathke 
CommitDate: Tue Jul 17 11:01:57 2018 +0200

tdf#118681 make sure we're using the right font char map

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

diff --git a/cui/source/dialogs/cuicharmap.cxx 
b/cui/source/dialogs/cuicharmap.cxx
index 117ab6f5813d..7c6d8f50a342 100755
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -668,8 +668,7 @@ IMPL_LINK_NOARG(SvxCharacterMap, FontSelectHdl, 
weld::ComboBoxText&, void)
 bool bNeedSubset = (aFont.GetCharSet() != RTL_TEXTENCODING_SYMBOL);
 if (bNeedSubset)
 {
-FontCharMapRef xFontCharMap( new FontCharMap() );
-m_xShowSet->GetFontCharMap( xFontCharMap );
+FontCharMapRef xFontCharMap = m_xShowSet->GetFontCharMap();
 pSubsetMap = new SubsetMap( xFontCharMap );
 
 // update subset listbox for new font's unicode subsets
@@ -841,8 +840,7 @@ IMPL_LINK_NOARG(SvxCharacterMap, SearchUpdateHdl, 
weld::Entry&, void)
 
 toggleSearchView(true);
 
-FontCharMapRef xFontCharMap(new FontCharMap());
-m_xSearchSet->GetFontCharMap(xFontCharMap);
+FontCharMapRef xFontCharMap = m_xSearchSet->GetFontCharMap();
 
 sal_UCS4 sChar = xFontCharMap->GetFirstChar();
 while(sChar != xFontCharMap->GetLastChar())
@@ -1061,8 +1059,7 @@ void SvxCharacterMap::selectCharByCode(Radix radix)
 // Convert the code back to a character using the appropriate radix
 sal_UCS4 cChar = aCodeString.toUInt32(static_cast (radix));
 // Use FontCharMap::HasChar(sal_UCS4 cChar) to see if the desired 
character is in the font
-FontCharMapRef xFontCharMap(new FontCharMap());
-m_xShowSet->GetFontCharMap(xFontCharMap);
+FontCharMapRef xFontCharMap = m_xShowSet->GetFontCharMap();
 if (xFontCharMap->HasChar(cChar))
 // Select the corresponding character
 SetChar(cChar);
diff --git a/include/svx/charmap.hxx b/include/svx/charmap.hxx
index 6e18581c4786..5101b230059f 100644
--- a/include/svx/charmap.hxx
+++ b/include/svx/charmap.hxx
@@ -32,6 +32,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -80,8 +81,8 @@ public:
 voidSetFavClickHdl( const Link& rHdl ) { 
aFavClickHdl = rHdl; }
 static sal_uInt32& getSelectedChar();
 voidSetFont( const vcl::Font& rFont );
-vcl::Font const & GetFont() const { return mxVirDev->GetFont(); }
-boolGetFontCharMap(FontCharMapRef& rxFontCharMap) const { 
return mxVirDev->GetFontCharMap(rxFontCharMap); }
+vcl::Font const & GetFont() const { return maFont; }
+FontCharMapRef  GetFontCharMap();
 boolisFavChar(const OUString& sTitle, const OUString& rFont);
 voidgetFavCharacterList(); //gets both Fav char and Fav char 
font list
 voidupdateFavCharacterList(const OUString& rChar, const 
OUString& rFont);
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index ac7269345c0c..1dabf0abd0b3 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -1987,8 +1987,7 @@ void SmSymDefineDialog::SetFont(const OUString 
&rFontName, const OUString &rStyl
 m_aSymbolDisplay.SetFont(aFontMetric);
 
 // update subset listbox for new font's unicode subsets
-FontCharMapRef xFontCharMap;
-m_xCharsetDisplay->GetFontCharMap( xFontCharMap );
+FontCharMapRef xFontCharMap = m_xCharsetDisplay->GetFontCharMap();
 m_xSubsetMap.reset(new SubsetMap( xFontCharMap ));
 
 m_xFontsSubsetLB->clear();
diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx
index 1d8d286d03cc..4dd8dec69cde 100644
--- a/svx/source/dialog/charmap.cxx
+++ b/svx/source/dialog/charmap.cxx
@@ -20,7 +20,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include 
@@ -845,12 +844,17 @@ svx::SvxShowCharSetItem* SvxShowCharSet::ImplGetItem( int 
_nPos )
 return aFind->second.get();
 }
 
-
 sal_Int32 SvxShowCharSet::getMaxCharCount() const
 {
 return mxFontCharMap->GetCharCount();
 }
 
+FontCharMapRef SvxShowCharSet::GetFontCharMap()
+{
+RecalculateFont(*mxVirDev);
+return mxFontCharMap;
+}
+
 // TODO: should be moved into Font Attributes stuff
 // we let it mature here though because it is currently the only use
 
diff --git a/svx/source/dialog/searchcharmap.cxx 
b/svx/source/dialog/searchcharmap.cxx
index cf9faf363673..ba2a8a36eb56 100644
--- a/svx/source/dialog

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

2018-07-17 Thread Libreoffice Gerrit user
 cui/source/options/optasian.cxx |   41 ++--
 1 file changed, 15 insertions(+), 26 deletions(-)

New commits:
commit d683ec33d478606fa8afc2d44d8f1282562e8dfa
Author: Noel Grandin 
AuthorDate: Mon Jul 16 10:00:54 2018 +0200
Commit: Noel Grandin 
CommitDate: Tue Jul 17 10:59:03 2018 +0200

loplugin:useuniqueptr in SvxAsianLayoutPage_Impl

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

diff --git a/cui/source/options/optasian.cxx b/cui/source/options/optasian.cxx
index c2a5030b54d0..135cf9fdc1ff 100644
--- a/cui/source/options/optasian.cxx
+++ b/cui/source/options/optasian.cxx
@@ -50,33 +50,22 @@ struct SvxForbiddenChars_Impl
 std::unique_ptr  pCharacters;
 };
 
-typedef std::map< LanguageType, SvxForbiddenChars_Impl* > 
SvxForbiddenCharacterMap_Impl;
-
 struct SvxAsianLayoutPage_Impl
 {
 SvxAsianConfig  aConfig;
 SvxAsianLayoutPage_Impl() {}
 
-~SvxAsianLayoutPage_Impl();
-
 Reference< XForbiddenCharacters >   xForbidden;
 Reference< XPropertySet >   xPrSet;
 Reference< XPropertySetInfo >   xPrSetInfo;
-SvxForbiddenCharacterMap_Impl   aChangedLanguagesMap;
+std::map< LanguageType, std::unique_ptr >
+aChangedLanguagesMap;
 
 boolhasForbiddenCharacters(LanguageType eLang);
 SvxForbiddenChars_Impl* getForbiddenCharacters(LanguageType eLang);
-voidaddForbiddenCharacters(LanguageType eLang, 
ForbiddenCharacters const * pForbidden);
+voidaddForbiddenCharacters(LanguageType eLang, 
std::unique_ptr pForbidden);
 };
 
-SvxAsianLayoutPage_Impl::~SvxAsianLayoutPage_Impl()
-{
-for (auto const& changedLanguage : aChangedLanguagesMap)
-{
-delete changedLanguage.second;
-}
-}
-
 boolSvxAsianLayoutPage_Impl::hasForbiddenCharacters(LanguageType eLang)
 {
 return aChangedLanguagesMap.count( eLang );
@@ -84,28 +73,28 @@ bool
SvxAsianLayoutPage_Impl::hasForbiddenCharacters(LanguageType eLang)
 
 SvxForbiddenChars_Impl* 
SvxAsianLayoutPage_Impl::getForbiddenCharacters(LanguageType eLang)
 {
-SvxForbiddenCharacterMap_Impl::iterator it = aChangedLanguagesMap.find( 
eLang );
+auto it = aChangedLanguagesMap.find( eLang );
 DBG_ASSERT( ( it != aChangedLanguagesMap.end() ), "language not 
available");
 if( it != aChangedLanguagesMap.end() )
-return it->second;
+return it->second.get();
 return nullptr;
 }
 
 void SvxAsianLayoutPage_Impl::addForbiddenCharacters(
-LanguageType eLang, ForbiddenCharacters const * pForbidden)
+LanguageType eLang, std::unique_ptr pForbidden)
 {
-SvxForbiddenCharacterMap_Impl::iterator itOld = aChangedLanguagesMap.find( 
eLang );
+auto itOld = aChangedLanguagesMap.find( eLang );
 if( itOld == aChangedLanguagesMap.end() )
 {
-SvxForbiddenChars_Impl* pChar = new SvxForbiddenChars_Impl;
+std::unique_ptr pChar(new 
SvxForbiddenChars_Impl);
 pChar->bRemoved = nullptr == pForbidden;
-pChar->pCharacters.reset( pForbidden ? new 
ForbiddenCharacters(*pForbidden) : nullptr );
-aChangedLanguagesMap.insert( std::make_pair( eLang, pChar ) );
+pChar->pCharacters = std::move(pForbidden);
+aChangedLanguagesMap.emplace( eLang, std::move(pChar) );
 }
 else
 {
 itOld->second->bRemoved = nullptr == pForbidden;
-itOld->second->pCharacters.reset( pForbidden ? new 
ForbiddenCharacters(*pForbidden) : nullptr );
+itOld->second->pCharacters = std::move(pForbidden);
 }
 }
 
@@ -385,10 +374,10 @@ IMPL_LINK(SvxAsianLayoutPage, ModifyHdl, Edit&, rEdit, 
void)
 {
 if(bEnable)
 {
-ForbiddenCharacters aSet;
-aSet.beginLine = sStart;
-aSet.endLine = sEnd;
-pImpl->addForbiddenCharacters(eSelectLanguage, &aSet);
+std::unique_ptr pFCSet(new 
ForbiddenCharacters);
+pFCSet->beginLine = sStart;
+pFCSet->endLine = sEnd;
+pImpl->addForbiddenCharacters(eSelectLanguage, 
std::move(pFCSet));
 }
 else
 pImpl->addForbiddenCharacters(eSelectLanguage, nullptr);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Repository.mk

2018-07-17 Thread Libreoffice Gerrit user
 Repository.mk |3 ---
 1 file changed, 3 deletions(-)

New commits:
commit 5a74884e7da4c497c4ea714bf84d62b55ed82cfe
Author: Caolán McNamara 
AuthorDate: Tue Jul 17 09:30:54 2018 +0100
Commit: Caolán McNamara 
CommitDate: Tue Jul 17 09:30:54 2018 +0100

drop reference to removed chart2_opengl_shader

Change-Id: I8bd1727028d18367ffa160a87aa548bca60c212f

diff --git a/Repository.mk b/Repository.mk
index 3907ee680922..9936b0e71c8c 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -938,9 +938,6 @@ $(eval $(call gb_Helper_register_packages_for_install,ooo,\
wizards_basicusr \
wizards_properties \
wizards_wizardshare \
-   $(if $(ENABLE_HEADLESS),, \
-   chart2_opengl_shader \
-   ) \
vcl_opengl_shader \
$(if $(filter WNT,$(OS)), \
vcl_opengl_blacklist \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-cd-3-2' - wsd/FileServer.cpp

2018-07-17 Thread Ashod Nakashian
 wsd/FileServer.cpp |   11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

New commits:
commit c7a4a463d6252ce7827299a0e9bdf6d78f81ad52
Author: Ashod Nakashian 
Date:   Fri Feb 23 19:16:57 2018 -0500

wsd: warn for invalid file requests by clients instead of error

Also, logs append new-line automatically.

Change-Id: Ie5b09e454236cab2cdaa14d6f8be7b67e8fb1000
Reviewed-on: https://gerrit.libreoffice.org/52416
Reviewed-by: Michael Meeks 
Tested-by: Michael Meeks 
(cherry picked from commit 18750d2d39948e6fda38e2c9b8be15b375c896cb)
Reviewed-on: https://gerrit.libreoffice.org/57538

diff --git a/wsd/FileServer.cpp b/wsd/FileServer.cpp
index db02203a2..32717319e 100644
--- a/wsd/FileServer.cpp
+++ b/wsd/FileServer.cpp
@@ -421,7 +421,7 @@ void FileServerRequestHandler::handleRequest(const 
HTTPRequest& request, Poco::M
 }
 catch (const Poco::FileNotFoundException& exc)
 {
-LOG_ERR("FileServerRequestHandler: " << exc.displayText());
+LOG_WRN("FileServerRequestHandler: " << exc.displayText());
 
 // 404 not found
 std::ostringstream oss;
@@ -440,7 +440,7 @@ void FileServerRequestHandler::readDirToHash(const 
std::string &basePath, const
 struct stat fileStat;
 DIR *workingdir;
 
-LOG_TRC("Pre-reading directory: " << basePath << path << "\n");
+LOG_TRC("Pre-reading directory: " << basePath << path);
 workingdir = opendir((basePath + path).c_str());
 
 while ((currentFile = readdir(workingdir)) != NULL)
@@ -456,7 +456,7 @@ void FileServerRequestHandler::readDirToHash(const 
std::string &basePath, const
 
 else if (S_ISREG(fileStat.st_mode))
 {
-LOG_TRC("Reading file: '" << basePath << relPath << " as '" << 
relPath << "'\n");
+LOG_TRC("Reading file: '" << basePath << relPath << " as '" << 
relPath << "'");
 
 std::ifstream file(basePath + relPath, std::ios::binary);
 
@@ -471,7 +471,8 @@ void FileServerRequestHandler::readDirToHash(const 
std::string &basePath, const
 compressedFile.reserve(fileStat.st_size);
 std::string uncompressedFile;
 uncompressedFile.reserve(fileStat.st_size);
-do {
+do
+{
 file.read(&buf[0], fileStat.st_size);
 const long unsigned int size = file.gcount();
 if (size == 0)
@@ -573,7 +574,7 @@ void FileServerRequestHandler::preprocessFile(const 
HTTPRequest& request, Poco::
 {
 tokenTtl = std::stoul(accessTokenTtl);
 }
-catch(const std::exception& exc)
+catch (const std::exception& exc)
 {
 LOG_ERR("access_token_ttl must be represented as the number of 
milliseconds since January 1, 1970 UTC, when the token will expire");
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-17 Thread Libreoffice Gerrit user
 include/svtools/transfer.hxx   |3 --
 svtools/source/misc/transfer2.cxx  |   45 -
 sw/source/uibase/docvw/romenu.cxx  |   12 
 sw/source/uibase/docvw/romenu.hxx  |1 
 sw/uiconfig/swriter/ui/readonlymenu.ui |8 -
 5 files changed, 69 deletions(-)

New commits:
commit 923131f8b47f7ae53b1385df213722991673bffa
Author: Xisco Fauli 
AuthorDate: Sun Jul 8 19:30:28 2018 +0200
Commit: Miklos Vajna 
CommitDate: Tue Jul 17 10:26:33 2018 +0200

tdf#105262 Clean up CopyGraphic

It's only available in read-only mode, it doesn't work and
the images can be copied with the normal copy option

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

diff --git a/include/svtools/transfer.hxx b/include/svtools/transfer.hxx
index 4091a8f087d1..dfd6e1b77dc0 100644
--- a/include/svtools/transfer.hxx
+++ b/include/svtools/transfer.hxx
@@ -487,9 +487,6 @@ public:
 virtual ~TransferDataContainer() override;
 
 voidCopyINetBookmark( const INetBookmark& rBkmk );
-voidCopyINetImage( const INetImage& rINtImg );
-voidCopyImageMap( const ImageMap& rImgMap );
-voidCopyGraphic( const Graphic& rGrf );
 voidCopyString( const OUString& rStr );
 voidCopyString( SotClipboardFormatId nFmt, const OUString& 
rStr );
 voidCopyAny( SotClipboardFormatId nFmt, const 
css::uno::Any& rAny );
diff --git a/svtools/source/misc/transfer2.cxx 
b/svtools/source/misc/transfer2.cxx
index b1ece2619f52..f41163a729ba 100644
--- a/svtools/source/misc/transfer2.cxx
+++ b/svtools/source/misc/transfer2.cxx
@@ -427,51 +427,6 @@ void TransferDataContainer::CopyByteString( 
SotClipboardFormatId nFormatId,
 }
 
 
-void TransferDataContainer::CopyINetImage( const INetImage& rINtImg )
-{
-SvMemoryStream aMemStm( 1024, 1024 );
-aMemStm.SetVersion( SOFFICE_FILEFORMAT_50 );
-rINtImg.Write( aMemStm, SotClipboardFormatId::INET_IMAGE );
-CopyAnyData( SotClipboardFormatId::INET_IMAGE, static_cast(aMemStm.GetData()),
-aMemStm.Seek( STREAM_SEEK_TO_END ) );
-}
-
-
-void TransferDataContainer::CopyImageMap( const ImageMap& rImgMap )
-{
-SvMemoryStream aMemStm( 8192, 8192 );
-aMemStm.SetVersion( SOFFICE_FILEFORMAT_50 );
-rImgMap.Write( aMemStm );
-CopyAnyData( SotClipboardFormatId::SVIM, static_cast(aMemStm.GetData()),
-aMemStm.Seek( STREAM_SEEK_TO_END ) );
-}
-
-
-void TransferDataContainer::CopyGraphic( const Graphic& rGrf )
-{
-GraphicType nType = rGrf.GetType();
-if( GraphicType::NONE == nType )
-return;
-
-if( !pImpl->pGrf )
-pImpl->pGrf.reset( new Graphic( rGrf ) );
-else
-*pImpl->pGrf = rGrf;
-
-AddFormat( SotClipboardFormatId::SVXB );
-
-if( GraphicType::Bitmap == nType )
-{
-AddFormat( SotClipboardFormatId::PNG );
-AddFormat( SotClipboardFormatId::BITMAP );
-}
-else if( GraphicType::GdiMetafile == nType )
-{
-AddFormat( SotClipboardFormatId::GDIMETAFILE );
-}
-}
-
-
 void TransferDataContainer::CopyString( SotClipboardFormatId nFmt, const 
OUString& rStr )
 {
 if( !rStr.isEmpty() )
diff --git a/sw/source/uibase/docvw/romenu.cxx 
b/sw/source/uibase/docvw/romenu.cxx
index af8a625c55cf..3b56c4b2fb29 100644
--- a/sw/source/uibase/docvw/romenu.cxx
+++ b/sw/source/uibase/docvw/romenu.cxx
@@ -102,7 +102,6 @@ SwReadOnlyPopup::SwReadOnlyPopup(const Point &rDPos, SwView 
&rV)
 , m_nReadonlyBackgroundTogallerylink(m_xMenu->GetItemId("backaslink"))
 , m_nReadonlyBackgroundTogallerycopy(m_xMenu->GetItemId("backascopy"))
 , m_nReadonlyCopylink(m_xMenu->GetItemId("copylink"))
-, m_nReadonlyCopyGraphic(m_xMenu->GetItemId("copygraphic"))
 , m_nReadonlyLoadGraphic(m_xMenu->GetItemId("loadgraphic"))
 , m_nReadonlyGraphicoff(m_xMenu->GetItemId("imagesoff"))
 , m_nReadonlyFullscreen(m_xMenu->GetItemId("fullscreen"))
@@ -133,7 +132,6 @@ SwReadOnlyPopup::SwReadOnlyPopup(const Point &rDPos, SwView 
&rV)
 if ( nullptr == (pGrf = rSh.GetGrfAtPos( m_rDocPos, m_sGrfName, bLink )) )
 {
 m_xMenu->EnableItem(m_nReadonlySaveGraphic, false);
-m_xMenu->EnableItem(m_nReadonlyCopyGraphic, false);
 }
 else
 {
@@ -318,16 +316,6 @@ void SwReadOnlyPopup::Execute( vcl::Window* pWin, 
sal_uInt16 nId )
 pClipCntnr = new TransferDataContainer;
 pClipCntnr->CopyString( m_sURL );
 }
-else if (nId == m_nReadonlyCopyGraphic)
-{
-pClipCntnr = new TransferDataContainer;
-pClipCntnr->CopyGraphic( m_aGraphic );
-
-if( m_pImageMap )
-pClipCntnr->CopyImageMap( *m_pImageMap );
-if( m_pTargetURL )
-pClipCntnr->CopyINetImage( *m_pTargetURL );
-}
   

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

2018-07-17 Thread Libreoffice Gerrit user
 sc/source/core/tool/interpr6.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit a51e14849606111e9dcbccb2707786c53e0f732d
Author: Winfried Donkers 
AuthorDate: Mon Jul 16 15:35:16 2018 +0200
Commit: Eike Rathke 
CommitDate: Tue Jul 17 09:50:06 2018 +0200

Pop all remaining arguments on stack in ScInterpreter::Iterateparameters().

(And not all but one.)

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

diff --git a/sc/source/core/tool/interpr6.cxx b/sc/source/core/tool/interpr6.cxx
index e1769e27b091..b8ffd45e57db 100644
--- a/sc/source/core/tool/interpr6.cxx
+++ b/sc/source/core/tool/interpr6.cxx
@@ -548,6 +548,7 @@ void ScInterpreter::IterateParameters( ScIterFunc eFunc, 
bool bTextAsZero )
 }
 else
 {
+Pop();
 switch ( eFunc )
 {
 case ifAVERAGE:
@@ -557,7 +558,6 @@ void ScInterpreter::IterateParameters( ScIterFunc eFunc, 
bool bTextAsZero )
 {
 if ( bTextAsZero )
 {
-Pop();
 nCount++;
 if ( eFunc == ifPRODUCT )
 fRes = 0.0;
@@ -571,7 +571,6 @@ void ScInterpreter::IterateParameters( ScIterFunc eFunc, 
bool bTextAsZero )
 }
 break;
 default:
-Pop();
 nCount++;
 }
 }
___
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-07-17 Thread Libreoffice Gerrit user
 sw/qa/extras/rtfimport/data/tdf81943.rtf   |   48 +
 sw/qa/extras/rtfimport/rtfimport.cxx   |6 +++
 writerfilter/source/rtftok/rtfdocumentimpl.cxx |   24 
 writerfilter/source/rtftok/rtfdocumentimpl.hxx |2 +
 4 files changed, 80 insertions(+)

New commits:
commit 0c91f8f839d36c8b5af272b1d3c835d2f4af6b65
Author: Miklos Vajna 
AuthorDate: Mon Jul 16 22:04:02 2018 +0200
Commit: Miklos Vajna 
CommitDate: Tue Jul 17 09:03:42 2018 +0200

tdf#81943 sw RTF import: fix missing wrap in background for in-table shape

Regression from commit 015fd55c94b7b650ed8e572cafaf3b0f903b01b9
(tdf#96275 RTF import: fix anchor of shapes inside tables, 2016-05-10),
remember more context when delaying the import of a shape.

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

diff --git a/sw/qa/extras/rtfimport/data/tdf81943.rtf 
b/sw/qa/extras/rtfimport/data/tdf81943.rtf
new file mode 100644
index ..28b3f430abce
--- /dev/null
+++ b/sw/qa/extras/rtfimport/data/tdf81943.rtf
@@ -0,0 +1,48 @@
+{\rtf1
+{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;
+\red255\green255\blue255;\red0\green0\blue128;}
+\trowd \irow0\cellx6300\cellx10800\pard\plain 
+{\rtlch\fcs1 \af1 \ltrch\fcs0 \lang1024\langfe1024\noproof 
+{\shp
+{\*\shpinst\shpleft-199\shptop-18\shpright11028\shpbottom2236\shpfhdr0\shpbxpage\shpbxignore\shpbypage\shpbyignore\shpwr3\shpwrk0\shpfblwtxt1\shpz0\shplockanchor\shplid1026
+{\sp
+{\sn shapeType}
+{\sv 75}
+}
+{\sp
+{\sn pib}
+{\sv 
+{\pict\picscalex99\picscaley99\piccropl0\piccropr0\piccropt0\piccropb0\picw19905\pich3997\picwgoal11285\pichgoal2266\pngblip
+89504e470d0a1a0a000d4948445200040004080200269309290009704859732e232e230178a53f76000774494d4507e2
+07090f031bf2645ea100144944415408d763cc63f8cf00034c0c480037070047bd01759ad735e249454e44ae426082}
+}
+}
+{\sp
+{\sn posrelh}
+{\sv 1}
+}
+{\sp
+{\sn posrelv}
+{\sv 1}
+}
+{\sp
+{\sn fBehindDocument}
+{\sv 1}
+}
+}
+}
+}
+{\rtlch\fcs1 \af1 \ltrch\fcs0  \cell }
+\pard \ltrpar \intbl\cell
+\pard\plain \ltrpar\ql \li0\ri0\intbl\aspnum \rtlch\fcs1 \af1\afs22 
\ltrch\fcs0 \f39\fs18\lang1033\langfe1033\cgrid 
+{\rtlch\fcs1 \af1 \ltrch\fcs0  \trowd \irow0\cellx6300\cellx10800\row }
+\trowd \irow1\lastrow 
+\cellx6300\cellx10800\pard\plain
+\f42\fs40\cf8\lang1033\langfe1033\cgrid 
+{\rtlch\fcs1 \af0 \ltrch\fcs0 \f31506 hello\cell}
+{\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1049\langfe1033 \cell }
+\pard\plain
+{\rtlch\fcs1 \af1 \ltrch\fcs0  \trowd \irow1\lastrow 
+\cellx6300\cellx10800\row }
+\pard\par
+}
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx 
b/sw/qa/extras/rtfimport/rtfimport.cxx
index 664f3edb9589..fedfb7fbd4ce 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -173,6 +173,12 @@ DECLARE_RTFIMPORT_TEST(testTdf115715, "tdf115715.rtf")
  getProperty(getParagraph(2), 
"ParaFirstLineIndent"));
 }
 
+DECLARE_RTFIMPORT_TEST(testTdf81943, "tdf81943.rtf")
+{
+// The shape wasn't in background.
+CPPUNIT_ASSERT_EQUAL(false, getProperty(getShape(1), "Opaque"));
+}
+
 DECLARE_RTFIMPORT_TEST(testTdf115155, "tdf115155.rtf")
 {
 auto xLevels
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx 
b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 08e683b05921..a1afc2bc93a6 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -1064,6 +1064,13 @@ void RTFDocumentImpl::resolvePict(bool const bInline, 
uno::Reference(aTuple)->getShape();
+
 m_pSdrImport->resolve(std::get<1>(aTuple)->getShape(), true, 
RTFSdrImport::SHAPE);
 m_aStates.top().pCurrentBuffer = pCurrentBuffer;
 }
@@ -2251,6 +2263,18 @@ RTFError RTFDocumentImpl::popState()
 m_aStates.top().pCurrentBuffer->push_back(
 Buf_t(BUFFER_PICTURE, pPictureValue, nullptr));
 auto pValue = new RTFValue(m_aStates.top().aShape);
+
+// Buffer wrap type.
+for (auto& rCharacterSprm : 
m_aStates.top().aCharacterSprms)
+{
+if (rCharacterSprm.first == 
NS_ooxml::LN_EG_WrapType_wrapNone
+|| rCharacterSprm.first == 
NS_ooxml::LN_EG_WrapType_wrapTight)
+{
+m_aStates.top().aShape.aWrapSprm = rCharacterSprm;
+break;
+}
+}
+
 m_aStates.top().pCurrentBuffer->push_back(
 Buf_t(BUFFER_RESOLVESHAPE, pValue, nullptr));
 }
diff --git a/writerfilter/source/rtftok/rtfdocum